commit 5121fd03d434515da6500b033c2f85f4b3980159 Author: aschwarz Date: Mon Nov 28 10:24:23 2022 +0100 first commit diff --git a/++ Dokumente/200504 BPM Workshop.docx b/++ Dokumente/200504 BPM Workshop.docx new file mode 100755 index 0000000..c10091e Binary files /dev/null and b/++ Dokumente/200504 BPM Workshop.docx differ diff --git a/++ Dokumente/2020-07-21_bpm.sql b/++ Dokumente/2020-07-21_bpm.sql new file mode 100755 index 0000000..039846c --- /dev/null +++ b/++ Dokumente/2020-07-21_bpm.sql @@ -0,0 +1,3401 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.2 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 21. Jul 2020 um 09:42 +-- Server-Version: 10.4.11-MariaDB +-- PHP-Version: 7.4.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `bpm` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_admin` +-- + +CREATE TABLE `bpm_admin` ( + `bpmuid` int(11) NOT NULL, + `vorname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `nachname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `uid` varchar(23) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `passwort` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Benutzer'; + +-- +-- Daten für Tabelle `bpm_admin` +-- + +INSERT INTO `bpm_admin` (`bpmuid`, `vorname`, `nachname`, `mail`, `uid`, `passwort`) VALUES +(1, 'BPM', 'Admin', 'netblack@gmx.de', 'admin', '0e457bb607700e59fbcfb77a2d94337e'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_adminlog` +-- + +CREATE TABLE `bpm_adminlog` ( + `lid` int(11) NOT NULL, + `Datum` datetime NOT NULL, + `IP` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_agent` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `bpmuid` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Logins der Anwender'; + +-- +-- Daten für Tabelle `bpm_adminlog` +-- + +INSERT INTO `bpm_adminlog` (`lid`, `Datum`, `IP`, `user_agent`, `bpmuid`) VALUES +(1, '2020-07-10 09:54:54', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(2, '2020-07-15 09:35:04', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(3, '2020-07-17 11:11:05', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(4, '2020-07-17 11:16:50', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(5, '2020-07-20 06:59:58', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(6, '2020-07-21 06:48:47', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dienststellen` +-- + +CREATE TABLE `bpm_dienststellen` ( + `dst_id` int(11) NOT NULL, + `bezeichnung` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `bez` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `str` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `plz` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `ort` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `tel` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `internet` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `mail` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `gueltig_von` date NOT NULL, + `gueltig_bis` date NOT NULL, + `init_tan` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `regmail_betreff` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `regmail_text` text COLLATE utf8_unicode_ci NOT NULL, + `regmail_status` enum('O','V','F') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'O', + `regmail_sendedat` datetime NOT NULL, + `pwd` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `register_dat` datetime NOT NULL, + `mail_reset` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Daten für Tabelle `bpm_dienststellen` +-- + +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(1, 'Gemeindeverwaltung', 'Abstatt', 'Gemeindeverwaltung Abstatt', 'Rathausstr. 30', '74232', 'Abstatt', '07062 677-0', 'http://www.abstatt.de', 'info@abstatt.de', '0000-00-00', '0000-00-00', 'Sp5rXBk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(2, 'Gemeindeverwaltung', 'Abtsgmünd', 'Gemeindeverwaltung Abtsgmünd', 'Rathausplatz 1', '73453', 'Abtsgmünd', '07366 82-0', 'http://www.abtsgmuend.de', 'info@abtsgmuend.de', '0000-00-00', '0000-00-00', 'BACMA?n', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(3, 'Gemeindeverwaltung', 'Achberg', 'Gemeindeverwaltung Achberg', 'Kirchstr. 9', '88147', 'Achberg', '08380 226', 'http://www.achberg.de', 'info@achberg.de', '0000-00-00', '0000-00-00', 'EP7-xT#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(4, 'Gemeindeverwaltung', 'Achstetten', 'Gemeindeverwaltung Achstetten', 'Laupheimer Str. 6', '88480', 'Achstetten', '07392 9706-0', 'http://www.achstetten.de', 'info@achstetten.de', '0000-00-00', '0000-00-00', 'ye7Lcx4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(5, 'Gemeindeverwaltung', 'Adelberg', 'Gemeindeverwaltung Adelberg', 'Vordere Hauptstr. 2', '73099', 'Adelberg', '07166 91011-0', 'http://www.adelberg.de', 'gemeinde@adelberg.de', '0000-00-00', '0000-00-00', '9#J3cpy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(6, 'Gemeindeverwaltung', 'Adelmannsfelden', 'Gemeindeverwaltung Adelmannsfelden', 'Hauptstr. 71', '73486', 'Adelmannsfelden', '07963 9000-0', 'http://www.adelmannsfelden.de', 'hahn@adelmannsfelden.de', '0000-00-00', '0000-00-00', 'ZK?KFgC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(7, 'Gemeindeverwaltung', 'Affalterbach', 'Gemeindeverwaltung Affalterbach', 'Marbacher Str. 17', '71563', 'Affalterbach', '07144 8353-0', 'http://www.affalterbach.de', 'gemeinde@affalterbach.de', '0000-00-00', '0000-00-00', '#e7FEr!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(8, 'Gemeindeverwaltung', 'Aglasterhausen', 'Gemeindeverwaltung Aglasterhausen', 'Am Marktplatz 1', '74858', 'Aglasterhausen', '06262 9200-0', 'http://www.aglasterhausen.de', 'post@aglasterhausen.de', '0000-00-00', '0000-00-00', 'DV6kFz5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(9, 'Gemeindeverwaltung', 'Ahorn', 'Gemeindeverwaltung Ahorn', 'Schloßstr. 24', '74744', 'Ahorn', '06296 9202-0', 'http://www.gemeindeahorn.de', 'info@GemeindeAhorn.de', '0000-00-00', '0000-00-00', '8t7-syG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(10, 'Gemeindeverwaltung', 'Aichelberg', 'Gemeindeverwaltung Aichelberg', 'Vorderbergstr. 2', '73101', 'Aichelberg', '07164 80095-0', 'http://www.aichelberg.de', 'rathaus@aichelberg.kdrs.de', '0000-00-00', '0000-00-00', 'TshZZ46', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(11, 'Gemeindeverwaltung', 'Aichhalden', 'Gemeindeverwaltung Aichhalden', 'Reißerweg 3', '78733', 'Aichhalden', '07422 9702-130', 'http://www.aichhalden.de', 'Michael.Lehrer@aichhalden.de', '0000-00-00', '0000-00-00', 'NGxt6sJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(12, 'Gemeindeverwaltung', 'Aichstetten', 'Gemeindeverwaltung Aichstetten', 'Bachstr. 2', '88317', 'Aichstetten', '07565 9418-0', 'http://www.aichstetten.de', 'rathaus@aichstetten.de', '0000-00-00', '0000-00-00', 'xSszHa-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(13, 'Gemeindeverwaltung', 'Aichwald', 'Gemeindeverwaltung Aichwald', 'Seestr. 8', '73773', 'Aichwald', '0711 36909-0', 'http://www.gemeinde-aichwald.de', 'info@aichwald.de', '0000-00-00', '0000-00-00', 'PRLvmaY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(14, 'Gemeindeverwaltung', 'Aidlingen', 'Gemeindeverwaltung Aidlingen', 'Hauptstr. 6', '71134', 'Aidlingen', '07034 125-0', 'http://www.aidlingen.de', 'e.fauth@aidlingen.de', '0000-00-00', '0000-00-00', 'MrD8XPN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(15, 'Gemeindeverwaltung', 'Aitern', 'Gemeindeverwaltung Aitern', 'Schulweg 6', '79677', 'Aitern', '07673 350', 'http://www.aitern.de', 'gemeinde.aitern@t-online.de', '0000-00-00', '0000-00-00', 'r!62!!D', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(16, 'Gemeindeverwaltung', 'Aitrach', 'Gemeindeverwaltung Aitrach', 'Schwalweg 10', '88319', 'Aitrach', '07565 98000', 'http://www.aitrach.de', 'gemeinde@aitrach.de', '0000-00-00', '0000-00-00', 'mWD7fdy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(17, 'Gemeindeverwaltung', 'Albbruck', 'Gemeindeverwaltung Albbruck', 'Schulstr. 6', '79774', 'Albbruck', '07753 930-0', 'http://www.albbruck.de', 'gemeinde@albbruck.de', '0000-00-00', '0000-00-00', 'xePJVdh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(18, 'Gemeindeverwaltung', 'Albershausen', 'Gemeindeverwaltung Albershausen', 'Kirchstr. 1', '73095', 'Albershausen', '07161 3093-0', 'http://www.albershausen.de', 'gemeinde@albershausen.de', '0000-00-00', '0000-00-00', '!LGESx7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(19, 'Gemeindeverwaltung', 'Aldingen', 'Gemeindeverwaltung Aldingen', 'Marktplatz 2', '78554', 'Aldingen', '07424 882-0', 'http://www.aldingen.de', 'buergermeisteramt@aldingen.de', '0000-00-00', '0000-00-00', '?eg4F#e', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(20, 'Gemeindeverwaltung', 'Alfdorf', 'Gemeindeverwaltung Alfdorf', 'Obere Schloßstr. 28', '73553', 'Alfdorf', '07172 309-0', 'http://www.alfdorf.de', 'segan@alfdorf.de', '0000-00-00', '0000-00-00', 'kSZvFTJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(21, 'Gemeindeverwaltung', 'Allensbach', 'Gemeindeverwaltung Allensbach', 'Rathausplatz 1', '78476', 'Allensbach', '07533 801-0', 'http://www.allensbach.de', 'g21@allensbach.de', '0000-00-00', '0000-00-00', 'CgnsFu5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(22, 'Gemeindeverwaltung', 'Alleshausen', 'Gemeindeverwaltung Alleshausen', 'Hauptstr. 10', '88422', 'Alleshausen', '07582 8178', 'http://www.alleshausen.de/', 'gemeinde@alleshausen.de', '0000-00-00', '0000-00-00', '?5g!C89', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(23, 'Gemeindeverwaltung', 'Allmannsweiler', 'Gemeindeverwaltung Allmannsweiler', 'Buchauer Str. 2', '88348', 'Allmannsweiler', '07582 91333', 'http://www.allmannsweiler-bc.de', 'info@allmannsweiler-bc.de', '0000-00-00', '0000-00-00', '9snEmy4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(24, 'Gemeindeverwaltung', 'Allmendingen', 'Gemeindeverwaltung Allmendingen', 'Hauptstr. 16', '89604', 'Allmendingen', '07391 7015-0', 'http://www.allmendingen.de', 'info@allmendingen.de', '0000-00-00', '0000-00-00', 'cwPPsVX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(25, 'Gemeindeverwaltung', 'Allmersbach im Tal', 'Gemeindeverwaltung Allmersbach im Tal', 'Backnanger Str. 42', '71573', 'Allmersbach im Tal', '07191 3530-0', 'http://www.allmersbach.de', 'RWoerner@allmersbach.de', '0000-00-00', '0000-00-00', '-8ALL#b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(26, 'Gemeindeverwaltung', 'Altbach', 'Gemeindeverwaltung Altbach', 'Esslinger Str. 26', '73776', 'Altbach', '07153 7007-0', 'http://www.altbach.de', 'post@altbach.de', '0000-00-00', '0000-00-00', 'Du-7FAB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(27, 'Gemeindeverwaltung', 'Altdorf', 'Gemeindeverwaltung Altdorf', 'Kirchplatz 5', '71155', 'Altdorf', '07031 7474-0', 'http://www.altdorf-online.de', 'info@altdorf-bb.de', '0000-00-00', '0000-00-00', 'F-mkfAe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(28, 'Gemeindeverwaltung', 'Altdorf', 'Gemeindeverwaltung Altdorf', 'Spitalhof 1', '72655', 'Altdorf', '07127 9397-0', 'http://www.gemeinde-altdorf.de', 'rathaus@altdorf.kdrs.de', '0000-00-00', '0000-00-00', 'EZNS95N', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(29, 'Gemeindeverwaltung', 'Altenriet', 'Gemeindeverwaltung Altenriet', 'Brunnenstr. 5', '72657', 'Altenriet', '07127 32213', 'http://www.altenriet.de', 'rathaus@altenriet.kdrs.de', '0000-00-00', '0000-00-00', '2Xgng5r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(30, 'Gemeindeverwaltung', 'Altheim', 'Gemeindeverwaltung Altheim', 'Hauptstr. 15', '89605', 'Altheim', '07391 7015-0', 'http://www.altheim-info.de', 'info@allmendingen.de', '0000-00-00', '0000-00-00', '7#NNcne', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(31, 'Gemeindeverwaltung', 'Altheim', 'Gemeindeverwaltung Altheim', 'Donaustr. 1', '88499', 'Altheim', '07371 9330-0', 'http://www.gemeinde-altheim.de', 'info@gemeinde-altheim.de', '0000-00-00', '0000-00-00', '95!Cgu?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(32, 'Gemeindeverwaltung', 'Altheim (Alb)', 'Gemeindeverwaltung Altheim (Alb)', 'Schmiedgasse 15', '89174', 'Altheim (Alb)', '07340 9601-0', 'http://www.altheim-alb.de', 'info@altheim-alb.de', '0000-00-00', '0000-00-00', '!wCcB#y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(33, 'Gemeindeverwaltung', 'Althengstett', 'Gemeindeverwaltung Althengstett', 'Simmozheimer Str. 16', '75382', 'Althengstett', '07051 1684-0', 'http://www.althengstett.de', 'clemens.goetz@althengstett.de', '0000-00-00', '0000-00-00', 'Uph2sgm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(34, 'Gemeindeverwaltung', 'Althütte', 'Gemeindeverwaltung Althütte', 'Rathausplatz 1', '71566', 'Althütte', '07183 95959-0', 'http://www.althuette.de', 'info@althuette.de', '0000-00-00', '0000-00-00', '4E!Efcz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(35, 'Gemeindeverwaltung', 'Altlußheim', 'Gemeindeverwaltung Altlußheim', 'Rathausplatz 1', '68804', 'Altlußheim', '06205 3943-0', 'http://www.altlussheim.de', 'info@altlussheim.de', '0000-00-00', '0000-00-00', 'xxhG92A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(36, 'Gemeindeverwaltung', 'Altshausen', 'Gemeindeverwaltung Altshausen', 'Hindenburgstr. 3', '88361', 'Altshausen', '07584 9206-0', 'http://www.altshausen.de', 'info@altshausen.de', '0000-00-00', '0000-00-00', '49dqhyt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(37, 'Gemeindeverwaltung', 'Ammerbuch', 'Gemeindeverwaltung Ammerbuch', 'Kirchstr. 6', '72119', 'Ammerbuch', '07073 9171-0', 'http://www.ammerbuch.de', 'info@ammerbuch.de', '0000-00-00', '0000-00-00', 'UCxT7ge', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(38, 'Gemeindeverwaltung', 'Amstetten', 'Gemeindeverwaltung Amstetten', 'Lonetalstr. 19', '73340', 'Amstetten', '07331 3006-0', 'http://www.amstetten.de', 'j.raab@amstetten.de', '0000-00-00', '0000-00-00', 'm3VBhdX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(39, 'Gemeindeverwaltung', 'Amtzell', 'Gemeindeverwaltung Amtzell', 'Waldburger Str. 4', '88279', 'Amtzell', '07520 950-0', 'http://www.amtzell.de', 'clemens.moll@amtzell.de', '0000-00-00', '0000-00-00', 'SEeR7Fe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(40, 'Gemeindeverwaltung', 'Angelbachtal', 'Gemeindeverwaltung Angelbachtal', 'Schloßstr. 1', '74918', 'Angelbachtal', '07265 9120-0', 'http://www.angelbachtal.de', 'rathaus@angelbachtal.de', '0000-00-00', '0000-00-00', '7fP4Xb2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(41, 'Gemeindeverwaltung', 'Appenweier', 'Gemeindeverwaltung Appenweier', 'Ortenauer Str. 13', '77767', 'Appenweier', '07805 9594-0', 'http://www.appenweier.de', 'gemeinde@appenweier.de', '0000-00-00', '0000-00-00', 'YTwy8c-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(42, 'Gemeindeverwaltung', 'Argenbühl', 'Gemeindeverwaltung Argenbühl', 'Kirchstr. 9', '88260', 'Argenbühl', '07566 9402-0', 'http://www.argenbuehl.de', 'info@argenbuehl.de', '0000-00-00', '0000-00-00', 'zn2acqe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(43, 'Gemeindeverwaltung', 'Aspach', 'Gemeindeverwaltung Aspach', 'Backnanger Str. 9', '71546', 'Aspach', '07191 212-0', 'http://www.aspach.de', 'info@aspach.de', '0000-00-00', '0000-00-00', 'XcdXnwH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(44, 'Gemeindeverwaltung', 'Assamstadt', 'Gemeindeverwaltung Assamstadt', 'Bobstadter Str. 1', '97959', 'Assamstadt', '06294 42020', 'http://www.assamstadt.de', 'post@assamstadt.de', '0000-00-00', '0000-00-00', 'qJVC6hv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(45, 'Gemeindeverwaltung', 'Asselfingen', 'Gemeindeverwaltung Asselfingen', 'Lindenstr. 6', '89176', 'Asselfingen', '07345 5306', 'http://www.asselfingen.de/', 'info@asselfingen.de', '0000-00-00', '0000-00-00', 'wp##zKa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(46, 'Gemeindeverwaltung', 'Attenweiler', 'Gemeindeverwaltung Attenweiler', 'Bachstr. 7', '88448', 'Attenweiler', '07357 9209-0', 'http://www.attenweiler.de/', 'Rathaus@Attenweiler.de', '0000-00-00', '0000-00-00', '?Yc6uGc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(47, 'Gemeindeverwaltung', 'Au', 'Gemeindeverwaltung Au', 'Dorfstr. 25', '79280', 'Au', '0761 401399-0', 'http://www.au-hexental.de', 'gemeinde@au-hexental.de', '0000-00-00', '0000-00-00', 'wdD?VB6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(48, 'Gemeindeverwaltung', 'Au am Rhein', 'Gemeindeverwaltung Au am Rhein', 'Hauptstr. 5', '76474', 'Au am Rhein', '07245 9285-0', 'http://www.auamrhein.de', 'gemeinde@auamrhein.de', '0000-00-00', '0000-00-00', 'gyZr7#2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(49, 'Gemeindeverwaltung', 'Auenwald', 'Gemeindeverwaltung Auenwald', 'Lippoldsweilerstr. 15', '71549', 'Auenwald', '07191 5005-0', 'http://www.auenwald.de', 'ostfalk@auenwald.de', '0000-00-00', '0000-00-00', '!ygMYL8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(50, 'Gemeindeverwaltung', 'Auggen', 'Gemeindeverwaltung Auggen', 'Hauptstr. 28', '79424', 'Auggen', '07631 3677-0', 'http://www.auggen.de', 'hauptamt@auggen.de', '0000-00-00', '0000-00-00', 'FDBg2a3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(51, 'Gemeindeverwaltung', 'Bad Bellingen', 'Gemeindeverwaltung Bad Bellingen', 'Rheinstr. 25', '79415', 'Bad Bellingen', '07635 8119-0', 'http://www.bad-bellingen.de', 'rathaus@gemeinde.bad-bellingen.de', '0000-00-00', '0000-00-00', 'Lgusbqq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(52, 'Gemeindeverwaltung', 'Bad Boll', 'Gemeindeverwaltung Bad Boll', 'Hauptstr. 94', '73087', 'Bad Boll', '07164 808-0', 'http://www.bad-boll.de', 'hrbuehrle@bad-boll.de', '0000-00-00', '0000-00-00', 'Nek4rz?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(53, 'Gemeindeverwaltung', 'Bad Ditzenbach', 'Gemeindeverwaltung Bad Ditzenbach', 'Hauptstr. 40', '73342', 'Bad Ditzenbach', '07334 9601-0', 'http://www.badditzenbach.de', 'info@rathaus.badditzenbach.de', '0000-00-00', '0000-00-00', 'pbK9b5D', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(54, 'Gemeindeverwaltung', 'Bad Peterstal-Griesbach', 'Gemeindeverwaltung Bad Peterstal-Griesbach', 'Schwarzwaldstr. 11', '77740', 'Bad Peterstal-Griesbach', '07806 79-0', 'http://www.bad-peterstal-griesbach.de', 'Gemeinde@bad-peterstal-griesbach.de', '0000-00-00', '0000-00-00', 'pwN4qL?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(55, 'Gemeindeverwaltung', 'Bad Rippoldsau-Schapbach', 'Gemeindeverwaltung Bad Rippoldsau-Schapbach', 'Rathausplatz 1', '77776', 'Bad Rippoldsau-Schapbach', '07839 9199-0', 'http://www.bad-rippoldsau.de', 'info@bad-rippoldsau-schapbach.de', '0000-00-00', '0000-00-00', '-?URz8G', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(56, 'Gemeindeverwaltung', 'Bad Schönborn', 'Gemeindeverwaltung Bad Schönborn', 'Friedrichsstr. 67', '76669', 'Bad Schönborn', '07253/87-0', 'http://www.bad-schoenborn.de', 'gemeindeverwaltung@bad-schoenborn.de', '0000-00-00', '0000-00-00', 'd63p4zc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(57, 'Gemeindeverwaltung', 'Bad Überkingen', 'Gemeindeverwaltung Bad Überkingen', 'Gartenstr. 1', '73337', 'Bad Überkingen', '07331 2009-0', 'http://www.bad-ueberkingen.de', 'info@bad-ueberkingen.de', '0000-00-00', '0000-00-00', 'vGSXUTY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(58, 'Gemeindeverwaltung', 'Badenweiler', 'Gemeindeverwaltung Badenweiler', 'Luisenstr. 5', '79410', 'Badenweiler', '07632 72-0', 'http://www.gemeinde-badenweiler.de', 'rathaus@gemeinde-badenweiler.de', '0000-00-00', '0000-00-00', 'Z3KvKad', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(59, 'Gemeindeverwaltung', 'Bahlingen am Kaiserstuhl', 'Gemeindeverwaltung Bahlingen am Kaiserstuhl', 'Webergässle 2', '79353', 'Bahlingen am Kaiserstuhl', '07663 9331-0', 'http://www.bahlingen.de', 'lotis@bahlingen.de', '0000-00-00', '0000-00-00', '#eK3z89', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(60, 'Gemeindeverwaltung', 'Baienfurt', 'Gemeindeverwaltung Baienfurt', 'Marktplatz 1', '88255', 'Baienfurt', '0751 4000-0', 'http://www.baienfurt.de', 'guenter.a.binder@baienfurt.de', '0000-00-00', '0000-00-00', 'Wk-!#nG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(61, 'Gemeindeverwaltung', 'Baiersbronn', 'Gemeindeverwaltung Baiersbronn', 'Oberdorfstr. 46', '72270', 'Baiersbronn', '07442 8421-0', 'http://www.baiersbronn.de', 'info@gemeindebaiersbronn.de', '0000-00-00', '0000-00-00', 'HGBaUxm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(62, 'Gemeindeverwaltung', 'Baindt', 'Gemeindeverwaltung Baindt', 'Marsweilerstr. 4', '88255', 'Baindt', '07502 9406-0', 'http://www.baindt.de', 'info@baindt.de', '0000-00-00', '0000-00-00', 'xbM56tY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(63, 'Gemeindeverwaltung', 'Balgheim', 'Gemeindeverwaltung Balgheim', 'Marienplatz 3', '78582', 'Balgheim', '07424 940009-0', 'http://www.balgheim.de', 'info@balgheim.de', '0000-00-00', '0000-00-00', 'SG?bKfA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(64, 'Gemeindeverwaltung', 'Ballendorf', 'Gemeindeverwaltung Ballendorf', 'Mehrstetter Str. 13', '89177', 'Ballendorf', '07340 919110', 'www.ballendorf.de', 'info@ballendorf.de', '0000-00-00', '0000-00-00', 'y4555-f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(65, 'Gemeindeverwaltung', 'Ballrechten-Dottingen', 'Gemeindeverwaltung Ballrechten-Dottingen', 'Alfred-Löffler-Str. 1', '79282', 'Ballrechten-Dottingen', '07634 5617-14', 'http://www.ballrechten-dottingen.de', 'gemeinde@ballrechten-dottingen.de', '0000-00-00', '0000-00-00', 'p8R-PG2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(66, 'Gemeindeverwaltung', 'Baltmannsweiler', 'Gemeindeverwaltung Baltmannsweiler', 'Marktplatz 1', '73666', 'Baltmannsweiler', '07153 9427-0', 'http://www.baltmannsweiler.de', 'bma@baltmannsweiler.de', '0000-00-00', '0000-00-00', 'g6327X5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(67, 'Gemeindeverwaltung', 'Balzheim', 'Gemeindeverwaltung Balzheim', 'Am Dorfplatz 8', '88481', 'Balzheim', '07347 9578-0', 'http://www.balzheim.de', 'Herrmann@gemeinde.balzheim.de', '0000-00-00', '0000-00-00', '4M7ddvh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(68, 'Gemeindeverwaltung', 'Bammental', 'Gemeindeverwaltung Bammental', 'Hauptstr. 71', '69245', 'Bammental', '06223 9530-0', 'http://www.bammental.de', 'rathaus@bammental.de', '0000-00-00', '0000-00-00', 'B9JvxcL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(69, 'Gemeindeverwaltung', 'Bärenthal', 'Gemeindeverwaltung Bärenthal', 'Kirchstr. 8', '78580', 'Bärenthal', '07466 230', 'http://www.baerenthal.de', 'info@baerenthal.de', '0000-00-00', '0000-00-00', 'L3vWcMw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(70, 'Gemeindeverwaltung', 'Bartholomä', 'Gemeindeverwaltung Bartholomä', 'Beckengasse 14', '73566', 'Bartholomä', '07173 97820-0', 'http://www.bartholomae.de', 'info@bartholomae.de', '0000-00-00', '0000-00-00', '7-d2w?3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(71, 'Gemeindeverwaltung', 'Beimerstetten', 'Gemeindeverwaltung Beimerstetten', 'Kirchgasse 1', '89179', 'Beimerstetten', '07348 6081+6082', 'http://www.beimerstetten.de', 'info@beimerstetten.de', '0000-00-00', '0000-00-00', 'KR?KZXb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(72, 'Gemeindeverwaltung', 'Bempflingen', 'Gemeindeverwaltung Bempflingen', 'Metzinger Str. 3', '72658', 'Bempflingen', '07123 9383-0', 'http://www.bempflingen.de', 'rathaus@bempflingen.de', '0000-00-00', '0000-00-00', 'ZVryLv8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(73, 'Gemeindeverwaltung', 'Benningen am Neckar', 'Gemeindeverwaltung Benningen am Neckar', 'Studionstr. 10', '71726', 'Benningen am Neckar', '07144 906-0', 'http://www.benningen.de', 'rathaus@benningen.de', '0000-00-00', '0000-00-00', 'U#5mwnS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(74, 'Gemeindeverwaltung', 'Berg', 'Gemeindeverwaltung Berg', 'Bergstr. 35', '88276', 'Berg', '0751 56084-0', 'http://www.berg-schussental.de', 'rathaus@berg-schussental.de', '0000-00-00', '0000-00-00', '2cyzb-u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(75, 'Gemeindeverwaltung', 'Bergatreute', 'Gemeindeverwaltung Bergatreute', 'Ravensburger Str. 20', '88368', 'Bergatreute', '07527 9216-0', 'http://www.bergatreute.de', 'schaefer@bergatreute.de', '0000-00-00', '0000-00-00', 'U!YFwHA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(76, 'Gemeindeverwaltung', 'Berghaupten', 'Gemeindeverwaltung Berghaupten', 'Rathausplatz 2', '77791', 'Berghaupten', '07803 9677-0', 'http://www.berghaupten.de', 'gemeinde@berghaupten.de', '0000-00-00', '0000-00-00', 'm4rmhYs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(77, 'Gemeindeverwaltung', 'Berghülen', 'Gemeindeverwaltung Berghülen', 'Hauptstr. 2', '89180', 'Berghülen', '07344 9686-0', 'http://www.berghuelen.de', 'info@berghuelen.de', '0000-00-00', '0000-00-00', 'Xt-sSUK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(78, 'Gemeindeverwaltung', 'Berglen', 'Gemeindeverwaltung Berglen', 'Beethovenstr. 14-20', '73663', 'Berglen', '07195 9757-0', 'http://www.berglen.de', 'gemeinde@berglen.kdrs.de', '0000-00-00', '0000-00-00', 'E2ydVMB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(79, 'Gemeindeverwaltung', 'Berkheim', 'Gemeindeverwaltung Berkheim', 'Coubronplatz 1', '88450', 'Berkheim', '08395 9406-0', 'http://www.gemeinde-berkheim.de', 'info@gemeinde-berkheim.de', '0000-00-00', '0000-00-00', 'MW4Rhxc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(80, 'Gemeindeverwaltung', 'Bermatingen', 'Gemeindeverwaltung Bermatingen', 'Salemer Str. 1', '88697', 'Bermatingen', '07544 9502-0', 'http://www.bermatingen.de', 'martin.rupp@bermatingen.de', '0000-00-00', '0000-00-00', 'L!ARWNT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(81, 'Gemeindeverwaltung', 'Bernau im Schwarzwald', 'Gemeindeverwaltung Bernau im Schwarzwald', 'Rathausstr. 18', '79872', 'Bernau im Schwarzwald', '07675 1600-0', 'http://www.bernau-schwarzwald.de', 'rathaus@bernau-schwarzwald.de', '0000-00-00', '0000-00-00', 'P5CC8Wh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(82, 'Gemeindeverwaltung', 'Bernstadt', 'Gemeindeverwaltung Bernstadt', 'Schmiedgasse 5', '89182', 'Bernstadt', '07348 6024', 'http://www.bernstadt-wuertt.de', 'Oliver.Suehring@bernstadt-wuertt.de', '0000-00-00', '0000-00-00', 'e9U44Am', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(83, 'Gemeindeverwaltung', 'Betzenweiler', 'Gemeindeverwaltung Betzenweiler', 'Riedlinger Str. 2', '88422', 'Betzenweiler', '07374 418', 'http://www.betzenweiler.de', 'gemeinde@betzenweiler.de', '0000-00-00', '0000-00-00', '96ed6e7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(84, 'Gemeindeverwaltung', 'Beuren', 'Gemeindeverwaltung Beuren', 'Linsenhofer Str. 2', '72660', 'Beuren', '07025 91030-0', 'http://www.beuren.de', 'beuren@beuren.de', '0000-00-00', '0000-00-00', '7CR9Zmh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(85, 'Gemeindeverwaltung', 'Beuron', 'Gemeindeverwaltung Beuron', 'Kirchstr. 18', '88631', 'Beuron', '07579 9210-0', 'http://www.beuron.de', 'info@beuron.de', '0000-00-00', '0000-00-00', 'vawNRGr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(86, 'Gemeindeverwaltung', 'Biberach', 'Gemeindeverwaltung Biberach', 'Hauptstr. 27', '77781', 'Biberach', '07835 6365-0', 'http://www.biberach-baden.de', 'rathaus@biberach-baden.de', '0000-00-00', '0000-00-00', 'e8LELU6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(87, 'Gemeindeverwaltung', 'Biederbach', 'Gemeindeverwaltung Biederbach', 'Dorfstr. 18', '79215', 'Biederbach', '07682 9116-0', 'http://www.biederbach.de', 'gemeinde@biederbach.de', '0000-00-00', '0000-00-00', 'Rbun3sN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(88, 'Gemeindeverwaltung', 'Bietigheim', 'Gemeindeverwaltung Bietigheim', 'Malscher Str. 22', '76467', 'Bietigheim', '07245 808-0', 'http://www.bietigheim.de', 'gemeinde@bietigheim.de', '0000-00-00', '0000-00-00', 'pW7-4xn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(89, 'Gemeindeverwaltung', 'Billigheim', 'Gemeindeverwaltung Billigheim', 'Sulzbacher Str. 9', '74842', 'Billigheim', '06265 9200-0', 'http://www.billigheim.de', 'zentrale@billigheim.de', '0000-00-00', '0000-00-00', 'NLBqbEK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(90, 'Gemeindeverwaltung', 'Binau', 'Gemeindeverwaltung Binau', 'Reichenbucher Str. 38 A', '74862', 'Binau', '06263 430-0', 'http://www.binau.de', 'info@binau.de', '0000-00-00', '0000-00-00', 'q6s7wsL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(91, 'Gemeindeverwaltung', 'Bingen', 'Gemeindeverwaltung Bingen', 'Hauptstr. 21', '72511', 'Bingen', '07571 7407-0', 'http://www.bingen-hohenzollern.de', 'gemeinde@bingen-hohenzollern.de', '0000-00-00', '0000-00-00', 'nY8Uvr6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(92, 'Gemeindeverwaltung', 'Binzen', 'Gemeindeverwaltung Binzen', 'Am Rathausplatz 6', '79589', 'Binzen', '07621 6608-51', 'http://www.binzen.de', 'a.schneucker@binzen.de', '0000-00-00', '0000-00-00', '#bVym4y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(93, 'Gemeindeverwaltung', 'Birenbach', 'Gemeindeverwaltung Birenbach', 'Marktplatz 1', '73102', 'Birenbach', '07161 50098-0', 'http://www.birenbach.de', 'gemeinde@birenbach.de', '0000-00-00', '0000-00-00', '4BPG!z#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(94, 'Gemeindeverwaltung', 'Birkenfeld', 'Gemeindeverwaltung Birkenfeld', 'Marktplatz 6', '75217', 'Birkenfeld', '07231 4886-0', 'http://www.birkenfeld-enzkreis.de', 'gemeinde@birkenfeld-enzkreis.de', '0000-00-00', '0000-00-00', 'Ln5G6Kb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(95, 'Gemeindeverwaltung', 'Bischweier', 'Gemeindeverwaltung Bischweier', 'Bahnhofstr. 17', '76476', 'Bischweier', '07222 9434-0', 'http://www.bischweier.de', 'buergermeisteramt@bischweier.de', '0000-00-00', '0000-00-00', 'x#yBzMc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(96, 'Gemeindeverwaltung', 'Bisingen', 'Gemeindeverwaltung Bisingen', 'Heidelbergstr. 9', '72406', 'Bisingen', '07476 896-0', 'http://www.bisingen.de', 'info@bisingen.de', '0000-00-00', '0000-00-00', '5NJXmd9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(97, 'Gemeindeverwaltung', 'Bissingen an der Teck', 'Gemeindeverwaltung Bissingen an der Teck', 'Vordere Str. 45', '73266', 'Bissingen an der Teck', '07023 90000-0', 'http://www.bissingen-teck.de', 'rathaus@bissingen-teck.de', '0000-00-00', '0000-00-00', 'KVXxSZs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(98, 'Gemeindeverwaltung', 'Bitz', 'Gemeindeverwaltung Bitz', 'Hindenburgplatz 7', '72475', 'Bitz', '07431 8001-0', 'http://www.bitz.de', 'Hubert.Schiele@bitz.de', '0000-00-00', '0000-00-00', 'K45ZNCK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(99, 'Gemeindeverwaltung', 'Blaufelden', 'Gemeindeverwaltung Blaufelden', 'Hindenburgplatz 4', '74572', 'Blaufelden', '07953 884-0', 'http://www.blaufelden.de', 'zentralerposteingang@blaufelden.de', '0000-00-00', '0000-00-00', '3VGdm7f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(100, 'Gemeindeverwaltung', 'Böbingen an der Rems', 'Gemeindeverwaltung Böbingen an der Rems', 'Römerstr. 2', '73560', 'Böbingen an der Rems', '07173 18560-0', 'http://www.boebingen.de', 'rathaus@boebingen.de', '0000-00-00', '0000-00-00', '!UWd!TC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(101, 'Gemeindeverwaltung', 'Bodelshausen', 'Gemeindeverwaltung Bodelshausen', 'Am Burghof 8', '72411', 'Bodelshausen', '07471 708-0', 'http://www.bodelshausen.de', 'info@bodelshausen.de', '0000-00-00', '0000-00-00', 'zw6P7V!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(102, 'Gemeindeverwaltung', 'Bodman-Ludwigshafen', 'Gemeindeverwaltung Bodman-Ludwigshafen', 'Hafenstr. 5', '78351', 'Bodman-Ludwigshafen', '07773 9300-0', 'http://www.bodman-ludwigshafen.de', 'gemeinde@bodman-ludwigshafen.de', '0000-00-00', '0000-00-00', 'qdPxG7Y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(103, 'Gemeindeverwaltung', 'Bodnegg', 'Gemeindeverwaltung Bodnegg', 'Dorfstraße 18', '88285', 'Bodnegg', '07520 9208-0', 'http://www.bodnegg.de', 'gemeindeverwaltung@bodnegg.de', '0000-00-00', '0000-00-00', 's6-dX4Z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(104, 'Gemeindeverwaltung', 'Böhmenkirch', 'Gemeindeverwaltung Böhmenkirch', 'Hauptstr. 100', '89558', 'Böhmenkirch', '07332 9600-11', 'http://www.boehmenkirch.de', 'gemeinde@boehmenkirch.de', '0000-00-00', '0000-00-00', 'FyW3?Cc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(105, 'Gemeindeverwaltung', 'Böllen', 'Gemeindeverwaltung Böllen', 'Oberböllen 19', '79677', 'Böllen', '07673 282', 'http://www.gvvschoenau.de/pb/Boellen,Lde/Boellen.html', 'gemeinde@boellen.de', '0000-00-00', '0000-00-00', 'T4#cApK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(106, 'Gemeindeverwaltung', 'Bollschweil', 'Gemeindeverwaltung Bollschweil', 'Hexentalstr. 56', '79283', 'Bollschweil', '07633 9510-0', 'http://www.bollschweil.de', 'gemeinde@bollschweil.de', '0000-00-00', '0000-00-00', 'ykc-LE3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(107, 'Gemeindeverwaltung', 'Boms', 'Gemeindeverwaltung Boms', 'Kirchstr. 1', '88361', 'Boms', '07581 4894-0', 'http://www.boms.de', 'Verwaltung@boms.de', '0000-00-00', '0000-00-00', 'gT6d??K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(108, 'Gemeindeverwaltung', 'Bondorf', 'Gemeindeverwaltung Bondorf', 'Hindenburgstr. 33', '71149', 'Bondorf', '07457 9393-0', 'http://www.bondorf.de', 'bernd.duerr@bondorf.de', '0000-00-00', '0000-00-00', 'S!PFrqp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(109, 'Gemeindeverwaltung', 'Börslingen', 'Gemeindeverwaltung Börslingen', 'Hauptstr. 25', '89177', 'Börslingen', '07340 919040', '', 'info@boerslingen.de', '0000-00-00', '0000-00-00', 'd7aaHHs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(110, 'Gemeindeverwaltung', 'Börtlingen', 'Gemeindeverwaltung Börtlingen', 'Hauptstr. 54', '73104', 'Börtlingen', '07161 95331-0', 'http://www.boertlingen.de', 'rathaus@boertlingen.de', '0000-00-00', '0000-00-00', 'UVC-tbU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(111, 'Gemeindeverwaltung', 'Bösingen', 'Gemeindeverwaltung Bösingen', 'Bösinger Str. 5', '78662', 'Bösingen', '07404 9216-0', 'http://www.boesingen.de', 'blepp@boesingen.de', '0000-00-00', '0000-00-00', '#dDUutL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(112, 'Gemeindeverwaltung', 'Böttingen', 'Gemeindeverwaltung Böttingen', 'Allenspacher Weg 2', '78583', 'Böttingen', '07429 9305-0', 'http://www.boettingen.de', 'rathaus@boettingen.de', '0000-00-00', '0000-00-00', 'mAYyKAc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(113, 'Gemeindeverwaltung', 'Bötzingen', 'Gemeindeverwaltung Bötzingen', 'Hauptstr. 11', '79268', 'Bötzingen', '07663 9310-0', 'http://www.boetzingen.de', 'gemeinde@boetzingen.de', '0000-00-00', '0000-00-00', 'rfqpy!r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(114, 'Gemeindeverwaltung', 'Braunsbach', 'Gemeindeverwaltung Braunsbach', 'Geislinger Str. 11', '74542', 'Braunsbach', '07906 94094-0', 'http://www.braunsbach.de', 'info@braunsbach.de', '0000-00-00', '0000-00-00', 'aa#vdnz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(115, 'Gemeindeverwaltung', 'Breitingen', 'Gemeindeverwaltung Breitingen', 'Neenstetter Str. 17', '89183', 'Breitingen', '07340 919106', 'http://www.breitingen-lonetal.de', 'info@breitingen-lonetal.de', '0000-00-00', '0000-00-00', 'SP8MhL!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(116, 'Gemeindeverwaltung', 'Breitnau', 'Gemeindeverwaltung Breitnau', 'Dorfstr. 11', '79874', 'Breitnau', '07652 9109-0', 'http://www.breitnau.de', 'gemeinde@breitnau.de', '0000-00-00', '0000-00-00', 'MHx7gzv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(117, 'Gemeindeverwaltung', 'Bretzfeld', 'Gemeindeverwaltung Bretzfeld', 'Adolzfurter Str. 12', '74626', 'Bretzfeld', '07946 771-0', 'http://www.bretzfeld.de', 'rathaus@bretzfeld.de', '0000-00-00', '0000-00-00', 'P8gRVdk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(118, 'Gemeindeverwaltung', 'Brigachtal', 'Gemeindeverwaltung Brigachtal', 'St.Gallus-Str. 4', '78086', 'Brigachtal', '07721 2909-0', 'http://www.brigachtal.de', 'info@brigachtal.de', '0000-00-00', '0000-00-00', 'X4AB3cH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(119, 'Gemeindeverwaltung', 'Brühl', 'Gemeindeverwaltung Brühl', 'Hauptstr. 1', '68782', 'Brühl', '06202 2003-0', 'http://www.bruehl-baden.de', 'ralf.goeck@bruehl-baden.de', '0000-00-00', '0000-00-00', 'NG3rqmv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(120, 'Gemeindeverwaltung', 'Bubsheim', 'Gemeindeverwaltung Bubsheim', 'Gosheimer Str. 4', '78585', 'Bubsheim', '07429 508', 'http://www.bubsheim.de', 'info@bubsheim.de', '0000-00-00', '0000-00-00', 'unPyweV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(121, 'Gemeindeverwaltung', 'Buchenbach', 'Gemeindeverwaltung Buchenbach', 'Hauptstr. 20', '79256', 'Buchenbach', '07661 3965-0', 'http://www.buchenbach.de', 'gemeinde@Buchenbach.de', '0000-00-00', '0000-00-00', 'RksDGUW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(122, 'Gemeindeverwaltung', 'Buchheim', 'Gemeindeverwaltung Buchheim', 'Rathausstr. 4', '88637', 'Buchheim', '07777 311', 'http://cms7.gemeindebuchheim.de/5110159.html', 'info@gemeindebuchheim.de', '0000-00-00', '0000-00-00', 'ebB#XDT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(123, 'Gemeindeverwaltung', 'Buggingen', 'Gemeindeverwaltung Buggingen', 'Hauptstr. 31', '79426', 'Buggingen', '07631 1803-0', 'http://www.buggingen.de', 'gemeinde@buggingen.de', '0000-00-00', '0000-00-00', '9ec-m4u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(124, 'Gemeindeverwaltung', 'Bühlertal', 'Gemeindeverwaltung Bühlertal', 'Hauptstr. 131', '77830', 'Bühlertal', '07223 7101-0', 'http://www.buehlertal.de', 'buergermeister@buehlertal.de', '0000-00-00', '0000-00-00', '9TRzeyR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(125, 'Gemeindeverwaltung', 'Bühlertann', 'Gemeindeverwaltung Bühlertann', 'Hauptstr.12', '74424', 'Bühlertann', '07973 9696-0', 'http://www.buehlertann.de', 'gemeinde@buehlertann.de', '0000-00-00', '0000-00-00', 'NaDwkeW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(126, 'Gemeindeverwaltung', 'Bühlerzell', 'Gemeindeverwaltung Bühlerzell', 'Heilberger Str. 4', '74426', 'Bühlerzell', '07974 9390-0', 'http://www.buehlerzell.de', 'thomas.botschek@buehlerzell.de', '0000-00-00', '0000-00-00', 'nsenwyq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(127, 'Gemeindeverwaltung', 'Burgrieden', 'Gemeindeverwaltung Burgrieden', 'Rathausplatz 2', '88483', 'Burgrieden', '07392 9719-0', 'http://www.burgrieden.de', 'rathaus@burgrieden.de', '0000-00-00', '0000-00-00', 'cWexcED', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(128, 'Gemeindeverwaltung', 'Burgstetten', 'Gemeindeverwaltung Burgstetten', 'Rathausstr. 18', '71576', 'Burgstetten', '07191 9585-0', 'http://www.burgstetten.de', 'rathaus@burgstetten.de', '0000-00-00', '0000-00-00', 'p2N4pqK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(129, 'Gemeindeverwaltung', 'Büsingen am Hochrhein', 'Gemeindeverwaltung Büsingen am Hochrhein', 'Junkerstr. 86', '78266', 'Büsingen am Hochrhein', '07734 9302-0', 'http://www.buesingen.de', 'lang@buesingen.de', '0000-00-00', '0000-00-00', '#wdH5H#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(130, 'Gemeindeverwaltung', 'Cleebronn', 'Gemeindeverwaltung Cleebronn', 'Keltergasse 2', '74389', 'Cleebronn', '07135 9856-0', 'http://www.cleebronn.de', 'info@cleebronn.de', '0000-00-00', '0000-00-00', 'XecpSMy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(131, 'Gemeindeverwaltung', 'Dachsberg (Südschwarzwald)', 'Gemeindeverwaltung Dachsberg (Südschwarzwald)', 'Rathausstr. 1', '79875', 'Dachsberg (Südschwarzwald)', '07672 9905-0', 'http://www.dachsberg-suedschwarzwald.de', 'buecheler.gemeinde@dachsberg.de', '0000-00-00', '0000-00-00', 'KUFRbr2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(132, 'Gemeindeverwaltung', 'Daisendorf', 'Gemeindeverwaltung Daisendorf', 'Ortsstr. 22', '88718', 'Daisendorf', '07532 5464', 'http://www.daisendorf.de', 'info@daisendorf.de', '0000-00-00', '0000-00-00', 'zbm?bww', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(133, 'Gemeindeverwaltung', 'Dauchingen', 'Gemeindeverwaltung Dauchingen', 'Deisslinger Str. 1', '78083', 'Dauchingen', '07720 9777-0', 'http://www.dauchingen.de', 'buergermeister@dauchingen.de', '0000-00-00', '0000-00-00', 'XNV3NmW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(134, 'Gemeindeverwaltung', 'Dautmergen', 'Gemeindeverwaltung Dautmergen', 'Grabenstr. 1', '72356', 'Dautmergen', '07427 2507', 'http:\\www.gemeinde-dautmergen.de', 'rathaus-dautmergen@t-online.de', '0000-00-00', '0000-00-00', 'tA5SzHW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(135, 'Gemeindeverwaltung', 'Deckenpfronn', 'Gemeindeverwaltung Deckenpfronn', 'Marktplatz 1', '75392', 'Deckenpfronn', '07056 9279-0', 'http://www.deckenpfronn.de', 'gemeinde@deckenpfronn.de', '0000-00-00', '0000-00-00', 'pfzgkmf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(136, 'Gemeindeverwaltung', 'Deggenhausertal', 'Gemeindeverwaltung Deggenhausertal', 'Rathausplatz 1', '88693', 'Deggenhausertal', '07555 9200-0', 'http://www.deggenhausertal.de', 'Fabian.Meschenmoser@deggenhausertal.de', '0000-00-00', '0000-00-00', 'xRf?qbA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(137, 'Gemeindeverwaltung', 'Deggingen', 'Gemeindeverwaltung Deggingen', 'Bahnhofstr. 9', '73326', 'Deggingen', '07334 78-0', 'http://www.deggingen.de', 'gemeinde@deggingen.de', '0000-00-00', '0000-00-00', '-U-S5GH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(138, 'Gemeindeverwaltung', 'Deilingen', 'Gemeindeverwaltung Deilingen', 'Hauptstr. 1', '78586', 'Deilingen', '07426 9471-0', 'http://www.deilingen.de', 'info@deilingen.de', '0000-00-00', '0000-00-00', 'EyAdWJH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(139, 'Gemeindeverwaltung', 'Deißlingen', 'Gemeindeverwaltung Deißlingen', 'Kehlhof 1', '78652', 'Deißlingen', '07420 9394-0', 'http://www.deisslingen.de', 'info@deisslingen.de', '0000-00-00', '0000-00-00', 'VTXbtKX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(140, 'Gemeindeverwaltung', 'Deizisau', 'Gemeindeverwaltung Deizisau', 'Am Marktplatz 1', '73779', 'Deizisau', '07153 7013-0', 'http://www.deizisau.de', 'post@deizisau.de', '0000-00-00', '0000-00-00', 'Jg6xmkV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(141, 'Gemeindeverwaltung', 'Denkendorf', 'Gemeindeverwaltung Denkendorf', 'Furtstr. 1', '73770', 'Denkendorf', '0711 341680-0', 'http://www.denkendorf.de', 'gemeinde@denkendorf.de', '0000-00-00', '0000-00-00', 'BnsYAD3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(142, 'Gemeindeverwaltung', 'Denkingen', 'Gemeindeverwaltung Denkingen', 'Hauptstr. 46', '78588', 'Denkingen', '07424 9706-0', 'http://www.denkingen.de', 'Wuhrer@denkingen.de', '0000-00-00', '0000-00-00', 'tmmM-dH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(143, 'Gemeindeverwaltung', 'Denzlingen', 'Gemeindeverwaltung Denzlingen', 'Hauptstr. 110', '79211', 'Denzlingen', '07666 611-0', 'http://www.denzlingen.de', 'gemeinde@denzlingen.de', '0000-00-00', '0000-00-00', 'z-Myydc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(144, 'Gemeindeverwaltung', 'Dettenhausen', 'Gemeindeverwaltung Dettenhausen', 'Bismarckstr. 7', '72135', 'Dettenhausen', '07157 126-0', 'http://www.dettenhausen.de', 'gemeinde@dettenhausen.de', '0000-00-00', '0000-00-00', 'T#qVnUk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(145, 'Gemeindeverwaltung', 'Dettenheim', 'Gemeindeverwaltung Dettenheim', 'Bächlestr. 33', '76706', 'Dettenheim', '07247 931-0', 'http://www.dettenheim.de', 'rathaus@dettenheim.de', '0000-00-00', '0000-00-00', 'nH3YMnM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(146, 'Gemeindeverwaltung', 'Dettighofen', 'Gemeindeverwaltung Dettighofen', 'Berwanger Str. 5', '79802', 'Dettighofen', '07742 9207-0', 'http://www.dettighofen.de/servlet/PB/menu/-1_l1/index.html', 'gemeindeverwaltung@dettighofen.de', '0000-00-00', '0000-00-00', 'kn47q?L', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(147, 'Gemeindeverwaltung', 'Dettingen an der Erms', 'Gemeindeverwaltung Dettingen an der Erms', 'Rathausplatz 1', '72581', 'Dettingen an der Erms', '07123 7207-0', 'http://www.dettingen-erms.de', 'info@dettingen-erms.de', '0000-00-00', '0000-00-00', 'vw-9-gB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(148, 'Gemeindeverwaltung', 'Dettingen an der Iller', 'Gemeindeverwaltung Dettingen an der Iller', 'Oberdettinger Str. 16', '88451', 'Dettingen an der Iller', '07354 1077+1078', 'http://www.dettingen-iller.de', 'info@dettingen-iller.de', '0000-00-00', '0000-00-00', 'DwMLe!d', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(149, 'Gemeindeverwaltung', 'Dettingen unter Teck', 'Gemeindeverwaltung Dettingen unter Teck', 'Schulstr. 4', '73265', 'Dettingen unter Teck', '07021 5000-0', 'http://www.dettingen-teck.de', 'gemeinde@dettingen-teck.de', '0000-00-00', '0000-00-00', 'D#gEhtt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(150, 'Gemeindeverwaltung', 'Dielheim', 'Gemeindeverwaltung Dielheim', 'Hauptstr. 37', '69234', 'Dielheim', '06222 781-20', 'http://www.dielheim.de', 'Thomas.Glasbrenner@dielheim.de', '0000-00-00', '0000-00-00', 'b8R8rTq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(151, 'Gemeindeverwaltung', 'Dietingen', 'Gemeindeverwaltung Dietingen', 'Kirchplatz 1', '78661', 'Dietingen', '0741 4806-0', 'http://www.dietingen.de', 'info@dietingen.de', '0000-00-00', '0000-00-00', 'ABb8?v7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(152, 'Gemeindeverwaltung', 'Dischingen', 'Gemeindeverwaltung Dischingen', 'Marktplatz 9', '89561', 'Dischingen', '07327 81-0', 'http://www.dischingen.de', 'rathaus@dischingen.de', '0000-00-00', '0000-00-00', '42X9?rn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(153, 'Gemeindeverwaltung', 'Dobel', 'Gemeindeverwaltung Dobel', 'Neusatzer Str. 2', '75335', 'Dobel', '07083 745-0', 'http://www.dobel.de', 'rathaus@dobel.de', '0000-00-00', '0000-00-00', 'pNvK7yq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(154, 'Gemeindeverwaltung', 'Dogern', 'Gemeindeverwaltung Dogern', 'Rathausweg 1', '79804', 'Dogern', '07751 8318-0', 'http://www.dogern.de', 'gemeinde@dogern.de', '0000-00-00', '0000-00-00', '8dXYMt5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(155, 'Gemeindeverwaltung', 'Dormettingen', 'Gemeindeverwaltung Dormettingen', 'Wasenstr. 38', '72358', 'Dormettingen', '07427 2504', 'http://www.dormettingen.de', 'gemeinde@dormettingen.de', '0000-00-00', '0000-00-00', '6vX!3a3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(156, 'Gemeindeverwaltung', 'Dornstadt', 'Gemeindeverwaltung Dornstadt', 'Kirchplatz 2', '89160', 'Dornstadt', '07348 9867-0', 'http://www.dornstadt.de', 'info@dornstadt.de', '0000-00-00', '0000-00-00', 'YnJNy5-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(157, 'Gemeindeverwaltung', 'Dörzbach', 'Gemeindeverwaltung Dörzbach', 'Marktplatz 2', '74677', 'Dörzbach', '07937 9119-0', 'http://www.doerzbach.de', 'gemeinde@doerzbach.de', '0000-00-00', '0000-00-00', '3LEX9D4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(158, 'Gemeindeverwaltung', 'Dossenheim', 'Gemeindeverwaltung Dossenheim', 'Rathausplatz 1', '69221', 'Dossenheim', '06221 8651-0', 'http://www.dossenheim.de', 'gemeinde@dossenheim.de', '0000-00-00', '0000-00-00', 'X-vEEaP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(159, 'Gemeindeverwaltung', 'Dotternhausen', 'Gemeindeverwaltung Dotternhausen', 'Hauptstr. 21', '72359', 'Dotternhausen', '07427 9405-0', 'http://www.dotternhausen.de', 'info@dotternhausen.de', '0000-00-00', '0000-00-00', 'P!ewEcf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(160, 'Gemeindeverwaltung', 'Drackenstein', 'Gemeindeverwaltung Drackenstein', 'Hauptstr. 28', '73345', 'Drackenstein', '07335 6452', 'http://www.drackenstein.de', '', '0000-00-00', '0000-00-00', 'BpPZMNM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(161, 'Gemeindeverwaltung', 'Dunningen', 'Gemeindeverwaltung Dunningen', 'Hauptstr. 25', '78655', 'Dunningen', '07403 9295-0', 'http://www.dunningen.de', 'info@dunningen.de', '0000-00-00', '0000-00-00', 'qy38ruT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(162, 'Gemeindeverwaltung', 'Durbach', 'Gemeindeverwaltung Durbach', 'Tal 5', '77770', 'Durbach', '0781 483-0', 'http://www.durbach.de', 'rathaus@durbach.de', '0000-00-00', '0000-00-00', 'hmLALhN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(163, 'Gemeindeverwaltung', 'Dürbheim', 'Gemeindeverwaltung Dürbheim', 'Probststr. 2', '78589', 'Dürbheim', '07424 95825-0', 'http://www.duerbheim.de', 'info@duerbheim.de', '0000-00-00', '0000-00-00', 'Ncx2TZc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(164, 'Gemeindeverwaltung', 'Durchhausen', 'Gemeindeverwaltung Durchhausen', 'Dorfstr. 51', '78591', 'Durchhausen', '07464 9862-0', 'http://www.durchhausen.de', 'info@durchhausen.de', '0000-00-00', '0000-00-00', 'XhR?Wnr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(165, 'Gemeindeverwaltung', 'Durlangen', 'Gemeindeverwaltung Durlangen', 'Hermann-Löns-Weg 5', '73568', 'Durlangen', '07176 4527-0', 'http://www.durlangen.de', 'gemeinde_durlangen@t-online.de', '0000-00-00', '0000-00-00', 'WgcL83K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(166, 'Gemeindeverwaltung', 'Dürmentingen', 'Gemeindeverwaltung Dürmentingen', 'Hauptstr. 20', '88525', 'Dürmentingen', '07371 9507-0', 'http://www.duermentingen.de', 'dholstein@duermentingen.de', '0000-00-00', '0000-00-00', 'Gn2yDWA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(167, 'Gemeindeverwaltung', 'Durmersheim', 'Gemeindeverwaltung Durmersheim', 'Rathausplatz 1', '76448', 'Durmersheim', '07245 920-0', 'http://www.durmersheim.de', 'info@durmersheim.de', '0000-00-00', '0000-00-00', 'y9Lz?ny', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(168, 'Gemeindeverwaltung', 'Dürnau', 'Gemeindeverwaltung Dürnau', 'Hauptstr. 16', '73105', 'Dürnau', '07164 91010-0', 'www.duernau.de', 'm.wagner@duernau.de', '0000-00-00', '0000-00-00', 'TvmGYGs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(169, 'Gemeindeverwaltung', 'Dürnau', 'Gemeindeverwaltung Dürnau', 'Im Winkel 2', '88422', 'Dürnau', '07582 2317', 'www.duernau-bc.de', 'info@duernau-bc.de', '0000-00-00', '0000-00-00', 'abh7JNv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(170, 'Gemeindeverwaltung', 'Dußlingen', 'Gemeindeverwaltung Dußlingen', 'Rathausplatz 1', '72144', 'Dußlingen', '07072 9299-0', 'http://www.dusslingen.de', 'THoelsch@dusslingen.de', '0000-00-00', '0000-00-00', 'Cbz?KG2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(171, 'Gemeindeverwaltung', 'Ebenweiler', 'Gemeindeverwaltung Ebenweiler', 'Unterwaldhauser Str. 2', '88370', 'Ebenweiler', '07584 91610', 'http://www.ebenweiler.de', 'gemeinde@ebenweiler.de', '0000-00-00', '0000-00-00', 'AnELth-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(172, 'Gemeindeverwaltung', 'Eberdingen', 'Gemeindeverwaltung Eberdingen', 'Stuttgarter Str. 34', '71735', 'Eberdingen', '07042 799-0', 'http://www.eberdingen.de', 'buergermeisteramt@eberdingen.de', '0000-00-00', '0000-00-00', '7V-mBKp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(173, 'Gemeindeverwaltung', 'Eberhardzell', 'Gemeindeverwaltung Eberhardzell', 'Burgstr. 2', '88436', 'Eberhardzell', '07355 9300-0', 'http://www.eberhardzell.de', 'gemeinde@eberhardzell.de', '0000-00-00', '0000-00-00', 'CqkTUG8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(174, 'Gemeindeverwaltung', 'Ebersbach-Musbach', 'Gemeindeverwaltung Ebersbach-Musbach', 'Kirchplatz 4', '88371', 'Ebersbach-Musbach', '07584 9212-0', 'http://www.ebersbach-musbach.de', 'info@ebersbach-musbach.de', '0000-00-00', '0000-00-00', 'AxmnVJm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(175, 'Gemeindeverwaltung', 'Eberstadt', 'Gemeindeverwaltung Eberstadt', 'Hauptstr. 39', '74246', 'Eberstadt', '07134 9808-0', 'http://www.eberstadt.de', 'info@eberstadt.de', '0000-00-00', '0000-00-00', '2U!EKZE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(176, 'Gemeindeverwaltung', 'Ebhausen', 'Gemeindeverwaltung Ebhausen', 'Marktplatz 1', '72224', 'Ebhausen', '07458 9981-0', 'http://www.ebhausen.de', 'info@ebhausen.de', '0000-00-00', '0000-00-00', 'kusxRYR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(177, 'Gemeindeverwaltung', 'Ebringen', 'Gemeindeverwaltung Ebringen', 'Schloßplatz 1', '79285', 'Ebringen', '07664 5058-0', 'http://www.ebringen.de', 'mosbach@ebringen.de', '0000-00-00', '0000-00-00', '86uSnfD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(178, 'Gemeindeverwaltung', 'Edingen-Neckarhausen', 'Gemeindeverwaltung Edingen-Neckarhausen', 'Hauptstr. 60', '68535', 'Edingen-Neckarhausen', '06203 808-0', 'http://www.edingen-neckarhausen.de', 'info@edingen-neckarhausen.de', '0000-00-00', '0000-00-00', 'uEYdCeK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(179, 'Gemeindeverwaltung', 'Efringen-Kirchen', 'Gemeindeverwaltung Efringen-Kirchen', 'Hauptstr. 26', '79588', 'Efringen-Kirchen', '07628 806-20', 'http://www.efringen-kirchen.de', 'buergermeister@efringen-kirchen.de', '0000-00-00', '0000-00-00', '-2WWb6v', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(180, 'Gemeindeverwaltung', 'Egenhausen', 'Gemeindeverwaltung Egenhausen', 'Hauptstr. 19', '72227', 'Egenhausen', '07453 9570-0', 'http://www.egenhausen.de', 'info@egenhausen.de', '0000-00-00', '0000-00-00', 'NJfWzR3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(181, 'Gemeindeverwaltung', 'Egesheim', 'Gemeindeverwaltung Egesheim', 'Hauptstr. 10', '78592', 'Egesheim', '07429 93108-0', 'http://www.egesheim.de', 'info@egesheim.de', '0000-00-00', '0000-00-00', 'nrZT9SN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(182, 'Gemeindeverwaltung', 'Eggenstein-Leopoldshafen', 'Gemeindeverwaltung Eggenstein-Leopoldshafen', 'Friedrichstr. 32', '76344', 'Eggenstein-Leopoldshafen', '0721 97886-0', 'http://www.egg-leo.de', 'b.stober@egg-leo.de', '0000-00-00', '0000-00-00', 'HxwA2YP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(183, 'Gemeindeverwaltung', 'Eggingen', 'Gemeindeverwaltung Eggingen', 'Bürgerstr. 7', '79805', 'Eggingen', '07746 9202-0', 'http://www.eggingen.de/', 'gemeinde@eggingen.de', '0000-00-00', '0000-00-00', 'Ddx-5Zh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(184, 'Gemeindeverwaltung', 'Ehningen', 'Gemeindeverwaltung Ehningen', 'Königstr. 29', '71139', 'Ehningen', '07034 121-0', 'http://www.ehningen.de', 'gemeinde@ehningen.de', '0000-00-00', '0000-00-00', 'Am9XNbw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(185, 'Gemeindeverwaltung', 'Ehrenkirchen', 'Gemeindeverwaltung Ehrenkirchen', 'Jengerstr. 6', '79238', 'Ehrenkirchen', '07633 804-0', 'http://www.ehrenkirchen.de', 'gemeinde@ehrenkirchen.de', '0000-00-00', '0000-00-00', 'hH?AtkZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(186, 'Gemeindeverwaltung', 'Eichstegen', 'Gemeindeverwaltung Eichstegen', 'Hauptstr. 11', '88361', 'Eichstegen', '07584 783', 'http://www.eichstegen.de', 'eichstegen@t-online.de', '0000-00-00', '0000-00-00', 'bgKWRZB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(187, 'Gemeindeverwaltung', 'Eichstetten am Kaiserstuhl', 'Gemeindeverwaltung Eichstetten am Kaiserstuhl', 'Hauptstr. 43', '79356', 'Eichstetten am Kaiserstuhl', '07663 9323-13', 'http://www.eichstetten.de', 'bruder@eichstetten.de', '0000-00-00', '0000-00-00', 'MR2syxs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(188, 'Gemeindeverwaltung', 'Eigeltingen', 'Gemeindeverwaltung Eigeltingen', 'Krumme Str. 1', '78253', 'Eigeltingen', '07774 9322-0', 'http://www.eigeltingen.de', 'gemeinde@eigeltingen.de', '0000-00-00', '0000-00-00', 'Yezt4uP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(189, 'Gemeindeverwaltung', 'Eimeldingen', 'Gemeindeverwaltung Eimeldingen', 'Dorfstr. 1', '79591', 'Eimeldingen', '07621 62591', 'http://www.eimeldingen.de', 'gemeinde@eimeldingen.de', '0000-00-00', '0000-00-00', 'RJT#vn#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(190, 'Gemeindeverwaltung', 'Eisenbach (Hochschwarzwald)', 'Gemeindeverwaltung Eisenbach (Hochschwarzwald)', 'Bei der Kirche 1', '79871', 'Eisenbach (Hochschwarzwald)', '07657 9103-0', 'http://www.eisenbach.de', 'info@eisenbach.de', '0000-00-00', '0000-00-00', 'xdebJ7#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(191, 'Gemeindeverwaltung', 'Eisingen', 'Gemeindeverwaltung Eisingen', 'Talstr. 1', '75239', 'Eisingen', '07232 3811-0', 'http://www.eisingen-enzkreis.de', 'gemeinde@eisingen-enzkreis.de', '0000-00-00', '0000-00-00', 'rV!Aw9r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(192, 'Gemeindeverwaltung', 'Elchesheim-Illingen', 'Gemeindeverwaltung Elchesheim-Illingen', 'Rathausplatz 8', '76477', 'Elchesheim-Illingen', '07245 9301-0', 'http://www.elchesheim-illingen.de', 'buergermeisteramt@elchesheim-illingen.de', '0000-00-00', '0000-00-00', 'E2qKKgB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(193, 'Gemeindeverwaltung', 'Ellenberg', 'Gemeindeverwaltung Ellenberg', 'Hauptstr. 25', '73488', 'Ellenberg', '07962 9030-0', 'http://www.ellenberg.de', 'gemeinde@ellenberg.de', '0000-00-00', '0000-00-00', '325FM8K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(194, 'Gemeindeverwaltung', 'Ellhofen', 'Gemeindeverwaltung Ellhofen', 'Kirchplatz 1', '74248', 'Ellhofen', '07134 9881-0', 'http://www.ellhofen.de', 'info@ellhofen.de', '0000-00-00', '0000-00-00', 'r#gvqA9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(195, 'Gemeindeverwaltung', 'Elztal', 'Gemeindeverwaltung Elztal', 'Hauptstr. 8', '74834', 'Elztal', '06261 8903-0', 'http://www.elztal.de', 'info@elztal.de', '0000-00-00', '0000-00-00', 'fb4artW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(196, 'Gemeindeverwaltung', 'Emeringen', 'Gemeindeverwaltung Emeringen', 'Lederstr. 2', '88499', 'Emeringen', '07373 2873', 'http://www.emeringen.eu/', 'info@emeringen.eu', '0000-00-00', '0000-00-00', '3w67YCv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(197, 'Gemeindeverwaltung', 'Emerkingen', 'Gemeindeverwaltung Emerkingen', 'Schloßstr. 23', '89607', 'Emerkingen', '07393 2239', 'http://www.emerkingen.de', 'paul.burger@emerkingen.de', '0000-00-00', '0000-00-00', 'bbsxZKT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(198, 'Gemeindeverwaltung', 'Emmingen-Liptingen', 'Gemeindeverwaltung Emmingen-Liptingen', 'Schulstr. 8', '78576', 'Emmingen-Liptingen', '07465 9268-0', 'http://www.emmingen-liptingen.de', 'info@emmingen-liptingen.de', '0000-00-00', '0000-00-00', 'a47#ZDN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(199, 'Gemeindeverwaltung', 'Empfingen', 'Gemeindeverwaltung Empfingen', 'Mühlheimer Str. 2', '72186', 'Empfingen', '07485 9988-0', 'http://www.empfingen.de', 'Ferdinand.Truffner@empfingen.de', '0000-00-00', '0000-00-00', 'ueMbnxL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(200, 'Gemeindeverwaltung', 'Engelsbrand', 'Gemeindeverwaltung Engelsbrand', 'Eichbergstr. 1', '75331', 'Engelsbrand', '07235 9324-0', 'http://www.engelsbrand.de/', 'gemeinde@engelsbrand.de', '0000-00-00', '0000-00-00', 'BXAY58#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(201, 'Gemeindeverwaltung', 'Engstingen', 'Gemeindeverwaltung Engstingen', 'Kirchstr. 6', '72829', 'Engstingen', '07129 9399-0', 'http://www.engstingen.de', 'info@engstingen.de', '0000-00-00', '0000-00-00', 'L964WGp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(202, 'Gemeindeverwaltung', 'Eningen unter Achalm', 'Gemeindeverwaltung Eningen unter Achalm', 'Rathausplatz 1', '72800', 'Eningen unter Achalm', '07121 892-100', 'http://www.eningen.de', 'verwaltung@eningen.de', '0000-00-00', '0000-00-00', 'vGdF!wq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(203, 'Gemeindeverwaltung', 'Enzklösterle', 'Gemeindeverwaltung Enzklösterle', 'Friedensstr. 16', '75337', 'Enzklösterle', '07085 9233-20', 'http://www.enzkloesterle.de', 'rathaus@enzkloesterle.de', '0000-00-00', '0000-00-00', 'asC#Fr9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(204, 'Gemeindeverwaltung', 'Epfenbach', 'Gemeindeverwaltung Epfenbach', 'Hauptstr. 28', '74925', 'Epfenbach', '07263 4089-0', 'http://www.epfenbach.de', 'info@epfenbach.de', '0000-00-00', '0000-00-00', '#UALSZE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(205, 'Gemeindeverwaltung', 'Epfendorf', 'Gemeindeverwaltung Epfendorf', 'Adenauerstr. 14', '78736', 'Epfendorf', '07404 9212-0', 'http://www.epfendorf.de', 'mark.prielipp@epfendorf.de', '0000-00-00', '0000-00-00', 'L3yfpEr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(206, 'Gemeindeverwaltung', 'Erdmannhausen', 'Gemeindeverwaltung Erdmannhausen', 'Pflasterstr. 15', '71729', 'Erdmannhausen', '07144 308-0', 'http://www.erdmannhausen.de', 'rathaus@erdmannhausen.de', '0000-00-00', '0000-00-00', '2HRxsdZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(207, 'Gemeindeverwaltung', 'Eriskirch', 'Gemeindeverwaltung Eriskirch', 'Schussenstr.18', '88097', 'Eriskirch', '07541 9708-0', 'http://www.eriskirch.de', 'info@eriskirch.de', '0000-00-00', '0000-00-00', 'MWUYuE5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(208, 'Gemeindeverwaltung', 'Erkenbrechtsweiler', 'Gemeindeverwaltung Erkenbrechtsweiler', 'Uracher Str. 2', '73268', 'Erkenbrechtsweiler', '07026 95051-0', 'http://www.erkenbrechtsweiler.de', 'r.weiss@erkenbrechtsweiler.de', '0000-00-00', '0000-00-00', '9UPhPYC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(209, 'Gemeindeverwaltung', 'Erlenbach', 'Gemeindeverwaltung Erlenbach', 'Klingenstr. 2', '74235', 'Erlenbach', '07132 9335-0', 'http://www.erlenbach-hn.de', 'info@erlenbach-hn.de', '0000-00-00', '0000-00-00', 'H4sWJRd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(210, 'Gemeindeverwaltung', 'Erlenmoos', 'Gemeindeverwaltung Erlenmoos', 'Biberacher Str. 11', '88416', 'Erlenmoos', '07352 9205-0', 'http://www.erlenmoos.de/', 'info@erlenmoos.de', '0000-00-00', '0000-00-00', 'GtF-xUU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(211, 'Gemeindeverwaltung', 'Erligheim', 'Gemeindeverwaltung Erligheim', 'Rathausstr. 7', '74391', 'Erligheim', '07143 8840-0', 'http://www.erligheim.de', 'gemeindeverwaltung@erligheim.de', '0000-00-00', '0000-00-00', 'arUsgNe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(212, 'Gemeindeverwaltung', 'Erolzheim', 'Gemeindeverwaltung Erolzheim', 'Marktplatz 7', '88453', 'Erolzheim', '07354 9318-0', 'http://www.erolzheim.de', 'poststelle@erolzheim.de', '0000-00-00', '0000-00-00', 'WDw!Bc!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(213, 'Gemeindeverwaltung', 'Ertingen', 'Gemeindeverwaltung Ertingen', 'Dürmentinger Str. 14', '88521', 'Ertingen', '07371 508-0', 'http://www.ertingen.de', 'info@ertingen.de', '0000-00-00', '0000-00-00', 'nUDFq2h', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(214, 'Gemeindeverwaltung', 'Eschach', 'Gemeindeverwaltung Eschach', 'Rathausplatz 1', '73569', 'Eschach', '07175 / 92370-0', 'http://www.eschach.de/', 'Rathaus@Eschach.de', '0000-00-00', '0000-00-00', 'fZPLt?f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(215, 'Gemeindeverwaltung', 'Eschbach', 'Gemeindeverwaltung Eschbach', 'Hauptstr. 24', '79427', 'Eschbach', '07634 5504-0', 'http://www.gemeinde-eschbach.de', 'info@gemeinde-eschbach.de', '0000-00-00', '0000-00-00', 'kpTnWS4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(216, 'Gemeindeverwaltung', 'Eschbronn', 'Gemeindeverwaltung Eschbronn', 'Hauptstr. 8', '78664', 'Eschbronn', '07403 9298-0', 'http://www.eschbronn.de', 'gemeinde@eschbronn.de', '0000-00-00', '0000-00-00', '?c53gDu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(217, 'Gemeindeverwaltung', 'Eschelbronn', 'Gemeindeverwaltung Eschelbronn', 'Bahnhofstr. 1', '74927', 'Eschelbronn', '06226 9509-0', 'http://www.eschelbronn.de', 'gemeinde@eschelbronn.de', '0000-00-00', '0000-00-00', 'Z8EFbVS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(218, 'Gemeindeverwaltung', 'Eschenbach', 'Gemeindeverwaltung Eschenbach', 'Lotenbergstr. 6', '73107', 'Eschenbach', '07161 94040-0', 'http://www.gemeinde-eschenbach.de', 'Thomas.Schubert@gemeinde-eschenbach.de', '0000-00-00', '0000-00-00', 'B5UNScA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(219, 'Gemeindeverwaltung', 'Essingen', 'Gemeindeverwaltung Essingen', 'Rathausgasse 9', '73457', 'Essingen', '07365 83-0', 'http://www.essingen.de', 'info@essingen.de', '0000-00-00', '0000-00-00', 'RH-RsMC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(220, 'Gemeindeverwaltung', 'Eutingen im Gäu', 'Gemeindeverwaltung Eutingen im Gäu', 'Marktstr. 17', '72184', 'Eutingen im Gäu', '07459 881-0', 'http://www.eutingen-im-gaeu.de', 'buergermeisteramt@eutingen-im-gaeu.de', '0000-00-00', '0000-00-00', 'c8y8pgs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(221, 'Gemeindeverwaltung', 'Fahrenbach', 'Gemeindeverwaltung Fahrenbach', 'Adolf-Weber-Str. 23', '74864', 'Fahrenbach', '06267 9205-0', 'http://www.fahrenbach.de/', 'wittmann@fahrenbach.de', '0000-00-00', '0000-00-00', 'EcSa53q', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(222, 'Gemeindeverwaltung', 'Feldberg (Schwarzwald)', 'Gemeindeverwaltung Feldberg (Schwarzwald)', 'Kirchgasse 1', '79868', 'Feldberg (Schwarzwald)', '07655 801-0', 'http://www.feldberg-schwarzwald.de', 'tourist-info@feldberg-schwarzwald.de', '0000-00-00', '0000-00-00', '4shAwVD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(223, 'Gemeindeverwaltung', 'Fichtenau', 'Gemeindeverwaltung Fichtenau', 'Hauptstr. 2', '74579', 'Fichtenau', '07962 892-0', 'http://www.fichtenau.de', 'info@fichtenau.de', '0000-00-00', '0000-00-00', '4ShsFdC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(224, 'Gemeindeverwaltung', 'Fichtenberg', 'Gemeindeverwaltung Fichtenberg', 'Rathausstr. 13', '74427', 'Fichtenberg', '07971 9555-0', 'http://www.fichtenberg.de', 'fichtenberg@fichtenberg.de', '0000-00-00', '0000-00-00', 'bAqhYrN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(225, 'Gemeindeverwaltung', 'Fischerbach', 'Gemeindeverwaltung Fischerbach', 'Hauptstr. 38', '77716', 'Fischerbach', '07832 9190-0', 'http://www.fischerbach.de', 'gemeinde@fischerbach.de', '0000-00-00', '0000-00-00', 'werNxW5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(226, 'Gemeindeverwaltung', 'Fischingen', 'Gemeindeverwaltung Fischingen', 'Kirchplatz 6', '79592', 'Fischingen', '07628 1870', 'http://www.fischingen.de', 'gemeinde@fischingen.de', '0000-00-00', '0000-00-00', 'LYg3v9c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(227, 'Gemeindeverwaltung', 'Flein', 'Gemeindeverwaltung Flein', 'Kellergasse 1', '74223', 'Flein', '07131 5007-0', 'http://www.flein.de', 'info@flein.de', '0000-00-00', '0000-00-00', '-s82xLk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(228, 'Gemeindeverwaltung', 'Fleischwangen', 'Gemeindeverwaltung Fleischwangen', 'Rathausstr. 19', '88373', 'Fleischwangen', '07505 273', 'http://www.fleischwangen.de', 'rathaus@fleischwangen.de', '0000-00-00', '0000-00-00', '8f-RW6H', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(229, 'Gemeindeverwaltung', 'Fluorn-Winzeln', 'Gemeindeverwaltung Fluorn-Winzeln', 'Freudenstädter Str. 20', '78737', 'Fluorn-Winzeln', '07402 9292-0', 'http://www.fluorn-winzeln.de', 'info@fluorn-winzeln.de', '0000-00-00', '0000-00-00', 'Gxxr52p', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(230, 'Gemeindeverwaltung', 'Forbach', 'Gemeindeverwaltung Forbach', 'Landstr. 27', '76596', 'Forbach', '07228 39-0', 'http://www.forbach.de', 'buergermeisterin@forbach.de', '0000-00-00', '0000-00-00', 'h!VUhd6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(231, 'Gemeindeverwaltung', 'Forchheim', 'Gemeindeverwaltung Forchheim', 'Herrenstr. 35', '79362', 'Forchheim', '07642 8043', 'http://www.forchheim-am-kaiserstuhl.de', 'rathaus@forchheim-am-kaiserstuhl.de', '0000-00-00', '0000-00-00', 'pAdVE-5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(232, 'Gemeindeverwaltung', 'Forst', 'Gemeindeverwaltung Forst', 'Weiherer Str. 1', '76694', 'Forst', '07251 780-111', 'http://www.forst-baden.de', 'killinger@forst-baden.de', '0000-00-00', '0000-00-00', 'MS9bL6d', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(233, 'Gemeindeverwaltung', 'Frankenhardt', 'Gemeindeverwaltung Frankenhardt', 'Crailsheimer Str. 3', '74586', 'Frankenhardt', '07959 9105-0', 'http://www.frankenhardt.de', 'schmidt@frankenhardt.de', '0000-00-00', '0000-00-00', 'yZ6E-WK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(234, 'Gemeindeverwaltung', 'Freiamt', 'Gemeindeverwaltung Freiamt', 'Sägplatz 1', '79348', 'Freiamt', '07645 9102-0', 'http://www.freiamt.de', 'gemeinde@freiamt.de', '0000-00-00', '0000-00-00', 'yxFy4F?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(235, 'Gemeindeverwaltung', 'Freudental', 'Gemeindeverwaltung Freudental', 'Schloßplatz 1', '74392', 'Freudental', '07143 88303-0', 'http://www.freudental.de', 'gemeinde@freudental.de', '0000-00-00', '0000-00-00', 'UfTHf9!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(236, 'Gemeindeverwaltung', 'Frickenhausen', 'Gemeindeverwaltung Frickenhausen', 'Mittlere Str. 18', '72636', 'Frickenhausen', '07022 94342-0', 'http://www.frickenhausen.de', 'gemeinde@frickenhausen.de', '0000-00-00', '0000-00-00', 'b-4NKND', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(237, 'Gemeindeverwaltung', 'Frickingen', 'Gemeindeverwaltung Frickingen', 'Kirchstr. 7', '88699', 'Frickingen', '07554 9830-0', 'http://www.frickingen.de', 'juergen.stukle@frickingen.de', '0000-00-00', '0000-00-00', 'nBJgGzH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(238, 'Gemeindeverwaltung', 'Friedenweiler', 'Gemeindeverwaltung Friedenweiler', 'Hauptstr. 24', '79877', 'Friedenweiler', '07654 9119-0', 'http://www.friedenweiler.de', 'gemeinde@friedenweiler.de', '0000-00-00', '0000-00-00', 'Vs6VdYC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(239, 'Gemeindeverwaltung', 'Friesenheim', 'Gemeindeverwaltung Friesenheim', 'Friesenheimer Hauptstr. 71/73', '77948', 'Friesenheim', '07821 6337-0', 'http://www.friesenheim.de', 'rathaus@friesenheim.de', '0000-00-00', '0000-00-00', 'rK6mRLX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(240, 'Gemeindeverwaltung', 'Friolzheim', 'Gemeindeverwaltung Friolzheim', 'Rathausstr. 7', '71292', 'Friolzheim', '07044 9036-18', 'http://www.friolzheim.de', 'buergermeister@friolzheim.de', '0000-00-00', '0000-00-00', '3LSHtuh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(241, 'Gemeindeverwaltung', 'Frittlingen', 'Gemeindeverwaltung Frittlingen', 'Hauptstr. 46', '78665', 'Frittlingen', '07426 9624-0', 'http://www.frittlingen.de', 'gemeinde@frittlingen.de', '0000-00-00', '0000-00-00', 'kBSxgJ5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(242, 'Gemeindeverwaltung', 'Fröhnd', 'Gemeindeverwaltung Fröhnd', 'Unterkastel 21', '79677', 'Fröhnd', '07673 332', 'http://www.froehnd.de', 'info@froehnd.de', '0000-00-00', '0000-00-00', 'W3fVtJ6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(243, 'Gemeindeverwaltung', 'Fronreute', 'Gemeindeverwaltung Fronreute', 'Schwommengasse 2', '88273', 'Fronreute', '07502 954-0', 'http://www.fronreute.de', 'info@fronreute.de', '0000-00-00', '0000-00-00', 'CKSN8Ur', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(244, 'Gemeindeverwaltung', 'Gaiberg', 'Gemeindeverwaltung Gaiberg', 'Hauptstr. 44', '69251', 'Gaiberg', '06223 9501-0', 'http://www.gaiberg.de', 'service@gaiberg.de', '0000-00-00', '0000-00-00', 'fkAdPBu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(245, 'Gemeindeverwaltung', 'Gaienhofen', 'Gemeindeverwaltung Gaienhofen', 'Auf der Breite 1', '78343', 'Gaienhofen', '07735 818-0', 'http://www.gaienhofen.de', 'info@gaienhofen.de', '0000-00-00', '0000-00-00', 'A4Z9gx9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(246, 'Gemeindeverwaltung', 'Gailingen am Hochrhein', 'Gemeindeverwaltung Gailingen am Hochrhein', 'Hauptstr. 7', '78262', 'Gailingen am Hochrhein', '07734 9303-11', 'http://www.gailingen.de', 'thomas.auer@gailingen.de', '0000-00-00', '0000-00-00', 'rxA8aJv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(247, 'Gemeindeverwaltung', 'Gammelshausen', 'Gemeindeverwaltung Gammelshausen', 'Hauptstr. 19', '73108', 'Gammelshausen', '07164 401-0', 'http://www.gammelshausen.de', 'info@gammelshausen.de', '0000-00-00', '0000-00-00', '-bMp447', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(248, 'Gemeindeverwaltung', 'Gärtringen', 'Gemeindeverwaltung Gärtringen', 'Rohrweg 2', '71116', 'Gärtringen', '07034 923-0', 'http://www.gaertringen.de', 'riesch@gaertringen.de', '0000-00-00', '0000-00-00', 'Wsgxr4k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(249, 'Gemeindeverwaltung', 'Gäufelden', 'Gemeindeverwaltung Gäufelden', 'Rathausplatz 1', '71126', 'Gäufelden', '07032 7802-0', 'http://www.gaeufelden.de', 'info@gaeufelden.de', '0000-00-00', '0000-00-00', 'Ayn-8xa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(250, 'Gemeindeverwaltung', 'Gechingen', 'Gemeindeverwaltung Gechingen', 'Calwer Str. 14', '75391', 'Gechingen', '07056 201-91', 'http://www.gechingen.de', 'info@gechingen.de', '0000-00-00', '0000-00-00', '6CHW?Px', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(251, 'Gemeindeverwaltung', 'Gemmingen', 'Gemeindeverwaltung Gemmingen', 'Hausener Str. 1', '75050', 'Gemmingen', '07267 808-0', 'http://www.gemmingen4u.de', 'wolf@gemeinde-gemmingen.de', '0000-00-00', '0000-00-00', '-eRZdx8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(252, 'Gemeindeverwaltung', 'Gemmrigheim', 'Gemeindeverwaltung Gemmrigheim', 'Ottmarsheimer Str. 1', '74376', 'Gemmrigheim', '07143 972-0', 'http://www.gemmrigheim.de', 'zentrale@gemmrigheim.de', '0000-00-00', '0000-00-00', 'tmVdaSG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(253, 'Gemeindeverwaltung', 'Gerstetten', 'Gemeindeverwaltung Gerstetten', 'Wilhelmstr. 31', '89547', 'Gerstetten', '07323 84-0', 'http://www.gerstetten.de', 'rathaus@gerstetten.de', '0000-00-00', '0000-00-00', 'YdUdJ3c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(254, 'Gemeindeverwaltung', 'Gingen an der Fils', 'Gemeindeverwaltung Gingen an der Fils', 'Bahnhofstr. 25', '73333', 'Gingen an der Fils', '07162 9606-13', 'http://www.gingen.de', 'bma@gingen.de', '0000-00-00', '0000-00-00', 'vMNmYUF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(255, 'Gemeindeverwaltung', 'Glatten', 'Gemeindeverwaltung Glatten', 'Lombacher Str. 27', '72293', 'Glatten', '07443 9607-0', 'http://www.glatten.de', 'buergermeister@glatten.de', '0000-00-00', '0000-00-00', '4EyFg##', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(256, 'Gemeindeverwaltung', 'Glottertal', 'Gemeindeverwaltung Glottertal', 'Talstr. 45', '79286', 'Glottertal', '07684 9102-0', 'http://www.glottertal.de', 'rathaus@glottertal.de', '0000-00-00', '0000-00-00', 'NZmXekG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(257, 'Gemeindeverwaltung', 'Göggingen', 'Gemeindeverwaltung Göggingen', 'Hauptstr. 46', '73571', 'Göggingen', '07175 5762', 'http://www.gemeinde-goeggingen.de', 'walter.weber@gemeinde-goeggingen.de', '0000-00-00', '0000-00-00', '6wwu7uk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(258, 'Gemeindeverwaltung', 'Gomadingen', 'Gemeindeverwaltung Gomadingen', 'Marktplatz 2', '72532', 'Gomadingen', '07385 9696-0', 'http://www.gomadingen.de', 'Klemens.Betz@gomadingen.de', '0000-00-00', '0000-00-00', '!b6pJMs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(259, 'Gemeindeverwaltung', 'Gomaringen', 'Gemeindeverwaltung Gomaringen', 'Rathausstr. 4', '72810', 'Gomaringen', '07072 9155-0', 'http://www.gomaringen.de', 'info@gomaringen.de', '0000-00-00', '0000-00-00', 'FaZHDH4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(260, 'Gemeindeverwaltung', 'Gondelsheim', 'Gemeindeverwaltung Gondelsheim', 'Bruchsaler Str. 32', '75053', 'Gondelsheim', '07252 9444-0', 'http://www.gondelsheim.de', 'rathaus@gondelsheim.de', '0000-00-00', '0000-00-00', '4Au76?K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(261, 'Gemeindeverwaltung', 'Görwihl', 'Gemeindeverwaltung Görwihl', 'Hauptstr. 54', '79733', 'Görwihl', '07754 708-0', 'http://www.goerwihl.de', 'gemeinde@goerwihl.de', '0000-00-00', '0000-00-00', '9c8GJD-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(262, 'Gemeindeverwaltung', 'Gosheim', 'Gemeindeverwaltung Gosheim', 'Hauptstr. 47', '78559', 'Gosheim', '07426 9612-0', 'http://www.gosheim.de', 'info@gosheim.de', '0000-00-00', '0000-00-00', 'FXBAnzF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(263, 'Gemeindeverwaltung', 'Gottenheim', 'Gemeindeverwaltung Gottenheim', 'Hauptstr. 25', '79288', 'Gottenheim', '07665 9811-0', 'http://www.gottenheim.de', 'gemeinde@gottenheim.de', '0000-00-00', '0000-00-00', 'wZwVPw5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(264, 'Gemeindeverwaltung', 'Gottmadingen', 'Gemeindeverwaltung Gottmadingen', 'Johann-Georg-Fahr-Str. 10', '78244', 'Gottmadingen', '07731 908-0', 'http://www.gottmadingen.de', 'gemeinde@gottmadingen.de', '0000-00-00', '0000-00-00', 'Tf4gF#X', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(265, 'Gemeindeverwaltung', 'Graben-Neudorf', 'Gemeindeverwaltung Graben-Neudorf', 'Hauptstr. 39', '76676', 'Graben-Neudorf', '07255 901-0', 'http://www.graben-neudorf.de', 'reinwald@graben-neudorf.de', '0000-00-00', '0000-00-00', 'nwvsSNu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(266, 'Gemeindeverwaltung', 'Grabenstetten', 'Gemeindeverwaltung Grabenstetten', 'Böhringer Str. 10', '72582', 'Grabenstetten', '07382 387', 'http://www.grabenstetten.de/', 'info@grabenstetten.de', '0000-00-00', '0000-00-00', 'ek-4VLq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(267, 'Gemeindeverwaltung', 'Grafenau', 'Gemeindeverwaltung Grafenau', 'Hofstetten 12', '71120', 'Grafenau', '07033 403-0', 'http://www.grafenau-wuertt.de/', 'info@grafenau.kdrs.de', '0000-00-00', '0000-00-00', 'y5StXvf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(268, 'Gemeindeverwaltung', 'Grafenberg', 'Gemeindeverwaltung Grafenberg', 'Bergstr. 30', '72661', 'Grafenberg', '07123 9339-0', 'http://www.grafenberg.de', 'info@grafenberg.de', '0000-00-00', '0000-00-00', '93!yTNr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(269, 'Gemeindeverwaltung', 'Grafenhausen', 'Gemeindeverwaltung Grafenhausen', 'Rathausplatz 1', '79865', 'Grafenhausen', '07748 520-0', 'http://www.grafenhausen.de', 'rathaus@grafenhausen.de', '0000-00-00', '0000-00-00', 'phk5gSy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(270, 'Gemeindeverwaltung', 'Grenzach-Wyhlen', 'Gemeindeverwaltung Grenzach-Wyhlen', 'Hauptstr. 10', '79639', 'Grenzach-Wyhlen', '07624 32-0', 'http://www.grenzach-wyhlen.de', 'benz@grenzach-wyhlen.de', '0000-00-00', '0000-00-00', 'BxSANB2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(271, 'Gemeindeverwaltung', 'Griesingen', 'Gemeindeverwaltung Griesingen', 'Alte Landstr. 51', '89608', 'Griesingen', '07391 8748', 'http://www.griesingen.de', 'sekretariat@griesingen.de', '0000-00-00', '0000-00-00', 'nW-hcXc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(272, 'Gemeindeverwaltung', 'Grömbach', 'Gemeindeverwaltung Grömbach', 'Lindenweg 8', '72294', 'Grömbach', '07453 8276', 'http://www.gemeinde-groembach.de/', 'gegroembach@t-online.de', '0000-00-00', '0000-00-00', 'awCs6Nn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(273, 'Gemeindeverwaltung', 'Großbettlingen', 'Gemeindeverwaltung Großbettlingen', 'Schweizerhof 2', '72663', 'Großbettlingen', '07022 94345-0', 'http://www.grossbettlingen.de', 'm.fritz@grossbettlingen.de', '0000-00-00', '0000-00-00', 'PBV#EZe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(274, 'Gemeindeverwaltung', 'Grosselfingen', 'Gemeindeverwaltung Grosselfingen', 'Bruderschaftsstr. 66', '72415', 'Grosselfingen', '07476 9440-0', 'http://www.grosselfingen.de', 'moeller@grosselfingen.de', '0000-00-00', '0000-00-00', 'weuZBW#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(275, 'Gemeindeverwaltung', 'Großerlach', 'Gemeindeverwaltung Großerlach', 'Stuttgarter Str. 18', '71577', 'Großerlach', '07903 9154-0', 'http://www.grosserlach.de', 'rathaus@grosserlach.de', '0000-00-00', '0000-00-00', '8#4fmHD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(276, 'Gemeindeverwaltung', 'Großrinderfeld', 'Gemeindeverwaltung Großrinderfeld', 'Marktplatz 6', '97950', 'Großrinderfeld', '09349 9201-0', 'http://www.grossrinderfeld.de', 'anette.schmidt@grossrinderfeld.de', '0000-00-00', '0000-00-00', 'xAqe3-t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(277, 'Gemeindeverwaltung', 'Gruibingen', 'Gemeindeverwaltung Gruibingen', 'Hauptstr. 18', '73344', 'Gruibingen', '07335 9600-0', 'http://www.gruibingen.de', 'info@gruibingen.de', '0000-00-00', '0000-00-00', 'HD4ym?-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(278, 'Gemeindeverwaltung', 'Grundsheim', 'Gemeindeverwaltung Grundsheim', 'Kirchweg 1', '89613', 'Grundsheim', '07357 91030', 'http://www.grundsheim.de', 'info@grundsheim.de', '0000-00-00', '0000-00-00', 'CRz59F!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(279, 'Gemeindeverwaltung', 'Grünkraut', 'Gemeindeverwaltung Grünkraut', 'Scherzachstr. 2', '88287', 'Grünkraut', '0751 7602-0', 'http://www.gruenkraut.de', 'info@gruenkraut.de', '0000-00-00', '0000-00-00', 'U9T-dCW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(280, 'Gemeindeverwaltung', 'Gschwend', 'Gemeindeverwaltung Gschwend', 'Gmünder Str. 2', '74417', 'Gschwend', '07972 681-0', 'http://www.gschwend.de/', 'info@gschwend.de', '0000-00-00', '0000-00-00', 'L8?!43b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(281, 'Gemeindeverwaltung', 'Guggenhausen', 'Gemeindeverwaltung Guggenhausen', 'Hauptstraße 5', '88379', 'Guggenhausen', '07503 534', 'http://www.gvv-altshausen.de', 'gemeinde-guggenhausen@t-online.de', '0000-00-00', '0000-00-00', 'DHNzNzu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(282, 'Gemeindeverwaltung', 'Gundelfingen', 'Gemeindeverwaltung Gundelfingen', 'Alte Bundesstr. 31', '79194', 'Gundelfingen', '0761 5911-0', 'http://www.gundelfingen.de', 'gemeinde@gundelfingen.de', '0000-00-00', '0000-00-00', 'zZu95ab', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(283, 'Gemeindeverwaltung', 'Gunningen', 'Gemeindeverwaltung Gunningen', 'Rathausstr. 7', '78594', 'Gunningen', '07424 940003-0', 'http://www.gunningen.de', 'info@gunningen.de', '0000-00-00', '0000-00-00', 's2HKdK?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(284, 'Gemeindeverwaltung', 'Gutach (Schwarzwaldbahn)', 'Gemeindeverwaltung Gutach (Schwarzwaldbahn)', 'Hauptstr. 38', '77793', 'Gutach (Schwarzwaldbahn)', '07833 9388-0', 'http://www.gutach-schwarzwald.de', 'gemeinde@gutach-schwarzwald.de', '0000-00-00', '0000-00-00', 'PUgykpK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(285, 'Gemeindeverwaltung', 'Gutach im Breisgau', 'Gemeindeverwaltung Gutach im Breisgau', 'Dorfstr. 33', '79261', 'Gutach im Breisgau', '07685 9101-0', 'http://www.gutach.de', 'gemeinde@gutach.de', '0000-00-00', '0000-00-00', 'qkg?PZ-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(286, 'Gemeindeverwaltung', 'Gütenbach', 'Gemeindeverwaltung Gütenbach', 'Hauptstr. 10', '78148', 'Gütenbach', '07723 9306-0', 'http://www.guetenbach.de', 'gemeinde@guetenbach.de', '0000-00-00', '0000-00-00', '2x9M4r6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(287, 'Gemeindeverwaltung', 'Gutenzell-Hürbel', 'Gemeindeverwaltung Gutenzell-Hürbel', 'Kirchberger Str. 8', '88484', 'Gutenzell-Hürbel', '07352 9235-0', 'http://www.gutenzell-huerbel.de', 'info@gutenzell-huerbel.de', '0000-00-00', '0000-00-00', '8E4rXXS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(288, 'Gemeindeverwaltung', 'Häg-Ehrsberg', 'Gemeindeverwaltung Häg-Ehrsberg', 'Rathausstr. 27', '79685', 'Häg-Ehrsberg', '07625 918678-0', 'http://www.hinterhag.de', 'buergermeisteramt@haeg-ehrsberg.de', '0000-00-00', '0000-00-00', 'y5cZWXS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(289, 'Gemeindeverwaltung', 'Hagnau am Bodensee', 'Gemeindeverwaltung Hagnau am Bodensee', 'Im Hof 5', '88709', 'Hagnau am Bodensee', '07532 4300-11', 'http://www.hagnau.de', 'VFrede@hagnau.de', '0000-00-00', '0000-00-00', 'qDKTs38', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(290, 'Gemeindeverwaltung', 'Hambrücken', 'Gemeindeverwaltung Hambrücken', 'Hauptstr. 108', '76707', 'Hambrücken', '07255 7100-0', 'http://www.hambruecken.de', 'gemeinde@hambruecken.de', '0000-00-00', '0000-00-00', 'cbD6W2w', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(291, 'Gemeindeverwaltung', 'Hardheim', 'Gemeindeverwaltung Hardheim', 'Schloßplatz 6', '74736', 'Hardheim', '06283 58-0', 'http://www.hardheim.de', 'rathaus@hardheim.de', '0000-00-00', '0000-00-00', 'Z7MBy5H', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(292, 'Gemeindeverwaltung', 'Hardt', 'Gemeindeverwaltung Hardt', 'Mariazeller Str. 1', '78739', 'Hardt', '07422 9588-0', 'http://www.gemeinde-hardt.de', 'info@hardt-online.de', '0000-00-00', '0000-00-00', '4FUhA3m', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(293, 'Gemeindeverwaltung', 'Hardthausen am Kocher', 'Gemeindeverwaltung Hardthausen am Kocher', 'Lampoldshauser Str. 8', '74239', 'Hardthausen am Kocher', '07139 4709-0', 'http://www.hardthausen.de', 'gemeinde-hardthausen@hardthausen.de', '0000-00-00', '0000-00-00', 'JFr4vgg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(294, 'Gemeindeverwaltung', 'Hartheim am Rhein', 'Gemeindeverwaltung Hartheim am Rhein', 'Feldkircher Str. 17', '79258', 'Hartheim am Rhein', '07633 9105-0', 'http://www.hartheim.de', 'gemeinde@hartheim.de', '0000-00-00', '0000-00-00', '8gnPf5Z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(295, 'Gemeindeverwaltung', 'Hasel', 'Gemeindeverwaltung Hasel', 'Hofstr. 2', '79686', 'Hasel', '07762 9307', 'http://www.gemeinde-hasel.de', 'info@gemeinde-hasel.de', '0000-00-00', '0000-00-00', '6Fn85R!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(296, 'Gemeindeverwaltung', 'Haßmersheim', 'Gemeindeverwaltung Haßmersheim', 'Theodor-Heuss-Str. 45', '74855', 'Haßmersheim', '06266 791-0', 'http://www.hassmersheim.de', 'post@hassmersheim.de', '0000-00-00', '0000-00-00', 'hZtrKXK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(297, 'Gemeindeverwaltung', 'Hattenhofen', 'Gemeindeverwaltung Hattenhofen', 'Hauptstr. 45', '73110', 'Hattenhofen', '07164 91009-0', 'http://www.hattenhofen.de', 'rathaus@hattenhofen.de', '0000-00-00', '0000-00-00', '#?96sNC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(298, 'Gemeindeverwaltung', 'Hausen am Bussen', 'Gemeindeverwaltung Hausen am Bussen', 'Unterdorfstr. 7', '89597', 'Hausen am Bussen', '07393 2449', 'http://www.hausen-am-bussen.de/', 'info@hausen-am-bussen.de', '0000-00-00', '0000-00-00', 'HvWJfhd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(299, 'Gemeindeverwaltung', 'Hausen am Tann', 'Gemeindeverwaltung Hausen am Tann', 'Mühlstr. 6', '72361', 'Hausen am Tann', '07436 424', 'http://www.hausen-am-tann.de', 'kontakt@hausen-am-tann.de', '0000-00-00', '0000-00-00', '!D?Ldhy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(300, 'Gemeindeverwaltung', 'Hausen im Wiesental', 'Gemeindeverwaltung Hausen im Wiesental', 'Bahnhofstr. 9', '79688', 'Hausen im Wiesental', '07622 6873-0', 'http://www.hausen-im-wiesental.de', 'gemeinde@hausen-im-wiesental.de', '0000-00-00', '0000-00-00', '#fUYrzr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(301, 'Gemeindeverwaltung', 'Hausen ob Verena', 'Gemeindeverwaltung Hausen ob Verena', 'Hauptstr. 34', '78595', 'Hausen ob Verena', '07424 940008-0', 'http://www.hausen-ob-verena.de', 'hausen-ob-verena@t-online.de', '0000-00-00', '0000-00-00', 'Hbs8rVv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(302, 'Gemeindeverwaltung', 'Häusern', 'Gemeindeverwaltung Häusern', 'St.-Fridolin-Str. 5', '79837', 'Häusern', '07672 9314-0', 'http://www.haeusern.de', 'gemeinde@haeusern.de', '0000-00-00', '0000-00-00', 'A3zh8J3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(303, 'Gemeindeverwaltung', 'Heddesbach', 'Gemeindeverwaltung Heddesbach', 'Hauptstr. 2', '69434', 'Heddesbach', '06272 2268', 'http://www.heddesbach.de', 'post@heddesbach.gvv-schoenau.de', '0000-00-00', '0000-00-00', 'm5hBmkp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(304, 'Gemeindeverwaltung', 'Heddesheim', 'Gemeindeverwaltung Heddesheim', 'Fritz-Kessler-Platz', '68542', 'Heddesheim', '06203 101-0', 'http://www.heddesheim.de', 'gemeinde@Heddesheim.de', '0000-00-00', '0000-00-00', '?cwH2Ga', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(305, 'Gemeindeverwaltung', 'Heiligenberg', 'Gemeindeverwaltung Heiligenberg', 'Schulstr. 5', '88633', 'Heiligenberg', '07554 9983-0', 'http://www.heiligenberg.de', 'rathaus@heiligenberg.de', '0000-00-00', '0000-00-00', 'Uv-bHE#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(306, 'Gemeindeverwaltung', 'Heiligkreuzsteinach', 'Gemeindeverwaltung Heiligkreuzsteinach', 'Silberne Bergstr. 3', '69253', 'Heiligkreuzsteinach', '06220 9220-0', 'http://www.heiligkreuzsteinach.de', 'post@heiligkreuzsteinach.de', '0000-00-00', '0000-00-00', '9UBmZCL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(307, 'Gemeindeverwaltung', 'Heiningen', 'Gemeindeverwaltung Heiningen', 'Hauptstr. 30', '73092', 'Heiningen', '07161 4034-0', 'http://www.heiningen-online.de', 'aufrecht@heiningen-online.de', '0000-00-00', '0000-00-00', 'GYuL#h5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(308, 'Gemeindeverwaltung', 'Helmstadt-Bargen', 'Gemeindeverwaltung Helmstadt-Bargen', 'Rabanstr. 14', '74921', 'Helmstadt-Bargen', '07263 9120-12', 'http://www.helmstadt-bargen.de/', 'gv-post@helmstadt-bargen.de', '0000-00-00', '0000-00-00', '68FrfBh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(309, 'Gemeindeverwaltung', 'Hemmingen', 'Gemeindeverwaltung Hemmingen', 'Münchinger Str. 5', '71282', 'Hemmingen', '07150 9203-0', 'http://www.hemmingen.de', 'gemeinde@hemmingen.de', '0000-00-00', '0000-00-00', 'NGsmAEf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(310, 'Gemeindeverwaltung', 'Herbertingen', 'Gemeindeverwaltung Herbertingen', 'Holzgasse 6', '88518', 'Herbertingen', '07586 9208-0', 'http://www.herbertingen.de', 'Magnus.Hoppe@herbertingen.de', '0000-00-00', '0000-00-00', 'YyNV6Nd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(311, 'Gemeindeverwaltung', 'Herdwangen-Schönach', 'Gemeindeverwaltung Herdwangen-Schönach', 'Dorfstr. 49', '88634', 'Herdwangen-Schönach', '07557 9200-0', 'http://www.herdwangen.de', 'info@herdwangen-schoenach.de', '0000-00-00', '0000-00-00', 'ScxTLx7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(312, 'Gemeindeverwaltung', 'Hermaringen', 'Gemeindeverwaltung Hermaringen', 'Karlstr. 12', '89568', 'Hermaringen', '07322 9547-0', 'http://www.hermaringen.de', 'info@hermaringen.de', '0000-00-00', '0000-00-00', 'T883Khe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(313, 'Gemeindeverwaltung', 'Heroldstatt', 'Gemeindeverwaltung Heroldstatt', 'Am Berg 1', '72535', 'Heroldstatt', '07389 9090-0', 'http://www.heroldstatt.de', 'info@heroldstatt.de', '0000-00-00', '0000-00-00', 'vWeZSKs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(314, 'Gemeindeverwaltung', 'Herrischried', 'Gemeindeverwaltung Herrischried', 'Hauptstr. 28', '79737', 'Herrischried', '07764 9200-0', 'http://www.herrischried.de', 'c.berger@herrischried.de', '0000-00-00', '0000-00-00', 'FPMwUXH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(315, 'Gemeindeverwaltung', 'Hessigheim', 'Gemeindeverwaltung Hessigheim', 'Besigheimer Str. 17', '74394', 'Hessigheim', '07143 8143-0', 'http://www.hessigheim.de/', 'info@hessigheim.de', '0000-00-00', '0000-00-00', 'WJ9aU8r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(316, 'Gemeindeverwaltung', 'Heuchlingen', 'Gemeindeverwaltung Heuchlingen', 'Küferstr. 3', '73572', 'Heuchlingen', '07174 8209-0', 'http://www.heuchlingen.de', 'info@heuchlingen.de', '0000-00-00', '0000-00-00', 'LtCGvs#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(317, 'Gemeindeverwaltung', 'Heuweiler', 'Gemeindeverwaltung Heuweiler', 'Dorfstr. 21', '79194', 'Heuweiler', '07666 2280', 'http://www.heuweiler.de', 'rathaus@heuweiler.de', '0000-00-00', '0000-00-00', 'Dm3pag3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(318, 'Gemeindeverwaltung', 'Hildrizhausen', 'Gemeindeverwaltung Hildrizhausen', 'Herrenberger Str. 13', '71157', 'Hildrizhausen', '07034 9387-0', 'http://www.hildrizhausen.de', 'info@hildrizhausen.de', '0000-00-00', '0000-00-00', '9GWHBR?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(319, 'Gemeindeverwaltung', 'Hilzingen', 'Gemeindeverwaltung Hilzingen', 'Hauptstr. 36', '78247', 'Hilzingen', '07731 3809-0', 'http://www.hilzingen.de', 'gemeinde@hilzingen.de', '0000-00-00', '0000-00-00', 'TMacC2E', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(320, 'Gemeindeverwaltung', 'Hinterzarten', 'Gemeindeverwaltung Hinterzarten', 'Rathausstr. 12', '79856', 'Hinterzarten', '07652 9197-0', 'http://www.hinterzarten.de', 'gemeinde@hinterzarten.de', '0000-00-00', '0000-00-00', 'sgt9gmn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(321, 'Gemeindeverwaltung', 'Hirrlingen', 'Gemeindeverwaltung Hirrlingen', 'Schloßhof 1', '72145', 'Hirrlingen', '07478 9311-0', 'http://www.hirrlingen.de', 'wild@hirrlingen.de', '0000-00-00', '0000-00-00', 'HB9VmJC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(322, 'Gemeindeverwaltung', 'Hirschberg an der Bergstraße', 'Gemeindeverwaltung Hirschberg an der Bergstraße', 'Großsachsener Str. 14', '69493', 'Hirschberg an der Bergstraße', '06201 598-00', 'http://www.hirschberg-bergstrasse.de', 'gemeinde@hirschberg-bergstrasse.de', '0000-00-00', '0000-00-00', 'Lc6cqdb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(323, 'Gemeindeverwaltung', 'Hochdorf', 'Gemeindeverwaltung Hochdorf', 'Eichendorffstr. 6', '73269', 'Hochdorf', '07153 5006-0', 'http://www.hochdorf.de', 'info@hochdorf.de', '0000-00-00', '0000-00-00', 'u8gGL2C', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(324, 'Gemeindeverwaltung', 'Hochdorf', 'Gemeindeverwaltung Hochdorf', 'Hauptstr. 29', '88454', 'Hochdorf', '07355 9302-0', 'http://www.gemeinde-hochdorf.de', 'info@gemeinde-hochdorf.de', '0000-00-00', '0000-00-00', 'CSE6Sm8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(325, 'Gemeindeverwaltung', 'Höchenschwand', 'Gemeindeverwaltung Höchenschwand', 'Waldshuter Str. 5', '79862', 'Höchenschwand', '07672 4819-0', 'http://www.hoechenschwand.de', 'rathaus@hoechenschwand.de', '0000-00-00', '0000-00-00', 'cp!gwdt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(326, 'Gemeindeverwaltung', 'Höfen an der Enz', 'Gemeindeverwaltung Höfen an der Enz', 'Wildbader Str. 1', '75339', 'Höfen an der Enz', '07081 784-0', 'http://www.hoefen-enz.de', 'gemeinde@hoefen-enz.de', '0000-00-00', '0000-00-00', '!rhn2xW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(327, 'Gemeindeverwaltung', 'Hofstetten', 'Gemeindeverwaltung Hofstetten', 'Hauptstr. 5', '77716', 'Hofstetten', '07832 9129-0', 'http://www.hofstetten.com', 'gemeinde@hofstetten.com', '0000-00-00', '0000-00-00', 'rfJZ-gF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(328, 'Gemeindeverwaltung', 'Hohberg', 'Gemeindeverwaltung Hohberg', 'Freiburger Str. 30-32', '77749', 'Hohberg', '07808 88-0', 'http://www.hohberg.de', 'rathaus@hohberg.de', '0000-00-00', '0000-00-00', 'MUSsh4A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(329, 'Gemeindeverwaltung', 'Hohenfels', 'Gemeindeverwaltung Hohenfels', 'Hauptstr. 30', '78355', 'Hohenfels', '07557 9206-0', 'http://www.hohenfels.de', 'gemeinde@hohenfels.de', '0000-00-00', '0000-00-00', '8#gU-tS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(330, 'Gemeindeverwaltung', 'Hohenstadt', 'Gemeindeverwaltung Hohenstadt', 'Schulstr. 9', '73345', 'Hohenstadt', '07335 5033', 'http://www.hohenstadt-alb.de/', 'A.Hofele@Hohenstadt-alb.de', '0000-00-00', '0000-00-00', 'Fmz3wDr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(331, 'Gemeindeverwaltung', 'Hohenstein', 'Gemeindeverwaltung Hohenstein', 'Im Dorf 14', '72531', 'Hohenstein', '07387 9870-0', 'http://www.gemeinde-hohenstein.de', 'rathaus@gemeinde-hohenstein.de', '0000-00-00', '0000-00-00', 'YeUSf4P', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(332, 'Gemeindeverwaltung', 'Hohentengen', 'Gemeindeverwaltung Hohentengen', 'Beizkoferstr. 57', '88367', 'Hohentengen', '07572 7602-0', 'http://www.hohentengen-online.de', 'info@hohentengen-online.de', '0000-00-00', '0000-00-00', '-CT7auv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(333, 'Gemeindeverwaltung', 'Hohentengen am Hochrhein', 'Gemeindeverwaltung Hohentengen am Hochrhein', 'Kirchstr. 4', '79801', 'Hohentengen am Hochrhein', '07742 853-0', 'http://www.hohentengen.de', 'info@hohentengen-ah.de', '0000-00-00', '0000-00-00', '6J?YDh-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(334, 'Gemeindeverwaltung', 'Holzkirch', 'Gemeindeverwaltung Holzkirch', 'Breitinger Str.4', '89183', 'Holzkirch', '07340 919010', 'www.holzkirch.de', 'info@holzkirch.de', '0000-00-00', '0000-00-00', 'eNE!nJa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(335, 'Gemeindeverwaltung', 'Holzmaden', 'Gemeindeverwaltung Holzmaden', 'Bahnhofstr. 2', '73271', 'Holzmaden', '07023 90001-0', 'http://www.holzmaden.de', 'info@holzmaden.de', '0000-00-00', '0000-00-00', 'NUr-2T4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(336, 'Gemeindeverwaltung', 'Höpfingen', 'Gemeindeverwaltung Höpfingen', 'Heidelberger Str. 23', '74746', 'Höpfingen', '06283 2206-0', 'http://www.hoepfingen.de', 'gemeinde@hoepfingen.de', '0000-00-00', '0000-00-00', 'WAqZrs!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(337, 'Gemeindeverwaltung', 'Horben', 'Gemeindeverwaltung Horben', 'Dorfstr. 2', '79289', 'Horben', '0761 211698-0', 'http://www.horben.de', 'gemeinde@horben.de', '0000-00-00', '0000-00-00', 'xBZJev8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(338, 'Gemeindeverwaltung', 'Horgenzell', 'Gemeindeverwaltung Horgenzell', 'Kornstr. 44', '88263', 'Horgenzell', '07504 9701-0', 'http://www.horgenzell.de', 'v.restle@horgenzell.de', '0000-00-00', '0000-00-00', 'kZYceb#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(339, 'Gemeindeverwaltung', 'Hoßkirch', 'Gemeindeverwaltung Hoßkirch', 'Kirchstr. 2', '88374', 'Hoßkirch', '07587 631', 'http://www.gemeinde-hosskirch.de/', 'info@gemeinde-hosskirch.de', '0000-00-00', '0000-00-00', 'y4ysYxk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(340, 'Gemeindeverwaltung', 'Hüffenhardt', 'Gemeindeverwaltung Hüffenhardt', 'Reisengasse 1', '74928', 'Hüffenhardt', '06268 9205-0', 'http://www.hueffenhardt.de', 'rathaus@hueffenhardt.de', '0000-00-00', '0000-00-00', 'rxTpJNE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(341, 'Gemeindeverwaltung', 'Hügelsheim', 'Gemeindeverwaltung Hügelsheim', 'Hauptstr. 34', '76549', 'Hügelsheim', '07229 3044-0', 'http://www.huegelsheim.de', 'rathaus@huegelsheim.de', '0000-00-00', '0000-00-00', 'vGTSKMc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(342, 'Gemeindeverwaltung', 'Hülben', 'Gemeindeverwaltung Hülben', 'Hauptstr. 1', '72584', 'Hülben', '07125 9686-0', 'http://www.huelben.de', 'info@huelben.de', '0000-00-00', '0000-00-00', 'k-DSbxW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(343, 'Gemeindeverwaltung', 'Hüttisheim', 'Gemeindeverwaltung Hüttisheim', 'Hauptstr. 33', '89185', 'Hüttisheim', '07305 7263', 'http://www.huettisheim.de/', 'info@huettisheim.de', '0000-00-00', '0000-00-00', '-3s-nEA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(344, 'Gemeindeverwaltung', 'Hüttlingen', 'Gemeindeverwaltung Hüttlingen', 'Schulstr. 10', '73460', 'Hüttlingen', '07361 9778-0', 'http://www.huettlingen.de', 'gemeinde@huettlingen.de', '0000-00-00', '0000-00-00', 'fZqxVmY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(345, 'Gemeindeverwaltung', 'Ibach', 'Gemeindeverwaltung Ibach', 'Hofrain 1', '79837', 'Ibach', '07672 842', 'http://www.ibach-schwarzwald.de', 'gemeinde@ibach-schwarzwald.de', '0000-00-00', '0000-00-00', 'rbaPf2z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(346, 'Gemeindeverwaltung', 'Iffezheim', 'Gemeindeverwaltung Iffezheim', 'Hauptstr. 54', '76473', 'Iffezheim', '07229 605-20', 'http://www.iffezheim.de', 'buergermeister@iffezheim.de', '0000-00-00', '0000-00-00', 'hppDAMN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(347, 'Gemeindeverwaltung', 'Igersheim', 'Gemeindeverwaltung Igersheim', 'Möhlerplatz 9', '97999', 'Igersheim', '07931/497-12', 'http://www.igersheim.de', 'info@igersheim.de', '0000-00-00', '0000-00-00', '?dw-7WW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(348, 'Gemeindeverwaltung', 'Iggingen', 'Gemeindeverwaltung Iggingen', 'Marktplatz 6', '73574', 'Iggingen', '07175 9208-0', 'http://www.iggingen.de', 'Klemens.Stoeckle@iggingen.de', '0000-00-00', '0000-00-00', 'LvVxCdL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(349, 'Gemeindeverwaltung', 'Ihringen', 'Gemeindeverwaltung Ihringen', 'Bachenstr. 42', '79241', 'Ihringen', '07668 7108-0', 'http://www.ihringen.de', 'gemeinde@ihringen.de', '0000-00-00', '0000-00-00', '7ds5vpu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(350, 'Gemeindeverwaltung', 'Illerkirchberg', 'Gemeindeverwaltung Illerkirchberg', 'Hauptstr. 49', '89171', 'Illerkirchberg', '07346 9609-0', 'http://www.illerkirchberg.de', 'info@illerkirchberg.de', '0000-00-00', '0000-00-00', 'qnSe4f?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(351, 'Gemeindeverwaltung', 'Illerrieden', 'Gemeindeverwaltung Illerrieden', 'Wochenauer Str. 1', '89186', 'Illerrieden', '07306 9696-0', 'http://www.illerrieden.de', 'info@illerrieden.de', '0000-00-00', '0000-00-00', 'nxmrUY7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(352, 'Gemeindeverwaltung', 'Illingen', 'Gemeindeverwaltung Illingen', 'Ortszentrum 8', '75428', 'Illingen', '07042 8242-0', 'http://www.illingen-online.de', 'gemeinde@illingen-online.de', '0000-00-00', '0000-00-00', '-t5wH2z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(353, 'Gemeindeverwaltung', 'Illmensee', 'Gemeindeverwaltung Illmensee', 'Kirchplatz 5', '88636', 'Illmensee', '07558 9207-0', 'http://www.illmensee.de', 'hoffmann@illmensee.de', '0000-00-00', '0000-00-00', 'vYTN-!9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(354, 'Gemeindeverwaltung', 'Ilsfeld', 'Gemeindeverwaltung Ilsfeld', 'Rathausstraße 8', '74360', 'Ilsfeld', '07062 9042-0', 'http://www.ilsfeld.de', 'gemeinde@ilsfeld.de', '0000-00-00', '0000-00-00', '#vwGEkf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(355, 'Gemeindeverwaltung', 'Ilvesheim', 'Gemeindeverwaltung Ilvesheim', 'Schloßstr. 9', '68549', 'Ilvesheim', '0621 49660-0', 'http://www.ilvesheim.de', 'gemeinde@ilvesheim.de', '0000-00-00', '0000-00-00', 'vkwG8?E', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(356, 'Gemeindeverwaltung', 'Immendingen', 'Gemeindeverwaltung Immendingen', 'Schloßplatz 2', '78194', 'Immendingen', '07462 24-0', 'http://www.immendingen.de', 'gemeindeverwaltung@immendingen.de', '0000-00-00', '0000-00-00', 'nr!AvAe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(357, 'Gemeindeverwaltung', 'Immenstaad am Bodensee', 'Gemeindeverwaltung Immenstaad am Bodensee', 'Dr.-Zimmermann-Str. 1', '88090', 'Immenstaad am Bodensee', '07545 201-0', 'http://www.immenstaad.de', 'rathaus@immenstaad.de', '0000-00-00', '0000-00-00', 'nfcFTfb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(358, 'Gemeindeverwaltung', 'Ingersheim', 'Gemeindeverwaltung Ingersheim', 'Hindenburgplatz 10', '74379', 'Ingersheim', '07142 9745-14', 'http://www.ingersheim.de', 'volker.godel@ingersheim.de', '0000-00-00', '0000-00-00', 'P6yhZ-B', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(359, 'Gemeindeverwaltung', 'Ingoldingen', 'Gemeindeverwaltung Ingoldingen', 'St. Georgenstr. 1', '88456', 'Ingoldingen', '07355 9304-0', 'http://www.ingoldingen.de', 'info@ingoldingen.de', '0000-00-00', '0000-00-00', 'XZS-PLh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(360, 'Gemeindeverwaltung', 'Inzigkofen', 'Gemeindeverwaltung Inzigkofen', 'Ziegelweg 2', '72514', 'Inzigkofen', '07571 7307-0', 'http://www.inzigkofen.de', 'post@inzigkofen.de', '0000-00-00', '0000-00-00', 'TU-trmJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(361, 'Gemeindeverwaltung', 'Inzlingen', 'Gemeindeverwaltung Inzlingen', 'Wasserschloss', '79594', 'Inzlingen', '07621 4055-0', 'http://www.inzlingen.de', 'rathaus@inzlingen.de', '0000-00-00', '0000-00-00', 'eK4sLHp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(362, 'Gemeindeverwaltung', 'Irndorf', 'Gemeindeverwaltung Irndorf', 'Eichfelsenstr. 22', '78597', 'Irndorf', '07466 227', 'http://www.irndorf.de', 'info@irndorf.de', '0000-00-00', '0000-00-00', '2y9Y8kL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(363, 'Gemeindeverwaltung', 'Ispringen', 'Gemeindeverwaltung Ispringen', 'Gartenstr. 12', '75228', 'Ispringen', '07231 9812-0', 'http://www.ispringen.de', 'gemeinde@ispringen.de', '0000-00-00', '0000-00-00', 'Wem?dWg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(364, 'Gemeindeverwaltung', 'Ittlingen', 'Gemeindeverwaltung Ittlingen', 'Hauptstr. 101', '74930', 'Ittlingen', '07266 9191-0', 'http://www.ittlingen.de', 'info@ittlingen.de', '0000-00-00', '0000-00-00', 'c-GKmRt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(365, 'Gemeindeverwaltung', 'Jagsthausen', 'Gemeindeverwaltung Jagsthausen', 'Hauptstr. 3', '74249', 'Jagsthausen', '07943 9101-0', 'http://www.jagsthausen.de', 'info@gemeinde.jagsthausen.de', '0000-00-00', '0000-00-00', 'wvbxLuu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(366, 'Gemeindeverwaltung', 'Jagstzell', 'Gemeindeverwaltung Jagstzell', 'Hauptstr. 6', '73489', 'Jagstzell', '07967 9060-0', 'http://www.jagstzell.de', 'Raimund.Mueller@jagstzell.de', '0000-00-00', '0000-00-00', 'uKvAUcH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(367, 'Gemeindeverwaltung', 'Jestetten', 'Gemeindeverwaltung Jestetten', 'Hombergstr. 2', '79798', 'Jestetten', '07745 9209-0', 'http://www.jestetten.de', 'buergermeisterin@jestetten.de', '0000-00-00', '0000-00-00', '65?yNba', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(368, 'Gemeindeverwaltung', 'Jettingen', 'Gemeindeverwaltung Jettingen', 'Albstr. 2', '71131', 'Jettingen', '07452 744-0', 'http://www.jettingen.de', 'burkhardt@jettingen.de', '0000-00-00', '0000-00-00', 'gzuP5hV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(369, 'Gemeindeverwaltung', 'Jungingen', 'Gemeindeverwaltung Jungingen', 'Lehrstr. 3', '72417', 'Jungingen', '07477 873-0', 'http://www.gemeinde-jungingen.de', 'info@jungingen.de', '0000-00-00', '0000-00-00', 'VG8UmGu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(370, 'Gemeindeverwaltung', 'Kaisersbach', 'Gemeindeverwaltung Kaisersbach', 'Dorfstr. 5', '73667', 'Kaisersbach', '07184 93838-0', 'http://www.kaisersbach.de', 'k.mueller@kaisersbach.de', '0000-00-00', '0000-00-00', 'SGWfXw6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(371, 'Gemeindeverwaltung', 'Kämpfelbach', 'Gemeindeverwaltung Kämpfelbach', 'Kelterstr. 1', '75236', 'Kämpfelbach', '07231 88660', 'http://www.kaempfelbach.de', 'gemeinde@kaempfelbach.de', '0000-00-00', '0000-00-00', '!uEw6dM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(372, 'Gemeindeverwaltung', 'Kanzach', 'Gemeindeverwaltung Kanzach', 'Rathausweg 6', '88422', 'Kanzach', '07582 8286', 'http://www.gemeinde-kanzach.de', 'info@gemeinde-kanzach.de', '0000-00-00', '0000-00-00', 'dnKRArb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(373, 'Gemeindeverwaltung', 'Kappel-Grafenhausen', 'Gemeindeverwaltung Kappel-Grafenhausen', 'Rathausstr. 2', '77966', 'Kappel-Grafenhausen', '07822 863-0', 'http://www.kappel-grafenhausen.de', 'gemeinde@kappel-grafenhausen.de', '0000-00-00', '0000-00-00', 'Ac7LTHt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(374, 'Gemeindeverwaltung', 'Kappelrodeck', 'Gemeindeverwaltung Kappelrodeck', 'Hauptstr. 65', '77876', 'Kappelrodeck', '07842 802-0', 'http://www.kappelrodeck.de', 'gemeinde@kappelrodeck.de', '0000-00-00', '0000-00-00', 'rhspNJw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(375, 'Gemeindeverwaltung', 'Karlsbad', 'Gemeindeverwaltung Karlsbad', 'Hirtenstr. 14', '76307', 'Karlsbad', '07202 9304-0', 'http://www.karlsbad.de', 'rathaus@karlsbad.de', '0000-00-00', '0000-00-00', '-w?-h?U', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(376, 'Gemeindeverwaltung', 'Karlsdorf-Neuthard', 'Gemeindeverwaltung Karlsdorf-Neuthard', 'Amalienstr. 1', '76689', 'Karlsdorf-Neuthard', '07251 443-0', 'http://www.karlsdorf-neuthard.de', 'gemeinde@karlsdorf-neuthard.de', '0000-00-00', '0000-00-00', 'sDdR--s', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(377, 'Gemeindeverwaltung', 'Keltern', 'Gemeindeverwaltung Keltern', 'Weinbergstr. 9', '75210', 'Keltern', '07236 703-0', 'http://www.keltern.de', 'bm.sekretariat@keltern.de', '0000-00-00', '0000-00-00', 'b7nv-rN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(378, 'Gemeindeverwaltung', 'Kernen im Remstal', 'Gemeindeverwaltung Kernen im Remstal', 'Stettener Str. 12', '71394', 'Kernen im Remstal', '07151 4014-0', 'http://www.kernen.de', 'info@kernen.de', '0000-00-00', '0000-00-00', 'GhcBZDs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(379, 'Gemeindeverwaltung', 'Ketsch', 'Gemeindeverwaltung Ketsch', 'Hockenheimer Str. 5', '68775', 'Ketsch', '06202 606-0', 'http://www.ketsch.de', 'info-ketsch@ketsch.de', '0000-00-00', '0000-00-00', 'quzUz6b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(380, 'Gemeindeverwaltung', 'Kieselbronn', 'Gemeindeverwaltung Kieselbronn', 'Hauptstr. 20', '75249', 'Kieselbronn', '07231 9534-0', 'http://www.kieselbronn.de', 'info@kieselbronn.de', '0000-00-00', '0000-00-00', 'yqvNUU?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(381, 'Gemeindeverwaltung', 'Kippenheim', 'Gemeindeverwaltung Kippenheim', 'Untere Hauptstr. 4', '77971', 'Kippenheim', '07825 903-0', 'http://www.kippenheim.de', 'gemeinde@kippenheim.de', '0000-00-00', '0000-00-00', 'GrDb-2p', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(382, 'Gemeindeverwaltung', 'Kirchardt', 'Gemeindeverwaltung Kirchardt', 'Goethestr. 5', '74912', 'Kirchardt', '07266 208-0', 'http://www.kirchardt.de', 'rathaus@kirchardt.de', '0000-00-00', '0000-00-00', 'WK4znMf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(383, 'Gemeindeverwaltung', 'Kirchberg an der Iller', 'Gemeindeverwaltung Kirchberg an der Iller', 'Hauptstr. 20', '88486', 'Kirchberg an der Iller', '07354 9316-0', 'http://www.kirchberg-iller.de', 'info@kirchberg-iller.de', '0000-00-00', '0000-00-00', 'aZfFMML', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(384, 'Gemeindeverwaltung', 'Kirchberg an der Murr', 'Gemeindeverwaltung Kirchberg an der Murr', 'Kirchplatz 2', '71737', 'Kirchberg an der Murr', '07144 8375-0', 'http://www.kirchberg-murr.de/', 'info@kirchberg-murr.de', '0000-00-00', '0000-00-00', 'EMhZwww', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(385, 'Gemeindeverwaltung', 'Kirchdorf an der Iller', 'Gemeindeverwaltung Kirchdorf an der Iller', 'Rathausstr. 11', '88457', 'Kirchdorf an der Iller', '07354 9332-0', 'http://www.kirchdorf-iller.de', 'rainer.langenbacher@kirchdorf-iller.de', '0000-00-00', '0000-00-00', 'dV!Mynk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(386, 'Gemeindeverwaltung', 'Kirchentellinsfurt', 'Gemeindeverwaltung Kirchentellinsfurt', 'Rathausplatz 1', '72138', 'Kirchentellinsfurt', '07121 9005-0', 'http://www.kirchentellinsfurt.de', 'bernd.haug@kirchentellinsfurt.de', '0000-00-00', '0000-00-00', 'XM9RZXG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(387, 'Gemeindeverwaltung', 'Kirchheim am Neckar', 'Gemeindeverwaltung Kirchheim am Neckar', 'Hauptstr. 78', '74366', 'Kirchheim am Neckar', '07143 8955-0', 'http://www.kirchheim-am-neckar.de', 'info@kirchheim-n.de', '0000-00-00', '0000-00-00', '8Fuzkd2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(388, 'Gemeindeverwaltung', 'Kirchheim am Ries', 'Gemeindeverwaltung Kirchheim am Ries', 'Auf dem Wört 7', '73467', 'Kirchheim am Ries', '07362 95690-0', 'http://www.kirchheim-am-ries.de', 'info@kirchheim-am-ries.de', '0000-00-00', '0000-00-00', 'Y?P6uuP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(389, 'Gemeindeverwaltung', 'Kirchzarten', 'Gemeindeverwaltung Kirchzarten', 'Talvogteistr. 12', '79199', 'Kirchzarten', '07661 393-0', 'http://www.kirchzarten.de', 'gemeinde@kirchzarten.de', '0000-00-00', '0000-00-00', 'pEcKVuK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(390, 'Gemeindeverwaltung', 'Kißlegg', 'Gemeindeverwaltung Kißlegg', 'Schloßstr. 5', '88353', 'Kißlegg', '07563 936-0', 'http://www.kisslegg.de', 'Dieter.Krattenmacher@kisslegg.de', '0000-00-00', '0000-00-00', 'Gn!4bpy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(391, 'Gemeindeverwaltung', 'Kleines Wiesental', 'Gemeindeverwaltung Kleines Wiesental', 'Tegernauer Ortsstr.9', '79692', 'Kleines Wiesental', '07629/9110-20', 'http://www.kleines-wiesental.eu/', 'schoenbett@gdekw.de', '0000-00-00', '0000-00-00', 'WFy4r5q', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(392, 'Gemeindeverwaltung', 'Klettgau', 'Gemeindeverwaltung Klettgau', 'Degernauerstr. 22', '79771', 'Klettgau', '07742 935-0', 'http://www.gemeinde-klettgau.de', 'gemeinde@klettgau.de', '0000-00-00', '0000-00-00', 'nN#v-4t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(393, 'Gemeindeverwaltung', 'Kohlberg', 'Gemeindeverwaltung Kohlberg', 'Metzinger Str. 1', '72664', 'Kohlberg', '07025 91018-0', 'http://www.kohlberg-wuerttemberg.de', 'rathaus@kohlberg.de', '0000-00-00', '0000-00-00', 'JckxbT9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(394, 'Gemeindeverwaltung', 'Kolbingen', 'Gemeindeverwaltung Kolbingen', 'Hauptstr. 3', '78600', 'Kolbingen', '07463 97083', 'http://www.kolbingen.de', 'info@kolbingen.de', '0000-00-00', '0000-00-00', 'dK9p4?D', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(395, 'Gemeindeverwaltung', 'Köngen', 'Gemeindeverwaltung Köngen', 'Stöffler Platz 1', '73257', 'Köngen', '07024 8007-0', 'http://www.koengen.de', 'info@koengen.de', '0000-00-00', '0000-00-00', '76wJuuZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(396, 'Gemeindeverwaltung', 'Königheim', 'Gemeindeverwaltung Königheim', 'Kirchplatz 2', '97953', 'Königheim', '09341 9209-0', 'http://www.koenigheim.de', 'gemeinde@koenigheim.de', '0000-00-00', '0000-00-00', '3xN4R7z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(397, 'Gemeindeverwaltung', 'Königsbach-Stein', 'Gemeindeverwaltung Königsbach-Stein', 'Marktstr. 15', '75203', 'Königsbach-Stein', '07232 3008-0', 'http://www.koenigsbach-stein.de', 'kielburger@koenigsbach-stein.de', '0000-00-00', '0000-00-00', '2g7uy4h', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(398, 'Gemeindeverwaltung', 'Königsbronn', 'Gemeindeverwaltung Königsbronn', 'Herwartstr. 2', '89551', 'Königsbronn', '07328 9625-0', 'http://www.koenigsbronn.de', 'rathaus@koenigsbronn.de', '0000-00-00', '0000-00-00', 'aMSgrtC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(399, 'Gemeindeverwaltung', 'Königseggwald', 'Gemeindeverwaltung Königseggwald', 'Hauptstr. 17', '88376', 'Königseggwald', '07587 9502-0', 'http://www.koenigseggwald.de', 'gemeinde@koenigseggwald.de', '0000-00-00', '0000-00-00', 'Mdms?Mp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(400, 'Gemeindeverwaltung', 'Königsfeld im Schwarzwald', 'Gemeindeverwaltung Königsfeld im Schwarzwald', 'Rathausstr. 2', '78126', 'Königsfeld im Schwarzwald', '07725 8009-0', 'http://www.koenigsfeld.de', 'Fritz.Link@koenigsfeld.de', '0000-00-00', '0000-00-00', 'Szd-66H', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(401, 'Gemeindeverwaltung', 'Königsheim', 'Gemeindeverwaltung Königsheim', 'Hauptstr. 3', '78598', 'Königsheim', '07429 2327', 'http://www.gemeinde-koenigsheim.de', 'info@gemeinde-koenigsheim.de', '0000-00-00', '0000-00-00', 'nE#5DeA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(402, 'Gemeindeverwaltung', 'Korb', 'Gemeindeverwaltung Korb', 'J.-F.-Weishaar-Straße 7 - 9', '71404', 'Korb', '07151 9334-0', 'http://www.korb.de', 'gemeinde@korb.de', '0000-00-00', '0000-00-00', 'Kgm5NaU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(403, 'Gemeindeverwaltung', 'Krauchenwies', 'Gemeindeverwaltung Krauchenwies', 'Hausenerstr. 1', '72505', 'Krauchenwies', '07576 972-0', 'http://www.krauchenwies.de', 'info@krauchenwies.de', '0000-00-00', '0000-00-00', 'M8nF4E6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(404, 'Gemeindeverwaltung', 'Kreßberg', 'Gemeindeverwaltung Kreßberg', 'Untere Hirtenstr. 34', '74594', 'Kreßberg', '07957 9880-10', 'http://www.kressberg.de', 'gemeindeverwaltung@kressberg.de', '0000-00-00', '0000-00-00', 'VLcaA8v', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(405, 'Gemeindeverwaltung', 'Kressbronn am Bodensee', 'Gemeindeverwaltung Kressbronn am Bodensee', 'Hauptstr. 19', '88079', 'Kressbronn am Bodensee', '07543 9662-0', 'http://www.kressbronn.de', 'rathaus@kressbronn.de', '0000-00-00', '0000-00-00', 'WrXpTyA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(406, 'Gemeindeverwaltung', 'Kronau', 'Gemeindeverwaltung Kronau', 'Kirrlacher Str. 2', '76709', 'Kronau', '07253 9402-0', 'http://www.kronau.de', 'gemeinde@kronau.de', '0000-00-00', '0000-00-00', 'yp2f7Xy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(407, 'Gemeindeverwaltung', 'Kuchen', 'Gemeindeverwaltung Kuchen', 'Marktplatz 11', '73329', 'Kuchen', '07331 9882-0', 'http://www.kuchen.de', 'bma@kuchen.de', '0000-00-00', '0000-00-00', 'fKRsp6v', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(408, 'Gemeindeverwaltung', 'Kupferzell', 'Gemeindeverwaltung Kupferzell', 'Am Marktplatz 14 -16', '74635', 'Kupferzell', '07944 9111-0', 'http://www.kupferzell.de', 'rathaus@kupferzell.de', '0000-00-00', '0000-00-00', 'AaSzUTb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(409, 'Gemeindeverwaltung', 'Kürnbach', 'Gemeindeverwaltung Kürnbach', 'Marktplatz 12', '75057', 'Kürnbach', '07258 9105-0', 'http://www.kuernbach.de', 'gemeinde@kuernbach.de', '0000-00-00', '0000-00-00', 'h2KnTD#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(410, 'Gemeindeverwaltung', 'Küssaberg', 'Gemeindeverwaltung Küssaberg', 'Gemeindezentrum 1', '79790', 'Küssaberg', '07741 6001-41', 'http://www.kuessaberg.de', 'weber.manfred@kuessaberg.de', '0000-00-00', '0000-00-00', 'Ef5Lygv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(411, 'Gemeindeverwaltung', 'Kusterdingen', 'Gemeindeverwaltung Kusterdingen', 'Kirchentellinsfurter Str. 9', '72127', 'Kusterdingen', '07071 1308-0', 'http://www.kusterdingen.de', 'rathaus@kusterdingen.de', '0000-00-00', '0000-00-00', 'VmpBPSU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(412, 'Gemeindeverwaltung', 'Langenargen', 'Gemeindeverwaltung Langenargen', 'Obere Seestr. 1', '88085', 'Langenargen', '07543 9330-0', 'http://www.langenargen.de', 'rathaus@langenargen.de', '0000-00-00', '0000-00-00', 'GStbmrt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(413, 'Gemeindeverwaltung', 'Langenbrettach', 'Gemeindeverwaltung Langenbrettach', 'Rathausstr. 1', '74243', 'Langenbrettach', '07139 9306-0', 'http://www.langenbrettach.de', 'info@langenbrettach.de', '0000-00-00', '0000-00-00', 'KwBYrMB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(414, 'Gemeindeverwaltung', 'Langenenslingen', 'Gemeindeverwaltung Langenenslingen', 'Hauptstr. 71', '88515', 'Langenenslingen', '07376 969-0', 'http://www.langenenslingen.de', 'bmschneider@langenenslingen.de', '0000-00-00', '0000-00-00', '!MMnFCT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(415, 'Gemeindeverwaltung', 'Lauchringen', 'Gemeindeverwaltung Lauchringen', 'Hohrainstr. 59', '79787', 'Lauchringen', '07741 6095-0', 'http://www.lauchringen.de', 'lauchringen@lauchringen.de', '0000-00-00', '0000-00-00', '-43x4qJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(416, 'Gemeindeverwaltung', 'Laudenbach', 'Gemeindeverwaltung Laudenbach', 'Untere Str. 2', '69514', 'Laudenbach', '06201 7002-0', 'http://www.gemeinde-laudenbach.de', 'rathaus@gemeinde-laudenbach.de', '0000-00-00', '0000-00-00', 'ezXaVpn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(417, 'Gemeindeverwaltung', 'Lauf', 'Gemeindeverwaltung Lauf', 'Hauptstr. 70', '77886', 'Lauf', '07841 2006-0', 'http://www.lauf-schwarzwald.de', 'gemeinde@lauf-schwarzwald.de', '0000-00-00', '0000-00-00', 'VZq8V#5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(418, 'Gemeindeverwaltung', 'Lautenbach', 'Gemeindeverwaltung Lautenbach', 'Hauptstr. 48', '77794', 'Lautenbach', '07802 9259-0', 'http://www.lautenbach-renchtal.de', 'bm@lautenbach-renchtal.de', '0000-00-00', '0000-00-00', 's!n6kb5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(419, 'Gemeindeverwaltung', 'Lauterach', 'Gemeindeverwaltung Lauterach', 'Lautertalstr. 16', '89584', 'Lauterach', '07375 227', 'http://www.gemeinde-lauterach.de', 'info@gemeinde-lauterach.de', '0000-00-00', '0000-00-00', '8M#AykU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(420, 'Gemeindeverwaltung', 'Lauterbach', 'Gemeindeverwaltung Lauterbach', 'Schramberger Str. 5', '78730', 'Lauterbach', '07422 9497-0', 'http://www.lauterbach-schwarzwald.de', 'buergermeister@lauterbach-schwarzwald.de', '0000-00-00', '0000-00-00', '5MqHGsp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(421, 'Gemeindeverwaltung', 'Lehrensteinsfeld', 'Gemeindeverwaltung Lehrensteinsfeld', 'Ellhofener Str. 2', '74251', 'Lehrensteinsfeld', '07134 9848-0', 'http://www.lehrensteinsfeld.de', 'info@lehrensteinsfeld.de', '0000-00-00', '0000-00-00', 'fZd-nbM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(422, 'Gemeindeverwaltung', 'Leibertingen', 'Gemeindeverwaltung Leibertingen', 'Rathausstr. 4', '88637', 'Leibertingen', '07466 9282-0', 'http://www.leibertingen.de', 'info@leibertingen.de', '0000-00-00', '0000-00-00', 'PK!qBvY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(423, 'Gemeindeverwaltung', 'Leingarten', 'Gemeindeverwaltung Leingarten', 'Heilbronner Str. 38', '74211', 'Leingarten', '07131 4061-0', 'http://www.leingarten.de', 'info@leingarten.de', '0000-00-00', '0000-00-00', '8kgbsPN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(424, 'Gemeindeverwaltung', 'Leinzell', 'Gemeindeverwaltung Leinzell', 'Mulfingerstr. 2', '73575', 'Leinzell', '07175 99820-0', 'http://www.leinzell.de', 'info@leinzell.de', '0000-00-00', '0000-00-00', 'Ex?PzP-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(425, 'Gemeindeverwaltung', 'Lenningen', 'Gemeindeverwaltung Lenningen', 'Marktplatz 1', '73252', 'Lenningen', '07026 609-0', 'http://www.lenningen.de', 'm.schlecht@lenningen.de', '0000-00-00', '0000-00-00', 'JHVKAWK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(426, 'Gemeindeverwaltung', 'Lenzkirch', 'Gemeindeverwaltung Lenzkirch', 'Kirchplatz 1', '79853', 'Lenzkirch', '07653 684-0', 'http://www.lenzkirch.de', 'a.graf@lenzkirch.de', '0000-00-00', '0000-00-00', 'urWJtWg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(427, 'Gemeindeverwaltung', 'Leutenbach', 'Gemeindeverwaltung Leutenbach', 'Rathausplatz 1', '71397', 'Leutenbach', '07195 189-0', 'http://www.leutenbach.de', 'info@leutenbach.de', '0000-00-00', '0000-00-00', '-y7W4Md', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(428, 'Gemeindeverwaltung', 'Lichtenstein', 'Gemeindeverwaltung Lichtenstein', 'Rathausplatz 17', '72805', 'Lichtenstein', '07129 696-0', 'http://www.gemeinde-lichtenstein.de', 'info@gemeinde-lichtenstein.de', '0000-00-00', '0000-00-00', 'Y9qmp?7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(429, 'Gemeindeverwaltung', 'Lichtenwald', 'Gemeindeverwaltung Lichtenwald', 'Hauptstr. 34', '73669', 'Lichtenwald', '07153 9463-0', 'http://www.lichtenwald.de', 'post@lichtenwald.de', '0000-00-00', '0000-00-00', 'uugESFG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(430, 'Gemeindeverwaltung', 'Limbach', 'Gemeindeverwaltung Limbach', 'Muckentaler Str. 9', '74838', 'Limbach', '06287 9200-0', 'http://www.limbach.de', 'gemeinde@limbach.de', '0000-00-00', '0000-00-00', 'u9Gzbe4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(431, 'Gemeindeverwaltung', 'Linkenheim-Hochstetten', 'Gemeindeverwaltung Linkenheim-Hochstetten', 'Karlsruher Str. 41', '76351', 'Linkenheim-Hochstetten', '07247 802-0', 'http://www.linkenheim-hochstetten.de', 'info@linkenheim-hochstetten.de', '0000-00-00', '0000-00-00', 'xC4ESXP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(432, 'Gemeindeverwaltung', 'Lobbach', 'Gemeindeverwaltung Lobbach', 'Hauptstr. 38', '74931', 'Lobbach', '06226 9525-0', 'http://www.lobbach.de', 'gemeinde@lobbach.de', '0000-00-00', '0000-00-00', 'Dty7-eZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(433, 'Gemeindeverwaltung', 'Löchgau', 'Gemeindeverwaltung Löchgau', 'Hauptstr. 49', '74369', 'Löchgau', '07143 2709-0', 'http://www.loechgau.de', 'rathaus@loechgau.de', '0000-00-00', '0000-00-00', 'rZLbu3U', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(434, 'Gemeindeverwaltung', 'Loffenau', 'Gemeindeverwaltung Loffenau', 'Untere Dorfstr. 1', '76597', 'Loffenau', '07083 9233-0', 'http://www.loffenau.de', 'erich.steigerwald@loffenau.de', '0000-00-00', '0000-00-00', 'CAJsTsY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(435, 'Gemeindeverwaltung', 'Lonsee', 'Gemeindeverwaltung Lonsee', 'Hindenburgstr. 16', '89173', 'Lonsee', '07336 81-0', 'http://www.lonsee.de', 'rathaus@lonsee.de', '0000-00-00', '0000-00-00', '!maBMBb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(436, 'Gemeindeverwaltung', 'Loßburg', 'Gemeindeverwaltung Loßburg', 'Hauptstr. 50', '72290', 'Loßburg', '07446 9504-0', 'http://www.lossburg.de', 'postgemeinde@lossburg.de', '0000-00-00', '0000-00-00', 'NrPuFEV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(437, 'Gemeindeverwaltung', 'Lottstetten', 'Gemeindeverwaltung Lottstetten', 'Rathausplatz 1', '79807', 'Lottstetten', '07745 9201-0', 'http://www.lottstetten.de', 'gemeinde@lottstetten.de', '0000-00-00', '0000-00-00', 'Z39HgVH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(438, 'Gemeindeverwaltung', 'Magstadt', 'Gemeindeverwaltung Magstadt', 'Marktplatz 1', '71106', 'Magstadt', '07159 9458-0', 'http://www.magstadt.de', 'info@magstadt.de', '0000-00-00', '0000-00-00', 'ZgXa9hD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(439, 'Gemeindeverwaltung', 'Mahlstetten', 'Gemeindeverwaltung Mahlstetten', 'Marienplatz 1', '78601', 'Mahlstetten', '07429 2321', 'http://www.mahlstetten.de', 'info@mahlstetten.de', '0000-00-00', '0000-00-00', '#-wdZE2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(440, 'Gemeindeverwaltung', 'Mainhardt', 'Gemeindeverwaltung Mainhardt', 'Hauptstr. 1', '74535', 'Mainhardt', '07903 9150-0', 'http://www.mainhardt.de', 'rathaus@mainhardt.de', '0000-00-00', '0000-00-00', 'Ez7s?sS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(441, 'Gemeindeverwaltung', 'Malsburg-Marzell', 'Gemeindeverwaltung Malsburg-Marzell', 'Rathausplatz 1', '79429', 'Malsburg-Marzell', '07626 9199-0', 'http://www.malsburg-marzell.de', 'rathaus@malsburg-marzell.de', '0000-00-00', '0000-00-00', 'ecmGTPq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(442, 'Gemeindeverwaltung', 'Malsch', 'Gemeindeverwaltung Malsch', 'Hauptstr. 71', '76316', 'Malsch', '07246 707-0', 'http://www.malsch.de', 'elmar.himmel@malsch.de', '0000-00-00', '0000-00-00', 'GYgqPuN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(443, 'Gemeindeverwaltung', 'Malsch', 'Gemeindeverwaltung Malsch', 'Kirchberg 10', '69254', 'Malsch', '07253 9252-0', 'http://www.malsch-weinort.de', 'sibylle.wuerfel@malsch-weinort.de', '0000-00-00', '0000-00-00', 'fM2sMPF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(444, 'Gemeindeverwaltung', 'Malterdingen', 'Gemeindeverwaltung Malterdingen', 'Hauptstr. 18', '79364', 'Malterdingen', '07644 9111-0', 'http://www.malterdingen.de', 'hauptamt@malterdingen.de', '0000-00-00', '0000-00-00', 'mprg-kC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(445, 'Gemeindeverwaltung', 'March', 'Gemeindeverwaltung March', 'Am Felsenkeller 2', '79232', 'March', '07665 422-0', 'http://www.march.de', 'gemeinde@march.de', '0000-00-00', '0000-00-00', 'tB722ER', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(446, 'Gemeindeverwaltung', 'Marxzell', 'Gemeindeverwaltung Marxzell', 'Karlsruher Str. 2', '76359', 'Marxzell', '07248 9147-0', 'http://www.marxzell.de', 'gemeinde@marxzell.de', '0000-00-00', '0000-00-00', 'G54X2Gu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(447, 'Gemeindeverwaltung', 'Maselheim', 'Gemeindeverwaltung Maselheim', 'Wennedacher Str. 5', '88437', 'Maselheim', '07351 1840-0', 'http://www.maselheim.de', 'info@maselheim.de', '0000-00-00', '0000-00-00', 'TPER7qq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(448, 'Gemeindeverwaltung', 'Massenbachhausen', 'Gemeindeverwaltung Massenbachhausen', 'Heilbronner Str. 54', '74252', 'Massenbachhausen', '07138 9712-0', 'http://www.massenbachhausen.de', 'posteingang@massenbachhausen.de', '0000-00-00', '0000-00-00', 'k38uxzu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(449, 'Gemeindeverwaltung', 'Mauer', 'Gemeindeverwaltung Mauer', 'Heidelberger Str. 34', '69256', 'Mauer', '06226 9220-0', 'http://www.gemeinde-mauer.de', 'rathaus@gemeinde-mauer.de', '0000-00-00', '0000-00-00', 'CNDx8vq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(450, 'Gemeindeverwaltung', 'Maulburg', 'Gemeindeverwaltung Maulburg', 'Hermann-Burte-Str. 57', '79689', 'Maulburg', '07622 3991-0', 'http://www.maulburg.de', 'buergerbuero@maulburg.de', '0000-00-00', '0000-00-00', '7rD9vNE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(451, 'Gemeindeverwaltung', 'Meckenbeuren', 'Gemeindeverwaltung Meckenbeuren', 'Theodor-Heuss-Platz 1', '88074', 'Meckenbeuren', '07542 403-0', 'http://www.meckenbeuren.de', 'rathaus@meckenbeuren.de', '0000-00-00', '0000-00-00', 'Jfmp!ps', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(452, 'Gemeindeverwaltung', 'Meckesheim', 'Gemeindeverwaltung Meckesheim', 'Friedrichstr. 10', '74909', 'Meckesheim', '06226 9200-0', 'http://www.meckesheim.de', 'post@meckesheim.de', '0000-00-00', '0000-00-00', 'WNmx?XN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(453, 'Gemeindeverwaltung', 'Mehrstetten', 'Gemeindeverwaltung Mehrstetten', 'Marktplatz 1', '72537', 'Mehrstetten', '07381 9383-0', 'http://www.mehrstetten.de', 'info@mehrstetten.de', '0000-00-00', '0000-00-00', '9cG53U5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(454, 'Gemeindeverwaltung', 'Meißenheim', 'Gemeindeverwaltung Meißenheim', 'Rathausstr. 10', '77974', 'Meißenheim', '07824 6468-0', 'http://www.meissenheim.de', 'gemeinde@meissenheim.de', '0000-00-00', '0000-00-00', 'VfzvNve', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(455, 'Gemeindeverwaltung', 'Merdingen', 'Gemeindeverwaltung Merdingen', 'Kirchgasse 2', '79291', 'Merdingen', '07668 9094-0', 'http://www.merdingen.de', 'gemeinde@merdingen.de', '0000-00-00', '0000-00-00', 'bHprFvb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(456, 'Gemeindeverwaltung', 'Merklingen', 'Gemeindeverwaltung Merklingen', 'Hauptstr. 31', '89188', 'Merklingen', '07337 9620-0', 'http://www.merklingen.de', 'sven.kneipp@merklingen.de', '0000-00-00', '0000-00-00', 'd5Ks6qm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(457, 'Gemeindeverwaltung', 'Merzhausen', 'Gemeindeverwaltung Merzhausen', 'Friedhofweg 11', '79249', 'Merzhausen', '0761 4016168', 'http://www.merzhausen.de', 'gemeinde@merzhausen.de', '0000-00-00', '0000-00-00', '!tRHyBM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(458, 'Gemeindeverwaltung', 'Michelbach an der Bilz', 'Gemeindeverwaltung Michelbach an der Bilz', 'Hirschfelder Str. 13', '74544', 'Michelbach an der Bilz', '0791 93210-0', 'http://www.michelbach-bilz.de', 'info@michelbach-bilz.de', '0000-00-00', '0000-00-00', '?MbNPT8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(459, 'Gemeindeverwaltung', 'Michelfeld', 'Gemeindeverwaltung Michelfeld', 'Haller Str. 35', '74545', 'Michelfeld', '0791 97071-0', 'http://www.michelfeld.de', 'Wolfgang.Binnig@michelfeld.de', '0000-00-00', '0000-00-00', 'YFS6TqE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(460, 'Gemeindeverwaltung', 'Mietingen', 'Gemeindeverwaltung Mietingen', 'Hauptstr. 8', '88487', 'Mietingen', '07392 9720-0', 'http://www.mietingen.de', 'info@mietingen.de', '0000-00-00', '0000-00-00', '?!wDUrw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(461, 'Gemeindeverwaltung', 'Mittelbiberach', 'Gemeindeverwaltung Mittelbiberach', 'Biberacher Str. 59', '88441', 'Mittelbiberach', '07351 1818-0', 'http://www.mittelbiberach.de', 'info@mittelbiberach.de', '0000-00-00', '0000-00-00', 'gqZYxWB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(462, 'Gemeindeverwaltung', 'Mögglingen', 'Gemeindeverwaltung Mögglingen', 'Zehnthof 1', '73563', 'Mögglingen', '07174 89900-0', 'http://www.moegglingen.de', 'info@moegglingen.de', '0000-00-00', '0000-00-00', 'MEWxp2h', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(463, 'Gemeindeverwaltung', 'Möglingen', 'Gemeindeverwaltung Möglingen', 'Rathausplatz 3', '71696', 'Möglingen', '07141 4864-0', 'http://www.moeglingen.de', 'info@moeglingen.de', '0000-00-00', '0000-00-00', '!hpsBGx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(464, 'Gemeindeverwaltung', 'Mönchweiler', 'Gemeindeverwaltung Mönchweiler', 'Hindenburgstr. 42', '78087', 'Mönchweiler', '07721 9480-11', 'http://www.moenchweiler.de', 'info@moenchweiler.de', '0000-00-00', '0000-00-00', 'FD5w!E4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(465, 'Gemeindeverwaltung', 'Mönsheim', 'Gemeindeverwaltung Mönsheim', 'Schulstr. 2', '71297', 'Mönsheim', '07044 9253-0', 'http://www.moensheim.de', 'rathaus@moensheim.de', '0000-00-00', '0000-00-00', 'hPxCVDq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(466, 'Gemeindeverwaltung', 'Moos', 'Gemeindeverwaltung Moos', 'Bohlinger Str. 18', '78345', 'Moos', '07732 9996-0', 'http://www.moos.de', 'pkessler@moos.de', '0000-00-00', '0000-00-00', 'chwcM?k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(467, 'Gemeindeverwaltung', 'Moosburg', 'Gemeindeverwaltung Moosburg', 'Bad Buchauer Str. 57', '88422', 'Moosburg', '07374 2329', 'http://www.moosburg-am-federsee.de', 'gemeinde@moosburg-am-federsee.de', '0000-00-00', '0000-00-00', 'LwS2#qy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(468, 'Gemeindeverwaltung', 'Mötzingen', 'Gemeindeverwaltung Mötzingen', 'Schlossgartenstr.1', '71159', 'Mötzingen', '07452 8881-0', 'http://www.moetzingen.de', 'hagenlocher@moetzingen.de', '0000-00-00', '0000-00-00', 'UV84SVs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(469, 'Gemeindeverwaltung', 'Mudau', 'Gemeindeverwaltung Mudau', 'Schloßauer Str. 2', '69427', 'Mudau', '06284 78-0', 'http://www.mudau.de', 'norbert.rippberger@mudau.de', '0000-00-00', '0000-00-00', 'hP!g9DT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(470, 'Gemeindeverwaltung', 'Muggensturm', 'Gemeindeverwaltung Muggensturm', 'Hauptstr. 33-35', '76461', 'Muggensturm', '07222 9093-0', 'http://www.muggensturm.de', 'gemeinde@muggensturm.de', '0000-00-00', '0000-00-00', '2a3!kc3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(471, 'Gemeindeverwaltung', 'Mühlenbach', 'Gemeindeverwaltung Mühlenbach', 'Hauptstr. 24', '77796', 'Mühlenbach', '07832 9118-0', 'http://www.muehlenbach.de', 'gemeinde@muehlenbach.de', '0000-00-00', '0000-00-00', 'bA4xUDF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(472, 'Gemeindeverwaltung', 'Mühlhausen', 'Gemeindeverwaltung Mühlhausen', 'Schulstr. 6', '69242', 'Mühlhausen', '06222 6158-0', 'http://www.muehlhausen-kraichgau.de', 'gemeinde@muehlhausen-kraichgau.de', '0000-00-00', '0000-00-00', 'UmLe3Rg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(473, 'Gemeindeverwaltung', 'Mühlhausen im Täle', 'Gemeindeverwaltung Mühlhausen im Täle', 'Gosbacher Str. 16', '73347', 'Mühlhausen im Täle', '07335 9601-0', 'http://www.muehlhausen-taele.de', 'gemeinde@muehlhausen-taele.de', '0000-00-00', '0000-00-00', 'Ek#ukB5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(474, 'Gemeindeverwaltung', 'Mühlhausen-Ehingen', 'Gemeindeverwaltung Mühlhausen-Ehingen', 'Schloßstr. 46', '78259', 'Mühlhausen-Ehingen', '07733 5005-10', 'http://www.muehlhausen-ehingen.de', 'bm@muehlhausen-ehingen.de', '0000-00-00', '0000-00-00', 'J8LwP4S', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(475, 'Gemeindeverwaltung', 'Mühlingen', 'Gemeindeverwaltung Mühlingen', 'Im Göhren 2', '78357', 'Mühlingen', '07775 9303-0', 'http://www.muehlingen.de', 'rathaus@muehlingen.de', '0000-00-00', '0000-00-00', 'DmNwfKN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(476, 'Gemeindeverwaltung', 'Mulfingen', 'Gemeindeverwaltung Mulfingen', 'Kirchweg 1', '74673', 'Mulfingen', '07938 9040-0', 'http://www.mulfingen.de', 'info@mulfingen.de', '0000-00-00', '0000-00-00', 'LzC?TTT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(477, 'Gemeindeverwaltung', 'Mundelsheim', 'Gemeindeverwaltung Mundelsheim', 'Hindenburgstr. 1', '74395', 'Mundelsheim', '07143 8177-0', 'http://www.mundelsheim.de', 'gemeinde@mundelsheim.de', '0000-00-00', '0000-00-00', 'r8L8Bsu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(478, 'Gemeindeverwaltung', 'Münstertal/Schwarzwald', 'Gemeindeverwaltung Münstertal/Schwarzwald', 'Wasen 47', '79244', 'Münstertal/Schwarzwald', '07636 707-0', 'http://www.muenstertal.de', 'gemeinde@muenstertal.de', '0000-00-00', '0000-00-00', 'gXMK6Py', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(479, 'Gemeindeverwaltung', 'Murg', 'Gemeindeverwaltung Murg', 'Hauptstr. 52', '79730', 'Murg', '07763 930-0', 'http://www.murg.de', 'post@gemeinde-murg.de', '0000-00-00', '0000-00-00', '77Yg2n?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(480, 'Gemeindeverwaltung', 'Murr', 'Gemeindeverwaltung Murr', 'Hindenburgstr. 60', '71711', 'Murr', '07144 2699-0', 'http://www.gemeinde-murr.de', 'rathaus@murr.kdrs.de', '0000-00-00', '0000-00-00', 'RuVRsBz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(481, 'Gemeindeverwaltung', 'Mutlangen', 'Gemeindeverwaltung Mutlangen', 'Hauptstr. 22', '73557', 'Mutlangen', '07171 703-0', 'http://www.mutlangen.de', 'info@mutlangen.de', '0000-00-00', '0000-00-00', '#eh77Yh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(482, 'Gemeindeverwaltung', 'Nattheim', 'Gemeindeverwaltung Nattheim', 'Fleinheimer Str. 2', '89564', 'Nattheim', '07321 9784-0', 'http://www.nattheim.de', 'Norbert.Bereska@nattheim.de', '0000-00-00', '0000-00-00', 'PpxUkaU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(483, 'Gemeindeverwaltung', 'Neckargerach', 'Gemeindeverwaltung Neckargerach', 'Hauptstr. 25', '69437', 'Neckargerach', '06263 4201-0', 'http://www.neckargerach.de', 'gemeinde@neckargerach.de', '0000-00-00', '0000-00-00', '!2qFzqc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(484, 'Gemeindeverwaltung', 'Neckartailfingen', 'Gemeindeverwaltung Neckartailfingen', 'Nürtinger Str. 4', '72666', 'Neckartailfingen', '07127 1808-0', 'http://www.neckartailfingen.de', 'gemeinde@neckartailfingen.de', '0000-00-00', '0000-00-00', '85Vmynp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(485, 'Gemeindeverwaltung', 'Neckartenzlingen', 'Gemeindeverwaltung Neckartenzlingen', 'Planstr. 2', '72654', 'Neckartenzlingen', '07127 1801-0', 'http://www.neckartenzlingen.de', 'rathaus@neckartenzlingen.de', '0000-00-00', '0000-00-00', 'DA243J2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(486, 'Gemeindeverwaltung', 'Neckarwestheim', 'Gemeindeverwaltung Neckarwestheim', 'Marktplatz 1', '74382', 'Neckarwestheim', '07133 184-0', 'http://www.neckarwestheim.de', 'info@neckarwestheim.de', '0000-00-00', '0000-00-00', 'WNXUUZs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(487, 'Gemeindeverwaltung', 'Neckarzimmern', 'Gemeindeverwaltung Neckarzimmern', 'Hauptstr. 4', '74865', 'Neckarzimmern', '06261 9231-0', 'http://www.neckarzimmern.de', 'info@neckarzimmern.de', '0000-00-00', '0000-00-00', '3mTZDJC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(488, 'Gemeindeverwaltung', 'Neenstetten', 'Gemeindeverwaltung Neenstetten', 'Dorfplatz 1', '89189', 'Neenstetten', '07340 484', 'www.neenstetten.info', 'info@neenstetten.de', '0000-00-00', '0000-00-00', '?Nvn#rE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(489, 'Gemeindeverwaltung', 'Nehren', 'Gemeindeverwaltung Nehren', 'Hauptstr. 32', '72147', 'Nehren', '07473 3785-0', 'http://www.nehren.de', 'info@nehren.de', '0000-00-00', '0000-00-00', '#vkr24E', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(490, 'Gemeindeverwaltung', 'Neidenstein', 'Gemeindeverwaltung Neidenstein', 'Schloßstr. 9', '74933', 'Neidenstein', '07263 9135-0', 'http://www.neidenstein.de', 'post@neidenstein.de', '0000-00-00', '0000-00-00', '8JRRNcA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(491, 'Gemeindeverwaltung', 'Neidlingen', 'Gemeindeverwaltung Neidlingen', 'Kelterstr. 1', '73272', 'Neidlingen', '07023 90023-0', 'http://www.neidlingen.de/', 'gemeinde@neidlingen.de', '0000-00-00', '0000-00-00', 'K85yWZp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(492, 'Gemeindeverwaltung', 'Nellingen', 'Gemeindeverwaltung Nellingen', 'Schulplatz 17', '89191', 'Nellingen', '07337 9630-0', 'http://www.nellingen.de', 'info@nellingen.de', '0000-00-00', '0000-00-00', '6Ht-dUL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(493, 'Gemeindeverwaltung', 'Nerenstetten', 'Gemeindeverwaltung Nerenstetten', 'Schulstraße 8', '89129', 'Nerenstetten', '07345 919240', 'http://www.nerenstetten.de/', 'info@nerenstetten.de', '0000-00-00', '0000-00-00', 'wLZbzY#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(494, 'Gemeindeverwaltung', 'Neufra', 'Gemeindeverwaltung Neufra', 'Im Oberdorf 41', '72419', 'Neufra', '07574 9300-0', 'http://www.neufra.de', 'info@neufra.de', '0000-00-00', '0000-00-00', 'mdcTAWg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(495, 'Gemeindeverwaltung', 'Neuhausen', 'Gemeindeverwaltung Neuhausen', 'Pforzheimer Str. 20', '75242', 'Neuhausen', '07234 9510-0', 'http://www.neuhausen-enzkreis.de', 'mail@neuhausen-enzkreis.de', '0000-00-00', '0000-00-00', 'swMMXcJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(496, 'Gemeindeverwaltung', 'Neuhausen auf den Fildern', 'Gemeindeverwaltung Neuhausen auf den Fildern', 'Schloßplatz 1', '73765', 'Neuhausen auf den Fildern', '07158 1700-0', 'http://www.neuhausen-fildern.de', 'gemeinde@neuhausen-fildern.de', '0000-00-00', '0000-00-00', 'TXknKqL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(497, 'Gemeindeverwaltung', 'Neuhausen ob Eck', 'Gemeindeverwaltung Neuhausen ob Eck', 'Rathausplatz 1', '78579', 'Neuhausen ob Eck', '07467 9460-0', 'http://www.neuhausen-ob-eck.de', 'info@neuhausen-ob-eck.de', '0000-00-00', '0000-00-00', 'z3bf!Ay', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(498, 'Gemeindeverwaltung', 'Neukirch', 'Gemeindeverwaltung Neukirch', 'Schulstr. 3', '88099', 'Neukirch', '07528 92092-0', 'http://www.gemeinde-neukirch.de', 'Schnell@neukirch-gemeinde.de', '0000-00-00', '0000-00-00', 'UnyrJtw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(499, 'Gemeindeverwaltung', 'Neuler', 'Gemeindeverwaltung Neuler', 'Hauptstr. 15', '73491', 'Neuler', '07961 9044-0', 'http://www.neuler.de', 'gemeinde@neuler.de', '0000-00-00', '0000-00-00', '-dDh2dp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(500, 'Gemeindeverwaltung', 'Neulingen', 'Gemeindeverwaltung Neulingen', 'Schlossstraße 2', '75245', 'Neulingen', '07237 428-0', 'http://www.neulingen.de', 'info@neulingen.de', '0000-00-00', '0000-00-00', 'kdC2X#V', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(501, 'Gemeindeverwaltung', 'Neulußheim', 'Gemeindeverwaltung Neulußheim', 'St. Leoner-Str. 5', '68809', 'Neulußheim', '06205 3941-0', 'http://www.neulussheim.de', 'gemeinde@neulussheim.de', '0000-00-00', '0000-00-00', 'Mxcq?n2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(502, 'Gemeindeverwaltung', 'Neunkirchen', 'Gemeindeverwaltung Neunkirchen', 'Marktplatz 1', '74867', 'Neunkirchen', '06262 9212-0', 'http://www.neunkirchen-baden.de', 'post@neunkirchen-baden.de', '0000-00-00', '0000-00-00', 'mEC-Sfq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(503, 'Gemeindeverwaltung', 'Neuried', 'Gemeindeverwaltung Neuried', 'Kirchstr. 21', '77743', 'Neuried', '07807 97-0', 'http://www.neuried.net', 'info@neuried.net', '0000-00-00', '0000-00-00', 'kyRKR57', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(504, 'Gemeindeverwaltung', 'Neustetten', 'Gemeindeverwaltung Neustetten', 'Hohenzollernstr. 4', '72149', 'Neustetten', '07472 9365-0', 'http://www.neustetten.de', 'gemeinde@neustetten.de', '0000-00-00', '0000-00-00', 'TvgGqf6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(505, 'Gemeindeverwaltung', 'Neuweiler', 'Gemeindeverwaltung Neuweiler', 'Marktstr. 7', '75389', 'Neuweiler', '07055 9298-10', 'http://www.neuweiler.de', 'buchwald@neuweiler.de', '0000-00-00', '0000-00-00', 'Yg4ZLZG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(506, 'Gemeindeverwaltung', 'Niedereschach', 'Gemeindeverwaltung Niedereschach', 'Villinger Str. 10', '78078', 'Niedereschach', '07728 648-0', 'http://www.niedereschach.de', 'info@niedereschach.de', '0000-00-00', '0000-00-00', 'WU4LW3X', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(507, 'Gemeindeverwaltung', 'Niefern-Öschelbronn', 'Gemeindeverwaltung Niefern-Öschelbronn', 'Friedenstr. 11', '75223', 'Niefern-Öschelbronn', '07233 9622-0', 'http://www.niefern-oeschelbronn.de', 'info@niefern-oeschelbronn.de', '0000-00-00', '0000-00-00', 'KDP2Jwp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(508, 'Gemeindeverwaltung', 'Nordheim', 'Gemeindeverwaltung Nordheim', 'Hauptstr. 26', '74226', 'Nordheim', '07133 182-110', 'http://www.nordheim.de', 'volker.schiek@nordheim.de', '0000-00-00', '0000-00-00', 'v5nr?wr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(509, 'Gemeindeverwaltung', 'Nordrach', 'Gemeindeverwaltung Nordrach', 'Im Dorf 26', '77787', 'Nordrach', '07838 9299-0', 'http://www.nordrach.de', 'c.erhardt@nordrach.de', '0000-00-00', '0000-00-00', 'mPq8XNZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(510, 'Gemeindeverwaltung', 'Notzingen', 'Gemeindeverwaltung Notzingen', 'Bachstr. 50', '73274', 'Notzingen', '07021 97075-0', 'http://www.notzingen.de', 'gemeinde@notzingen.de', '0000-00-00', '0000-00-00', 'nTq26kJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(511, 'Gemeindeverwaltung', 'Nufringen', 'Gemeindeverwaltung Nufringen', 'Hauptstr. 28', '71154', 'Nufringen', '07032 9680-0', 'http://www.nufringen.de', 'gemeinde@nufringen.de', '0000-00-00', '0000-00-00', 'x6VJSMZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(512, 'Gemeindeverwaltung', 'Nusplingen', 'Gemeindeverwaltung Nusplingen', 'Marktplatz 8', '72362', 'Nusplingen', '07429 93109-0', 'http://www.nusplingen.de', 'info@nusplingen.de', '0000-00-00', '0000-00-00', 'LvbT?B#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(513, 'Gemeindeverwaltung', 'Nußloch', 'Gemeindeverwaltung Nußloch', 'Sinsheimer Str. 19', '69226', 'Nußloch', '06224 901-0', 'http://www.nussloch.de', 'info@nussloch.de', '0000-00-00', '0000-00-00', 'RvKymkX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(514, 'Gemeindeverwaltung', 'Oberboihingen', 'Gemeindeverwaltung Oberboihingen', 'Rathausgasse 3', '72644', 'Oberboihingen', '07022 6000-0', 'http://www.oberboihingen.de', 'gemeinde@oberboihingen.de', '0000-00-00', '0000-00-00', 'chHAuCL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(515, 'Gemeindeverwaltung', 'Oberderdingen', 'Gemeindeverwaltung Oberderdingen', 'Amthof 13', '75038', 'Oberderdingen', '07045 43-0', 'http://www.oberderdingen.de', 'thomas.nowitzki@oberderdingen.net', '0000-00-00', '0000-00-00', 'c5AVM5V', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(516, 'Gemeindeverwaltung', 'Oberdischingen', 'Gemeindeverwaltung Oberdischingen', 'Schloßplatz 9', '89610', 'Oberdischingen', '07305 93113-0', 'http://www.oberdischingen.de', 'info@oberdischingen.de', '0000-00-00', '0000-00-00', 't74xvz?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(517, 'Gemeindeverwaltung', 'Obergröningen', 'Gemeindeverwaltung Obergröningen', 'Rathausplatz 1', '73569', 'Obergröningen', '07975 281', 'http://www.eschach.de', 'rathaus@eschach.de', '0000-00-00', '0000-00-00', 'SPnJFz2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(518, 'Gemeindeverwaltung', 'Oberharmersbach', 'Gemeindeverwaltung Oberharmersbach', 'Dorf 30', '77784', 'Oberharmersbach', '07837 9297-0', 'http://www.oberharmersbach.de', 'gemeinde@oberharmersbach.de', '0000-00-00', '0000-00-00', 'sRg#Ma9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(519, 'Gemeindeverwaltung', 'Oberhausen-Rheinhausen', 'Gemeindeverwaltung Oberhausen-Rheinhausen', 'Adlerstr. 3', '68794', 'Oberhausen-Rheinhausen', '07254 503-0', 'http://www.oberhausen-rheinhausen.de', 'martin.buechner@oberhausen-rheinhausen.de', '0000-00-00', '0000-00-00', 'rfM9p8G', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(520, 'Gemeindeverwaltung', 'Obermarchtal', 'Gemeindeverwaltung Obermarchtal', 'Hauptstr. 21', '89611', 'Obermarchtal', '07375 205', 'http://www.obermarchtal.de', 'gemeinde@obermarchtal.de', '0000-00-00', '0000-00-00', '9B-J6yc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(521, 'Gemeindeverwaltung', 'Obernheim', 'Gemeindeverwaltung Obernheim', 'Hauptstr. 8', '72364', 'Obernheim', '07436 9284-0', 'http://www.obernheim.de', 'info@obernheim.de', '0000-00-00', '0000-00-00', 'hR9MN-q', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(522, 'Gemeindeverwaltung', 'Oberreichenbach', 'Gemeindeverwaltung Oberreichenbach', 'Schulstr. 3', '75394', 'Oberreichenbach', '07051 9699-10', 'http://www.oberreichenbach.de', 'info@oberreichenbach.de', '0000-00-00', '0000-00-00', 'KL#yUTs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(523, 'Gemeindeverwaltung', 'Oberried', 'Gemeindeverwaltung Oberried', 'Klosterplatz 4', '79254', 'Oberried', '07661 9305-0', 'http://www.oberried.de', 'buergermeister@oberried.de', '0000-00-00', '0000-00-00', 'NhKLLPk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(524, 'Gemeindeverwaltung', 'Oberrot', 'Gemeindeverwaltung Oberrot', 'Rottalstr. 44', '74420', 'Oberrot', '07977 74-0', 'http://www.oberrot.de', 'info@oberrot.de', '0000-00-00', '0000-00-00', '9FPDVB3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(525, 'Gemeindeverwaltung', 'Obersontheim', 'Gemeindeverwaltung Obersontheim', 'Rathausplatz 1', '74423', 'Obersontheim', '07973 696-0', 'http://www.obersontheim.de', 'info@obersontheim.de', '0000-00-00', '0000-00-00', 'fJW?nbE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(526, 'Gemeindeverwaltung', 'Oberstadion', 'Gemeindeverwaltung Oberstadion', 'Kirchplatz 29', '89613', 'Oberstadion', '07357 9214-0', 'http://www.oberstadion.de', 'kevin.wiest@oberstadion.de', '0000-00-00', '0000-00-00', 'S6Gu7Ud', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(527, 'Gemeindeverwaltung', 'Oberstenfeld', 'Gemeindeverwaltung Oberstenfeld', 'Großbottwarer Str. 20', '71720', 'Oberstenfeld', '07062 261-0', 'http://www.oberstenfeld.de', 'kleemann@oberstenfeld.de', '0000-00-00', '0000-00-00', 'c7sRSmL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(528, 'Gemeindeverwaltung', 'Obersulm', 'Gemeindeverwaltung Obersulm', 'Bernhardstr. 1', '74182', 'Obersulm', '07130 28-100', 'http://www.obersulm.de', 'tilman.schmidt@obersulm.de', '0000-00-00', '0000-00-00', 'GM#Dm8e', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(529, 'Gemeindeverwaltung', 'Oberteuringen', 'Gemeindeverwaltung Oberteuringen', 'St.-Martin-Platz 9', '88094', 'Oberteuringen', '07546 299-0', 'http://www.oberteuringen.de', 'ralf.messmer@oberteuringen.de', '0000-00-00', '0000-00-00', 'Wa9S7C?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(530, 'Gemeindeverwaltung', 'Oberwolfach', 'Gemeindeverwaltung Oberwolfach', 'Rathausstr. 1', '77709', 'Oberwolfach', '07834 8383-0', 'http://www.oberwolfach.de', 'buergermeister@oberwolfach.de', '0000-00-00', '0000-00-00', 'SV!6Kzq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(531, 'Gemeindeverwaltung', 'Obrigheim', 'Gemeindeverwaltung Obrigheim', 'Hauptstr. 7', '74847', 'Obrigheim', '06261 646-0', 'http://www.obrigheim.de', 'info@obrigheim.de', '0000-00-00', '0000-00-00', 'MgBv5fK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(532, 'Gemeindeverwaltung', 'Oedheim', 'Gemeindeverwaltung Oedheim', 'Ratsstr. 1', '74229', 'Oedheim', '07136 278-0', 'http://www.oedheim.de', 'info@oedheim.de', '0000-00-00', '0000-00-00', '##MVnFB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(533, 'Gemeindeverwaltung', 'Offenau', 'Gemeindeverwaltung Offenau', 'Jagstfelder Str. 1', '74254', 'Offenau', '07136 9540-0', 'http://www.offenau.de', 'post@offenau.de', '0000-00-00', '0000-00-00', 'ZLUwD3N', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(534, 'Gemeindeverwaltung', 'Ofterdingen', 'Gemeindeverwaltung Ofterdingen', 'Rathausgasse 2', '72131', 'Ofterdingen', '07473 3780-0', 'http://www.ofterdingen.de', 'rathaus@ofterdingen.de', '0000-00-00', '0000-00-00', '6fVzE#?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(535, 'Gemeindeverwaltung', 'Oftersheim', 'Gemeindeverwaltung Oftersheim', 'Mannheimer Str. 49', '68723', 'Oftersheim', '06202 597-0', 'http://www.oftersheim.de', 'buergermeister@oftersheim.de', '0000-00-00', '0000-00-00', 'SU7rbW6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(536, 'Gemeindeverwaltung', 'Oggelshausen', 'Gemeindeverwaltung Oggelshausen', 'Schulstr. 5', '88422', 'Oggelshausen', '07582 91227', 'http://www.oggelshausen.de', 'rkriz@oggelshausen.de', '0000-00-00', '0000-00-00', 'Hsqr5kh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(537, 'Gemeindeverwaltung', 'Ohlsbach', 'Gemeindeverwaltung Ohlsbach', 'Hauptstr. 33', '77797', 'Ohlsbach', '07803 9699-0', 'http://www.ohlsbach.de', 'gemeinde@ohlsbach.de', '0000-00-00', '0000-00-00', 'GsBRgKc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(538, 'Gemeindeverwaltung', 'Ohmden', 'Gemeindeverwaltung Ohmden', 'Hauptstr. 18', '73275', 'Ohmden', '07023 9510-0', 'http://www.ohmden.de', 'gemeinde@ohmden.de', '0000-00-00', '0000-00-00', 'anxt2bq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(539, 'Gemeindeverwaltung', 'Öhningen', 'Gemeindeverwaltung Öhningen', 'Klosterplatz 1', '78337', 'Öhningen', '07735 819-0', 'http://www.oehningen.de', 'gemeindeverwaltung@oehningen.de', '0000-00-00', '0000-00-00', 'vU2V4W3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(540, 'Gemeindeverwaltung', 'Ölbronn-Dürrn', 'Gemeindeverwaltung Ölbronn-Dürrn', 'Hauptstr. 53', '75248', 'Ölbronn-Dürrn', '07237 422-0', 'http://www.oelbronn-duerrn.de', 'norbert.holme@oelbronn-duerrn.de', '0000-00-00', '0000-00-00', 'yZ8CVp4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(541, 'Gemeindeverwaltung', 'Öllingen', 'Gemeindeverwaltung Öllingen', 'Hauptstr. 42', '89129', 'Öllingen', '07345 7502', 'http://www.oellingen-albdonau.de', 'info@oellingen-albdonau.de', '0000-00-00', '0000-00-00', 'z2Udtvz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(542, 'Gemeindeverwaltung', 'Öpfingen', 'Gemeindeverwaltung Öpfingen', 'Schloßhofstr. 10', '89614', 'Öpfingen', '07391 7084-0', 'http://www.oepfingen.de', 'info@oepfingen.de', '0000-00-00', '0000-00-00', 'TTxyrsa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(543, 'Gemeindeverwaltung', 'Oppenweiler', 'Gemeindeverwaltung Oppenweiler', 'Schloßstr. 12', '71570', 'Oppenweiler', '07191 484-0', 'http://www.oppenweiler.de', 'gemeinde@oppenweiler.de', '0000-00-00', '0000-00-00', 'hPm74wH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(544, 'Gemeindeverwaltung', 'Orsingen-Nenzingen', 'Gemeindeverwaltung Orsingen-Nenzingen', 'Stockacher Str. 2', '78359', 'Orsingen-Nenzingen', '07771 9341-0', 'http://www.orsingen-nenzingen.de', 'gemeinde@orsingen-nenzingen.de', '0000-00-00', '0000-00-00', '8uxnN3!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(545, 'Gemeindeverwaltung', 'Ortenberg', 'Gemeindeverwaltung Ortenberg', 'Dorfplatz 1', '77799', 'Ortenberg', '0781 9335-0', 'http://www.ortenberg.de/', 'gemeindeverwaltung@ortenberg.de', '0000-00-00', '0000-00-00', '!Y63-V5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(546, 'Gemeindeverwaltung', 'Ostelsheim', 'Gemeindeverwaltung Ostelsheim', 'Hauptstr. 8', '75395', 'Ostelsheim', '07033 4008-0', 'http://www.ostelsheim.de', 'gemeinde@ostelsheim.de', '0000-00-00', '0000-00-00', 'YEb8JAm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(547, 'Gemeindeverwaltung', 'Ostrach', 'Gemeindeverwaltung Ostrach', 'Hauptstr. 19', '88356', 'Ostrach', '07585 300-0', 'www.ostrach.de', 'info@ostrach.de', '0000-00-00', '0000-00-00', 'EwH?wtG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(548, 'Gemeindeverwaltung', 'Ötigheim', 'Gemeindeverwaltung Ötigheim', 'Schulstr. 3', '76470', 'Ötigheim', '07222 9197-0', 'http://www.oetigheim.de', 'gemeindeverwaltung@oetigheim.de', '0000-00-00', '0000-00-00', 'kDfCHy9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(549, 'Gemeindeverwaltung', 'Ötisheim', 'Gemeindeverwaltung Ötisheim', 'Schönenberger Str. 2', '75443', 'Ötisheim', '07041 9501-0', 'http://www.oetisheim.de', 'gemeinde@oetisheim.de', '0000-00-00', '0000-00-00', 'REL8rT-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(550, 'Gemeindeverwaltung', 'Ottenbach', 'Gemeindeverwaltung Ottenbach', 'Hauptstr. 4', '73113', 'Ottenbach', '07165 91291-0', 'http://www.ottenbach.de', 'Franz@ottenbach.de', '0000-00-00', '0000-00-00', 'ary45KY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(551, 'Gemeindeverwaltung', 'Ottenhöfen im Schwarzwald', 'Gemeindeverwaltung Ottenhöfen im Schwarzwald', 'Forstweg 1', '77883', 'Ottenhöfen im Schwarzwald', '07842 804-0', 'http://www.ottenhoefen.de', 'hans-juergen.decker@ottenhoefen.de', '0000-00-00', '0000-00-00', 'nLUrfxM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(552, 'Gemeindeverwaltung', 'Ottersweier', 'Gemeindeverwaltung Ottersweier', 'Laufer Str. 18', '77833', 'Ottersweier', '07223 9860-0', 'http://www.ottersweier.de', 'juergen.pfetzer@ottersweier.de', '0000-00-00', '0000-00-00', 'skfKhxb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(553, 'Gemeindeverwaltung', 'Owingen', 'Gemeindeverwaltung Owingen', 'Hauptstr. 35', '88696', 'Owingen', '07551 8094-0', 'http://www.owingen.de', 'info@owingen.de', '0000-00-00', '0000-00-00', 'PxtykPm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(554, 'Gemeindeverwaltung', 'Pfaffenhofen', 'Gemeindeverwaltung Pfaffenhofen', 'Rodbachstr. 15', '74397', 'Pfaffenhofen', '07046 9620-0', 'http://www.pfaffenhofen-wuertt.de', 'bma@pfaffenhofen-wuertt.de', '0000-00-00', '0000-00-00', 'SeU5LZR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(555, 'Gemeindeverwaltung', 'Pfaffenweiler', 'Gemeindeverwaltung Pfaffenweiler', 'Rathausgasse 4', '79292', 'Pfaffenweiler', '07664 9700-0', 'http://www.pfaffenweiler.de', 'rathaus@pfaffenweiler.de', '0000-00-00', '0000-00-00', 't9?4FJZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(556, 'Gemeindeverwaltung', 'Pfalzgrafenweiler', 'Gemeindeverwaltung Pfalzgrafenweiler', 'Hauptstr. 1', '72285', 'Pfalzgrafenweiler', '07445 8518-0', 'http://www.pfalzgrafenweiler.de', 'Bischoff@pfalzgrafenweiler.de', '0000-00-00', '0000-00-00', 'RCBk6!A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(557, 'Gemeindeverwaltung', 'Pfedelbach', 'Gemeindeverwaltung Pfedelbach', 'Hauptstr. 17', '74629', 'Pfedelbach', '07941 6081-0', 'http://www.pfedelbach.de', 'Torsten.Kunkel@pfedelbach.de', '0000-00-00', '0000-00-00', '2ayK9KY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(558, 'Gemeindeverwaltung', 'Pfinztal', 'Gemeindeverwaltung Pfinztal', 'Hauptstr. 70', '76327', 'Pfinztal', '07240 62-0', 'http://www.pfinztal.de', 'info@pfinztal.de', '0000-00-00', '0000-00-00', 'cUsX#!k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(559, 'Gemeindeverwaltung', 'Pfronstetten', 'Gemeindeverwaltung Pfronstetten', 'Hauptstr. 25', '72539', 'Pfronstetten', '07388 9999-0', 'http://www.pfronstetten.de', 'info@pfronstetten.de', '0000-00-00', '0000-00-00', 'gEsXeSr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(560, 'Gemeindeverwaltung', 'Plankstadt', 'Gemeindeverwaltung Plankstadt', 'Schwetzinger Str. 28', '68723', 'Plankstadt', '06202 2006-0', 'http://www.plankstadt.de', 'info@plankstadt.de', '0000-00-00', '0000-00-00', 'WVMgfyV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(561, 'Gemeindeverwaltung', 'Pleidelsheim', 'Gemeindeverwaltung Pleidelsheim', 'Marbacher Str. 5', '74385', 'Pleidelsheim', '07144 264-0', 'http://www.pleidelsheim.de', 'rathaus@pleidelsheim.de', '0000-00-00', '0000-00-00', '25ncY83', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(562, 'Gemeindeverwaltung', 'Pliezhausen', 'Gemeindeverwaltung Pliezhausen', 'Marktplatz 1', '72124', 'Pliezhausen', '07127 977-0', 'http://www.pliezhausen.de', 'info@pliezhausen.de', '0000-00-00', '0000-00-00', 'PfXxF-9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(563, 'Gemeindeverwaltung', 'Plüderhausen', 'Gemeindeverwaltung Plüderhausen', 'Am Marktplatz 11', '73655', 'Plüderhausen', '07181 8009-0', 'http://www.pluederhausen.de', 'bm.schaffer@pluederhausen.de', '0000-00-00', '0000-00-00', '6Bup8-4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(564, 'Gemeindeverwaltung', 'Rainau', 'Gemeindeverwaltung Rainau', 'Schloßberg 12', '73492', 'Rainau', '07961 9002-0', 'http://www.rainau.de', 'info@rainau.de', '0000-00-00', '0000-00-00', 'kkGXgZ-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(565, 'Gemeindeverwaltung', 'Rammingen', 'Gemeindeverwaltung Rammingen', 'Rathausgasse 7', '89192', 'Rammingen', '07345 9125-0', 'http://www.rammingen-bw.de/', 'Karl.Haecker@rammingen-bw.de', '0000-00-00', '0000-00-00', 'NtgC3wM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(566, 'Gemeindeverwaltung', 'Rangendingen', 'Gemeindeverwaltung Rangendingen', 'Schulstr. 8', '72414', 'Rangendingen', '07471 9979-12', 'http://www.rangendingen.de', 'widmaier@rangendingen.de', '0000-00-00', '0000-00-00', 'NPBsmr?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(567, 'Gemeindeverwaltung', 'Ratshausen', 'Gemeindeverwaltung Ratshausen', 'Schloßhof 4', '72365', 'Ratshausen', '07427 91188', 'http://www.ratshausen.de', 'kontakt@ratshausen.de', '0000-00-00', '0000-00-00', 'S6rZfTC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(568, 'Gemeindeverwaltung', 'Rechberghausen', 'Gemeindeverwaltung Rechberghausen', 'Amtsgasse 4', '73098', 'Rechberghausen', '07161 501-0', 'http://www.rechberghausen.de', 'info@gemeinde.rechberghausen.de', '0000-00-00', '0000-00-00', '6RDZ7Yq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(569, 'Gemeindeverwaltung', 'Rechtenstein', 'Gemeindeverwaltung Rechtenstein', 'Braunselweg 2', '89611', 'Rechtenstein', '07375 244', 'http://www.rechtenstein.de', 'gemeinde@rechtenstein.de', '0000-00-00', '0000-00-00', 'Zz69dVR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(570, 'Gemeindeverwaltung', 'Reichartshausen', 'Gemeindeverwaltung Reichartshausen', 'Rathausstr. 3', '74934', 'Reichartshausen', '06262 9240-0', 'http://www.reichartshausen.de', 'Otto.Eckert@reichartshausen.de', '0000-00-00', '0000-00-00', 'fZBPWbc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(571, 'Gemeindeverwaltung', 'Reichenau', 'Gemeindeverwaltung Reichenau', 'Münsterplatz 2', '78479', 'Reichenau', '07534 801-0', 'http://www.reichenau.de', 'rathaus@reichenau.de', '0000-00-00', '0000-00-00', 'KCznwm!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(572, 'Gemeindeverwaltung', 'Reichenbach am Heuberg', 'Gemeindeverwaltung Reichenbach am Heuberg', 'Kirchstr. 8', '78564', 'Reichenbach am Heuberg', '07429 91177', 'http://www.reichenbach-heuberg.de', 'info@reichenbach-heuberg.de', '0000-00-00', '0000-00-00', 'KRLWGvC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(573, 'Gemeindeverwaltung', 'Reichenbach an der Fils', 'Gemeindeverwaltung Reichenbach an der Fils', 'Hauptstr. 7', '73262', 'Reichenbach an der Fils', '07153 5005-0', 'http://www.reichenbach-fils.de', 'post@reichenbach-fils.de', '0000-00-00', '0000-00-00', 'n6TRMYC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(574, 'Gemeindeverwaltung', 'Reilingen', 'Gemeindeverwaltung Reilingen', 'Hockenheimer Str. 1-3', '68799', 'Reilingen', '06205 952-0', 'http://www.reilingen.de', 'post@reilingen.de', '0000-00-00', '0000-00-00', 'h9NAxeH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(575, 'Gemeindeverwaltung', 'Remchingen', 'Gemeindeverwaltung Remchingen', 'Hauptstr. 5', '75196', 'Remchingen', '07232 7979-0', 'http://www.remchingen.de', 'info@remchingen.de', '0000-00-00', '0000-00-00', 'StekEms', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(576, 'Gemeindeverwaltung', 'Remshalden', 'Gemeindeverwaltung Remshalden', 'Marktplatz 1', '73630', 'Remshalden', '07151 9731-117', 'http://www.remshalden.de', 'gemeinde@remshalden.de', '0000-00-00', '0000-00-00', '5rxTBNS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(577, 'Gemeindeverwaltung', 'Renquishausen', 'Gemeindeverwaltung Renquishausen', 'Kolbinger Str. 1', '78603', 'Renquishausen', '07429 2376', 'http://www.renquishausen.de', 'info@renquishausen.de', '0000-00-00', '0000-00-00', 'sz#RvKV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(578, 'Gemeindeverwaltung', 'Reute', 'Gemeindeverwaltung Reute', 'Hinter den Eichen 2', '79276', 'Reute', '07641 9172-0', 'http://www.reute.de', 'gemeinde@reute.de', '0000-00-00', '0000-00-00', 'rB4ZBhM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(579, 'Gemeindeverwaltung', 'Rheinhausen', 'Gemeindeverwaltung Rheinhausen', 'Hauptstr. 95', '79365', 'Rheinhausen', '07643 9107-0', 'http://www.rheinhausen.de', 'gemeinde@rheinhausen.de', '0000-00-00', '0000-00-00', 'XJsZsc!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(580, 'Gemeindeverwaltung', 'Rheinmünster', 'Gemeindeverwaltung Rheinmünster', 'Lindenbrunnenstr. 1', '77836', 'Rheinmünster', '07227 9555-0', 'http://www.rheinmuenster.de', 'gemeinde@rheinmuenster.de', '0000-00-00', '0000-00-00', 'yKBh3T?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(581, 'Gemeindeverwaltung', 'Rickenbach', 'Gemeindeverwaltung Rickenbach', 'Hauptstr. 7', '79736', 'Rickenbach', '07765 9200-0', 'http://www.rickenbach.de', 'gemeinde@rickenbach.de', '0000-00-00', '0000-00-00', 'p#-4RK3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(582, 'Gemeindeverwaltung', 'Riederich', 'Gemeindeverwaltung Riederich', 'Mittelstädter Str. 17', '72585', 'Riederich', '07123 9359-0', 'http://www.riederich.de', 'tobiaspokrop@riederich.de', '0000-00-00', '0000-00-00', 'HgwXddX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(583, 'Gemeindeverwaltung', 'Riedhausen', 'Gemeindeverwaltung Riedhausen', 'Kirchstraße 1', '88377', 'Riedhausen', '07587 610', 'http://www.riedhausen.de', 'riedhausen@aol.com', '0000-00-00', '0000-00-00', 'SRbwGUU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(584, 'Gemeindeverwaltung', 'Riegel am Kaiserstuhl', 'Gemeindeverwaltung Riegel am Kaiserstuhl', 'Hauptstr. 31', '79359', 'Riegel am Kaiserstuhl', '07642 9044-0', 'http://www.gemeinde-riegel.de', 'bm@gemeinde-riegel.de', '0000-00-00', '0000-00-00', 'mT6Lc!M', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(585, 'Gemeindeverwaltung', 'Rielasingen-Worblingen', 'Gemeindeverwaltung Rielasingen-Worblingen', 'Lessingstr. 2', '78239', 'Rielasingen-Worblingen', '07731 9321-0', 'http://www.rielasingen-worblingen.de', 'info@rielasingen-worblingen.de', '0000-00-00', '0000-00-00', '-dJWnDT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(586, 'Gemeindeverwaltung', 'Riesbürg', 'Gemeindeverwaltung Riesbürg', 'Hauptstr. 13', '73469', 'Riesbürg', '09081 2935-0', 'http://www.riesbuerg.de', 'neumeister@riesbuerg.de', '0000-00-00', '0000-00-00', '6Jwb??L', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(587, 'Gemeindeverwaltung', 'Rietheim-Weilheim', 'Gemeindeverwaltung Rietheim-Weilheim', 'Rathausplatz 3', '78604', 'Rietheim-Weilheim', '07424 95848-0', 'http://www.rietheim-weilheim.de', 'info@rietheim-weilheim.de', '0000-00-00', '0000-00-00', 'L?EP!fV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(588, 'Gemeindeverwaltung', 'Ringsheim', 'Gemeindeverwaltung Ringsheim', 'Rathausplatz 1', '77975', 'Ringsheim', '07822 8939-0', 'http://www.ringsheim.de', 'weber@ringsheim.de', '0000-00-00', '0000-00-00', 'aKXvzwe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(589, 'Gemeindeverwaltung', 'Rohrdorf', 'Gemeindeverwaltung Rohrdorf', 'Komtureihof 4', '72229', 'Rohrdorf', '07452 5008', 'http://www.gemeinde-rohrdorf.de', 'info@gemeinde-rohrdorf.de', '0000-00-00', '0000-00-00', 'N2b8rPw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(590, 'Gemeindeverwaltung', 'Roigheim', 'Gemeindeverwaltung Roigheim', 'Hauptstr. 20', '74255', 'Roigheim', '06298 9205-0', 'http://www.roigheim.de', 'info@roigheim.de', '0000-00-00', '0000-00-00', 'trBTGDm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(591, 'Gemeindeverwaltung', 'Römerstein', 'Gemeindeverwaltung Römerstein', 'Albstr. 2', '72587', 'Römerstein', '07382 9398-11', 'http://www.roemerstein.de', 'Donth@roemerstein.de', '0000-00-00', '0000-00-00', 'HFDDmwx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(592, 'Gemeindeverwaltung', 'Rosenberg', 'Gemeindeverwaltung Rosenberg', 'Hallerstr. 15', '73494', 'Rosenberg', '07967 9000-0', 'http://www.gemeinde-rosenberg.de', 'info@gemeinde-rosenberg.de', '0000-00-00', '0000-00-00', 'Uy#BtdT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(593, 'Gemeindeverwaltung', 'Rosenberg', 'Gemeindeverwaltung Rosenberg', 'Hauptstr. 26', '74749', 'Rosenberg', '06295 9201-0', 'http://www.rosenberg-baden.de/', 'gemeinde@rosenberg-baden.de', '0000-00-00', '0000-00-00', 'vX#nqRG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(594, 'Gemeindeverwaltung', 'Rosengarten', 'Gemeindeverwaltung Rosengarten', 'Hauptstr. 39', '74538', 'Rosengarten', '0791 95017-0', 'http://www.rosengarten.de', 'gemeinde-j.koenig@rosengarten.de', '0000-00-00', '0000-00-00', 'F4PCZan', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(595, 'Gemeindeverwaltung', 'Rot am See', 'Gemeindeverwaltung Rot am See', 'Raiffeisenstr. 1', '74585', 'Rot am See', '07955 381-0', 'http://www.rotamsee.de', 'siegfried.groener@rotamsee.de', '0000-00-00', '0000-00-00', 'h?UEfP5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(596, 'Gemeindeverwaltung', 'Rot an der Rot', 'Gemeindeverwaltung Rot an der Rot', 'Klosterhof 14', '88430', 'Rot an der Rot', '08395 9405-0', 'http://www.rot.de', 'rathaus@rot.de', '0000-00-00', '0000-00-00', 'xV67geX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(597, 'Gemeindeverwaltung', 'Rottenacker', 'Gemeindeverwaltung Rottenacker', 'Bühlstr. 7', '89616', 'Rottenacker', '07393 9504-0', 'http://www.rottenacker.de', 'hauler@rottenacker.de', '0000-00-00', '0000-00-00', 'yUsauTc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(598, 'Gemeindeverwaltung', 'Rudersberg', 'Gemeindeverwaltung Rudersberg', 'Backnanger Str. 26', '73635', 'Rudersberg', '07183 3005-12', 'http://www.rudersberg.de', 'info@rudersberg.de', '0000-00-00', '0000-00-00', 'H?EV5MS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(599, 'Gemeindeverwaltung', 'Rümmingen', 'Gemeindeverwaltung Rümmingen', 'Lörracher Str. 9', '79595', 'Rümmingen', '07621 3219', 'http://www.ruemmingen.de', 'gemeinde@ruemmingen.de', '0000-00-00', '0000-00-00', 'bTMyAwx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(600, 'Gemeindeverwaltung', 'Ruppertshofen', 'Gemeindeverwaltung Ruppertshofen', 'Erlenstr. 1', '73577', 'Ruppertshofen', '07176 6573', 'http://www.ruppertshofen.de', 'info@ruppertshofen.de', '0000-00-00', '0000-00-00', 'nT-nVeC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(601, 'Gemeindeverwaltung', 'Rust', 'Gemeindeverwaltung Rust', 'Fischerstr. 51', '77977', 'Rust', '07822 8645-0', 'http://www.rust.de', 'info@rust.de', '0000-00-00', '0000-00-00', 'JhH2eMt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(602, 'Gemeindeverwaltung', 'Salach', 'Gemeindeverwaltung Salach', 'Rathausplatz 1', '73084', 'Salach', '07162 4008-0', 'http://www.salach.de', 'info@salach.de', '0000-00-00', '0000-00-00', 'Rzcts5f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(603, 'Gemeindeverwaltung', 'Salem', 'Gemeindeverwaltung Salem', 'Leutkircher Str. 1', '88682', 'Salem', '07553 823-14', 'http://www.salem-baden.de', 'MHaerle@salem-baden.de', '0000-00-00', '0000-00-00', 'f7MB-nc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(604, 'Gemeindeverwaltung', 'Sandhausen', 'Gemeindeverwaltung Sandhausen', 'Bahnhofstr. 10', '69207', 'Sandhausen', '06224 592-0', 'http://www.sandhausen.de', 'info@sandhausen.de', '0000-00-00', '0000-00-00', 'nPYU!Cu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(605, 'Gemeindeverwaltung', 'Sasbach', 'Gemeindeverwaltung Sasbach', 'Kirchplatz 4', '77880', 'Sasbach', '07841 686-10', 'http://www.sasbach-ortenau.de', 'rathaus@sasbach-ortenau.de', '0000-00-00', '0000-00-00', '3#ERBLy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(606, 'Gemeindeverwaltung', 'Sasbach am Kaiserstuhl', 'Gemeindeverwaltung Sasbach am Kaiserstuhl', 'Hauptstr. 15', '79361', 'Sasbach am Kaiserstuhl', '07642 9101-0', 'http://www.sasbach-am-kaiserstuhl.de', 'bm-scheiding@sasbach.eu', '0000-00-00', '0000-00-00', '4FUhA3m', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(607, 'Gemeindeverwaltung', 'Sasbachwalden', 'Gemeindeverwaltung Sasbachwalden', 'Kirchweg 6', '77887', 'Sasbachwalden', '07841 64079-0', 'http://www.sasbachwalden.de', 'schuchter@sasbachwalden.de', '0000-00-00', '0000-00-00', 'yg#Dxs5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(608, 'Gemeindeverwaltung', 'Satteldorf', 'Gemeindeverwaltung Satteldorf', 'Satteldorfer Hauptstr. 50', '74589', 'Satteldorf', '07951 4700-0', 'http://www.satteldorf.de', 'gemeinde@satteldorf.de', '0000-00-00', '0000-00-00', 'avB6yJv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(609, 'Gemeindeverwaltung', 'Sauldorf', 'Gemeindeverwaltung Sauldorf', 'Hauptstr. 32', '88605', 'Sauldorf', '07578 925-0', 'http://www.sauldorf.de', 'bgm@sauldorf.de', '0000-00-00', '0000-00-00', 'AVmCmVg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(610, 'Gemeindeverwaltung', 'Schallbach', 'Gemeindeverwaltung Schallbach', 'Dorfstr. 6', '79597', 'Schallbach', '07621 84605', 'http://www.schallbach.de', 'info@schallbach.de', '0000-00-00', '0000-00-00', 'a#gk!Ac', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(611, 'Gemeindeverwaltung', 'Schallstadt', 'Gemeindeverwaltung Schallstadt', 'Kirchstr. 16', '79227', 'Schallstadt', '07664 6109-0', 'http://www.schallstadt.de', 'rathaus@schallstadt.de', '0000-00-00', '0000-00-00', 'sgNFVPw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(612, 'Gemeindeverwaltung', 'Schechingen', 'Gemeindeverwaltung Schechingen', 'Marktplatz 1', '73579', 'Schechingen', '07175 1567', 'http://www.schechingen.de/', 'info@schechingen.de', '0000-00-00', '0000-00-00', 'sBxBwcF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(613, 'Gemeindeverwaltung', 'Schefflenz', 'Gemeindeverwaltung Schefflenz', 'Mittelstr. 47', '74850', 'Schefflenz', '06293 9200-0', 'http://www.schefflenz.de', 'info@schefflenz.de', '0000-00-00', '0000-00-00', '3nK336M', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(614, 'Gemeindeverwaltung', 'Schemmerhofen', 'Gemeindeverwaltung Schemmerhofen', 'Hauptstr. 25', '88433', 'Schemmerhofen', '07356 9356-0', 'http://www.schemmerhofen.de', 'mario.glaser@schemmerhofen.de', '0000-00-00', '0000-00-00', 'NWDvpKk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(615, 'Gemeindeverwaltung', 'Schenkenzell', 'Gemeindeverwaltung Schenkenzell', 'Reinerzaustr. 12', '77773', 'Schenkenzell', '07836 9397-0', 'http://www.schenkenzell.de', 'info@schenkenzell.de', '0000-00-00', '0000-00-00', 'vmf5ZGP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(616, 'Gemeindeverwaltung', 'Schlaitdorf', 'Gemeindeverwaltung Schlaitdorf', 'Hauptstr. 32', '72667', 'Schlaitdorf', '07127 9282-0', 'http://www.schlaitdorf.de', 'rathaus@schlaitdorf.kdrs.de', '0000-00-00', '0000-00-00', 'ry2c?Wc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(617, 'Gemeindeverwaltung', 'Schlat', 'Gemeindeverwaltung Schlat', 'Hauptstr. 2', '73114', 'Schlat', '07161 987397-0', 'http://www.schlat.de', 'info@schlat.de', '0000-00-00', '0000-00-00', 'c2KszAc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(618, 'Gemeindeverwaltung', 'Schliengen', 'Gemeindeverwaltung Schliengen', 'Wasserschloß Entenstein', '79418', 'Schliengen', '07635 3109-0', 'http://www.schliengen.de', 'gemeinde@schliengen.de', '0000-00-00', '0000-00-00', 'aSTaqdB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(619, 'Gemeindeverwaltung', 'Schlier', 'Gemeindeverwaltung Schlier', 'Rathausstr. 10', '88281', 'Schlier', '07529 977-0', 'http://www.schlier.de', 'gemeindeverwaltung@schlier.de', '0000-00-00', '0000-00-00', 'ucP9pG4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(620, 'Gemeindeverwaltung', 'Schlierbach', 'Gemeindeverwaltung Schlierbach', 'Hölzerstr. 1', '73278', 'Schlierbach', '07021 97006-0', 'http://www.schlierbach.de', 'gemeinde@schlierbach.de', '0000-00-00', '0000-00-00', '3ckTZKE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(621, 'Gemeindeverwaltung', 'Schluchsee', 'Gemeindeverwaltung Schluchsee', 'Fischbacher Str. 7', '79859', 'Schluchsee', '07656 77-0', 'http://www.schluchsee.de', 'info@schluchsee.de', '0000-00-00', '0000-00-00', 'Yz3A8z#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(622, 'Gemeindeverwaltung', 'Schnürpflingen', 'Gemeindeverwaltung Schnürpflingen', 'Hauptstr. 17', '89194', 'Schnürpflingen', '07346 3664', 'http://www.schnuerpflingen.de', 'info@schnuerpflingen.de', '0000-00-00', '0000-00-00', '!sVK6s!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(623, 'Gemeindeverwaltung', 'Schömberg', 'Gemeindeverwaltung Schömberg', 'Lindenstr. 7', '75328', 'Schömberg', '07084 14-0', 'http://www.schoemberg.de', 'gemeinde@schoemberg.de', '0000-00-00', '0000-00-00', '!VuG3AV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(624, 'Gemeindeverwaltung', 'Schonach im Schwarzwald', 'Gemeindeverwaltung Schonach im Schwarzwald', 'Hauptstr. 21', '78136', 'Schonach im Schwarzwald', '07722 96481-0', 'http://www.schonach.de', 'gemeinde@schonach.de', '0000-00-00', '0000-00-00', '4S#wpDB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(625, 'Gemeindeverwaltung', 'Schönaich', 'Gemeindeverwaltung Schönaich', 'Bühlstr. 10', '71101', 'Schönaich', '07031 639-0', 'http://www.schoenaich.de', 'daniel.schamburek@schoenaich.de', '0000-00-00', '0000-00-00', 'Lr2U7pV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(626, 'Gemeindeverwaltung', 'Schönbrunn', 'Gemeindeverwaltung Schönbrunn', 'Herdestr. 2', '69436', 'Schönbrunn', '06272 9300-0', 'http://www.gemeinde-schoenbrunn.de', 'info@gemeinde-schoenbrunn.de', '0000-00-00', '0000-00-00', 'Hbna9!7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(627, 'Gemeindeverwaltung', 'Schönenberg', 'Gemeindeverwaltung Schönenberg', 'Belchenstr. 1', '79677', 'Schönenberg', '07673 205', '', 'gemeinde@79677-schoenenberg.de', '0000-00-00', '0000-00-00', '6xSEbTJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(628, 'Gemeindeverwaltung', 'Schöntal', 'Gemeindeverwaltung Schöntal', 'Klosterhof 1', '74214', 'Schöntal', '07943 9100-0', 'http://www.schoental.de', 'info@schoental.de', '0000-00-00', '0000-00-00', '3wfpU6Y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(629, 'Gemeindeverwaltung', 'Schönwald im Schwarzwald', 'Gemeindeverwaltung Schönwald im Schwarzwald', 'Franz-Schubert-Str. 3', '78141', 'Schönwald im Schwarzwald', '07722 8608-0', 'http://www.schoenwald.net', 'mail@schoenwald.de', '0000-00-00', '0000-00-00', 'nra#bM!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(630, 'Gemeindeverwaltung', 'Schopfloch', 'Gemeindeverwaltung Schopfloch', 'Marktplatz 2', '72296', 'Schopfloch', '07443 9603-0', 'http://www.schopfloch.de', 'zentrale@schopfloch.de', '0000-00-00', '0000-00-00', 'r?L?cfr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(631, 'Gemeindeverwaltung', 'Schuttertal', 'Gemeindeverwaltung Schuttertal', 'Hauptstr. 5', '77978', 'Schuttertal', '07826 9666-0', 'http://www.schuttertal.de', 'gabbert@schuttertal.de', '0000-00-00', '0000-00-00', 'Yf7qvFV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(632, 'Gemeindeverwaltung', 'Schutterwald', 'Gemeindeverwaltung Schutterwald', 'Kirchstr. 2', '77746', 'Schutterwald', '0781 9606-0', 'http://www.schutterwald.de', 'gemeinde@schutterwald.de', '0000-00-00', '0000-00-00', 'f4JXtFu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(633, 'Gemeindeverwaltung', 'Schwaikheim', 'Gemeindeverwaltung Schwaikheim', 'Marktplatz 2-4', '71409', 'Schwaikheim', '07195 582-0', 'http://www.schwaikheim.de', 'gemeinde@schwaikheim.de', '0000-00-00', '0000-00-00', 'msez6XY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(634, 'Gemeindeverwaltung', 'Schwanau', 'Gemeindeverwaltung Schwanau', 'Kirchstr. 16', '77963', 'Schwanau', '07824 6499-0', 'http://www.schwanau.de', 'Wolfgang.Brucker@schwanau.de', '0000-00-00', '0000-00-00', '-PHX?Nu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(635, 'Gemeindeverwaltung', 'Schwarzach', 'Gemeindeverwaltung Schwarzach', 'Hauptstr. 14', '74869', 'Schwarzach', '06262 9209-0', 'http://www.schwarzach-online.de', 'rathaus@schwarzach-online.de', '0000-00-00', '0000-00-00', 'Xt#yJCJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(636, 'Gemeindeverwaltung', 'Schwendi', 'Gemeindeverwaltung Schwendi', 'Biberacher Str. 1', '88477', 'Schwendi', '07353 9800-0', 'http://www.schwendi.de', 'rathaus.info@schwendi.de', '0000-00-00', '0000-00-00', 'y?3fPyr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(637, 'Gemeindeverwaltung', 'Schwenningen', 'Gemeindeverwaltung Schwenningen', 'Alte Pfarrstr. 9', '72477', 'Schwenningen', '07579 9212-0', 'http://www.schwenningen.de', 'info@schwenningen.de', '0000-00-00', '0000-00-00', '82S#fhH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(638, 'Gemeindeverwaltung', 'Schwieberdingen', 'Gemeindeverwaltung Schwieberdingen', 'Schloßhof 1', '71701', 'Schwieberdingen', '07150 305-0', 'http://www.schwieberdingen.de', 'rathaus@schwieberdingen.de', '0000-00-00', '0000-00-00', 'LaYkyyE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(639, 'Gemeindeverwaltung', 'Schwörstadt', 'Gemeindeverwaltung Schwörstadt', 'Hauptstr. 107', '79739', 'Schwörstadt', '07762 5220-0', 'http://www.schwoerstadt.de', 'info@schwoerstadt.de', '0000-00-00', '0000-00-00', 'pSaW3pH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(640, 'Gemeindeverwaltung', 'Seckach', 'Gemeindeverwaltung Seckach', 'Bahnhofstr. 30', '74743', 'Seckach', '06292 9201-0', 'http://www.seckach.de', 'info@seckach.de', '0000-00-00', '0000-00-00', 'xGWA76t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(641, 'Gemeindeverwaltung', 'Seebach', 'Gemeindeverwaltung Seebach', 'Ruhesteinstr. 21', '77889', 'Seebach', '07842 9483-0', 'http://www.seebach.de', 'gemeinde@seebach.de', '0000-00-00', '0000-00-00', '848wFBh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(642, 'Gemeindeverwaltung', 'Seekirch', 'Gemeindeverwaltung Seekirch', 'Hauptstr. 23', '88422', 'Seekirch', '07582 91296', 'http://www.seekirch.de/', 'info@seekirch.de', '0000-00-00', '0000-00-00', 'p6PbyCH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(643, 'Gemeindeverwaltung', 'Seelbach', 'Gemeindeverwaltung Seelbach', 'Hauptstr. 7', '77960', 'Seelbach', '07823 9494-21', 'http://www.seelbach-online.de', 'gemeinde@seelbach-online.de', '0000-00-00', '0000-00-00', 'Y5#ntEt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(644, 'Gemeindeverwaltung', 'Seewald', 'Gemeindeverwaltung Seewald', 'Wildbader Str. 1', '72297', 'Seewald', '07447 9460-0', 'http://www.seewald.eu', 'gemeinde@seewald.eu', '0000-00-00', '0000-00-00', 'MZTKUam', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(645, 'Gemeindeverwaltung', 'Seitingen-Oberflacht', 'Gemeindeverwaltung Seitingen-Oberflacht', 'Obere Hauptstr. 8', '78606', 'Seitingen-Oberflacht', '07464 9868-0', 'http://www.seitingen-oberflacht.de', 'juergen.buhl@seitingen-oberflacht.de', '0000-00-00', '0000-00-00', 'LvvxMe8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(646, 'Gemeindeverwaltung', 'Sersheim', 'Gemeindeverwaltung Sersheim', 'Schloßstr. 21', '74372', 'Sersheim', '07042 372-0', 'http://www.sersheim.de', 'gemeinde@sersheim.de', '0000-00-00', '0000-00-00', '!Y6gTr?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(647, 'Gemeindeverwaltung', 'Setzingen', 'Gemeindeverwaltung Setzingen', 'Kirchstr. 4', '89129', 'Setzingen', '07345 919076', 'http://www.setzingen.de/', 'info@setzingen.de', '0000-00-00', '0000-00-00', 'LccnXp-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(648, 'Gemeindeverwaltung', 'Sexau', 'Gemeindeverwaltung Sexau', 'Dorfstr. 61', '79350', 'Sexau', '07641 9268-0', 'http://www.sexau.de', 'rathaus@sexau.de', '0000-00-00', '0000-00-00', 'sAaw85b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(649, 'Gemeindeverwaltung', 'Siegelsbach', 'Gemeindeverwaltung Siegelsbach', 'Wagenbacher Str. 4A', '74936', 'Siegelsbach', '07264 9150-0', 'http://www.siegelsbach.de', 'gemeinde@siegelsbach.de', '0000-00-00', '0000-00-00', '3efmnds', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(650, 'Gemeindeverwaltung', 'Sigmaringendorf', 'Gemeindeverwaltung Sigmaringendorf', 'Hauptstr. 9', '72517', 'Sigmaringendorf', '07571/7305-0', 'http://www.sigmaringendorf.de', 'henne@sigmaringendorf.de', '0000-00-00', '0000-00-00', 'HDukmqa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(651, 'Gemeindeverwaltung', 'Simmersfeld', 'Gemeindeverwaltung Simmersfeld', 'Gartenstr. 14', '72226', 'Simmersfeld', '07484 9320-0', 'http://www.simmersfeld.de', 'info@simmersfeld.de', '0000-00-00', '0000-00-00', 'mxxqcun', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(652, 'Gemeindeverwaltung', 'Simmozheim', 'Gemeindeverwaltung Simmozheim', 'Hauptstr. 8', '75397', 'Simmozheim', '07033 5285-0', 'http://www.simmozheim.de', 'mayer@simmozheim.de', '0000-00-00', '0000-00-00', '!#Rvh7K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(653, 'Gemeindeverwaltung', 'Simonswald', 'Gemeindeverwaltung Simonswald', 'Talstr. 12', '79263', 'Simonswald', '07683 9101-0', 'http://www.simonswald.de', 'scheer@simonswald.de', '0000-00-00', '0000-00-00', '7dg#RR#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(654, 'Gemeindeverwaltung', 'Sinzheim', 'Gemeindeverwaltung Sinzheim', 'Marktplatz 1', '76547', 'Sinzheim', '07221 806-0', 'http://www.sinzheim.de', 'gemeinde@sinzheim.de', '0000-00-00', '0000-00-00', 'BdsHwSe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(655, 'Gemeindeverwaltung', 'Sipplingen', 'Gemeindeverwaltung Sipplingen', 'Rathausstr. 10', '78354', 'Sipplingen', '07551 8096-0', 'http://www.sipplingen.de', 'gemeinde@sipplingen.de', '0000-00-00', '0000-00-00', 'SWuPeuq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(656, 'Gemeindeverwaltung', 'Sölden', 'Gemeindeverwaltung Sölden', 'Staufener Str. 4', '79294', 'Sölden', '0761 13780-0', 'http://www.soelden.de', 'gemeinde@soelden.de', '0000-00-00', '0000-00-00', 'G-gmmpN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(657, 'Gemeindeverwaltung', 'Sonnenbühl', 'Gemeindeverwaltung Sonnenbühl', 'Hauptstr. 2', '72820', 'Sonnenbühl', '07128 925-0', 'http://www.sonnenbuehl.de', 'info@sonnenbuehl.de', '0000-00-00', '0000-00-00', 'XZqGTAD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(658, 'Gemeindeverwaltung', 'Sontheim an der Brenz', 'Gemeindeverwaltung Sontheim an der Brenz', 'Brenzer Str. 25', '89567', 'Sontheim an der Brenz', '07325 17-0', 'http://www.sontheim-brenz.de', 's.bm@sontheim-an-der-Brenz.de', '0000-00-00', '0000-00-00', 'MuZy5-9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(659, 'Gemeindeverwaltung', 'Spechbach', 'Gemeindeverwaltung Spechbach', 'Hauptstr. 35', '74937', 'Spechbach', '06226 9500-0', 'http://www.spechbach.de', 'info@gemeinde.spechbach.de', '0000-00-00', '0000-00-00', '?JSTFxD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(660, 'Gemeindeverwaltung', 'Spiegelberg', 'Gemeindeverwaltung Spiegelberg', 'Sulzbacher Str. 7', '71579', 'Spiegelberg', '07194 9501-0', 'http://www.gemeinde-spiegelberg.de', 'info@gemeinde-spiegelberg.de', '0000-00-00', '0000-00-00', 'pagGXAa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(661, 'Gemeindeverwaltung', 'Spraitbach', 'Gemeindeverwaltung Spraitbach', 'Kirchplatz 1', '73565', 'Spraitbach', '07176 6563-0', 'http://www.spraitbach.de', 'info@spraitbach.de', '0000-00-00', '0000-00-00', 'nBZBuVP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(662, 'Gemeindeverwaltung', 'St. Johann', 'Gemeindeverwaltung St. Johann', 'Schulstr. 1', '72813', 'St. Johann', '07122 8299-0', 'http://www.st-johann.de', 'Florian.Bauer@st-johann.de', '0000-00-00', '0000-00-00', 'bF!CA53', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(663, 'Gemeindeverwaltung', 'St. Leon-Rot', 'Gemeindeverwaltung St. Leon-Rot', 'Rathausstr. 2', '68789', 'St. Leon-Rot', '06227 538-0', 'http://www.st-leon-rot.de', 'gemeinde@st-leon-rot.de', '0000-00-00', '0000-00-00', 'xvdJfA?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(664, 'Gemeindeverwaltung', 'St. Märgen', 'Gemeindeverwaltung St. Märgen', 'Rathausplatz 6', '79274', 'St. Märgen', '07669 9118-0', 'http://www.st-maergen.de', 'rathaus@st-maergen.de', '0000-00-00', '0000-00-00', 'mZWcJmX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(665, 'Gemeindeverwaltung', 'St. Peter', 'Gemeindeverwaltung St. Peter', 'Klosterhof 12', '79271', 'St. Peter', '07660 9102-0', 'http://www.st-peter-schwarzwald.de', 'gemeinde@st-peter.eu', '0000-00-00', '0000-00-00', 'AUB4peA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(666, 'Gemeindeverwaltung', 'Staig', 'Gemeindeverwaltung Staig', 'Raiffeisenstr.7', '89195', 'Staig', '07346 9603-0', 'http://www.staig.de', 'martin.jung@staig.de', '0000-00-00', '0000-00-00', '-#kuaPC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(667, 'Gemeindeverwaltung', 'Starzach', 'Gemeindeverwaltung Starzach', 'Hauptstr. 15', '72181', 'Starzach', '07483 188-0', 'http://www.starzach.de', 'gemeinde@starzach.de', '0000-00-00', '0000-00-00', 'RSJPdhf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(668, 'Gemeindeverwaltung', 'Stegen', 'Gemeindeverwaltung Stegen', 'Dorfplatz 1', '79252', 'Stegen', '07661 3969-0', 'http://www.dreisamtal.de/Stegen.htm', 'gemeinde@stegen.de', '0000-00-00', '0000-00-00', 'n6dU4yw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(669, 'Gemeindeverwaltung', 'Steinach', 'Gemeindeverwaltung Steinach', 'Kirchstr. 4', '77790', 'Steinach', '07832 9198-0', 'http://www.steinach.de', 'info@steinach.de', '0000-00-00', '0000-00-00', 'MKJtHNE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(670, 'Gemeindeverwaltung', 'Steinen', 'Gemeindeverwaltung Steinen', 'Eisenbahnstr. 31', '79585', 'Steinen', '07627 9100-0', 'http://www.steinen.de', 'koenig.buergermeister@steinen.de', '0000-00-00', '0000-00-00', 'u35F#YF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(671, 'Gemeindeverwaltung', 'Steinenbronn', 'Gemeindeverwaltung Steinenbronn', 'Stuttgarter Str. 5', '71144', 'Steinenbronn', '07157 1291-0', 'http://www.steinenbronn.de', 'info@steinenbronn.de', '0000-00-00', '0000-00-00', 'DpWsM8t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(672, 'Gemeindeverwaltung', 'Steinhausen an der Rottum', 'Gemeindeverwaltung Steinhausen an der Rottum', 'Ehrensberger Str. 13', '88416', 'Steinhausen an der Rottum', '07352 9227-0', 'http://www.steinhausen-rottum.de', 'heine@steinhausen-rottum.de', '0000-00-00', '0000-00-00', 'WfK7qBJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(673, 'Gemeindeverwaltung', 'Steinheim am Albuch', 'Gemeindeverwaltung Steinheim am Albuch', 'Hauptstr. 24', '89555', 'Steinheim am Albuch', '07329 9606-0', 'http://www.steinheim-am-albuch.de', 'info@steinheim-am-albuch.de', '0000-00-00', '0000-00-00', 'kGPVZRe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(674, 'Gemeindeverwaltung', 'Steinmauern', 'Gemeindeverwaltung Steinmauern', 'Hauptstr. 82', '76479', 'Steinmauern', '07222 9275-0', 'http://www.steinmauern.de', 'rathaus@steinmauern.de', '0000-00-00', '0000-00-00', '2HFkz7N', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(675, 'Gemeindeverwaltung', 'Steißlingen', 'Gemeindeverwaltung Steißlingen', 'Schulstr. 19', '78256', 'Steißlingen', '07738 9293-51', 'http://www.steisslingen.de', 'gemeinde@steisslingen.de', '0000-00-00', '0000-00-00', 'dwV5!tE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(676, 'Gemeindeverwaltung', 'Sternenfels', 'Gemeindeverwaltung Sternenfels', 'Maulbronner Str. 7', '75447', 'Sternenfels', '07045 97040-00', 'http://www.sternenfels.de', 'gemeinde@sternenfels.org', '0000-00-00', '0000-00-00', '!VwLRDL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(677, 'Gemeindeverwaltung', 'Stetten', 'Gemeindeverwaltung Stetten', 'Schulstr. 18', '88719', 'Stetten', '07532 6095', 'http://www.gemeinde-stetten.de', 'rathaus@gemeinde-stetten.de', '0000-00-00', '0000-00-00', '?EPXCDc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(678, 'Gemeindeverwaltung', 'Stetten am kalten Markt', 'Gemeindeverwaltung Stetten am kalten Markt', 'Schlosshof 1', '72510', 'Stetten am kalten Markt', '07573 9515-0', 'http://www.stetten-am-kalten-markt.de', 'post@stetten-akm.de', '0000-00-00', '0000-00-00', '98Z3NYw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(679, 'Gemeindeverwaltung', 'Stimpfach', 'Gemeindeverwaltung Stimpfach', 'Kirchstr. 22', '74597', 'Stimpfach', '07967 9001-0', 'http://www.stimpfach.de', 'gemeinde@stimpfach.de', '0000-00-00', '0000-00-00', 'UxAaTJW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(680, 'Gemeindeverwaltung', 'Stödtlen', 'Gemeindeverwaltung Stödtlen', 'Rathausstr. 11', '73495', 'Stödtlen', '07964 9009-0', 'http://www.stoedtlen.de', 'info@stoedtlen.de', '0000-00-00', '0000-00-00', 'dx5MRA-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(681, 'Gemeindeverwaltung', 'Straßberg', 'Gemeindeverwaltung Straßberg', 'Lindenstr. 5', '72479', 'Straßberg', '07434 9384-0', 'http://www.strassberg.de', 'Zeiser@strassberg.de', '0000-00-00', '0000-00-00', '#xta2kA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(682, 'Gemeindeverwaltung', 'Straubenhardt', 'Gemeindeverwaltung Straubenhardt', 'Ittersbacher Str. 1', '75334', 'Straubenhardt', '07082 9485-0', 'http://www.straubenhardt.de', 'hauptamt@straubenhardt.de', '0000-00-00', '0000-00-00', 'v-wFC7U', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(683, 'Gemeindeverwaltung', 'Sulzbach an der Murr', 'Gemeindeverwaltung Sulzbach an der Murr', 'Bahnhofstr. 3', '71560', 'Sulzbach an der Murr', '07193 51-0', 'http://www.sulzbach-murr.de', 'd.zahn@sulzbach-murr.de', '0000-00-00', '0000-00-00', 'qYspPWF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(684, 'Gemeindeverwaltung', 'Sulzbach-Laufen', 'Gemeindeverwaltung Sulzbach-Laufen', 'Eisbachstraße 24', '74429', 'Sulzbach-Laufen', '07976 91075-0', 'http://www.sulzbach-laufen.de', 'Markus.Bock@sulzbach-laufen.de', '0000-00-00', '0000-00-00', 'SJW29!R', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(685, 'Gemeindeverwaltung', 'Sulzfeld', 'Gemeindeverwaltung Sulzfeld', 'Rathausplatz 1', '75056', 'Sulzfeld', '07269 78-0', 'http://www.sulzfeld.de', 'info@sulzfeld.de', '0000-00-00', '0000-00-00', 'dr5ru#b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(686, 'Gemeindeverwaltung', 'Täferrot', 'Gemeindeverwaltung Täferrot', 'Durlanger Str. 2', '73527', 'Täferrot', '07175 221', 'http://www.taeferrot.de', 'info@taeferrot.de', '0000-00-00', '0000-00-00', 'skwKEJz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(687, 'Gemeindeverwaltung', 'Talheim', 'Gemeindeverwaltung Talheim', 'Rathausplatz 18', '74388', 'Talheim', '07133 9830-0', 'http://www.talheim.de', 'rainer.graessle@talheim.de', '0000-00-00', '0000-00-00', 'cDC4YUV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(688, 'Gemeindeverwaltung', 'Talheim', 'Gemeindeverwaltung Talheim', 'Kirchbrunnen 6', '78607', 'Talheim', '07464 9895-0', 'http://www.gemeinde-talheim.de', 'buergermeister@gemeinde-talheim.de', '0000-00-00', '0000-00-00', 'EJ?cmGV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(689, 'Gemeindeverwaltung', 'Tamm', 'Gemeindeverwaltung Tamm', 'Hauptstraße 100', '71732', 'Tamm', '07141 606-0', 'http://www.tamm.org', 'info@tamm.org', '0000-00-00', '0000-00-00', '7K6PcJw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(690, 'Gemeindeverwaltung', 'Tannhausen', 'Gemeindeverwaltung Tannhausen', 'Hauptstr. 54', '73497', 'Tannhausen', '07964 9000-0', 'http://www.tannhausen.de', 'gemeinde@tannhausen.de', '0000-00-00', '0000-00-00', 'c3mTHmf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(691, 'Gemeindeverwaltung', 'Tannheim', 'Gemeindeverwaltung Tannheim', 'Rathausplatz 1', '88459', 'Tannheim', '08395 922-0', 'http://www.gemeinde-tannheim.de', 'info@gemeinde-tannheim.de', '0000-00-00', '0000-00-00', '9LM8H#A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(692, 'Gemeindeverwaltung', 'Teningen', 'Gemeindeverwaltung Teningen', 'Riegeler Str. 12', '79331', 'Teningen', '07641 5806-0', 'http://www.teningen.de', 'info@teningen.de', '0000-00-00', '0000-00-00', 'wPFBLu3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(693, 'Gemeindeverwaltung', 'Tiefenbach', 'Gemeindeverwaltung Tiefenbach', 'Buchauer Str. 21', '88422', 'Tiefenbach', '07582 2330', 'http:\\www.tiefenbach-federsee.de', 'tiefenbach@bad-buchau.de', '0000-00-00', '0000-00-00', 'kDRz86K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(694, 'Gemeindeverwaltung', 'Tiefenbronn', 'Gemeindeverwaltung Tiefenbronn', 'Gemmingenstr. 1', '75233', 'Tiefenbronn', '07234 9500-0', 'http://www.tiefenbronn.de', 'gemeindeverwaltung@tiefenbronn.de', '0000-00-00', '0000-00-00', 'aY#R4zA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(695, 'Gemeindeverwaltung', 'Todtmoos', 'Gemeindeverwaltung Todtmoos', 'St. Blasier Str. 2', '79682', 'Todtmoos', '07674 848-0', 'http://www.todtmoos.de', 'sekretariat@todtmoos.net', '0000-00-00', '0000-00-00', 'Pe9s7d9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(696, 'Gemeindeverwaltung', 'Tunau', 'Gemeindeverwaltung Tunau', 'Dorfstr. 2', '79677', 'Tunau', '07673 344 oder 8204-33', 'http://www.gemeinde-tunau.de', 'info@schoenau-im-schwarzwald.de', '0000-00-00', '0000-00-00', 'y6W8e-P', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(697, 'Gemeindeverwaltung', 'Tuningen', 'Gemeindeverwaltung Tuningen', 'Auf dem Platz 1', '78609', 'Tuningen', '07464 9861-0', 'http://www.tuningen.de', 'r.pahlow@tuningen.de', '0000-00-00', '0000-00-00', 'ynpdkGB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(698, 'Gemeindeverwaltung', 'Ubstadt-Weiher', 'Gemeindeverwaltung Ubstadt-Weiher', 'Bruchsaler Str. 1-3', '76698', 'Ubstadt-Weiher', '07251 617-0', 'http://www.ubstadt-weiher.de', 'gemeinde@ubstadt-weiher.de', '0000-00-00', '0000-00-00', 'xABCdwK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(699, 'Gemeindeverwaltung', 'Uhldingen-Mühlhofen', 'Gemeindeverwaltung Uhldingen-Mühlhofen', 'Aachstr. 4', '88690', 'Uhldingen-Mühlhofen', '07556 717-0', 'http://www.uhldingen-muehlhofen.de', 'rathaus@uhldingen-muehlhofen.de', '0000-00-00', '0000-00-00', 'KYp3XnN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(700, 'Gemeindeverwaltung', 'Ühlingen-Birkendorf', 'Gemeindeverwaltung Ühlingen-Birkendorf', 'Kirchplatz 1', '79777', 'Ühlingen-Birkendorf', '07743 9200-0', 'http://www.uehlingen-birkendorf.de', 'gemeinde@uehlingen-birkendorf.de', '0000-00-00', '0000-00-00', '-LrsKEm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(701, 'Gemeindeverwaltung', 'Umkirch', 'Gemeindeverwaltung Umkirch', 'Vinzenz-Kremp-Weg 1', '79224', 'Umkirch', '07665 505-0', 'http://www.umkirch.de', 'w.laub@umkirch.de', '0000-00-00', '0000-00-00', '8CGtay-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(702, 'Gemeindeverwaltung', 'Ummendorf', 'Gemeindeverwaltung Ummendorf', 'Biberacher Str. 9', '88444', 'Ummendorf', '07351 3477-0', 'http://www.ummendorf.de', 'info@ummendorf.de', '0000-00-00', '0000-00-00', '6uX!cba', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(703, 'Gemeindeverwaltung', 'Unlingen', 'Gemeindeverwaltung Unlingen', 'Kirchgasse 11', '88527', 'Unlingen', '07371 9305-0', 'http://www.unlingen.de', 'ehoelzl@unlingen.de', '0000-00-00', '0000-00-00', 'xAKFA-3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(704, 'Gemeindeverwaltung', 'Untereisesheim', 'Gemeindeverwaltung Untereisesheim', 'Rathausstr. 1', '74257', 'Untereisesheim', '07132 9974-0', 'http://www.untereisesheim.de', 'bernd.bordon@untereisesheim.de', '0000-00-00', '0000-00-00', 'xv#x5nx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(705, 'Gemeindeverwaltung', 'Unterensingen', 'Gemeindeverwaltung Unterensingen', 'Kirchstr. 31', '72669', 'Unterensingen', '07022 6097-0', 'http://www.unterensingen.de', 's.friz@unterensingen.de', '0000-00-00', '0000-00-00', 'LHBVNAw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(706, 'Gemeindeverwaltung', 'Untergruppenbach', 'Gemeindeverwaltung Untergruppenbach', 'Kirchstr. 2', '74199', 'Untergruppenbach', '07131 7029-0', 'http://www.untergruppenbach.de', 'gemeinde@untergruppenbach.de', '0000-00-00', '0000-00-00', 'JepRtb8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(707, 'Gemeindeverwaltung', 'Unterkirnach', 'Gemeindeverwaltung Unterkirnach', 'Villinger Str. 5', '78089', 'Unterkirnach', '07721 8008-0', 'http://www.unterkirnach.de', 'braun@unterkirnach.de', '0000-00-00', '0000-00-00', 'F3eYYde', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(708, 'Gemeindeverwaltung', 'Untermarchtal', 'Gemeindeverwaltung Untermarchtal', 'Bahnhofstr. 4', '89617', 'Untermarchtal', '07393 917383', 'www.gemeinde-untermarchtal.de', 'gemeindeverw.-untermarchtal@t-online.de', '0000-00-00', '0000-00-00', '5nqtTTt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(709, 'Gemeindeverwaltung', 'Untermünkheim', 'Gemeindeverwaltung Untermünkheim', 'Hohenloher Str. 33', '74547', 'Untermünkheim', '0791 97087-0', 'http://www.untermuenkheim.de', 'rathaus@untermuenkheim.de', '0000-00-00', '0000-00-00', 'H5kNTce', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(710, 'Gemeindeverwaltung', 'Unterreichenbach', 'Gemeindeverwaltung Unterreichenbach', 'Im Oberdorf 15', '75399', 'Unterreichenbach', '07235 9333-0', 'http://www.unterreichenbach.de', 'hauptamt@unterreichenbach.de', '0000-00-00', '0000-00-00', 'XVabHm6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(711, 'Gemeindeverwaltung', 'Unterschneidheim', 'Gemeindeverwaltung Unterschneidheim', 'Mühlweg 5', '73485', 'Unterschneidheim', '07966 181-0', 'http://www.unterschneidheim.de', 'info@unterschneidheim.de', '0000-00-00', '0000-00-00', 'UypYF3m', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(712, 'Gemeindeverwaltung', 'Unterstadion', 'Gemeindeverwaltung Unterstadion', 'Kirchstr. 3', '89619', 'Unterstadion', '07393 1648', 'http://www.unterstadion.de', 'info@unterstadion.de', '0000-00-00', '0000-00-00', 'SW#BYXP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(713, 'Gemeindeverwaltung', 'Unterwachingen', 'Gemeindeverwaltung Unterwachingen', 'Kirchstr. 2', '89597', 'Unterwachingen', '07393 1649', 'http:\\www.unterwachingen.de', 'info@unterwachingen.de', '0000-00-00', '0000-00-00', 'cGp2fC2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(714, 'Gemeindeverwaltung', 'Unterwaldhausen', 'Gemeindeverwaltung Unterwaldhausen', 'Hauptstr. 5', '88379', 'Unterwaldhausen', '07587 660', 'http://www.gvv-altshausen.de/gemeinden/unterwaldhausen.htm', 'info@rathaus-unterwaldhausen.de', '0000-00-00', '0000-00-00', 'a59?HNL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(715, 'Gemeindeverwaltung', 'Urbach', 'Gemeindeverwaltung Urbach', 'Konrad-Hornschuch-Str. 12', '73660', 'Urbach', '07181 8007-0', 'http://www.urbach.de', 'fehrlen@urbach.de', '0000-00-00', '0000-00-00', 'nbuV!z7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(716, 'Gemeindeverwaltung', 'Uttenweiler', 'Gemeindeverwaltung Uttenweiler', 'Hauptstr. 14', '88524', 'Uttenweiler', '07374 9206-0', 'http://www.gemeinde-uttenweiler.de', 'info@gemeinde-uttenweiler.de', '0000-00-00', '0000-00-00', 'W3ZYRRn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(717, 'Gemeindeverwaltung', 'Utzenfeld', 'Gemeindeverwaltung Utzenfeld', 'Wiesentalstr. 29', '79694', 'Utzenfeld', '07673 275', 'http://www.utzenfeld.de', 'info@utzenfeld.de', '0000-00-00', '0000-00-00', 'Tv88Sfe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(718, 'Gemeindeverwaltung', 'Villingendorf', 'Gemeindeverwaltung Villingendorf', 'Hauptstr. 2', '78667', 'Villingendorf', '0741 9298-0', 'http://www.villingendorf.de', 'info@villingendorf.de', '0000-00-00', '0000-00-00', '7W-wdYa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(719, 'Gemeindeverwaltung', 'Vogt', 'Gemeindeverwaltung Vogt', 'Kirchstr. 11', '88267', 'Vogt', '07529 209-0', 'http://www.vogt.de', 'smigoc@gemeinde-vogt.de', '0000-00-00', '0000-00-00', 'yEUY9v?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(720, 'Gemeindeverwaltung', 'Vöhringen', 'Gemeindeverwaltung Vöhringen', 'Sulzer Str. 8', '72189', 'Vöhringen', '07454 9583-0', 'http://www.voehringen-bw.de', 'info@voehringen-bw.de', '0000-00-00', '0000-00-00', 'N#mrkt9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(721, 'Gemeindeverwaltung', 'Volkertshausen', 'Gemeindeverwaltung Volkertshausen', 'Hauptstr. 27', '78269', 'Volkertshausen', '07774 9310-0', 'http://www.volkertshausen.de', 'rathaus@gemeinde.volkertshausen.de', '0000-00-00', '0000-00-00', 'RKehACh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(722, 'Gemeindeverwaltung', 'Vörstetten', 'Gemeindeverwaltung Vörstetten', 'Kirchstr. 2', '79279', 'Vörstetten', '07666 9400-0', 'http://www.voerstetten.de', 'gemeinde@voerstetten.de', '0000-00-00', '0000-00-00', 'y37MeDf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(723, 'Gemeindeverwaltung', 'Wain', 'Gemeindeverwaltung Wain', 'Kirchstr. 17', '88489', 'Wain', '07353 9803-0', 'http://www.wain.de', 'stephan.mantz@wain.de', '0000-00-00', '0000-00-00', 'rZMU-Hp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(724, 'Gemeindeverwaltung', 'Wald', 'Gemeindeverwaltung Wald', 'Von-Weckenstein-Str. 19', '88639', 'Wald', '07578 9216-0', 'http://www.wald.net', 'gemeinde@wald-hohenzollern.de', '0000-00-00', '0000-00-00', 'bVx524N', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(725, 'Gemeindeverwaltung', 'Waldachtal', 'Gemeindeverwaltung Waldachtal', 'Hauptstr. 18', '72178', 'Waldachtal', '07443 9634-0', 'http://www.waldachtal.de', 'postfach@waldachtal.de', '0000-00-00', '0000-00-00', 'YwsPrVb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(726, 'Gemeindeverwaltung', 'Waldbronn', 'Gemeindeverwaltung Waldbronn', 'Marktplatz 7', '76337', 'Waldbronn', '07243 609-0', 'http://www.waldbronn.de', 'gemeinde@waldbronn.de', '0000-00-00', '0000-00-00', 'EwTc2Z4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(727, 'Gemeindeverwaltung', 'Waldbrunn', 'Gemeindeverwaltung Waldbrunn', 'Alte Marktstr. 4', '69429', 'Waldbrunn', '06274 930-0', 'http://www.waldbrunn-odenwald.de', 'rathaus@waldbrunn-odenwald.de', '0000-00-00', '0000-00-00', '33E5qPU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(728, 'Gemeindeverwaltung', 'Waldburg', 'Gemeindeverwaltung Waldburg', 'Hauptstr. 20', '88289', 'Waldburg', '07529 9717-0', 'http://www.gemeinde-waldburg.de', 'Michael.Roeger@gemeinde-waldburg.de', '0000-00-00', '0000-00-00', '9-W#wMq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(729, 'Gemeindeverwaltung', 'Walddorfhäslach', 'Gemeindeverwaltung Walddorfhäslach', 'Hauptstr. 9', '72141', 'Walddorfhäslach', '07127 9266-0', 'http://www.walddorfhaeslach.de', 'info@walddorfhaeslach.de', '0000-00-00', '0000-00-00', 'bAs3Tzp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(730, 'Gemeindeverwaltung', 'Waldstetten', 'Gemeindeverwaltung Waldstetten', 'Hauptstr. 1', '73550', 'Waldstetten', '07171 403-0', 'http://www.waldstetten.de', 'Michael.Rembold@waldstetten.de', '0000-00-00', '0000-00-00', 'HFgtF5B', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(731, 'Gemeindeverwaltung', 'Walheim', 'Gemeindeverwaltung Walheim', 'Hauptstr. 68', '74399', 'Walheim', '07143 8041-11', 'http://www.walheim.de', 'tatjana.scheerle@walheim.de', '0000-00-00', '0000-00-00', 'SEtBh?t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(732, 'Gemeindeverwaltung', 'Wallhausen', 'Gemeindeverwaltung Wallhausen', 'Seestr. 2', '74599', 'Wallhausen', '07955 9381-0', 'http://www.gemeinde-wallhausen.de', 'info@gemeinde-wallhausen.de', '0000-00-00', '0000-00-00', 'LYPeFkK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(733, 'Gemeindeverwaltung', 'Walzbachtal', 'Gemeindeverwaltung Walzbachtal', 'Wössinger Str. 26-28', '75045', 'Walzbachtal', '07203 88-0', 'http://www.walzbachtal.de', 'rathaus@walzbachtal.de', '0000-00-00', '0000-00-00', 'Nz#AL4r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(734, 'Gemeindeverwaltung', 'Wangen', 'Gemeindeverwaltung Wangen', 'Pfarrberg 2', '73117', 'Wangen', '07161 91418-0', 'http://www.gemeinde-wangen.de', 't.dutta@wangen.kdrs.de', '0000-00-00', '0000-00-00', 'PKYuDaH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(735, 'Gemeindeverwaltung', 'Wannweil', 'Gemeindeverwaltung Wannweil', 'Hauptstr. 11', '72827', 'Wannweil', '07121 9585-0', 'http://www.wannweil.de', 'info@gemeinde-wannweil.de', '0000-00-00', '0000-00-00', 'KFkkZ?A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(736, 'Gemeindeverwaltung', 'Warthausen', 'Gemeindeverwaltung Warthausen', 'Alte Biberacher Str. 13', '88447', 'Warthausen', '07351 5093-0', 'http://www.warthausen.de', 'gemeinde@warthausen.de', '0000-00-00', '0000-00-00', '-mmL77F', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(737, 'Gemeindeverwaltung', 'Wäschenbeuren', 'Gemeindeverwaltung Wäschenbeuren', 'Manfred-Wörner-Platz 1', '73116', 'Wäschenbeuren', '07172 92655-0', 'http://www.waeschenbeuren.de', 'info@waeschenbeuren.de', '0000-00-00', '0000-00-00', 'B3gcmPa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(738, 'Gemeindeverwaltung', 'Wehingen', 'Gemeindeverwaltung Wehingen', 'Gosheimer Str. 14', '78564', 'Wehingen', '07426 9470-0', 'http://www.wehingen.de', 'info@wehingen.de', '0000-00-00', '0000-00-00', 'FMx-aYy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(739, 'Gemeindeverwaltung', 'Weidenstetten', 'Gemeindeverwaltung Weidenstetten', 'Dorfplatz 1', '89197', 'Weidenstetten', '07340 9640-0', 'http://www.weidenstetten.de', 'info@weidenstetten.de', '0000-00-00', '0000-00-00', 'L7FsBz5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(740, 'Gemeindeverwaltung', 'Weil im Schönbuch', 'Gemeindeverwaltung Weil im Schönbuch', 'Marktplatz 3', '71093', 'Weil im Schönbuch', '07157 1290-0', 'http://www.weil-im-schoenbuch.de', 'info@weil-im-schoenbuch.de', '0000-00-00', '0000-00-00', 'xPfgnef', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(741, 'Gemeindeverwaltung', 'Weilen unter den Rinnen', 'Gemeindeverwaltung Weilen unter den Rinnen', 'Angelstr. 1', '72367', 'Weilen unter den Rinnen', '07427 2516', 'http://weilen-udr.de/', 'gemeinde@weilen-udr.de', '0000-00-00', '0000-00-00', '7WPNcV6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(742, 'Gemeindeverwaltung', 'Weilheim', 'Gemeindeverwaltung Weilheim', 'Badener Platz 1', '79809', 'Weilheim', '07741 8313-0', 'http://www.weilheim-baden.de', 'info@weilheim-baden.de', '0000-00-00', '0000-00-00', 'apk8TET', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(743, 'Gemeindeverwaltung', 'Weingarten (Baden)', 'Gemeindeverwaltung Weingarten (Baden)', 'Marktplatz 2', '76356', 'Weingarten (Baden)', '07244 7020-0', 'http://www.weingarten-baden.de', 'gemeinde@weingarten-baden.de', '0000-00-00', '0000-00-00', 'sKNRR!L', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(744, 'Gemeindeverwaltung', 'Weisenbach', 'Gemeindeverwaltung Weisenbach', 'Hauptstr. 3', '76599', 'Weisenbach', '07224 9183-0', 'http://www.weisenbach.de', 'buergermeisteramt@weisenbach.de', '0000-00-00', '0000-00-00', 'TrKc7XL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(745, 'Gemeindeverwaltung', 'Weissach', 'Gemeindeverwaltung Weissach', 'Rathausplatz 1', '71287', 'Weissach', '07044 9363-0', 'http://www.weissach.de', 'gemeinde@weissach.de', '0000-00-00', '0000-00-00', 'S9vPsVK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(746, 'Gemeindeverwaltung', 'Weissach im Tal', 'Gemeindeverwaltung Weissach im Tal', 'Kirchberg 2-4', '71554', 'Weissach im Tal', '07191 3531-0', 'http://www.weissach-im-tal.de', 'bma@weissach-im-tal.de', '0000-00-00', '0000-00-00', 'Ex!ARFs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(747, 'Gemeindeverwaltung', 'Weißbach', 'Gemeindeverwaltung Weißbach', 'Niedernhaller Str. 5', '74679', 'Weißbach', '07947 9126-0', 'http://www.gemeinde-weissbach.de', 'Rainer.Zuefle@gemeinde-weissbach.de', '0000-00-00', '0000-00-00', 'L6s9R2D', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(748, 'Gemeindeverwaltung', 'Weisweil', 'Gemeindeverwaltung Weisweil', 'Hinterdorfstr. 14', '79367', 'Weisweil', '07646 9102-0', 'http://www.weisweil.de', 'rheingemeinde@weisweil.de', '0000-00-00', '0000-00-00', 'uA#2vt3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(749, 'Gemeindeverwaltung', 'Wellendingen', 'Gemeindeverwaltung Wellendingen', 'Schloßplatz 1', '78669', 'Wellendingen', '07426 9402-0', 'http://www.wellendingen.de', 'thomas.albrecht@wellendingen.de', '0000-00-00', '0000-00-00', '2NLrP!Y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(750, 'Gemeindeverwaltung', 'Wembach', 'Gemeindeverwaltung Wembach', 'Bifigstr. 2', '79677', 'Wembach', '07673 327', 'http://www.wembach.de', 'info@wembach.de', '0000-00-00', '0000-00-00', '-TZDHvS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(751, 'Gemeindeverwaltung', 'Werbach', 'Gemeindeverwaltung Werbach', 'Hauptstr. 59', '97956', 'Werbach', '09341 9208-0', 'http://www.werbach.de', 'info@werbach.de', '0000-00-00', '0000-00-00', 'CEDTDw-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(752, 'Gemeindeverwaltung', 'Westerheim', 'Gemeindeverwaltung Westerheim', 'Kirchenplatz 16', '72589', 'Westerheim', '07333 9666-12', 'http://www.westerheim.de', 'walz@westerheim.de', '0000-00-00', '0000-00-00', 'C?C8t3E', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(753, 'Gemeindeverwaltung', 'Westerstetten', 'Gemeindeverwaltung Westerstetten', 'Kirchstr. 3', '89198', 'Westerstetten', '07348 9560-0', 'http://www.westerstetten.de', 'bourke@westerstetten.de', '0000-00-00', '0000-00-00', 'h!N-d55', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(754, 'Gemeindeverwaltung', 'Westhausen', 'Gemeindeverwaltung Westhausen', 'Jahnstr. 2', '73463', 'Westhausen', '07363 84-0', 'http://www.westhausen.de', 'info@westhausen.de', '0000-00-00', '0000-00-00', 'Sh#Wy9X', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(755, 'Gemeindeverwaltung', 'Wieden', 'Gemeindeverwaltung Wieden', 'Kirchstr. 2', '79695', 'Wieden', '07673 1365', 'http://www.gemeinde-wieden.de', 'afranz@wieden.de', '0000-00-00', '0000-00-00', 'CPbgsSY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(756, 'Gemeindeverwaltung', 'Wiernsheim', 'Gemeindeverwaltung Wiernsheim', 'Marktplatz 1', '75446', 'Wiernsheim', '07044 23-0', 'http://www.wiernsheim.de', 'bma@wiernsheim.de', '0000-00-00', '0000-00-00', 'B8G3wHA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(757, 'Gemeindeverwaltung', 'Wiesenbach', 'Gemeindeverwaltung Wiesenbach', 'Hauptstr. 26', '69257', 'Wiesenbach', '06223 9502-0', 'http://www.wiesenbach-online.de', 'Eric.Grabenbauer@wiesenbach-online.de', '0000-00-00', '0000-00-00', 'F9a9weD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(758, 'Gemeindeverwaltung', 'Wilhelmsdorf', 'Gemeindeverwaltung Wilhelmsdorf', 'Saalplatz 7', '88271', 'Wilhelmsdorf', '07503 921-111', 'http://www.gemeinde-wilhelmsdorf.de', 'info@gemeinde-wilhelmsdorf.de', '0000-00-00', '0000-00-00', '-sCgZek', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(759, 'Gemeindeverwaltung', 'Wilhelmsfeld', 'Gemeindeverwaltung Wilhelmsfeld', 'Johann-Wilhelm-Str. 61', '69259', 'Wilhelmsfeld', '06220 509-0', 'http://www.wilhelmsfeld.de', 'post@wilhelmsfeld.de', '0000-00-00', '0000-00-00', 'zbkTYbC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(760, 'Gemeindeverwaltung', 'Willstätt', 'Gemeindeverwaltung Willstätt', 'Am Mühlplatz 1', '77731', 'Willstätt', '07852 43-211', 'http://www.willstaett.de', 'gemeinde@willstaett.de', '0000-00-00', '0000-00-00', 'mR4AfyX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(761, 'Gemeindeverwaltung', 'Wimsheim', 'Gemeindeverwaltung Wimsheim', 'Rathausstr. 1', '71299', 'Wimsheim', '07044 9427-0', 'http://www.Wimsheim.de', 'Gemeinde@Wimsheim.de', '0000-00-00', '0000-00-00', 'pWSq53G', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(762, 'Gemeindeverwaltung', 'Winden im Elztal', 'Gemeindeverwaltung Winden im Elztal', 'Bahnhofstr. 1', '79297', 'Winden im Elztal', '07682 9236-0', 'http://www.winden-im-elztal.de', 'gemeinde@winden-im-elztal.de', '0000-00-00', '0000-00-00', 'V-7tNL?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(763, 'Gemeindeverwaltung', 'Winterbach', 'Gemeindeverwaltung Winterbach', 'Marktplatz 2', '73650', 'Winterbach', '07181 7006-0', 'http://www.winterbach.de', 'gemeinde@winterbach.de', '0000-00-00', '0000-00-00', 'Ev9hRJw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(764, 'Gemeindeverwaltung', 'Winterlingen', 'Gemeindeverwaltung Winterlingen', 'Marktstr. 7', '72474', 'Winterlingen', '07434 279-0', 'http://www.winterlingen.de', 'rathaus@winterlingen.de', '0000-00-00', '0000-00-00', 'CSN6-bM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(765, 'Gemeindeverwaltung', 'Wittighausen', 'Gemeindeverwaltung Wittighausen', 'Königstr. 17', '97957', 'Wittighausen', '09347 9209-14', 'http://www.wittighausen.de', 'b.henneberger@wittighausen.de', '0000-00-00', '0000-00-00', '8?a7HfR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(766, 'Gemeindeverwaltung', 'Wittlingen', 'Gemeindeverwaltung Wittlingen', 'Rathausplatz 1', '79599', 'Wittlingen', '07621 3804', '', 'gemeinde-wittlingen@t-online.de', '0000-00-00', '0000-00-00', 'Y77Fkt6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(767, 'Gemeindeverwaltung', 'Wittnau', 'Gemeindeverwaltung Wittnau', 'Kirchweg 2', '79299', 'Wittnau', '0761 456479-0', 'http://www.wittnau.de', 'gemeinde@wittnau.de', '0000-00-00', '0000-00-00', 'uht7ugW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(768, 'Gemeindeverwaltung', 'Wolfegg', 'Gemeindeverwaltung Wolfegg', 'Rötenbacher Str. 11', '88364', 'Wolfegg', '07527 9601-0', 'http://www.wolfegg.de', 'wolfegg.info@wolfegg.de', '0000-00-00', '0000-00-00', 'BbrysxN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(769, 'Gemeindeverwaltung', 'Wolfschlugen', 'Gemeindeverwaltung Wolfschlugen', 'Kirchstr. 19', '72649', 'Wolfschlugen', '07022 5005-0', 'http://www.wolfschlugen.de', 'gemeinde@wolfschlugen.de', '0000-00-00', '0000-00-00', 'kR-fs5K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(770, 'Gemeindeverwaltung', 'Wolpertshausen', 'Gemeindeverwaltung Wolpertshausen', 'Haller Str. 15', '74549', 'Wolpertshausen', '07904 9799-0', 'http://www.wolpertshausen.de', 'juergen.silberzahn@wolpertshausen.de', '0000-00-00', '0000-00-00', '3WMx77p', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(771, 'Gemeindeverwaltung', 'Wolpertswende', 'Gemeindeverwaltung Wolpertswende', 'Kirchplatz 4', '88284', 'Wolpertswende', '07502 9403-0', 'http://www.wolpertswende.de', 'gemeinde@wolpertswende.de', '0000-00-00', '0000-00-00', '-32wfY?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(772, 'Gemeindeverwaltung', 'Wörnersberg', 'Gemeindeverwaltung Wörnersberg', 'Lindenweg 1', '72299', 'Wörnersberg', '07453 7851', 'www.woernersberg.de', 'moehrle-reinhold@t-online.de', '0000-00-00', '0000-00-00', 'JAgLpfn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(773, 'Gemeindeverwaltung', 'Wört', 'Gemeindeverwaltung Wört', 'Hauptstr. 104', '73499', 'Wört', '07964 90080', 'http://www.gemeinde-woert.de', 'info@gemeinde-woert.de', '0000-00-00', '0000-00-00', 'peywByA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(774, 'Gemeindeverwaltung', 'Wurmberg', 'Gemeindeverwaltung Wurmberg', 'Uhlandstr. 15', '75449', 'Wurmberg', '07044 9449-0', 'http://www.wurmberg.de', 'info@wurmberg.de', '0000-00-00', '0000-00-00', 'wX9kpwP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(775, 'Gemeindeverwaltung', 'Wurmlingen', 'Gemeindeverwaltung Wurmlingen', 'Obere Hauptstr. 4', '78573', 'Wurmlingen', '07461 9276-0', 'http://www.wurmlingen.de', 'buergermeisteramt@wurmlingen.de', '0000-00-00', '0000-00-00', 'TGCaCBa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(776, 'Gemeindeverwaltung', 'Wüstenrot', 'Gemeindeverwaltung Wüstenrot', 'Eichwaldstr. 19', '71543', 'Wüstenrot', '07945 9199-11', 'http://www.gemeinde-wuestenrot.de', 'timo.wolf@gemeinde-wuestenrot.de', '0000-00-00', '0000-00-00', '266chc-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(777, 'Gemeindeverwaltung', 'Wutach', 'Gemeindeverwaltung Wutach', 'Amtshausstr. 2', '79879', 'Wutach', '07709 92969-0', 'http://www.wutach.org', 'rathaus@wutach.de', '0000-00-00', '0000-00-00', 'uxFW2JA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(778, 'Gemeindeverwaltung', 'Wutöschingen', 'Gemeindeverwaltung Wutöschingen', 'Kirchstr. 5', '79793', 'Wutöschingen', '07746 852-0', 'http://www.wutoeschingen.de', 'gemeinde@wutoeschingen.de', '0000-00-00', '0000-00-00', 'k37avh9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(779, 'Gemeindeverwaltung', 'Wyhl am Kaiserstuhl', 'Gemeindeverwaltung Wyhl am Kaiserstuhl', 'Hauptstr. 9', '79369', 'Wyhl am Kaiserstuhl', '07642 6894-0', 'http://www.wyhl.de', 'gemeinde@wyhl.de', '0000-00-00', '0000-00-00', 'wCJ#Dz8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(780, 'Gemeindeverwaltung', 'Zaberfeld', 'Gemeindeverwaltung Zaberfeld', 'Schloßberg 5', '74374', 'Zaberfeld', '07046 9626-0', 'http://www.zaberfeld.de', 'gemeinde@zaberfeld.de', '0000-00-00', '0000-00-00', 'XEG9H52', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(781, 'Gemeindeverwaltung', 'Zaisenhausen', 'Gemeindeverwaltung Zaisenhausen', 'Hauptstr. 97', '75059', 'Zaisenhausen', '07258 9109-0', 'http://www.zaisenhausen.de', 'info@zaisenhausen.de', '0000-00-00', '0000-00-00', 'BDXpagd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(782, 'Gemeindeverwaltung', 'Zell unter Aichelberg', 'Gemeindeverwaltung Zell unter Aichelberg', 'Lindenstr. 1-3', '73119', 'Zell unter Aichelberg', '07164 807-0', 'http://www.zell-u-a.de', 'flik@zell-u-a.de.de', '0000-00-00', '0000-00-00', 'XGWUauD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(783, 'Gemeindeverwaltung', 'Zimmern ob Rottweil', 'Gemeindeverwaltung Zimmern ob Rottweil', 'Rathausstr. 2', '78658', 'Zimmern ob Rottweil', '0741 9291-0', 'http://www.zimmern-or.de', 'info@zimmern-or.de', '0000-00-00', '0000-00-00', '6rssKEg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(784, 'Gemeindeverwaltung', 'Zimmern unter der Burg', 'Gemeindeverwaltung Zimmern unter der Burg', 'Kirchstr. 5', '72369', 'Zimmern unter der Burg', '07427 2518', 'http://www.zimmern-udb.de/', 'bgm-z@t-online.de', '0000-00-00', '0000-00-00', 'E3E-CWf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(785, 'Gemeindeverwaltung', 'Zuzenhausen', 'Gemeindeverwaltung Zuzenhausen', 'Hauptstr. 25', '74939', 'Zuzenhausen', '06226 9225-0', 'http://www.zuzenhausen.de', 'gemeinde@zuzenhausen.de', '0000-00-00', '0000-00-00', 'VWbzgnX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(786, 'Gemeindeverwaltung', 'Zweiflingen', 'Gemeindeverwaltung Zweiflingen', 'Eichacher Str. 17', '74639', 'Zweiflingen', '07948 9419-0', 'http://www.zweiflingen.de', 'gross@gemeinde-zweiflingen.de', '0000-00-00', '0000-00-00', 'HUS?86r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(787, 'Gemeindeverwaltung', 'Zwiefalten', 'Gemeindeverwaltung Zwiefalten', 'Marktplatz 3', '88529', 'Zwiefalten', '07373 205-0', 'http://www.zwiefalten.de', 'info@zwiefalten.de', '0000-00-00', '0000-00-00', 'V7EpDm-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(788, 'Gemeindeverwaltung', 'Zwingenberg', 'Gemeindeverwaltung Zwingenberg', 'Alte Dorfstr. 8', '69439', 'Zwingenberg', '06263/45152', 'http://www.zwingenberg-neckar.de', 'info@gemeinde-zwingenberg.de', '0000-00-00', '0000-00-00', 'BXeU77r', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(789, 'Landratsamt', 'Alb-Donau-Kreis', 'Landratsamt Alb-Donau-Kreis', 'Schillerstraße 30', '89077', 'Ulm', '0731/185-0', 'www.alb-donau-kreis.de', 'info@alb-donau-kreis.de', '0000-00-00', '0000-00-00', 'a39h9EC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(790, 'Landratsamt', 'Biberach', 'Landratsamt Biberach', 'Rollinstraße 9', '88400', 'Biberach', '07351 52-0', 'www.biberach.de', 'landrat@biberach.de', '0000-00-00', '0000-00-00', 'WvV3Mpu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(791, 'Landratsamt', 'Böblingen', 'Landratsamt Böblingen', 'Parkstr. 16', '71034', 'Böblingen', '07031/663-1202', 'www.landkreis-boeblingen.de', 'posteingang@lrabb.de', '0000-00-00', '0000-00-00', 'TcuY6ep', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(792, 'Landratsamt', 'Bodenseekreis', 'Landratsamt Bodenseekreis', 'Glärnischstraße 1-3', '88045', 'Friedrichshafen', '', 'www.bodenseekreis.de', 'info@bodenseekreis.de', '0000-00-00', '0000-00-00', 'kVYTtx?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(793, 'Landratsamt', 'Breisgau-Hochschwarzwald', 'Landratsamt Breisgau-Hochschwarzwald', 'Stadtstraße 2', '79104', 'Freiburg i. Br.', '0761/2187-0', 'www.breisgau-hochschwarzwald.de', 'pressestelle@breisgau-hochschwarzwald.de', '0000-00-00', '0000-00-00', 'vYx3C9B', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(794, 'Landratsamt', 'Calw', 'Landratsamt Calw', 'Vogteistraße 42-46', '75365', 'Calw', '', 'www.kreis-calw.de', 'lra.info@kreis-calw.de', '0000-00-00', '0000-00-00', 'sPwfEAU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(795, 'Landratsamt', 'Emmendingen', 'Landratsamt Emmendingen', 'Bahnhofstraße 2-4', '79312', 'Emmendingen', '07641/451-200', 'www.landkreis-emmendingen.de', 'landrat@landkreis-emmendingen.de', '0000-00-00', '0000-00-00', 'UpUTann', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(796, 'Landratsamt', 'Enzkreis', 'Landratsamt Enzkreis', 'Zähringerallee 3', '75177', 'Pforzheim', '', 'www.enzkreis.de', 'Bastian.Rosenau@enzkreis.de', '0000-00-00', '0000-00-00', 'UgLXA2K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(797, 'Landratsamt', 'Esslingen', 'Landratsamt Esslingen', 'Pulverwiesen 11', '73726', 'Esslingen a.N.', '0711/3902-2000', 'www.landkreis-esslingen.de', 'Landrat.Heinz.Eininger@Landkreis-Esslingen.de', '0000-00-00', '0000-00-00', 'a8sAWK9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(798, 'Landratsamt', 'Freudenstadt', 'Landratsamt Freudenstadt', 'Herrenfelder Straße 14', '72250', 'Freudenstadt', '07441/920-1000', 'www.landkreis-freudenstadt.de', 'rueckert@landkreis-freudenstadt.de', '0000-00-00', '0000-00-00', 'uyXsy8F', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(799, 'Landratsamt', 'Göppingen', 'Landratsamt Göppingen', 'Lorcher Straße 6', '73033', 'Göppingen', '07161/202-380', 'www.landkreis-goeppingen.de', 'e.wolff@landkreis-goeppingen.de', '0000-00-00', '0000-00-00', 'VXeTa!u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(800, 'Landratsamt', 'Heidenheim', 'Landratsamt Heidenheim', 'Felsenstraße 36', '89518', 'Heidenheim', '07321/321-201', 'www.landkreis-heidenheim.de', 'post@landkreis-heidenheim.de', '0000-00-00', '0000-00-00', 'vd4Tp94', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(801, 'Landratsamt', 'Heilbronn', 'Landratsamt Heilbronn', 'Lerchenstraße 40', '74072', 'Heilbronn', '', 'www.landkreis-heilbronn.de', 'detlef.piepenburg@landratsamt-heilbronn.de', '0000-00-00', '0000-00-00', 'h#PUxnN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(802, 'Landratsamt', 'Hohenlohekreis', 'Landratsamt Hohenlohekreis', 'Allee 17', '74653', 'Künzelsau', '07940/18-200', 'www.hohenlohekreis.de', 'info@Hohenlohekreis.de', '0000-00-00', '0000-00-00', 'JZZkL4y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(803, 'Landratsamt', 'Karlsruhe', 'Landratsamt Karlsruhe', 'Beiertheimer Allee 2', '76137', 'Karlsruhe', '', 'www.landkreis-karlsruhe.de', 'posteingang@landratsamt-karlsruhe.de', '0000-00-00', '0000-00-00', 'N5AAYXw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(804, 'Landratsamt', 'Konstanz', 'Landratsamt Konstanz', 'Benediktinerplatz 1', '78467', 'Konstanz', '', 'www.landkreis-konstanz.de', 'lrakn@lrakn.de', '0000-00-00', '0000-00-00', 'D4X-zND', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(805, 'Landratsamt', 'Lörrach', 'Landratsamt Lörrach', 'Palmstraße 3', '79539', 'Lörrach', '', 'www.loerrach-landkreis.de', 'mail@loerrach-landkreis.de', '0000-00-00', '0000-00-00', 'XHxt3Fv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(806, 'Landratsamt', 'Ludwigsburg', 'Landratsamt Ludwigsburg', 'Hindenburgstraße 40', '71638', 'Ludwigsburg', '', 'www.landkreis-ludwigsburg.de', 'mail@landkreis-ludwigsburg.de', '0000-00-00', '0000-00-00', '--DUJ-8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(807, 'Landratsamt', 'Main-Tauber-Kreis', 'Landratsamt Main-Tauber-Kreis', 'Gartenstraße 1', '97941', 'Tauberbischofsheim', '', 'www.main-tauber-kreis.de', 'reinhard.frank@main-tauber-kreis.de', '0000-00-00', '0000-00-00', 'ytKUCp!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(808, 'Landratsamt', 'Neckar-Odenwald-Kreis', 'Landratsamt Neckar-Odenwald-Kreis', 'Renzstraße 10', '74821', 'Mosbach', '', 'www.neckar-odenwald-kreis.de', 'post@neckar-odenwald-kreis.de', '0000-00-00', '0000-00-00', '#bpzkNn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(809, 'Landratsamt', 'Ortenaukreis', 'Landratsamt Ortenaukreis', 'Badstraße 20', '77652', 'Offenburg', '0781/805-1200', 'www.ortenaukreis.de', 'buero.landrat@ortenaukreis.de', '0000-00-00', '0000-00-00', 'DybEgt#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(810, 'Landratsamt', 'Ostalbkreis', 'Landratsamt Ostalbkreis', 'Stuttgarter Straße 41', '73430', 'Aalen', '', 'www.ostalbkreis.de', 'info@ostalbkreis.de', '0000-00-00', '0000-00-00', 'SLGtz!-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(811, 'Landratsamt', 'Rastatt', 'Landratsamt Rastatt', 'Am Schlossplatz 5', '76437', 'Rastatt', '07222/381-1000', 'www.landkreis-rastatt.de', 'landrat@landkreis-rastatt.de', '0000-00-00', '0000-00-00', 'xF2HX24', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(812, 'Landratsamt', 'Ravensburg', 'Landratsamt Ravensburg', 'Friedenstraße 6', '88212', 'Ravensburg', '', 'www.landkreis-ravensburg.de', 'lra@landkreis-ravensburg.de', '0000-00-00', '0000-00-00', 'FHKJHg4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(813, 'Landratsamt', 'Rems-Murr-Kreis', 'Landratsamt Rems-Murr-Kreis', 'Alter Postplatz 10', '71332', 'Waiblingen', '', 'www.rems-murr-kreis.de', 'info@rems-murr-kreis.de', '0000-00-00', '0000-00-00', 'GL#MFvY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(814, 'Landratsamt', 'Reutlingen', 'Landratsamt Reutlingen', 'Bismarckstraße 47', '72764', 'Reutlingen', '', 'www.kreis-reutlingen.de', 'landrat@kreis-reutlingen.de', '0000-00-00', '0000-00-00', 'ywrhJLt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(815, 'Landratsamt', 'Rhein-Neckar-Kreis', 'Landratsamt Rhein-Neckar-Kreis', 'Kurfürstenanlage 38-40', '69115', 'Heidelberg', '06221/522-1221', 'www.rhein-neckar-kreis.de', 'susanne.tropf@rhein-neckar-kreis.de', '0000-00-00', '0000-00-00', 'APZDEq-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(816, 'Landratsamt', 'Rottweil', 'Landratsamt Rottweil', 'Königstraße 36', '78628', 'Rottweil', '0741/244-201', 'www.landkreis-rottweil.de', 'landrat@landkreis-rottweil.de', '0000-00-00', '0000-00-00', 'dK-yHDN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(817, 'Landratsamt', 'Schwäbisch Hall', 'Landratsamt Schwäbisch Hall', 'Münzstraße 1', '74523', 'Schwäbisch Hall', '0791/755-7215', 'www.landkreis-schwaebisch-hall.de', 'landrat@landkreis-schwaebisch-hall.de', '0000-00-00', '0000-00-00', '8Cfvtnd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(818, 'Landratsamt', 'Schwarzwald-Baar-Kreis', 'Landratsamt Schwarzwald-Baar-Kreis', 'Am Hoptbühl 2', '78048', 'Villingen-Schwenningen', '07721/913-7000', 'www.schwarzwald-baar-kreis.de', 'landrat@lrasbk.de', '0000-00-00', '0000-00-00', '-g8Lye9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(819, 'Landratsamt', 'Sigmaringen', 'Landratsamt Sigmaringen', 'Hohenzollern Str. 12', '72488', 'Sigmaringen', '07571/102-1011', 'www.landratsamt-sigmaringen.de', 'info@lrasig.de', '0000-00-00', '0000-00-00', 'AZS-Z55', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(820, 'Landratsamt', 'Tübingen', 'Landratsamt Tübingen', 'Wilhelm-Keil-Straße 50', '72072', 'Tübingen', '07071/207-5000', 'www.kreis-tuebingen.de', 'JWalter@kreis-tuebingen.de', '0000-00-00', '0000-00-00', 'MDvzEF#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(821, 'Landratsamt', 'Tuttlingen', 'Landratsamt Tuttlingen', 'Bahnhofstraße 100', '78532', 'Tuttlingen', '07461/926-9100', 'www.landkreis-tuttlingen.de', 's.baer@landkreis-tuttlingen.de', '0000-00-00', '0000-00-00', '?GXvbm?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(822, 'Landratsamt', 'Waldshut', 'Landratsamt Waldshut', 'Kaiserstraße 110', '79761', 'Waldshut-Tiengen', '07751/86-7001', 'www.landkreis-waldshut.de', 'landrat@landkreis-waldshut.de', '0000-00-00', '0000-00-00', '7ExNeDm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(823, 'Landratsamt', 'Zollernalbkreis', 'Landratsamt Zollernalbkreis', 'Hirschbergstraße 29', '72336', 'Balingen', '07433/92-1002', 'www.zollernalbkreis.de', 'post@Zollernalbkreis.de', '0000-00-00', '0000-00-00', '-NLvJeh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(824, 'Stadtverwaltung', 'Aach', 'Stadtverwaltung Aach', 'Hauptstr. 16', '78267', 'Aach', '07774 9309-0', 'http://www.aach.de', 'gemeinde@aach.de', '0000-00-00', '0000-00-00', 'zNJuZWf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(825, 'Stadtverwaltung', 'Aalen', 'Stadtverwaltung Aalen', 'Marktplatz 30', '73430', 'Aalen', '07361 52-1100', 'http://www.aalen.de', 'ob-buero@aalen.de', '0000-00-00', '0000-00-00', 'k5bGNTN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(826, 'Stadtverwaltung', 'Achern', 'Stadtverwaltung Achern', 'Illenauer Allee 73', '77855', 'Achern', '07841 642-0', 'http://www.achern.de', 'stadtverwaltung@achern.de', '0000-00-00', '0000-00-00', '#GDL9rX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(827, 'Stadtverwaltung', 'Adelsheim', 'Stadtverwaltung Adelsheim', 'Marktstr. 7', '74740', 'Adelsheim', '06291 6200-0', 'http://www.adelsheim.de', 'wolfram.bernhardt@adelsheim.de', '0000-00-00', '0000-00-00', 'P3YrHHz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(828, 'Stadtverwaltung', 'Aichtal', 'Stadtverwaltung Aichtal', 'Waldenbucher Str. 30', '72631', 'Aichtal', '07127 5803-0', 'http://www.aichtal.de', 'stadt@aichtal.de', '0000-00-00', '0000-00-00', 'DWKTs7U', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(829, 'Stadtverwaltung', 'Albstadt', 'Stadtverwaltung Albstadt', 'Marktstr. 35', '72458', 'Albstadt', '07431 160-0', 'http://www.albstadt.de', 'stadtverwaltung@albstadt.de', '0000-00-00', '0000-00-00', 'tpdh5nP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(830, 'Stadtverwaltung', 'Alpirsbach', 'Stadtverwaltung Alpirsbach', 'Marktplatz 2', '72275', 'Alpirsbach', '07444 9516-0', 'http://www.alpirsbach.de', 'stadt@alpirsbach.de', '0000-00-00', '0000-00-00', 'rmVKyNR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(831, 'Stadtverwaltung', 'Altensteig', 'Stadtverwaltung Altensteig', 'Rathausplatz 1', '72213', 'Altensteig', '07453 9461-0', 'http://www.altensteig.de', 'info@altensteig.de', '0000-00-00', '0000-00-00', 'AYnZ#u8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(832, 'Stadtverwaltung', 'Asperg', 'Stadtverwaltung Asperg', 'Marktplatz 1', '71679', 'Asperg', '07141 269-0', 'http://www.asperg.de', 'info@asperg.de', '0000-00-00', '0000-00-00', 'rbWXeTZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(833, 'Stadtverwaltung', 'Aulendorf', 'Stadtverwaltung Aulendorf', 'Hauptstr. 35', '88326', 'Aulendorf', '07525 934-0', 'http://www.aulendorf.de', 'info@aulendorf.de', '0000-00-00', '0000-00-00', 'npub8NW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(834, 'Stadtverwaltung', 'Backnang', 'Stadtverwaltung Backnang', 'Am Rathaus 1', '71522', 'Backnang', '07191 894-0', 'http://www.backnang.de', 'stadt@backnang.de', '0000-00-00', '0000-00-00', 'E6h79BR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(835, 'Stadtverwaltung', 'Bad Buchau', 'Stadtverwaltung Bad Buchau', 'Marktplatz 2', '88422', 'Bad Buchau', '07582 808-0', 'http://www.badbuchau.de', 'stadt@bad-buchau.de', '0000-00-00', '0000-00-00', 'vFtDDnT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(836, 'Stadtverwaltung', 'Bad Dürrheim', 'Stadtverwaltung Bad Dürrheim', 'Luisenstr. 4', '78073', 'Bad Dürrheim', '07726 666-0', 'http://www.badduerrheim.de', 'jonathan.berggoetz@bad-duerrheim.de', '0000-00-00', '0000-00-00', '2yb6LJP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(837, 'Stadtverwaltung', 'Bad Friedrichshall', 'Stadtverwaltung Bad Friedrichshall', 'Rathausplatz 1', '74177', 'Bad Friedrichshall', '07136 832-0', 'http://www.friedrichshall.de', 'info@friedrichshall.de', '0000-00-00', '0000-00-00', 'eY4CdUA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(838, 'Stadtverwaltung', 'Bad Herrenalb', 'Stadtverwaltung Bad Herrenalb', 'Rathausplatz 11', '76332', 'Bad Herrenalb', '07083 5005-0', 'http://www.bad-herrenalb.de', 'info@badherrenalb.de', '0000-00-00', '0000-00-00', 'D2C6x2k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(839, 'Stadtverwaltung', 'Bad Krozingen', 'Stadtverwaltung Bad Krozingen', 'Basler Str. 30', '79189', 'Bad Krozingen', '07633 407-0', 'http://www.bad-krozingen.de', 'stadt@bad-krozingen.de', '0000-00-00', '0000-00-00', '2p8dDbG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(840, 'Stadtverwaltung', 'Bad Liebenzell', 'Stadtverwaltung Bad Liebenzell', 'Kurhausdamm 2 - 4', '75378', 'Bad Liebenzell', '07052 408-0', 'http://www.bad-liebenzell.de', 'stadt@bad-liebenzell.de', '0000-00-00', '0000-00-00', 'zGZ642c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(841, 'Stadtverwaltung', 'Bad Mergentheim', 'Stadtverwaltung Bad Mergentheim', 'Bahnhofplatz 1', '97980', 'Bad Mergentheim', '07931 57-0', 'http://www.bad-mergentheim.de', 'oberbuergermeister@bad-mergentheim.de', '0000-00-00', '0000-00-00', 'smrDmzv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(842, 'Stadtverwaltung', 'Bad Rappenau', 'Stadtverwaltung Bad Rappenau', 'Kirchplatz 4', '74906', 'Bad Rappenau', '07264 922-0', 'http://www.badrappenau.de', 'stadt@badrappenau.de', '0000-00-00', '0000-00-00', 'DN2Pmf!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(843, 'Stadtverwaltung', 'Bad Säckingen', 'Stadtverwaltung Bad Säckingen', 'Rathausplatz 1', '79713', 'Bad Säckingen', '07761 51-0', 'http://www.bad-saeckingen.de', 'info@bad-saeckingen.de', '0000-00-00', '0000-00-00', 'wpBmJXY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(844, 'Stadtverwaltung', 'Bad Saulgau', 'Stadtverwaltung Bad Saulgau', 'Oberamteistr. 11', '88348', 'Bad Saulgau', '07581 207-0', 'http://www.bad-saulgau.de', 'info@bad-saulgau.de', '0000-00-00', '0000-00-00', 'ZR2hS?m', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(845, 'Stadtverwaltung', 'Bad Schussenried', 'Stadtverwaltung Bad Schussenried', 'Wilhelm-Schussen-Str. 36', '88427', 'Bad Schussenried', '07583 9401-0', 'http://www.bad-schussenried.de', 'rathaus@bad-schussenried.de', '0000-00-00', '0000-00-00', 'xTmTxVD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(846, 'Stadtverwaltung', 'Bad Teinach-Zavelstein', 'Stadtverwaltung Bad Teinach-Zavelstein', 'Rathausstr. 9', '75385', 'Bad Teinach-Zavelstein', '07053 9292-0', 'http://www.bad-teinach-zavelstein.de', 'stadtverwaltung@bad-teinach-zavelstein.de', '0000-00-00', '0000-00-00', 'xA#KwSA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(847, 'Stadtverwaltung', 'Bad Urach', 'Stadtverwaltung Bad Urach', 'Marktplatz 9', '72574', 'Bad Urach', '07125 156-0', 'http://www.bad-urach.de', 'info@bad-urach.de', '0000-00-00', '0000-00-00', 'xKHhSY2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(848, 'Stadtverwaltung', 'Bad Waldsee', 'Stadtverwaltung Bad Waldsee', 'Hauptstr. 29', '88339', 'Bad Waldsee', '07524 94-0', 'http://www.bad-waldsee.de', 'info@bad-waldsee.de', '0000-00-00', '0000-00-00', 'zzWGKuZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(849, 'Stadtverwaltung', 'Bad Wildbad', 'Stadtverwaltung Bad Wildbad', 'Kernerstr. 11', '75323', 'Bad Wildbad', '07081 930-101', 'http://www.bad-wildbad.de', 'mail@bad-wildbad.de', '0000-00-00', '0000-00-00', 'RPFV#rk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(850, 'Stadtverwaltung', 'Bad Wimpfen', 'Stadtverwaltung Bad Wimpfen', 'Marktplatz 1', '74206', 'Bad Wimpfen', '07063 53-0', 'http://www.badwimpfen.de', 'stadtverwaltung@badwimpfen.de', '0000-00-00', '0000-00-00', 'ATchc#4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(851, 'Stadtverwaltung', 'Bad Wurzach', 'Stadtverwaltung Bad Wurzach', 'Marktstr. 16', '88410', 'Bad Wurzach', '07564 302-0', 'http://www.bad-wurzach.de', 'info@bad-wurzach.de', '0000-00-00', '0000-00-00', 'Cx-2!3S', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(852, 'Stadtverwaltung', 'Baden-Baden', 'Stadtverwaltung Baden-Baden', 'Marktplatz 2', '76530', 'Baden-Baden', '07221 93-0', 'http://www.baden-baden.de', 'bb@baden-baden.de', '0000-00-00', '0000-00-00', 'nv#6cPF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(853, 'Stadtverwaltung', 'Balingen', 'Stadtverwaltung Balingen', 'Färberstr. 2', '72336', 'Balingen', '07433 170-0', 'http://www.balingen.de', 'stadt@balingen.de', '0000-00-00', '0000-00-00', 'KsFVF7T', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(854, 'Stadtverwaltung', 'Beilstein', 'Stadtverwaltung Beilstein', 'Hauptstr. 19', '71717', 'Beilstein', '07062 263-0', 'http://www.beilstein-online.de', 'stadt@beilstein.de', '0000-00-00', '0000-00-00', '5WcmSTD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(855, 'Stadtverwaltung', 'Besigheim', 'Stadtverwaltung Besigheim', 'Marktplatz 12', '74354', 'Besigheim', '07143 8078-0', 'http://www.besigheim.de', 'stadtverwaltung@besigheim.de', '0000-00-00', '0000-00-00', 'xc4uRau', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(856, 'Stadtverwaltung', 'Biberach an der Riß', 'Stadtverwaltung Biberach an der Riß', 'Hindenburgstr. 1', '88400', 'Biberach an der Riß', '07351 51-0', 'http://www.biberach-riss.de', 'info@biberach-riss.de', '0000-00-00', '0000-00-00', 'E8CX#rq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(857, 'Stadtverwaltung', 'Bietigheim-Bissingen', 'Stadtverwaltung Bietigheim-Bissingen', 'Marktplatz 8', '74321', 'Bietigheim-Bissingen', '07142 74-0', 'http://www.bietigheim-bissingen.de', 'stadt@bietigheim-bissingen.de', '0000-00-00', '0000-00-00', 'd7m4Jw-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(858, 'Stadtverwaltung', 'Blaubeuren', 'Stadtverwaltung Blaubeuren', 'Karlstr. 2', '89143', 'Blaubeuren', '07344 9669-0', 'http://www.blaubeuren.de', 'info@blaubeuren.de', '0000-00-00', '0000-00-00', '5eqq3UN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(859, 'Stadtverwaltung', 'Blaustein', 'Stadtverwaltung Blaustein', 'Marktplatz 2', '89134', 'Blaustein', '07304 802-501', 'http://www.blaustein.de', 'stadt@blaustein.de', '0000-00-00', '0000-00-00', 'vh?rTrs', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(860, 'Stadtverwaltung', 'Blumberg', 'Stadtverwaltung Blumberg', 'Hauptstr. 97', '78176', 'Blumberg', '07702 51-100', 'http://www.stadt-blumberg.de', 'info@stadt-blumberg.de', '0000-00-00', '0000-00-00', 'w-N7?KJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(861, 'Stadtverwaltung', 'Böblingen', 'Stadtverwaltung Böblingen', 'Marktstr. 16', '71032', 'Böblingen', '07031 669-0', 'http://www.boeblingen.de', 'stadt@boeblingen.de', '0000-00-00', '0000-00-00', '3EyDg-N', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(862, 'Stadtverwaltung', 'Bonndorf im Schwarzwald', 'Stadtverwaltung Bonndorf im Schwarzwald', 'Martinstr. 8', '79848', 'Bonndorf im Schwarzwald', '07703 9380-0', 'http://www.bonndorf.de', 'buergerservice@bonndorf.de', '0000-00-00', '0000-00-00', 'RaZfx-5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(863, 'Stadtverwaltung', 'Bönnigheim', 'Stadtverwaltung Bönnigheim', 'Kirchheimer Str. 1', '74357', 'Bönnigheim', '07143 273-0', 'http://www.boennigheim.de', 'Albrecht.Dautel@boennigheim.de', '0000-00-00', '0000-00-00', 'qKK#TYa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(864, 'Stadtverwaltung', 'Bopfingen', 'Stadtverwaltung Bopfingen', 'Marktplatz 1', '73441', 'Bopfingen', '07362 801-10', 'http://www.bopfingen.de', 'G.Buehler@bopfingen.de', '0000-00-00', '0000-00-00', 'HzcqHtY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(865, 'Stadtverwaltung', 'Boxberg', 'Stadtverwaltung Boxberg', 'Kurpfalzstr. 29', '97944', 'Boxberg', '07930 605-0', 'http://www.boxberg.de', 'christian.kremer@stadt-boxberg.de', '0000-00-00', '0000-00-00', 'BK#NFJA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(866, 'Stadtverwaltung', 'Brackenheim', 'Stadtverwaltung Brackenheim', 'Marktplatz 1', '74336', 'Brackenheim', '07135 105-0', 'http://www.brackenheim.de', 'info@brackenheim.de', '0000-00-00', '0000-00-00', 'JH-kDwm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(867, 'Stadtverwaltung', 'Bräunlingen', 'Stadtverwaltung Bräunlingen', 'Kirchstr. 10', '78199', 'Bräunlingen', '0771 603-0', 'http://www.braeunlingen.de', 'Juergen.Guse@braeunlingen.de', '0000-00-00', '0000-00-00', 'LWFX-Rk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(868, 'Stadtverwaltung', 'Breisach am Rhein', 'Stadtverwaltung Breisach am Rhein', 'Münsterplatz 1', '79206', 'Breisach am Rhein', '07667 832-0', 'http://www.breisach.de', 'info@breisach.de', '0000-00-00', '0000-00-00', '4b9NU5Y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(869, 'Stadtverwaltung', 'Bretten', 'Stadtverwaltung Bretten', 'Untere Kirchgasse 9', '75015', 'Bretten', '07252 921-0', 'http://www.bretten.de', 'stadt@bretten.de', '0000-00-00', '0000-00-00', 'yGx?9R9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(870, 'Stadtverwaltung', 'Bruchsal', 'Stadtverwaltung Bruchsal', 'Kaiserstr. 66', '76646', 'Bruchsal', '07251 79-0', 'http://www.bruchsal.de', 'info@bruchsal.de', '0000-00-00', '0000-00-00', '7Uu3man', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(871, 'Stadtverwaltung', 'Buchen (Odenwald)', 'Stadtverwaltung Buchen (Odenwald)', 'Wimpinaplatz 3', '74722', 'Buchen (Odenwald)', '06281 31-0', 'http://www.buchen.de', 'Roland.Burger@buchen.de', '0000-00-00', '0000-00-00', 'WfEHa95', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(872, 'Stadtverwaltung', 'Bühl', 'Stadtverwaltung Bühl', 'Hauptstr. 47', '77815', 'Bühl', '07223 935-0', 'http://www.buehl.de', 'stadt@buehl.de', '0000-00-00', '0000-00-00', 'vGekJm!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(873, 'Stadtverwaltung', 'Burladingen', 'Stadtverwaltung Burladingen', 'Hauptstr. 49', '72393', 'Burladingen', '07475 892-0', 'http://www.burladingen.de', 'info@burladingen.de', '0000-00-00', '0000-00-00', '42#tqLn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(874, 'Stadtverwaltung', 'Calw', 'Stadtverwaltung Calw', 'Am Marktplatz 9', '75365', 'Calw', '07051 167-0', 'http://www.calw.de', 'stadt@calw.de', '0000-00-00', '0000-00-00', 'JX?D!ZG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(875, 'Stadtverwaltung', 'Crailsheim', 'Stadtverwaltung Crailsheim', 'Marktplatz 1-2', '74564', 'Crailsheim', '07951 403-0', 'http://www.crailsheim.de', 'info@crailsheim.de', '0000-00-00', '0000-00-00', 'aF4qwZ9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(876, 'Stadtverwaltung', 'Creglingen', 'Stadtverwaltung Creglingen', 'Torstr. 2', '97993', 'Creglingen', '07933 701-0', 'http://www.creglingen.de', 'info@creglingen.de', '0000-00-00', '0000-00-00', 'LY4Pxr7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(877, 'Stadtverwaltung', 'Dietenheim', 'Stadtverwaltung Dietenheim', 'Königstr. 63', '89165', 'Dietenheim', '07347 9696-0', 'http://www.dietenheim.de', 'stadtverwaltung@dietenheim.de', '0000-00-00', '0000-00-00', 'AYeYw9n', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(878, 'Stadtverwaltung', 'Ditzingen', 'Stadtverwaltung Ditzingen', 'Am Laien 1', '71254', 'Ditzingen', '07156 164-0', 'http://www.ditzingen.de', 'ob@ditzingen.de', '0000-00-00', '0000-00-00', 'bTFSU9K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(879, 'Stadtverwaltung', 'Donaueschingen', 'Stadtverwaltung Donaueschingen', 'Rathausplatz 1', '78166', 'Donaueschingen', '0771 857-0', 'http://www.donaueschingen.de', 'stadt@donaueschingen.de', '0000-00-00', '0000-00-00', 'xHavKnH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(880, 'Stadtverwaltung', 'Donzdorf', 'Stadtverwaltung Donzdorf', 'Schloss 1-4', '73072', 'Donzdorf', '07162 922-0', 'http://www.donzdorf.de', 'stadt@donzdorf.de', '0000-00-00', '0000-00-00', 'C63PV2v', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(881, 'Stadtverwaltung', 'Dornhan', 'Stadtverwaltung Dornhan', 'Obere Torstr. 2', '72175', 'Dornhan', '07455 9381-0', 'http://www.dornhan.de/dornhan/index.htm', 'Markus.Huber@dornhan.de', '0000-00-00', '0000-00-00', 'ufmHtFh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(882, 'Stadtverwaltung', 'Dornstetten', 'Stadtverwaltung Dornstetten', 'Marktplatz 1+2', '72280', 'Dornstetten', '07443 9620-11', 'http://www.dornstetten.de', 'stadtverwaltung@dornstetten.de', '0000-00-00', '0000-00-00', 'seqa7uZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(883, 'Stadtverwaltung', 'Eberbach', 'Stadtverwaltung Eberbach', 'Leopoldsplatz 1', '69412', 'Eberbach', '06271 87-1', 'http://www.eberbach.de', 'stadt@eberbach.de', '0000-00-00', '0000-00-00', 'DdznSdy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(884, 'Stadtverwaltung', 'Ebersbach an der Fils', 'Stadtverwaltung Ebersbach an der Fils', 'Marktplatz 1', '73061', 'Ebersbach an der Fils', '07163 161-100', 'http://www.ebersbach.de', 'keller@stadt.ebersbach.de', '0000-00-00', '0000-00-00', 'bvcvPZP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(885, 'Stadtverwaltung', 'Ehingen (Donau)', 'Stadtverwaltung Ehingen (Donau)', 'Marktplatz 1', '89584', 'Ehingen (Donau)', '07391 503-0', 'http://www.ehingen.de', 'info@ehingen.de', '0000-00-00', '0000-00-00', 'kHCYLg4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(886, 'Stadtverwaltung', 'Eislingen/Fils', 'Stadtverwaltung Eislingen/Fils', 'Schlossplatz 1', '73054', 'Eislingen/Fils', '07161 804-0', 'http://www.eislingen.de', 'OB_Heininger@eislingen.de', '0000-00-00', '0000-00-00', 'PX9uAzn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(887, 'Stadtverwaltung', 'Ellwangen (Jagst)', 'Stadtverwaltung Ellwangen (Jagst)', 'Spitalstr.4', '73479', 'Ellwangen (Jagst)', '07961 84-0', 'www.ellwangen.de', 'info@ellwangen.de', '0000-00-00', '0000-00-00', '5#8LRqE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(888, 'Stadtverwaltung', 'Elzach', 'Stadtverwaltung Elzach', 'Hauptstr. 69', '79215', 'Elzach', '07682 804-0', 'http://www.elzach.de', 'roland.tibi@elzach.de', '0000-00-00', '0000-00-00', '?5Ratsp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(889, 'Stadtverwaltung', 'Emmendingen', 'Stadtverwaltung Emmendingen', 'Landvogtei 10', '79312', 'Emmendingen', '07641 452-0', 'http://www.emmendingen.de', 'stadt@emmendingen.de', '0000-00-00', '0000-00-00', 'cCMRBH2', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(890, 'Stadtverwaltung', 'Endingen am Kaiserstuhl', 'Stadtverwaltung Endingen am Kaiserstuhl', 'Marktplatz 6', '79346', 'Endingen am Kaiserstuhl', '07642 6899-0', 'http://www.endingen.de', 'info@endingen.de', '0000-00-00', '0000-00-00', 'd8e#6Uu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(891, 'Stadtverwaltung', 'Engen', 'Stadtverwaltung Engen', 'Hauptstr. 11', '78234', 'Engen', '07733 502-0', 'http://www.engen.de', 'rathaus@engen.de', '0000-00-00', '0000-00-00', 'BNncG7e', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(892, 'Stadtverwaltung', 'Eppelheim', 'Stadtverwaltung Eppelheim', 'Schulstr. 2', '69214', 'Eppelheim', '06221 794-0', 'http://www.eppelheim.de', 'info@eppelheim.de', '0000-00-00', '0000-00-00', 'ZNN8uf4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(893, 'Stadtverwaltung', 'Eppingen', 'Stadtverwaltung Eppingen', 'Marktplatz 1', '75031', 'Eppingen', '07262 920-0', 'http://www.eppingen.de', 'rathaus@eppingen.de', '0000-00-00', '0000-00-00', '4GEgqZB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(894, 'Stadtverwaltung', 'Erbach', 'Stadtverwaltung Erbach', 'Erlenbachstr. 50', '89155', 'Erbach', '07305 9676-0', 'http://www.erbach-donau.de', 'info@erbach-donau.de', '0000-00-00', '0000-00-00', 'gaUeMBa', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(895, 'Stadtverwaltung', 'Esslingen am Neckar', 'Stadtverwaltung Esslingen am Neckar', 'Rathausplatz 2', '73728', 'Esslingen am Neckar', '0711 3512-0', 'http://www.esslingen.de', 'stadt.esslingen@esslingen.de', '0000-00-00', '0000-00-00', '6kvLety', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(896, 'Stadtverwaltung', 'Ettenheim', 'Stadtverwaltung Ettenheim', 'Kirchstr. 4', '77955', 'Ettenheim', '07822 432-0', 'http://www.ettenheim.de', 'stadtverwaltung@ettenheim.de', '0000-00-00', '0000-00-00', 'AeSvgdZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(897, 'Stadtverwaltung', 'Ettlingen', 'Stadtverwaltung Ettlingen', 'Marktplatz 2', '76275', 'Ettlingen', '07243 101-01', 'http://www.ettlingen.de', 'hauptamt@ettlingen.de', '0000-00-00', '0000-00-00', 'RnR9Cwk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(898, 'Stadtverwaltung', 'Fellbach', 'Stadtverwaltung Fellbach', 'Marktplatz 1', '70734', 'Fellbach', '0711 5851-0', 'http://www.fellbach.de', 'rathaus@fellbach.de', '0000-00-00', '0000-00-00', 'a37rduR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(899, 'Stadtverwaltung', 'Filderstadt', 'Stadtverwaltung Filderstadt', 'Aicher Str. 9', '70794', 'Filderstadt', '0711 7003-0', 'http://www.filderstadt.de', 'stadt@filderstadt.de', '0000-00-00', '0000-00-00', 'zwsZgbU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(900, 'Stadtverwaltung', 'Forchtenberg', 'Stadtverwaltung Forchtenberg', 'Hauptstr. 14', '74670', 'Forchtenberg', '07947 9111-0', 'http://www.forchtenberg.de', 'Michael.Foss@forchtenberg.de', '0000-00-00', '0000-00-00', 'gsacFDR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(901, 'Stadtverwaltung', 'Freiberg am Neckar', 'Stadtverwaltung Freiberg am Neckar', 'Marktplatz 2', '71691', 'Freiberg am Neckar', '07141 278-0', 'http://www.freiberg-an.de', 'bm@freiberg-an.de', '0000-00-00', '0000-00-00', 'Wp3GgZv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(902, 'Stadtverwaltung', 'Freiburg im Breisgau', 'Stadtverwaltung Freiburg im Breisgau', 'Rathausplatz 2-4', '79098', 'Freiburg im Breisgau', '0761 201-0', 'http://www.freiburg.de', 'rathausinformation@stadt.freiburg.de', '0000-00-00', '0000-00-00', 'Yv6kDH4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(903, 'Stadtverwaltung', 'Freudenberg', 'Stadtverwaltung Freudenberg', 'Hauptstr. 152', '97896', 'Freudenberg', '09375 9200-0', 'http://www.freudenberg-main.de', 'Roger.Henning@freudenberg-main.de', '0000-00-00', '0000-00-00', 'S#ZvvLt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(904, 'Stadtverwaltung', 'Freudenstadt', 'Stadtverwaltung Freudenstadt', 'Marktplatz 1', '72250', 'Freudenstadt', '07441 890-200', 'http://www.freudenstadt.de', 'info@freudenstadt.de', '0000-00-00', '0000-00-00', '9AFJ7#h', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(905, 'Stadtverwaltung', 'Fridingen an der Donau', 'Stadtverwaltung Fridingen an der Donau', 'Kirchplatz 2', '78567', 'Fridingen an der Donau', '07463 837-0', 'http://www.fridingen.de', 'waizenegger@fridingen.de', '0000-00-00', '0000-00-00', 'z4yXDBW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(906, 'Stadtverwaltung', 'Friedrichshafen', 'Stadtverwaltung Friedrichshafen', 'Adenauerplatz 1', '88045', 'Friedrichshafen', '07541 203-0', 'http://www.friedrichshafen.de', 'stadtverwaltung@friedrichshafen.de', '0000-00-00', '0000-00-00', '9wV4c8B', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(907, 'Stadtverwaltung', 'Furtwangen im Schwarzwald', 'Stadtverwaltung Furtwangen im Schwarzwald', 'Marktplatz 4', '78120', 'Furtwangen im Schwarzwald', '07723 939-0', 'http://www.furtwangen.de', 'stadt@furtwangen.de', '0000-00-00', '0000-00-00', 'UeLexws', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(908, 'Stadtverwaltung', 'Gaggenau', 'Stadtverwaltung Gaggenau', 'Hauptstr. 71', '76571', 'Gaggenau', '07225 962-0', 'http://www.gaggenau.de', 'gaggenau.stadt@gaggenau.de', '0000-00-00', '0000-00-00', 'vF--sNK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(909, 'Stadtverwaltung', 'Gaildorf', 'Stadtverwaltung Gaildorf', 'Schloßstr. 20', '74405', 'Gaildorf', '07971 253-0', 'http://www.gaildorf.de', 'stadt@gaildorf.de', '0000-00-00', '0000-00-00', 'cbttAmc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(910, 'Stadtverwaltung', 'Gammertingen', 'Stadtverwaltung Gammertingen', 'Hohenzollernstr. 5', '72501', 'Gammertingen', '07574 406-0', 'http://www.gammertingen.de', 'stadt.gammertingen@t-online.de', '0000-00-00', '0000-00-00', 'JSyBZ-u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(911, 'Stadtverwaltung', 'Geisingen', 'Stadtverwaltung Geisingen', 'Hauptstr. 36', '78187', 'Geisingen', '07704 807-0', 'http://www.geisingen.de', 'm.numberger@geisingen.de', '0000-00-00', '0000-00-00', 'C6dVrL!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(912, 'Stadtverwaltung', 'Geislingen', 'Stadtverwaltung Geislingen', 'Vorstadtstr. 9', '72351', 'Geislingen', '07433 9684-0', 'http://www.stadt-geislingen.de', 'info@stadt-geislingen.de', '0000-00-00', '0000-00-00', 'JdxygmG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(913, 'Stadtverwaltung', 'Geislingen an der Steige', 'Stadtverwaltung Geislingen an der Steige', 'Hauptstr. 1', '73312', 'Geislingen an der Steige', '07331 24-0', 'http://www.geislingen.de', 'Frank.Dehmer@geislingen.de', '0000-00-00', '0000-00-00', '?VfEbX!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(914, 'Stadtverwaltung', 'Gengenbach', 'Stadtverwaltung Gengenbach', 'Hauptstraße 17', '77723', 'Gengenbach', '07803 930-0', 'http://www.stadt-gengenbach.de', 'buergermeister@stadt-gengenbach.de', '0000-00-00', '0000-00-00', 'u7KqRA5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(915, 'Stadtverwaltung', 'Gerabronn', 'Stadtverwaltung Gerabronn', 'Blaufeldener Str. 14', '74582', 'Gerabronn', '07952 604-0', 'http://www.gerabronn.de', 'klaus-dieter.schumm@gerabronn.de', '0000-00-00', '0000-00-00', 'hbm32yF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(916, 'Stadtverwaltung', 'Gerlingen', 'Stadtverwaltung Gerlingen', 'Rathausplatz 1', '70839', 'Gerlingen', '07156 205-0', 'http://www.gerlingen.de', 'stadt@gerlingen.de', '0000-00-00', '0000-00-00', 'vUGVKqA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(917, 'Stadtverwaltung', 'Gernsbach', 'Stadtverwaltung Gernsbach', 'Igelbachstr. 11', '76593', 'Gernsbach', '07224 644-0', 'http://www.gernsbach.de', 'Dieter.Knittel@gernsbach.de', '0000-00-00', '0000-00-00', 'GKK7NfC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(918, 'Stadtverwaltung', 'Giengen an der Brenz', 'Stadtverwaltung Giengen an der Brenz', 'Marktstr. 11', '89537', 'Giengen an der Brenz', '07322 952-0', 'http://www.giengen.de', 'stadtverwaltung@giengen.de', '0000-00-00', '0000-00-00', '8hFy#kY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(919, 'Stadtverwaltung', 'Göppingen', 'Stadtverwaltung Göppingen', 'Hauptstr. 1', '73033', 'Göppingen', '07161 650-0', 'http://www.goeppingen.de', 'stadtverwaltung@goeppingen.de', '0000-00-00', '0000-00-00', 'hGFHrZb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(920, 'Stadtverwaltung', 'Großbottwar', 'Stadtverwaltung Großbottwar', 'Marktplatz 1', '71723', 'Großbottwar', '07148 31-0', 'http://www.grossbottwar.de', 'stadt@grossbottwar.de', '0000-00-00', '0000-00-00', 'J9Y-fvX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(921, 'Stadtverwaltung', 'Grünsfeld', 'Stadtverwaltung Grünsfeld', 'Hauptstr. 12', '97947', 'Grünsfeld', '09346 9211-0', 'http://www.gruensfeld.de', 'zentrale@gruensfeld.de', '0000-00-00', '0000-00-00', '4xGc2dN', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(922, 'Stadtverwaltung', 'Güglingen', 'Stadtverwaltung Güglingen', 'Marktstr. 19-21', '74363', 'Güglingen', '07135 108-0', 'http://www.gueglingen.de', 'stadt@gueglingen.de', '0000-00-00', '0000-00-00', 'Wh2knw5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(923, 'Stadtverwaltung', 'Gundelsheim', 'Stadtverwaltung Gundelsheim', 'Tiefenbacher Str. 16', '74831', 'Gundelsheim', '06269 96-0', 'http://www.gundelsheim.de', 'info@gundelsheim.de', '0000-00-00', '0000-00-00', 'zrcUX8!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(924, 'Stadtverwaltung', 'Haigerloch', 'Stadtverwaltung Haigerloch', 'Oberstadtstr. 11', '72401', 'Haigerloch', '07474 697-0', 'http://www.haigerloch.de', 'info@haigerloch.de', '0000-00-00', '0000-00-00', 'bnn-uJv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(925, 'Stadtverwaltung', 'Haiterbach', 'Stadtverwaltung Haiterbach', 'Marktplatz 1', '72221', 'Haiterbach', '07456 9388-0', 'http://www.haiterbach.de', 'info@haiterbach.de', '0000-00-00', '0000-00-00', 'zvnPgNw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(926, 'Stadtverwaltung', 'Haslach im Kinzigtal', 'Stadtverwaltung Haslach im Kinzigtal', 'Am Marktplatz 1', '77716', 'Haslach im Kinzigtal', '07832 706-0', 'http://www.haslach.de', 'stadt@haslach.de', '0000-00-00', '0000-00-00', 'VbqCZ5w', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(927, 'Stadtverwaltung', 'Hausach', 'Stadtverwaltung Hausach', 'Hauptstr. 40', '77756', 'Hausach', '07831 79-0', 'http://www.hausach.de', 'rathaus@hausach.de', '0000-00-00', '0000-00-00', 'XCCT4h?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(928, 'Stadtverwaltung', 'Hayingen', 'Stadtverwaltung Hayingen', 'Marktstr. 1', '72534', 'Hayingen', '07386 9777-0', 'http://www.hayingen.de', 'info@hayingen.de', '0000-00-00', '0000-00-00', 'R!P3xsG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(929, 'Stadtverwaltung', 'Hechingen', 'Stadtverwaltung Hechingen', 'Marktplatz 1', '72379', 'Hechingen', '07471 940-0', 'http://www.hechingen.de', 'buero.bm@hechingen.de', '0000-00-00', '0000-00-00', '7YhNRad', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(930, 'Stadtverwaltung', 'Heidelberg', 'Stadtverwaltung Heidelberg', 'Marktplatz 10', '69117', 'Heidelberg', '06221 5810-0', 'http://www.heidelberg.de', 'stadt@heidelberg.de', '0000-00-00', '0000-00-00', 'ZZ82vkR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(931, 'Stadtverwaltung', 'Heidenheim an der Brenz', 'Stadtverwaltung Heidenheim an der Brenz', 'Grabenstr. 15', '89522', 'Heidenheim an der Brenz', '07321 327-0', 'http://www.heidenheim.de', 'rathaus@heidenheim.de', '0000-00-00', '0000-00-00', '-bgrREB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(932, 'Stadtverwaltung', 'Heilbronn', 'Stadtverwaltung Heilbronn', 'Marktplatz 7', '74072', 'Heilbronn', '07131 56-0', 'http://www.heilbronn.de', 'posteingang@stadt-heilbronn.de', '0000-00-00', '0000-00-00', 'JPXksDF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(933, 'Stadtverwaltung', 'Heimsheim', 'Stadtverwaltung Heimsheim', 'Schlosshof 5', '71296', 'Heimsheim', '07033 5357-0', 'http://www.heimsheim.de', 'stadt@heimsheim.de', '0000-00-00', '0000-00-00', 'tsqhmpk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(934, 'Stadtverwaltung', 'Heitersheim', 'Stadtverwaltung Heitersheim', 'Hauptstr. 9', '79423', 'Heitersheim', '07634 402-0', 'http://www.heitersheim.de', 'stadt-heitersheim@heitersheim.de', '0000-00-00', '0000-00-00', 'GRC!PNW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(935, 'Stadtverwaltung', 'Hemsbach', 'Stadtverwaltung Hemsbach', 'Schloßgasse 41', '69502', 'Hemsbach', '06201 707-0', 'http://www.hemsbach.de', 'post@hemsbach.de', '0000-00-00', '0000-00-00', 'B3VkeRy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(936, 'Stadtverwaltung', 'Herbolzheim', 'Stadtverwaltung Herbolzheim', 'Hauptstr. 26', '79336', 'Herbolzheim', '07643 9177-0', 'http://www.herbolzheim.de', 'info@stadt-herbolzheim.de', '0000-00-00', '0000-00-00', '5qya6cr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(937, 'Stadtverwaltung', 'Herbrechtingen', 'Stadtverwaltung Herbrechtingen', 'Lange Str. 58', '89542', 'Herbrechtingen', '07324 955-0', 'http://www.herbrechtingen.de', 'info@herbrechtingen.de', '0000-00-00', '0000-00-00', 'q46Es9F', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(938, 'Stadtverwaltung', 'Herrenberg', 'Stadtverwaltung Herrenberg', 'Marktplatz 5', '71083', 'Herrenberg', '07032 924-0', 'http://www.herrenberg.de', 'stadt@herrenberg.de', '0000-00-00', '0000-00-00', 'HtbF8#s', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(939, 'Stadtverwaltung', 'Hettingen', 'Stadtverwaltung Hettingen', 'Rathaus im Schloss', '72513', 'Hettingen', '07574 9310-0', 'http://www.hettingen.de', 'kuster@hettingen.de', '0000-00-00', '0000-00-00', 'sPPDMyv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(940, 'Stadtverwaltung', 'Heubach', 'Stadtverwaltung Heubach', 'Hauptstr. 53', '73540', 'Heubach', '07173 181-0', 'http://www.heubach.de', 'info@heubach.de', '0000-00-00', '0000-00-00', 'xtqZsn5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(941, 'Stadtverwaltung', 'Hockenheim', 'Stadtverwaltung Hockenheim', 'Rathausstr. 1', '68766', 'Hockenheim', '06205 21-0', 'http://www.hockenheim.de', 'info@hockenheim.de', '0000-00-00', '0000-00-00', 'Fe#Dkvp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(942, 'Stadtverwaltung', 'Holzgerlingen', 'Stadtverwaltung Holzgerlingen', 'Böblinger Str. 5-7', '71088', 'Holzgerlingen', '07031 6808-0', 'http://www.holzgerlingen.de', 'delakos@holzgerlingen.de', '0000-00-00', '0000-00-00', 'ZRdev5k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(943, 'Stadtverwaltung', 'Horb am Neckar', 'Stadtverwaltung Horb am Neckar', 'Marktplatz 8', '72160', 'Horb am Neckar', '07451 901-0', 'http://www.horb.de', 'post@horb.de', '0000-00-00', '0000-00-00', 'MMPDpGg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(944, 'Stadtverwaltung', 'Hornberg', 'Stadtverwaltung Hornberg', 'Bahnhofstr. 1-3', '78132', 'Hornberg', '07833 793-0', 'http://www.hornberg.de', 'stadtverwaltung@hornberg.de', '0000-00-00', '0000-00-00', 'wtCd#U7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(945, 'Stadtverwaltung', 'Hüfingen', 'Stadtverwaltung Hüfingen', 'Hauptstr. 18', '78183', 'Hüfingen', '0771 6009-0', 'http://www.huefingen.de', 'info@huefingen.de', '0000-00-00', '0000-00-00', 'qV!22Ud', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(946, 'Stadtverwaltung', 'Ilshofen', 'Stadtverwaltung Ilshofen', 'Haller Str. 1', '74532', 'Ilshofen', '07904 702-0', 'http://www.ilshofen.de', 'info@ilshofen.de', '0000-00-00', '0000-00-00', 'z8KaTFV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(947, 'Stadtverwaltung', 'Ingelfingen', 'Stadtverwaltung Ingelfingen', 'Schloßstr. 12', '74653', 'Ingelfingen', '07940 1309-0', 'http://www.ingelfingen.de', 'info@ingelfingen.de', '0000-00-00', '0000-00-00', 'k7ev38f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(948, 'Stadtverwaltung', 'Isny im Allgäu', 'Stadtverwaltung Isny im Allgäu', 'Wassertorstr.1- 3', '88316', 'Isny im Allgäu', '07562 984-112', 'http://www.isny.de', 'info@isny.de', '0000-00-00', '0000-00-00', 'm#cRxpv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(949, 'Stadtverwaltung', 'Kandern', 'Stadtverwaltung Kandern', 'Waldeckstr. 39', '79400', 'Kandern', '07626 899-0', 'http://www.kandern.de', 'stadt@kandern.de', '0000-00-00', '0000-00-00', '3!4FSFJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(950, 'Stadtverwaltung', 'Karlsruhe', 'Stadtverwaltung Karlsruhe', 'Marktplatz', '76133', 'Karlsruhe', '0721 133-0', 'http://www.karlsruhe.de', 'stadt@karlsruhe.de', '0000-00-00', '0000-00-00', 'BGvtBsH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(951, 'Stadtverwaltung', 'Kehl', 'Stadtverwaltung Kehl', 'Hauptstr. 85', '77694', 'Kehl', '07851 88-0', 'http://www.kehl.de', 'info@stadt-kehl.de', '0000-00-00', '0000-00-00', '-qs83dJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(952, 'Stadtverwaltung', 'Kenzingen', 'Stadtverwaltung Kenzingen', 'Hauptstr. 15', '79341', 'Kenzingen', '07644 900-0', 'http://www.kenzingen.de', 'post@kenzingen.de', '0000-00-00', '0000-00-00', 'hgZ7RAS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(953, 'Stadtverwaltung', 'Kirchberg an der Jagst', 'Stadtverwaltung Kirchberg an der Jagst', 'Schloßstr. 10', '74592', 'Kirchberg an der Jagst', '07954 9801-0', 'http://www.kirchberg-jagst.de', 'info@kirchberg-jagst.de', '0000-00-00', '0000-00-00', '2?SfhY6', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(954, 'Stadtverwaltung', 'Kirchheim unter Teck', 'Stadtverwaltung Kirchheim unter Teck', 'Marktstr. 14', '73230', 'Kirchheim unter Teck', '07021 502-0', 'http://www.kirchheim-teck.de', 'info@kirchheim-teck.de', '0000-00-00', '0000-00-00', 'qWV!CJJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(955, 'Stadtverwaltung', 'Knittlingen', 'Stadtverwaltung Knittlingen', 'Marktstr. 19', '75438', 'Knittlingen', '07043 373-0', 'http://www.knittlingen.de', 'stadt.knittlingen@knittlingen.de', '0000-00-00', '0000-00-00', 'N7f#ABk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(956, 'Stadtverwaltung', 'Konstanz', 'Stadtverwaltung Konstanz', 'Kanzleistr. 15', '78462', 'Konstanz', '07531 900-0', 'http://www.konstanz.de', 'ob@stadt.konstanz.de', '0000-00-00', '0000-00-00', 'ynEW52x', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(957, 'Stadtverwaltung', 'Korntal-Münchingen', 'Stadtverwaltung Korntal-Münchingen', 'Saalplatz 4', '70825', 'Korntal-Münchingen', '0711 8367-0', 'http://www.korntal.de', 'stadt@korntal-muenchingen.de', '0000-00-00', '0000-00-00', 'qCnrhqC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(958, 'Stadtverwaltung', 'Kornwestheim', 'Stadtverwaltung Kornwestheim', 'Jakob-Sigle-Platz 1', '70806', 'Kornwestheim', '07154 202-0', 'http://www.kornwestheim.de', 'office@kornwestheim.de', '0000-00-00', '0000-00-00', 'tv3E6!M', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(959, 'Stadtverwaltung', 'Kraichtal', 'Stadtverwaltung Kraichtal', 'Rathausstr. 30', '76703', 'Kraichtal', '07250 77-0', 'http://www.kraichtal.de', 'bgm@kraichtal.de', '0000-00-00', '0000-00-00', 'rWyDn24', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(960, 'Stadtverwaltung', 'Krautheim', 'Stadtverwaltung Krautheim', 'Burgweg 5', '74238', 'Krautheim', '06294 98-0', 'http://www.krautheim.de', 'andreas.koehler@krautheim.de', '0000-00-00', '0000-00-00', 'H3HATH!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(961, 'Stadtverwaltung', 'Külsheim', 'Stadtverwaltung Külsheim', 'Kirchbergweg 7', '97900', 'Külsheim', '09345 673-0', 'http://www.kuelsheim.de', 'rathaus@kuelsheim.de', '0000-00-00', '0000-00-00', 'w?UN!Y3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(962, 'Stadtverwaltung', 'Künzelsau', 'Stadtverwaltung Künzelsau', 'Stuttgarter Str. 7', '74653', 'Künzelsau', '07940 129-0', 'http://www.kuenzelsau.de', 'info@kuenzelsau.de', '0000-00-00', '0000-00-00', 'r4sN2Fq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(963, 'Stadtverwaltung', 'Kuppenheim', 'Stadtverwaltung Kuppenheim', 'Friedensplatz', '76456', 'Kuppenheim', '07222 9462-100', 'http://www.kuppenheim.de', 'karsten.mussler@kuppenheim.de', '0000-00-00', '0000-00-00', 'zzgEdMG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(964, 'Stadtverwaltung', 'Ladenburg', 'Stadtverwaltung Ladenburg', 'Hauptstr. 7', '68526', 'Ladenburg', '06203 70-0', 'http://www.ladenburg.de', 'buergermeister@ladenburg.de', '0000-00-00', '0000-00-00', 'CvJ#8LH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(965, 'Stadtverwaltung', 'Lahr/Schwarzwald', 'Stadtverwaltung Lahr/Schwarzwald', 'Rathausplatz 4', '77933', 'Lahr/Schwarzwald', '07821 910-00', 'http://www.lahr.de', 'lahrinfo@lahr.de', '0000-00-00', '0000-00-00', 'vTFymdq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(966, 'Stadtverwaltung', 'Laichingen', 'Stadtverwaltung Laichingen', 'Bahnhofstr. 26', '89150', 'Laichingen', '07333 85-10', 'http://www.laichingen.de', 'kkaufmann@laichingen.de', '0000-00-00', '0000-00-00', 'dAYZ4VX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(967, 'Stadtverwaltung', 'Landeshauptstadt Stuttgart', 'Stadtverwaltung Landeshauptstadt Stuttgart', 'Marktplatz 1', '70173', 'Stuttgart', '0711 216-0', 'http://www.stuttgart.de', 'info@stuttgart.de', '0000-00-00', '0000-00-00', 'Dty34Lc', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(968, 'Stadtverwaltung', 'Langenau', 'Stadtverwaltung Langenau', 'Marktplatz 1', '89129', 'Langenau', '07345 9622-0', 'http://www.langenau.de', 'info@langenau.de', '0000-00-00', '0000-00-00', 'tCBe!E4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(969, 'Stadtverwaltung', 'Langenburg', 'Stadtverwaltung Langenburg', 'Hauptstr. 15', '74595', 'Langenburg', '07905 9102-0', 'http://www.langenburg.de', 'post@langenburg.de', '0000-00-00', '0000-00-00', 'yN2qF7L', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(970, 'Stadtverwaltung', 'Lauchheim', 'Stadtverwaltung Lauchheim', 'Hauptstr. 28', '73466', 'Lauchheim', '07363 85-0', 'http://www.lauchheim.de', 'info@lauchheim.de', '0000-00-00', '0000-00-00', 'qaw7XJ9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(971, 'Stadtverwaltung', 'Lauda-Königshofen', 'Stadtverwaltung Lauda-Königshofen', 'Marktplatz 1', '97922', 'Lauda-Königshofen', '09343 501-0', 'http://www.lauda-koenigshofen.de', 'post@lauda-koenigshofen.de', '0000-00-00', '0000-00-00', '7FSrN52', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(972, 'Stadtverwaltung', 'Laufenburg (Baden)', 'Stadtverwaltung Laufenburg (Baden)', 'Hauptstr. 30', '79725', 'Laufenburg (Baden)', '07763 806-0', 'http://www.laufenburg-baden.de', 'stadt@laufenburg-baden.de', '0000-00-00', '0000-00-00', '9T9KX5-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(973, 'Stadtverwaltung', 'Lauffen am Neckar', 'Stadtverwaltung Lauffen am Neckar', 'Rathausstr. 10', '74348', 'Lauffen am Neckar', '07133 106-0', 'http://www.lauffen.de', 'info@lauffen.de', '0000-00-00', '0000-00-00', 'tGNJnkF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(974, 'Stadtverwaltung', 'Laupheim', 'Stadtverwaltung Laupheim', 'Marktplatz 1', '88471', 'Laupheim', '07392 704-0', 'http://www.laupheim.de', 'stadt.laupheim@laupheim.de', '0000-00-00', '0000-00-00', 'FU7pL?!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(975, 'Stadtverwaltung', 'Lauterstein', 'Stadtverwaltung Lauterstein', 'Hauptstr. 75', '73111', 'Lauterstein', '07332 9669-0', 'http://www.lauterstein.de', 'bmlenz@lauterstein.de', '0000-00-00', '0000-00-00', 'BpzJzcv', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(976, 'Stadtverwaltung', 'Leimen', 'Stadtverwaltung Leimen', 'Rathausstr. 8', '69181', 'Leimen', '06224 704-0', 'http://www.leimen.de', 'ob@leimen.de', '0000-00-00', '0000-00-00', 'qX7gmFp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(977, 'Stadtverwaltung', 'Leinfelden-Echterdingen', 'Stadtverwaltung Leinfelden-Echterdingen', 'Marktplatz 1', '70771', 'Leinfelden-Echterdingen', '0711 1600-0', 'http://www.leinfelden-echterdingen.de', 'info@le-mail.de', '0000-00-00', '0000-00-00', 'B7GpH-n', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(978, 'Stadtverwaltung', 'Leonberg', 'Stadtverwaltung Leonberg', 'Belforter Platz 1', '71229', 'Leonberg', '07152 990-0', 'http://www.leonberg.de', 'ob@leonberg.de', '0000-00-00', '0000-00-00', '!Uq5W6v', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(979, 'Stadtverwaltung', 'Leutkirch im Allgäu', 'Stadtverwaltung Leutkirch im Allgäu', 'Marktstr. 26', '88299', 'Leutkirch im Allgäu', '07561 87-0', 'http://www.leutkirch.de', 'info@leutkirch.de', '0000-00-00', '0000-00-00', '9hTsR#5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(980, 'Stadtverwaltung', 'Lichtenau', 'Stadtverwaltung Lichtenau', 'Hauptstr. 15', '77839', 'Lichtenau', '07227 9577-0', 'http://www.lichtenau-baden.de', 'stadt@lichtenau-baden.de', '0000-00-00', '0000-00-00', 'e8SGTT5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(981, 'Stadtverwaltung', 'Löffingen', 'Stadtverwaltung Löffingen', 'Rathausplatz 1', '79843', 'Löffingen', '07654 802-0', 'http://www.loeffingen.de', 'info@loeffingen.de', '0000-00-00', '0000-00-00', '7pr3wA5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(982, 'Stadtverwaltung', 'Lorch', 'Stadtverwaltung Lorch', 'Hauptstr. 19', '73547', 'Lorch', '07172 1801-0', 'http://www.stadt-lorch.de', 'buehler@stadt-lorch.de', '0000-00-00', '0000-00-00', 'ZnpTK8z', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(983, 'Stadtverwaltung', 'Lörrach', 'Stadtverwaltung Lörrach', 'Luisenstr. 16', '79539', 'Lörrach', '07621 415-1', 'http://www.loerrach.de', 'stadt@loerrach.de', '0000-00-00', '0000-00-00', '?gvSDGR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(984, 'Stadtverwaltung', 'Löwenstein', 'Stadtverwaltung Löwenstein', 'Maybachstr. 32', '74245', 'Löwenstein', '07130 22-0', 'http://www.stadt-loewenstein.de', 'stadt-loewenstein@stadt-loewenstein.de', '0000-00-00', '0000-00-00', 'f!mgmmD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(985, 'Stadtverwaltung', 'Ludwigsburg', 'Stadtverwaltung Ludwigsburg', 'Wilhelmstr. 11', '71638', 'Ludwigsburg', '07141 910-0', 'http://www.ludwigsburg.de', 'rathaus@ludwigsburg.de', '0000-00-00', '0000-00-00', 'G9SScB9', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(986, 'Stadtverwaltung', 'Mahlberg', 'Stadtverwaltung Mahlberg', 'Rathausplatz 7', '77972', 'Mahlberg', '07825 8438-0', 'http://www.mahlberg.de', 'stadt@mahlberg.de', '0000-00-00', '0000-00-00', 'NyuEe6c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(987, 'Stadtverwaltung', 'Mannheim', 'Stadtverwaltung Mannheim', 'Rathaus E 5', '68159', 'Mannheim', '0621 293-0', 'http://www.mannheim.de', 'stadtverwaltung@mannheim.de', '0000-00-00', '0000-00-00', '4sCAMM5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(988, 'Stadtverwaltung', 'Marbach am Neckar', 'Stadtverwaltung Marbach am Neckar', 'Marktstr. 23', '71672', 'Marbach am Neckar', '07144 102-0', 'http://www.schillerstadt-marbach.de', 'jan.trost@schillerstadt-marbach.de', '0000-00-00', '0000-00-00', '6vw!GVJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(989, 'Stadtverwaltung', 'Markdorf', 'Stadtverwaltung Markdorf', 'Rathausplatz 1', '88677', 'Markdorf', '07544 500-0', 'http://www.markdorf.de', 'buergermeister@rathaus-markdorf.de', '0000-00-00', '0000-00-00', '6MDgAPV', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(990, 'Stadtverwaltung', 'Markgröningen', 'Stadtverwaltung Markgröningen', 'Marktplatz 1', '71706', 'Markgröningen', '07145 13-0', 'http://www.markgroeningen.de', 'info@markgroeningen.de', '0000-00-00', '0000-00-00', '4uF7Cm#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(991, 'Stadtverwaltung', 'Maulbronn', 'Stadtverwaltung Maulbronn', 'Klosterhof 31', '75433', 'Maulbronn', '07043 103-0', 'http://www.maulbronn.de', 'buergermeister@maulbronn.de', '0000-00-00', '0000-00-00', '76-8mG#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(992, 'Stadtverwaltung', 'Meersburg', 'Stadtverwaltung Meersburg', 'Marktplatz 1', '88709', 'Meersburg', '07532 440-0', 'http://www.meersburg.de', 'info@meersburg.de', '0000-00-00', '0000-00-00', 'qp5bsBC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(993, 'Stadtverwaltung', 'Mengen', 'Stadtverwaltung Mengen', 'Hauptstr. 90', '88512', 'Mengen', '07572 607-0', 'http://www.mengen.de', 'info@mengen.de', '0000-00-00', '0000-00-00', '2JZKE5L', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(994, 'Stadtverwaltung', 'Meßkirch', 'Stadtverwaltung Meßkirch', 'Conradin-Kreutzer-Str. 1', '88605', 'Meßkirch', '07575/20621', 'http://www.messkirch.de', 'info@messkirch.de', '0000-00-00', '0000-00-00', 'sA-7?cy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(995, 'Stadtverwaltung', 'Meßstetten', 'Stadtverwaltung Meßstetten', 'Hauptstr. 9', '72469', 'Meßstetten', '07431 6349-0', 'http://www.messstetten.de', 'stadt@messstetten.de', '0000-00-00', '0000-00-00', 'E2wup#a', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(996, 'Stadtverwaltung', 'Metzingen', 'Stadtverwaltung Metzingen', 'Stuttgarter Str. 2-4', '72555', 'Metzingen', '07123 925-215', 'http://www.metzingen.de', 'u.fiedler@metzingen.de', '0000-00-00', '0000-00-00', 'zk2#SqD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(997, 'Stadtverwaltung', 'Möckmühl', 'Stadtverwaltung Möckmühl', 'Hauptstr. 23', '74219', 'Möckmühl', '06298 202-0', 'http://www.moeckmuehl.de', 'info@moeckmuehl.de', '0000-00-00', '0000-00-00', '8E7gxNC', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(998, 'Stadtverwaltung', 'Mosbach', 'Stadtverwaltung Mosbach', 'Hauptstr. 29', '74821', 'Mosbach', '06261 82-200', 'http://www.mosbach.de', 'info@mosbach.de', '0000-00-00', '0000-00-00', 'X7GM#3R', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(999, 'Stadtverwaltung', 'Mössingen', 'Stadtverwaltung Mössingen', 'Freiherr-vom-Stein-Straße 20', '72116', 'Mössingen', '07473 370-100', 'http://www.moessingen.de', 'info@moessingen.de', '0000-00-00', '0000-00-00', 'HRgDmmd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1000, 'Stadtverwaltung', 'Mühlacker', 'Stadtverwaltung Mühlacker', 'Kelterplatz 7', '75417', 'Mühlacker', '07041 876-10', 'http://www.muehlacker.de', 'stadt@muehlacker.de', '0000-00-00', '0000-00-00', 'LduNzvy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1001, 'Stadtverwaltung', 'Mühlheim an der Donau', 'Stadtverwaltung Mühlheim an der Donau', 'Hauptstr.16', '78570', 'Mühlheim an der Donau', '07463 9940-0', 'http://www.muehlheim-donau.de', 'info@muehlheim-donau.de', '0000-00-00', '0000-00-00', 'fCn2cXL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1002, 'Stadtverwaltung', 'Müllheim', 'Stadtverwaltung Müllheim', 'Bismarckstr. 3', '79379', 'Müllheim', '07631 801-103', 'http://www.muellheim.de', 'buergermeisterin@muellheim.de', '0000-00-00', '0000-00-00', 'NdsXgx8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1003, 'Stadtverwaltung', 'Munderkingen', 'Stadtverwaltung Munderkingen', 'Marktstr. 1', '89597', 'Munderkingen', '07393 598-0', 'http://www.munderkingen.de', 'rathaus@munderkingen.de', '0000-00-00', '0000-00-00', 'yRNS#uK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1004, 'Stadtverwaltung', 'Münsingen', 'Stadtverwaltung Münsingen', 'Bachwiesenstr. 7', '72525', 'Münsingen', '07381 182-0', 'http://www.muensingen.de', 'stadt@muensingen.de', '0000-00-00', '0000-00-00', 'PzgMMGk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1005, 'Stadtverwaltung', 'Murrhardt', 'Stadtverwaltung Murrhardt', 'Marktplatz 10', '71540', 'Murrhardt', '07192 213-0', 'http://www.murrhardt.de', 'info@murrhardt.de', '0000-00-00', '0000-00-00', 'p#XhdNm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1006, 'Stadtverwaltung', 'Nagold', 'Stadtverwaltung Nagold', 'Marktstr. 27-29', '72202', 'Nagold', '07452 681-0', 'http://www.nagold.de', 'info@nagold.de', '0000-00-00', '0000-00-00', '5aNWyYF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1007, 'Stadtverwaltung', 'Neckarbischofsheim', 'Stadtverwaltung Neckarbischofsheim', 'Alexandergasse 2', '74924', 'Neckarbischofsheim', '07263 607-0', 'http://www.neckarbischofsheim.de', 'Tanja.grether@neckarbischofsheim.de', '0000-00-00', '0000-00-00', 'k4cnVtk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1008, 'Stadtverwaltung', 'Neckargemünd', 'Stadtverwaltung Neckargemünd', 'Bahnhofstr. 54', '69151', 'Neckargemünd', '06223 804-0', 'http://www.neckargemuend.de', 'stadtverwaltung@neckargemuend.de', '0000-00-00', '0000-00-00', 'MT6hLKu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1009, 'Stadtverwaltung', 'Neckarsulm', 'Stadtverwaltung Neckarsulm', 'Marktstr. 18', '74172', 'Neckarsulm', '07132 35-0', 'http://www.neckarsulm.de', 'info-stadt@neckarsulm.de', '0000-00-00', '0000-00-00', '9JcJDUT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1010, 'Stadtverwaltung', 'Neresheim', 'Stadtverwaltung Neresheim', 'Hauptstr. 20', '73450', 'Neresheim', '07326 81-0', 'http://www.neresheim.de', 'info@neresheim.de', '0000-00-00', '0000-00-00', 'JgcJHrU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1011, 'Stadtverwaltung', 'Neubulach', 'Stadtverwaltung Neubulach', 'Marktplatz 3', '75387', 'Neubulach', '07053 9695-14', 'http://www.neubulach.de', 'stadtverwaltung@neubulach.de', '0000-00-00', '0000-00-00', 'Gw8xfT!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1012, 'Stadtverwaltung', 'Neudenau', 'Stadtverwaltung Neudenau', 'Hauptstr. 27', '74861', 'Neudenau', '06264 9205-0', 'http://www.neudenau.de', 'zentrale@neudenau.de', '0000-00-00', '0000-00-00', 'VmNUKmW', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1013, 'Stadtverwaltung', 'Neuenbürg', 'Stadtverwaltung Neuenbürg', 'Rathausstr. 2', '75305', 'Neuenbürg', '07082 7910-0', 'http://www.neuenbuerg.de', 'stadtverwaltung@neuenbuerg.de', '0000-00-00', '0000-00-00', 'arMSrdd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1014, 'Stadtverwaltung', 'Neuenburg am Rhein', 'Stadtverwaltung Neuenburg am Rhein', 'Rathausplatz 5', '79395', 'Neuenburg am Rhein', '07631 791-0', 'http://www.neuenburg.de', 'stadtverwaltung@neuenburg.de', '0000-00-00', '0000-00-00', '4UtA2-a', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1015, 'Stadtverwaltung', 'Neuenstadt am Kocher', 'Stadtverwaltung Neuenstadt am Kocher', 'Hauptstr. 50', '74196', 'Neuenstadt am Kocher', '07139 97-0', 'http://www.neuenstadt.de', 'Norbert.Heuser@neuenstadt.de', '0000-00-00', '0000-00-00', '!k3KJ9T', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1016, 'Stadtverwaltung', 'Neuenstein', 'Stadtverwaltung Neuenstein', 'Schloßstr. 20', '74632', 'Neuenstein', '07942 105-0', 'http://www.neuenstein.de', 'km.Nicklas@neuenstein.de', '0000-00-00', '0000-00-00', 'BrbyA3Y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1017, 'Stadtverwaltung', 'Neuffen', 'Stadtverwaltung Neuffen', 'Hauptstr. 19', '72639', 'Neuffen', '07025 106-0', 'http://www.neuffen.de', 'stadt@neuffen.de', '0000-00-00', '0000-00-00', 'sDvxE6K', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1018, 'Stadtverwaltung', 'Niedernhall', 'Stadtverwaltung Niedernhall', 'Hauptstr. 30', '74676', 'Niedernhall', '07940 9125-0', 'http://www.niedernhall.de', 'info@niedernhall.de', '0000-00-00', '0000-00-00', '4dJWKCd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1019, 'Stadtverwaltung', 'Niederstetten', 'Stadtverwaltung Niederstetten', 'Albert-Sammt-Str. 1', '97996', 'Niederstetten', '07932 9102-0', 'http://www.niederstetten.de', 'Heike.Naber@niederstetten.de', '0000-00-00', '0000-00-00', 'vP!XRK-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1020, 'Stadtverwaltung', 'Niederstotzingen', 'Stadtverwaltung Niederstotzingen', 'Im Städtle 26', '89168', 'Niederstotzingen', '07325 102-0', 'http://www.niederstotzingen.de', 'info@niederstotzingen.de', '0000-00-00', '0000-00-00', 'qKp!t?M', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1021, 'Stadtverwaltung', 'Nürtingen', 'Stadtverwaltung Nürtingen', 'Marktstr. 7', '72622', 'Nürtingen', '07022 75-0', 'http://www.nuertingen.de', 'stadt@nuertingen.de', '0000-00-00', '0000-00-00', 'BRPbmS5', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1022, 'Stadtverwaltung', 'Oberkirch', 'Stadtverwaltung Oberkirch', 'Eisenbahnstr. 1', '77704', 'Oberkirch', '07802 82-0', 'http://www.oberkirch.de', 'stadt@oberkirch.de', '0000-00-00', '0000-00-00', '?sYbz5y', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1023, 'Stadtverwaltung', 'Oberkochen', 'Stadtverwaltung Oberkochen', 'Eugen-Bolz-Platz 1', '73447', 'Oberkochen', '07364 27-21', 'http://www.oberkochen.de', 'Peter.Traub@oberkochen.de', '0000-00-00', '0000-00-00', 'dLbbKSz', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1024, 'Stadtverwaltung', 'Oberndorf am Neckar', 'Stadtverwaltung Oberndorf am Neckar', 'Klosterstr. 3', '78727', 'Oberndorf am Neckar', '07423 77-0', 'http://www.oberndorf-neckar.de', 'stadt@oberndorf.de', '0000-00-00', '0000-00-00', 'EDnfZFh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1025, 'Stadtverwaltung', 'Oberriexingen', 'Stadtverwaltung Oberriexingen', 'Hauptstr. 14', '71739', 'Oberriexingen', '07042 909-0', 'http://www.oberriexingen.de', 'rathaus@oberriexingen.de', '0000-00-00', '0000-00-00', 'JH#p2Cw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1026, 'Stadtverwaltung', 'Ochsenhausen', 'Stadtverwaltung Ochsenhausen', 'Marktplatz 1', '88416', 'Ochsenhausen', '07352 9220-0', 'http://www.ochsenhausen.de', 'stadt@ochsenhausen.de', '0000-00-00', '0000-00-00', '!#kpeTy', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1027, 'Stadtverwaltung', 'Offenburg', 'Stadtverwaltung Offenburg', 'Hauptstr. 90', '77652', 'Offenburg', '0781 82-0', 'http://www.offenburg.de', 'rathaus@offenburg.de', '0000-00-00', '0000-00-00', 'fC?yNRe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1028, 'Stadtverwaltung', 'Öhringen', 'Stadtverwaltung Öhringen', 'Marktplatz 15', '74613', 'Öhringen', '07941 68-0', 'http://www.oehringen.de', 'info@oehringen.de', '0000-00-00', '0000-00-00', 'r7ChR#k', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1029, 'Stadtverwaltung', 'Oppenau', 'Stadtverwaltung Oppenau', 'Rathausplatz 1', '77728', 'Oppenau', '07804 48-0', 'http://www.oppenau.de', 'rathaus@oppenau.de', '0000-00-00', '0000-00-00', 'H8HGkpg', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1030, 'Stadtverwaltung', 'Osterburken', 'Stadtverwaltung Osterburken', 'Marktplatz 3', '74706', 'Osterburken', '06291 401-0', 'http://www.osterburken.de', 'info@osterburken.de', '0000-00-00', '0000-00-00', '67V7pxM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1031, 'Stadtverwaltung', 'Ostfildern', 'Stadtverwaltung Ostfildern', 'Klosterhof 10', '73760', 'Ostfildern', '0711 3404-0', 'http://www.ostfildern.de', 'oberbuergermeister@ostfildern.de', '0000-00-00', '0000-00-00', 'XE2vgL?', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1032, 'Stadtverwaltung', 'Östringen', 'Stadtverwaltung Östringen', 'Am Kirchberg 19', '76684', 'Östringen', '07253 207-0', 'http://www.oestringen.de', 'buergermeisteramt@oestringen.de', '0000-00-00', '0000-00-00', 'kgDJP7w', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1033, 'Stadtverwaltung', 'Owen', 'Stadtverwaltung Owen', 'Rathausstr. 8', '73277', 'Owen', '07021 8006-0', 'http://www.owen.de', 'v-groetzinger@owen.de', '0000-00-00', '0000-00-00', '#k3MF55', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1034, 'Stadtverwaltung', 'Pforzheim', 'Stadtverwaltung Pforzheim', 'Marktplatz 1', '75175', 'Pforzheim', '07231 39-0', 'http://www.pforzheim.de', 'poststelle@stadt-pforzheim.de', '0000-00-00', '0000-00-00', 'Rdr?Abw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1035, 'Stadtverwaltung', 'Pfullendorf', 'Stadtverwaltung Pfullendorf', 'Am Kirchplatz 1', '88630', 'Pfullendorf', '07552 251-0', 'http://www.pfullendorf.de', 'info@pfullendorf.de', '0000-00-00', '0000-00-00', 'GEY8Pe4', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1036, 'Stadtverwaltung', 'Pfullingen', 'Stadtverwaltung Pfullingen', 'Marktplatz 5', '72793', 'Pfullingen', '07121 703-0', 'http://www.pfullingen.de', 'info@pfullingen.de', '0000-00-00', '0000-00-00', 'MgRUYZu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1037, 'Stadtverwaltung', 'Philippsburg', 'Stadtverwaltung Philippsburg', 'Rote-Tor-Str. 6-10', '76661', 'Philippsburg', '07256 87-0', 'http://www.philippsburg.de', 'zentrale@philippsburg.de', '0000-00-00', '0000-00-00', 'SYE99qY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1038, 'Stadtverwaltung', 'Plochingen', 'Stadtverwaltung Plochingen', 'Schulstr. 5-7', '73207', 'Plochingen', '07153/7005-0', 'http://www.plochingen.de', 'rathaus@plochingen.de', '0000-00-00', '0000-00-00', 'DRe4fGS', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1039, 'Stadtverwaltung', 'Radolfzell am Bodensee', 'Stadtverwaltung Radolfzell am Bodensee', 'Marktplatz 2', '78315', 'Radolfzell am Bodensee', '07732 81-0', 'http://www.radolfzell.de', 'stadt@radolfzell.de', '0000-00-00', '0000-00-00', 'W6AWCrZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1040, 'Stadtverwaltung', 'Rastatt', 'Stadtverwaltung Rastatt', 'Marktplatz 1', '76437', 'Rastatt', '07222 972-0', 'http://www.rastatt.de', 'stadt@rastatt.de', '0000-00-00', '0000-00-00', 'NA5hPEU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1041, 'Stadtverwaltung', 'Rauenberg', 'Stadtverwaltung Rauenberg', 'Wieslocher Str. 21', '69231', 'Rauenberg', '06222 619-0', 'http://www.rauenberg.de', 'rathaus@rauenberg.de', '0000-00-00', '0000-00-00', 'JpAtNJ-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1042, 'Stadtverwaltung', 'Ravensburg', 'Stadtverwaltung Ravensburg', 'Marienplatz 26', '88212', 'Ravensburg', '0751 82-0', 'http://www.ravensburg.de', 'presse-stelle@ravensburg.de', '0000-00-00', '0000-00-00', 'W?e5PkM', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1043, 'Stadtverwaltung', 'Ravenstein', 'Stadtverwaltung Ravenstein', 'Lindenstr. 4', '74747', 'Ravenstein', '06297 9200-0', 'http://www.ravenstein.de', 'Hans-Peter.vonThenen@ravenstein.de', '0000-00-00', '0000-00-00', 'BS!F?!V', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1044, 'Stadtverwaltung', 'Remseck am Neckar', 'Stadtverwaltung Remseck am Neckar', 'Fellbacher Str. 2', '71686', 'Remseck am Neckar', '07146 289-0', 'http://www.remseck.de', 'info@remseck-am-neckar.de', '0000-00-00', '0000-00-00', 'BD2vuX3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1045, 'Stadtverwaltung', 'Renchen', 'Stadtverwaltung Renchen', 'Hauptstr. 57', '77871', 'Renchen', '07843 707-20', 'http://www.stadt-renchen.de', 'rathaus@stadt-renchen.de', '0000-00-00', '0000-00-00', 'vwCszFT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1046, 'Stadtverwaltung', 'Renningen', 'Stadtverwaltung Renningen', 'Hauptstr. 1', '71272', 'Renningen', '07159 924-0', 'http://www.renningen.de', 'faisst@renningen.de', '0000-00-00', '0000-00-00', '-E!g-5u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1047, 'Stadtverwaltung', 'Reutlingen', 'Stadtverwaltung Reutlingen', 'Marktplatz 22', '72764', 'Reutlingen', '07121 303-0', 'http://www.reutlingen.de', 'stadt@reutlingen.de', '0000-00-00', '0000-00-00', 'EyhvAKr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1048, 'Stadtverwaltung', 'Rheinau', 'Stadtverwaltung Rheinau', 'Rheinstr. 52', '77866', 'Rheinau', '07844 400-21', 'http://www.rheinau.de', 'mailpost@rheinau.de', '0000-00-00', '0000-00-00', 'wVagA!c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1049, 'Stadtverwaltung', 'Rheinfelden (Baden)', 'Stadtverwaltung Rheinfelden (Baden)', 'Kirchplatz 2', '79618', 'Rheinfelden (Baden)', '07623 95-0', 'http://www.rheinfelden.de', 'info@rheinfelden-baden.de', '0000-00-00', '0000-00-00', 'Wqrpmyt', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1050, 'Stadtverwaltung', 'Rheinstetten', 'Stadtverwaltung Rheinstetten', 'Rappenwörthstr. 49', '76287', 'Rheinstetten', '07242 9514-500', 'http://www.rheinstetten.de', 'rathaus@rheinstetten.de', '0000-00-00', '0000-00-00', 'uEUwJ7f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1051, 'Stadtverwaltung', 'Riedlingen', 'Stadtverwaltung Riedlingen', 'Marktplatz 1', '88499', 'Riedlingen', '07371 183-0', 'http://www.riedlingen.de', 'mschafft@riedlingen.de', '0000-00-00', '0000-00-00', 'gmsNSnm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1052, 'Stadtverwaltung', 'Rosenfeld', 'Stadtverwaltung Rosenfeld', 'Frauenberggasse 1', '72348', 'Rosenfeld', '07428 9392-0', 'http://www.rosenfeld.de', 'bm.miller@rosenfeld.de', '0000-00-00', '0000-00-00', 'RN5r77c', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1053, 'Stadtverwaltung', 'Rottenburg am Neckar', 'Stadtverwaltung Rottenburg am Neckar', 'Marktplatz 18', '72108', 'Rottenburg am Neckar', '07472 165-0', 'http://www.rottenburg.de', 'stadt@rottenburg.de', '0000-00-00', '0000-00-00', 'a2dTACH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1054, 'Stadtverwaltung', 'Rottweil', 'Stadtverwaltung Rottweil', 'Hauptstr. 21-23', '78628', 'Rottweil', '0741 494-0', 'http://www.rottweil.de', 'stadt@rottweil.de', '0000-00-00', '0000-00-00', 'D5RhZ9w', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1055, 'Stadtverwaltung', 'Rutesheim', 'Stadtverwaltung Rutesheim', 'Leonberger Str. 15', '71277', 'Rutesheim', '07152 5002-0', 'http://www.rutesheim.de', 'stadt@rutesheim.de', '0000-00-00', '0000-00-00', 'cR5ZrpG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1056, 'Stadtverwaltung', 'Sachsenheim', 'Stadtverwaltung Sachsenheim', 'Äußerer Schloßhof 3 und 5', '74343', 'Sachsenheim', '07147 28-0', 'http://www.sachsenheim.de', 'h.albrich@sachsenheim.de', '0000-00-00', '0000-00-00', 'uzXabKE', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1057, 'Stadtverwaltung', 'Scheer', 'Stadtverwaltung Scheer', 'Hauptstr. 1', '72516', 'Scheer', '07572 7616-0', 'http://www.stadtscheer.de', 'info@scheer-online.de', '0000-00-00', '0000-00-00', 'x8u7wN8', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1058, 'Stadtverwaltung', 'Schelklingen', 'Stadtverwaltung Schelklingen', 'Marktstr. 15', '89601', 'Schelklingen', '07394 248-0', 'http://www.schelklingen.de', 'info@schelklingen.de', '0000-00-00', '0000-00-00', 'sYA6#TJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1059, 'Stadtverwaltung', 'Schiltach', 'Stadtverwaltung Schiltach', 'Marktplatz 6', '77761', 'Schiltach', '07836 58-0', 'http://www.stadt-schiltach.de', 'info@schiltach.de', '0000-00-00', '0000-00-00', 'sUCKww3', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1060, 'Stadtverwaltung', 'Schömberg', 'Stadtverwaltung Schömberg', 'Alte Hauptstr. 7', '72355', 'Schömberg', '07427 9402-0', 'http://www.stadt-schoemberg.de/', 'bm.sprenger@stadt-schoemberg.de', '0000-00-00', '0000-00-00', 'EKJC8Lq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1061, 'Stadtverwaltung', 'Schönau', 'Stadtverwaltung Schönau', 'Rathausstr. 28', '69250', 'Schönau', '06228 207-0', 'http://www.stadt-schoenau.de', 'post@stadt-schoenau.de', '0000-00-00', '0000-00-00', 'x4RdBCq', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1062, 'Stadtverwaltung', 'Schönau im Schwarzwald', 'Stadtverwaltung Schönau im Schwarzwald', 'Talstr. 22', '79677', 'Schönau im Schwarzwald', '07673 8204-0', 'http://www.schoenau-im-schwarzwald.de', 'info@schoenau-im-schwarzwald.de', '0000-00-00', '0000-00-00', 'Ehb#P!W', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1063, 'Stadtverwaltung', 'Schopfheim', 'Stadtverwaltung Schopfheim', 'Hauptstr. 29-31', '79650', 'Schopfheim', '07622 396-0', 'http://www.schopfheim.de', 'info@schopfheim.de', '0000-00-00', '0000-00-00', 'SD2yvmZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1064, 'Stadtverwaltung', 'Schorndorf', 'Stadtverwaltung Schorndorf', 'Marktplatz 1', '73614', 'Schorndorf', '07181 602-0', 'http://www.schorndorf.de', 'matthias.klopfer@schorndorf.de', '0000-00-00', '0000-00-00', 'NdN?zbD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1065, 'Stadtverwaltung', 'Schramberg', 'Stadtverwaltung Schramberg', 'Hauptstr. 25', '78713', 'Schramberg', '07422 29-0', 'http://www.schramberg.de', 'zentrale@schramberg.de', '0000-00-00', '0000-00-00', 'FhnXYMB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1066, 'Stadtverwaltung', 'Schriesheim', 'Stadtverwaltung Schriesheim', 'Friedrichstr. 28-30', '69198', 'Schriesheim', '06203 602-0', 'http://www.schriesheim.de', 'zentrale@schriesheim.de', '0000-00-00', '0000-00-00', '!KBXDTT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1067, 'Stadtverwaltung', 'Schrozberg', 'Stadtverwaltung Schrozberg', 'Krailshausener Str. 15', '74575', 'Schrozberg', '07935 707-0', 'http://www.stadt-schrozberg.de', 'info@schrozberg.de', '0000-00-00', '0000-00-00', 'gXB7dUL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1068, 'Stadtverwaltung', 'Schwäbisch Gmünd', 'Stadtverwaltung Schwäbisch Gmünd', 'Marktplatz 1', '73525', 'Schwäbisch Gmünd', '07171 603-0', 'http://www.schwaebisch-gmuend.de', 'stadtverwaltung@schwaebisch-gmuend.de', '0000-00-00', '0000-00-00', 'gcLwtCP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1069, 'Stadtverwaltung', 'Schwäbisch Hall', 'Stadtverwaltung Schwäbisch Hall', 'Am Markt 6', '74523', 'Schwäbisch Hall', '0791 751-0', 'http://www.schwaebischhall.de', 'hermann-josef.pelgrim@schwaebischhall.de', '0000-00-00', '0000-00-00', 'hnaynxk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1070, 'Stadtverwaltung', 'Schwaigern', 'Stadtverwaltung Schwaigern', 'Marktstr. 2', '74193', 'Schwaigern', '07138 21-0', 'http://www.schwaigern.de', 'sabine.rotermund@schwaigern.de', '0000-00-00', '0000-00-00', 'JvSfgqu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1071, 'Stadtverwaltung', 'Schwetzingen', 'Stadtverwaltung Schwetzingen', 'Hebelstr. 1', '68723', 'Schwetzingen', '06202 87-0', 'http://www.schwetzingen.de', 'info@schwetzingen.de', '0000-00-00', '0000-00-00', 'Cc7qLfG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1072, 'Stadtverwaltung', 'Sigmaringen', 'Stadtverwaltung Sigmaringen', 'Fürst-Wilhelm-Str. 15', '72488', 'Sigmaringen', '07571 106-0', 'http://www.sigmaringen.de', 'post@sigmaringen.de', '0000-00-00', '0000-00-00', 'W?Kzzh!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1073, 'Stadtverwaltung', 'Sindelfingen', 'Stadtverwaltung Sindelfingen', 'Rathausplatz 1', '71063', 'Sindelfingen', '07031 94-314', 'http://www.sindelfingen.de', 'bernd.voehringer@sindelfingen.de', '0000-00-00', '0000-00-00', 'VbKwLk!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1074, 'Stadtverwaltung', 'Singen (Hohentwiel)', 'Stadtverwaltung Singen (Hohentwiel)', 'Hohgarten 2', '78224', 'Singen (Hohentwiel)', '07731 85-0', 'http://www.singen.de', 'info@singen.de', '0000-00-00', '0000-00-00', 'dh4sx8!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1075, 'Stadtverwaltung', 'Sinsheim', 'Stadtverwaltung Sinsheim', 'Wilhelmstr. 14-18', '74889', 'Sinsheim', '07261 404-0', 'http://www.sinsheim.de', 'info@sinsheim.de', '0000-00-00', '0000-00-00', 'SJCwL3b', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1076, 'Stadtverwaltung', 'Spaichingen', 'Stadtverwaltung Spaichingen', 'Marktplatz 19', '78549', 'Spaichingen', '07424 9571-0', 'http://www.spaichingen.de', 'hansgeorg.schuhmacher@spaichingen.de', '0000-00-00', '0000-00-00', 'LYXvymK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1077, 'Stadtverwaltung', 'St. Blasien', 'Stadtverwaltung St. Blasien', 'Am Kurgarten 11', '79837', 'St. Blasien', '07672 414-0', 'http://www.stblasien.de', 'stadtverwaltung@stblasien.de', '0000-00-00', '0000-00-00', 'f?B9FdY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1078, 'Stadtverwaltung', 'St. Georgen im Schwarzwald', 'Stadtverwaltung St. Georgen im Schwarzwald', 'Hauptstr. 9', '78112', 'St. Georgen im Schwarzwald', '07724 87-0', 'http://www.st-georgen.de', 'info@st-georgen.de', '0000-00-00', '0000-00-00', 'DdTfccX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1079, 'Stadtverwaltung', 'Staufen im Breisgau', 'Stadtverwaltung Staufen im Breisgau', 'Hauptstr. 53', '79219', 'Staufen im Breisgau', '07633 805-0', 'http://www.staufen.de', 'zentrale@staufen.de', '0000-00-00', '0000-00-00', '3Xub6wu', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1080, 'Stadtverwaltung', 'Steinheim an der Murr', 'Stadtverwaltung Steinheim an der Murr', 'Marktstr. 29', '71711', 'Steinheim an der Murr', '07144 263-0', 'http://www.stadt-steinheim.de', 'info@stadt-steinheim.de', '0000-00-00', '0000-00-00', '#245Tuh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1081, 'Stadtverwaltung', 'Stockach', 'Stadtverwaltung Stockach', 'Adenauerstr. 4', '78333', 'Stockach', '07771 802-0', 'http://www.stockach.de', 'post@stockach.de', '0000-00-00', '0000-00-00', '62d!?hF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1082, 'Stadtverwaltung', 'Stühlingen', 'Stadtverwaltung Stühlingen', 'Schloßstr. 9', '79780', 'Stühlingen', '07744 532-0', 'http://www.stuehlingen.de', 'rathaus@stuehlingen.de', '0000-00-00', '0000-00-00', 'xARuxGd', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1083, 'Stadtverwaltung', 'Stutensee', 'Stadtverwaltung Stutensee', 'Rathausstr. 3', '76297', 'Stutensee', '07244 969-101', 'http://www.stutensee.de', 'petra.becker@stutensee.de', '0000-00-00', '0000-00-00', 'C7B#YPk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1084, 'Stadtverwaltung', 'Sulz am Neckar', 'Stadtverwaltung Sulz am Neckar', 'Obere Hauptstr. 2', '72172', 'Sulz am Neckar', '07454 9650-0', 'http://www.sulz.de', 'stadtverwaltung@sulz.de', '0000-00-00', '0000-00-00', 'M4CsRbx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1085, 'Stadtverwaltung', 'Sulzburg', 'Stadtverwaltung Sulzburg', 'Hauptstr. 60', '79295', 'Sulzburg', '07634 5600-0', 'http://www.sulzburg.de', 'stadt@sulzburg.de', '0000-00-00', '0000-00-00', 'k7YJ3Wf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1086, 'Stadtverwaltung', 'Süßen', 'Stadtverwaltung Süßen', 'Heidenheimer Str. 30', '73079', 'Süßen', '07162 9616-0', 'http://www.suessen.de', 'info@suessen.de', '0000-00-00', '0000-00-00', '#V2wYC!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1087, 'Stadtverwaltung', 'Tauberbischofsheim', 'Stadtverwaltung Tauberbischofsheim', 'Marktplatz 8', '97941', 'Tauberbischofsheim', '09341 803-0', 'http://www.tauberbischofsheim.de', 'Wolfgang.Vockel@tauberbischofsheim.de', '0000-00-00', '0000-00-00', 'yq!aJAw', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1088, 'Stadtverwaltung', 'Tengen', 'Stadtverwaltung Tengen', 'Marktstr. 1', '78250', 'Tengen', '07736 9233-0', 'http://www.tengen.de', 'stadt@tengen.de', '0000-00-00', '0000-00-00', 'LBxMNRZ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1089, 'Stadtverwaltung', 'Tettnang', 'Stadtverwaltung Tettnang', 'Montfortplatz 7', '88069', 'Tettnang', '07542 510-0', 'http://www.tettnang.de', 'rathaus@tettnang.de', '0000-00-00', '0000-00-00', 'VL3?2GF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1090, 'Stadtverwaltung', 'Titisee-Neustadt', 'Stadtverwaltung Titisee-Neustadt', 'Pfauenstr. 2-4', '79822', 'Titisee-Neustadt', '07651 206-0', 'http://www.titisee-neustadt.de', 'stadt@titisee.de', '0000-00-00', '0000-00-00', '2Gq-8et', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1091, 'Stadtverwaltung', 'Todtnau', 'Stadtverwaltung Todtnau', 'Rathausplatz 1', '79674', 'Todtnau', '07671 996-0', 'http://www.todtnau.de', 'info@todtnau.de', '0000-00-00', '0000-00-00', 'WnG9ezp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1092, 'Stadtverwaltung', 'Triberg im Schwarzwald', 'Stadtverwaltung Triberg im Schwarzwald', 'Hauptstr. 57', '78098', 'Triberg im Schwarzwald', '07722 953-0', 'http://www.triberg.de', 'stadtverwaltung@triberg.de', '0000-00-00', '0000-00-00', '3RcK-kf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1093, 'Stadtverwaltung', 'Trochtelfingen', 'Stadtverwaltung Trochtelfingen', 'Rathausplatz 9', '72818', 'Trochtelfingen', '07124 48-0', 'http://www.trochtelfingen.de', 'info@trochtelfingen.de', '0000-00-00', '0000-00-00', '#-BHEJk', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1094, 'Stadtverwaltung', 'Trossingen', 'Stadtverwaltung Trossingen', 'Schultheiß-Koch-Platz 1', '78647', 'Trossingen', '07425 25-0', 'http://www.trossingen.de', 'stadt@trossingen.de', '0000-00-00', '0000-00-00', 'S3Tne67', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1095, 'Stadtverwaltung', 'Tübingen', 'Stadtverwaltung Tübingen', 'Am Markt 1', '72070', 'Tübingen', '07071 204-0', 'http://www.tuebingen.de', 'stadt@tuebingen.de', '0000-00-00', '0000-00-00', 'vYmT2SF', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1096, 'Stadtverwaltung', 'Tuttlingen', 'Stadtverwaltung Tuttlingen', 'Rathausstr. 1', '78532', 'Tuttlingen', '07461 99-0', 'http://www.tuttlingen.de', 'info@tuttlingen.de', '0000-00-00', '0000-00-00', '53#8txP', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1097, 'Stadtverwaltung', 'Überlingen', 'Stadtverwaltung Überlingen', 'Münsterstr. 15-17', '88662', 'Überlingen', '07551 99-0', 'http://www.ueberlingen.de', 'rathaus@ueberlingen.de', '0000-00-00', '0000-00-00', '5P7KfMb', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1098, 'Stadtverwaltung', 'Uhingen', 'Stadtverwaltung Uhingen', 'Kirchstr. 2', '73066', 'Uhingen', '07161 9380-113', 'http://www.uhingen.de', 'Matthias.Wittlinger@uhingen.de', '0000-00-00', '0000-00-00', 'yZWrb?H', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1099, 'Stadtverwaltung', 'Ulm', 'Stadtverwaltung Ulm', 'Marktplatz 1', '89073', 'Ulm', '0731/161-0', 'http://www.ulm.de', 'info@ulm.de', '0000-00-00', '0000-00-00', 'hv5DCdX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1100, 'Stadtverwaltung', 'Vaihingen an der Enz', 'Stadtverwaltung Vaihingen an der Enz', 'Marktplatz 1', '71665', 'Vaihingen an der Enz', '07042 18-0', 'http://www.vaihingen.de', 'info@vaihingen.de', '0000-00-00', '0000-00-00', 'mhuf#Tr', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1101, 'Stadtverwaltung', 'Vellberg', 'Stadtverwaltung Vellberg', 'Im Städtle 28', '74541', 'Vellberg', '07907 877-0', 'http://www.vellberg.de', 'stadt@vellberg.de', '0000-00-00', '0000-00-00', 'ET2D-VY', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1102, 'Stadtverwaltung', 'Veringenstadt', 'Stadtverwaltung Veringenstadt', 'Im Städtle 116', '72519', 'Veringenstadt', '07577 930-0', 'http://www.veringenstadt.de', 'christ@veringenstadt.de', '0000-00-00', '0000-00-00', 'TKdB8VJ', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1103, 'Stadtverwaltung', 'Villingen-Schwenningen', 'Stadtverwaltung Villingen-Schwenningen', 'Münsterplatz 7/8', '78050', 'Villingen-Schwenningen', '07721 82-0', 'http://www.villingen-schwenningen.de', 'ob@villingen-schwenningen.de', '0000-00-00', '0000-00-00', 'nS2zDFT', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1104, 'Stadtverwaltung', 'Vogtsburg im Kaiserstuhl', 'Stadtverwaltung Vogtsburg im Kaiserstuhl', 'Bahnhofstr. 20', '79235', 'Vogtsburg im Kaiserstuhl', '07662 812-0', 'http://www.vogtsburg.de', 'rathaus@vogtsburg.de', '0000-00-00', '0000-00-00', '?#kVJLm', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1105, 'Stadtverwaltung', 'Vöhrenbach', 'Stadtverwaltung Vöhrenbach', 'Friedrichstr. 8', '78147', 'Vöhrenbach', '07727 501-0', 'http://www.voehrenbach.de', 'info@voehrenbach.de', '0000-00-00', '0000-00-00', 't3TfekR', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1106, 'Stadtverwaltung', 'Waghäusel', 'Stadtverwaltung Waghäusel', 'Gymnasiumstr. 1', '68753', 'Waghäusel', '07254 207-201', 'http://www.waghaeusel.de', 'stadtverwaltung@waghaeusel.de', '0000-00-00', '0000-00-00', 'uweVaz!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1107, 'Stadtverwaltung', 'Waiblingen', 'Stadtverwaltung Waiblingen', 'Kurze Str. 33', '71332', 'Waiblingen', '07151 5001-1', 'http://www.waiblingen.de', 'oberbuergermeister@waiblingen.de', '0000-00-00', '0000-00-00', 'Lh9aqYK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1108, 'Stadtverwaltung', 'Waibstadt', 'Stadtverwaltung Waibstadt', 'Hauptstr. 31', '74915', 'Waibstadt', '07263 9147-0', 'http://www.waibstadt.de', 'buergermeister@waibstadt.de', '0000-00-00', '0000-00-00', 'HzKzx6!', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1109, 'Stadtverwaltung', 'Waldenbuch', 'Stadtverwaltung Waldenbuch', 'Marktplatz 1+5', '71111', 'Waldenbuch', '07157 1293-0', 'http://www.waldenbuch.de', 'stadt@waldenbuch.kdrs.de', '0000-00-00', '0000-00-00', 'N7tSRwf', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1110, 'Stadtverwaltung', 'Waldenburg', 'Stadtverwaltung Waldenburg', 'Hauptstr. 13', '74638', 'Waldenburg', '07942 108-0', 'http://www.waldenburg-hohenlohe.de', 'markus.knobel@waldenburg-hohenlohe.de', '0000-00-00', '0000-00-00', '!t!rPpB', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1111, 'Stadtverwaltung', 'Waldkirch', 'Stadtverwaltung Waldkirch', 'Marktplatz 1-5', '79183', 'Waldkirch', '07681 404-0', 'http://www.stadt-waldkirch.de', 'postkorb@stadt-waldkirch.de', '0000-00-00', '0000-00-00', 'r2#D9CX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1112, 'Stadtverwaltung', 'Waldshut-Tiengen', 'Stadtverwaltung Waldshut-Tiengen', 'Kaiserstr. 28-32', '79761', 'Waldshut-Tiengen', '07751 833-0', 'http://www.waldshut-tiengen.de', 'stadt@waldshut-tiengen.de', '0000-00-00', '0000-00-00', '2PDpuvL', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1113, 'Stadtverwaltung', 'Walldorf', 'Stadtverwaltung Walldorf', 'Nußlocher Str. 45', '69190', 'Walldorf', '06227 35-0', 'http://www.walldorf.de', 'stadt@walldorf.de', '0000-00-00', '0000-00-00', 'LApXM8f', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1114, 'Stadtverwaltung', 'Walldürn', 'Stadtverwaltung Walldürn', 'Burgstr. 3', '74731', 'Walldürn', '06282 67-0', 'http://www.wallduern.de', 'markus.guenther@wallduern.de', '0000-00-00', '0000-00-00', 'Z?!XPCX', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1115, 'Stadtverwaltung', 'Wangen im Allgäu', 'Stadtverwaltung Wangen im Allgäu', 'Marktplatz 1', '88239', 'Wangen im Allgäu', '07522 74-0', 'http://www.wangen.de', 'info@wangen.de', '0000-00-00', '0000-00-00', '42YHpzn', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `regmail_betreff`, `regmail_text`, `regmail_status`, `regmail_sendedat`, `pwd`, `register_dat`, `mail_reset`) VALUES +(1116, 'Stadtverwaltung', 'Wehr', 'Stadtverwaltung Wehr', 'Hauptstr. 16', '79664', 'Wehr', '07762 808-0', 'http://www.wehr.de', 'stadt@wehr.de', '0000-00-00', '0000-00-00', '#6?2S-u', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1117, 'Stadtverwaltung', 'Weikersheim', 'Stadtverwaltung Weikersheim', 'Marktplatz 7', '97990', 'Weikersheim', '07934 102-0', 'http://www.weikersheim.de', 'info@weikersheim.de', '0000-00-00', '0000-00-00', 'xGWA76t', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1118, 'Stadtverwaltung', 'Weil am Rhein', 'Stadtverwaltung Weil am Rhein', 'Rathausplatz 1', '79576', 'Weil am Rhein', '07621 704-0', 'http://www.weil-am-rhein.de', 'stadt@weil-am-rhein.de', '0000-00-00', '0000-00-00', 'mCxJsCG', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1119, 'Stadtverwaltung', 'Weil der Stadt', 'Stadtverwaltung Weil der Stadt', 'Marktplatz 4', '71263', 'Weil der Stadt', '07033 521-0', 'http://www.weil-der-stadt.de', 'stadtverwaltung@weil-der-stadt.de', '0000-00-00', '0000-00-00', 'cGyx4Z#', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1120, 'Stadtverwaltung', 'Weilheim an der Teck', 'Stadtverwaltung Weilheim an der Teck', 'Marktplatz 6', '73235', 'Weilheim an der Teck', '07023 106-0', 'http://www.weilheim-teck.de', 'stadt@weilheim-teck.de', '0000-00-00', '0000-00-00', '7ma!!ps', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1121, 'Stadtverwaltung', 'Weingarten', 'Stadtverwaltung Weingarten', 'Kirchstr. 1', '88250', 'Weingarten', '0751 405-100', 'http://www.weingarten-online.de', 'ob@weingarten-online.de', '0000-00-00', '0000-00-00', 'WHErwc7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1122, 'Stadtverwaltung', 'Weinheim', 'Stadtverwaltung Weinheim', 'Obertorstr. 9', '69469', 'Weinheim', '06201 82-0', 'http://www.weinheim.de', 'rathaus@weinheim.de', '0000-00-00', '0000-00-00', '7tMYLBx', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1123, 'Stadtverwaltung', 'Weinsberg', 'Stadtverwaltung Weinsberg', 'Marktplatz 11', '74189', 'Weinsberg', '07134 512-0', 'http://www.weinsberg.de', 'stadt@weinsberg.de', '0000-00-00', '0000-00-00', 'Rzaahrh', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1124, 'Stadtverwaltung', 'Weinstadt', 'Stadtverwaltung Weinstadt', 'Marktplatz 1', '71384', 'Weinstadt', '07151 693-0', 'http://www.weinstadt.de', 'ob.vorzimmer@weinstadt.de', '0000-00-00', '0000-00-00', 'WxVx79p', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1125, 'Stadtverwaltung', 'Welzheim', 'Stadtverwaltung Welzheim', 'Kirchplatz 3', '73642', 'Welzheim', '07182 8008-0', 'http://www.welzheim.de', 'stadt@welzheim.de', '0000-00-00', '0000-00-00', 'X4GWm2-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1126, 'Stadtverwaltung', 'Wendlingen am Neckar', 'Stadtverwaltung Wendlingen am Neckar', 'Am Marktplatz 2', '73240', 'Wendlingen am Neckar', '07024 943-0', 'http://www.wendlingen.de', 'bmweigel@wendlingen.de', '0000-00-00', '0000-00-00', 'f3NhCPD', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1127, 'Stadtverwaltung', 'Wernau (Neckar)', 'Stadtverwaltung Wernau (Neckar)', 'Kirchheimer Str. 68-70', '73249', 'Wernau (Neckar)', '07153 9345-0', 'http://www.wernau.de', 'info@wernau.de', '0000-00-00', '0000-00-00', '5nJqkPe', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1128, 'Stadtverwaltung', 'Wertheim', 'Stadtverwaltung Wertheim', 'Mühlenstr. 26', '97877', 'Wertheim', '09342 301-0', 'http://www.wertheim.de', 'stadtverwaltung@wertheim.de', '0000-00-00', '0000-00-00', 'ZBBfMCH', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1129, 'Stadtverwaltung', 'Widdern', 'Stadtverwaltung Widdern', 'Keltergasse 5', '74259', 'Widdern', '06298 9247-0', 'http://www.widdern.de', 'stadt@widdern.de', '0000-00-00', '0000-00-00', 'Zwme6Z-', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1130, 'Stadtverwaltung', 'Wiesensteig', 'Stadtverwaltung Wiesensteig', 'Hauptstr. 25', '73349', 'Wiesensteig', '07335 9620-0', 'http://www.wiesensteig.de', 'info@wiesensteig.de', '0000-00-00', '0000-00-00', 'Jprq-fU', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1131, 'Stadtverwaltung', 'Wiesloch', 'Stadtverwaltung Wiesloch', 'Marktstr. 13', '69168', 'Wiesloch', '06222 84-1', 'http://www.wiesloch.de', 'dirk.elkemann@wiesloch.de', '0000-00-00', '0000-00-00', 'RYGJ8Xp', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1132, 'Stadtverwaltung', 'Wildberg', 'Stadtverwaltung Wildberg', 'Marktstr. 2', '72218', 'Wildberg', '07054 201-0', 'http://www.wildberg.de', 'info@wildberg.de', '0000-00-00', '0000-00-00', 'ZYwSa7A', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1133, 'Stadtverwaltung', 'Winnenden', 'Stadtverwaltung Winnenden', 'Torstr. 10', '71364', 'Winnenden', '07195 13-0', 'http://www.winnenden.de', 'rathaus@winnenden.de', '0000-00-00', '0000-00-00', 'Pnm6qLA', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1134, 'Stadtverwaltung', 'Wolfach', 'Stadtverwaltung Wolfach', 'Hauptstr. 41', '77709', 'Wolfach', '07834 8353-0', 'http://www.wolfach.de', 'stadt@wolfach.de', '0000-00-00', '0000-00-00', 'KzexAPK', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1135, 'Stadtverwaltung', 'Zell am Harmersbach', 'Stadtverwaltung Zell am Harmersbach', 'Hauptstr. 19', '77736', 'Zell am Harmersbach', '07835 6369-0', 'http://www.zell.de', 'stadtverwaltung@zell.de', '0000-00-00', '0000-00-00', 'md4CsA7', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(1136, 'Stadtverwaltung', 'Zell im Wiesental', 'Stadtverwaltung Zell im Wiesental', 'Constanze-Weber-Gasse 4', '79669', 'Zell im Wiesental', '07625 133-0', 'http://www.zell-im-wiesental.de', 'info@stadt-zell.de', '0000-00-00', '0000-00-00', 'sP??f9B', '', '', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dst_wunsch` +-- + +CREATE TABLE `bpm_dst_wunsch` ( + `wu_id` int(11) NOT NULL, + `dst_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `datum` datetime NOT NULL, + `mail_text` text NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `status` enum('O','V','F') DEFAULT 'O' COMMENT 'Offen, Versendet, Fehler', + `sendedat` datetime NOT NULL, + `archiv_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_ergebnisse` +-- + +CREATE TABLE `bpm_ergebnisse` ( + `eg_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tan` varchar(10) NOT NULL, + `satzerg` int(5) NOT NULL, + `analogie` int(5) NOT NULL, + `rechenaufgaben` int(5) NOT NULL, + `zahlenreihen` int(5) NOT NULL, + `rechenzeichen` int(5) NOT NULL, + `matrizen` int(5) NOT NULL, + `merkf` int(5) NOT NULL, + `summe` int(5) NOT NULL, + `bestanden` enum('0','1') NOT NULL COMMENT '1=bestanden, 0=durchgefallen', + `einsicht_dat` datetime NOT NULL COMMENT 'Einsicht des Kandidaten' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_kandidat` +-- + +CREATE TABLE `bpm_kandidat` ( + `ka_id` int(11) NOT NULL, + `anrede` enum('M','W') NOT NULL, + `vorname` varchar(250) NOT NULL, + `nachname` varchar(250) NOT NULL, + `gebdat` date NOT NULL, + `str` varchar(250) NOT NULL, + `plz` varchar(250) NOT NULL, + `ort` varchar(250) NOT NULL, + `alter18` int(1) NOT NULL COMMENT '0=Minderjaehrig; 1=Volljaehrig', + `mail` varchar(250) NOT NULL, + `id` varchar(200) NOT NULL, + `hochschule` enum('Kehl','Ludwigsburg','NA') DEFAULT NULL COMMENT 'Standardhochschule', + `register_dat` datetime NOT NULL, + `modify_dat` datetime NOT NULL, + `remember_mail` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_note` +-- + +CREATE TABLE `bpm_note` ( + `no_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `hzb` decimal(10,2) NOT NULL, + `hzb_punkte` decimal(10,2) NOT NULL, + `zeugnisschnitt` decimal(10,2) NOT NULL, + `zeugnisschnitt_punkte` decimal(10,2) NOT NULL, + `erfdat_hzb` datetime NOT NULL, + `erfdat_schnitt` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_note` +-- + +INSERT INTO `bpm_note` (`no_id`, `ka_id`, `hzb`, `hzb_punkte`, `zeugnisschnitt`, `zeugnisschnitt_punkte`, `erfdat_hzb`, `erfdat_schnitt`) VALUES +(1, 1, '2.60', '0.00', '0.00', '0.00', '2020-07-21 09:22:33', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_parameter` +-- + +CREATE TABLE `bpm_parameter` ( + `pid` int(11) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `wert` varchar(250) NOT NULL, + `sort` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_parameter` +-- + +INSERT INTO `bpm_parameter` (`pid`, `beschreibung`, `wert`, `sort`) VALUES +(1, 'Bei wie viel RestTANs soll eine Warnung per Mail ausgegeben werden.', '50', 0), +(2, 'Mailadresse Lizenzwarnung (Durch Komma getrennt, bei mehreren Mailadressen)', 'bachelor@hs-kehl.de, zulassung@hs-ludwigsburg.de', 10), +(3, 'IBAN HS-Kehl', 'DE02600501017495530102', 20), +(4, 'BIC HS-Kehl', 'SOLADEST600', 30), +(5, 'IBAN HS-Ludwigsburg', 'DE02600501017495530102', 40), +(6, 'BIC HS-Ludwigsburg', 'SOLADEST600', 50), +(7, 'Mail-Absenderadresse HS-Kehl', 'bachelor@hs-kehl.de', 60), +(8, 'Mail-Absenderadresse HS-Ludwigsburg', 'zulassung@hs-ludwigsburg.de', 70), +(9, 'Betrag in Euro für die Überweisung', '25,00', 80), +(11, 'Bestehenswert des Eignungstests in Rohwert-Punkten', '66', 90), +(12, 'Maximale Dateigröße pro hochgeladener Datei in Megabyte (MB)', '5', 100), +(13, 'Maximale Anzahl an hochzuladenden PDF-Dokumente pro Bewerber', '10', 110), +(14, 'Maximal Anzahl der zu buchenden Praxisstellen pro Bewerber', '4', 120), +(15, 'Anzahl der letzten Nachrichten im Praxisstellensystem', '10', 130), +(16, 'Wie viele Tage vor dem Test ist ein Testtermin nicht ersichtlich?', '4', 140); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_prxnews` +-- + +CREATE TABLE `bpm_prxnews` ( + `pn_id` int(11) NOT NULL, + `pn_headline` varchar(250) NOT NULL, + `pn_text` text NOT NULL, + `pn_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_sonstige_mail` +-- + +CREATE TABLE `bpm_sonstige_mail` ( + `sm_id` int(11) NOT NULL, + `sender` varchar(250) NOT NULL, + `sendermail` varchar(250) NOT NULL, + `ka_id` int(11) NOT NULL, + `empfaenger` varchar(250) NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `mail_text` text NOT NULL, + `status` enum('V','F') NOT NULL, + `sendedat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_stichtage` +-- + +CREATE TABLE `bpm_stichtage` ( + `sttg_id` int(11) NOT NULL, + `beginn` date NOT NULL, + `ende` date NOT NULL, + `ausbildungsbeginn` int(4) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_stichtage` +-- + +INSERT INTO `bpm_stichtage` (`sttg_id`, `beginn`, `ende`, `ausbildungsbeginn`) VALUES +(1, '2020-07-16', '2021-07-15', 2021), +(2, '2021-07-16', '2022-07-15', 2022), +(3, '2022-07-16', '2023-07-15', 2023); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_tanpool` +-- + +CREATE TABLE `bpm_tanpool` ( + `tp_id` int(11) NOT NULL, + `dummy_name` varchar(250) NOT NULL, + `dummy_vorname` varchar(250) NOT NULL, + `tan` varchar(10) NOT NULL, + `tinyurl` varchar(200) NOT NULL, + `verw_dat` datetime NOT NULL, + `login_dat` datetime NOT NULL, + `aktiv` enum('A','I') NOT NULL DEFAULT 'A' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_tanpool` +-- + +INSERT INTO `bpm_tanpool` (`tp_id`, `dummy_name`, `dummy_vorname`, `tan`, `tinyurl`, `verw_dat`, `login_dat`, `aktiv`) VALUES +(175, 'Testuser-bpm', '188', 'K3NN', 'https://hgf.de/vwe-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(176, 'Testuser-bpm', '171', 'U3P3', 'https://hgf.de/d-1c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(177, 'Testuser-bpm', '087', '93PR', 'https://hgf.de/u2au', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(178, 'Testuser-bpm', '038', 'K3Q9', 'https://hgf.de/xpjv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(179, 'Testuser-bpm', '152', 'U3QM', 'https://hgf.de/rtzq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(180, 'Testuser-bpm', '204', '93RD', 'https://hgf.de/ilpy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(181, 'Testuser-bpm', '050', 'K3RQ', 'https://hgf.de/wnzc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(182, 'Testuser-bpm', '104', 'U3T7', 'https://hgf.de/mlk4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(183, 'Testuser-bpm', '248', '93TU', 'https://hgf.de/n0hh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(184, 'Testuser-bpm', '086', 'K3UC', 'https://hgf.de/zawv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(185, 'Testuser-bpm', '179', 'U3UP', 'https://hgf.de/w6i6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(186, 'Testuser-bpm', '244', '93VF', 'https://hgf.de/ms89', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(187, 'Testuser-bpm', '160', 'K3VT', 'https://hgf.de/zd34', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(188, 'Testuser-bpm', '056', 'U3WA', 'https://hgf.de/sflo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(189, 'Testuser-bpm', '135', '93WW', 'https://hgf.de/9ggr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(190, 'Testuser-bpm', '138', 'K3XE', 'https://hgf.de/blht', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(191, 'Testuser-bpm', '187', 'U3XR', 'https://hgf.de/ojgj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(192, 'Testuser-bpm', '197', '93YJ', 'https://hgf.de/cj8e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(193, 'Testuser-bpm', '106', 'K3YV', 'https://hgf.de/0g5-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(194, 'Testuser-bpm', '123', 'U43D', 'https://hgf.de/t9no', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(195, 'Testuser-bpm', '137', '943Y', 'https://hgf.de/g1qm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(196, 'Testuser-bpm', '011', 'TVY9', 'https://hgf.de/jdu3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(197, 'Testuser-bpm', '070', 'K44H', 'https://hgf.de/np-t', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(198, 'Testuser-bpm', '057', 'U44U', 'https://hgf.de/o7d2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(199, 'Testuser-bpm', '216', '947L', 'https://hgf.de/st0z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(200, 'Testuser-bpm', '074', 'K47X', 'https://hgf.de/xm3s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(201, 'Testuser-bpm', '092', 'TW7C', 'https://hgf.de/8m1r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(202, 'Testuser-bpm', '063', 'U49F', 'https://hgf.de/9poo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(203, 'Testuser-bpm', '136', '94A4', 'https://hgf.de/wfgz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(204, 'Testuser-bpm', '109', 'TVV4', 'https://hgf.de/jjop', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(205, 'Testuser-bpm', '078', 'K4AK', 'https://hgf.de/vxdn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(206, 'Testuser-bpm', '153', 'U4AW', 'https://hgf.de/arch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(207, 'Testuser-bpm', '170', '94CN', 'https://hgf.de/ujfg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(208, 'Testuser-bpm', '020', 'K4D3', 'https://hgf.de/se-a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(209, 'Testuser-bpm', '194', 'U4DJ', 'https://hgf.de/plx-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(210, 'Testuser-bpm', '245', '94E9', 'https://hgf.de/lcgn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(211, 'Testuser-bpm', '240', 'K4EM', 'https://hgf.de/5kly', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(212, 'Testuser-bpm', '234', 'U4EY', 'https://hgf.de/8qas', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(213, 'Testuser-bpm', '162', '94FQ', 'https://hgf.de/kl5u', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(214, 'Testuser-bpm', '189', 'K4H7', 'https://hgf.de/od-u', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(215, 'Testuser-bpm', '027', 'U4HL', 'https://hgf.de/77dn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(216, 'Testuser-bpm', '080', '94JC', 'https://hgf.de/2d81', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(217, 'Testuser-bpm', '231', 'K4JP', 'https://hgf.de/diuz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(218, 'Testuser-bpm', '155', 'U4K4', 'https://hgf.de/xj2l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(219, 'Testuser-bpm', '037', '94KT', 'https://hgf.de/g6jj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(220, 'Testuser-bpm', '185', 'K4LA', 'https://hgf.de/v0e2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(221, 'Testuser-bpm', '065', 'U4LN', 'https://hgf.de/dmc2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(222, 'Testuser-bpm', '203', '94ME', 'https://hgf.de/s91-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(223, 'Testuser-bpm', '250', 'K4MR', 'https://hgf.de/60h8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(224, 'Testuser-bpm', '249', 'U4N9', 'https://hgf.de/5ejw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(225, 'Testuser-bpm', '164', '94NV', 'https://hgf.de/pr7r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(226, 'Testuser-bpm', '112', 'K4PD', 'https://hgf.de/jsyn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(227, 'Testuser-bpm', '042', 'U4PQ', 'https://hgf.de/gqtk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(228, 'Testuser-bpm', '157', '94QH', 'https://hgf.de/ad3j', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(229, 'Testuser-bpm', '235', 'K4QU', 'https://hgf.de/5h8m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(230, 'Testuser-bpm', '009', 'U4RC', 'https://hgf.de/kmbp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(231, 'Testuser-bpm', '195', '94RX', 'https://hgf.de/n771', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(232, 'Testuser-bpm', '227', 'K4TF', 'https://hgf.de/ervs', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(233, 'Testuser-bpm', '172', 'U4TT', 'https://hgf.de/gq77', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(234, 'Testuser-bpm', '219', '94UK', 'https://hgf.de/ry8a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(235, 'Testuser-bpm', '246', 'K4UW', 'https://hgf.de/9brk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(236, 'Testuser-bpm', '113', 'JW3D', 'https://hgf.de/7h1x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(237, 'Testuser-bpm', '183', 'U4VE', 'https://hgf.de/0kjx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(238, 'Testuser-bpm', '192', '94W3', 'https://hgf.de/yy9o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(239, 'Testuser-bpm', '010', 'K4WJ', 'https://hgf.de/j8uz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(240, 'Testuser-bpm', '222', 'U4WV', 'https://hgf.de/pkcn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(241, 'Testuser-bpm', '140', 'JW9F', 'https://hgf.de/7mok', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(242, 'Testuser-bpm', '099', '94XM', 'https://hgf.de/wj44', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(243, 'Testuser-bpm', '177', 'K4XY', 'https://hgf.de/qvbw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(244, 'Testuser-bpm', '230', 'JVWA', 'https://hgf.de/mb0l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(245, 'Testuser-bpm', '082', 'U4YH', 'https://hgf.de/9b09', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(246, 'Testuser-bpm', '098', '9737', 'https://hgf.de/2hzi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(247, 'Testuser-bpm', '178', 'K73L', 'https://hgf.de/cqa-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(248, 'Testuser-bpm', '008', 'U73X', 'https://hgf.de/r19z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(249, 'Testuser-bpm', '055', '974P', 'https://hgf.de/snqj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(250, 'Testuser-bpm', '225', 'K774', 'https://hgf.de/42mu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(251, 'Testuser-bpm', '0290', 'K7LV', 'https://hgf.de/bc0a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(252, 'Testuser-bpm', '0291', 'U7MD', 'https://hgf.de/7av8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(253, 'Testuser-bpm', '0303', '97MY', 'https://hgf.de/p97m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(254, 'Testuser-bpm', '0454', 'K7NH', 'https://hgf.de/v3dd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(255, 'Testuser-bpm', '0308', 'U7NU', 'https://hgf.de/83hm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(256, 'Testuser-bpm', '0424', '97PL', 'https://hgf.de/giaz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(257, 'Testuser-bpm', '0329', 'K7PX', 'https://hgf.de/6b9w', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(258, 'Testuser-bpm', '0293', 'U7QF', 'https://hgf.de/4jy4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(259, 'Testuser-bpm', '0409', '97R4', 'https://hgf.de/wrqy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(260, 'Testuser-bpm', '0257', 'K7RK', 'https://hgf.de/6tsw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(261, 'Testuser-bpm', '0274', 'U7RW', 'https://hgf.de/fq9q', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(262, 'Testuser-bpm', '0285', '97TN', 'https://hgf.de/3-ae', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(263, 'Testuser-bpm', '0449', 'K7U3', 'https://hgf.de/dn0s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(264, 'Testuser-bpm', '0408', 'U7UJ', 'https://hgf.de/9i4l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(265, 'Testuser-bpm', '0413', '97V9', 'https://hgf.de/z1b-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(266, 'Testuser-bpm', '0485', '97AR', 'https://hgf.de/pupf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(267, 'Testuser-bpm', '0355', 'K7VM', 'https://hgf.de/gfy5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(268, 'Testuser-bpm', '0476', 'U7VY', 'https://hgf.de/wprf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(269, 'Testuser-bpm', '0462', '97WQ', 'https://hgf.de/rwc5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(270, 'Testuser-bpm', '0488', '97DD', 'https://hgf.de/7cv1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(271, 'Testuser-bpm', '0418', 'K7X7', 'https://hgf.de/8kc7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(272, 'Testuser-bpm', '0378', 'U7XL', 'https://hgf.de/a0p4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(273, 'Testuser-bpm', '0426', '97YC', 'https://hgf.de/lw9d', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(274, 'Testuser-bpm', '0471', 'K7YP', 'https://hgf.de/iou8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(275, 'Testuser-bpm', '0420', 'U934', 'https://hgf.de/-epu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(276, 'Testuser-bpm', '0351', '993T', 'https://hgf.de/mj8l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(277, 'Testuser-bpm', '0297', 'K94A', 'https://hgf.de/l0ux', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(278, 'Testuser-bpm', '0498', 'K7KE', 'https://hgf.de/vq53', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(279, 'Testuser-bpm', '0377', 'U94N', 'https://hgf.de/w07o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(280, 'Testuser-bpm', '0332', '997E', 'https://hgf.de/lts-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(281, 'Testuser-bpm', '0438', 'K97R', 'https://hgf.de/4ctw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(282, 'Testuser-bpm', '0337', 'U999', 'https://hgf.de/lazd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(283, 'Testuser-bpm', '0296', '999V', 'https://hgf.de/t-tk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(284, 'Testuser-bpm', '0383', 'K9AD', 'https://hgf.de/g6hi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(285, 'Testuser-bpm', '0381', 'U9AQ', 'https://hgf.de/5xwz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(286, 'Testuser-bpm', '0402', '99CH', 'https://hgf.de/k3ty', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(287, 'Testuser-bpm', '0292', 'K9CU', 'https://hgf.de/lnn2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(288, 'Testuser-bpm', '0427', 'U9DC', 'https://hgf.de/l8c9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(289, 'Testuser-bpm', '0331', '99DX', 'https://hgf.de/fd1b', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(290, 'Testuser-bpm', '0373', 'K9EF', 'https://hgf.de/48wf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(291, 'Testuser-bpm', '0435', 'U9ET', 'https://hgf.de/jga0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(292, 'Testuser-bpm', '0439', '99FK', 'https://hgf.de/8a5f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(293, 'Testuser-bpm', '0467', 'K9FW', 'https://hgf.de/y4re', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(294, 'Testuser-bpm', '0340', 'U9HE', 'https://hgf.de/2hov', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(295, 'Testuser-bpm', '0334', '99J3', 'https://hgf.de/w-dm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(296, 'Testuser-bpm', '0407', 'K9JJ', 'https://hgf.de/qlqu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(297, 'Testuser-bpm', '0359', 'U9JV', 'https://hgf.de/np6t', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(298, 'Testuser-bpm', '0260', '99KM', 'https://hgf.de/a2a7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(299, 'Testuser-bpm', '0264', 'K9KY', 'https://hgf.de/rhns', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(300, 'Testuser-bpm', '0362', 'U9LH', 'https://hgf.de/gz2v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(301, 'Testuser-bpm', '0479', '99M7', 'https://hgf.de/hagj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(302, 'Testuser-bpm', '0489', 'K7DQ', 'https://hgf.de/35nu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(303, 'Testuser-bpm', '0309', 'K9ML', 'https://hgf.de/6i0z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(304, 'Testuser-bpm', '0365', 'U9MX', 'https://hgf.de/8x5v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(305, 'Testuser-bpm', '0425', '99NP', 'https://hgf.de/t6t7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(306, 'Testuser-bpm', '0495', 'K7HT', 'https://hgf.de/sq9i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(307, 'Testuser-bpm', '0324', 'K9P4', 'https://hgf.de/agyj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(308, 'Testuser-bpm', '0305', 'U9PK', 'https://hgf.de/cd8k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(309, 'Testuser-bpm', '0441', '99QA', 'https://hgf.de/xcmx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(310, 'Testuser-bpm', '0428', 'K9QN', 'https://hgf.de/xxyi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(311, 'Testuser-bpm', '0375', 'U9R3', 'https://hgf.de/r6gq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(312, 'Testuser-bpm', '0379', '99RR', 'https://hgf.de/i-7m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(313, 'Testuser-bpm', '0431', 'K9T9', 'https://hgf.de/pu-p', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(314, 'Testuser-bpm', '0455', 'U9TM', 'https://hgf.de/3toe', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(315, 'Testuser-bpm', '0372', '99UD', 'https://hgf.de/t5je', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(316, 'Testuser-bpm', '0354', 'K9UQ', 'https://hgf.de/96-k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(317, 'Testuser-bpm', '0361', 'U9V7', 'https://hgf.de/032x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(318, 'Testuser-bpm', '0282', '99VU', 'https://hgf.de/3puo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(319, 'Testuser-bpm', '0445', 'K9WC', 'https://hgf.de/6y3c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(320, 'Testuser-bpm', '0271', 'U9WP', 'https://hgf.de/nxkw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(321, 'Testuser-bpm', '0423', '99XF', 'https://hgf.de/k58i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(322, 'Testuser-bpm', '0311', 'K9XT', 'https://hgf.de/xgm6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(323, 'Testuser-bpm', '0385', 'U9YA', 'https://hgf.de/o263', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(324, 'Testuser-bpm', '0358', '99YW', 'https://hgf.de/pcg9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(325, 'Testuser-bpm', '0452', 'KA3E', 'https://hgf.de/cfh8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(326, 'Testuser-bpm', '0284', 'UA3R', 'https://hgf.de/1gi5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(327, 'Testuser-bpm', '0481', 'U77K', 'https://hgf.de/iwvu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(328, 'Testuser-bpm', '0410', '9A4J', 'https://hgf.de/nrqx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(329, 'Testuser-bpm', '0261', 'KA4V', 'https://hgf.de/juap', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(330, 'Testuser-bpm', '0422', 'UA7D', 'https://hgf.de/j5l3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(331, 'Testuser-bpm', '0307', '9A7Y', 'https://hgf.de/jov4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(332, 'Testuser-bpm', '0442', 'KA9H', 'https://hgf.de/cacu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(333, 'Testuser-bpm', '0289', 'UA9U', 'https://hgf.de/t4sp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(334, 'Testuser-bpm', '0302', '9AAL', 'https://hgf.de/eybr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(335, 'Testuser-bpm', '0256', 'KAAX', 'https://hgf.de/15vw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(336, 'Testuser-bpm', '0414', 'UACF', 'https://hgf.de/5c8x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(337, 'Testuser-bpm', '0259', '9AD4', 'https://hgf.de/q8bm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(338, 'Testuser-bpm', '0394', 'KADK', 'https://hgf.de/cnjf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(339, 'Testuser-bpm', '0368', 'UADW', 'https://hgf.de/vifa', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(340, 'Testuser-bpm', '0436', '9AEN', 'https://hgf.de/xrcg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(341, 'Testuser-bpm', '0347', 'KAF3', 'https://hgf.de/7rvu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(342, 'Testuser-bpm', '0499', 'U7KR', 'https://hgf.de/2j75', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(343, 'Testuser-bpm', '0393', 'UAFJ', 'https://hgf.de/pa01', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(344, 'Testuser-bpm', '0327', '9AH9', 'https://hgf.de/4i9s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(345, 'Testuser-bpm', '0497', '97JW', 'https://hgf.de/pl3o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(346, 'Testuser-bpm', '0325', 'KAHM', 'https://hgf.de/s31z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(347, 'Testuser-bpm', '0263', 'UAHY', 'https://hgf.de/c6w-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(348, 'Testuser-bpm', '0301', '9AJQ', 'https://hgf.de/5h6z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(349, 'Testuser-bpm', '0492', 'K7FC', 'https://hgf.de/iebh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(350, 'Testuser-bpm', '0287', 'KAK7', 'https://hgf.de/t7me', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(351, 'Testuser-bpm', '0473', 'UAKL', 'https://hgf.de/e8j-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(352, 'Testuser-bpm', '0475', '9ALC', 'https://hgf.de/hyfo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(353, 'Testuser-bpm', '0320', 'KALP', 'https://hgf.de/p5pd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(354, 'Testuser-bpm', '0391', 'UAM4', 'https://hgf.de/ir-k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(355, 'Testuser-bpm', '0450', '9AMT', 'https://hgf.de/q8x3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(356, 'Testuser-bpm', '0468', 'KANA', 'https://hgf.de/drsh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(357, 'Testuser-bpm', '0314', 'UANN', 'https://hgf.de/sfch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(358, 'Testuser-bpm', '0350', '9APE', 'https://hgf.de/lu8v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(359, 'Testuser-bpm', '0318', 'KAPR', 'https://hgf.de/ait6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(360, 'Testuser-bpm', '0352', 'UAQ9', 'https://hgf.de/vgog', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(361, 'Testuser-bpm', '0451', '9AQV', 'https://hgf.de/771o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(362, 'Testuser-bpm', '0421', 'KARD', 'https://hgf.de/9bq3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(363, 'Testuser-bpm', '0315', 'UARQ', 'https://hgf.de/b6zr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(364, 'Testuser-bpm', '0370', '9ATH', 'https://hgf.de/oson', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(365, 'Testuser-bpm', '0390', 'KATU', 'https://hgf.de/4qrt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(366, 'Testuser-bpm', '0470', 'UAUC', 'https://hgf.de/t38i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(367, 'Testuser-bpm', '0317', '9AUX', 'https://hgf.de/ekik', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(368, 'Testuser-bpm', '0397', 'KAVF', 'https://hgf.de/0rh4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(369, 'Testuser-bpm', '0461', 'UAVT', 'https://hgf.de/sal8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(370, 'Testuser-bpm', '0376', '9AWK', 'https://hgf.de/xx57', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(371, 'Testuser-bpm', '0353', 'KAWW', 'https://hgf.de/vnmv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(372, 'Testuser-bpm', '0272', 'UAXE', 'https://hgf.de/k45m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(373, 'Testuser-bpm', '0349', '9AY3', 'https://hgf.de/o4m1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(374, 'Testuser-bpm', '0447', 'KAYJ', 'https://hgf.de/hclx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(375, 'Testuser-bpm', '0300', 'UAYV', 'https://hgf.de/ayy7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(376, 'Testuser-bpm', '0299', '9C3M', 'https://hgf.de/9krk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(377, 'Testuser-bpm', '0319', 'KC3Y', 'https://hgf.de/gpsv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(378, 'Testuser-bpm', '0400', 'UC4H', 'https://hgf.de/qfqw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(379, 'Testuser-bpm', '0494', '97HF', 'https://hgf.de/-wxz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(380, 'Testuser-bpm', '0286', '9C77', 'https://hgf.de/tmw2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(381, 'Testuser-bpm', '0374', 'KC7L', 'https://hgf.de/84nj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(382, 'Testuser-bpm', '0482', '979A', 'https://hgf.de/ily3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(383, 'Testuser-bpm', '0357', 'UC7X', 'https://hgf.de/dyfw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(384, 'Testuser-bpm', '0484', 'U7A3', 'https://hgf.de/-ak5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(385, 'Testuser-bpm', '0288', '9C9P', 'https://hgf.de/eu7w', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(386, 'Testuser-bpm', '0280', 'KCA4', 'https://hgf.de/r-2e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(387, 'Testuser-bpm', '0322', 'UCAK', 'https://hgf.de/eq0f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(388, 'Testuser-bpm', '0399', '9CCA', 'https://hgf.de/rvvg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(389, 'Testuser-bpm', '0456', 'KCCN', 'https://hgf.de/qnul', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(390, 'Testuser-bpm', '0459', 'UCD3', 'https://hgf.de/zab3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(391, 'Testuser-bpm', '0270', '9CDR', 'https://hgf.de/oq2o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(392, 'Testuser-bpm', '0338', 'KCE9', 'https://hgf.de/5z2o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(393, 'Testuser-bpm', '0339', 'UCEM', 'https://hgf.de/0dr9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(394, 'Testuser-bpm', '0278', '9CFD', 'https://hgf.de/yll5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(395, 'Testuser-bpm', '0251', 'KCFQ', 'https://hgf.de/j7ev', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(396, 'Testuser-bpm', '0266', 'UCH7', 'https://hgf.de/4a3v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(397, 'Testuser-bpm', '0500', '97LJ', 'https://hgf.de/6yvd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(398, 'Testuser-bpm', '0380', '9CHU', 'https://hgf.de/g1n6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(399, 'Testuser-bpm', '0493', 'U7FP', 'https://hgf.de/6dm4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(400, 'Testuser-bpm', '0276', 'KCJC', 'https://hgf.de/pcnd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(401, 'Testuser-bpm', '0343', 'UCJP', 'https://hgf.de/edbh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(402, 'Testuser-bpm', '0405', '9CKF', 'https://hgf.de/ffc3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(403, 'Testuser-bpm', '0345', 'KCKT', 'https://hgf.de/y3y2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(404, 'Testuser-bpm', '0483', 'K79N', 'https://hgf.de/2llt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(405, 'Testuser-bpm', '0433', 'UCLA', 'https://hgf.de/h-1n', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(406, 'Testuser-bpm', '0323', '9CLW', 'https://hgf.de/salm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(407, 'Testuser-bpm', '0254', 'KCME', 'https://hgf.de/2tln', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(408, 'Testuser-bpm', '0443', 'UCMR', 'https://hgf.de/f1n5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(409, 'Testuser-bpm', '0406', '9CNJ', 'https://hgf.de/t1v6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(410, 'Testuser-bpm', '0262', 'KCNV', 'https://hgf.de/rh34', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(411, 'Testuser-bpm', '0265', 'UCPD', 'https://hgf.de/l98f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(412, 'Testuser-bpm', '0306', '9CPY', 'https://hgf.de/0z9h', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(413, 'Testuser-bpm', '0432', 'KCQH', 'https://hgf.de/12pr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(414, 'Testuser-bpm', '0387', 'UCQU', 'https://hgf.de/lrqk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(415, 'Testuser-bpm', '0458', '9CRL', 'https://hgf.de/y1ca', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(416, 'Testuser-bpm', '0363', 'KCRX', 'https://hgf.de/wpvq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(417, 'Testuser-bpm', '0392', 'UCTF', 'https://hgf.de/j0sb', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(418, 'Testuser-bpm', '0477', '9CU4', 'https://hgf.de/0dj7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(419, 'Testuser-bpm', '0434', 'KCUK', 'https://hgf.de/5-go', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(420, 'Testuser-bpm', '0255', 'UCUW', 'https://hgf.de/3qps', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(421, 'Testuser-bpm', '0440', '9CVN', 'https://hgf.de/ztu9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(422, 'Testuser-bpm', '0464', 'KCW3', 'https://hgf.de/prra', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(423, 'Testuser-bpm', '0396', 'UCWJ', 'https://hgf.de/1df7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(424, 'Testuser-bpm', '0281', '9CX9', 'https://hgf.de/t67a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(425, 'Testuser-bpm', '0258', 'KCXM', 'https://hgf.de/wmct', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(426, 'Testuser-bpm', '0463', 'UCXY', 'https://hgf.de/99bu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(427, 'Testuser-bpm', '0267', '9CYQ', 'https://hgf.de/plhm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(428, 'Testuser-bpm', '0448', 'KD37', 'https://hgf.de/nexf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(429, 'Testuser-bpm', '0366', 'UD3L', 'https://hgf.de/pshy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(430, 'Testuser-bpm', '0401', '9D4C', 'https://hgf.de/fz8l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(431, 'Testuser-bpm', '0341', 'KD4P', 'https://hgf.de/laa-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(432, 'Testuser-bpm', '0364', 'UD74', 'https://hgf.de/sna3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(433, 'Testuser-bpm', '0429', '9D7T', 'https://hgf.de/mpln', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(434, 'Testuser-bpm', '0403', 'KD9A', 'https://hgf.de/y0yd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(435, 'Testuser-bpm', '0430', 'UD9N', 'https://hgf.de/idb0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(436, 'Testuser-bpm', '0273', '9DAE', 'https://hgf.de/m8n4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(437, 'Testuser-bpm', '0277', 'KDAR', 'https://hgf.de/a8q7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(438, 'Testuser-bpm', '0460', 'UDC9', 'https://hgf.de/-zx1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(439, 'Testuser-bpm', '0419', '9DCV', 'https://hgf.de/01zt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(440, 'Testuser-bpm', '0268', 'KDDD', 'https://hgf.de/oa8i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(441, 'Testuser-bpm', '0496', 'U7JA', 'https://hgf.de/oam2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(442, 'Testuser-bpm', '0486', 'K7C9', 'https://hgf.de/ntir', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(443, 'Testuser-bpm', '0395', 'UDDQ', 'https://hgf.de/aie9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(444, 'Testuser-bpm', '0453', '9DEH', 'https://hgf.de/p07r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(445, 'Testuser-bpm', '0253', 'KDEU', 'https://hgf.de/0n7z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(446, 'Testuser-bpm', '0480', 'UDFC', 'https://hgf.de/1xuz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(447, 'Testuser-bpm', '0382', '9DFX', 'https://hgf.de/xs9e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(448, 'Testuser-bpm', '0412', 'KDHF', 'https://hgf.de/kfsd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(449, 'Testuser-bpm', '0275', 'UDHT', 'https://hgf.de/f6go', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(450, 'Testuser-bpm', '0389', '9DJK', 'https://hgf.de/n7yg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(451, 'Testuser-bpm', '0279', 'KDJW', 'https://hgf.de/p9lz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(452, 'Testuser-bpm', '0295', 'UDKE', 'https://hgf.de/kr7d', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(453, 'Testuser-bpm', '0490', 'U7E7', 'https://hgf.de/9s1f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(454, 'Testuser-bpm', '0342', '9DL3', 'https://hgf.de/4gyh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(455, 'Testuser-bpm', '0371', 'KDLJ', 'https://hgf.de/pgr6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(456, 'Testuser-bpm', '0416', 'UDLV', 'https://hgf.de/ni-f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(457, 'Testuser-bpm', '0398', '9DMM', 'https://hgf.de/5e1q', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(458, 'Testuser-bpm', '0466', 'KDMY', 'https://hgf.de/tgt-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(459, 'Testuser-bpm', '0336', 'UDNH', 'https://hgf.de/191m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(460, 'Testuser-bpm', '0457', '9DP7', 'https://hgf.de/hkb7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(461, 'Testuser-bpm', '0469', 'KDPL', 'https://hgf.de/2ujq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(462, 'Testuser-bpm', '0269', 'UDPX', 'https://hgf.de/e5-m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(463, 'Testuser-bpm', '0487', 'U7CM', 'https://hgf.de/azfq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(464, 'Testuser-bpm', '0294', '9DQP', 'https://hgf.de/j3gt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(465, 'Testuser-bpm', '0344', 'KDR4', 'https://hgf.de/9go2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(466, 'Testuser-bpm', '0446', 'UDRK', 'https://hgf.de/l3b7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(467, 'Testuser-bpm', '0335', '9DTA', 'https://hgf.de/nqjo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(468, 'Testuser-bpm', '0404', 'KDTN', 'https://hgf.de/m353', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(469, 'Testuser-bpm', '0411', 'UDU3', 'https://hgf.de/wrmf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(470, 'Testuser-bpm', '0348', '9DUR', 'https://hgf.de/r6rd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(471, 'Testuser-bpm', '0369', 'KDV9', 'https://hgf.de/c998', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(472, 'Testuser-bpm', '0415', 'Ubpm', 'https://hgf.de/huat', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(473, 'Testuser-bpm', '0298', '9DWD', 'https://hgf.de/vanp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(474, 'Testuser-bpm', '0356', 'KDWQ', 'https://hgf.de/bj84', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(475, 'Testuser-bpm', '0474', 'UDX7', 'https://hgf.de/48rx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(476, 'Testuser-bpm', '0326', '9DXU', 'https://hgf.de/ifbc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(477, 'Testuser-bpm', '0316', 'KDYC', 'https://hgf.de/no78', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(478, 'Testuser-bpm', '0304', 'UDYP', 'https://hgf.de/e69p', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(479, 'Testuser-bpm', '0444', '9E3F', 'https://hgf.de/demc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(480, 'Testuser-bpm', '0472', 'KE3T', 'https://hgf.de/y6yf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(481, 'Testuser-bpm', '0417', 'UE4A', 'https://hgf.de/k8yr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(482, 'Testuser-bpm', '0478', '9E4W', 'https://hgf.de/fg-c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(483, 'Testuser-bpm', '0252', 'KE7E', 'https://hgf.de/tyq6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(484, 'Testuser-bpm', '0333', 'UE7R', 'https://hgf.de/ggg2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(485, 'Testuser-bpm', '0491', '97EU', 'https://hgf.de/-mu1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(486, 'Testuser-bpm', '0384', '9E9J', 'https://hgf.de/r230', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(487, 'Testuser-bpm', '0386', 'KE9V', 'https://hgf.de/vx2b', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(488, 'Testuser-bpm', '0388', 'UEAD', 'https://hgf.de/elzx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(489, 'Testuser-bpm', '0312', '9EAY', 'https://hgf.de/ueuw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(490, 'Testuser-bpm', '0330', 'KECH', 'https://hgf.de/jxgk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(491, 'Testuser-bpm', '0360', 'UECU', 'https://hgf.de/2x3e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(492, 'Testuser-bpm', '0328', '9EDL', 'https://hgf.de/413y', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(493, 'Testuser-bpm', '0321', 'KEDX', 'https://hgf.de/xanu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(494, 'Testuser-bpm', '0437', 'UEEF', 'https://hgf.de/40zp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(495, 'Testuser-bpm', '0346', '9EF4', 'https://hgf.de/iqy6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(496, 'Testuser-bpm', '0367', 'KEFK', 'https://hgf.de/flli', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(497, 'Testuser-bpm', '0465', 'UEFW', 'https://hgf.de/5ln0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(498, 'Testuser-bpm', '0283', '9EHN', 'https://hgf.de/7q54', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(499, 'Testuser-bpm', '0310', 'KEJ3', 'https://hgf.de/okv7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(500, 'Testuser-bpm', '0313', 'UEJJ', 'https://hgf.de/727m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_termine` +-- + +CREATE TABLE `bpm_termine` ( + `tm_id` int(11) NOT NULL, + `tm_datum` datetime NOT NULL, + `tm_standort` enum('K','L') NOT NULL, + `tm_plaetze` int(11) NOT NULL COMMENT 'Anzahl der möglichen Teilnehmer', + `tm_raum` varchar(200) NOT NULL, + `tm_referenznr` varchar(200) NOT NULL COMMENT 'Verwendungszweck Überweisung' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_term_kand` +-- + +CREATE TABLE `bpm_term_kand` ( + `tk_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tm_id` int(11) NOT NULL, + `tp_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_upload` +-- + +CREATE TABLE `bpm_upload` ( + `up_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `file` varchar(250) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `dok_dat` datetime NOT NULL, + `upload_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_upload` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_zuordnung_hs` +-- + +CREATE TABLE `bpm_zuordnung_hs` ( + `zu_id` int(11) NOT NULL, + `plz` int(11) NOT NULL, + `ort` varchar(250) NOT NULL, + `landkreis` varchar(250) NOT NULL, + `rp` varchar(250) NOT NULL, + `hs` enum('Ludwigsburg','Kehl') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_zuordnung_hs` +-- + +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(1, 78267, 'Aach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(2, 73430, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(3, 73431, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(4, 73432, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(5, 73433, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(6, 73434, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(7, 74232, 'Abstatt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(8, 73453, 'Abtsgmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(9, 88147, 'Achberg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(10, 77855, 'Achern', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(11, 88480, 'Achstetten', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(12, 73099, 'Adelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(13, 73486, 'Adelmannsfelden', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(14, 74740, 'Adelsheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(15, 71563, 'Affalterbach', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(16, 74858, 'Aglasterhausen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(17, 74744, 'Ahorn', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(18, 73101, 'Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(19, 78733, 'Aichhalden', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(20, 88317, 'Aichstetten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(21, 72631, 'Aichtal', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(22, 73773, 'Aichwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(23, 71134, 'Aidlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(24, 79677, 'Aitern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(25, 88319, 'Aitrach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(26, 79774, 'Albbruck', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(27, 73095, 'Albershausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(28, 72458, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(29, 72459, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(30, 72461, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(31, 78554, 'Aldingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(32, 73553, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(33, 73655, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(34, 78476, 'Allensbach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(35, 88422, 'Alleshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(36, 88348, 'Allmannsweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(37, 89604, 'Allmendingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(38, 71573, 'Allmersbach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(39, 72275, 'Alpirsbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(40, 73776, 'Altbach', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(41, 71155, 'Altdorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(42, 72655, 'Altdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(43, 72657, 'Altenriet', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(44, 72213, 'Altensteig', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(45, 88499, 'Altheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(46, 89605, 'Altheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(47, 89174, 'Altheim (Alb)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(48, 75382, 'Althengstett', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(49, 71566, 'Althütte', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(50, 68804, 'Altlußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(51, 88361, 'Altshausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(52, 72119, 'Ammerbuch', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(53, 73340, 'Amstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(54, 88279, 'Amtzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(55, 74918, 'Angelbachtal', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(56, 77767, 'Appenweier', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(57, 88260, 'Argenbühl', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(58, 71546, 'Aspach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(59, 71679, 'Asperg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(60, 97959, 'Assamstadt', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(61, 89176, 'Asselfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(62, 88448, 'Attenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(63, 79280, 'Au', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(64, 76474, 'Au am Rhein', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(65, 71549, 'Auenwald', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(66, 79424, 'Auggen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(67, 88326, 'Aulendorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(68, 71522, 'Backnang', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(69, 79415, 'Bad Bellingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(70, 73087, 'Bad Boll', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(71, 88422, 'Bad Buchau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(72, 73312, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(73, 73342, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(74, 73345, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(75, 78073, 'Bad Dürrheim', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(76, 76530, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(77, 76532, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(78, 76534, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(79, 79410, 'Badenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(80, 74177, 'Bad Friedrichshall', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(81, 76332, 'Bad Herrenalb', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(82, 79189, 'Bad Krozingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(83, 75378, 'Bad Liebenzell', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(84, 97980, 'Bad Mergentheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(85, 72250, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(86, 77740, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(87, 74906, 'Bad Rappenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(88, 77776, 'Bad Rippoldsau-Schapbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(89, 79713, 'Bad Säckingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(90, 88348, 'Bad Saulgau', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(91, 76669, 'Bad Schönborn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(92, 88427, 'Bad Schussenried', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(93, 75385, 'Bad Teinach-Zavelstein', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(94, 73337, 'Bad Überkingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(95, 72574, 'Bad Urach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(96, 88339, 'Bad Waldsee', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(97, 75323, 'Bad Wildbad', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(98, 74206, 'Bad Wimpfen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(99, 88410, 'Bad Wurzach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(100, 79353, 'Bahlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(101, 88255, 'Baienfurt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(102, 72270, 'Baiersbronn', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(103, 88255, 'Baindt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(104, 78582, 'Balgheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(105, 72336, 'Balingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(106, 89177, 'Ballendorf', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(107, 79282, 'Ballrechten-Dottingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(108, 73666, 'Baltmannsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(109, 88481, 'Balzheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(110, 69245, 'Bammental', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(111, 78580, 'Bärenthal', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(112, 73566, 'Bartholomä', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(113, 71543, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(114, 71717, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(115, 89179, 'Beimerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(116, 72658, 'Bempflingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(117, 71726, 'Benningen am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(118, 88276, 'Berg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(119, 88368, 'Bergatreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(120, 77791, 'Berghaupten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(121, 89180, 'Berghülen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(122, 73663, 'Berglen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(123, 88450, 'Berkheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(124, 88697, 'Bermatingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(125, 79872, 'Bernau im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(126, 89182, 'Bernstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(127, 74354, 'Besigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(128, 88422, 'Betzenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(129, 72660, 'Beuren', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(130, 88631, 'Beuron', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(131, 77781, 'Biberach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(132, 88400, 'Biberach an der Riß', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(133, 79215, 'Biederbach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(134, 76467, 'Bietigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(135, 74321, 'Bietigheim-Bissingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(136, 74842, 'Billigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(137, 74862, 'Binau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(138, 72511, 'Bingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(139, 79589, 'Binzen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(140, 73102, 'Birenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(141, 75217, 'Birkenfeld', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(142, 76476, 'Bischweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(143, 72406, 'Bisingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(144, 73266, 'Bissingen an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(145, 72475, 'Bitz', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(146, 89143, 'Blaubeuren', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(147, 74572, 'Blaufelden', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(148, 89134, 'Blaustein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(149, 78176, 'Blumberg', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(150, 73560, 'Böbingen an der Rems', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(151, 71032, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(152, 71034, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(153, 72411, 'Bodelshausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(154, 78351, 'Bodman-Ludwigshafen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(155, 88285, 'Bodnegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(156, 89558, 'Böhmenkirch', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(157, 79677, 'Böllen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(158, 79283, 'Bollschweil', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(159, 88361, 'Boms', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(160, 71149, 'Bondorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(161, 79848, 'Bonndorf im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(162, 74357, 'Bönnigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(163, 73441, 'Bopfingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(164, 89177, 'Börslingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(165, 73104, 'Börtlingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(166, 78662, 'Bösingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(167, 78583, 'Böttingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(168, 79268, 'Bötzingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(169, 97944, 'Boxberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(170, 74336, 'Brackenheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(171, 78199, 'Bräunlingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(172, 74542, 'Braunsbach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(173, 79206, 'Breisach am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(174, 89183, 'Breitingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(175, 79874, 'Breitnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(176, 75015, 'Bretten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(177, 74626, 'Bretzfeld', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(178, 78086, 'Brigachtal', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(179, 76646, 'Bruchsal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(180, 68782, 'Brühl', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(181, 78585, 'Bubsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(182, 79256, 'Buchenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(183, 74722, 'Buchen (Odenwald)', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(184, 78567, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(185, 88637, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Ludwigsburg'), +(186, 79426, 'Buggingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(187, 77815, 'Bühl', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(188, 77830, 'Bühlertal', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(189, 74424, 'Bühlertann', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(190, 74426, 'Bühlerzell', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(191, 88483, 'Burgrieden', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(192, 71576, 'Burgstetten', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(193, 72393, 'Burladingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(194, 78266, 'Büsingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(195, 75365, 'Calw', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(196, 74389, 'Cleebronn', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(197, 74564, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(198, 74597, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(199, 97993, 'Creglingen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(200, 79837, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(201, 79875, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(202, 88718, 'Daisendorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(203, 78083, 'Dauchingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(204, 72356, 'Dautmergen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(205, 75392, 'Deckenpfronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(206, 88693, 'Deggenhausertal', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(207, 73312, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(208, 73326, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(209, 78586, 'Deilingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(210, 78652, 'Deißlingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(211, 73779, 'Deizisau', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(212, 73770, 'Denkendorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(213, 78554, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(214, 78588, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(215, 79211, 'Denzlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(216, 72135, 'Dettenhausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(217, 76706, 'Dettenheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(218, 79802, 'Dettighofen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(219, 72581, 'Dettingen an der Erms', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(220, 88451, 'Dettingen an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(221, 73265, 'Dettingen unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(222, 69234, 'Dielheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(223, 89165, 'Dietenheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(224, 78661, 'Dietingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(225, 89561, 'Dischingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(226, 71254, 'Ditzingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(227, 75335, 'Dobel', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(228, 79804, 'Dogern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(229, 78166, 'Donaueschingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(230, 73072, 'Donzdorf', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(231, 72358, 'Dormettingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(232, 72175, 'Dornhan', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(233, 89160, 'Dornstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(234, 72280, 'Dornstetten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(235, 74677, 'Dörzbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(236, 69221, 'Dossenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(237, 72359, 'Dotternhausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(238, 73345, 'Drackenstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(239, 78655, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(240, 78713, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(241, 77770, 'Durbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(242, 78589, 'Dürbheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(243, 78591, 'Durchhausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(244, 73568, 'Durlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(245, 88525, 'Dürmentingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(246, 76448, 'Durmersheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(247, 73105, 'Dürnau', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(248, 88422, 'Dürnau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(249, 72144, 'Dußlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(250, 88370, 'Ebenweiler', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(251, 64754, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(252, 69412, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(253, 69429, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(254, 69434, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(255, 71735, 'Eberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(256, 88436, 'Eberhardzell', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(257, 73061, 'Ebersbach an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(258, 88371, 'Ebersbach-Musbach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(259, 74246, 'Eberstadt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(260, 72224, 'Ebhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(261, 79285, 'Ebringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(262, 68535, 'Edingen-Neckarhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(263, 79588, 'Efringen-Kirchen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(264, 72227, 'Egenhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(265, 78592, 'Egesheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(266, 76344, 'Eggenstein-Leopoldshafen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(267, 79805, 'Eggingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(268, 89584, 'Ehingen (Donau)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(269, 71139, 'Ehningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(270, 79238, 'Ehrenkirchen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(271, 88361, 'Eichstegen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(272, 79356, 'Eichstetten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(273, 78253, 'Eigeltingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(274, 79591, 'Eimeldingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(275, 79871, 'Eisenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(276, 75239, 'Eisingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(277, 73054, 'Eislingen/Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(278, 76477, 'Elchesheim-Illingen', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(279, 73488, 'Ellenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(280, 74248, 'Ellhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(281, 73479, 'Ellwangen (Jagst)', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(282, 79215, 'Elzach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(283, 74834, 'Elztal', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(284, 88499, 'Emeringen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(285, 89607, 'Emerkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(286, 79312, 'Emmendingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(287, 78576, 'Emmingen-Liptingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(288, 72186, 'Empfingen', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(289, 79346, 'Endingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(290, 75331, 'Engelsbrand', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(291, 78234, 'Engen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(292, 72829, 'Engstingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(293, 72800, 'Eningen unter Achalm', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(294, 75337, 'Enzklösterle', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(295, 74925, 'Epfenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(296, 78736, 'Epfendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(297, 69214, 'Eppelheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(298, 75031, 'Eppingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(299, 89155, 'Erbach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(300, 71729, 'Erdmannhausen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(301, 88097, 'Eriskirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(302, 73268, 'Erkenbrechtsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(303, 74235, 'Erlenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(304, 88416, 'Erlenmoos', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(305, 74391, 'Erligheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(306, 88453, 'Erolzheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(307, 88521, 'Ertingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(308, 73569, 'Eschach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(309, 79427, 'Eschbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(310, 78664, 'Eschbronn', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(311, 74927, 'Eschelbronn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(312, 73037, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(313, 73107, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(314, 73457, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(315, 73563, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(316, 73566, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(317, 73728, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(318, 73730, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(319, 73732, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(320, 73733, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(321, 73734, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(322, 77955, 'Ettenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(323, 76275, 'Ettlingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(324, 72184, 'Eutingen im Gäu', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(325, 74864, 'Fahrenbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(326, 79868, 'Feldberg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(327, 70734, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(328, 70736, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(329, 74579, 'Fichtenau', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(330, 74427, 'Fichtenberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(331, 70794, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(332, 71111, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(333, 77716, 'Fischerbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(334, 79592, 'Fischingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(335, 74223, 'Flein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(336, 88373, 'Fleischwangen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(337, 78737, 'Fluorn-Winzeln', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(338, 76596, 'Forbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(339, 79362, 'Forchheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(340, 74670, 'Forchtenberg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(341, 76694, 'Forst', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(342, 74586, 'Frankenhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(343, 79348, 'Freiamt', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(344, 71691, 'Freiberg am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(345, 79098, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(346, 79100, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(347, 79102, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(348, 79104, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(349, 79106, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(350, 79108, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(351, 79110, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(352, 79111, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(353, 79112, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(354, 79114, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(355, 79115, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(356, 79117, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(357, 97896, 'Freudenberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(358, 72250, 'Freudenstadt', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(359, 74392, 'Freudental', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(360, 72636, 'Frickenhausen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(361, 88699, 'Frickingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(362, 78567, 'Fridingen an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(363, 79877, 'Friedenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(364, 88045, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(365, 88046, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(366, 88048, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(367, 77948, 'Friesenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(368, 71292, 'Friolzheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(369, 78665, 'Frittlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(370, 79677, 'Fröhnd', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(371, 88273, 'Fronreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(372, 78120, 'Furtwangen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(373, 76571, 'Gaggenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(374, 69251, 'Gaiberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(375, 78343, 'Gaienhofen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(376, 74405, 'Gaildorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(377, 78262, 'Gailingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(378, 73108, 'Gammelshausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(379, 72501, 'Gammertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(380, 71116, 'Gärtringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(381, 71126, 'Gäufelden', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(382, 75391, 'Gechingen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(383, 78187, 'Geisingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(384, 72351, 'Geislingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(385, 73312, 'Geislingen an der Steige', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(386, 75050, 'Gemmingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(387, 74376, 'Gemmrigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(388, 77723, 'Gengenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(389, 74582, 'Gerabronn', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(390, 70839, 'Gerlingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(391, 76593, 'Gernsbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(392, 89547, 'Gerstetten', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(393, 89522, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(394, 89537, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(395, 73333, 'Gingen an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(396, 72293, 'Glatten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(397, 79286, 'Glottertal', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(398, 73571, 'Göggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(399, 72532, 'Gomadingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(400, 72810, 'Gomaringen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(401, 75053, 'Gondelsheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(402, 73033, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(403, 73035, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(404, 73037, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(405, 73116, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(406, 79733, 'Görwihl', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(407, 78559, 'Gosheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(408, 79288, 'Gottenheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(409, 78244, 'Gottmadingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(410, 76676, 'Graben-Neudorf', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(411, 72582, 'Grabenstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(412, 71120, 'Grafenau', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(413, 72661, 'Grafenberg', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(414, 79865, 'Grafenhausen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(415, 79639, 'Grenzach-Wyhlen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(416, 89608, 'Griesingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(417, 72294, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(418, 72297, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(419, 72663, 'Großbettlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(420, 71723, 'Großbottwar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(421, 72415, 'Grosselfingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(422, 71577, 'Großerlach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(423, 97950, 'Großrinderfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(424, 73344, 'Gruibingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(425, 89613, 'Grundsheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(426, 88287, 'Grünkraut', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(427, 97947, 'Grünsfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(428, 74417, 'Gschwend', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(429, 88379, 'Guggenhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(430, 74363, 'Güglingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(431, 79194, 'Gundelfingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(432, 74831, 'Gundelsheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(433, 78594, 'Gunningen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(434, 79261, 'Gutach im Breisgau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(435, 77793, 'Gutach (Schwarzwaldbahn)', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(436, 78148, 'Gütenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(437, 88484, 'Gutenzell-Hürbel', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(438, 79685, 'Häg-Ehrsberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(439, 88709, 'Hagnau am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(440, 72401, 'Haigerloch', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(441, 72221, 'Haiterbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(442, 76707, 'Hambrücken', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(443, 74736, 'Hardheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(444, 78739, 'Hardt', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(445, 74239, 'Hardthausen am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(446, 79258, 'Hartheim am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(447, 79686, 'Hasel', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(448, 77716, 'Haslach im Kinzigtal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(449, 74855, 'Haßmersheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(450, 73110, 'Hattenhofen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(451, 77756, 'Hausach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(452, 89597, 'Hausen am Bussen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(453, 72361, 'Hausen am Tann', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(454, 79688, 'Hausen im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(455, 78595, 'Hausen ob Verena', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(456, 79837, 'Häusern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(457, 72534, 'Hayingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(458, 72379, 'Hechingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(459, 69434, 'Heddesbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(460, 68542, 'Heddesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(461, 69115, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(462, 69117, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(463, 69118, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(464, 69120, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(465, 69121, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(466, 69123, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(467, 69124, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(468, 69126, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(469, 89518, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(470, 89520, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(471, 89522, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(472, 74072, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(473, 74074, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(474, 74076, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(475, 74078, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(476, 74080, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(477, 74081, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(478, 88633, 'Heiligenberg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(479, 69253, 'Heiligkreuzsteinach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(480, 71296, 'Heimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(481, 73037, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(482, 73092, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(483, 73107, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(484, 79423, 'Heitersheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(485, 74921, 'Helmstadt-Bargen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(486, 71282, 'Hemmingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(487, 69502, 'Hemsbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(488, 88518, 'Herbertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(489, 79336, 'Herbolzheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(490, 89542, 'Herbrechtingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(491, 88634, 'Herdwangen-Schönach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(492, 89537, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(493, 89568, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(494, 72535, 'Heroldstatt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(495, 71083, 'Herrenberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(496, 79737, 'Herrischried', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(497, 74394, 'Hessigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(498, 72513, 'Hettingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(499, 73540, 'Heubach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(500, 73572, 'Heuchlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(501, 79194, 'Heuweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(502, 71157, 'Hildrizhausen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(503, 78247, 'Hilzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(504, 79856, 'Hinterzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(505, 72145, 'Hirrlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(506, 69493, 'Hirschberg an der Bergstraße', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(507, 73269, 'Hochdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(508, 88436, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(509, 88454, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(510, 79862, 'Höchenschwand', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(511, 68766, 'Hockenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(512, 75339, 'Höfen an der Enz', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(513, 77716, 'Hofstetten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(514, 77749, 'Hohberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(515, 78355, 'Hohenfels', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(516, 73345, 'Hohenstadt', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(517, 72531, 'Hohenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(518, 88367, 'Hohentengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(519, 79801, 'Hohentengen am Hochrhein', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(520, 71088, 'Holzgerlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(521, 89183, 'Holzkirch', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(522, 73271, 'Holzmaden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(523, 74746, 'Höpfingen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(524, 72160, 'Horb am Neckar', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(525, 79289, 'Horben', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(526, 88263, 'Horgenzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(527, 78132, 'Hornberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(528, 88374, 'Hoßkirch', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(529, 74928, 'Hüffenhardt', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(530, 78183, 'Hüfingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(531, 76549, 'Hügelsheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(532, 72584, 'Hülben', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(533, 89185, 'Hüttisheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(534, 73434, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(535, 73453, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(536, 73460, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(537, 79837, 'Ibach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(538, 76473, 'Iffezheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(539, 97999, 'Igersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(540, 73574, 'Iggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(541, 79241, 'Ihringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(542, 89171, 'Illerkirchberg', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(543, 89186, 'Illerrieden', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(544, 75428, 'Illingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(545, 88636, 'Illmensee', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(546, 74360, 'Ilsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(547, 74532, 'Ilshofen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(548, 68549, 'Ilvesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(549, 78194, 'Immendingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(550, 88090, 'Immenstaad am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(551, 74653, 'Ingelfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(552, 74379, 'Ingersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(553, 88456, 'Ingoldingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(554, 72514, 'Inzigkofen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(555, 79594, 'Inzlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(556, 78597, 'Irndorf', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(557, 88316, 'Isny im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(558, 75228, 'Ispringen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(559, 74930, 'Ittlingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(560, 74249, 'Jagsthausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(561, 73489, 'Jagstzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(562, 79798, 'Jestetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(563, 71131, 'Jettingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(564, 72417, 'Jungingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(565, 73553, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(566, 73642, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(567, 73667, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(568, 75236, 'Kämpfelbach', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(569, 79400, 'Kandern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(570, 88422, 'Kanzach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(571, 77966, 'Kappel-Grafenhausen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(572, 77876, 'Kappelrodeck', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(573, 76307, 'Karlsbad', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(574, 76689, 'Karlsdorf-Neuthard', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(575, 76131, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(576, 76133, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(577, 76135, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(578, 76137, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(579, 76139, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(580, 76149, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(581, 76185, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(582, 76187, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(583, 76189, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(584, 76199, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(585, 76227, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(586, 76228, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(587, 76229, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(588, 77694, 'Kehl', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(589, 75210, 'Keltern', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(590, 79341, 'Kenzingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(591, 71394, 'Kernen im Remstal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(592, 68775, 'Ketsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(593, 75249, 'Kieselbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(594, 77971, 'Kippenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(595, 74912, 'Kirchardt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(596, 88486, 'Kirchberg an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(597, 74592, 'Kirchberg an der Jagst', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(598, 71737, 'Kirchberg an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(599, 88457, 'Kirchdorf an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(600, 72138, 'Kirchentellinsfurt', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(601, 74366, 'Kirchheim am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(602, 73467, 'Kirchheim am Ries', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(603, 73230, 'Kirchheim unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(604, 79199, 'Kirchzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(605, 88353, 'Kißlegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(606, 79692, 'Kleines Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(607, 79771, 'Klettgau', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(608, 75438, 'Knittlingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(609, 72664, 'Kohlberg', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(610, 78600, 'Kolbingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(611, 73257, 'Köngen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(612, 97953, 'Königheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(613, 75203, 'Königsbach-Stein', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(614, 89551, 'Königsbronn', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(615, 88376, 'Königseggwald', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(616, 78126, 'Königsfeld im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(617, 78598, 'Königsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(618, 78462, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(619, 78464, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(620, 78465, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(621, 78467, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(622, 71404, 'Korb', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(623, 70825, 'Korntal-Münchingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(624, 70806, 'Kornwestheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(625, 76703, 'Kraichtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(626, 72505, 'Krauchenwies', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(627, 74238, 'Krautheim', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(628, 74594, 'Kreßberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(629, 88079, 'Kressbronn am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(630, 76709, 'Kronau', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(631, 73329, 'Kuchen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(632, 97900, 'Külsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(633, 74653, 'Künzelsau', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(634, 74635, 'Kupferzell', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(635, 76456, 'Kuppenheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(636, 75057, 'Kürnbach', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(637, 79790, 'Küssaberg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(638, 72127, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(639, 72138, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(640, 68526, 'Ladenburg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(641, 77933, 'Lahr/Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(642, 89150, 'Laichingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(643, 88085, 'Langenargen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(644, 89129, 'Langenau', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(645, 74243, 'Langenbrettach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(646, 74595, 'Langenburg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(647, 88515, 'Langenenslingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(648, 73466, 'Lauchheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(649, 79787, 'Lauchringen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(650, 97922, 'Lauda-Königshofen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(651, 69514, 'Laudenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(652, 77886, 'Lauf', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(653, 79725, 'Laufenburg (Baden)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(654, 74348, 'Lauffen am Neckar', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(655, 88471, 'Laupheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(656, 77794, 'Lautenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(657, 89584, 'Lauterach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(658, 78730, 'Lauterbach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(659, 73111, 'Lauterstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(660, 74251, 'Lehrensteinsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(661, 88637, 'Leibertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(662, 69181, 'Leimen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(663, 70771, 'Leinfelden-Echterdingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(664, 74211, 'Leingarten', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(665, 73575, 'Leinzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(666, 73252, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(667, 73266, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(668, 79853, 'Lenzkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(669, 71229, 'Leonberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(670, 71397, 'Leutenbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(671, 88299, 'Leutkirch im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(672, 77839, 'Lichtenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(673, 72805, 'Lichtenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(674, 73669, 'Lichtenwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(675, 74838, 'Limbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(676, 76351, 'Linkenheim-Hochstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(677, 74931, 'Lobbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(678, 74369, 'Löchgau', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(679, 76597, 'Loffenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(680, 79843, 'Löffingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(681, 89173, 'Lonsee', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(682, 73547, 'Lorch', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(683, 79539, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(684, 79540, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(685, 79541, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(686, 72290, 'Loßburg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(687, 79807, 'Lottstetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(688, 74245, 'Löwenstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'); +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(689, 71634, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(690, 71636, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(691, 71638, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(692, 71640, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(693, 71642, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(694, 71672, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(695, 71106, 'Magstadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(696, 77972, 'Mahlberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(697, 78601, 'Mahlstetten', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(698, 74535, 'Mainhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(699, 79429, 'Malsburg-Marzell', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(700, 69254, 'Malsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(701, 76316, 'Malsch', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(702, 79364, 'Malterdingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(703, 68159, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(704, 68161, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(705, 68163, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(706, 68165, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(707, 68167, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(708, 68169, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(709, 68199, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(710, 68219, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(711, 68229, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(712, 68239, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(713, 68259, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(714, 68305, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(715, 68307, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(716, 68309, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(717, 71672, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(718, 71711, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(719, 79232, 'March', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(720, 88677, 'Markdorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(721, 71706, 'Markgröningen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(722, 76359, 'Marxzell', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(723, 88437, 'Maselheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(724, 74252, 'Massenbachhausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(725, 69256, 'Mauer', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(726, 75433, 'Maulbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(727, 79689, 'Maulburg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(728, 88074, 'Meckenbeuren', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(729, 74909, 'Meckesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(730, 88709, 'Meersburg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(731, 72537, 'Mehrstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(732, 77974, 'Meißenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(733, 88512, 'Mengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(734, 79291, 'Merdingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(735, 89188, 'Merklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(736, 79249, 'Merzhausen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(737, 88605, 'Meßkirch', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(738, 72469, 'Meßstetten', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(739, 72555, 'Metzingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(740, 74544, 'Michelbach an der Bilz', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(741, 74545, 'Michelfeld', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(742, 88487, 'Mietingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(743, 88441, 'Mittelbiberach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(744, 74219, 'Möckmühl', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(745, 73563, 'Mögglingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(746, 71696, 'Möglingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(747, 78087, 'Mönchweiler', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(748, 71297, 'Mönsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(749, 78345, 'Moos', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(750, 88422, 'Moosburg', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(751, 74821, 'Mosbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(752, 72116, 'Mössingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(753, 71159, 'Mötzingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(754, 69427, 'Mudau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(755, 76461, 'Muggensturm', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(756, 75417, 'Mühlacker', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(757, 77796, 'Mühlenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(758, 69242, 'Mühlhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(759, 78259, 'Mühlhausen-Ehingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(760, 73347, 'Mühlhausen im Täle', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(761, 78570, 'Mühlheim an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(762, 78357, 'Mühlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(763, 74673, 'Mulfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(764, 79379, 'Müllheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(765, 74395, 'Mundelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(766, 89597, 'Munderkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(767, 72525, 'Münsingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(768, 79244, 'Münstertal/Schwarzwald', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(769, 79730, 'Murg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(770, 71711, 'Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(771, 71540, 'Murrhardt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(772, 73557, 'Mutlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(773, 72202, 'Nagold', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(774, 89564, 'Nattheim', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(775, 74924, 'Neckarbischofsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(776, 69151, 'Neckargemünd', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(777, 69437, 'Neckargerach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(778, 74172, 'Neckarsulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(779, 72666, 'Neckartailfingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(780, 72654, 'Neckartenzlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(781, 74382, 'Neckarwestheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(782, 74865, 'Neckarzimmern', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(783, 89189, 'Neenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(784, 72147, 'Nehren', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(785, 74933, 'Neidenstein', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(786, 73272, 'Neidlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(787, 89191, 'Nellingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(788, 89129, 'Nerenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(789, 73450, 'Neresheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(790, 75385, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(791, 75387, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(792, 74861, 'Neudenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(793, 75305, 'Neuenbürg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(794, 79395, 'Neuenburg am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(795, 74196, 'Neuenstadt am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(796, 74632, 'Neuenstein', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(797, 72639, 'Neuffen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(798, 72419, 'Neufra', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(799, 75242, 'Neuhausen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(800, 73765, 'Neuhausen auf den Fildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(801, 78579, 'Neuhausen ob Eck', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(802, 88099, 'Neukirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(803, 73491, 'Neuler', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(804, 75245, 'Neulingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(805, 68809, 'Neulußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(806, 74867, 'Neunkirchen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(807, 77743, 'Neuried', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(808, 72149, 'Neustetten', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(809, 75389, 'Neuweiler', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(810, 78078, 'Niedereschach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(811, 74676, 'Niedernhall', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(812, 97996, 'Niederstetten', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(813, 89168, 'Niederstotzingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(814, 75223, 'Niefern-Öschelbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(815, 74226, 'Nordheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(816, 77787, 'Nordrach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(817, 73274, 'Notzingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(818, 71154, 'Nufringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(819, 72622, 'Nürtingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(820, 72362, 'Nusplingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(821, 69226, 'Nußloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(822, 72644, 'Oberboihingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(823, 75038, 'Oberderdingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(824, 89610, 'Oberdischingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(825, 73569, 'Obergröningen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(826, 77784, 'Oberharmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(827, 68794, 'Oberhausen-Rheinhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(828, 77704, 'Oberkirch', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(829, 73447, 'Oberkochen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(830, 89611, 'Obermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(831, 78727, 'Oberndorf am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(832, 72364, 'Obernheim', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(833, 75394, 'Oberreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(834, 79254, 'Oberried', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(835, 71739, 'Oberriexingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(836, 74420, 'Oberrot', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(837, 74423, 'Obersontheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(838, 89613, 'Oberstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(839, 71720, 'Oberstenfeld', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(840, 74182, 'Obersulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(841, 88094, 'Oberteuringen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(842, 77709, 'Oberwolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(843, 74847, 'Obrigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(844, 88416, 'Ochsenhausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(845, 74229, 'Oedheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(846, 74254, 'Offenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(847, 77652, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(848, 77654, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(849, 77656, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(850, 72131, 'Ofterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(851, 68723, 'Oftersheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(852, 88422, 'Oggelshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(853, 77797, 'Ohlsbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(854, 73275, 'Ohmden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(855, 78337, 'Öhningen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(856, 74613, 'Öhringen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(857, 75248, 'Ölbronn-Dürrn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(858, 89129, 'Öllingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(859, 89614, 'Öpfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(860, 77728, 'Oppenau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(861, 71560, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(862, 71570, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(863, 78359, 'Orsingen-Nenzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(864, 77799, 'Ortenberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(865, 75395, 'Ostelsheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(866, 74706, 'Osterburken', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(867, 73760, 'Ostfildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(868, 88356, 'Ostrach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(869, 76684, 'Östringen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(870, 76470, 'Ötigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(871, 75443, 'Ötisheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(872, 73113, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(873, 73529, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(874, 77883, 'Ottenhöfen im Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(875, 77833, 'Ottersweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(876, 73277, 'Owen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(877, 88696, 'Owingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(878, 74397, 'Pfaffenhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(879, 79292, 'Pfaffenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(880, 72285, 'Pfalzgrafenweiler', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(881, 74629, 'Pfedelbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(882, 76327, 'Pfinztal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(883, 75172, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(884, 75173, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(885, 75175, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(886, 75177, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(887, 75179, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(888, 75180, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(889, 75181, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(890, 72539, 'Pfronstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(891, 88630, 'Pfullendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(892, 72793, 'Pfullingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(893, 76661, 'Philippsburg', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(894, 68723, 'Plankstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(895, 74385, 'Pleidelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(896, 72124, 'Pliezhausen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(897, 73207, 'Plochingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(898, 73642, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(899, 73655, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(900, 78315, 'Radolfzell', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(901, 73492, 'Rainau', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(902, 89192, 'Rammingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(903, 72414, 'Rangendingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(904, 76437, 'Rastatt', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(905, 72365, 'Ratshausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(906, 69231, 'Rauenberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(907, 88212, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(908, 88213, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(909, 88214, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(910, 74747, 'Ravenstein', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(911, 73098, 'Rechberghausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(912, 89611, 'Rechtenstein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(913, 74934, 'Reichartshausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(914, 78479, 'Reichenau', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(915, 78564, 'Reichenbach am Heuberg', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(916, 73262, 'Reichenbach an der Fils', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(917, 68799, 'Reilingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(918, 75196, 'Remchingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(919, 71686, 'Remseck am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(920, 73630, 'Remshalden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(921, 77871, 'Renchen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(922, 71272, 'Renningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(923, 78603, 'Renquishausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(924, 79276, 'Reute', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(925, 72760, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(926, 72762, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(927, 72764, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(928, 72766, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(929, 72768, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(930, 72770, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(931, 77866, 'Rheinau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(932, 79618, 'Rheinfelden (Baden)', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(933, 79365, 'Rheinhausen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(934, 77836, 'Rheinmünster', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(935, 76287, 'Rheinstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(936, 79736, 'Rickenbach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(937, 72585, 'Riederich', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(938, 88377, 'Riedhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(939, 88499, 'Riedlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(940, 79359, 'Riegel', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(941, 78239, 'Rielasingen-Worblingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(942, 73469, 'Riesbürg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(943, 78604, 'Rietheim-Weilheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(944, 77975, 'Ringsheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(945, 72229, 'Rohrdorf', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(946, 74255, 'Roigheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(947, 72587, 'Römerstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(948, 74749, 'Rosenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(949, 73494, 'Rosenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(950, 72348, 'Rosenfeld', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(951, 74538, 'Rosengarten', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(952, 74585, 'Rot am See', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(953, 88430, 'Rot an der Rot', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(954, 89616, 'Rottenacker', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(955, 72108, 'Rottenburg am Neckar', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(956, 78628, 'Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(957, 73635, 'Rudersberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(958, 79595, 'Rümmingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(959, 73577, 'Ruppertshofen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(960, 77977, 'Rust', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(961, 71277, 'Rutesheim', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(962, 74343, 'Sachsenheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(963, 73084, 'Salach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(964, 88682, 'Salem', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(965, 69207, 'Sandhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(966, 79271, 'Sankt Peter', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(967, 77880, 'Sasbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(968, 79361, 'Sasbach am Kaiserstuhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(969, 77887, 'Sasbachwalden', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(970, 74589, 'Satteldorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(971, 88605, 'Sauldorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(972, 79597, 'Schallbach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(973, 79227, 'Schallstadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(974, 73579, 'Schechingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(975, 72516, 'Scheer', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(976, 74850, 'Schefflenz', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(977, 89601, 'Schelklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(978, 88433, 'Schemmerhofen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(979, 77773, 'Schenkenzell', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(980, 77761, 'Schiltach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(981, 72667, 'Schlaitdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(982, 73114, 'Schlat', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(983, 79418, 'Schliengen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(984, 88281, 'Schlier', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(985, 73278, 'Schlierbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(986, 79859, 'Schluchsee', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(987, 89194, 'Schnürpflingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(988, 75328, 'Schömberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(989, 72355, 'Schömberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(990, 78136, 'Schonach im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(991, 71101, 'Schönaich', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(992, 69250, 'Schönau', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(993, 79677, 'Schönau im Schwarzwald', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(994, 69436, 'Schönbrunn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(995, 79677, 'Schönenberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(996, 74214, 'Schöntal', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(997, 78141, 'Schönwald im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(998, 79650, 'Schopfheim', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(999, 72296, 'Schopfloch', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1000, 73614, 'Schorndorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1001, 78144, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1002, 78713, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1003, 69198, 'Schriesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1004, 74575, 'Schrozberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1005, 77978, 'Schuttertal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1006, 77746, 'Schutterwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1007, 73072, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1008, 73525, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1009, 73527, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1010, 73529, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1011, 73550, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1012, 73553, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1013, 74523, 'Schwäbisch Hall', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1014, 74193, 'Schwaigern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1015, 71409, 'Schwaikheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1016, 77963, 'Schwanau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1017, 74869, 'Schwarzach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1018, 88477, 'Schwendi', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1019, 72477, 'Schwenningen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1020, 68723, 'Schwetzingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1021, 71701, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1022, 71706, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1023, 79739, 'Schwörstadt', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1024, 74743, 'Seckach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1025, 77889, 'Seebach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1026, 88422, 'Seekirch', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1027, 77960, 'Seelbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1028, 72297, 'Seewald', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1029, 78606, 'Seitingen-Oberflacht', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1030, 74372, 'Sersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1031, 89129, 'Setzingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1032, 79350, 'Sexau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1033, 74936, 'Siegelsbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1034, 72488, 'Sigmaringen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1035, 72517, 'Sigmaringendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1036, 72226, 'Simmersfeld', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1037, 75397, 'Simmozheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1038, 79263, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1039, 79271, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1040, 71063, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1041, 71065, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1042, 71067, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1043, 71069, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1044, 78224, 'Singen (Hohentwiel)', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1045, 74889, 'Sinsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1046, 76547, 'Sinzheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1047, 78354, 'Sipplingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1048, 79294, 'Sölden', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1049, 72820, 'Sonnenbühl', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1050, 89567, 'Sontheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1051, 78549, 'Spaichingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1052, 74937, 'Spechbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1053, 71579, 'Spiegelberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1054, 73565, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1055, 73568, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1056, 73577, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1057, 89195, 'Staig', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1058, 72181, 'Starzach', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1059, 79219, 'Staufen im Breisgau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1060, 79837, 'St. Blasien', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1061, 79252, 'Stegen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1062, 77790, 'Steinach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1063, 79585, 'Steinen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1064, 71144, 'Steinenbronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1065, 88416, 'Steinhausen an der Rottum', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1066, 73566, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1067, 89555, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1068, 71711, 'Steinheim an der Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1069, 76479, 'Steinmauern', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1070, 78256, 'Steißlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1071, 75447, 'Sternenfels', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1072, 88719, 'Stetten', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1073, 72510, 'Stetten am kalten Markt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1074, 78112, 'St. Georgen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1075, 74597, 'Stimpfach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1076, 72813, 'St. Johann', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1077, 68789, 'St. Leon-Rot', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1078, 79274, 'St. Märgen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1079, 78333, 'Stockach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1080, 73495, 'Stödtlen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1081, 72479, 'Straßberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1082, 75334, 'Straubenhardt', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1083, 79780, 'Stühlingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1084, 76297, 'Stutensee', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1085, 70173, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1086, 70174, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1087, 70176, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1088, 70178, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1089, 70180, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1090, 70182, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1091, 70184, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1092, 70186, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1093, 70188, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1094, 70190, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1095, 70191, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1096, 70192, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1097, 70193, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1098, 70195, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1099, 70197, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1100, 70199, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1101, 70327, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1102, 70329, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1103, 70372, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1104, 70374, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1105, 70376, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1106, 70378, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1107, 70435, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1108, 70437, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1109, 70439, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1110, 70469, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1111, 70499, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1112, 70563, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1113, 70565, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1114, 70567, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1115, 70569, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1116, 70597, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1117, 70599, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1118, 70619, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1119, 70629, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1120, 72172, 'Sulz am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1121, 71560, 'Sulzbach an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1122, 74429, 'Sulzbach-Laufen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1123, 79295, 'Sulzburg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1124, 75056, 'Sulzfeld', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1125, 73079, 'Süßen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1126, 73527, 'Täferrot', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1127, 74388, 'Talheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1128, 78607, 'Talheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1129, 71732, 'Tamm', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1130, 73497, 'Tannhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1131, 88459, 'Tannheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1132, 97941, 'Tauberbischofsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1133, 78250, 'Tengen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1134, 79312, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1135, 79331, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1136, 88069, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1137, 88079, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1138, 88422, 'Tiefenbach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1139, 75233, 'Tiefenbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1140, 79822, 'Titisee-Neustadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1141, 79682, 'Todtmoos', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1142, 79674, 'Todtnau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1143, 78098, 'Triberg im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1144, 72818, 'Trochtelfingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1145, 78647, 'Trossingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1146, 72070, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1147, 72072, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1148, 72074, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1149, 72076, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1150, 79677, 'Tunau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1151, 78609, 'Tuningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1152, 78532, 'Tuttlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1153, 88662, 'Überlingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1154, 76698, 'Ubstadt-Weiher', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1155, 73066, 'Uhingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1156, 88690, 'Uhldingen-Mühlhofen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1157, 79777, 'Ühlingen-Birkendorf', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1158, 89073, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1159, 89075, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1160, 89077, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1161, 89079, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1162, 89081, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1163, 89160, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1164, 79224, 'Umkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1165, 88444, 'Ummendorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1166, 88527, 'Unlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1167, 74257, 'Untereisesheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1168, 72669, 'Unterensingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1169, 74199, 'Untergruppenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1170, 78089, 'Unterkirnach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1171, 89617, 'Untermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1172, 74547, 'Untermünkheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1173, 75399, 'Unterreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1174, 73485, 'Unterschneidheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1175, 89619, 'Unterstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1176, 89597, 'Unterwachingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1177, 88379, 'Unterwaldhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1178, 73655, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1179, 73660, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1180, 88524, 'Uttenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1181, 79694, 'Utzenfeld', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1182, 71665, 'Vaihingen an der Enz', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1183, 74541, 'Vellberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1184, 72519, 'Veringenstadt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1185, 78667, 'Villingendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1186, 78048, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1187, 78050, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1188, 78052, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1189, 78054, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1190, 78056, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1191, 88267, 'Vogt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1192, 79235, 'Vogtsburg im Kaiserstuhl', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1193, 78147, 'Vöhrenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1194, 72189, 'Vöhringen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1195, 78269, 'Volkertshausen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1196, 79279, 'Vörstetten', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1197, 68753, 'Waghäusel', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1198, 71332, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1199, 71334, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1200, 71336, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1201, 74915, 'Waibstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1202, 88489, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1203, 89165, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1204, 88639, 'Wald', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1205, 72178, 'Waldachtal', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1206, 76337, 'Waldbronn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1207, 69429, 'Waldbrunn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1208, 88289, 'Waldburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1209, 72141, 'Walddorfhäslach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1210, 71111, 'Waldenbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1211, 74638, 'Waldenburg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1212, 79183, 'Waldkirch', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1213, 79761, 'Waldshut-Tiengen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1214, 73550, 'Waldstetten', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1215, 74399, 'Walheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1216, 69190, 'Walldorf', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1217, 63928, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1218, 74731, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1219, 74599, 'Wallhausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1220, 75045, 'Walzbachtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1221, 73117, 'Wangen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1222, 88239, 'Wangen im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1223, 72827, 'Wannweil', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1224, 88447, 'Warthausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1225, 73116, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1226, 73547, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1227, 78564, 'Wehingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1228, 79664, 'Wehr', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1229, 89197, 'Weidenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1230, 97990, 'Weikersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1231, 79576, 'Weil am Rhein', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1232, 71263, 'Weil der Stadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1233, 72367, 'Weilen unter den Rinnen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1234, 79809, 'Weilheim', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1235, 73235, 'Weilheim an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1236, 71093, 'Weil im Schönbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1237, 76356, 'Weingarten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1238, 88250, 'Weingarten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1239, 69469, 'Weinheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1240, 74189, 'Weinsberg', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1241, 71384, 'Weinstadt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1242, 76599, 'Weisenbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1243, 71287, 'Weissach', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1244, 71554, 'Weissach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1245, 74679, 'Weißbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1246, 79367, 'Weisweil', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1247, 78669, 'Wellendingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1248, 73553, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1249, 73635, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1250, 73642, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1251, 73667, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1252, 79677, 'Wembach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1253, 73240, 'Wendlingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1254, 97956, 'Werbach', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1255, 73249, 'Wernau (Neckar)', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1256, 97877, 'Wertheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1257, 72589, 'Westerheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1258, 89198, 'Westerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1259, 73463, 'Westhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1260, 74259, 'Widdern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1261, 79695, 'Wieden', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1262, 75446, 'Wiernsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1263, 69257, 'Wiesenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1264, 73349, 'Wiesensteig', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1265, 69168, 'Wiesloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1266, 72218, 'Wildberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1267, 88271, 'Wilhelmsdorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1268, 69259, 'Wilhelmsfeld', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1269, 77731, 'Willstätt', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1270, 71299, 'Wimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1271, 79297, 'Winden im Elztal', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1272, 71364, 'Winnenden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1273, 73650, 'Winterbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1274, 72474, 'Winterlingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1275, 97957, 'Wittighausen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1276, 79599, 'Wittlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1277, 79299, 'Wittnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1278, 77709, 'Wolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1279, 88364, 'Wolfegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1280, 72649, 'Wolfschlugen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1281, 74549, 'Wolpertshausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1282, 88284, 'Wolpertswende', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1283, 72299, 'Wörnersberg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1284, 73499, 'Wört', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1285, 75449, 'Wurmberg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1286, 78573, 'Wurmlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1287, 71543, 'Wüstenrot', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1288, 79879, 'Wutach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1289, 79793, 'Wutöschingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1290, 79369, 'Wyhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1291, 74374, 'Zaberfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1292, 75059, 'Zaisenhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1293, 77736, 'Zell am Harmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1294, 79669, 'Zell im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1295, 73087, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1296, 73119, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1297, 78652, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1298, 78658, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1299, 72369, 'Zimmern unter der Burg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1300, 74939, 'Zuzenhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1301, 74639, 'Zweiflingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1302, 88529, 'Zwiefalten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1303, 69439, 'Zwingenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'); + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + ADD PRIMARY KEY (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD PRIMARY KEY (`lid`), + ADD KEY `bpm_adminlog_ibfk_1` (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + ADD PRIMARY KEY (`dst_id`); + +-- +-- Indizes für die Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD PRIMARY KEY (`wu_id`), + ADD KEY `dst_id` (`dst_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD PRIMARY KEY (`eg_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + ADD PRIMARY KEY (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + ADD PRIMARY KEY (`no_id`); + +-- +-- Indizes für die Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + ADD PRIMARY KEY (`pid`); + +-- +-- Indizes für die Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + ADD PRIMARY KEY (`pn_id`); + +-- +-- Indizes für die Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD PRIMARY KEY (`sm_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_stichtage` +-- +ALTER TABLE `bpm_stichtage` + ADD PRIMARY KEY (`sttg_id`); + +-- +-- Indizes für die Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + ADD PRIMARY KEY (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + ADD PRIMARY KEY (`tm_id`); + +-- +-- Indizes für die Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD PRIMARY KEY (`tk_id`), + ADD KEY `ka_id` (`ka_id`), + ADD KEY `tm_id` (`tm_id`), + ADD KEY `tp_id` (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD PRIMARY KEY (`up_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + ADD PRIMARY KEY (`zu_id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + MODIFY `bpmuid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + MODIFY `dst_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1137; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + MODIFY `wu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + MODIFY `eg_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + MODIFY `ka_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + MODIFY `no_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + MODIFY `pn_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + MODIFY `sm_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_stichtage` +-- +ALTER TABLE `bpm_stichtage` + MODIFY `sttg_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + MODIFY `tp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=501; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + MODIFY `tm_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + MODIFY `tk_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + MODIFY `up_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + MODIFY `zu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1304; + +-- +-- Constraints der exportierten Tabellen +-- + +-- +-- Constraints der Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD CONSTRAINT `bpm_adminlog_ibfk_1` FOREIGN KEY (`bpmuid`) REFERENCES `bpm_admin` (`bpmuid`); + +-- +-- Constraints der Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_1` FOREIGN KEY (`dst_id`) REFERENCES `bpm_dienststellen` (`dst_id`), + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_2` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD CONSTRAINT `bpm_ergebnisse_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD CONSTRAINT `bpm_sonstige_mail_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD CONSTRAINT `bpm_term_kand_ibfk_2` FOREIGN KEY (`tm_id`) REFERENCES `bpm_termine` (`tm_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_3` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_4` FOREIGN KEY (`tp_id`) REFERENCES `bpm_tanpool` (`tp_id`); + +-- +-- Constraints der Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD CONSTRAINT `bpm_upload_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/++ Dokumente/20200710_bpm.sql b/++ Dokumente/20200710_bpm.sql new file mode 100755 index 0000000..ccdc1e7 --- /dev/null +++ b/++ Dokumente/20200710_bpm.sql @@ -0,0 +1,1940 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.2 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 10. Jul 2020 um 09:49 +-- Server-Version: 10.4.11-MariaDB +-- PHP-Version: 7.4.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `bpm` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_admin` +-- + +CREATE TABLE `bpm_admin` ( + `bpmuid` int(11) NOT NULL, + `vorname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `nachname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `uid` varchar(23) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `passwort` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Benutzer'; + +-- +-- Daten für Tabelle `bpm_admin` +-- + +INSERT INTO `bpm_admin` (`bpmuid`, `vorname`, `nachname`, `mail`, `uid`, `passwort`) VALUES +(1, 'BPM', 'Admin', 'netblack@gmx.de', 'admin', '674b3548adcfad301d1f4cf80ab30b14'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_adminlog` +-- + +CREATE TABLE `bpm_adminlog` ( + `lid` int(11) NOT NULL, + `Datum` datetime NOT NULL, + `IP` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_agent` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `bpmuid` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Logins der Anwender'; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dienststellen` +-- + +CREATE TABLE `bpm_dienststellen` ( + `dst_id` int(11) NOT NULL, + `bezeichnung` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `bez` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `str` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `plz` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `ort` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `tel` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `internet` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `mail` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `gueltig_von` date NOT NULL, + `gueltig_bis` date NOT NULL, + `init_tan` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `pwd` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `register_dat` datetime NOT NULL, + `mail_reset` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Daten für Tabelle `bpm_dienststellen` +-- + +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `pwd`, `register_dat`, `mail_reset`) VALUES +(1, 'Landratsamt', 'Bodenseekreis', 'Landratsamt Bodenseekreis', NULL, NULL, NULL, NULL, NULL, 'ausbildung@bodenseekreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(2, 'Stadtverwaltung', 'Lahr', 'Stadtverwaltung Lahr', 'Rathausplatz 4', '77933', 'Lahr', NULL, NULL, 'bewerbung@lahr.de', '0000-00-00', '0000-00-00', 'XJ9zxJK', 'f2e0971f614299098da8888283a6121e', '2020-06-02 07:14:18', '0000-00-00 00:00:00'), +(3, 'Landratsamt', 'Tuttlingen', 'Landratsamt Tuttlingen', 'Bahnhofstraße 100', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@landkreis-tuttlingen.de', '0000-00-00', '0000-00-00', 'KgARNCJ', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-06 16:08:02', '0000-00-00 00:00:00'), +(4, 'Landratsamt', 'Ortenaukreis', 'Landratsamt Ortenaukreis', 'Badstraße 20', '77652', 'Offenburg', NULL, NULL, 'ausbildung@ortenaukreis.de', '0000-00-00', '0000-00-00', 'UcZftqe', '3fbaba58b058b0ce53926998d20e4d51', '2020-05-30 18:47:10', '0000-00-00 00:00:00'), +(5, 'Stadtverwaltung', 'Ettlingen', 'Stadtverwaltung Ettlingen', 'Marktplatz 2', '76275', 'Ettlingen', NULL, NULL, 'anja.karbstein@ettlingen.de', '0000-00-00', '0000-00-00', '6Yeyy6k', '1dbe10b0e0ce9ea8145cbc4f7b2fe5fe', '2020-05-11 12:33:39', '0000-00-00 00:00:00'), +(6, 'Stadtverwaltung', 'Crailsheim', 'Stadtverwaltung Crailsheim', NULL, NULL, NULL, NULL, NULL, 'martina.hopf@crailsheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(7, 'Gemeindeverwaltung', 'Schlier', 'Gemeindeverwaltung Schlier', NULL, NULL, NULL, NULL, NULL, 'liebmann@schlier.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(8, 'Stadtverwaltung', 'Plochingen', 'Stadtverwaltung Plochingen', NULL, NULL, NULL, NULL, NULL, 'treiber@plochingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(9, 'Stadtverwaltung', 'Pforzheim', 'Stadtverwaltung Pforzheim', 'Marktplatz 1 ', '75175', 'Pforzheim', NULL, NULL, 'ausbildung@pforzheim.de', '0000-00-00', '0000-00-00', '!84#BR5', 'cb0a389f7d40ff44c5c5db1002e6b29e', '2020-05-07 08:53:56', '0000-00-00 00:00:00'), +(10, 'Stadtverwaltung', 'Bühl', 'Stadtverwaltung Bühl', 'Hauptstraße 47', '77815', 'Bühl', NULL, NULL, 'digitale.stadt@buehl.de', '0000-00-00', '0000-00-00', 'JF8mD8g', '178a5341ddd1af956dad381afc7c4fa7', '2020-05-30 16:05:20', '2020-05-30 16:06:08'), +(11, 'Landratsamt', 'Ostalbkreis', 'Landratsamt Ostalbkreis', NULL, NULL, NULL, NULL, NULL, 'ursula.winkler@ostalbkreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(12, 'Landratsamt', 'Alb-Donau-Kreis', 'Landratsamt Alb-Donau-Kreis', NULL, NULL, NULL, NULL, NULL, 'edelgard.rommel@alb-donau-kreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(13, 'Landratsamt', 'Heilbronn', 'Landratsamt Heilbronn', 'Lerchenstraße 40', '74072', 'Heilbronn', NULL, NULL, 'jasmin.muench@landratsamt-heilbronn.de', '0000-00-00', '0000-00-00', 'nNKm8ZA', '233d57b91ec44976d06daab28b3e7f49', '2020-05-13 11:39:40', '0000-00-00 00:00:00'), +(14, 'Stadtverwaltung', 'Nürtingen', 'Stadtverwaltung Nürtingen', 'Marktstraße 7', '72622', 'Nürtingen', NULL, NULL, 'l.kaelberer@nuertingen.de', '0000-00-00', '0000-00-00', '6XDCd9t', '9cd1124b96ef9d92abb63b4ac120c178', '2020-05-13 13:24:41', '0000-00-00 00:00:00'), +(15, 'Stadtverwaltung', 'Sindelfingen', 'Stadtverwaltung Sindelfingen', 'Rathausplatz 1', '71063 ', 'Sindelfingen', NULL, NULL, 'claudia.dorsch@sindelfingen.de', '0000-00-00', '0000-00-00', 'Adkm5an', 'e1c3ff034564136b923273766f2eda49', '2020-05-19 16:32:12', '0000-00-00 00:00:00'), +(16, 'Landratsamt', 'Ludwigsburg', 'Landratsamt Ludwigsburg', 'Hindenburgstraße 40', '71638', 'Ludwigsburg', NULL, NULL, 'georgios.sidiropoulos@landkreis-ludwigsburg.de', '0000-00-00', '0000-00-00', 'GbrrCgy', 'c1bce67a67b402863a1cb81da9f28858', '2020-05-12 12:49:21', '0000-00-00 00:00:00'), +(17, 'Stadtverwaltung', 'Böblingen', 'Stadtverwaltung Böblingen', 'Marktplatz 16', '71032', 'Böblingen', NULL, NULL, 'ausbildung@boeblingen.de', '0000-00-00', '0000-00-00', 'Pt-GmYp', 'aa7ec81b8e7272977d1848065b4bee0b', '2020-05-12 19:40:33', '0000-00-00 00:00:00'), +(18, 'Stadtverwaltung', 'Karlsruhe', 'Stadtverwaltung Karlsruhe', NULL, NULL, NULL, NULL, NULL, 'sabrina.rothschmitt@it.karlsruhe.de', '0000-00-00', '0000-00-00', 'TxWfE4f', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(19, 'Stadtverwaltung', 'Bruchsal', 'Stadtverwaltung Bruchsal', 'Kaiserstraße 66', '76646', 'Bruchsal', NULL, NULL, 'vanessa.mail@bruchsal.de', '0000-00-00', '0000-00-00', 'NBzrcYn', 'f623dea8df24077d0090d8d9810424f7', '2020-05-11 11:30:44', '0000-00-00 00:00:00'), +(20, 'Stadtverwaltung', 'Metzingen', 'Stadtverwaltung Metzingen', 'Stuttgarter Straße 2-4', '72555', 'Metzingen', NULL, NULL, 'personal@metzingen.de', '0000-00-00', '0000-00-00', 'r!vSz34', 'd8bed61d3748ae779449d5f67f4572c2', '2020-05-13 13:50:12', '0000-00-00 00:00:00'), +(21, 'Stadtverwaltung', 'Spaichingen', 'Stadtverwaltung Spaichingen', 'Marktplatz 19', '78549', 'Spaichingen', NULL, NULL, 'heike.marquart@spaichingen.de', '0000-00-00', '0000-00-00', 'ySgcpnh', 'e3716c43663c0fb8628d2362e6b56590', '2020-05-06 18:10:49', '0000-00-00 00:00:00'), +(22, 'Stadtverwaltung', 'Ulm', 'Stadtverwaltung Ulm', 'Donaustraße 5', '89073', 'Ulm', NULL, NULL, 'a.sauter@ulm.de', '0000-00-00', '0000-00-00', 'zhkvELP', 'f72da3a02cfa3e228483b0610e0dd64b', '2020-05-15 11:09:44', '0000-00-00 00:00:00'), +(23, 'Gemeindeverwaltung', 'Ingoldingen', 'Gemeindeverwaltung Ingoldingen', 'St. Georgenstraße 1', '88456', 'Ingoldingen', NULL, NULL, 'berthold.hengge@ingoldingen.de', '0000-00-00', '0000-00-00', 'nG4ZYyf', '120fc87b75bbb1cc0a5a153c0fcf85e2', '2020-05-15 10:02:49', '0000-00-00 00:00:00'), +(24, 'Stadtverwaltung', 'Heidelberg', 'Stadtverwaltung Heidelberg', 'Marktplatz 10', '69117', 'Heidelberg', NULL, NULL, 'ausbildung@heidelberg.de', '0000-00-00', '0000-00-00', 'ne4tAYY', '0d261aa7832c74fda422aa5b446f00ec', '2020-05-12 12:05:57', '0000-00-00 00:00:00'), +(25, 'Stadtverwaltung', 'Reutlingen', 'Stadtverwaltung Reutlingen', 'Marktplatz 22 ', '72764', 'Reutlingen', NULL, NULL, 'stefanie.weiss@reutlingen.de', '0000-00-00', '0000-00-00', 'aeP-W9n', 'cf820b0e4f7c5448bcaede70ded386ff', '2020-05-13 13:06:46', '0000-00-00 00:00:00'), +(26, 'Landratsamt', 'Waldshut', 'Landratsamt Waldshut', NULL, NULL, NULL, NULL, NULL, 'Theresa.Huener@landkreis-waldshut.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(27, 'Stadtverwaltung', 'Mannheim', 'Stadtverwaltung Mannheim', NULL, NULL, NULL, NULL, NULL, 'franziska.stroh@mannheim.de', '0000-00-00', '0000-00-00', 'ec65ZZ5', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(28, 'Gemeindeverwaltung', 'Gutach im Breisgau', 'Gemeindeverwaltung Gutach im Breisgau', NULL, NULL, NULL, NULL, NULL, 'trenkle@gutach.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(29, 'Stadtverwaltung', 'Kehl', 'Stadtverwaltung Kehl', 'Rathausplatz 1', '77694', 'Kehl', NULL, NULL, 'K.Faschon@stadt-kehl.de', '0000-00-00', '0000-00-00', '!4CL2Xr', '07263a1aac8478c96d399cbfb004b3eb', '2020-06-02 07:08:27', '0000-00-00 00:00:00'), +(30, 'Landratsamt', 'Tübingen', 'Landratsamt Tübingen', 'Wilhelm-Keil-Straße 50', '72072', 'Tübingen', NULL, NULL, 'a.neher@kreis-tuebingen.de', '0000-00-00', '0000-00-00', 'U!hL?nK', 'deffff227c9fab91fef0ccf99065c1fc', '2020-05-13 14:53:09', '0000-00-00 00:00:00'), +(31, 'Gemeindeverwaltung', 'Amtzell', 'Gemeindeverwaltung Amtzell', NULL, NULL, NULL, NULL, NULL, 'christoph.liebmann@amtzell.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(32, 'Gemeindeverwaltung', 'Bad Bellingen', 'Gemeindeverwaltung Bad Bellingen', NULL, NULL, NULL, NULL, NULL, 'spiegelhalter@gemeinde.bad-bellingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(33, 'Stadtverwaltung', 'Remseck am Neckar', 'Stadtverwaltung Remseck am Neckar', NULL, NULL, NULL, NULL, NULL, 'robin.slawig@remseck.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(34, 'Stadtverwaltung', 'Trossingen', 'Stadtverwaltung Trossingen', 'Schultheiß-Koch-Platz 1', '78647', 'Trossingen', NULL, NULL, 'ralf.sulzmann@trossingen.de', '0000-00-00', '0000-00-00', 'Rnzn8xv', 'b43fc176d6ac62361032192c316a3608', '2020-05-08 12:48:26', '0000-00-00 00:00:00'), +(35, 'Stadtverwaltung', 'Herrenberg', 'Stadtverwaltung Herrenberg', 'Marktplatz 5', '71083', 'Herrenberg', NULL, NULL, 'personalwesen@herrenberg.de', '0000-00-00', '0000-00-00', 'LPDrX4u', '00866d6e06168e097a108d44d833888b', '2020-05-22 09:23:11', '0000-00-00 00:00:00'), +(36, 'Landratsamt', 'Sigmaringen', 'Landratsamt Sigmaringen', 'Leopoldstraße 4', '72488', 'Sigmaringen', NULL, NULL, 'bewerbungen@lrasig.de', '0000-00-00', '0000-00-00', '4u!Y46V', '1d53279de30ba509a92564d90ea36215', '2020-06-02 12:34:30', '0000-00-00 00:00:00'), +(37, 'Stadtverwaltung', 'Stadt Fellbach', 'Stadtverwaltung Stadt Fellbach', 'Marktplatz 1', '70734', 'Fellbach', NULL, NULL, 'aus-fortbildung@fellbach.de', '0000-00-00', '0000-00-00', 'Hzp#sxA', '6e00ec9bf49a8287ce7b81c6637b241d', '2020-05-12 15:23:16', '0000-00-00 00:00:00'), +(38, 'Landratsamt', 'Main-Tauber-Kreis', 'Landratsamt Main-Tauber-Kreis', 'Gartenstraße 1', '97941', 'Tauberbischofsheim', NULL, NULL, 'ann-kathrin.blatz@main-tauber-kreis.de', '0000-00-00', '0000-00-00', 'DXRKR#F', '5704db8e04ff3846a2a7333caba87ac6', '2020-06-02 14:17:14', '0000-00-00 00:00:00'), +(39, 'Stadtverwaltung', 'Calw', 'Stadtverwaltung Calw', NULL, NULL, NULL, NULL, NULL, 'spandzich@calw.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(40, 'Stadtverwaltung', 'Kornwestheim', 'Stadtverwaltung Kornwestheim', 'Jakob-Sigle-Platz', '70806', 'Kornwestheim', NULL, NULL, 'Yvette_Escolano@kornwestheim.de', '0000-00-00', '0000-00-00', 'f?56g#3', 'a448966cd1919ed98d4ecb031896541c', '2020-05-13 07:44:45', '0000-00-00 00:00:00'), +(41, 'Landratsamt', 'Ravensburg', 'Landratsamt Ravensburg', 'Friedenstraße 6', '88212', 'Ravensburg', NULL, NULL, 'R.Diez@rv.de', '0000-00-00', '0000-00-00', 'Sn!NEsT', '30a18366b5fb9e244a3dc1c492fbed0f', '2020-05-18 09:24:34', '0000-00-00 00:00:00'), +(42, 'Stadtverwaltung', 'Vaihingen an der Enz', 'Stadtverwaltung Vaihingen an der Enz', 'Marktplatz 1', '71665', 'Vaihingen an der Enz', NULL, NULL, 'm.kaag@vaihingen.de', '0000-00-00', '0000-00-00', 'BSXunD7', '62767e547fd5280353c4c1336fb1b62c', '2020-05-14 12:57:36', '0000-00-00 00:00:00'), +(43, 'Gemeindeverwaltung', 'Dobel', 'Gemeindeverwaltung Dobel', NULL, NULL, NULL, NULL, NULL, 'strauch@dobel.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(44, 'Stadtverwaltung', 'Schwäbisch Gmünd', 'Stadtverwaltung Schwäbisch Gmünd', 'Marktplatz 1', '73525', 'Schwaebisch Gmünd', NULL, NULL, 'susanne.schindler@schwaebisch-gmuend.de', '0000-00-00', '0000-00-00', 'yr?!ZDC', 'c11e55675a55db07c21bcdb26061841c', '2020-05-13 16:26:52', '0000-00-00 00:00:00'), +(45, 'Gemeindeverwaltung', 'Dettenhausen', 'Gemeindeverwaltung Dettenhausen', NULL, NULL, NULL, NULL, NULL, 'hans-peter.fauser@dettenhausen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(46, 'Stadtverwaltung', 'Radolfzell am Bodensee', 'Stadtverwaltung Radolfzell am Bodensee', 'Marktplatz 2', '78315', 'Radolfzell am Bodensee', NULL, NULL, 'personalverwaltung@radolfzell.de', '0000-00-00', '0000-00-00', 'H6#wz!k', 'd29695fc6a04fe226fdaa9322d13e38f', '2020-05-06 16:08:32', '0000-00-00 00:00:00'), +(47, 'Landratsamt', 'Rastatt', 'Landratsamt Rastatt', 'Am Schlossplatz 5', '76437', 'Rastatt', NULL, NULL, 'ausbildung@landkreis-rastatt.de', '0000-00-00', '0000-00-00', 'N9Kcb?!', 'ed6c5513c43f6c3fac4ae090e1fa79e1', '2020-05-07 13:05:42', '0000-00-00 00:00:00'), +(48, 'Stadtverwaltung', 'Stuttgart', 'Stadtverwaltung Stuttgart', 'Eberhardstraße 6', '70173', 'Stuttgart', NULL, NULL, 'ausbildung@stuttgart.de', '0000-00-00', '0000-00-00', 'TPX#tv8', '9c9440cd24ecdc150b5cafc2a8144673', '2020-05-13 08:42:23', '0000-00-00 00:00:00'), +(49, 'GVV', 'Denzlingen-Vörstetten-Reute', 'GVV Denzlingen-Vörstetten-Reute', NULL, NULL, NULL, NULL, NULL, 'j.sillmann@denzlingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(50, 'Stadtverwaltung', 'Bad Friedrichshall', 'Stadtverwaltung Bad Friedrichshall', NULL, NULL, NULL, NULL, NULL, 'franziska.fuchs@friedrichshall.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(51, 'Gemeindeverwaltung', 'Brigachtal', 'Gemeindeverwaltung Brigachtal', 'St. Gallus-Str. 4', '78086', 'Brigachtal', NULL, NULL, 'elke.dufner@brigachtal.de', '0000-00-00', '0000-00-00', 'm!kke5y', '6ab0b27a4da786c9bd8add9a1c4fcd67', '2020-05-14 08:11:29', '0000-00-00 00:00:00'), +(52, 'Gemeindeverwaltung', 'Heddesheim', 'Gemeindeverwaltung Heddesheim', NULL, NULL, NULL, NULL, NULL, 'hauptverwaltung@heddesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(53, 'Gemeindeverwaltung', 'Simonswald', 'Gemeindeverwaltung Simonswald', NULL, NULL, NULL, NULL, NULL, 'glockner@simonswald.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(54, 'Gemeindeverwaltung', 'Mittelbiberach', 'Gemeindeverwaltung Mittelbiberach', NULL, NULL, NULL, NULL, NULL, 'haenle@mittelbiberach.de', '0000-00-00', '0000-00-00', 'mDJtTt-', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(55, 'Stadtverwaltung', 'Rutesheim', 'Stadtverwaltung Rutesheim', NULL, NULL, NULL, NULL, NULL, 'm.killinger@rutesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(56, 'Gemeindeverwaltung', 'Oberstenfeld', 'Gemeindeverwaltung Oberstenfeld', NULL, NULL, NULL, NULL, NULL, 'schmukal@oberstenfeld.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(57, 'Gemeindeverwaltung', 'Leutenbach', 'Gemeindeverwaltung Leutenbach', 'Rathausplatz 1', '71397', 'Leutenbach', NULL, NULL, 'c.muehlbacher@leutenbach.de', '0000-00-00', '0000-00-00', 'd8SJxqf', '5a7e4ddee0fd7127b23b95acb2d53fd7', '2020-05-20 12:08:40', '0000-00-00 00:00:00'), +(58, 'Gemeindeverwaltung', 'Schömberg', 'Gemeindeverwaltung Schömberg', NULL, NULL, NULL, NULL, NULL, 'l.miene@schoemberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(59, 'Stadtverwaltung', 'Leimen', 'Stadtverwaltung Leimen', NULL, NULL, NULL, NULL, NULL, 'elena.brecht@leimen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(60, 'Gemeindeverwaltung', 'Schwörstadt', 'Gemeindeverwaltung Schwörstadt', NULL, NULL, NULL, NULL, NULL, 'b.schneider@schwoerstadt.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(61, 'Gemeindeverwaltung', 'Rudersberg', 'Gemeindeverwaltung Rudersberg', NULL, NULL, NULL, NULL, NULL, 'j.bechthold@rudersberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(62, 'Stadtverwaltung', 'Ditzingen', 'Stadtverwaltung Ditzingen', 'Am Laien 1', '71254', 'Ditzingen', NULL, NULL, 'bewerbung@ditzingen.de', '0000-00-00', '0000-00-00', '!3ya-#C', 'c696edbd1d7b3e5526f792a8ad35eed2', '2020-05-15 10:53:25', '0000-00-00 00:00:00'), +(63, 'Regierungspräsidium', 'Stuttgart', 'Regierungspräsidium Stuttgart', 'Ruppmannstr. 21', '70565', 'Stuttgart', NULL, NULL, 'Sophie.Spottek@rps.bwl.de', '0000-00-00', '0000-00-00', 'f9Yx6U6', '0d14f34b0a6f52f3d30c4936afa05c6d', '2020-05-18 13:39:56', '0000-00-00 00:00:00'), +(64, 'Stadtverwaltung', 'Tuttlingen', 'Stadtverwaltung Tuttlingen', 'Rathausstr. 1 ', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@tuttlingen.de', '0000-00-00', '0000-00-00', '4cfqa57', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-14 10:54:40', '0000-00-00 00:00:00'), +(65, 'Stadtverwaltung', 'Emmendingen', 'Stadtverwaltung Emmendingen', 'Landvogtei 10', '79312 ', 'Emmendingen', NULL, NULL, 'karriere@emmendingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dst_wunsch` +-- + +CREATE TABLE `bpm_dst_wunsch` ( + `wu_id` int(11) NOT NULL, + `dst_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `datum` datetime NOT NULL, + `mail_text` text NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `status` enum('O','V','F') DEFAULT 'O' COMMENT 'Offen, Versendet, Fehler', + `sendedat` datetime NOT NULL, + `archiv_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_ergebnisse` +-- + +CREATE TABLE `bpm_ergebnisse` ( + `eg_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tan` varchar(10) NOT NULL, + `satzerg` int(5) NOT NULL, + `analogie` int(5) NOT NULL, + `rechenaufgaben` int(5) NOT NULL, + `zahlenreihen` int(5) NOT NULL, + `rechenzeichen` int(5) NOT NULL, + `matrizen` int(5) NOT NULL, + `merkf` int(5) NOT NULL, + `summe` int(5) NOT NULL, + `bestanden` enum('0','1') NOT NULL COMMENT '1=bestanden, 0=durchgefallen', + `einsicht_dat` datetime NOT NULL COMMENT 'Einsicht des Kandidaten' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_kandidat` +-- + +CREATE TABLE `bpm_kandidat` ( + `ka_id` int(11) NOT NULL, + `anrede` enum('M','W') NOT NULL, + `vorname` varchar(250) NOT NULL, + `nachname` varchar(250) NOT NULL, + `gebdat` date NOT NULL, + `str` varchar(250) NOT NULL, + `plz` varchar(250) NOT NULL, + `ort` varchar(250) NOT NULL, + `alter18` int(1) NOT NULL COMMENT '0=Minderjaehrig; 1=Volljaehrig', + `mail` varchar(250) NOT NULL, + `id` varchar(200) NOT NULL, + `hochschule` enum('Kehl','Ludwigsburg','NA') DEFAULT NULL COMMENT 'Standardhochschule', + `register_dat` datetime NOT NULL, + `modify_dat` datetime NOT NULL, + `remember_mail` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_note` +-- + +CREATE TABLE `bpm_note` ( + `no_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `hzb` decimal(10,2) NOT NULL, + `hzb_punkte` decimal(10,2) NOT NULL, + `zeugnisschnitt` decimal(10,2) NOT NULL, + `zeugnisschnitt_punkte` decimal(10,2) NOT NULL, + `erfdat_hzb` datetime NOT NULL, + `erfdat_schnitt` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_parameter` +-- + +CREATE TABLE `bpm_parameter` ( + `pid` int(11) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `wert` varchar(250) NOT NULL, + `sort` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_parameter` +-- + +INSERT INTO `bpm_parameter` (`pid`, `beschreibung`, `wert`, `sort`) VALUES +(1, 'Bei wie viel RestTANs soll eine Warnung per Mail ausgegeben werden.', '50', 0), +(2, 'Mailadresse Lizenzwarnung (Durch Komma getrennt, bei mehreren Mailadressen)', 'zulassung@hs-kehl.de, bewerbungbpm@hs-ludwigsburg.de', 10), +(3, 'IBAN HS-Kehl', 'DE02600501017495530102', 20), +(4, 'BIC HS-Kehl', 'SOLADEST600', 30), +(5, 'IBAN HS-Ludwigsburg', 'DE02600501017495530102', 40), +(6, 'BIC HS-Ludwigsburg', 'SOLADEST600', 50), +(7, 'Mail-Absenderadresse HS-Kehl', 'zulassung@hs-kehl.de', 60), +(8, 'Mail-Absenderadresse HS-Ludwigsburg', 'bewerbungbpm@hs-ludwigsburg.de', 70), +(9, 'Betrag in Euro für die Überweisung', '25,00', 80), +(11, 'Bestehenswert des Eignungstests in Rohwert-Punkten', '66', 90), +(12, 'Maximale Dateigröße pro hochgeladener Datei in Megabyte (MB)', '5', 100), +(13, 'Maximale Anzahl an hochzuladenden PDF-Dokumente pro Bewerber', '10', 110), +(14, 'Maximal Anzahl der zu buchenden Praxisstellen pro Bewerber', '4', 120), +(15, 'Anzahl der letzten Nachrichten im Praxisstellensystem', '10', 130); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_prxnews` +-- + +CREATE TABLE `bpm_prxnews` ( + `pn_id` int(11) NOT NULL, + `pn_headline` varchar(250) NOT NULL, + `pn_text` text NOT NULL, + `pn_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_sonstige_mail` +-- + +CREATE TABLE `bpm_sonstige_mail` ( + `sm_id` int(11) NOT NULL, + `sender` varchar(250) NOT NULL, + `sendermail` varchar(250) NOT NULL, + `ka_id` int(11) NOT NULL, + `empfaenger` varchar(250) NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `mail_text` text NOT NULL, + `status` enum('V','F') NOT NULL, + `sendedat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_tanpool` +-- + +CREATE TABLE `bpm_tanpool` ( + `tp_id` int(11) NOT NULL, + `dummy_name` varchar(250) NOT NULL, + `dummy_vorname` varchar(250) NOT NULL, + `tan` varchar(10) NOT NULL, + `tinyurl` varchar(200) NOT NULL, + `verw_dat` datetime NOT NULL, + `login_dat` datetime NOT NULL, + `aktiv` enum('A','I') NOT NULL DEFAULT 'A' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_termine` +-- + +CREATE TABLE `bpm_termine` ( + `tm_id` int(11) NOT NULL, + `tm_datum` datetime NOT NULL, + `tm_standort` enum('K','L') NOT NULL, + `tm_plaetze` int(11) NOT NULL COMMENT 'Anzahl der möglichen Teilnehmer', + `tm_raum` varchar(200) NOT NULL, + `tm_referenznr` varchar(200) NOT NULL COMMENT 'Verwendungszweck Überweisung' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_termine` +-- + +INSERT INTO `bpm_termine` (`tm_id`, `tm_datum`, `tm_standort`, `tm_plaetze`, `tm_raum`, `tm_referenznr`) VALUES +(1, '2020-06-25 10:00:00', 'K', 15, 'Gebäude 1 / R312', '1981600007244'), +(2, '2020-06-17 14:00:00', 'L', 16, '6.123', '2075270024470'), +(3, '2020-06-10 14:00:00', 'L', 16, 'Gebäude 6- Raum 6.123', '2075270024540'), +(4, '2020-07-01 10:00:00', 'L', 16, '5.109/5.110', '2075270024496'), +(5, '2020-07-01 14:00:00', 'L', 16, '5.109/5.110', '2075270024496'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_term_kand` +-- + +CREATE TABLE `bpm_term_kand` ( + `tk_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tm_id` int(11) NOT NULL, + `tp_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_upload` +-- + +CREATE TABLE `bpm_upload` ( + `up_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `file` varchar(250) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `dok_dat` datetime NOT NULL, + `upload_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_zuordnung_hs` +-- + +CREATE TABLE `bpm_zuordnung_hs` ( + `zu_id` int(11) NOT NULL, + `plz` int(11) NOT NULL, + `ort` varchar(250) NOT NULL, + `landkreis` varchar(250) NOT NULL, + `rp` varchar(250) NOT NULL, + `hs` enum('Ludwigsburg','Kehl') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_zuordnung_hs` +-- + +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(1, 78267, 'Aach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(2, 73430, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(3, 73431, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(4, 73432, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(5, 73433, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(6, 73434, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(7, 74232, 'Abstatt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(8, 73453, 'Abtsgmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(9, 88147, 'Achberg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(10, 77855, 'Achern', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(11, 88480, 'Achstetten', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(12, 73099, 'Adelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(13, 73486, 'Adelmannsfelden', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(14, 74740, 'Adelsheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(15, 71563, 'Affalterbach', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(16, 74858, 'Aglasterhausen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(17, 74744, 'Ahorn', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(18, 73101, 'Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(19, 78733, 'Aichhalden', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(20, 88317, 'Aichstetten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(21, 72631, 'Aichtal', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(22, 73773, 'Aichwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(23, 71134, 'Aidlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(24, 79677, 'Aitern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(25, 88319, 'Aitrach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(26, 79774, 'Albbruck', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(27, 73095, 'Albershausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(28, 72458, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(29, 72459, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(30, 72461, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(31, 78554, 'Aldingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(32, 73553, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(33, 73655, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(34, 78476, 'Allensbach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(35, 88422, 'Alleshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(36, 88348, 'Allmannsweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(37, 89604, 'Allmendingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(38, 71573, 'Allmersbach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(39, 72275, 'Alpirsbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(40, 73776, 'Altbach', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(41, 71155, 'Altdorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(42, 72655, 'Altdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(43, 72657, 'Altenriet', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(44, 72213, 'Altensteig', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(45, 88499, 'Altheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(46, 89605, 'Altheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(47, 89174, 'Altheim (Alb)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(48, 75382, 'Althengstett', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(49, 71566, 'Althütte', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(50, 68804, 'Altlußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(51, 88361, 'Altshausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(52, 72119, 'Ammerbuch', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(53, 73340, 'Amstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(54, 88279, 'Amtzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(55, 74918, 'Angelbachtal', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(56, 77767, 'Appenweier', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(57, 88260, 'Argenbühl', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(58, 71546, 'Aspach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(59, 71679, 'Asperg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(60, 97959, 'Assamstadt', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(61, 89176, 'Asselfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(62, 88448, 'Attenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(63, 79280, 'Au', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(64, 76474, 'Au am Rhein', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(65, 71549, 'Auenwald', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(66, 79424, 'Auggen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(67, 88326, 'Aulendorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(68, 71522, 'Backnang', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(69, 79415, 'Bad Bellingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(70, 73087, 'Bad Boll', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(71, 88422, 'Bad Buchau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(72, 73312, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(73, 73342, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(74, 73345, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(75, 78073, 'Bad Dürrheim', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(76, 76530, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(77, 76532, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(78, 76534, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(79, 79410, 'Badenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(80, 74177, 'Bad Friedrichshall', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(81, 76332, 'Bad Herrenalb', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(82, 79189, 'Bad Krozingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(83, 75378, 'Bad Liebenzell', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(84, 97980, 'Bad Mergentheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(85, 72250, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(86, 77740, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(87, 74906, 'Bad Rappenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(88, 77776, 'Bad Rippoldsau-Schapbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(89, 79713, 'Bad Säckingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(90, 88348, 'Bad Saulgau', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(91, 76669, 'Bad Schönborn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(92, 88427, 'Bad Schussenried', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(93, 75385, 'Bad Teinach-Zavelstein', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(94, 73337, 'Bad Überkingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(95, 72574, 'Bad Urach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(96, 88339, 'Bad Waldsee', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(97, 75323, 'Bad Wildbad', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(98, 74206, 'Bad Wimpfen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(99, 88410, 'Bad Wurzach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(100, 79353, 'Bahlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(101, 88255, 'Baienfurt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(102, 72270, 'Baiersbronn', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(103, 88255, 'Baindt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(104, 78582, 'Balgheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(105, 72336, 'Balingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(106, 89177, 'Ballendorf', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(107, 79282, 'Ballrechten-Dottingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(108, 73666, 'Baltmannsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(109, 88481, 'Balzheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(110, 69245, 'Bammental', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(111, 78580, 'Bärenthal', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(112, 73566, 'Bartholomä', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(113, 71543, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(114, 71717, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(115, 89179, 'Beimerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(116, 72658, 'Bempflingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(117, 71726, 'Benningen am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(118, 88276, 'Berg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(119, 88368, 'Bergatreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(120, 77791, 'Berghaupten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(121, 89180, 'Berghülen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(122, 73663, 'Berglen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(123, 88450, 'Berkheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(124, 88697, 'Bermatingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(125, 79872, 'Bernau im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(126, 89182, 'Bernstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(127, 74354, 'Besigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(128, 88422, 'Betzenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(129, 72660, 'Beuren', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(130, 88631, 'Beuron', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(131, 77781, 'Biberach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(132, 88400, 'Biberach an der Riß', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(133, 79215, 'Biederbach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(134, 76467, 'Bietigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(135, 74321, 'Bietigheim-Bissingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(136, 74842, 'Billigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(137, 74862, 'Binau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(138, 72511, 'Bingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(139, 79589, 'Binzen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(140, 73102, 'Birenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(141, 75217, 'Birkenfeld', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(142, 76476, 'Bischweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(143, 72406, 'Bisingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(144, 73266, 'Bissingen an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(145, 72475, 'Bitz', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(146, 89143, 'Blaubeuren', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(147, 74572, 'Blaufelden', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(148, 89134, 'Blaustein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(149, 78176, 'Blumberg', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(150, 73560, 'Böbingen an der Rems', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(151, 71032, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(152, 71034, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(153, 72411, 'Bodelshausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(154, 78351, 'Bodman-Ludwigshafen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(155, 88285, 'Bodnegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(156, 89558, 'Böhmenkirch', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(157, 79677, 'Böllen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(158, 79283, 'Bollschweil', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(159, 88361, 'Boms', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(160, 71149, 'Bondorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(161, 79848, 'Bonndorf im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(162, 74357, 'Bönnigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(163, 73441, 'Bopfingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(164, 89177, 'Börslingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(165, 73104, 'Börtlingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(166, 78662, 'Bösingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(167, 78583, 'Böttingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(168, 79268, 'Bötzingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(169, 97944, 'Boxberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(170, 74336, 'Brackenheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(171, 78199, 'Bräunlingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(172, 74542, 'Braunsbach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(173, 79206, 'Breisach am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(174, 89183, 'Breitingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(175, 79874, 'Breitnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(176, 75015, 'Bretten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(177, 74626, 'Bretzfeld', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(178, 78086, 'Brigachtal', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(179, 76646, 'Bruchsal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(180, 68782, 'Brühl', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(181, 78585, 'Bubsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(182, 79256, 'Buchenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(183, 74722, 'Buchen (Odenwald)', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(184, 78567, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(185, 88637, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Ludwigsburg'), +(186, 79426, 'Buggingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(187, 77815, 'Bühl', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(188, 77830, 'Bühlertal', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(189, 74424, 'Bühlertann', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(190, 74426, 'Bühlerzell', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(191, 88483, 'Burgrieden', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(192, 71576, 'Burgstetten', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(193, 72393, 'Burladingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(194, 78266, 'Büsingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(195, 75365, 'Calw', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(196, 74389, 'Cleebronn', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(197, 74564, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(198, 74597, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(199, 97993, 'Creglingen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(200, 79837, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(201, 79875, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(202, 88718, 'Daisendorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(203, 78083, 'Dauchingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(204, 72356, 'Dautmergen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(205, 75392, 'Deckenpfronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(206, 88693, 'Deggenhausertal', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(207, 73312, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(208, 73326, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(209, 78586, 'Deilingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(210, 78652, 'Deißlingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(211, 73779, 'Deizisau', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(212, 73770, 'Denkendorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(213, 78554, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(214, 78588, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(215, 79211, 'Denzlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(216, 72135, 'Dettenhausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(217, 76706, 'Dettenheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(218, 79802, 'Dettighofen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(219, 72581, 'Dettingen an der Erms', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(220, 88451, 'Dettingen an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(221, 73265, 'Dettingen unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(222, 69234, 'Dielheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(223, 89165, 'Dietenheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(224, 78661, 'Dietingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(225, 89561, 'Dischingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(226, 71254, 'Ditzingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(227, 75335, 'Dobel', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(228, 79804, 'Dogern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(229, 78166, 'Donaueschingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(230, 73072, 'Donzdorf', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(231, 72358, 'Dormettingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(232, 72175, 'Dornhan', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(233, 89160, 'Dornstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(234, 72280, 'Dornstetten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(235, 74677, 'Dörzbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(236, 69221, 'Dossenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(237, 72359, 'Dotternhausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(238, 73345, 'Drackenstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(239, 78655, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(240, 78713, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(241, 77770, 'Durbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(242, 78589, 'Dürbheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(243, 78591, 'Durchhausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(244, 73568, 'Durlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(245, 88525, 'Dürmentingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(246, 76448, 'Durmersheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(247, 73105, 'Dürnau', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(248, 88422, 'Dürnau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(249, 72144, 'Dußlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(250, 88370, 'Ebenweiler', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(251, 64754, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(252, 69412, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(253, 69429, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(254, 69434, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(255, 71735, 'Eberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(256, 88436, 'Eberhardzell', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(257, 73061, 'Ebersbach an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(258, 88371, 'Ebersbach-Musbach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(259, 74246, 'Eberstadt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(260, 72224, 'Ebhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(261, 79285, 'Ebringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(262, 68535, 'Edingen-Neckarhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(263, 79588, 'Efringen-Kirchen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(264, 72227, 'Egenhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(265, 78592, 'Egesheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(266, 76344, 'Eggenstein-Leopoldshafen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(267, 79805, 'Eggingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(268, 89584, 'Ehingen (Donau)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(269, 71139, 'Ehningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(270, 79238, 'Ehrenkirchen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(271, 88361, 'Eichstegen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(272, 79356, 'Eichstetten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(273, 78253, 'Eigeltingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(274, 79591, 'Eimeldingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(275, 79871, 'Eisenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(276, 75239, 'Eisingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(277, 73054, 'Eislingen/Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(278, 76477, 'Elchesheim-Illingen', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(279, 73488, 'Ellenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(280, 74248, 'Ellhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(281, 73479, 'Ellwangen (Jagst)', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(282, 79215, 'Elzach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(283, 74834, 'Elztal', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(284, 88499, 'Emeringen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(285, 89607, 'Emerkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(286, 79312, 'Emmendingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(287, 78576, 'Emmingen-Liptingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(288, 72186, 'Empfingen', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(289, 79346, 'Endingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(290, 75331, 'Engelsbrand', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(291, 78234, 'Engen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(292, 72829, 'Engstingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(293, 72800, 'Eningen unter Achalm', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(294, 75337, 'Enzklösterle', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(295, 74925, 'Epfenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(296, 78736, 'Epfendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(297, 69214, 'Eppelheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(298, 75031, 'Eppingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(299, 89155, 'Erbach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(300, 71729, 'Erdmannhausen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(301, 88097, 'Eriskirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(302, 73268, 'Erkenbrechtsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(303, 74235, 'Erlenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(304, 88416, 'Erlenmoos', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(305, 74391, 'Erligheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(306, 88453, 'Erolzheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(307, 88521, 'Ertingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(308, 73569, 'Eschach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(309, 79427, 'Eschbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(310, 78664, 'Eschbronn', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(311, 74927, 'Eschelbronn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(312, 73037, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(313, 73107, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(314, 73457, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(315, 73563, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(316, 73566, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(317, 73728, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(318, 73730, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(319, 73732, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(320, 73733, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(321, 73734, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(322, 77955, 'Ettenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(323, 76275, 'Ettlingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(324, 72184, 'Eutingen im Gäu', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(325, 74864, 'Fahrenbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(326, 79868, 'Feldberg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(327, 70734, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(328, 70736, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(329, 74579, 'Fichtenau', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(330, 74427, 'Fichtenberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(331, 70794, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(332, 71111, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(333, 77716, 'Fischerbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(334, 79592, 'Fischingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(335, 74223, 'Flein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(336, 88373, 'Fleischwangen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(337, 78737, 'Fluorn-Winzeln', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(338, 76596, 'Forbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(339, 79362, 'Forchheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(340, 74670, 'Forchtenberg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(341, 76694, 'Forst', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(342, 74586, 'Frankenhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(343, 79348, 'Freiamt', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(344, 71691, 'Freiberg am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(345, 79098, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(346, 79100, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(347, 79102, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(348, 79104, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(349, 79106, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(350, 79108, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(351, 79110, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(352, 79111, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(353, 79112, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(354, 79114, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(355, 79115, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(356, 79117, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(357, 97896, 'Freudenberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(358, 72250, 'Freudenstadt', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(359, 74392, 'Freudental', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(360, 72636, 'Frickenhausen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(361, 88699, 'Frickingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(362, 78567, 'Fridingen an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(363, 79877, 'Friedenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(364, 88045, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(365, 88046, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(366, 88048, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(367, 77948, 'Friesenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(368, 71292, 'Friolzheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(369, 78665, 'Frittlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(370, 79677, 'Fröhnd', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(371, 88273, 'Fronreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(372, 78120, 'Furtwangen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(373, 76571, 'Gaggenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(374, 69251, 'Gaiberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(375, 78343, 'Gaienhofen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(376, 74405, 'Gaildorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(377, 78262, 'Gailingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(378, 73108, 'Gammelshausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(379, 72501, 'Gammertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(380, 71116, 'Gärtringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(381, 71126, 'Gäufelden', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(382, 75391, 'Gechingen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(383, 78187, 'Geisingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(384, 72351, 'Geislingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(385, 73312, 'Geislingen an der Steige', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(386, 75050, 'Gemmingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(387, 74376, 'Gemmrigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(388, 77723, 'Gengenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(389, 74582, 'Gerabronn', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(390, 70839, 'Gerlingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(391, 76593, 'Gernsbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(392, 89547, 'Gerstetten', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(393, 89522, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(394, 89537, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(395, 73333, 'Gingen an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(396, 72293, 'Glatten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(397, 79286, 'Glottertal', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(398, 73571, 'Göggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(399, 72532, 'Gomadingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(400, 72810, 'Gomaringen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(401, 75053, 'Gondelsheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(402, 73033, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(403, 73035, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(404, 73037, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(405, 73116, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(406, 79733, 'Görwihl', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(407, 78559, 'Gosheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(408, 79288, 'Gottenheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(409, 78244, 'Gottmadingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(410, 76676, 'Graben-Neudorf', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(411, 72582, 'Grabenstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(412, 71120, 'Grafenau', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(413, 72661, 'Grafenberg', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(414, 79865, 'Grafenhausen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(415, 79639, 'Grenzach-Wyhlen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(416, 89608, 'Griesingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(417, 72294, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(418, 72297, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(419, 72663, 'Großbettlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(420, 71723, 'Großbottwar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(421, 72415, 'Grosselfingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(422, 71577, 'Großerlach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(423, 97950, 'Großrinderfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(424, 73344, 'Gruibingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(425, 89613, 'Grundsheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(426, 88287, 'Grünkraut', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(427, 97947, 'Grünsfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(428, 74417, 'Gschwend', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(429, 88379, 'Guggenhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(430, 74363, 'Güglingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(431, 79194, 'Gundelfingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(432, 74831, 'Gundelsheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(433, 78594, 'Gunningen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(434, 79261, 'Gutach im Breisgau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(435, 77793, 'Gutach (Schwarzwaldbahn)', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(436, 78148, 'Gütenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(437, 88484, 'Gutenzell-Hürbel', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(438, 79685, 'Häg-Ehrsberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(439, 88709, 'Hagnau am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(440, 72401, 'Haigerloch', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(441, 72221, 'Haiterbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(442, 76707, 'Hambrücken', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(443, 74736, 'Hardheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(444, 78739, 'Hardt', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(445, 74239, 'Hardthausen am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(446, 79258, 'Hartheim am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(447, 79686, 'Hasel', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(448, 77716, 'Haslach im Kinzigtal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(449, 74855, 'Haßmersheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(450, 73110, 'Hattenhofen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(451, 77756, 'Hausach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(452, 89597, 'Hausen am Bussen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(453, 72361, 'Hausen am Tann', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(454, 79688, 'Hausen im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(455, 78595, 'Hausen ob Verena', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(456, 79837, 'Häusern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(457, 72534, 'Hayingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(458, 72379, 'Hechingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(459, 69434, 'Heddesbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(460, 68542, 'Heddesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(461, 69115, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(462, 69117, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(463, 69118, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(464, 69120, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(465, 69121, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(466, 69123, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(467, 69124, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(468, 69126, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(469, 89518, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(470, 89520, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(471, 89522, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(472, 74072, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(473, 74074, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(474, 74076, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(475, 74078, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(476, 74080, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(477, 74081, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(478, 88633, 'Heiligenberg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(479, 69253, 'Heiligkreuzsteinach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(480, 71296, 'Heimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(481, 73037, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(482, 73092, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(483, 73107, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(484, 79423, 'Heitersheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(485, 74921, 'Helmstadt-Bargen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(486, 71282, 'Hemmingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(487, 69502, 'Hemsbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(488, 88518, 'Herbertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(489, 79336, 'Herbolzheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(490, 89542, 'Herbrechtingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(491, 88634, 'Herdwangen-Schönach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(492, 89537, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(493, 89568, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(494, 72535, 'Heroldstatt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(495, 71083, 'Herrenberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(496, 79737, 'Herrischried', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(497, 74394, 'Hessigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(498, 72513, 'Hettingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(499, 73540, 'Heubach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(500, 73572, 'Heuchlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(501, 79194, 'Heuweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(502, 71157, 'Hildrizhausen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(503, 78247, 'Hilzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(504, 79856, 'Hinterzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(505, 72145, 'Hirrlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(506, 69493, 'Hirschberg an der Bergstraße', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(507, 73269, 'Hochdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(508, 88436, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(509, 88454, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(510, 79862, 'Höchenschwand', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(511, 68766, 'Hockenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(512, 75339, 'Höfen an der Enz', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(513, 77716, 'Hofstetten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(514, 77749, 'Hohberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(515, 78355, 'Hohenfels', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(516, 73345, 'Hohenstadt', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(517, 72531, 'Hohenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(518, 88367, 'Hohentengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(519, 79801, 'Hohentengen am Hochrhein', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(520, 71088, 'Holzgerlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(521, 89183, 'Holzkirch', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(522, 73271, 'Holzmaden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(523, 74746, 'Höpfingen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(524, 72160, 'Horb am Neckar', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(525, 79289, 'Horben', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(526, 88263, 'Horgenzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(527, 78132, 'Hornberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(528, 88374, 'Hoßkirch', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(529, 74928, 'Hüffenhardt', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(530, 78183, 'Hüfingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(531, 76549, 'Hügelsheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(532, 72584, 'Hülben', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(533, 89185, 'Hüttisheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(534, 73434, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(535, 73453, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(536, 73460, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(537, 79837, 'Ibach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(538, 76473, 'Iffezheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(539, 97999, 'Igersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(540, 73574, 'Iggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(541, 79241, 'Ihringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(542, 89171, 'Illerkirchberg', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(543, 89186, 'Illerrieden', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(544, 75428, 'Illingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(545, 88636, 'Illmensee', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(546, 74360, 'Ilsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(547, 74532, 'Ilshofen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(548, 68549, 'Ilvesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(549, 78194, 'Immendingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(550, 88090, 'Immenstaad am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(551, 74653, 'Ingelfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(552, 74379, 'Ingersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(553, 88456, 'Ingoldingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(554, 72514, 'Inzigkofen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(555, 79594, 'Inzlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(556, 78597, 'Irndorf', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(557, 88316, 'Isny im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(558, 75228, 'Ispringen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(559, 74930, 'Ittlingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(560, 74249, 'Jagsthausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(561, 73489, 'Jagstzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(562, 79798, 'Jestetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(563, 71131, 'Jettingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(564, 72417, 'Jungingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(565, 73553, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(566, 73642, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(567, 73667, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(568, 75236, 'Kämpfelbach', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(569, 79400, 'Kandern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(570, 88422, 'Kanzach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(571, 77966, 'Kappel-Grafenhausen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(572, 77876, 'Kappelrodeck', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(573, 76307, 'Karlsbad', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(574, 76689, 'Karlsdorf-Neuthard', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(575, 76131, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(576, 76133, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(577, 76135, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(578, 76137, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(579, 76139, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(580, 76149, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(581, 76185, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(582, 76187, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(583, 76189, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(584, 76199, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(585, 76227, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(586, 76228, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(587, 76229, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(588, 77694, 'Kehl', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(589, 75210, 'Keltern', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(590, 79341, 'Kenzingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(591, 71394, 'Kernen im Remstal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(592, 68775, 'Ketsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(593, 75249, 'Kieselbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(594, 77971, 'Kippenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(595, 74912, 'Kirchardt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(596, 88486, 'Kirchberg an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(597, 74592, 'Kirchberg an der Jagst', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(598, 71737, 'Kirchberg an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(599, 88457, 'Kirchdorf an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(600, 72138, 'Kirchentellinsfurt', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(601, 74366, 'Kirchheim am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(602, 73467, 'Kirchheim am Ries', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(603, 73230, 'Kirchheim unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(604, 79199, 'Kirchzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(605, 88353, 'Kißlegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(606, 79692, 'Kleines Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(607, 79771, 'Klettgau', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(608, 75438, 'Knittlingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(609, 72664, 'Kohlberg', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(610, 78600, 'Kolbingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(611, 73257, 'Köngen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(612, 97953, 'Königheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(613, 75203, 'Königsbach-Stein', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(614, 89551, 'Königsbronn', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(615, 88376, 'Königseggwald', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(616, 78126, 'Königsfeld im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(617, 78598, 'Königsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(618, 78462, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(619, 78464, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(620, 78465, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(621, 78467, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(622, 71404, 'Korb', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(623, 70825, 'Korntal-Münchingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(624, 70806, 'Kornwestheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(625, 76703, 'Kraichtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(626, 72505, 'Krauchenwies', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(627, 74238, 'Krautheim', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(628, 74594, 'Kreßberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(629, 88079, 'Kressbronn am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(630, 76709, 'Kronau', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(631, 73329, 'Kuchen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(632, 97900, 'Külsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(633, 74653, 'Künzelsau', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(634, 74635, 'Kupferzell', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(635, 76456, 'Kuppenheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(636, 75057, 'Kürnbach', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(637, 79790, 'Küssaberg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(638, 72127, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(639, 72138, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(640, 68526, 'Ladenburg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(641, 77933, 'Lahr/Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(642, 89150, 'Laichingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(643, 88085, 'Langenargen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(644, 89129, 'Langenau', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(645, 74243, 'Langenbrettach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(646, 74595, 'Langenburg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(647, 88515, 'Langenenslingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(648, 73466, 'Lauchheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(649, 79787, 'Lauchringen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(650, 97922, 'Lauda-Königshofen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(651, 69514, 'Laudenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(652, 77886, 'Lauf', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(653, 79725, 'Laufenburg (Baden)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(654, 74348, 'Lauffen am Neckar', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(655, 88471, 'Laupheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(656, 77794, 'Lautenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(657, 89584, 'Lauterach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(658, 78730, 'Lauterbach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(659, 73111, 'Lauterstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(660, 74251, 'Lehrensteinsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(661, 88637, 'Leibertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(662, 69181, 'Leimen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(663, 70771, 'Leinfelden-Echterdingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(664, 74211, 'Leingarten', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(665, 73575, 'Leinzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(666, 73252, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(667, 73266, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(668, 79853, 'Lenzkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(669, 71229, 'Leonberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(670, 71397, 'Leutenbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(671, 88299, 'Leutkirch im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(672, 77839, 'Lichtenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(673, 72805, 'Lichtenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(674, 73669, 'Lichtenwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(675, 74838, 'Limbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(676, 76351, 'Linkenheim-Hochstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(677, 74931, 'Lobbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(678, 74369, 'Löchgau', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(679, 76597, 'Loffenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(680, 79843, 'Löffingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(681, 89173, 'Lonsee', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(682, 73547, 'Lorch', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(683, 79539, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(684, 79540, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(685, 79541, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(686, 72290, 'Loßburg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(687, 79807, 'Lottstetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(688, 74245, 'Löwenstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'); +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(689, 71634, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(690, 71636, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(691, 71638, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(692, 71640, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(693, 71642, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(694, 71672, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(695, 71106, 'Magstadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(696, 77972, 'Mahlberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(697, 78601, 'Mahlstetten', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(698, 74535, 'Mainhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(699, 79429, 'Malsburg-Marzell', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(700, 69254, 'Malsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(701, 76316, 'Malsch', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(702, 79364, 'Malterdingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(703, 68159, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(704, 68161, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(705, 68163, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(706, 68165, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(707, 68167, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(708, 68169, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(709, 68199, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(710, 68219, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(711, 68229, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(712, 68239, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(713, 68259, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(714, 68305, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(715, 68307, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(716, 68309, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(717, 71672, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(718, 71711, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(719, 79232, 'March', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(720, 88677, 'Markdorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(721, 71706, 'Markgröningen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(722, 76359, 'Marxzell', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(723, 88437, 'Maselheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(724, 74252, 'Massenbachhausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(725, 69256, 'Mauer', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(726, 75433, 'Maulbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(727, 79689, 'Maulburg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(728, 88074, 'Meckenbeuren', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(729, 74909, 'Meckesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(730, 88709, 'Meersburg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(731, 72537, 'Mehrstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(732, 77974, 'Meißenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(733, 88512, 'Mengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(734, 79291, 'Merdingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(735, 89188, 'Merklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(736, 79249, 'Merzhausen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(737, 88605, 'Meßkirch', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(738, 72469, 'Meßstetten', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(739, 72555, 'Metzingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(740, 74544, 'Michelbach an der Bilz', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(741, 74545, 'Michelfeld', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(742, 88487, 'Mietingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(743, 88441, 'Mittelbiberach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(744, 74219, 'Möckmühl', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(745, 73563, 'Mögglingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(746, 71696, 'Möglingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(747, 78087, 'Mönchweiler', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(748, 71297, 'Mönsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(749, 78345, 'Moos', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(750, 88422, 'Moosburg', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(751, 74821, 'Mosbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(752, 72116, 'Mössingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(753, 71159, 'Mötzingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(754, 69427, 'Mudau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(755, 76461, 'Muggensturm', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(756, 75417, 'Mühlacker', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(757, 77796, 'Mühlenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(758, 69242, 'Mühlhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(759, 78259, 'Mühlhausen-Ehingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(760, 73347, 'Mühlhausen im Täle', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(761, 78570, 'Mühlheim an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(762, 78357, 'Mühlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(763, 74673, 'Mulfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(764, 79379, 'Müllheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(765, 74395, 'Mundelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(766, 89597, 'Munderkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(767, 72525, 'Münsingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(768, 79244, 'Münstertal/Schwarzwald', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(769, 79730, 'Murg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(770, 71711, 'Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(771, 71540, 'Murrhardt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(772, 73557, 'Mutlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(773, 72202, 'Nagold', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(774, 89564, 'Nattheim', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(775, 74924, 'Neckarbischofsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(776, 69151, 'Neckargemünd', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(777, 69437, 'Neckargerach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(778, 74172, 'Neckarsulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(779, 72666, 'Neckartailfingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(780, 72654, 'Neckartenzlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(781, 74382, 'Neckarwestheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(782, 74865, 'Neckarzimmern', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(783, 89189, 'Neenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(784, 72147, 'Nehren', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(785, 74933, 'Neidenstein', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(786, 73272, 'Neidlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(787, 89191, 'Nellingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(788, 89129, 'Nerenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(789, 73450, 'Neresheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(790, 75385, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(791, 75387, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(792, 74861, 'Neudenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(793, 75305, 'Neuenbürg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(794, 79395, 'Neuenburg am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(795, 74196, 'Neuenstadt am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(796, 74632, 'Neuenstein', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(797, 72639, 'Neuffen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(798, 72419, 'Neufra', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(799, 75242, 'Neuhausen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(800, 73765, 'Neuhausen auf den Fildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(801, 78579, 'Neuhausen ob Eck', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(802, 88099, 'Neukirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(803, 73491, 'Neuler', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(804, 75245, 'Neulingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(805, 68809, 'Neulußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(806, 74867, 'Neunkirchen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(807, 77743, 'Neuried', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(808, 72149, 'Neustetten', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(809, 75389, 'Neuweiler', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(810, 78078, 'Niedereschach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(811, 74676, 'Niedernhall', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(812, 97996, 'Niederstetten', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(813, 89168, 'Niederstotzingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(814, 75223, 'Niefern-Öschelbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(815, 74226, 'Nordheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(816, 77787, 'Nordrach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(817, 73274, 'Notzingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(818, 71154, 'Nufringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(819, 72622, 'Nürtingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(820, 72362, 'Nusplingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(821, 69226, 'Nußloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(822, 72644, 'Oberboihingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(823, 75038, 'Oberderdingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(824, 89610, 'Oberdischingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(825, 73569, 'Obergröningen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(826, 77784, 'Oberharmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(827, 68794, 'Oberhausen-Rheinhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(828, 77704, 'Oberkirch', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(829, 73447, 'Oberkochen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(830, 89611, 'Obermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(831, 78727, 'Oberndorf am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(832, 72364, 'Obernheim', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(833, 75394, 'Oberreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(834, 79254, 'Oberried', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(835, 71739, 'Oberriexingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(836, 74420, 'Oberrot', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(837, 74423, 'Obersontheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(838, 89613, 'Oberstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(839, 71720, 'Oberstenfeld', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(840, 74182, 'Obersulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(841, 88094, 'Oberteuringen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(842, 77709, 'Oberwolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(843, 74847, 'Obrigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(844, 88416, 'Ochsenhausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(845, 74229, 'Oedheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(846, 74254, 'Offenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(847, 77652, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(848, 77654, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(849, 77656, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(850, 72131, 'Ofterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(851, 68723, 'Oftersheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(852, 88422, 'Oggelshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(853, 77797, 'Ohlsbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(854, 73275, 'Ohmden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(855, 78337, 'Öhningen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(856, 74613, 'Öhringen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(857, 75248, 'Ölbronn-Dürrn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(858, 89129, 'Öllingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(859, 89614, 'Öpfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(860, 77728, 'Oppenau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(861, 71560, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(862, 71570, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(863, 78359, 'Orsingen-Nenzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(864, 77799, 'Ortenberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(865, 75395, 'Ostelsheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(866, 74706, 'Osterburken', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(867, 73760, 'Ostfildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(868, 88356, 'Ostrach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(869, 76684, 'Östringen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(870, 76470, 'Ötigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(871, 75443, 'Ötisheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(872, 73113, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(873, 73529, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(874, 77883, 'Ottenhöfen im Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(875, 77833, 'Ottersweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(876, 73277, 'Owen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(877, 88696, 'Owingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(878, 74397, 'Pfaffenhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(879, 79292, 'Pfaffenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(880, 72285, 'Pfalzgrafenweiler', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(881, 74629, 'Pfedelbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(882, 76327, 'Pfinztal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(883, 75172, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(884, 75173, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(885, 75175, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(886, 75177, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(887, 75179, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(888, 75180, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(889, 75181, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(890, 72539, 'Pfronstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(891, 88630, 'Pfullendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(892, 72793, 'Pfullingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(893, 76661, 'Philippsburg', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(894, 68723, 'Plankstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(895, 74385, 'Pleidelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(896, 72124, 'Pliezhausen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(897, 73207, 'Plochingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(898, 73642, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(899, 73655, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(900, 78315, 'Radolfzell', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(901, 73492, 'Rainau', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(902, 89192, 'Rammingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(903, 72414, 'Rangendingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(904, 76437, 'Rastatt', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(905, 72365, 'Ratshausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(906, 69231, 'Rauenberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(907, 88212, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(908, 88213, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(909, 88214, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(910, 74747, 'Ravenstein', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(911, 73098, 'Rechberghausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(912, 89611, 'Rechtenstein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(913, 74934, 'Reichartshausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(914, 78479, 'Reichenau', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(915, 78564, 'Reichenbach am Heuberg', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(916, 73262, 'Reichenbach an der Fils', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(917, 68799, 'Reilingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(918, 75196, 'Remchingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(919, 71686, 'Remseck am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(920, 73630, 'Remshalden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(921, 77871, 'Renchen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(922, 71272, 'Renningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(923, 78603, 'Renquishausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(924, 79276, 'Reute', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(925, 72760, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(926, 72762, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(927, 72764, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(928, 72766, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(929, 72768, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(930, 72770, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(931, 77866, 'Rheinau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(932, 79618, 'Rheinfelden (Baden)', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(933, 79365, 'Rheinhausen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(934, 77836, 'Rheinmünster', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(935, 76287, 'Rheinstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(936, 79736, 'Rickenbach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(937, 72585, 'Riederich', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(938, 88377, 'Riedhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(939, 88499, 'Riedlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(940, 79359, 'Riegel', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(941, 78239, 'Rielasingen-Worblingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(942, 73469, 'Riesbürg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(943, 78604, 'Rietheim-Weilheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(944, 77975, 'Ringsheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(945, 72229, 'Rohrdorf', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(946, 74255, 'Roigheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(947, 72587, 'Römerstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(948, 74749, 'Rosenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(949, 73494, 'Rosenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(950, 72348, 'Rosenfeld', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(951, 74538, 'Rosengarten', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(952, 74585, 'Rot am See', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(953, 88430, 'Rot an der Rot', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(954, 89616, 'Rottenacker', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(955, 72108, 'Rottenburg am Neckar', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(956, 78628, 'Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(957, 73635, 'Rudersberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(958, 79595, 'Rümmingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(959, 73577, 'Ruppertshofen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(960, 77977, 'Rust', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(961, 71277, 'Rutesheim', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(962, 74343, 'Sachsenheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(963, 73084, 'Salach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(964, 88682, 'Salem', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(965, 69207, 'Sandhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(966, 79271, 'Sankt Peter', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(967, 77880, 'Sasbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(968, 79361, 'Sasbach am Kaiserstuhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(969, 77887, 'Sasbachwalden', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(970, 74589, 'Satteldorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(971, 88605, 'Sauldorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(972, 79597, 'Schallbach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(973, 79227, 'Schallstadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(974, 73579, 'Schechingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(975, 72516, 'Scheer', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(976, 74850, 'Schefflenz', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(977, 89601, 'Schelklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(978, 88433, 'Schemmerhofen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(979, 77773, 'Schenkenzell', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(980, 77761, 'Schiltach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(981, 72667, 'Schlaitdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(982, 73114, 'Schlat', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(983, 79418, 'Schliengen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(984, 88281, 'Schlier', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(985, 73278, 'Schlierbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(986, 79859, 'Schluchsee', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(987, 89194, 'Schnürpflingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(988, 75328, 'Schömberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(989, 72355, 'Schömberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(990, 78136, 'Schonach im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(991, 71101, 'Schönaich', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(992, 69250, 'Schönau', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(993, 79677, 'Schönau im Schwarzwald', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(994, 69436, 'Schönbrunn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(995, 79677, 'Schönenberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(996, 74214, 'Schöntal', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(997, 78141, 'Schönwald im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(998, 79650, 'Schopfheim', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(999, 72296, 'Schopfloch', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1000, 73614, 'Schorndorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1001, 78144, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1002, 78713, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1003, 69198, 'Schriesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1004, 74575, 'Schrozberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1005, 77978, 'Schuttertal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1006, 77746, 'Schutterwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1007, 73072, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1008, 73525, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1009, 73527, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1010, 73529, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1011, 73550, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1012, 73553, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1013, 74523, 'Schwäbisch Hall', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1014, 74193, 'Schwaigern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1015, 71409, 'Schwaikheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1016, 77963, 'Schwanau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1017, 74869, 'Schwarzach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1018, 88477, 'Schwendi', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1019, 72477, 'Schwenningen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1020, 68723, 'Schwetzingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1021, 71701, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1022, 71706, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1023, 79739, 'Schwörstadt', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1024, 74743, 'Seckach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1025, 77889, 'Seebach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1026, 88422, 'Seekirch', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1027, 77960, 'Seelbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1028, 72297, 'Seewald', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1029, 78606, 'Seitingen-Oberflacht', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1030, 74372, 'Sersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1031, 89129, 'Setzingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1032, 79350, 'Sexau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1033, 74936, 'Siegelsbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1034, 72488, 'Sigmaringen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1035, 72517, 'Sigmaringendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1036, 72226, 'Simmersfeld', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1037, 75397, 'Simmozheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1038, 79263, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1039, 79271, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1040, 71063, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1041, 71065, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1042, 71067, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1043, 71069, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1044, 78224, 'Singen (Hohentwiel)', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1045, 74889, 'Sinsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1046, 76547, 'Sinzheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1047, 78354, 'Sipplingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1048, 79294, 'Sölden', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1049, 72820, 'Sonnenbühl', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1050, 89567, 'Sontheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1051, 78549, 'Spaichingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1052, 74937, 'Spechbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1053, 71579, 'Spiegelberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1054, 73565, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1055, 73568, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1056, 73577, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1057, 89195, 'Staig', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1058, 72181, 'Starzach', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1059, 79219, 'Staufen im Breisgau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1060, 79837, 'St. Blasien', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1061, 79252, 'Stegen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1062, 77790, 'Steinach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1063, 79585, 'Steinen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1064, 71144, 'Steinenbronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1065, 88416, 'Steinhausen an der Rottum', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1066, 73566, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1067, 89555, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1068, 71711, 'Steinheim an der Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1069, 76479, 'Steinmauern', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1070, 78256, 'Steißlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1071, 75447, 'Sternenfels', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1072, 88719, 'Stetten', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1073, 72510, 'Stetten am kalten Markt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1074, 78112, 'St. Georgen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1075, 74597, 'Stimpfach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1076, 72813, 'St. Johann', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1077, 68789, 'St. Leon-Rot', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1078, 79274, 'St. Märgen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1079, 78333, 'Stockach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1080, 73495, 'Stödtlen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1081, 72479, 'Straßberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1082, 75334, 'Straubenhardt', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1083, 79780, 'Stühlingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1084, 76297, 'Stutensee', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1085, 70173, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1086, 70174, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1087, 70176, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1088, 70178, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1089, 70180, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1090, 70182, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1091, 70184, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1092, 70186, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1093, 70188, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1094, 70190, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1095, 70191, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1096, 70192, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1097, 70193, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1098, 70195, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1099, 70197, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1100, 70199, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1101, 70327, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1102, 70329, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1103, 70372, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1104, 70374, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1105, 70376, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1106, 70378, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1107, 70435, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1108, 70437, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1109, 70439, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1110, 70469, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1111, 70499, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1112, 70563, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1113, 70565, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1114, 70567, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1115, 70569, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1116, 70597, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1117, 70599, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1118, 70619, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1119, 70629, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1120, 72172, 'Sulz am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1121, 71560, 'Sulzbach an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1122, 74429, 'Sulzbach-Laufen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1123, 79295, 'Sulzburg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1124, 75056, 'Sulzfeld', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1125, 73079, 'Süßen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1126, 73527, 'Täferrot', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1127, 74388, 'Talheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1128, 78607, 'Talheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1129, 71732, 'Tamm', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1130, 73497, 'Tannhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1131, 88459, 'Tannheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1132, 97941, 'Tauberbischofsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1133, 78250, 'Tengen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1134, 79312, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1135, 79331, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1136, 88069, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1137, 88079, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1138, 88422, 'Tiefenbach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1139, 75233, 'Tiefenbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1140, 79822, 'Titisee-Neustadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1141, 79682, 'Todtmoos', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1142, 79674, 'Todtnau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1143, 78098, 'Triberg im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1144, 72818, 'Trochtelfingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1145, 78647, 'Trossingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1146, 72070, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1147, 72072, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1148, 72074, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1149, 72076, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1150, 79677, 'Tunau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1151, 78609, 'Tuningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1152, 78532, 'Tuttlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1153, 88662, 'Überlingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1154, 76698, 'Ubstadt-Weiher', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1155, 73066, 'Uhingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1156, 88690, 'Uhldingen-Mühlhofen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1157, 79777, 'Ühlingen-Birkendorf', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1158, 89073, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1159, 89075, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1160, 89077, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1161, 89079, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1162, 89081, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1163, 89160, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1164, 79224, 'Umkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1165, 88444, 'Ummendorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1166, 88527, 'Unlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1167, 74257, 'Untereisesheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1168, 72669, 'Unterensingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1169, 74199, 'Untergruppenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1170, 78089, 'Unterkirnach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1171, 89617, 'Untermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1172, 74547, 'Untermünkheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1173, 75399, 'Unterreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1174, 73485, 'Unterschneidheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1175, 89619, 'Unterstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1176, 89597, 'Unterwachingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1177, 88379, 'Unterwaldhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1178, 73655, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1179, 73660, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1180, 88524, 'Uttenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1181, 79694, 'Utzenfeld', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1182, 71665, 'Vaihingen an der Enz', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1183, 74541, 'Vellberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1184, 72519, 'Veringenstadt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1185, 78667, 'Villingendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1186, 78048, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1187, 78050, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1188, 78052, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1189, 78054, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1190, 78056, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1191, 88267, 'Vogt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1192, 79235, 'Vogtsburg im Kaiserstuhl', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1193, 78147, 'Vöhrenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1194, 72189, 'Vöhringen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1195, 78269, 'Volkertshausen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1196, 79279, 'Vörstetten', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1197, 68753, 'Waghäusel', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1198, 71332, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1199, 71334, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1200, 71336, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1201, 74915, 'Waibstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1202, 88489, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1203, 89165, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1204, 88639, 'Wald', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1205, 72178, 'Waldachtal', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1206, 76337, 'Waldbronn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1207, 69429, 'Waldbrunn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1208, 88289, 'Waldburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1209, 72141, 'Walddorfhäslach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1210, 71111, 'Waldenbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1211, 74638, 'Waldenburg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1212, 79183, 'Waldkirch', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1213, 79761, 'Waldshut-Tiengen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1214, 73550, 'Waldstetten', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1215, 74399, 'Walheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1216, 69190, 'Walldorf', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1217, 63928, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1218, 74731, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1219, 74599, 'Wallhausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1220, 75045, 'Walzbachtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1221, 73117, 'Wangen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1222, 88239, 'Wangen im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1223, 72827, 'Wannweil', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1224, 88447, 'Warthausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1225, 73116, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1226, 73547, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1227, 78564, 'Wehingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1228, 79664, 'Wehr', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1229, 89197, 'Weidenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1230, 97990, 'Weikersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1231, 79576, 'Weil am Rhein', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1232, 71263, 'Weil der Stadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1233, 72367, 'Weilen unter den Rinnen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1234, 79809, 'Weilheim', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1235, 73235, 'Weilheim an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1236, 71093, 'Weil im Schönbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1237, 76356, 'Weingarten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1238, 88250, 'Weingarten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1239, 69469, 'Weinheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1240, 74189, 'Weinsberg', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1241, 71384, 'Weinstadt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1242, 76599, 'Weisenbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1243, 71287, 'Weissach', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1244, 71554, 'Weissach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1245, 74679, 'Weißbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1246, 79367, 'Weisweil', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1247, 78669, 'Wellendingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1248, 73553, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1249, 73635, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1250, 73642, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1251, 73667, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1252, 79677, 'Wembach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1253, 73240, 'Wendlingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1254, 97956, 'Werbach', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1255, 73249, 'Wernau (Neckar)', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1256, 97877, 'Wertheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1257, 72589, 'Westerheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1258, 89198, 'Westerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1259, 73463, 'Westhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1260, 74259, 'Widdern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1261, 79695, 'Wieden', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1262, 75446, 'Wiernsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1263, 69257, 'Wiesenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1264, 73349, 'Wiesensteig', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1265, 69168, 'Wiesloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1266, 72218, 'Wildberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1267, 88271, 'Wilhelmsdorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1268, 69259, 'Wilhelmsfeld', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1269, 77731, 'Willstätt', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1270, 71299, 'Wimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1271, 79297, 'Winden im Elztal', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1272, 71364, 'Winnenden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1273, 73650, 'Winterbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1274, 72474, 'Winterlingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1275, 97957, 'Wittighausen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1276, 79599, 'Wittlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1277, 79299, 'Wittnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1278, 77709, 'Wolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1279, 88364, 'Wolfegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1280, 72649, 'Wolfschlugen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1281, 74549, 'Wolpertshausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1282, 88284, 'Wolpertswende', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1283, 72299, 'Wörnersberg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1284, 73499, 'Wört', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1285, 75449, 'Wurmberg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1286, 78573, 'Wurmlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1287, 71543, 'Wüstenrot', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1288, 79879, 'Wutach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1289, 79793, 'Wutöschingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1290, 79369, 'Wyhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1291, 74374, 'Zaberfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1292, 75059, 'Zaisenhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1293, 77736, 'Zell am Harmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1294, 79669, 'Zell im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1295, 73087, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1296, 73119, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1297, 78652, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1298, 78658, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1299, 72369, 'Zimmern unter der Burg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1300, 74939, 'Zuzenhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1301, 74639, 'Zweiflingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1302, 88529, 'Zwiefalten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1303, 69439, 'Zwingenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'); + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + ADD PRIMARY KEY (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD PRIMARY KEY (`lid`), + ADD KEY `bpm_adminlog_ibfk_1` (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + ADD PRIMARY KEY (`dst_id`); + +-- +-- Indizes für die Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD PRIMARY KEY (`wu_id`), + ADD KEY `dst_id` (`dst_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD PRIMARY KEY (`eg_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + ADD PRIMARY KEY (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + ADD PRIMARY KEY (`no_id`); + +-- +-- Indizes für die Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + ADD PRIMARY KEY (`pid`); + +-- +-- Indizes für die Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + ADD PRIMARY KEY (`pn_id`); + +-- +-- Indizes für die Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD PRIMARY KEY (`sm_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + ADD PRIMARY KEY (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + ADD PRIMARY KEY (`tm_id`); + +-- +-- Indizes für die Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD PRIMARY KEY (`tk_id`), + ADD KEY `ka_id` (`ka_id`), + ADD KEY `tm_id` (`tm_id`), + ADD KEY `tp_id` (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD PRIMARY KEY (`up_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + ADD PRIMARY KEY (`zu_id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + MODIFY `bpmuid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + MODIFY `dst_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + MODIFY `wu_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + MODIFY `eg_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + MODIFY `ka_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + MODIFY `no_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + MODIFY `pn_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + MODIFY `sm_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + MODIFY `tp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + MODIFY `tm_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + MODIFY `tk_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + MODIFY `up_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + MODIFY `zu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1304; + +-- +-- Constraints der exportierten Tabellen +-- + +-- +-- Constraints der Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD CONSTRAINT `bpm_adminlog_ibfk_1` FOREIGN KEY (`bpmuid`) REFERENCES `bpm_admin` (`bpmuid`); + +-- +-- Constraints der Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_1` FOREIGN KEY (`dst_id`) REFERENCES `bpm_dienststellen` (`dst_id`), + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_2` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD CONSTRAINT `bpm_ergebnisse_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD CONSTRAINT `bpm_sonstige_mail_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD CONSTRAINT `bpm_term_kand_ibfk_2` FOREIGN KEY (`tm_id`) REFERENCES `bpm_termine` (`tm_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_3` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_4` FOREIGN KEY (`tp_id`) REFERENCES `bpm_tanpool` (`tp_id`); + +-- +-- Constraints der Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD CONSTRAINT `bpm_upload_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/++ Dokumente/Hinweise.txt b/++ Dokumente/Hinweise.txt new file mode 100755 index 0000000..2cd7d71 --- /dev/null +++ b/++ Dokumente/Hinweise.txt @@ -0,0 +1,62 @@ +BPM +Registrierung + +1) 1x Testwiederholung innerhalb der jhrlichen Bewerbungsphase +2) Wie lange geht eine Bewerbungsphase? + -> Ausbildungsbeginn erfassen + --> Registrierungsbeginn bs 15.07.2019 -> Beginn 2019 + --> Registrierungsbeginn ab 01.08.2019 -> Beginn 2020 + --> Registrierungsbeginn bis 15.07.2020 -> Beginn 2020 + + +Stichtage Jahr geht von 16.07.2020 - 15.07.2021 +Stichtagsregelung manuell: bpm_stichtage + +Konkrete Frage zur Handlung: Wenn jemand zweimal durchgefallen ist, wird in dieser Bewerbungsphase keine Testtermine angezeigt. Also keine Fehlermeldung? Bzw. er bekommt die Testtermine angezeigt, kann sie aber nicht auswhlen mit einem Hinweis auf zweimal durchgefallen. + +- Bestandener Test ist im nchsten Jahr ungltig +- Zweimal durchgefallen, darf er im nchsten Bewerbungsphase wieder +- ID erweitern um Ausbildsungsbeginn + +Oberle: Ranglisten, offene Punkte + +Hat im Bewerbungsverfahren noch keinen Test gemacht +bekommt ID mit Jahrgang +Registriert sich +Ende + +Hat im Bewerbungsverfahren bereits einen Test gemacht +Gibt ID und TAN ein +Prfung, ob er nur einmal durchgefallen ist, wenn ja, dann weiter +sonst keine aktuellen Termine anzeigen fr das aktuelle Verfahren, +keine neue TAN fr aktuelles Bewerbungsverfahren + + +# Nicht bestanden +INSERT INTO `bpm_ergebnisse` (`eg_id`, `ka_id`, `tan`, `satzerg`, `analogie`, `rechenaufgaben`, `zahlenreihen`, `rechenzeichen`, `matrizen`, `merkf`, `summe`, `bestanden`, `einsicht_dat`) VALUES +(1, 1, 'K3NN', 12, 9, 4, 11, 10, 10, 7, 63, '0', '2020-07-08 10:13:45'); + +# Nicht bestanden 2 +INSERT INTO `bpm_ergebnisse` (`eg_id`, `ka_id`, `tan`, `satzerg`, `analogie`, `rechenaufgaben`, `zahlenreihen`, `rechenzeichen`, `matrizen`, `merkf`, `summe`, `bestanden`, `einsicht_dat`) VALUES +(2, 1, 'U3P3', 12, 9, 4, 11, 10, 10, 7, 63, '0', '2020-07-08 10:13:45'); + + + +SCHWAL1508197901-2021 +K3NN + +Aktueller Stand: +Tans werden richtig vergeben +Wiederholer richtig abgearbeitet. + +Wenn man nach zweimal nichtbestehen ein Datum aus der nchsten Phase whlt, bekommt man keine neue ID + + +----------------- +SET FOREIGN_KEY_CHECKS = 0; +TRUNCATE bpm_ergebnisse; +TRUNCATE bpm_sonstige_mail; +TRUNCATE bpm_term_kand; +UPDATE bpm_tanpool set verw_dat='0000-00-00 00:00:00'; +TRUNCATE table bpm_kandidat; +SET FOREIGN_KEY_CHECKS = 1; diff --git a/++ Dokumente/Praxisstellen.sql b/++ Dokumente/Praxisstellen.sql new file mode 100755 index 0000000..6379df0 --- /dev/null +++ b/++ Dokumente/Praxisstellen.sql @@ -0,0 +1,1136 @@ +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Baden-Baden', 'Stadtverwaltung Baden-Baden', 'Marktplatz 2','76530', 'Baden-Baden', '07221 93-0', 'http://www.baden-baden.de', 'bb@baden-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Karlsruhe', 'Stadtverwaltung Karlsruhe', 'Marktplatz','76133', 'Karlsruhe', '0721 133-0', 'http://www.karlsruhe.de', 'stadt@karlsruhe.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bretten', 'Stadtverwaltung Bretten', 'Untere Kirchgasse 9','75015', 'Bretten', '07252 921-0', 'http://www.bretten.de', 'stadt@bretten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bruchsal', 'Stadtverwaltung Bruchsal', 'Kaiserstr. 66','76646', 'Bruchsal', '07251 79-0', 'http://www.bruchsal.de', 'info@bruchsal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ettlingen', 'Stadtverwaltung Ettlingen', 'Marktplatz 2','76275', 'Ettlingen', '07243 101-01', 'http://www.ettlingen.de', 'hauptamt@ettlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Forst', 'Gemeindeverwaltung Forst', 'Weiherer Str. 1','76694', 'Forst', '07251 780-111', 'http://www.forst-baden.de', 'killinger@forst-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gondelsheim', 'Gemeindeverwaltung Gondelsheim', 'Bruchsaler Str. 32','75053', 'Gondelsheim', '07252 9444-0', 'http://www.gondelsheim.de', 'rathaus@gondelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hambrcken', 'Gemeindeverwaltung Hambrcken', 'Hauptstr. 108','76707', 'Hambrcken', '07255 7100-0', 'http://www.hambruecken.de', 'gemeinde@hambruecken.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kronau', 'Gemeindeverwaltung Kronau', 'Kirrlacher Str. 2','76709', 'Kronau', '07253 9402-0', 'http://www.kronau.de', 'gemeinde@kronau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Krnbach', 'Gemeindeverwaltung Krnbach', 'Marktplatz 12','75057', 'Krnbach', '07258 9105-0', 'http://www.kuernbach.de', 'gemeinde@kuernbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Malsch', 'Gemeindeverwaltung Malsch', 'Hauptstr. 71','76316', 'Malsch', '07246 707-0', 'http://www.malsch.de', 'elmar.himmel@malsch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Marxzell', 'Gemeindeverwaltung Marxzell', 'Karlsruher Str. 2','76359', 'Marxzell', '07248 9147-0', 'http://www.marxzell.de', 'gemeinde@marxzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberderdingen', 'Gemeindeverwaltung Oberderdingen', 'Amthof 13','75038', 'Oberderdingen', '07045 43-0', 'http://www.oberderdingen.de', 'thomas.nowitzki@oberderdingen.net'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'stringen', 'Stadtverwaltung stringen', 'Am Kirchberg 19','76684', 'stringen', '07253 207-0', 'http://www.oestringen.de', 'buergermeisteramt@oestringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Philippsburg', 'Stadtverwaltung Philippsburg', 'Rote-Tor-Str. 6-10','76661', 'Philippsburg', '07256 87-0', 'http://www.philippsburg.de', 'zentrale@philippsburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sulzfeld', 'Gemeindeverwaltung Sulzfeld', 'Rathausplatz 1','75056', 'Sulzfeld', '07269 78-0', 'http://www.sulzfeld.de', 'info@sulzfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ubstadt-Weiher', 'Gemeindeverwaltung Ubstadt-Weiher', 'Bruchsaler Str. 1-3','76698', 'Ubstadt-Weiher', '07251 617-0', 'http://www.ubstadt-weiher.de', 'gemeinde@ubstadt-weiher.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Walzbachtal', 'Gemeindeverwaltung Walzbachtal', 'Wssinger Str. 26-28','75045', 'Walzbachtal', '07203 88-0', 'http://www.walzbachtal.de', 'rathaus@walzbachtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weingarten (Baden)', 'Gemeindeverwaltung Weingarten (Baden)', 'Marktplatz 2','76356', 'Weingarten (Baden)', '07244 7020-0', 'http://www.weingarten-baden.de', 'gemeinde@weingarten-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zaisenhausen', 'Gemeindeverwaltung Zaisenhausen', 'Hauptstr. 97','75059', 'Zaisenhausen', '07258 9109-0', 'http://www.zaisenhausen.de', 'info@zaisenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Karlsbad', 'Gemeindeverwaltung Karlsbad', 'Hirtenstr. 14','76307', 'Karlsbad', '07202 9304-0', 'http://www.karlsbad.de', 'rathaus@karlsbad.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kraichtal', 'Stadtverwaltung Kraichtal', 'Rathausstr. 30','76703', 'Kraichtal', '07250 77-0', 'http://www.kraichtal.de', 'bgm@kraichtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Graben-Neudorf', 'Gemeindeverwaltung Graben-Neudorf', 'Hauptstr. 39','76676', 'Graben-Neudorf', '07255 901-0', 'http://www.graben-neudorf.de', 'reinwald@graben-neudorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Schnborn', 'Gemeindeverwaltung Bad Schnborn', 'Friedrichsstr. 67','76669', 'Bad Schnborn', '07253/87-0', 'http://www.bad-schoenborn.de', 'gemeindeverwaltung@bad-schoenborn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfinztal', 'Gemeindeverwaltung Pfinztal', 'Hauptstr. 70','76327', 'Pfinztal', '07240 62-0', 'http://www.pfinztal.de', 'info@pfinztal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eggenstein-Leopoldshafen', 'Gemeindeverwaltung Eggenstein-Leopoldshafen', 'Friedrichstr. 32','76344', 'Eggenstein-Leopoldshafen', '0721 97886-0', 'http://www.egg-leo.de', 'b.stober@egg-leo.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Karlsdorf-Neuthard', 'Gemeindeverwaltung Karlsdorf-Neuthard', 'Amalienstr. 1','76689', 'Karlsdorf-Neuthard', '07251 443-0', 'http://www.karlsdorf-neuthard.de', 'gemeinde@karlsdorf-neuthard.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Linkenheim-Hochstetten', 'Gemeindeverwaltung Linkenheim-Hochstetten', 'Karlsruher Str. 41','76351', 'Linkenheim-Hochstetten', '07247 802-0', 'http://www.linkenheim-hochstetten.de', 'info@linkenheim-hochstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waghusel', 'Stadtverwaltung Waghusel', 'Gymnasiumstr. 1','68753', 'Waghusel', '07254 207-201', 'http://www.waghaeusel.de', 'stadtverwaltung@waghaeusel.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberhausen-Rheinhausen', 'Gemeindeverwaltung Oberhausen-Rheinhausen', 'Adlerstr. 3','68794', 'Oberhausen-Rheinhausen', '07254 503-0', 'http://www.oberhausen-rheinhausen.de', 'martin.buechner@oberhausen-rheinhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rheinstetten', 'Stadtverwaltung Rheinstetten', 'Rappenwrthstr. 49','76287', 'Rheinstetten', '07242 9514-500', 'http://www.rheinstetten.de', 'rathaus@rheinstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Stutensee', 'Stadtverwaltung Stutensee', 'Rathausstr. 3','76297', 'Stutensee', '07244 969-101', 'http://www.stutensee.de', 'petra.becker@stutensee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Waldbronn', 'Gemeindeverwaltung Waldbronn', 'Marktplatz 7','76337', 'Waldbronn', '07243 609-0', 'http://www.waldbronn.de', 'gemeinde@waldbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettenheim', 'Gemeindeverwaltung Dettenheim', 'Bchlestr. 33','76706', 'Dettenheim', '07247 931-0', 'http://www.dettenheim.de', 'rathaus@dettenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Au am Rhein', 'Gemeindeverwaltung Au am Rhein', 'Hauptstr. 5','76474', 'Au am Rhein', '07245 9285-0', 'http://www.auamrhein.de', 'gemeinde@auamrhein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bietigheim', 'Gemeindeverwaltung Bietigheim', 'Malscher Str. 22','76467', 'Bietigheim', '07245 808-0', 'http://www.bietigheim.de', 'gemeinde@bietigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bischweier', 'Gemeindeverwaltung Bischweier', 'Bahnhofstr. 17','76476', 'Bischweier', '07222 9434-0', 'http://www.bischweier.de', 'buergermeisteramt@bischweier.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bhl', 'Stadtverwaltung Bhl', 'Hauptstr. 47','77815', 'Bhl', '07223 935-0', 'http://www.buehl.de', 'stadt@buehl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bhlertal', 'Gemeindeverwaltung Bhlertal', 'Hauptstr. 131','77830', 'Bhlertal', '07223 7101-0', 'http://www.buehlertal.de', 'buergermeister@buehlertal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Durmersheim', 'Gemeindeverwaltung Durmersheim', 'Rathausplatz 1','76448', 'Durmersheim', '07245 920-0', 'http://www.durmersheim.de', 'info@durmersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Elchesheim-Illingen', 'Gemeindeverwaltung Elchesheim-Illingen', 'Rathausplatz 8','76477', 'Elchesheim-Illingen', '07245 9301-0', 'http://www.elchesheim-illingen.de', 'buergermeisteramt@elchesheim-illingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Forbach', 'Gemeindeverwaltung Forbach', 'Landstr. 27','76596', 'Forbach', '07228 39-0', 'http://www.forbach.de', 'buergermeisterin@forbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gaggenau', 'Stadtverwaltung Gaggenau', 'Hauptstr. 71','76571', 'Gaggenau', '07225 962-0', 'http://www.gaggenau.de', 'gaggenau.stadt@gaggenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gernsbach', 'Stadtverwaltung Gernsbach', 'Igelbachstr. 11','76593', 'Gernsbach', '07224 644-0', 'http://www.gernsbach.de', 'Dieter.Knittel@gernsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hgelsheim', 'Gemeindeverwaltung Hgelsheim', 'Hauptstr. 34','76549', 'Hgelsheim', '07229 3044-0', 'http://www.huegelsheim.de', 'rathaus@huegelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Iffezheim', 'Gemeindeverwaltung Iffezheim', 'Hauptstr. 54','76473', 'Iffezheim', '07229 605-20', 'http://www.iffezheim.de', 'buergermeister@iffezheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kuppenheim', 'Stadtverwaltung Kuppenheim', 'Friedensplatz','76456', 'Kuppenheim', '07222 9462-100', 'http://www.kuppenheim.de', 'karsten.mussler@kuppenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lichtenau', 'Stadtverwaltung Lichtenau', 'Hauptstr. 15','77839', 'Lichtenau', '07227 9577-0', 'http://www.lichtenau-baden.de', 'stadt@lichtenau-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Loffenau', 'Gemeindeverwaltung Loffenau', 'Untere Dorfstr. 1','76597', 'Loffenau', '07083 9233-0', 'http://www.loffenau.de', 'erich.steigerwald@loffenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Muggensturm', 'Gemeindeverwaltung Muggensturm', 'Hauptstr. 33-35','76461', 'Muggensturm', '07222 9093-0', 'http://www.muggensturm.de', 'gemeinde@muggensturm.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'tigheim', 'Gemeindeverwaltung tigheim', 'Schulstr. 3','76470', 'tigheim', '07222 9197-0', 'http://www.oetigheim.de', 'gemeindeverwaltung@oetigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ottersweier', 'Gemeindeverwaltung Ottersweier', 'Laufer Str. 18','77833', 'Ottersweier', '07223 9860-0', 'http://www.ottersweier.de', 'juergen.pfetzer@ottersweier.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rastatt', 'Stadtverwaltung Rastatt', 'Marktplatz 1','76437', 'Rastatt', '07222 972-0', 'http://www.rastatt.de', 'stadt@rastatt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sinzheim', 'Gemeindeverwaltung Sinzheim', 'Marktplatz 1','76547', 'Sinzheim', '07221 806-0', 'http://www.sinzheim.de', 'gemeinde@sinzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinmauern', 'Gemeindeverwaltung Steinmauern', 'Hauptstr. 82','76479', 'Steinmauern', '07222 9275-0', 'http://www.steinmauern.de', 'rathaus@steinmauern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weisenbach', 'Gemeindeverwaltung Weisenbach', 'Hauptstr. 3','76599', 'Weisenbach', '07224 9183-0', 'http://www.weisenbach.de', 'buergermeisteramt@weisenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rheinmnster', 'Gemeindeverwaltung Rheinmnster', 'Lindenbrunnenstr. 1','77836', 'Rheinmnster', '07227 9555-0', 'http://www.rheinmuenster.de', 'gemeinde@rheinmuenster.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heidelberg', 'Stadtverwaltung Heidelberg', 'Marktplatz 10','69117', 'Heidelberg', '06221 5810-0', 'http://www.heidelberg.de', 'stadt@heidelberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mannheim', 'Stadtverwaltung Mannheim', 'Rathaus E 5','68159', 'Mannheim', '0621 293-0', 'http://www.mannheim.de', 'stadtverwaltung@mannheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Adelsheim', 'Stadtverwaltung Adelsheim', 'Marktstr. 7','74740', 'Adelsheim', '06291 6200-0', 'http://www.adelsheim.de', 'wolfram.bernhardt@adelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aglasterhausen', 'Gemeindeverwaltung Aglasterhausen', 'Am Marktplatz 1','74858', 'Aglasterhausen', '06262 9200-0', 'http://www.aglasterhausen.de', 'post@aglasterhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Billigheim', 'Gemeindeverwaltung Billigheim', 'Sulzbacher Str. 9','74842', 'Billigheim', '06265 9200-0', 'http://www.billigheim.de', 'zentrale@billigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Binau', 'Gemeindeverwaltung Binau', 'Reichenbucher Str. 38 A','74862', 'Binau', '06263 430-0', 'http://www.binau.de', 'info@binau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Buchen (Odenwald)', 'Stadtverwaltung Buchen (Odenwald)', 'Wimpinaplatz 3','74722', 'Buchen (Odenwald)', '06281 31-0', 'http://www.buchen.de', 'Roland.Burger@buchen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fahrenbach', 'Gemeindeverwaltung Fahrenbach', 'Adolf-Weber-Str. 23','74864', 'Fahrenbach', '06267 9205-0', 'http://www.fahrenbach.de/', 'wittmann@fahrenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hardheim', 'Gemeindeverwaltung Hardheim', 'Schloplatz 6','74736', 'Hardheim', '06283 58-0', 'http://www.hardheim.de', 'rathaus@hardheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hamersheim', 'Gemeindeverwaltung Hamersheim', 'Theodor-Heuss-Str. 45','74855', 'Hamersheim', '06266 791-0', 'http://www.hassmersheim.de', 'post@hassmersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hpfingen', 'Gemeindeverwaltung Hpfingen', 'Heidelberger Str. 23','74746', 'Hpfingen', '06283 2206-0', 'http://www.hoepfingen.de', 'gemeinde@hoepfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hffenhardt', 'Gemeindeverwaltung Hffenhardt', 'Reisengasse 1','74928', 'Hffenhardt', '06268 9205-0', 'http://www.hueffenhardt.de', 'rathaus@hueffenhardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Limbach', 'Gemeindeverwaltung Limbach', 'Muckentaler Str. 9','74838', 'Limbach', '06287 9200-0', 'http://www.limbach.de', 'gemeinde@limbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mosbach', 'Stadtverwaltung Mosbach', 'Hauptstr. 29','74821', 'Mosbach', '06261 82-200', 'http://www.mosbach.de', 'info@mosbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mudau', 'Gemeindeverwaltung Mudau', 'Schloauer Str. 2','69427', 'Mudau', '06284 78-0', 'http://www.mudau.de', 'norbert.rippberger@mudau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neckargerach', 'Gemeindeverwaltung Neckargerach', 'Hauptstr. 25','69437', 'Neckargerach', '06263 4201-0', 'http://www.neckargerach.de', 'gemeinde@neckargerach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neckarzimmern', 'Gemeindeverwaltung Neckarzimmern', 'Hauptstr. 4','74865', 'Neckarzimmern', '06261 9231-0', 'http://www.neckarzimmern.de', 'info@neckarzimmern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neunkirchen', 'Gemeindeverwaltung Neunkirchen', 'Marktplatz 1','74867', 'Neunkirchen', '06262 9212-0', 'http://www.neunkirchen-baden.de', 'post@neunkirchen-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obrigheim', 'Gemeindeverwaltung Obrigheim', 'Hauptstr. 7','74847', 'Obrigheim', '06261 646-0', 'http://www.obrigheim.de', 'info@obrigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Osterburken', 'Stadtverwaltung Osterburken', 'Marktplatz 3','74706', 'Osterburken', '06291 401-0', 'http://www.osterburken.de', 'info@osterburken.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rosenberg', 'Gemeindeverwaltung Rosenberg', 'Hauptstr. 26','74749', 'Rosenberg', '06295 9201-0', 'http://www.rosenberg-baden.de/', 'gemeinde@rosenberg-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seckach', 'Gemeindeverwaltung Seckach', 'Bahnhofstr. 30','74743', 'Seckach', '06292 9201-0', 'http://www.seckach.de', 'info@seckach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Walldrn', 'Stadtverwaltung Walldrn', 'Burgstr. 3','74731', 'Walldrn', '06282 67-0', 'http://www.wallduern.de', 'markus.guenther@wallduern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zwingenberg', 'Gemeindeverwaltung Zwingenberg', 'Alte Dorfstr. 8','69439', 'Zwingenberg', '06263/45152', 'http://www.zwingenberg-neckar.de', 'info@gemeinde-zwingenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ravenstein', 'Stadtverwaltung Ravenstein', 'Lindenstr. 4','74747', 'Ravenstein', '06297 9200-0', 'http://www.ravenstein.de', 'Hans-Peter.vonThenen@ravenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schefflenz', 'Gemeindeverwaltung Schefflenz', 'Mittelstr. 47','74850', 'Schefflenz', '06293 9200-0', 'http://www.schefflenz.de', 'info@schefflenz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwarzach', 'Gemeindeverwaltung Schwarzach', 'Hauptstr. 14','74869', 'Schwarzach', '06262 9209-0', 'http://www.schwarzach-online.de', 'rathaus@schwarzach-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Elztal', 'Gemeindeverwaltung Elztal', 'Hauptstr. 8','74834', 'Elztal', '06261 8903-0', 'http://www.elztal.de', 'info@elztal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Waldbrunn', 'Gemeindeverwaltung Waldbrunn', 'Alte Marktstr. 4','69429', 'Waldbrunn', '06274 930-0', 'http://www.waldbrunn-odenwald.de', 'rathaus@waldbrunn-odenwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altluheim', 'Gemeindeverwaltung Altluheim', 'Rathausplatz 1','68804', 'Altluheim', '06205 3943-0', 'http://www.altlussheim.de', 'info@altlussheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bammental', 'Gemeindeverwaltung Bammental', 'Hauptstr. 71','69245', 'Bammental', '06223 9530-0', 'http://www.bammental.de', 'rathaus@bammental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Brhl', 'Gemeindeverwaltung Brhl', 'Hauptstr. 1','68782', 'Brhl', '06202 2003-0', 'http://www.bruehl-baden.de', 'ralf.goeck@bruehl-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dielheim', 'Gemeindeverwaltung Dielheim', 'Hauptstr. 37','69234', 'Dielheim', '06222 781-20', 'http://www.dielheim.de', 'Thomas.Glasbrenner@dielheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dossenheim', 'Gemeindeverwaltung Dossenheim', 'Rathausplatz 1','69221', 'Dossenheim', '06221 8651-0', 'http://www.dossenheim.de', 'gemeinde@dossenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Eberbach', 'Stadtverwaltung Eberbach', 'Leopoldsplatz 1','69412', 'Eberbach', '06271 87-1', 'http://www.eberbach.de', 'stadt@eberbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Epfenbach', 'Gemeindeverwaltung Epfenbach', 'Hauptstr. 28','74925', 'Epfenbach', '07263 4089-0', 'http://www.epfenbach.de', 'info@epfenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Eppelheim', 'Stadtverwaltung Eppelheim', 'Schulstr. 2','69214', 'Eppelheim', '06221 794-0', 'http://www.eppelheim.de', 'info@eppelheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eschelbronn', 'Gemeindeverwaltung Eschelbronn', 'Bahnhofstr. 1','74927', 'Eschelbronn', '06226 9509-0', 'http://www.eschelbronn.de', 'gemeinde@eschelbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gaiberg', 'Gemeindeverwaltung Gaiberg', 'Hauptstr. 44','69251', 'Gaiberg', '06223 9501-0', 'http://www.gaiberg.de', 'service@gaiberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heddesbach', 'Gemeindeverwaltung Heddesbach', 'Hauptstr. 2','69434', 'Heddesbach', '06272 2268', 'http://www.heddesbach.de', 'post@heddesbach.gvv-schoenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heddesheim', 'Gemeindeverwaltung Heddesheim', 'Fritz-Kessler-Platz','68542', 'Heddesheim', '06203 101-0', 'http://www.heddesheim.de', 'gemeinde@Heddesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heiligkreuzsteinach', 'Gemeindeverwaltung Heiligkreuzsteinach', 'Silberne Bergstr. 3','69253', 'Heiligkreuzsteinach', '06220 9220-0', 'http://www.heiligkreuzsteinach.de', 'post@heiligkreuzsteinach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hemsbach', 'Stadtverwaltung Hemsbach', 'Schlogasse 41','69502', 'Hemsbach', '06201 707-0', 'http://www.hemsbach.de', 'post@hemsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hockenheim', 'Stadtverwaltung Hockenheim', 'Rathausstr. 1','68766', 'Hockenheim', '06205 21-0', 'http://www.hockenheim.de', 'info@hockenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ilvesheim', 'Gemeindeverwaltung Ilvesheim', 'Schlostr. 9','68549', 'Ilvesheim', '0621 49660-0', 'http://www.ilvesheim.de', 'gemeinde@ilvesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ketsch', 'Gemeindeverwaltung Ketsch', 'Hockenheimer Str. 5','68775', 'Ketsch', '06202 606-0', 'http://www.ketsch.de', 'info-ketsch@ketsch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ladenburg', 'Stadtverwaltung Ladenburg', 'Hauptstr. 7','68526', 'Ladenburg', '06203 70-0', 'http://www.ladenburg.de', 'buergermeister@ladenburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Laudenbach', 'Gemeindeverwaltung Laudenbach', 'Untere Str. 2','69514', 'Laudenbach', '06201 7002-0', 'http://www.gemeinde-laudenbach.de', 'rathaus@gemeinde-laudenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Leimen', 'Stadtverwaltung Leimen', 'Rathausstr. 8','69181', 'Leimen', '06224 704-0', 'http://www.leimen.de', 'ob@leimen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Malsch', 'Gemeindeverwaltung Malsch', 'Kirchberg 10','69254', 'Malsch', '07253 9252-0', 'http://www.malsch-weinort.de', 'sibylle.wuerfel@malsch-weinort.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mauer', 'Gemeindeverwaltung Mauer', 'Heidelberger Str. 34','69256', 'Mauer', '06226 9220-0', 'http://www.gemeinde-mauer.de', 'rathaus@gemeinde-mauer.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Meckesheim', 'Gemeindeverwaltung Meckesheim', 'Friedrichstr. 10','74909', 'Meckesheim', '06226 9200-0', 'http://www.meckesheim.de', 'post@meckesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mhlhausen', 'Gemeindeverwaltung Mhlhausen', 'Schulstr. 6','69242', 'Mhlhausen', '06222 6158-0', 'http://www.muehlhausen-kraichgau.de', 'gemeinde@muehlhausen-kraichgau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neckarbischofsheim', 'Stadtverwaltung Neckarbischofsheim', 'Alexandergasse 2','74924', 'Neckarbischofsheim', '07263 607-0', 'http://www.neckarbischofsheim.de', 'Tanja.grether@neckarbischofsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neckargemnd', 'Stadtverwaltung Neckargemnd', 'Bahnhofstr. 54','69151', 'Neckargemnd', '06223 804-0', 'http://www.neckargemuend.de', 'stadtverwaltung@neckargemuend.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neidenstein', 'Gemeindeverwaltung Neidenstein', 'Schlostr. 9','74933', 'Neidenstein', '07263 9135-0', 'http://www.neidenstein.de', 'post@neidenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuluheim', 'Gemeindeverwaltung Neuluheim', 'St. Leoner-Str. 5','68809', 'Neuluheim', '06205 3941-0', 'http://www.neulussheim.de', 'gemeinde@neulussheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nuloch', 'Gemeindeverwaltung Nuloch', 'Sinsheimer Str. 19','69226', 'Nuloch', '06224 901-0', 'http://www.nussloch.de', 'info@nussloch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oftersheim', 'Gemeindeverwaltung Oftersheim', 'Mannheimer Str. 49','68723', 'Oftersheim', '06202 597-0', 'http://www.oftersheim.de', 'buergermeister@oftersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Plankstadt', 'Gemeindeverwaltung Plankstadt', 'Schwetzinger Str. 28','68723', 'Plankstadt', '06202 2006-0', 'http://www.plankstadt.de', 'info@plankstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rauenberg', 'Stadtverwaltung Rauenberg', 'Wieslocher Str. 21','69231', 'Rauenberg', '06222 619-0', 'http://www.rauenberg.de', 'rathaus@rauenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reichartshausen', 'Gemeindeverwaltung Reichartshausen', 'Rathausstr. 3','74934', 'Reichartshausen', '06262 9240-0', 'http://www.reichartshausen.de', 'Otto.Eckert@reichartshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reilingen', 'Gemeindeverwaltung Reilingen', 'Hockenheimer Str. 1-3','68799', 'Reilingen', '06205 952-0', 'http://www.reilingen.de', 'post@reilingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sandhausen', 'Gemeindeverwaltung Sandhausen', 'Bahnhofstr. 10','69207', 'Sandhausen', '06224 592-0', 'http://www.sandhausen.de', 'info@sandhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schnau', 'Stadtverwaltung Schnau', 'Rathausstr. 28','69250', 'Schnau', '06228 207-0', 'http://www.stadt-schoenau.de', 'post@stadt-schoenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schnbrunn', 'Gemeindeverwaltung Schnbrunn', 'Herdestr. 2','69436', 'Schnbrunn', '06272 9300-0', 'http://www.gemeinde-schoenbrunn.de', 'info@gemeinde-schoenbrunn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schriesheim', 'Stadtverwaltung Schriesheim', 'Friedrichstr. 28-30','69198', 'Schriesheim', '06203 602-0', 'http://www.schriesheim.de', 'zentrale@schriesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schwetzingen', 'Stadtverwaltung Schwetzingen', 'Hebelstr. 1','68723', 'Schwetzingen', '06202 87-0', 'http://www.schwetzingen.de', 'info@schwetzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sinsheim', 'Stadtverwaltung Sinsheim', 'Wilhelmstr. 14-18','74889', 'Sinsheim', '07261 404-0', 'http://www.sinsheim.de', 'info@sinsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Spechbach', 'Gemeindeverwaltung Spechbach', 'Hauptstr. 35','74937', 'Spechbach', '06226 9500-0', 'http://www.spechbach.de', 'info@gemeinde.spechbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waibstadt', 'Stadtverwaltung Waibstadt', 'Hauptstr. 31','74915', 'Waibstadt', '07263 9147-0', 'http://www.waibstadt.de', 'buergermeister@waibstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Walldorf', 'Stadtverwaltung Walldorf', 'Nulocher Str. 45','69190', 'Walldorf', '06227 35-0', 'http://www.walldorf.de', 'stadt@walldorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weinheim', 'Stadtverwaltung Weinheim', 'Obertorstr. 9','69469', 'Weinheim', '06201 82-0', 'http://www.weinheim.de', 'rathaus@weinheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wiesenbach', 'Gemeindeverwaltung Wiesenbach', 'Hauptstr. 26','69257', 'Wiesenbach', '06223 9502-0', 'http://www.wiesenbach-online.de', 'Eric.Grabenbauer@wiesenbach-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wiesloch', 'Stadtverwaltung Wiesloch', 'Marktstr. 13','69168', 'Wiesloch', '06222 84-1', 'http://www.wiesloch.de', 'dirk.elkemann@wiesloch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wilhelmsfeld', 'Gemeindeverwaltung Wilhelmsfeld', 'Johann-Wilhelm-Str. 61','69259', 'Wilhelmsfeld', '06220 509-0', 'http://www.wilhelmsfeld.de', 'post@wilhelmsfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zuzenhausen', 'Gemeindeverwaltung Zuzenhausen', 'Hauptstr. 25','74939', 'Zuzenhausen', '06226 9225-0', 'http://www.zuzenhausen.de', 'gemeinde@zuzenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Angelbachtal', 'Gemeindeverwaltung Angelbachtal', 'Schlostr. 1','74918', 'Angelbachtal', '07265 9120-0', 'http://www.angelbachtal.de', 'rathaus@angelbachtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'St. Leon-Rot', 'Gemeindeverwaltung St. Leon-Rot', 'Rathausstr. 2','68789', 'St. Leon-Rot', '06227 538-0', 'http://www.st-leon-rot.de', 'gemeinde@st-leon-rot.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lobbach', 'Gemeindeverwaltung Lobbach', 'Hauptstr. 38','74931', 'Lobbach', '06226 9525-0', 'http://www.lobbach.de', 'gemeinde@lobbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Edingen-Neckarhausen', 'Gemeindeverwaltung Edingen-Neckarhausen', 'Hauptstr. 60','68535', 'Edingen-Neckarhausen', '06203 808-0', 'http://www.edingen-neckarhausen.de', 'info@edingen-neckarhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Helmstadt-Bargen', 'Gemeindeverwaltung Helmstadt-Bargen', 'Rabanstr. 14','74921', 'Helmstadt-Bargen', '07263 9120-12', 'http://www.helmstadt-bargen.de/', 'gv-post@helmstadt-bargen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hirschberg an der Bergstrae', 'Gemeindeverwaltung Hirschberg an der Bergstrae', 'Grosachsener Str. 14','69493', 'Hirschberg an der Bergstrae', '06201 598-00', 'http://www.hirschberg-bergstrasse.de', 'gemeinde@hirschberg-bergstrasse.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Pforzheim', 'Stadtverwaltung Pforzheim', 'Marktplatz 1','75175', 'Pforzheim', '07231 39-0', 'http://www.pforzheim.de', 'poststelle@stadt-pforzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Altensteig', 'Stadtverwaltung Altensteig', 'Rathausplatz 1','72213', 'Altensteig', '07453 9461-0', 'http://www.altensteig.de', 'info@altensteig.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Althengstett', 'Gemeindeverwaltung Althengstett', 'Simmozheimer Str. 16','75382', 'Althengstett', '07051 1684-0', 'http://www.althengstett.de', 'clemens.goetz@althengstett.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Liebenzell', 'Stadtverwaltung Bad Liebenzell', 'Kurhausdamm 2 - 4','75378', 'Bad Liebenzell', '07052 408-0', 'http://www.bad-liebenzell.de', 'stadt@bad-liebenzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dobel', 'Gemeindeverwaltung Dobel', 'Neusatzer Str. 2','75335', 'Dobel', '07083 745-0', 'http://www.dobel.de', 'rathaus@dobel.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ebhausen', 'Gemeindeverwaltung Ebhausen', 'Marktplatz 1','72224', 'Ebhausen', '07458 9981-0', 'http://www.ebhausen.de', 'info@ebhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Egenhausen', 'Gemeindeverwaltung Egenhausen', 'Hauptstr. 19','72227', 'Egenhausen', '07453 9570-0', 'http://www.egenhausen.de', 'info@egenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Enzklsterle', 'Gemeindeverwaltung Enzklsterle', 'Friedensstr. 16','75337', 'Enzklsterle', '07085 9233-20', 'http://www.enzkloesterle.de', 'rathaus@enzkloesterle.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gechingen', 'Gemeindeverwaltung Gechingen', 'Calwer Str. 14','75391', 'Gechingen', '07056 201-91', 'http://www.gechingen.de', 'info@gechingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Haiterbach', 'Stadtverwaltung Haiterbach', 'Marktplatz 1','72221', 'Haiterbach', '07456 9388-0', 'http://www.haiterbach.de', 'info@haiterbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Herrenalb', 'Stadtverwaltung Bad Herrenalb', 'Rathausplatz 11','76332', 'Bad Herrenalb', '07083 5005-0', 'http://www.bad-herrenalb.de', 'info@badherrenalb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hfen an der Enz', 'Gemeindeverwaltung Hfen an der Enz', 'Wildbader Str. 1','75339', 'Hfen an der Enz', '07081 784-0', 'http://www.hoefen-enz.de', 'gemeinde@hoefen-enz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Nagold', 'Stadtverwaltung Nagold', 'Marktstr. 27-29','72202', 'Nagold', '07452 681-0', 'http://www.nagold.de', 'info@nagold.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neubulach', 'Stadtverwaltung Neubulach', 'Marktplatz 3','75387', 'Neubulach', '07053 9695-14', 'http://www.neubulach.de', 'stadtverwaltung@neubulach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuweiler', 'Gemeindeverwaltung Neuweiler', 'Marktstr. 7','75389', 'Neuweiler', '07055 9298-10', 'http://www.neuweiler.de', 'buchwald@neuweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberreichenbach', 'Gemeindeverwaltung Oberreichenbach', 'Schulstr. 3','75394', 'Oberreichenbach', '07051 9699-10', 'http://www.oberreichenbach.de', 'info@oberreichenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ostelsheim', 'Gemeindeverwaltung Ostelsheim', 'Hauptstr. 8','75395', 'Ostelsheim', '07033 4008-0', 'http://www.ostelsheim.de', 'gemeinde@ostelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rohrdorf', 'Gemeindeverwaltung Rohrdorf', 'Komtureihof 4','72229', 'Rohrdorf', '07452 5008', 'http://www.gemeinde-rohrdorf.de', 'info@gemeinde-rohrdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schmberg', 'Gemeindeverwaltung Schmberg', 'Lindenstr. 7','75328', 'Schmberg', '07084 14-0', 'http://www.schoemberg.de', 'gemeinde@schoemberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Simmersfeld', 'Gemeindeverwaltung Simmersfeld', 'Gartenstr. 14','72226', 'Simmersfeld', '07484 9320-0', 'http://www.simmersfeld.de', 'info@simmersfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Simmozheim', 'Gemeindeverwaltung Simmozheim', 'Hauptstr. 8','75397', 'Simmozheim', '07033 5285-0', 'http://www.simmozheim.de', 'mayer@simmozheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterreichenbach', 'Gemeindeverwaltung Unterreichenbach', 'Im Oberdorf 15','75399', 'Unterreichenbach', '07235 9333-0', 'http://www.unterreichenbach.de', 'hauptamt@unterreichenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Wildbad', 'Stadtverwaltung Bad Wildbad', 'Kernerstr. 11','75323', 'Bad Wildbad', '07081 930-101', 'http://www.bad-wildbad.de', 'mail@bad-wildbad.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wildberg', 'Stadtverwaltung Wildberg', 'Marktstr. 2','72218', 'Wildberg', '07054 201-0', 'http://www.wildberg.de', 'info@wildberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Teinach-Zavelstein', 'Stadtverwaltung Bad Teinach-Zavelstein', 'Rathausstr. 9','75385', 'Bad Teinach-Zavelstein', '07053 9292-0', 'http://www.bad-teinach-zavelstein.de', 'stadtverwaltung@bad-teinach-zavelstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Calw', 'Stadtverwaltung Calw', 'Am Marktplatz 9','75365', 'Calw', '07051 167-0', 'http://www.calw.de', 'stadt@calw.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Birkenfeld', 'Gemeindeverwaltung Birkenfeld', 'Marktplatz 6','75217', 'Birkenfeld', '07231 4886-0', 'http://www.birkenfeld-enzkreis.de', 'gemeinde@birkenfeld-enzkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eisingen', 'Gemeindeverwaltung Eisingen', 'Talstr. 1','75239', 'Eisingen', '07232 3811-0', 'http://www.eisingen-enzkreis.de', 'gemeinde@eisingen-enzkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Engelsbrand', 'Gemeindeverwaltung Engelsbrand', 'Eichbergstr. 1','75331', 'Engelsbrand', '07235 9324-0', 'http://www.engelsbrand.de/', 'gemeinde@engelsbrand.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Friolzheim', 'Gemeindeverwaltung Friolzheim', 'Rathausstr. 7','71292', 'Friolzheim', '07044 9036-18', 'http://www.friolzheim.de', 'buergermeister@friolzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heimsheim', 'Stadtverwaltung Heimsheim', 'Schlosshof 5','71296', 'Heimsheim', '07033 5357-0', 'http://www.heimsheim.de', 'stadt@heimsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Illingen', 'Gemeindeverwaltung Illingen', 'Ortszentrum 8','75428', 'Illingen', '07042 8242-0', 'http://www.illingen-online.de', 'gemeinde@illingen-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ispringen', 'Gemeindeverwaltung Ispringen', 'Gartenstr. 12','75228', 'Ispringen', '07231 9812-0', 'http://www.ispringen.de', 'gemeinde@ispringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kieselbronn', 'Gemeindeverwaltung Kieselbronn', 'Hauptstr. 20','75249', 'Kieselbronn', '07231 9534-0', 'http://www.kieselbronn.de', 'info@kieselbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Knittlingen', 'Stadtverwaltung Knittlingen', 'Marktstr. 19','75438', 'Knittlingen', '07043 373-0', 'http://www.knittlingen.de', 'stadt.knittlingen@knittlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Maulbronn', 'Stadtverwaltung Maulbronn', 'Klosterhof 31','75433', 'Maulbronn', '07043 103-0', 'http://www.maulbronn.de', 'buergermeister@maulbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mnsheim', 'Gemeindeverwaltung Mnsheim', 'Schulstr. 2','71297', 'Mnsheim', '07044 9253-0', 'http://www.moensheim.de', 'rathaus@moensheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mhlacker', 'Stadtverwaltung Mhlacker', 'Kelterplatz 7','75417', 'Mhlacker', '07041 876-10', 'http://www.muehlacker.de', 'stadt@muehlacker.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neuenbrg', 'Stadtverwaltung Neuenbrg', 'Rathausstr. 2','75305', 'Neuenbrg', '07082 7910-0', 'http://www.neuenbuerg.de', 'stadtverwaltung@neuenbuerg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuhausen', 'Gemeindeverwaltung Neuhausen', 'Pforzheimer Str. 20','75242', 'Neuhausen', '07234 9510-0', 'http://www.neuhausen-enzkreis.de', 'mail@neuhausen-enzkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Niefern-schelbronn', 'Gemeindeverwaltung Niefern-schelbronn', 'Friedenstr. 11','75223', 'Niefern-schelbronn', '07233 9622-0', 'http://www.niefern-oeschelbronn.de', 'info@niefern-oeschelbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'tisheim', 'Gemeindeverwaltung tisheim', 'Schnenberger Str. 2','75443', 'tisheim', '07041 9501-0', 'http://www.oetisheim.de', 'gemeinde@oetisheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sternenfels', 'Gemeindeverwaltung Sternenfels', 'Maulbronner Str. 7','75447', 'Sternenfels', '07045 97040-00', 'http://www.sternenfels.de', 'gemeinde@sternenfels.org'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tiefenbronn', 'Gemeindeverwaltung Tiefenbronn', 'Gemmingenstr. 1','75233', 'Tiefenbronn', '07234 9500-0', 'http://www.tiefenbronn.de', 'gemeindeverwaltung@tiefenbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wiernsheim', 'Gemeindeverwaltung Wiernsheim', 'Marktplatz 1','75446', 'Wiernsheim', '07044 23-0', 'http://www.wiernsheim.de', 'bma@wiernsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wimsheim', 'Gemeindeverwaltung Wimsheim', 'Rathausstr. 1','71299', 'Wimsheim', '07044 9427-0', 'http://www.Wimsheim.de', 'Gemeinde@Wimsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wurmberg', 'Gemeindeverwaltung Wurmberg', 'Uhlandstr. 15','75449', 'Wurmberg', '07044 9449-0', 'http://www.wurmberg.de', 'info@wurmberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Keltern', 'Gemeindeverwaltung Keltern', 'Weinbergstr. 9','75210', 'Keltern', '07236 703-0', 'http://www.keltern.de', 'bm.sekretariat@keltern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Remchingen', 'Gemeindeverwaltung Remchingen', 'Hauptstr. 5','75196', 'Remchingen', '07232 7979-0', 'http://www.remchingen.de', 'info@remchingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Straubenhardt', 'Gemeindeverwaltung Straubenhardt', 'Ittersbacher Str. 1','75334', 'Straubenhardt', '07082 9485-0', 'http://www.straubenhardt.de', 'hauptamt@straubenhardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neulingen', 'Gemeindeverwaltung Neulingen', 'Schlossstrae 2','75245', 'Neulingen', '07237 428-0', 'http://www.neulingen.de', 'info@neulingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kmpfelbach', 'Gemeindeverwaltung Kmpfelbach', 'Kelterstr. 1','75236', 'Kmpfelbach', '07231 88660', 'http://www.kaempfelbach.de', 'gemeinde@kaempfelbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'lbronn-Drrn', 'Gemeindeverwaltung lbronn-Drrn', 'Hauptstr. 53','75248', 'lbronn-Drrn', '07237 422-0', 'http://www.oelbronn-duerrn.de', 'norbert.holme@oelbronn-duerrn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigsbach-Stein', 'Gemeindeverwaltung Knigsbach-Stein', 'Marktstr. 15','75203', 'Knigsbach-Stein', '07232 3008-0', 'http://www.koenigsbach-stein.de', 'kielburger@koenigsbach-stein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Alpirsbach', 'Stadtverwaltung Alpirsbach', 'Marktplatz 2','72275', 'Alpirsbach', '07444 9516-0', 'http://www.alpirsbach.de', 'stadt@alpirsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Baiersbronn', 'Gemeindeverwaltung Baiersbronn', 'Oberdorfstr. 46','72270', 'Baiersbronn', '07442 8421-0', 'http://www.baiersbronn.de', 'info@gemeindebaiersbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Dornstetten', 'Stadtverwaltung Dornstetten', 'Marktplatz 1+2','72280', 'Dornstetten', '07443 9620-11', 'http://www.dornstetten.de', 'stadtverwaltung@dornstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Empfingen', 'Gemeindeverwaltung Empfingen', 'Mhlheimer Str. 2','72186', 'Empfingen', '07485 9988-0', 'http://www.empfingen.de', 'Ferdinand.Truffner@empfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eutingen im Gu', 'Gemeindeverwaltung Eutingen im Gu', 'Marktstr. 17','72184', 'Eutingen im Gu', '07459 881-0', 'http://www.eutingen-im-gaeu.de', 'buergermeisteramt@eutingen-im-gaeu.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Freudenstadt', 'Stadtverwaltung Freudenstadt', 'Marktplatz 1','72250', 'Freudenstadt', '07441 890-200', 'http://www.freudenstadt.de', 'info@freudenstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Glatten', 'Gemeindeverwaltung Glatten', 'Lombacher Str. 27','72293', 'Glatten', '07443 9607-0', 'http://www.glatten.de', 'buergermeister@glatten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grmbach', 'Gemeindeverwaltung Grmbach', 'Lindenweg 8','72294', 'Grmbach', '07453 8276', 'http://www.gemeinde-groembach.de/', 'gegroembach@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Horb am Neckar', 'Stadtverwaltung Horb am Neckar', 'Marktplatz 8','72160', 'Horb am Neckar', '07451 901-0', 'http://www.horb.de', 'post@horb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Loburg', 'Gemeindeverwaltung Loburg', 'Hauptstr. 50','72290', 'Loburg', '07446 9504-0', 'http://www.lossburg.de', 'postgemeinde@lossburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfalzgrafenweiler', 'Gemeindeverwaltung Pfalzgrafenweiler', 'Hauptstr. 1','72285', 'Pfalzgrafenweiler', '07445 8518-0', 'http://www.pfalzgrafenweiler.de', 'Bischoff@pfalzgrafenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schopfloch', 'Gemeindeverwaltung Schopfloch', 'Marktplatz 2','72296', 'Schopfloch', '07443 9603-0', 'http://www.schopfloch.de', 'zentrale@schopfloch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wrnersberg', 'Gemeindeverwaltung Wrnersberg', 'Lindenweg 1','72299', 'Wrnersberg', '07453 7851', 'www.woernersberg.de', 'moehrle-reinhold@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seewald', 'Gemeindeverwaltung Seewald', 'Wildbader Str. 1','72297', 'Seewald', '07447 9460-0', 'http://www.seewald.eu', 'gemeinde@seewald.eu'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Waldachtal', 'Gemeindeverwaltung Waldachtal', 'Hauptstr. 18','72178', 'Waldachtal', '07443 9634-0', 'http://www.waldachtal.de', 'postfach@waldachtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Rippoldsau-Schapbach', 'Gemeindeverwaltung Bad Rippoldsau-Schapbach', 'Rathausplatz 1','77776', 'Bad Rippoldsau-Schapbach', '07839 9199-0', 'http://www.bad-rippoldsau.de', 'info@bad-rippoldsau-schapbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Landeshauptstadt Stuttgart', 'Stadtverwaltung Landeshauptstadt Stuttgart', 'Marktplatz 1','70173', 'Stuttgart', '0711 216-0', 'http://www.stuttgart.de', 'info@stuttgart.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aidlingen', 'Gemeindeverwaltung Aidlingen', 'Hauptstr. 6','71134', 'Aidlingen', '07034 125-0', 'http://www.aidlingen.de', 'e.fauth@aidlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altdorf', 'Gemeindeverwaltung Altdorf', 'Kirchplatz 5','71155', 'Altdorf', '07031 7474-0', 'http://www.altdorf-online.de', 'info@altdorf-bb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung ', 'Bblingen', 'Stadtverwaltung Bblingen', 'Marktstr. 16','71032', 'Bblingen', '07031 669-0', 'http://www.boeblingen.de', 'stadt@boeblingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bondorf', 'Gemeindeverwaltung Bondorf', 'Hindenburgstr. 33','71149', 'Bondorf', '07457 9393-0', 'http://www.bondorf.de', 'bernd.duerr@bondorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deckenpfronn', 'Gemeindeverwaltung Deckenpfronn', 'Marktplatz 1','75392', 'Deckenpfronn', '07056 9279-0', 'http://www.deckenpfronn.de', 'gemeinde@deckenpfronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ehningen', 'Gemeindeverwaltung Ehningen', 'Knigstr. 29','71139', 'Ehningen', '07034 121-0', 'http://www.ehningen.de', 'gemeinde@ehningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grtringen', 'Gemeindeverwaltung Grtringen', 'Rohrweg 2','71116', 'Grtringen', '07034 923-0', 'http://www.gaertringen.de', 'riesch@gaertringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gufelden', 'Gemeindeverwaltung Gufelden', 'Rathausplatz 1','71126', 'Gufelden', '07032 7802-0', 'http://www.gaeufelden.de', 'info@gaeufelden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Herrenberg', 'Stadtverwaltung Herrenberg', 'Marktplatz 5','71083', 'Herrenberg', '07032 924-0', 'http://www.herrenberg.de', 'stadt@herrenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hildrizhausen', 'Gemeindeverwaltung Hildrizhausen', 'Herrenberger Str. 13','71157', 'Hildrizhausen', '07034 9387-0', 'http://www.hildrizhausen.de', 'info@hildrizhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Holzgerlingen', 'Stadtverwaltung Holzgerlingen', 'Bblinger Str. 5-7','71088', 'Holzgerlingen', '07031 6808-0', 'http://www.holzgerlingen.de', 'delakos@holzgerlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Leonberg', 'Stadtverwaltung Leonberg', 'Belforter Platz 1','71229', 'Leonberg', '07152 990-0', 'http://www.leonberg.de', 'ob@leonberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Magstadt', 'Gemeindeverwaltung Magstadt', 'Marktplatz 1','71106', 'Magstadt', '07159 9458-0', 'http://www.magstadt.de', 'info@magstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mtzingen', 'Gemeindeverwaltung Mtzingen', 'Schlossgartenstr.1','71159', 'Mtzingen', '07452 8881-0', 'http://www.moetzingen.de', 'hagenlocher@moetzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nufringen', 'Gemeindeverwaltung Nufringen', 'Hauptstr. 28','71154', 'Nufringen', '07032 9680-0', 'http://www.nufringen.de', 'gemeinde@nufringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Renningen', 'Stadtverwaltung Renningen', 'Hauptstr. 1','71272', 'Renningen', '07159 924-0', 'http://www.renningen.de', 'faisst@renningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rutesheim', 'Stadtverwaltung Rutesheim', 'Leonberger Str. 15','71277', 'Rutesheim', '07152 5002-0', 'http://www.rutesheim.de', 'stadt@rutesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schnaich', 'Gemeindeverwaltung Schnaich', 'Bhlstr. 10','71101', 'Schnaich', '07031 639-0', 'http://www.schoenaich.de', 'daniel.schamburek@schoenaich.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sindelfingen', 'Stadtverwaltung Sindelfingen', 'Rathausplatz 1','71063', 'Sindelfingen', '07031 94-314', 'http://www.sindelfingen.de', 'bernd.voehringer@sindelfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinenbronn', 'Gemeindeverwaltung Steinenbronn', 'Stuttgarter Str. 5','71144', 'Steinenbronn', '07157 1291-0', 'http://www.steinenbronn.de', 'info@steinenbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waldenbuch', 'Stadtverwaltung Waldenbuch', 'Marktplatz 1+5','71111', 'Waldenbuch', '07157 1293-0', 'http://www.waldenbuch.de', 'stadt@waldenbuch.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weil der Stadt', 'Stadtverwaltung Weil der Stadt', 'Marktplatz 4','71263', 'Weil der Stadt', '07033 521-0', 'http://www.weil-der-stadt.de', 'stadtverwaltung@weil-der-stadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weil im Schnbuch', 'Gemeindeverwaltung Weil im Schnbuch', 'Marktplatz 3','71093', 'Weil im Schnbuch', '07157 1290-0', 'http://www.weil-im-schoenbuch.de', 'info@weil-im-schoenbuch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weissach', 'Gemeindeverwaltung Weissach', 'Rathausplatz 1','71287', 'Weissach', '07044 9363-0', 'http://www.weissach.de', 'gemeinde@weissach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Jettingen', 'Gemeindeverwaltung Jettingen', 'Albstr. 2','71131', 'Jettingen', '07452 744-0', 'http://www.jettingen.de', 'burkhardt@jettingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grafenau', 'Gemeindeverwaltung Grafenau', 'Hofstetten 12','71120', 'Grafenau', '07033 403-0', 'http://www.grafenau-wuertt.de/', 'info@grafenau.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altbach', 'Gemeindeverwaltung Altbach', 'Esslinger Str. 26','73776', 'Altbach', '07153 7007-0', 'http://www.altbach.de', 'post@altbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altdorf', 'Gemeindeverwaltung Altdorf', 'Spitalhof 1','72655', 'Altdorf', '07127 9397-0', 'http://www.gemeinde-altdorf.de', 'rathaus@altdorf.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altenriet', 'Gemeindeverwaltung Altenriet', 'Brunnenstr. 5','72657', 'Altenriet', '07127 32213', 'http://www.altenriet.de', 'rathaus@altenriet.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Baltmannsweiler', 'Gemeindeverwaltung Baltmannsweiler', 'Marktplatz 1','73666', 'Baltmannsweiler', '07153 9427-0', 'http://www.baltmannsweiler.de', 'bma@baltmannsweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bempflingen', 'Gemeindeverwaltung Bempflingen', 'Metzinger Str. 3','72658', 'Bempflingen', '07123 9383-0', 'http://www.bempflingen.de', 'rathaus@bempflingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Beuren', 'Gemeindeverwaltung Beuren', 'Linsenhofer Str. 2','72660', 'Beuren', '07025 91030-0', 'http://www.beuren.de', 'beuren@beuren.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bissingen an der Teck', 'Gemeindeverwaltung Bissingen an der Teck', 'Vordere Str. 45','73266', 'Bissingen an der Teck', '07023 90000-0', 'http://www.bissingen-teck.de', 'rathaus@bissingen-teck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deizisau', 'Gemeindeverwaltung Deizisau', 'Am Marktplatz 1','73779', 'Deizisau', '07153 7013-0', 'http://www.deizisau.de', 'post@deizisau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Denkendorf', 'Gemeindeverwaltung Denkendorf', 'Furtstr. 1','73770', 'Denkendorf', '0711 341680-0', 'http://www.denkendorf.de', 'gemeinde@denkendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettingen unter Teck', 'Gemeindeverwaltung Dettingen unter Teck', 'Schulstr. 4','73265', 'Dettingen unter Teck', '07021 5000-0', 'http://www.dettingen-teck.de', 'gemeinde@dettingen-teck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erkenbrechtsweiler', 'Gemeindeverwaltung Erkenbrechtsweiler', 'Uracher Str. 2','73268', 'Erkenbrechtsweiler', '07026 95051-0', 'http://www.erkenbrechtsweiler.de', 'r.weiss@erkenbrechtsweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Esslingen am Neckar', 'Stadtverwaltung Esslingen am Neckar', 'Rathausplatz 2','73728', 'Esslingen am Neckar', '0711 3512-0', 'http://www.esslingen.de', 'stadt.esslingen@esslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Frickenhausen', 'Gemeindeverwaltung Frickenhausen', 'Mittlere Str. 18','72636', 'Frickenhausen', '07022 94342-0', 'http://www.frickenhausen.de', 'gemeinde@frickenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grobettlingen', 'Gemeindeverwaltung Grobettlingen', 'Schweizerhof 2','72663', 'Grobettlingen', '07022 94345-0', 'http://www.grossbettlingen.de', 'm.fritz@grossbettlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hochdorf', 'Gemeindeverwaltung Hochdorf', 'Eichendorffstr. 6','73269', 'Hochdorf', '07153 5006-0', 'http://www.hochdorf.de', 'info@hochdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Holzmaden', 'Gemeindeverwaltung Holzmaden', 'Bahnhofstr. 2','73271', 'Holzmaden', '07023 90001-0', 'http://www.holzmaden.de', 'info@holzmaden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kirchheim unter Teck', 'Stadtverwaltung Kirchheim unter Teck', 'Marktstr. 14','73230', 'Kirchheim unter Teck', '07021 502-0', 'http://www.kirchheim-teck.de', 'info@kirchheim-teck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kngen', 'Gemeindeverwaltung Kngen', 'Stffler Platz 1','73257', 'Kngen', '07024 8007-0', 'http://www.koengen.de', 'info@koengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kohlberg', 'Gemeindeverwaltung Kohlberg', 'Metzinger Str. 1','72664', 'Kohlberg', '07025 91018-0', 'http://www.kohlberg-wuerttemberg.de', 'rathaus@kohlberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lichtenwald', 'Gemeindeverwaltung Lichtenwald', 'Hauptstr. 34','73669', 'Lichtenwald', '07153 9463-0', 'http://www.lichtenwald.de', 'post@lichtenwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neckartailfingen', 'Gemeindeverwaltung Neckartailfingen', 'Nrtinger Str. 4','72666', 'Neckartailfingen', '07127 1808-0', 'http://www.neckartailfingen.de', 'gemeinde@neckartailfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neckartenzlingen', 'Gemeindeverwaltung Neckartenzlingen', 'Planstr. 2','72654', 'Neckartenzlingen', '07127 1801-0', 'http://www.neckartenzlingen.de', 'rathaus@neckartenzlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neidlingen', 'Gemeindeverwaltung Neidlingen', 'Kelterstr. 1','73272', 'Neidlingen', '07023 90023-0', 'http://www.neidlingen.de/', 'gemeinde@neidlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neuffen', 'Stadtverwaltung Neuffen', 'Hauptstr. 19','72639', 'Neuffen', '07025 106-0', 'http://www.neuffen.de', 'stadt@neuffen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuhausen auf den Fildern', 'Gemeindeverwaltung Neuhausen auf den Fildern', 'Schloplatz 1','73765', 'Neuhausen auf den Fildern', '07158 1700-0', 'http://www.neuhausen-fildern.de', 'gemeinde@neuhausen-fildern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Notzingen', 'Gemeindeverwaltung Notzingen', 'Bachstr. 50','73274', 'Notzingen', '07021 97075-0', 'http://www.notzingen.de', 'gemeinde@notzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Nrtingen', 'Stadtverwaltung Nrtingen', 'Marktstr. 7','72622', 'Nrtingen', '07022 75-0', 'http://www.nuertingen.de', 'stadt@nuertingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberboihingen', 'Gemeindeverwaltung Oberboihingen', 'Rathausgasse 3','72644', 'Oberboihingen', '07022 6000-0', 'http://www.oberboihingen.de', 'gemeinde@oberboihingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ohmden', 'Gemeindeverwaltung Ohmden', 'Hauptstr. 18','73275', 'Ohmden', '07023 9510-0', 'http://www.ohmden.de', 'gemeinde@ohmden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Owen', 'Stadtverwaltung Owen', 'Rathausstr. 8','73277', 'Owen', '07021 8006-0', 'http://www.owen.de', 'v-groetzinger@owen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Plochingen', 'Stadtverwaltung Plochingen', 'Schulstr. 5-7','73207', 'Plochingen', '07153/7005-0', 'http://www.plochingen.de', 'rathaus@plochingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reichenbach an der Fils', 'Gemeindeverwaltung Reichenbach an der Fils', 'Hauptstr. 7','73262', 'Reichenbach an der Fils', '07153 5005-0', 'http://www.reichenbach-fils.de', 'post@reichenbach-fils.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schlaitdorf', 'Gemeindeverwaltung Schlaitdorf', 'Hauptstr. 32','72667', 'Schlaitdorf', '07127 9282-0', 'http://www.schlaitdorf.de', 'rathaus@schlaitdorf.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterensingen', 'Gemeindeverwaltung Unterensingen', 'Kirchstr. 31','72669', 'Unterensingen', '07022 6097-0', 'http://www.unterensingen.de', 's.friz@unterensingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weilheim an der Teck', 'Stadtverwaltung Weilheim an der Teck', 'Marktplatz 6','73235', 'Weilheim an der Teck', '07023 106-0', 'http://www.weilheim-teck.de', 'stadt@weilheim-teck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wendlingen am Neckar', 'Stadtverwaltung Wendlingen am Neckar', 'Am Marktplatz 2','73240', 'Wendlingen am Neckar', '07024 943-0', 'http://www.wendlingen.de', 'bmweigel@wendlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wernau (Neckar)', 'Stadtverwaltung Wernau (Neckar)', 'Kirchheimer Str. 68-70','73249', 'Wernau (Neckar)', '07153 9345-0', 'http://www.wernau.de', 'info@wernau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wolfschlugen', 'Gemeindeverwaltung Wolfschlugen', 'Kirchstr. 19','72649', 'Wolfschlugen', '07022 5005-0', 'http://www.wolfschlugen.de', 'gemeinde@wolfschlugende'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aichwald', 'Gemeindeverwaltung Aichwald', 'Seestr. 8','73773', 'Aichwald', '0711 36909-0', 'http://www.gemeinde-aichwald.de', 'info@aichwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Filderstadt', 'Stadtverwaltung Filderstadt', 'Aicher Str. 9','70794', 'Filderstadt', '0711 7003-0', 'http://www.filderstadt.de', 'stadt@filderstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Leinfelden-Echterdingen', 'Stadtverwaltung Leinfelden-Echterdingen', 'Marktplatz 1','70771', 'Leinfelden-Echterdingen', '0711 1600-0', 'http://www.leinfelden-echterdingen.de', 'info@le-mail.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lenningen', 'Gemeindeverwaltung Lenningen', 'Marktplatz 1','73252', 'Lenningen', '07026 609-0', 'http://www.lenningen.de', 'm.schlecht@lenningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ostfildern', 'Stadtverwaltung Ostfildern', 'Klosterhof 10','73760', 'Ostfildern', '0711 3404-0', 'http://www.ostfildern.de', 'oberbuergermeister@ostfildern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Aichtal', 'Stadtverwaltung Aichtal', 'Waldenbucher Str. 30','72631', 'Aichtal', '07127 5803-0', 'http://www.aichtal.de', 'stadt@aichtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Adelberg', 'Gemeindeverwaltung Adelberg', 'Vordere Hauptstr. 2','73099', 'Adelberg', '07166 91011-0', 'http://www.adelberg.de', 'gemeinde@adelberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aichelberg', 'Gemeindeverwaltung Aichelberg', 'Vorderbergstr. 2','73101', 'Aichelberg', '07164 80095-0', 'http://www.aichelberg.de', 'rathaus@aichelberg.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Albershausen', 'Gemeindeverwaltung Albershausen', 'Kirchstr. 1','73095', 'Albershausen', '07161 3093-0', 'http://www.albershausen.de', 'gemeinde@albershausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Ditzenbach', 'Gemeindeverwaltung Bad Ditzenbach', 'Hauptstr. 40','73342', 'Bad Ditzenbach', '07334 9601-0', 'http://www.badditzenbach.de', 'info@rathaus.badditzenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad berkingen', 'Gemeindeverwaltung Bad berkingen', 'Gartenstr. 1','73337', 'Bad berkingen', '07331 2009-0', 'http://www.bad-ueberkingen.de', 'info@bad-ueberkingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Birenbach', 'Gemeindeverwaltung Birenbach', 'Marktplatz 1','73102', 'Birenbach', '07161 50098-0', 'http://www.birenbach.de', 'gemeinde@birenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bhmenkirch', 'Gemeindeverwaltung Bhmenkirch', 'Hauptstr. 100','89558', 'Bhmenkirch', '07332 9600-11', 'http://www.boehmenkirch.de', 'gemeinde@boehmenkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Brtlingen', 'Gemeindeverwaltung Brtlingen', 'Hauptstr. 54','73104', 'Brtlingen', '07161 95331-0', 'http://www.boertlingen.de', 'rathaus@boertlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Boll', 'Gemeindeverwaltung Bad Boll', 'Hauptstr. 94','73087', 'Bad Boll', '07164 808-0', 'http://www.bad-boll.de', 'hrbuehrle@bad-boll.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deggingen', 'Gemeindeverwaltung Deggingen', 'Bahnhofstr. 9','73326', 'Deggingen', '07334 78-0', 'http://www.deggingen.de', 'gemeinde@deggingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Donzdorf', 'Stadtverwaltung Donzdorf', 'Schloss 1-4','73072', 'Donzdorf', '07162 922-0', 'http://www.donzdorf.de', 'stadt@donzdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drackenstein', 'Gemeindeverwaltung Drackenstein', 'Hauptstr. 28','73345', 'Drackenstein', '07335 6452', 'http://www.drackenstein.de', ''); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drnau', 'Gemeindeverwaltung Drnau', 'Hauptstr. 16','73105', 'Drnau', '07164 91010-0', 'www.duernau.de', 'm.wagner@duernau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ebersbach an der Fils', 'Stadtverwaltung Ebersbach an der Fils', 'Marktplatz 1','73061', 'Ebersbach an der Fils', '07163 161-100', 'http://www.ebersbach.de', 'keller@stadt.ebersbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Eislingen/Fils', 'Stadtverwaltung Eislingen/Fils', 'Schlossplatz 1','73054', 'Eislingen/Fils', '07161 804-0', 'http://www.eislingen.de', 'OB_Heininger@eislingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eschenbach', 'Gemeindeverwaltung Eschenbach', 'Lotenbergstr. 6','73107', 'Eschenbach', '07161 94040-0', 'http://www.gemeinde-eschenbach.de', 'Thomas.Schubert@gemeinde-eschenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gammelshausen', 'Gemeindeverwaltung Gammelshausen', 'Hauptstr. 19','73108', 'Gammelshausen', '07164 401-0', 'http://www.gammelshausen.de', 'info@gammelshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Geislingen an der Steige', 'Stadtverwaltung Geislingen an der Steige', 'Hauptstr. 1','73312', 'Geislingen an der Steige', '07331 24-0', 'http://www.geislingen.de', 'Frank.Dehmer@geislingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gingen an der Fils', 'Gemeindeverwaltung Gingen an der Fils', 'Bahnhofstr. 25','73333', 'Gingen an der Fils', '07162 9606-13', 'http://www.gingen.de', 'bma@gingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gppingen', 'Stadtverwaltung Gppingen', 'Hauptstr. 1','73033', 'Gppingen', '07161 650-0', 'http://www.goeppingen.de', 'stadtverwaltung@goeppingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gruibingen', 'Gemeindeverwaltung Gruibingen', 'Hauptstr. 18','73344', 'Gruibingen', '07335 9600-0', 'http://www.gruibingen.de', 'info@gruibingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hattenhofen', 'Gemeindeverwaltung Hattenhofen', 'Hauptstr. 45','73110', 'Hattenhofen', '07164 91009-0', 'http://www.hattenhofen.de', 'rathaus@hattenhofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heiningen', 'Gemeindeverwaltung Heiningen', 'Hauptstr. 30','73092', 'Heiningen', '07161 4034-0', 'http://www.heiningen-online.de', 'aufrecht@heiningen-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohenstadt', 'Gemeindeverwaltung Hohenstadt', 'Schulstr. 9','73345', 'Hohenstadt', '07335 5033', 'http://www.hohenstadt-alb.de/', 'A.Hofele@Hohenstadt-alb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kuchen', 'Gemeindeverwaltung Kuchen', 'Marktplatz 11','73329', 'Kuchen', '07331 9882-0', 'http://www.kuchen.de', 'bma@kuchen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mhlhausen im Tle', 'Gemeindeverwaltung Mhlhausen im Tle', 'Gosbacher Str. 16','73347', 'Mhlhausen im Tle', '07335 9601-0', 'http://www.muehlhausen-taele.de', 'gemeinde@muehlhausen-taele.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ottenbach', 'Gemeindeverwaltung Ottenbach', 'Hauptstr. 4','73113', 'Ottenbach', '07165 91291-0', 'http://www.ottenbach.de', 'Franz@ottenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rechberghausen', 'Gemeindeverwaltung Rechberghausen', 'Amtsgasse 4','73098', 'Rechberghausen', '07161 501-0', 'http://www.rechberghausen.de', 'info@gemeinde.rechberghausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Salach', 'Gemeindeverwaltung Salach', 'Rathausplatz 1','73084', 'Salach', '07162 4008-0', 'http://www.salach.de', 'info@salach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schlat', 'Gemeindeverwaltung Schlat', 'Hauptstr. 2','73114', 'Schlat', '07161 987397-0', 'http://www.schlat.de', 'info@schlat.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schlierbach', 'Gemeindeverwaltung Schlierbach', 'Hlzerstr. 1','73278', 'Schlierbach', '07021 97006-0', 'http://www.schlierbach.de', 'gemeinde@schlierbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sen', 'Stadtverwaltung Sen', 'Heidenheimer Str. 30','73079', 'Sen', '07162 9616-0', 'http://www.suessen.de', 'info@suessen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Uhingen', 'Stadtverwaltung Uhingen', 'Kirchstr. 2','73066', 'Uhingen', '07161 9380-113', 'http://www.uhingen.de', 'Matthias.Wittlinger@uhingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wschenbeuren', 'Gemeindeverwaltung Wschenbeuren', 'Manfred-Wrner-Platz 1','73116', 'Wschenbeuren', '07172 92655-0', 'http://www.waeschenbeuren.de', 'info@waeschenbeuren.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wangen', 'Gemeindeverwaltung Wangen', 'Pfarrberg 2','73117', 'Wangen', '07161 91418-0', 'http://www.gemeinde-wangen.de', 't.dutta@wangen.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wiesensteig', 'Stadtverwaltung Wiesensteig', 'Hauptstr. 25','73349', 'Wiesensteig', '07335 9620-0', 'http://www.wiesensteig.de', 'info@wiesensteig.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zell unter Aichelberg', 'Gemeindeverwaltung Zell unter Aichelberg', 'Lindenstr. 1-3','73119', 'Zell unter Aichelberg', '07164 807-0', 'http://www.zell-u-a.de', 'flik@zell-u-a.de.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lauterstein', 'Stadtverwaltung Lauterstein', 'Hauptstr. 75','73111', 'Lauterstein', '07332 9669-0', 'http://www.lauterstein.de', 'bmlenz@lauterstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Affalterbach', 'Gemeindeverwaltung Affalterbach', 'Marbacher Str. 17','71563', 'Affalterbach', '07144 8353-0', 'http://www.affalterbach.de', 'gemeinde@affalterbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Asperg', 'Stadtverwaltung Asperg', 'Marktplatz 1','71679', 'Asperg', '07141 269-0', 'http://www.asperg.de', 'info@asperg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Benningen am Neckar', 'Gemeindeverwaltung Benningen am Neckar', 'Studionstr. 10','71726', 'Benningen am Neckar', '07144 906-0', 'http://www.benningen.de', 'rathaus@benningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Besigheim', 'Stadtverwaltung Besigheim', 'Marktplatz 12','74354', 'Besigheim', '07143 8078-0', 'http://www.besigheim.de', 'stadtverwaltung@besigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bnnigheim', 'Stadtverwaltung Bnnigheim', 'Kirchheimer Str. 1','74357', 'Bnnigheim', '07143 273-0', 'http://www.boennigheim.de', 'Albrecht.Dautel@boennigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ditzingen', 'Stadtverwaltung Ditzingen', 'Am Laien 1','71254', 'Ditzingen', '07156 164-0', 'http://www.ditzingen.de', 'ob@ditzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eberdingen', 'Gemeindeverwaltung Eberdingen', 'Stuttgarter Str. 34','71735', 'Eberdingen', '07042 799-0', 'http://www.eberdingen.de', 'buergermeisteramt@eberdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erdmannhausen', 'Gemeindeverwaltung Erdmannhausen', 'Pflasterstr. 15','71729', 'Erdmannhausen', '07144 308-0', 'http://www.erdmannhausen.de', 'rathaus@erdmannhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erligheim', 'Gemeindeverwaltung Erligheim', 'Rathausstr. 7','74391', 'Erligheim', '07143 8840-0', 'http://www.erligheim.de', 'gemeindeverwaltung@erligheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Freudental', 'Gemeindeverwaltung Freudental', 'Schloplatz 1','74392', 'Freudental', '07143 88303-0', 'http://www.freudental.de', 'gemeinde@freudental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gemmrigheim', 'Gemeindeverwaltung Gemmrigheim', 'Ottmarsheimer Str. 1','74376', 'Gemmrigheim', '07143 972-0', 'http://www.gemmrigheim.de', 'zentrale@gemmrigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gerlingen', 'Stadtverwaltung Gerlingen', 'Rathausplatz 1','70839', 'Gerlingen', '07156 205-0', 'http://www.gerlingen.de', 'stadt@gerlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Grobottwar', 'Stadtverwaltung Grobottwar', 'Marktplatz 1','71723', 'Grobottwar', '07148 31-0', 'http://www.grossbottwar.de', 'stadt@grossbottwar.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hemmingen', 'Gemeindeverwaltung Hemmingen', 'Mnchinger Str. 5','71282', 'Hemmingen', '07150 9203-0', 'http://www.hemmingen.de', 'gemeinde@hemmingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hessigheim', 'Gemeindeverwaltung Hessigheim', 'Besigheimer Str. 17','74394', 'Hessigheim', '07143 8143-0', 'http://www.hessigheim.de/', 'info@hessigheim.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchheim am Neckar', 'Gemeindeverwaltung Kirchheim am Neckar', 'Hauptstr. 78','74366', 'Kirchheim am Neckar', '07143 8955-0', 'http://www.kirchheim-am-neckar.de', 'info@kirchheim-n.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kornwestheim', 'Stadtverwaltung Kornwestheim', 'Jakob-Sigle-Platz 1','70806', 'Kornwestheim', '07154 202-0', 'http://www.kornwestheim.de', 'office@kornwestheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lchgau', 'Gemeindeverwaltung Lchgau', 'Hauptstr. 49','74369', 'Lchgau', '07143 2709-0', 'http://www.loechgau.de', 'rathaus@loechgau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ludwigsburg', 'Stadtverwaltung Ludwigsburg', 'Wilhelmstr. 11','71638', 'Ludwigsburg', '07141 910-0', 'http://www.ludwigsburg.de', 'rathaus@ludwigsburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Marbach am Neckar', 'Stadtverwaltung Marbach am Neckar', 'Marktstr. 23','71672', 'Marbach am Neckar', '07144 102-0', 'http://www.schillerstadt-marbach.de', 'jan.trost@schillerstadt-marbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Markgrningen', 'Stadtverwaltung Markgrningen', 'Marktplatz 1','71706', 'Markgrningen', '07145 13-0', 'http://www.markgroeningen.de', 'info@markgroeningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mglingen', 'Gemeindeverwaltung Mglingen', 'Rathausplatz 3','71696', 'Mglingen', '07141 4864-0', 'http://www.moeglingen.de', 'info@moeglingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mundelsheim', 'Gemeindeverwaltung Mundelsheim', 'Hindenburgstr. 1','74395', 'Mundelsheim', '07143 8177-0', 'http://www.mundelsheim.de', 'gemeinde@mundelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Murr', 'Gemeindeverwaltung Murr', 'Hindenburgstr. 60','71711', 'Murr', '07144 2699-0', 'http://www.gemeinde-murr.de', 'rathaus@murr.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Oberriexingen', 'Stadtverwaltung Oberriexingen', 'Hauptstr. 14','71739', 'Oberriexingen', '07042 909-0', 'http://www.oberriexingen.de', 'rathaus@oberriexingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberstenfeld', 'Gemeindeverwaltung Oberstenfeld', 'Grobottwarer Str. 20','71720', 'Oberstenfeld', '07062 261-0', 'http://www.oberstenfeld.de', 'kleemann@oberstenfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pleidelsheim', 'Gemeindeverwaltung Pleidelsheim', 'Marbacher Str. 5','74385', 'Pleidelsheim', '07144 264-0', 'http://www.pleidelsheim.de', 'rathaus@pleidelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwieberdingen', 'Gemeindeverwaltung Schwieberdingen', 'Schlohof 1','71701', 'Schwieberdingen', '07150 305-0', 'http://www.schwieberdingen.de', 'rathaus@schwieberdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sersheim', 'Gemeindeverwaltung Sersheim', 'Schlostr. 21','74372', 'Sersheim', '07042 372-0', 'http://www.sersheim.de', 'gemeinde@sersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Steinheim an der Murr', 'Stadtverwaltung Steinheim an der Murr', 'Marktstr. 29','71711', 'Steinheim an der Murr', '07144 263-0', 'http://www.stadt-steinheim.de', 'info@stadt-steinheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tamm', 'Gemeindeverwaltung Tamm', 'Hauptstrae 100','71732', 'Tamm', '07141 606-0', 'http://www.tamm.org', 'info@tamm.org'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Vaihingen an der Enz', 'Stadtverwaltung Vaihingen an der Enz', 'Marktplatz 1','71665', 'Vaihingen an der Enz', '07042 18-0', 'http://www.vaihingen.de', 'info@vaihingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Walheim', 'Gemeindeverwaltung Walheim', 'Hauptstr. 68','74399', 'Walheim', '07143 8041-11', 'http://www.walheim.de', 'tatjana.scheerle@walheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sachsenheim', 'Stadtverwaltung Sachsenheim', 'uerer Schlohof 3 und 5','74343', 'Sachsenheim', '07147 28-0', 'http://www.sachsenheim.de', 'h.albrich@sachsenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ingersheim', 'Gemeindeverwaltung Ingersheim', 'Hindenburgplatz 10','74379', 'Ingersheim', '07142 9745-14', 'http://www.ingersheim.de', 'volker.godel@ingersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Freiberg am Neckar', 'Stadtverwaltung Freiberg am Neckar', 'Marktplatz 2','71691', 'Freiberg am Neckar', '07141 278-0', 'http://www.freiberg-an.de', 'bm@freiberg-an.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bietigheim-Bissingen', 'Stadtverwaltung Bietigheim-Bissingen', 'Marktplatz 8','74321', 'Bietigheim-Bissingen', '07142 74-0', 'http://www.bietigheim-bissingen.de', 'stadt@bietigheim-bissingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Korntal-Mnchingen', 'Stadtverwaltung Korntal-Mnchingen', 'Saalplatz 4','70825', 'Korntal-Mnchingen', '0711 8367-0', 'http://www.korntal.de', 'stadt@korntal-muenchingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Remseck am Neckar', 'Stadtverwaltung Remseck am Neckar', 'Fellbacher Str. 2','71686', 'Remseck am Neckar', '07146 289-0', 'http://www.remseck.de', 'info@remseck-am-neckar.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Alfdorf', 'Gemeindeverwaltung Alfdorf', 'Obere Schlostr. 28','73553', 'Alfdorf', '07172 309-0', 'http://www.alfdorf.de', 'segan@alfdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Allmersbach im Tal', 'Gemeindeverwaltung Allmersbach im Tal', 'Backnanger Str. 42','71573', 'Allmersbach im Tal', '07191 3530-0', 'http://www.allmersbach.de', 'RWoerner@allmersbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Althtte', 'Gemeindeverwaltung Althtte', 'Rathausplatz 1','71566', 'Althtte', '07183 95959-0', 'http://www.althuette.de', 'info@althuette.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Auenwald', 'Gemeindeverwaltung Auenwald', 'Lippoldsweilerstr. 15','71549', 'Auenwald', '07191 5005-0', 'http://www.auenwald.de', 'ostfalk@auenwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Backnang', 'Stadtverwaltung Backnang', 'Am Rathaus 1','71522', 'Backnang', '07191 894-0', 'http://www.backnang.de', 'stadt@backnang.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Burgstetten', 'Gemeindeverwaltung Burgstetten', 'Rathausstr. 18','71576', 'Burgstetten', '07191 9585-0', 'http://www.burgstetten.de', 'rathaus@burgstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Fellbach', 'Stadtverwaltung Fellbach', 'Marktplatz 1','70734', 'Fellbach', '0711 5851-0', 'http://www.fellbach.de', 'rathaus@fellbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Groerlach', 'Gemeindeverwaltung Groerlach', 'Stuttgarter Str. 18','71577', 'Groerlach', '07903 9154-0', 'http://www.grosserlach.de', 'rathaus@grosserlach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kaisersbach', 'Gemeindeverwaltung Kaisersbach', 'Dorfstr. 5','73667', 'Kaisersbach', '07184 93838-0', 'http://www.kaisersbach.de', 'k.mueller@kaisersbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchberg an der Murr', 'Gemeindeverwaltung Kirchberg an der Murr', 'Kirchplatz 2','71737', 'Kirchberg an der Murr', '07144 8375-0', 'http://www.kirchberg-murr.de/', 'info@kirchberg-murr.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Korb', 'Gemeindeverwaltung Korb', 'J.-F.-Weishaar-Strae 7 - 9','71404', 'Korb', '07151 9334-0', 'http://www.korb.de', 'gemeinde@korb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Leutenbach', 'Gemeindeverwaltung Leutenbach', 'Rathausplatz 1','71397', 'Leutenbach', '07195 189-0', 'http://www.leutenbach.de', 'info@leutenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Murrhardt', 'Stadtverwaltung Murrhardt', 'Marktplatz 10','71540', 'Murrhardt', '07192 213-0', 'http://www.murrhardt.de', 'info@murrhardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oppenweiler', 'Gemeindeverwaltung Oppenweiler', 'Schlostr. 12','71570', 'Oppenweiler', '07191 484-0', 'http://www.oppenweiler.de', 'gemeinde@oppenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Plderhausen', 'Gemeindeverwaltung Plderhausen', 'Am Marktplatz 11','73655', 'Plderhausen', '07181 8009-0', 'http://www.pluederhausen.de', 'bm.schaffer@pluederhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rudersberg', 'Gemeindeverwaltung Rudersberg', 'Backnanger Str. 26','73635', 'Rudersberg', '07183 3005-12', 'http://www.rudersberg.de', 'info@rudersberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schorndorf', 'Stadtverwaltung Schorndorf', 'Marktplatz 1','73614', 'Schorndorf', '07181 602-0', 'http://www.schorndorf.de', 'matthias.klopfer@schorndorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwaikheim', 'Gemeindeverwaltung Schwaikheim', 'Marktplatz 2-4','71409', 'Schwaikheim', '07195 582-0', 'http://www.schwaikheim.de', 'gemeinde@schwaikheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Spiegelberg', 'Gemeindeverwaltung Spiegelberg', 'Sulzbacher Str. 7','71579', 'Spiegelberg', '07194 9501-0', 'http://www.gemeinde-spiegelberg.de', 'info@gemeinde-spiegelberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sulzbach an der Murr', 'Gemeindeverwaltung Sulzbach an der Murr', 'Bahnhofstr. 3','71560', 'Sulzbach an der Murr', '07193 51-0', 'http://www.sulzbach-murr.de', 'd.zahn@sulzbach-murr.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Urbach', 'Gemeindeverwaltung Urbach', 'Konrad-Hornschuch-Str. 12','73660', 'Urbach', '07181 8007-0', 'http://www.urbach.de', 'fehrlen@urbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waiblingen', 'Stadtverwaltung Waiblingen', 'Kurze Str. 33','71332', 'Waiblingen', '07151 5001-1', 'http://www.waiblingen.de', 'oberbuergermeister@waiblingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weissach im Tal', 'Gemeindeverwaltung Weissach im Tal', 'Kirchberg 2-4','71554', 'Weissach im Tal', '07191 3531-0', 'http://www.weissach-im-tal.de', 'bma@weissach-im-tal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Welzheim', 'Stadtverwaltung Welzheim', 'Kirchplatz 3','73642', 'Welzheim', '07182 8008-0', 'http://www.welzheim.de', 'stadt@welzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Winnenden', 'Stadtverwaltung Winnenden', 'Torstr. 10','71364', 'Winnenden', '07195 13-0', 'http://www.winnenden.de', 'rathaus@winnenden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Winterbach', 'Gemeindeverwaltung Winterbach', 'Marktplatz 2','73650', 'Winterbach', '07181 7006-0', 'http://www.winterbach.de', 'gemeinde@winterbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aspach', 'Gemeindeverwaltung Aspach', 'Backnanger Str. 9','71546', 'Aspach', '07191 212-0', 'http://www.aspach.de', 'info@aspach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Berglen', 'Gemeindeverwaltung Berglen', 'Beethovenstr. 14-20','73663', 'Berglen', '07195 9757-0', 'http://www.berglen.de', 'gemeinde@berglen.kdrs.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Remshalden', 'Gemeindeverwaltung Remshalden', 'Marktplatz 1','73630', 'Remshalden', '07151 9731-117', 'http://www.remshalden.de', 'gemeinde@remshalden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weinstadt', 'Stadtverwaltung Weinstadt', 'Marktplatz 1','71384', 'Weinstadt', '07151 693-0', 'http://www.weinstadt.de', 'ob.vorzimmer@weinstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kernen im Remstal', 'Gemeindeverwaltung Kernen im Remstal', 'Stettener Str. 12','71394', 'Kernen im Remstal', '07151 4014-0', 'http://www.kernen.de', 'info@kernen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heilbronn', 'Stadtverwaltung Heilbronn', 'Marktplatz 7','74072', 'Heilbronn', '07131 56-0', 'http://www.heilbronn.de', 'posteingang@stadt-heilbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Abstatt', 'Gemeindeverwaltung Abstatt', 'Rathausstr. 30','74232', 'Abstatt', '07062 677-0', 'http://www.abstatt.de', 'info@abstatt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Friedrichshall', 'Stadtverwaltung Bad Friedrichshall', 'Rathausplatz 1','74177', 'Bad Friedrichshall', '07136 832-0', 'http://www.friedrichshall.de', 'info@friedrichshall.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Rappenau', 'Stadtverwaltung Bad Rappenau', 'Kirchplatz 4','74906', 'Bad Rappenau', '07264 922-0', 'http://www.badrappenau.de', 'stadt@badrappenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Wimpfen', 'Stadtverwaltung Bad Wimpfen', 'Marktplatz 1','74206', 'Bad Wimpfen', '07063 53-0', 'http://www.badwimpfen.de', 'stadtverwaltung@badwimpfen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Beilstein', 'Stadtverwaltung Beilstein', 'Hauptstr. 19','71717', 'Beilstein', '07062 263-0', 'http://www.beilstein-online.de', 'stadt@beilstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Brackenheim', 'Stadtverwaltung Brackenheim', 'Marktplatz 1','74336', 'Brackenheim', '07135 105-0', 'http://www.brackenheim.de', 'info@brackenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Cleebronn', 'Gemeindeverwaltung Cleebronn', 'Keltergasse 2','74389', 'Cleebronn', '07135 9856-0', 'http://www.cleebronn.de', 'info@cleebronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eberstadt', 'Gemeindeverwaltung Eberstadt', 'Hauptstr. 39','74246', 'Eberstadt', '07134 9808-0', 'http://www.eberstadt.de', 'info@eberstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ellhofen', 'Gemeindeverwaltung Ellhofen', 'Kirchplatz 1','74248', 'Ellhofen', '07134 9881-0', 'http://www.ellhofen.de', 'info@ellhofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Eppingen', 'Stadtverwaltung Eppingen', 'Marktplatz 1','75031', 'Eppingen', '07262 920-0', 'http://www.eppingen.de', 'rathaus@eppingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erlenbach', 'Gemeindeverwaltung Erlenbach', 'Klingenstr. 2','74235', 'Erlenbach', '07132 9335-0', 'http://www.erlenbach-hn.de', 'info@erlenbach-hn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Flein', 'Gemeindeverwaltung Flein', 'Kellergasse 1','74223', 'Flein', '07131 5007-0', 'http://www.flein.de', 'info@flein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gemmingen', 'Gemeindeverwaltung Gemmingen', 'Hausener Str. 1','75050', 'Gemmingen', '07267 808-0', 'http://www.gemmingen4u.de', 'wolf@gemeinde-gemmingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gglingen', 'Stadtverwaltung Gglingen', 'Marktstr. 19-21','74363', 'Gglingen', '07135 108-0', 'http://www.gueglingen.de', 'stadt@gueglingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gundelsheim', 'Stadtverwaltung Gundelsheim', 'Tiefenbacher Str. 16','74831', 'Gundelsheim', '06269 96-0', 'http://www.gundelsheim.de', 'info@gundelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ilsfeld', 'Gemeindeverwaltung Ilsfeld', 'Rathausstrae 8','74360', 'Ilsfeld', '07062 9042-0', 'http://www.ilsfeld.de', 'gemeinde@ilsfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ittlingen', 'Gemeindeverwaltung Ittlingen', 'Hauptstr. 101','74930', 'Ittlingen', '07266 9191-0', 'http://www.ittlingen.de', 'info@ittlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Jagsthausen', 'Gemeindeverwaltung Jagsthausen', 'Hauptstr. 3','74249', 'Jagsthausen', '07943 9101-0', 'http://www.jagsthausen.de', 'info@gemeinde.jagsthausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchardt', 'Gemeindeverwaltung Kirchardt', 'Goethestr. 5','74912', 'Kirchardt', '07266 208-0', 'http://www.kirchardt.de', 'rathaus@kirchardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lauffen am Neckar', 'Stadtverwaltung Lauffen am Neckar', 'Rathausstr. 10','74348', 'Lauffen am Neckar', '07133 106-0', 'http://www.lauffen.de', 'info@lauffen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lehrensteinsfeld', 'Gemeindeverwaltung Lehrensteinsfeld', 'Ellhofener Str. 2','74251', 'Lehrensteinsfeld', '07134 9848-0', 'http://www.lehrensteinsfeld.de', 'info@lehrensteinsfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Leingarten', 'Gemeindeverwaltung Leingarten', 'Heilbronner Str. 38','74211', 'Leingarten', '07131 4061-0', 'http://www.leingarten.de', 'info@leingarten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lwenstein', 'Stadtverwaltung Lwenstein', 'Maybachstr. 32','74245', 'Lwenstein', '07130 22-0', 'http://www.stadt-loewenstein.de', 'stadt-loewenstein@stadt-loewenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Massenbachhausen', 'Gemeindeverwaltung Massenbachhausen', 'Heilbronner Str. 54','74252', 'Massenbachhausen', '07138 9712-0', 'http://www.massenbachhausen.de', 'posteingang@massenbachhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mckmhl', 'Stadtverwaltung Mckmhl', 'Hauptstr. 23','74219', 'Mckmhl', '06298 202-0', 'http://www.moeckmuehl.de', 'info@moeckmuehl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neckarsulm', 'Stadtverwaltung Neckarsulm', 'Marktstr. 18','74172', 'Neckarsulm', '07132 35-0', 'http://www.neckarsulm.de', 'info-stadt@neckarsulm.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neckarwestheim', 'Gemeindeverwaltung Neckarwestheim', 'Marktplatz 1','74382', 'Neckarwestheim', '07133 184-0', 'http://www.neckarwestheim.de', 'info@neckarwestheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neudenau', 'Stadtverwaltung Neudenau', 'Hauptstr. 27','74861', 'Neudenau', '06264 9205-0', 'http://www.neudenau.de', 'zentrale@neudenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neuenstadt am Kocher', 'Stadtverwaltung Neuenstadt am Kocher', 'Hauptstr. 50','74196', 'Neuenstadt am Kocher', '07139 97-0', 'http://www.neuenstadt.de', 'Norbert.Heuser@neuenstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nordheim', 'Gemeindeverwaltung Nordheim', 'Hauptstr. 26','74226', 'Nordheim', '07133 182-110', 'http://www.nordheim.de', 'volker.schiek@nordheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oedheim', 'Gemeindeverwaltung Oedheim', 'Ratsstr. 1','74229', 'Oedheim', '07136 278-0', 'http://www.oedheim.de', 'info@oedheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Offenau', 'Gemeindeverwaltung Offenau', 'Jagstfelder Str. 1','74254', 'Offenau', '07136 9540-0', 'http://www.offenau.de', 'post@offenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfaffenhofen', 'Gemeindeverwaltung Pfaffenhofen', 'Rodbachstr. 15','74397', 'Pfaffenhofen', '07046 9620-0', 'http://www.pfaffenhofen-wuertt.de', 'bma@pfaffenhofen-wuertt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Roigheim', 'Gemeindeverwaltung Roigheim', 'Hauptstr. 20','74255', 'Roigheim', '06298 9205-0', 'http://www.roigheim.de', 'info@roigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schwaigern', 'Stadtverwaltung Schwaigern', 'Marktstr. 2','74193', 'Schwaigern', '07138 21-0', 'http://www.schwaigern.de', 'sabine.rotermund@schwaigern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Siegelsbach', 'Gemeindeverwaltung Siegelsbach', 'Wagenbacher Str. 4A','74936', 'Siegelsbach', '07264 9150-0', 'http://www.siegelsbach.de', 'gemeinde@siegelsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Talheim', 'Gemeindeverwaltung Talheim', 'Rathausplatz 18','74388', 'Talheim', '07133 9830-0', 'http://www.talheim.de', 'rainer.graessle@talheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Untereisesheim', 'Gemeindeverwaltung Untereisesheim', 'Rathausstr. 1','74257', 'Untereisesheim', '07132 9974-0', 'http://www.untereisesheim.de', 'bernd.bordon@untereisesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Untergruppenbach', 'Gemeindeverwaltung Untergruppenbach', 'Kirchstr. 2','74199', 'Untergruppenbach', '07131 7029-0', 'http://www.untergruppenbach.de', 'gemeinde@untergruppenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weinsberg', 'Stadtverwaltung Weinsberg', 'Marktplatz 11','74189', 'Weinsberg', '07134 512-0', 'http://www.weinsberg.de', 'stadt@weinsberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Widdern', 'Stadtverwaltung Widdern', 'Keltergasse 5','74259', 'Widdern', '06298 9247-0', 'http://www.widdern.de', 'stadt@widdern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wstenrot', 'Gemeindeverwaltung Wstenrot', 'Eichwaldstr. 19','71543', 'Wstenrot', '07945 9199-11', 'http://www.gemeinde-wuestenrot.de', 'timo.wolf@gemeinde-wuestenrot.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zaberfeld', 'Gemeindeverwaltung Zaberfeld', 'Schloberg 5','74374', 'Zaberfeld', '07046 9626-0', 'http://www.zaberfeld.de', 'gemeinde@zaberfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obersulm', 'Gemeindeverwaltung Obersulm', 'Bernhardstr. 1','74182', 'Obersulm', '07130 28-100', 'http://www.obersulm.de', 'tilman.schmidt@obersulm.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hardthausen am Kocher', 'Gemeindeverwaltung Hardthausen am Kocher', 'Lampoldshauser Str. 8','74239', 'Hardthausen am Kocher', '07139 4709-0', 'http://www.hardthausen.de', 'gemeinde-hardthausen@hardthausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Langenbrettach', 'Gemeindeverwaltung Langenbrettach', 'Rathausstr. 1','74243', 'Langenbrettach', '07139 9306-0', 'http://www.langenbrettach.de', 'info@langenbrettach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bretzfeld', 'Gemeindeverwaltung Bretzfeld', 'Adolzfurter Str. 12','74626', 'Bretzfeld', '07946 771-0', 'http://www.bretzfeld.de', 'rathaus@bretzfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drzbach', 'Gemeindeverwaltung Drzbach', 'Marktplatz 2','74677', 'Drzbach', '07937 9119-0', 'http://www.doerzbach.de', 'gemeinde@doerzbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Forchtenberg', 'Stadtverwaltung Forchtenberg', 'Hauptstr. 14','74670', 'Forchtenberg', '07947 9111-0', 'http://www.forchtenberg.de', 'Michael.Foss@forchtenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ingelfingen', 'Stadtverwaltung Ingelfingen', 'Schlostr. 12','74653', 'Ingelfingen', '07940 1309-0', 'http://www.ingelfingen.de', 'info@ingelfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Krautheim', 'Stadtverwaltung Krautheim', 'Burgweg 5','74238', 'Krautheim', '06294 98-0', 'http://www.krautheim.de', 'andreas.koehler@krautheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Knzelsau', 'Stadtverwaltung Knzelsau', 'Stuttgarter Str. 7','74653', 'Knzelsau', '07940 129-0', 'http://www.kuenzelsau.de', 'info@kuenzelsau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kupferzell', 'Gemeindeverwaltung Kupferzell', 'Am Marktplatz 14 -16','74635', 'Kupferzell', '07944 9111-0', 'http://www.kupferzell.de', 'rathaus@kupferzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mulfingen', 'Gemeindeverwaltung Mulfingen', 'Kirchweg 1','74673', 'Mulfingen', '07938 9040-0', 'http://www.mulfingen.de', 'info@mulfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neuenstein', 'Stadtverwaltung Neuenstein', 'Schlostr. 20','74632', 'Neuenstein', '07942 105-0', 'http://www.neuenstein.de', 'km.Nicklas@neuenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Niedernhall', 'Stadtverwaltung Niedernhall', 'Hauptstr. 30','74676', 'Niedernhall', '07940 9125-0', 'http://www.niedernhall.de', 'info@niedernhall.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'hringen', 'Stadtverwaltung hringen', 'Marktplatz 15','74613', 'hringen', '07941 68-0', 'http://www.oehringen.de', 'info@oehringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfedelbach', 'Gemeindeverwaltung Pfedelbach', 'Hauptstr. 17','74629', 'Pfedelbach', '07941 6081-0', 'http://www.pfedelbach.de', 'Torsten.Kunkel@pfedelbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schntal', 'Gemeindeverwaltung Schntal', 'Klosterhof 1','74214', 'Schntal', '07943 9100-0', 'http://www.schoental.de', 'info@schoental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waldenburg', 'Stadtverwaltung Waldenburg', 'Hauptstr. 13','74638', 'Waldenburg', '07942 108-0', 'http://www.waldenburg-hohenlohe.de', 'markus.knobel@waldenburg-hohenlohe.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weibach', 'Gemeindeverwaltung Weibach', 'Niedernhaller Str. 5','74679', 'Weibach', '07947 9126-0', 'http://www.gemeinde-weissbach.de', 'Rainer.Zuefle@gemeinde-weissbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zweiflingen', 'Gemeindeverwaltung Zweiflingen', 'Eichacher Str. 17','74639', 'Zweiflingen', '07948 9419-0', 'http://www.zweiflingen.de', 'gross@gemeinde-zweiflingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Blaufelden', 'Gemeindeverwaltung Blaufelden', 'Hindenburgplatz 4','74572', 'Blaufelden', '07953 884-0', 'http://www.blaufelden.de', 'zentralerposteingang@blaufelden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Braunsbach', 'Gemeindeverwaltung Braunsbach', 'Geislinger Str. 11','74542', 'Braunsbach', '07906 94094-0', 'http://www.braunsbach.de', 'info@braunsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bhlertann', 'Gemeindeverwaltung Bhlertann', 'Hauptstr.12','74424', 'Bhlertann', '07973 9696-0', 'http://www.buehlertann.de', 'gemeinde@buehlertann.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bhlerzell', 'Gemeindeverwaltung Bhlerzell', 'Heilberger Str. 4','74426', 'Bhlerzell', '07974 9390-0', 'http://www.buehlerzell.de', 'thomas.botschek@buehlerzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Crailsheim', 'Stadtverwaltung Crailsheim', 'Marktplatz 1-2','74564', 'Crailsheim', '07951 403-0', 'http://www.crailsheim.de', 'info@crailsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fichtenberg', 'Gemeindeverwaltung Fichtenberg', 'Rathausstr. 13','74427', 'Fichtenberg', '07971 9555-0', 'http://www.fichtenberg.de', 'fichtenberg@fichtenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gaildorf', 'Stadtverwaltung Gaildorf', 'Schlostr. 20','74405', 'Gaildorf', '07971 253-0', 'http://www.gaildorf.de', 'stadt@gaildorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gerabronn', 'Stadtverwaltung Gerabronn', 'Blaufeldener Str. 14','74582', 'Gerabronn', '07952 604-0', 'http://www.gerabronn.de', 'klaus-dieter.schumm@gerabronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ilshofen', 'Stadtverwaltung Ilshofen', 'Haller Str. 1','74532', 'Ilshofen', '07904 702-0', 'http://www.ilshofen.de', 'info@ilshofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kirchberg an der Jagst', 'Stadtverwaltung Kirchberg an der Jagst', 'Schlostr. 10','74592', 'Kirchberg an der Jagst', '07954 9801-0', 'http://www.kirchberg-jagst.de', 'info@kirchberg-jagst.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Langenburg', 'Stadtverwaltung Langenburg', 'Hauptstr. 15','74595', 'Langenburg', '07905 9102-0', 'http://www.langenburg.de', 'post@langenburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mainhardt', 'Gemeindeverwaltung Mainhardt', 'Hauptstr. 1','74535', 'Mainhardt', '07903 9150-0', 'http://www.mainhardt.de', 'rathaus@mainhardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Michelbach an der Bilz', 'Gemeindeverwaltung Michelbach an der Bilz', 'Hirschfelder Str. 13','74544', 'Michelbach an der Bilz', '0791 93210-0', 'http://www.michelbach-bilz.de', 'info@michelbach-bilz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Michelfeld', 'Gemeindeverwaltung Michelfeld', 'Haller Str. 35','74545', 'Michelfeld', '0791 97071-0', 'http://www.michelfeld.de', 'Wolfgang.Binnig@michelfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberrot', 'Gemeindeverwaltung Oberrot', 'Rottalstr. 44','74420', 'Oberrot', '07977 74-0', 'http://www.oberrot.de', 'info@oberrot.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obersontheim', 'Gemeindeverwaltung Obersontheim', 'Rathausplatz 1','74423', 'Obersontheim', '07973 696-0', 'http://www.obersontheim.de', 'info@obersontheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rot am See', 'Gemeindeverwaltung Rot am See', 'Raiffeisenstr. 1','74585', 'Rot am See', '07955 381-0', 'http://www.rotamsee.de', 'siegfried.groener@rotamsee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Satteldorf', 'Gemeindeverwaltung Satteldorf', 'Satteldorfer Hauptstr. 50','74589', 'Satteldorf', '07951 4700-0', 'http://www.satteldorf.de', 'gemeinde@satteldorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schrozberg', 'Stadtverwaltung Schrozberg', 'Krailshausener Str. 15','74575', 'Schrozberg', '07935 707-0', 'http://www.stadt-schrozberg.de', 'info@schrozberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schwbisch Hall', 'Stadtverwaltung Schwbisch Hall', 'Am Markt 6','74523', 'Schwbisch Hall', '0791 751-0', 'http://www.schwaebischhall.de', 'hermann-josef.pelgrim@schwaebischhall.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sulzbach-Laufen', 'Gemeindeverwaltung Sulzbach-Laufen', 'Eisbachstrae 24','74429', 'Sulzbach-Laufen', '07976 91075-0', 'http://www.sulzbach-laufen.de', 'Markus.Bock@sulzbach-laufen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Untermnkheim', 'Gemeindeverwaltung Untermnkheim', 'Hohenloher Str. 33','74547', 'Untermnkheim', '0791 97087-0', 'http://www.untermuenkheim.de', 'rathaus@untermuenkheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Vellberg', 'Stadtverwaltung Vellberg', 'Im Stdtle 28','74541', 'Vellberg', '07907 877-0', 'http://www.vellberg.de', 'stadt@vellberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wallhausen', 'Gemeindeverwaltung Wallhausen', 'Seestr. 2','74599', 'Wallhausen', '07955 9381-0', 'http://www.gemeinde-wallhausen.de', 'info@gemeinde-wallhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wolpertshausen', 'Gemeindeverwaltung Wolpertshausen', 'Haller Str. 15','74549', 'Wolpertshausen', '07904 9799-0', 'http://www.wolpertshausen.de', 'juergen.silberzahn@wolpertshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rosengarten', 'Gemeindeverwaltung Rosengarten', 'Hauptstr. 39','74538', 'Rosengarten', '0791 95017-0', 'http://www.rosengarten.de', 'gemeinde-j.koenig@rosengarten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kreberg', 'Gemeindeverwaltung Kreberg', 'Untere Hirtenstr. 34','74594', 'Kreberg', '07957 9880-10', 'http://www.kressberg.de', 'gemeindeverwaltung@kressberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fichtenau', 'Gemeindeverwaltung Fichtenau', 'Hauptstr. 2','74579', 'Fichtenau', '07962 892-0', 'http://www.fichtenau.de', 'info@fichtenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Frankenhardt', 'Gemeindeverwaltung Frankenhardt', 'Crailsheimer Str. 3','74586', 'Frankenhardt', '07959 9105-0', 'http://www.frankenhardt.de', 'schmidt@frankenhardt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Stimpfach', 'Gemeindeverwaltung Stimpfach', 'Kirchstr. 22','74597', 'Stimpfach', '07967 9001-0', 'http://www.stimpfach.de', 'gemeinde@stimpfach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Assamstadt', 'Gemeindeverwaltung Assamstadt', 'Bobstadter Str. 1','97959', 'Assamstadt', '06294 42020', 'http://www.assamstadt.de', 'post@assamstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Mergentheim', 'Stadtverwaltung Bad Mergentheim', 'Bahnhofplatz 1','97980', 'Bad Mergentheim', '07931 57-0', 'http://www.bad-mergentheim.de', 'oberbuergermeister@bad-mergentheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Boxberg', 'Stadtverwaltung Boxberg', 'Kurpfalzstr. 29','97944', 'Boxberg', '07930 605-0', 'http://www.boxberg.de', 'christian.kremer@stadt-boxberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Creglingen', 'Stadtverwaltung Creglingen', 'Torstr. 2','97993', 'Creglingen', '07933 701-0', 'http://www.creglingen.de', 'info@creglingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Freudenberg', 'Stadtverwaltung Freudenberg', 'Hauptstr. 152','97896', 'Freudenberg', '09375 9200-0', 'http://www.freudenberg-main.de', 'Roger.Henning@freudenberg-main.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grorinderfeld', 'Gemeindeverwaltung Grorinderfeld', 'Marktplatz 6','97950', 'Grorinderfeld', '09349 9201-0', 'http://www.grossrinderfeld.de', 'anette.schmidt@grossrinderfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Grnsfeld', 'Stadtverwaltung Grnsfeld', 'Hauptstr. 12','97947', 'Grnsfeld', '09346 9211-0', 'http://www.gruensfeld.de', 'zentrale@gruensfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Igersheim', 'Gemeindeverwaltung Igersheim', 'Mhlerplatz 9','97999', 'Igersheim', '07931/497-12', 'http://www.igersheim.de', 'info@igersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigheim', 'Gemeindeverwaltung Knigheim', 'Kirchplatz 2','97953', 'Knigheim', '09341 9209-0', 'http://www.koenigheim.de', 'gemeinde@koenigheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Klsheim', 'Stadtverwaltung Klsheim', 'Kirchbergweg 7','97900', 'Klsheim', '09345 673-0', 'http://www.kuelsheim.de', 'rathaus@kuelsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Niederstetten', 'Stadtverwaltung Niederstetten', 'Albert-Sammt-Str. 1','97996', 'Niederstetten', '07932 9102-0', 'http://www.niederstetten.de', 'Heike.Naber@niederstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Tauberbischofsheim', 'Stadtverwaltung Tauberbischofsheim', 'Marktplatz 8','97941', 'Tauberbischofsheim', '09341 803-0', 'http://www.tauberbischofsheim.de', 'Wolfgang.Vockel@tauberbischofsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weikersheim', 'Stadtverwaltung Weikersheim', 'Marktplatz 7','97990', 'Weikersheim', '07934 102-0', 'http://www.weikersheim.de', 'info@weikersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Werbach', 'Gemeindeverwaltung Werbach', 'Hauptstr. 59','97956', 'Werbach', '09341 9208-0', 'http://www.werbach.de', 'info@werbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wertheim', 'Stadtverwaltung Wertheim', 'Mhlenstr. 26','97877', 'Wertheim', '09342 301-0', 'http://www.wertheim.de', 'stadtverwaltung@wertheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wittighausen', 'Gemeindeverwaltung Wittighausen', 'Knigstr. 17','97957', 'Wittighausen', '09347 9209-14', 'http://www.wittighausen.de', 'b.henneberger@wittighausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ahorn', 'Gemeindeverwaltung Ahorn', 'Schlostr. 24','74744', 'Ahorn', '06296 9202-0', 'http://www.gemeindeahorn.de', 'info@GemeindeAhorn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lauda-Knigshofen', 'Stadtverwaltung Lauda-Knigshofen', 'Marktplatz 1','97922', 'Lauda-Knigshofen', '09343 501-0', 'http://www.lauda-koenigshofen.de', 'post@lauda-koenigshofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dischingen', 'Gemeindeverwaltung Dischingen', 'Marktplatz 9','89561', 'Dischingen', '07327 81-0', 'http://www.dischingen.de', 'rathaus@dischingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gerstetten', 'Gemeindeverwaltung Gerstetten', 'Wilhelmstr. 31','89547', 'Gerstetten', '07323 84-0', 'http://www.gerstetten.de', 'rathaus@gerstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Giengen an der Brenz', 'Stadtverwaltung Giengen an der Brenz', 'Marktstr. 11','89537', 'Giengen an der Brenz', '07322 952-0', 'http://www.giengen.de', 'stadtverwaltung@giengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heidenheim an der Brenz', 'Stadtverwaltung Heidenheim an der Brenz', 'Grabenstr. 15','89522', 'Heidenheim an der Brenz', '07321 327-0', 'http://www.heidenheim.de', 'rathaus@heidenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Herbrechtingen', 'Stadtverwaltung Herbrechtingen', 'Lange Str. 58','89542', 'Herbrechtingen', '07324 955-0', 'http://www.herbrechtingen.de', 'info@herbrechtingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hermaringen', 'Gemeindeverwaltung Hermaringen', 'Karlstr. 12','89568', 'Hermaringen', '07322 9547-0', 'http://www.hermaringen.de', 'info@hermaringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigsbronn', 'Gemeindeverwaltung Knigsbronn', 'Herwartstr. 2','89551', 'Knigsbronn', '07328 9625-0', 'http://www.koenigsbronn.de', 'rathaus@koenigsbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nattheim', 'Gemeindeverwaltung Nattheim', 'Fleinheimer Str. 2','89564', 'Nattheim', '07321 9784-0', 'http://www.nattheim.de', 'Norbert.Bereska@nattheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Niederstotzingen', 'Stadtverwaltung Niederstotzingen', 'Im Stdtle 26','89168', 'Niederstotzingen', '07325 102-0', 'http://www.niederstotzingen.de', 'info@niederstotzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sontheim an der Brenz', 'Gemeindeverwaltung Sontheim an der Brenz', 'Brenzer Str. 25','89567', 'Sontheim an der Brenz', '07325 17-0', 'http://www.sontheim-brenz.de', 's.bm@sontheim-an-der-Brenz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinheim am Albuch', 'Gemeindeverwaltung Steinheim am Albuch', 'Hauptstr. 24','89555', 'Steinheim am Albuch', '07329 9606-0', 'http://www.steinheim-am-albuch.de', 'info@steinheim-am-albuch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Abtsgmnd', 'Gemeindeverwaltung Abtsgmnd', 'Rathausplatz 1','73453', 'Abtsgmnd', '07366 82-0', 'http://www.abtsgmuend.de', 'info@abtsgmuend.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Adelmannsfelden', 'Gemeindeverwaltung Adelmannsfelden', 'Hauptstr. 71','73486', 'Adelmannsfelden', '07963 9000-0', 'http://www.adelmannsfelden.de', 'hahn@adelmannsfelden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bartholom', 'Gemeindeverwaltung Bartholom', 'Beckengasse 14','73566', 'Bartholom', '07173 97820-0', 'http://www.bartholomae.de', 'info@bartholomae.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bbingen an der Rems', 'Gemeindeverwaltung Bbingen an der Rems', 'Rmerstr. 2','73560', 'Bbingen an der Rems', '07173 18560-0', 'http://www.boebingen.de', 'rathaus@boebingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bopfingen', 'Stadtverwaltung Bopfingen', 'Marktplatz 1','73441', 'Bopfingen', '07362 801-10', 'http://www.bopfingen.de', 'G.Buehler@bopfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Durlangen', 'Gemeindeverwaltung Durlangen', 'Hermann-Lns-Weg 5','73568', 'Durlangen', '07176 4527-0', 'http://www.durlangen.de', 'gemeinde_durlangen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ellenberg', 'Gemeindeverwaltung Ellenberg', 'Hauptstr. 25','73488', 'Ellenberg', '07962 9030-0', 'http://www.ellenberg.de', 'gemeinde@ellenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung ', 'Ellwangen (Jagst)', 'Stadtverwaltung Ellwangen (Jagst)', 'Spitalstr.4','73479', 'Ellwangen (Jagst)', '07961 84-0', 'www.ellwangen.de', 'info@ellwangen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eschach', 'Gemeindeverwaltung Eschach', 'Rathausplatz 1','73569', 'Eschach', '07175 / 92370-0', 'http://www.eschach.de/', 'Rathaus@Eschach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Essingen', 'Gemeindeverwaltung Essingen', 'Rathausgasse 9','73457', 'Essingen', '07365 83-0', 'http://www.essingen.de', 'info@essingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gggingen', 'Gemeindeverwaltung Gggingen', 'Hauptstr. 46','73571', 'Gggingen', '07175 5762', 'http://www.gemeinde-goeggingen.de', 'walter.weber@gemeinde-goeggingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gschwend', 'Gemeindeverwaltung Gschwend', 'Gmnder Str. 2','74417', 'Gschwend', '07972 681-0', 'http://www.gschwend.de/', 'info@gschwend.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heubach', 'Stadtverwaltung Heubach', 'Hauptstr. 53','73540', 'Heubach', '07173 181-0', 'http://www.heubach.de', 'info@heubach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heuchlingen', 'Gemeindeverwaltung Heuchlingen', 'Kferstr. 3','73572', 'Heuchlingen', '07174 8209-0', 'http://www.heuchlingen.de', 'info@heuchlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Httlingen', 'Gemeindeverwaltung Httlingen', 'Schulstr. 10','73460', 'Httlingen', '07361 9778-0', 'http://www.huettlingen.de', 'gemeinde@huettlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Iggingen', 'Gemeindeverwaltung Iggingen', 'Marktplatz 6','73574', 'Iggingen', '07175 9208-0', 'http://www.iggingen.de', 'Klemens.Stoeckle@iggingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Jagstzell', 'Gemeindeverwaltung Jagstzell', 'Hauptstr. 6','73489', 'Jagstzell', '07967 9060-0', 'http://www.jagstzell.de', 'Raimund.Mueller@jagstzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchheim am Ries', 'Gemeindeverwaltung Kirchheim am Ries', 'Auf dem Wrt 7','73467', 'Kirchheim am Ries', '07362 95690-0', 'http://www.kirchheim-am-ries.de', 'info@kirchheim-am-ries.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lauchheim', 'Stadtverwaltung Lauchheim', 'Hauptstr. 28','73466', 'Lauchheim', '07363 85-0', 'http://www.lauchheim.de', 'info@lauchheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Leinzell', 'Gemeindeverwaltung Leinzell', 'Mulfingerstr. 2','73575', 'Leinzell', '07175 99820-0', 'http://www.leinzell.de', 'info@leinzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lorch', 'Stadtverwaltung Lorch', 'Hauptstr. 19','73547', 'Lorch', '07172 1801-0', 'http://www.stadt-lorch.de', 'buehler@stadt-lorch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mgglingen', 'Gemeindeverwaltung Mgglingen', 'Zehnthof 1','73563', 'Mgglingen', '07174 89900-0', 'http://www.moegglingen.de', 'info@moegglingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mutlangen', 'Gemeindeverwaltung Mutlangen', 'Hauptstr. 22','73557', 'Mutlangen', '07171 703-0', 'http://www.mutlangen.de', 'info@mutlangen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neresheim', 'Stadtverwaltung Neresheim', 'Hauptstr. 20','73450', 'Neresheim', '07326 81-0', 'http://www.neresheim.de', 'info@neresheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuler', 'Gemeindeverwaltung Neuler', 'Hauptstr. 15','73491', 'Neuler', '07961 9044-0', 'http://www.neuler.de', 'gemeinde@neuler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obergrningen', 'Gemeindeverwaltung Obergrningen', 'Rathausplatz 1','73569', 'Obergrningen', '07975 281', 'http://www.eschach.de', 'rathaus@eschach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Oberkochen', 'Stadtverwaltung Oberkochen', 'Eugen-Bolz-Platz 1','73447', 'Oberkochen', '07364 27-21', 'http://www.oberkochen.de', 'Peter.Traub@oberkochen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rosenberg', 'Gemeindeverwaltung Rosenberg', 'Hallerstr. 15','73494', 'Rosenberg', '07967 9000-0', 'http://www.gemeinde-rosenberg.de', 'info@gemeinde-rosenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ruppertshofen', 'Gemeindeverwaltung Ruppertshofen', 'Erlenstr. 1','73577', 'Ruppertshofen', '07176 6573', 'http://www.ruppertshofen.de', 'info@ruppertshofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schechingen', 'Gemeindeverwaltung Schechingen', 'Marktplatz 1','73579', 'Schechingen', '07175 1567', 'http://www.schechingen.de/', 'info@schechingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schwbisch Gmnd', 'Stadtverwaltung Schwbisch Gmnd', 'Marktplatz 1','73525', 'Schwbisch Gmnd', '07171 603-0', 'http://www.schwaebisch-gmuend.de', 'stadtverwaltung@schwaebisch-gmuend.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Spraitbach', 'Gemeindeverwaltung Spraitbach', 'Kirchplatz 1','73565', 'Spraitbach', '07176 6563-0', 'http://www.spraitbach.de', 'info@spraitbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Stdtlen', 'Gemeindeverwaltung Stdtlen', 'Rathausstr. 11','73495', 'Stdtlen', '07964 9009-0', 'http://www.stoedtlen.de', 'info@stoedtlen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tferrot', 'Gemeindeverwaltung Tferrot', 'Durlanger Str. 2','73527', 'Tferrot', '07175 221', 'http://www.taeferrot.de', 'info@taeferrot.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tannhausen', 'Gemeindeverwaltung Tannhausen', 'Hauptstr. 54','73497', 'Tannhausen', '07964 9000-0', 'http://www.tannhausen.de', 'gemeinde@tannhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterschneidheim', 'Gemeindeverwaltung Unterschneidheim', 'Mhlweg 5','73485', 'Unterschneidheim', '07966 181-0', 'http://www.unterschneidheim.de', 'info@unterschneidheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Waldstetten', 'Gemeindeverwaltung Waldstetten', 'Hauptstr. 1','73550', 'Waldstetten', '07171 403-0', 'http://www.waldstetten.de', 'Michael.Rembold@waldstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Westhausen', 'Gemeindeverwaltung Westhausen', 'Jahnstr. 2','73463', 'Westhausen', '07363 84-0', 'http://www.westhausen.de', 'info@westhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wrt', 'Gemeindeverwaltung Wrt', 'Hauptstr. 104','73499', 'Wrt', '07964 90080', 'http://www.gemeinde-woert.de', 'info@gemeinde-woert.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Riesbrg', 'Gemeindeverwaltung Riesbrg', 'Hauptstr. 13','73469', 'Riesbrg', '09081 2935-0', 'http://www.riesbuerg.de', 'neumeister@riesbuerg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Aalen', 'Stadtverwaltung Aalen', 'Marktplatz 30','73430', 'Aalen', '07361 52-1100', 'http://www.aalen.de', 'ob-buero@aalen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rainau', 'Gemeindeverwaltung Rainau', 'Schloberg 12','73492', 'Rainau', '07961 9002-0', 'http://www.rainau.de', 'info@rainau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Freiburg im Breisgau', 'Stadtverwaltung Freiburg im Breisgau', 'Rathausplatz 2-4','79098', 'Freiburg im Breisgau', '0761 201-0', 'http://www.freiburg.de', 'rathausinformation@stadt.freiburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Au', 'Gemeindeverwaltung Au', 'Dorfstr. 25','79280', 'Au', '0761 401399-0', 'http://www.au-hexental.de', 'gemeinde@au-hexental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Auggen', 'Gemeindeverwaltung Auggen', 'Hauptstr. 28','79424', 'Auggen', '07631 3677-0', 'http://www.auggen.de', 'hauptamt@auggen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Krozingen', 'Stadtverwaltung Bad Krozingen', 'Basler Str. 30','79189', 'Bad Krozingen', '07633 407-0', 'http://www.bad-krozingen.de', 'stadt@bad-krozingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Badenweiler', 'Gemeindeverwaltung Badenweiler', 'Luisenstr. 5','79410', 'Badenweiler', '07632 72-0', 'http://www.gemeinde-badenweiler.de', 'rathaus@gemeinde-badenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ballrechten-Dottingen', 'Gemeindeverwaltung Ballrechten-Dottingen', 'Alfred-Lffler-Str. 1','79282', 'Ballrechten-Dottingen', '07634 5617-14', 'http://www.ballrechten-dottingen.de', 'gemeinde@ballrechten-dottingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Btzingen', 'Gemeindeverwaltung Btzingen', 'Hauptstr. 11','79268', 'Btzingen', '07663 9310-0', 'http://www.boetzingen.de', 'gemeinde@boetzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bollschweil', 'Gemeindeverwaltung Bollschweil', 'Hexentalstr. 56','79283', 'Bollschweil', '07633 9510-0', 'http://www.bollschweil.de', 'gemeinde@bollschweil.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Breisach am Rhein', 'Stadtverwaltung Breisach am Rhein', 'Mnsterplatz 1','79206', 'Breisach am Rhein', '07667 832-0', 'http://www.breisach.de', 'info@breisach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Breitnau', 'Gemeindeverwaltung Breitnau', 'Dorfstr. 11','79874', 'Breitnau', '07652 9109-0', 'http://www.breitnau.de', 'gemeinde@breitnau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Buchenbach', 'Gemeindeverwaltung Buchenbach', 'Hauptstr. 20','79256', 'Buchenbach', '07661 3965-0', 'http://www.buchenbach.de', 'gemeinde@Buchenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Buggingen', 'Gemeindeverwaltung Buggingen', 'Hauptstr. 31','79426', 'Buggingen', '07631 1803-0', 'http://www.buggingen.de', 'gemeinde@buggingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ebringen', 'Gemeindeverwaltung Ebringen', 'Schloplatz 1','79285', 'Ebringen', '07664 5058-0', 'http://www.ebringen.de', 'mosbach@ebringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eichstetten am Kaiserstuhl', 'Gemeindeverwaltung Eichstetten am Kaiserstuhl', 'Hauptstr. 43','79356', 'Eichstetten am Kaiserstuhl', '07663 9323-13', 'http://www.eichstetten.de', 'bruder@eichstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eisenbach (Hochschwarzwald)', 'Gemeindeverwaltung Eisenbach (Hochschwarzwald)', 'Bei der Kirche 1','79871', 'Eisenbach (Hochschwarzwald)', '07657 9103-0', 'http://www.eisenbach.de', 'info@eisenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eschbach', 'Gemeindeverwaltung Eschbach', 'Hauptstr. 24','79427', 'Eschbach', '07634 5504-0', 'http://www.gemeinde-eschbach.de', 'info@gemeinde-eschbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Feldberg (Schwarzwald)', 'Gemeindeverwaltung Feldberg (Schwarzwald)', 'Kirchgasse 1','79868', 'Feldberg (Schwarzwald)', '07655 801-0', 'http://www.feldberg-schwarzwald.de', 'tourist-info@feldberg-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Friedenweiler', 'Gemeindeverwaltung Friedenweiler', 'Hauptstr. 24','79877', 'Friedenweiler', '07654 9119-0', 'http://www.friedenweiler.de', 'gemeinde@friedenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Glottertal', 'Gemeindeverwaltung Glottertal', 'Talstr. 45','79286', 'Glottertal', '07684 9102-0', 'http://www.glottertal.de', 'rathaus@glottertal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gottenheim', 'Gemeindeverwaltung Gottenheim', 'Hauptstr. 25','79288', 'Gottenheim', '07665 9811-0', 'http://www.gottenheim.de', 'gemeinde@gottenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gundelfingen', 'Gemeindeverwaltung Gundelfingen', 'Alte Bundesstr. 31','79194', 'Gundelfingen', '0761 5911-0', 'http://www.gundelfingen.de', 'gemeinde@gundelfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hartheim am Rhein', 'Gemeindeverwaltung Hartheim am Rhein', 'Feldkircher Str. 17','79258', 'Hartheim am Rhein', '07633 9105-0', 'http://www.hartheim.de', 'gemeinde@hartheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Heitersheim', 'Stadtverwaltung Heitersheim', 'Hauptstr. 9','79423', 'Heitersheim', '07634 402-0', 'http://www.heitersheim.de', 'stadt-heitersheim@heitersheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heuweiler', 'Gemeindeverwaltung Heuweiler', 'Dorfstr. 21','79194', 'Heuweiler', '07666 2280', 'http://www.heuweiler.de', 'rathaus@heuweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hinterzarten', 'Gemeindeverwaltung Hinterzarten', 'Rathausstr. 12','79856', 'Hinterzarten', '07652 9197-0', 'http://www.hinterzarten.de', 'gemeinde@hinterzarten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Horben', 'Gemeindeverwaltung Horben', 'Dorfstr. 2','79289', 'Horben', '0761 211698-0', 'http://www.horben.de', 'gemeinde@horben.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ihringen', 'Gemeindeverwaltung Ihringen', 'Bachenstr. 42','79241', 'Ihringen', '07668 7108-0', 'http://www.ihringen.de', 'gemeinde@ihringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchzarten', 'Gemeindeverwaltung Kirchzarten', 'Talvogteistr. 12','79199', 'Kirchzarten', '07661 393-0', 'http://www.kirchzarten.de', 'gemeinde@kirchzarten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lenzkirch', 'Gemeindeverwaltung Lenzkirch', 'Kirchplatz 1','79853', 'Lenzkirch', '07653 684-0', 'http://www.lenzkirch.de', 'a.graf@lenzkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lffingen', 'Stadtverwaltung Lffingen', 'Rathausplatz 1','79843', 'Lffingen', '07654 802-0', 'http://www.loeffingen.de', 'info@loeffingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Merdingen', 'Gemeindeverwaltung Merdingen', 'Kirchgasse 2','79291', 'Merdingen', '07668 9094-0', 'http://www.merdingen.de', 'gemeinde@merdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Merzhausen', 'Gemeindeverwaltung Merzhausen', 'Friedhofweg 11','79249', 'Merzhausen', '0761 4016168', 'http://www.merzhausen.de', 'gemeinde@merzhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mllheim', 'Stadtverwaltung Mllheim', 'Bismarckstr. 3','79379', 'Mllheim', '07631 801-103', 'http://www.muellheim.de', 'buergermeisterin@muellheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Neuenburg am Rhein', 'Stadtverwaltung Neuenburg am Rhein', 'Rathausplatz 5','79395', 'Neuenburg am Rhein', '07631 791-0', 'http://www.neuenburg.de', 'stadtverwaltung@neuenburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberried', 'Gemeindeverwaltung Oberried', 'Klosterplatz 4','79254', 'Oberried', '07661 9305-0', 'http://www.oberried.de', 'buergermeister@oberried.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfaffenweiler', 'Gemeindeverwaltung Pfaffenweiler', 'Rathausgasse 4','79292', 'Pfaffenweiler', '07664 9700-0', 'http://www.pfaffenweiler.de', 'rathaus@pfaffenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'St. Mrgen', 'Gemeindeverwaltung St. Mrgen', 'Rathausplatz 6','79274', 'St. Mrgen', '07669 9118-0', 'http://www.st-maergen.de', 'rathaus@st-maergen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'St. Peter', 'Gemeindeverwaltung St. Peter', 'Klosterhof 12','79271', 'St. Peter', '07660 9102-0', 'http://www.st-peter-schwarzwald.de', 'gemeinde@st-peter.eu'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schallstadt', 'Gemeindeverwaltung Schallstadt', 'Kirchstr. 16','79227', 'Schallstadt', '07664 6109-0', 'http://www.schallstadt.de', 'rathaus@schallstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schluchsee', 'Gemeindeverwaltung Schluchsee', 'Fischbacher Str. 7','79859', 'Schluchsee', '07656 77-0', 'http://www.schluchsee.de', 'info@schluchsee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Slden', 'Gemeindeverwaltung Slden', 'Staufener Str. 4','79294', 'Slden', '0761 13780-0', 'http://www.soelden.de', 'gemeinde@soelden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Staufen im Breisgau', 'Stadtverwaltung Staufen im Breisgau', 'Hauptstr. 53','79219', 'Staufen im Breisgau', '07633 805-0', 'http://www.staufen.de', 'zentrale@staufen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Stegen', 'Gemeindeverwaltung Stegen', 'Dorfplatz 1','79252', 'Stegen', '07661 3969-0', 'http://www.dreisamtal.de/Stegen.htm', 'gemeinde@stegen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sulzburg', 'Stadtverwaltung Sulzburg', 'Hauptstr. 60','79295', 'Sulzburg', '07634 5600-0', 'http://www.sulzburg.de', 'stadt@sulzburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Titisee-Neustadt', 'Stadtverwaltung Titisee-Neustadt', 'Pfauenstr. 2-4','79822', 'Titisee-Neustadt', '07651 206-0', 'http://www.titisee-neustadt.de', 'stadt@titisee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Umkirch', 'Gemeindeverwaltung Umkirch', 'Vinzenz-Kremp-Weg 1','79224', 'Umkirch', '07665 505-0', 'http://www.umkirch.de', 'w.laub@umkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wittnau', 'Gemeindeverwaltung Wittnau', 'Kirchweg 2','79299', 'Wittnau', '0761 456479-0', 'http://www.wittnau.de', 'gemeinde@wittnau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mnstertal/Schwarzwald', 'Gemeindeverwaltung Mnstertal/Schwarzwald', 'Wasen 47','79244', 'Mnstertal/Schwarzwald', '07636 707-0', 'http://www.muenstertal.de', 'gemeinde@muenstertal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ehrenkirchen', 'Gemeindeverwaltung Ehrenkirchen', 'Jengerstr. 6','79238', 'Ehrenkirchen', '07633 804-0', 'http://www.ehrenkirchen.de', 'gemeinde@ehrenkirchen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'March', 'Gemeindeverwaltung March', 'Am Felsenkeller 2','79232', 'March', '07665 422-0', 'http://www.march.de', 'gemeinde@march.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Vogtsburg im Kaiserstuhl', 'Stadtverwaltung Vogtsburg im Kaiserstuhl', 'Bahnhofstr. 20','79235', 'Vogtsburg im Kaiserstuhl', '07662 812-0', 'http://www.vogtsburg.de', 'rathaus@vogtsburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bahlingen am Kaiserstuhl', 'Gemeindeverwaltung Bahlingen am Kaiserstuhl', 'Webergssle 2','79353', 'Bahlingen am Kaiserstuhl', '07663 9331-0', 'http://www.bahlingen.de', 'lotis@bahlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Biederbach', 'Gemeindeverwaltung Biederbach', 'Dorfstr. 18','79215', 'Biederbach', '07682 9116-0', 'http://www.biederbach.de', 'gemeinde@biederbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Denzlingen', 'Gemeindeverwaltung Denzlingen', 'Hauptstr. 110','79211', 'Denzlingen', '07666 611-0', 'http://www.denzlingen.de', 'gemeinde@denzlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Elzach', 'Stadtverwaltung Elzach', 'Hauptstr. 69','79215', 'Elzach', '07682 804-0', 'http://www.elzach.de', 'roland.tibi@elzach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Emmendingen', 'Stadtverwaltung Emmendingen', 'Landvogtei 10','79312', 'Emmendingen', '07641 452-0', 'http://www.emmendingen.de', 'stadt@emmendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Endingen am Kaiserstuhl', 'Stadtverwaltung Endingen am Kaiserstuhl', 'Marktplatz 6','79346', 'Endingen am Kaiserstuhl', '07642 6899-0', 'http://www.endingen.de', 'info@endingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Forchheim', 'Gemeindeverwaltung Forchheim', 'Herrenstr. 35','79362', 'Forchheim', '07642 8043', 'http://www.forchheim-am-kaiserstuhl.de', 'rathaus@forchheim-am-kaiserstuhl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gutach im Breisgau', 'Gemeindeverwaltung Gutach im Breisgau', 'Dorfstr. 33','79261', 'Gutach im Breisgau', '07685 9101-0', 'http://www.gutach.de', 'gemeinde@gutach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Herbolzheim', 'Stadtverwaltung Herbolzheim', 'Hauptstr. 26','79336', 'Herbolzheim', '07643 9177-0', 'http://www.herbolzheim.de', 'info@stadt-herbolzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kenzingen', 'Stadtverwaltung Kenzingen', 'Hauptstr. 15','79341', 'Kenzingen', '07644 900-0', 'http://www.kenzingen.de', 'post@kenzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Malterdingen', 'Gemeindeverwaltung Malterdingen', 'Hauptstr. 18','79364', 'Malterdingen', '07644 9111-0', 'http://www.malterdingen.de', 'hauptamt@malterdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reute', 'Gemeindeverwaltung Reute', 'Hinter den Eichen 2','79276', 'Reute', '07641 9172-0', 'http://www.reute.de', 'gemeinde@reute.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Riegel am Kaiserstuhl', 'Gemeindeverwaltung Riegel am Kaiserstuhl', 'Hauptstr. 31','79359', 'Riegel am Kaiserstuhl', '07642 9044-0', 'http://www.gemeinde-riegel.de', 'bm@gemeinde-riegel.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sasbach am Kaiserstuhl', 'Gemeindeverwaltung Sasbach am Kaiserstuhl', 'Hauptstr. 15','79361', 'Sasbach am Kaiserstuhl', '07642 9101-0', 'http://www.sasbach-am-kaiserstuhl.de', 'bm-scheiding@sasbach.eu'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sexau', 'Gemeindeverwaltung Sexau', 'Dorfstr. 61','79350', 'Sexau', '07641 9268-0', 'http://www.sexau.de', 'rathaus@sexau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Simonswald', 'Gemeindeverwaltung Simonswald', 'Talstr. 12','79263', 'Simonswald', '07683 9101-0', 'http://www.simonswald.de', 'scheer@simonswald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Teningen', 'Gemeindeverwaltung Teningen', 'Riegeler Str. 12','79331', 'Teningen', '07641 5806-0', 'http://www.teningen.de', 'info@teningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Vrstetten', 'Gemeindeverwaltung Vrstetten', 'Kirchstr. 2','79279', 'Vrstetten', '07666 9400-0', 'http://www.voerstetten.de', 'gemeinde@voerstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weisweil', 'Gemeindeverwaltung Weisweil', 'Hinterdorfstr. 14','79367', 'Weisweil', '07646 9102-0', 'http://www.weisweil.de', 'rheingemeinde@weisweil.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wyhl am Kaiserstuhl', 'Gemeindeverwaltung Wyhl am Kaiserstuhl', 'Hauptstr. 9','79369', 'Wyhl am Kaiserstuhl', '07642 6894-0', 'http://www.wyhl.de', 'gemeinde@wyhl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rheinhausen', 'Gemeindeverwaltung Rheinhausen', 'Hauptstr. 95','79365', 'Rheinhausen', '07643 9107-0', 'http://www.rheinhausen.de', 'gemeinde@rheinhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Freiamt', 'Gemeindeverwaltung Freiamt', 'Sgplatz 1','79348', 'Freiamt', '07645 9102-0', 'http://www.freiamt.de', 'gemeinde@freiamt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Winden im Elztal', 'Gemeindeverwaltung Winden im Elztal', 'Bahnhofstr. 1','79297', 'Winden im Elztal', '07682 9236-0', 'http://www.winden-im-elztal.de', 'gemeinde@winden-im-elztal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waldkirch', 'Stadtverwaltung Waldkirch', 'Marktplatz 1-5','79183', 'Waldkirch', '07681 404-0', 'http://www.stadt-waldkirch.de', 'postkorb@stadt-waldkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Achern', 'Stadtverwaltung Achern', 'Illenauer Allee 73','77855', 'Achern', '07841 642-0', 'http://www.achern.de', 'stadtverwaltung@achern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Appenweier', 'Gemeindeverwaltung Appenweier', 'Ortenauer Str. 13','77767', 'Appenweier', '07805 9594-0', 'http://www.appenweier.de', 'gemeinde@appenweier.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Peterstal-Griesbach', 'Gemeindeverwaltung Bad Peterstal-Griesbach', 'Schwarzwaldstr. 11','77740', 'Bad Peterstal-Griesbach', '07806 79-0', 'http://www.bad-peterstal-griesbach.de', 'Gemeinde@bad-peterstal-griesbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Berghaupten', 'Gemeindeverwaltung Berghaupten', 'Rathausplatz 2','77791', 'Berghaupten', '07803 9677-0', 'http://www.berghaupten.de', 'gemeinde@berghaupten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Biberach', 'Gemeindeverwaltung Biberach', 'Hauptstr. 27','77781', 'Biberach', '07835 6365-0', 'http://www.biberach-baden.de', 'rathaus@biberach-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Durbach', 'Gemeindeverwaltung Durbach', 'Tal 5','77770', 'Durbach', '0781 483-0', 'http://www.durbach.de', 'rathaus@durbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ettenheim', 'Stadtverwaltung Ettenheim', 'Kirchstr. 4','77955', 'Ettenheim', '07822 432-0', 'http://www.ettenheim.de', 'stadtverwaltung@ettenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fischerbach', 'Gemeindeverwaltung Fischerbach', 'Hauptstr. 38','77716', 'Fischerbach', '07832 9190-0', 'http://www.fischerbach.de', 'gemeinde@fischerbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Friesenheim', 'Gemeindeverwaltung Friesenheim', 'Friesenheimer Hauptstr. 71/73','77948', 'Friesenheim', '07821 6337-0', 'http://www.friesenheim.de', 'rathaus@friesenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gengenbach', 'Stadtverwaltung Gengenbach', 'Hauptstrae 17','77723', 'Gengenbach', '07803 930-0', 'http://www.stadt-gengenbach.de', 'buergermeister@stadt-gengenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gutach (Schwarzwaldbahn)', 'Gemeindeverwaltung Gutach (Schwarzwaldbahn)', 'Hauptstr. 38','77793', 'Gutach (Schwarzwaldbahn)', '07833 9388-0', 'http://www.gutach-schwarzwald.de', 'gemeinde@gutach-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Haslach im Kinzigtal', 'Stadtverwaltung Haslach im Kinzigtal', 'Am Marktplatz 1','77716', 'Haslach im Kinzigtal', '07832 706-0', 'http://www.haslach.de', 'stadt@haslach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hausach', 'Stadtverwaltung Hausach', 'Hauptstr. 40','77756', 'Hausach', '07831 79-0', 'http://www.hausach.de', 'rathaus@hausach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hofstetten', 'Gemeindeverwaltung Hofstetten', 'Hauptstr. 5','77716', 'Hofstetten', '07832 9129-0', 'http://www.hofstetten.com', 'gemeinde@hofstetten.com'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohberg', 'Gemeindeverwaltung Hohberg', 'Freiburger Str. 30-32','77749', 'Hohberg', '07808 88-0', 'http://www.hohberg.de', 'rathaus@hohberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hornberg', 'Stadtverwaltung Hornberg', 'Bahnhofstr. 1-3','78132', 'Hornberg', '07833 793-0', 'http://www.hornberg.de', 'stadtverwaltung@hornberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kappelrodeck', 'Gemeindeverwaltung Kappelrodeck', 'Hauptstr. 65','77876', 'Kappelrodeck', '07842 802-0', 'http://www.kappelrodeck.de', 'gemeinde@kappelrodeck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kehl', 'Stadtverwaltung Kehl', 'Hauptstr. 85','77694', 'Kehl', '07851 88-0', 'http://www.kehl.de', 'info@stadt-kehl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kippenheim', 'Gemeindeverwaltung Kippenheim', 'Untere Hauptstr. 4','77971', 'Kippenheim', '07825 903-0', 'http://www.kippenheim.de', 'gemeinde@kippenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lahr/Schwarzwald', 'Stadtverwaltung Lahr/Schwarzwald', 'Rathausplatz 4','77933', 'Lahr/Schwarzwald', '07821 910-00', 'http://www.lahr.de', 'lahrinfo@lahr.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lautenbach', 'Gemeindeverwaltung Lautenbach', 'Hauptstr. 48','77794', 'Lautenbach', '07802 9259-0', 'http://www.lautenbach-renchtal.de', 'bm@lautenbach-renchtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lauf', 'Gemeindeverwaltung Lauf', 'Hauptstr. 70','77886', 'Lauf', '07841 2006-0', 'http://www.lauf-schwarzwald.de', 'gemeinde@lauf-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mahlberg', 'Stadtverwaltung Mahlberg', 'Rathausplatz 7','77972', 'Mahlberg', '07825 8438-0', 'http://www.mahlberg.de', 'stadt@mahlberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Meienheim', 'Gemeindeverwaltung Meienheim', 'Rathausstr. 10','77974', 'Meienheim', '07824 6468-0', 'http://www.meissenheim.de', 'gemeinde@meissenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mhlenbach', 'Gemeindeverwaltung Mhlenbach', 'Hauptstr. 24','77796', 'Mhlenbach', '07832 9118-0', 'http://www.muehlenbach.de', 'gemeinde@muehlenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nordrach', 'Gemeindeverwaltung Nordrach', 'Im Dorf 26','77787', 'Nordrach', '07838 9299-0', 'http://www.nordrach.de', 'c.erhardt@nordrach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberharmersbach', 'Gemeindeverwaltung Oberharmersbach', 'Dorf 30','77784', 'Oberharmersbach', '07837 9297-0', 'http://www.oberharmersbach.de', 'gemeinde@oberharmersbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Oberkirch', 'Stadtverwaltung Oberkirch', 'Eisenbahnstr. 1','77704', 'Oberkirch', '07802 82-0', 'http://www.oberkirch.de', 'stadt@oberkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberwolfach', 'Gemeindeverwaltung Oberwolfach', 'Rathausstr. 1','77709', 'Oberwolfach', '07834 8383-0', 'http://www.oberwolfach.de', 'buergermeister@oberwolfach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Offenburg', 'Stadtverwaltung Offenburg', 'Hauptstr. 90','77652', 'Offenburg', '0781 82-0', 'http://www.offenburg.de', 'rathaus@offenburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ohlsbach', 'Gemeindeverwaltung Ohlsbach', 'Hauptstr. 33','77797', 'Ohlsbach', '07803 9699-0', 'http://www.ohlsbach.de', 'gemeinde@ohlsbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Oppenau', 'Stadtverwaltung Oppenau', 'Rathausplatz 1','77728', 'Oppenau', '07804 48-0', 'http://www.oppenau.de', 'rathaus@oppenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ortenberg', 'Gemeindeverwaltung Ortenberg', 'Dorfplatz 1','77799', 'Ortenberg', '0781 9335-0', 'http://www.ortenberg.de/', 'gemeindeverwaltung@ortenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ottenhfen im Schwarzwald', 'Gemeindeverwaltung Ottenhfen im Schwarzwald', 'Forstweg 1','77883', 'Ottenhfen im Schwarzwald', '07842 804-0', 'http://www.ottenhoefen.de', 'hans-juergen.decker@ottenhoefen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Renchen', 'Stadtverwaltung Renchen', 'Hauptstr. 57','77871', 'Renchen', '07843 707-20', 'http://www.stadt-renchen.de', 'rathaus@stadt-renchen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ringsheim', 'Gemeindeverwaltung Ringsheim', 'Rathausplatz 1','77975', 'Ringsheim', '07822 8939-0', 'http://www.ringsheim.de', 'weber@ringsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rust', 'Gemeindeverwaltung Rust', 'Fischerstr. 51','77977', 'Rust', '07822 8645-0', 'http://www.rust.de', 'info@rust.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sasbach', 'Gemeindeverwaltung Sasbach', 'Kirchplatz 4','77880', 'Sasbach', '07841 686-10', 'http://www.sasbach-ortenau.de', 'rathaus@sasbach-ortenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sasbachwalden', 'Gemeindeverwaltung Sasbachwalden', 'Kirchweg 6','77887', 'Sasbachwalden', '07841 64079-0', 'http://www.sasbachwalden.de', 'schuchter@sasbachwalden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schuttertal', 'Gemeindeverwaltung Schuttertal', 'Hauptstr. 5','77978', 'Schuttertal', '07826 9666-0', 'http://www.schuttertal.de', 'gabbert@schuttertal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schutterwald', 'Gemeindeverwaltung Schutterwald', 'Kirchstr. 2','77746', 'Schutterwald', '0781 9606-0', 'http://www.schutterwald.de', 'gemeinde@schutterwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seebach', 'Gemeindeverwaltung Seebach', 'Ruhesteinstr. 21','77889', 'Seebach', '07842 9483-0', 'http://www.seebach.de', 'gemeinde@seebach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seelbach', 'Gemeindeverwaltung Seelbach', 'Hauptstr. 7','77960', 'Seelbach', '07823 9494-21', 'http://www.seelbach-online.de', 'gemeinde@seelbach-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinach', 'Gemeindeverwaltung Steinach', 'Kirchstr. 4','77790', 'Steinach', '07832 9198-0', 'http://www.steinach.de', 'info@steinach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Willsttt', 'Gemeindeverwaltung Willsttt', 'Am Mhlplatz 1','77731', 'Willsttt', '07852 43-211', 'http://www.willstaett.de', 'gemeinde@willstaett.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wolfach', 'Stadtverwaltung Wolfach', 'Hauptstr. 41','77709', 'Wolfach', '07834 8353-0', 'http://www.wolfach.de', 'stadt@wolfach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Zell am Harmersbach', 'Stadtverwaltung Zell am Harmersbach', 'Hauptstr. 19','77736', 'Zell am Harmersbach', '07835 6369-0', 'http://www.zell.de', 'stadtverwaltung@zell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwanau', 'Gemeindeverwaltung Schwanau', 'Kirchstr. 16','77963', 'Schwanau', '07824 6499-0', 'http://www.schwanau.de', 'Wolfgang.Brucker@schwanau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuried', 'Gemeindeverwaltung Neuried', 'Kirchstr. 21','77743', 'Neuried', '07807 97-0', 'http://www.neuried.net', 'info@neuried.net'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kappel-Grafenhausen', 'Gemeindeverwaltung Kappel-Grafenhausen', 'Rathausstr. 2','77966', 'Kappel-Grafenhausen', '07822 863-0', 'http://www.kappel-grafenhausen.de', 'gemeinde@kappel-grafenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rheinau', 'Stadtverwaltung Rheinau', 'Rheinstr. 52','77866', 'Rheinau', '07844 400-21', 'http://www.rheinau.de', 'mailpost@rheinau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aichhalden', 'Gemeindeverwaltung Aichhalden', 'Reierweg 3','78733', 'Aichhalden', '07422 9702-130', 'http://www.aichhalden.de', 'Michael.Lehrer@aichhalden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bsingen', 'Gemeindeverwaltung Bsingen', 'Bsinger Str. 5','78662', 'Bsingen', '07404 9216-0', 'http://www.boesingen.de', 'blepp@boesingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dietingen', 'Gemeindeverwaltung Dietingen', 'Kirchplatz 1','78661', 'Dietingen', '0741 4806-0', 'http://www.dietingen.de', 'info@dietingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Dornhan', 'Stadtverwaltung Dornhan', 'Obere Torstr. 2','72175', 'Dornhan', '07455 9381-0', 'http://www.dornhan.de/dornhan/index.htm', 'Markus.Huber@dornhan.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dunningen', 'Gemeindeverwaltung Dunningen', 'Hauptstr. 25','78655', 'Dunningen', '07403 9295-0', 'http://www.dunningen.de', 'info@dunningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Epfendorf', 'Gemeindeverwaltung Epfendorf', 'Adenauerstr. 14','78736', 'Epfendorf', '07404 9212-0', 'http://www.epfendorf.de', 'mark.prielipp@epfendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hardt', 'Gemeindeverwaltung Hardt', 'Mariazeller Str. 1','78739', 'Hardt', '07422 9588-0', 'http://www.gemeinde-hardt.de', 'info@hardt-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lauterbach', 'Gemeindeverwaltung Lauterbach', 'Schramberger Str. 5','78730', 'Lauterbach', '07422 9497-0', 'http://www.lauterbach-schwarzwald.de', 'buergermeister@lauterbach-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Oberndorf am Neckar', 'Stadtverwaltung Oberndorf am Neckar', 'Klosterstr. 3','78727', 'Oberndorf am Neckar', '07423 77-0', 'http://www.oberndorf-neckar.de', 'stadt@oberndorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rottweil', 'Stadtverwaltung Rottweil', 'Hauptstr. 21-23','78628', 'Rottweil', '0741 494-0', 'http://www.rottweil.de', 'stadt@rottweil.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schenkenzell', 'Gemeindeverwaltung Schenkenzell', 'Reinerzaustr. 12','77773', 'Schenkenzell', '07836 9397-0', 'http://www.schenkenzell.de', 'info@schenkenzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schiltach', 'Stadtverwaltung Schiltach', 'Marktplatz 6','77761', 'Schiltach', '07836 58-0', 'http://www.stadt-schiltach.de', 'info@schiltach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schramberg', 'Stadtverwaltung Schramberg', 'Hauptstr. 25','78713', 'Schramberg', '07422 29-0', 'http://www.schramberg.de', 'zentrale@schramberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sulz am Neckar', 'Stadtverwaltung Sulz am Neckar', 'Obere Hauptstr. 2','72172', 'Sulz am Neckar', '07454 9650-0', 'http://www.sulz.de', 'stadtverwaltung@sulz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Villingendorf', 'Gemeindeverwaltung Villingendorf', 'Hauptstr. 2','78667', 'Villingendorf', '0741 9298-0', 'http://www.villingendorf.de', 'info@villingendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Vhringen', 'Gemeindeverwaltung Vhringen', 'Sulzer Str. 8','72189', 'Vhringen', '07454 9583-0', 'http://www.voehringen-bw.de', 'info@voehringen-bw.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wellendingen', 'Gemeindeverwaltung Wellendingen', 'Schloplatz 1','78669', 'Wellendingen', '07426 9402-0', 'http://www.wellendingen.de', 'thomas.albrecht@wellendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zimmern ob Rottweil', 'Gemeindeverwaltung Zimmern ob Rottweil', 'Rathausstr. 2','78658', 'Zimmern ob Rottweil', '0741 9291-0', 'http://www.zimmern-or.de', 'info@zimmern-or.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fluorn-Winzeln', 'Gemeindeverwaltung Fluorn-Winzeln', 'Freudenstdter Str. 20','78737', 'Fluorn-Winzeln', '07402 9292-0', 'http://www.fluorn-winzeln.de', 'info@fluorn-winzeln.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eschbronn', 'Gemeindeverwaltung Eschbronn', 'Hauptstr. 8','78664', 'Eschbronn', '07403 9298-0', 'http://www.eschbronn.de', 'gemeinde@eschbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deilingen', 'Gemeindeverwaltung Deilingen', 'Kehlhof 1','78652', 'Deilingen', '07420 9394-0', 'http://www.deisslingen.de', 'info@deisslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Drrheim', 'Stadtverwaltung Bad Drrheim', 'Luisenstr. 4','78073', 'Bad Drrheim', '07726 666-0', 'http://www.badduerrheim.de', 'jonathan.berggoetz@bad-duerrheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Blumberg', 'Stadtverwaltung Blumberg', 'Hauptstr. 97','78176', 'Blumberg', '07702 51-100', 'http://www.stadt-blumberg.de', 'info@stadt-blumberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Brunlingen', 'Stadtverwaltung Brunlingen', 'Kirchstr. 10','78199', 'Brunlingen', '0771 603-0', 'http://www.braeunlingen.de', 'Juergen.Guse@braeunlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dauchingen', 'Gemeindeverwaltung Dauchingen', 'Deisslinger Str. 1','78083', 'Dauchingen', '07720 9777-0', 'http://www.dauchingen.de', 'buergermeister@dauchingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Donaueschingen', 'Stadtverwaltung Donaueschingen', 'Rathausplatz 1','78166', 'Donaueschingen', '0771 857-0', 'http://www.donaueschingen.de', 'stadt@donaueschingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Furtwangen im Schwarzwald', 'Stadtverwaltung Furtwangen im Schwarzwald', 'Marktplatz 4','78120', 'Furtwangen im Schwarzwald', '07723 939-0', 'http://www.furtwangen.de', 'stadt@furtwangen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gtenbach', 'Gemeindeverwaltung Gtenbach', 'Hauptstr. 10','78148', 'Gtenbach', '07723 9306-0', 'http://www.guetenbach.de', 'gemeinde@guetenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hfingen', 'Stadtverwaltung Hfingen', 'Hauptstr. 18','78183', 'Hfingen', '0771 6009-0', 'http://www.huefingen.de', 'info@huefingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigsfeld im Schwarzwald', 'Gemeindeverwaltung Knigsfeld im Schwarzwald', 'Rathausstr. 2','78126', 'Knigsfeld im Schwarzwald', '07725 8009-0', 'http://www.koenigsfeld.de', 'Fritz.Link@koenigsfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mnchweiler', 'Gemeindeverwaltung Mnchweiler', 'Hindenburgstr. 42','78087', 'Mnchweiler', '07721 9480-11', 'http://www.moenchweiler.de', 'info@moenchweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Niedereschach', 'Gemeindeverwaltung Niedereschach', 'Villinger Str. 10','78078', 'Niedereschach', '07728 648-0', 'http://www.niedereschach.de', 'info@niedereschach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'St. Georgen im Schwarzwald', 'Stadtverwaltung St. Georgen im Schwarzwald', 'Hauptstr. 9','78112', 'St. Georgen im Schwarzwald', '07724 87-0', 'http://www.st-georgen.de', 'info@st-georgen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schnwald im Schwarzwald', 'Gemeindeverwaltung Schnwald im Schwarzwald', 'Franz-Schubert-Str. 3','78141', 'Schnwald im Schwarzwald', '07722 8608-0', 'http://www.schoenwald.net', 'mail@schoenwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schonach im Schwarzwald', 'Gemeindeverwaltung Schonach im Schwarzwald', 'Hauptstr. 21','78136', 'Schonach im Schwarzwald', '07722 96481-0', 'http://www.schonach.de', 'gemeinde@schonach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Triberg im Schwarzwald', 'Stadtverwaltung Triberg im Schwarzwald', 'Hauptstr. 57','78098', 'Triberg im Schwarzwald', '07722 953-0', 'http://www.triberg.de', 'stadtverwaltung@triberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tuningen', 'Gemeindeverwaltung Tuningen', 'Auf dem Platz 1','78609', 'Tuningen', '07464 9861-0', 'http://www.tuningen.de', 'r.pahlow@tuningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterkirnach', 'Gemeindeverwaltung Unterkirnach', 'Villinger Str. 5','78089', 'Unterkirnach', '07721 8008-0', 'http://www.unterkirnach.de', 'braun@unterkirnach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Vhrenbach', 'Stadtverwaltung Vhrenbach', 'Friedrichstr. 8','78147', 'Vhrenbach', '07727 501-0', 'http://www.voehrenbach.de', 'info@voehrenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Villingen-Schwenningen', 'Stadtverwaltung Villingen-Schwenningen', 'Mnsterplatz 7/8','78050', 'Villingen-Schwenningen', '07721 82-0', 'http://www.villingen-schwenningen.de', 'ob@villingen-schwenningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Brigachtal', 'Gemeindeverwaltung Brigachtal', 'St.Gallus-Str. 4','78086', 'Brigachtal', '07721 2909-0', 'http://www.brigachtal.de', 'info@brigachtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aldingen', 'Gemeindeverwaltung Aldingen', 'Marktplatz 2','78554', 'Aldingen', '07424 882-0', 'http://www.aldingen.de', 'buergermeisteramt@aldingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Brenthal', 'Gemeindeverwaltung Brenthal', 'Kirchstr. 8','78580', 'Brenthal', '07466 230', 'http://www.baerenthal.de', 'info@baerenthal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Balgheim', 'Gemeindeverwaltung Balgheim', 'Marienplatz 3','78582', 'Balgheim', '07424 940009-0', 'http://www.balgheim.de', 'info@balgheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bttingen', 'Gemeindeverwaltung Bttingen', 'Allenspacher Weg 2','78583', 'Bttingen', '07429 9305-0', 'http://www.boettingen.de', 'rathaus@boettingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bubsheim', 'Gemeindeverwaltung Bubsheim', 'Gosheimer Str. 4','78585', 'Bubsheim', '07429 508', 'http://www.bubsheim.de', 'info@bubsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Buchheim', 'Gemeindeverwaltung Buchheim', 'Rathausstr. 4','88637', 'Buchheim', '07777 311', 'http://cms7.gemeindebuchheim.de/5110159.html', 'info@gemeindebuchheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deilingen', 'Gemeindeverwaltung Deilingen', 'Hauptstr. 1','78586', 'Deilingen', '07426 9471-0', 'http://www.deilingen.de', 'info@deilingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Denkingen', 'Gemeindeverwaltung Denkingen', 'Hauptstr. 46','78588', 'Denkingen', '07424 9706-0', 'http://www.denkingen.de', 'Wuhrer@denkingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drbheim', 'Gemeindeverwaltung Drbheim', 'Probststr. 2','78589', 'Drbheim', '07424 95825-0', 'http://www.duerbheim.de', 'info@duerbheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Durchhausen', 'Gemeindeverwaltung Durchhausen', 'Dorfstr. 51','78591', 'Durchhausen', '07464 9862-0', 'http://www.durchhausen.de', 'info@durchhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Egesheim', 'Gemeindeverwaltung Egesheim', 'Hauptstr. 10','78592', 'Egesheim', '07429 93108-0', 'http://www.egesheim.de', 'info@egesheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Fridingen an der Donau', 'Stadtverwaltung Fridingen an der Donau', 'Kirchplatz 2','78567', 'Fridingen an der Donau', '07463 837-0', 'http://www.fridingen.de', 'waizenegger@fridingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Frittlingen', 'Gemeindeverwaltung Frittlingen', 'Hauptstr. 46','78665', 'Frittlingen', '07426 9624-0', 'http://www.frittlingen.de', 'gemeinde@frittlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Geisingen', 'Stadtverwaltung Geisingen', 'Hauptstr. 36','78187', 'Geisingen', '07704 807-0', 'http://www.geisingen.de', 'm.numberger@geisingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gosheim', 'Gemeindeverwaltung Gosheim', 'Hauptstr. 47','78559', 'Gosheim', '07426 9612-0', 'http://www.gosheim.de', 'info@gosheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gunningen', 'Gemeindeverwaltung Gunningen', 'Rathausstr. 7','78594', 'Gunningen', '07424 940003-0', 'http://www.gunningen.de', 'info@gunningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hausen ob Verena', 'Gemeindeverwaltung Hausen ob Verena', 'Hauptstr. 34','78595', 'Hausen ob Verena', '07424 940008-0', 'http://www.hausen-ob-verena.de', 'hausen-ob-verena@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Immendingen', 'Gemeindeverwaltung Immendingen', 'Schloplatz 2','78194', 'Immendingen', '07462 24-0', 'http://www.immendingen.de', 'gemeindeverwaltung@immendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Irndorf', 'Gemeindeverwaltung Irndorf', 'Eichfelsenstr. 22','78597', 'Irndorf', '07466 227', 'http://www.irndorf.de', 'info@irndorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigsheim', 'Gemeindeverwaltung Knigsheim', 'Hauptstr. 3','78598', 'Knigsheim', '07429 2327', 'http://www.gemeinde-koenigsheim.de', 'info@gemeinde-koenigsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kolbingen', 'Gemeindeverwaltung Kolbingen', 'Hauptstr. 3','78600', 'Kolbingen', '07463 97083', 'http://www.kolbingen.de', 'info@kolbingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mahlstetten', 'Gemeindeverwaltung Mahlstetten', 'Marienplatz 1','78601', 'Mahlstetten', '07429 2321', 'http://www.mahlstetten.de', 'info@mahlstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mhlheim an der Donau', 'Stadtverwaltung Mhlheim an der Donau', 'Hauptstr.16','78570', 'Mhlheim an der Donau', '07463 9940-0', 'http://www.muehlheim-donau.de', 'info@muehlheim-donau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neuhausen ob Eck', 'Gemeindeverwaltung Neuhausen ob Eck', 'Rathausplatz 1','78579', 'Neuhausen ob Eck', '07467 9460-0', 'http://www.neuhausen-ob-eck.de', 'info@neuhausen-ob-eck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reichenbach am Heuberg', 'Gemeindeverwaltung Reichenbach am Heuberg', 'Kirchstr. 8','78564', 'Reichenbach am Heuberg', '07429 91177', 'http://www.reichenbach-heuberg.de', 'info@reichenbach-heuberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Renquishausen', 'Gemeindeverwaltung Renquishausen', 'Kolbinger Str. 1','78603', 'Renquishausen', '07429 2376', 'http://www.renquishausen.de', 'info@renquishausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Spaichingen', 'Stadtverwaltung Spaichingen', 'Marktplatz 19','78549', 'Spaichingen', '07424 9571-0', 'http://www.spaichingen.de', 'hansgeorg.schuhmacher@spaichingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Talheim', 'Gemeindeverwaltung Talheim', 'Kirchbrunnen 6','78607', 'Talheim', '07464 9895-0', 'http://www.gemeinde-talheim.de', 'buergermeister@gemeinde-talheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Trossingen', 'Stadtverwaltung Trossingen', 'Schulthei-Koch-Platz 1','78647', 'Trossingen', '07425 25-0', 'http://www.trossingen.de', 'stadt@trossingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Tuttlingen', 'Stadtverwaltung Tuttlingen', 'Rathausstr. 1','78532', 'Tuttlingen', '07461 99-0', 'http://www.tuttlingen.de', 'info@tuttlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wehingen', 'Gemeindeverwaltung Wehingen', 'Gosheimer Str. 14','78564', 'Wehingen', '07426 9470-0', 'http://www.wehingen.de', 'info@wehingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wurmlingen', 'Gemeindeverwaltung Wurmlingen', 'Obere Hauptstr. 4','78573', 'Wurmlingen', '07461 9276-0', 'http://www.wurmlingen.de', 'buergermeisteramt@wurmlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seitingen-Oberflacht', 'Gemeindeverwaltung Seitingen-Oberflacht', 'Obere Hauptstr. 8','78606', 'Seitingen-Oberflacht', '07464 9868-0', 'http://www.seitingen-oberflacht.de', 'juergen.buhl@seitingen-oberflacht.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rietheim-Weilheim', 'Gemeindeverwaltung Rietheim-Weilheim', 'Rathausplatz 3','78604', 'Rietheim-Weilheim', '07424 95848-0', 'http://www.rietheim-weilheim.de', 'info@rietheim-weilheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Emmingen-Liptingen', 'Gemeindeverwaltung Emmingen-Liptingen', 'Schulstr. 8','78576', 'Emmingen-Liptingen', '07465 9268-0', 'http://www.emmingen-liptingen.de', 'info@emmingen-liptingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Aach', 'Stadtverwaltung Aach', 'Hauptstr. 16','78267', 'Aach', '07774 9309-0', 'http://www.aach.de', 'gemeinde@aach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Allensbach', 'Gemeindeverwaltung Allensbach', 'Rathausplatz 1','78476', 'Allensbach', '07533 801-0', 'http://www.allensbach.de', 'g21@allensbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bsingen am Hochrhein', 'Gemeindeverwaltung Bsingen am Hochrhein', 'Junkerstr. 86','78266', 'Bsingen am Hochrhein', '07734 9302-0', 'http://www.buesingen.de', 'lang@buesingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eigeltingen', 'Gemeindeverwaltung Eigeltingen', 'Krumme Str. 1','78253', 'Eigeltingen', '07774 9322-0', 'http://www.eigeltingen.de', 'gemeinde@eigeltingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Engen', 'Stadtverwaltung Engen', 'Hauptstr. 11','78234', 'Engen', '07733 502-0', 'http://www.engen.de', 'rathaus@engen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gaienhofen', 'Gemeindeverwaltung Gaienhofen', 'Auf der Breite 1','78343', 'Gaienhofen', '07735 818-0', 'http://www.gaienhofen.de', 'info@gaienhofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gailingen am Hochrhein', 'Gemeindeverwaltung Gailingen am Hochrhein', 'Hauptstr. 7','78262', 'Gailingen am Hochrhein', '07734 9303-11', 'http://www.gailingen.de', 'thomas.auer@gailingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gottmadingen', 'Gemeindeverwaltung Gottmadingen', 'Johann-Georg-Fahr-Str. 10','78244', 'Gottmadingen', '07731 908-0', 'http://www.gottmadingen.de', 'gemeinde@gottmadingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hilzingen', 'Gemeindeverwaltung Hilzingen', 'Hauptstr. 36','78247', 'Hilzingen', '07731 3809-0', 'http://www.hilzingen.de', 'gemeinde@hilzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Konstanz', 'Stadtverwaltung Konstanz', 'Kanzleistr. 15','78462', 'Konstanz', '07531 900-0', 'http://www.konstanz.de', 'ob@stadt.konstanz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Moos', 'Gemeindeverwaltung Moos', 'Bohlinger Str. 18','78345', 'Moos', '07732 9996-0', 'http://www.moos.de', 'pkessler@moos.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mhlingen', 'Gemeindeverwaltung Mhlingen', 'Im Ghren 2','78357', 'Mhlingen', '07775 9303-0', 'http://www.muehlingen.de', 'rathaus@muehlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'hningen', 'Gemeindeverwaltung hningen', 'Klosterplatz 1','78337', 'hningen', '07735 819-0', 'http://www.oehningen.de', 'gemeindeverwaltung@oehningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Radolfzell am Bodensee', 'Stadtverwaltung Radolfzell am Bodensee', 'Marktplatz 2','78315', 'Radolfzell am Bodensee', '07732 81-0', 'http://www.radolfzell.de', 'stadt@radolfzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Reichenau', 'Gemeindeverwaltung Reichenau', 'Mnsterplatz 2','78479', 'Reichenau', '07534 801-0', 'http://www.reichenau.de', 'rathaus@reichenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Singen (Hohentwiel)', 'Stadtverwaltung Singen (Hohentwiel)', 'Hohgarten 2','78224', 'Singen (Hohentwiel)', '07731 85-0', 'http://www.singen.de', 'info@singen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steilingen', 'Gemeindeverwaltung Steilingen', 'Schulstr. 19','78256', 'Steilingen', '07738 9293-51', 'http://www.steisslingen.de', 'gemeinde@steisslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Stockach', 'Stadtverwaltung Stockach', 'Adenauerstr. 4','78333', 'Stockach', '07771 802-0', 'http://www.stockach.de', 'post@stockach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Tengen', 'Stadtverwaltung Tengen', 'Marktstr. 1','78250', 'Tengen', '07736 9233-0', 'http://www.tengen.de', 'stadt@tengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Volkertshausen', 'Gemeindeverwaltung Volkertshausen', 'Hauptstr. 27','78269', 'Volkertshausen', '07774 9310-0', 'http://www.volkertshausen.de', 'rathaus@gemeinde.volkertshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohenfels', 'Gemeindeverwaltung Hohenfels', 'Hauptstr. 30','78355', 'Hohenfels', '07557 9206-0', 'http://www.hohenfels.de', 'gemeinde@hohenfels.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mhlhausen-Ehingen', 'Gemeindeverwaltung Mhlhausen-Ehingen', 'Schlostr. 46','78259', 'Mhlhausen-Ehingen', '07733 5005-10', 'http://www.muehlhausen-ehingen.de', 'bm@muehlhausen-ehingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bodman-Ludwigshafen', 'Gemeindeverwaltung Bodman-Ludwigshafen', 'Hafenstr. 5','78351', 'Bodman-Ludwigshafen', '07773 9300-0', 'http://www.bodman-ludwigshafen.de', 'gemeinde@bodman-ludwigshafen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Orsingen-Nenzingen', 'Gemeindeverwaltung Orsingen-Nenzingen', 'Stockacher Str. 2','78359', 'Orsingen-Nenzingen', '07771 9341-0', 'http://www.orsingen-nenzingen.de', 'gemeinde@orsingen-nenzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rielasingen-Worblingen', 'Gemeindeverwaltung Rielasingen-Worblingen', 'Lessingstr. 2','78239', 'Rielasingen-Worblingen', '07731 9321-0', 'http://www.rielasingen-worblingen.de', 'info@rielasingen-worblingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aitern', 'Gemeindeverwaltung Aitern', 'Schulweg 6','79677', 'Aitern', '07673 350', 'http://www.aitern.de', 'gemeinde.aitern@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bad Bellingen', 'Gemeindeverwaltung Bad Bellingen', 'Rheinstr. 25','79415', 'Bad Bellingen', '07635 8119-0', 'http://www.bad-bellingen.de', 'rathaus@gemeinde.bad-bellingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Binzen', 'Gemeindeverwaltung Binzen', 'Am Rathausplatz 6','79589', 'Binzen', '07621 6608-51', 'http://www.binzen.de', 'a.schneucker@binzen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bllen', 'Gemeindeverwaltung Bllen', 'Oberbllen 19','79677', 'Bllen', '07673 282', 'http://www.gvvschoenau.de/pb/Boellen,Lde/Boellen.html', 'gemeinde@boellen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Efringen-Kirchen', 'Gemeindeverwaltung Efringen-Kirchen', 'Hauptstr. 26','79588', 'Efringen-Kirchen', '07628 806-20', 'http://www.efringen-kirchen.de', 'buergermeister@efringen-kirchen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eimeldingen', 'Gemeindeverwaltung Eimeldingen', 'Dorfstr. 1','79591', 'Eimeldingen', '07621 62591', 'http://www.eimeldingen.de', 'gemeinde@eimeldingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fischingen', 'Gemeindeverwaltung Fischingen', 'Kirchplatz 6','79592', 'Fischingen', '07628 1870', 'http://www.fischingen.de', 'gemeinde@fischingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Frhnd', 'Gemeindeverwaltung Frhnd', 'Unterkastel 21','79677', 'Frhnd', '07673 332', 'http://www.froehnd.de', 'info@froehnd.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hasel', 'Gemeindeverwaltung Hasel', 'Hofstr. 2','79686', 'Hasel', '07762 9307', 'http://www.gemeinde-hasel.de', 'info@gemeinde-hasel.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hausen im Wiesental', 'Gemeindeverwaltung Hausen im Wiesental', 'Bahnhofstr. 9','79688', 'Hausen im Wiesental', '07622 6873-0', 'http://www.hausen-im-wiesental.de', 'gemeinde@hausen-im-wiesental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Inzlingen', 'Gemeindeverwaltung Inzlingen', 'Wasserschloss','79594', 'Inzlingen', '07621 4055-0', 'http://www.inzlingen.de', 'rathaus@inzlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Kandern', 'Stadtverwaltung Kandern', 'Waldeckstr. 39','79400', 'Kandern', '07626 899-0', 'http://www.kandern.de', 'stadt@kandern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Lrrach', 'Stadtverwaltung Lrrach', 'Luisenstr. 16','79539', 'Lrrach', '07621 415-1', 'http://www.loerrach.de', 'stadt@loerrach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Maulburg', 'Gemeindeverwaltung Maulburg', 'Hermann-Burte-Str. 57','79689', 'Maulburg', '07622 3991-0', 'http://www.maulburg.de', 'buergerbuero@maulburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rheinfelden (Baden)', 'Stadtverwaltung Rheinfelden (Baden)', 'Kirchplatz 2','79618', 'Rheinfelden (Baden)', '07623 95-0', 'http://www.rheinfelden.de', 'info@rheinfelden-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rmmingen', 'Gemeindeverwaltung Rmmingen', 'Lrracher Str. 9','79595', 'Rmmingen', '07621 3219', 'http://www.ruemmingen.de', 'gemeinde@ruemmingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schallbach', 'Gemeindeverwaltung Schallbach', 'Dorfstr. 6','79597', 'Schallbach', '07621 84605', 'http://www.schallbach.de', 'info@schallbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schliengen', 'Gemeindeverwaltung Schliengen', 'Wasserschlo Entenstein','79418', 'Schliengen', '07635 3109-0', 'http://www.schliengen.de', 'gemeinde@schliengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schnau im Schwarzwald', 'Stadtverwaltung Schnau im Schwarzwald', 'Talstr. 22','79677', 'Schnau im Schwarzwald', '07673 8204-0', 'http://www.schoenau-im-schwarzwald.de', 'info@schoenau-im-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schnenberg', 'Gemeindeverwaltung Schnenberg', 'Belchenstr. 1','79677', 'Schnenberg', '07673 205', '', 'gemeinde@79677-schoenenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schopfheim', 'Stadtverwaltung Schopfheim', 'Hauptstr. 29-31','79650', 'Schopfheim', '07622 396-0', 'http://www.schopfheim.de', 'info@schopfheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwrstadt', 'Gemeindeverwaltung Schwrstadt', 'Hauptstr. 107','79739', 'Schwrstadt', '07762 5220-0', 'http://www.schwoerstadt.de', 'info@schwoerstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinen', 'Gemeindeverwaltung Steinen', 'Eisenbahnstr. 31','79585', 'Steinen', '07627 9100-0', 'http://www.steinen.de', 'koenig.buergermeister@steinen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Todtnau', 'Stadtverwaltung Todtnau', 'Rathausplatz 1','79674', 'Todtnau', '07671 996-0', 'http://www.todtnau.de', 'info@todtnau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tunau', 'Gemeindeverwaltung Tunau', 'Dorfstr. 2','79677', 'Tunau', '07673 344 oder 8204-33', 'http://www.gemeinde-tunau.de', 'info@schoenau-im-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Utzenfeld', 'Gemeindeverwaltung Utzenfeld', 'Wiesentalstr. 29','79694', 'Utzenfeld', '07673 275', 'http://www.utzenfeld.de', 'info@utzenfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weil am Rhein', 'Stadtverwaltung Weil am Rhein', 'Rathausplatz 1','79576', 'Weil am Rhein', '07621 704-0', 'http://www.weil-am-rhein.de', 'stadt@weil-am-rhein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wembach', 'Gemeindeverwaltung Wembach', 'Bifigstr. 2','79677', 'Wembach', '07673 327', 'http://www.wembach.de', 'info@wembach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wieden', 'Gemeindeverwaltung Wieden', 'Kirchstr. 2','79695', 'Wieden', '07673 1365', 'http://www.gemeinde-wieden.de', 'afranz@wieden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wittlingen', 'Gemeindeverwaltung Wittlingen', 'Rathausplatz 1','79599', 'Wittlingen', '07621 3804', '', 'gemeinde-wittlingen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Zell im Wiesental', 'Stadtverwaltung Zell im Wiesental', 'Constanze-Weber-Gasse 4','79669', 'Zell im Wiesental', '07625 133-0', 'http://www.zell-im-wiesental.de', 'info@stadt-zell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Malsburg-Marzell', 'Gemeindeverwaltung Malsburg-Marzell', 'Rathausplatz 1','79429', 'Malsburg-Marzell', '07626 9199-0', 'http://www.malsburg-marzell.de', 'rathaus@malsburg-marzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grenzach-Wyhlen', 'Gemeindeverwaltung Grenzach-Wyhlen', 'Hauptstr. 10','79639', 'Grenzach-Wyhlen', '07624 32-0', 'http://www.grenzach-wyhlen.de', 'benz@grenzach-wyhlen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hg-Ehrsberg', 'Gemeindeverwaltung Hg-Ehrsberg', 'Rathausstr. 27','79685', 'Hg-Ehrsberg', '07625 918678-0', 'http://www.hinterhag.de', 'buergermeisteramt@haeg-ehrsberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kleines Wiesental', 'Gemeindeverwaltung Kleines Wiesental', 'Tegernauer Ortsstr.9','79692', 'Kleines Wiesental', '07629/9110-20', 'http://www.kleines-wiesental.eu/', 'schoenbett@gdekw.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Albbruck', 'Gemeindeverwaltung Albbruck', 'Schulstr. 6','79774', 'Albbruck', '07753 930-0', 'http://www.albbruck.de', 'gemeinde@albbruck.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bernau im Schwarzwald', 'Gemeindeverwaltung Bernau im Schwarzwald', 'Rathausstr. 18','79872', 'Bernau im Schwarzwald', '07675 1600-0', 'http://www.bernau-schwarzwald.de', 'rathaus@bernau-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bonndorf im Schwarzwald', 'Stadtverwaltung Bonndorf im Schwarzwald', 'Martinstr. 8','79848', 'Bonndorf im Schwarzwald', '07703 9380-0', 'http://www.bonndorf.de', 'buergerservice@bonndorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dachsberg (Sdschwarzwald)', 'Gemeindeverwaltung Dachsberg (Sdschwarzwald)', 'Rathausstr. 1','79875', 'Dachsberg (Sdschwarzwald)', '07672 9905-0', 'http://www.dachsberg-suedschwarzwald.de', 'buecheler.gemeinde@dachsberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettighofen', 'Gemeindeverwaltung Dettighofen', 'Berwanger Str. 5','79802', 'Dettighofen', '07742 9207-0', 'http://www.dettighofen.de/servlet/PB/menu/-1_l1/index.html', 'gemeindeverwaltung@dettighofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dogern', 'Gemeindeverwaltung Dogern', 'Rathausweg 1','79804', 'Dogern', '07751 8318-0', 'http://www.dogern.de', 'gemeinde@dogern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grwihl', 'Gemeindeverwaltung Grwihl', 'Hauptstr. 54','79733', 'Grwihl', '07754 708-0', 'http://www.goerwihl.de', 'gemeinde@goerwihl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grafenhausen', 'Gemeindeverwaltung Grafenhausen', 'Rathausplatz 1','79865', 'Grafenhausen', '07748 520-0', 'http://www.grafenhausen.de', 'rathaus@grafenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Husern', 'Gemeindeverwaltung Husern', 'St.-Fridolin-Str. 5','79837', 'Husern', '07672 9314-0', 'http://www.haeusern.de', 'gemeinde@haeusern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Herrischried', 'Gemeindeverwaltung Herrischried', 'Hauptstr. 28','79737', 'Herrischried', '07764 9200-0', 'http://www.herrischried.de', 'c.berger@herrischried.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hchenschwand', 'Gemeindeverwaltung Hchenschwand', 'Waldshuter Str. 5','79862', 'Hchenschwand', '07672 4819-0', 'http://www.hoechenschwand.de', 'rathaus@hoechenschwand.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohentengen am Hochrhein', 'Gemeindeverwaltung Hohentengen am Hochrhein', 'Kirchstr. 4','79801', 'Hohentengen am Hochrhein', '07742 853-0', 'http://www.hohentengen.de', 'info@hohentengen-ah.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ibach', 'Gemeindeverwaltung Ibach', 'Hofrain 1','79837', 'Ibach', '07672 842', 'http://www.ibach-schwarzwald.de', 'gemeinde@ibach-schwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Jestetten', 'Gemeindeverwaltung Jestetten', 'Hombergstr. 2','79798', 'Jestetten', '07745 9209-0', 'http://www.jestetten.de', 'buergermeisterin@jestetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Klettgau', 'Gemeindeverwaltung Klettgau', 'Degernauerstr. 22','79771', 'Klettgau', '07742 935-0', 'http://www.gemeinde-klettgau.de', 'gemeinde@klettgau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lauchringen', 'Gemeindeverwaltung Lauchringen', 'Hohrainstr. 59','79787', 'Lauchringen', '07741 6095-0', 'http://www.lauchringen.de', 'lauchringen@lauchringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Laufenburg (Baden)', 'Stadtverwaltung Laufenburg (Baden)', 'Hauptstr. 30','79725', 'Laufenburg (Baden)', '07763 806-0', 'http://www.laufenburg-baden.de', 'stadt@laufenburg-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lottstetten', 'Gemeindeverwaltung Lottstetten', 'Rathausplatz 1','79807', 'Lottstetten', '07745 9201-0', 'http://www.lottstetten.de', 'gemeinde@lottstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Murg', 'Gemeindeverwaltung Murg', 'Hauptstr. 52','79730', 'Murg', '07763 930-0', 'http://www.murg.de', 'post@gemeinde-murg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rickenbach', 'Gemeindeverwaltung Rickenbach', 'Hauptstr. 7','79736', 'Rickenbach', '07765 9200-0', 'http://www.rickenbach.de', 'gemeinde@rickenbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Sckingen', 'Stadtverwaltung Bad Sckingen', 'Rathausplatz 1','79713', 'Bad Sckingen', '07761 51-0', 'http://www.bad-saeckingen.de', 'info@bad-saeckingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'St. Blasien', 'Stadtverwaltung St. Blasien', 'Am Kurgarten 11','79837', 'St. Blasien', '07672 414-0', 'http://www.stblasien.de', 'stadtverwaltung@stblasien.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sthlingen', 'Stadtverwaltung Sthlingen', 'Schlostr. 9','79780', 'Sthlingen', '07744 532-0', 'http://www.stuehlingen.de', 'rathaus@stuehlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Todtmoos', 'Gemeindeverwaltung Todtmoos', 'St. Blasier Str. 2','79682', 'Todtmoos', '07674 848-0', 'http://www.todtmoos.de', 'sekretariat@todtmoos.net'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wehr', 'Stadtverwaltung Wehr', 'Hauptstr. 16','79664', 'Wehr', '07762 808-0', 'http://www.wehr.de', 'stadt@wehr.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weilheim', 'Gemeindeverwaltung Weilheim', 'Badener Platz 1','79809', 'Weilheim', '07741 8313-0', 'http://www.weilheim-baden.de', 'info@weilheim-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wutschingen', 'Gemeindeverwaltung Wutschingen', 'Kirchstr. 5','79793', 'Wutschingen', '07746 852-0', 'http://www.wutoeschingen.de', 'gemeinde@wutoeschingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eggingen', 'Gemeindeverwaltung Eggingen', 'Brgerstr. 7','79805', 'Eggingen', '07746 9202-0', 'http://www.eggingen.de/', 'gemeinde@eggingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kssaberg', 'Gemeindeverwaltung Kssaberg', 'Gemeindezentrum 1','79790', 'Kssaberg', '07741 6001-41', 'http://www.kuessaberg.de', 'weber.manfred@kuessaberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Waldshut-Tiengen', 'Stadtverwaltung Waldshut-Tiengen', 'Kaiserstr. 28-32','79761', 'Waldshut-Tiengen', '07751 833-0', 'http://www.waldshut-tiengen.de', 'stadt@waldshut-tiengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wutach', 'Gemeindeverwaltung Wutach', 'Amtshausstr. 2','79879', 'Wutach', '07709 92969-0', 'http://www.wutach.org', 'rathaus@wutach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'hlingen-Birkendorf', 'Gemeindeverwaltung hlingen-Birkendorf', 'Kirchplatz 1','79777', 'hlingen-Birkendorf', '07743 9200-0', 'http://www.uehlingen-birkendorf.de', 'gemeinde@uehlingen-birkendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Bblingen', 'Landratsamt Bblingen', 'Parkstr. 16','71034', 'Bblingen', '07031/663-1202', 'www.landkreis-boeblingen.de', 'posteingang@lrabb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Esslingen', 'Landratsamt Esslingen', 'Pulverwiesen 11','73726', 'Esslingen a.N.', '0711/3902-2000', 'www.landkreis-esslingen.de', 'Landrat.Heinz.Eininger@Landkreis-Esslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Gppingen', 'Landratsamt Gppingen', 'Lorcher Strae 6','73033', 'Gppingen', '07161/202-380', 'www.landkreis-goeppingen.de', 'e.wolff@landkreis-goeppingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Ludwigsburg', 'Landratsamt Ludwigsburg', 'Hindenburgstrae 40','71638', 'Ludwigsburg', '', 'www.landkreis-ludwigsburg.de', 'mail@landkreis-ludwigsburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Rems-Murr-Kreis', 'Landratsamt Rems-Murr-Kreis', 'Alter Postplatz 10','71332', 'Waiblingen', '', 'www.rems-murr-kreis.de', 'info@rems-murr-kreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Heilbronn', 'Landratsamt Heilbronn', 'Lerchenstrae 40','74072', 'Heilbronn', '', 'www.landkreis-heilbronn.de', 'detlef.piepenburg@landratsamt-heilbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Hohenlohekreis', 'Landratsamt Hohenlohekreis', 'Allee 17','74653', 'Knzelsau', '07940/18-200', 'www.hohenlohekreis.de', 'info@Hohenlohekreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Schwbisch Hall', 'Landratsamt Schwbisch Hall', 'Mnzstrae 1','74523', 'Schwbisch Hall', '0791/755-7215', 'www.landkreis-schwaebisch-hall.de', 'landrat@landkreis-schwaebisch-hall.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Main-Tauber-Kreis', 'Landratsamt Main-Tauber-Kreis', 'Gartenstrae 1','97941', 'Tauberbischofsheim', '', 'www.main-tauber-kreis.de', 'reinhard.frank@main-tauber-kreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Heidenheim', 'Landratsamt Heidenheim', 'Felsenstrae 36','89518', 'Heidenheim', '07321/321-201', 'www.landkreis-heidenheim.de', 'post@landkreis-heidenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Ostalbkreis', 'Landratsamt Ostalbkreis', 'Stuttgarter Strae 41','73430', 'Aalen', '', 'www.ostalbkreis.de', 'info@ostalbkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Karlsruhe', 'Landratsamt Karlsruhe', 'Beiertheimer Allee 2','76137', 'Karlsruhe', '', 'www.landkreis-karlsruhe.de', 'posteingang@landratsamt-karlsruhe.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Rastatt', 'Landratsamt Rastatt', 'Am Schlossplatz 5','76437', 'Rastatt', '07222/381-1000', 'www.landkreis-rastatt.de', 'landrat@landkreis-rastatt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Neckar-Odenwald-Kreis', 'Landratsamt Neckar-Odenwald-Kreis', 'Renzstrae 10','74821', 'Mosbach', '', 'www.neckar-odenwald-kreis.de', 'post@neckar-odenwald-kreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Rhein-Neckar-Kreis', 'Landratsamt Rhein-Neckar-Kreis', 'Kurfrstenanlage 38-40','69115', 'Heidelberg', '06221/522-1221', 'www.rhein-neckar-kreis.de', 'susanne.tropf@rhein-neckar-kreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Calw', 'Landratsamt Calw', 'Vogteistrae 42-46','75365', 'Calw', '', 'www.kreis-calw.de', 'lra.info@kreis-calw.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Enzkreis', 'Landratsamt Enzkreis', 'Zhringerallee 3','75177', 'Pforzheim', '', 'www.enzkreis.de', 'Bastian.Rosenau@enzkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Freudenstadt', 'Landratsamt Freudenstadt', 'Herrenfelder Strae 14','72250', 'Freudenstadt', '07441/920-1000', 'www.landkreis-freudenstadt.de', 'rueckert@landkreis-freudenstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Breisgau-Hochschwarzwald', 'Landratsamt Breisgau-Hochschwarzwald', 'Stadtstrae 2','79104', 'Freiburg i. Br.', '0761/2187-0', 'www.breisgau-hochschwarzwald.de', 'pressestelle@breisgau-hochschwarzwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Emmendingen', 'Landratsamt Emmendingen', 'Bahnhofstrae 2-4','79312', 'Emmendingen', '07641/451-200', 'www.landkreis-emmendingen.de', 'landrat@landkreis-emmendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Ortenaukreis', 'Landratsamt Ortenaukreis', 'Badstrae 20','77652', 'Offenburg', '0781/805-1200', 'www.ortenaukreis.de', 'buero.landrat@ortenaukreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Rottweil', 'Landratsamt Rottweil', 'Knigstrae 36','78628', 'Rottweil', '0741/244-201', 'www.landkreis-rottweil.de', 'landrat@landkreis-rottweil.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Schwarzwald-Baar-Kreis', 'Landratsamt Schwarzwald-Baar-Kreis', 'Am Hoptbhl 2','78048', 'Villingen-Schwenningen', '07721/913-7000', 'www.schwarzwald-baar-kreis.de', 'landrat@lrasbk.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Tuttlingen', 'Landratsamt Tuttlingen', 'Bahnhofstrae 100','78532', 'Tuttlingen', '07461/926-9100', 'www.landkreis-tuttlingen.de', 's.baer@landkreis-tuttlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Konstanz', 'Landratsamt Konstanz', 'Benediktinerplatz 1','78467', 'Konstanz', '', 'www.landkreis-konstanz.de', 'lrakn@lrakn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Lrrach', 'Landratsamt Lrrach', 'Palmstrae 3','79539', 'Lrrach', '', 'www.loerrach-landkreis.de', 'mail@loerrach-landkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Waldshut', 'Landratsamt Waldshut', 'Kaiserstrae 110','79761', 'Waldshut-Tiengen', '07751/86-7001', 'www.landkreis-waldshut.de', 'landrat@landkreis-waldshut.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Reutlingen', 'Landratsamt Reutlingen', 'Bismarckstrae 47','72764', 'Reutlingen', '', 'www.kreis-reutlingen.de', 'landrat@kreis-reutlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Tbingen', 'Landratsamt Tbingen', 'Wilhelm-Keil-Strae 50','72072', 'Tbingen', '07071/207-5000', 'www.kreis-tuebingen.de', 'JWalter@kreis-tuebingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Zollernalbkreis', 'Landratsamt Zollernalbkreis', 'Hirschbergstrae 29','72336', 'Balingen', '07433/92-1002 ', 'www.zollernalbkreis.de', 'post@Zollernalbkreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Alb-Donau-Kreis', 'Landratsamt Alb-Donau-Kreis', 'Schillerstrae 30','89077', 'Ulm', '0731/185-0', 'www.alb-donau-kreis.de', 'info@alb-donau-kreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Biberach', 'Landratsamt Biberach', 'Rollinstrae 9','88400', 'Biberach', '07351 52-0', 'www.biberach.de', 'landrat@biberach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Bodenseekreis', 'Landratsamt Bodenseekreis', 'Glrnischstrae 1-3','88045', 'Friedrichshafen', '', 'www.bodenseekreis.de', 'info@bodenseekreis.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Ravensburg', 'Landratsamt Ravensburg', 'Friedenstrae 6','88212', 'Ravensburg', '', 'www.landkreis-ravensburg.de', 'lra@landkreis-ravensburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Landratsamt', 'Sigmaringen', 'Landratsamt Sigmaringen', 'Hohenzollern Str. 12','72488', 'Sigmaringen', '07571/102-1011', 'www.landratsamt-sigmaringen.de', 'info@lrasig.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettingen an der Erms', 'Gemeindeverwaltung Dettingen an der Erms', 'Rathausplatz 1','72581', 'Dettingen an der Erms', '07123 7207-0', 'http://www.dettingen-erms.de', 'info@dettingen-erms.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eningen unter Achalm', 'Gemeindeverwaltung Eningen unter Achalm', 'Rathausplatz 1','72800', 'Eningen unter Achalm', '07121 892-100', 'http://www.eningen.de', 'verwaltung@eningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gomadingen', 'Gemeindeverwaltung Gomadingen', 'Marktplatz 2','72532', 'Gomadingen', '07385 9696-0', 'http://www.gomadingen.de', 'Klemens.Betz@gomadingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grabenstetten', 'Gemeindeverwaltung Grabenstetten', 'Bhringer Str. 10','72582', 'Grabenstetten', '07382 387', 'http://www.grabenstetten.de/', 'info@grabenstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grafenberg', 'Gemeindeverwaltung Grafenberg', 'Bergstr. 30','72661', 'Grafenberg', '07123 9339-0', 'http://www.grafenberg.de', 'info@grafenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hayingen', 'Stadtverwaltung Hayingen', 'Marktstr. 1','72534', 'Hayingen', '07386 9777-0', 'http://www.hayingen.de', 'info@hayingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hlben', 'Gemeindeverwaltung Hlben', 'Hauptstr. 1','72584', 'Hlben', '07125 9686-0', 'http://www.huelben.de', 'info@huelben.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mehrstetten', 'Gemeindeverwaltung Mehrstetten', 'Marktplatz 1','72537', 'Mehrstetten', '07381 9383-0', 'http://www.mehrstetten.de', 'info@mehrstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Metzingen', 'Stadtverwaltung Metzingen', 'Stuttgarter Str. 2-4','72555', 'Metzingen', '07123 925-215', 'http://www.metzingen.de', 'u.fiedler@metzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mnsingen', 'Stadtverwaltung Mnsingen', 'Bachwiesenstr. 7','72525', 'Mnsingen', '07381 182-0', 'http://www.muensingen.de', 'stadt@muensingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pfronstetten', 'Gemeindeverwaltung Pfronstetten', 'Hauptstr. 25','72539', 'Pfronstetten', '07388 9999-0', 'http://www.pfronstetten.de', 'info@pfronstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Pfullingen', 'Stadtverwaltung Pfullingen', 'Marktplatz 5','72793', 'Pfullingen', '07121 703-0', 'http://www.pfullingen.de', 'info@pfullingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Pliezhausen', 'Gemeindeverwaltung Pliezhausen', 'Marktplatz 1','72124', 'Pliezhausen', '07127 977-0', 'http://www.pliezhausen.de', 'info@pliezhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Reutlingen', 'Stadtverwaltung Reutlingen', 'Marktplatz 22','72764', 'Reutlingen', '07121 303-0', 'http://www.reutlingen.de', 'stadt@reutlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Riederich', 'Gemeindeverwaltung Riederich', 'Mittelstdter Str. 17','72585', 'Riederich', '07123 9359-0', 'http://www.riederich.de', 'tobiaspokrop@riederich.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Trochtelfingen', 'Stadtverwaltung Trochtelfingen', 'Rathausplatz 9','72818', 'Trochtelfingen', '07124 48-0', 'http://www.trochtelfingen.de', 'info@trochtelfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Urach', 'Stadtverwaltung Bad Urach', 'Marktplatz 9','72574', 'Bad Urach', '07125 156-0', 'http://www.bad-urach.de', 'info@bad-urach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wannweil', 'Gemeindeverwaltung Wannweil', 'Hauptstr. 11','72827', 'Wannweil', '07121 9585-0', 'http://www.wannweil.de', 'info@gemeinde-wannweil.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zwiefalten', 'Gemeindeverwaltung Zwiefalten', 'Marktplatz 3','88529', 'Zwiefalten', '07373 205-0', 'http://www.zwiefalten.de', 'info@zwiefalten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Walddorfhslach', 'Gemeindeverwaltung Walddorfhslach', 'Hauptstr. 9','72141', 'Walddorfhslach', '07127 9266-0', 'http://www.walddorfhaeslach.de', 'info@walddorfhaeslach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rmerstein', 'Gemeindeverwaltung Rmerstein', 'Albstr. 2','72587', 'Rmerstein', '07382 9398-11', 'http://www.roemerstein.de', 'Donth@roemerstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Engstingen', 'Gemeindeverwaltung Engstingen', 'Kirchstr. 6','72829', 'Engstingen', '07129 9399-0', 'http://www.engstingen.de', 'info@engstingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohenstein', 'Gemeindeverwaltung Hohenstein', 'Im Dorf 14','72531', 'Hohenstein', '07387 9870-0', 'http://www.gemeinde-hohenstein.de', 'rathaus@gemeinde-hohenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sonnenbhl', 'Gemeindeverwaltung Sonnenbhl', 'Hauptstr. 2','72820', 'Sonnenbhl', '07128 925-0', 'http://www.sonnenbuehl.de', 'info@sonnenbuehl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lichtenstein', 'Gemeindeverwaltung Lichtenstein', 'Rathausplatz 17','72805', 'Lichtenstein', '07129 696-0', 'http://www.gemeinde-lichtenstein.de', 'info@gemeinde-lichtenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'St. Johann', 'Gemeindeverwaltung St. Johann', 'Schulstr. 1','72813', 'St. Johann', '07122 8299-0', 'http://www.st-johann.de', 'Florian.Bauer@st-johann.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bodelshausen', 'Gemeindeverwaltung Bodelshausen', 'Am Burghof 8','72411', 'Bodelshausen', '07471 708-0', 'http://www.bodelshausen.de', 'info@bodelshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettenhausen', 'Gemeindeverwaltung Dettenhausen', 'Bismarckstr. 7','72135', 'Dettenhausen', '07157 126-0', 'http://www.dettenhausen.de', 'gemeinde@dettenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dulingen', 'Gemeindeverwaltung Dulingen', 'Rathausplatz 1','72144', 'Dulingen', '07072 9299-0', 'http://www.dusslingen.de', 'THoelsch@dusslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gomaringen', 'Gemeindeverwaltung Gomaringen', 'Rathausstr. 4','72810', 'Gomaringen', '07072 9155-0', 'http://www.gomaringen.de', 'info@gomaringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hirrlingen', 'Gemeindeverwaltung Hirrlingen', 'Schlohof 1','72145', 'Hirrlingen', '07478 9311-0', 'http://www.hirrlingen.de', 'wild@hirrlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchentellinsfurt', 'Gemeindeverwaltung Kirchentellinsfurt', 'Rathausplatz 1','72138', 'Kirchentellinsfurt', '07121 9005-0', 'http://www.kirchentellinsfurt.de', 'bernd.haug@kirchentellinsfurt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kusterdingen', 'Gemeindeverwaltung Kusterdingen', 'Kirchentellinsfurter Str. 9','72127', 'Kusterdingen', '07071 1308-0', 'http://www.kusterdingen.de', 'rathaus@kusterdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mssingen', 'Stadtverwaltung Mssingen', 'Freiherr-vom-Stein-Strae 20','72116', 'Mssingen', '07473 370-100', 'http://www.moessingen.de', 'info@moessingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nehren', 'Gemeindeverwaltung Nehren', 'Hauptstr. 32','72147', 'Nehren', '07473 3785-0', 'http://www.nehren.de', 'info@nehren.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ofterdingen', 'Gemeindeverwaltung Ofterdingen', 'Rathausgasse 2','72131', 'Ofterdingen', '07473 3780-0', 'http://www.ofterdingen.de', 'rathaus@ofterdingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rottenburg am Neckar', 'Stadtverwaltung Rottenburg am Neckar', 'Marktplatz 18','72108', 'Rottenburg am Neckar', '07472 165-0', 'http://www.rottenburg.de', 'stadt@rottenburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Tbingen', 'Stadtverwaltung Tbingen', 'Am Markt 1','72070', 'Tbingen', '07071 204-0', 'http://www.tuebingen.de', 'stadt@tuebingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ammerbuch', 'Gemeindeverwaltung Ammerbuch', 'Kirchstr. 6','72119', 'Ammerbuch', '07073 9171-0', 'http://www.ammerbuch.de', 'info@ammerbuch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neustetten', 'Gemeindeverwaltung Neustetten', 'Hohenzollernstr. 4','72149', 'Neustetten', '07472 9365-0', 'http://www.neustetten.de', 'gemeinde@neustetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Starzach', 'Gemeindeverwaltung Starzach', 'Hauptstr. 15','72181', 'Starzach', '07483 188-0', 'http://www.starzach.de', 'gemeinde@starzach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Balingen', 'Stadtverwaltung Balingen', 'Frberstr. 2','72336', 'Balingen', '07433 170-0', 'http://www.balingen.de', 'stadt@balingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bisingen', 'Gemeindeverwaltung Bisingen', 'Heidelbergstr. 9','72406', 'Bisingen', '07476 896-0', 'http://www.bisingen.de', 'info@bisingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bitz', 'Gemeindeverwaltung Bitz', 'Hindenburgplatz 7','72475', 'Bitz', '07431 8001-0', 'http://www.bitz.de', 'Hubert.Schiele@bitz.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Burladingen', 'Stadtverwaltung Burladingen', 'Hauptstr. 49','72393', 'Burladingen', '07475 892-0', 'http://www.burladingen.de', 'info@burladingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dautmergen', 'Gemeindeverwaltung Dautmergen', 'Grabenstr. 1','72356', 'Dautmergen', '07427 2507', 'http:\\www.gemeinde-dautmergen.de', 'rathaus-dautmergen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dormettingen', 'Gemeindeverwaltung Dormettingen', 'Wasenstr. 38','72358', 'Dormettingen', '07427 2504', 'http://www.dormettingen.de', 'gemeinde@dormettingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dotternhausen', 'Gemeindeverwaltung Dotternhausen', 'Hauptstr. 21','72359', 'Dotternhausen', '07427 9405-0', 'http://www.dotternhausen.de', 'info@dotternhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Geislingen', 'Stadtverwaltung Geislingen', 'Vorstadtstr. 9','72351', 'Geislingen', '07433 9684-0', 'http://www.stadt-geislingen.de', 'info@stadt-geislingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grosselfingen', 'Gemeindeverwaltung Grosselfingen', 'Bruderschaftsstr. 66','72415', 'Grosselfingen', '07476 9440-0', 'http://www.grosselfingen.de', 'moeller@grosselfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Haigerloch', 'Stadtverwaltung Haigerloch', 'Oberstadtstr. 11','72401', 'Haigerloch', '07474 697-0', 'http://www.haigerloch.de', 'info@haigerloch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hausen am Tann', 'Gemeindeverwaltung Hausen am Tann', 'Mhlstr. 6','72361', 'Hausen am Tann', '07436 424', 'http://www.hausen-am-tann.de', 'kontakt@hausen-am-tann.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hechingen', 'Stadtverwaltung Hechingen', 'Marktplatz 1','72379', 'Hechingen', '07471 940-0', 'http://www.hechingen.de', 'buero.bm@hechingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Jungingen', 'Gemeindeverwaltung Jungingen', 'Lehrstr. 3','72417', 'Jungingen', '07477 873-0', 'http://www.gemeinde-jungingen.de', 'info@jungingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mestetten', 'Stadtverwaltung Mestetten', 'Hauptstr. 9','72469', 'Mestetten', '07431 6349-0', 'http://www.messstetten.de', 'stadt@messstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nusplingen', 'Gemeindeverwaltung Nusplingen', 'Marktplatz 8','72362', 'Nusplingen', '07429 93109-0', 'http://www.nusplingen.de', 'info@nusplingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obernheim', 'Gemeindeverwaltung Obernheim', 'Hauptstr. 8','72364', 'Obernheim', '07436 9284-0', 'http://www.obernheim.de', 'info@obernheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rangendingen', 'Gemeindeverwaltung Rangendingen', 'Schulstr. 8','72414', 'Rangendingen', '07471 9979-12', 'http://www.rangendingen.de', 'widmaier@rangendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ratshausen', 'Gemeindeverwaltung Ratshausen', 'Schlohof 4','72365', 'Ratshausen', '07427 91188', 'http://www.ratshausen.de', 'kontakt@ratshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Rosenfeld', 'Stadtverwaltung Rosenfeld', 'Frauenberggasse 1','72348', 'Rosenfeld', '07428 9392-0', 'http://www.rosenfeld.de', 'bm.miller@rosenfeld.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schmberg', 'Stadtverwaltung Schmberg', 'Alte Hauptstr. 7','72355', 'Schmberg', '07427 9402-0', 'http://www.stadt-schoemberg.de/', 'bm.sprenger@stadt-schoemberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Straberg', 'Gemeindeverwaltung Straberg', 'Lindenstr. 5','72479', 'Straberg', '07434 9384-0', 'http://www.strassberg.de', 'Zeiser@strassberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weilen unter den Rinnen', 'Gemeindeverwaltung Weilen unter den Rinnen', 'Angelstr. 1','72367', 'Weilen unter den Rinnen', '07427 2516', 'http://weilen-udr.de/', 'gemeinde@weilen-udr.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Winterlingen', 'Gemeindeverwaltung Winterlingen', 'Marktstr. 7','72474', 'Winterlingen', '07434 279-0', 'http://www.winterlingen.de', 'rathaus@winterlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Zimmern unter der Burg', 'Gemeindeverwaltung Zimmern unter der Burg', 'Kirchstr. 5','72369', 'Zimmern unter der Burg', '07427 2518', 'http://www.zimmern-udb.de/', 'bgm-z@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Albstadt', 'Stadtverwaltung Albstadt', 'Marktstr. 35','72458', 'Albstadt', '07431 160-0', 'http://www.albstadt.de', 'stadtverwaltung@albstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ulm', 'Stadtverwaltung Ulm', 'Marktplatz 1','89073', 'Ulm', '0731/161-0', 'http://www.ulm.de', 'info@ulm.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Allmendingen', 'Gemeindeverwaltung Allmendingen', 'Hauptstr. 16','89604', 'Allmendingen', '07391 7015-0', 'http://www.allmendingen.de', 'info@allmendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altheim', 'Gemeindeverwaltung Altheim', 'Hauptstr. 15','89605', 'Altheim', '07391 7015-0', 'http://www.altheim-info.de', 'info@allmendingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altheim (Alb)', 'Gemeindeverwaltung Altheim (Alb)', 'Schmiedgasse 15','89174', 'Altheim (Alb)', '07340 9601-0', 'http://www.altheim-alb.de', 'info@altheim-alb.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Amstetten', 'Gemeindeverwaltung Amstetten', 'Lonetalstr. 19','73340', 'Amstetten', '07331 3006-0', 'http://www.amstetten.de', 'j.raab@amstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Asselfingen', 'Gemeindeverwaltung Asselfingen', 'Lindenstr. 6','89176', 'Asselfingen', '07345 5306', 'http://www.asselfingen.de/', 'info@asselfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ballendorf', 'Gemeindeverwaltung Ballendorf', 'Mehrstetter Str. 13','89177', 'Ballendorf', '07340 919110', 'www.ballendorf.de', 'info@ballendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Beimerstetten', 'Gemeindeverwaltung Beimerstetten', 'Kirchgasse 1','89179', 'Beimerstetten', '07348 6081+6082', 'http://www.beimerstetten.de', 'info@beimerstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Berghlen', 'Gemeindeverwaltung Berghlen', 'Hauptstr. 2','89180', 'Berghlen', '07344 9686-0', 'http://www.berghuelen.de', 'info@berghuelen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bernstadt', 'Gemeindeverwaltung Bernstadt', 'Schmiedgasse 5','89182', 'Bernstadt', '07348 6024', 'http://www.bernstadt-wuertt.de', 'Oliver.Suehring@bernstadt-wuertt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Blaubeuren', 'Stadtverwaltung Blaubeuren', 'Karlstr. 2','89143', 'Blaubeuren', '07344 9669-0', 'http://www.blaubeuren.de', 'info@blaubeuren.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Brslingen', 'Gemeindeverwaltung Brslingen', 'Hauptstr. 25','89177', 'Brslingen', '07340 919040', '', 'info@boerslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Breitingen', 'Gemeindeverwaltung Breitingen', 'Neenstetter Str. 17','89183', 'Breitingen', '07340 919106', 'http://www.breitingen-lonetal.de', 'info@breitingen-lonetal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Dietenheim', 'Stadtverwaltung Dietenheim', 'Knigstr. 63','89165', 'Dietenheim', '07347 9696-0', 'http://www.dietenheim.de', 'stadtverwaltung@dietenheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dornstadt', 'Gemeindeverwaltung Dornstadt', 'Kirchplatz 2','89160', 'Dornstadt', '07348 9867-0', 'http://www.dornstadt.de', 'info@dornstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ehingen (Donau)', 'Stadtverwaltung Ehingen (Donau)', 'Marktplatz 1','89584', 'Ehingen (Donau)', '07391 503-0', 'http://www.ehingen.de', 'info@ehingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Emeringen', 'Gemeindeverwaltung Emeringen', 'Lederstr. 2','88499', 'Emeringen', '07373 2873', 'http://www.emeringen.eu/', 'info@emeringen.eu'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Emerkingen', 'Gemeindeverwaltung Emerkingen', 'Schlostr. 23','89607', 'Emerkingen', '07393 2239', 'http://www.emerkingen.de', 'paul.burger@emerkingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Erbach', 'Stadtverwaltung Erbach', 'Erlenbachstr. 50','89155', 'Erbach', '07305 9676-0', 'http://www.erbach-donau.de', 'info@erbach-donau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Griesingen', 'Gemeindeverwaltung Griesingen', 'Alte Landstr. 51','89608', 'Griesingen', '07391 8748', 'http://www.griesingen.de', 'sekretariat@griesingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grundsheim', 'Gemeindeverwaltung Grundsheim', 'Kirchweg 1','89613', 'Grundsheim', '07357 91030', 'http://www.grundsheim.de', 'info@grundsheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hausen am Bussen', 'Gemeindeverwaltung Hausen am Bussen', 'Unterdorfstr. 7','89597', 'Hausen am Bussen', '07393 2449', 'http://www.hausen-am-bussen.de/', 'info@hausen-am-bussen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Holzkirch', 'Gemeindeverwaltung Holzkirch', 'Breitinger Str.4','89183', 'Holzkirch', '07340 919010', 'www.holzkirch.de', 'info@holzkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Httisheim', 'Gemeindeverwaltung Httisheim', 'Hauptstr. 33','89185', 'Httisheim', '07305 7263', 'http://www.huettisheim.de/', 'info@huettisheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Illerrieden', 'Gemeindeverwaltung Illerrieden', 'Wochenauer Str. 1','89186', 'Illerrieden', '07306 9696-0', 'http://www.illerrieden.de', 'info@illerrieden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Laichingen', 'Stadtverwaltung Laichingen', 'Bahnhofstr. 26','89150', 'Laichingen', '07333 85-10', 'http://www.laichingen.de', 'kkaufmann@laichingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Langenau', 'Stadtverwaltung Langenau', 'Marktplatz 1','89129', 'Langenau', '07345 9622-0', 'http://www.langenau.de', 'info@langenau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lauterach', 'Gemeindeverwaltung Lauterach', 'Lautertalstr. 16','89584', 'Lauterach', '07375 227', 'http://www.gemeinde-lauterach.de', 'info@gemeinde-lauterach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Lonsee', 'Gemeindeverwaltung Lonsee', 'Hindenburgstr. 16','89173', 'Lonsee', '07336 81-0', 'http://www.lonsee.de', 'rathaus@lonsee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Merklingen', 'Gemeindeverwaltung Merklingen', 'Hauptstr. 31','89188', 'Merklingen', '07337 9620-0', 'http://www.merklingen.de', 'sven.kneipp@merklingen.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Munderkingen', 'Stadtverwaltung Munderkingen', 'Marktstr. 1','89597', 'Munderkingen', '07393 598-0', 'http://www.munderkingen.de', 'rathaus@munderkingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neenstetten', 'Gemeindeverwaltung Neenstetten', 'Dorfplatz 1','89189', 'Neenstetten', '07340 484', 'www.neenstetten.info', 'info@neenstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nellingen', 'Gemeindeverwaltung Nellingen', 'Schulplatz 17','89191', 'Nellingen', '07337 9630-0', 'http://www.nellingen.de', 'info@nellingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Nerenstetten', 'Gemeindeverwaltung Nerenstetten', 'Schulstrae 8','89129', 'Nerenstetten', '07345 919240', 'http://www.nerenstetten.de/', 'info@nerenstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberdischingen', 'Gemeindeverwaltung Oberdischingen', 'Schloplatz 9','89610', 'Oberdischingen', '07305 93113-0', 'http://www.oberdischingen.de', 'info@oberdischingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Obermarchtal', 'Gemeindeverwaltung Obermarchtal', 'Hauptstr. 21','89611', 'Obermarchtal', '07375 205', 'http://www.obermarchtal.de', 'gemeinde@obermarchtal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberstadion', 'Gemeindeverwaltung Oberstadion', 'Kirchplatz 29','89613', 'Oberstadion', '07357 9214-0', 'http://www.oberstadion.de', 'kevin.wiest@oberstadion.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'llingen', 'Gemeindeverwaltung llingen', 'Hauptstr. 42','89129', 'llingen', '07345 7502', 'http://www.oellingen-albdonau.de', 'info@oellingen-albdonau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'pfingen', 'Gemeindeverwaltung pfingen', 'Schlohofstr. 10','89614', 'pfingen', '07391 7084-0', 'http://www.oepfingen.de', 'info@oepfingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rammingen', 'Gemeindeverwaltung Rammingen', 'Rathausgasse 7','89192', 'Rammingen', '07345 9125-0', 'http://www.rammingen-bw.de/', 'Karl.Haecker@rammingen-bw.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rechtenstein', 'Gemeindeverwaltung Rechtenstein', 'Braunselweg 2','89611', 'Rechtenstein', '07375 244', 'http://www.rechtenstein.de', 'gemeinde@rechtenstein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rottenacker', 'Gemeindeverwaltung Rottenacker', 'Bhlstr. 7','89616', 'Rottenacker', '07393 9504-0', 'http://www.rottenacker.de', 'hauler@rottenacker.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Schelklingen', 'Stadtverwaltung Schelklingen', 'Marktstr. 15','89601', 'Schelklingen', '07394 248-0', 'http://www.schelklingen.de', 'info@schelklingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schnrpflingen', 'Gemeindeverwaltung Schnrpflingen', 'Hauptstr. 17','89194', 'Schnrpflingen', '07346 3664', 'http://www.schnuerpflingen.de', 'info@schnuerpflingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Setzingen', 'Gemeindeverwaltung Setzingen', 'Kirchstr. 4','89129', 'Setzingen', '07345 919076', 'http://www.setzingen.de/', 'info@setzingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Untermarchtal', 'Gemeindeverwaltung Untermarchtal', 'Bahnhofstr. 4','89617', 'Untermarchtal', '07393 917383', 'www.gemeinde-untermarchtal.de', 'gemeindeverw.-untermarchtal@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterstadion', 'Gemeindeverwaltung Unterstadion', 'Kirchstr. 3','89619', 'Unterstadion', '07393 1648', 'http://www.unterstadion.de', 'info@unterstadion.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterwachingen', 'Gemeindeverwaltung Unterwachingen', 'Kirchstr. 2','89597', 'Unterwachingen', '07393 1649', 'http:\\www.unterwachingen.de', 'info@unterwachingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Weidenstetten', 'Gemeindeverwaltung Weidenstetten', 'Dorfplatz 1','89197', 'Weidenstetten', '07340 9640-0', 'http://www.weidenstetten.de', 'info@weidenstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Westerheim', 'Gemeindeverwaltung Westerheim', 'Kirchenplatz 16','72589', 'Westerheim', '07333 9666-12', 'http://www.westerheim.de', 'walz@westerheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Westerstetten', 'Gemeindeverwaltung Westerstetten', 'Kirchstr. 3','89198', 'Westerstetten', '07348 9560-0', 'http://www.westerstetten.de', 'bourke@westerstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Illerkirchberg', 'Gemeindeverwaltung Illerkirchberg', 'Hauptstr. 49','89171', 'Illerkirchberg', '07346 9609-0', 'http://www.illerkirchberg.de', 'info@illerkirchberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Staig', 'Gemeindeverwaltung Staig', 'Raiffeisenstr.7','89195', 'Staig', '07346 9603-0', 'http://www.staig.de', 'martin.jung@staig.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heroldstatt', 'Gemeindeverwaltung Heroldstatt', 'Am Berg 1','72535', 'Heroldstatt', '07389 9090-0', 'http://www.heroldstatt.de', 'info@heroldstatt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Balzheim', 'Gemeindeverwaltung Balzheim', 'Am Dorfplatz 8','88481', 'Balzheim', '07347 9578-0', 'http://www.balzheim.de', 'Herrmann@gemeinde.balzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Blaustein', 'Stadtverwaltung Blaustein', 'Marktplatz 2','89134', 'Blaustein', '07304 802-501', 'http://www.blaustein.de', 'stadt@blaustein.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Achstetten', 'Gemeindeverwaltung Achstetten', 'Laupheimer Str. 6','88480', 'Achstetten', '07392 9706-0', 'http://www.achstetten.de', 'info@achstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Alleshausen', 'Gemeindeverwaltung Alleshausen', 'Hauptstr. 10','88422', 'Alleshausen', '07582 8178', 'http://www.alleshausen.de/', 'gemeinde@alleshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Allmannsweiler', 'Gemeindeverwaltung Allmannsweiler', 'Buchauer Str. 2','88348', 'Allmannsweiler', '07582 91333', 'http://www.allmannsweiler-bc.de', 'info@allmannsweiler-bc.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altheim', 'Gemeindeverwaltung Altheim', 'Donaustr. 1','88499', 'Altheim', '07371 9330-0', 'http://www.gemeinde-altheim.de', 'info@gemeinde-altheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Attenweiler', 'Gemeindeverwaltung Attenweiler', 'Bachstr. 7','88448', 'Attenweiler', '07357 9209-0', 'http://www.attenweiler.de/', 'Rathaus@Attenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Buchau', 'Stadtverwaltung Bad Buchau', 'Marktplatz 2','88422', 'Bad Buchau', '07582 808-0', 'http://www.badbuchau.de', 'stadt@bad-buchau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Schussenried', 'Stadtverwaltung Bad Schussenried', 'Wilhelm-Schussen-Str. 36','88427', 'Bad Schussenried', '07583 9401-0', 'http://www.bad-schussenried.de', 'rathaus@bad-schussenried.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Berkheim', 'Gemeindeverwaltung Berkheim', 'Coubronplatz 1','88450', 'Berkheim', '08395 9406-0', 'http://www.gemeinde-berkheim.de', 'info@gemeinde-berkheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Betzenweiler', 'Gemeindeverwaltung Betzenweiler', 'Riedlinger Str. 2','88422', 'Betzenweiler', '07374 418', 'http://www.betzenweiler.de', 'gemeinde@betzenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Biberach an der Ri', 'Stadtverwaltung Biberach an der Ri', 'Hindenburgstr. 1','88400', 'Biberach an der Ri', '07351 51-0', 'http://www.biberach-riss.de', 'info@biberach-riss.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Burgrieden', 'Gemeindeverwaltung Burgrieden', 'Rathausplatz 2','88483', 'Burgrieden', '07392 9719-0', 'http://www.burgrieden.de', 'rathaus@burgrieden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Dettingen an der Iller', 'Gemeindeverwaltung Dettingen an der Iller', 'Oberdettinger Str. 16','88451', 'Dettingen an der Iller', '07354 1077+1078', 'http://www.dettingen-iller.de', 'info@dettingen-iller.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drmentingen', 'Gemeindeverwaltung Drmentingen', 'Hauptstr. 20','88525', 'Drmentingen', '07371 9507-0', 'http://www.duermentingen.de', 'dholstein@duermentingen.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Drnau', 'Gemeindeverwaltung Drnau', 'Im Winkel 2','88422', 'Drnau', '07582 2317', 'www.duernau-bc.de', 'info@duernau-bc.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eberhardzell', 'Gemeindeverwaltung Eberhardzell', 'Burgstr. 2','88436', 'Eberhardzell', '07355 9300-0', 'http://www.eberhardzell.de', 'gemeinde@eberhardzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erlenmoos', 'Gemeindeverwaltung Erlenmoos', 'Biberacher Str. 11','88416', 'Erlenmoos', '07352 9205-0', 'http://www.erlenmoos.de/', 'info@erlenmoos.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Erolzheim', 'Gemeindeverwaltung Erolzheim', 'Marktplatz 7','88453', 'Erolzheim', '07354 9318-0', 'http://www.erolzheim.de', 'poststelle@erolzheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ertingen', 'Gemeindeverwaltung Ertingen', 'Drmentinger Str. 14','88521', 'Ertingen', '07371 508-0', 'http://www.ertingen.de', 'info@ertingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hochdorf', 'Gemeindeverwaltung Hochdorf', 'Hauptstr. 29','88454', 'Hochdorf', '07355 9302-0', 'http://www.gemeinde-hochdorf.de', 'info@gemeinde-hochdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ingoldingen', 'Gemeindeverwaltung Ingoldingen', 'St. Georgenstr. 1','88456', 'Ingoldingen', '07355 9304-0', 'http://www.ingoldingen.de', 'info@ingoldingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kanzach', 'Gemeindeverwaltung Kanzach', 'Rathausweg 6','88422', 'Kanzach', '07582 8286', 'http://www.gemeinde-kanzach.de', 'info@gemeinde-kanzach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchberg an der Iller', 'Gemeindeverwaltung Kirchberg an der Iller', 'Hauptstr. 20','88486', 'Kirchberg an der Iller', '07354 9316-0', 'http://www.kirchberg-iller.de', 'info@kirchberg-iller.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kirchdorf an der Iller', 'Gemeindeverwaltung Kirchdorf an der Iller', 'Rathausstr. 11','88457', 'Kirchdorf an der Iller', '07354 9332-0', 'http://www.kirchdorf-iller.de', 'rainer.langenbacher@kirchdorf-iller.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Langenenslingen', 'Gemeindeverwaltung Langenenslingen', 'Hauptstr. 71','88515', 'Langenenslingen', '07376 969-0', 'http://www.langenenslingen.de', 'bmschneider@langenenslingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Laupheim', 'Stadtverwaltung Laupheim', 'Marktplatz 1','88471', 'Laupheim', '07392 704-0', 'http://www.laupheim.de', 'stadt.laupheim@laupheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Maselheim', 'Gemeindeverwaltung Maselheim', 'Wennedacher Str. 5','88437', 'Maselheim', '07351 1840-0', 'http://www.maselheim.de', 'info@maselheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mietingen', 'Gemeindeverwaltung Mietingen', 'Hauptstr. 8','88487', 'Mietingen', '07392 9720-0', 'http://www.mietingen.de', 'info@mietingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Mittelbiberach', 'Gemeindeverwaltung Mittelbiberach', 'Biberacher Str. 59','88441', 'Mittelbiberach', '07351 1818-0', 'http://www.mittelbiberach.de', 'info@mittelbiberach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Moosburg', 'Gemeindeverwaltung Moosburg', 'Bad Buchauer Str. 57','88422', 'Moosburg', '07374 2329', 'http://www.moosburg-am-federsee.de', 'gemeinde@moosburg-am-federsee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ochsenhausen', 'Stadtverwaltung Ochsenhausen', 'Marktplatz 1','88416', 'Ochsenhausen', '07352 9220-0', 'http://www.ochsenhausen.de', 'stadt@ochsenhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oggelshausen', 'Gemeindeverwaltung Oggelshausen', 'Schulstr. 5','88422', 'Oggelshausen', '07582 91227', 'http://www.oggelshausen.de', 'rkriz@oggelshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Riedlingen', 'Stadtverwaltung Riedlingen', 'Marktplatz 1','88499', 'Riedlingen', '07371 183-0', 'http://www.riedlingen.de', 'mschafft@riedlingen.de '); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Rot an der Rot', 'Gemeindeverwaltung Rot an der Rot', 'Klosterhof 14','88430', 'Rot an der Rot', '08395 9405-0', 'http://www.rot.de', 'rathaus@rot.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwendi', 'Gemeindeverwaltung Schwendi', 'Biberacher Str. 1','88477', 'Schwendi', '07353 9800-0', 'http://www.schwendi.de', 'rathaus.info@schwendi.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Seekirch', 'Gemeindeverwaltung Seekirch', 'Hauptstr. 23','88422', 'Seekirch', '07582 91296', 'http://www.seekirch.de/', 'info@seekirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Steinhausen an der Rottum', 'Gemeindeverwaltung Steinhausen an der Rottum', 'Ehrensberger Str. 13','88416', 'Steinhausen an der Rottum', '07352 9227-0', 'http://www.steinhausen-rottum.de', 'heine@steinhausen-rottum.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tannheim', 'Gemeindeverwaltung Tannheim', 'Rathausplatz 1','88459', 'Tannheim', '08395 922-0', 'http://www.gemeinde-tannheim.de', 'info@gemeinde-tannheim.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Tiefenbach', 'Gemeindeverwaltung Tiefenbach', 'Buchauer Str. 21','88422', 'Tiefenbach', '07582 2330', 'http:\\www.tiefenbach-federsee.de', 'tiefenbach@bad-buchau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ummendorf', 'Gemeindeverwaltung Ummendorf', 'Biberacher Str. 9','88444', 'Ummendorf', '07351 3477-0', 'http://www.ummendorf.de', 'info@ummendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unlingen', 'Gemeindeverwaltung Unlingen', 'Kirchgasse 11','88527', 'Unlingen', '07371 9305-0', 'http://www.unlingen.de', 'ehoelzl@unlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Uttenweiler', 'Gemeindeverwaltung Uttenweiler', 'Hauptstr. 14','88524', 'Uttenweiler', '07374 9206-0', 'http://www.gemeinde-uttenweiler.de', 'info@gemeinde-uttenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wain', 'Gemeindeverwaltung Wain', 'Kirchstr. 17','88489', 'Wain', '07353 9803-0', 'http://www.wain.de', 'stephan.mantz@wain.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Warthausen', 'Gemeindeverwaltung Warthausen', 'Alte Biberacher Str. 13','88447', 'Warthausen', '07351 5093-0', 'http://www.warthausen.de', 'gemeinde@warthausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schemmerhofen', 'Gemeindeverwaltung Schemmerhofen', 'Hauptstr. 25','88433', 'Schemmerhofen', '07356 9356-0', 'http://www.schemmerhofen.de', 'mario.glaser@schemmerhofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Gutenzell-Hrbel', 'Gemeindeverwaltung Gutenzell-Hrbel', 'Kirchberger Str. 8','88484', 'Gutenzell-Hrbel', '07352 9235-0', 'http://www.gutenzell-huerbel.de', 'info@gutenzell-huerbel.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bermatingen', 'Gemeindeverwaltung Bermatingen', 'Salemer Str. 1','88697', 'Bermatingen', '07544 9502-0', 'http://www.bermatingen.de', 'martin.rupp@bermatingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Daisendorf', 'Gemeindeverwaltung Daisendorf', 'Ortsstr. 22','88718', 'Daisendorf', '07532 5464', 'http://www.daisendorf.de', 'info@daisendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eriskirch', 'Gemeindeverwaltung Eriskirch', 'Schussenstr.18','88097', 'Eriskirch', '07541 9708-0', 'http://www.eriskirch.de', 'info@eriskirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Frickingen', 'Gemeindeverwaltung Frickingen', 'Kirchstr. 7','88699', 'Frickingen', '07554 9830-0', 'http://www.frickingen.de', 'juergen.stukle@frickingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Friedrichshafen', 'Stadtverwaltung Friedrichshafen', 'Adenauerplatz 1','88045', 'Friedrichshafen', '07541 203-0', 'http://www.friedrichshafen.de', 'stadtverwaltung@friedrichshafen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hagnau am Bodensee', 'Gemeindeverwaltung Hagnau am Bodensee', 'Im Hof 5','88709', 'Hagnau am Bodensee', '07532 4300-11', 'http://www.hagnau.de', 'VFrede@hagnau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Heiligenberg', 'Gemeindeverwaltung Heiligenberg', 'Schulstr. 5','88633', 'Heiligenberg', '07554 9983-0', 'http://www.heiligenberg.de', 'rathaus@heiligenberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Immenstaad am Bodensee', 'Gemeindeverwaltung Immenstaad am Bodensee', 'Dr.-Zimmermann-Str. 1','88090', 'Immenstaad am Bodensee', '07545 201-0', 'http://www.immenstaad.de', 'rathaus@immenstaad.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kressbronn am Bodensee', 'Gemeindeverwaltung Kressbronn am Bodensee', 'Hauptstr. 19','88079', 'Kressbronn am Bodensee', '07543 9662-0', 'http://www.kressbronn.de', 'rathaus@kressbronn.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Langenargen', 'Gemeindeverwaltung Langenargen', 'Obere Seestr. 1','88085', 'Langenargen', '07543 9330-0', 'http://www.langenargen.de', 'rathaus@langenargen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Markdorf', 'Stadtverwaltung Markdorf', 'Rathausplatz 1','88677', 'Markdorf', '07544 500-0', 'http://www.markdorf.de', 'buergermeister@rathaus-markdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Meckenbeuren', 'Gemeindeverwaltung Meckenbeuren', 'Theodor-Heuss-Platz 1','88074', 'Meckenbeuren', '07542 403-0', 'http://www.meckenbeuren.de', 'rathaus@meckenbeuren.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Meersburg', 'Stadtverwaltung Meersburg', 'Marktplatz 1','88709', 'Meersburg', '07532 440-0', 'http://www.meersburg.de', 'info@meersburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neukirch', 'Gemeindeverwaltung Neukirch', 'Schulstr. 3','88099', 'Neukirch', '07528 92092-0', 'http://www.gemeinde-neukirch.de', 'Schnell@neukirch-gemeinde.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Oberteuringen', 'Gemeindeverwaltung Oberteuringen', 'St.-Martin-Platz 9','88094', 'Oberteuringen', '07546 299-0', 'http://www.oberteuringen.de', 'ralf.messmer@oberteuringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Owingen', 'Gemeindeverwaltung Owingen', 'Hauptstr. 35','88696', 'Owingen', '07551 8094-0', 'http://www.owingen.de', 'info@owingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Salem', 'Gemeindeverwaltung Salem', 'Leutkircher Str. 1','88682', 'Salem', '07553 823-14', 'http://www.salem-baden.de', 'MHaerle@salem-baden.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sipplingen', 'Gemeindeverwaltung Sipplingen', 'Rathausstr. 10','78354', 'Sipplingen', '07551 8096-0', 'http://www.sipplingen.de', 'gemeinde@sipplingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Stetten', 'Gemeindeverwaltung Stetten', 'Schulstr. 18','88719', 'Stetten', '07532 6095', 'http://www.gemeinde-stetten.de', 'rathaus@gemeinde-stetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Tettnang', 'Stadtverwaltung Tettnang', 'Montfortplatz 7','88069', 'Tettnang', '07542 510-0', 'http://www.tettnang.de', 'rathaus@tettnang.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'berlingen', 'Stadtverwaltung berlingen', 'Mnsterstr. 15-17','88662', 'berlingen', '07551 99-0', 'http://www.ueberlingen.de', 'rathaus@ueberlingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Uhldingen-Mhlhofen', 'Gemeindeverwaltung Uhldingen-Mhlhofen', 'Aachstr. 4','88690', 'Uhldingen-Mhlhofen', '07556 717-0', 'http://www.uhldingen-muehlhofen.de', 'rathaus@uhldingen-muehlhofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Deggenhausertal', 'Gemeindeverwaltung Deggenhausertal', 'Rathausplatz 1','88693', 'Deggenhausertal', '07555 9200-0', 'http://www.deggenhausertal.de', 'Fabian.Meschenmoser@deggenhausertal.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Achberg', 'Gemeindeverwaltung Achberg', 'Kirchstr. 9','88147', 'Achberg', '08380 226', 'http://www.achberg.de', 'info@achberg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aichstetten', 'Gemeindeverwaltung Aichstetten', 'Bachstr. 2','88317', 'Aichstetten', '07565 9418-0', 'http://www.aichstetten.de', 'rathaus@aichstetten.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Aitrach', 'Gemeindeverwaltung Aitrach', 'Schwalweg 10','88319', 'Aitrach', '07565 98000', 'http://www.aitrach.de', 'gemeinde@aitrach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Altshausen', 'Gemeindeverwaltung Altshausen', 'Hindenburgstr. 3','88361', 'Altshausen', '07584 9206-0', 'http://www.altshausen.de', 'info@altshausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Amtzell', 'Gemeindeverwaltung Amtzell', 'Waldburger Str. 4','88279', 'Amtzell', '07520 950-0', 'http://www.amtzell.de', 'clemens.moll@amtzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Aulendorf', 'Stadtverwaltung Aulendorf', 'Hauptstr. 35','88326', 'Aulendorf', '07525 934-0', 'http://www.aulendorf.de', 'info@aulendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Waldsee', 'Stadtverwaltung Bad Waldsee', 'Hauptstr. 29','88339', 'Bad Waldsee', '07524 94-0', 'http://www.bad-waldsee.de', 'info@bad-waldsee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Wurzach', 'Stadtverwaltung Bad Wurzach', 'Marktstr. 16','88410', 'Bad Wurzach', '07564 302-0', 'http://www.bad-wurzach.de', 'info@bad-wurzach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Baienfurt', 'Gemeindeverwaltung Baienfurt', 'Marktplatz 1','88255', 'Baienfurt', '0751 4000-0', 'http://www.baienfurt.de', 'guenter.a.binder@baienfurt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Baindt', 'Gemeindeverwaltung Baindt', 'Marsweilerstr. 4','88255', 'Baindt', '07502 9406-0', 'http://www.baindt.de', 'info@baindt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Berg', 'Gemeindeverwaltung Berg', 'Bergstr. 35','88276', 'Berg', '0751 56084-0', 'http://www.berg-schussental.de', 'rathaus@berg-schussental.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bergatreute', 'Gemeindeverwaltung Bergatreute', 'Ravensburger Str. 20','88368', 'Bergatreute', '07527 9216-0', 'http://www.bergatreute.de', 'schaefer@bergatreute.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bodnegg', 'Gemeindeverwaltung Bodnegg', 'Dorfstrae 18','88285', 'Bodnegg', '07520 9208-0', 'http://www.bodnegg.de', 'gemeindeverwaltung@bodnegg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Boms', 'Gemeindeverwaltung Boms', 'Kirchstr. 1','88361', 'Boms', '07581 4894-0', 'http://www.boms.de', 'Verwaltung@boms.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ebenweiler', 'Gemeindeverwaltung Ebenweiler', 'Unterwaldhauser Str. 2','88370', 'Ebenweiler', '07584 91610', 'http://www.ebenweiler.de', 'gemeinde@ebenweiler.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Eichstegen', 'Gemeindeverwaltung Eichstegen', 'Hauptstr. 11','88361', 'Eichstegen', '07584 783', 'http://www.eichstegen.de', 'eichstegen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fleischwangen', 'Gemeindeverwaltung Fleischwangen', 'Rathausstr. 19','88373', 'Fleischwangen', '07505 273', 'http://www.fleischwangen.de', 'rathaus@fleischwangen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Grnkraut', 'Gemeindeverwaltung Grnkraut', 'Scherzachstr. 2','88287', 'Grnkraut', '0751 7602-0', 'http://www.gruenkraut.de', 'info@gruenkraut.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Guggenhausen', 'Gemeindeverwaltung Guggenhausen', 'Hauptstrae 5','88379', 'Guggenhausen', '07503 534', 'http://www.gvv-altshausen.de', 'gemeinde-guggenhausen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hokirch', 'Gemeindeverwaltung Hokirch', 'Kirchstr. 2','88374', 'Hokirch', '07587 631', 'http://www.gemeinde-hosskirch.de/', 'info@gemeinde-hosskirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Isny im Allgu', 'Stadtverwaltung Isny im Allgu', 'Wassertorstr.1- 3','88316', 'Isny im Allgu', '07562 984-112', 'http://www.isny.de', 'info@isny.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Kilegg', 'Gemeindeverwaltung Kilegg', 'Schlostr. 5','88353', 'Kilegg', '07563 936-0', 'http://www.kisslegg.de', 'Dieter.Krattenmacher@kisslegg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Knigseggwald', 'Gemeindeverwaltung Knigseggwald', 'Hauptstr. 17','88376', 'Knigseggwald', '07587 9502-0', 'http://www.koenigseggwald.de', 'gemeinde@koenigseggwald.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Leutkirch im Allgu', 'Stadtverwaltung Leutkirch im Allgu', 'Marktstr. 26','88299', 'Leutkirch im Allgu', '07561 87-0', 'http://www.leutkirch.de', 'info@leutkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Ravensburg', 'Stadtverwaltung Ravensburg', 'Marienplatz 26','88212', 'Ravensburg', '0751 82-0', 'http://www.ravensburg.de', 'presse-stelle@ravensburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Riedhausen', 'Gemeindeverwaltung Riedhausen', 'Kirchstrae 1','88377', 'Riedhausen', '07587 610', 'http://www.riedhausen.de', 'riedhausen@aol.com'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schlier', 'Gemeindeverwaltung Schlier', 'Rathausstr. 10','88281', 'Schlier', '07529 977-0', 'http://www.schlier.de', 'gemeindeverwaltung@schlier.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Unterwaldhausen', 'Gemeindeverwaltung Unterwaldhausen', 'Hauptstr. 5','88379', 'Unterwaldhausen', '07587 660', 'http://www.gvv-altshausen.de/gemeinden/unterwaldhausen.htm', 'info@rathaus-unterwaldhausen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Vogt', 'Gemeindeverwaltung Vogt', 'Kirchstr. 11','88267', 'Vogt', '07529 209-0', 'http://www.vogt.de', 'smigoc@gemeinde-vogt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Waldburg', 'Gemeindeverwaltung Waldburg', 'Hauptstr. 20','88289', 'Waldburg', '07529 9717-0', 'http://www.gemeinde-waldburg.de', 'Michael.Roeger@gemeinde-waldburg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Wangen im Allgu', 'Stadtverwaltung Wangen im Allgu', 'Marktplatz 1','88239', 'Wangen im Allgu', '07522 74-0', 'http://www.wangen.de', 'info@wangen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Weingarten', 'Stadtverwaltung Weingarten', 'Kirchstr. 1','88250', 'Weingarten', '0751 405-100', 'http://www.weingarten-online.de', 'ob@weingarten-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wilhelmsdorf', 'Gemeindeverwaltung Wilhelmsdorf', 'Saalplatz 7','88271', 'Wilhelmsdorf', '07503 921-111', 'http://www.gemeinde-wilhelmsdorf.de', 'info@gemeinde-wilhelmsdorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wolfegg', 'Gemeindeverwaltung Wolfegg', 'Rtenbacher Str. 11','88364', 'Wolfegg', '07527 9601-0', 'http://www.wolfegg.de', 'wolfegg.info@wolfegg.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wolpertswende', 'Gemeindeverwaltung Wolpertswende', 'Kirchplatz 4','88284', 'Wolpertswende', '07502 9403-0', 'http://www.wolpertswende.de', 'gemeinde@wolpertswende.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ebersbach-Musbach', 'Gemeindeverwaltung Ebersbach-Musbach', 'Kirchplatz 4','88371', 'Ebersbach-Musbach', '07584 9212-0', 'http://www.ebersbach-musbach.de', 'info@ebersbach-musbach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Argenbhl', 'Gemeindeverwaltung Argenbhl', 'Kirchstr. 9','88260', 'Argenbhl', '07566 9402-0', 'http://www.argenbuehl.de', 'info@argenbuehl.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Horgenzell', 'Gemeindeverwaltung Horgenzell', 'Kornstr. 44','88263', 'Horgenzell', '07504 9701-0', 'http://www.horgenzell.de', 'v.restle@horgenzell.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Fronreute', 'Gemeindeverwaltung Fronreute', 'Schwommengasse 2','88273', 'Fronreute', '07502 954-0', 'http://www.fronreute.de', 'info@fronreute.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Beuron', 'Gemeindeverwaltung Beuron', 'Kirchstr. 18','88631', 'Beuron', '07579 9210-0', 'http://www.beuron.de', 'info@beuron.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Bingen', 'Gemeindeverwaltung Bingen', 'Hauptstr. 21','72511', 'Bingen', '07571 7407-0', 'http://www.bingen-hohenzollern.de', 'gemeinde@bingen-hohenzollern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Gammertingen', 'Stadtverwaltung Gammertingen', 'Hohenzollernstr. 5','72501', 'Gammertingen', '07574 406-0', 'http://www.gammertingen.de', 'stadt.gammertingen@t-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Herbertingen', 'Gemeindeverwaltung Herbertingen', 'Holzgasse 6','88518', 'Herbertingen', '07586 9208-0', 'http://www.herbertingen.de', 'Magnus.Hoppe@herbertingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Hettingen', 'Stadtverwaltung Hettingen', 'Rathaus im Schloss','72513', 'Hettingen', '07574 9310-0', 'http://www.hettingen.de', 'kuster@hettingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Hohentengen', 'Gemeindeverwaltung Hohentengen', 'Beizkoferstr. 57','88367', 'Hohentengen', '07572 7602-0', 'http://www.hohentengen-online.de', 'info@hohentengen-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Illmensee', 'Gemeindeverwaltung Illmensee', 'Kirchplatz 5','88636', 'Illmensee', '07558 9207-0', 'http://www.illmensee.de', 'hoffmann@illmensee.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Inzigkofen', 'Gemeindeverwaltung Inzigkofen', 'Ziegelweg 2','72514', 'Inzigkofen', '07571 7307-0', 'http://www.inzigkofen.de', 'post@inzigkofen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Krauchenwies', 'Gemeindeverwaltung Krauchenwies', 'Hausenerstr. 1','72505', 'Krauchenwies', '07576 972-0', 'http://www.krauchenwies.de', 'info@krauchenwies.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Leibertingen', 'Gemeindeverwaltung Leibertingen', 'Rathausstr. 4','88637', 'Leibertingen', '07466 9282-0', 'http://www.leibertingen.de', 'info@leibertingen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mengen', 'Stadtverwaltung Mengen', 'Hauptstr. 90','88512', 'Mengen', '07572 607-0', 'http://www.mengen.de', 'info@mengen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Mekirch', 'Stadtverwaltung Mekirch', 'Conradin-Kreutzer-Str. 1','88605', 'Mekirch', '07575/20621', 'http://www.messkirch.de', 'info@messkirch.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Neufra', 'Gemeindeverwaltung Neufra', 'Im Oberdorf 41','72419', 'Neufra', '07574 9300-0', 'http://www.neufra.de', 'info@neufra.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Ostrach', 'Gemeindeverwaltung Ostrach', 'Hauptstr. 19','88356', 'Ostrach', '07585 300-0', 'www.ostrach.de', 'info@ostrach.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Pfullendorf', 'Stadtverwaltung Pfullendorf', 'Am Kirchplatz 1','88630', 'Pfullendorf', '07552 251-0', 'http://www.pfullendorf.de', 'info@pfullendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Bad Saulgau', 'Stadtverwaltung Bad Saulgau', 'Oberamteistr. 11','88348', 'Bad Saulgau', '07581 207-0', 'http://www.bad-saulgau.de', 'info@bad-saulgau.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Scheer', 'Stadtverwaltung Scheer', 'Hauptstr. 1','72516', 'Scheer', '07572 7616-0', 'http://www.stadtscheer.de', 'info@scheer-online.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Schwenningen', 'Gemeindeverwaltung Schwenningen', 'Alte Pfarrstr. 9','72477', 'Schwenningen', '07579 9212-0', 'http://www.schwenningen.de', 'info@schwenningen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Sigmaringen', 'Stadtverwaltung Sigmaringen', 'Frst-Wilhelm-Str. 15','72488', 'Sigmaringen', '07571 106-0', 'http://www.sigmaringen.de', 'post@sigmaringen.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sigmaringendorf', 'Gemeindeverwaltung Sigmaringendorf', 'Hauptstr. 9','72517', 'Sigmaringendorf', '07571/7305-0', 'http://www.sigmaringendorf.de', 'henne@sigmaringendorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Stetten am kalten Markt', 'Gemeindeverwaltung Stetten am kalten Markt', 'Schlosshof 1','72510', 'Stetten am kalten Markt', '07573 9515-0', 'http://www.stetten-am-kalten-markt.de', 'post@stetten-akm.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Stadtverwaltung', 'Veringenstadt', 'Stadtverwaltung Veringenstadt', 'Im Stdtle 116','72519', 'Veringenstadt', '07577 930-0', 'http://www.veringenstadt.de', 'christ@veringenstadt.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Wald', 'Gemeindeverwaltung Wald', 'Von-Weckenstein-Str. 19','88639', 'Wald', '07578 9216-0', 'http://www.wald.net', 'gemeinde@wald-hohenzollern.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Sauldorf', 'Gemeindeverwaltung Sauldorf', 'Hauptstr. 32','88605', 'Sauldorf', '07578 925-0', 'http://www.sauldorf.de', 'bgm@sauldorf.de'); +INSERT INTO bpm_dienststellen (bezeichnung, name, bez, str, plz, ort, tel, internet, mail) VALUES ('Gemeindeverwaltung', 'Herdwangen-Schnach', 'Gemeindeverwaltung Herdwangen-Schnach', 'Dorfstr. 49','88634', 'Herdwangen-Schnach', '07557 9200-0', 'http://www.herdwangen.de', 'info@herdwangen-schoenach.de'); \ No newline at end of file diff --git a/++ Dokumente/Prüfschema_Bachelorregistrierung.docx b/++ Dokumente/Prüfschema_Bachelorregistrierung.docx new file mode 100755 index 0000000..0b7db03 Binary files /dev/null and b/++ Dokumente/Prüfschema_Bachelorregistrierung.docx differ diff --git a/++ Dokumente/TANs/hogrefe_tan1.csv b/++ Dokumente/TANs/hogrefe_tan1.csv new file mode 100755 index 0000000..12c3b5a --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan1.csv @@ -0,0 +1,250 @@ +1 Testuser-bpm 9ELQ https://hgf.de/jfux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ELQ +2 Testuser-bpm KEM7 https://hgf.de/fkpl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEM7 +3 Testuser-bpm UEML https://hgf.de/7pfy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEML +4 Testuser-bpm 9ENC https://hgf.de/hpts https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ENC +5 Testuser-bpm KENP https://hgf.de/l3sh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KENP +6 Testuser-bpm UEP4 https://hgf.de/v2pb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEP4 +7 Testuser-bpm 9EPT https://hgf.de/d8le https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9EPT +8 Testuser-bpm KEQA https://hgf.de/q7ud https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEQA +9 Testuser-bpm UEQN https://hgf.de/iluc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEQN +10 Testuser-bpm 9ERE https://hgf.de/mikh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ERE +11 Testuser-bpm KERR https://hgf.de/8isj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KERR +12 Testuser-bpm UET9 https://hgf.de/sim1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UET9 +13 Testuser-bpm 9ETV https://hgf.de/fl3n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ETV +14 Testuser-bpm KEUD https://hgf.de/bser https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEUD +15 Testuser-bpm UEUQ https://hgf.de/kfmh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEUQ +16 Testuser-bpm 9EVH https://hgf.de/bsze https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9EVH +17 Testuser-bpm KEVU https://hgf.de/kx6k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEVU +18 Testuser-bpm UEWC https://hgf.de/tosd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEWC +19 Testuser-bpm 9EWX https://hgf.de/gi4r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9EWX +20 Testuser-bpm KEXF https://hgf.de/x293 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEXF +21 Testuser-bpm UEXT https://hgf.de/f6j1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UEXT +22 Testuser-bpm 9EYK https://hgf.de/te-o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9EYK +23 Testuser-bpm KEYW https://hgf.de/fkg8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KEYW +24 Testuser-bpm UF3E https://hgf.de/pdca https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UF3E +25 Testuser-bpm 9F43 https://hgf.de/6b2o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9F43 +26 Testuser-bpm KF4J https://hgf.de/1rbr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KF4J +27 Testuser-bpm UF4V https://hgf.de/9upd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UF4V +28 Testuser-bpm 9F7M https://hgf.de/0yja https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9F7M +29 Testuser-bpm KF7Y https://hgf.de/hvsq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KF7Y +30 Testuser-bpm UF9H https://hgf.de/2xze https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UF9H +31 Testuser-bpm 9FA7 https://hgf.de/q6au https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FA7 +32 Testuser-bpm KFAL https://hgf.de/21cc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFAL +33 Testuser-bpm UFAX https://hgf.de/me4t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFAX +34 Testuser-bpm 9FCP https://hgf.de/-nli https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FCP +35 Testuser-bpm KFD4 https://hgf.de/ueva https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFD4 +36 Testuser-bpm UFDK https://hgf.de/e0uj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFDK +37 Testuser-bpm 9FEA https://hgf.de/otrk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FEA +38 Testuser-bpm KFEN https://hgf.de/ldig https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFEN +39 Testuser-bpm UFF3 https://hgf.de/jign https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFF3 +40 Testuser-bpm 9FFR https://hgf.de/sd5s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FFR +41 Testuser-bpm KFH9 https://hgf.de/hyru https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFH9 +42 Testuser-bpm UFHM https://hgf.de/-0bh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFHM +43 Testuser-bpm 9FJD https://hgf.de/pwy6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FJD +44 Testuser-bpm KFJQ https://hgf.de/883h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFJQ +45 Testuser-bpm UFK7 https://hgf.de/xpok https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFK7 +46 Testuser-bpm 9FKU https://hgf.de/gs5d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FKU +47 Testuser-bpm KFLC https://hgf.de/hjus https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFLC +48 Testuser-bpm UFLP https://hgf.de/32hg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFLP +49 Testuser-bpm 9FMF https://hgf.de/fsh7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FMF +50 Testuser-bpm KFMT https://hgf.de/za44 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFMT +51 Testuser-bpm UFNA https://hgf.de/8fsz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFNA +52 Testuser-bpm 9FNW https://hgf.de/-xkl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FNW +53 Testuser-bpm KFPE https://hgf.de/bw5z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFPE +54 Testuser-bpm UFPR https://hgf.de/5pp8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFPR +55 Testuser-bpm 9FQJ https://hgf.de/-wkf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FQJ +56 Testuser-bpm KFQV https://hgf.de/-9e9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFQV +57 Testuser-bpm UFRD https://hgf.de/bhe1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFRD +58 Testuser-bpm 9FRY https://hgf.de/93fy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FRY +59 Testuser-bpm KFTH https://hgf.de/c0o1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFTH +60 Testuser-bpm UFTU https://hgf.de/rvr4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFTU +61 Testuser-bpm 9FUL https://hgf.de/b0m7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FUL +62 Testuser-bpm KFUX https://hgf.de/09nn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFUX +63 Testuser-bpm UFVF https://hgf.de/6zvh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFVF +64 Testuser-bpm 9FW4 https://hgf.de/b6kd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FW4 +65 Testuser-bpm KFWK https://hgf.de/a6vt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFWK +66 Testuser-bpm UFWW https://hgf.de/j72y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFWW +67 Testuser-bpm 9FXN https://hgf.de/pjkz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9FXN +68 Testuser-bpm KFY3 https://hgf.de/1tjk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KFY3 +69 Testuser-bpm UFYJ https://hgf.de/g9vu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UFYJ +70 Testuser-bpm 9H39 https://hgf.de/h3zw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9H39 +71 Testuser-bpm KH3M https://hgf.de/4vgw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KH3M +72 Testuser-bpm UH3Y https://hgf.de/iskx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UH3Y +73 Testuser-bpm 9H4Q https://hgf.de/xyea https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9H4Q +74 Testuser-bpm KH77 https://hgf.de/-kwr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KH77 +75 Testuser-bpm UH7L https://hgf.de/zhvj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UH7L +76 Testuser-bpm 9H9C https://hgf.de/adb3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9H9C +77 Testuser-bpm KH9P https://hgf.de/u63h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KH9P +78 Testuser-bpm UHA4 https://hgf.de/8bib https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHA4 +79 Testuser-bpm 9HAT https://hgf.de/xej8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HAT +80 Testuser-bpm KHCA https://hgf.de/bcy1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHCA +81 Testuser-bpm UHCN https://hgf.de/a8wa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHCN +82 Testuser-bpm 9HDE https://hgf.de/zbof https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HDE +83 Testuser-bpm KHDR https://hgf.de/x0xm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHDR +84 Testuser-bpm UHE9 https://hgf.de/xshj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHE9 +85 Testuser-bpm 9HEV https://hgf.de/792v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HEV +86 Testuser-bpm KHFD https://hgf.de/3neu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHFD +87 Testuser-bpm UHFQ https://hgf.de/02tf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHFQ +88 Testuser-bpm 9HHH https://hgf.de/03yw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HHH +89 Testuser-bpm KHHU https://hgf.de/n3jt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHHU +90 Testuser-bpm UHJC https://hgf.de/8dxo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHJC +91 Testuser-bpm 9HJX https://hgf.de/y7fa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HJX +92 Testuser-bpm KHKF https://hgf.de/5wad https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHKF +93 Testuser-bpm UHKT https://hgf.de/hvak https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHKT +94 Testuser-bpm 9HLK https://hgf.de/6jcd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HLK +95 Testuser-bpm KHLW https://hgf.de/5yjh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHLW +96 Testuser-bpm UHME https://hgf.de/4r1i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHME +97 Testuser-bpm 9HN3 https://hgf.de/q0eq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HN3 +98 Testuser-bpm KHNJ https://hgf.de/w3-c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHNJ +99 Testuser-bpm UHNV https://hgf.de/w74w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHNV +100 Testuser-bpm 9HPM https://hgf.de/lf4b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HPM +101 Testuser-bpm KHPY https://hgf.de/fzef https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHPY +102 Testuser-bpm UHQH https://hgf.de/6560 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHQH +103 Testuser-bpm 9HR7 https://hgf.de/j3fz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HR7 +104 Testuser-bpm KHRL https://hgf.de/2h0y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHRL +105 Testuser-bpm UHRX https://hgf.de/r7ur https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHRX +106 Testuser-bpm 9HTP https://hgf.de/m33x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HTP +107 Testuser-bpm KHU4 https://hgf.de/38a3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHU4 +108 Testuser-bpm UHUK https://hgf.de/ol80 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHUK +109 Testuser-bpm 9HVA https://hgf.de/iwzo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HVA +110 Testuser-bpm KHVN https://hgf.de/ri53 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHVN +111 Testuser-bpm UHW3 https://hgf.de/7vhc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHW3 +112 Testuser-bpm 9HWR https://hgf.de/p92t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HWR +113 Testuser-bpm KHX9 https://hgf.de/ozmc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHX9 +114 Testuser-bpm UHXM https://hgf.de/ltmq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UHXM +115 Testuser-bpm 9HYD https://hgf.de/-242 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9HYD +116 Testuser-bpm KHYQ https://hgf.de/i-30 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KHYQ +117 Testuser-bpm UJ37 https://hgf.de/8vbo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJ37 +118 Testuser-bpm 9J3U https://hgf.de/zvo2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9J3U +119 Testuser-bpm KJ4C https://hgf.de/nzda https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJ4C +120 Testuser-bpm UJ4P https://hgf.de/3xd5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJ4P +121 Testuser-bpm 9J7F https://hgf.de/7-cz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9J7F +122 Testuser-bpm KJ7T https://hgf.de/98rb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJ7T +123 Testuser-bpm UJ9A https://hgf.de/an-b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJ9A +124 Testuser-bpm 9J9W https://hgf.de/n5gk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9J9W +125 Testuser-bpm KJAE https://hgf.de/ayk8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJAE +126 Testuser-bpm UJAR https://hgf.de/jxyb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJAR +127 Testuser-bpm 9JCJ https://hgf.de/2k9z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JCJ +128 Testuser-bpm KJCV https://hgf.de/38dn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJCV +129 Testuser-bpm UJDD https://hgf.de/lz5c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJDD +130 Testuser-bpm 9JDY https://hgf.de/uyoc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JDY +131 Testuser-bpm KJEH https://hgf.de/fcfw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJEH +132 Testuser-bpm UJEU https://hgf.de/66gt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJEU +133 Testuser-bpm 9JFL https://hgf.de/s3z1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JFL +134 Testuser-bpm KJFX https://hgf.de/oewz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJFX +135 Testuser-bpm UJHF https://hgf.de/o61r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJHF +136 Testuser-bpm 9JJ4 https://hgf.de/wkd2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JJ4 +137 Testuser-bpm KJJK https://hgf.de/72zb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJJK +138 Testuser-bpm UJJW https://hgf.de/fg23 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJJW +139 Testuser-bpm 9JKN https://hgf.de/wgp8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JKN +140 Testuser-bpm KJL3 https://hgf.de/og3o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJL3 +141 Testuser-bpm UJLJ https://hgf.de/ihib https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJLJ +142 Testuser-bpm 9JM9 https://hgf.de/qfuy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JM9 +143 Testuser-bpm KJMM https://hgf.de/sxr3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJMM +144 Testuser-bpm UJMY https://hgf.de/u7cc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJMY +145 Testuser-bpm 9JNQ https://hgf.de/ay1a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JNQ +146 Testuser-bpm KJP7 https://hgf.de/z7ti https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJP7 +147 Testuser-bpm UJPL https://hgf.de/82ro https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJPL +148 Testuser-bpm 9JQC https://hgf.de/bwts https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JQC +149 Testuser-bpm KJQP https://hgf.de/s8u5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJQP +150 Testuser-bpm UJR4 https://hgf.de/mr71 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJR4 +151 Testuser-bpm 9JRT https://hgf.de/wnwb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JRT +152 Testuser-bpm KJTA https://hgf.de/8ngk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJTA +153 Testuser-bpm UJTN https://hgf.de/3rsw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJTN +154 Testuser-bpm 9JUE https://hgf.de/caoq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JUE +155 Testuser-bpm KJUR https://hgf.de/aihi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJUR +156 Testuser-bpm UJV9 https://hgf.de/ucpx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJV9 +157 Testuser-bpm 9JVV https://hgf.de/ds9x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JVV +158 Testuser-bpm KJWD https://hgf.de/vhxd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJWD +159 Testuser-bpm UJWQ https://hgf.de/a8mp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJWQ +160 Testuser-bpm 9JXH https://hgf.de/h-43 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JXH +161 Testuser-bpm KJXU https://hgf.de/-k7l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KJXU +162 Testuser-bpm UJYC https://hgf.de/zzdn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UJYC +163 Testuser-bpm 9JYX https://hgf.de/lzxt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9JYX +164 Testuser-bpm KK3F https://hgf.de/xr0n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KK3F +165 Testuser-bpm UK3T https://hgf.de/tcaj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UK3T +166 Testuser-bpm 9K4K https://hgf.de/9v01 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9K4K +167 Testuser-bpm KK4W https://hgf.de/hp9x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KK4W +168 Testuser-bpm UK7E https://hgf.de/yriu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UK7E +169 Testuser-bpm 9K93 https://hgf.de/g6g1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9K93 +170 Testuser-bpm KK9J https://hgf.de/p8b- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KK9J +171 Testuser-bpm UK9V https://hgf.de/1jvj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UK9V +172 Testuser-bpm 9KAM https://hgf.de/tkp3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KAM +173 Testuser-bpm KKAY https://hgf.de/tili https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKAY +174 Testuser-bpm UKCH https://hgf.de/t1a1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKCH +175 Testuser-bpm 9KD7 https://hgf.de/gem2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KD7 +176 Testuser-bpm KKDL https://hgf.de/2aot https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKDL +177 Testuser-bpm UKDX https://hgf.de/3qw9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKDX +178 Testuser-bpm 9KEP https://hgf.de/a6m5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KEP +179 Testuser-bpm KKF4 https://hgf.de/d1pk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKF4 +180 Testuser-bpm UKFK https://hgf.de/2hf9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKFK +181 Testuser-bpm 9KHA https://hgf.de/btd8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KHA +182 Testuser-bpm KKHN https://hgf.de/jwpi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKHN +183 Testuser-bpm UKJ3 https://hgf.de/defn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKJ3 +184 Testuser-bpm 9KJR https://hgf.de/5kh8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KJR +185 Testuser-bpm KKK9 https://hgf.de/gwp7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKK9 +186 Testuser-bpm UKKM https://hgf.de/595j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKKM +187 Testuser-bpm 9KLD https://hgf.de/y08y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KLD +188 Testuser-bpm KKLQ https://hgf.de/ybn0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKLQ +189 Testuser-bpm UKM7 https://hgf.de/kr3q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKM7 +190 Testuser-bpm 9KMU https://hgf.de/iuzs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KMU +191 Testuser-bpm KKNC https://hgf.de/nuy2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKNC +192 Testuser-bpm UKNP https://hgf.de/grm7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKNP +193 Testuser-bpm 9KPF https://hgf.de/e5f7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KPF +194 Testuser-bpm KKPT https://hgf.de/utym https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKPT +195 Testuser-bpm UKQA https://hgf.de/t7si https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKQA +196 Testuser-bpm 9KQW https://hgf.de/h827 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KQW +197 Testuser-bpm KKRE https://hgf.de/jmoi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKRE +198 Testuser-bpm UKRR https://hgf.de/qsbj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKRR +199 Testuser-bpm 9KTJ https://hgf.de/jl44 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KTJ +200 Testuser-bpm KKTV https://hgf.de/rgps https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKTV +201 Testuser-bpm UKUD https://hgf.de/3s4w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKUD +202 Testuser-bpm 9KUY https://hgf.de/t7rf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KUY +203 Testuser-bpm KKVH https://hgf.de/umuv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKVH +204 Testuser-bpm UKVU https://hgf.de/h2zn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKVU +205 Testuser-bpm 9KWL https://hgf.de/nk0o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KWL +206 Testuser-bpm KKWX https://hgf.de/9hmv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKWX +207 Testuser-bpm UKXF https://hgf.de/3w-b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKXF +208 Testuser-bpm 9KY4 https://hgf.de/k2pq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9KY4 +209 Testuser-bpm KKYK https://hgf.de/ox-c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KKYK +210 Testuser-bpm UKYW https://hgf.de/jnhv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UKYW +211 Testuser-bpm 9L3N https://hgf.de/xrbo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9L3N +212 Testuser-bpm KL43 https://hgf.de/oe2w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KL43 +213 Testuser-bpm UL4J https://hgf.de/d7mp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UL4J +214 Testuser-bpm 9L79 https://hgf.de/4mu7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9L79 +215 Testuser-bpm KL7M https://hgf.de/rplw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KL7M +216 Testuser-bpm UL7Y https://hgf.de/kmxn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UL7Y +217 Testuser-bpm 9L9Q https://hgf.de/6gif https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9L9Q +218 Testuser-bpm KLA7 https://hgf.de/0jxz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLA7 +219 Testuser-bpm ULAL https://hgf.de/8npg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULAL +220 Testuser-bpm 9LCC https://hgf.de/mgnn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LCC +221 Testuser-bpm KLCP https://hgf.de/f9cd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLCP +222 Testuser-bpm ULD4 https://hgf.de/a0si https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULD4 +223 Testuser-bpm 9LDT https://hgf.de/f8fg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LDT +224 Testuser-bpm KLEA https://hgf.de/u7po https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLEA +225 Testuser-bpm ULEN https://hgf.de/h7nq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULEN +226 Testuser-bpm 9LFE https://hgf.de/tlnv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LFE +227 Testuser-bpm KLFR https://hgf.de/oggu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLFR +228 Testuser-bpm ULH9 https://hgf.de/rjye https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULH9 +229 Testuser-bpm 9LHV https://hgf.de/xn6c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LHV +230 Testuser-bpm KLJD https://hgf.de/bkvn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLJD +231 Testuser-bpm ULJQ https://hgf.de/rhat https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULJQ +232 Testuser-bpm 9LKH https://hgf.de/k56c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LKH +233 Testuser-bpm KLKU https://hgf.de/0baq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLKU +234 Testuser-bpm ULLC https://hgf.de/blvh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULLC +235 Testuser-bpm 9LLX https://hgf.de/1m63 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LLX +236 Testuser-bpm KLMF https://hgf.de/jr1d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLMF +237 Testuser-bpm ULMT https://hgf.de/3o6k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULMT +238 Testuser-bpm 9LNK https://hgf.de/nv0y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LNK +239 Testuser-bpm KLNW https://hgf.de/k06s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLNW +240 Testuser-bpm ULPE https://hgf.de/o8it https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULPE +241 Testuser-bpm 9LQ3 https://hgf.de/i204 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LQ3 +242 Testuser-bpm KLQJ https://hgf.de/e82q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLQJ +243 Testuser-bpm ULQV https://hgf.de/nufs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULQV +244 Testuser-bpm 9LRM https://hgf.de/f5vw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LRM +245 Testuser-bpm KLRY https://hgf.de/v6lw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLRY +246 Testuser-bpm ULTH https://hgf.de/3wzz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULTH +247 Testuser-bpm 9LU7 https://hgf.de/-0da https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LU7 +248 Testuser-bpm KLUL https://hgf.de/u94x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLUL +249 Testuser-bpm ULUX https://hgf.de/w3iu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULUX +250 Testuser-bpm 9LVP https://hgf.de/x-8y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LVP diff --git a/++ Dokumente/TANs/hogrefe_tan10.csv b/++ Dokumente/TANs/hogrefe_tan10.csv new file mode 100755 index 0000000..7d4a518 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan10.csv @@ -0,0 +1,250 @@ +2288 Testuser-bpm 020a000703 WF93 https://hgf.de/ylr4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WF93 +2496 Testuser-bpm 020a000703 CF9R https://hgf.de/fvh9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CF9R +2261 Testuser-bpm 020a000703 MFA9 https://hgf.de/6-dn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFA9 +2275 Testuser-bpm 020a000703 WFAM https://hgf.de/x2hp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFAM +2448 Testuser-bpm 020a000703 CFCD https://hgf.de/e972 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFCD +2438 Testuser-bpm 020a000703 WF4K https://hgf.de/341u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WF4K +2264 Testuser-bpm 020a000703 MFCQ https://hgf.de/rbhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFCQ +2402 Testuser-bpm 020a000703 WFD7 https://hgf.de/16iw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFD7 +2333 Testuser-bpm 020a000703 CFDU https://hgf.de/4m35 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFDU +2273 Testuser-bpm 020a000703 MFEC https://hgf.de/hbe3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFEC +2380 Testuser-bpm 020a000703 WFEP https://hgf.de/tpd4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFEP +2338 Testuser-bpm 020a000703 CFFF https://hgf.de/2468 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFFF +2359 Testuser-bpm 020a000703 MFFT https://hgf.de/ftiw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFFT +2457 Testuser-bpm 020a000703 WFHA https://hgf.de/tzk9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFHA +2477 Testuser-bpm 020a000703 CFHW https://hgf.de/ec7k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFHW +2361 Testuser-bpm 020a000703 MFJE https://hgf.de/mb43 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFJE +2343 Testuser-bpm 020a000703 WFJR https://hgf.de/ns3p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFJR +2290 Testuser-bpm 020a000703 CFKJ https://hgf.de/1txu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFKJ +2401 Testuser-bpm 020a000703 MFKV https://hgf.de/d0zo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFKV +2305 Testuser-bpm 020a000703 WFLD https://hgf.de/d4dm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFLD +2461 Testuser-bpm 020a000703 CFLY https://hgf.de/6sxf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFLY +2328 Testuser-bpm 020a000703 MFMH https://hgf.de/eqib https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFMH +2326 Testuser-bpm 020a000703 WFMU https://hgf.de/zb4a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFMU +2378 Testuser-bpm 020a000703 CFNL https://hgf.de/kzf1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFNL +2410 Testuser-bpm 020a000703 MFNX https://hgf.de/yplx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFNX +2348 Testuser-bpm 020a000703 WFPF https://hgf.de/s5vq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFPF +2479 Testuser-bpm 020a000703 CFQ4 https://hgf.de/vt69 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFQ4 +2489 Testuser-bpm 020a000703 MFQK https://hgf.de/v04u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFQK +2257 Testuser-bpm 020a000703 WFQW https://hgf.de/brk6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFQW +2269 Testuser-bpm 020a000703 CFRN https://hgf.de/un7j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFRN +2387 Testuser-bpm 020a000703 MFT3 https://hgf.de/5rjw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFT3 +2440 Testuser-bpm 020a000703 MF7N https://hgf.de/oydi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MF7N +2442 Testuser-bpm 020a000703 WFTJ https://hgf.de/73-s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFTJ +2492 Testuser-bpm 020a000703 CFU9 https://hgf.de/mubz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFU9 +2296 Testuser-bpm 020a000703 MFUM https://hgf.de/nilk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFUM +2427 Testuser-bpm 020a000703 CEV3 https://hgf.de/k-ka https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEV3 +2399 Testuser-bpm 020a000703 WFUY https://hgf.de/lcr4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFUY +2430 Testuser-bpm 020a000703 CEWM https://hgf.de/k866 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEWM +2356 Testuser-bpm 020a000703 CFVQ https://hgf.de/sfem https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFVQ +2417 Testuser-bpm 020a000703 MFW7 https://hgf.de/t6kq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFW7 +2420 Testuser-bpm 020a000703 WFWL https://hgf.de/2cdx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFWL +2460 Testuser-bpm 020a000703 CFXC https://hgf.de/bz2r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFXC +2444 Testuser-bpm 020a000703 MFXP https://hgf.de/4ru0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MFXP +2466 Testuser-bpm 020a000703 WFY4 https://hgf.de/oj11 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WFY4 +2345 Testuser-bpm 020a000703 CFYT https://hgf.de/np5a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CFYT +2340 Testuser-bpm 020a000703 MH3A https://hgf.de/lq0o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MH3A +2494 Testuser-bpm 020a000703 WH3N https://hgf.de/2kj6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WH3N +2421 Testuser-bpm 020a000703 CEQX https://hgf.de/ulm- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEQX +2303 Testuser-bpm 020a000703 CH4E https://hgf.de/3i2y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CH4E +2435 Testuser-bpm 020a000703 WEYX https://hgf.de/gkpw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEYX +2463 Testuser-bpm 020a000703 MH4R https://hgf.de/8e4j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MH4R +2285 Testuser-bpm 020a000703 WH79 https://hgf.de/5jzh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WH79 +2322 Testuser-bpm 020a000703 CH7V https://hgf.de/-fe- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CH7V +2443 Testuser-bpm 020a000703 MH9D https://hgf.de/k2qn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MH9D +2297 Testuser-bpm 020a000703 WH9Q https://hgf.de/rx3w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WH9Q +2341 Testuser-bpm 020a000703 CHAH https://hgf.de/0kim https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHAH +2499 Testuser-bpm 020a000703 MHAU https://hgf.de/i3ob https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHAU +2393 Testuser-bpm 020a000703 WHCC https://hgf.de/cgvb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHCC +2382 Testuser-bpm 020a000703 CHCX https://hgf.de/9hf3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHCX +2306 Testuser-bpm 020a000703 MHDF https://hgf.de/crfd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHDF +2310 Testuser-bpm 020a000703 WHDT https://hgf.de/68zu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHDT +2425 Testuser-bpm 020a000703 METW https://hgf.de/hfbr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=METW +2353 Testuser-bpm 020a000703 CHEK https://hgf.de/sk27 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHEK +2396 Testuser-bpm 020a000703 MHEW https://hgf.de/48hu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHEW +2404 Testuser-bpm 020a000703 WHFE https://hgf.de/2wqq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHFE +2391 Testuser-bpm 020a000703 CHH3 https://hgf.de/-a28 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHH3 +2483 Testuser-bpm 020a000703 MHHJ https://hgf.de/v3g7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHHJ +2441 Testuser-bpm 020a000703 WHHV https://hgf.de/unbn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHHV +2486 Testuser-bpm 020a000703 CHJM https://hgf.de/hse2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHJM +2287 Testuser-bpm 020a000703 MHJY https://hgf.de/qywu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHJY +2251 Testuser-bpm 020a000703 WHKH https://hgf.de/y4qu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHKH +2413 Testuser-bpm 020a000703 CHL7 https://hgf.de/kz2w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHL7 +2418 Testuser-bpm 020a000703 MHLL https://hgf.de/6etz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHLL +2447 Testuser-bpm 020a000703 WHLX https://hgf.de/g1zp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHLX +2394 Testuser-bpm 020a000703 CHMP https://hgf.de/5ddg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHMP +2260 Testuser-bpm 020a000703 MHN4 https://hgf.de/u07- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHN4 +2388 Testuser-bpm 020a000703 WHNK https://hgf.de/q2eb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHNK +2481 Testuser-bpm 020a000703 CHPA https://hgf.de/3z-l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHPA +2280 Testuser-bpm 020a000703 MHPN https://hgf.de/1wkx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHPN +2408 Testuser-bpm 020a000703 WHQ3 https://hgf.de/3xri https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHQ3 +2365 Testuser-bpm 020a000703 CHQR https://hgf.de/bpfk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHQR +2339 Testuser-bpm 020a000703 MHR9 https://hgf.de/xgxr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHR9 +2367 Testuser-bpm 020a000703 WHRM https://hgf.de/276e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHRM +2478 Testuser-bpm 020a000703 CHTD https://hgf.de/td5i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHTD +2498 Testuser-bpm 020a000703 MHTQ https://hgf.de/zf35 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHTQ +2373 Testuser-bpm 020a000703 WHU7 https://hgf.de/rdrq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHU7 +2411 Testuser-bpm 020a000703 CHUU https://hgf.de/yu7y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHUU +2445 Testuser-bpm 020a000703 MHVC https://hgf.de/2b68 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHVC +2284 Testuser-bpm 020a000703 WHVP https://hgf.de/8a42 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHVP +2450 Testuser-bpm 020a000703 CHWF https://hgf.de/u-93 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHWF +2383 Testuser-bpm 020a000703 MHWT https://hgf.de/8p9o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHWT +2485 Testuser-bpm 020a000703 WHXA https://hgf.de/m0fh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHXA +2436 Testuser-bpm 020a000703 CF3P https://hgf.de/7vl3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CF3P +2439 Testuser-bpm 020a000703 CF7A https://hgf.de/f9tx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CF7A +2471 Testuser-bpm 020a000703 CHXW https://hgf.de/mpjx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CHXW +2252 Testuser-bpm 020a000703 MHYE https://hgf.de/kqm6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MHYE +2344 Testuser-bpm 020a000703 WHYR https://hgf.de/6utf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WHYR +2462 Testuser-bpm 020a000703 CJ3J https://hgf.de/yoce https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJ3J +2389 Testuser-bpm 020a000703 MJ3V https://hgf.de/-130 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJ3V +2351 Testuser-bpm 020a000703 WJ4D https://hgf.de/3rf3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJ4D +2253 Testuser-bpm 020a000703 CJ4Y https://hgf.de/ydag https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJ4Y +2329 Testuser-bpm 020a000703 MJ7H https://hgf.de/cv-1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJ7H +2407 Testuser-bpm 020a000703 WJ7U https://hgf.de/rkki https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJ7U +2317 Testuser-bpm 020a000703 CJ9L https://hgf.de/dvv0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJ9L +2482 Testuser-bpm 020a000703 MJ9X https://hgf.de/nziz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJ9X +2400 Testuser-bpm 020a000703 WJAF https://hgf.de/snqt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJAF +2459 Testuser-bpm 020a000703 CJC4 https://hgf.de/qrui https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJC4 +2384 Testuser-bpm 020a000703 MJCK https://hgf.de/tkb2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJCK +2325 Testuser-bpm 020a000703 WJCW https://hgf.de/mh4v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJCW +2276 Testuser-bpm 020a000703 CJDN https://hgf.de/d6pj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJDN +2424 Testuser-bpm 020a000703 CETK https://hgf.de/m-8m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CETK +2464 Testuser-bpm 020a000703 MJE3 https://hgf.de/w98o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJE3 +2374 Testuser-bpm 020a000703 WJEJ https://hgf.de/sk8r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJEJ +2416 Testuser-bpm 020a000703 CJF9 https://hgf.de/jjcj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJF9 +2475 Testuser-bpm 020a000703 MJFM https://hgf.de/e03x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJFM +2281 Testuser-bpm 020a000703 WJFY https://hgf.de/159p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJFY +2291 Testuser-bpm 020a000703 CJHQ https://hgf.de/2dfv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJHQ +2271 Testuser-bpm 020a000703 MJJ7 https://hgf.de/qscp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJJ7 +2350 Testuser-bpm 020a000703 WJJL https://hgf.de/1f4w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJJL +2315 Testuser-bpm 020a000703 CJKC https://hgf.de/5kim https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJKC +2319 Testuser-bpm 020a000703 MJKP https://hgf.de/m-cq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJKP +2469 Testuser-bpm 020a000703 WJL4 https://hgf.de/vtoh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJL4 +2368 Testuser-bpm 020a000703 CJLT https://hgf.de/usgd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJLT +2354 Testuser-bpm 020a000703 MJMA https://hgf.de/v5le https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJMA +2265 Testuser-bpm 020a000703 WJMN https://hgf.de/uu7m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJMN +2286 Testuser-bpm 020a000703 CJNE https://hgf.de/hyd6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJNE +2487 Testuser-bpm 020a000703 MJNR https://hgf.de/a98b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJNR +2295 Testuser-bpm 020a000703 WJP9 https://hgf.de/v648 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJP9 +2337 Testuser-bpm 020a000703 CJPV https://hgf.de/8wnu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJPV +2309 Testuser-bpm 020a000703 MJQD https://hgf.de/ezbd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJQD +2409 Testuser-bpm 020a000703 WJQQ https://hgf.de/d2ks https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJQQ +2452 Testuser-bpm 020a000703 CJRH https://hgf.de/2xrx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJRH +2267 Testuser-bpm 020a000703 MJRU https://hgf.de/bs7w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJRU +2392 Testuser-bpm 020a000703 WJTC https://hgf.de/kh7f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJTC +2465 Testuser-bpm 020a000703 CJTX https://hgf.de/y7sg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJTX +2480 Testuser-bpm 020a000703 MJUF https://hgf.de/1c5f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJUF +2352 Testuser-bpm 020a000703 WJUT https://hgf.de/fcnq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJUT +2256 Testuser-bpm 020a000703 CJVK https://hgf.de/r0j2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJVK +2316 Testuser-bpm 020a000703 MJVW https://hgf.de/qv7f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJVW +2426 Testuser-bpm 020a000703 WEUE https://hgf.de/7b1q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEUE +2375 Testuser-bpm 020a000703 WJWE https://hgf.de/26hx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJWE +2381 Testuser-bpm 020a000703 CJX3 https://hgf.de/5bba https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJX3 +2490 Testuser-bpm 020a000703 MJXJ https://hgf.de/-g4i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJXJ +2302 Testuser-bpm 020a000703 WJXV https://hgf.de/k2f0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WJXV +2299 Testuser-bpm 020a000703 CJYM https://hgf.de/hb95 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CJYM +2405 Testuser-bpm 020a000703 MJYY https://hgf.de/wytt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MJYY +2268 Testuser-bpm 020a000703 WK3H https://hgf.de/c29r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WK3H +2376 Testuser-bpm 020a000703 CK47 https://hgf.de/arkc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CK47 +2437 Testuser-bpm 020a000703 MF44 https://hgf.de/a-1b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MF44 +2346 Testuser-bpm 020a000703 MK4L https://hgf.de/ub5b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MK4L +2363 Testuser-bpm 020a000703 WK4X https://hgf.de/p3wq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WK4X +2358 Testuser-bpm 020a000703 CK7P https://hgf.de/doel https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CK7P +2432 Testuser-bpm 020a000703 WEXH https://hgf.de/dg4o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEXH +2453 Testuser-bpm 020a000703 MK94 https://hgf.de/wg75 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MK94 +2324 Testuser-bpm 020a000703 WK9K https://hgf.de/pl3p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WK9K +2484 Testuser-bpm 020a000703 CKAA https://hgf.de/0isr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKAA +2327 Testuser-bpm 020a000703 MKAN https://hgf.de/21dp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKAN +2362 Testuser-bpm 020a000703 WKC3 https://hgf.de/rmol https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKC3 +2455 Testuser-bpm 020a000703 CKCR https://hgf.de/x85w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKCR +2283 Testuser-bpm 020a000703 MKD9 https://hgf.de/m4ei https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKD9 +2454 Testuser-bpm 020a000703 WKDM https://hgf.de/g5dh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKDM +2446 Testuser-bpm 020a000703 CKED https://hgf.de/xitg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKED +2451 Testuser-bpm 020a000703 MKEQ https://hgf.de/lji- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKEQ +2318 Testuser-bpm 020a000703 WKF7 https://hgf.de/a58a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKF7 +2255 Testuser-bpm 020a000703 CKFU https://hgf.de/znxk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKFU +2428 Testuser-bpm 020a000703 MEVJ https://hgf.de/bita https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEVJ +2313 Testuser-bpm 020a000703 MKHC https://hgf.de/n8wq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKHC +2488 Testuser-bpm 020a000703 WKHP https://hgf.de/epto https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKHP +2279 Testuser-bpm 020a000703 CKJF https://hgf.de/287i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKJF +2293 Testuser-bpm 020a000703 MKJT https://hgf.de/a8i0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKJT +2298 Testuser-bpm 020a000703 WKKA https://hgf.de/hqy3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKKA +2330 Testuser-bpm 020a000703 CKKW https://hgf.de/2fuw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKKW +2254 Testuser-bpm 020a000703 MKLE https://hgf.de/pvbw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKLE +2272 Testuser-bpm 020a000703 WKLR https://hgf.de/iql9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKLR +2307 Testuser-bpm 020a000703 CKMJ https://hgf.de/sfq8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKMJ +2336 Testuser-bpm 020a000703 MKMV https://hgf.de/279t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKMV +2473 Testuser-bpm 020a000703 WKND https://hgf.de/88gj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKND +2364 Testuser-bpm 020a000703 CKNY https://hgf.de/trby https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKNY +2369 Testuser-bpm 020a000703 MKPH https://hgf.de/0ny1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKPH +2323 Testuser-bpm 020a000703 WKPU https://hgf.de/2n53 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKPU +2449 Testuser-bpm 020a000703 CKQL https://hgf.de/kpyu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKQL +2472 Testuser-bpm 020a000703 MKQX https://hgf.de/pctb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKQX +2334 Testuser-bpm 020a000703 WKRF https://hgf.de/2ziu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKRF +2491 Testuser-bpm 020a000703 CKT4 https://hgf.de/u5mi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKT4 +2277 Testuser-bpm 020a000703 MKTK https://hgf.de/aiv7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKTK +2370 Testuser-bpm 020a000703 WKTW https://hgf.de/p2bv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKTW +2335 Testuser-bpm 020a000703 CKUN https://hgf.de/jt0i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKUN +2371 Testuser-bpm 020a000703 MKV3 https://hgf.de/y4xw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKV3 +2377 Testuser-bpm 020a000703 WKVJ https://hgf.de/95rl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKVJ +2458 Testuser-bpm 020a000703 CKW9 https://hgf.de/ek0g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKW9 +2357 Testuser-bpm 020a000703 MKWM https://hgf.de/kik2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKWM +2312 Testuser-bpm 020a000703 WKWY https://hgf.de/jro7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKWY +2289 Testuser-bpm 020a000703 CKXQ https://hgf.de/-7hs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CKXQ +2300 Testuser-bpm 020a000703 MKY7 https://hgf.de/1mvl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MKY7 +2301 Testuser-bpm 020a000703 WKYL https://hgf.de/0uv2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WKYL +2422 Testuser-bpm 020a000703 MERF https://hgf.de/pxin https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MERF +2456 Testuser-bpm 020a000703 CL3C https://hgf.de/x1d6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CL3C +2476 Testuser-bpm 020a000703 ML3P https://hgf.de/gf58 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ML3P +2332 Testuser-bpm 020a000703 WL44 https://hgf.de/kxs- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WL44 +2470 Testuser-bpm 020a000703 CL4T https://hgf.de/bx-o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CL4T +2414 Testuser-bpm 020a000703 ML7A https://hgf.de/-nge https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ML7A +2419 Testuser-bpm 020a000703 WL7N https://hgf.de/tzu8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WL7N +2468 Testuser-bpm 020a000703 CL9E https://hgf.de/zbfj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CL9E +2360 Testuser-bpm 020a000703 ML9R https://hgf.de/pvyp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ML9R +2321 Testuser-bpm 020a000703 WLA9 https://hgf.de/hcs8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLA9 +2270 Testuser-bpm 020a000703 CLAV https://hgf.de/yad8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLAV +2331 Testuser-bpm 020a000703 MLCD https://hgf.de/7vcj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLCD +2386 Testuser-bpm 020a000703 WLCQ https://hgf.de/-y6t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLCQ +2262 Testuser-bpm 020a000703 CLDH https://hgf.de/w8bi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLDH +2423 Testuser-bpm 020a000703 WERT https://hgf.de/qlp6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WERT +2258 Testuser-bpm 020a000703 MLDU https://hgf.de/huc1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLDU +2497 Testuser-bpm 020a000703 WLEC https://hgf.de/9g8a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLEC +2372 Testuser-bpm 020a000703 CLEX https://hgf.de/mchs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLEX +2379 Testuser-bpm 020a000703 MLFF https://hgf.de/o07d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLFF +2431 Testuser-bpm 020a000703 MEWY https://hgf.de/dmes https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEWY +2397 Testuser-bpm 020a000703 WLFT https://hgf.de/l3ih https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLFT +2366 Testuser-bpm 020a000703 CLHK https://hgf.de/xzzt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLHK +2342 Testuser-bpm 020a000703 MLHW https://hgf.de/7lpq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLHW +2403 Testuser-bpm 020a000703 WLJE https://hgf.de/x10g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLJE +2433 Testuser-bpm 020a000703 CEY7 https://hgf.de/n2vh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEY7 +2278 Testuser-bpm 020a000703 CLK3 https://hgf.de/on58 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLK3 +2304 Testuser-bpm 020a000703 MLKJ https://hgf.de/vciy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLKJ +2347 Testuser-bpm 020a000703 WLKV https://hgf.de/59xt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLKV +2294 Testuser-bpm 020a000703 CLLM https://hgf.de/x4el https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLLM +2266 Testuser-bpm 020a000703 MLLY https://hgf.de/4f9k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLLY +2311 Testuser-bpm 020a000703 WLMH https://hgf.de/ed5y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLMH +2495 Testuser-bpm 020a000703 CLN7 https://hgf.de/knmy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLN7 +2434 Testuser-bpm 020a000703 MEYL https://hgf.de/ghzj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEYL +2320 Testuser-bpm 020a000703 MLNL https://hgf.de/py13 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLNL +2493 Testuser-bpm 020a000703 WLNX https://hgf.de/j04b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLNX +2314 Testuser-bpm 020a000703 CLPP https://hgf.de/h04x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLPP +2395 Testuser-bpm 020a000703 MLQ4 https://hgf.de/zxrl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLQ4 +2415 Testuser-bpm 020a000703 WLQK https://hgf.de/--ic https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLQK +2467 Testuser-bpm 020a000703 CLRA https://hgf.de/4l8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLRA +2390 Testuser-bpm 020a000703 MLRN https://hgf.de/v49k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLRN +2385 Testuser-bpm 020a000703 WLT3 https://hgf.de/1x69 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLT3 +2259 Testuser-bpm 020a000703 CLTR https://hgf.de/31g9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLTR +2274 Testuser-bpm 020a000703 MLU9 https://hgf.de/82ey https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLU9 +2308 Testuser-bpm 020a000703 WLUM https://hgf.de/z9ax https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLUM +2412 Testuser-bpm 020a000703 CLVD https://hgf.de/7zhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLVD +2474 Testuser-bpm 020a000703 MLVQ https://hgf.de/izln https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLVQ +2429 Testuser-bpm 020a000703 WEVV https://hgf.de/r4m3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEVV +2355 Testuser-bpm 020a000703 WLW7 https://hgf.de/05pe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLW7 +2282 Testuser-bpm 020a000703 CLWU https://hgf.de/futw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLWU +2349 Testuser-bpm 020a000703 MLXC https://hgf.de/tbyg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLXC +2500 Testuser-bpm 020a000703 WLXP https://hgf.de/bord https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WLXP +2263 Testuser-bpm 020a000703 CLYF https://hgf.de/p2l8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CLYF +2292 Testuser-bpm 020a000703 MLYT https://hgf.de/t0ov https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MLYT +2398 Testuser-bpm 020a000703 WM3A https://hgf.de/gyrl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WM3A +2406 Testuser-bpm 020a000703 CM3W https://hgf.de/4ww0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CM3W diff --git a/++ Dokumente/TANs/hogrefe_tan2.csv b/++ Dokumente/TANs/hogrefe_tan2.csv new file mode 100755 index 0000000..94982a7 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan2.csv @@ -0,0 +1,250 @@ +280 Testuser-bpm 020a000703 9MEJ https://hgf.de/3n0f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MEJ +303 Testuser-bpm 020a000703 KMEV https://hgf.de/jpdx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMEV +343 Testuser-bpm 020a000703 UMFD https://hgf.de/s-mi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMFD +370 Testuser-bpm 020a000703 9MFY https://hgf.de/crme https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MFY +293 Testuser-bpm 020a000703 KMHH https://hgf.de/qpu- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMHH +436 Testuser-bpm 020a000703 UMHU https://hgf.de/a40g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMHU +385 Testuser-bpm 020a000703 9MJL https://hgf.de/bdk0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MJL +374 Testuser-bpm 020a000703 KMJX https://hgf.de/0832 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMJX +300 Testuser-bpm 020a000703 UMKF https://hgf.de/6fbl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMKF +256 Testuser-bpm 020a000703 9ML4 https://hgf.de/ts4q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ML4 +292 Testuser-bpm 020a000703 KMLK https://hgf.de/mcpo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMLK +333 Testuser-bpm 020a000703 UMLW https://hgf.de/zw1q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMLW +352 Testuser-bpm 020a000703 9MMN https://hgf.de/6hdk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MMN +364 Testuser-bpm 020a000703 KMN3 https://hgf.de/mxc7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMN3 +473 Testuser-bpm 020a000703 UMNJ https://hgf.de/ms-e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMNJ +274 Testuser-bpm 020a000703 9MP9 https://hgf.de/u30c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MP9 +474 Testuser-bpm 020a000703 KMPM https://hgf.de/ez9u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMPM +468 Testuser-bpm 020a000703 UMPY https://hgf.de/9t5x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMPY +437 Testuser-bpm 020a000703 9MQQ https://hgf.de/s6u- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MQQ +344 Testuser-bpm 020a000703 KMR7 https://hgf.de/ol8s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMR7 +384 Testuser-bpm 020a000703 UMRL https://hgf.de/lleh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMRL +438 Testuser-bpm 020a000703 9MTC https://hgf.de/d01h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MTC +338 Testuser-bpm 020a000703 KMTP https://hgf.de/guw3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMTP +371 Testuser-bpm 020a000703 UMU4 https://hgf.de/2sc0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMU4 +314 Testuser-bpm 020a000703 9MUT https://hgf.de/zop7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MUT +363 Testuser-bpm 020a000703 KMVA https://hgf.de/1l27 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMVA +404 Testuser-bpm 020a000703 UMVN https://hgf.de/lbhe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMVN +484 Testuser-bpm 020a000703 KLXN https://hgf.de/9spu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLXN +453 Testuser-bpm 020a000703 9MWE https://hgf.de/ihiz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MWE +377 Testuser-bpm 020a000703 KMWR https://hgf.de/qxql https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMWR +449 Testuser-bpm 020a000703 UMX9 https://hgf.de/-qlb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMX9 +251 Testuser-bpm 020a000703 9MXV https://hgf.de/k-fj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MXV +270 Testuser-bpm 020a000703 KMYD https://hgf.de/3jac https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMYD +302 Testuser-bpm 020a000703 UMYQ https://hgf.de/lk3i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMYQ +417 Testuser-bpm 020a000703 9N3H https://hgf.de/-6-j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9N3H +422 Testuser-bpm 020a000703 KN3U https://hgf.de/w1d4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KN3U +277 Testuser-bpm 020a000703 UN4C https://hgf.de/sf83 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UN4C +401 Testuser-bpm 020a000703 9N4X https://hgf.de/hzd9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9N4X +497 Testuser-bpm 020a000703 UMCA https://hgf.de/om7q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMCA +269 Testuser-bpm 020a000703 KN7F https://hgf.de/xnd3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KN7F +276 Testuser-bpm 020a000703 UN7T https://hgf.de/-f-i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UN7T +335 Testuser-bpm 020a000703 9N9K https://hgf.de/ti88 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9N9K +463 Testuser-bpm 020a000703 KN9W https://hgf.de/wqo6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KN9W +294 Testuser-bpm 020a000703 UNAE https://hgf.de/mks4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNAE +313 Testuser-bpm 020a000703 9NC3 https://hgf.de/in8y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NC3 +298 Testuser-bpm 020a000703 KNCJ https://hgf.de/58pv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNCJ +464 Testuser-bpm 020a000703 UNCV https://hgf.de/in1n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNCV +268 Testuser-bpm 020a000703 9NDM https://hgf.de/ygaz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NDM +412 Testuser-bpm 020a000703 KNDY https://hgf.de/zc51 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNDY +499 Testuser-bpm 020a000703 KMDE https://hgf.de/-xpe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMDE +262 Testuser-bpm 020a000703 UNEH https://hgf.de/f4gq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNEH +378 Testuser-bpm 020a000703 9NF7 https://hgf.de/fdqs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NF7 +330 Testuser-bpm 020a000703 KNFL https://hgf.de/7i-x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNFL +477 Testuser-bpm 020a000703 UNFX https://hgf.de/iton https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNFX +318 Testuser-bpm 020a000703 9NHP https://hgf.de/syjp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NHP +368 Testuser-bpm 020a000703 KNJ4 https://hgf.de/aagg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNJ4 +382 Testuser-bpm 020a000703 UNJK https://hgf.de/pll8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNJK +301 Testuser-bpm 020a000703 9NKA https://hgf.de/k1lj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NKA +414 Testuser-bpm 020a000703 KNKN https://hgf.de/g-ck https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNKN +373 Testuser-bpm 020a000703 UNL3 https://hgf.de/m11i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNL3 +483 Testuser-bpm 020a000703 9LXA https://hgf.de/2ltf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LXA +495 Testuser-bpm 020a000703 9MAF https://hgf.de/sazc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MAF +456 Testuser-bpm 020a000703 9NLR https://hgf.de/a5kl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NLR +490 Testuser-bpm 020a000703 KM4Q https://hgf.de/z93x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KM4Q +400 Testuser-bpm 020a000703 KNM9 https://hgf.de/y80v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNM9 +415 Testuser-bpm 020a000703 UNMM https://hgf.de/q781 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNMM +349 Testuser-bpm 020a000703 9NND https://hgf.de/9zrl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NND +299 Testuser-bpm 020a000703 KNNQ https://hgf.de/lh0z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNNQ +459 Testuser-bpm 020a000703 UNP7 https://hgf.de/0ocf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNP7 +472 Testuser-bpm 020a000703 9NPU https://hgf.de/rv-3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NPU +273 Testuser-bpm 020a000703 KNQC https://hgf.de/j9nb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNQC +329 Testuser-bpm 020a000703 UNQP https://hgf.de/7e6t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNQP +395 Testuser-bpm 020a000703 9NRF https://hgf.de/xi23 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NRF +289 Testuser-bpm 020a000703 KNRT https://hgf.de/dr3f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNRT +393 Testuser-bpm 020a000703 UNTA https://hgf.de/z5qz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNTA +326 Testuser-bpm 020a000703 9NTW https://hgf.de/e28u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NTW +366 Testuser-bpm 020a000703 KNUE https://hgf.de/vz13 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNUE +475 Testuser-bpm 020a000703 UNUR https://hgf.de/4zdc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNUR +285 Testuser-bpm 020a000703 9NVJ https://hgf.de/4rda https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NVJ +375 Testuser-bpm 020a000703 KNVV https://hgf.de/9pkm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNVV +324 Testuser-bpm 020a000703 UNWD https://hgf.de/xlum https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNWD +355 Testuser-bpm 020a000703 9NWY https://hgf.de/b9xn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NWY +282 Testuser-bpm 020a000703 KNXH https://hgf.de/v8v5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNXH +337 Testuser-bpm 020a000703 UNXU https://hgf.de/g36b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UNXU +494 Testuser-bpm 020a000703 UM9P https://hgf.de/ce7x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UM9P +309 Testuser-bpm 020a000703 9NYL https://hgf.de/7qoa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9NYL +304 Testuser-bpm 020a000703 KNYX https://hgf.de/7nta https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KNYX +376 Testuser-bpm 020a000703 UP3F https://hgf.de/ni36 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UP3F +255 Testuser-bpm 020a000703 9P44 https://hgf.de/tl4w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9P44 +410 Testuser-bpm 020a000703 KP4K https://hgf.de/7ihj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KP4K +327 Testuser-bpm 020a000703 UP4W https://hgf.de/z-s2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UP4W +445 Testuser-bpm 020a000703 9P7N https://hgf.de/qp4h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9P7N +306 Testuser-bpm 020a000703 KP93 https://hgf.de/n9-k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KP93 +435 Testuser-bpm 020a000703 UP9J https://hgf.de/cw70 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UP9J +481 Testuser-bpm 020a000703 KLW4 https://hgf.de/gqep https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KLW4 +386 Testuser-bpm 020a000703 9PA9 https://hgf.de/ohjy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PA9 +319 Testuser-bpm 020a000703 KPAM https://hgf.de/rvhk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPAM +480 Testuser-bpm 020a000703 UPAY https://hgf.de/y6n9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPAY +405 Testuser-bpm 020a000703 9PCQ https://hgf.de/2k3y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PCQ +420 Testuser-bpm 020a000703 KPD7 https://hgf.de/22-u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPD7 +389 Testuser-bpm 020a000703 UPDL https://hgf.de/xd6- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPDL +354 Testuser-bpm 020a000703 9PEC https://hgf.de/bh4q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PEC +263 Testuser-bpm 020a000703 KPEP https://hgf.de/js5o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPEP +457 Testuser-bpm 020a000703 UPF4 https://hgf.de/-gfj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPF4 +346 Testuser-bpm 020a000703 9PFT https://hgf.de/kttc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PFT +351 Testuser-bpm 020a000703 KPHA https://hgf.de/df47 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPHA +424 Testuser-bpm 020a000703 UPHN https://hgf.de/18cs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPHN +325 Testuser-bpm 020a000703 9PJE https://hgf.de/xko4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PJE +347 Testuser-bpm 020a000703 KPJR https://hgf.de/c-gk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPJR +359 Testuser-bpm 020a000703 UPK9 https://hgf.de/6smb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPK9 +455 Testuser-bpm 020a000703 9PKV https://hgf.de/3frv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PKV +462 Testuser-bpm 020a000703 KPLD https://hgf.de/7nbf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPLD +308 Testuser-bpm 020a000703 UPLQ https://hgf.de/yt4g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPLQ +331 Testuser-bpm 020a000703 9PMH https://hgf.de/dhmt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PMH +440 Testuser-bpm 020a000703 KPMU https://hgf.de/1c6z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPMU +467 Testuser-bpm 020a000703 UPNC https://hgf.de/ikzv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPNC +429 Testuser-bpm 020a000703 9PNX https://hgf.de/lsmx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PNX +317 Testuser-bpm 020a000703 KPPF https://hgf.de/w3-w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPPF +259 Testuser-bpm 020a000703 UPPT https://hgf.de/ac1w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPPT +296 Testuser-bpm 020a000703 9PQK https://hgf.de/-shm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PQK +334 Testuser-bpm 020a000703 KPQW https://hgf.de/958j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPQW +361 Testuser-bpm 020a000703 UPRE https://hgf.de/li21 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPRE +266 Testuser-bpm 020a000703 9PT3 https://hgf.de/acsw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PT3 +336 Testuser-bpm 020a000703 KPTJ https://hgf.de/s69y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPTJ +439 Testuser-bpm 020a000703 UPTV https://hgf.de/ukaa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPTV +261 Testuser-bpm 020a000703 9PUM https://hgf.de/uizj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PUM +258 Testuser-bpm 020a000703 KPUY https://hgf.de/cyaz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPUY +264 Testuser-bpm 020a000703 UPVH https://hgf.de/rx4n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPVH +287 Testuser-bpm 020a000703 9PW7 https://hgf.de/ano0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PW7 +332 Testuser-bpm 020a000703 KPWL https://hgf.de/-9n5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPWL +284 Testuser-bpm 020a000703 UPWX https://hgf.de/yn5v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPWX +328 Testuser-bpm 020a000703 9PXP https://hgf.de/wrwf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9PXP +407 Testuser-bpm 020a000703 KPY4 https://hgf.de/cu5j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KPY4 +433 Testuser-bpm 020a000703 UPYK https://hgf.de/lj8m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UPYK +450 Testuser-bpm 020a000703 9Q3A https://hgf.de/3v3n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Q3A +479 Testuser-bpm 020a000703 KQ3N https://hgf.de/ca7j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQ3N +253 Testuser-bpm 020a000703 UQ43 https://hgf.de/8y6l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQ43 +307 Testuser-bpm 020a000703 9Q4R https://hgf.de/61th https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Q4R +465 Testuser-bpm 020a000703 KQ79 https://hgf.de/059q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQ79 +320 Testuser-bpm 020a000703 UQ7M https://hgf.de/gr2b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQ7M +290 Testuser-bpm 020a000703 9Q9D https://hgf.de/aauj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Q9D +458 Testuser-bpm 020a000703 KQ9Q https://hgf.de/w1ez https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQ9Q +358 Testuser-bpm 020a000703 UQA7 https://hgf.de/707w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQA7 +356 Testuser-bpm 020a000703 9QAU https://hgf.de/dhbx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QAU +442 Testuser-bpm 020a000703 KQCC https://hgf.de/bccf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQCC +321 Testuser-bpm 020a000703 UQCP https://hgf.de/ume2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQCP +342 Testuser-bpm 020a000703 9QDF https://hgf.de/y2ag https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QDF +291 Testuser-bpm 020a000703 KQDT https://hgf.de/b3ch https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQDT +383 Testuser-bpm 020a000703 UQEA https://hgf.de/x2b3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQEA +427 Testuser-bpm 020a000703 9QEW https://hgf.de/vdet https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QEW +432 Testuser-bpm 020a000703 KQFE https://hgf.de/-zzq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQFE +297 Testuser-bpm 020a000703 UQFR https://hgf.de/nfky https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQFR +305 Testuser-bpm 020a000703 9QHJ https://hgf.de/ezx- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QHJ +451 Testuser-bpm 020a000703 KQHV https://hgf.de/-eth https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQHV +441 Testuser-bpm 020a000703 UQJD https://hgf.de/-pgc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQJD +491 Testuser-bpm 020a000703 UM77 https://hgf.de/d9zd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UM77 +372 Testuser-bpm 020a000703 9QJY https://hgf.de/yuvx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QJY +482 Testuser-bpm 020a000703 ULWK https://hgf.de/hu1f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULWK +288 Testuser-bpm 020a000703 KQKH https://hgf.de/6d8w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQKH +406 Testuser-bpm 020a000703 UQKU https://hgf.de/omqt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQKU +469 Testuser-bpm 020a000703 9QLL https://hgf.de/41t1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QLL +315 Testuser-bpm 020a000703 KQLX https://hgf.de/35hu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQLX +340 Testuser-bpm 020a000703 UQMF https://hgf.de/yfn3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQMF +379 Testuser-bpm 020a000703 9QN4 https://hgf.de/augl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QN4 +408 Testuser-bpm 020a000703 KQNK https://hgf.de/hxzb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQNK +443 Testuser-bpm 020a000703 UQNW https://hgf.de/a86f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQNW +380 Testuser-bpm 020a000703 9QPN https://hgf.de/410d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QPN +446 Testuser-bpm 020a000703 KQQ3 https://hgf.de/-gty https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQQ3 +418 Testuser-bpm 020a000703 UQQJ https://hgf.de/yfk0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQQJ +498 Testuser-bpm 020a000703 9MCW https://hgf.de/yvda https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9MCW +416 Testuser-bpm 020a000703 9QR9 https://hgf.de/vcnw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QR9 +496 Testuser-bpm 020a000703 KMAT https://hgf.de/qixf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KMAT +454 Testuser-bpm 020a000703 KQRM https://hgf.de/o7ve https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQRM +447 Testuser-bpm 020a000703 UQRY https://hgf.de/wb3y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQRY +471 Testuser-bpm 020a000703 9QTQ https://hgf.de/i3hj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QTQ +452 Testuser-bpm 020a000703 KQU7 https://hgf.de/jyhc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQU7 +323 Testuser-bpm 020a000703 UQUL https://hgf.de/ct9e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQUL +350 Testuser-bpm 020a000703 9QVC https://hgf.de/0axp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QVC +448 Testuser-bpm 020a000703 KQVP https://hgf.de/pb3o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQVP +286 Testuser-bpm 020a000703 UQW4 https://hgf.de/tfy9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQW4 +322 Testuser-bpm 020a000703 9QWT https://hgf.de/0pt0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QWT +275 Testuser-bpm 020a000703 KQXA https://hgf.de/8bg9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQXA +254 Testuser-bpm 020a000703 UQXN https://hgf.de/ijbs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UQXN +295 Testuser-bpm 020a000703 9QYE https://hgf.de/tz77 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9QYE +411 Testuser-bpm 020a000703 KQYR https://hgf.de/874d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KQYR +341 Testuser-bpm 020a000703 UR39 https://hgf.de/fyj5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UR39 +431 Testuser-bpm 020a000703 9R3V https://hgf.de/ukdz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9R3V +492 Testuser-bpm 020a000703 9M7U https://hgf.de/galf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9M7U +409 Testuser-bpm 020a000703 KR4D https://hgf.de/ivkb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KR4D +478 Testuser-bpm 020a000703 UR4Q https://hgf.de/g-2g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UR4Q +312 Testuser-bpm 020a000703 9R7H https://hgf.de/dn7j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9R7H +339 Testuser-bpm 020a000703 KR7U https://hgf.de/pvrr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KR7U +402 Testuser-bpm 020a000703 UR9C https://hgf.de/4t-0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UR9C +316 Testuser-bpm 020a000703 9R9X https://hgf.de/tvnh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9R9X +390 Testuser-bpm 020a000703 KRAF https://hgf.de/ctup https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRAF +423 Testuser-bpm 020a000703 URAT https://hgf.de/yk8q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URAT +278 Testuser-bpm 020a000703 9RCK https://hgf.de/d6as https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RCK +283 Testuser-bpm 020a000703 KRCW https://hgf.de/cf6d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRCW +485 Testuser-bpm 020a000703 ULY3 https://hgf.de/4zv3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ULY3 +421 Testuser-bpm 020a000703 URDE https://hgf.de/5a94 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URDE +357 Testuser-bpm 020a000703 9RE3 https://hgf.de/fn85 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RE3 +476 Testuser-bpm 020a000703 KREJ https://hgf.de/v9iy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KREJ +257 Testuser-bpm 020a000703 UREV https://hgf.de/n8fe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UREV +419 Testuser-bpm 020a000703 9RFM https://hgf.de/0sft https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RFM +426 Testuser-bpm 020a000703 KRFY https://hgf.de/7zco https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRFY +466 Testuser-bpm 020a000703 URHH https://hgf.de/eapp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URHH +397 Testuser-bpm 020a000703 9RJ7 https://hgf.de/i73l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RJ7 +444 Testuser-bpm 020a000703 KRJL https://hgf.de/j-hc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRJL +394 Testuser-bpm 020a000703 URJX https://hgf.de/zys4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URJX +396 Testuser-bpm 020a000703 9RKP https://hgf.de/w8rb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RKP +281 Testuser-bpm 020a000703 KRL4 https://hgf.de/f7wi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRL4 +493 Testuser-bpm 020a000703 KM9C https://hgf.de/kobf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KM9C +367 Testuser-bpm 020a000703 URLK https://hgf.de/8fr9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URLK +388 Testuser-bpm 020a000703 9RMA https://hgf.de/oq6w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RMA +252 Testuser-bpm 020a000703 KRMN https://hgf.de/m6pp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRMN +348 Testuser-bpm 020a000703 URN3 https://hgf.de/grpn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URN3 +470 Testuser-bpm 020a000703 9RNR https://hgf.de/b8jl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RNR +430 Testuser-bpm 020a000703 KRP9 https://hgf.de/p2xh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRP9 +311 Testuser-bpm 020a000703 URPM https://hgf.de/e7la https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URPM +398 Testuser-bpm 020a000703 9RQD https://hgf.de/ysxh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RQD +387 Testuser-bpm 020a000703 KRQQ https://hgf.de/wbzu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRQQ +271 Testuser-bpm 020a000703 URR7 https://hgf.de/ox38 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URR7 +399 Testuser-bpm 020a000703 9RRU https://hgf.de/rvmb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RRU +260 Testuser-bpm 020a000703 KRTC https://hgf.de/4y12 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRTC +272 Testuser-bpm 020a000703 URTP https://hgf.de/30zx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URTP +369 Testuser-bpm 020a000703 9RUF https://hgf.de/hnvn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RUF +500 Testuser-bpm 020a000703 UMDR https://hgf.de/43cv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UMDR +392 Testuser-bpm 020a000703 KRUT https://hgf.de/9f0n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRUT +428 Testuser-bpm 020a000703 URVA https://hgf.de/svjm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URVA +461 Testuser-bpm 020a000703 9RVW https://hgf.de/eyj8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RVW +362 Testuser-bpm 020a000703 KRWE https://hgf.de/dvig https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRWE +488 Testuser-bpm 020a000703 UM3M https://hgf.de/i2o2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UM3M +310 Testuser-bpm 020a000703 URWR https://hgf.de/ac1s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URWR +279 Testuser-bpm 020a000703 9RXJ https://hgf.de/cwq9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RXJ +353 Testuser-bpm 020a000703 KRXV https://hgf.de/rbhk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KRXV +381 Testuser-bpm 020a000703 URYD https://hgf.de/w2oz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=URYD +391 Testuser-bpm 020a000703 9RYY https://hgf.de/s3oo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9RYY +486 Testuser-bpm 020a000703 9LYR https://hgf.de/nwm8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9LYR +267 Testuser-bpm 020a000703 KT3H https://hgf.de/olhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KT3H +413 Testuser-bpm 020a000703 UT3U https://hgf.de/cisi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UT3U +265 Testuser-bpm 020a000703 9T4L https://hgf.de/w8z4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9T4L +345 Testuser-bpm 020a000703 KT4X https://hgf.de/x8n5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KT4X +460 Testuser-bpm 020a000703 UT7F https://hgf.de/m6do https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UT7F +360 Testuser-bpm 020a000703 9T94 https://hgf.de/86y3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9T94 +403 Testuser-bpm 020a000703 KT9K https://hgf.de/h3o0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KT9K +425 Testuser-bpm 020a000703 UT9W https://hgf.de/q5ur https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UT9W +487 Testuser-bpm 020a000703 KM39 https://hgf.de/uyxg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KM39 +489 Testuser-bpm 020a000703 9M4D https://hgf.de/rlke https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9M4D +365 Testuser-bpm 020a000703 9TAN https://hgf.de/grts https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TAN +434 Testuser-bpm 020a000703 KTC3 https://hgf.de/82vg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTC3 diff --git a/++ Dokumente/TANs/hogrefe_tan3.csv b/++ Dokumente/TANs/hogrefe_tan3.csv new file mode 100755 index 0000000..a993dde --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan3.csv @@ -0,0 +1,250 @@ +541 Testuser-bpm 020a000703 9TJT https://hgf.de/do-t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TJT +657 Testuser-bpm 020a000703 KTKA https://hgf.de/m-am https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTKA +583 Testuser-bpm 020a000703 UTKN https://hgf.de/3s66 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTKN +543 Testuser-bpm 020a000703 9TLE https://hgf.de/ynr4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TLE +682 Testuser-bpm 020a000703 KTLR https://hgf.de/e5q5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTLR +507 Testuser-bpm 020a000703 UTM9 https://hgf.de/0rkp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTM9 +733 Testuser-bpm 020a000703 9TMV https://hgf.de/jx9r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TMV +662 Testuser-bpm 020a000703 KTND https://hgf.de/oegg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTND +562 Testuser-bpm 020a000703 UTNQ https://hgf.de/7997 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTNQ +701 Testuser-bpm 020a000703 9TPH https://hgf.de/rmr9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TPH +641 Testuser-bpm 020a000703 KTPU https://hgf.de/qjme https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTPU +632 Testuser-bpm 020a000703 UTQC https://hgf.de/zq32 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTQC +524 Testuser-bpm 020a000703 9TQX https://hgf.de/fnhf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TQX +630 Testuser-bpm 020a000703 KTRF https://hgf.de/cb9l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTRF +690 Testuser-bpm 020a000703 UTRT https://hgf.de/jeg9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTRT +624 Testuser-bpm 020a000703 9TTK https://hgf.de/i9us https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TTK +529 Testuser-bpm 020a000703 KTTW https://hgf.de/qcsi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTTW +551 Testuser-bpm 020a000703 UTUE https://hgf.de/kcvv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTUE +614 Testuser-bpm 020a000703 9TV3 https://hgf.de/t5v1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TV3 +615 Testuser-bpm 020a000703 KTVJ https://hgf.de/3g6x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTVJ +749 Testuser-bpm 020a000703 KTHP https://hgf.de/r81x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTHP +519 Testuser-bpm 020a000703 UTVV https://hgf.de/wlg3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTVV +734 Testuser-bpm 020a000703 9TWM https://hgf.de/phfp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TWM +505 Testuser-bpm 020a000703 KTWY https://hgf.de/1rzy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTWY +547 Testuser-bpm 020a000703 UTXH https://hgf.de/wplq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTXH +671 Testuser-bpm 020a000703 9TY7 https://hgf.de/ix24 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TY7 +628 Testuser-bpm 020a000703 KTYL https://hgf.de/dut4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTYL +506 Testuser-bpm 020a000703 UTYX https://hgf.de/xige https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTYX +703 Testuser-bpm 020a000703 9U3P https://hgf.de/kf5h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9U3P +515 Testuser-bpm 020a000703 KU44 https://hgf.de/bj0s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KU44 +691 Testuser-bpm 020a000703 UU4K https://hgf.de/b3ff https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UU4K +571 Testuser-bpm 020a000703 9U7A https://hgf.de/7hkw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9U7A +625 Testuser-bpm 020a000703 KU7N https://hgf.de/5njt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KU7N +651 Testuser-bpm 020a000703 UU93 https://hgf.de/z80u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UU93 +604 Testuser-bpm 020a000703 9U9R https://hgf.de/vids https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9U9R +578 Testuser-bpm 020a000703 KUA9 https://hgf.de/z0kl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUA9 +533 Testuser-bpm 020a000703 UUAM https://hgf.de/--kz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUAM +531 Testuser-bpm 020a000703 9UCD https://hgf.de/tk7- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UCD +534 Testuser-bpm 020a000703 KUCQ https://hgf.de/9xwr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUCQ +611 Testuser-bpm 020a000703 UUD7 https://hgf.de/mcbn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUD7 +664 Testuser-bpm 020a000703 9UDU https://hgf.de/ifzs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UDU +660 Testuser-bpm 020a000703 KUEC https://hgf.de/iw6- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUEC +561 Testuser-bpm 020a000703 UUEP https://hgf.de/m6wu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUEP +563 Testuser-bpm 020a000703 9UFF https://hgf.de/e1n- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UFF +678 Testuser-bpm 020a000703 KUFT https://hgf.de/e3tj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUFT +622 Testuser-bpm 020a000703 UUHA https://hgf.de/j6tf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUHA +672 Testuser-bpm 020a000703 9UHW https://hgf.de/yc2k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UHW +723 Testuser-bpm 020a000703 KUJE https://hgf.de/0i2e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUJE +742 Testuser-bpm 020a000703 9TD9 https://hgf.de/3sq6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TD9 +559 Testuser-bpm 020a000703 UUJR https://hgf.de/a0lh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUJR +680 Testuser-bpm 020a000703 9UKJ https://hgf.de/dz9i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UKJ +526 Testuser-bpm 020a000703 KUKV https://hgf.de/mam3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUKV +688 Testuser-bpm 020a000703 UULD https://hgf.de/r6kx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UULD +652 Testuser-bpm 020a000703 9ULY https://hgf.de/oab1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9ULY +648 Testuser-bpm 020a000703 KUMH https://hgf.de/hpl3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUMH +746 Testuser-bpm 020a000703 KTF7 https://hgf.de/y1sd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTF7 +674 Testuser-bpm 020a000703 UUMU https://hgf.de/k42- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUMU +532 Testuser-bpm 020a000703 9UNL https://hgf.de/8y0e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UNL +623 Testuser-bpm 020a000703 KUNX https://hgf.de/t5k7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUNX +511 Testuser-bpm 020a000703 UUPF https://hgf.de/5wgq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUPF +612 Testuser-bpm 020a000703 9UQ4 https://hgf.de/c1vh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UQ4 +687 Testuser-bpm 020a000703 KUQK https://hgf.de/xzs- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUQK +665 Testuser-bpm 020a000703 UUQW https://hgf.de/-cbg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUQW +557 Testuser-bpm 020a000703 9URN https://hgf.de/78cl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9URN +597 Testuser-bpm 020a000703 KUT3 https://hgf.de/bqmp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUT3 +654 Testuser-bpm 020a000703 UUTJ https://hgf.de/arp7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUTJ +501 Testuser-bpm 020a000703 9UU9 https://hgf.de/9p99 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UU9 +525 Testuser-bpm 020a000703 KUUM https://hgf.de/ho0- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUUM +503 Testuser-bpm 020a000703 UUUY https://hgf.de/8rqp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUUY +637 Testuser-bpm 020a000703 9UVQ https://hgf.de/w8m2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UVQ +631 Testuser-bpm 020a000703 KUW7 https://hgf.de/z7b1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUW7 +715 Testuser-bpm 020a000703 UUWL https://hgf.de/3q4a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUWL +502 Testuser-bpm 020a000703 9UXC https://hgf.de/gxqy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UXC +634 Testuser-bpm 020a000703 KUXP https://hgf.de/ib38 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KUXP +584 Testuser-bpm 020a000703 UUY4 https://hgf.de/okmh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UUY4 +728 Testuser-bpm 020a000703 9UYT https://hgf.de/gxdf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9UYT +518 Testuser-bpm 020a000703 KV3A https://hgf.de/xjpt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KV3A +579 Testuser-bpm 020a000703 UV3N https://hgf.de/ze5h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UV3N +564 Testuser-bpm 020a000703 9V4E https://hgf.de/auw3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9V4E +706 Testuser-bpm 020a000703 KV4R https://hgf.de/xfwv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KV4R +738 Testuser-bpm 020a000703 UV79 https://hgf.de/uufa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UV79 +670 Testuser-bpm 020a000703 9V7V https://hgf.de/vqhe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9V7V +676 Testuser-bpm 020a000703 KV9D https://hgf.de/py2p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KV9D +724 Testuser-bpm 020a000703 UV9Q https://hgf.de/5043 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UV9Q +720 Testuser-bpm 020a000703 9VAH https://hgf.de/ghtt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VAH +620 Testuser-bpm 020a000703 KVAU https://hgf.de/jdrj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVAU +737 Testuser-bpm 020a000703 UVCC https://hgf.de/ppuf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVCC +685 Testuser-bpm 020a000703 9VCX https://hgf.de/3dek https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VCX +739 Testuser-bpm 020a000703 KVDF https://hgf.de/h4f4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVDF +573 Testuser-bpm 020a000703 UVDT https://hgf.de/t834 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVDT +587 Testuser-bpm 020a000703 9VEK https://hgf.de/86xe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VEK +697 Testuser-bpm 020a000703 KVEW https://hgf.de/z1m9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVEW +653 Testuser-bpm 020a000703 UVFE https://hgf.de/6b3m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVFE +527 Testuser-bpm 020a000703 9VH3 https://hgf.de/wjey https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VH3 +535 Testuser-bpm 020a000703 KVHJ https://hgf.de/03p5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVHJ +748 Testuser-bpm 020a000703 9THC https://hgf.de/j-4e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9THC +542 Testuser-bpm 020a000703 UVHV https://hgf.de/1msm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVHV +546 Testuser-bpm 020a000703 9VJM https://hgf.de/7u5d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VJM +580 Testuser-bpm 020a000703 KVJY https://hgf.de/lvb3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVJY +560 Testuser-bpm 020a000703 UVKH https://hgf.de/33ng https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVKH +589 Testuser-bpm 020a000703 9VL7 https://hgf.de/uhq- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VL7 +523 Testuser-bpm 020a000703 KVLL https://hgf.de/d0jh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVLL +594 Testuser-bpm 020a000703 UVLX https://hgf.de/6rtn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVLX +603 Testuser-bpm 020a000703 9VMP https://hgf.de/1a11 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VMP +684 Testuser-bpm 020a000703 KVN4 https://hgf.de/q1i7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVN4 +565 Testuser-bpm 020a000703 UVNK https://hgf.de/y1im https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVNK +607 Testuser-bpm 020a000703 9VPA https://hgf.de/4kt6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VPA +661 Testuser-bpm 020a000703 KVPN https://hgf.de/csob https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVPN +649 Testuser-bpm 020a000703 UVQ3 https://hgf.de/bpc9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVQ3 +619 Testuser-bpm 020a000703 9VQR https://hgf.de/ij-u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VQR +600 Testuser-bpm 020a000703 KVR9 https://hgf.de/-vyq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVR9 +599 Testuser-bpm 020a000703 UVRM https://hgf.de/bdf7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVRM +601 Testuser-bpm 020a000703 9VTD https://hgf.de/hdhg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VTD +666 Testuser-bpm 020a000703 KVTQ https://hgf.de/o-mm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVTQ +549 Testuser-bpm 020a000703 UVU7 https://hgf.de/fdm5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVU7 +621 Testuser-bpm 020a000703 9VUU https://hgf.de/y9pd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VUU +512 Testuser-bpm 020a000703 KVVC https://hgf.de/-md3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVVC +727 Testuser-bpm 020a000703 UVVP https://hgf.de/sebd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVVP +566 Testuser-bpm 020a000703 9VWF https://hgf.de/0-tl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VWF +745 Testuser-bpm 020a000703 9TEQ https://hgf.de/z4bu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9TEQ +650 Testuser-bpm 020a000703 KVWT https://hgf.de/f9zd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVWT +591 Testuser-bpm 020a000703 UVXA https://hgf.de/7ecp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVXA +558 Testuser-bpm 020a000703 9VXW https://hgf.de/m8nm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9VXW +681 Testuser-bpm 020a000703 KVYE https://hgf.de/z32p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KVYE +669 Testuser-bpm 020a000703 UVYR https://hgf.de/ck84 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UVYR +700 Testuser-bpm 020a000703 9W3J https://hgf.de/dg6g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9W3J +552 Testuser-bpm 020a000703 KW3V https://hgf.de/ycx1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KW3V +596 Testuser-bpm 020a000703 UW4D https://hgf.de/cfbr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UW4D +537 Testuser-bpm 020a000703 9W4Y https://hgf.de/q2qe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9W4Y +577 Testuser-bpm 020a000703 KW7H https://hgf.de/bzfb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KW7H +689 Testuser-bpm 020a000703 UW7U https://hgf.de/ptic https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UW7U +545 Testuser-bpm 020a000703 9W9L https://hgf.de/l7hy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9W9L +585 Testuser-bpm 020a000703 KW9X https://hgf.de/uhqd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KW9X +721 Testuser-bpm 020a000703 UWAF https://hgf.de/zaj- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWAF +643 Testuser-bpm 020a000703 9WC4 https://hgf.de/j54b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WC4 +694 Testuser-bpm 020a000703 KWCK https://hgf.de/134u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWCK +705 Testuser-bpm 020a000703 UWCW https://hgf.de/p4-3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWCW +659 Testuser-bpm 020a000703 9WDN https://hgf.de/70yn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WDN +693 Testuser-bpm 020a000703 KWE3 https://hgf.de/qv0g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWE3 +530 Testuser-bpm 020a000703 UWEJ https://hgf.de/skbd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWEJ +645 Testuser-bpm 020a000703 9WF9 https://hgf.de/4qdb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WF9 +592 Testuser-bpm 020a000703 KWFM https://hgf.de/vky9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWFM +741 Testuser-bpm 020a000703 UTCJ https://hgf.de/v10o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTCJ +710 Testuser-bpm 020a000703 UWFY https://hgf.de/vjff https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWFY +743 Testuser-bpm 020a000703 KTDM https://hgf.de/dxtx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KTDM +528 Testuser-bpm 020a000703 9WHQ https://hgf.de/1d75 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WHQ +730 Testuser-bpm 020a000703 KWJ7 https://hgf.de/bsw4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWJ7 +516 Testuser-bpm 020a000703 UWJL https://hgf.de/xm5z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWJL +709 Testuser-bpm 020a000703 9WKC https://hgf.de/3z4a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WKC +575 Testuser-bpm 020a000703 KWKP https://hgf.de/uf63 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWKP +658 Testuser-bpm 020a000703 UWL4 https://hgf.de/-2z6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWL4 +598 Testuser-bpm 020a000703 9WLT https://hgf.de/u2ih https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WLT +722 Testuser-bpm 020a000703 KWMA https://hgf.de/cjlg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWMA +663 Testuser-bpm 020a000703 UWMN https://hgf.de/lanx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWMN +586 Testuser-bpm 020a000703 9WNE https://hgf.de/z1iw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WNE +610 Testuser-bpm 020a000703 KWNR https://hgf.de/63p5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWNR +683 Testuser-bpm 020a000703 UWP9 https://hgf.de/4vvj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWP9 +548 Testuser-bpm 020a000703 9WPV https://hgf.de/cpxp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WPV +608 Testuser-bpm 020a000703 KWQD https://hgf.de/656i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWQD +640 Testuser-bpm 020a000703 UWQQ https://hgf.de/km5g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWQQ +735 Testuser-bpm 020a000703 9WRH https://hgf.de/1-ex https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WRH +567 Testuser-bpm 020a000703 KWRU https://hgf.de/irsv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWRU +553 Testuser-bpm 020a000703 UWTC https://hgf.de/wabh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWTC +731 Testuser-bpm 020a000703 9WTX https://hgf.de/uddu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WTX +544 Testuser-bpm 020a000703 KWUF https://hgf.de/dufj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWUF +576 Testuser-bpm 020a000703 UWUT https://hgf.de/0r5z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWUT +510 Testuser-bpm 020a000703 9WVK https://hgf.de/jurg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WVK +655 Testuser-bpm 020a000703 KWVW https://hgf.de/nhiz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWVW +712 Testuser-bpm 020a000703 UWWE https://hgf.de/6d4h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWWE +711 Testuser-bpm 020a000703 9WX3 https://hgf.de/9kfk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WX3 +514 Testuser-bpm 020a000703 KWXJ https://hgf.de/8ovd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWXJ +718 Testuser-bpm 020a000703 UWXV https://hgf.de/-bci https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UWXV +606 Testuser-bpm 020a000703 9WYM https://hgf.de/ca28 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9WYM +521 Testuser-bpm 020a000703 KWYY https://hgf.de/c8j8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KWYY +555 Testuser-bpm 020a000703 UX3H https://hgf.de/d1nk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UX3H +744 Testuser-bpm 020a000703 UTDY https://hgf.de/37wk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTDY +609 Testuser-bpm 020a000703 9X47 https://hgf.de/z85z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9X47 +520 Testuser-bpm 020a000703 KX4L https://hgf.de/49ja https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KX4L +747 Testuser-bpm 020a000703 UTFL https://hgf.de/vker https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTFL +595 Testuser-bpm 020a000703 UX4X https://hgf.de/q31s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UX4X +679 Testuser-bpm 020a000703 9X7P https://hgf.de/614g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9X7P +517 Testuser-bpm 020a000703 KX94 https://hgf.de/9b7p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KX94 +626 Testuser-bpm 020a000703 UX9K https://hgf.de/px0n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UX9K +522 Testuser-bpm 020a000703 9XAA https://hgf.de/oged https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XAA +668 Testuser-bpm 020a000703 KXAN https://hgf.de/xo0q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXAN +732 Testuser-bpm 020a000703 UXC3 https://hgf.de/q8ju https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXC3 +656 Testuser-bpm 020a000703 9XCR https://hgf.de/35gz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XCR +574 Testuser-bpm 020a000703 KXD9 https://hgf.de/ok47 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXD9 +699 Testuser-bpm 020a000703 UXDM https://hgf.de/uwux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXDM +633 Testuser-bpm 020a000703 9XED https://hgf.de/xlor https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XED +570 Testuser-bpm 020a000703 KXEQ https://hgf.de/4it1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXEQ +617 Testuser-bpm 020a000703 UXF7 https://hgf.de/-pnw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXF7 +618 Testuser-bpm 020a000703 9XFU https://hgf.de/jvzv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XFU +572 Testuser-bpm 020a000703 KXHC https://hgf.de/8tcr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXHC +508 Testuser-bpm 020a000703 UXHP https://hgf.de/27pu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXHP +613 Testuser-bpm 020a000703 9XJF https://hgf.de/4xm8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XJF +636 Testuser-bpm 020a000703 KXJT https://hgf.de/1kj2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXJT +707 Testuser-bpm 020a000703 UXKA https://hgf.de/fgp2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXKA +540 Testuser-bpm 020a000703 9XKW https://hgf.de/7oev https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XKW +677 Testuser-bpm 020a000703 KXLE https://hgf.de/kh08 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXLE +638 Testuser-bpm 020a000703 UXLR https://hgf.de/586b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXLR +675 Testuser-bpm 020a000703 9XMJ https://hgf.de/sxmu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XMJ +646 Testuser-bpm 020a000703 KXMV https://hgf.de/sdfl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXMV +644 Testuser-bpm 020a000703 UXND https://hgf.de/c0wc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXND +667 Testuser-bpm 020a000703 9XNY https://hgf.de/4vr- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XNY +627 Testuser-bpm 020a000703 KXPH https://hgf.de/-94w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXPH +692 Testuser-bpm 020a000703 UXPU https://hgf.de/2eiv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXPU +695 Testuser-bpm 020a000703 9XQL https://hgf.de/6-w3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XQL +509 Testuser-bpm 020a000703 KXQX https://hgf.de/dfug https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXQX +602 Testuser-bpm 020a000703 UXRF https://hgf.de/qs2r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXRF +686 Testuser-bpm 020a000703 9XT4 https://hgf.de/vvcn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XT4 +590 Testuser-bpm 020a000703 KXTK https://hgf.de/8gdt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXTK +647 Testuser-bpm 020a000703 UXTW https://hgf.de/kosf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXTW +725 Testuser-bpm 020a000703 9XUN https://hgf.de/snct https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XUN +568 Testuser-bpm 020a000703 KXV3 https://hgf.de/uma7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXV3 +504 Testuser-bpm 020a000703 UXVJ https://hgf.de/8s32 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXVJ +556 Testuser-bpm 020a000703 9XW9 https://hgf.de/7v79 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XW9 +635 Testuser-bpm 020a000703 KXWM https://hgf.de/stqt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXWM +605 Testuser-bpm 020a000703 UXWY https://hgf.de/okdv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXWY +716 Testuser-bpm 020a000703 9XXQ https://hgf.de/3w7q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9XXQ +513 Testuser-bpm 020a000703 KXY7 https://hgf.de/-jj2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KXY7 +729 Testuser-bpm 020a000703 UXYL https://hgf.de/dyh8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UXYL +708 Testuser-bpm 020a000703 9Y3C https://hgf.de/7r3e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Y3C +736 Testuser-bpm 020a000703 KY3P https://hgf.de/nm12 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KY3P +750 Testuser-bpm 020a000703 UTJ4 https://hgf.de/apod https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UTJ4 +642 Testuser-bpm 020a000703 UY44 https://hgf.de/q87k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UY44 +538 Testuser-bpm 020a000703 9Y4T https://hgf.de/t-qv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Y4T +726 Testuser-bpm 020a000703 KY7A https://hgf.de/oavi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KY7A +582 Testuser-bpm 020a000703 UY7N https://hgf.de/3ogq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UY7N +704 Testuser-bpm 020a000703 9Y9E https://hgf.de/i1sx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9Y9E +581 Testuser-bpm 020a000703 KY9R https://hgf.de/x0gl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KY9R +673 Testuser-bpm 020a000703 UYA9 https://hgf.de/j-fn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYA9 +719 Testuser-bpm 020a000703 9YAV https://hgf.de/f1h6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YAV +569 Testuser-bpm 020a000703 KYCD https://hgf.de/bxmm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYCD +588 Testuser-bpm 020a000703 UYCQ https://hgf.de/bma7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYCQ +717 Testuser-bpm 020a000703 9YDH https://hgf.de/98kp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YDH +539 Testuser-bpm 020a000703 KYDU https://hgf.de/48sk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYDU +702 Testuser-bpm 020a000703 UYEC https://hgf.de/-cc6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYEC +696 Testuser-bpm 020a000703 9YEX https://hgf.de/c8vw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YEX +616 Testuser-bpm 020a000703 KYFF https://hgf.de/3bux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYFF +740 Testuser-bpm 020a000703 UYFT https://hgf.de/dl63 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYFT +629 Testuser-bpm 020a000703 9YHK https://hgf.de/06ih https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YHK +698 Testuser-bpm 020a000703 KYHW https://hgf.de/uwib https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYHW +554 Testuser-bpm 020a000703 UYJE https://hgf.de/o2yq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYJE +536 Testuser-bpm 020a000703 9YK3 https://hgf.de/n0uo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YK3 +639 Testuser-bpm 020a000703 KYKJ https://hgf.de/ose1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYKJ +713 Testuser-bpm 020a000703 UYKV https://hgf.de/kk3x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYKV +714 Testuser-bpm 020a000703 9YLM https://hgf.de/vlsh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YLM +550 Testuser-bpm 020a000703 KYLY https://hgf.de/a0vu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYLY +593 Testuser-bpm 020a000703 UYMH https://hgf.de/5bm2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYMH diff --git a/++ Dokumente/TANs/hogrefe_tan4.csv b/++ Dokumente/TANs/hogrefe_tan4.csv new file mode 100755 index 0000000..ba7e4b7 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan4.csv @@ -0,0 +1,250 @@ +806 Testuser-bpm 020a000703 V33A https://hgf.de/rxy- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V33A +849 Testuser-bpm 020a000703 A33W https://hgf.de/n5lf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A33W +772 Testuser-bpm 020a000703 L34E https://hgf.de/q743 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L34E +950 Testuser-bpm 020a000703 V34R https://hgf.de/nt71 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V34R +884 Testuser-bpm 020a000703 A37J https://hgf.de/xp-z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A37J +923 Testuser-bpm 020a000703 L37V https://hgf.de/l8r6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L37V +981 Testuser-bpm 020a000703 KYNL https://hgf.de/03qj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYNL +948 Testuser-bpm 020a000703 V39D https://hgf.de/9cnp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V39D +900 Testuser-bpm 020a000703 A39Y https://hgf.de/nay2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A39Y +931 Testuser-bpm 020a000703 L3AH https://hgf.de/ydnp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3AH +895 Testuser-bpm 020a000703 V3AU https://hgf.de/56ag https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3AU +958 Testuser-bpm 020a000703 A3CL https://hgf.de/-3-8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3CL +897 Testuser-bpm 020a000703 L3CX https://hgf.de/rqh4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3CX +867 Testuser-bpm 020a000703 V3DF https://hgf.de/v68x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3DF +982 Testuser-bpm 020a000703 UYNX https://hgf.de/dvol https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYNX +805 Testuser-bpm 020a000703 A3E4 https://hgf.de/s-zq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3E4 +820 Testuser-bpm 020a000703 L3EK https://hgf.de/f3dr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3EK +956 Testuser-bpm 020a000703 V3EW https://hgf.de/syh9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3EW +938 Testuser-bpm 020a000703 A3FN https://hgf.de/ta0e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3FN +762 Testuser-bpm 020a000703 L3H3 https://hgf.de/2xzk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3H3 +782 Testuser-bpm 020a000703 V3HJ https://hgf.de/vz6k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3HJ +872 Testuser-bpm 020a000703 A3J9 https://hgf.de/1sr2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3J9 +906 Testuser-bpm 020a000703 L3JM https://hgf.de/vtz9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3JM +991 Testuser-bpm 020a000703 UYUM https://hgf.de/quhq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYUM +832 Testuser-bpm 020a000703 V3JY https://hgf.de/jvwo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3JY +847 Testuser-bpm 020a000703 A3KQ https://hgf.de/02iq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3KQ +788 Testuser-bpm 020a000703 L3L7 https://hgf.de/eqcw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3L7 +769 Testuser-bpm 020a000703 V3LL https://hgf.de/4utz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3LL +812 Testuser-bpm 020a000703 A3MC https://hgf.de/ciu7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3MC +777 Testuser-bpm 020a000703 L3MP https://hgf.de/34wy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3MP +932 Testuser-bpm 020a000703 V3N4 https://hgf.de/gvz1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3N4 +939 Testuser-bpm 020a000703 A3NT https://hgf.de/wlvn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3NT +813 Testuser-bpm 020a000703 L3PA https://hgf.de/6807 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3PA +787 Testuser-bpm 020a000703 V3PN https://hgf.de/lrx0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3PN +903 Testuser-bpm 020a000703 A3QE https://hgf.de/1w9f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3QE +819 Testuser-bpm 020a000703 L3QR https://hgf.de/4cmx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3QR +901 Testuser-bpm 020a000703 V3R9 https://hgf.de/ueg7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3R9 +964 Testuser-bpm 020a000703 A3RV https://hgf.de/-55g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3RV +891 Testuser-bpm 020a000703 L3TD https://hgf.de/hji9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3TD +801 Testuser-bpm 020a000703 V3TQ https://hgf.de/ykv7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3TQ +974 Testuser-bpm 020a000703 A3UH https://hgf.de/z85j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3UH +904 Testuser-bpm 020a000703 L3UU https://hgf.de/ak1b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3UU +810 Testuser-bpm 020a000703 V3VC https://hgf.de/lpn- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3VC +945 Testuser-bpm 020a000703 A3VX https://hgf.de/u477 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3VX +971 Testuser-bpm 020a000703 L3WF https://hgf.de/z7d0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3WF +799 Testuser-bpm 020a000703 V3WT https://hgf.de/mwmo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3WT +763 Testuser-bpm 020a000703 A3XK https://hgf.de/gifx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A3XK +882 Testuser-bpm 020a000703 L3XW https://hgf.de/ad1m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L3XW +843 Testuser-bpm 020a000703 V3YE https://hgf.de/620m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V3YE +850 Testuser-bpm 020a000703 A433 https://hgf.de/hnfs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A433 +863 Testuser-bpm 020a000703 L43J https://hgf.de/h0cn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L43J +920 Testuser-bpm 020a000703 V43V https://hgf.de/xev6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V43V +808 Testuser-bpm 020a000703 A44M https://hgf.de/c8ak https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A44M +976 Testuser-bpm 020a000703 L44Y https://hgf.de/rvyp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L44Y +994 Testuser-bpm 020a000703 UYW7 https://hgf.de/dc3x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYW7 +969 Testuser-bpm 020a000703 V47H https://hgf.de/zco0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V47H +979 Testuser-bpm 020a000703 A497 https://hgf.de/jifq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A497 +844 Testuser-bpm 020a000703 L49L https://hgf.de/hqk8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L49L +783 Testuser-bpm 020a000703 V49X https://hgf.de/1t7p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V49X +837 Testuser-bpm 020a000703 A4AP https://hgf.de/jfc1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4AP +838 Testuser-bpm 020a000703 L4C4 https://hgf.de/91t1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4C4 +953 Testuser-bpm 020a000703 V4CK https://hgf.de/v9pi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4CK +977 Testuser-bpm 020a000703 A4DA https://hgf.de/ov04 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4DA +984 Testuser-bpm 020a000703 KYQ4 https://hgf.de/weng https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYQ4 +854 Testuser-bpm 020a000703 L4DN https://hgf.de/yfxk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4DN +824 Testuser-bpm 020a000703 V4E3 https://hgf.de/s8id https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4E3 +886 Testuser-bpm 020a000703 A4ER https://hgf.de/4fiz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4ER +912 Testuser-bpm 020a000703 L4F9 https://hgf.de/7pa7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4F9 +862 Testuser-bpm 020a000703 V4FM https://hgf.de/a3a1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4FM +848 Testuser-bpm 020a000703 A4HD https://hgf.de/4fb5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4HD +766 Testuser-bpm 020a000703 L4HQ https://hgf.de/c9ed https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4HQ +973 Testuser-bpm 020a000703 V4J7 https://hgf.de/jbw9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4J7 +992 Testuser-bpm 020a000703 9YVD https://hgf.de/wghz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YVD +909 Testuser-bpm 020a000703 A4JU https://hgf.de/1c0i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4JU +796 Testuser-bpm 020a000703 L4KC https://hgf.de/tu6c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4KC +911 Testuser-bpm 020a000703 V4KP https://hgf.de/0mmf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4KP +780 Testuser-bpm 020a000703 A4LF https://hgf.de/xa4f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4LF +855 Testuser-bpm 020a000703 L4LT https://hgf.de/03as https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4LT +861 Testuser-bpm 020a000703 V4MA https://hgf.de/bnq5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4MA +910 Testuser-bpm 020a000703 A4MW https://hgf.de/pnwq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4MW +916 Testuser-bpm 020a000703 L4NE https://hgf.de/1zyj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4NE +776 Testuser-bpm 020a000703 V4NR https://hgf.de/zak1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4NR +814 Testuser-bpm 020a000703 A4PJ https://hgf.de/ghmz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4PJ +990 Testuser-bpm 020a000703 KYU9 https://hgf.de/9qsi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYU9 +807 Testuser-bpm 020a000703 L4PV https://hgf.de/d-5w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4PV +954 Testuser-bpm 020a000703 V4QD https://hgf.de/jw73 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4QD +946 Testuser-bpm 020a000703 A4QY https://hgf.de/v2us https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4QY +996 Testuser-bpm 020a000703 KYXC https://hgf.de/dgcm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYXC +771 Testuser-bpm 020a000703 L4RH https://hgf.de/yqi- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4RH +883 Testuser-bpm 020a000703 V4RU https://hgf.de/616g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4RU +899 Testuser-bpm 020a000703 A4TL https://hgf.de/ss00 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4TL +919 Testuser-bpm 020a000703 L4TX https://hgf.de/mppm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4TX +934 Testuser-bpm 020a000703 V4UF https://hgf.de/0g5s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4UF +866 Testuser-bpm 020a000703 A4V4 https://hgf.de/2myo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4V4 +786 Testuser-bpm 020a000703 L4VK https://hgf.de/svq8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4VK +929 Testuser-bpm 020a000703 V4VW https://hgf.de/e45i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4VW +764 Testuser-bpm 020a000703 A4WN https://hgf.de/bx0p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4WN +993 Testuser-bpm 020a000703 KYVQ https://hgf.de/lee6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYVQ +999 Testuser-bpm 020a000703 KYYT https://hgf.de/4nr5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYYT +875 Testuser-bpm 020a000703 L4X3 https://hgf.de/9z6f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4X3 +856 Testuser-bpm 020a000703 V4XJ https://hgf.de/i7eb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4XJ +811 Testuser-bpm 020a000703 A4Y9 https://hgf.de/y982 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A4Y9 +940 Testuser-bpm 020a000703 L4YM https://hgf.de/kgqw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L4YM +757 Testuser-bpm 020a000703 V4YY https://hgf.de/-vvg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V4YY +830 Testuser-bpm 020a000703 A73Q https://hgf.de/ize8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A73Q +885 Testuser-bpm 020a000703 L747 https://hgf.de/5ty4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L747 +791 Testuser-bpm 020a000703 V74L https://hgf.de/zqh9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V74L +841 Testuser-bpm 020a000703 A77C https://hgf.de/zepc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A77C +852 Testuser-bpm 020a000703 L77P https://hgf.de/6u5k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L77P +753 Testuser-bpm 020a000703 V794 https://hgf.de/uqkn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V794 +1000 Testuser-bpm 020a000703 A79T https://hgf.de/5v-j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A79T +767 Testuser-bpm 020a000703 L7AA https://hgf.de/4wf4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7AA +826 Testuser-bpm 020a000703 V7AN https://hgf.de/rcv5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7AN +880 Testuser-bpm 020a000703 A7CE https://hgf.de/2jbr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7CE +834 Testuser-bpm 020a000703 L7CR https://hgf.de/78i5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7CR +913 Testuser-bpm 020a000703 V7D9 https://hgf.de/qcg5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7D9 +921 Testuser-bpm 020a000703 A7DV https://hgf.de/xspo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7DV +983 Testuser-bpm 020a000703 9YPP https://hgf.de/7b4s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YPP +889 Testuser-bpm 020a000703 L7ED https://hgf.de/uold https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7ED +918 Testuser-bpm 020a000703 V7EQ https://hgf.de/drf5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7EQ +951 Testuser-bpm 020a000703 A7FH https://hgf.de/x3mn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7FH +873 Testuser-bpm 020a000703 L7FU https://hgf.de/3koq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7FU +818 Testuser-bpm 020a000703 V7HC https://hgf.de/867m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7HC +874 Testuser-bpm 020a000703 A7HX https://hgf.de/x9l0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7HX +978 Testuser-bpm 020a000703 L7JF https://hgf.de/jq3t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7JF +781 Testuser-bpm 020a000703 V7JT https://hgf.de/o6wf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7JT +833 Testuser-bpm 020a000703 A7KK https://hgf.de/v9rc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7KK +871 Testuser-bpm 020a000703 L7KW https://hgf.de/ck24 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7KW +966 Testuser-bpm 020a000703 V7LE https://hgf.de/2nr5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7LE +944 Testuser-bpm 020a000703 A7M3 https://hgf.de/ldf4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7M3 +779 Testuser-bpm 020a000703 L7MJ https://hgf.de/czsl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7MJ +881 Testuser-bpm 020a000703 V7MV https://hgf.de/i4hj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7MV +960 Testuser-bpm 020a000703 A7NM https://hgf.de/p5qk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7NM +774 Testuser-bpm 020a000703 L7NY https://hgf.de/kzm9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7NY +817 Testuser-bpm 020a000703 V7PH https://hgf.de/2m94 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7PH +846 Testuser-bpm 020a000703 A7Q7 https://hgf.de/o83i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7Q7 +831 Testuser-bpm 020a000703 L7QL https://hgf.de/ns9h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7QL +914 Testuser-bpm 020a000703 V7QX https://hgf.de/va-b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7QX +858 Testuser-bpm 020a000703 A7RP https://hgf.de/hds6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7RP +987 Testuser-bpm 020a000703 KYRN https://hgf.de/pe1v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=KYRN +827 Testuser-bpm 020a000703 L7T4 https://hgf.de/t3i5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7T4 +988 Testuser-bpm 020a000703 UYT3 https://hgf.de/jtpa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYT3 +865 Testuser-bpm 020a000703 V7TK https://hgf.de/e69c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7TK +915 Testuser-bpm 020a000703 A7UA https://hgf.de/wid6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7UA +851 Testuser-bpm 020a000703 L7UN https://hgf.de/ktye https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7UN +962 Testuser-bpm 020a000703 V7V3 https://hgf.de/q6-c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7V3 +845 Testuser-bpm 020a000703 A7VR https://hgf.de/xv2y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7VR +773 Testuser-bpm 020a000703 L7W9 https://hgf.de/1ym5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7W9 +925 Testuser-bpm 020a000703 V7WM https://hgf.de/zoeh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7WM +876 Testuser-bpm 020a000703 A7XD https://hgf.de/05rh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7XD +775 Testuser-bpm 020a000703 L7XQ https://hgf.de/uknf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L7XQ +839 Testuser-bpm 020a000703 V7Y7 https://hgf.de/ea19 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V7Y7 +941 Testuser-bpm 020a000703 A7YU https://hgf.de/c6h1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A7YU +803 Testuser-bpm 020a000703 L93C https://hgf.de/pznu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L93C +965 Testuser-bpm 020a000703 V93P https://hgf.de/awvy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V93P +802 Testuser-bpm 020a000703 A94F https://hgf.de/oiai https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A94F +828 Testuser-bpm 020a000703 L94T https://hgf.de/or5b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L94T +778 Testuser-bpm 020a000703 V97A https://hgf.de/d0vb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V97A +795 Testuser-bpm 020a000703 A97W https://hgf.de/yvnc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A97W +917 Testuser-bpm 020a000703 L99E https://hgf.de/vw8b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L99E +997 Testuser-bpm 020a000703 UYXP https://hgf.de/rwrf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYXP +878 Testuser-bpm 020a000703 V99R https://hgf.de/5oty https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V99R +902 Testuser-bpm 020a000703 A9AJ https://hgf.de/tt-v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9AJ +970 Testuser-bpm 020a000703 L9AV https://hgf.de/cuzv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9AV +756 Testuser-bpm 020a000703 V9CD https://hgf.de/03xu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9CD +864 Testuser-bpm 020a000703 A9CY https://hgf.de/gjau https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9CY +755 Testuser-bpm 020a000703 L9DH https://hgf.de/5ii2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9DH +821 Testuser-bpm 020a000703 V9DU https://hgf.de/44uo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9DU +959 Testuser-bpm 020a000703 A9EL https://hgf.de/avsm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9EL +972 Testuser-bpm 020a000703 L9EX https://hgf.de/-dxl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9EX +907 Testuser-bpm 020a000703 V9FF https://hgf.de/u3a5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9FF +877 Testuser-bpm 020a000703 A9H4 https://hgf.de/z-p1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9H4 +789 Testuser-bpm 020a000703 L9HK https://hgf.de/0u4p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9HK +835 Testuser-bpm 020a000703 V9HW https://hgf.de/qlwd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9HW +759 Testuser-bpm 020a000703 A9JN https://hgf.de/k0bs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9JN +892 Testuser-bpm 020a000703 L9K3 https://hgf.de/as1b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9K3 +893 Testuser-bpm 020a000703 V9KJ https://hgf.de/r86y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9KJ +943 Testuser-bpm 020a000703 A9L9 https://hgf.de/q71s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9L9 +887 Testuser-bpm 020a000703 L9LM https://hgf.de/actx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9LM +928 Testuser-bpm 020a000703 V9LY https://hgf.de/w1sn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9LY +888 Testuser-bpm 020a000703 A9MQ https://hgf.de/qfhf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9MQ +930 Testuser-bpm 020a000703 L9N7 https://hgf.de/ulqj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9N7 +968 Testuser-bpm 020a000703 V9NL https://hgf.de/psrv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9NL +995 Testuser-bpm 020a000703 9YWU https://hgf.de/q204 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YWU +758 Testuser-bpm 020a000703 A9PC https://hgf.de/i6a3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9PC +760 Testuser-bpm 020a000703 L9PP https://hgf.de/2ril https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9PP +798 Testuser-bpm 020a000703 V9Q4 https://hgf.de/8cbd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9Q4 +898 Testuser-bpm 020a000703 A9QT https://hgf.de/x0r1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9QT +816 Testuser-bpm 020a000703 L9RA https://hgf.de/6460 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9RA +869 Testuser-bpm 020a000703 V9RN https://hgf.de/9khh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9RN +957 Testuser-bpm 020a000703 A9TE https://hgf.de/mv3t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9TE +797 Testuser-bpm 020a000703 L9TR https://hgf.de/32mo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9TR +751 Testuser-bpm 020a000703 V9U9 https://hgf.de/mh1x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9U9 +804 Testuser-bpm 020a000703 A9UV https://hgf.de/f60d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9UV +879 Testuser-bpm 020a000703 L9VD https://hgf.de/ba9y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9VD +947 Testuser-bpm 020a000703 V9VQ https://hgf.de/comr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9VQ +961 Testuser-bpm 020a000703 A9WH https://hgf.de/ypgx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9WH +792 Testuser-bpm 020a000703 L9WU https://hgf.de/tst8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9WU +829 Testuser-bpm 020a000703 V9XC https://hgf.de/bhm1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9XC +894 Testuser-bpm 020a000703 A9XX https://hgf.de/lcce https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=A9XX +937 Testuser-bpm 020a000703 L9YF https://hgf.de/l8rk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=L9YF +761 Testuser-bpm 020a000703 V9YT https://hgf.de/cmpo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=V9YT +949 Testuser-bpm 020a000703 AA3K https://hgf.de/w-x3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AA3K +853 Testuser-bpm 020a000703 LA3W https://hgf.de/93s3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LA3W +936 Testuser-bpm 020a000703 VA4E https://hgf.de/811k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VA4E +905 Testuser-bpm 020a000703 AA73 https://hgf.de/gv9i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AA73 +768 Testuser-bpm 020a000703 LA7J https://hgf.de/52r5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LA7J +823 Testuser-bpm 020a000703 VA7V https://hgf.de/nc0o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VA7V +868 Testuser-bpm 020a000703 AA9M https://hgf.de/qkyc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AA9M +859 Testuser-bpm 020a000703 LA9Y https://hgf.de/7m91 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LA9Y +825 Testuser-bpm 020a000703 VAAH https://hgf.de/upik https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAAH +985 Testuser-bpm 020a000703 UYQK https://hgf.de/nznt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=UYQK +815 Testuser-bpm 020a000703 AAC7 https://hgf.de/8s6d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAC7 +765 Testuser-bpm 020a000703 LACL https://hgf.de/nl0t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LACL +770 Testuser-bpm 020a000703 VACX https://hgf.de/jkc9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VACX +840 Testuser-bpm 020a000703 AADP https://hgf.de/8grf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AADP +857 Testuser-bpm 020a000703 LAE4 https://hgf.de/fwjb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAE4 +785 Testuser-bpm 020a000703 VAEK https://hgf.de/uw-j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAEK +800 Testuser-bpm 020a000703 AAFA https://hgf.de/w0xx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAFA +836 Testuser-bpm 020a000703 LAFN https://hgf.de/bg6j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAFN +942 Testuser-bpm 020a000703 VAH3 https://hgf.de/ey9q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAH3 +870 Testuser-bpm 020a000703 AAHR https://hgf.de/kybh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAHR +952 Testuser-bpm 020a000703 LAJ9 https://hgf.de/ni7u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAJ9 +935 Testuser-bpm 020a000703 VAJM https://hgf.de/w9at https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAJM +955 Testuser-bpm 020a000703 AAKD https://hgf.de/bilu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAKD +842 Testuser-bpm 020a000703 LAKQ https://hgf.de/hixg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAKQ +975 Testuser-bpm 020a000703 VAL7 https://hgf.de/p61p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAL7 +793 Testuser-bpm 020a000703 AALU https://hgf.de/d0tj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AALU +927 Testuser-bpm 020a000703 LAMC https://hgf.de/w8ze https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAMC +933 Testuser-bpm 020a000703 VAMP https://hgf.de/i8fy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAMP +986 Testuser-bpm 020a000703 9YRA https://hgf.de/k0mj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YRA +860 Testuser-bpm 020a000703 AANF https://hgf.de/fxwr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AANF +967 Testuser-bpm 020a000703 LANT https://hgf.de/fxxr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LANT +922 Testuser-bpm 020a000703 VAPA https://hgf.de/tt33 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAPA +794 Testuser-bpm 020a000703 AAPW https://hgf.de/slkg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAPW +980 Testuser-bpm 020a000703 9YN7 https://hgf.de/1u97 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YN7 +963 Testuser-bpm 020a000703 LAQE https://hgf.de/bx5a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAQE +989 Testuser-bpm 020a000703 9YTR https://hgf.de/a0lx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YTR +754 Testuser-bpm 020a000703 VAQR https://hgf.de/exlw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAQR +926 Testuser-bpm 020a000703 AARJ https://hgf.de/bjgb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AARJ +890 Testuser-bpm 020a000703 LARV https://hgf.de/8a7k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LARV +924 Testuser-bpm 020a000703 VATD https://hgf.de/tsb4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VATD +752 Testuser-bpm 020a000703 AATY https://hgf.de/g476 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AATY +809 Testuser-bpm 020a000703 LAUH https://hgf.de/7arw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAUH +896 Testuser-bpm 020a000703 VAUU https://hgf.de/4azf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAUU +998 Testuser-bpm 020a000703 9YYF https://hgf.de/p6xy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=9YYF +784 Testuser-bpm 020a000703 AAVL https://hgf.de/vyd0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAVL +822 Testuser-bpm 020a000703 LAVX https://hgf.de/vf5g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAVX +908 Testuser-bpm 020a000703 VAWF https://hgf.de/a4hq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAWF +790 Testuser-bpm 020a000703 AAX4 https://hgf.de/pinz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAX4 diff --git a/++ Dokumente/TANs/hogrefe_tan5.csv b/++ Dokumente/TANs/hogrefe_tan5.csv new file mode 100755 index 0000000..823afe6 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan5.csv @@ -0,0 +1,250 @@ +1134 Testuser-bpm 020a000703 VC9L https://hgf.de/p2cg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VC9L +1057 Testuser-bpm 020a000703 ACAC https://hgf.de/4y4z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACAC +1206 Testuser-bpm 020a000703 LCAP https://hgf.de/3b7m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCAP +1200 Testuser-bpm 020a000703 VCC4 https://hgf.de/6u6p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCC4 +1040 Testuser-bpm 020a000703 ACCT https://hgf.de/jsp3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACCT +1209 Testuser-bpm 020a000703 LCDA https://hgf.de/ei00 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCDA +1222 Testuser-bpm 020a000703 VCDN https://hgf.de/dcn5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCDN +1161 Testuser-bpm 020a000703 ACEE https://hgf.de/jlfd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACEE +1235 Testuser-bpm 020a000703 LCER https://hgf.de/dvgy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCER +1143 Testuser-bpm 020a000703 VCF9 https://hgf.de/huw5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCF9 +1127 Testuser-bpm 020a000703 ACFV https://hgf.de/n06l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACFV +1135 Testuser-bpm 020a000703 LCHD https://hgf.de/-xgw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCHD +1114 Testuser-bpm 020a000703 VCHQ https://hgf.de/9msm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCHQ +1091 Testuser-bpm 020a000703 ACJH https://hgf.de/whrq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACJH +1128 Testuser-bpm 020a000703 LCJU https://hgf.de/8p3b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCJU +1234 Testuser-bpm 020a000703 VCKC https://hgf.de/-9l0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCKC +1162 Testuser-bpm 020a000703 ACKX https://hgf.de/zvae https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACKX +1108 Testuser-bpm 020a000703 LCLF https://hgf.de/oli9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCLF +1160 Testuser-bpm 020a000703 VCLT https://hgf.de/770a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCLT +1187 Testuser-bpm 020a000703 ACMK https://hgf.de/ljwt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACMK +1027 Testuser-bpm 020a000703 LCMW https://hgf.de/g3g- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCMW +1151 Testuser-bpm 020a000703 VCNE https://hgf.de/67bt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCNE +1173 Testuser-bpm 020a000703 ACP3 https://hgf.de/uefv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACP3 +1054 Testuser-bpm 020a000703 LCPJ https://hgf.de/ef6y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCPJ +1009 Testuser-bpm 020a000703 VCPV https://hgf.de/kn1w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCPV +1125 Testuser-bpm 020a000703 ACQM https://hgf.de/r6c6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACQM +1087 Testuser-bpm 020a000703 LCQY https://hgf.de/vzz9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCQY +1102 Testuser-bpm 020a000703 VCRH https://hgf.de/7lci https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCRH +1080 Testuser-bpm 020a000703 ACT7 https://hgf.de/6vvl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACT7 +1146 Testuser-bpm 020a000703 LCTL https://hgf.de/89jl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCTL +1093 Testuser-bpm 020a000703 VCTX https://hgf.de/sont https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCTX +1195 Testuser-bpm 020a000703 ACUP https://hgf.de/5by9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACUP +1086 Testuser-bpm 020a000703 LCV4 https://hgf.de/hobx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCV4 +1179 Testuser-bpm 020a000703 VCVK https://hgf.de/cxu0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCVK +1221 Testuser-bpm 020a000703 ACWA https://hgf.de/m4n4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACWA +1238 Testuser-bpm 020a000703 LCWN https://hgf.de/8bz3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCWN +1023 Testuser-bpm 020a000703 VCX3 https://hgf.de/9bwd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCX3 +1185 Testuser-bpm 020a000703 ACXR https://hgf.de/ndyn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ACXR +1159 Testuser-bpm 020a000703 LCY9 https://hgf.de/ayjf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LCY9 +1015 Testuser-bpm 020a000703 VCYM https://hgf.de/1446 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VCYM +1177 Testuser-bpm 020a000703 AD3D https://hgf.de/6o65 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AD3D +1104 Testuser-bpm 020a000703 LD3Q https://hgf.de/a1q5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LD3Q +1047 Testuser-bpm 020a000703 VD47 https://hgf.de/ji8w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VD47 +1119 Testuser-bpm 020a000703 AD4U https://hgf.de/1y0g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AD4U +1156 Testuser-bpm 020a000703 LD7C https://hgf.de/4bjh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LD7C +1077 Testuser-bpm 020a000703 VD7P https://hgf.de/qlhz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VD7P +1181 Testuser-bpm 020a000703 AD9F https://hgf.de/sa2e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AD9F +1060 Testuser-bpm 020a000703 LD9T https://hgf.de/gone https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LD9T +1011 Testuser-bpm 020a000703 VDAA https://hgf.de/r4be https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDAA +1148 Testuser-bpm 020a000703 ADAW https://hgf.de/qf4l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADAW +1032 Testuser-bpm 020a000703 LDCE https://hgf.de/509p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDCE +1201 Testuser-bpm 020a000703 VDCR https://hgf.de/m9h4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDCR +1170 Testuser-bpm 020a000703 ADDJ https://hgf.de/dgo7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADDJ +1242 Testuser-bpm 020a000703 VAXW https://hgf.de/0018 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VAXW +1239 Testuser-bpm 020a000703 LDDV https://hgf.de/koqe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDDV +1042 Testuser-bpm 020a000703 VDED https://hgf.de/8ra5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDED +1028 Testuser-bpm 020a000703 ADEY https://hgf.de/f3hp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADEY +1036 Testuser-bpm 020a000703 LDFH https://hgf.de/uv7u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDFH +1073 Testuser-bpm 020a000703 VDFU https://hgf.de/htsg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDFU +1059 Testuser-bpm 020a000703 ADHL https://hgf.de/936f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADHL +1220 Testuser-bpm 020a000703 LDHX https://hgf.de/ts86 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDHX +1133 Testuser-bpm 020a000703 VDJF https://hgf.de/14rx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDJF +1006 Testuser-bpm 020a000703 ADK4 https://hgf.de/ingm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADK4 +1163 Testuser-bpm 020a000703 LDKK https://hgf.de/3tq- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDKK +1198 Testuser-bpm 020a000703 VDKW https://hgf.de/hci7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDKW +1178 Testuser-bpm 020a000703 ADLN https://hgf.de/fs3t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADLN +1037 Testuser-bpm 020a000703 LDM3 https://hgf.de/qc5l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDM3 +1176 Testuser-bpm 020a000703 VDMJ https://hgf.de/2ypp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDMJ +1142 Testuser-bpm 020a000703 ADN9 https://hgf.de/j1vt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADN9 +1071 Testuser-bpm 020a000703 LDNM https://hgf.de/dirk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDNM +1035 Testuser-bpm 020a000703 VDNY https://hgf.de/py9u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDNY +1051 Testuser-bpm 020a000703 ADPQ https://hgf.de/on1- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADPQ +1096 Testuser-bpm 020a000703 LDQ7 https://hgf.de/9knz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDQ7 +1099 Testuser-bpm 020a000703 VDQL https://hgf.de/4w8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDQL +1210 Testuser-bpm 020a000703 ADRC https://hgf.de/uvc8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADRC +1158 Testuser-bpm 020a000703 LDRP https://hgf.de/m5lw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDRP +1223 Testuser-bpm 020a000703 VDT4 https://hgf.de/cn9n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDT4 +1005 Testuser-bpm 020a000703 ADTT https://hgf.de/gwif https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADTT +1025 Testuser-bpm 020a000703 LDUA https://hgf.de/l59o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDUA +1225 Testuser-bpm 020a000703 VDUN https://hgf.de/g8dn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDUN +1067 Testuser-bpm 020a000703 ADVE https://hgf.de/pu-x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADVE +1250 Testuser-bpm 020a000703 LC97 https://hgf.de/gix2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LC97 +1194 Testuser-bpm 020a000703 LDVR https://hgf.de/r3jz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDVR +1048 Testuser-bpm 020a000703 VDW9 https://hgf.de/caei https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDW9 +1207 Testuser-bpm 020a000703 ADWV https://hgf.de/v-2o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADWV +1008 Testuser-bpm 020a000703 LDXD https://hgf.de/8p0b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDXD +1123 Testuser-bpm 020a000703 VDXQ https://hgf.de/k43o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VDXQ +1226 Testuser-bpm 020a000703 ADYH https://hgf.de/a79i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ADYH +1155 Testuser-bpm 020a000703 LDYU https://hgf.de/ll05 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LDYU +1199 Testuser-bpm 020a000703 VE3C https://hgf.de/ecm7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VE3C +1030 Testuser-bpm 020a000703 AE3X https://hgf.de/xu3x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AE3X +1064 Testuser-bpm 020a000703 LE4F https://hgf.de/7156 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LE4F +1168 Testuser-bpm 020a000703 VE4T https://hgf.de/wf15 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VE4T +1233 Testuser-bpm 020a000703 AE7K https://hgf.de/ig21 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AE7K +1020 Testuser-bpm 020a000703 LE7W https://hgf.de/0wut https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LE7W +1031 Testuser-bpm 020a000703 VE9E https://hgf.de/9709 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VE9E +1075 Testuser-bpm 020a000703 AEA3 https://hgf.de/hioc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEA3 +1141 Testuser-bpm 020a000703 LEAJ https://hgf.de/zp44 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEAJ +1049 Testuser-bpm 020a000703 VEAV https://hgf.de/uk66 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEAV +1191 Testuser-bpm 020a000703 AECM https://hgf.de/m5tr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AECM +1136 Testuser-bpm 020a000703 LECY https://hgf.de/oi83 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LECY +1229 Testuser-bpm 020a000703 VEDH https://hgf.de/3e-h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEDH +1024 Testuser-bpm 020a000703 AEE7 https://hgf.de/-a4- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEE7 +1078 Testuser-bpm 020a000703 LEEL https://hgf.de/u4g9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEEL +1184 Testuser-bpm 020a000703 VEEX https://hgf.de/vt8p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEEX +1248 Testuser-bpm 020a000703 VC4Y https://hgf.de/pn7d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VC4Y +1145 Testuser-bpm 020a000703 AEFP https://hgf.de/8tgf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEFP +1002 Testuser-bpm 020a000703 LEH4 https://hgf.de/93qj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEH4 +1039 Testuser-bpm 020a000703 VEHK https://hgf.de/t4b3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEHK +1044 Testuser-bpm 020a000703 AEJA https://hgf.de/gyek https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEJA +1228 Testuser-bpm 020a000703 LEJN https://hgf.de/c4wl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEJN +1182 Testuser-bpm 020a000703 VEK3 https://hgf.de/zi-u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEK3 +1083 Testuser-bpm 020a000703 AEKR https://hgf.de/--2u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEKR +1115 Testuser-bpm 020a000703 LEL9 https://hgf.de/4jr7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEL9 +1043 Testuser-bpm 020a000703 VELM https://hgf.de/lf1l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VELM +1098 Testuser-bpm 020a000703 AEMD https://hgf.de/x7yu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEMD +1097 Testuser-bpm 020a000703 LEMQ https://hgf.de/hb64 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEMQ +1106 Testuser-bpm 020a000703 VEN7 https://hgf.de/ngj1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEN7 +1169 Testuser-bpm 020a000703 AENU https://hgf.de/vp65 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AENU +1026 Testuser-bpm 020a000703 LEPC https://hgf.de/gtuw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEPC +1046 Testuser-bpm 020a000703 VEPP https://hgf.de/whqv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEPP +1062 Testuser-bpm 020a000703 AEQF https://hgf.de/btnm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEQF +1217 Testuser-bpm 020a000703 LEQT https://hgf.de/ivkz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEQT +1121 Testuser-bpm 020a000703 VERA https://hgf.de/tpn7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VERA +1171 Testuser-bpm 020a000703 AERW https://hgf.de/rs-k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AERW +1076 Testuser-bpm 020a000703 LETE https://hgf.de/u4bp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LETE +1140 Testuser-bpm 020a000703 VETR https://hgf.de/qhpm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VETR +1041 Testuser-bpm 020a000703 AEUJ https://hgf.de/9osd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEUJ +1072 Testuser-bpm 020a000703 LEUV https://hgf.de/1q8q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEUV +1188 Testuser-bpm 020a000703 VEVD https://hgf.de/lf2i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEVD +1038 Testuser-bpm 020a000703 AEVY https://hgf.de/ir5a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEVY +1045 Testuser-bpm 020a000703 LEWH https://hgf.de/igyc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEWH +1193 Testuser-bpm 020a000703 VEWU https://hgf.de/7m3s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEWU +1203 Testuser-bpm 020a000703 AEXL https://hgf.de/gi-2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AEXL +1243 Testuser-bpm 020a000703 AAYN https://hgf.de/9x2- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AAYN +1055 Testuser-bpm 020a000703 LEXX https://hgf.de/gtpk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LEXX +1137 Testuser-bpm 020a000703 VEYF https://hgf.de/xzpu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VEYF +1022 Testuser-bpm 020a000703 AF34 https://hgf.de/plk6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AF34 +1205 Testuser-bpm 020a000703 LF3K https://hgf.de/rd2v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LF3K +1070 Testuser-bpm 020a000703 VF3W https://hgf.de/mm54 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VF3W +1089 Testuser-bpm 020a000703 AF4N https://hgf.de/bt42 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AF4N +1103 Testuser-bpm 020a000703 LF73 https://hgf.de/-n50 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LF73 +1245 Testuser-bpm 020a000703 VC3J https://hgf.de/9kxf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VC3J +1053 Testuser-bpm 020a000703 VF7J https://hgf.de/4-0- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VF7J +1056 Testuser-bpm 020a000703 AF99 https://hgf.de/n1gn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AF99 +1105 Testuser-bpm 020a000703 LF9M https://hgf.de/kdb1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LF9M +1230 Testuser-bpm 020a000703 VF9Y https://hgf.de/rdzn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VF9Y +1126 Testuser-bpm 020a000703 AFAQ https://hgf.de/irod https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFAQ +1172 Testuser-bpm 020a000703 LFC7 https://hgf.de/lyio https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFC7 +1068 Testuser-bpm 020a000703 VFCL https://hgf.de/atqx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFCL +1190 Testuser-bpm 020a000703 AFDC https://hgf.de/smbl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFDC +1058 Testuser-bpm 020a000703 LFDP https://hgf.de/l6x0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFDP +1232 Testuser-bpm 020a000703 VFE4 https://hgf.de/rvql https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFE4 +1197 Testuser-bpm 020a000703 AFET https://hgf.de/q53k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFET +1174 Testuser-bpm 020a000703 LFFA https://hgf.de/zwej https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFFA +1189 Testuser-bpm 020a000703 VFFN https://hgf.de/whcu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFFN +1165 Testuser-bpm 020a000703 AFHE https://hgf.de/p7dl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFHE +1241 Testuser-bpm 020a000703 LAXK https://hgf.de/hm9v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LAXK +1164 Testuser-bpm 020a000703 LFHR https://hgf.de/j3nb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFHR +1244 Testuser-bpm 020a000703 LC33 https://hgf.de/xa7k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LC33 +1166 Testuser-bpm 020a000703 VFJ9 https://hgf.de/4fpq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFJ9 +1249 Testuser-bpm 020a000703 AC7Q https://hgf.de/5dup https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AC7Q +1204 Testuser-bpm 020a000703 AFJV https://hgf.de/y6od https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFJV +1010 Testuser-bpm 020a000703 LFKD https://hgf.de/jtxp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFKD +1061 Testuser-bpm 020a000703 VFKQ https://hgf.de/54qi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFKQ +1013 Testuser-bpm 020a000703 AFLH https://hgf.de/zxi5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFLH +1118 Testuser-bpm 020a000703 LFLU https://hgf.de/zxau https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFLU +1016 Testuser-bpm 020a000703 VFMC https://hgf.de/gt54 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFMC +1240 Testuser-bpm 020a000703 AFMX https://hgf.de/kj4n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFMX +1017 Testuser-bpm 020a000703 LFNF https://hgf.de/019m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFNF +1208 Testuser-bpm 020a000703 VFNT https://hgf.de/nd5q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFNT +1033 Testuser-bpm 020a000703 AFPK https://hgf.de/weij https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFPK +1094 Testuser-bpm 020a000703 LFPW https://hgf.de/t-2t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFPW +1211 Testuser-bpm 020a000703 VFQE https://hgf.de/h4q6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFQE +1237 Testuser-bpm 020a000703 AFR3 https://hgf.de/on3z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFR3 +1186 Testuser-bpm 020a000703 LFRJ https://hgf.de/v0ou https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFRJ +1079 Testuser-bpm 020a000703 VFRV https://hgf.de/9st1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFRV +1167 Testuser-bpm 020a000703 AFTM https://hgf.de/f4ov https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFTM +1236 Testuser-bpm 020a000703 LFTY https://hgf.de/7b91 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFTY +1129 Testuser-bpm 020a000703 VFUH https://hgf.de/19hs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFUH +1124 Testuser-bpm 020a000703 AFV7 https://hgf.de/1n9v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFV7 +1180 Testuser-bpm 020a000703 LFVL https://hgf.de/yy8w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFVL +1012 Testuser-bpm 020a000703 VFVX https://hgf.de/8gwi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFVX +1231 Testuser-bpm 020a000703 AFWP https://hgf.de/yjkq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFWP +1100 Testuser-bpm 020a000703 LFX4 https://hgf.de/yj0m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFX4 +1095 Testuser-bpm 020a000703 VFXK https://hgf.de/xocg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VFXK +1074 Testuser-bpm 020a000703 AFYA https://hgf.de/trav https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AFYA +1109 Testuser-bpm 020a000703 LFYN https://hgf.de/f1me https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LFYN +1018 Testuser-bpm 020a000703 VH33 https://hgf.de/j2ol https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VH33 +1066 Testuser-bpm 020a000703 AH3R https://hgf.de/87ws https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AH3R +1101 Testuser-bpm 020a000703 LH49 https://hgf.de/qn94 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LH49 +1063 Testuser-bpm 020a000703 VH4M https://hgf.de/0eaq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VH4M +1157 Testuser-bpm 020a000703 AH7D https://hgf.de/-e16 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AH7D +1069 Testuser-bpm 020a000703 LH7Q https://hgf.de/ustn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LH7Q +1007 Testuser-bpm 020a000703 VH97 https://hgf.de/xh2o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VH97 +1122 Testuser-bpm 020a000703 AH9U https://hgf.de/d6ug https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AH9U +1144 Testuser-bpm 020a000703 LHAC https://hgf.de/y2-p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHAC +1202 Testuser-bpm 020a000703 VHAP https://hgf.de/k6g9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHAP +1150 Testuser-bpm 020a000703 AHCF https://hgf.de/386i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHCF +1052 Testuser-bpm 020a000703 LHCT https://hgf.de/7h40 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHCT +1065 Testuser-bpm 020a000703 VHDA https://hgf.de/-o-w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHDA +1192 Testuser-bpm 020a000703 AHDW https://hgf.de/lweb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHDW +1092 Testuser-bpm 020a000703 LHEE https://hgf.de/4bda https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHEE +1175 Testuser-bpm 020a000703 VHER https://hgf.de/vu4w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHER +1216 Testuser-bpm 020a000703 AHFJ https://hgf.de/jkoa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHFJ +1029 Testuser-bpm 020a000703 LHFV https://hgf.de/3e8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHFV +1218 Testuser-bpm 020a000703 VHHD https://hgf.de/ug2c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHHD +1149 Testuser-bpm 020a000703 AHHY https://hgf.de/416g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHHY +1183 Testuser-bpm 020a000703 LHJH https://hgf.de/0vei https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHJH +1139 Testuser-bpm 020a000703 VHJU https://hgf.de/rpxh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHJU +1107 Testuser-bpm 020a000703 AHKL https://hgf.de/eaaw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHKL +1117 Testuser-bpm 020a000703 LHKX https://hgf.de/dw54 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHKX +1084 Testuser-bpm 020a000703 VHLF https://hgf.de/ayrr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHLF +1120 Testuser-bpm 020a000703 AHM4 https://hgf.de/e25f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHM4 +1214 Testuser-bpm 020a000703 LHMK https://hgf.de/fvsh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHMK +1247 Testuser-bpm 020a000703 LC4M https://hgf.de/abvs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LC4M +1215 Testuser-bpm 020a000703 VHMW https://hgf.de/j-4h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHMW +1224 Testuser-bpm 020a000703 AHNN https://hgf.de/fgal https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHNN +1219 Testuser-bpm 020a000703 LHP3 https://hgf.de/udth https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHP3 +1081 Testuser-bpm 020a000703 VHPJ https://hgf.de/uvdr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHPJ +1131 Testuser-bpm 020a000703 AHQ9 https://hgf.de/bn4v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHQ9 +1082 Testuser-bpm 020a000703 LHQM https://hgf.de/0ae7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHQM +1088 Testuser-bpm 020a000703 VHQY https://hgf.de/hbp4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHQY +1138 Testuser-bpm 020a000703 AHRQ https://hgf.de/ac5l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHRQ +1111 Testuser-bpm 020a000703 LHT7 https://hgf.de/kcv1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHT7 +1246 Testuser-bpm 020a000703 AC49 https://hgf.de/mkns https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AC49 +1227 Testuser-bpm 020a000703 VHTL https://hgf.de/a2s8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHTL +1152 Testuser-bpm 020a000703 AHUC https://hgf.de/lrkn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHUC +1112 Testuser-bpm 020a000703 LHUP https://hgf.de/43dp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHUP +1004 Testuser-bpm 020a000703 VHV4 https://hgf.de/uvfj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHV4 +1153 Testuser-bpm 020a000703 AHVT https://hgf.de/n-be https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHVT +1196 Testuser-bpm 020a000703 LHWA https://hgf.de/7f-h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHWA +1090 Testuser-bpm 020a000703 VHWN https://hgf.de/m-85 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHWN +1213 Testuser-bpm 020a000703 AHXE https://hgf.de/py-c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHXE +1132 Testuser-bpm 020a000703 LHXR https://hgf.de/sqi0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LHXR +1021 Testuser-bpm 020a000703 VHY9 https://hgf.de/xx3w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VHY9 +1003 Testuser-bpm 020a000703 AHYV https://hgf.de/p4ae https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AHYV +1212 Testuser-bpm 020a000703 LJ3D https://hgf.de/8caw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJ3D +1050 Testuser-bpm 020a000703 VJ3Q https://hgf.de/13l- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJ3Q +1116 Testuser-bpm 020a000703 AJ4H https://hgf.de/dyig https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJ4H +1154 Testuser-bpm 020a000703 LJ4U https://hgf.de/e10k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJ4U +1110 Testuser-bpm 020a000703 VJ7C https://hgf.de/ycq5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJ7C +1034 Testuser-bpm 020a000703 AJ7X https://hgf.de/cj-d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJ7X +1001 Testuser-bpm 020a000703 LJ9F https://hgf.de/a66t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJ9F +1019 Testuser-bpm 020a000703 VJ9T https://hgf.de/6xlz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJ9T +1147 Testuser-bpm 020a000703 AJAK https://hgf.de/t4um https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJAK +1014 Testuser-bpm 020a000703 LJAW https://hgf.de/tkqt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJAW +1130 Testuser-bpm 020a000703 VJCE https://hgf.de/5y7u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJCE +1113 Testuser-bpm 020a000703 AJD3 https://hgf.de/ulw1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJD3 +1085 Testuser-bpm 020a000703 LJDJ https://hgf.de/gvhf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJDJ diff --git a/++ Dokumente/TANs/hogrefe_tan6.csv b/++ Dokumente/TANs/hogrefe_tan6.csv new file mode 100755 index 0000000..7b58051 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan6.csv @@ -0,0 +1,250 @@ +1284 Testuser-bpm 020a000703 LJRC https://hgf.de/g4p1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJRC +1287 Testuser-bpm 020a000703 VJRP https://hgf.de/1ttw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJRP +1319 Testuser-bpm 020a000703 AJTF https://hgf.de/8ui- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJTF +1420 Testuser-bpm 020a000703 LJTT https://hgf.de/ogr1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJTT +1296 Testuser-bpm 020a000703 VJUA https://hgf.de/a7fd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJUA +1318 Testuser-bpm 020a000703 AJUW https://hgf.de/8q05 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJUW +1251 Testuser-bpm 020a000703 LJVE https://hgf.de/4-5- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJVE +1342 Testuser-bpm 020a000703 VJVR https://hgf.de/h5p6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJVR +1320 Testuser-bpm 020a000703 AJWJ https://hgf.de/84cf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJWJ +1397 Testuser-bpm 020a000703 LJWV https://hgf.de/ev8r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJWV +1368 Testuser-bpm 020a000703 VJXD https://hgf.de/gv-2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJXD +1263 Testuser-bpm 020a000703 AJXY https://hgf.de/3esl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJXY +1475 Testuser-bpm 020a000703 LJYH https://hgf.de/pca7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJYH +1353 Testuser-bpm 020a000703 VJYU https://hgf.de/zjob https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJYU +1427 Testuser-bpm 020a000703 AK3L https://hgf.de/h1lw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AK3L +1441 Testuser-bpm 020a000703 LK3X https://hgf.de/w3r8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LK3X +1380 Testuser-bpm 020a000703 VK4F https://hgf.de/rzt7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VK4F +1265 Testuser-bpm 020a000703 AK74 https://hgf.de/4uzr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AK74 +1500 Testuser-bpm 020a000703 AJQU https://hgf.de/cid2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJQU +1301 Testuser-bpm 020a000703 LK7K https://hgf.de/-d9t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LK7K +1446 Testuser-bpm 020a000703 VK7W https://hgf.de/kawn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VK7W +1340 Testuser-bpm 020a000703 AK9N https://hgf.de/gv7q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AK9N +1404 Testuser-bpm 020a000703 LKA3 https://hgf.de/3t9l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKA3 +1338 Testuser-bpm 020a000703 VKAJ https://hgf.de/m17p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKAJ +1278 Testuser-bpm 020a000703 AKC9 https://hgf.de/ldw1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKC9 +1396 Testuser-bpm 020a000703 LKCM https://hgf.de/jw80 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKCM +1355 Testuser-bpm 020a000703 VKCY https://hgf.de/4qga https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKCY +1488 Testuser-bpm 020a000703 AJJP https://hgf.de/rzhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJJP +1429 Testuser-bpm 020a000703 AKDQ https://hgf.de/jt3m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKDQ +1274 Testuser-bpm 020a000703 LKE7 https://hgf.de/q2or https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKE7 +1459 Testuser-bpm 020a000703 VKEL https://hgf.de/e0qi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKEL +1323 Testuser-bpm 020a000703 AKFC https://hgf.de/6kv- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKFC +1344 Testuser-bpm 020a000703 LKFP https://hgf.de/v4w5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKFP +1413 Testuser-bpm 020a000703 VKH4 https://hgf.de/72rk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKH4 +1399 Testuser-bpm 020a000703 AKHT https://hgf.de/b1zq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKHT +1279 Testuser-bpm 020a000703 LKJA https://hgf.de/9bzn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKJA +1440 Testuser-bpm 020a000703 VKJN https://hgf.de/3mc7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKJN +1456 Testuser-bpm 020a000703 AKKE https://hgf.de/fsl7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKKE +1272 Testuser-bpm 020a000703 LKKR https://hgf.de/xdbg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKKR +1400 Testuser-bpm 020a000703 VKL9 https://hgf.de/mop8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKL9 +1348 Testuser-bpm 020a000703 AKLV https://hgf.de/auor https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKLV +1415 Testuser-bpm 020a000703 LKMD https://hgf.de/22kh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKMD +1286 Testuser-bpm 020a000703 VKMQ https://hgf.de/nlq3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKMQ +1436 Testuser-bpm 020a000703 AKNH https://hgf.de/wabq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKNH +1490 Testuser-bpm 020a000703 VJKK https://hgf.de/usfh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJKK +1426 Testuser-bpm 020a000703 LKNU https://hgf.de/rios https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKNU +1468 Testuser-bpm 020a000703 VKPC https://hgf.de/hsa3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKPC +1269 Testuser-bpm 020a000703 AKPX https://hgf.de/smvk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKPX +1273 Testuser-bpm 020a000703 LKQF https://hgf.de/h9em https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKQF +1416 Testuser-bpm 020a000703 VKQT https://hgf.de/15w3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKQT +1480 Testuser-bpm 020a000703 AKRK https://hgf.de/o8-o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKRK +1469 Testuser-bpm 020a000703 LKRW https://hgf.de/iv3o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKRW +1260 Testuser-bpm 020a000703 VKTE https://hgf.de/wl92 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKTE +1363 Testuser-bpm 020a000703 AKU3 https://hgf.de/6leo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKU3 +1357 Testuser-bpm 020a000703 LKUJ https://hgf.de/-l4u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKUJ +1453 Testuser-bpm 020a000703 VKUV https://hgf.de/fb5e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKUV +1349 Testuser-bpm 020a000703 AKVM https://hgf.de/rqja https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKVM +1264 Testuser-bpm 020a000703 LKVY https://hgf.de/0oqz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKVY +1421 Testuser-bpm 020a000703 VKWH https://hgf.de/c-6w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKWH +1425 Testuser-bpm 020a000703 AKX7 https://hgf.de/x80q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKX7 +1442 Testuser-bpm 020a000703 LKXL https://hgf.de/n9ca https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LKXL +1437 Testuser-bpm 020a000703 VKXX https://hgf.de/psv0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VKXX +1387 Testuser-bpm 020a000703 AKYP https://hgf.de/fg09 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AKYP +1303 Testuser-bpm 020a000703 LL34 https://hgf.de/u35f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LL34 +1327 Testuser-bpm 020a000703 VL3K https://hgf.de/59fg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VL3K +1455 Testuser-bpm 020a000703 AL4A https://hgf.de/f0e3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AL4A +1311 Testuser-bpm 020a000703 LL4N https://hgf.de/21bt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LL4N +1450 Testuser-bpm 020a000703 VL73 https://hgf.de/nkbp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VL73 +1485 Testuser-bpm 020a000703 AJH7 https://hgf.de/-ly7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJH7 +1372 Testuser-bpm 020a000703 AL7R https://hgf.de/9ixv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AL7R +1466 Testuser-bpm 020a000703 LL99 https://hgf.de/w54a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LL99 +1307 Testuser-bpm 020a000703 VL9M https://hgf.de/ji2t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VL9M +1259 Testuser-bpm 020a000703 ALAD https://hgf.de/vyft https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALAD +1382 Testuser-bpm 020a000703 LLAQ https://hgf.de/8gtq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLAQ +1411 Testuser-bpm 020a000703 VLC7 https://hgf.de/bey1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLC7 +1258 Testuser-bpm 020a000703 ALCU https://hgf.de/nlo1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALCU +1384 Testuser-bpm 020a000703 LLDC https://hgf.de/b69t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLDC +1298 Testuser-bpm 020a000703 VLDP https://hgf.de/7tkk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLDP +1360 Testuser-bpm 020a000703 ALEF https://hgf.de/l0w5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALEF +1339 Testuser-bpm 020a000703 LLET https://hgf.de/vdxy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLET +1267 Testuser-bpm 020a000703 VLFA https://hgf.de/gv52 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLFA +1261 Testuser-bpm 020a000703 ALFW https://hgf.de/98gb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALFW +1479 Testuser-bpm 020a000703 LLHE https://hgf.de/i79i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLHE +1389 Testuser-bpm 020a000703 VLHR https://hgf.de/4dfc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLHR +1423 Testuser-bpm 020a000703 ALJJ https://hgf.de/92s3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALJJ +1332 Testuser-bpm 020a000703 LLJV https://hgf.de/mc4y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLJV +1283 Testuser-bpm 020a000703 VLKD https://hgf.de/8cpi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLKD +1378 Testuser-bpm 020a000703 ALKY https://hgf.de/6dqr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALKY +1483 Testuser-bpm 020a000703 LJEY https://hgf.de/t9-w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJEY +1464 Testuser-bpm 020a000703 LLLH https://hgf.de/41x8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLLH +1491 Testuser-bpm 020a000703 AJLA https://hgf.de/9q6s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJLA +1408 Testuser-bpm 020a000703 VLLU https://hgf.de/wyv6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLLU +1474 Testuser-bpm 020a000703 ALML https://hgf.de/84nf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALML +1304 Testuser-bpm 020a000703 LLMX https://hgf.de/ymb9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLMX +1333 Testuser-bpm 020a000703 VLNF https://hgf.de/eg1j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLNF +1361 Testuser-bpm 020a000703 ALP4 https://hgf.de/frcs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALP4 +1322 Testuser-bpm 020a000703 LLPK https://hgf.de/xhyx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLPK +1266 Testuser-bpm 020a000703 VLPW https://hgf.de/f1g9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLPW +1412 Testuser-bpm 020a000703 ALQN https://hgf.de/2c4z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALQN +1414 Testuser-bpm 020a000703 LLR3 https://hgf.de/n6q7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLR3 +1346 Testuser-bpm 020a000703 VLRJ https://hgf.de/r6hv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLRJ +1418 Testuser-bpm 020a000703 ALT9 https://hgf.de/uliu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALT9 +1354 Testuser-bpm 020a000703 LLTM https://hgf.de/3t4d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLTM +1350 Testuser-bpm 020a000703 VLTY https://hgf.de/ksy1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLTY +1444 Testuser-bpm 020a000703 ALUQ https://hgf.de/y7pv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALUQ +1297 Testuser-bpm 020a000703 LLV7 https://hgf.de/1rhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLV7 +1321 Testuser-bpm 020a000703 VLVL https://hgf.de/g3m2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLVL +1277 Testuser-bpm 020a000703 ALWC https://hgf.de/294i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALWC +1312 Testuser-bpm 020a000703 LLWP https://hgf.de/wwki https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLWP +1394 Testuser-bpm 020a000703 VLX4 https://hgf.de/17zt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLX4 +1336 Testuser-bpm 020a000703 ALXT https://hgf.de/ygnf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ALXT +1470 Testuser-bpm 020a000703 LLYA https://hgf.de/k2dg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LLYA +1374 Testuser-bpm 020a000703 VLYN https://hgf.de/t9ph https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VLYN +1252 Testuser-bpm 020a000703 AM3E https://hgf.de/fc31 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AM3E +1385 Testuser-bpm 020a000703 LM3R https://hgf.de/u-fg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LM3R +1362 Testuser-bpm 020a000703 VM49 https://hgf.de/u5y1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VM49 +1367 Testuser-bpm 020a000703 AM4V https://hgf.de/y3xo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AM4V +1383 Testuser-bpm 020a000703 LM7D https://hgf.de/4s9h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LM7D +1449 Testuser-bpm 020a000703 VM7Q https://hgf.de/qb2i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VM7Q +1435 Testuser-bpm 020a000703 AM9H https://hgf.de/vq84 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AM9H +1310 Testuser-bpm 020a000703 LM9U https://hgf.de/rsiq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LM9U +1253 Testuser-bpm 020a000703 VMAC https://hgf.de/itba https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMAC +1431 Testuser-bpm 020a000703 AMAX https://hgf.de/-lgt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMAX +1255 Testuser-bpm 020a000703 LMCF https://hgf.de/oa72 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMCF +1434 Testuser-bpm 020a000703 VMCT https://hgf.de/pll1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMCT +1473 Testuser-bpm 020a000703 AMDK https://hgf.de/3n-n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMDK +1352 Testuser-bpm 020a000703 LMDW https://hgf.de/v51k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMDW +1465 Testuser-bpm 020a000703 VMEE https://hgf.de/akux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMEE +1439 Testuser-bpm 020a000703 AMF3 https://hgf.de/bqu6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMF3 +1405 Testuser-bpm 020a000703 LMFJ https://hgf.de/02h9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMFJ +1341 Testuser-bpm 020a000703 VMFV https://hgf.de/d3us https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMFV +1268 Testuser-bpm 020a000703 AMHM https://hgf.de/23yf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMHM +1386 Testuser-bpm 020a000703 LMHY https://hgf.de/3ywa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMHY +1335 Testuser-bpm 020a000703 VMJH https://hgf.de/n6m7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMJH +1365 Testuser-bpm 020a000703 AMK7 https://hgf.de/n9n8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMK7 +1305 Testuser-bpm 020a000703 LMKL https://hgf.de/h33n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMKL +1452 Testuser-bpm 020a000703 VMKX https://hgf.de/l39z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMKX +1317 Testuser-bpm 020a000703 AMLP https://hgf.de/ltma https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMLP +1256 Testuser-bpm 020a000703 LMM4 https://hgf.de/-hty https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMM4 +1369 Testuser-bpm 020a000703 VMMK https://hgf.de/fukg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMMK +1313 Testuser-bpm 020a000703 AMNA https://hgf.de/5-nk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMNA +1462 Testuser-bpm 020a000703 LMNN https://hgf.de/vq0w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMNN +1454 Testuser-bpm 020a000703 VMP3 https://hgf.de/p2xq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMP3 +1443 Testuser-bpm 020a000703 AMPR https://hgf.de/qwqq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMPR +1328 Testuser-bpm 020a000703 LMQ9 https://hgf.de/hdcz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMQ9 +1445 Testuser-bpm 020a000703 VMQM https://hgf.de/i62a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMQM +1347 Testuser-bpm 020a000703 AMRD https://hgf.de/py7u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMRD +1271 Testuser-bpm 020a000703 LMRQ https://hgf.de/n6-j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMRQ +1419 Testuser-bpm 020a000703 VMT7 https://hgf.de/8z8w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMT7 +1398 Testuser-bpm 020a000703 AMTU https://hgf.de/mqb6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMTU +1410 Testuser-bpm 020a000703 LMUC https://hgf.de/nnj5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMUC +1494 Testuser-bpm 020a000703 AJMR https://hgf.de/94ee https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJMR +1294 Testuser-bpm 020a000703 VMUP https://hgf.de/vdiz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMUP +1471 Testuser-bpm 020a000703 AMVF https://hgf.de/n192 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMVF +1424 Testuser-bpm 020a000703 LMVT https://hgf.de/r22c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMVT +1478 Testuser-bpm 020a000703 VMWA https://hgf.de/dn57 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMWA +1289 Testuser-bpm 020a000703 AMWW https://hgf.de/xkk0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMWW +1282 Testuser-bpm 020a000703 LMXE https://hgf.de/29b6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMXE +1356 Testuser-bpm 020a000703 VMXR https://hgf.de/a4c6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VMXR +1481 Testuser-bpm 020a000703 VJDV https://hgf.de/lgmo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJDV +1472 Testuser-bpm 020a000703 AMYJ https://hgf.de/xjyq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AMYJ +1482 Testuser-bpm 020a000703 AJEM https://hgf.de/5biv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJEM +1486 Testuser-bpm 020a000703 LJHL https://hgf.de/2e9n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJHL +1492 Testuser-bpm 020a000703 LJLN https://hgf.de/tsea https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJLN +1330 Testuser-bpm 020a000703 LMYV https://hgf.de/308- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LMYV +1299 Testuser-bpm 020a000703 VN3D https://hgf.de/a6ik https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VN3D +1345 Testuser-bpm 020a000703 AN3Y https://hgf.de/p3rt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AN3Y +1498 Testuser-bpm 020a000703 LJPQ https://hgf.de/p33e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJPQ +1285 Testuser-bpm 020a000703 LN4H https://hgf.de/1wzq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LN4H +1376 Testuser-bpm 020a000703 VN4U https://hgf.de/z-ax https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VN4U +1496 Testuser-bpm 020a000703 VJNM https://hgf.de/b1b2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJNM +1314 Testuser-bpm 020a000703 AN7L https://hgf.de/wozd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AN7L +1476 Testuser-bpm 020a000703 LN7X https://hgf.de/ul9r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LN7X +1270 Testuser-bpm 020a000703 VN9F https://hgf.de/sj78 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VN9F +1417 Testuser-bpm 020a000703 ANA4 https://hgf.de/vv0u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANA4 +1316 Testuser-bpm 020a000703 LNAK https://hgf.de/4cu2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNAK +1391 Testuser-bpm 020a000703 VNAW https://hgf.de/zbw- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNAW +1302 Testuser-bpm 020a000703 ANCN https://hgf.de/5okc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANCN +1457 Testuser-bpm 020a000703 LND3 https://hgf.de/o5ik https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LND3 +1407 Testuser-bpm 020a000703 VNDJ https://hgf.de/lt65 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNDJ +1430 Testuser-bpm 020a000703 ANE9 https://hgf.de/no6g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANE9 +1276 Testuser-bpm 020a000703 LNEM https://hgf.de/aul5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNEM +1461 Testuser-bpm 020a000703 VNEY https://hgf.de/-boc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNEY +1460 Testuser-bpm 020a000703 ANFQ https://hgf.de/egq8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANFQ +1458 Testuser-bpm 020a000703 LNH7 https://hgf.de/f-6m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNH7 +1463 Testuser-bpm 020a000703 VNHL https://hgf.de/87z7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNHL +1388 Testuser-bpm 020a000703 ANJC https://hgf.de/0qk1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANJC +1497 Testuser-bpm 020a000703 AJPD https://hgf.de/-j8e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AJPD +1373 Testuser-bpm 020a000703 LNJP https://hgf.de/3-rj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNJP +1432 Testuser-bpm 020a000703 VNK4 https://hgf.de/1u0s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNK4 +1467 Testuser-bpm 020a000703 ANKT https://hgf.de/jrcp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANKT +1366 Testuser-bpm 020a000703 LNLA https://hgf.de/v3f1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNLA +1487 Testuser-bpm 020a000703 VJHX https://hgf.de/vybo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJHX +1331 Testuser-bpm 020a000703 VNLN https://hgf.de/m2qo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNLN +1392 Testuser-bpm 020a000703 ANME https://hgf.de/ucay https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANME +1489 Testuser-bpm 020a000703 LJK4 https://hgf.de/rmzt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJK4 +1292 Testuser-bpm 020a000703 LNMR https://hgf.de/knnw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNMR +1364 Testuser-bpm 020a000703 VNN9 https://hgf.de/8ibs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNN9 +1324 Testuser-bpm 020a000703 ANNV https://hgf.de/li4s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANNV +1275 Testuser-bpm 020a000703 LNPD https://hgf.de/qt-m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNPD +1315 Testuser-bpm 020a000703 VNPQ https://hgf.de/q4jq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNPQ +1370 Testuser-bpm 020a000703 ANQH https://hgf.de/ahk0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANQH +1438 Testuser-bpm 020a000703 LNQU https://hgf.de/6xjw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNQU +1428 Testuser-bpm 020a000703 VNRC https://hgf.de/chq1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNRC +1293 Testuser-bpm 020a000703 ANRX https://hgf.de/iwp9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANRX +1254 Testuser-bpm 020a000703 LNTF https://hgf.de/-re8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNTF +1393 Testuser-bpm 020a000703 VNTT https://hgf.de/pojf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNTT +1291 Testuser-bpm 020a000703 ANUK https://hgf.de/5wcx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANUK +1375 Testuser-bpm 020a000703 LNUW https://hgf.de/lkjg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNUW +1262 Testuser-bpm 020a000703 VNVE https://hgf.de/-510 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNVE +1306 Testuser-bpm 020a000703 ANW3 https://hgf.de/vcuu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANW3 +1326 Testuser-bpm 020a000703 LNWJ https://hgf.de/09u- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNWJ +1343 Testuser-bpm 020a000703 VNWV https://hgf.de/mgba https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNWV +1288 Testuser-bpm 020a000703 ANXM https://hgf.de/f3jy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ANXM +1448 Testuser-bpm 020a000703 LNXY https://hgf.de/nkvs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LNXY +1337 Testuser-bpm 020a000703 VNYH https://hgf.de/ph01 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VNYH +1351 Testuser-bpm 020a000703 AP37 https://hgf.de/feb4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AP37 +1493 Testuser-bpm 020a000703 VJM3 https://hgf.de/4rm1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJM3 +1281 Testuser-bpm 020a000703 LP3L https://hgf.de/suxj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LP3L +1377 Testuser-bpm 020a000703 VP3X https://hgf.de/mvud https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VP3X +1379 Testuser-bpm 020a000703 AP4P https://hgf.de/x9ud https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AP4P +1403 Testuser-bpm 020a000703 LP74 https://hgf.de/5mdz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LP74 +1358 Testuser-bpm 020a000703 VP7K https://hgf.de/8di3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VP7K +1406 Testuser-bpm 020a000703 AP9A https://hgf.de/s6m2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AP9A +1451 Testuser-bpm 020a000703 LP9N https://hgf.de/gpe3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LP9N +1484 Testuser-bpm 020a000703 VJFH https://hgf.de/b2cz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJFH +1290 Testuser-bpm 020a000703 VPA3 https://hgf.de/h8wd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPA3 +1381 Testuser-bpm 020a000703 APAR https://hgf.de/6mju https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APAR +1477 Testuser-bpm 020a000703 LPC9 https://hgf.de/6x35 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPC9 +1334 Testuser-bpm 020a000703 VPCM https://hgf.de/swg7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPCM +1309 Testuser-bpm 020a000703 APDD https://hgf.de/k1fk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APDD +1300 Testuser-bpm 020a000703 LPDQ https://hgf.de/tquj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPDQ +1495 Testuser-bpm 020a000703 LJN9 https://hgf.de/xfo5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LJN9 +1295 Testuser-bpm 020a000703 VPE7 https://hgf.de/pn4z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPE7 +1371 Testuser-bpm 020a000703 APEU https://hgf.de/1vhu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APEU +1409 Testuser-bpm 020a000703 LPFC https://hgf.de/ftxo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPFC +1329 Testuser-bpm 020a000703 VPFP https://hgf.de/4cff https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPFP +1499 Testuser-bpm 020a000703 VJQ7 https://hgf.de/-fju https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VJQ7 +1257 Testuser-bpm 020a000703 APHF https://hgf.de/aipa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APHF +1433 Testuser-bpm 020a000703 LPHT https://hgf.de/ngbb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPHT +1402 Testuser-bpm 020a000703 VPJA https://hgf.de/1-uu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPJA +1401 Testuser-bpm 020a000703 APJW https://hgf.de/xgvt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APJW +1308 Testuser-bpm 020a000703 LPKE https://hgf.de/elnj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPKE +1422 Testuser-bpm 020a000703 VPKR https://hgf.de/xxep https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPKR +1359 Testuser-bpm 020a000703 APLJ https://hgf.de/3zyj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APLJ +1390 Testuser-bpm 020a000703 LPLV https://hgf.de/xx8b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPLV +1447 Testuser-bpm 020a000703 VPMD https://hgf.de/dwlk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPMD +1395 Testuser-bpm 020a000703 APMY https://hgf.de/i4ox https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APMY +1280 Testuser-bpm 020a000703 LPNH https://hgf.de/ffci https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPNH +1325 Testuser-bpm 020a000703 VPNU https://hgf.de/ainw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPNU diff --git a/++ Dokumente/TANs/hogrefe_tan7.csv b/++ Dokumente/TANs/hogrefe_tan7.csv new file mode 100755 index 0000000..b91a6ed --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan7.csv @@ -0,0 +1,250 @@ +1611 Testuser-bpm 020a000703 VQ4N https://hgf.de/7xv0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQ4N +1710 Testuser-bpm 020a000703 AQ7E https://hgf.de/blzl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQ7E +1678 Testuser-bpm 020a000703 LQ7R https://hgf.de/ei5v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQ7R +1682 Testuser-bpm 020a000703 VQ99 https://hgf.de/0shx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQ99 +1526 Testuser-bpm 020a000703 AQ9V https://hgf.de/k11m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQ9V +1671 Testuser-bpm 020a000703 LQAD https://hgf.de/13dn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQAD +1595 Testuser-bpm 020a000703 VQAQ https://hgf.de/24xt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQAQ +1582 Testuser-bpm 020a000703 AQCH https://hgf.de/dft7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQCH +1705 Testuser-bpm 020a000703 LQCU https://hgf.de/ly39 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQCU +1692 Testuser-bpm 020a000703 VQDC https://hgf.de/1su0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQDC +1630 Testuser-bpm 020a000703 AQDX https://hgf.de/ubbi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQDX +1635 Testuser-bpm 020a000703 LQEF https://hgf.de/rjxv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQEF +1518 Testuser-bpm 020a000703 VQET https://hgf.de/77la https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQET +1706 Testuser-bpm 020a000703 AQFK https://hgf.de/z55p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQFK +1733 Testuser-bpm 020a000703 APWQ https://hgf.de/n88j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APWQ +1653 Testuser-bpm 020a000703 LQFW https://hgf.de/ttlm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQFW +1523 Testuser-bpm 020a000703 VQHE https://hgf.de/a7-v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQHE +1634 Testuser-bpm 020a000703 AQJ3 https://hgf.de/kigw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQJ3 +1571 Testuser-bpm 020a000703 LQJJ https://hgf.de/eis0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQJJ +1579 Testuser-bpm 020a000703 VQJV https://hgf.de/6gzk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQJV +1614 Testuser-bpm 020a000703 AQKM https://hgf.de/6zhm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQKM +1568 Testuser-bpm 020a000703 LQKY https://hgf.de/g1nx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQKY +1745 Testuser-bpm 020a000703 VQLH https://hgf.de/7rlg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQLH +1699 Testuser-bpm 020a000703 AQM7 https://hgf.de/hihn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQM7 +1658 Testuser-bpm 020a000703 LQML https://hgf.de/cbjh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQML +1622 Testuser-bpm 020a000703 VQMX https://hgf.de/cm0l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQMX +1744 Testuser-bpm 020a000703 AQNP https://hgf.de/h-wk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQNP +1612 Testuser-bpm 020a000703 LQP4 https://hgf.de/ykbt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQP4 +1675 Testuser-bpm 020a000703 VQPK https://hgf.de/ana7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQPK +1507 Testuser-bpm 020a000703 AQQA https://hgf.de/waqj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQQA +1600 Testuser-bpm 020a000703 LQQN https://hgf.de/81kr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQQN +1636 Testuser-bpm 020a000703 VQR3 https://hgf.de/be0f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQR3 +1687 Testuser-bpm 020a000703 AQRR https://hgf.de/ecbz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQRR +1743 Testuser-bpm 020a000703 LQT9 https://hgf.de/hqk2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQT9 +1578 Testuser-bpm 020a000703 VQTM https://hgf.de/59vr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQTM +1581 Testuser-bpm 020a000703 AQUD https://hgf.de/rpjx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQUD +1639 Testuser-bpm 020a000703 LQUQ https://hgf.de/0jwo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQUQ +1691 Testuser-bpm 020a000703 VQV7 https://hgf.de/cc-s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQV7 +1739 Testuser-bpm 020a000703 AQ3T https://hgf.de/23b2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQ3T +1504 Testuser-bpm 020a000703 AQVU https://hgf.de/8idc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQVU +1545 Testuser-bpm 020a000703 LQWC https://hgf.de/-nn1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQWC +1621 Testuser-bpm 020a000703 VQWP https://hgf.de/nox8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQWP +1551 Testuser-bpm 020a000703 AQXF https://hgf.de/5kwv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQXF +1719 Testuser-bpm 020a000703 LQXT https://hgf.de/4t73 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQXT +1534 Testuser-bpm 020a000703 VQYA https://hgf.de/kko5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQYA +1613 Testuser-bpm 020a000703 AQYW https://hgf.de/46ng https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AQYW +1516 Testuser-bpm 020a000703 LR3E https://hgf.de/mink https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LR3E +1709 Testuser-bpm 020a000703 VR3R https://hgf.de/y5fz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VR3R +1672 Testuser-bpm 020a000703 AR4J https://hgf.de/dbbz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AR4J +1594 Testuser-bpm 020a000703 LR4V https://hgf.de/kpfa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LR4V +1632 Testuser-bpm 020a000703 VR7D https://hgf.de/7jbi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VR7D +1749 Testuser-bpm 020a000703 AR7Y https://hgf.de/5v59 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AR7Y +1591 Testuser-bpm 020a000703 LR9H https://hgf.de/fr88 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LR9H +1667 Testuser-bpm 020a000703 VR9U https://hgf.de/yeom https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VR9U +1718 Testuser-bpm 020a000703 ARAL https://hgf.de/wsok https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARAL +1703 Testuser-bpm 020a000703 LRAX https://hgf.de/qg1x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRAX +1712 Testuser-bpm 020a000703 VRCF https://hgf.de/7l7n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRCF +1550 Testuser-bpm 020a000703 ARD4 https://hgf.de/mvt4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARD4 +1695 Testuser-bpm 020a000703 LRDK https://hgf.de/e1dw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRDK +1515 Testuser-bpm 020a000703 VRDW https://hgf.de/v2-2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRDW +1737 Testuser-bpm 020a000703 LPYP https://hgf.de/y4z1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPYP +1698 Testuser-bpm 020a000703 AREN https://hgf.de/0nt3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AREN +1700 Testuser-bpm 020a000703 LRF3 https://hgf.de/mbcs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRF3 +1512 Testuser-bpm 020a000703 VRFJ https://hgf.de/gt6a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRFJ +1711 Testuser-bpm 020a000703 ARH9 https://hgf.de/y4gj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARH9 +1558 Testuser-bpm 020a000703 LRHM https://hgf.de/b449 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRHM +1590 Testuser-bpm 020a000703 VRHY https://hgf.de/6jji https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRHY +1605 Testuser-bpm 020a000703 ARJQ https://hgf.de/y6m0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARJQ +1638 Testuser-bpm 020a000703 LRK7 https://hgf.de/taas https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRK7 +1521 Testuser-bpm 020a000703 VRKL https://hgf.de/ibdz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRKL +1585 Testuser-bpm 020a000703 ARLC https://hgf.de/8api https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARLC +1628 Testuser-bpm 020a000703 LRLP https://hgf.de/xndp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRLP +1750 Testuser-bpm 020a000703 VRM4 https://hgf.de/a1xq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRM4 +1735 Testuser-bpm 020a000703 VPXL https://hgf.de/2zrt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPXL +1537 Testuser-bpm 020a000703 ARMT https://hgf.de/8cce https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARMT +1726 Testuser-bpm 020a000703 VPRW https://hgf.de/f3ep https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPRW +1729 Testuser-bpm 020a000703 VPUJ https://hgf.de/5c54 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPUJ +1697 Testuser-bpm 020a000703 LRNA https://hgf.de/ktit https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRNA +1577 Testuser-bpm 020a000703 VRNN https://hgf.de/2jbl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRNN +1517 Testuser-bpm 020a000703 ARPE https://hgf.de/n0ma https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARPE +1645 Testuser-bpm 020a000703 LRPR https://hgf.de/z2gz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRPR +1686 Testuser-bpm 020a000703 VRQ9 https://hgf.de/xpde https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRQ9 +1529 Testuser-bpm 020a000703 ARQV https://hgf.de/s1rw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARQV +1609 Testuser-bpm 020a000703 LRRD https://hgf.de/58os https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRRD +1648 Testuser-bpm 020a000703 VRRQ https://hgf.de/r8g3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRRQ +1748 Testuser-bpm 020a000703 ARTH https://hgf.de/u5vh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARTH +1644 Testuser-bpm 020a000703 LRTU https://hgf.de/btfj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRTU +1663 Testuser-bpm 020a000703 VRUC https://hgf.de/zc05 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRUC +1598 Testuser-bpm 020a000703 ARUX https://hgf.de/x2ki https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARUX +1656 Testuser-bpm 020a000703 LRVF https://hgf.de/1z9v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRVF +1746 Testuser-bpm 020a000703 VRVT https://hgf.de/464b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRVT +1576 Testuser-bpm 020a000703 ARWK https://hgf.de/gdwg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARWK +1599 Testuser-bpm 020a000703 LRWW https://hgf.de/iuk- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRWW +1646 Testuser-bpm 020a000703 VRXE https://hgf.de/sdvq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRXE +1651 Testuser-bpm 020a000703 ARY3 https://hgf.de/wd1o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ARY3 +1552 Testuser-bpm 020a000703 LRYJ https://hgf.de/65wb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LRYJ +1603 Testuser-bpm 020a000703 VRYV https://hgf.de/xmz9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VRYV +1623 Testuser-bpm 020a000703 AT3M https://hgf.de/1r4u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AT3M +1520 Testuser-bpm 020a000703 LT3Y https://hgf.de/6r62 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LT3Y +1510 Testuser-bpm 020a000703 VT4H https://hgf.de/d99o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VT4H +1652 Testuser-bpm 020a000703 AT77 https://hgf.de/e6pr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AT77 +1588 Testuser-bpm 020a000703 LT7L https://hgf.de/t5cr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LT7L +1596 Testuser-bpm 020a000703 VT7X https://hgf.de/4uj4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VT7X +1727 Testuser-bpm 020a000703 APTN https://hgf.de/a3jy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APTN +1509 Testuser-bpm 020a000703 AT9P https://hgf.de/j8hr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AT9P +1670 Testuser-bpm 020a000703 LTA4 https://hgf.de/mhje https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTA4 +1573 Testuser-bpm 020a000703 VTAK https://hgf.de/1-kk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTAK +1690 Testuser-bpm 020a000703 ATCA https://hgf.de/4n1r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATCA +1633 Testuser-bpm 020a000703 LTCN https://hgf.de/rina https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTCN +1715 Testuser-bpm 020a000703 VTD3 https://hgf.de/r15k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTD3 +1730 Testuser-bpm 020a000703 APV9 https://hgf.de/c6g7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APV9 +1528 Testuser-bpm 020a000703 ATDR https://hgf.de/4pdr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATDR +1606 Testuser-bpm 020a000703 LTE9 https://hgf.de/-0ft https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTE9 +1655 Testuser-bpm 020a000703 VTEM https://hgf.de/06ao https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTEM +1541 Testuser-bpm 020a000703 ATFD https://hgf.de/-ws4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATFD +1668 Testuser-bpm 020a000703 LTFQ https://hgf.de/xfox https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTFQ +1584 Testuser-bpm 020a000703 VTH7 https://hgf.de/q3mi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTH7 +1572 Testuser-bpm 020a000703 ATHU https://hgf.de/d0ux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATHU +1615 Testuser-bpm 020a000703 LTJC https://hgf.de/ah9a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTJC +1514 Testuser-bpm 020a000703 VTJP https://hgf.de/0gv3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTJP +1525 Testuser-bpm 020a000703 ATKF https://hgf.de/zu4n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATKF +1539 Testuser-bpm 020a000703 LTKT https://hgf.de/1nqo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTKT +1665 Testuser-bpm 020a000703 VTLA https://hgf.de/0a2r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTLA +1587 Testuser-bpm 020a000703 ATLW https://hgf.de/sxls https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATLW +1742 Testuser-bpm 020a000703 LTME https://hgf.de/6a92 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTME +1702 Testuser-bpm 020a000703 VTMR https://hgf.de/dqps https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTMR +1586 Testuser-bpm 020a000703 ATNJ https://hgf.de/48ta https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATNJ +1557 Testuser-bpm 020a000703 LTNV https://hgf.de/a2dh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTNV +1567 Testuser-bpm 020a000703 VTPD https://hgf.de/p7s9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTPD +1681 Testuser-bpm 020a000703 ATPY https://hgf.de/0h0j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATPY +1741 Testuser-bpm 020a000703 LTQH https://hgf.de/75u4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTQH +1565 Testuser-bpm 020a000703 VTQU https://hgf.de/r8s- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTQU +1643 Testuser-bpm 020a000703 ATRL https://hgf.de/3e-z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATRL +1747 Testuser-bpm 020a000703 LTRX https://hgf.de/58gq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTRX +1574 Testuser-bpm 020a000703 VTTF https://hgf.de/xlk7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTTF +1546 Testuser-bpm 020a000703 ATU4 https://hgf.de/jv86 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATU4 +1659 Testuser-bpm 020a000703 LTUK https://hgf.de/eg8f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTUK +1580 Testuser-bpm 020a000703 VTUW https://hgf.de/rw90 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTUW +1563 Testuser-bpm 020a000703 ATVN https://hgf.de/efbj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATVN +1683 Testuser-bpm 020a000703 LTW3 https://hgf.de/94d8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTW3 +1642 Testuser-bpm 020a000703 VTWJ https://hgf.de/yr6p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTWJ +1627 Testuser-bpm 020a000703 ATX9 https://hgf.de/6ebs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATX9 +1684 Testuser-bpm 020a000703 LTXM https://hgf.de/jgyf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LTXM +1654 Testuser-bpm 020a000703 VTXY https://hgf.de/j8m9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VTXY +1592 Testuser-bpm 020a000703 ATYQ https://hgf.de/zaas https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ATYQ +1501 Testuser-bpm 020a000703 LU37 https://hgf.de/79h4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LU37 +1720 Testuser-bpm 020a000703 VU3L https://hgf.de/qygh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VU3L +1530 Testuser-bpm 020a000703 AU4C https://hgf.de/fpld https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AU4C +1531 Testuser-bpm 020a000703 LU4P https://hgf.de/eeof https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LU4P +1593 Testuser-bpm 020a000703 VU74 https://hgf.de/ny3b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VU74 +1674 Testuser-bpm 020a000703 AU7T https://hgf.de/eeo9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AU7T +1583 Testuser-bpm 020a000703 LU9A https://hgf.de/gmj6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LU9A +1513 Testuser-bpm 020a000703 VU9N https://hgf.de/b1yf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VU9N +1650 Testuser-bpm 020a000703 AUAE https://hgf.de/1htl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUAE +1554 Testuser-bpm 020a000703 LUAR https://hgf.de/9nxq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUAR +1629 Testuser-bpm 020a000703 VUC9 https://hgf.de/-b95 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUC9 +1673 Testuser-bpm 020a000703 AUCV https://hgf.de/v-9m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUCV +1524 Testuser-bpm 020a000703 LUDD https://hgf.de/qvet https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUDD +1641 Testuser-bpm 020a000703 VUDQ https://hgf.de/zfu9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUDQ +1736 Testuser-bpm 020a000703 APYC https://hgf.de/vthh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APYC +1694 Testuser-bpm 020a000703 AUEH https://hgf.de/0z72 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUEH +1662 Testuser-bpm 020a000703 LUEU https://hgf.de/ms49 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUEU +1685 Testuser-bpm 020a000703 VUFC https://hgf.de/t4j1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUFC +1713 Testuser-bpm 020a000703 AUFX https://hgf.de/q8gd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUFX +1637 Testuser-bpm 020a000703 LUHF https://hgf.de/i3xl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUHF +1553 Testuser-bpm 020a000703 VUHT https://hgf.de/7cip https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUHT +1559 Testuser-bpm 020a000703 AUJK https://hgf.de/7i8i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUJK +1511 Testuser-bpm 020a000703 LUJW https://hgf.de/7xfv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUJW +1519 Testuser-bpm 020a000703 VUKE https://hgf.de/mmw7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUKE +1535 Testuser-bpm 020a000703 AUL3 https://hgf.de/arh6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUL3 +1610 Testuser-bpm 020a000703 LULJ https://hgf.de/fu1k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LULJ +1538 Testuser-bpm 020a000703 VULV https://hgf.de/ny22 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VULV +1561 Testuser-bpm 020a000703 AUMM https://hgf.de/u3d7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUMM +1689 Testuser-bpm 020a000703 LUMY https://hgf.de/wxby https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUMY +1660 Testuser-bpm 020a000703 VUNH https://hgf.de/w631 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUNH +1679 Testuser-bpm 020a000703 AUP7 https://hgf.de/e6n6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUP7 +1717 Testuser-bpm 020a000703 LUPL https://hgf.de/7l0- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUPL +1604 Testuser-bpm 020a000703 VUPX https://hgf.de/1d5h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUPX +1549 Testuser-bpm 020a000703 AUQP https://hgf.de/flu- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUQP +1618 Testuser-bpm 020a000703 LUR4 https://hgf.de/admx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUR4 +1716 Testuser-bpm 020a000703 VURK https://hgf.de/nzsv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VURK +1548 Testuser-bpm 020a000703 AUTA https://hgf.de/do5c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUTA +1669 Testuser-bpm 020a000703 LUTN https://hgf.de/ozt- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUTN +1696 Testuser-bpm 020a000703 VUU3 https://hgf.de/k6lj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUU3 +1547 Testuser-bpm 020a000703 AUUR https://hgf.de/7t-y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUUR +1738 Testuser-bpm 020a000703 VQ34 https://hgf.de/h0wc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VQ34 +1570 Testuser-bpm 020a000703 LUV9 https://hgf.de/4odn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUV9 +1505 Testuser-bpm 020a000703 VUVM https://hgf.de/laxz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUVM +1617 Testuser-bpm 020a000703 AUWD https://hgf.de/2gej https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUWD +1640 Testuser-bpm 020a000703 LUWQ https://hgf.de/2-cp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUWQ +1626 Testuser-bpm 020a000703 VUX7 https://hgf.de/nu0r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUX7 +1664 Testuser-bpm 020a000703 AUXU https://hgf.de/mxlc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AUXU +1607 Testuser-bpm 020a000703 LUYC https://hgf.de/uos7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LUYC +1616 Testuser-bpm 020a000703 VUYP https://hgf.de/mf7y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VUYP +1575 Testuser-bpm 020a000703 AV3F https://hgf.de/qzgt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AV3F +1602 Testuser-bpm 020a000703 LV3T https://hgf.de/syta https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LV3T +1543 Testuser-bpm 020a000703 VV4A https://hgf.de/gw8g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VV4A +1707 Testuser-bpm 020a000703 AV4W https://hgf.de/hb03 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AV4W +1560 Testuser-bpm 020a000703 LV7E https://hgf.de/gzfw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LV7E +1677 Testuser-bpm 020a000703 VV7R https://hgf.de/nm5y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VV7R +1566 Testuser-bpm 020a000703 AV9J https://hgf.de/ct2t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AV9J +1597 Testuser-bpm 020a000703 LV9V https://hgf.de/lqav https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LV9V +1589 Testuser-bpm 020a000703 VVAD https://hgf.de/dasj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVAD +1649 Testuser-bpm 020a000703 AVAY https://hgf.de/ypia https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVAY +1569 Testuser-bpm 020a000703 LVCH https://hgf.de/p7tx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVCH +1708 Testuser-bpm 020a000703 VVCU https://hgf.de/3bpi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVCU +1502 Testuser-bpm 020a000703 AVDL https://hgf.de/-hgf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVDL +1506 Testuser-bpm 020a000703 LVDX https://hgf.de/gky5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVDX +1544 Testuser-bpm 020a000703 VVEF https://hgf.de/t3jv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVEF +1740 Testuser-bpm 020a000703 LQ4A https://hgf.de/i6jf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LQ4A +1503 Testuser-bpm 020a000703 AVF4 https://hgf.de/ob1u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVF4 +1508 Testuser-bpm 020a000703 LVFK https://hgf.de/vnml https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVFK +1532 Testuser-bpm 020a000703 VVFW https://hgf.de/0sh6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVFW +1555 Testuser-bpm 020a000703 AVHN https://hgf.de/lq-n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVHN +1734 Testuser-bpm 020a000703 LPX7 https://hgf.de/mwxq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPX7 +1693 Testuser-bpm 020a000703 LVJ3 https://hgf.de/xcwm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVJ3 +1657 Testuser-bpm 020a000703 VVJJ https://hgf.de/fbdp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVJJ +1714 Testuser-bpm 020a000703 AVK9 https://hgf.de/83h4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVK9 +1536 Testuser-bpm 020a000703 LVKM https://hgf.de/kc89 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVKM +1631 Testuser-bpm 020a000703 VVKY https://hgf.de/w64x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVKY +1562 Testuser-bpm 020a000703 AVLQ https://hgf.de/n83k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVLQ +1647 Testuser-bpm 020a000703 LVM7 https://hgf.de/vsdp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVM7 +1522 Testuser-bpm 020a000703 VVML https://hgf.de/id62 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVML +1731 Testuser-bpm 020a000703 LPVM https://hgf.de/82go https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPVM +1688 Testuser-bpm 020a000703 AVNC https://hgf.de/rdag https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVNC +1527 Testuser-bpm 020a000703 LVNP https://hgf.de/1gb3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVNP +1620 Testuser-bpm 020a000703 VVP4 https://hgf.de/dlim https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVP4 +1540 Testuser-bpm 020a000703 AVPT https://hgf.de/ijt2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVPT +1624 Testuser-bpm 020a000703 LVQA https://hgf.de/79lf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVQA +1601 Testuser-bpm 020a000703 VVQN https://hgf.de/mc0w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVQN +1725 Testuser-bpm 020a000703 LPRK https://hgf.de/uv6n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPRK +1533 Testuser-bpm 020a000703 AVRE https://hgf.de/dd-6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVRE +1619 Testuser-bpm 020a000703 LVRR https://hgf.de/qu7c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVRR +1732 Testuser-bpm 020a000703 VPVY https://hgf.de/q7bk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPVY +1704 Testuser-bpm 020a000703 VVT9 https://hgf.de/808a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVT9 +1542 Testuser-bpm 020a000703 AVTV https://hgf.de/x1bx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVTV +1724 Testuser-bpm 020a000703 APR4 https://hgf.de/lsmv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APR4 +1564 Testuser-bpm 020a000703 LVUD https://hgf.de/8hwu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVUD +1608 Testuser-bpm 020a000703 VVUQ https://hgf.de/qxey https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVUQ +1680 Testuser-bpm 020a000703 AVVH https://hgf.de/7rhz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVVH +1701 Testuser-bpm 020a000703 LVVU https://hgf.de/ryfl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVVU +1722 Testuser-bpm 020a000703 LPPX https://hgf.de/22km https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPPX +1728 Testuser-bpm 020a000703 LPU3 https://hgf.de/t2zc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LPU3 +1556 Testuser-bpm 020a000703 VVWC https://hgf.de/frr9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVWC +1625 Testuser-bpm 020a000703 AVWX https://hgf.de/t5wv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVWX +1721 Testuser-bpm 020a000703 APPL https://hgf.de/69un https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=APPL +1661 Testuser-bpm 020a000703 LVXF https://hgf.de/p8u2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVXF +1676 Testuser-bpm 020a000703 VVXT https://hgf.de/8ol8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VVXT +1666 Testuser-bpm 020a000703 AVYK https://hgf.de/nooz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AVYK +1723 Testuser-bpm 020a000703 VPQF https://hgf.de/dtwx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VPQF diff --git a/++ Dokumente/TANs/hogrefe_tan8.csv b/++ Dokumente/TANs/hogrefe_tan8.csv new file mode 100755 index 0000000..4dd0591 --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan8.csv @@ -0,0 +1,250 @@ +1988 Testuser-bpm 020a000703 VW9H https://hgf.de/6r9u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VW9H +1994 Testuser-bpm 020a000703 VWDK https://hgf.de/ggia https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWDK +1852 Testuser-bpm 020a000703 AWJD https://hgf.de/17yo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWJD +1878 Testuser-bpm 020a000703 LWJQ https://hgf.de/snr9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWJQ +1929 Testuser-bpm 020a000703 VWK7 https://hgf.de/ibra https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWK7 +1965 Testuser-bpm 020a000703 AWKU https://hgf.de/s4lk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWKU +1790 Testuser-bpm 020a000703 LWLC https://hgf.de/5ptx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWLC +1916 Testuser-bpm 020a000703 VWLP https://hgf.de/uuvo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWLP +1825 Testuser-bpm 020a000703 AWMF https://hgf.de/rfoz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWMF +1809 Testuser-bpm 020a000703 LWMT https://hgf.de/qr31 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWMT +1787 Testuser-bpm 020a000703 VWNA https://hgf.de/4pz1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWNA +1805 Testuser-bpm 020a000703 AWNW https://hgf.de/736o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWNW +1806 Testuser-bpm 020a000703 LWPE https://hgf.de/oi3l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWPE +1880 Testuser-bpm 020a000703 VWPR https://hgf.de/o4bd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWPR +1820 Testuser-bpm 020a000703 AWQJ https://hgf.de/4gq2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWQJ +1872 Testuser-bpm 020a000703 LWQV https://hgf.de/kha9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWQV +1837 Testuser-bpm 020a000703 VWRD https://hgf.de/4754 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWRD +1786 Testuser-bpm 020a000703 AWRY https://hgf.de/u-22 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWRY +1899 Testuser-bpm 020a000703 LWTH https://hgf.de/e21a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWTH +1892 Testuser-bpm 020a000703 VWTU https://hgf.de/g6vz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWTU +1981 Testuser-bpm 020a000703 LVYW https://hgf.de/d1-4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LVYW +1835 Testuser-bpm 020a000703 AWUL https://hgf.de/zy8i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWUL +1972 Testuser-bpm 020a000703 LWUX https://hgf.de/w79t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWUX +1770 Testuser-bpm 020a000703 VWVF https://hgf.de/gt9o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWVF +1957 Testuser-bpm 020a000703 AWW4 https://hgf.de/of01 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWW4 +1920 Testuser-bpm 020a000703 LWWK https://hgf.de/s2nr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWWK +1851 Testuser-bpm 020a000703 VWWW https://hgf.de/pzcw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWWW +1782 Testuser-bpm 020a000703 AWXN https://hgf.de/w-ux https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWXN +1813 Testuser-bpm 020a000703 LWY3 https://hgf.de/q7aj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWY3 +1909 Testuser-bpm 020a000703 VWYJ https://hgf.de/enuk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWYJ +1987 Testuser-bpm 020a000703 LW7Y https://hgf.de/x6g9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LW7Y +1868 Testuser-bpm 020a000703 AX39 https://hgf.de/tlrj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AX39 +1922 Testuser-bpm 020a000703 LX3M https://hgf.de/0k0k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LX3M +1821 Testuser-bpm 020a000703 VX3Y https://hgf.de/vvfg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VX3Y +1801 Testuser-bpm 020a000703 AX4Q https://hgf.de/bl5y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AX4Q +1952 Testuser-bpm 020a000703 LX77 https://hgf.de/epy0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LX77 +1985 Testuser-bpm 020a000703 VW4V https://hgf.de/d4jr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VW4V +1754 Testuser-bpm 020a000703 VX7L https://hgf.de/3paj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VX7L +1928 Testuser-bpm 020a000703 AX9C https://hgf.de/6w1l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AX9C +1751 Testuser-bpm 020a000703 LX9P https://hgf.de/paxs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LX9P +1867 Testuser-bpm 020a000703 VXA4 https://hgf.de/6nw- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXA4 +1841 Testuser-bpm 020a000703 AXAT https://hgf.de/tsvc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXAT +1874 Testuser-bpm 020a000703 LXCA https://hgf.de/g3jv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXCA +1906 Testuser-bpm 020a000703 VXCN https://hgf.de/mve9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXCN +1846 Testuser-bpm 020a000703 AXDE https://hgf.de/gn3b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXDE +1810 Testuser-bpm 020a000703 LXDR https://hgf.de/ijbu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXDR +1842 Testuser-bpm 020a000703 VXE9 https://hgf.de/epjn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXE9 +1755 Testuser-bpm 020a000703 AXEV https://hgf.de/qnxt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXEV +1956 Testuser-bpm 020a000703 LXFD https://hgf.de/hax- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXFD +1894 Testuser-bpm 020a000703 VXFQ https://hgf.de/0ne8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXFQ +1879 Testuser-bpm 020a000703 AXHH https://hgf.de/2js0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXHH +1896 Testuser-bpm 020a000703 LXHU https://hgf.de/458l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXHU +1933 Testuser-bpm 020a000703 VXJC https://hgf.de/ayi4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXJC +1889 Testuser-bpm 020a000703 AXJX https://hgf.de/tsgl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXJX +1931 Testuser-bpm 020a000703 LXKF https://hgf.de/rvx4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXKF +1765 Testuser-bpm 020a000703 VXKT https://hgf.de/hu7u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXKT +1937 Testuser-bpm 020a000703 AXLK https://hgf.de/26-h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXLK +1768 Testuser-bpm 020a000703 LXLW https://hgf.de/h7kt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXLW +1995 Testuser-bpm 020a000703 AWEA https://hgf.de/qjpn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWEA +1760 Testuser-bpm 020a000703 VXME https://hgf.de/v1o5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXME +1764 Testuser-bpm 020a000703 AXN3 https://hgf.de/spzc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXN3 +1884 Testuser-bpm 020a000703 LXNJ https://hgf.de/dlyb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXNJ +1902 Testuser-bpm 020a000703 VXNV https://hgf.de/4wbf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXNV +1919 Testuser-bpm 020a000703 AXPM https://hgf.de/kgjz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXPM +1840 Testuser-bpm 020a000703 LXPY https://hgf.de/kkmg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXPY +1941 Testuser-bpm 020a000703 VXQH https://hgf.de/fp0w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXQH +1789 Testuser-bpm 020a000703 AXR7 https://hgf.de/fcip https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXR7 +1951 Testuser-bpm 020a000703 LXRL https://hgf.de/eb-m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXRL +1812 Testuser-bpm 020a000703 VXRX https://hgf.de/0a6q https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXRX +1847 Testuser-bpm 020a000703 AXTP https://hgf.de/qchg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXTP +1967 Testuser-bpm 020a000703 LXU4 https://hgf.de/-jrx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXU4 +1780 Testuser-bpm 020a000703 VXUK https://hgf.de/mm2g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXUK +1973 Testuser-bpm 020a000703 AXVA https://hgf.de/-070 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXVA +1877 Testuser-bpm 020a000703 LXVN https://hgf.de/ua23 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXVN +1832 Testuser-bpm 020a000703 VXW3 https://hgf.de/h1u5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXW3 +1873 Testuser-bpm 020a000703 AXWR https://hgf.de/yl3a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXWR +1795 Testuser-bpm 020a000703 LXX9 https://hgf.de/72t4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXX9 +1904 Testuser-bpm 020a000703 VXXM https://hgf.de/gr0i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VXXM +1857 Testuser-bpm 020a000703 AXYD https://hgf.de/qwio https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AXYD +1975 Testuser-bpm 020a000703 LXYQ https://hgf.de/d7du https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LXYQ +1901 Testuser-bpm 020a000703 VY37 https://hgf.de/-w1a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VY37 +1876 Testuser-bpm 020a000703 AY3U https://hgf.de/c01w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AY3U +1796 Testuser-bpm 020a000703 LY4C https://hgf.de/ju6x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LY4C +1824 Testuser-bpm 020a000703 VY4P https://hgf.de/3b21 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VY4P +1947 Testuser-bpm 020a000703 AY7F https://hgf.de/m1ns https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AY7F +1977 Testuser-bpm 020a000703 LY7T https://hgf.de/eyc7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LY7T +1890 Testuser-bpm 020a000703 VY9A https://hgf.de/19r3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VY9A +1859 Testuser-bpm 020a000703 AY9W https://hgf.de/00ww https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AY9W +1772 Testuser-bpm 020a000703 LYAE https://hgf.de/exyo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYAE +1897 Testuser-bpm 020a000703 VYAR https://hgf.de/xwes https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYAR +1792 Testuser-bpm 020a000703 AYCJ https://hgf.de/5qwa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYCJ +1905 Testuser-bpm 020a000703 LYCV https://hgf.de/1kru https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYCV +1769 Testuser-bpm 020a000703 VYDD https://hgf.de/b9yy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYDD +1807 Testuser-bpm 020a000703 AYDY https://hgf.de/zr1a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYDY +1767 Testuser-bpm 020a000703 LYEH https://hgf.de/gxg9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYEH +1999 Testuser-bpm 020a000703 LWH9 https://hgf.de/fffs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWH9 +1961 Testuser-bpm 020a000703 VYEU https://hgf.de/5g92 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYEU +1817 Testuser-bpm 020a000703 AYFL https://hgf.de/uqh0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYFL +1848 Testuser-bpm 020a000703 LYFX https://hgf.de/fjgg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYFX +1886 Testuser-bpm 020a000703 VYHF https://hgf.de/bp-u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYHF +1913 Testuser-bpm 020a000703 AYJ4 https://hgf.de/0ny- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYJ4 +1939 Testuser-bpm 020a000703 LYJK https://hgf.de/2h31 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYJK +1823 Testuser-bpm 020a000703 VYJW https://hgf.de/wuhq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYJW +1940 Testuser-bpm 020a000703 AYKN https://hgf.de/g7sj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYKN +1893 Testuser-bpm 020a000703 LYL3 https://hgf.de/edk1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYL3 +1775 Testuser-bpm 020a000703 VYLJ https://hgf.de/88kj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYLJ +1968 Testuser-bpm 020a000703 AYM9 https://hgf.de/0m9x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYM9 +1862 Testuser-bpm 020a000703 LYMM https://hgf.de/4afe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYMM +1870 Testuser-bpm 020a000703 VYMY https://hgf.de/8-rc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYMY +1964 Testuser-bpm 020a000703 AYNQ https://hgf.de/syx6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYNQ +1983 Testuser-bpm 020a000703 AW43 https://hgf.de/ia0a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AW43 +1942 Testuser-bpm 020a000703 LYP7 https://hgf.de/5vn7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYP7 +1945 Testuser-bpm 020a000703 VYPL https://hgf.de/laee https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYPL +1887 Testuser-bpm 020a000703 AYQC https://hgf.de/z9il https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYQC +1833 Testuser-bpm 020a000703 LYQP https://hgf.de/q0e1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYQP +1991 Testuser-bpm 020a000703 VWAX https://hgf.de/n94c https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWAX +1814 Testuser-bpm 020a000703 VYR4 https://hgf.de/o96d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYR4 +1856 Testuser-bpm 020a000703 AYRT https://hgf.de/h0bg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYRT +1962 Testuser-bpm 020a000703 LYTA https://hgf.de/xa8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYTA +1907 Testuser-bpm 020a000703 VYTN https://hgf.de/y2vq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYTN +1871 Testuser-bpm 020a000703 AYUE https://hgf.de/j79y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYUE +1959 Testuser-bpm 020a000703 LYUR https://hgf.de/6rfy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYUR +1963 Testuser-bpm 020a000703 VYV9 https://hgf.de/cwbe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYV9 +1791 Testuser-bpm 020a000703 AYVV https://hgf.de/8mg0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYVV +1895 Testuser-bpm 020a000703 LYWD https://hgf.de/l5e5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYWD +1912 Testuser-bpm 020a000703 VYWQ https://hgf.de/y7lj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYWQ +1827 Testuser-bpm 020a000703 AYXH https://hgf.de/l6if https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYXH +1860 Testuser-bpm 020a000703 LYXU https://hgf.de/mu8w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LYXU +1989 Testuser-bpm 020a000703 AWA7 https://hgf.de/y9ms https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWA7 +1854 Testuser-bpm 020a000703 VYYC https://hgf.de/423j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VYYC +1960 Testuser-bpm 020a000703 AYYX https://hgf.de/q8ef https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AYYX +1771 Testuser-bpm 020a000703 M33F https://hgf.de/qkru https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M33F +1834 Testuser-bpm 020a000703 W33T https://hgf.de/qxj0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W33T +1926 Testuser-bpm 020a000703 C34K https://hgf.de/6m1g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C34K +1924 Testuser-bpm 020a000703 M34W https://hgf.de/5dfb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M34W +1950 Testuser-bpm 020a000703 W37E https://hgf.de/q80v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W37E +1932 Testuser-bpm 020a000703 C393 https://hgf.de/fjnc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C393 +1955 Testuser-bpm 020a000703 M39J https://hgf.de/9xdf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M39J +1763 Testuser-bpm 020a000703 W39V https://hgf.de/qmc0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W39V +1849 Testuser-bpm 020a000703 C3AM https://hgf.de/kzix https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3AM +1785 Testuser-bpm 020a000703 M3AY https://hgf.de/2zvz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3AY +1891 Testuser-bpm 020a000703 W3CH https://hgf.de/ekkj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3CH +1923 Testuser-bpm 020a000703 C3D7 https://hgf.de/dey4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3D7 +1779 Testuser-bpm 020a000703 M3DL https://hgf.de/tixh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3DL +1958 Testuser-bpm 020a000703 W3DX https://hgf.de/f-le https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3DX +1918 Testuser-bpm 020a000703 C3EP https://hgf.de/m14x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3EP +1783 Testuser-bpm 020a000703 M3F4 https://hgf.de/ri9x https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3F4 +1774 Testuser-bpm 020a000703 W3FK https://hgf.de/-evs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3FK +1927 Testuser-bpm 020a000703 C3HA https://hgf.de/zxq5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3HA +1954 Testuser-bpm 020a000703 M3HN https://hgf.de/ml7b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3HN +1935 Testuser-bpm 020a000703 W3J3 https://hgf.de/ebh- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3J3 +1997 Testuser-bpm 020a000703 VWF3 https://hgf.de/aqbw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWF3 +1864 Testuser-bpm 020a000703 C3JR https://hgf.de/zpqn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3JR +1799 Testuser-bpm 020a000703 M3K9 https://hgf.de/w6l2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3K9 +1903 Testuser-bpm 020a000703 W3KM https://hgf.de/fep9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3KM +1982 Testuser-bpm 020a000703 VW3E https://hgf.de/3h5z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VW3E +1914 Testuser-bpm 020a000703 C3LD https://hgf.de/jf-p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3LD +1793 Testuser-bpm 020a000703 M3LQ https://hgf.de/jpwi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3LQ +1953 Testuser-bpm 020a000703 W3M7 https://hgf.de/cc5h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3M7 +1971 Testuser-bpm 020a000703 C3MU https://hgf.de/fetb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3MU +1992 Testuser-bpm 020a000703 AWCP https://hgf.de/54-7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWCP +1758 Testuser-bpm 020a000703 M3NC https://hgf.de/hox- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3NC +1915 Testuser-bpm 020a000703 W3NP https://hgf.de/s1gs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3NP +1882 Testuser-bpm 020a000703 C3PF https://hgf.de/ex9r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3PF +1976 Testuser-bpm 020a000703 M3PT https://hgf.de/5ise https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3PT +1828 Testuser-bpm 020a000703 W3QA https://hgf.de/3wai https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3QA +1752 Testuser-bpm 020a000703 C3QW https://hgf.de/dvfe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3QW +1858 Testuser-bpm 020a000703 M3RE https://hgf.de/-ieo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3RE +1996 Testuser-bpm 020a000703 LWEN https://hgf.de/8pvq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWEN +1761 Testuser-bpm 020a000703 W3RR https://hgf.de/f00j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3RR +1822 Testuser-bpm 020a000703 C3TJ https://hgf.de/4e8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3TJ +1944 Testuser-bpm 020a000703 M3TV https://hgf.de/ovrn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3TV +1986 Testuser-bpm 020a000703 AW7M https://hgf.de/non1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AW7M +1811 Testuser-bpm 020a000703 W3UD https://hgf.de/qq4k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3UD +1844 Testuser-bpm 020a000703 C3UY https://hgf.de/w0nt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3UY +1885 Testuser-bpm 020a000703 M3VH https://hgf.de/p5wt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3VH +1845 Testuser-bpm 020a000703 W3VU https://hgf.de/0tvh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3VU +1788 Testuser-bpm 020a000703 C3WL https://hgf.de/ao1t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3WL +1756 Testuser-bpm 020a000703 M3WX https://hgf.de/kx-3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3WX +1808 Testuser-bpm 020a000703 W3XF https://hgf.de/jhvq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3XF +1943 Testuser-bpm 020a000703 C3Y4 https://hgf.de/a1-9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C3Y4 +1855 Testuser-bpm 020a000703 M3YK https://hgf.de/qm02 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M3YK +1753 Testuser-bpm 020a000703 W3YW https://hgf.de/ktki https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W3YW +1759 Testuser-bpm 020a000703 C43N https://hgf.de/s7d- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C43N +1829 Testuser-bpm 020a000703 M443 https://hgf.de/i2nv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M443 +1798 Testuser-bpm 020a000703 W44J https://hgf.de/i1nr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W44J +1850 Testuser-bpm 020a000703 C479 https://hgf.de/um7i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C479 +1898 Testuser-bpm 020a000703 M47M https://hgf.de/p0jv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M47M +1802 Testuser-bpm 020a000703 W47Y https://hgf.de/n686 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W47Y +1948 Testuser-bpm 020a000703 C49Q https://hgf.de/ek4l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C49Q +1781 Testuser-bpm 020a000703 M4A7 https://hgf.de/179v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4A7 +1881 Testuser-bpm 020a000703 W4AL https://hgf.de/enj2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4AL +1861 Testuser-bpm 020a000703 C4CC https://hgf.de/lsv1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4CC +1757 Testuser-bpm 020a000703 M4CP https://hgf.de/5612 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4CP +1816 Testuser-bpm 020a000703 W4D4 https://hgf.de/nd7s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4D4 +1818 Testuser-bpm 020a000703 C4DT https://hgf.de/rnfe https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4DT +1888 Testuser-bpm 020a000703 M4EA https://hgf.de/sz73 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4EA +1993 Testuser-bpm 020a000703 LWD4 https://hgf.de/yc5f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWD4 +1836 Testuser-bpm 020a000703 W4EN https://hgf.de/gv7w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4EN +1863 Testuser-bpm 020a000703 C4FE https://hgf.de/guln https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4FE +1797 Testuser-bpm 020a000703 M4FR https://hgf.de/ctty https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4FR +1869 Testuser-bpm 020a000703 W4H9 https://hgf.de/b64h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4H9 +1831 Testuser-bpm 020a000703 C4HV https://hgf.de/jpoh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4HV +1766 Testuser-bpm 020a000703 M4JD https://hgf.de/ttbp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4JD +1974 Testuser-bpm 020a000703 W4JQ https://hgf.de/s3sv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4JQ +1853 Testuser-bpm 020a000703 C4KH https://hgf.de/d4gl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4KH +2000 Testuser-bpm 020a000703 VWHM https://hgf.de/k3c0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=VWHM +1794 Testuser-bpm 020a000703 M4KU https://hgf.de/jr2p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4KU +1843 Testuser-bpm 020a000703 W4LC https://hgf.de/flyi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4LC +1883 Testuser-bpm 020a000703 C4LX https://hgf.de/-9w6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4LX +1762 Testuser-bpm 020a000703 M4MF https://hgf.de/0s3r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4MF +1866 Testuser-bpm 020a000703 W4MT https://hgf.de/6tvc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4MT +1934 Testuser-bpm 020a000703 C4NK https://hgf.de/wyqm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4NK +1900 Testuser-bpm 020a000703 M4NW https://hgf.de/fgg- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4NW +1984 Testuser-bpm 020a000703 LW4J https://hgf.de/cjl5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LW4J +1925 Testuser-bpm 020a000703 W4PE https://hgf.de/gb1l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4PE +1978 Testuser-bpm 020a000703 C4Q3 https://hgf.de/n46f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4Q3 +1865 Testuser-bpm 020a000703 M4QJ https://hgf.de/8zkc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4QJ +1990 Testuser-bpm 020a000703 LWAL https://hgf.de/7tz0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=LWAL +1838 Testuser-bpm 020a000703 W4QV https://hgf.de/lck7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4QV +1875 Testuser-bpm 020a000703 C4RM https://hgf.de/blzz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4RM +1826 Testuser-bpm 020a000703 M4RY https://hgf.de/fbx- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4RY +1969 Testuser-bpm 020a000703 W4TH https://hgf.de/ha0o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4TH +1778 Testuser-bpm 020a000703 C4U7 https://hgf.de/10kl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4U7 +1911 Testuser-bpm 020a000703 M4UL https://hgf.de/06ja https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4UL +1930 Testuser-bpm 020a000703 W4UX https://hgf.de/a9s6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4UX +1815 Testuser-bpm 020a000703 C4VP https://hgf.de/3byy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4VP +1773 Testuser-bpm 020a000703 M4W4 https://hgf.de/8pgr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4W4 +1908 Testuser-bpm 020a000703 W4WK https://hgf.de/lblo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4WK +1803 Testuser-bpm 020a000703 C4XA https://hgf.de/lego https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4XA +1917 Testuser-bpm 020a000703 M4XN https://hgf.de/r5dv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M4XN +1970 Testuser-bpm 020a000703 W4Y3 https://hgf.de/hfjd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W4Y3 +1830 Testuser-bpm 020a000703 C4YR https://hgf.de/6znb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C4YR +1979 Testuser-bpm 020a000703 M739 https://hgf.de/vkgd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M739 +1804 Testuser-bpm 020a000703 W73M https://hgf.de/0kdo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W73M +1921 Testuser-bpm 020a000703 C74D https://hgf.de/oezg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C74D +1966 Testuser-bpm 020a000703 M74Q https://hgf.de/w9j3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M74Q +1839 Testuser-bpm 020a000703 W777 https://hgf.de/erdv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W777 +1946 Testuser-bpm 020a000703 C77U https://hgf.de/hsyn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C77U +1998 Testuser-bpm 020a000703 AWFR https://hgf.de/6-o9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=AWFR +1819 Testuser-bpm 020a000703 M79C https://hgf.de/4oij https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M79C +1949 Testuser-bpm 020a000703 W79P https://hgf.de/qy11 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W79P +1800 Testuser-bpm 020a000703 C7AF https://hgf.de/eqww https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7AF +1980 Testuser-bpm 020a000703 M7AT https://hgf.de/wx3p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7AT +1938 Testuser-bpm 020a000703 W7CA https://hgf.de/bolm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7CA +1777 Testuser-bpm 020a000703 C7CW https://hgf.de/dhoj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7CW +1776 Testuser-bpm 020a000703 M7DE https://hgf.de/vfgr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7DE +1784 Testuser-bpm 020a000703 W7DR https://hgf.de/50d7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7DR +1936 Testuser-bpm 020a000703 C7EJ https://hgf.de/vwvt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7EJ +1910 Testuser-bpm 020a000703 M7EV https://hgf.de/8-gj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7EV diff --git a/++ Dokumente/TANs/hogrefe_tan9.csv b/++ Dokumente/TANs/hogrefe_tan9.csv new file mode 100755 index 0000000..776248b --- /dev/null +++ b/++ Dokumente/TANs/hogrefe_tan9.csv @@ -0,0 +1,250 @@ +2071 Testuser-bpm 020a000703 C7MN https://hgf.de/3rwr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7MN +2155 Testuser-bpm 020a000703 M7N3 https://hgf.de/wznz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7N3 +2244 Testuser-bpm 020a000703 W7HU https://hgf.de/bibd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7HU +2138 Testuser-bpm 020a000703 W7NJ https://hgf.de/x1ry https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7NJ +2229 Testuser-bpm 020a000703 C7P9 https://hgf.de/e6k9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7P9 +2073 Testuser-bpm 020a000703 M7PM https://hgf.de/wr4h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7PM +2217 Testuser-bpm 020a000703 W7PY https://hgf.de/dj17 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7PY +2078 Testuser-bpm 020a000703 C7QQ https://hgf.de/-n-1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7QQ +2150 Testuser-bpm 020a000703 M7R7 https://hgf.de/g6dy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7R7 +2133 Testuser-bpm 020a000703 W7RL https://hgf.de/7im5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7RL +2191 Testuser-bpm 020a000703 C7TC https://hgf.de/wo2y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7TC +2197 Testuser-bpm 020a000703 M7TP https://hgf.de/vv1h https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7TP +2059 Testuser-bpm 020a000703 W7U4 https://hgf.de/lhl6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7U4 +2136 Testuser-bpm 020a000703 C7UT https://hgf.de/kkvv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7UT +2013 Testuser-bpm 020a000703 M7VA https://hgf.de/xn3b https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7VA +2020 Testuser-bpm 020a000703 W7VN https://hgf.de/u90- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7VN +2190 Testuser-bpm 020a000703 C7WE https://hgf.de/kqgd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7WE +2119 Testuser-bpm 020a000703 M7WR https://hgf.de/58p8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7WR +2108 Testuser-bpm 020a000703 W7X9 https://hgf.de/kfcc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7X9 +2207 Testuser-bpm 020a000703 C7XV https://hgf.de/qsal https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7XV +2239 Testuser-bpm 020a000703 M7YD https://hgf.de/-hfq https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7YD +2077 Testuser-bpm 020a000703 W7YQ https://hgf.de/t917 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7YQ +2124 Testuser-bpm 020a000703 C93H https://hgf.de/ec45 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C93H +2199 Testuser-bpm 020a000703 M93U https://hgf.de/eqrn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M93U +2247 Testuser-bpm 020a000703 W7KF https://hgf.de/zz7s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7KF +2198 Testuser-bpm 020a000703 W94C https://hgf.de/02jn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W94C +2177 Testuser-bpm 020a000703 C94X https://hgf.de/3xdi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C94X +2069 Testuser-bpm 020a000703 M97F https://hgf.de/t9pa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M97F +2026 Testuser-bpm 020a000703 W97T https://hgf.de/8fn8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W97T +2060 Testuser-bpm 020a000703 C99K https://hgf.de/-w75 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C99K +2063 Testuser-bpm 020a000703 M99W https://hgf.de/fcc2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M99W +2104 Testuser-bpm 020a000703 W9AE https://hgf.de/2afd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9AE +2170 Testuser-bpm 020a000703 C9C3 https://hgf.de/e88i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9C3 +2214 Testuser-bpm 020a000703 M9CJ https://hgf.de/um3t https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9CJ +2052 Testuser-bpm 020a000703 W9CV https://hgf.de/q71o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9CV +2152 Testuser-bpm 020a000703 C9DM https://hgf.de/5kv7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9DM +2161 Testuser-bpm 020a000703 M9DY https://hgf.de/wcsp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9DY +2195 Testuser-bpm 020a000703 W9EH https://hgf.de/qq8i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9EH +2219 Testuser-bpm 020a000703 C9F7 https://hgf.de/mdrf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9F7 +2036 Testuser-bpm 020a000703 M9FL https://hgf.de/-zf3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9FL +2250 Testuser-bpm 020a000703 W7LW https://hgf.de/azky https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7LW +2034 Testuser-bpm 020a000703 W9FX https://hgf.de/it4v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9FX +2117 Testuser-bpm 020a000703 C9HP https://hgf.de/kr8u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9HP +2131 Testuser-bpm 020a000703 M9J4 https://hgf.de/srzk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9J4 +2230 Testuser-bpm 020a000703 W9JK https://hgf.de/awdp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9JK +2121 Testuser-bpm 020a000703 C9KA https://hgf.de/3gqk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9KA +2216 Testuser-bpm 020a000703 M9KN https://hgf.de/-vug https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9KN +2093 Testuser-bpm 020a000703 W9L3 https://hgf.de/dx4n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9L3 +2164 Testuser-bpm 020a000703 C9LR https://hgf.de/f9vd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9LR +2084 Testuser-bpm 020a000703 M9M9 https://hgf.de/j5al https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9M9 +2147 Testuser-bpm 020a000703 W9MM https://hgf.de/fjfl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9MM +2193 Testuser-bpm 020a000703 C9ND https://hgf.de/kpdb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9ND +2081 Testuser-bpm 020a000703 M9NQ https://hgf.de/aqjl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9NQ +2025 Testuser-bpm 020a000703 W9P7 https://hgf.de/aaak https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9P7 +2167 Testuser-bpm 020a000703 C9PU https://hgf.de/7cnd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9PU +2112 Testuser-bpm 020a000703 M9QC https://hgf.de/dvta https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9QC +2160 Testuser-bpm 020a000703 W9QP https://hgf.de/twna https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9QP +2051 Testuser-bpm 020a000703 C9RF https://hgf.de/6rzb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9RF +2005 Testuser-bpm 020a000703 M9RT https://hgf.de/xsdw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9RT +2038 Testuser-bpm 020a000703 W9TA https://hgf.de/17ng https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9TA +2173 Testuser-bpm 020a000703 C9TW https://hgf.de/baq8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9TW +2009 Testuser-bpm 020a000703 M9UE https://hgf.de/38cr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9UE +2236 Testuser-bpm 020a000703 W9UR https://hgf.de/7n1i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9UR +2074 Testuser-bpm 020a000703 C9VJ https://hgf.de/0y8n https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9VJ +2099 Testuser-bpm 020a000703 M9VV https://hgf.de/wxdp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9VV +2202 Testuser-bpm 020a000703 W9WD https://hgf.de/2-p4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9WD +2010 Testuser-bpm 020a000703 C9WY https://hgf.de/8lnf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9WY +2068 Testuser-bpm 020a000703 M9XH https://hgf.de/rauc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9XH +2075 Testuser-bpm 020a000703 W9XU https://hgf.de/io43 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W9XU +2007 Testuser-bpm 020a000703 C9YL https://hgf.de/gmyi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C9YL +2101 Testuser-bpm 020a000703 M9YX https://hgf.de/0ck6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M9YX +2146 Testuser-bpm 020a000703 WA3F https://hgf.de/qulm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WA3F +2189 Testuser-bpm 020a000703 CA44 https://hgf.de/wm2a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CA44 +2203 Testuser-bpm 020a000703 MA4K https://hgf.de/oskl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MA4K +2187 Testuser-bpm 020a000703 WA4W https://hgf.de/bkvt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WA4W +2086 Testuser-bpm 020a000703 CA7N https://hgf.de/2cih https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CA7N +2201 Testuser-bpm 020a000703 MA93 https://hgf.de/f7p8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MA93 +2014 Testuser-bpm 020a000703 WA9J https://hgf.de/tspl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WA9J +2128 Testuser-bpm 020a000703 CAA9 https://hgf.de/u89i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAA9 +2004 Testuser-bpm 020a000703 MAAM https://hgf.de/ds1z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAAM +2181 Testuser-bpm 020a000703 WAAY https://hgf.de/mq7j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAAY +2067 Testuser-bpm 020a000703 CACQ https://hgf.de/2jwu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CACQ +2113 Testuser-bpm 020a000703 MAD7 https://hgf.de/6c2r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAD7 +2061 Testuser-bpm 020a000703 WADL https://hgf.de/un7k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WADL +2237 Testuser-bpm 020a000703 CAEC https://hgf.de/ae-8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAEC +2035 Testuser-bpm 020a000703 MAEP https://hgf.de/x98l https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAEP +2245 Testuser-bpm 020a000703 C7JL https://hgf.de/6c8f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7JL +2222 Testuser-bpm 020a000703 WAF4 https://hgf.de/h1nk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAF4 +2019 Testuser-bpm 020a000703 CAFT https://hgf.de/rw4o https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAFT +2091 Testuser-bpm 020a000703 MAHA https://hgf.de/w3sh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAHA +2107 Testuser-bpm 020a000703 WAHN https://hgf.de/-fq5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAHN +2148 Testuser-bpm 020a000703 CAJE https://hgf.de/m-st https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAJE +2125 Testuser-bpm 020a000703 MAJR https://hgf.de/rpi9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAJR +2022 Testuser-bpm 020a000703 WAK9 https://hgf.de/02fr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAK9 +2144 Testuser-bpm 020a000703 CAKV https://hgf.de/5kbl https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAKV +2215 Testuser-bpm 020a000703 MALD https://hgf.de/zjqb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MALD +2096 Testuser-bpm 020a000703 WALQ https://hgf.de/2bl7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WALQ +2129 Testuser-bpm 020a000703 CAMH https://hgf.de/rwse https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAMH +2094 Testuser-bpm 020a000703 MAMU https://hgf.de/7pet https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAMU +2114 Testuser-bpm 020a000703 WANC https://hgf.de/zucv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WANC +2246 Testuser-bpm 020a000703 M7JX https://hgf.de/gedg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7JX +2196 Testuser-bpm 020a000703 CANX https://hgf.de/my3i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CANX +2209 Testuser-bpm 020a000703 MAPF https://hgf.de/2wwu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAPF +2188 Testuser-bpm 020a000703 WAPT https://hgf.de/rflt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAPT +2037 Testuser-bpm 020a000703 CAQK https://hgf.de/2eco https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAQK +2088 Testuser-bpm 020a000703 MAQW https://hgf.de/pxs8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAQW +2249 Testuser-bpm 020a000703 M7LK https://hgf.de/nr7d https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7LK +2079 Testuser-bpm 020a000703 WARE https://hgf.de/63-2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WARE +2238 Testuser-bpm 020a000703 CAT3 https://hgf.de/nlfb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAT3 +2003 Testuser-bpm 020a000703 MATJ https://hgf.de/2h9j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MATJ +2159 Testuser-bpm 020a000703 WATV https://hgf.de/plhr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WATV +2145 Testuser-bpm 020a000703 CAUM https://hgf.de/bwc0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAUM +2132 Testuser-bpm 020a000703 MAUY https://hgf.de/sw43 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAUY +2227 Testuser-bpm 020a000703 WAVH https://hgf.de/espa https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAVH +2165 Testuser-bpm 020a000703 CAW7 https://hgf.de/wu12 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAW7 +2140 Testuser-bpm 020a000703 MAWL https://hgf.de/vyud https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAWL +2240 Testuser-bpm 020a000703 WAWX https://hgf.de/ksg6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAWX +2162 Testuser-bpm 020a000703 CAXP https://hgf.de/xqlf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CAXP +2178 Testuser-bpm 020a000703 MAY4 https://hgf.de/4xs6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MAY4 +2233 Testuser-bpm 020a000703 WAYK https://hgf.de/97u1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WAYK +2039 Testuser-bpm 020a000703 CC3A https://hgf.de/a4qg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CC3A +2102 Testuser-bpm 020a000703 MC3N https://hgf.de/8s-a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MC3N +2095 Testuser-bpm 020a000703 WC43 https://hgf.de/6nyo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WC43 +2179 Testuser-bpm 020a000703 CC4R https://hgf.de/-546 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CC4R +2064 Testuser-bpm 020a000703 MC79 https://hgf.de/0vev https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MC79 +2011 Testuser-bpm 020a000703 WC7M https://hgf.de/8bgb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WC7M +2001 Testuser-bpm 020a000703 CC9D https://hgf.de/y977 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CC9D +2058 Testuser-bpm 020a000703 MC9Q https://hgf.de/9pzr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MC9Q +2103 Testuser-bpm 020a000703 WCA7 https://hgf.de/2ac0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCA7 +2066 Testuser-bpm 020a000703 CCAU https://hgf.de/ef73 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCAU +2211 Testuser-bpm 020a000703 MCCC https://hgf.de/clq9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCCC +2111 Testuser-bpm 020a000703 WCCP https://hgf.de/ca5a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCCP +2122 Testuser-bpm 020a000703 CCDF https://hgf.de/0tfj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCDF +2098 Testuser-bpm 020a000703 MCDT https://hgf.de/56gv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCDT +2210 Testuser-bpm 020a000703 WCEA https://hgf.de/63jh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCEA +2076 Testuser-bpm 020a000703 CCEW https://hgf.de/hcbp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCEW +2092 Testuser-bpm 020a000703 MCFE https://hgf.de/98k6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCFE +2021 Testuser-bpm 020a000703 WCFR https://hgf.de/290s https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCFR +2089 Testuser-bpm 020a000703 CCHJ https://hgf.de/nzh3 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCHJ +2054 Testuser-bpm 020a000703 MCHV https://hgf.de/pgl0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCHV +2175 Testuser-bpm 020a000703 WCJD https://hgf.de/i0ma https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCJD +2200 Testuser-bpm 020a000703 CCJY https://hgf.de/4b7m https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCJY +2223 Testuser-bpm 020a000703 MCKH https://hgf.de/p1r5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCKH +2024 Testuser-bpm 020a000703 WCKU https://hgf.de/q03z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCKU +2241 Testuser-bpm 020a000703 W7FD https://hgf.de/5dmb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=W7FD +2057 Testuser-bpm 020a000703 CCLL https://hgf.de/y8uz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCLL +2100 Testuser-bpm 020a000703 MCLX https://hgf.de/6pno https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCLX +2118 Testuser-bpm 020a000703 WCMF https://hgf.de/uy28 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCMF +2158 Testuser-bpm 020a000703 CCN4 https://hgf.de/keh1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCN4 +2106 Testuser-bpm 020a000703 MCNK https://hgf.de/95h- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCNK +2183 Testuser-bpm 020a000703 WCNW https://hgf.de/20m7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCNW +2065 Testuser-bpm 020a000703 CCPN https://hgf.de/cb-r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCPN +2224 Testuser-bpm 020a000703 MCQ3 https://hgf.de/3821 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCQ3 +2033 Testuser-bpm 020a000703 WCQJ https://hgf.de/k599 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCQJ +2186 Testuser-bpm 020a000703 CCR9 https://hgf.de/q1lo https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCR9 +2243 Testuser-bpm 020a000703 M7HH https://hgf.de/klv4 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=M7HH +2105 Testuser-bpm 020a000703 MCRM https://hgf.de/6u3v https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCRM +2049 Testuser-bpm 020a000703 WCRY https://hgf.de/8fik https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCRY +2185 Testuser-bpm 020a000703 CCTQ https://hgf.de/ctqf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCTQ +2228 Testuser-bpm 020a000703 MCU7 https://hgf.de/ibsr https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCU7 +2070 Testuser-bpm 020a000703 WCUL https://hgf.de/s0pv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCUL +2248 Testuser-bpm 020a000703 C7L4 https://hgf.de/i78w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7L4 +2123 Testuser-bpm 020a000703 CCVC https://hgf.de/vicc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCVC +2082 Testuser-bpm 020a000703 MCVP https://hgf.de/k6-r https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCVP +2055 Testuser-bpm 020a000703 WCW4 https://hgf.de/megy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCW4 +2225 Testuser-bpm 020a000703 CCWT https://hgf.de/5hvy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCWT +2234 Testuser-bpm 020a000703 MCXA https://hgf.de/4yng https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCXA +2097 Testuser-bpm 020a000703 WCXN https://hgf.de/wqvv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WCXN +2029 Testuser-bpm 020a000703 CCYE https://hgf.de/cezs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CCYE +2151 Testuser-bpm 020a000703 MCYR https://hgf.de/8677 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MCYR +2042 Testuser-bpm 020a000703 WD39 https://hgf.de/b0xh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WD39 +2080 Testuser-bpm 020a000703 CD3V https://hgf.de/pywm https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CD3V +2142 Testuser-bpm 020a000703 MD4D https://hgf.de/lyfv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MD4D +2032 Testuser-bpm 020a000703 WD4Q https://hgf.de/7his https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WD4Q +2212 Testuser-bpm 020a000703 CD7H https://hgf.de/f9d- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CD7H +2044 Testuser-bpm 020a000703 MD7U https://hgf.de/aa6g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MD7U +2002 Testuser-bpm 020a000703 WD9C https://hgf.de/8zag https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WD9C +2242 Testuser-bpm 020a000703 C7FY https://hgf.de/mv6a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=C7FY +2018 Testuser-bpm 020a000703 CD9X https://hgf.de/3crw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CD9X +2139 Testuser-bpm 020a000703 MDAF https://hgf.de/znc5 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDAF +2046 Testuser-bpm 020a000703 WDAT https://hgf.de/q89e https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDAT +2048 Testuser-bpm 020a000703 CDCK https://hgf.de/9akv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDCK +2126 Testuser-bpm 020a000703 MDCW https://hgf.de/7xzi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDCW +2174 Testuser-bpm 020a000703 WDDE https://hgf.de/hrk0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDDE +2031 Testuser-bpm 020a000703 CDE3 https://hgf.de/y0d0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDE3 +2226 Testuser-bpm 020a000703 MDEJ https://hgf.de/-vs1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDEJ +2143 Testuser-bpm 020a000703 WDEV https://hgf.de/sysx https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDEV +2232 Testuser-bpm 020a000703 CDFM https://hgf.de/38tu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDFM +2115 Testuser-bpm 020a000703 MDFY https://hgf.de/r0px https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDFY +2204 Testuser-bpm 020a000703 WDHH https://hgf.de/wx-i https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDHH +2154 Testuser-bpm 020a000703 CDJ7 https://hgf.de/pqpf https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDJ7 +2208 Testuser-bpm 020a000703 MDJL https://hgf.de/7pcb https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDJL +2134 Testuser-bpm 020a000703 WDJX https://hgf.de/-zls https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDJX +2017 Testuser-bpm 020a000703 CDKP https://hgf.de/bj9w https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDKP +2205 Testuser-bpm 020a000703 MDL4 https://hgf.de/jqtw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDL4 +2206 Testuser-bpm 020a000703 WDLK https://hgf.de/8r00 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDLK +2194 Testuser-bpm 020a000703 CDMA https://hgf.de/68dj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDMA +2169 Testuser-bpm 020a000703 MDMN https://hgf.de/abqc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDMN +2213 Testuser-bpm 020a000703 WDN3 https://hgf.de/-ng8 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDN3 +2180 Testuser-bpm 020a000703 CDNR https://hgf.de/24rn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDNR +2050 Testuser-bpm 020a000703 MDP9 https://hgf.de/e0o2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDP9 +2072 Testuser-bpm 020a000703 WDPM https://hgf.de/1qku https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDPM +2135 Testuser-bpm 020a000703 CDQD https://hgf.de/41s9 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDQD +2015 Testuser-bpm 020a000703 MDQQ https://hgf.de/pteu https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDQQ +2172 Testuser-bpm 020a000703 WDR7 https://hgf.de/l13u https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDR7 +2127 Testuser-bpm 020a000703 CDRU https://hgf.de/wg79 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDRU +2110 Testuser-bpm 020a000703 MDTC https://hgf.de/sqej https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDTC +2141 Testuser-bpm 020a000703 WDTP https://hgf.de/rd74 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDTP +2030 Testuser-bpm 020a000703 CDUF https://hgf.de/v40a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDUF +2028 Testuser-bpm 020a000703 MDUT https://hgf.de/jeo2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDUT +2085 Testuser-bpm 020a000703 WDVA https://hgf.de/vj3y https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDVA +2041 Testuser-bpm 020a000703 CDVW https://hgf.de/64s- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDVW +2027 Testuser-bpm 020a000703 MDWE https://hgf.de/69l0 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDWE +2083 Testuser-bpm 020a000703 WDWR https://hgf.de/k0qp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDWR +2171 Testuser-bpm 020a000703 CDXJ https://hgf.de/fupk https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDXJ +2012 Testuser-bpm 020a000703 MDXV https://hgf.de/1gfs https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MDXV +2176 Testuser-bpm 020a000703 WDYD https://hgf.de/-82k https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WDYD +2130 Testuser-bpm 020a000703 CDYY https://hgf.de/g-tg https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CDYY +2006 Testuser-bpm 020a000703 ME3H https://hgf.de/sw5f https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ME3H +2008 Testuser-bpm 020a000703 WE3U https://hgf.de/5012 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WE3U +2090 Testuser-bpm 020a000703 CE4L https://hgf.de/1rly https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CE4L +2157 Testuser-bpm 020a000703 ME4X https://hgf.de/1lhh https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ME4X +2153 Testuser-bpm 020a000703 WE7F https://hgf.de/gqjj https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WE7F +2168 Testuser-bpm 020a000703 CE94 https://hgf.de/hg13 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CE94 +2235 Testuser-bpm 020a000703 ME9K https://hgf.de/8zp- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=ME9K +2056 Testuser-bpm 020a000703 WE9W https://hgf.de/fnsi https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WE9W +2043 Testuser-bpm 020a000703 CEAN https://hgf.de/b-5j https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEAN +2053 Testuser-bpm 020a000703 MEC3 https://hgf.de/9jkc https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEC3 +2166 Testuser-bpm 020a000703 WECJ https://hgf.de/kmsw https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WECJ +2218 Testuser-bpm 020a000703 CED9 https://hgf.de/07qv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CED9 +2184 Testuser-bpm 020a000703 MEDM https://hgf.de/chy7 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEDM +2156 Testuser-bpm 020a000703 WEDY https://hgf.de/yz8g https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEDY +2221 Testuser-bpm 020a000703 CEEQ https://hgf.de/80gd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEEQ +2040 Testuser-bpm 020a000703 MEF7 https://hgf.de/jg7z https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEF7 +2116 Testuser-bpm 020a000703 WEFL https://hgf.de/owxz https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEFL +2047 Testuser-bpm 020a000703 CEHC https://hgf.de/gsu6 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEHC +2109 Testuser-bpm 020a000703 MEHP https://hgf.de/fw8a https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEHP +2045 Testuser-bpm 020a000703 WEJ4 https://hgf.de/v0nt https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEJ4 +2149 Testuser-bpm 020a000703 CEJT https://hgf.de/38e2 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEJT +2182 Testuser-bpm 020a000703 MEKA https://hgf.de/8bpv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEKA +2023 Testuser-bpm 020a000703 WEKN https://hgf.de/e1fd https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEKN +2087 Testuser-bpm 020a000703 CELE https://hgf.de/xex1 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CELE +2192 Testuser-bpm 020a000703 MELR https://hgf.de/ewdp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MELR +2137 Testuser-bpm 020a000703 WEM9 https://hgf.de/-nzp https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEM9 +2220 Testuser-bpm 020a000703 CEMV https://hgf.de/q6wy https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEMV +2163 Testuser-bpm 020a000703 MEND https://hgf.de/ygfv https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEND +2062 Testuser-bpm 020a000703 WENQ https://hgf.de/70nn https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WENQ +2016 Testuser-bpm 020a000703 CEPH https://hgf.de/tv5p https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=CEPH +2120 Testuser-bpm 020a000703 MEPU https://hgf.de/i0k- https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=MEPU +2231 Testuser-bpm 020a000703 WEQC https://hgf.de/d007 https://www.hogrefe-online.com/HTSEnvironment/test?serialNumber=020a000703&tan=WEQC diff --git a/++ Dokumente/TANs/tan1.csv b/++ Dokumente/TANs/tan1.csv new file mode 100755 index 0000000..6893722 --- /dev/null +++ b/++ Dokumente/TANs/tan1.csv @@ -0,0 +1,250 @@ +1;Testuser-bpm;;;2;;bpm_2020-08-01; +2;Testuser-bpm;;;2;;bpm_2020-08-01; +3;Testuser-bpm;;;2;;bpm_2020-08-01; +4;Testuser-bpm;;;2;;bpm_2020-08-01; +5;Testuser-bpm;;;2;;bpm_2020-08-01; +6;Testuser-bpm;;;2;;bpm_2020-08-01; +7;Testuser-bpm;;;2;;bpm_2020-08-01; +8;Testuser-bpm;;;2;;bpm_2020-08-01; +9;Testuser-bpm;;;2;;bpm_2020-08-01; +10;Testuser-bpm;;;2;;bpm_2020-08-01; +11;Testuser-bpm;;;2;;bpm_2020-08-01; +12;Testuser-bpm;;;2;;bpm_2020-08-01; +13;Testuser-bpm;;;2;;bpm_2020-08-01; +14;Testuser-bpm;;;2;;bpm_2020-08-01; +15;Testuser-bpm;;;2;;bpm_2020-08-01; +16;Testuser-bpm;;;2;;bpm_2020-08-01; +17;Testuser-bpm;;;2;;bpm_2020-08-01; +18;Testuser-bpm;;;2;;bpm_2020-08-01; +19;Testuser-bpm;;;2;;bpm_2020-08-01; +20;Testuser-bpm;;;2;;bpm_2020-08-01; +21;Testuser-bpm;;;2;;bpm_2020-08-01; +22;Testuser-bpm;;;2;;bpm_2020-08-01; +23;Testuser-bpm;;;2;;bpm_2020-08-01; +24;Testuser-bpm;;;2;;bpm_2020-08-01; +25;Testuser-bpm;;;2;;bpm_2020-08-01; +26;Testuser-bpm;;;2;;bpm_2020-08-01; +27;Testuser-bpm;;;2;;bpm_2020-08-01; +28;Testuser-bpm;;;2;;bpm_2020-08-01; +29;Testuser-bpm;;;2;;bpm_2020-08-01; +30;Testuser-bpm;;;2;;bpm_2020-08-01; +31;Testuser-bpm;;;2;;bpm_2020-08-01; +32;Testuser-bpm;;;2;;bpm_2020-08-01; +33;Testuser-bpm;;;2;;bpm_2020-08-01; +34;Testuser-bpm;;;2;;bpm_2020-08-01; +35;Testuser-bpm;;;2;;bpm_2020-08-01; +36;Testuser-bpm;;;2;;bpm_2020-08-01; +37;Testuser-bpm;;;2;;bpm_2020-08-01; +38;Testuser-bpm;;;2;;bpm_2020-08-01; +39;Testuser-bpm;;;2;;bpm_2020-08-01; +40;Testuser-bpm;;;2;;bpm_2020-08-01; +41;Testuser-bpm;;;2;;bpm_2020-08-01; +42;Testuser-bpm;;;2;;bpm_2020-08-01; +43;Testuser-bpm;;;2;;bpm_2020-08-01; +44;Testuser-bpm;;;2;;bpm_2020-08-01; +45;Testuser-bpm;;;2;;bpm_2020-08-01; +46;Testuser-bpm;;;2;;bpm_2020-08-01; +47;Testuser-bpm;;;2;;bpm_2020-08-01; +48;Testuser-bpm;;;2;;bpm_2020-08-01; +49;Testuser-bpm;;;2;;bpm_2020-08-01; +50;Testuser-bpm;;;2;;bpm_2020-08-01; +51;Testuser-bpm;;;2;;bpm_2020-08-01; +52;Testuser-bpm;;;2;;bpm_2020-08-01; +53;Testuser-bpm;;;2;;bpm_2020-08-01; +54;Testuser-bpm;;;2;;bpm_2020-08-01; +55;Testuser-bpm;;;2;;bpm_2020-08-01; +56;Testuser-bpm;;;2;;bpm_2020-08-01; +57;Testuser-bpm;;;2;;bpm_2020-08-01; +58;Testuser-bpm;;;2;;bpm_2020-08-01; +59;Testuser-bpm;;;2;;bpm_2020-08-01; +60;Testuser-bpm;;;2;;bpm_2020-08-01; +61;Testuser-bpm;;;2;;bpm_2020-08-01; +62;Testuser-bpm;;;2;;bpm_2020-08-01; +63;Testuser-bpm;;;2;;bpm_2020-08-01; +64;Testuser-bpm;;;2;;bpm_2020-08-01; +65;Testuser-bpm;;;2;;bpm_2020-08-01; +66;Testuser-bpm;;;2;;bpm_2020-08-01; +67;Testuser-bpm;;;2;;bpm_2020-08-01; +68;Testuser-bpm;;;2;;bpm_2020-08-01; +69;Testuser-bpm;;;2;;bpm_2020-08-01; +70;Testuser-bpm;;;2;;bpm_2020-08-01; +71;Testuser-bpm;;;2;;bpm_2020-08-01; +72;Testuser-bpm;;;2;;bpm_2020-08-01; +73;Testuser-bpm;;;2;;bpm_2020-08-01; +74;Testuser-bpm;;;2;;bpm_2020-08-01; +75;Testuser-bpm;;;2;;bpm_2020-08-01; +76;Testuser-bpm;;;2;;bpm_2020-08-01; +77;Testuser-bpm;;;2;;bpm_2020-08-01; +78;Testuser-bpm;;;2;;bpm_2020-08-01; +79;Testuser-bpm;;;2;;bpm_2020-08-01; +80;Testuser-bpm;;;2;;bpm_2020-08-01; +81;Testuser-bpm;;;2;;bpm_2020-08-01; +82;Testuser-bpm;;;2;;bpm_2020-08-01; +83;Testuser-bpm;;;2;;bpm_2020-08-01; +84;Testuser-bpm;;;2;;bpm_2020-08-01; +85;Testuser-bpm;;;2;;bpm_2020-08-01; +86;Testuser-bpm;;;2;;bpm_2020-08-01; +87;Testuser-bpm;;;2;;bpm_2020-08-01; +88;Testuser-bpm;;;2;;bpm_2020-08-01; +89;Testuser-bpm;;;2;;bpm_2020-08-01; +90;Testuser-bpm;;;2;;bpm_2020-08-01; +91;Testuser-bpm;;;2;;bpm_2020-08-01; +92;Testuser-bpm;;;2;;bpm_2020-08-01; +93;Testuser-bpm;;;2;;bpm_2020-08-01; +94;Testuser-bpm;;;2;;bpm_2020-08-01; +95;Testuser-bpm;;;2;;bpm_2020-08-01; +96;Testuser-bpm;;;2;;bpm_2020-08-01; +97;Testuser-bpm;;;2;;bpm_2020-08-01; +98;Testuser-bpm;;;2;;bpm_2020-08-01; +99;Testuser-bpm;;;2;;bpm_2020-08-01; +100;Testuser-bpm;;;2;;bpm_2020-08-01; +101;Testuser-bpm;;;2;;bpm_2020-08-01; +102;Testuser-bpm;;;2;;bpm_2020-08-01; +103;Testuser-bpm;;;2;;bpm_2020-08-01; +104;Testuser-bpm;;;2;;bpm_2020-08-01; +105;Testuser-bpm;;;2;;bpm_2020-08-01; +106;Testuser-bpm;;;2;;bpm_2020-08-01; +107;Testuser-bpm;;;2;;bpm_2020-08-01; +108;Testuser-bpm;;;2;;bpm_2020-08-01; +109;Testuser-bpm;;;2;;bpm_2020-08-01; +110;Testuser-bpm;;;2;;bpm_2020-08-01; +111;Testuser-bpm;;;2;;bpm_2020-08-01; +112;Testuser-bpm;;;2;;bpm_2020-08-01; +113;Testuser-bpm;;;2;;bpm_2020-08-01; +114;Testuser-bpm;;;2;;bpm_2020-08-01; +115;Testuser-bpm;;;2;;bpm_2020-08-01; +116;Testuser-bpm;;;2;;bpm_2020-08-01; +117;Testuser-bpm;;;2;;bpm_2020-08-01; +118;Testuser-bpm;;;2;;bpm_2020-08-01; +119;Testuser-bpm;;;2;;bpm_2020-08-01; +120;Testuser-bpm;;;2;;bpm_2020-08-01; +121;Testuser-bpm;;;2;;bpm_2020-08-01; +122;Testuser-bpm;;;2;;bpm_2020-08-01; +123;Testuser-bpm;;;2;;bpm_2020-08-01; +124;Testuser-bpm;;;2;;bpm_2020-08-01; +125;Testuser-bpm;;;2;;bpm_2020-08-01; +126;Testuser-bpm;;;2;;bpm_2020-08-01; +127;Testuser-bpm;;;2;;bpm_2020-08-01; +128;Testuser-bpm;;;2;;bpm_2020-08-01; +129;Testuser-bpm;;;2;;bpm_2020-08-01; +130;Testuser-bpm;;;2;;bpm_2020-08-01; +131;Testuser-bpm;;;2;;bpm_2020-08-01; +132;Testuser-bpm;;;2;;bpm_2020-08-01; +133;Testuser-bpm;;;2;;bpm_2020-08-01; +134;Testuser-bpm;;;2;;bpm_2020-08-01; +135;Testuser-bpm;;;2;;bpm_2020-08-01; +136;Testuser-bpm;;;2;;bpm_2020-08-01; +137;Testuser-bpm;;;2;;bpm_2020-08-01; +138;Testuser-bpm;;;2;;bpm_2020-08-01; +139;Testuser-bpm;;;2;;bpm_2020-08-01; +140;Testuser-bpm;;;2;;bpm_2020-08-01; +141;Testuser-bpm;;;2;;bpm_2020-08-01; +142;Testuser-bpm;;;2;;bpm_2020-08-01; +143;Testuser-bpm;;;2;;bpm_2020-08-01; +144;Testuser-bpm;;;2;;bpm_2020-08-01; +145;Testuser-bpm;;;2;;bpm_2020-08-01; +146;Testuser-bpm;;;2;;bpm_2020-08-01; +147;Testuser-bpm;;;2;;bpm_2020-08-01; +148;Testuser-bpm;;;2;;bpm_2020-08-01; +149;Testuser-bpm;;;2;;bpm_2020-08-01; +150;Testuser-bpm;;;2;;bpm_2020-08-01; +151;Testuser-bpm;;;2;;bpm_2020-08-01; +152;Testuser-bpm;;;2;;bpm_2020-08-01; +153;Testuser-bpm;;;2;;bpm_2020-08-01; +154;Testuser-bpm;;;2;;bpm_2020-08-01; +155;Testuser-bpm;;;2;;bpm_2020-08-01; +156;Testuser-bpm;;;2;;bpm_2020-08-01; +157;Testuser-bpm;;;2;;bpm_2020-08-01; +158;Testuser-bpm;;;2;;bpm_2020-08-01; +159;Testuser-bpm;;;2;;bpm_2020-08-01; +160;Testuser-bpm;;;2;;bpm_2020-08-01; +161;Testuser-bpm;;;2;;bpm_2020-08-01; +162;Testuser-bpm;;;2;;bpm_2020-08-01; +163;Testuser-bpm;;;2;;bpm_2020-08-01; +164;Testuser-bpm;;;2;;bpm_2020-08-01; +165;Testuser-bpm;;;2;;bpm_2020-08-01; +166;Testuser-bpm;;;2;;bpm_2020-08-01; +167;Testuser-bpm;;;2;;bpm_2020-08-01; +168;Testuser-bpm;;;2;;bpm_2020-08-01; +169;Testuser-bpm;;;2;;bpm_2020-08-01; +170;Testuser-bpm;;;2;;bpm_2020-08-01; +171;Testuser-bpm;;;2;;bpm_2020-08-01; +172;Testuser-bpm;;;2;;bpm_2020-08-01; +173;Testuser-bpm;;;2;;bpm_2020-08-01; +174;Testuser-bpm;;;2;;bpm_2020-08-01; +175;Testuser-bpm;;;2;;bpm_2020-08-01; +176;Testuser-bpm;;;2;;bpm_2020-08-01; +177;Testuser-bpm;;;2;;bpm_2020-08-01; +178;Testuser-bpm;;;2;;bpm_2020-08-01; +179;Testuser-bpm;;;2;;bpm_2020-08-01; +180;Testuser-bpm;;;2;;bpm_2020-08-01; +181;Testuser-bpm;;;2;;bpm_2020-08-01; +182;Testuser-bpm;;;2;;bpm_2020-08-01; +183;Testuser-bpm;;;2;;bpm_2020-08-01; +184;Testuser-bpm;;;2;;bpm_2020-08-01; +185;Testuser-bpm;;;2;;bpm_2020-08-01; +186;Testuser-bpm;;;2;;bpm_2020-08-01; +187;Testuser-bpm;;;2;;bpm_2020-08-01; +188;Testuser-bpm;;;2;;bpm_2020-08-01; +189;Testuser-bpm;;;2;;bpm_2020-08-01; +190;Testuser-bpm;;;2;;bpm_2020-08-01; +191;Testuser-bpm;;;2;;bpm_2020-08-01; +192;Testuser-bpm;;;2;;bpm_2020-08-01; +193;Testuser-bpm;;;2;;bpm_2020-08-01; +194;Testuser-bpm;;;2;;bpm_2020-08-01; +195;Testuser-bpm;;;2;;bpm_2020-08-01; +196;Testuser-bpm;;;2;;bpm_2020-08-01; +197;Testuser-bpm;;;2;;bpm_2020-08-01; +198;Testuser-bpm;;;2;;bpm_2020-08-01; +199;Testuser-bpm;;;2;;bpm_2020-08-01; +200;Testuser-bpm;;;2;;bpm_2020-08-01; +201;Testuser-bpm;;;2;;bpm_2020-08-01; +202;Testuser-bpm;;;2;;bpm_2020-08-01; +203;Testuser-bpm;;;2;;bpm_2020-08-01; +204;Testuser-bpm;;;2;;bpm_2020-08-01; +205;Testuser-bpm;;;2;;bpm_2020-08-01; +206;Testuser-bpm;;;2;;bpm_2020-08-01; +207;Testuser-bpm;;;2;;bpm_2020-08-01; +208;Testuser-bpm;;;2;;bpm_2020-08-01; +209;Testuser-bpm;;;2;;bpm_2020-08-01; +210;Testuser-bpm;;;2;;bpm_2020-08-01; +211;Testuser-bpm;;;2;;bpm_2020-08-01; +212;Testuser-bpm;;;2;;bpm_2020-08-01; +213;Testuser-bpm;;;2;;bpm_2020-08-01; +214;Testuser-bpm;;;2;;bpm_2020-08-01; +215;Testuser-bpm;;;2;;bpm_2020-08-01; +216;Testuser-bpm;;;2;;bpm_2020-08-01; +217;Testuser-bpm;;;2;;bpm_2020-08-01; +218;Testuser-bpm;;;2;;bpm_2020-08-01; +219;Testuser-bpm;;;2;;bpm_2020-08-01; +220;Testuser-bpm;;;2;;bpm_2020-08-01; +221;Testuser-bpm;;;2;;bpm_2020-08-01; +222;Testuser-bpm;;;2;;bpm_2020-08-01; +223;Testuser-bpm;;;2;;bpm_2020-08-01; +224;Testuser-bpm;;;2;;bpm_2020-08-01; +225;Testuser-bpm;;;2;;bpm_2020-08-01; +226;Testuser-bpm;;;2;;bpm_2020-08-01; +227;Testuser-bpm;;;2;;bpm_2020-08-01; +228;Testuser-bpm;;;2;;bpm_2020-08-01; +229;Testuser-bpm;;;2;;bpm_2020-08-01; +230;Testuser-bpm;;;2;;bpm_2020-08-01; +231;Testuser-bpm;;;2;;bpm_2020-08-01; +232;Testuser-bpm;;;2;;bpm_2020-08-01; +233;Testuser-bpm;;;2;;bpm_2020-08-01; +234;Testuser-bpm;;;2;;bpm_2020-08-01; +235;Testuser-bpm;;;2;;bpm_2020-08-01; +236;Testuser-bpm;;;2;;bpm_2020-08-01; +237;Testuser-bpm;;;2;;bpm_2020-08-01; +238;Testuser-bpm;;;2;;bpm_2020-08-01; +239;Testuser-bpm;;;2;;bpm_2020-08-01; +240;Testuser-bpm;;;2;;bpm_2020-08-01; +241;Testuser-bpm;;;2;;bpm_2020-08-01; +242;Testuser-bpm;;;2;;bpm_2020-08-01; +243;Testuser-bpm;;;2;;bpm_2020-08-01; +244;Testuser-bpm;;;2;;bpm_2020-08-01; +245;Testuser-bpm;;;2;;bpm_2020-08-01; +246;Testuser-bpm;;;2;;bpm_2020-08-01; +247;Testuser-bpm;;;2;;bpm_2020-08-01; +248;Testuser-bpm;;;2;;bpm_2020-08-01; +249;Testuser-bpm;;;2;;bpm_2020-08-01; +250;Testuser-bpm;;;2;;bpm_2020-08-01; diff --git a/++ Dokumente/TANs/tan10.csv b/++ Dokumente/TANs/tan10.csv new file mode 100755 index 0000000..a995e0a --- /dev/null +++ b/++ Dokumente/TANs/tan10.csv @@ -0,0 +1,250 @@ +2251;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2252;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2253;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2254;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2255;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2256;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2257;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2258;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2259;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2260;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2261;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2262;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2263;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2264;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2265;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2266;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2267;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2268;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2269;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2270;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2271;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2272;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2273;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2274;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2275;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2276;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2277;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2278;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2279;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2280;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2281;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2282;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2283;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2284;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2285;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2286;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2287;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2288;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2289;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2290;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2291;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2292;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2293;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2294;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2295;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2296;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2297;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2298;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2299;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2300;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2301;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2302;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2303;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2304;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2305;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2306;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2307;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2308;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2309;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2310;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2311;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2312;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2313;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2314;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2315;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2316;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2317;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2318;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2319;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2320;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2321;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2322;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2323;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2324;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2325;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2326;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2327;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2328;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2329;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2330;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2331;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2332;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2333;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2334;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2335;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2336;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2337;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2338;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2339;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2340;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2341;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2342;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2343;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2344;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2345;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2346;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2347;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2348;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2349;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2350;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2351;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2352;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2353;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2354;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2355;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2356;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2357;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2358;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2359;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2360;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2361;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2362;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2363;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2364;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2365;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2366;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2367;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2368;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2369;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2370;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2371;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2372;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2373;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2374;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2375;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2376;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2377;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2378;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2379;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2380;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2381;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2382;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2383;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2384;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2385;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2386;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2387;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2388;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2389;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2390;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2391;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2392;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2393;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2394;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2395;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2396;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2397;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2398;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2399;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2400;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2401;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2402;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2403;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2404;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2405;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2406;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2407;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2408;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2409;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2410;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2411;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2412;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2413;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2414;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2415;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2416;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2417;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2418;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2419;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2420;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2421;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2422;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2423;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2424;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2425;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2426;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2427;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2428;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2429;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2430;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2431;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2432;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2433;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2434;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2435;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2436;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2437;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2438;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2439;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2440;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2441;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2442;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2443;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2444;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2445;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2446;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2447;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2448;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2449;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2450;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2451;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2452;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2453;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2454;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2455;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2456;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2457;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2458;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2459;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2460;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2461;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2462;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2463;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2464;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2465;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2466;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2467;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2468;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2469;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2470;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2471;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2472;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2473;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2474;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2475;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2476;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2477;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2478;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2479;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2480;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2481;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2482;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2483;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2484;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2485;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2486;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2487;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2488;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2489;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2490;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2491;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2492;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2493;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2494;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2495;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2496;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2497;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2498;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2499;Testuser-bpm;;;2;;bpm_2020-08-01_10 +2500;Testuser-bpm;;;2;;bpm_2020-08-01_10 diff --git a/++ Dokumente/TANs/tan2.csv b/++ Dokumente/TANs/tan2.csv new file mode 100755 index 0000000..7342953 --- /dev/null +++ b/++ Dokumente/TANs/tan2.csv @@ -0,0 +1,250 @@ +251;Testuser-bpm;;;2;;bpm_2020-08-01_2 +252;Testuser-bpm;;;2;;bpm_2020-08-01_2 +253;Testuser-bpm;;;2;;bpm_2020-08-01_2 +254;Testuser-bpm;;;2;;bpm_2020-08-01_2 +255;Testuser-bpm;;;2;;bpm_2020-08-01_2 +256;Testuser-bpm;;;2;;bpm_2020-08-01_2 +257;Testuser-bpm;;;2;;bpm_2020-08-01_2 +258;Testuser-bpm;;;2;;bpm_2020-08-01_2 +259;Testuser-bpm;;;2;;bpm_2020-08-01_2 +260;Testuser-bpm;;;2;;bpm_2020-08-01_2 +261;Testuser-bpm;;;2;;bpm_2020-08-01_2 +262;Testuser-bpm;;;2;;bpm_2020-08-01_2 +263;Testuser-bpm;;;2;;bpm_2020-08-01_2 +264;Testuser-bpm;;;2;;bpm_2020-08-01_2 +265;Testuser-bpm;;;2;;bpm_2020-08-01_2 +266;Testuser-bpm;;;2;;bpm_2020-08-01_2 +267;Testuser-bpm;;;2;;bpm_2020-08-01_2 +268;Testuser-bpm;;;2;;bpm_2020-08-01_2 +269;Testuser-bpm;;;2;;bpm_2020-08-01_2 +270;Testuser-bpm;;;2;;bpm_2020-08-01_2 +271;Testuser-bpm;;;2;;bpm_2020-08-01_2 +272;Testuser-bpm;;;2;;bpm_2020-08-01_2 +273;Testuser-bpm;;;2;;bpm_2020-08-01_2 +274;Testuser-bpm;;;2;;bpm_2020-08-01_2 +275;Testuser-bpm;;;2;;bpm_2020-08-01_2 +276;Testuser-bpm;;;2;;bpm_2020-08-01_2 +277;Testuser-bpm;;;2;;bpm_2020-08-01_2 +278;Testuser-bpm;;;2;;bpm_2020-08-01_2 +279;Testuser-bpm;;;2;;bpm_2020-08-01_2 +280;Testuser-bpm;;;2;;bpm_2020-08-01_2 +281;Testuser-bpm;;;2;;bpm_2020-08-01_2 +282;Testuser-bpm;;;2;;bpm_2020-08-01_2 +283;Testuser-bpm;;;2;;bpm_2020-08-01_2 +284;Testuser-bpm;;;2;;bpm_2020-08-01_2 +285;Testuser-bpm;;;2;;bpm_2020-08-01_2 +286;Testuser-bpm;;;2;;bpm_2020-08-01_2 +287;Testuser-bpm;;;2;;bpm_2020-08-01_2 +288;Testuser-bpm;;;2;;bpm_2020-08-01_2 +289;Testuser-bpm;;;2;;bpm_2020-08-01_2 +290;Testuser-bpm;;;2;;bpm_2020-08-01_2 +291;Testuser-bpm;;;2;;bpm_2020-08-01_2 +292;Testuser-bpm;;;2;;bpm_2020-08-01_2 +293;Testuser-bpm;;;2;;bpm_2020-08-01_2 +294;Testuser-bpm;;;2;;bpm_2020-08-01_2 +295;Testuser-bpm;;;2;;bpm_2020-08-01_2 +296;Testuser-bpm;;;2;;bpm_2020-08-01_2 +297;Testuser-bpm;;;2;;bpm_2020-08-01_2 +298;Testuser-bpm;;;2;;bpm_2020-08-01_2 +299;Testuser-bpm;;;2;;bpm_2020-08-01_2 +300;Testuser-bpm;;;2;;bpm_2020-08-01_2 +301;Testuser-bpm;;;2;;bpm_2020-08-01_2 +302;Testuser-bpm;;;2;;bpm_2020-08-01_2 +303;Testuser-bpm;;;2;;bpm_2020-08-01_2 +304;Testuser-bpm;;;2;;bpm_2020-08-01_2 +305;Testuser-bpm;;;2;;bpm_2020-08-01_2 +306;Testuser-bpm;;;2;;bpm_2020-08-01_2 +307;Testuser-bpm;;;2;;bpm_2020-08-01_2 +308;Testuser-bpm;;;2;;bpm_2020-08-01_2 +309;Testuser-bpm;;;2;;bpm_2020-08-01_2 +310;Testuser-bpm;;;2;;bpm_2020-08-01_2 +311;Testuser-bpm;;;2;;bpm_2020-08-01_2 +312;Testuser-bpm;;;2;;bpm_2020-08-01_2 +313;Testuser-bpm;;;2;;bpm_2020-08-01_2 +314;Testuser-bpm;;;2;;bpm_2020-08-01_2 +315;Testuser-bpm;;;2;;bpm_2020-08-01_2 +316;Testuser-bpm;;;2;;bpm_2020-08-01_2 +317;Testuser-bpm;;;2;;bpm_2020-08-01_2 +318;Testuser-bpm;;;2;;bpm_2020-08-01_2 +319;Testuser-bpm;;;2;;bpm_2020-08-01_2 +320;Testuser-bpm;;;2;;bpm_2020-08-01_2 +321;Testuser-bpm;;;2;;bpm_2020-08-01_2 +322;Testuser-bpm;;;2;;bpm_2020-08-01_2 +323;Testuser-bpm;;;2;;bpm_2020-08-01_2 +324;Testuser-bpm;;;2;;bpm_2020-08-01_2 +325;Testuser-bpm;;;2;;bpm_2020-08-01_2 +326;Testuser-bpm;;;2;;bpm_2020-08-01_2 +327;Testuser-bpm;;;2;;bpm_2020-08-01_2 +328;Testuser-bpm;;;2;;bpm_2020-08-01_2 +329;Testuser-bpm;;;2;;bpm_2020-08-01_2 +330;Testuser-bpm;;;2;;bpm_2020-08-01_2 +331;Testuser-bpm;;;2;;bpm_2020-08-01_2 +332;Testuser-bpm;;;2;;bpm_2020-08-01_2 +333;Testuser-bpm;;;2;;bpm_2020-08-01_2 +334;Testuser-bpm;;;2;;bpm_2020-08-01_2 +335;Testuser-bpm;;;2;;bpm_2020-08-01_2 +336;Testuser-bpm;;;2;;bpm_2020-08-01_2 +337;Testuser-bpm;;;2;;bpm_2020-08-01_2 +338;Testuser-bpm;;;2;;bpm_2020-08-01_2 +339;Testuser-bpm;;;2;;bpm_2020-08-01_2 +340;Testuser-bpm;;;2;;bpm_2020-08-01_2 +341;Testuser-bpm;;;2;;bpm_2020-08-01_2 +342;Testuser-bpm;;;2;;bpm_2020-08-01_2 +343;Testuser-bpm;;;2;;bpm_2020-08-01_2 +344;Testuser-bpm;;;2;;bpm_2020-08-01_2 +345;Testuser-bpm;;;2;;bpm_2020-08-01_2 +346;Testuser-bpm;;;2;;bpm_2020-08-01_2 +347;Testuser-bpm;;;2;;bpm_2020-08-01_2 +348;Testuser-bpm;;;2;;bpm_2020-08-01_2 +349;Testuser-bpm;;;2;;bpm_2020-08-01_2 +350;Testuser-bpm;;;2;;bpm_2020-08-01_2 +351;Testuser-bpm;;;2;;bpm_2020-08-01_2 +352;Testuser-bpm;;;2;;bpm_2020-08-01_2 +353;Testuser-bpm;;;2;;bpm_2020-08-01_2 +354;Testuser-bpm;;;2;;bpm_2020-08-01_2 +355;Testuser-bpm;;;2;;bpm_2020-08-01_2 +356;Testuser-bpm;;;2;;bpm_2020-08-01_2 +357;Testuser-bpm;;;2;;bpm_2020-08-01_2 +358;Testuser-bpm;;;2;;bpm_2020-08-01_2 +359;Testuser-bpm;;;2;;bpm_2020-08-01_2 +360;Testuser-bpm;;;2;;bpm_2020-08-01_2 +361;Testuser-bpm;;;2;;bpm_2020-08-01_2 +362;Testuser-bpm;;;2;;bpm_2020-08-01_2 +363;Testuser-bpm;;;2;;bpm_2020-08-01_2 +364;Testuser-bpm;;;2;;bpm_2020-08-01_2 +365;Testuser-bpm;;;2;;bpm_2020-08-01_2 +366;Testuser-bpm;;;2;;bpm_2020-08-01_2 +367;Testuser-bpm;;;2;;bpm_2020-08-01_2 +368;Testuser-bpm;;;2;;bpm_2020-08-01_2 +369;Testuser-bpm;;;2;;bpm_2020-08-01_2 +370;Testuser-bpm;;;2;;bpm_2020-08-01_2 +371;Testuser-bpm;;;2;;bpm_2020-08-01_2 +372;Testuser-bpm;;;2;;bpm_2020-08-01_2 +373;Testuser-bpm;;;2;;bpm_2020-08-01_2 +374;Testuser-bpm;;;2;;bpm_2020-08-01_2 +375;Testuser-bpm;;;2;;bpm_2020-08-01_2 +376;Testuser-bpm;;;2;;bpm_2020-08-01_2 +377;Testuser-bpm;;;2;;bpm_2020-08-01_2 +378;Testuser-bpm;;;2;;bpm_2020-08-01_2 +379;Testuser-bpm;;;2;;bpm_2020-08-01_2 +380;Testuser-bpm;;;2;;bpm_2020-08-01_2 +381;Testuser-bpm;;;2;;bpm_2020-08-01_2 +382;Testuser-bpm;;;2;;bpm_2020-08-01_2 +383;Testuser-bpm;;;2;;bpm_2020-08-01_2 +384;Testuser-bpm;;;2;;bpm_2020-08-01_2 +385;Testuser-bpm;;;2;;bpm_2020-08-01_2 +386;Testuser-bpm;;;2;;bpm_2020-08-01_2 +387;Testuser-bpm;;;2;;bpm_2020-08-01_2 +388;Testuser-bpm;;;2;;bpm_2020-08-01_2 +389;Testuser-bpm;;;2;;bpm_2020-08-01_2 +390;Testuser-bpm;;;2;;bpm_2020-08-01_2 +391;Testuser-bpm;;;2;;bpm_2020-08-01_2 +392;Testuser-bpm;;;2;;bpm_2020-08-01_2 +393;Testuser-bpm;;;2;;bpm_2020-08-01_2 +394;Testuser-bpm;;;2;;bpm_2020-08-01_2 +395;Testuser-bpm;;;2;;bpm_2020-08-01_2 +396;Testuser-bpm;;;2;;bpm_2020-08-01_2 +397;Testuser-bpm;;;2;;bpm_2020-08-01_2 +398;Testuser-bpm;;;2;;bpm_2020-08-01_2 +399;Testuser-bpm;;;2;;bpm_2020-08-01_2 +400;Testuser-bpm;;;2;;bpm_2020-08-01_2 +401;Testuser-bpm;;;2;;bpm_2020-08-01_2 +402;Testuser-bpm;;;2;;bpm_2020-08-01_2 +403;Testuser-bpm;;;2;;bpm_2020-08-01_2 +404;Testuser-bpm;;;2;;bpm_2020-08-01_2 +405;Testuser-bpm;;;2;;bpm_2020-08-01_2 +406;Testuser-bpm;;;2;;bpm_2020-08-01_2 +407;Testuser-bpm;;;2;;bpm_2020-08-01_2 +408;Testuser-bpm;;;2;;bpm_2020-08-01_2 +409;Testuser-bpm;;;2;;bpm_2020-08-01_2 +410;Testuser-bpm;;;2;;bpm_2020-08-01_2 +411;Testuser-bpm;;;2;;bpm_2020-08-01_2 +412;Testuser-bpm;;;2;;bpm_2020-08-01_2 +413;Testuser-bpm;;;2;;bpm_2020-08-01_2 +414;Testuser-bpm;;;2;;bpm_2020-08-01_2 +415;Testuser-bpm;;;2;;bpm_2020-08-01_2 +416;Testuser-bpm;;;2;;bpm_2020-08-01_2 +417;Testuser-bpm;;;2;;bpm_2020-08-01_2 +418;Testuser-bpm;;;2;;bpm_2020-08-01_2 +419;Testuser-bpm;;;2;;bpm_2020-08-01_2 +420;Testuser-bpm;;;2;;bpm_2020-08-01_2 +421;Testuser-bpm;;;2;;bpm_2020-08-01_2 +422;Testuser-bpm;;;2;;bpm_2020-08-01_2 +423;Testuser-bpm;;;2;;bpm_2020-08-01_2 +424;Testuser-bpm;;;2;;bpm_2020-08-01_2 +425;Testuser-bpm;;;2;;bpm_2020-08-01_2 +426;Testuser-bpm;;;2;;bpm_2020-08-01_2 +427;Testuser-bpm;;;2;;bpm_2020-08-01_2 +428;Testuser-bpm;;;2;;bpm_2020-08-01_2 +429;Testuser-bpm;;;2;;bpm_2020-08-01_2 +430;Testuser-bpm;;;2;;bpm_2020-08-01_2 +431;Testuser-bpm;;;2;;bpm_2020-08-01_2 +432;Testuser-bpm;;;2;;bpm_2020-08-01_2 +433;Testuser-bpm;;;2;;bpm_2020-08-01_2 +434;Testuser-bpm;;;2;;bpm_2020-08-01_2 +435;Testuser-bpm;;;2;;bpm_2020-08-01_2 +436;Testuser-bpm;;;2;;bpm_2020-08-01_2 +437;Testuser-bpm;;;2;;bpm_2020-08-01_2 +438;Testuser-bpm;;;2;;bpm_2020-08-01_2 +439;Testuser-bpm;;;2;;bpm_2020-08-01_2 +440;Testuser-bpm;;;2;;bpm_2020-08-01_2 +441;Testuser-bpm;;;2;;bpm_2020-08-01_2 +442;Testuser-bpm;;;2;;bpm_2020-08-01_2 +443;Testuser-bpm;;;2;;bpm_2020-08-01_2 +444;Testuser-bpm;;;2;;bpm_2020-08-01_2 +445;Testuser-bpm;;;2;;bpm_2020-08-01_2 +446;Testuser-bpm;;;2;;bpm_2020-08-01_2 +447;Testuser-bpm;;;2;;bpm_2020-08-01_2 +448;Testuser-bpm;;;2;;bpm_2020-08-01_2 +449;Testuser-bpm;;;2;;bpm_2020-08-01_2 +450;Testuser-bpm;;;2;;bpm_2020-08-01_2 +451;Testuser-bpm;;;2;;bpm_2020-08-01_2 +452;Testuser-bpm;;;2;;bpm_2020-08-01_2 +453;Testuser-bpm;;;2;;bpm_2020-08-01_2 +454;Testuser-bpm;;;2;;bpm_2020-08-01_2 +455;Testuser-bpm;;;2;;bpm_2020-08-01_2 +456;Testuser-bpm;;;2;;bpm_2020-08-01_2 +457;Testuser-bpm;;;2;;bpm_2020-08-01_2 +458;Testuser-bpm;;;2;;bpm_2020-08-01_2 +459;Testuser-bpm;;;2;;bpm_2020-08-01_2 +460;Testuser-bpm;;;2;;bpm_2020-08-01_2 +461;Testuser-bpm;;;2;;bpm_2020-08-01_2 +462;Testuser-bpm;;;2;;bpm_2020-08-01_2 +463;Testuser-bpm;;;2;;bpm_2020-08-01_2 +464;Testuser-bpm;;;2;;bpm_2020-08-01_2 +465;Testuser-bpm;;;2;;bpm_2020-08-01_2 +466;Testuser-bpm;;;2;;bpm_2020-08-01_2 +467;Testuser-bpm;;;2;;bpm_2020-08-01_2 +468;Testuser-bpm;;;2;;bpm_2020-08-01_2 +469;Testuser-bpm;;;2;;bpm_2020-08-01_2 +470;Testuser-bpm;;;2;;bpm_2020-08-01_2 +471;Testuser-bpm;;;2;;bpm_2020-08-01_2 +472;Testuser-bpm;;;2;;bpm_2020-08-01_2 +473;Testuser-bpm;;;2;;bpm_2020-08-01_2 +474;Testuser-bpm;;;2;;bpm_2020-08-01_2 +475;Testuser-bpm;;;2;;bpm_2020-08-01_2 +476;Testuser-bpm;;;2;;bpm_2020-08-01_2 +477;Testuser-bpm;;;2;;bpm_2020-08-01_2 +478;Testuser-bpm;;;2;;bpm_2020-08-01_2 +479;Testuser-bpm;;;2;;bpm_2020-08-01_2 +480;Testuser-bpm;;;2;;bpm_2020-08-01_2 +481;Testuser-bpm;;;2;;bpm_2020-08-01_2 +482;Testuser-bpm;;;2;;bpm_2020-08-01_2 +483;Testuser-bpm;;;2;;bpm_2020-08-01_2 +484;Testuser-bpm;;;2;;bpm_2020-08-01_2 +485;Testuser-bpm;;;2;;bpm_2020-08-01_2 +486;Testuser-bpm;;;2;;bpm_2020-08-01_2 +487;Testuser-bpm;;;2;;bpm_2020-08-01_2 +488;Testuser-bpm;;;2;;bpm_2020-08-01_2 +489;Testuser-bpm;;;2;;bpm_2020-08-01_2 +490;Testuser-bpm;;;2;;bpm_2020-08-01_2 +491;Testuser-bpm;;;2;;bpm_2020-08-01_2 +492;Testuser-bpm;;;2;;bpm_2020-08-01_2 +493;Testuser-bpm;;;2;;bpm_2020-08-01_2 +494;Testuser-bpm;;;2;;bpm_2020-08-01_2 +495;Testuser-bpm;;;2;;bpm_2020-08-01_2 +496;Testuser-bpm;;;2;;bpm_2020-08-01_2 +497;Testuser-bpm;;;2;;bpm_2020-08-01_2 +498;Testuser-bpm;;;2;;bpm_2020-08-01_2 +499;Testuser-bpm;;;2;;bpm_2020-08-01_2 +500;Testuser-bpm;;;2;;bpm_2020-08-01_2 diff --git a/++ Dokumente/TANs/tan3.csv b/++ Dokumente/TANs/tan3.csv new file mode 100755 index 0000000..9c02cb7 --- /dev/null +++ b/++ Dokumente/TANs/tan3.csv @@ -0,0 +1,250 @@ +501;Testuser-bpm;;;2;;bpm_2020-08-01_3 +502;Testuser-bpm;;;2;;bpm_2020-08-01_3 +503;Testuser-bpm;;;2;;bpm_2020-08-01_3 +504;Testuser-bpm;;;2;;bpm_2020-08-01_3 +505;Testuser-bpm;;;2;;bpm_2020-08-01_3 +506;Testuser-bpm;;;2;;bpm_2020-08-01_3 +507;Testuser-bpm;;;2;;bpm_2020-08-01_3 +508;Testuser-bpm;;;2;;bpm_2020-08-01_3 +509;Testuser-bpm;;;2;;bpm_2020-08-01_3 +510;Testuser-bpm;;;2;;bpm_2020-08-01_3 +511;Testuser-bpm;;;2;;bpm_2020-08-01_3 +512;Testuser-bpm;;;2;;bpm_2020-08-01_3 +513;Testuser-bpm;;;2;;bpm_2020-08-01_3 +514;Testuser-bpm;;;2;;bpm_2020-08-01_3 +515;Testuser-bpm;;;2;;bpm_2020-08-01_3 +516;Testuser-bpm;;;2;;bpm_2020-08-01_3 +517;Testuser-bpm;;;2;;bpm_2020-08-01_3 +518;Testuser-bpm;;;2;;bpm_2020-08-01_3 +519;Testuser-bpm;;;2;;bpm_2020-08-01_3 +520;Testuser-bpm;;;2;;bpm_2020-08-01_3 +521;Testuser-bpm;;;2;;bpm_2020-08-01_3 +522;Testuser-bpm;;;2;;bpm_2020-08-01_3 +523;Testuser-bpm;;;2;;bpm_2020-08-01_3 +524;Testuser-bpm;;;2;;bpm_2020-08-01_3 +525;Testuser-bpm;;;2;;bpm_2020-08-01_3 +526;Testuser-bpm;;;2;;bpm_2020-08-01_3 +527;Testuser-bpm;;;2;;bpm_2020-08-01_3 +528;Testuser-bpm;;;2;;bpm_2020-08-01_3 +529;Testuser-bpm;;;2;;bpm_2020-08-01_3 +530;Testuser-bpm;;;2;;bpm_2020-08-01_3 +531;Testuser-bpm;;;2;;bpm_2020-08-01_3 +532;Testuser-bpm;;;2;;bpm_2020-08-01_3 +533;Testuser-bpm;;;2;;bpm_2020-08-01_3 +534;Testuser-bpm;;;2;;bpm_2020-08-01_3 +535;Testuser-bpm;;;2;;bpm_2020-08-01_3 +536;Testuser-bpm;;;2;;bpm_2020-08-01_3 +537;Testuser-bpm;;;2;;bpm_2020-08-01_3 +538;Testuser-bpm;;;2;;bpm_2020-08-01_3 +539;Testuser-bpm;;;2;;bpm_2020-08-01_3 +540;Testuser-bpm;;;2;;bpm_2020-08-01_3 +541;Testuser-bpm;;;2;;bpm_2020-08-01_3 +542;Testuser-bpm;;;2;;bpm_2020-08-01_3 +543;Testuser-bpm;;;2;;bpm_2020-08-01_3 +544;Testuser-bpm;;;2;;bpm_2020-08-01_3 +545;Testuser-bpm;;;2;;bpm_2020-08-01_3 +546;Testuser-bpm;;;2;;bpm_2020-08-01_3 +547;Testuser-bpm;;;2;;bpm_2020-08-01_3 +548;Testuser-bpm;;;2;;bpm_2020-08-01_3 +549;Testuser-bpm;;;2;;bpm_2020-08-01_3 +550;Testuser-bpm;;;2;;bpm_2020-08-01_3 +551;Testuser-bpm;;;2;;bpm_2020-08-01_3 +552;Testuser-bpm;;;2;;bpm_2020-08-01_3 +553;Testuser-bpm;;;2;;bpm_2020-08-01_3 +554;Testuser-bpm;;;2;;bpm_2020-08-01_3 +555;Testuser-bpm;;;2;;bpm_2020-08-01_3 +556;Testuser-bpm;;;2;;bpm_2020-08-01_3 +557;Testuser-bpm;;;2;;bpm_2020-08-01_3 +558;Testuser-bpm;;;2;;bpm_2020-08-01_3 +559;Testuser-bpm;;;2;;bpm_2020-08-01_3 +560;Testuser-bpm;;;2;;bpm_2020-08-01_3 +561;Testuser-bpm;;;2;;bpm_2020-08-01_3 +562;Testuser-bpm;;;2;;bpm_2020-08-01_3 +563;Testuser-bpm;;;2;;bpm_2020-08-01_3 +564;Testuser-bpm;;;2;;bpm_2020-08-01_3 +565;Testuser-bpm;;;2;;bpm_2020-08-01_3 +566;Testuser-bpm;;;2;;bpm_2020-08-01_3 +567;Testuser-bpm;;;2;;bpm_2020-08-01_3 +568;Testuser-bpm;;;2;;bpm_2020-08-01_3 +569;Testuser-bpm;;;2;;bpm_2020-08-01_3 +570;Testuser-bpm;;;2;;bpm_2020-08-01_3 +571;Testuser-bpm;;;2;;bpm_2020-08-01_3 +572;Testuser-bpm;;;2;;bpm_2020-08-01_3 +573;Testuser-bpm;;;2;;bpm_2020-08-01_3 +574;Testuser-bpm;;;2;;bpm_2020-08-01_3 +575;Testuser-bpm;;;2;;bpm_2020-08-01_3 +576;Testuser-bpm;;;2;;bpm_2020-08-01_3 +577;Testuser-bpm;;;2;;bpm_2020-08-01_3 +578;Testuser-bpm;;;2;;bpm_2020-08-01_3 +579;Testuser-bpm;;;2;;bpm_2020-08-01_3 +580;Testuser-bpm;;;2;;bpm_2020-08-01_3 +581;Testuser-bpm;;;2;;bpm_2020-08-01_3 +582;Testuser-bpm;;;2;;bpm_2020-08-01_3 +583;Testuser-bpm;;;2;;bpm_2020-08-01_3 +584;Testuser-bpm;;;2;;bpm_2020-08-01_3 +585;Testuser-bpm;;;2;;bpm_2020-08-01_3 +586;Testuser-bpm;;;2;;bpm_2020-08-01_3 +587;Testuser-bpm;;;2;;bpm_2020-08-01_3 +588;Testuser-bpm;;;2;;bpm_2020-08-01_3 +589;Testuser-bpm;;;2;;bpm_2020-08-01_3 +590;Testuser-bpm;;;2;;bpm_2020-08-01_3 +591;Testuser-bpm;;;2;;bpm_2020-08-01_3 +592;Testuser-bpm;;;2;;bpm_2020-08-01_3 +593;Testuser-bpm;;;2;;bpm_2020-08-01_3 +594;Testuser-bpm;;;2;;bpm_2020-08-01_3 +595;Testuser-bpm;;;2;;bpm_2020-08-01_3 +596;Testuser-bpm;;;2;;bpm_2020-08-01_3 +597;Testuser-bpm;;;2;;bpm_2020-08-01_3 +598;Testuser-bpm;;;2;;bpm_2020-08-01_3 +599;Testuser-bpm;;;2;;bpm_2020-08-01_3 +600;Testuser-bpm;;;2;;bpm_2020-08-01_3 +601;Testuser-bpm;;;2;;bpm_2020-08-01_3 +602;Testuser-bpm;;;2;;bpm_2020-08-01_3 +603;Testuser-bpm;;;2;;bpm_2020-08-01_3 +604;Testuser-bpm;;;2;;bpm_2020-08-01_3 +605;Testuser-bpm;;;2;;bpm_2020-08-01_3 +606;Testuser-bpm;;;2;;bpm_2020-08-01_3 +607;Testuser-bpm;;;2;;bpm_2020-08-01_3 +608;Testuser-bpm;;;2;;bpm_2020-08-01_3 +609;Testuser-bpm;;;2;;bpm_2020-08-01_3 +610;Testuser-bpm;;;2;;bpm_2020-08-01_3 +611;Testuser-bpm;;;2;;bpm_2020-08-01_3 +612;Testuser-bpm;;;2;;bpm_2020-08-01_3 +613;Testuser-bpm;;;2;;bpm_2020-08-01_3 +614;Testuser-bpm;;;2;;bpm_2020-08-01_3 +615;Testuser-bpm;;;2;;bpm_2020-08-01_3 +616;Testuser-bpm;;;2;;bpm_2020-08-01_3 +617;Testuser-bpm;;;2;;bpm_2020-08-01_3 +618;Testuser-bpm;;;2;;bpm_2020-08-01_3 +619;Testuser-bpm;;;2;;bpm_2020-08-01_3 +620;Testuser-bpm;;;2;;bpm_2020-08-01_3 +621;Testuser-bpm;;;2;;bpm_2020-08-01_3 +622;Testuser-bpm;;;2;;bpm_2020-08-01_3 +623;Testuser-bpm;;;2;;bpm_2020-08-01_3 +624;Testuser-bpm;;;2;;bpm_2020-08-01_3 +625;Testuser-bpm;;;2;;bpm_2020-08-01_3 +626;Testuser-bpm;;;2;;bpm_2020-08-01_3 +627;Testuser-bpm;;;2;;bpm_2020-08-01_3 +628;Testuser-bpm;;;2;;bpm_2020-08-01_3 +629;Testuser-bpm;;;2;;bpm_2020-08-01_3 +630;Testuser-bpm;;;2;;bpm_2020-08-01_3 +631;Testuser-bpm;;;2;;bpm_2020-08-01_3 +632;Testuser-bpm;;;2;;bpm_2020-08-01_3 +633;Testuser-bpm;;;2;;bpm_2020-08-01_3 +634;Testuser-bpm;;;2;;bpm_2020-08-01_3 +635;Testuser-bpm;;;2;;bpm_2020-08-01_3 +636;Testuser-bpm;;;2;;bpm_2020-08-01_3 +637;Testuser-bpm;;;2;;bpm_2020-08-01_3 +638;Testuser-bpm;;;2;;bpm_2020-08-01_3 +639;Testuser-bpm;;;2;;bpm_2020-08-01_3 +640;Testuser-bpm;;;2;;bpm_2020-08-01_3 +641;Testuser-bpm;;;2;;bpm_2020-08-01_3 +642;Testuser-bpm;;;2;;bpm_2020-08-01_3 +643;Testuser-bpm;;;2;;bpm_2020-08-01_3 +644;Testuser-bpm;;;2;;bpm_2020-08-01_3 +645;Testuser-bpm;;;2;;bpm_2020-08-01_3 +646;Testuser-bpm;;;2;;bpm_2020-08-01_3 +647;Testuser-bpm;;;2;;bpm_2020-08-01_3 +648;Testuser-bpm;;;2;;bpm_2020-08-01_3 +649;Testuser-bpm;;;2;;bpm_2020-08-01_3 +650;Testuser-bpm;;;2;;bpm_2020-08-01_3 +651;Testuser-bpm;;;2;;bpm_2020-08-01_3 +652;Testuser-bpm;;;2;;bpm_2020-08-01_3 +653;Testuser-bpm;;;2;;bpm_2020-08-01_3 +654;Testuser-bpm;;;2;;bpm_2020-08-01_3 +655;Testuser-bpm;;;2;;bpm_2020-08-01_3 +656;Testuser-bpm;;;2;;bpm_2020-08-01_3 +657;Testuser-bpm;;;2;;bpm_2020-08-01_3 +658;Testuser-bpm;;;2;;bpm_2020-08-01_3 +659;Testuser-bpm;;;2;;bpm_2020-08-01_3 +660;Testuser-bpm;;;2;;bpm_2020-08-01_3 +661;Testuser-bpm;;;2;;bpm_2020-08-01_3 +662;Testuser-bpm;;;2;;bpm_2020-08-01_3 +663;Testuser-bpm;;;2;;bpm_2020-08-01_3 +664;Testuser-bpm;;;2;;bpm_2020-08-01_3 +665;Testuser-bpm;;;2;;bpm_2020-08-01_3 +666;Testuser-bpm;;;2;;bpm_2020-08-01_3 +667;Testuser-bpm;;;2;;bpm_2020-08-01_3 +668;Testuser-bpm;;;2;;bpm_2020-08-01_3 +669;Testuser-bpm;;;2;;bpm_2020-08-01_3 +670;Testuser-bpm;;;2;;bpm_2020-08-01_3 +671;Testuser-bpm;;;2;;bpm_2020-08-01_3 +672;Testuser-bpm;;;2;;bpm_2020-08-01_3 +673;Testuser-bpm;;;2;;bpm_2020-08-01_3 +674;Testuser-bpm;;;2;;bpm_2020-08-01_3 +675;Testuser-bpm;;;2;;bpm_2020-08-01_3 +676;Testuser-bpm;;;2;;bpm_2020-08-01_3 +677;Testuser-bpm;;;2;;bpm_2020-08-01_3 +678;Testuser-bpm;;;2;;bpm_2020-08-01_3 +679;Testuser-bpm;;;2;;bpm_2020-08-01_3 +680;Testuser-bpm;;;2;;bpm_2020-08-01_3 +681;Testuser-bpm;;;2;;bpm_2020-08-01_3 +682;Testuser-bpm;;;2;;bpm_2020-08-01_3 +683;Testuser-bpm;;;2;;bpm_2020-08-01_3 +684;Testuser-bpm;;;2;;bpm_2020-08-01_3 +685;Testuser-bpm;;;2;;bpm_2020-08-01_3 +686;Testuser-bpm;;;2;;bpm_2020-08-01_3 +687;Testuser-bpm;;;2;;bpm_2020-08-01_3 +688;Testuser-bpm;;;2;;bpm_2020-08-01_3 +689;Testuser-bpm;;;2;;bpm_2020-08-01_3 +690;Testuser-bpm;;;2;;bpm_2020-08-01_3 +691;Testuser-bpm;;;2;;bpm_2020-08-01_3 +692;Testuser-bpm;;;2;;bpm_2020-08-01_3 +693;Testuser-bpm;;;2;;bpm_2020-08-01_3 +694;Testuser-bpm;;;2;;bpm_2020-08-01_3 +695;Testuser-bpm;;;2;;bpm_2020-08-01_3 +696;Testuser-bpm;;;2;;bpm_2020-08-01_3 +697;Testuser-bpm;;;2;;bpm_2020-08-01_3 +698;Testuser-bpm;;;2;;bpm_2020-08-01_3 +699;Testuser-bpm;;;2;;bpm_2020-08-01_3 +700;Testuser-bpm;;;2;;bpm_2020-08-01_3 +701;Testuser-bpm;;;2;;bpm_2020-08-01_3 +702;Testuser-bpm;;;2;;bpm_2020-08-01_3 +703;Testuser-bpm;;;2;;bpm_2020-08-01_3 +704;Testuser-bpm;;;2;;bpm_2020-08-01_3 +705;Testuser-bpm;;;2;;bpm_2020-08-01_3 +706;Testuser-bpm;;;2;;bpm_2020-08-01_3 +707;Testuser-bpm;;;2;;bpm_2020-08-01_3 +708;Testuser-bpm;;;2;;bpm_2020-08-01_3 +709;Testuser-bpm;;;2;;bpm_2020-08-01_3 +710;Testuser-bpm;;;2;;bpm_2020-08-01_3 +711;Testuser-bpm;;;2;;bpm_2020-08-01_3 +712;Testuser-bpm;;;2;;bpm_2020-08-01_3 +713;Testuser-bpm;;;2;;bpm_2020-08-01_3 +714;Testuser-bpm;;;2;;bpm_2020-08-01_3 +715;Testuser-bpm;;;2;;bpm_2020-08-01_3 +716;Testuser-bpm;;;2;;bpm_2020-08-01_3 +717;Testuser-bpm;;;2;;bpm_2020-08-01_3 +718;Testuser-bpm;;;2;;bpm_2020-08-01_3 +719;Testuser-bpm;;;2;;bpm_2020-08-01_3 +720;Testuser-bpm;;;2;;bpm_2020-08-01_3 +721;Testuser-bpm;;;2;;bpm_2020-08-01_3 +722;Testuser-bpm;;;2;;bpm_2020-08-01_3 +723;Testuser-bpm;;;2;;bpm_2020-08-01_3 +724;Testuser-bpm;;;2;;bpm_2020-08-01_3 +725;Testuser-bpm;;;2;;bpm_2020-08-01_3 +726;Testuser-bpm;;;2;;bpm_2020-08-01_3 +727;Testuser-bpm;;;2;;bpm_2020-08-01_3 +728;Testuser-bpm;;;2;;bpm_2020-08-01_3 +729;Testuser-bpm;;;2;;bpm_2020-08-01_3 +730;Testuser-bpm;;;2;;bpm_2020-08-01_3 +731;Testuser-bpm;;;2;;bpm_2020-08-01_3 +732;Testuser-bpm;;;2;;bpm_2020-08-01_3 +733;Testuser-bpm;;;2;;bpm_2020-08-01_3 +734;Testuser-bpm;;;2;;bpm_2020-08-01_3 +735;Testuser-bpm;;;2;;bpm_2020-08-01_3 +736;Testuser-bpm;;;2;;bpm_2020-08-01_3 +737;Testuser-bpm;;;2;;bpm_2020-08-01_3 +738;Testuser-bpm;;;2;;bpm_2020-08-01_3 +739;Testuser-bpm;;;2;;bpm_2020-08-01_3 +740;Testuser-bpm;;;2;;bpm_2020-08-01_3 +741;Testuser-bpm;;;2;;bpm_2020-08-01_3 +742;Testuser-bpm;;;2;;bpm_2020-08-01_3 +743;Testuser-bpm;;;2;;bpm_2020-08-01_3 +744;Testuser-bpm;;;2;;bpm_2020-08-01_3 +745;Testuser-bpm;;;2;;bpm_2020-08-01_3 +746;Testuser-bpm;;;2;;bpm_2020-08-01_3 +747;Testuser-bpm;;;2;;bpm_2020-08-01_3 +748;Testuser-bpm;;;2;;bpm_2020-08-01_3 +749;Testuser-bpm;;;2;;bpm_2020-08-01_3 +750;Testuser-bpm;;;2;;bpm_2020-08-01_3 diff --git a/++ Dokumente/TANs/tan4.csv b/++ Dokumente/TANs/tan4.csv new file mode 100755 index 0000000..a502d52 --- /dev/null +++ b/++ Dokumente/TANs/tan4.csv @@ -0,0 +1,250 @@ +751;Testuser-bpm;;;2;;bpm_2020-08-01_4 +752;Testuser-bpm;;;2;;bpm_2020-08-01_4 +753;Testuser-bpm;;;2;;bpm_2020-08-01_4 +754;Testuser-bpm;;;2;;bpm_2020-08-01_4 +755;Testuser-bpm;;;2;;bpm_2020-08-01_4 +756;Testuser-bpm;;;2;;bpm_2020-08-01_4 +757;Testuser-bpm;;;2;;bpm_2020-08-01_4 +758;Testuser-bpm;;;2;;bpm_2020-08-01_4 +759;Testuser-bpm;;;2;;bpm_2020-08-01_4 +760;Testuser-bpm;;;2;;bpm_2020-08-01_4 +761;Testuser-bpm;;;2;;bpm_2020-08-01_4 +762;Testuser-bpm;;;2;;bpm_2020-08-01_4 +763;Testuser-bpm;;;2;;bpm_2020-08-01_4 +764;Testuser-bpm;;;2;;bpm_2020-08-01_4 +765;Testuser-bpm;;;2;;bpm_2020-08-01_4 +766;Testuser-bpm;;;2;;bpm_2020-08-01_4 +767;Testuser-bpm;;;2;;bpm_2020-08-01_4 +768;Testuser-bpm;;;2;;bpm_2020-08-01_4 +769;Testuser-bpm;;;2;;bpm_2020-08-01_4 +770;Testuser-bpm;;;2;;bpm_2020-08-01_4 +771;Testuser-bpm;;;2;;bpm_2020-08-01_4 +772;Testuser-bpm;;;2;;bpm_2020-08-01_4 +773;Testuser-bpm;;;2;;bpm_2020-08-01_4 +774;Testuser-bpm;;;2;;bpm_2020-08-01_4 +775;Testuser-bpm;;;2;;bpm_2020-08-01_4 +776;Testuser-bpm;;;2;;bpm_2020-08-01_4 +777;Testuser-bpm;;;2;;bpm_2020-08-01_4 +778;Testuser-bpm;;;2;;bpm_2020-08-01_4 +779;Testuser-bpm;;;2;;bpm_2020-08-01_4 +780;Testuser-bpm;;;2;;bpm_2020-08-01_4 +781;Testuser-bpm;;;2;;bpm_2020-08-01_4 +782;Testuser-bpm;;;2;;bpm_2020-08-01_4 +783;Testuser-bpm;;;2;;bpm_2020-08-01_4 +784;Testuser-bpm;;;2;;bpm_2020-08-01_4 +785;Testuser-bpm;;;2;;bpm_2020-08-01_4 +786;Testuser-bpm;;;2;;bpm_2020-08-01_4 +787;Testuser-bpm;;;2;;bpm_2020-08-01_4 +788;Testuser-bpm;;;2;;bpm_2020-08-01_4 +789;Testuser-bpm;;;2;;bpm_2020-08-01_4 +790;Testuser-bpm;;;2;;bpm_2020-08-01_4 +791;Testuser-bpm;;;2;;bpm_2020-08-01_4 +792;Testuser-bpm;;;2;;bpm_2020-08-01_4 +793;Testuser-bpm;;;2;;bpm_2020-08-01_4 +794;Testuser-bpm;;;2;;bpm_2020-08-01_4 +795;Testuser-bpm;;;2;;bpm_2020-08-01_4 +796;Testuser-bpm;;;2;;bpm_2020-08-01_4 +797;Testuser-bpm;;;2;;bpm_2020-08-01_4 +798;Testuser-bpm;;;2;;bpm_2020-08-01_4 +799;Testuser-bpm;;;2;;bpm_2020-08-01_4 +800;Testuser-bpm;;;2;;bpm_2020-08-01_4 +801;Testuser-bpm;;;2;;bpm_2020-08-01_4 +802;Testuser-bpm;;;2;;bpm_2020-08-01_4 +803;Testuser-bpm;;;2;;bpm_2020-08-01_4 +804;Testuser-bpm;;;2;;bpm_2020-08-01_4 +805;Testuser-bpm;;;2;;bpm_2020-08-01_4 +806;Testuser-bpm;;;2;;bpm_2020-08-01_4 +807;Testuser-bpm;;;2;;bpm_2020-08-01_4 +808;Testuser-bpm;;;2;;bpm_2020-08-01_4 +809;Testuser-bpm;;;2;;bpm_2020-08-01_4 +810;Testuser-bpm;;;2;;bpm_2020-08-01_4 +811;Testuser-bpm;;;2;;bpm_2020-08-01_4 +812;Testuser-bpm;;;2;;bpm_2020-08-01_4 +813;Testuser-bpm;;;2;;bpm_2020-08-01_4 +814;Testuser-bpm;;;2;;bpm_2020-08-01_4 +815;Testuser-bpm;;;2;;bpm_2020-08-01_4 +816;Testuser-bpm;;;2;;bpm_2020-08-01_4 +817;Testuser-bpm;;;2;;bpm_2020-08-01_4 +818;Testuser-bpm;;;2;;bpm_2020-08-01_4 +819;Testuser-bpm;;;2;;bpm_2020-08-01_4 +820;Testuser-bpm;;;2;;bpm_2020-08-01_4 +821;Testuser-bpm;;;2;;bpm_2020-08-01_4 +822;Testuser-bpm;;;2;;bpm_2020-08-01_4 +823;Testuser-bpm;;;2;;bpm_2020-08-01_4 +824;Testuser-bpm;;;2;;bpm_2020-08-01_4 +825;Testuser-bpm;;;2;;bpm_2020-08-01_4 +826;Testuser-bpm;;;2;;bpm_2020-08-01_4 +827;Testuser-bpm;;;2;;bpm_2020-08-01_4 +828;Testuser-bpm;;;2;;bpm_2020-08-01_4 +829;Testuser-bpm;;;2;;bpm_2020-08-01_4 +830;Testuser-bpm;;;2;;bpm_2020-08-01_4 +831;Testuser-bpm;;;2;;bpm_2020-08-01_4 +832;Testuser-bpm;;;2;;bpm_2020-08-01_4 +833;Testuser-bpm;;;2;;bpm_2020-08-01_4 +834;Testuser-bpm;;;2;;bpm_2020-08-01_4 +835;Testuser-bpm;;;2;;bpm_2020-08-01_4 +836;Testuser-bpm;;;2;;bpm_2020-08-01_4 +837;Testuser-bpm;;;2;;bpm_2020-08-01_4 +838;Testuser-bpm;;;2;;bpm_2020-08-01_4 +839;Testuser-bpm;;;2;;bpm_2020-08-01_4 +840;Testuser-bpm;;;2;;bpm_2020-08-01_4 +841;Testuser-bpm;;;2;;bpm_2020-08-01_4 +842;Testuser-bpm;;;2;;bpm_2020-08-01_4 +843;Testuser-bpm;;;2;;bpm_2020-08-01_4 +844;Testuser-bpm;;;2;;bpm_2020-08-01_4 +845;Testuser-bpm;;;2;;bpm_2020-08-01_4 +846;Testuser-bpm;;;2;;bpm_2020-08-01_4 +847;Testuser-bpm;;;2;;bpm_2020-08-01_4 +848;Testuser-bpm;;;2;;bpm_2020-08-01_4 +849;Testuser-bpm;;;2;;bpm_2020-08-01_4 +850;Testuser-bpm;;;2;;bpm_2020-08-01_4 +851;Testuser-bpm;;;2;;bpm_2020-08-01_4 +852;Testuser-bpm;;;2;;bpm_2020-08-01_4 +853;Testuser-bpm;;;2;;bpm_2020-08-01_4 +854;Testuser-bpm;;;2;;bpm_2020-08-01_4 +855;Testuser-bpm;;;2;;bpm_2020-08-01_4 +856;Testuser-bpm;;;2;;bpm_2020-08-01_4 +857;Testuser-bpm;;;2;;bpm_2020-08-01_4 +858;Testuser-bpm;;;2;;bpm_2020-08-01_4 +859;Testuser-bpm;;;2;;bpm_2020-08-01_4 +860;Testuser-bpm;;;2;;bpm_2020-08-01_4 +861;Testuser-bpm;;;2;;bpm_2020-08-01_4 +862;Testuser-bpm;;;2;;bpm_2020-08-01_4 +863;Testuser-bpm;;;2;;bpm_2020-08-01_4 +864;Testuser-bpm;;;2;;bpm_2020-08-01_4 +865;Testuser-bpm;;;2;;bpm_2020-08-01_4 +866;Testuser-bpm;;;2;;bpm_2020-08-01_4 +867;Testuser-bpm;;;2;;bpm_2020-08-01_4 +868;Testuser-bpm;;;2;;bpm_2020-08-01_4 +869;Testuser-bpm;;;2;;bpm_2020-08-01_4 +870;Testuser-bpm;;;2;;bpm_2020-08-01_4 +871;Testuser-bpm;;;2;;bpm_2020-08-01_4 +872;Testuser-bpm;;;2;;bpm_2020-08-01_4 +873;Testuser-bpm;;;2;;bpm_2020-08-01_4 +874;Testuser-bpm;;;2;;bpm_2020-08-01_4 +875;Testuser-bpm;;;2;;bpm_2020-08-01_4 +876;Testuser-bpm;;;2;;bpm_2020-08-01_4 +877;Testuser-bpm;;;2;;bpm_2020-08-01_4 +878;Testuser-bpm;;;2;;bpm_2020-08-01_4 +879;Testuser-bpm;;;2;;bpm_2020-08-01_4 +880;Testuser-bpm;;;2;;bpm_2020-08-01_4 +881;Testuser-bpm;;;2;;bpm_2020-08-01_4 +882;Testuser-bpm;;;2;;bpm_2020-08-01_4 +883;Testuser-bpm;;;2;;bpm_2020-08-01_4 +884;Testuser-bpm;;;2;;bpm_2020-08-01_4 +885;Testuser-bpm;;;2;;bpm_2020-08-01_4 +886;Testuser-bpm;;;2;;bpm_2020-08-01_4 +887;Testuser-bpm;;;2;;bpm_2020-08-01_4 +888;Testuser-bpm;;;2;;bpm_2020-08-01_4 +889;Testuser-bpm;;;2;;bpm_2020-08-01_4 +890;Testuser-bpm;;;2;;bpm_2020-08-01_4 +891;Testuser-bpm;;;2;;bpm_2020-08-01_4 +892;Testuser-bpm;;;2;;bpm_2020-08-01_4 +893;Testuser-bpm;;;2;;bpm_2020-08-01_4 +894;Testuser-bpm;;;2;;bpm_2020-08-01_4 +895;Testuser-bpm;;;2;;bpm_2020-08-01_4 +896;Testuser-bpm;;;2;;bpm_2020-08-01_4 +897;Testuser-bpm;;;2;;bpm_2020-08-01_4 +898;Testuser-bpm;;;2;;bpm_2020-08-01_4 +899;Testuser-bpm;;;2;;bpm_2020-08-01_4 +900;Testuser-bpm;;;2;;bpm_2020-08-01_4 +901;Testuser-bpm;;;2;;bpm_2020-08-01_4 +902;Testuser-bpm;;;2;;bpm_2020-08-01_4 +903;Testuser-bpm;;;2;;bpm_2020-08-01_4 +904;Testuser-bpm;;;2;;bpm_2020-08-01_4 +905;Testuser-bpm;;;2;;bpm_2020-08-01_4 +906;Testuser-bpm;;;2;;bpm_2020-08-01_4 +907;Testuser-bpm;;;2;;bpm_2020-08-01_4 +908;Testuser-bpm;;;2;;bpm_2020-08-01_4 +909;Testuser-bpm;;;2;;bpm_2020-08-01_4 +910;Testuser-bpm;;;2;;bpm_2020-08-01_4 +911;Testuser-bpm;;;2;;bpm_2020-08-01_4 +912;Testuser-bpm;;;2;;bpm_2020-08-01_4 +913;Testuser-bpm;;;2;;bpm_2020-08-01_4 +914;Testuser-bpm;;;2;;bpm_2020-08-01_4 +915;Testuser-bpm;;;2;;bpm_2020-08-01_4 +916;Testuser-bpm;;;2;;bpm_2020-08-01_4 +917;Testuser-bpm;;;2;;bpm_2020-08-01_4 +918;Testuser-bpm;;;2;;bpm_2020-08-01_4 +919;Testuser-bpm;;;2;;bpm_2020-08-01_4 +920;Testuser-bpm;;;2;;bpm_2020-08-01_4 +921;Testuser-bpm;;;2;;bpm_2020-08-01_4 +922;Testuser-bpm;;;2;;bpm_2020-08-01_4 +923;Testuser-bpm;;;2;;bpm_2020-08-01_4 +924;Testuser-bpm;;;2;;bpm_2020-08-01_4 +925;Testuser-bpm;;;2;;bpm_2020-08-01_4 +926;Testuser-bpm;;;2;;bpm_2020-08-01_4 +927;Testuser-bpm;;;2;;bpm_2020-08-01_4 +928;Testuser-bpm;;;2;;bpm_2020-08-01_4 +929;Testuser-bpm;;;2;;bpm_2020-08-01_4 +930;Testuser-bpm;;;2;;bpm_2020-08-01_4 +931;Testuser-bpm;;;2;;bpm_2020-08-01_4 +932;Testuser-bpm;;;2;;bpm_2020-08-01_4 +933;Testuser-bpm;;;2;;bpm_2020-08-01_4 +934;Testuser-bpm;;;2;;bpm_2020-08-01_4 +935;Testuser-bpm;;;2;;bpm_2020-08-01_4 +936;Testuser-bpm;;;2;;bpm_2020-08-01_4 +937;Testuser-bpm;;;2;;bpm_2020-08-01_4 +938;Testuser-bpm;;;2;;bpm_2020-08-01_4 +939;Testuser-bpm;;;2;;bpm_2020-08-01_4 +940;Testuser-bpm;;;2;;bpm_2020-08-01_4 +941;Testuser-bpm;;;2;;bpm_2020-08-01_4 +942;Testuser-bpm;;;2;;bpm_2020-08-01_4 +943;Testuser-bpm;;;2;;bpm_2020-08-01_4 +944;Testuser-bpm;;;2;;bpm_2020-08-01_4 +945;Testuser-bpm;;;2;;bpm_2020-08-01_4 +946;Testuser-bpm;;;2;;bpm_2020-08-01_4 +947;Testuser-bpm;;;2;;bpm_2020-08-01_4 +948;Testuser-bpm;;;2;;bpm_2020-08-01_4 +949;Testuser-bpm;;;2;;bpm_2020-08-01_4 +950;Testuser-bpm;;;2;;bpm_2020-08-01_4 +951;Testuser-bpm;;;2;;bpm_2020-08-01_4 +952;Testuser-bpm;;;2;;bpm_2020-08-01_4 +953;Testuser-bpm;;;2;;bpm_2020-08-01_4 +954;Testuser-bpm;;;2;;bpm_2020-08-01_4 +955;Testuser-bpm;;;2;;bpm_2020-08-01_4 +956;Testuser-bpm;;;2;;bpm_2020-08-01_4 +957;Testuser-bpm;;;2;;bpm_2020-08-01_4 +958;Testuser-bpm;;;2;;bpm_2020-08-01_4 +959;Testuser-bpm;;;2;;bpm_2020-08-01_4 +960;Testuser-bpm;;;2;;bpm_2020-08-01_4 +961;Testuser-bpm;;;2;;bpm_2020-08-01_4 +962;Testuser-bpm;;;2;;bpm_2020-08-01_4 +963;Testuser-bpm;;;2;;bpm_2020-08-01_4 +964;Testuser-bpm;;;2;;bpm_2020-08-01_4 +965;Testuser-bpm;;;2;;bpm_2020-08-01_4 +966;Testuser-bpm;;;2;;bpm_2020-08-01_4 +967;Testuser-bpm;;;2;;bpm_2020-08-01_4 +968;Testuser-bpm;;;2;;bpm_2020-08-01_4 +969;Testuser-bpm;;;2;;bpm_2020-08-01_4 +970;Testuser-bpm;;;2;;bpm_2020-08-01_4 +971;Testuser-bpm;;;2;;bpm_2020-08-01_4 +972;Testuser-bpm;;;2;;bpm_2020-08-01_4 +973;Testuser-bpm;;;2;;bpm_2020-08-01_4 +974;Testuser-bpm;;;2;;bpm_2020-08-01_4 +975;Testuser-bpm;;;2;;bpm_2020-08-01_4 +976;Testuser-bpm;;;2;;bpm_2020-08-01_4 +977;Testuser-bpm;;;2;;bpm_2020-08-01_4 +978;Testuser-bpm;;;2;;bpm_2020-08-01_4 +979;Testuser-bpm;;;2;;bpm_2020-08-01_4 +980;Testuser-bpm;;;2;;bpm_2020-08-01_4 +981;Testuser-bpm;;;2;;bpm_2020-08-01_4 +982;Testuser-bpm;;;2;;bpm_2020-08-01_4 +983;Testuser-bpm;;;2;;bpm_2020-08-01_4 +984;Testuser-bpm;;;2;;bpm_2020-08-01_4 +985;Testuser-bpm;;;2;;bpm_2020-08-01_4 +986;Testuser-bpm;;;2;;bpm_2020-08-01_4 +987;Testuser-bpm;;;2;;bpm_2020-08-01_4 +988;Testuser-bpm;;;2;;bpm_2020-08-01_4 +989;Testuser-bpm;;;2;;bpm_2020-08-01_4 +990;Testuser-bpm;;;2;;bpm_2020-08-01_4 +991;Testuser-bpm;;;2;;bpm_2020-08-01_4 +992;Testuser-bpm;;;2;;bpm_2020-08-01_4 +993;Testuser-bpm;;;2;;bpm_2020-08-01_4 +994;Testuser-bpm;;;2;;bpm_2020-08-01_4 +995;Testuser-bpm;;;2;;bpm_2020-08-01_4 +996;Testuser-bpm;;;2;;bpm_2020-08-01_4 +997;Testuser-bpm;;;2;;bpm_2020-08-01_4 +998;Testuser-bpm;;;2;;bpm_2020-08-01_4 +999;Testuser-bpm;;;2;;bpm_2020-08-01_4 +1000;Testuser-bpm;;;2;;bpm_2020-08-01_4 diff --git a/++ Dokumente/TANs/tan5.csv b/++ Dokumente/TANs/tan5.csv new file mode 100755 index 0000000..f7868ee --- /dev/null +++ b/++ Dokumente/TANs/tan5.csv @@ -0,0 +1,250 @@ +1001;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1002;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1003;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1004;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1005;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1006;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1007;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1008;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1009;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1010;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1011;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1012;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1013;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1014;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1015;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1016;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1017;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1018;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1019;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1020;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1021;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1022;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1023;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1024;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1025;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1026;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1027;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1028;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1029;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1030;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1031;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1032;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1033;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1034;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1035;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1036;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1037;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1038;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1039;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1040;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1041;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1042;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1043;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1044;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1045;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1046;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1047;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1048;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1049;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1050;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1051;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1052;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1053;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1054;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1055;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1056;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1057;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1058;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1059;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1060;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1061;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1062;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1063;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1064;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1065;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1066;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1067;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1068;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1069;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1070;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1071;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1072;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1073;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1074;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1075;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1076;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1077;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1078;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1079;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1080;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1081;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1082;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1083;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1084;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1085;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1086;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1087;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1088;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1089;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1090;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1091;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1092;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1093;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1094;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1095;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1096;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1097;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1098;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1099;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1100;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1101;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1102;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1103;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1104;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1105;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1106;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1107;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1108;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1109;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1110;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1111;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1112;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1113;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1114;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1115;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1116;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1117;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1118;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1119;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1120;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1121;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1122;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1123;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1124;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1125;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1126;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1127;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1128;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1129;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1130;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1131;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1132;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1133;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1134;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1135;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1136;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1137;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1138;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1139;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1140;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1141;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1142;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1143;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1144;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1145;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1146;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1147;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1148;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1149;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1150;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1151;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1152;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1153;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1154;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1155;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1156;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1157;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1158;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1159;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1160;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1161;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1162;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1163;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1164;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1165;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1166;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1167;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1168;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1169;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1170;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1171;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1172;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1173;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1174;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1175;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1176;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1177;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1178;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1179;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1180;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1181;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1182;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1183;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1184;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1185;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1186;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1187;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1188;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1189;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1190;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1191;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1192;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1193;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1194;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1195;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1196;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1197;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1198;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1199;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1200;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1201;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1202;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1203;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1204;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1205;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1206;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1207;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1208;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1209;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1210;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1211;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1212;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1213;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1214;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1215;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1216;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1217;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1218;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1219;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1220;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1221;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1222;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1223;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1224;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1225;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1226;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1227;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1228;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1229;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1230;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1231;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1232;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1233;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1234;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1235;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1236;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1237;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1238;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1239;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1240;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1241;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1242;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1243;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1244;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1245;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1246;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1247;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1248;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1249;Testuser-bpm;;;2;;bpm_2020-08-01_5 +1250;Testuser-bpm;;;2;;bpm_2020-08-01_5 diff --git a/++ Dokumente/TANs/tan6.csv b/++ Dokumente/TANs/tan6.csv new file mode 100755 index 0000000..ba7683e --- /dev/null +++ b/++ Dokumente/TANs/tan6.csv @@ -0,0 +1,250 @@ +1251;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1252;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1253;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1254;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1255;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1256;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1257;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1258;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1259;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1260;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1261;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1262;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1263;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1264;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1265;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1266;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1267;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1268;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1269;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1270;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1271;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1272;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1273;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1274;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1275;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1276;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1277;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1278;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1279;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1280;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1281;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1282;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1283;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1284;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1285;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1286;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1287;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1288;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1289;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1290;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1291;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1292;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1293;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1294;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1295;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1296;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1297;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1298;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1299;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1300;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1301;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1302;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1303;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1304;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1305;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1306;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1307;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1308;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1309;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1310;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1311;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1312;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1313;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1314;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1315;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1316;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1317;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1318;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1319;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1320;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1321;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1322;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1323;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1324;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1325;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1326;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1327;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1328;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1329;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1330;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1331;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1332;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1333;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1334;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1335;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1336;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1337;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1338;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1339;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1340;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1341;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1342;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1343;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1344;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1345;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1346;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1347;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1348;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1349;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1350;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1351;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1352;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1353;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1354;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1355;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1356;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1357;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1358;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1359;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1360;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1361;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1362;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1363;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1364;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1365;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1366;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1367;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1368;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1369;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1370;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1371;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1372;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1373;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1374;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1375;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1376;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1377;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1378;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1379;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1380;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1381;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1382;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1383;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1384;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1385;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1386;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1387;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1388;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1389;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1390;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1391;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1392;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1393;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1394;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1395;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1396;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1397;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1398;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1399;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1400;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1401;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1402;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1403;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1404;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1405;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1406;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1407;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1408;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1409;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1410;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1411;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1412;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1413;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1414;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1415;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1416;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1417;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1418;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1419;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1420;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1421;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1422;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1423;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1424;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1425;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1426;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1427;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1428;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1429;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1430;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1431;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1432;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1433;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1434;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1435;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1436;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1437;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1438;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1439;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1440;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1441;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1442;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1443;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1444;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1445;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1446;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1447;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1448;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1449;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1450;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1451;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1452;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1453;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1454;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1455;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1456;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1457;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1458;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1459;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1460;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1461;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1462;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1463;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1464;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1465;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1466;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1467;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1468;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1469;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1470;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1471;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1472;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1473;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1474;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1475;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1476;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1477;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1478;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1479;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1480;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1481;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1482;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1483;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1484;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1485;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1486;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1487;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1488;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1489;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1490;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1491;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1492;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1493;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1494;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1495;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1496;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1497;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1498;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1499;Testuser-bpm;;;2;;bpm_2020-08-01_6 +1500;Testuser-bpm;;;2;;bpm_2020-08-01_6 diff --git a/++ Dokumente/TANs/tan7.csv b/++ Dokumente/TANs/tan7.csv new file mode 100755 index 0000000..c83d736 --- /dev/null +++ b/++ Dokumente/TANs/tan7.csv @@ -0,0 +1,250 @@ +1501;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1502;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1503;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1504;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1505;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1506;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1507;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1508;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1509;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1510;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1511;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1512;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1513;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1514;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1515;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1516;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1517;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1518;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1519;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1520;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1521;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1522;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1523;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1524;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1525;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1526;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1527;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1528;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1529;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1530;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1531;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1532;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1533;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1534;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1535;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1536;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1537;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1538;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1539;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1540;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1541;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1542;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1543;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1544;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1545;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1546;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1547;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1548;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1549;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1550;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1551;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1552;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1553;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1554;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1555;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1556;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1557;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1558;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1559;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1560;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1561;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1562;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1563;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1564;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1565;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1566;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1567;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1568;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1569;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1570;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1571;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1572;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1573;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1574;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1575;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1576;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1577;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1578;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1579;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1580;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1581;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1582;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1583;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1584;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1585;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1586;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1587;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1588;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1589;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1590;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1591;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1592;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1593;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1594;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1595;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1596;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1597;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1598;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1599;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1600;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1601;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1602;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1603;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1604;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1605;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1606;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1607;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1608;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1609;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1610;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1611;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1612;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1613;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1614;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1615;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1616;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1617;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1618;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1619;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1620;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1621;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1622;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1623;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1624;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1625;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1626;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1627;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1628;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1629;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1630;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1631;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1632;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1633;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1634;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1635;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1636;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1637;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1638;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1639;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1640;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1641;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1642;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1643;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1644;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1645;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1646;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1647;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1648;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1649;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1650;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1651;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1652;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1653;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1654;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1655;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1656;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1657;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1658;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1659;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1660;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1661;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1662;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1663;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1664;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1665;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1666;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1667;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1668;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1669;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1670;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1671;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1672;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1673;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1674;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1675;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1676;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1677;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1678;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1679;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1680;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1681;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1682;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1683;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1684;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1685;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1686;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1687;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1688;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1689;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1690;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1691;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1692;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1693;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1694;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1695;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1696;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1697;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1698;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1699;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1700;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1701;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1702;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1703;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1704;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1705;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1706;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1707;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1708;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1709;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1710;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1711;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1712;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1713;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1714;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1715;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1716;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1717;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1718;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1719;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1720;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1721;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1722;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1723;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1724;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1725;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1726;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1727;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1728;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1729;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1730;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1731;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1732;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1733;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1734;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1735;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1736;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1737;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1738;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1739;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1740;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1741;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1742;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1743;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1744;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1745;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1746;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1747;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1748;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1749;Testuser-bpm;;;2;;bpm_2020-08-01_7 +1750;Testuser-bpm;;;2;;bpm_2020-08-01_7 diff --git a/++ Dokumente/TANs/tan8.csv b/++ Dokumente/TANs/tan8.csv new file mode 100755 index 0000000..7249044 --- /dev/null +++ b/++ Dokumente/TANs/tan8.csv @@ -0,0 +1,250 @@ +1751;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1752;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1753;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1754;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1755;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1756;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1757;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1758;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1759;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1760;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1761;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1762;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1763;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1764;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1765;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1766;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1767;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1768;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1769;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1770;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1771;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1772;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1773;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1774;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1775;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1776;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1777;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1778;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1779;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1780;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1781;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1782;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1783;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1784;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1785;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1786;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1787;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1788;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1789;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1790;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1791;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1792;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1793;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1794;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1795;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1796;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1797;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1798;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1799;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1800;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1801;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1802;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1803;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1804;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1805;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1806;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1807;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1808;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1809;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1810;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1811;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1812;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1813;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1814;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1815;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1816;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1817;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1818;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1819;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1820;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1821;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1822;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1823;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1824;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1825;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1826;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1827;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1828;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1829;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1830;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1831;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1832;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1833;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1834;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1835;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1836;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1837;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1838;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1839;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1840;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1841;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1842;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1843;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1844;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1845;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1846;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1847;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1848;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1849;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1850;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1851;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1852;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1853;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1854;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1855;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1856;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1857;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1858;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1859;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1860;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1861;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1862;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1863;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1864;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1865;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1866;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1867;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1868;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1869;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1870;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1871;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1872;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1873;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1874;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1875;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1876;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1877;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1878;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1879;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1880;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1881;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1882;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1883;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1884;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1885;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1886;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1887;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1888;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1889;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1890;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1891;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1892;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1893;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1894;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1895;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1896;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1897;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1898;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1899;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1900;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1901;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1902;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1903;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1904;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1905;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1906;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1907;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1908;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1909;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1910;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1911;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1912;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1913;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1914;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1915;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1916;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1917;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1918;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1919;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1920;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1921;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1922;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1923;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1924;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1925;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1926;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1927;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1928;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1929;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1930;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1931;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1932;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1933;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1934;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1935;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1936;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1937;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1938;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1939;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1940;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1941;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1942;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1943;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1944;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1945;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1946;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1947;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1948;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1949;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1950;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1951;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1952;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1953;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1954;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1955;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1956;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1957;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1958;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1959;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1960;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1961;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1962;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1963;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1964;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1965;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1966;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1967;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1968;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1969;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1970;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1971;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1972;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1973;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1974;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1975;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1976;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1977;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1978;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1979;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1980;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1981;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1982;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1983;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1984;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1985;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1986;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1987;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1988;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1989;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1990;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1991;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1992;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1993;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1994;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1995;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1996;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1997;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1998;Testuser-bpm;;;2;;bpm_2020-08-01_8 +1999;Testuser-bpm;;;2;;bpm_2020-08-01_8 +2000;Testuser-bpm;;;2;;bpm_2020-08-01_8 diff --git a/++ Dokumente/TANs/tan9.csv b/++ Dokumente/TANs/tan9.csv new file mode 100755 index 0000000..70c3fa8 --- /dev/null +++ b/++ Dokumente/TANs/tan9.csv @@ -0,0 +1,250 @@ +2001;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2002;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2003;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2004;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2005;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2006;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2007;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2008;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2009;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2010;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2011;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2012;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2013;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2014;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2015;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2016;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2017;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2018;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2019;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2020;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2021;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2022;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2023;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2024;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2025;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2026;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2027;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2028;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2029;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2030;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2031;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2032;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2033;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2034;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2035;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2036;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2037;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2038;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2039;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2040;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2041;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2042;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2043;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2044;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2045;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2046;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2047;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2048;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2049;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2050;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2051;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2052;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2053;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2054;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2055;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2056;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2057;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2058;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2059;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2060;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2061;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2062;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2063;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2064;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2065;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2066;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2067;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2068;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2069;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2070;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2071;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2072;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2073;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2074;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2075;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2076;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2077;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2078;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2079;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2080;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2081;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2082;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2083;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2084;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2085;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2086;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2087;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2088;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2089;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2090;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2091;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2092;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2093;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2094;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2095;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2096;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2097;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2098;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2099;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2100;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2101;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2102;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2103;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2104;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2105;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2106;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2107;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2108;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2109;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2110;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2111;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2112;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2113;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2114;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2115;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2116;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2117;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2118;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2119;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2120;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2121;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2122;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2123;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2124;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2125;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2126;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2127;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2128;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2129;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2130;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2131;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2132;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2133;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2134;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2135;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2136;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2137;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2138;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2139;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2140;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2141;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2142;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2143;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2144;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2145;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2146;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2147;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2148;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2149;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2150;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2151;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2152;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2153;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2154;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2155;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2156;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2157;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2158;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2159;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2160;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2161;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2162;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2163;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2164;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2165;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2166;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2167;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2168;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2169;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2170;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2171;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2172;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2173;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2174;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2175;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2176;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2177;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2178;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2179;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2180;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2181;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2182;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2183;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2184;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2185;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2186;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2187;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2188;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2189;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2190;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2191;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2192;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2193;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2194;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2195;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2196;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2197;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2198;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2199;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2200;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2201;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2202;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2203;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2204;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2205;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2206;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2207;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2208;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2209;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2210;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2211;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2212;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2213;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2214;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2215;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2216;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2217;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2218;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2219;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2220;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2221;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2222;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2223;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2224;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2225;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2226;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2227;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2228;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2229;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2230;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2231;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2232;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2233;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2234;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2235;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2236;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2237;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2238;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2239;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2240;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2241;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2242;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2243;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2244;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2245;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2246;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2247;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2248;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2249;Testuser-bpm;;;2;;bpm_2020-08-01_9 +2250;Testuser-bpm;;;2;;bpm_2020-08-01_9 diff --git a/++ Dokumente/Tab201_FR.xlsx b/++ Dokumente/Tab201_FR.xlsx new file mode 100755 index 0000000..aedeb9e Binary files /dev/null and b/++ Dokumente/Tab201_FR.xlsx differ diff --git a/++ Dokumente/Tab201_KA.xlsx b/++ Dokumente/Tab201_KA.xlsx new file mode 100755 index 0000000..e014ce8 Binary files /dev/null and b/++ Dokumente/Tab201_KA.xlsx differ diff --git a/++ Dokumente/Tab201_S.xlsx b/++ Dokumente/Tab201_S.xlsx new file mode 100755 index 0000000..79a9dca Binary files /dev/null and b/++ Dokumente/Tab201_S.xlsx differ diff --git a/++ Dokumente/Tab201_TÜ.xlsx b/++ Dokumente/Tab201_TÜ.xlsx new file mode 100755 index 0000000..b3c730c Binary files /dev/null and b/++ Dokumente/Tab201_TÜ.xlsx differ diff --git a/++ Dokumente/Tab202.xlsx b/++ Dokumente/Tab202.xlsx new file mode 100755 index 0000000..f36b5ac Binary files /dev/null and b/++ Dokumente/Tab202.xlsx differ diff --git a/++ Dokumente/Testanmeldungen.xlsx b/++ Dokumente/Testanmeldungen.xlsx new file mode 100755 index 0000000..54ea02d Binary files /dev/null and b/++ Dokumente/Testanmeldungen.xlsx differ diff --git a/++ Dokumente/bpm.sql b/++ Dokumente/bpm.sql new file mode 100755 index 0000000..d390aba --- /dev/null +++ b/++ Dokumente/bpm.sql @@ -0,0 +1,1976 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.2 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 10. Jun 2020 um 06:42 +-- Server-Version: 10.4.11-MariaDB +-- PHP-Version: 7.4.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `bpm` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_admin` +-- + +CREATE TABLE `bpm_admin` ( + `bpmuid` int(11) NOT NULL, + `vorname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `nachname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `uid` varchar(23) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `passwort` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Benutzer'; + +-- +-- Daten für Tabelle `bpm_admin` +-- + +INSERT INTO `bpm_admin` (`bpmuid`, `vorname`, `nachname`, `mail`, `uid`, `passwort`) VALUES +(1, 'DVM', 'Admin', 'netblack@gmx.de', 'admin', '674b3548adcfad301d1f4cf80ab30b14'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_adminlog` +-- + +CREATE TABLE `bpm_adminlog` ( + `lid` int(11) NOT NULL, + `Datum` datetime NOT NULL, + `IP` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_agent` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `bpmuid` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Logins der Anwender'; + +-- +-- Daten für Tabelle `bpm_adminlog` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dienststellen` +-- + +CREATE TABLE `bpm_dienststellen` ( + `dst_id` int(11) NOT NULL, + `bezeichnung` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `bez` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `str` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `plz` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `ort` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `tel` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `internet` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `mail` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `gueltig_von` date NOT NULL, + `gueltig_bis` date NOT NULL, + `init_tan` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `pwd` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `register_dat` datetime NOT NULL, + `mail_reset` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Daten für Tabelle `bpm_dienststellen` +-- + +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `pwd`, `register_dat`, `mail_reset`) VALUES +(1, 'Landratsamt', 'Bodenseekreis', 'Landratsamt Bodenseekreis', NULL, NULL, NULL, NULL, NULL, 'ausbildung@bodenseekreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(2, 'Stadtverwaltung', 'Lahr', 'Stadtverwaltung Lahr', 'Rathausplatz 4', '77933', 'Lahr', NULL, NULL, 'bewerbung@lahr.de', '0000-00-00', '0000-00-00', 'XJ9zxJK', 'f2e0971f614299098da8888283a6121e', '2020-06-02 07:14:18', '0000-00-00 00:00:00'), +(3, 'Landratsamt', 'Tuttlingen', 'Landratsamt Tuttlingen', 'Bahnhofstraße 100', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@landkreis-tuttlingen.de', '0000-00-00', '0000-00-00', 'KgARNCJ', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-06 16:08:02', '0000-00-00 00:00:00'), +(4, 'Landratsamt', 'Ortenaukreis', 'Landratsamt Ortenaukreis', 'Badstraße 20', '77652', 'Offenburg', NULL, NULL, 'ausbildung@ortenaukreis.de', '0000-00-00', '0000-00-00', 'UcZftqe', '3fbaba58b058b0ce53926998d20e4d51', '2020-05-30 18:47:10', '0000-00-00 00:00:00'), +(5, 'Stadtverwaltung', 'Ettlingen', 'Stadtverwaltung Ettlingen', 'Marktplatz 2', '76275', 'Ettlingen', NULL, NULL, 'anja.karbstein@ettlingen.de', '0000-00-00', '0000-00-00', '6Yeyy6k', '1dbe10b0e0ce9ea8145cbc4f7b2fe5fe', '2020-05-11 12:33:39', '0000-00-00 00:00:00'), +(6, 'Stadtverwaltung', 'Crailsheim', 'Stadtverwaltung Crailsheim', NULL, NULL, NULL, NULL, NULL, 'martina.hopf@crailsheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(7, 'Gemeindeverwaltung', 'Schlier', 'Gemeindeverwaltung Schlier', NULL, NULL, NULL, NULL, NULL, 'liebmann@schlier.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(8, 'Stadtverwaltung', 'Plochingen', 'Stadtverwaltung Plochingen', NULL, NULL, NULL, NULL, NULL, 'treiber@plochingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(9, 'Stadtverwaltung', 'Pforzheim', 'Stadtverwaltung Pforzheim', 'Marktplatz 1 ', '75175', 'Pforzheim', NULL, NULL, 'ausbildung@pforzheim.de', '0000-00-00', '0000-00-00', '!84#BR5', 'cb0a389f7d40ff44c5c5db1002e6b29e', '2020-05-07 08:53:56', '0000-00-00 00:00:00'), +(10, 'Stadtverwaltung', 'Bühl', 'Stadtverwaltung Bühl', 'Hauptstraße 47', '77815', 'Bühl', NULL, NULL, 'digitale.stadt@buehl.de', '0000-00-00', '0000-00-00', 'JF8mD8g', '178a5341ddd1af956dad381afc7c4fa7', '2020-05-30 16:05:20', '2020-05-30 16:06:08'), +(11, 'Landratsamt', 'Ostalbkreis', 'Landratsamt Ostalbkreis', NULL, NULL, NULL, NULL, NULL, 'ursula.winkler@ostalbkreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(12, 'Landratsamt', 'Alb-Donau-Kreis', 'Landratsamt Alb-Donau-Kreis', NULL, NULL, NULL, NULL, NULL, 'edelgard.rommel@alb-donau-kreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(13, 'Landratsamt', 'Heilbronn', 'Landratsamt Heilbronn', 'Lerchenstraße 40', '74072', 'Heilbronn', NULL, NULL, 'jasmin.muench@landratsamt-heilbronn.de', '0000-00-00', '0000-00-00', 'nNKm8ZA', '233d57b91ec44976d06daab28b3e7f49', '2020-05-13 11:39:40', '0000-00-00 00:00:00'), +(14, 'Stadtverwaltung', 'Nürtingen', 'Stadtverwaltung Nürtingen', 'Marktstraße 7', '72622', 'Nürtingen', NULL, NULL, 'l.kaelberer@nuertingen.de', '0000-00-00', '0000-00-00', '6XDCd9t', '9cd1124b96ef9d92abb63b4ac120c178', '2020-05-13 13:24:41', '0000-00-00 00:00:00'), +(15, 'Stadtverwaltung', 'Sindelfingen', 'Stadtverwaltung Sindelfingen', 'Rathausplatz 1', '71063 ', 'Sindelfingen', NULL, NULL, 'claudia.dorsch@sindelfingen.de', '0000-00-00', '0000-00-00', 'Adkm5an', 'e1c3ff034564136b923273766f2eda49', '2020-05-19 16:32:12', '0000-00-00 00:00:00'), +(16, 'Landratsamt', 'Ludwigsburg', 'Landratsamt Ludwigsburg', 'Hindenburgstraße 40', '71638', 'Ludwigsburg', NULL, NULL, 'georgios.sidiropoulos@landkreis-ludwigsburg.de', '0000-00-00', '0000-00-00', 'GbrrCgy', 'c1bce67a67b402863a1cb81da9f28858', '2020-05-12 12:49:21', '0000-00-00 00:00:00'), +(17, 'Stadtverwaltung', 'Böblingen', 'Stadtverwaltung Böblingen', 'Marktplatz 16', '71032', 'Böblingen', NULL, NULL, 'ausbildung@boeblingen.de', '0000-00-00', '0000-00-00', 'Pt-GmYp', 'aa7ec81b8e7272977d1848065b4bee0b', '2020-05-12 19:40:33', '0000-00-00 00:00:00'), +(18, 'Stadtverwaltung', 'Karlsruhe', 'Stadtverwaltung Karlsruhe', NULL, NULL, NULL, NULL, NULL, 'sabrina.rothschmitt@it.karlsruhe.de', '0000-00-00', '0000-00-00', 'TxWfE4f', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(19, 'Stadtverwaltung', 'Bruchsal', 'Stadtverwaltung Bruchsal', 'Kaiserstraße 66', '76646', 'Bruchsal', NULL, NULL, 'vanessa.mail@bruchsal.de', '0000-00-00', '0000-00-00', 'NBzrcYn', 'f623dea8df24077d0090d8d9810424f7', '2020-05-11 11:30:44', '0000-00-00 00:00:00'), +(20, 'Stadtverwaltung', 'Metzingen', 'Stadtverwaltung Metzingen', 'Stuttgarter Straße 2-4', '72555', 'Metzingen', NULL, NULL, 'personal@metzingen.de', '0000-00-00', '0000-00-00', 'r!vSz34', 'd8bed61d3748ae779449d5f67f4572c2', '2020-05-13 13:50:12', '0000-00-00 00:00:00'), +(21, 'Stadtverwaltung', 'Spaichingen', 'Stadtverwaltung Spaichingen', 'Marktplatz 19', '78549', 'Spaichingen', NULL, NULL, 'heike.marquart@spaichingen.de', '0000-00-00', '0000-00-00', 'ySgcpnh', 'e3716c43663c0fb8628d2362e6b56590', '2020-05-06 18:10:49', '0000-00-00 00:00:00'), +(22, 'Stadtverwaltung', 'Ulm', 'Stadtverwaltung Ulm', 'Donaustraße 5', '89073', 'Ulm', NULL, NULL, 'a.sauter@ulm.de', '0000-00-00', '0000-00-00', 'zhkvELP', 'f72da3a02cfa3e228483b0610e0dd64b', '2020-05-15 11:09:44', '0000-00-00 00:00:00'), +(23, 'Gemeindeverwaltung', 'Ingoldingen', 'Gemeindeverwaltung Ingoldingen', 'St. Georgenstraße 1', '88456', 'Ingoldingen', NULL, NULL, 'berthold.hengge@ingoldingen.de', '0000-00-00', '0000-00-00', 'nG4ZYyf', '120fc87b75bbb1cc0a5a153c0fcf85e2', '2020-05-15 10:02:49', '0000-00-00 00:00:00'), +(24, 'Stadtverwaltung', 'Heidelberg', 'Stadtverwaltung Heidelberg', 'Marktplatz 10', '69117', 'Heidelberg', NULL, NULL, 'ausbildung@heidelberg.de', '0000-00-00', '0000-00-00', 'ne4tAYY', '0d261aa7832c74fda422aa5b446f00ec', '2020-05-12 12:05:57', '0000-00-00 00:00:00'), +(25, 'Stadtverwaltung', 'Reutlingen', 'Stadtverwaltung Reutlingen', 'Marktplatz 22 ', '72764', 'Reutlingen', NULL, NULL, 'stefanie.weiss@reutlingen.de', '0000-00-00', '0000-00-00', 'aeP-W9n', 'cf820b0e4f7c5448bcaede70ded386ff', '2020-05-13 13:06:46', '0000-00-00 00:00:00'), +(26, 'Landratsamt', 'Waldshut', 'Landratsamt Waldshut', NULL, NULL, NULL, NULL, NULL, 'Theresa.Huener@landkreis-waldshut.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(27, 'Stadtverwaltung', 'Mannheim', 'Stadtverwaltung Mannheim', NULL, NULL, NULL, NULL, NULL, 'franziska.stroh@mannheim.de', '0000-00-00', '0000-00-00', 'ec65ZZ5', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(28, 'Gemeindeverwaltung', 'Gutach im Breisgau', 'Gemeindeverwaltung Gutach im Breisgau', NULL, NULL, NULL, NULL, NULL, 'trenkle@gutach.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(29, 'Stadtverwaltung', 'Kehl', 'Stadtverwaltung Kehl', 'Rathausplatz 1', '77694', 'Kehl', NULL, NULL, 'K.Faschon@stadt-kehl.de', '0000-00-00', '0000-00-00', '!4CL2Xr', '07263a1aac8478c96d399cbfb004b3eb', '2020-06-02 07:08:27', '0000-00-00 00:00:00'), +(30, 'Landratsamt', 'Tübingen', 'Landratsamt Tübingen', 'Wilhelm-Keil-Straße 50', '72072', 'Tübingen', NULL, NULL, 'a.neher@kreis-tuebingen.de', '0000-00-00', '0000-00-00', 'U!hL?nK', 'deffff227c9fab91fef0ccf99065c1fc', '2020-05-13 14:53:09', '0000-00-00 00:00:00'), +(31, 'Gemeindeverwaltung', 'Amtzell', 'Gemeindeverwaltung Amtzell', NULL, NULL, NULL, NULL, NULL, 'christoph.liebmann@amtzell.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(32, 'Gemeindeverwaltung', 'Bad Bellingen', 'Gemeindeverwaltung Bad Bellingen', NULL, NULL, NULL, NULL, NULL, 'spiegelhalter@gemeinde.bad-bellingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(33, 'Stadtverwaltung', 'Remseck am Neckar', 'Stadtverwaltung Remseck am Neckar', NULL, NULL, NULL, NULL, NULL, 'robin.slawig@remseck.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(34, 'Stadtverwaltung', 'Trossingen', 'Stadtverwaltung Trossingen', 'Schultheiß-Koch-Platz 1', '78647', 'Trossingen', NULL, NULL, 'ralf.sulzmann@trossingen.de', '0000-00-00', '0000-00-00', 'Rnzn8xv', 'b43fc176d6ac62361032192c316a3608', '2020-05-08 12:48:26', '0000-00-00 00:00:00'), +(35, 'Stadtverwaltung', 'Herrenberg', 'Stadtverwaltung Herrenberg', 'Marktplatz 5', '71083', 'Herrenberg', NULL, NULL, 'personalwesen@herrenberg.de', '0000-00-00', '0000-00-00', 'LPDrX4u', '00866d6e06168e097a108d44d833888b', '2020-05-22 09:23:11', '0000-00-00 00:00:00'), +(36, 'Landratsamt', 'Sigmaringen', 'Landratsamt Sigmaringen', 'Leopoldstraße 4', '72488', 'Sigmaringen', NULL, NULL, 'bewerbungen@lrasig.de', '0000-00-00', '0000-00-00', '4u!Y46V', '1d53279de30ba509a92564d90ea36215', '2020-06-02 12:34:30', '0000-00-00 00:00:00'), +(37, 'Stadtverwaltung', 'Stadt Fellbach', 'Stadtverwaltung Stadt Fellbach', 'Marktplatz 1', '70734', 'Fellbach', NULL, NULL, 'aus-fortbildung@fellbach.de', '0000-00-00', '0000-00-00', 'Hzp#sxA', '6e00ec9bf49a8287ce7b81c6637b241d', '2020-05-12 15:23:16', '0000-00-00 00:00:00'), +(38, 'Landratsamt', 'Main-Tauber-Kreis', 'Landratsamt Main-Tauber-Kreis', 'Gartenstraße 1', '97941', 'Tauberbischofsheim', NULL, NULL, 'ann-kathrin.blatz@main-tauber-kreis.de', '0000-00-00', '0000-00-00', 'DXRKR#F', '5704db8e04ff3846a2a7333caba87ac6', '2020-06-02 14:17:14', '0000-00-00 00:00:00'), +(39, 'Stadtverwaltung', 'Calw', 'Stadtverwaltung Calw', NULL, NULL, NULL, NULL, NULL, 'spandzich@calw.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(40, 'Stadtverwaltung', 'Kornwestheim', 'Stadtverwaltung Kornwestheim', 'Jakob-Sigle-Platz', '70806', 'Kornwestheim', NULL, NULL, 'Yvette_Escolano@kornwestheim.de', '0000-00-00', '0000-00-00', 'f?56g#3', 'a448966cd1919ed98d4ecb031896541c', '2020-05-13 07:44:45', '0000-00-00 00:00:00'), +(41, 'Landratsamt', 'Ravensburg', 'Landratsamt Ravensburg', 'Friedenstraße 6', '88212', 'Ravensburg', NULL, NULL, 'R.Diez@rv.de', '0000-00-00', '0000-00-00', 'Sn!NEsT', '30a18366b5fb9e244a3dc1c492fbed0f', '2020-05-18 09:24:34', '0000-00-00 00:00:00'), +(42, 'Stadtverwaltung', 'Vaihingen an der Enz', 'Stadtverwaltung Vaihingen an der Enz', 'Marktplatz 1', '71665', 'Vaihingen an der Enz', NULL, NULL, 'm.kaag@vaihingen.de', '0000-00-00', '0000-00-00', 'BSXunD7', '62767e547fd5280353c4c1336fb1b62c', '2020-05-14 12:57:36', '0000-00-00 00:00:00'), +(43, 'Gemeindeverwaltung', 'Dobel', 'Gemeindeverwaltung Dobel', NULL, NULL, NULL, NULL, NULL, 'strauch@dobel.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(44, 'Stadtverwaltung', 'Schwäbisch Gmünd', 'Stadtverwaltung Schwäbisch Gmünd', 'Marktplatz 1', '73525', 'Schwaebisch Gmünd', NULL, NULL, 'susanne.schindler@schwaebisch-gmuend.de', '0000-00-00', '0000-00-00', 'yr?!ZDC', 'c11e55675a55db07c21bcdb26061841c', '2020-05-13 16:26:52', '0000-00-00 00:00:00'), +(45, 'Gemeindeverwaltung', 'Dettenhausen', 'Gemeindeverwaltung Dettenhausen', NULL, NULL, NULL, NULL, NULL, 'hans-peter.fauser@dettenhausen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(46, 'Stadtverwaltung', 'Radolfzell am Bodensee', 'Stadtverwaltung Radolfzell am Bodensee', 'Marktplatz 2', '78315', 'Radolfzell am Bodensee', NULL, NULL, 'personalverwaltung@radolfzell.de', '0000-00-00', '0000-00-00', 'H6#wz!k', 'd29695fc6a04fe226fdaa9322d13e38f', '2020-05-06 16:08:32', '0000-00-00 00:00:00'), +(47, 'Landratsamt', 'Rastatt', 'Landratsamt Rastatt', 'Am Schlossplatz 5', '76437', 'Rastatt', NULL, NULL, 'ausbildung@landkreis-rastatt.de', '0000-00-00', '0000-00-00', 'N9Kcb?!', 'ed6c5513c43f6c3fac4ae090e1fa79e1', '2020-05-07 13:05:42', '0000-00-00 00:00:00'), +(48, 'Stadtverwaltung', 'Stuttgart', 'Stadtverwaltung Stuttgart', 'Eberhardstraße 6', '70173', 'Stuttgart', NULL, NULL, 'ausbildung@stuttgart.de', '0000-00-00', '0000-00-00', 'TPX#tv8', '9c9440cd24ecdc150b5cafc2a8144673', '2020-05-13 08:42:23', '0000-00-00 00:00:00'), +(49, 'GVV', 'Denzlingen-Vörstetten-Reute', 'GVV Denzlingen-Vörstetten-Reute', NULL, NULL, NULL, NULL, NULL, 'j.sillmann@denzlingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(50, 'Stadtverwaltung', 'Bad Friedrichshall', 'Stadtverwaltung Bad Friedrichshall', NULL, NULL, NULL, NULL, NULL, 'franziska.fuchs@friedrichshall.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(51, 'Gemeindeverwaltung', 'Brigachtal', 'Gemeindeverwaltung Brigachtal', 'St. Gallus-Str. 4', '78086', 'Brigachtal', NULL, NULL, 'elke.dufner@brigachtal.de', '0000-00-00', '0000-00-00', 'm!kke5y', '6ab0b27a4da786c9bd8add9a1c4fcd67', '2020-05-14 08:11:29', '0000-00-00 00:00:00'), +(52, 'Gemeindeverwaltung', 'Heddesheim', 'Gemeindeverwaltung Heddesheim', NULL, NULL, NULL, NULL, NULL, 'hauptverwaltung@heddesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(53, 'Gemeindeverwaltung', 'Simonswald', 'Gemeindeverwaltung Simonswald', NULL, NULL, NULL, NULL, NULL, 'glockner@simonswald.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(54, 'Gemeindeverwaltung', 'Mittelbiberach', 'Gemeindeverwaltung Mittelbiberach', NULL, NULL, NULL, NULL, NULL, 'haenle@mittelbiberach.de', '0000-00-00', '0000-00-00', 'mDJtTt-', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(55, 'Stadtverwaltung', 'Rutesheim', 'Stadtverwaltung Rutesheim', NULL, NULL, NULL, NULL, NULL, 'm.killinger@rutesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(56, 'Gemeindeverwaltung', 'Oberstenfeld', 'Gemeindeverwaltung Oberstenfeld', NULL, NULL, NULL, NULL, NULL, 'schmukal@oberstenfeld.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(57, 'Gemeindeverwaltung', 'Leutenbach', 'Gemeindeverwaltung Leutenbach', 'Rathausplatz 1', '71397', 'Leutenbach', NULL, NULL, 'c.muehlbacher@leutenbach.de', '0000-00-00', '0000-00-00', 'd8SJxqf', '5a7e4ddee0fd7127b23b95acb2d53fd7', '2020-05-20 12:08:40', '0000-00-00 00:00:00'), +(58, 'Gemeindeverwaltung', 'Schömberg', 'Gemeindeverwaltung Schömberg', NULL, NULL, NULL, NULL, NULL, 'l.miene@schoemberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(59, 'Stadtverwaltung', 'Leimen', 'Stadtverwaltung Leimen', NULL, NULL, NULL, NULL, NULL, 'elena.brecht@leimen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(60, 'Gemeindeverwaltung', 'Schwörstadt', 'Gemeindeverwaltung Schwörstadt', NULL, NULL, NULL, NULL, NULL, 'b.schneider@schwoerstadt.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(61, 'Gemeindeverwaltung', 'Rudersberg', 'Gemeindeverwaltung Rudersberg', NULL, NULL, NULL, NULL, NULL, 'j.bechthold@rudersberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(62, 'Stadtverwaltung', 'Ditzingen', 'Stadtverwaltung Ditzingen', 'Am Laien 1', '71254', 'Ditzingen', NULL, NULL, 'bewerbung@ditzingen.de', '0000-00-00', '0000-00-00', '!3ya-#C', 'c696edbd1d7b3e5526f792a8ad35eed2', '2020-05-15 10:53:25', '0000-00-00 00:00:00'), +(63, 'Regierungspräsidium', 'Stuttgart', 'Regierungspräsidium Stuttgart', 'Ruppmannstr. 21', '70565', 'Stuttgart', NULL, NULL, 'Sophie.Spottek@rps.bwl.de', '0000-00-00', '0000-00-00', 'f9Yx6U6', '0d14f34b0a6f52f3d30c4936afa05c6d', '2020-05-18 13:39:56', '0000-00-00 00:00:00'), +(64, 'Stadtverwaltung', 'Tuttlingen', 'Stadtverwaltung Tuttlingen', 'Rathausstr. 1 ', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@tuttlingen.de', '0000-00-00', '0000-00-00', '4cfqa57', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-14 10:54:40', '0000-00-00 00:00:00'), +(65, 'Stadtverwaltung', 'Emmendingen', 'Stadtverwaltung Emmendingen', 'Landvogtei 10', '79312 ', 'Emmendingen', NULL, NULL, 'karriere@emmendingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dst_wunsch` +-- + +CREATE TABLE `bpm_dst_wunsch` ( + `wu_id` int(11) NOT NULL, + `dst_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `datum` datetime NOT NULL, + `mail_text` text NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `status` enum('O','V','F') DEFAULT 'O' COMMENT 'Offen, Versendet, Fehler', + `sendedat` datetime NOT NULL, + `archiv_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_dst_wunsch` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_ergebnisse` +-- + +CREATE TABLE `bpm_ergebnisse` ( + `eg_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tan` varchar(10) NOT NULL, + `satzerg` int(5) NOT NULL, + `analogie` int(5) NOT NULL, + `rechenaufgaben` int(5) NOT NULL, + `zahlenreihen` int(5) NOT NULL, + `rechenzeichen` int(5) NOT NULL, + `matrizen` int(5) NOT NULL, + `merkf` int(5) NOT NULL, + `summe` int(5) NOT NULL, + `bestanden` enum('0','1') NOT NULL COMMENT '1=bestanden, 0=durchgefallen', + `einsicht_dat` datetime NOT NULL COMMENT 'Einsicht des Kandidaten' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_ergebnisse` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_kandidat` +-- + +CREATE TABLE `bpm_kandidat` ( + `ka_id` int(11) NOT NULL, + `anrede` enum('M','W') NOT NULL, + `vorname` varchar(250) NOT NULL, + `nachname` varchar(250) NOT NULL, + `gebdat` date NOT NULL, + `str` varchar(250) NOT NULL, + `plz` varchar(250) NOT NULL, + `ort` varchar(250) NOT NULL, + `alter18` int(1) NOT NULL COMMENT '0=Minderjaehrig; 1=Volljaehrig', + `mail` varchar(250) NOT NULL, + `id` varchar(200) NOT NULL, + `hochschule` enum('Kehl','Ludwigsburg','NA') DEFAULT NULL COMMENT 'Standardhochschule', + `register_dat` datetime NOT NULL, + `modify_dat` datetime NOT NULL, + `remember_mail` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_kandidat` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_note` +-- + +CREATE TABLE `bpm_note` ( + `no_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `hzb` decimal(10,2) NOT NULL, + `hzb_punkte` decimal(10,2) NOT NULL, + `zeugnisschnitt` decimal(10,2) NOT NULL, + `zeugnisschnitt_punkte` decimal(10,2) NOT NULL, + `erfdat_hzb` datetime NOT NULL, + `erfdat_schnitt` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_note` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_parameter` +-- + +CREATE TABLE `bpm_parameter` ( + `pid` int(11) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `wert` varchar(250) NOT NULL, + `sort` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_parameter` +-- + +INSERT INTO `bpm_parameter` (`pid`, `beschreibung`, `wert`, `sort`) VALUES +(1, 'Bei wie viel RestTANs soll eine Warnung per Mail ausgegeben werden.', '50', 0), +(2, 'Mailadresse Lizenzwarnung (Durch Komma getrennt, bei mehreren Mailadressen)', 'zulassung@hs-kehl.de, bewerbungbpm@hs-ludwigsburg.de', 10), +(3, 'IBAN HS-Kehl', 'DE02600501017495530102', 20), +(4, 'BIC HS-Kehl', 'SOLADEST600', 30), +(5, 'IBAN HS-Ludwigsburg', 'DE02600501017495530102', 40), +(6, 'BIC HS-Ludwigsburg', 'SOLADEST600', 50), +(7, 'Mail-Absenderadresse HS-Kehl', 'zulassung@hs-kehl.de', 60), +(8, 'Mail-Absenderadresse HS-Ludwigsburg', 'bewerbungbpm@hs-ludwigsburg.de', 70), +(9, 'Betrag in Euro für die Überweisung', '25,00', 80), +(11, 'Bestehenswert des Eignungstests in Rohwert-Punkten', '66', 90), +(12, 'Maximale Dateigröße pro hochgeladener Datei in Megabyte (MB)', '5', 100), +(13, 'Maximale Anzahl an hochzuladenden PDF-Dokumente pro Bewerber', '10', 110), +(14, 'Maximal Anzahl der zu buchenden Praxisstellen pro Bewerber', '4', 120), +(15, 'Anzahl der letzten Nachrichten im Praxisstellensystem', '10', 130); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_prxnews` +-- + +CREATE TABLE `bpm_prxnews` ( + `pn_id` int(11) NOT NULL, + `pn_headline` varchar(250) NOT NULL, + `pn_text` text NOT NULL, + `pn_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_sonstige_mail` +-- + +CREATE TABLE `bpm_sonstige_mail` ( + `sm_id` int(11) NOT NULL, + `sender` varchar(250) NOT NULL, + `sendermail` varchar(250) NOT NULL, + `ka_id` int(11) NOT NULL, + `empfaenger` varchar(250) NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `mail_text` text NOT NULL, + `status` enum('V','F') NOT NULL, + `sendedat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_sonstige_mail` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_tanpool` +-- + +CREATE TABLE `bpm_tanpool` ( + `tp_id` int(11) NOT NULL, + `dummy_name` varchar(250) NOT NULL, + `dummy_vorname` varchar(250) NOT NULL, + `tan` varchar(10) NOT NULL, + `tinyurl` varchar(200) NOT NULL, + `verw_dat` datetime NOT NULL, + `login_dat` datetime NOT NULL, + `aktiv` enum('A','I') NOT NULL DEFAULT 'A' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_tanpool` +-- + +(1, 'Testuser-bpm', '0367', 'KEFK', 'https://hgf.de/flli', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(2, 'Testuser-bpm', '0465', 'UEFW', 'https://hgf.de/5ln0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(3, 'Testuser-bpm', '0283', '9EHN', 'https://hgf.de/7q54', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(4, 'Testuser-bpm', '0310', 'KEJ3', 'https://hgf.de/okv7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(5, 'Testuser-bpm', '0313', 'UEJJ', 'https://hgf.de/727m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_termine` +-- + +CREATE TABLE `bpm_termine` ( + `tm_id` int(11) NOT NULL, + `tm_datum` datetime NOT NULL, + `tm_standort` enum('K','L') NOT NULL, + `tm_plaetze` int(11) NOT NULL COMMENT 'Anzahl der möglichen Teilnehmer', + `tm_raum` varchar(200) NOT NULL, + `tm_referenznr` varchar(200) NOT NULL COMMENT 'Verwendungszweck Überweisung' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_termine` +-- + +INSERT INTO `bpm_termine` (`tm_id`, `tm_datum`, `tm_standort`, `tm_plaetze`, `tm_raum`, `tm_referenznr`) VALUES +(1, '2020-06-25 10:00:00', 'K', 15, 'Gebäude 1 / R312', '1981600007244'), +(2, '2020-06-17 14:00:00', 'L', 16, '6.123', '2075270024470'), +(3, '2020-06-10 14:00:00', 'L', 16, 'Gebäude 6- Raum 6.123', '2075270024540'), +(4, '2020-07-01 10:00:00', 'L', 16, '5.109/5.110', '2075270024496'), +(5, '2020-07-01 14:00:00', 'L', 16, '5.109/5.110', '2075270024496'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_term_kand` +-- + +CREATE TABLE `bpm_term_kand` ( + `tk_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tm_id` int(11) NOT NULL, + `tp_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_term_kand` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_upload` +-- + +CREATE TABLE `bpm_upload` ( + `up_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `file` varchar(250) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `dok_dat` datetime NOT NULL, + `upload_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_upload` +-- +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_zuordnung_hs` +-- + +CREATE TABLE `bpm_zuordnung_hs` ( + `zu_id` int(11) NOT NULL, + `plz` int(11) NOT NULL, + `ort` varchar(250) NOT NULL, + `landkreis` varchar(250) NOT NULL, + `rp` varchar(250) NOT NULL, + `hs` enum('Ludwigsburg','Kehl') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_zuordnung_hs` +-- + +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(1, 78267, 'Aach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(2, 73430, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(3, 73431, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(4, 73432, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(5, 73433, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(6, 73434, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(7, 74232, 'Abstatt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(8, 73453, 'Abtsgmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(9, 88147, 'Achberg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(10, 77855, 'Achern', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(11, 88480, 'Achstetten', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(12, 73099, 'Adelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(13, 73486, 'Adelmannsfelden', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(14, 74740, 'Adelsheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(15, 71563, 'Affalterbach', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(16, 74858, 'Aglasterhausen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(17, 74744, 'Ahorn', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(18, 73101, 'Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(19, 78733, 'Aichhalden', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(20, 88317, 'Aichstetten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(21, 72631, 'Aichtal', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(22, 73773, 'Aichwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(23, 71134, 'Aidlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(24, 79677, 'Aitern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(25, 88319, 'Aitrach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(26, 79774, 'Albbruck', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(27, 73095, 'Albershausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(28, 72458, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(29, 72459, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(30, 72461, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(31, 78554, 'Aldingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(32, 73553, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(33, 73655, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(34, 78476, 'Allensbach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(35, 88422, 'Alleshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(36, 88348, 'Allmannsweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(37, 89604, 'Allmendingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(38, 71573, 'Allmersbach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(39, 72275, 'Alpirsbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(40, 73776, 'Altbach', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(41, 71155, 'Altdorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(42, 72655, 'Altdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(43, 72657, 'Altenriet', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(44, 72213, 'Altensteig', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(45, 88499, 'Altheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(46, 89605, 'Altheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(47, 89174, 'Altheim (Alb)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(48, 75382, 'Althengstett', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(49, 71566, 'Althütte', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(50, 68804, 'Altlußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(51, 88361, 'Altshausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(52, 72119, 'Ammerbuch', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(53, 73340, 'Amstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(54, 88279, 'Amtzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(55, 74918, 'Angelbachtal', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(56, 77767, 'Appenweier', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(57, 88260, 'Argenbühl', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(58, 71546, 'Aspach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(59, 71679, 'Asperg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(60, 97959, 'Assamstadt', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(61, 89176, 'Asselfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(62, 88448, 'Attenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(63, 79280, 'Au', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(64, 76474, 'Au am Rhein', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(65, 71549, 'Auenwald', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(66, 79424, 'Auggen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(67, 88326, 'Aulendorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(68, 71522, 'Backnang', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(69, 79415, 'Bad Bellingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(70, 73087, 'Bad Boll', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(71, 88422, 'Bad Buchau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(72, 73312, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(73, 73342, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(74, 73345, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(75, 78073, 'Bad Dürrheim', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(76, 76530, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(77, 76532, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(78, 76534, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(79, 79410, 'Badenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(80, 74177, 'Bad Friedrichshall', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(81, 76332, 'Bad Herrenalb', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(82, 79189, 'Bad Krozingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(83, 75378, 'Bad Liebenzell', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(84, 97980, 'Bad Mergentheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(85, 72250, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(86, 77740, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(87, 74906, 'Bad Rappenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(88, 77776, 'Bad Rippoldsau-Schapbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(89, 79713, 'Bad Säckingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(90, 88348, 'Bad Saulgau', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(91, 76669, 'Bad Schönborn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(92, 88427, 'Bad Schussenried', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(93, 75385, 'Bad Teinach-Zavelstein', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(94, 73337, 'Bad Überkingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(95, 72574, 'Bad Urach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(96, 88339, 'Bad Waldsee', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(97, 75323, 'Bad Wildbad', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(98, 74206, 'Bad Wimpfen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(99, 88410, 'Bad Wurzach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(100, 79353, 'Bahlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(101, 88255, 'Baienfurt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(102, 72270, 'Baiersbronn', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(103, 88255, 'Baindt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(104, 78582, 'Balgheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(105, 72336, 'Balingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(106, 89177, 'Ballendorf', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(107, 79282, 'Ballrechten-Dottingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(108, 73666, 'Baltmannsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(109, 88481, 'Balzheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(110, 69245, 'Bammental', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(111, 78580, 'Bärenthal', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(112, 73566, 'Bartholomä', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(113, 71543, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(114, 71717, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(115, 89179, 'Beimerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(116, 72658, 'Bempflingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(117, 71726, 'Benningen am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(118, 88276, 'Berg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(119, 88368, 'Bergatreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(120, 77791, 'Berghaupten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(121, 89180, 'Berghülen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(122, 73663, 'Berglen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(123, 88450, 'Berkheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(124, 88697, 'Bermatingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(125, 79872, 'Bernau im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(126, 89182, 'Bernstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(127, 74354, 'Besigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(128, 88422, 'Betzenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(129, 72660, 'Beuren', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(130, 88631, 'Beuron', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(131, 77781, 'Biberach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(132, 88400, 'Biberach an der Riß', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(133, 79215, 'Biederbach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(134, 76467, 'Bietigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(135, 74321, 'Bietigheim-Bissingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(136, 74842, 'Billigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(137, 74862, 'Binau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(138, 72511, 'Bingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(139, 79589, 'Binzen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(140, 73102, 'Birenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(141, 75217, 'Birkenfeld', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(142, 76476, 'Bischweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(143, 72406, 'Bisingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(144, 73266, 'Bissingen an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(145, 72475, 'Bitz', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(146, 89143, 'Blaubeuren', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(147, 74572, 'Blaufelden', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(148, 89134, 'Blaustein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(149, 78176, 'Blumberg', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(150, 73560, 'Böbingen an der Rems', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(151, 71032, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(152, 71034, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(153, 72411, 'Bodelshausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(154, 78351, 'Bodman-Ludwigshafen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(155, 88285, 'Bodnegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(156, 89558, 'Böhmenkirch', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(157, 79677, 'Böllen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(158, 79283, 'Bollschweil', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(159, 88361, 'Boms', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(160, 71149, 'Bondorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(161, 79848, 'Bonndorf im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(162, 74357, 'Bönnigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(163, 73441, 'Bopfingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(164, 89177, 'Börslingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(165, 73104, 'Börtlingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(166, 78662, 'Bösingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(167, 78583, 'Böttingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(168, 79268, 'Bötzingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(169, 97944, 'Boxberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(170, 74336, 'Brackenheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(171, 78199, 'Bräunlingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(172, 74542, 'Braunsbach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(173, 79206, 'Breisach am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(174, 89183, 'Breitingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(175, 79874, 'Breitnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(176, 75015, 'Bretten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(177, 74626, 'Bretzfeld', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(178, 78086, 'Brigachtal', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(179, 76646, 'Bruchsal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(180, 68782, 'Brühl', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(181, 78585, 'Bubsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(182, 79256, 'Buchenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(183, 74722, 'Buchen (Odenwald)', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(184, 78567, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(185, 88637, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Ludwigsburg'), +(186, 79426, 'Buggingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(187, 77815, 'Bühl', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(188, 77830, 'Bühlertal', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(189, 74424, 'Bühlertann', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(190, 74426, 'Bühlerzell', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(191, 88483, 'Burgrieden', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(192, 71576, 'Burgstetten', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(193, 72393, 'Burladingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(194, 78266, 'Büsingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(195, 75365, 'Calw', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(196, 74389, 'Cleebronn', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(197, 74564, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(198, 74597, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(199, 97993, 'Creglingen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(200, 79837, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(201, 79875, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(202, 88718, 'Daisendorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(203, 78083, 'Dauchingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(204, 72356, 'Dautmergen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(205, 75392, 'Deckenpfronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(206, 88693, 'Deggenhausertal', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(207, 73312, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(208, 73326, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(209, 78586, 'Deilingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(210, 78652, 'Deißlingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(211, 73779, 'Deizisau', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(212, 73770, 'Denkendorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(213, 78554, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(214, 78588, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(215, 79211, 'Denzlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(216, 72135, 'Dettenhausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(217, 76706, 'Dettenheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(218, 79802, 'Dettighofen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(219, 72581, 'Dettingen an der Erms', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(220, 88451, 'Dettingen an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(221, 73265, 'Dettingen unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(222, 69234, 'Dielheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(223, 89165, 'Dietenheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(224, 78661, 'Dietingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(225, 89561, 'Dischingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(226, 71254, 'Ditzingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(227, 75335, 'Dobel', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(228, 79804, 'Dogern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(229, 78166, 'Donaueschingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(230, 73072, 'Donzdorf', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(231, 72358, 'Dormettingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(232, 72175, 'Dornhan', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(233, 89160, 'Dornstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(234, 72280, 'Dornstetten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(235, 74677, 'Dörzbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(236, 69221, 'Dossenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(237, 72359, 'Dotternhausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(238, 73345, 'Drackenstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(239, 78655, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(240, 78713, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(241, 77770, 'Durbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(242, 78589, 'Dürbheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(243, 78591, 'Durchhausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(244, 73568, 'Durlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(245, 88525, 'Dürmentingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(246, 76448, 'Durmersheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(247, 73105, 'Dürnau', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(248, 88422, 'Dürnau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(249, 72144, 'Dußlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(250, 88370, 'Ebenweiler', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(251, 64754, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(252, 69412, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(253, 69429, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(254, 69434, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(255, 71735, 'Eberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(256, 88436, 'Eberhardzell', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(257, 73061, 'Ebersbach an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(258, 88371, 'Ebersbach-Musbach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(259, 74246, 'Eberstadt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(260, 72224, 'Ebhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(261, 79285, 'Ebringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(262, 68535, 'Edingen-Neckarhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(263, 79588, 'Efringen-Kirchen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(264, 72227, 'Egenhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(265, 78592, 'Egesheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(266, 76344, 'Eggenstein-Leopoldshafen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(267, 79805, 'Eggingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(268, 89584, 'Ehingen (Donau)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(269, 71139, 'Ehningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(270, 79238, 'Ehrenkirchen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(271, 88361, 'Eichstegen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(272, 79356, 'Eichstetten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(273, 78253, 'Eigeltingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(274, 79591, 'Eimeldingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(275, 79871, 'Eisenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(276, 75239, 'Eisingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(277, 73054, 'Eislingen/Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(278, 76477, 'Elchesheim-Illingen', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(279, 73488, 'Ellenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(280, 74248, 'Ellhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(281, 73479, 'Ellwangen (Jagst)', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(282, 79215, 'Elzach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(283, 74834, 'Elztal', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(284, 88499, 'Emeringen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(285, 89607, 'Emerkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(286, 79312, 'Emmendingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(287, 78576, 'Emmingen-Liptingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(288, 72186, 'Empfingen', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(289, 79346, 'Endingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(290, 75331, 'Engelsbrand', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(291, 78234, 'Engen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(292, 72829, 'Engstingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(293, 72800, 'Eningen unter Achalm', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(294, 75337, 'Enzklösterle', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(295, 74925, 'Epfenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(296, 78736, 'Epfendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(297, 69214, 'Eppelheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(298, 75031, 'Eppingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(299, 89155, 'Erbach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(300, 71729, 'Erdmannhausen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(301, 88097, 'Eriskirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(302, 73268, 'Erkenbrechtsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(303, 74235, 'Erlenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(304, 88416, 'Erlenmoos', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(305, 74391, 'Erligheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(306, 88453, 'Erolzheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(307, 88521, 'Ertingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(308, 73569, 'Eschach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(309, 79427, 'Eschbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(310, 78664, 'Eschbronn', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(311, 74927, 'Eschelbronn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(312, 73037, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(313, 73107, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(314, 73457, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(315, 73563, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(316, 73566, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(317, 73728, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(318, 73730, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(319, 73732, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(320, 73733, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(321, 73734, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(322, 77955, 'Ettenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(323, 76275, 'Ettlingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(324, 72184, 'Eutingen im Gäu', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(325, 74864, 'Fahrenbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(326, 79868, 'Feldberg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(327, 70734, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(328, 70736, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(329, 74579, 'Fichtenau', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(330, 74427, 'Fichtenberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(331, 70794, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(332, 71111, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(333, 77716, 'Fischerbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(334, 79592, 'Fischingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(335, 74223, 'Flein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(336, 88373, 'Fleischwangen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(337, 78737, 'Fluorn-Winzeln', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(338, 76596, 'Forbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(339, 79362, 'Forchheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(340, 74670, 'Forchtenberg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(341, 76694, 'Forst', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(342, 74586, 'Frankenhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(343, 79348, 'Freiamt', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(344, 71691, 'Freiberg am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(345, 79098, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(346, 79100, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(347, 79102, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(348, 79104, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(349, 79106, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(350, 79108, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(351, 79110, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(352, 79111, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(353, 79112, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(354, 79114, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(355, 79115, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(356, 79117, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(357, 97896, 'Freudenberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(358, 72250, 'Freudenstadt', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(359, 74392, 'Freudental', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(360, 72636, 'Frickenhausen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(361, 88699, 'Frickingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(362, 78567, 'Fridingen an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(363, 79877, 'Friedenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(364, 88045, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(365, 88046, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(366, 88048, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(367, 77948, 'Friesenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(368, 71292, 'Friolzheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(369, 78665, 'Frittlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(370, 79677, 'Fröhnd', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(371, 88273, 'Fronreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(372, 78120, 'Furtwangen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(373, 76571, 'Gaggenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(374, 69251, 'Gaiberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(375, 78343, 'Gaienhofen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(376, 74405, 'Gaildorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(377, 78262, 'Gailingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(378, 73108, 'Gammelshausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(379, 72501, 'Gammertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(380, 71116, 'Gärtringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(381, 71126, 'Gäufelden', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(382, 75391, 'Gechingen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(383, 78187, 'Geisingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(384, 72351, 'Geislingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(385, 73312, 'Geislingen an der Steige', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(386, 75050, 'Gemmingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(387, 74376, 'Gemmrigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(388, 77723, 'Gengenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(389, 74582, 'Gerabronn', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(390, 70839, 'Gerlingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(391, 76593, 'Gernsbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(392, 89547, 'Gerstetten', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(393, 89522, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(394, 89537, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(395, 73333, 'Gingen an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(396, 72293, 'Glatten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(397, 79286, 'Glottertal', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(398, 73571, 'Göggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(399, 72532, 'Gomadingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(400, 72810, 'Gomaringen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(401, 75053, 'Gondelsheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(402, 73033, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(403, 73035, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(404, 73037, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(405, 73116, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(406, 79733, 'Görwihl', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(407, 78559, 'Gosheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(408, 79288, 'Gottenheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(409, 78244, 'Gottmadingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(410, 76676, 'Graben-Neudorf', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(411, 72582, 'Grabenstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(412, 71120, 'Grafenau', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(413, 72661, 'Grafenberg', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(414, 79865, 'Grafenhausen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(415, 79639, 'Grenzach-Wyhlen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(416, 89608, 'Griesingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(417, 72294, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(418, 72297, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(419, 72663, 'Großbettlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(420, 71723, 'Großbottwar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(421, 72415, 'Grosselfingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(422, 71577, 'Großerlach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(423, 97950, 'Großrinderfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(424, 73344, 'Gruibingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(425, 89613, 'Grundsheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(426, 88287, 'Grünkraut', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(427, 97947, 'Grünsfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(428, 74417, 'Gschwend', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(429, 88379, 'Guggenhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(430, 74363, 'Güglingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(431, 79194, 'Gundelfingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(432, 74831, 'Gundelsheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(433, 78594, 'Gunningen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(434, 79261, 'Gutach im Breisgau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(435, 77793, 'Gutach (Schwarzwaldbahn)', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(436, 78148, 'Gütenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(437, 88484, 'Gutenzell-Hürbel', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(438, 79685, 'Häg-Ehrsberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(439, 88709, 'Hagnau am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(440, 72401, 'Haigerloch', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(441, 72221, 'Haiterbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(442, 76707, 'Hambrücken', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(443, 74736, 'Hardheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(444, 78739, 'Hardt', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(445, 74239, 'Hardthausen am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(446, 79258, 'Hartheim am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(447, 79686, 'Hasel', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(448, 77716, 'Haslach im Kinzigtal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(449, 74855, 'Haßmersheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(450, 73110, 'Hattenhofen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(451, 77756, 'Hausach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(452, 89597, 'Hausen am Bussen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(453, 72361, 'Hausen am Tann', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(454, 79688, 'Hausen im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(455, 78595, 'Hausen ob Verena', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(456, 79837, 'Häusern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(457, 72534, 'Hayingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(458, 72379, 'Hechingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(459, 69434, 'Heddesbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(460, 68542, 'Heddesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(461, 69115, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(462, 69117, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(463, 69118, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(464, 69120, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(465, 69121, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(466, 69123, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(467, 69124, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(468, 69126, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(469, 89518, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(470, 89520, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(471, 89522, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(472, 74072, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(473, 74074, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(474, 74076, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(475, 74078, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(476, 74080, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(477, 74081, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(478, 88633, 'Heiligenberg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(479, 69253, 'Heiligkreuzsteinach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(480, 71296, 'Heimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(481, 73037, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(482, 73092, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(483, 73107, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(484, 79423, 'Heitersheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(485, 74921, 'Helmstadt-Bargen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(486, 71282, 'Hemmingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(487, 69502, 'Hemsbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(488, 88518, 'Herbertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(489, 79336, 'Herbolzheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(490, 89542, 'Herbrechtingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(491, 88634, 'Herdwangen-Schönach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(492, 89537, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(493, 89568, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(494, 72535, 'Heroldstatt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(495, 71083, 'Herrenberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(496, 79737, 'Herrischried', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(497, 74394, 'Hessigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(498, 72513, 'Hettingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(499, 73540, 'Heubach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(500, 73572, 'Heuchlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(501, 79194, 'Heuweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(502, 71157, 'Hildrizhausen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(503, 78247, 'Hilzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(504, 79856, 'Hinterzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(505, 72145, 'Hirrlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(506, 69493, 'Hirschberg an der Bergstraße', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(507, 73269, 'Hochdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(508, 88436, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(509, 88454, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(510, 79862, 'Höchenschwand', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(511, 68766, 'Hockenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(512, 75339, 'Höfen an der Enz', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(513, 77716, 'Hofstetten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(514, 77749, 'Hohberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(515, 78355, 'Hohenfels', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(516, 73345, 'Hohenstadt', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(517, 72531, 'Hohenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(518, 88367, 'Hohentengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(519, 79801, 'Hohentengen am Hochrhein', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(520, 71088, 'Holzgerlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(521, 89183, 'Holzkirch', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(522, 73271, 'Holzmaden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(523, 74746, 'Höpfingen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(524, 72160, 'Horb am Neckar', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(525, 79289, 'Horben', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(526, 88263, 'Horgenzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(527, 78132, 'Hornberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(528, 88374, 'Hoßkirch', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(529, 74928, 'Hüffenhardt', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(530, 78183, 'Hüfingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(531, 76549, 'Hügelsheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(532, 72584, 'Hülben', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(533, 89185, 'Hüttisheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(534, 73434, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(535, 73453, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(536, 73460, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(537, 79837, 'Ibach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(538, 76473, 'Iffezheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(539, 97999, 'Igersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(540, 73574, 'Iggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(541, 79241, 'Ihringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(542, 89171, 'Illerkirchberg', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(543, 89186, 'Illerrieden', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(544, 75428, 'Illingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(545, 88636, 'Illmensee', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(546, 74360, 'Ilsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(547, 74532, 'Ilshofen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(548, 68549, 'Ilvesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(549, 78194, 'Immendingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(550, 88090, 'Immenstaad am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(551, 74653, 'Ingelfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(552, 74379, 'Ingersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(553, 88456, 'Ingoldingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(554, 72514, 'Inzigkofen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(555, 79594, 'Inzlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(556, 78597, 'Irndorf', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(557, 88316, 'Isny im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(558, 75228, 'Ispringen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(559, 74930, 'Ittlingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(560, 74249, 'Jagsthausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(561, 73489, 'Jagstzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(562, 79798, 'Jestetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(563, 71131, 'Jettingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(564, 72417, 'Jungingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(565, 73553, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(566, 73642, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(567, 73667, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(568, 75236, 'Kämpfelbach', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(569, 79400, 'Kandern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(570, 88422, 'Kanzach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(571, 77966, 'Kappel-Grafenhausen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(572, 77876, 'Kappelrodeck', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(573, 76307, 'Karlsbad', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(574, 76689, 'Karlsdorf-Neuthard', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(575, 76131, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(576, 76133, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(577, 76135, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(578, 76137, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(579, 76139, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(580, 76149, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(581, 76185, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(582, 76187, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(583, 76189, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(584, 76199, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(585, 76227, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(586, 76228, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(587, 76229, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(588, 77694, 'Kehl', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(589, 75210, 'Keltern', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(590, 79341, 'Kenzingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(591, 71394, 'Kernen im Remstal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(592, 68775, 'Ketsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(593, 75249, 'Kieselbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(594, 77971, 'Kippenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(595, 74912, 'Kirchardt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(596, 88486, 'Kirchberg an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(597, 74592, 'Kirchberg an der Jagst', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(598, 71737, 'Kirchberg an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(599, 88457, 'Kirchdorf an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(600, 72138, 'Kirchentellinsfurt', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(601, 74366, 'Kirchheim am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(602, 73467, 'Kirchheim am Ries', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(603, 73230, 'Kirchheim unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(604, 79199, 'Kirchzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(605, 88353, 'Kißlegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(606, 79692, 'Kleines Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(607, 79771, 'Klettgau', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(608, 75438, 'Knittlingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(609, 72664, 'Kohlberg', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(610, 78600, 'Kolbingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(611, 73257, 'Köngen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(612, 97953, 'Königheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(613, 75203, 'Königsbach-Stein', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(614, 89551, 'Königsbronn', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(615, 88376, 'Königseggwald', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(616, 78126, 'Königsfeld im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(617, 78598, 'Königsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(618, 78462, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(619, 78464, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(620, 78465, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(621, 78467, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(622, 71404, 'Korb', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(623, 70825, 'Korntal-Münchingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(624, 70806, 'Kornwestheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(625, 76703, 'Kraichtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(626, 72505, 'Krauchenwies', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(627, 74238, 'Krautheim', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(628, 74594, 'Kreßberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(629, 88079, 'Kressbronn am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(630, 76709, 'Kronau', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(631, 73329, 'Kuchen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(632, 97900, 'Külsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(633, 74653, 'Künzelsau', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(634, 74635, 'Kupferzell', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(635, 76456, 'Kuppenheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(636, 75057, 'Kürnbach', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(637, 79790, 'Küssaberg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(638, 72127, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(639, 72138, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(640, 68526, 'Ladenburg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(641, 77933, 'Lahr/Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(642, 89150, 'Laichingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(643, 88085, 'Langenargen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(644, 89129, 'Langenau', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(645, 74243, 'Langenbrettach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(646, 74595, 'Langenburg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(647, 88515, 'Langenenslingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(648, 73466, 'Lauchheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(649, 79787, 'Lauchringen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(650, 97922, 'Lauda-Königshofen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(651, 69514, 'Laudenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(652, 77886, 'Lauf', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(653, 79725, 'Laufenburg (Baden)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(654, 74348, 'Lauffen am Neckar', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(655, 88471, 'Laupheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(656, 77794, 'Lautenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(657, 89584, 'Lauterach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(658, 78730, 'Lauterbach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(659, 73111, 'Lauterstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(660, 74251, 'Lehrensteinsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(661, 88637, 'Leibertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(662, 69181, 'Leimen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(663, 70771, 'Leinfelden-Echterdingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(664, 74211, 'Leingarten', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(665, 73575, 'Leinzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(666, 73252, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(667, 73266, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(668, 79853, 'Lenzkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(669, 71229, 'Leonberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(670, 71397, 'Leutenbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(671, 88299, 'Leutkirch im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(672, 77839, 'Lichtenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(673, 72805, 'Lichtenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(674, 73669, 'Lichtenwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(675, 74838, 'Limbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(676, 76351, 'Linkenheim-Hochstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(677, 74931, 'Lobbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(678, 74369, 'Löchgau', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(679, 76597, 'Loffenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(680, 79843, 'Löffingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(681, 89173, 'Lonsee', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(682, 73547, 'Lorch', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(683, 79539, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(684, 79540, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(685, 79541, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(686, 72290, 'Loßburg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(687, 79807, 'Lottstetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(688, 74245, 'Löwenstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'); +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(689, 71634, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(690, 71636, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(691, 71638, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(692, 71640, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(693, 71642, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(694, 71672, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(695, 71106, 'Magstadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(696, 77972, 'Mahlberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(697, 78601, 'Mahlstetten', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(698, 74535, 'Mainhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(699, 79429, 'Malsburg-Marzell', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(700, 69254, 'Malsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(701, 76316, 'Malsch', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(702, 79364, 'Malterdingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(703, 68159, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(704, 68161, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(705, 68163, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(706, 68165, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(707, 68167, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(708, 68169, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(709, 68199, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(710, 68219, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(711, 68229, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(712, 68239, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(713, 68259, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(714, 68305, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(715, 68307, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(716, 68309, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(717, 71672, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(718, 71711, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(719, 79232, 'March', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(720, 88677, 'Markdorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(721, 71706, 'Markgröningen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(722, 76359, 'Marxzell', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(723, 88437, 'Maselheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(724, 74252, 'Massenbachhausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(725, 69256, 'Mauer', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(726, 75433, 'Maulbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(727, 79689, 'Maulburg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(728, 88074, 'Meckenbeuren', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(729, 74909, 'Meckesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(730, 88709, 'Meersburg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(731, 72537, 'Mehrstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(732, 77974, 'Meißenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(733, 88512, 'Mengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(734, 79291, 'Merdingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(735, 89188, 'Merklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(736, 79249, 'Merzhausen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(737, 88605, 'Meßkirch', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(738, 72469, 'Meßstetten', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(739, 72555, 'Metzingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(740, 74544, 'Michelbach an der Bilz', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(741, 74545, 'Michelfeld', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(742, 88487, 'Mietingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(743, 88441, 'Mittelbiberach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(744, 74219, 'Möckmühl', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(745, 73563, 'Mögglingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(746, 71696, 'Möglingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(747, 78087, 'Mönchweiler', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(748, 71297, 'Mönsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(749, 78345, 'Moos', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(750, 88422, 'Moosburg', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(751, 74821, 'Mosbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(752, 72116, 'Mössingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(753, 71159, 'Mötzingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(754, 69427, 'Mudau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(755, 76461, 'Muggensturm', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(756, 75417, 'Mühlacker', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(757, 77796, 'Mühlenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(758, 69242, 'Mühlhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(759, 78259, 'Mühlhausen-Ehingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(760, 73347, 'Mühlhausen im Täle', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(761, 78570, 'Mühlheim an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(762, 78357, 'Mühlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(763, 74673, 'Mulfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(764, 79379, 'Müllheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(765, 74395, 'Mundelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(766, 89597, 'Munderkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(767, 72525, 'Münsingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(768, 79244, 'Münstertal/Schwarzwald', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(769, 79730, 'Murg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(770, 71711, 'Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(771, 71540, 'Murrhardt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(772, 73557, 'Mutlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(773, 72202, 'Nagold', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(774, 89564, 'Nattheim', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(775, 74924, 'Neckarbischofsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(776, 69151, 'Neckargemünd', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(777, 69437, 'Neckargerach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(778, 74172, 'Neckarsulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(779, 72666, 'Neckartailfingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(780, 72654, 'Neckartenzlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(781, 74382, 'Neckarwestheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(782, 74865, 'Neckarzimmern', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(783, 89189, 'Neenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(784, 72147, 'Nehren', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(785, 74933, 'Neidenstein', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(786, 73272, 'Neidlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(787, 89191, 'Nellingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(788, 89129, 'Nerenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(789, 73450, 'Neresheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(790, 75385, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(791, 75387, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(792, 74861, 'Neudenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(793, 75305, 'Neuenbürg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(794, 79395, 'Neuenburg am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(795, 74196, 'Neuenstadt am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(796, 74632, 'Neuenstein', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(797, 72639, 'Neuffen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(798, 72419, 'Neufra', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(799, 75242, 'Neuhausen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(800, 73765, 'Neuhausen auf den Fildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(801, 78579, 'Neuhausen ob Eck', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(802, 88099, 'Neukirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(803, 73491, 'Neuler', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(804, 75245, 'Neulingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(805, 68809, 'Neulußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(806, 74867, 'Neunkirchen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(807, 77743, 'Neuried', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(808, 72149, 'Neustetten', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(809, 75389, 'Neuweiler', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(810, 78078, 'Niedereschach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(811, 74676, 'Niedernhall', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(812, 97996, 'Niederstetten', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(813, 89168, 'Niederstotzingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(814, 75223, 'Niefern-Öschelbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(815, 74226, 'Nordheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(816, 77787, 'Nordrach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(817, 73274, 'Notzingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(818, 71154, 'Nufringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(819, 72622, 'Nürtingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(820, 72362, 'Nusplingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(821, 69226, 'Nußloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(822, 72644, 'Oberboihingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(823, 75038, 'Oberderdingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(824, 89610, 'Oberdischingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(825, 73569, 'Obergröningen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(826, 77784, 'Oberharmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(827, 68794, 'Oberhausen-Rheinhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(828, 77704, 'Oberkirch', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(829, 73447, 'Oberkochen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(830, 89611, 'Obermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(831, 78727, 'Oberndorf am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(832, 72364, 'Obernheim', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(833, 75394, 'Oberreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(834, 79254, 'Oberried', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(835, 71739, 'Oberriexingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(836, 74420, 'Oberrot', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(837, 74423, 'Obersontheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(838, 89613, 'Oberstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(839, 71720, 'Oberstenfeld', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(840, 74182, 'Obersulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(841, 88094, 'Oberteuringen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(842, 77709, 'Oberwolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(843, 74847, 'Obrigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(844, 88416, 'Ochsenhausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(845, 74229, 'Oedheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(846, 74254, 'Offenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(847, 77652, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(848, 77654, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(849, 77656, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(850, 72131, 'Ofterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(851, 68723, 'Oftersheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(852, 88422, 'Oggelshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(853, 77797, 'Ohlsbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(854, 73275, 'Ohmden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(855, 78337, 'Öhningen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(856, 74613, 'Öhringen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(857, 75248, 'Ölbronn-Dürrn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(858, 89129, 'Öllingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(859, 89614, 'Öpfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(860, 77728, 'Oppenau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(861, 71560, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(862, 71570, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(863, 78359, 'Orsingen-Nenzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(864, 77799, 'Ortenberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(865, 75395, 'Ostelsheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(866, 74706, 'Osterburken', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(867, 73760, 'Ostfildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(868, 88356, 'Ostrach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(869, 76684, 'Östringen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(870, 76470, 'Ötigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(871, 75443, 'Ötisheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(872, 73113, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(873, 73529, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(874, 77883, 'Ottenhöfen im Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(875, 77833, 'Ottersweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(876, 73277, 'Owen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(877, 88696, 'Owingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(878, 74397, 'Pfaffenhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(879, 79292, 'Pfaffenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(880, 72285, 'Pfalzgrafenweiler', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(881, 74629, 'Pfedelbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(882, 76327, 'Pfinztal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(883, 75172, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(884, 75173, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(885, 75175, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(886, 75177, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(887, 75179, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(888, 75180, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(889, 75181, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(890, 72539, 'Pfronstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(891, 88630, 'Pfullendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(892, 72793, 'Pfullingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(893, 76661, 'Philippsburg', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(894, 68723, 'Plankstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(895, 74385, 'Pleidelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(896, 72124, 'Pliezhausen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(897, 73207, 'Plochingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(898, 73642, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(899, 73655, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(900, 78315, 'Radolfzell', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(901, 73492, 'Rainau', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(902, 89192, 'Rammingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(903, 72414, 'Rangendingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(904, 76437, 'Rastatt', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(905, 72365, 'Ratshausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(906, 69231, 'Rauenberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(907, 88212, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(908, 88213, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(909, 88214, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(910, 74747, 'Ravenstein', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(911, 73098, 'Rechberghausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(912, 89611, 'Rechtenstein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(913, 74934, 'Reichartshausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(914, 78479, 'Reichenau', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(915, 78564, 'Reichenbach am Heuberg', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(916, 73262, 'Reichenbach an der Fils', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(917, 68799, 'Reilingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(918, 75196, 'Remchingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(919, 71686, 'Remseck am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(920, 73630, 'Remshalden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(921, 77871, 'Renchen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(922, 71272, 'Renningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(923, 78603, 'Renquishausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(924, 79276, 'Reute', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(925, 72760, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(926, 72762, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(927, 72764, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(928, 72766, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(929, 72768, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(930, 72770, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(931, 77866, 'Rheinau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(932, 79618, 'Rheinfelden (Baden)', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(933, 79365, 'Rheinhausen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(934, 77836, 'Rheinmünster', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(935, 76287, 'Rheinstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(936, 79736, 'Rickenbach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(937, 72585, 'Riederich', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(938, 88377, 'Riedhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(939, 88499, 'Riedlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(940, 79359, 'Riegel', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(941, 78239, 'Rielasingen-Worblingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(942, 73469, 'Riesbürg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(943, 78604, 'Rietheim-Weilheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(944, 77975, 'Ringsheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(945, 72229, 'Rohrdorf', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(946, 74255, 'Roigheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(947, 72587, 'Römerstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(948, 74749, 'Rosenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(949, 73494, 'Rosenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(950, 72348, 'Rosenfeld', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(951, 74538, 'Rosengarten', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(952, 74585, 'Rot am See', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(953, 88430, 'Rot an der Rot', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(954, 89616, 'Rottenacker', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(955, 72108, 'Rottenburg am Neckar', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(956, 78628, 'Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(957, 73635, 'Rudersberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(958, 79595, 'Rümmingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(959, 73577, 'Ruppertshofen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(960, 77977, 'Rust', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(961, 71277, 'Rutesheim', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(962, 74343, 'Sachsenheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(963, 73084, 'Salach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(964, 88682, 'Salem', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(965, 69207, 'Sandhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(966, 79271, 'Sankt Peter', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(967, 77880, 'Sasbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(968, 79361, 'Sasbach am Kaiserstuhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(969, 77887, 'Sasbachwalden', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(970, 74589, 'Satteldorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(971, 88605, 'Sauldorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(972, 79597, 'Schallbach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(973, 79227, 'Schallstadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(974, 73579, 'Schechingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(975, 72516, 'Scheer', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(976, 74850, 'Schefflenz', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(977, 89601, 'Schelklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(978, 88433, 'Schemmerhofen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(979, 77773, 'Schenkenzell', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(980, 77761, 'Schiltach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(981, 72667, 'Schlaitdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(982, 73114, 'Schlat', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(983, 79418, 'Schliengen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(984, 88281, 'Schlier', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(985, 73278, 'Schlierbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(986, 79859, 'Schluchsee', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(987, 89194, 'Schnürpflingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(988, 75328, 'Schömberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(989, 72355, 'Schömberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(990, 78136, 'Schonach im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(991, 71101, 'Schönaich', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(992, 69250, 'Schönau', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(993, 79677, 'Schönau im Schwarzwald', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(994, 69436, 'Schönbrunn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(995, 79677, 'Schönenberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(996, 74214, 'Schöntal', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(997, 78141, 'Schönwald im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(998, 79650, 'Schopfheim', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(999, 72296, 'Schopfloch', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1000, 73614, 'Schorndorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1001, 78144, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1002, 78713, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1003, 69198, 'Schriesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1004, 74575, 'Schrozberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1005, 77978, 'Schuttertal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1006, 77746, 'Schutterwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1007, 73072, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1008, 73525, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1009, 73527, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1010, 73529, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1011, 73550, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1012, 73553, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1013, 74523, 'Schwäbisch Hall', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1014, 74193, 'Schwaigern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1015, 71409, 'Schwaikheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1016, 77963, 'Schwanau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1017, 74869, 'Schwarzach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1018, 88477, 'Schwendi', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1019, 72477, 'Schwenningen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1020, 68723, 'Schwetzingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1021, 71701, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1022, 71706, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1023, 79739, 'Schwörstadt', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1024, 74743, 'Seckach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1025, 77889, 'Seebach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1026, 88422, 'Seekirch', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1027, 77960, 'Seelbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1028, 72297, 'Seewald', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1029, 78606, 'Seitingen-Oberflacht', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1030, 74372, 'Sersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1031, 89129, 'Setzingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1032, 79350, 'Sexau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1033, 74936, 'Siegelsbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1034, 72488, 'Sigmaringen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1035, 72517, 'Sigmaringendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1036, 72226, 'Simmersfeld', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1037, 75397, 'Simmozheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1038, 79263, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1039, 79271, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1040, 71063, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1041, 71065, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1042, 71067, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1043, 71069, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1044, 78224, 'Singen (Hohentwiel)', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1045, 74889, 'Sinsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1046, 76547, 'Sinzheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1047, 78354, 'Sipplingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1048, 79294, 'Sölden', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1049, 72820, 'Sonnenbühl', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1050, 89567, 'Sontheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1051, 78549, 'Spaichingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1052, 74937, 'Spechbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1053, 71579, 'Spiegelberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1054, 73565, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1055, 73568, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1056, 73577, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1057, 89195, 'Staig', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1058, 72181, 'Starzach', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1059, 79219, 'Staufen im Breisgau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1060, 79837, 'St. Blasien', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1061, 79252, 'Stegen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1062, 77790, 'Steinach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1063, 79585, 'Steinen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1064, 71144, 'Steinenbronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1065, 88416, 'Steinhausen an der Rottum', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1066, 73566, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1067, 89555, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1068, 71711, 'Steinheim an der Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1069, 76479, 'Steinmauern', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1070, 78256, 'Steißlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1071, 75447, 'Sternenfels', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1072, 88719, 'Stetten', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1073, 72510, 'Stetten am kalten Markt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1074, 78112, 'St. Georgen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1075, 74597, 'Stimpfach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1076, 72813, 'St. Johann', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1077, 68789, 'St. Leon-Rot', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1078, 79274, 'St. Märgen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1079, 78333, 'Stockach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1080, 73495, 'Stödtlen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1081, 72479, 'Straßberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1082, 75334, 'Straubenhardt', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1083, 79780, 'Stühlingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1084, 76297, 'Stutensee', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1085, 70173, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1086, 70174, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1087, 70176, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1088, 70178, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1089, 70180, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1090, 70182, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1091, 70184, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1092, 70186, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1093, 70188, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1094, 70190, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1095, 70191, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1096, 70192, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1097, 70193, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1098, 70195, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1099, 70197, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1100, 70199, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1101, 70327, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1102, 70329, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1103, 70372, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1104, 70374, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1105, 70376, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1106, 70378, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1107, 70435, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1108, 70437, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1109, 70439, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1110, 70469, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1111, 70499, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1112, 70563, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1113, 70565, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1114, 70567, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1115, 70569, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1116, 70597, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1117, 70599, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1118, 70619, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1119, 70629, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1120, 72172, 'Sulz am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1121, 71560, 'Sulzbach an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1122, 74429, 'Sulzbach-Laufen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1123, 79295, 'Sulzburg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1124, 75056, 'Sulzfeld', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1125, 73079, 'Süßen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1126, 73527, 'Täferrot', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1127, 74388, 'Talheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1128, 78607, 'Talheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1129, 71732, 'Tamm', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1130, 73497, 'Tannhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1131, 88459, 'Tannheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1132, 97941, 'Tauberbischofsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1133, 78250, 'Tengen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1134, 79312, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1135, 79331, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1136, 88069, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1137, 88079, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1138, 88422, 'Tiefenbach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1139, 75233, 'Tiefenbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1140, 79822, 'Titisee-Neustadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1141, 79682, 'Todtmoos', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1142, 79674, 'Todtnau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1143, 78098, 'Triberg im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1144, 72818, 'Trochtelfingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1145, 78647, 'Trossingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1146, 72070, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1147, 72072, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1148, 72074, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1149, 72076, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1150, 79677, 'Tunau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1151, 78609, 'Tuningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1152, 78532, 'Tuttlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1153, 88662, 'Überlingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1154, 76698, 'Ubstadt-Weiher', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1155, 73066, 'Uhingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1156, 88690, 'Uhldingen-Mühlhofen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1157, 79777, 'Ühlingen-Birkendorf', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1158, 89073, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1159, 89075, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1160, 89077, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1161, 89079, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1162, 89081, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1163, 89160, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1164, 79224, 'Umkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1165, 88444, 'Ummendorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1166, 88527, 'Unlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1167, 74257, 'Untereisesheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1168, 72669, 'Unterensingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1169, 74199, 'Untergruppenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1170, 78089, 'Unterkirnach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1171, 89617, 'Untermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1172, 74547, 'Untermünkheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1173, 75399, 'Unterreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1174, 73485, 'Unterschneidheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1175, 89619, 'Unterstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1176, 89597, 'Unterwachingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1177, 88379, 'Unterwaldhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1178, 73655, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1179, 73660, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1180, 88524, 'Uttenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1181, 79694, 'Utzenfeld', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1182, 71665, 'Vaihingen an der Enz', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1183, 74541, 'Vellberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1184, 72519, 'Veringenstadt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1185, 78667, 'Villingendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1186, 78048, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1187, 78050, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1188, 78052, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1189, 78054, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1190, 78056, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1191, 88267, 'Vogt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1192, 79235, 'Vogtsburg im Kaiserstuhl', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1193, 78147, 'Vöhrenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1194, 72189, 'Vöhringen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1195, 78269, 'Volkertshausen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1196, 79279, 'Vörstetten', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1197, 68753, 'Waghäusel', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1198, 71332, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1199, 71334, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1200, 71336, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1201, 74915, 'Waibstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1202, 88489, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1203, 89165, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1204, 88639, 'Wald', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1205, 72178, 'Waldachtal', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1206, 76337, 'Waldbronn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1207, 69429, 'Waldbrunn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1208, 88289, 'Waldburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1209, 72141, 'Walddorfhäslach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1210, 71111, 'Waldenbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1211, 74638, 'Waldenburg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1212, 79183, 'Waldkirch', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1213, 79761, 'Waldshut-Tiengen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1214, 73550, 'Waldstetten', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1215, 74399, 'Walheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1216, 69190, 'Walldorf', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1217, 63928, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1218, 74731, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1219, 74599, 'Wallhausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1220, 75045, 'Walzbachtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1221, 73117, 'Wangen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1222, 88239, 'Wangen im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1223, 72827, 'Wannweil', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1224, 88447, 'Warthausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1225, 73116, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1226, 73547, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1227, 78564, 'Wehingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1228, 79664, 'Wehr', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1229, 89197, 'Weidenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1230, 97990, 'Weikersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1231, 79576, 'Weil am Rhein', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1232, 71263, 'Weil der Stadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1233, 72367, 'Weilen unter den Rinnen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1234, 79809, 'Weilheim', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1235, 73235, 'Weilheim an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1236, 71093, 'Weil im Schönbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1237, 76356, 'Weingarten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1238, 88250, 'Weingarten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1239, 69469, 'Weinheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1240, 74189, 'Weinsberg', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1241, 71384, 'Weinstadt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1242, 76599, 'Weisenbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1243, 71287, 'Weissach', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1244, 71554, 'Weissach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1245, 74679, 'Weißbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1246, 79367, 'Weisweil', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1247, 78669, 'Wellendingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1248, 73553, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1249, 73635, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1250, 73642, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1251, 73667, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1252, 79677, 'Wembach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1253, 73240, 'Wendlingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1254, 97956, 'Werbach', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1255, 73249, 'Wernau (Neckar)', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1256, 97877, 'Wertheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1257, 72589, 'Westerheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1258, 89198, 'Westerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1259, 73463, 'Westhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1260, 74259, 'Widdern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1261, 79695, 'Wieden', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1262, 75446, 'Wiernsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1263, 69257, 'Wiesenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1264, 73349, 'Wiesensteig', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1265, 69168, 'Wiesloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1266, 72218, 'Wildberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1267, 88271, 'Wilhelmsdorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1268, 69259, 'Wilhelmsfeld', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1269, 77731, 'Willstätt', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1270, 71299, 'Wimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1271, 79297, 'Winden im Elztal', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1272, 71364, 'Winnenden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1273, 73650, 'Winterbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1274, 72474, 'Winterlingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1275, 97957, 'Wittighausen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1276, 79599, 'Wittlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1277, 79299, 'Wittnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1278, 77709, 'Wolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1279, 88364, 'Wolfegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1280, 72649, 'Wolfschlugen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1281, 74549, 'Wolpertshausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1282, 88284, 'Wolpertswende', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1283, 72299, 'Wörnersberg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1284, 73499, 'Wört', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1285, 75449, 'Wurmberg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1286, 78573, 'Wurmlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1287, 71543, 'Wüstenrot', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1288, 79879, 'Wutach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1289, 79793, 'Wutöschingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1290, 79369, 'Wyhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1291, 74374, 'Zaberfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1292, 75059, 'Zaisenhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1293, 77736, 'Zell am Harmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1294, 79669, 'Zell im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1295, 73087, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1296, 73119, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1297, 78652, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1298, 78658, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1299, 72369, 'Zimmern unter der Burg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1300, 74939, 'Zuzenhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1301, 74639, 'Zweiflingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1302, 88529, 'Zwiefalten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1303, 69439, 'Zwingenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'); + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + ADD PRIMARY KEY (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD PRIMARY KEY (`lid`), + ADD KEY `bpm_adminlog_ibfk_1` (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + ADD PRIMARY KEY (`dst_id`); + +-- +-- Indizes für die Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD PRIMARY KEY (`wu_id`), + ADD KEY `dst_id` (`dst_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD PRIMARY KEY (`eg_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + ADD PRIMARY KEY (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + ADD PRIMARY KEY (`no_id`); + +-- +-- Indizes für die Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + ADD PRIMARY KEY (`pid`); + +-- +-- Indizes für die Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + ADD PRIMARY KEY (`pn_id`); + +-- +-- Indizes für die Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD PRIMARY KEY (`sm_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + ADD PRIMARY KEY (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + ADD PRIMARY KEY (`tm_id`); + +-- +-- Indizes für die Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD PRIMARY KEY (`tk_id`), + ADD KEY `ka_id` (`ka_id`), + ADD KEY `tm_id` (`tm_id`), + ADD KEY `tp_id` (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD PRIMARY KEY (`up_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + ADD PRIMARY KEY (`zu_id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + MODIFY `bpmuid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + MODIFY `dst_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + MODIFY `wu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + MODIFY `eg_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + MODIFY `ka_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + MODIFY `no_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + MODIFY `pn_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + MODIFY `sm_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + MODIFY `tp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + MODIFY `tm_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + MODIFY `tk_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + MODIFY `up_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + MODIFY `zu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1304; + +-- +-- Constraints der exportierten Tabellen +-- + +-- +-- Constraints der Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD CONSTRAINT `bpm_adminlog_ibfk_1` FOREIGN KEY (`bpmuid`) REFERENCES `bpm_admin` (`bpmuid`); + +-- +-- Constraints der Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_1` FOREIGN KEY (`dst_id`) REFERENCES `bpm_dienststellen` (`dst_id`), + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_2` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD CONSTRAINT `bpm_ergebnisse_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD CONSTRAINT `bpm_sonstige_mail_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD CONSTRAINT `bpm_term_kand_ibfk_2` FOREIGN KEY (`tm_id`) REFERENCES `bpm_termine` (`tm_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_3` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_4` FOREIGN KEY (`tp_id`) REFERENCES `bpm_tanpool` (`tp_id`); + +-- +-- Constraints der Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD CONSTRAINT `bpm_upload_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/++ Dokumente/bpm_einmal_nicht_bestanden_keine_zweitregistrierung.sql b/++ Dokumente/bpm_einmal_nicht_bestanden_keine_zweitregistrierung.sql new file mode 100755 index 0000000..257666f --- /dev/null +++ b/++ Dokumente/bpm_einmal_nicht_bestanden_keine_zweitregistrierung.sql @@ -0,0 +1,2343 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.2 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 15. Jul 2020 um 09:59 +-- Server-Version: 10.4.11-MariaDB +-- PHP-Version: 7.4.4 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Datenbank: `bpm` +-- + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_admin` +-- + +CREATE TABLE `bpm_admin` ( + `bpmuid` int(11) NOT NULL, + `vorname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `nachname` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `uid` varchar(23) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `passwort` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Benutzer'; + +-- +-- Daten für Tabelle `bpm_admin` +-- + +INSERT INTO `bpm_admin` (`bpmuid`, `vorname`, `nachname`, `mail`, `uid`, `passwort`) VALUES +(1, 'BPM', 'Admin', 'netblack@gmx.de', 'admin', '0e457bb607700e59fbcfb77a2d94337e'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_adminlog` +-- + +CREATE TABLE `bpm_adminlog` ( + `lid` int(11) NOT NULL, + `Datum` datetime NOT NULL, + `IP` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `user_agent` varchar(255) COLLATE utf8_unicode_ci NOT NULL, + `bpmuid` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Logins der Anwender'; + +-- +-- Daten für Tabelle `bpm_adminlog` +-- + +INSERT INTO `bpm_adminlog` (`lid`, `Datum`, `IP`, `user_agent`, `bpmuid`) VALUES +(1, '2020-07-10 09:54:54', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1), +(2, '2020-07-15 09:35:04', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0', 1); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dienststellen` +-- + +CREATE TABLE `bpm_dienststellen` ( + `dst_id` int(11) NOT NULL, + `bezeichnung` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `bez` varchar(200) COLLATE utf8_unicode_ci NOT NULL, + `str` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `plz` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `ort` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `tel` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `internet` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `mail` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL, + `gueltig_von` date NOT NULL, + `gueltig_bis` date NOT NULL, + `init_tan` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `pwd` varchar(250) COLLATE utf8_unicode_ci NOT NULL, + `register_dat` datetime NOT NULL, + `mail_reset` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Daten für Tabelle `bpm_dienststellen` +-- + +INSERT INTO `bpm_dienststellen` (`dst_id`, `bezeichnung`, `name`, `bez`, `str`, `plz`, `ort`, `tel`, `internet`, `mail`, `gueltig_von`, `gueltig_bis`, `init_tan`, `pwd`, `register_dat`, `mail_reset`) VALUES +(1, 'Landratsamt', 'Bodenseekreis', 'Landratsamt Bodenseekreis', NULL, NULL, NULL, NULL, NULL, 'ausbildung@bodenseekreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(2, 'Stadtverwaltung', 'Lahr', 'Stadtverwaltung Lahr', 'Rathausplatz 4', '77933', 'Lahr', NULL, NULL, 'bewerbung@lahr.de', '0000-00-00', '0000-00-00', 'XJ9zxJK', 'f2e0971f614299098da8888283a6121e', '2020-06-02 07:14:18', '0000-00-00 00:00:00'), +(3, 'Landratsamt', 'Tuttlingen', 'Landratsamt Tuttlingen', 'Bahnhofstraße 100', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@landkreis-tuttlingen.de', '0000-00-00', '0000-00-00', 'KgARNCJ', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-06 16:08:02', '0000-00-00 00:00:00'), +(4, 'Landratsamt', 'Ortenaukreis', 'Landratsamt Ortenaukreis', 'Badstraße 20', '77652', 'Offenburg', NULL, NULL, 'ausbildung@ortenaukreis.de', '0000-00-00', '0000-00-00', 'UcZftqe', '3fbaba58b058b0ce53926998d20e4d51', '2020-05-30 18:47:10', '0000-00-00 00:00:00'), +(5, 'Stadtverwaltung', 'Ettlingen', 'Stadtverwaltung Ettlingen', 'Marktplatz 2', '76275', 'Ettlingen', NULL, NULL, 'anja.karbstein@ettlingen.de', '0000-00-00', '0000-00-00', '6Yeyy6k', '1dbe10b0e0ce9ea8145cbc4f7b2fe5fe', '2020-05-11 12:33:39', '0000-00-00 00:00:00'), +(6, 'Stadtverwaltung', 'Crailsheim', 'Stadtverwaltung Crailsheim', NULL, NULL, NULL, NULL, NULL, 'martina.hopf@crailsheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(7, 'Gemeindeverwaltung', 'Schlier', 'Gemeindeverwaltung Schlier', NULL, NULL, NULL, NULL, NULL, 'liebmann@schlier.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(8, 'Stadtverwaltung', 'Plochingen', 'Stadtverwaltung Plochingen', NULL, NULL, NULL, NULL, NULL, 'treiber@plochingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(9, 'Stadtverwaltung', 'Pforzheim', 'Stadtverwaltung Pforzheim', 'Marktplatz 1 ', '75175', 'Pforzheim', NULL, NULL, 'ausbildung@pforzheim.de', '0000-00-00', '0000-00-00', '!84#BR5', 'cb0a389f7d40ff44c5c5db1002e6b29e', '2020-05-07 08:53:56', '0000-00-00 00:00:00'), +(10, 'Stadtverwaltung', 'Bühl', 'Stadtverwaltung Bühl', 'Hauptstraße 47', '77815', 'Bühl', NULL, NULL, 'digitale.stadt@buehl.de', '0000-00-00', '0000-00-00', 'JF8mD8g', '178a5341ddd1af956dad381afc7c4fa7', '2020-05-30 16:05:20', '2020-05-30 16:06:08'), +(11, 'Landratsamt', 'Ostalbkreis', 'Landratsamt Ostalbkreis', NULL, NULL, NULL, NULL, NULL, 'ursula.winkler@ostalbkreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(12, 'Landratsamt', 'Alb-Donau-Kreis', 'Landratsamt Alb-Donau-Kreis', NULL, NULL, NULL, NULL, NULL, 'edelgard.rommel@alb-donau-kreis.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(13, 'Landratsamt', 'Heilbronn', 'Landratsamt Heilbronn', 'Lerchenstraße 40', '74072', 'Heilbronn', NULL, NULL, 'jasmin.muench@landratsamt-heilbronn.de', '0000-00-00', '0000-00-00', 'nNKm8ZA', '233d57b91ec44976d06daab28b3e7f49', '2020-05-13 11:39:40', '0000-00-00 00:00:00'), +(14, 'Stadtverwaltung', 'Nürtingen', 'Stadtverwaltung Nürtingen', 'Marktstraße 7', '72622', 'Nürtingen', NULL, NULL, 'l.kaelberer@nuertingen.de', '0000-00-00', '0000-00-00', '6XDCd9t', '9cd1124b96ef9d92abb63b4ac120c178', '2020-05-13 13:24:41', '0000-00-00 00:00:00'), +(15, 'Stadtverwaltung', 'Sindelfingen', 'Stadtverwaltung Sindelfingen', 'Rathausplatz 1', '71063 ', 'Sindelfingen', NULL, NULL, 'claudia.dorsch@sindelfingen.de', '0000-00-00', '0000-00-00', 'Adkm5an', 'e1c3ff034564136b923273766f2eda49', '2020-05-19 16:32:12', '0000-00-00 00:00:00'), +(16, 'Landratsamt', 'Ludwigsburg', 'Landratsamt Ludwigsburg', 'Hindenburgstraße 40', '71638', 'Ludwigsburg', NULL, NULL, 'georgios.sidiropoulos@landkreis-ludwigsburg.de', '0000-00-00', '0000-00-00', 'GbrrCgy', 'c1bce67a67b402863a1cb81da9f28858', '2020-05-12 12:49:21', '0000-00-00 00:00:00'), +(17, 'Stadtverwaltung', 'Böblingen', 'Stadtverwaltung Böblingen', 'Marktplatz 16', '71032', 'Böblingen', NULL, NULL, 'ausbildung@boeblingen.de', '0000-00-00', '0000-00-00', 'Pt-GmYp', 'aa7ec81b8e7272977d1848065b4bee0b', '2020-05-12 19:40:33', '0000-00-00 00:00:00'), +(18, 'Stadtverwaltung', 'Karlsruhe', 'Stadtverwaltung Karlsruhe', NULL, NULL, NULL, NULL, NULL, 'sabrina.rothschmitt@it.karlsruhe.de', '0000-00-00', '0000-00-00', 'TxWfE4f', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(19, 'Stadtverwaltung', 'Bruchsal', 'Stadtverwaltung Bruchsal', 'Kaiserstraße 66', '76646', 'Bruchsal', NULL, NULL, 'vanessa.mail@bruchsal.de', '0000-00-00', '0000-00-00', 'NBzrcYn', 'f623dea8df24077d0090d8d9810424f7', '2020-05-11 11:30:44', '0000-00-00 00:00:00'), +(20, 'Stadtverwaltung', 'Metzingen', 'Stadtverwaltung Metzingen', 'Stuttgarter Straße 2-4', '72555', 'Metzingen', NULL, NULL, 'personal@metzingen.de', '0000-00-00', '0000-00-00', 'r!vSz34', 'd8bed61d3748ae779449d5f67f4572c2', '2020-05-13 13:50:12', '0000-00-00 00:00:00'), +(21, 'Stadtverwaltung', 'Spaichingen', 'Stadtverwaltung Spaichingen', 'Marktplatz 19', '78549', 'Spaichingen', NULL, NULL, 'heike.marquart@spaichingen.de', '0000-00-00', '0000-00-00', 'ySgcpnh', 'e3716c43663c0fb8628d2362e6b56590', '2020-05-06 18:10:49', '0000-00-00 00:00:00'), +(22, 'Stadtverwaltung', 'Ulm', 'Stadtverwaltung Ulm', 'Donaustraße 5', '89073', 'Ulm', NULL, NULL, 'a.sauter@ulm.de', '0000-00-00', '0000-00-00', 'zhkvELP', 'f72da3a02cfa3e228483b0610e0dd64b', '2020-05-15 11:09:44', '0000-00-00 00:00:00'), +(23, 'Gemeindeverwaltung', 'Ingoldingen', 'Gemeindeverwaltung Ingoldingen', 'St. Georgenstraße 1', '88456', 'Ingoldingen', NULL, NULL, 'berthold.hengge@ingoldingen.de', '0000-00-00', '0000-00-00', 'nG4ZYyf', '120fc87b75bbb1cc0a5a153c0fcf85e2', '2020-05-15 10:02:49', '0000-00-00 00:00:00'), +(24, 'Stadtverwaltung', 'Heidelberg', 'Stadtverwaltung Heidelberg', 'Marktplatz 10', '69117', 'Heidelberg', NULL, NULL, 'ausbildung@heidelberg.de', '0000-00-00', '0000-00-00', 'ne4tAYY', '0d261aa7832c74fda422aa5b446f00ec', '2020-05-12 12:05:57', '0000-00-00 00:00:00'), +(25, 'Stadtverwaltung', 'Reutlingen', 'Stadtverwaltung Reutlingen', 'Marktplatz 22 ', '72764', 'Reutlingen', NULL, NULL, 'stefanie.weiss@reutlingen.de', '0000-00-00', '0000-00-00', 'aeP-W9n', 'cf820b0e4f7c5448bcaede70ded386ff', '2020-05-13 13:06:46', '0000-00-00 00:00:00'), +(26, 'Landratsamt', 'Waldshut', 'Landratsamt Waldshut', NULL, NULL, NULL, NULL, NULL, 'Theresa.Huener@landkreis-waldshut.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(27, 'Stadtverwaltung', 'Mannheim', 'Stadtverwaltung Mannheim', NULL, NULL, NULL, NULL, NULL, 'franziska.stroh@mannheim.de', '0000-00-00', '0000-00-00', 'ec65ZZ5', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(28, 'Gemeindeverwaltung', 'Gutach im Breisgau', 'Gemeindeverwaltung Gutach im Breisgau', NULL, NULL, NULL, NULL, NULL, 'trenkle@gutach.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(29, 'Stadtverwaltung', 'Kehl', 'Stadtverwaltung Kehl', 'Rathausplatz 1', '77694', 'Kehl', NULL, NULL, 'K.Faschon@stadt-kehl.de', '0000-00-00', '0000-00-00', '!4CL2Xr', '07263a1aac8478c96d399cbfb004b3eb', '2020-06-02 07:08:27', '0000-00-00 00:00:00'), +(30, 'Landratsamt', 'Tübingen', 'Landratsamt Tübingen', 'Wilhelm-Keil-Straße 50', '72072', 'Tübingen', NULL, NULL, 'a.neher@kreis-tuebingen.de', '0000-00-00', '0000-00-00', 'U!hL?nK', 'deffff227c9fab91fef0ccf99065c1fc', '2020-05-13 14:53:09', '0000-00-00 00:00:00'), +(31, 'Gemeindeverwaltung', 'Amtzell', 'Gemeindeverwaltung Amtzell', NULL, NULL, NULL, NULL, NULL, 'christoph.liebmann@amtzell.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(32, 'Gemeindeverwaltung', 'Bad Bellingen', 'Gemeindeverwaltung Bad Bellingen', NULL, NULL, NULL, NULL, NULL, 'spiegelhalter@gemeinde.bad-bellingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(33, 'Stadtverwaltung', 'Remseck am Neckar', 'Stadtverwaltung Remseck am Neckar', NULL, NULL, NULL, NULL, NULL, 'robin.slawig@remseck.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(34, 'Stadtverwaltung', 'Trossingen', 'Stadtverwaltung Trossingen', 'Schultheiß-Koch-Platz 1', '78647', 'Trossingen', NULL, NULL, 'ralf.sulzmann@trossingen.de', '0000-00-00', '0000-00-00', 'Rnzn8xv', 'b43fc176d6ac62361032192c316a3608', '2020-05-08 12:48:26', '0000-00-00 00:00:00'), +(35, 'Stadtverwaltung', 'Herrenberg', 'Stadtverwaltung Herrenberg', 'Marktplatz 5', '71083', 'Herrenberg', NULL, NULL, 'personalwesen@herrenberg.de', '0000-00-00', '0000-00-00', 'LPDrX4u', '00866d6e06168e097a108d44d833888b', '2020-05-22 09:23:11', '0000-00-00 00:00:00'), +(36, 'Landratsamt', 'Sigmaringen', 'Landratsamt Sigmaringen', 'Leopoldstraße 4', '72488', 'Sigmaringen', NULL, NULL, 'bewerbungen@lrasig.de', '0000-00-00', '0000-00-00', '4u!Y46V', '1d53279de30ba509a92564d90ea36215', '2020-06-02 12:34:30', '0000-00-00 00:00:00'), +(37, 'Stadtverwaltung', 'Stadt Fellbach', 'Stadtverwaltung Stadt Fellbach', 'Marktplatz 1', '70734', 'Fellbach', NULL, NULL, 'aus-fortbildung@fellbach.de', '0000-00-00', '0000-00-00', 'Hzp#sxA', '6e00ec9bf49a8287ce7b81c6637b241d', '2020-05-12 15:23:16', '0000-00-00 00:00:00'), +(38, 'Landratsamt', 'Main-Tauber-Kreis', 'Landratsamt Main-Tauber-Kreis', 'Gartenstraße 1', '97941', 'Tauberbischofsheim', NULL, NULL, 'ann-kathrin.blatz@main-tauber-kreis.de', '0000-00-00', '0000-00-00', 'DXRKR#F', '5704db8e04ff3846a2a7333caba87ac6', '2020-06-02 14:17:14', '0000-00-00 00:00:00'), +(39, 'Stadtverwaltung', 'Calw', 'Stadtverwaltung Calw', NULL, NULL, NULL, NULL, NULL, 'spandzich@calw.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(40, 'Stadtverwaltung', 'Kornwestheim', 'Stadtverwaltung Kornwestheim', 'Jakob-Sigle-Platz', '70806', 'Kornwestheim', NULL, NULL, 'Yvette_Escolano@kornwestheim.de', '0000-00-00', '0000-00-00', 'f?56g#3', 'a448966cd1919ed98d4ecb031896541c', '2020-05-13 07:44:45', '0000-00-00 00:00:00'), +(41, 'Landratsamt', 'Ravensburg', 'Landratsamt Ravensburg', 'Friedenstraße 6', '88212', 'Ravensburg', NULL, NULL, 'R.Diez@rv.de', '0000-00-00', '0000-00-00', 'Sn!NEsT', '30a18366b5fb9e244a3dc1c492fbed0f', '2020-05-18 09:24:34', '0000-00-00 00:00:00'), +(42, 'Stadtverwaltung', 'Vaihingen an der Enz', 'Stadtverwaltung Vaihingen an der Enz', 'Marktplatz 1', '71665', 'Vaihingen an der Enz', NULL, NULL, 'm.kaag@vaihingen.de', '0000-00-00', '0000-00-00', 'BSXunD7', '62767e547fd5280353c4c1336fb1b62c', '2020-05-14 12:57:36', '0000-00-00 00:00:00'), +(43, 'Gemeindeverwaltung', 'Dobel', 'Gemeindeverwaltung Dobel', NULL, NULL, NULL, NULL, NULL, 'strauch@dobel.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(44, 'Stadtverwaltung', 'Schwäbisch Gmünd', 'Stadtverwaltung Schwäbisch Gmünd', 'Marktplatz 1', '73525', 'Schwaebisch Gmünd', NULL, NULL, 'susanne.schindler@schwaebisch-gmuend.de', '0000-00-00', '0000-00-00', 'yr?!ZDC', 'c11e55675a55db07c21bcdb26061841c', '2020-05-13 16:26:52', '0000-00-00 00:00:00'), +(45, 'Gemeindeverwaltung', 'Dettenhausen', 'Gemeindeverwaltung Dettenhausen', NULL, NULL, NULL, NULL, NULL, 'hans-peter.fauser@dettenhausen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(46, 'Stadtverwaltung', 'Radolfzell am Bodensee', 'Stadtverwaltung Radolfzell am Bodensee', 'Marktplatz 2', '78315', 'Radolfzell am Bodensee', NULL, NULL, 'personalverwaltung@radolfzell.de', '0000-00-00', '0000-00-00', 'H6#wz!k', 'd29695fc6a04fe226fdaa9322d13e38f', '2020-05-06 16:08:32', '0000-00-00 00:00:00'), +(47, 'Landratsamt', 'Rastatt', 'Landratsamt Rastatt', 'Am Schlossplatz 5', '76437', 'Rastatt', NULL, NULL, 'ausbildung@landkreis-rastatt.de', '0000-00-00', '0000-00-00', 'N9Kcb?!', 'ed6c5513c43f6c3fac4ae090e1fa79e1', '2020-05-07 13:05:42', '0000-00-00 00:00:00'), +(48, 'Stadtverwaltung', 'Stuttgart', 'Stadtverwaltung Stuttgart', 'Eberhardstraße 6', '70173', 'Stuttgart', NULL, NULL, 'ausbildung@stuttgart.de', '0000-00-00', '0000-00-00', 'TPX#tv8', '9c9440cd24ecdc150b5cafc2a8144673', '2020-05-13 08:42:23', '0000-00-00 00:00:00'), +(49, 'GVV', 'Denzlingen-Vörstetten-Reute', 'GVV Denzlingen-Vörstetten-Reute', NULL, NULL, NULL, NULL, NULL, 'j.sillmann@denzlingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(50, 'Stadtverwaltung', 'Bad Friedrichshall', 'Stadtverwaltung Bad Friedrichshall', NULL, NULL, NULL, NULL, NULL, 'franziska.fuchs@friedrichshall.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(51, 'Gemeindeverwaltung', 'Brigachtal', 'Gemeindeverwaltung Brigachtal', 'St. Gallus-Str. 4', '78086', 'Brigachtal', NULL, NULL, 'elke.dufner@brigachtal.de', '0000-00-00', '0000-00-00', 'm!kke5y', '6ab0b27a4da786c9bd8add9a1c4fcd67', '2020-05-14 08:11:29', '0000-00-00 00:00:00'), +(52, 'Gemeindeverwaltung', 'Heddesheim', 'Gemeindeverwaltung Heddesheim', NULL, NULL, NULL, NULL, NULL, 'hauptverwaltung@heddesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(53, 'Gemeindeverwaltung', 'Simonswald', 'Gemeindeverwaltung Simonswald', NULL, NULL, NULL, NULL, NULL, 'glockner@simonswald.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(54, 'Gemeindeverwaltung', 'Mittelbiberach', 'Gemeindeverwaltung Mittelbiberach', NULL, NULL, NULL, NULL, NULL, 'haenle@mittelbiberach.de', '0000-00-00', '0000-00-00', 'mDJtTt-', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(55, 'Stadtverwaltung', 'Rutesheim', 'Stadtverwaltung Rutesheim', NULL, NULL, NULL, NULL, NULL, 'm.killinger@rutesheim.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(56, 'Gemeindeverwaltung', 'Oberstenfeld', 'Gemeindeverwaltung Oberstenfeld', NULL, NULL, NULL, NULL, NULL, 'schmukal@oberstenfeld.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(57, 'Gemeindeverwaltung', 'Leutenbach', 'Gemeindeverwaltung Leutenbach', 'Rathausplatz 1', '71397', 'Leutenbach', NULL, NULL, 'c.muehlbacher@leutenbach.de', '0000-00-00', '0000-00-00', 'd8SJxqf', '5a7e4ddee0fd7127b23b95acb2d53fd7', '2020-05-20 12:08:40', '0000-00-00 00:00:00'), +(58, 'Gemeindeverwaltung', 'Schömberg', 'Gemeindeverwaltung Schömberg', NULL, NULL, NULL, NULL, NULL, 'l.miene@schoemberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(59, 'Stadtverwaltung', 'Leimen', 'Stadtverwaltung Leimen', NULL, NULL, NULL, NULL, NULL, 'elena.brecht@leimen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(60, 'Gemeindeverwaltung', 'Schwörstadt', 'Gemeindeverwaltung Schwörstadt', NULL, NULL, NULL, NULL, NULL, 'b.schneider@schwoerstadt.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(61, 'Gemeindeverwaltung', 'Rudersberg', 'Gemeindeverwaltung Rudersberg', NULL, NULL, NULL, NULL, NULL, 'j.bechthold@rudersberg.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), +(62, 'Stadtverwaltung', 'Ditzingen', 'Stadtverwaltung Ditzingen', 'Am Laien 1', '71254', 'Ditzingen', NULL, NULL, 'bewerbung@ditzingen.de', '0000-00-00', '0000-00-00', '!3ya-#C', 'c696edbd1d7b3e5526f792a8ad35eed2', '2020-05-15 10:53:25', '0000-00-00 00:00:00'), +(63, 'Regierungspräsidium', 'Stuttgart', 'Regierungspräsidium Stuttgart', 'Ruppmannstr. 21', '70565', 'Stuttgart', NULL, NULL, 'Sophie.Spottek@rps.bwl.de', '0000-00-00', '0000-00-00', 'f9Yx6U6', '0d14f34b0a6f52f3d30c4936afa05c6d', '2020-05-18 13:39:56', '0000-00-00 00:00:00'), +(64, 'Stadtverwaltung', 'Tuttlingen', 'Stadtverwaltung Tuttlingen', 'Rathausstr. 1 ', '78532', 'Tuttlingen', NULL, NULL, 'ausbildung@tuttlingen.de', '0000-00-00', '0000-00-00', '4cfqa57', '6b5f7b0876b47c3afef3cf1537ccfa9e', '2020-05-14 10:54:40', '0000-00-00 00:00:00'), +(65, 'Stadtverwaltung', 'Emmendingen', 'Stadtverwaltung Emmendingen', 'Landvogtei 10', '79312 ', 'Emmendingen', NULL, NULL, 'karriere@emmendingen.de', '0000-00-00', '0000-00-00', '', '', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_dst_wunsch` +-- + +CREATE TABLE `bpm_dst_wunsch` ( + `wu_id` int(11) NOT NULL, + `dst_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `datum` datetime NOT NULL, + `mail_text` text NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `status` enum('O','V','F') DEFAULT 'O' COMMENT 'Offen, Versendet, Fehler', + `sendedat` datetime NOT NULL, + `archiv_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_ergebnisse` +-- + +CREATE TABLE `bpm_ergebnisse` ( + `eg_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tan` varchar(10) NOT NULL, + `satzerg` int(5) NOT NULL, + `analogie` int(5) NOT NULL, + `rechenaufgaben` int(5) NOT NULL, + `zahlenreihen` int(5) NOT NULL, + `rechenzeichen` int(5) NOT NULL, + `matrizen` int(5) NOT NULL, + `merkf` int(5) NOT NULL, + `summe` int(5) NOT NULL, + `bestanden` enum('0','1') NOT NULL COMMENT '1=bestanden, 0=durchgefallen', + `einsicht_dat` datetime NOT NULL COMMENT 'Einsicht des Kandidaten' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_ergebnisse` +-- + +INSERT INTO `bpm_ergebnisse` (`eg_id`, `ka_id`, `tan`, `satzerg`, `analogie`, `rechenaufgaben`, `zahlenreihen`, `rechenzeichen`, `matrizen`, `merkf`, `summe`, `bestanden`, `einsicht_dat`) VALUES +(1, 4, 'K3NN', 12, 9, 4, 11, 10, 10, 7, 63, '0', '2020-07-08 10:13:45'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_kandidat` +-- + +CREATE TABLE `bpm_kandidat` ( + `ka_id` int(11) NOT NULL, + `anrede` enum('M','W') NOT NULL, + `vorname` varchar(250) NOT NULL, + `nachname` varchar(250) NOT NULL, + `gebdat` date NOT NULL, + `str` varchar(250) NOT NULL, + `plz` varchar(250) NOT NULL, + `ort` varchar(250) NOT NULL, + `alter18` int(1) NOT NULL COMMENT '0=Minderjaehrig; 1=Volljaehrig', + `mail` varchar(250) NOT NULL, + `id` varchar(200) NOT NULL, + `hochschule` enum('Kehl','Ludwigsburg','NA') DEFAULT NULL COMMENT 'Standardhochschule', + `register_dat` datetime NOT NULL, + `modify_dat` datetime NOT NULL, + `remember_mail` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_kandidat` +-- + +INSERT INTO `bpm_kandidat` (`ka_id`, `anrede`, `vorname`, `nachname`, `gebdat`, `str`, `plz`, `ort`, `alter18`, `mail`, `id`, `hochschule`, `register_dat`, `modify_dat`, `remember_mail`) VALUES +(4, 'M', 'Alexander', 'Schwarz', '1979-08-15', 'Lisztstr. 9', '71384', 'Weinstadt', 1, 'netblack@gmx.de', 'SCHWAL1508197901-2022', 'Ludwigsburg', '2020-07-15 09:51:52', '0000-00-00 00:00:00', '0000-00-00 00:00:00'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_note` +-- + +CREATE TABLE `bpm_note` ( + `no_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `hzb` decimal(10,2) NOT NULL, + `hzb_punkte` decimal(10,2) NOT NULL, + `zeugnisschnitt` decimal(10,2) NOT NULL, + `zeugnisschnitt_punkte` decimal(10,2) NOT NULL, + `erfdat_hzb` datetime NOT NULL, + `erfdat_schnitt` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_parameter` +-- + +CREATE TABLE `bpm_parameter` ( + `pid` int(11) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `wert` varchar(250) NOT NULL, + `sort` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_parameter` +-- + +INSERT INTO `bpm_parameter` (`pid`, `beschreibung`, `wert`, `sort`) VALUES +(1, 'Bei wie viel RestTANs soll eine Warnung per Mail ausgegeben werden.', '50', 0), +(2, 'Mailadresse Lizenzwarnung (Durch Komma getrennt, bei mehreren Mailadressen)', 'zulassung@hs-kehl.de, bewerbungbpm@hs-ludwigsburg.de', 10), +(3, 'IBAN HS-Kehl', 'DE02600501017495530102', 20), +(4, 'BIC HS-Kehl', 'SOLADEST600', 30), +(5, 'IBAN HS-Ludwigsburg', 'DE02600501017495530102', 40), +(6, 'BIC HS-Ludwigsburg', 'SOLADEST600', 50), +(7, 'Mail-Absenderadresse HS-Kehl', 'zulassung@hs-kehl.de', 60), +(8, 'Mail-Absenderadresse HS-Ludwigsburg', 'bewerbungbpm@hs-ludwigsburg.de', 70), +(9, 'Betrag in Euro für die Überweisung', '25,00', 80), +(11, 'Bestehenswert des Eignungstests in Rohwert-Punkten', '66', 90), +(12, 'Maximale Dateigröße pro hochgeladener Datei in Megabyte (MB)', '5', 100), +(13, 'Maximale Anzahl an hochzuladenden PDF-Dokumente pro Bewerber', '10', 110), +(14, 'Maximal Anzahl der zu buchenden Praxisstellen pro Bewerber', '4', 120), +(15, 'Anzahl der letzten Nachrichten im Praxisstellensystem', '10', 130), +(16, 'Wie viele Tage vor dem Test ist ein Testtermin nicht ersichtlich?', '4', 140); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_prxnews` +-- + +CREATE TABLE `bpm_prxnews` ( + `pn_id` int(11) NOT NULL, + `pn_headline` varchar(250) NOT NULL, + `pn_text` text NOT NULL, + `pn_date` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_sonstige_mail` +-- + +CREATE TABLE `bpm_sonstige_mail` ( + `sm_id` int(11) NOT NULL, + `sender` varchar(250) NOT NULL, + `sendermail` varchar(250) NOT NULL, + `ka_id` int(11) NOT NULL, + `empfaenger` varchar(250) NOT NULL, + `mail_betreff` varchar(250) NOT NULL, + `mail_text` text NOT NULL, + `status` enum('V','F') NOT NULL, + `sendedat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_sonstige_mail` +-- + +INSERT INTO `bpm_sonstige_mail` (`sm_id`, `sender`, `sendermail`, `ka_id`, `empfaenger`, `mail_betreff`, `mail_text`, `status`, `sendedat`) VALUES +(3, 'Hochschule Ludwigsburg', 'bewerbungbpm@hs-ludwigsburg.de', 4, 'netblack@gmx.de', 'Anmeldung zum Eignungstest BPM', '\n \n \n Anmeldung zum Eignungstest\n \n \n \n Guten Tag Alexander Schwarz!\n

\n Sie haben verbindlich Ihre Teilnahme am Studierfähigkeitstest BPM (Bachelor of Arts - Public Management) gebucht.\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n Testtag:\n \n \n \n 31.07.2020 um 09:30 Uhr\n \n
\n \n Hochschule:\n \n \n \n Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg\n \n
\n \n Gebäude / Raum:\n \n \n \n 5.109\n \n
\n \n Persönliche ID:\n \n \n \n SCHWAL1508197901-2022\n \n
\n
\n Bitte überweisen Sie die Testgebühr in Höhe von 25,00 Euro auf folgende Kontoverbindung IBAN DE02600501017495530102. Geben Sie unbedingt die Referenznummer TEST BPM und Ihren Namen ein!
\n Die Gebühr ist sofort zur Zahlung fällig. Ohne Zahlungseingang ist eine Teilnahme am Test nicht möglich.
\n Es ist unbedingt erforderlich, dass Sie diese E-Mail zum Test mitbringen.\n

\n Diese Mail wurde automatisch generiert!
\n Antworten Sie daher nicht auf diese Mail.
\n
\n Vielen Dank!\n \n ', 'F', '2020-07-15 09:51:54'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_stichtage` +-- + +CREATE TABLE `bpm_stichtage` ( + `sttg_id` int(11) NOT NULL, + `beginn` date NOT NULL, + `ende` date NOT NULL, + `ausbildungsbeginn` int(4) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_stichtage` +-- + +INSERT INTO `bpm_stichtage` (`sttg_id`, `beginn`, `ende`, `ausbildungsbeginn`) VALUES +(1, '2020-07-16', '2021-07-15', 2021), +(2, '2021-07-16', '2022-07-15', 2022), +(3, '2022-07-16', '2023-07-15', 2023); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_tanpool` +-- + +CREATE TABLE `bpm_tanpool` ( + `tp_id` int(11) NOT NULL, + `dummy_name` varchar(250) NOT NULL, + `dummy_vorname` varchar(250) NOT NULL, + `tan` varchar(10) NOT NULL, + `tinyurl` varchar(200) NOT NULL, + `verw_dat` datetime NOT NULL, + `login_dat` datetime NOT NULL, + `aktiv` enum('A','I') NOT NULL DEFAULT 'A' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_tanpool` +-- + +INSERT INTO `bpm_tanpool` (`tp_id`, `dummy_name`, `dummy_vorname`, `tan`, `tinyurl`, `verw_dat`, `login_dat`, `aktiv`) VALUES +(175, 'Testuser-bpm', '188', 'K3NN', 'https://hgf.de/vwe-', '2020-07-15 09:51:52', '0000-00-00 00:00:00', 'A'), +(176, 'Testuser-bpm', '171', 'U3P3', 'https://hgf.de/d-1c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(177, 'Testuser-bpm', '087', '93PR', 'https://hgf.de/u2au', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(178, 'Testuser-bpm', '038', 'K3Q9', 'https://hgf.de/xpjv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(179, 'Testuser-bpm', '152', 'U3QM', 'https://hgf.de/rtzq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(180, 'Testuser-bpm', '204', '93RD', 'https://hgf.de/ilpy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(181, 'Testuser-bpm', '050', 'K3RQ', 'https://hgf.de/wnzc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(182, 'Testuser-bpm', '104', 'U3T7', 'https://hgf.de/mlk4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(183, 'Testuser-bpm', '248', '93TU', 'https://hgf.de/n0hh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(184, 'Testuser-bpm', '086', 'K3UC', 'https://hgf.de/zawv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(185, 'Testuser-bpm', '179', 'U3UP', 'https://hgf.de/w6i6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(186, 'Testuser-bpm', '244', '93VF', 'https://hgf.de/ms89', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(187, 'Testuser-bpm', '160', 'K3VT', 'https://hgf.de/zd34', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(188, 'Testuser-bpm', '056', 'U3WA', 'https://hgf.de/sflo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(189, 'Testuser-bpm', '135', '93WW', 'https://hgf.de/9ggr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(190, 'Testuser-bpm', '138', 'K3XE', 'https://hgf.de/blht', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(191, 'Testuser-bpm', '187', 'U3XR', 'https://hgf.de/ojgj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(192, 'Testuser-bpm', '197', '93YJ', 'https://hgf.de/cj8e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(193, 'Testuser-bpm', '106', 'K3YV', 'https://hgf.de/0g5-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(194, 'Testuser-bpm', '123', 'U43D', 'https://hgf.de/t9no', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(195, 'Testuser-bpm', '137', '943Y', 'https://hgf.de/g1qm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(196, 'Testuser-bpm', '011', 'TVY9', 'https://hgf.de/jdu3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(197, 'Testuser-bpm', '070', 'K44H', 'https://hgf.de/np-t', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(198, 'Testuser-bpm', '057', 'U44U', 'https://hgf.de/o7d2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(199, 'Testuser-bpm', '216', '947L', 'https://hgf.de/st0z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(200, 'Testuser-bpm', '074', 'K47X', 'https://hgf.de/xm3s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(201, 'Testuser-bpm', '092', 'TW7C', 'https://hgf.de/8m1r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(202, 'Testuser-bpm', '063', 'U49F', 'https://hgf.de/9poo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(203, 'Testuser-bpm', '136', '94A4', 'https://hgf.de/wfgz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(204, 'Testuser-bpm', '109', 'TVV4', 'https://hgf.de/jjop', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(205, 'Testuser-bpm', '078', 'K4AK', 'https://hgf.de/vxdn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(206, 'Testuser-bpm', '153', 'U4AW', 'https://hgf.de/arch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(207, 'Testuser-bpm', '170', '94CN', 'https://hgf.de/ujfg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(208, 'Testuser-bpm', '020', 'K4D3', 'https://hgf.de/se-a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(209, 'Testuser-bpm', '194', 'U4DJ', 'https://hgf.de/plx-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(210, 'Testuser-bpm', '245', '94E9', 'https://hgf.de/lcgn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(211, 'Testuser-bpm', '240', 'K4EM', 'https://hgf.de/5kly', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(212, 'Testuser-bpm', '234', 'U4EY', 'https://hgf.de/8qas', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(213, 'Testuser-bpm', '162', '94FQ', 'https://hgf.de/kl5u', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(214, 'Testuser-bpm', '189', 'K4H7', 'https://hgf.de/od-u', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(215, 'Testuser-bpm', '027', 'U4HL', 'https://hgf.de/77dn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(216, 'Testuser-bpm', '080', '94JC', 'https://hgf.de/2d81', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(217, 'Testuser-bpm', '231', 'K4JP', 'https://hgf.de/diuz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(218, 'Testuser-bpm', '155', 'U4K4', 'https://hgf.de/xj2l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(219, 'Testuser-bpm', '037', '94KT', 'https://hgf.de/g6jj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(220, 'Testuser-bpm', '185', 'K4LA', 'https://hgf.de/v0e2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(221, 'Testuser-bpm', '065', 'U4LN', 'https://hgf.de/dmc2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(222, 'Testuser-bpm', '203', '94ME', 'https://hgf.de/s91-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(223, 'Testuser-bpm', '250', 'K4MR', 'https://hgf.de/60h8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(224, 'Testuser-bpm', '249', 'U4N9', 'https://hgf.de/5ejw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(225, 'Testuser-bpm', '164', '94NV', 'https://hgf.de/pr7r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(226, 'Testuser-bpm', '112', 'K4PD', 'https://hgf.de/jsyn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(227, 'Testuser-bpm', '042', 'U4PQ', 'https://hgf.de/gqtk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(228, 'Testuser-bpm', '157', '94QH', 'https://hgf.de/ad3j', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(229, 'Testuser-bpm', '235', 'K4QU', 'https://hgf.de/5h8m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(230, 'Testuser-bpm', '009', 'U4RC', 'https://hgf.de/kmbp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(231, 'Testuser-bpm', '195', '94RX', 'https://hgf.de/n771', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(232, 'Testuser-bpm', '227', 'K4TF', 'https://hgf.de/ervs', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(233, 'Testuser-bpm', '172', 'U4TT', 'https://hgf.de/gq77', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(234, 'Testuser-bpm', '219', '94UK', 'https://hgf.de/ry8a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(235, 'Testuser-bpm', '246', 'K4UW', 'https://hgf.de/9brk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(236, 'Testuser-bpm', '113', 'JW3D', 'https://hgf.de/7h1x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(237, 'Testuser-bpm', '183', 'U4VE', 'https://hgf.de/0kjx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(238, 'Testuser-bpm', '192', '94W3', 'https://hgf.de/yy9o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(239, 'Testuser-bpm', '010', 'K4WJ', 'https://hgf.de/j8uz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(240, 'Testuser-bpm', '222', 'U4WV', 'https://hgf.de/pkcn', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(241, 'Testuser-bpm', '140', 'JW9F', 'https://hgf.de/7mok', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(242, 'Testuser-bpm', '099', '94XM', 'https://hgf.de/wj44', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(243, 'Testuser-bpm', '177', 'K4XY', 'https://hgf.de/qvbw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(244, 'Testuser-bpm', '230', 'JVWA', 'https://hgf.de/mb0l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(245, 'Testuser-bpm', '082', 'U4YH', 'https://hgf.de/9b09', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(246, 'Testuser-bpm', '098', '9737', 'https://hgf.de/2hzi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(247, 'Testuser-bpm', '178', 'K73L', 'https://hgf.de/cqa-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(248, 'Testuser-bpm', '008', 'U73X', 'https://hgf.de/r19z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(249, 'Testuser-bpm', '055', '974P', 'https://hgf.de/snqj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(250, 'Testuser-bpm', '225', 'K774', 'https://hgf.de/42mu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(251, 'Testuser-bpm', '0290', 'K7LV', 'https://hgf.de/bc0a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(252, 'Testuser-bpm', '0291', 'U7MD', 'https://hgf.de/7av8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(253, 'Testuser-bpm', '0303', '97MY', 'https://hgf.de/p97m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(254, 'Testuser-bpm', '0454', 'K7NH', 'https://hgf.de/v3dd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(255, 'Testuser-bpm', '0308', 'U7NU', 'https://hgf.de/83hm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(256, 'Testuser-bpm', '0424', '97PL', 'https://hgf.de/giaz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(257, 'Testuser-bpm', '0329', 'K7PX', 'https://hgf.de/6b9w', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(258, 'Testuser-bpm', '0293', 'U7QF', 'https://hgf.de/4jy4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(259, 'Testuser-bpm', '0409', '97R4', 'https://hgf.de/wrqy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(260, 'Testuser-bpm', '0257', 'K7RK', 'https://hgf.de/6tsw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(261, 'Testuser-bpm', '0274', 'U7RW', 'https://hgf.de/fq9q', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(262, 'Testuser-bpm', '0285', '97TN', 'https://hgf.de/3-ae', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(263, 'Testuser-bpm', '0449', 'K7U3', 'https://hgf.de/dn0s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(264, 'Testuser-bpm', '0408', 'U7UJ', 'https://hgf.de/9i4l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(265, 'Testuser-bpm', '0413', '97V9', 'https://hgf.de/z1b-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(266, 'Testuser-bpm', '0485', '97AR', 'https://hgf.de/pupf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(267, 'Testuser-bpm', '0355', 'K7VM', 'https://hgf.de/gfy5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(268, 'Testuser-bpm', '0476', 'U7VY', 'https://hgf.de/wprf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(269, 'Testuser-bpm', '0462', '97WQ', 'https://hgf.de/rwc5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(270, 'Testuser-bpm', '0488', '97DD', 'https://hgf.de/7cv1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(271, 'Testuser-bpm', '0418', 'K7X7', 'https://hgf.de/8kc7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(272, 'Testuser-bpm', '0378', 'U7XL', 'https://hgf.de/a0p4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(273, 'Testuser-bpm', '0426', '97YC', 'https://hgf.de/lw9d', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(274, 'Testuser-bpm', '0471', 'K7YP', 'https://hgf.de/iou8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(275, 'Testuser-bpm', '0420', 'U934', 'https://hgf.de/-epu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(276, 'Testuser-bpm', '0351', '993T', 'https://hgf.de/mj8l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(277, 'Testuser-bpm', '0297', 'K94A', 'https://hgf.de/l0ux', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(278, 'Testuser-bpm', '0498', 'K7KE', 'https://hgf.de/vq53', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(279, 'Testuser-bpm', '0377', 'U94N', 'https://hgf.de/w07o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(280, 'Testuser-bpm', '0332', '997E', 'https://hgf.de/lts-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(281, 'Testuser-bpm', '0438', 'K97R', 'https://hgf.de/4ctw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(282, 'Testuser-bpm', '0337', 'U999', 'https://hgf.de/lazd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(283, 'Testuser-bpm', '0296', '999V', 'https://hgf.de/t-tk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(284, 'Testuser-bpm', '0383', 'K9AD', 'https://hgf.de/g6hi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(285, 'Testuser-bpm', '0381', 'U9AQ', 'https://hgf.de/5xwz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(286, 'Testuser-bpm', '0402', '99CH', 'https://hgf.de/k3ty', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(287, 'Testuser-bpm', '0292', 'K9CU', 'https://hgf.de/lnn2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(288, 'Testuser-bpm', '0427', 'U9DC', 'https://hgf.de/l8c9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(289, 'Testuser-bpm', '0331', '99DX', 'https://hgf.de/fd1b', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(290, 'Testuser-bpm', '0373', 'K9EF', 'https://hgf.de/48wf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(291, 'Testuser-bpm', '0435', 'U9ET', 'https://hgf.de/jga0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(292, 'Testuser-bpm', '0439', '99FK', 'https://hgf.de/8a5f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(293, 'Testuser-bpm', '0467', 'K9FW', 'https://hgf.de/y4re', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(294, 'Testuser-bpm', '0340', 'U9HE', 'https://hgf.de/2hov', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(295, 'Testuser-bpm', '0334', '99J3', 'https://hgf.de/w-dm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(296, 'Testuser-bpm', '0407', 'K9JJ', 'https://hgf.de/qlqu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(297, 'Testuser-bpm', '0359', 'U9JV', 'https://hgf.de/np6t', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(298, 'Testuser-bpm', '0260', '99KM', 'https://hgf.de/a2a7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(299, 'Testuser-bpm', '0264', 'K9KY', 'https://hgf.de/rhns', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(300, 'Testuser-bpm', '0362', 'U9LH', 'https://hgf.de/gz2v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(301, 'Testuser-bpm', '0479', '99M7', 'https://hgf.de/hagj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(302, 'Testuser-bpm', '0489', 'K7DQ', 'https://hgf.de/35nu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(303, 'Testuser-bpm', '0309', 'K9ML', 'https://hgf.de/6i0z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(304, 'Testuser-bpm', '0365', 'U9MX', 'https://hgf.de/8x5v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(305, 'Testuser-bpm', '0425', '99NP', 'https://hgf.de/t6t7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(306, 'Testuser-bpm', '0495', 'K7HT', 'https://hgf.de/sq9i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(307, 'Testuser-bpm', '0324', 'K9P4', 'https://hgf.de/agyj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(308, 'Testuser-bpm', '0305', 'U9PK', 'https://hgf.de/cd8k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(309, 'Testuser-bpm', '0441', '99QA', 'https://hgf.de/xcmx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(310, 'Testuser-bpm', '0428', 'K9QN', 'https://hgf.de/xxyi', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(311, 'Testuser-bpm', '0375', 'U9R3', 'https://hgf.de/r6gq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(312, 'Testuser-bpm', '0379', '99RR', 'https://hgf.de/i-7m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(313, 'Testuser-bpm', '0431', 'K9T9', 'https://hgf.de/pu-p', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(314, 'Testuser-bpm', '0455', 'U9TM', 'https://hgf.de/3toe', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(315, 'Testuser-bpm', '0372', '99UD', 'https://hgf.de/t5je', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(316, 'Testuser-bpm', '0354', 'K9UQ', 'https://hgf.de/96-k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(317, 'Testuser-bpm', '0361', 'U9V7', 'https://hgf.de/032x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(318, 'Testuser-bpm', '0282', '99VU', 'https://hgf.de/3puo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(319, 'Testuser-bpm', '0445', 'K9WC', 'https://hgf.de/6y3c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(320, 'Testuser-bpm', '0271', 'U9WP', 'https://hgf.de/nxkw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(321, 'Testuser-bpm', '0423', '99XF', 'https://hgf.de/k58i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(322, 'Testuser-bpm', '0311', 'K9XT', 'https://hgf.de/xgm6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(323, 'Testuser-bpm', '0385', 'U9YA', 'https://hgf.de/o263', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(324, 'Testuser-bpm', '0358', '99YW', 'https://hgf.de/pcg9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(325, 'Testuser-bpm', '0452', 'KA3E', 'https://hgf.de/cfh8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(326, 'Testuser-bpm', '0284', 'UA3R', 'https://hgf.de/1gi5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(327, 'Testuser-bpm', '0481', 'U77K', 'https://hgf.de/iwvu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(328, 'Testuser-bpm', '0410', '9A4J', 'https://hgf.de/nrqx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(329, 'Testuser-bpm', '0261', 'KA4V', 'https://hgf.de/juap', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(330, 'Testuser-bpm', '0422', 'UA7D', 'https://hgf.de/j5l3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(331, 'Testuser-bpm', '0307', '9A7Y', 'https://hgf.de/jov4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(332, 'Testuser-bpm', '0442', 'KA9H', 'https://hgf.de/cacu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(333, 'Testuser-bpm', '0289', 'UA9U', 'https://hgf.de/t4sp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(334, 'Testuser-bpm', '0302', '9AAL', 'https://hgf.de/eybr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(335, 'Testuser-bpm', '0256', 'KAAX', 'https://hgf.de/15vw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(336, 'Testuser-bpm', '0414', 'UACF', 'https://hgf.de/5c8x', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(337, 'Testuser-bpm', '0259', '9AD4', 'https://hgf.de/q8bm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(338, 'Testuser-bpm', '0394', 'KADK', 'https://hgf.de/cnjf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(339, 'Testuser-bpm', '0368', 'UADW', 'https://hgf.de/vifa', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(340, 'Testuser-bpm', '0436', '9AEN', 'https://hgf.de/xrcg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(341, 'Testuser-bpm', '0347', 'KAF3', 'https://hgf.de/7rvu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(342, 'Testuser-bpm', '0499', 'U7KR', 'https://hgf.de/2j75', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(343, 'Testuser-bpm', '0393', 'UAFJ', 'https://hgf.de/pa01', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(344, 'Testuser-bpm', '0327', '9AH9', 'https://hgf.de/4i9s', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(345, 'Testuser-bpm', '0497', '97JW', 'https://hgf.de/pl3o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(346, 'Testuser-bpm', '0325', 'KAHM', 'https://hgf.de/s31z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(347, 'Testuser-bpm', '0263', 'UAHY', 'https://hgf.de/c6w-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(348, 'Testuser-bpm', '0301', '9AJQ', 'https://hgf.de/5h6z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(349, 'Testuser-bpm', '0492', 'K7FC', 'https://hgf.de/iebh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(350, 'Testuser-bpm', '0287', 'KAK7', 'https://hgf.de/t7me', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(351, 'Testuser-bpm', '0473', 'UAKL', 'https://hgf.de/e8j-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(352, 'Testuser-bpm', '0475', '9ALC', 'https://hgf.de/hyfo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(353, 'Testuser-bpm', '0320', 'KALP', 'https://hgf.de/p5pd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(354, 'Testuser-bpm', '0391', 'UAM4', 'https://hgf.de/ir-k', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(355, 'Testuser-bpm', '0450', '9AMT', 'https://hgf.de/q8x3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(356, 'Testuser-bpm', '0468', 'KANA', 'https://hgf.de/drsh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(357, 'Testuser-bpm', '0314', 'UANN', 'https://hgf.de/sfch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(358, 'Testuser-bpm', '0350', '9APE', 'https://hgf.de/lu8v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(359, 'Testuser-bpm', '0318', 'KAPR', 'https://hgf.de/ait6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(360, 'Testuser-bpm', '0352', 'UAQ9', 'https://hgf.de/vgog', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(361, 'Testuser-bpm', '0451', '9AQV', 'https://hgf.de/771o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(362, 'Testuser-bpm', '0421', 'KARD', 'https://hgf.de/9bq3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(363, 'Testuser-bpm', '0315', 'UARQ', 'https://hgf.de/b6zr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(364, 'Testuser-bpm', '0370', '9ATH', 'https://hgf.de/oson', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(365, 'Testuser-bpm', '0390', 'KATU', 'https://hgf.de/4qrt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(366, 'Testuser-bpm', '0470', 'UAUC', 'https://hgf.de/t38i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(367, 'Testuser-bpm', '0317', '9AUX', 'https://hgf.de/ekik', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(368, 'Testuser-bpm', '0397', 'KAVF', 'https://hgf.de/0rh4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(369, 'Testuser-bpm', '0461', 'UAVT', 'https://hgf.de/sal8', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(370, 'Testuser-bpm', '0376', '9AWK', 'https://hgf.de/xx57', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(371, 'Testuser-bpm', '0353', 'KAWW', 'https://hgf.de/vnmv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(372, 'Testuser-bpm', '0272', 'UAXE', 'https://hgf.de/k45m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(373, 'Testuser-bpm', '0349', '9AY3', 'https://hgf.de/o4m1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(374, 'Testuser-bpm', '0447', 'KAYJ', 'https://hgf.de/hclx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(375, 'Testuser-bpm', '0300', 'UAYV', 'https://hgf.de/ayy7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(376, 'Testuser-bpm', '0299', '9C3M', 'https://hgf.de/9krk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(377, 'Testuser-bpm', '0319', 'KC3Y', 'https://hgf.de/gpsv', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(378, 'Testuser-bpm', '0400', 'UC4H', 'https://hgf.de/qfqw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(379, 'Testuser-bpm', '0494', '97HF', 'https://hgf.de/-wxz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(380, 'Testuser-bpm', '0286', '9C77', 'https://hgf.de/tmw2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(381, 'Testuser-bpm', '0374', 'KC7L', 'https://hgf.de/84nj', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(382, 'Testuser-bpm', '0482', '979A', 'https://hgf.de/ily3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(383, 'Testuser-bpm', '0357', 'UC7X', 'https://hgf.de/dyfw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(384, 'Testuser-bpm', '0484', 'U7A3', 'https://hgf.de/-ak5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(385, 'Testuser-bpm', '0288', '9C9P', 'https://hgf.de/eu7w', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(386, 'Testuser-bpm', '0280', 'KCA4', 'https://hgf.de/r-2e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(387, 'Testuser-bpm', '0322', 'UCAK', 'https://hgf.de/eq0f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(388, 'Testuser-bpm', '0399', '9CCA', 'https://hgf.de/rvvg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(389, 'Testuser-bpm', '0456', 'KCCN', 'https://hgf.de/qnul', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(390, 'Testuser-bpm', '0459', 'UCD3', 'https://hgf.de/zab3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(391, 'Testuser-bpm', '0270', '9CDR', 'https://hgf.de/oq2o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(392, 'Testuser-bpm', '0338', 'KCE9', 'https://hgf.de/5z2o', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(393, 'Testuser-bpm', '0339', 'UCEM', 'https://hgf.de/0dr9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(394, 'Testuser-bpm', '0278', '9CFD', 'https://hgf.de/yll5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(395, 'Testuser-bpm', '0251', 'KCFQ', 'https://hgf.de/j7ev', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(396, 'Testuser-bpm', '0266', 'UCH7', 'https://hgf.de/4a3v', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(397, 'Testuser-bpm', '0500', '97LJ', 'https://hgf.de/6yvd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(398, 'Testuser-bpm', '0380', '9CHU', 'https://hgf.de/g1n6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(399, 'Testuser-bpm', '0493', 'U7FP', 'https://hgf.de/6dm4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(400, 'Testuser-bpm', '0276', 'KCJC', 'https://hgf.de/pcnd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(401, 'Testuser-bpm', '0343', 'UCJP', 'https://hgf.de/edbh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(402, 'Testuser-bpm', '0405', '9CKF', 'https://hgf.de/ffc3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(403, 'Testuser-bpm', '0345', 'KCKT', 'https://hgf.de/y3y2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(404, 'Testuser-bpm', '0483', 'K79N', 'https://hgf.de/2llt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(405, 'Testuser-bpm', '0433', 'UCLA', 'https://hgf.de/h-1n', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(406, 'Testuser-bpm', '0323', '9CLW', 'https://hgf.de/salm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(407, 'Testuser-bpm', '0254', 'KCME', 'https://hgf.de/2tln', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(408, 'Testuser-bpm', '0443', 'UCMR', 'https://hgf.de/f1n5', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(409, 'Testuser-bpm', '0406', '9CNJ', 'https://hgf.de/t1v6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(410, 'Testuser-bpm', '0262', 'KCNV', 'https://hgf.de/rh34', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(411, 'Testuser-bpm', '0265', 'UCPD', 'https://hgf.de/l98f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(412, 'Testuser-bpm', '0306', '9CPY', 'https://hgf.de/0z9h', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(413, 'Testuser-bpm', '0432', 'KCQH', 'https://hgf.de/12pr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(414, 'Testuser-bpm', '0387', 'UCQU', 'https://hgf.de/lrqk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(415, 'Testuser-bpm', '0458', '9CRL', 'https://hgf.de/y1ca', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(416, 'Testuser-bpm', '0363', 'KCRX', 'https://hgf.de/wpvq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(417, 'Testuser-bpm', '0392', 'UCTF', 'https://hgf.de/j0sb', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(418, 'Testuser-bpm', '0477', '9CU4', 'https://hgf.de/0dj7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(419, 'Testuser-bpm', '0434', 'KCUK', 'https://hgf.de/5-go', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(420, 'Testuser-bpm', '0255', 'UCUW', 'https://hgf.de/3qps', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(421, 'Testuser-bpm', '0440', '9CVN', 'https://hgf.de/ztu9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(422, 'Testuser-bpm', '0464', 'KCW3', 'https://hgf.de/prra', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(423, 'Testuser-bpm', '0396', 'UCWJ', 'https://hgf.de/1df7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(424, 'Testuser-bpm', '0281', '9CX9', 'https://hgf.de/t67a', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(425, 'Testuser-bpm', '0258', 'KCXM', 'https://hgf.de/wmct', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(426, 'Testuser-bpm', '0463', 'UCXY', 'https://hgf.de/99bu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(427, 'Testuser-bpm', '0267', '9CYQ', 'https://hgf.de/plhm', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(428, 'Testuser-bpm', '0448', 'KD37', 'https://hgf.de/nexf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(429, 'Testuser-bpm', '0366', 'UD3L', 'https://hgf.de/pshy', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(430, 'Testuser-bpm', '0401', '9D4C', 'https://hgf.de/fz8l', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(431, 'Testuser-bpm', '0341', 'KD4P', 'https://hgf.de/laa-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(432, 'Testuser-bpm', '0364', 'UD74', 'https://hgf.de/sna3', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(433, 'Testuser-bpm', '0429', '9D7T', 'https://hgf.de/mpln', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(434, 'Testuser-bpm', '0403', 'KD9A', 'https://hgf.de/y0yd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(435, 'Testuser-bpm', '0430', 'UD9N', 'https://hgf.de/idb0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(436, 'Testuser-bpm', '0273', '9DAE', 'https://hgf.de/m8n4', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(437, 'Testuser-bpm', '0277', 'KDAR', 'https://hgf.de/a8q7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(438, 'Testuser-bpm', '0460', 'UDC9', 'https://hgf.de/-zx1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(439, 'Testuser-bpm', '0419', '9DCV', 'https://hgf.de/01zt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(440, 'Testuser-bpm', '0268', 'KDDD', 'https://hgf.de/oa8i', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(441, 'Testuser-bpm', '0496', 'U7JA', 'https://hgf.de/oam2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(442, 'Testuser-bpm', '0486', 'K7C9', 'https://hgf.de/ntir', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(443, 'Testuser-bpm', '0395', 'UDDQ', 'https://hgf.de/aie9', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(444, 'Testuser-bpm', '0453', '9DEH', 'https://hgf.de/p07r', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(445, 'Testuser-bpm', '0253', 'KDEU', 'https://hgf.de/0n7z', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(446, 'Testuser-bpm', '0480', 'UDFC', 'https://hgf.de/1xuz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(447, 'Testuser-bpm', '0382', '9DFX', 'https://hgf.de/xs9e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(448, 'Testuser-bpm', '0412', 'KDHF', 'https://hgf.de/kfsd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(449, 'Testuser-bpm', '0275', 'UDHT', 'https://hgf.de/f6go', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(450, 'Testuser-bpm', '0389', '9DJK', 'https://hgf.de/n7yg', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(451, 'Testuser-bpm', '0279', 'KDJW', 'https://hgf.de/p9lz', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(452, 'Testuser-bpm', '0295', 'UDKE', 'https://hgf.de/kr7d', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(453, 'Testuser-bpm', '0490', 'U7E7', 'https://hgf.de/9s1f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(454, 'Testuser-bpm', '0342', '9DL3', 'https://hgf.de/4gyh', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(455, 'Testuser-bpm', '0371', 'KDLJ', 'https://hgf.de/pgr6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(456, 'Testuser-bpm', '0416', 'UDLV', 'https://hgf.de/ni-f', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(457, 'Testuser-bpm', '0398', '9DMM', 'https://hgf.de/5e1q', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(458, 'Testuser-bpm', '0466', 'KDMY', 'https://hgf.de/tgt-', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(459, 'Testuser-bpm', '0336', 'UDNH', 'https://hgf.de/191m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(460, 'Testuser-bpm', '0457', '9DP7', 'https://hgf.de/hkb7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(461, 'Testuser-bpm', '0469', 'KDPL', 'https://hgf.de/2ujq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(462, 'Testuser-bpm', '0269', 'UDPX', 'https://hgf.de/e5-m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(463, 'Testuser-bpm', '0487', 'U7CM', 'https://hgf.de/azfq', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(464, 'Testuser-bpm', '0294', '9DQP', 'https://hgf.de/j3gt', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(465, 'Testuser-bpm', '0344', 'KDR4', 'https://hgf.de/9go2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(466, 'Testuser-bpm', '0446', 'UDRK', 'https://hgf.de/l3b7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(467, 'Testuser-bpm', '0335', '9DTA', 'https://hgf.de/nqjo', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(468, 'Testuser-bpm', '0404', 'KDTN', 'https://hgf.de/m353', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(469, 'Testuser-bpm', '0411', 'UDU3', 'https://hgf.de/wrmf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(470, 'Testuser-bpm', '0348', '9DUR', 'https://hgf.de/r6rd', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(471, 'Testuser-bpm', '0369', 'KDV9', 'https://hgf.de/c998', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(472, 'Testuser-bpm', '0415', 'Ubpm', 'https://hgf.de/huat', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(473, 'Testuser-bpm', '0298', '9DWD', 'https://hgf.de/vanp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(474, 'Testuser-bpm', '0356', 'KDWQ', 'https://hgf.de/bj84', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(475, 'Testuser-bpm', '0474', 'UDX7', 'https://hgf.de/48rx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(476, 'Testuser-bpm', '0326', '9DXU', 'https://hgf.de/ifbc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(477, 'Testuser-bpm', '0316', 'KDYC', 'https://hgf.de/no78', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(478, 'Testuser-bpm', '0304', 'UDYP', 'https://hgf.de/e69p', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(479, 'Testuser-bpm', '0444', '9E3F', 'https://hgf.de/demc', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(480, 'Testuser-bpm', '0472', 'KE3T', 'https://hgf.de/y6yf', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(481, 'Testuser-bpm', '0417', 'UE4A', 'https://hgf.de/k8yr', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(482, 'Testuser-bpm', '0478', '9E4W', 'https://hgf.de/fg-c', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(483, 'Testuser-bpm', '0252', 'KE7E', 'https://hgf.de/tyq6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(484, 'Testuser-bpm', '0333', 'UE7R', 'https://hgf.de/ggg2', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(485, 'Testuser-bpm', '0491', '97EU', 'https://hgf.de/-mu1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(486, 'Testuser-bpm', '0384', '9E9J', 'https://hgf.de/r230', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(487, 'Testuser-bpm', '0386', 'KE9V', 'https://hgf.de/vx2b', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(488, 'Testuser-bpm', '0388', 'UEAD', 'https://hgf.de/elzx', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(489, 'Testuser-bpm', '0312', '9EAY', 'https://hgf.de/ueuw', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(490, 'Testuser-bpm', '0330', 'KECH', 'https://hgf.de/jxgk', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(491, 'Testuser-bpm', '0360', 'UECU', 'https://hgf.de/2x3e', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(492, 'Testuser-bpm', '0328', '9EDL', 'https://hgf.de/413y', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(493, 'Testuser-bpm', '0321', 'KEDX', 'https://hgf.de/xanu', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(494, 'Testuser-bpm', '0437', 'UEEF', 'https://hgf.de/40zp', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(495, 'Testuser-bpm', '0346', '9EF4', 'https://hgf.de/iqy6', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(496, 'Testuser-bpm', '0367', 'KEFK', 'https://hgf.de/flli', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(497, 'Testuser-bpm', '0465', 'UEFW', 'https://hgf.de/5ln0', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(498, 'Testuser-bpm', '0283', '9EHN', 'https://hgf.de/7q54', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(499, 'Testuser-bpm', '0310', 'KEJ3', 'https://hgf.de/okv7', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'), +(500, 'Testuser-bpm', '0313', 'UEJJ', 'https://hgf.de/727m', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'A'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_termine` +-- + +CREATE TABLE `bpm_termine` ( + `tm_id` int(11) NOT NULL, + `tm_datum` datetime NOT NULL, + `tm_standort` enum('K','L') NOT NULL, + `tm_plaetze` int(11) NOT NULL COMMENT 'Anzahl der möglichen Teilnehmer', + `tm_raum` varchar(200) NOT NULL, + `tm_referenznr` varchar(200) NOT NULL COMMENT 'Verwendungszweck Überweisung' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_termine` +-- + +INSERT INTO `bpm_termine` (`tm_id`, `tm_datum`, `tm_standort`, `tm_plaetze`, `tm_raum`, `tm_referenznr`) VALUES +(6, '2020-07-16 09:30:00', 'L', 15, '5.109', 'TEST BPM'), +(7, '2020-07-31 09:30:00', 'L', 15, '5.109', 'TEST BPM2'), +(8, '2020-08-03 09:30:00', 'L', 15, '5.109', 'TEST BPM3'), +(9, '2020-08-10 09:30:00', 'L', 15, '5.109', 'TEST BPM4'), +(10, '2021-08-03 09:30:00', 'L', 15, '5.109', 'TEST BPM5 - 2023'); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_term_kand` +-- + +CREATE TABLE `bpm_term_kand` ( + `tk_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `tm_id` int(11) NOT NULL, + `tp_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_term_kand` +-- + +INSERT INTO `bpm_term_kand` (`tk_id`, `ka_id`, `tm_id`, `tp_id`) VALUES +(3, 4, 6, 175); + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_upload` +-- + +CREATE TABLE `bpm_upload` ( + `up_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `file` varchar(250) NOT NULL, + `beschreibung` varchar(250) NOT NULL, + `dok_dat` datetime NOT NULL, + `upload_dat` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `bpm_zuordnung_hs` +-- + +CREATE TABLE `bpm_zuordnung_hs` ( + `zu_id` int(11) NOT NULL, + `plz` int(11) NOT NULL, + `ort` varchar(250) NOT NULL, + `landkreis` varchar(250) NOT NULL, + `rp` varchar(250) NOT NULL, + `hs` enum('Ludwigsburg','Kehl') NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- +-- Daten für Tabelle `bpm_zuordnung_hs` +-- + +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(1, 78267, 'Aach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(2, 73430, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(3, 73431, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(4, 73432, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(5, 73433, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(6, 73434, 'Aalen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(7, 74232, 'Abstatt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(8, 73453, 'Abtsgmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(9, 88147, 'Achberg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(10, 77855, 'Achern', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(11, 88480, 'Achstetten', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(12, 73099, 'Adelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(13, 73486, 'Adelmannsfelden', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(14, 74740, 'Adelsheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(15, 71563, 'Affalterbach', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(16, 74858, 'Aglasterhausen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(17, 74744, 'Ahorn', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(18, 73101, 'Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(19, 78733, 'Aichhalden', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(20, 88317, 'Aichstetten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(21, 72631, 'Aichtal', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(22, 73773, 'Aichwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(23, 71134, 'Aidlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(24, 79677, 'Aitern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(25, 88319, 'Aitrach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(26, 79774, 'Albbruck', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(27, 73095, 'Albershausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(28, 72458, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(29, 72459, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(30, 72461, 'Albstadt', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(31, 78554, 'Aldingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(32, 73553, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(33, 73655, 'Alfdorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(34, 78476, 'Allensbach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(35, 88422, 'Alleshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(36, 88348, 'Allmannsweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(37, 89604, 'Allmendingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(38, 71573, 'Allmersbach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(39, 72275, 'Alpirsbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(40, 73776, 'Altbach', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(41, 71155, 'Altdorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(42, 72655, 'Altdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(43, 72657, 'Altenriet', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(44, 72213, 'Altensteig', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(45, 88499, 'Altheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(46, 89605, 'Altheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(47, 89174, 'Altheim (Alb)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(48, 75382, 'Althengstett', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(49, 71566, 'Althütte', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(50, 68804, 'Altlußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(51, 88361, 'Altshausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(52, 72119, 'Ammerbuch', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(53, 73340, 'Amstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(54, 88279, 'Amtzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(55, 74918, 'Angelbachtal', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(56, 77767, 'Appenweier', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(57, 88260, 'Argenbühl', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(58, 71546, 'Aspach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(59, 71679, 'Asperg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(60, 97959, 'Assamstadt', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(61, 89176, 'Asselfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(62, 88448, 'Attenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(63, 79280, 'Au', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(64, 76474, 'Au am Rhein', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(65, 71549, 'Auenwald', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(66, 79424, 'Auggen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(67, 88326, 'Aulendorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(68, 71522, 'Backnang', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(69, 79415, 'Bad Bellingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(70, 73087, 'Bad Boll', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(71, 88422, 'Bad Buchau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(72, 73312, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(73, 73342, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(74, 73345, 'Bad Ditzenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(75, 78073, 'Bad Dürrheim', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(76, 76530, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(77, 76532, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(78, 76534, 'Baden-Baden', '', 'Karlsruhe', 'Kehl'), +(79, 79410, 'Badenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(80, 74177, 'Bad Friedrichshall', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(81, 76332, 'Bad Herrenalb', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(82, 79189, 'Bad Krozingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(83, 75378, 'Bad Liebenzell', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(84, 97980, 'Bad Mergentheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(85, 72250, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(86, 77740, 'Bad Peterstal-Griesbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(87, 74906, 'Bad Rappenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(88, 77776, 'Bad Rippoldsau-Schapbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(89, 79713, 'Bad Säckingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(90, 88348, 'Bad Saulgau', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(91, 76669, 'Bad Schönborn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(92, 88427, 'Bad Schussenried', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(93, 75385, 'Bad Teinach-Zavelstein', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(94, 73337, 'Bad Überkingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(95, 72574, 'Bad Urach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(96, 88339, 'Bad Waldsee', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(97, 75323, 'Bad Wildbad', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(98, 74206, 'Bad Wimpfen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(99, 88410, 'Bad Wurzach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(100, 79353, 'Bahlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(101, 88255, 'Baienfurt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(102, 72270, 'Baiersbronn', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(103, 88255, 'Baindt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(104, 78582, 'Balgheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(105, 72336, 'Balingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(106, 89177, 'Ballendorf', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(107, 79282, 'Ballrechten-Dottingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(108, 73666, 'Baltmannsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(109, 88481, 'Balzheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(110, 69245, 'Bammental', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(111, 78580, 'Bärenthal', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(112, 73566, 'Bartholomä', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(113, 71543, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(114, 71717, 'Beilstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(115, 89179, 'Beimerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(116, 72658, 'Bempflingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(117, 71726, 'Benningen am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(118, 88276, 'Berg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(119, 88368, 'Bergatreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(120, 77791, 'Berghaupten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(121, 89180, 'Berghülen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(122, 73663, 'Berglen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(123, 88450, 'Berkheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(124, 88697, 'Bermatingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(125, 79872, 'Bernau im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(126, 89182, 'Bernstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(127, 74354, 'Besigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(128, 88422, 'Betzenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(129, 72660, 'Beuren', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(130, 88631, 'Beuron', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(131, 77781, 'Biberach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(132, 88400, 'Biberach an der Riß', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(133, 79215, 'Biederbach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(134, 76467, 'Bietigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(135, 74321, 'Bietigheim-Bissingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(136, 74842, 'Billigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(137, 74862, 'Binau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(138, 72511, 'Bingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(139, 79589, 'Binzen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(140, 73102, 'Birenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(141, 75217, 'Birkenfeld', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(142, 76476, 'Bischweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(143, 72406, 'Bisingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(144, 73266, 'Bissingen an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(145, 72475, 'Bitz', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(146, 89143, 'Blaubeuren', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(147, 74572, 'Blaufelden', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(148, 89134, 'Blaustein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(149, 78176, 'Blumberg', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(150, 73560, 'Böbingen an der Rems', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(151, 71032, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(152, 71034, 'Böblingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(153, 72411, 'Bodelshausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(154, 78351, 'Bodman-Ludwigshafen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(155, 88285, 'Bodnegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(156, 89558, 'Böhmenkirch', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(157, 79677, 'Böllen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(158, 79283, 'Bollschweil', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(159, 88361, 'Boms', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(160, 71149, 'Bondorf', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(161, 79848, 'Bonndorf im Schwarzwald', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(162, 74357, 'Bönnigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(163, 73441, 'Bopfingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(164, 89177, 'Börslingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(165, 73104, 'Börtlingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(166, 78662, 'Bösingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(167, 78583, 'Böttingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(168, 79268, 'Bötzingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(169, 97944, 'Boxberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(170, 74336, 'Brackenheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(171, 78199, 'Bräunlingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(172, 74542, 'Braunsbach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(173, 79206, 'Breisach am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(174, 89183, 'Breitingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(175, 79874, 'Breitnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(176, 75015, 'Bretten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(177, 74626, 'Bretzfeld', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(178, 78086, 'Brigachtal', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(179, 76646, 'Bruchsal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(180, 68782, 'Brühl', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(181, 78585, 'Bubsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(182, 79256, 'Buchenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(183, 74722, 'Buchen (Odenwald)', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(184, 78567, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(185, 88637, 'Buchheim', 'Landkreis Tuttlingen', 'Freiburg', 'Ludwigsburg'), +(186, 79426, 'Buggingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(187, 77815, 'Bühl', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(188, 77830, 'Bühlertal', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(189, 74424, 'Bühlertann', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(190, 74426, 'Bühlerzell', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(191, 88483, 'Burgrieden', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(192, 71576, 'Burgstetten', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(193, 72393, 'Burladingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(194, 78266, 'Büsingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(195, 75365, 'Calw', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(196, 74389, 'Cleebronn', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(197, 74564, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(198, 74597, 'Crailsheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(199, 97993, 'Creglingen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(200, 79837, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(201, 79875, 'Dachsberg (Südschwarzwald)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(202, 88718, 'Daisendorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(203, 78083, 'Dauchingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(204, 72356, 'Dautmergen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(205, 75392, 'Deckenpfronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(206, 88693, 'Deggenhausertal', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(207, 73312, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(208, 73326, 'Deggingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(209, 78586, 'Deilingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(210, 78652, 'Deißlingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(211, 73779, 'Deizisau', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(212, 73770, 'Denkendorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(213, 78554, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(214, 78588, 'Denkingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(215, 79211, 'Denzlingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(216, 72135, 'Dettenhausen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(217, 76706, 'Dettenheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(218, 79802, 'Dettighofen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(219, 72581, 'Dettingen an der Erms', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(220, 88451, 'Dettingen an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(221, 73265, 'Dettingen unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(222, 69234, 'Dielheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(223, 89165, 'Dietenheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(224, 78661, 'Dietingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(225, 89561, 'Dischingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(226, 71254, 'Ditzingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(227, 75335, 'Dobel', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(228, 79804, 'Dogern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(229, 78166, 'Donaueschingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(230, 73072, 'Donzdorf', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(231, 72358, 'Dormettingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(232, 72175, 'Dornhan', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(233, 89160, 'Dornstadt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(234, 72280, 'Dornstetten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(235, 74677, 'Dörzbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(236, 69221, 'Dossenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(237, 72359, 'Dotternhausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(238, 73345, 'Drackenstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(239, 78655, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(240, 78713, 'Dunningen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(241, 77770, 'Durbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(242, 78589, 'Dürbheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(243, 78591, 'Durchhausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(244, 73568, 'Durlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(245, 88525, 'Dürmentingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(246, 76448, 'Durmersheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(247, 73105, 'Dürnau', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(248, 88422, 'Dürnau', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(249, 72144, 'Dußlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(250, 88370, 'Ebenweiler', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(251, 64754, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(252, 69412, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(253, 69429, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(254, 69434, 'Eberbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(255, 71735, 'Eberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(256, 88436, 'Eberhardzell', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(257, 73061, 'Ebersbach an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(258, 88371, 'Ebersbach-Musbach', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(259, 74246, 'Eberstadt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(260, 72224, 'Ebhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(261, 79285, 'Ebringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(262, 68535, 'Edingen-Neckarhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(263, 79588, 'Efringen-Kirchen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(264, 72227, 'Egenhausen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(265, 78592, 'Egesheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(266, 76344, 'Eggenstein-Leopoldshafen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(267, 79805, 'Eggingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(268, 89584, 'Ehingen (Donau)', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(269, 71139, 'Ehningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(270, 79238, 'Ehrenkirchen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(271, 88361, 'Eichstegen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(272, 79356, 'Eichstetten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(273, 78253, 'Eigeltingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(274, 79591, 'Eimeldingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(275, 79871, 'Eisenbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(276, 75239, 'Eisingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(277, 73054, 'Eislingen/Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(278, 76477, 'Elchesheim-Illingen', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(279, 73488, 'Ellenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(280, 74248, 'Ellhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(281, 73479, 'Ellwangen (Jagst)', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(282, 79215, 'Elzach', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(283, 74834, 'Elztal', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(284, 88499, 'Emeringen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(285, 89607, 'Emerkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(286, 79312, 'Emmendingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(287, 78576, 'Emmingen-Liptingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(288, 72186, 'Empfingen', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(289, 79346, 'Endingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(290, 75331, 'Engelsbrand', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(291, 78234, 'Engen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(292, 72829, 'Engstingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(293, 72800, 'Eningen unter Achalm', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(294, 75337, 'Enzklösterle', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(295, 74925, 'Epfenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(296, 78736, 'Epfendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(297, 69214, 'Eppelheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(298, 75031, 'Eppingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(299, 89155, 'Erbach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(300, 71729, 'Erdmannhausen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(301, 88097, 'Eriskirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(302, 73268, 'Erkenbrechtsweiler', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(303, 74235, 'Erlenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(304, 88416, 'Erlenmoos', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(305, 74391, 'Erligheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(306, 88453, 'Erolzheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(307, 88521, 'Ertingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(308, 73569, 'Eschach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(309, 79427, 'Eschbach', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(310, 78664, 'Eschbronn', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(311, 74927, 'Eschelbronn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(312, 73037, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(313, 73107, 'Eschenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(314, 73457, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(315, 73563, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(316, 73566, 'Essingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(317, 73728, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(318, 73730, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(319, 73732, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(320, 73733, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(321, 73734, 'Esslingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(322, 77955, 'Ettenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(323, 76275, 'Ettlingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(324, 72184, 'Eutingen im Gäu', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(325, 74864, 'Fahrenbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(326, 79868, 'Feldberg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(327, 70734, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(328, 70736, 'Fellbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(329, 74579, 'Fichtenau', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(330, 74427, 'Fichtenberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(331, 70794, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(332, 71111, 'Filderstadt', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(333, 77716, 'Fischerbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(334, 79592, 'Fischingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(335, 74223, 'Flein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(336, 88373, 'Fleischwangen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(337, 78737, 'Fluorn-Winzeln', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(338, 76596, 'Forbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(339, 79362, 'Forchheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(340, 74670, 'Forchtenberg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(341, 76694, 'Forst', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(342, 74586, 'Frankenhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(343, 79348, 'Freiamt', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(344, 71691, 'Freiberg am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(345, 79098, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(346, 79100, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(347, 79102, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(348, 79104, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(349, 79106, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(350, 79108, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(351, 79110, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(352, 79111, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(353, 79112, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(354, 79114, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(355, 79115, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(356, 79117, 'Freiburg im Breisgau', '', 'Freiburg', 'Kehl'), +(357, 97896, 'Freudenberg', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(358, 72250, 'Freudenstadt', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(359, 74392, 'Freudental', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(360, 72636, 'Frickenhausen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(361, 88699, 'Frickingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(362, 78567, 'Fridingen an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(363, 79877, 'Friedenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(364, 88045, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(365, 88046, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(366, 88048, 'Friedrichshafen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(367, 77948, 'Friesenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(368, 71292, 'Friolzheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(369, 78665, 'Frittlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(370, 79677, 'Fröhnd', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(371, 88273, 'Fronreute', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(372, 78120, 'Furtwangen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(373, 76571, 'Gaggenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(374, 69251, 'Gaiberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(375, 78343, 'Gaienhofen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(376, 74405, 'Gaildorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(377, 78262, 'Gailingen am Hochrhein', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(378, 73108, 'Gammelshausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(379, 72501, 'Gammertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(380, 71116, 'Gärtringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(381, 71126, 'Gäufelden', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(382, 75391, 'Gechingen', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(383, 78187, 'Geisingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(384, 72351, 'Geislingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(385, 73312, 'Geislingen an der Steige', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(386, 75050, 'Gemmingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(387, 74376, 'Gemmrigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(388, 77723, 'Gengenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(389, 74582, 'Gerabronn', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(390, 70839, 'Gerlingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(391, 76593, 'Gernsbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(392, 89547, 'Gerstetten', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(393, 89522, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(394, 89537, 'Giengen an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(395, 73333, 'Gingen an der Fils', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(396, 72293, 'Glatten', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(397, 79286, 'Glottertal', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(398, 73571, 'Göggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(399, 72532, 'Gomadingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(400, 72810, 'Gomaringen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(401, 75053, 'Gondelsheim', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(402, 73033, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(403, 73035, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(404, 73037, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(405, 73116, 'Göppingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(406, 79733, 'Görwihl', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(407, 78559, 'Gosheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(408, 79288, 'Gottenheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(409, 78244, 'Gottmadingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(410, 76676, 'Graben-Neudorf', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(411, 72582, 'Grabenstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(412, 71120, 'Grafenau', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(413, 72661, 'Grafenberg', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(414, 79865, 'Grafenhausen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(415, 79639, 'Grenzach-Wyhlen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(416, 89608, 'Griesingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(417, 72294, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(418, 72297, 'Grömbach', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(419, 72663, 'Großbettlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(420, 71723, 'Großbottwar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(421, 72415, 'Grosselfingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(422, 71577, 'Großerlach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(423, 97950, 'Großrinderfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(424, 73344, 'Gruibingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(425, 89613, 'Grundsheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(426, 88287, 'Grünkraut', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(427, 97947, 'Grünsfeld', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(428, 74417, 'Gschwend', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(429, 88379, 'Guggenhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(430, 74363, 'Güglingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(431, 79194, 'Gundelfingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(432, 74831, 'Gundelsheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(433, 78594, 'Gunningen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(434, 79261, 'Gutach im Breisgau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(435, 77793, 'Gutach (Schwarzwaldbahn)', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(436, 78148, 'Gütenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(437, 88484, 'Gutenzell-Hürbel', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(438, 79685, 'Häg-Ehrsberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(439, 88709, 'Hagnau am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(440, 72401, 'Haigerloch', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(441, 72221, 'Haiterbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(442, 76707, 'Hambrücken', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(443, 74736, 'Hardheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(444, 78739, 'Hardt', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(445, 74239, 'Hardthausen am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(446, 79258, 'Hartheim am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(447, 79686, 'Hasel', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(448, 77716, 'Haslach im Kinzigtal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(449, 74855, 'Haßmersheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(450, 73110, 'Hattenhofen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(451, 77756, 'Hausach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(452, 89597, 'Hausen am Bussen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(453, 72361, 'Hausen am Tann', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(454, 79688, 'Hausen im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(455, 78595, 'Hausen ob Verena', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(456, 79837, 'Häusern', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(457, 72534, 'Hayingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(458, 72379, 'Hechingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(459, 69434, 'Heddesbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(460, 68542, 'Heddesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(461, 69115, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(462, 69117, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(463, 69118, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(464, 69120, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(465, 69121, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(466, 69123, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(467, 69124, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(468, 69126, 'Heidelberg', '', 'Karlsruhe', 'Kehl'), +(469, 89518, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(470, 89520, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(471, 89522, 'Heidenheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(472, 74072, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(473, 74074, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(474, 74076, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(475, 74078, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(476, 74080, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(477, 74081, 'Heilbronn', '', 'Stuttgart', 'Ludwigsburg'), +(478, 88633, 'Heiligenberg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(479, 69253, 'Heiligkreuzsteinach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(480, 71296, 'Heimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(481, 73037, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(482, 73092, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(483, 73107, 'Heiningen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(484, 79423, 'Heitersheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(485, 74921, 'Helmstadt-Bargen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(486, 71282, 'Hemmingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(487, 69502, 'Hemsbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(488, 88518, 'Herbertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(489, 79336, 'Herbolzheim', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(490, 89542, 'Herbrechtingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(491, 88634, 'Herdwangen-Schönach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(492, 89537, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(493, 89568, 'Hermaringen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(494, 72535, 'Heroldstatt', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(495, 71083, 'Herrenberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(496, 79737, 'Herrischried', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(497, 74394, 'Hessigheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(498, 72513, 'Hettingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(499, 73540, 'Heubach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(500, 73572, 'Heuchlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(501, 79194, 'Heuweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(502, 71157, 'Hildrizhausen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(503, 78247, 'Hilzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(504, 79856, 'Hinterzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(505, 72145, 'Hirrlingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(506, 69493, 'Hirschberg an der Bergstraße', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(507, 73269, 'Hochdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(508, 88436, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(509, 88454, 'Hochdorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(510, 79862, 'Höchenschwand', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(511, 68766, 'Hockenheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(512, 75339, 'Höfen an der Enz', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(513, 77716, 'Hofstetten', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(514, 77749, 'Hohberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(515, 78355, 'Hohenfels', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(516, 73345, 'Hohenstadt', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(517, 72531, 'Hohenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(518, 88367, 'Hohentengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(519, 79801, 'Hohentengen am Hochrhein', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(520, 71088, 'Holzgerlingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(521, 89183, 'Holzkirch', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(522, 73271, 'Holzmaden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(523, 74746, 'Höpfingen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(524, 72160, 'Horb am Neckar', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(525, 79289, 'Horben', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(526, 88263, 'Horgenzell', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(527, 78132, 'Hornberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(528, 88374, 'Hoßkirch', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(529, 74928, 'Hüffenhardt', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(530, 78183, 'Hüfingen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(531, 76549, 'Hügelsheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(532, 72584, 'Hülben', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(533, 89185, 'Hüttisheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(534, 73434, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(535, 73453, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(536, 73460, 'Hüttlingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(537, 79837, 'Ibach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(538, 76473, 'Iffezheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(539, 97999, 'Igersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(540, 73574, 'Iggingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(541, 79241, 'Ihringen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(542, 89171, 'Illerkirchberg', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(543, 89186, 'Illerrieden', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(544, 75428, 'Illingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(545, 88636, 'Illmensee', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(546, 74360, 'Ilsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(547, 74532, 'Ilshofen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(548, 68549, 'Ilvesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(549, 78194, 'Immendingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(550, 88090, 'Immenstaad am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(551, 74653, 'Ingelfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(552, 74379, 'Ingersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(553, 88456, 'Ingoldingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(554, 72514, 'Inzigkofen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(555, 79594, 'Inzlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(556, 78597, 'Irndorf', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(557, 88316, 'Isny im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(558, 75228, 'Ispringen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(559, 74930, 'Ittlingen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(560, 74249, 'Jagsthausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(561, 73489, 'Jagstzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(562, 79798, 'Jestetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(563, 71131, 'Jettingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(564, 72417, 'Jungingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(565, 73553, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(566, 73642, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(567, 73667, 'Kaisersbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(568, 75236, 'Kämpfelbach', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(569, 79400, 'Kandern', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(570, 88422, 'Kanzach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(571, 77966, 'Kappel-Grafenhausen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(572, 77876, 'Kappelrodeck', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(573, 76307, 'Karlsbad', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(574, 76689, 'Karlsdorf-Neuthard', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(575, 76131, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(576, 76133, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(577, 76135, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(578, 76137, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(579, 76139, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(580, 76149, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(581, 76185, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(582, 76187, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(583, 76189, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(584, 76199, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(585, 76227, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(586, 76228, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(587, 76229, 'Karlsruhe', '', 'Karlsruhe', 'Kehl'), +(588, 77694, 'Kehl', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(589, 75210, 'Keltern', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(590, 79341, 'Kenzingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(591, 71394, 'Kernen im Remstal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(592, 68775, 'Ketsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(593, 75249, 'Kieselbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(594, 77971, 'Kippenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(595, 74912, 'Kirchardt', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(596, 88486, 'Kirchberg an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(597, 74592, 'Kirchberg an der Jagst', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(598, 71737, 'Kirchberg an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(599, 88457, 'Kirchdorf an der Iller', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(600, 72138, 'Kirchentellinsfurt', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(601, 74366, 'Kirchheim am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(602, 73467, 'Kirchheim am Ries', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(603, 73230, 'Kirchheim unter Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(604, 79199, 'Kirchzarten', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(605, 88353, 'Kißlegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(606, 79692, 'Kleines Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(607, 79771, 'Klettgau', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(608, 75438, 'Knittlingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(609, 72664, 'Kohlberg', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(610, 78600, 'Kolbingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(611, 73257, 'Köngen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(612, 97953, 'Königheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(613, 75203, 'Königsbach-Stein', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(614, 89551, 'Königsbronn', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(615, 88376, 'Königseggwald', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(616, 78126, 'Königsfeld im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(617, 78598, 'Königsheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(618, 78462, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(619, 78464, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(620, 78465, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(621, 78467, 'Konstanz', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(622, 71404, 'Korb', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(623, 70825, 'Korntal-Münchingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(624, 70806, 'Kornwestheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(625, 76703, 'Kraichtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(626, 72505, 'Krauchenwies', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(627, 74238, 'Krautheim', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(628, 74594, 'Kreßberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(629, 88079, 'Kressbronn am Bodensee', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(630, 76709, 'Kronau', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(631, 73329, 'Kuchen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(632, 97900, 'Külsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(633, 74653, 'Künzelsau', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(634, 74635, 'Kupferzell', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(635, 76456, 'Kuppenheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(636, 75057, 'Kürnbach', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(637, 79790, 'Küssaberg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(638, 72127, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(639, 72138, 'Kusterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(640, 68526, 'Ladenburg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(641, 77933, 'Lahr/Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(642, 89150, 'Laichingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(643, 88085, 'Langenargen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(644, 89129, 'Langenau', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(645, 74243, 'Langenbrettach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(646, 74595, 'Langenburg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(647, 88515, 'Langenenslingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(648, 73466, 'Lauchheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(649, 79787, 'Lauchringen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(650, 97922, 'Lauda-Königshofen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(651, 69514, 'Laudenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(652, 77886, 'Lauf', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(653, 79725, 'Laufenburg (Baden)', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(654, 74348, 'Lauffen am Neckar', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(655, 88471, 'Laupheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(656, 77794, 'Lautenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(657, 89584, 'Lauterach', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(658, 78730, 'Lauterbach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(659, 73111, 'Lauterstein', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(660, 74251, 'Lehrensteinsfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(661, 88637, 'Leibertingen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(662, 69181, 'Leimen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(663, 70771, 'Leinfelden-Echterdingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(664, 74211, 'Leingarten', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(665, 73575, 'Leinzell', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(666, 73252, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(667, 73266, 'Lenningen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(668, 79853, 'Lenzkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(669, 71229, 'Leonberg', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(670, 71397, 'Leutenbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(671, 88299, 'Leutkirch im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(672, 77839, 'Lichtenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(673, 72805, 'Lichtenstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(674, 73669, 'Lichtenwald', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(675, 74838, 'Limbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(676, 76351, 'Linkenheim-Hochstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(677, 74931, 'Lobbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(678, 74369, 'Löchgau', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(679, 76597, 'Loffenau', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(680, 79843, 'Löffingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(681, 89173, 'Lonsee', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(682, 73547, 'Lorch', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(683, 79539, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(684, 79540, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(685, 79541, 'Lörrach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(686, 72290, 'Loßburg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(687, 79807, 'Lottstetten', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(688, 74245, 'Löwenstein', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'); +INSERT INTO `bpm_zuordnung_hs` (`zu_id`, `plz`, `ort`, `landkreis`, `rp`, `hs`) VALUES +(689, 71634, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(690, 71636, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(691, 71638, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(692, 71640, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(693, 71642, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(694, 71672, 'Ludwigsburg', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(695, 71106, 'Magstadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(696, 77972, 'Mahlberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(697, 78601, 'Mahlstetten', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(698, 74535, 'Mainhardt', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(699, 79429, 'Malsburg-Marzell', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(700, 69254, 'Malsch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(701, 76316, 'Malsch', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(702, 79364, 'Malterdingen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(703, 68159, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(704, 68161, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(705, 68163, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(706, 68165, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(707, 68167, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(708, 68169, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(709, 68199, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(710, 68219, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(711, 68229, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(712, 68239, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(713, 68259, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(714, 68305, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(715, 68307, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(716, 68309, 'Mannheim', '', 'Karlsruhe', 'Kehl'), +(717, 71672, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(718, 71711, 'Marbach am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(719, 79232, 'March', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(720, 88677, 'Markdorf', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(721, 71706, 'Markgröningen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(722, 76359, 'Marxzell', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(723, 88437, 'Maselheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(724, 74252, 'Massenbachhausen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(725, 69256, 'Mauer', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(726, 75433, 'Maulbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(727, 79689, 'Maulburg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(728, 88074, 'Meckenbeuren', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(729, 74909, 'Meckesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(730, 88709, 'Meersburg', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(731, 72537, 'Mehrstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(732, 77974, 'Meißenheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(733, 88512, 'Mengen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(734, 79291, 'Merdingen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(735, 89188, 'Merklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(736, 79249, 'Merzhausen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(737, 88605, 'Meßkirch', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(738, 72469, 'Meßstetten', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(739, 72555, 'Metzingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(740, 74544, 'Michelbach an der Bilz', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(741, 74545, 'Michelfeld', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(742, 88487, 'Mietingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(743, 88441, 'Mittelbiberach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(744, 74219, 'Möckmühl', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(745, 73563, 'Mögglingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(746, 71696, 'Möglingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(747, 78087, 'Mönchweiler', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(748, 71297, 'Mönsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(749, 78345, 'Moos', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(750, 88422, 'Moosburg', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(751, 74821, 'Mosbach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(752, 72116, 'Mössingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(753, 71159, 'Mötzingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(754, 69427, 'Mudau', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(755, 76461, 'Muggensturm', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(756, 75417, 'Mühlacker', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(757, 77796, 'Mühlenbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(758, 69242, 'Mühlhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(759, 78259, 'Mühlhausen-Ehingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(760, 73347, 'Mühlhausen im Täle', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(761, 78570, 'Mühlheim an der Donau', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(762, 78357, 'Mühlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(763, 74673, 'Mulfingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(764, 79379, 'Müllheim', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(765, 74395, 'Mundelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(766, 89597, 'Munderkingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(767, 72525, 'Münsingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(768, 79244, 'Münstertal/Schwarzwald', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(769, 79730, 'Murg', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(770, 71711, 'Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(771, 71540, 'Murrhardt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(772, 73557, 'Mutlangen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(773, 72202, 'Nagold', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(774, 89564, 'Nattheim', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(775, 74924, 'Neckarbischofsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(776, 69151, 'Neckargemünd', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(777, 69437, 'Neckargerach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(778, 74172, 'Neckarsulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(779, 72666, 'Neckartailfingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(780, 72654, 'Neckartenzlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(781, 74382, 'Neckarwestheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(782, 74865, 'Neckarzimmern', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(783, 89189, 'Neenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(784, 72147, 'Nehren', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(785, 74933, 'Neidenstein', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(786, 73272, 'Neidlingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(787, 89191, 'Nellingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(788, 89129, 'Nerenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(789, 73450, 'Neresheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(790, 75385, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(791, 75387, 'Neubulach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(792, 74861, 'Neudenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(793, 75305, 'Neuenbürg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(794, 79395, 'Neuenburg am Rhein', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(795, 74196, 'Neuenstadt am Kocher', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(796, 74632, 'Neuenstein', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(797, 72639, 'Neuffen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(798, 72419, 'Neufra', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(799, 75242, 'Neuhausen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(800, 73765, 'Neuhausen auf den Fildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(801, 78579, 'Neuhausen ob Eck', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(802, 88099, 'Neukirch', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(803, 73491, 'Neuler', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(804, 75245, 'Neulingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(805, 68809, 'Neulußheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(806, 74867, 'Neunkirchen', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(807, 77743, 'Neuried', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(808, 72149, 'Neustetten', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(809, 75389, 'Neuweiler', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(810, 78078, 'Niedereschach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(811, 74676, 'Niedernhall', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(812, 97996, 'Niederstetten', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(813, 89168, 'Niederstotzingen', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(814, 75223, 'Niefern-Öschelbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(815, 74226, 'Nordheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(816, 77787, 'Nordrach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(817, 73274, 'Notzingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(818, 71154, 'Nufringen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(819, 72622, 'Nürtingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(820, 72362, 'Nusplingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(821, 69226, 'Nußloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(822, 72644, 'Oberboihingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(823, 75038, 'Oberderdingen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(824, 89610, 'Oberdischingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(825, 73569, 'Obergröningen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(826, 77784, 'Oberharmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(827, 68794, 'Oberhausen-Rheinhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(828, 77704, 'Oberkirch', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(829, 73447, 'Oberkochen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(830, 89611, 'Obermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(831, 78727, 'Oberndorf am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(832, 72364, 'Obernheim', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(833, 75394, 'Oberreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(834, 79254, 'Oberried', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(835, 71739, 'Oberriexingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(836, 74420, 'Oberrot', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(837, 74423, 'Obersontheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(838, 89613, 'Oberstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(839, 71720, 'Oberstenfeld', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(840, 74182, 'Obersulm', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(841, 88094, 'Oberteuringen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(842, 77709, 'Oberwolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(843, 74847, 'Obrigheim', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(844, 88416, 'Ochsenhausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(845, 74229, 'Oedheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(846, 74254, 'Offenau', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(847, 77652, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(848, 77654, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(849, 77656, 'Offenburg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(850, 72131, 'Ofterdingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(851, 68723, 'Oftersheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(852, 88422, 'Oggelshausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(853, 77797, 'Ohlsbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(854, 73275, 'Ohmden', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(855, 78337, 'Öhningen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(856, 74613, 'Öhringen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(857, 75248, 'Ölbronn-Dürrn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(858, 89129, 'Öllingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(859, 89614, 'Öpfingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(860, 77728, 'Oppenau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(861, 71560, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(862, 71570, 'Oppenweiler', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(863, 78359, 'Orsingen-Nenzingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(864, 77799, 'Ortenberg', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(865, 75395, 'Ostelsheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(866, 74706, 'Osterburken', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(867, 73760, 'Ostfildern', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(868, 88356, 'Ostrach', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(869, 76684, 'Östringen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(870, 76470, 'Ötigheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(871, 75443, 'Ötisheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(872, 73113, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(873, 73529, 'Ottenbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(874, 77883, 'Ottenhöfen im Schwarzwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(875, 77833, 'Ottersweier', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(876, 73277, 'Owen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(877, 88696, 'Owingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(878, 74397, 'Pfaffenhofen', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(879, 79292, 'Pfaffenweiler', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(880, 72285, 'Pfalzgrafenweiler', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(881, 74629, 'Pfedelbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(882, 76327, 'Pfinztal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(883, 75172, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(884, 75173, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(885, 75175, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(886, 75177, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(887, 75179, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(888, 75180, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(889, 75181, 'Pforzheim', '', 'Karlsruhe', 'Kehl'), +(890, 72539, 'Pfronstetten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(891, 88630, 'Pfullendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(892, 72793, 'Pfullingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(893, 76661, 'Philippsburg', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(894, 68723, 'Plankstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(895, 74385, 'Pleidelsheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(896, 72124, 'Pliezhausen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(897, 73207, 'Plochingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(898, 73642, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(899, 73655, 'Plüderhausen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(900, 78315, 'Radolfzell', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(901, 73492, 'Rainau', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(902, 89192, 'Rammingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(903, 72414, 'Rangendingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(904, 76437, 'Rastatt', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(905, 72365, 'Ratshausen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(906, 69231, 'Rauenberg', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(907, 88212, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(908, 88213, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(909, 88214, 'Ravensburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(910, 74747, 'Ravenstein', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(911, 73098, 'Rechberghausen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(912, 89611, 'Rechtenstein', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(913, 74934, 'Reichartshausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(914, 78479, 'Reichenau', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(915, 78564, 'Reichenbach am Heuberg', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(916, 73262, 'Reichenbach an der Fils', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(917, 68799, 'Reilingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(918, 75196, 'Remchingen', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(919, 71686, 'Remseck am Neckar', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(920, 73630, 'Remshalden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(921, 77871, 'Renchen', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(922, 71272, 'Renningen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(923, 78603, 'Renquishausen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(924, 79276, 'Reute', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(925, 72760, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(926, 72762, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(927, 72764, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(928, 72766, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(929, 72768, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(930, 72770, 'Reutlingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(931, 77866, 'Rheinau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(932, 79618, 'Rheinfelden (Baden)', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(933, 79365, 'Rheinhausen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(934, 77836, 'Rheinmünster', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(935, 76287, 'Rheinstetten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(936, 79736, 'Rickenbach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(937, 72585, 'Riederich', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(938, 88377, 'Riedhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(939, 88499, 'Riedlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(940, 79359, 'Riegel', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(941, 78239, 'Rielasingen-Worblingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(942, 73469, 'Riesbürg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(943, 78604, 'Rietheim-Weilheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(944, 77975, 'Ringsheim', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(945, 72229, 'Rohrdorf', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(946, 74255, 'Roigheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(947, 72587, 'Römerstein', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(948, 74749, 'Rosenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(949, 73494, 'Rosenberg', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(950, 72348, 'Rosenfeld', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(951, 74538, 'Rosengarten', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(952, 74585, 'Rot am See', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(953, 88430, 'Rot an der Rot', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(954, 89616, 'Rottenacker', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(955, 72108, 'Rottenburg am Neckar', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(956, 78628, 'Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(957, 73635, 'Rudersberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(958, 79595, 'Rümmingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(959, 73577, 'Ruppertshofen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(960, 77977, 'Rust', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(961, 71277, 'Rutesheim', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(962, 74343, 'Sachsenheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(963, 73084, 'Salach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(964, 88682, 'Salem', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(965, 69207, 'Sandhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(966, 79271, 'Sankt Peter', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(967, 77880, 'Sasbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(968, 79361, 'Sasbach am Kaiserstuhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(969, 77887, 'Sasbachwalden', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(970, 74589, 'Satteldorf', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(971, 88605, 'Sauldorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(972, 79597, 'Schallbach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(973, 79227, 'Schallstadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(974, 73579, 'Schechingen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(975, 72516, 'Scheer', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(976, 74850, 'Schefflenz', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(977, 89601, 'Schelklingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(978, 88433, 'Schemmerhofen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(979, 77773, 'Schenkenzell', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(980, 77761, 'Schiltach', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(981, 72667, 'Schlaitdorf', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(982, 73114, 'Schlat', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(983, 79418, 'Schliengen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(984, 88281, 'Schlier', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(985, 73278, 'Schlierbach', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(986, 79859, 'Schluchsee', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(987, 89194, 'Schnürpflingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(988, 75328, 'Schömberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(989, 72355, 'Schömberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(990, 78136, 'Schonach im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(991, 71101, 'Schönaich', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(992, 69250, 'Schönau', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(993, 79677, 'Schönau im Schwarzwald', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(994, 69436, 'Schönbrunn', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(995, 79677, 'Schönenberg', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(996, 74214, 'Schöntal', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(997, 78141, 'Schönwald im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(998, 79650, 'Schopfheim', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(999, 72296, 'Schopfloch', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1000, 73614, 'Schorndorf', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1001, 78144, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1002, 78713, 'Schramberg', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1003, 69198, 'Schriesheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1004, 74575, 'Schrozberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1005, 77978, 'Schuttertal', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1006, 77746, 'Schutterwald', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1007, 73072, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1008, 73525, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1009, 73527, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1010, 73529, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1011, 73550, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1012, 73553, 'Schwäbisch Gmünd', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1013, 74523, 'Schwäbisch Hall', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1014, 74193, 'Schwaigern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1015, 71409, 'Schwaikheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1016, 77963, 'Schwanau', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1017, 74869, 'Schwarzach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1018, 88477, 'Schwendi', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1019, 72477, 'Schwenningen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1020, 68723, 'Schwetzingen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1021, 71701, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1022, 71706, 'Schwieberdingen', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1023, 79739, 'Schwörstadt', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1024, 74743, 'Seckach', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1025, 77889, 'Seebach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1026, 88422, 'Seekirch', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1027, 77960, 'Seelbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1028, 72297, 'Seewald', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1029, 78606, 'Seitingen-Oberflacht', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1030, 74372, 'Sersheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1031, 89129, 'Setzingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1032, 79350, 'Sexau', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1033, 74936, 'Siegelsbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1034, 72488, 'Sigmaringen', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1035, 72517, 'Sigmaringendorf', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1036, 72226, 'Simmersfeld', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1037, 75397, 'Simmozheim', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1038, 79263, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1039, 79271, 'Simonswald', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1040, 71063, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1041, 71065, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1042, 71067, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1043, 71069, 'Sindelfingen', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1044, 78224, 'Singen (Hohentwiel)', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1045, 74889, 'Sinsheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1046, 76547, 'Sinzheim', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1047, 78354, 'Sipplingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1048, 79294, 'Sölden', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1049, 72820, 'Sonnenbühl', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1050, 89567, 'Sontheim an der Brenz', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1051, 78549, 'Spaichingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1052, 74937, 'Spechbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1053, 71579, 'Spiegelberg', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1054, 73565, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1055, 73568, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1056, 73577, 'Spraitbach', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1057, 89195, 'Staig', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1058, 72181, 'Starzach', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1059, 79219, 'Staufen im Breisgau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1060, 79837, 'St. Blasien', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1061, 79252, 'Stegen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1062, 77790, 'Steinach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1063, 79585, 'Steinen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1064, 71144, 'Steinenbronn', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1065, 88416, 'Steinhausen an der Rottum', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1066, 73566, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1067, 89555, 'Steinheim am Albuch', 'Landkreis Heidenheim', 'Stuttgart', 'Ludwigsburg'), +(1068, 71711, 'Steinheim an der Murr', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1069, 76479, 'Steinmauern', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1070, 78256, 'Steißlingen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1071, 75447, 'Sternenfels', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1072, 88719, 'Stetten', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1073, 72510, 'Stetten am kalten Markt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1074, 78112, 'St. Georgen im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1075, 74597, 'Stimpfach', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1076, 72813, 'St. Johann', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1077, 68789, 'St. Leon-Rot', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1078, 79274, 'St. Märgen', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1079, 78333, 'Stockach', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1080, 73495, 'Stödtlen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1081, 72479, 'Straßberg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1082, 75334, 'Straubenhardt', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1083, 79780, 'Stühlingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1084, 76297, 'Stutensee', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1085, 70173, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1086, 70174, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1087, 70176, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1088, 70178, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1089, 70180, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1090, 70182, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1091, 70184, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1092, 70186, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1093, 70188, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1094, 70190, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1095, 70191, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1096, 70192, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1097, 70193, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1098, 70195, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1099, 70197, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1100, 70199, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1101, 70327, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1102, 70329, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1103, 70372, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1104, 70374, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1105, 70376, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1106, 70378, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1107, 70435, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1108, 70437, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1109, 70439, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1110, 70469, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1111, 70499, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1112, 70563, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1113, 70565, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1114, 70567, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1115, 70569, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1116, 70597, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1117, 70599, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1118, 70619, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1119, 70629, 'Stuttgart', '', 'Stuttgart', 'Ludwigsburg'), +(1120, 72172, 'Sulz am Neckar', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1121, 71560, 'Sulzbach an der Murr', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1122, 74429, 'Sulzbach-Laufen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1123, 79295, 'Sulzburg', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1124, 75056, 'Sulzfeld', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1125, 73079, 'Süßen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1126, 73527, 'Täferrot', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1127, 74388, 'Talheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1128, 78607, 'Talheim', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1129, 71732, 'Tamm', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1130, 73497, 'Tannhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1131, 88459, 'Tannheim', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1132, 97941, 'Tauberbischofsheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1133, 78250, 'Tengen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1134, 79312, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1135, 79331, 'Teningen', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1136, 88069, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1137, 88079, 'Tettnang', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1138, 88422, 'Tiefenbach', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1139, 75233, 'Tiefenbronn', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1140, 79822, 'Titisee-Neustadt', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1141, 79682, 'Todtmoos', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1142, 79674, 'Todtnau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1143, 78098, 'Triberg im Schwarzwald', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1144, 72818, 'Trochtelfingen', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1145, 78647, 'Trossingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1146, 72070, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1147, 72072, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1148, 72074, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1149, 72076, 'Tübingen', 'Landkreis Tübingen', 'Tübingen', 'Ludwigsburg'), +(1150, 79677, 'Tunau', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1151, 78609, 'Tuningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1152, 78532, 'Tuttlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1153, 88662, 'Überlingen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1154, 76698, 'Ubstadt-Weiher', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1155, 73066, 'Uhingen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1156, 88690, 'Uhldingen-Mühlhofen', 'Bodenseekreis', 'Tübingen', 'Ludwigsburg'), +(1157, 79777, 'Ühlingen-Birkendorf', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1158, 89073, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1159, 89075, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1160, 89077, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1161, 89079, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1162, 89081, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1163, 89160, 'Ulm', '', 'Tübingen', 'Ludwigsburg'), +(1164, 79224, 'Umkirch', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1165, 88444, 'Ummendorf', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1166, 88527, 'Unlingen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1167, 74257, 'Untereisesheim', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1168, 72669, 'Unterensingen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1169, 74199, 'Untergruppenbach', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1170, 78089, 'Unterkirnach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1171, 89617, 'Untermarchtal', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1172, 74547, 'Untermünkheim', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1173, 75399, 'Unterreichenbach', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1174, 73485, 'Unterschneidheim', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1175, 89619, 'Unterstadion', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1176, 89597, 'Unterwachingen', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1177, 88379, 'Unterwaldhausen', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1178, 73655, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1179, 73660, 'Urbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1180, 88524, 'Uttenweiler', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1181, 79694, 'Utzenfeld', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1182, 71665, 'Vaihingen an der Enz', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1183, 74541, 'Vellberg', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1184, 72519, 'Veringenstadt', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1185, 78667, 'Villingendorf', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1186, 78048, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1187, 78050, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1188, 78052, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1189, 78054, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1190, 78056, 'Villingen-Schwenningen', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1191, 88267, 'Vogt', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1192, 79235, 'Vogtsburg im Kaiserstuhl', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1193, 78147, 'Vöhrenbach', 'Schwarzwald-Baar-Kreis', 'Freiburg', 'Kehl'), +(1194, 72189, 'Vöhringen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1195, 78269, 'Volkertshausen', 'Landkreis Konstanz', 'Freiburg', 'Kehl'), +(1196, 79279, 'Vörstetten', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1197, 68753, 'Waghäusel', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1198, 71332, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1199, 71334, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1200, 71336, 'Waiblingen', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1201, 74915, 'Waibstadt', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1202, 88489, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1203, 89165, 'Wain', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1204, 88639, 'Wald', 'Landkreis Sigmaringen', 'Tübingen', 'Ludwigsburg'), +(1205, 72178, 'Waldachtal', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1206, 76337, 'Waldbronn', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1207, 69429, 'Waldbrunn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1208, 88289, 'Waldburg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1209, 72141, 'Walddorfhäslach', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1210, 71111, 'Waldenbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1211, 74638, 'Waldenburg', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1212, 79183, 'Waldkirch', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1213, 79761, 'Waldshut-Tiengen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1214, 73550, 'Waldstetten', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1215, 74399, 'Walheim', 'Landkreis Ludwigsburg', 'Stuttgart', 'Ludwigsburg'), +(1216, 69190, 'Walldorf', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1217, 63928, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1218, 74731, 'Walldürn', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'), +(1219, 74599, 'Wallhausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1220, 75045, 'Walzbachtal', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1221, 73117, 'Wangen', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1222, 88239, 'Wangen im Allgäu', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1223, 72827, 'Wannweil', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1224, 88447, 'Warthausen', 'Landkreis Biberach', 'Tübingen', 'Ludwigsburg'), +(1225, 73116, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1226, 73547, 'Wäschenbeuren', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1227, 78564, 'Wehingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1228, 79664, 'Wehr', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1229, 89197, 'Weidenstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1230, 97990, 'Weikersheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1231, 79576, 'Weil am Rhein', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1232, 71263, 'Weil der Stadt', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1233, 72367, 'Weilen unter den Rinnen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1234, 79809, 'Weilheim', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1235, 73235, 'Weilheim an der Teck', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1236, 71093, 'Weil im Schönbuch', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1237, 76356, 'Weingarten', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1238, 88250, 'Weingarten', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1239, 69469, 'Weinheim', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1240, 74189, 'Weinsberg', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1241, 71384, 'Weinstadt', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1242, 76599, 'Weisenbach', 'Landkreis Rastatt', 'Karlsruhe', 'Kehl'), +(1243, 71287, 'Weissach', 'Landkreis Böblingen', 'Stuttgart', 'Ludwigsburg'), +(1244, 71554, 'Weissach im Tal', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1245, 74679, 'Weißbach', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1246, 79367, 'Weisweil', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1247, 78669, 'Wellendingen', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1248, 73553, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1249, 73635, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1250, 73642, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1251, 73667, 'Welzheim', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1252, 79677, 'Wembach', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1253, 73240, 'Wendlingen am Neckar', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1254, 97956, 'Werbach', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1255, 73249, 'Wernau (Neckar)', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1256, 97877, 'Wertheim', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1257, 72589, 'Westerheim', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1258, 89198, 'Westerstetten', 'Alb-Donau-Kreis', 'Tübingen', 'Ludwigsburg'), +(1259, 73463, 'Westhausen', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1260, 74259, 'Widdern', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1261, 79695, 'Wieden', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1262, 75446, 'Wiernsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1263, 69257, 'Wiesenbach', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1264, 73349, 'Wiesensteig', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1265, 69168, 'Wiesloch', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1266, 72218, 'Wildberg', 'Landkreis Calw', 'Karlsruhe', 'Kehl'), +(1267, 88271, 'Wilhelmsdorf', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1268, 69259, 'Wilhelmsfeld', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1269, 77731, 'Willstätt', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1270, 71299, 'Wimsheim', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1271, 79297, 'Winden im Elztal', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1272, 71364, 'Winnenden', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1273, 73650, 'Winterbach', 'Rems-Murr-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1274, 72474, 'Winterlingen', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1275, 97957, 'Wittighausen', 'Main-Tauber-Kreis', 'Stuttgart', 'Ludwigsburg'), +(1276, 79599, 'Wittlingen', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1277, 79299, 'Wittnau', 'Landkreis Breisgau-Hochschwarzwald', 'Freiburg', 'Kehl'), +(1278, 77709, 'Wolfach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1279, 88364, 'Wolfegg', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1280, 72649, 'Wolfschlugen', 'Landkreis Esslingen', 'Stuttgart', 'Ludwigsburg'), +(1281, 74549, 'Wolpertshausen', 'Landkreis Schwäbisch Hall', 'Stuttgart', 'Ludwigsburg'), +(1282, 88284, 'Wolpertswende', 'Landkreis Ravensburg', 'Tübingen', 'Ludwigsburg'), +(1283, 72299, 'Wörnersberg', 'Landkreis Freudenstadt', 'Karlsruhe', 'Kehl'), +(1284, 73499, 'Wört', 'Ostalbkreis', 'Stuttgart', 'Ludwigsburg'), +(1285, 75449, 'Wurmberg', 'Enzkreis', 'Karlsruhe', 'Kehl'), +(1286, 78573, 'Wurmlingen', 'Landkreis Tuttlingen', 'Freiburg', 'Kehl'), +(1287, 71543, 'Wüstenrot', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1288, 79879, 'Wutach', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1289, 79793, 'Wutöschingen', 'Landkreis Waldshut', 'Freiburg', 'Kehl'), +(1290, 79369, 'Wyhl', 'Landkreis Emmendingen', 'Freiburg', 'Kehl'), +(1291, 74374, 'Zaberfeld', 'Landkreis Heilbronn', 'Stuttgart', 'Ludwigsburg'), +(1292, 75059, 'Zaisenhausen', 'Landkreis Karlsruhe', 'Karlsruhe', 'Kehl'), +(1293, 77736, 'Zell am Harmersbach', 'Ortenaukreis', 'Freiburg', 'Kehl'), +(1294, 79669, 'Zell im Wiesental', 'Landkreis Lörrach', 'Freiburg', 'Kehl'), +(1295, 73087, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1296, 73119, 'Zell unter Aichelberg', 'Landkreis Göppingen', 'Stuttgart', 'Ludwigsburg'), +(1297, 78652, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1298, 78658, 'Zimmern ob Rottweil', 'Landkreis Rottweil', 'Freiburg', 'Kehl'), +(1299, 72369, 'Zimmern unter der Burg', 'Zollernalbkreis', 'Tübingen', 'Ludwigsburg'), +(1300, 74939, 'Zuzenhausen', 'Rhein-Neckar-Kreis', 'Karlsruhe', 'Kehl'), +(1301, 74639, 'Zweiflingen', 'Hohenlohekreis', 'Stuttgart', 'Ludwigsburg'), +(1302, 88529, 'Zwiefalten', 'Landkreis Reutlingen', 'Tübingen', 'Ludwigsburg'), +(1303, 69439, 'Zwingenberg', 'Neckar-Odenwald-Kreis', 'Karlsruhe', 'Kehl'); + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + ADD PRIMARY KEY (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD PRIMARY KEY (`lid`), + ADD KEY `bpm_adminlog_ibfk_1` (`bpmuid`); + +-- +-- Indizes für die Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + ADD PRIMARY KEY (`dst_id`); + +-- +-- Indizes für die Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD PRIMARY KEY (`wu_id`), + ADD KEY `dst_id` (`dst_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD PRIMARY KEY (`eg_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + ADD PRIMARY KEY (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + ADD PRIMARY KEY (`no_id`); + +-- +-- Indizes für die Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + ADD PRIMARY KEY (`pid`); + +-- +-- Indizes für die Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + ADD PRIMARY KEY (`pn_id`); + +-- +-- Indizes für die Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD PRIMARY KEY (`sm_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_stichtage` +-- +ALTER TABLE `bpm_stichtage` + ADD PRIMARY KEY (`sttg_id`); + +-- +-- Indizes für die Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + ADD PRIMARY KEY (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + ADD PRIMARY KEY (`tm_id`); + +-- +-- Indizes für die Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD PRIMARY KEY (`tk_id`), + ADD KEY `ka_id` (`ka_id`), + ADD KEY `tm_id` (`tm_id`), + ADD KEY `tp_id` (`tp_id`); + +-- +-- Indizes für die Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD PRIMARY KEY (`up_id`), + ADD KEY `ka_id` (`ka_id`); + +-- +-- Indizes für die Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + ADD PRIMARY KEY (`zu_id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `bpm_admin` +-- +ALTER TABLE `bpm_admin` + MODIFY `bpmuid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + MODIFY `lid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dienststellen` +-- +ALTER TABLE `bpm_dienststellen` + MODIFY `dst_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + MODIFY `wu_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + MODIFY `eg_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_kandidat` +-- +ALTER TABLE `bpm_kandidat` + MODIFY `ka_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_note` +-- +ALTER TABLE `bpm_note` + MODIFY `no_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_parameter` +-- +ALTER TABLE `bpm_parameter` + MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_prxnews` +-- +ALTER TABLE `bpm_prxnews` + MODIFY `pn_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + MODIFY `sm_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_stichtage` +-- +ALTER TABLE `bpm_stichtage` + MODIFY `sttg_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_tanpool` +-- +ALTER TABLE `bpm_tanpool` + MODIFY `tp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=501; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_termine` +-- +ALTER TABLE `bpm_termine` + MODIFY `tm_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + MODIFY `tk_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + MODIFY `up_id` int(11) NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT für Tabelle `bpm_zuordnung_hs` +-- +ALTER TABLE `bpm_zuordnung_hs` + MODIFY `zu_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1304; + +-- +-- Constraints der exportierten Tabellen +-- + +-- +-- Constraints der Tabelle `bpm_adminlog` +-- +ALTER TABLE `bpm_adminlog` + ADD CONSTRAINT `bpm_adminlog_ibfk_1` FOREIGN KEY (`bpmuid`) REFERENCES `bpm_admin` (`bpmuid`); + +-- +-- Constraints der Tabelle `bpm_dst_wunsch` +-- +ALTER TABLE `bpm_dst_wunsch` + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_1` FOREIGN KEY (`dst_id`) REFERENCES `bpm_dienststellen` (`dst_id`), + ADD CONSTRAINT `bpm_dst_wunsch_ibfk_2` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_ergebnisse` +-- +ALTER TABLE `bpm_ergebnisse` + ADD CONSTRAINT `bpm_ergebnisse_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_sonstige_mail` +-- +ALTER TABLE `bpm_sonstige_mail` + ADD CONSTRAINT `bpm_sonstige_mail_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); + +-- +-- Constraints der Tabelle `bpm_term_kand` +-- +ALTER TABLE `bpm_term_kand` + ADD CONSTRAINT `bpm_term_kand_ibfk_2` FOREIGN KEY (`tm_id`) REFERENCES `bpm_termine` (`tm_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_3` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`), + ADD CONSTRAINT `bpm_term_kand_ibfk_4` FOREIGN KEY (`tp_id`) REFERENCES `bpm_tanpool` (`tp_id`); + +-- +-- Constraints der Tabelle `bpm_upload` +-- +ALTER TABLE `bpm_upload` + ADD CONSTRAINT `bpm_upload_ibfk_1` FOREIGN KEY (`ka_id`) REFERENCES `bpm_kandidat` (`ka_id`); +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/++ Dokumente/bpm_tanpool.csv b/++ Dokumente/bpm_tanpool.csv new file mode 100755 index 0000000..0b30e3f --- /dev/null +++ b/++ Dokumente/bpm_tanpool.csv @@ -0,0 +1,5 @@ +"ka_id";"anrede";"vorname";"nachname";"gebdat";"str";"plz";"ort";"alter18";"mail";"id";"hochschule";"register_dat";"modify_dat";"remember_mail";"eg_id";"ka_id";"tan";"satzerg";"analogie";"rechenaufgaben";"zahlenreihen";"rechenzeichen";"matrizen";"merkf";"summe";"bestanden";"einsicht_dat";"tk_id";"ka_id";"tm_id";"tp_id";"tp_id";"dummy_name";"dummy_vorname";"tan";"tinyurl";"verw_dat";"login_dat";"aktiv" +"4";"M";"Alexander";"Schwarz";"1979-08-15";"Lisztstr. 9";"71384";"Weinstadt";"1";"netblack@gmx.de";"SCHWAL1508197901-2022";"Ludwigsburg";"2020-07-15 09:51:52";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"1";"4";"K3NN";"12";"9";"4";"11";"10";"10";"7";"63";"0";"2020-07-08 10:13:45";"3";"4";"6";"175";"175";"Testuser-bpm";"188";"K3NN";"https://hgf.de/vwe-";"2020-07-15 09:51:52";"0000-00-00 00:00:00";"A" +"4";"M";"Alexander";"Schwarz";"1979-08-15";"Lisztstr. 9";"71384";"Weinstadt";"1";"netblack@gmx.de";"SCHWAL1508197901-2022";"Ludwigsburg";"2020-07-15 09:51:52";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"1";"4";"K3NN";"12";"9";"4";"11";"10";"10";"7";"63";"0";"2020-07-08 10:13:45";"4";"4";"7";"176";"176";"Testuser-bpm";"171";"U3P3";"https://hgf.de/d-1c";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"A" +"4";"M";"Alexander";"Schwarz";"1979-08-15";"Lisztstr. 9";"71384";"Weinstadt";"1";"netblack@gmx.de";"SCHWAL1508197901-2022";"Ludwigsburg";"2020-07-15 09:51:52";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"2";"4";"U3P3";"12";"9";"4";"11";"10";"10";"7";"63";"0";"2020-07-08 10:13:45";"3";"4";"6";"175";"175";"Testuser-bpm";"188";"K3NN";"https://hgf.de/vwe-";"2020-07-15 09:51:52";"0000-00-00 00:00:00";"A" +"4";"M";"Alexander";"Schwarz";"1979-08-15";"Lisztstr. 9";"71384";"Weinstadt";"1";"netblack@gmx.de";"SCHWAL1508197901-2022";"Ludwigsburg";"2020-07-15 09:51:52";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"2";"4";"U3P3";"12";"9";"4";"11";"10";"10";"7";"63";"0";"2020-07-08 10:13:45";"4";"4";"7";"176";"176";"Testuser-bpm";"171";"U3P3";"https://hgf.de/d-1c";"2020-07-15 14:33:21";"0000-00-00 00:00:00";"A" diff --git a/++ Dokumente/doppelte Praxisstellenbezeichnung.xlsx b/++ Dokumente/doppelte Praxisstellenbezeichnung.xlsx new file mode 100755 index 0000000..0e7a509 Binary files /dev/null and b/++ Dokumente/doppelte Praxisstellenbezeichnung.xlsx differ diff --git a/++ Dokumente/tan_setzen.php b/++ Dokumente/tan_setzen.php new file mode 100755 index 0000000..6a8df41 --- /dev/null +++ b/++ Dokumente/tan_setzen.php @@ -0,0 +1,31 @@ +query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + # Initialtan erforderlich für Login? + + $tan = tangen(); + $sql0 = $db->query("UPDATE bpm_dienststellen + SET init_tan = '$tan' + WHERE dst_id = '$row1[dst_id]' + "); +} + +?> diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..2c1a7cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +upload/*.pdf +uploads/*.pdf diff --git a/PHPExcel-1.8.zip b/PHPExcel-1.8.zip new file mode 100755 index 0000000..0cc73d3 Binary files /dev/null and b/PHPExcel-1.8.zip differ diff --git a/Test/fetch.php b/Test/fetch.php new file mode 100755 index 0000000..feb6d33 --- /dev/null +++ b/Test/fetch.php @@ -0,0 +1,36 @@ + 0) +{ + while($row = mysqli_fetch_array($result)) + { + $output .= " + + "; + } + echo $output; +} +else +{ + echo 'Data Not Found'; +} +?> diff --git a/Test/index.html b/Test/index.html new file mode 100755 index 0000000..3e074ec --- /dev/null +++ b/Test/index.html @@ -0,0 +1,64 @@ + + + + Webslesson Demo - Ajax Live Data Search using Jquery PHP MySql + + + + + + +

+
+
+
+

Ajax Live Data Search using Jquery PHP MySql

+
+
+
+ Search + +
+
+
+ + + +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/admin/Import_CSV_Hogrefe.xlsx b/admin/Import_CSV_Hogrefe.xlsx new file mode 100755 index 0000000..3d5a1fe Binary files /dev/null and b/admin/Import_CSV_Hogrefe.xlsx differ diff --git a/admin/administration_frame.php b/admin/administration_frame.php new file mode 100755 index 0000000..c5b2778 --- /dev/null +++ b/admin/administration_frame.php @@ -0,0 +1,9 @@ +display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/bewerber_daten.php b/admin/bewerber_daten.php new file mode 100755 index 0000000..1d3af5c --- /dev/null +++ b/admin/bewerber_daten.php @@ -0,0 +1,1328 @@ +query("SET lc_time_names = 'de_DE';"); + +# Dropdown befüllen übernimmt ajax:fetch.php +# $query1 = "SELECT ka_id, vorname, nachname +# FROM bpm_kandidat +# ORDER BY nachname, vorname"; +# +# $result1 = $db->query($query1) or die("Cannot execute query1a"); +# +# +# while ($row1 = $result1->fetch_array()) { +# $table_data1[] = $row1; +# } +# $smarty->assign('table_data1', $table_data1); + + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('bewerber_error', 1); + if ($errorno == 1) { + $smarty->assign('bewerber_error_text', "Es muss ein Bewerber ausgewählt werden."); + } + + } +} + +if ($action == 'ausgabe') { + if (isset($_POST['user'])) { + $username = mb_strtoupper($_POST["user"]); //remove case sensitivity on the username + } elseif(isset($_GET['user'])) { + $username = mb_strtoupper($_GET["user"]); + } else { + $username = $_SESSION["username"]; + } + + $_SESSION["username"] = $username; + + + if ($username == "") { + echo ""; + exit; + } + + # Fehler beim Upload anzeigen + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es dürfen nur PDF Dateien hochgeladen werden."); + } + if ($errorno == 2) { + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $smarty->assign('index_error_text', "Die Datei ist zu groß. Die Dateigröße darf max. $size_mb MB betragen."); + } + if ($errorno == 3) { + $smarty->assign('index_error_text', "Die Datei mit diesem Namen wurde bereits hochgeladen."); + } + if ($errorno == 4) { + # Tabelle bpm_parameter + $anz_dok = trim(get_parameter(13)); + $smarty->assign('index_error_text', "Es dürfen maximal $anz_dok Dateien hochgeladen werden."); + } + } + + $result = $db->query("SELECT a.ka_id, anrede, perso, vorname, nachname, str, plz, ort, date_format(tm_datum, '%d.%m.%Y - %H:%i Uhr') tm_datum_form, date_format(gebdat, '%d.%m.%Y') gebdat_form, a.id, c.tan, hochschule, date_format(login_dat, '%d.%m.%Y - %H:%i Uhr') login_dat_form, login_dat, a.mail, a.tel, verkuerzung, behinderung + FROM bpm_kandidat a, bpm_term_kand b, bpm_tanpool c, bpm_termine d + WHERE a.ka_id = b.ka_id + AND b.tp_id = c.tp_id + AND b.tm_id = d.tm_id + AND a.ka_id = '$username' + ORDER BY tk_id DESC + LIMIT 1"); + $row = $result->fetch_array(); + + #Aktuelle Tan ermitteln + + $result_tan = $db->query("SELECT tan, tk_id, kurznotiz + FROM bpm_tanpool a, bpm_term_kand b + WHERE a.tp_id = b.tp_id + AND b.ka_id = '$username' + order by b.tk_id DESC + LIMIT 1"); + + $row_tan = $result_tan->fetch_array(); + $tan = $row_tan['tan']; + $_SESSION["tan"] = $tan; + + if ($row['anrede'] == 'M') { + $anrede = 'Herr'; + } else { + $anrede = 'Frau'; + } + if($row['login_dat'] == '0000-00-00 00:00:00'){ + $tm_datum_form = "-"; + }else{ + $tm_datum_form = $row['login_dat_form']; + } + + # Wunschhochschule + $result_wunschhs = $db->query("SELECT wunsch_hs, zugewiesene_hs + FROM bpm_erw_daten + WHERE ka_id = '$username'"); + $row_wunschhs = $result_wunschhs->fetch_array(); + + if($row_wunschhs['wunsch_hs'] == 'E'){ + $wunsch_hs = "Egal"; + }elseif($row_wunschhs['wunsch_hs'] == 'K'){ + $wunsch_hs = "Kehl"; + }elseif($row_wunschhs['wunsch_hs'] == 'L'){ + $wunsch_hs = "Ludwigsburg"; + }elseif($row_wunschhs['wunsch_hs'] == ''){ + $wunsch_hs = ""; + } + + if($row_wunschhs['zugewiesene_hs'] == 'O'){ + $zugewiesene_hs = "Offen"; + }elseif($row_wunschhs['zugewiesene_hs'] == 'K'){ + $zugewiesene_hs = "Kehl"; + }elseif($row_wunschhs['zugewiesene_hs'] == 'L'){ + $zugewiesene_hs = "Ludwigsburg"; + }elseif($row_wunschhs['zugewiesene_hs'] == ''){ + $zugewiesene_hs = ""; + } + + + $smarty->assign('status_tk_id', $row_tan['tk_id']); + $smarty->assign('status_kurznotiz', $row_tan['kurznotiz']); + + $smarty->assign('status_anrede', $anrede); + $smarty->assign('status_vorname', $row['vorname']); + $smarty->assign('status_nachname', $row['nachname']); + $smarty->assign('status_gebdat', $row['gebdat_form']); + $smarty->assign('status_str', $row['str']); + $smarty->assign('status_plz', $row['plz']); + $smarty->assign('status_ort', $row['ort']); + $smarty->assign('status_mail', $row['mail']); + $smarty->assign('status_tel', $row['tel']); + $smarty->assign('status_perso', $row['perso']); + $smarty->assign('status_tm_datum_form', $row['tm_datum_form']); + $smarty->assign('status_login_dat_form', $tm_datum_form); + $smarty->assign('status_hochschule', $row['hochschule']); + $smarty->assign('status_wunsch_hs', $wunsch_hs); + $smarty->assign('status_zugewiesene_hs', $zugewiesene_hs); + $smarty->assign('status_behinderung', $row['behinderung']); + $smarty->assign('status_verkuerzung', $row['verkuerzung']); + $smarty->assign('status_login_id', $row['id']); + $smarty->assign('status_login_tan', $tan); + + $result_ct = $db->query("SELECT count(*) Anz + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan='$tan'"); + $row_ct = $result_ct->fetch_array(); + + if ($row_ct['Anz'] == 0) { + $smarty->assign('status_erg_vorhanden', 0); + $smarty->assign('status_erg_bestanden', '3'); + } else { + $smarty->assign('status_erg_vorhanden', 1); + $result_erg = $db->query("SELECT satzerg, gemeinsamkeiten, rechenaufgaben, zahlenreihen, rechenzeichen, matrizen, merkf, summe, bestanden, date_format(einsicht_dat, '%d.%m.%Y, %H:%i Uhr') einsicht_dat_form, einsicht_dat + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan='$tan'"); + $row_erg = $result_erg->fetch_array(); + if ($row_erg['einsicht_dat'] == '0000-00-00 00:00:00') { + $einsicht_dat = "bisher keine Einsicht"; + } else { + $einsicht_dat = $row_erg['einsicht_dat_form']; + } + $smarty->assign('status_erg_satzerg', $row_erg['satzerg']); + $smarty->assign('status_erg_gemeinsamkeiten', $row_erg['gemeinsamkeiten']); + $smarty->assign('status_erg_rechenaufgaben', $row_erg['rechenaufgaben']); + $smarty->assign('status_erg_zahlenreihen', $row_erg['zahlenreihen']); + $smarty->assign('status_erg_rechenzeichen', $row_erg['rechenzeichen']); + $smarty->assign('status_erg_matrizen', $row_erg['matrizen']); + $smarty->assign('status_erg_merkf', $row_erg['merkf']); + $smarty->assign('status_erg_summe', $row_erg['summe']); + $smarty->assign('status_erg_einsicht_dat', $einsicht_dat); + + if ($row_erg['bestanden'] == 0) { + $smarty->assign('status_erg_bestanden', 0); + $smarty->assign('status_erg_bestanden_text', "nicht bestanden"); + } + if ($row_erg['bestanden'] == 1) { + $smarty->assign('status_erg_bestanden', 1); + $smarty->assign('status_erg_bestanden_text', "bestanden"); + } + + } + + # Ältere Testergebnisse vorhanden? + $query4 = "SELECT tan + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan!='$tan'"; + $result4 = $db->query($query4) or die("Cannot execute query4"); + + while ($row4 = $result4->fetch_array()) { + + $result_erg = $db->query("SELECT satzerg, gemeinsamkeiten, rechenaufgaben, zahlenreihen, rechenzeichen, matrizen, merkf, summe, bestanden, date_format(einsicht_dat, '%d.%m.%Y, %H:%i Uhr') einsicht_dat_form, einsicht_dat + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan='$row4[tan]'"); + $row_erg = $result_erg->fetch_array(); + + $result_testdat = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y - %H:%i') datum_form + , CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' END as tm_standort + FROM bpm_term_kand a, bpm_tanpool b, bpm_termine c + WHERE a.tp_id = b.tp_id + AND a.tm_id =c.tm_id + AND tan = '$row4[tan]'"); + $row_testdat = $result_testdat->fetch_array(); + + if ($row_erg['einsicht_dat'] == '0000-00-00 00:00:00') { + $einsicht_dat = "bisher keine Einsicht"; + } else { + $einsicht_dat = $row_erg['einsicht_dat_form']; + } + + if ($row_erg['bestanden'] == 0) { + $status_erg_bestanden = "0"; + $status_erg_bestanden_text = "nicht bestanden"; + } + if ($row_erg['bestanden'] == 1) { + $status_erg_bestanden = "1"; + $status_erg_bestanden_text = "bestanden"; + } + $row4['status_erg_testdat'] = $row_testdat['datum_form']; + $row4['status_erg_standort'] = $row_testdat['tm_standort']; + $row4['status_erg_satzerg'] = $row_erg['satzerg']; + $row4['status_erg_gemeinsamkeiten'] = $row_erg['gemeinsamkeiten']; + $row4['status_erg_rechenaufgaben'] = $row_erg['rechenaufgaben']; + $row4['status_erg_zahlenreihen'] = $row_erg['zahlenreihen']; + $row4['status_erg_rechenzeichen'] = $row_erg['rechenzeichen']; + $row4['status_erg_matrizen'] = $row_erg['matrizen']; + $row4['status_erg_merkf'] = $row_erg['merkf']; + $row4['status_erg_summe'] = $row_erg['summe']; + $row4['status_erg_bestanden'] = $status_erg_bestanden; + $row4['status_erg_bestanden_text'] = $status_erg_bestanden_text; + $row4['status_erg_einsicht_dat'] = $einsicht_dat; + $table_data4[] = $row4; + } + $smarty->assign('table_data4', $table_data4); + + + + $query1 = "SELECT up_id, ka_id, file, beschreibung, date_format(upload_dat, '%d.%m.%Y, %H:%i Uhr') upload_dat + FROM bpm_upload + WHERE ka_id = $row[ka_id] + AND upload_dat != '0000-00-00 00:00:00'"; + $result1 = $db->query($query1) or die("Cannot execute query1b"); + + $username = $_SESSION["username"]; + $result_id = $db->query("SELECT id + FROM bpm_kandidat + WHERE ka_id = '$username'"); + $row_id = $result_id->fetch_array(); + $id = $row_id['id']; + + while ($row1 = $result1->fetch_array()) { + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + $basename = basename($row1['file']); + $basename_link = basename($row1['file']); + $rep = $id."_"; + $row1['exists'] = $exists; + $row1['basename'] = str_replace($rep, '', $basename); + $row1['basename_link'] = urlencode($row1['file']); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + + # Gespeicherte Werte Noten + $result_note = $db->query("SELECT erfdat_hzb, erfdat_schnitt, hzb, hzb_punkte, zeugnisschnitt, zeugnisschnitt_punkte + FROM bpm_note + WHERE ka_id ='$username' + ORDER BY no_id desc + LIMIT 1"); + $row_note = $result_note->fetch_array(); + $row_cnt = $result_note->num_rows; + + if($row_note['erfdat_hzb'] != '0000-00-00 00:00:00' AND $row_cnt > 0){ + # HZB erfasst + $smarty->assign('notenart', "HZB"); + if($row_note['hzb_punkte'] != '0.00'){ + $smarty->assign('skala_value', "Punkte"); + $smarty->assign('note', "$row_note[hzb_punkte]"); + # Bei hzb gibts keine Punkte + #$smarty->assign('note_schnitt', "$row_note[hzb]"); + }else{ + $smarty->assign('skala_value', "Noten"); + $smarty->assign('note', "$row_note[hzb]"); + } + }elseif($row_note['erfdat_schnitt'] != '0000-00-00 00:00:00' AND $row_cnt > 0){ + # Durchscnittsnote erfasst + $smarty->assign('notenart', "Durchschnitt"); + if($row_note['zeugnisschnitt_punkte'] != '0.00'){ + $smarty->assign('skala_value', "Punkte"); + $smarty->assign('note', "$row_note[zeugnisschnitt_punkte]"); + $smarty->assign('note_schnitt', "$row_note[zeugnisschnitt]"); + }else{ + $smarty->assign('skala_value', "Noten"); + $smarty->assign('note', "$row_note[zeugnisschnitt]"); + } + }else{ + # Keine Auswahl + $smarty->assign('notenart', "Keine"); + $smarty->assign('skala_value', "Noten"); + $smarty->assign('note', ""); + } + + # Gespeicherte Werte Praxisstellen + $query2 = "SELECT a.ka_id, a.wu_id, b.bez, b.str, b.plz, b.ort, b.mail, a.status, date_format(sendedat, '%d.%m.%Y, %H:%i Uhr') sendedat, b.dst_id, zusage + FROM bpm_dst_wunsch a, bpm_dienststellen b + WHERE a.dst_id = b.dst_id + AND a.ka_id = $row[ka_id]"; + + $result2 = $db->query($query2) or die("Cannot execute query2"); + + while ($row2 = $result2->fetch_array()) { + if ($row2['status'] == 'V') { + $status = "Versendet
$row2[sendedat]"; + } + if ($row2['status'] == 'F') { + $status = "Fehler"; + } + if ($row2['status'] == 'O') { + $status = "Vorgemerkt"; + } + $row2['status'] = $status; + $table_data2[] = $row2; + } + $smarty->assign('table_data2', $table_data2); + + # Gespeicherte Werte: Sonstige Mails + $query3 = "SELECT sm_id, sender, sendermail, empfaenger, mail_betreff, mail_text, status, date_format(sendedat, '%d.%m.%y, %H:%i Uhr') sendedat_form + FROM bpm_sonstige_mail + WHERE ka_id = $row[ka_id] + ORDER BY sendedat desc"; + + $result3 = $db->query($query3) or die("Cannot execute query2"); + + while ($row3 = $result3->fetch_array()) { + if ($row3['status'] == 'V') { + $status = "Versendet
$row3[sendedat]"; + } + if ($row3['status'] == 'F') { + $status = "Fehler"; + } + $row3['status'] = $status; + $table_data3[] = $row3; + } + $smarty->assign('table_data3', $table_data3); + +} + +if ($action == 'mail') { + $wu_id = $_GET['wu_id']; + $result_erg = $db->query("SELECT mail_text + FROM bpm_dst_wunsch + WHERE wu_id =$wu_id"); + $row_erg = $result_erg->fetch_array(); + $smarty->assign('mail_text', $row_erg['mail_text']); + +} + +if ($action == 'mail_sonst') { + $sm_id = $_GET['sm_id']; + $result_erg = $db->query("SELECT mail_text, mail_betreff + FROM bpm_sonstige_mail + WHERE sm_id =$sm_id"); + $row_erg = $result_erg->fetch_array(); + $smarty->assign('mail_text', $row_erg['mail_text']); + $smarty->assign('mail_betreff', $row_erg['mail_betreff']); + +} + + +if ($action == 'mailsenden') { + $wu_id = $_GET['wu_id']; + + $result_erg = $db->query("SELECT mail_text, mail_betreff, b.mail, b.bez + FROM bpm_dst_wunsch a, bpm_dienststellen b + WHERE a.dst_id = b.dst_id + AND wu_id =$wu_id"); + $row_erg = $result_erg->fetch_array(); + $smarty->assign('mail_text', $row_erg['mail_text']); + $smarty->assign('mail_betreff', $row_erg['mail_betreff']); + $smarty->assign('mail_mail', $row_erg['mail']); + $smarty->assign('mail_bez', $row_erg['bez']); + $smarty->assign('mail_wuid', $wu_id); +} + +if ($action == 'mailsenden_sonst') { + $sm_id = $_GET['sm_id']; + + $result_erg = $db->query("SELECT sender, sendermail, empfaenger, mail_betreff, mail_text + FROM bpm_sonstige_mail + WHERE sm_id =$sm_id"); + $row_erg = $result_erg->fetch_array(); + $smarty->assign('mail_sender', $row_erg['sender']); + $smarty->assign('mail_sendermail', $row_erg['sendermail']); + $smarty->assign('mail_text', $row_erg['mail_text']); + $smarty->assign('mail_betreff', $row_erg['mail_betreff']); + $smarty->assign('mail_mail', $row_erg['empfaenger']); + $smarty->assign('mail_smid', $sm_id); +} + +if ($action == 'mailsenden2') { + $wu_id = $_POST['wuid']; + + $result_erg = $db->query("SELECT a.ka_id, mail_text, mail_betreff, b.mail, b.bez + FROM bpm_dst_wunsch a, bpm_dienststellen b + WHERE a.dst_id = b.dst_id + AND wu_id =$wu_id"); + $row_erg = $result_erg->fetch_array(); + + $result_kand = $db->query("SELECT hochschule + FROM bpm_kandidat + WHERE ka_id =$row_erg[ka_id]"); + $row_kand = $result_kand->fetch_array(); + + $hochschule = "$row_kand[hochschule]"; + if ($hochschule == 'Ludwigsburg') { + $anschrift = 'Reuteallee 36
71634 Ludwigsburg'; + $sender = "Hochschule Ludwigsburg"; + $sendermail = get_parameter(8); + } elseif ($hochschule == 'Kehl') { + $anschrift = 'Kinzigallee 1
77694 Kehl'; + $sender = "Hochschule Kehl"; + $sendermail = get_parameter(7); + } + $empfaenger = $row_erg['mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
+ #$hochschule
"; + #exit; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style =" + + + "; + $text = $style.$text; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + if ($return) { + $sql1 = $db->query("UPDATE bpm_dst_wunsch + SET mail_text = '$text_db' + , mail_betreff = '$betreff_db' + , status = 'V' + , sendedat = '$datum_db' + WHERE wu_id = $wu_id + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("UPDATE bpm_dst_wunsch + SET mail_text = '$text_db' + , mail_betreff = '$betreff_db' + , status = 'F' + WHERE wu_id = $wu_id + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Prüfen Sie die Mailadresse der Praxisstelle."); + } +} + + +if ($action == 'mailsenden2_sonst') { + $sm_id = $_POST['smid']; + $sender = $_POST['mail_sender']; + $sendermail = $_POST['mail_sendermail']; + $empfaenger = $_POST['mail_mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style =" + + + "; + $text = $style.$text; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
"; + #exit; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + if ($return) { + $sql1 = $db->query("UPDATE bpm_sonstige_mail + SET mail_text = '$text_db' + , mail_betreff = '$betreff_db' + , empfaenger = '$empfaenger' + , status = 'V' + , sendedat = '$datum_db' + WHERE sm_id = $sm_id + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("UPDATE bpm_sonstige_mail + SET mail_text = '$text_db' + , mail_betreff = '$betreff_db' + , empfaenger = '$empfaenger' + , status = 'F' + WHERE sm_id = $sm_id + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Prüfen Sie die Mailadresse das Kandidaten."); + } +} + + + + +if ($action == 'chhs') { + + $hochschule = $_POST['hs']; + $wunsch_hs = $_POST['wunsch_hs']; + $zugewiesene_hs = $_POST['zugewiesene_hs']; + $behinderung = $_POST['behinderung']; + $verkuerzung = $_POST['verkuerzung']; + $username = $_SESSION["username"]; + +#echo "

";
+#foreach ($_POST as $key => $value) {
+#  echo $key . " = " . $value . "
"; +#} +#echo "
"; + + + if($hochschule != ''){ + $sql1 = $db->query("UPDATE bpm_kandidat + SET hochschule = '$hochschule' + WHERE ka_id = $username + "); + } + + if($wunsch_hs != ''){ + $result_countid = $db->query("SELECT count(*) Anz + FROM bpm_erw_daten + WHERE ka_id = '$username'"); + $row_countid = $result_countid->fetch_array(); + if($row_countid['Anz'] == 0){ + $sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, wunsch_hs) VALUES ($username, '$wunsch_hs')"); + }else{ + $sql1 = $db->query("UPDATE bpm_erw_daten + SET wunsch_hs = '$wunsch_hs' + WHERE ka_id = $username + "); + } + } + + if($zugewiesene_hs != ''){ + $result_countid = $db->query("SELECT count(*) Anz + FROM bpm_erw_daten + WHERE ka_id = '$username'"); + $row_countid = $result_countid->fetch_array(); + if($row_countid['Anz'] == 0){ + $sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, zugewiesene_hs) VALUES ($username, '$zugewiesene_hs')"); + }else{ + $sql1 = $db->query("UPDATE bpm_erw_daten + SET zugewiesene_hs = '$zugewiesene_hs' + WHERE ka_id = $username + "); + } + } + + if($behinderung != ''){ + $sql1 = $db->query("UPDATE bpm_kandidat + SET behinderung = '$behinderung' + WHERE ka_id = $username + "); + } + if($verkuerzung != ''){ + $sql1 = $db->query("UPDATE bpm_kandidat + SET verkuerzung = '$verkuerzung' + WHERE ka_id = $username + "); + } + echo ""; +} + +if ($action == 'upload') { + $username = $_SESSION["username"]; + $result_id = $db->query("SELECT id + FROM bpm_kandidat + WHERE ka_id = '$username'"); + $row_id = $result_id->fetch_array(); + $id = $row_id['id']; + + // http://www.tutorials.de/tutorials65420.html + #echo '
', print_r($_POST, true), '
'; + + $tempname = $_FILES['file']['tmp_name']; + $name = $_FILES['file']['name']; + + $type = $_FILES['file']['type']; + $size = $_FILES['file']['size']; + $einheit = "Byte"; // Für die Efolgsmeldung. + + $limitedext = array( + ".pdf" + ); //Erlaubte Dateieindung beim Upload + $extlimit = "yes"; //Do you want to limit the extensions of files uploaded + $ext = strrchr($name, '.'); + + + if (($extlimit == "yes") && (!in_array($ext, $limitedext))) { + echo ""; + exit; + } + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $size_bt = $size_mb * 1024 * 1024; + + if ($size > $size_bt) { + echo ""; + exit; + } + + $name = str_replace(array( + "ä", + "ö", + "ü", + "ß", + "Ä", + "Ü", + "Ü", + " " + ), array( + "ae", + "oe", + "ue", + "ss", + "Ae", + "Oe", + "Ue", + "_" + ), $name); + $ka_id = $_SESSION["ka_id"]; + $neu = $id . "_" . $name; + + $result_exists = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE file = '$verz$neu' + AND ka_id = '$ka_id'"); + $row_exists = $result_exists->fetch_array(); + + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE ka_id = '$ka_id'"); + $row_anz = $result_anz->fetch_array(); + + if ($row_exists['Anz'] > 0) { + echo ""; + exit; + } + + # Tabelle bpm_parameter + $anz_dok = trim(get_parameter(13)); + + if ($row_anz['Anz'] >= $anz_dok) { + echo ""; + exit; + } + + # Datei hochladen + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + move_uploaded_file("$tempname", "$verz$neu"); // Unterverzeichnisse wie folgt: copy("$tempname", "pdf/$neu"); + $sql1 = $db->query("insert into bpm_upload (ka_id, file, upload_dat) VALUES('$username', '$verz$neu', '$datum_db')"); + echo ""; + +} +if ($action == 'descr') { + // http://www.tutorials.de/tutorials65420.html + #echo '
', print_r($_POST, true), '
'; + $username = $_SESSION["username"]; + $query1 = "SELECT up_id + FROM bpm_upload + WHERE ka_id = $username + AND upload_dat != '0000-00-00 00:00:00'"; + + $result1 = $db->query($query1) or die("Cannot execute query1c"); + while ($row1 = $result1->fetch_array()) { + $id = "desc_".$row1['up_id']; + $beschreibung = $_POST[$id]; + + $sql1 = $db->query("UPDATE bpm_upload + SET beschreibung = '$beschreibung' + WHERE up_id = $row1[up_id] + "); + + } + echo ""; + +} +if ($action == 'deldok') { + $up_id = $_GET['up_id']; + + $username = $_SESSION["username"]; + $result_id = $db->query("SELECT id + FROM bpm_kandidat + WHERE ka_id = '$username'"); + $row_id = $result_id->fetch_array(); + $id = $row_id['id']; + + $result_file = $db->query("SELECT file + FROM bpm_upload + WHERE up_id = '$up_id'"); + $row_file = $result_file->fetch_array(); + + $basename = basename($row_file['file']); + $rep = $id."_"; + $dokument = str_replace($rep, '', $basename); + + $smarty->assign('deldok_dokument', $dokument); + $smarty->assign('deldok_up_id', $up_id); +} +if ($action == 'deldok2') { + $up_id = $_GET['up_id']; + $username = $_SESSION["username"]; + + function deleteFiles($datei) + { + if (@unlink($datei)) { + $error = TRUE; + } else { + $error = FALSE; + } + return $error; + } + + $result_del = $db->query("SELECT file + FROM bpm_upload + WHERE ka_id = $username + AND up_id= $up_id + LIMIT 1; + "); + $row_del = $result_del->fetch_array(); + + $del = deleteFiles($row_del['file']); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären +# if rausgenommen, wenn kein Dokument vorhanden ist, nur DB Eintrag, dann kann dieser nicht gelöscht werden +# if ($del) { + $sql1 = $db->query("DELETE FROM bpm_upload + WHERE ka_id = $username + AND up_id= $up_id"); +# } + +echo ""; +} +if ($action == 'stelle') { + $username = $_SESSION["username"]; + $query1 = "SELECT a.dst_id, bez, plz, ort + FROM bpm_dienststellen a + WHERE a.dst_id NOT IN (SELECT dst_id + FROM bpm_dst_wunsch + WHERE ka_id = '$username' + ) + AND (gueltig_von <= date_format(now(), '%Y-%m-%d') OR gueltig_von = '0000-00-00') + AND (gueltig_bis >= date_format(now(), '%Y-%m-%d') OR gueltig_bis = '0000-00-00') + ORDER BY bez ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1d"); + + while ($row1 = $result1->fetch_array()) { + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + + + # Gespeicherte Werte + $query2 = "SELECT a.wu_id, b.bez, b.str, b.plz, b.ort, b.mail + FROM bpm_dst_wunsch a, bpm_dienststellen b + WHERE a.dst_id = b.dst_id + AND a.ka_id = $username"; + + $result2 = $db->query($query2) or die("Cannot execute query2b"); + + while ($row2 = $result2->fetch_array()) { + $table_data2[] = $row2; + } + $smarty->assign('table_data2', $table_data2); + + # Tabelle bpm_parameter + $anz_stellen = trim(get_parameter(14)); + $smarty->assign('index_stelle_anz', $anz_stellen); + + # Fehler bei Praxisstellenwahl anzeigen + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es dürfen maximal $anz_stellen Stellen gewählt werden."); + } + if ($errorno == 2) { + $smarty->assign('index_error_text', "Sie müssen zuerst eine Stelle aud der Dropdownliste markieren."); + } + if ($errorno == 3) { + $smarty->assign('index_error_text', "Es muss zunächst eine zuständige Hochschule definiert werden."); + } + } +} + +if ($action == 'save_praxis') { + $username = $_SESSION["username"]; + $dst_id = $_POST["stelle"]; + +/* + // http://www.tutorials.de/tutorials65420.html + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id = '$ka_id'"); + $row_anz = $result_anz->fetch_array(); + + # Tabelle bpm_parameter + $anz_stellen = trim(get_parameter(14)); + + if ($row_anz['Anz'] >= $anz_stellen) { + echo ""; + exit; + } +*/ + if ($dst_id == '') { + echo ""; + exit; + } + + + $result_hs = $db->query("SELECT anrede, hochschule, id + FROM bpm_kandidat + WHERE ka_id = $username + LIMIT 1; + "); + $row_hs = $result_hs->fetch_array(); + $hochschule = $row_hs['hochschule']; + + if($hochschule == 'Ludwigsburg'){ + $anschrift = 'Reuteallee 36
71634 Ludwigsburg'; + $sender = "Hochschule Ludwigsburg"; + $sendermail = get_parameter(8); + }elseif($hochschule == 'Kehl'){ + $anschrift = 'Kinzigallee 1
77694 Kehl'; + $sender = "Hochschule Kehl"; + $sendermail = get_parameter(7); + }else{ + echo ""; + exit; + } + + $link_arzt = 'https://www.gesundheitsamt-bw.de/'; + $link = 'https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle/index.php'; + $link_register = 'https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle/register.php'; + + $result_dst = $db->query("SELECT mail, init_tan + FROM bpm_dienststellen + WHERE dst_id = $dst_id + LIMIT 1; + "); + $row_dst = $result_dst->fetch_array(); + + if ($row_dst['init_tan'] == ''){ + $tan = tangen(); + $sql0 = $db->query("UPDATE bpm_dienststellen + SET init_tan = '$tan' + WHERE dst_id = '$dst_id' + "); + }else{ + $tan = ""; + } + + $empfaenger = "$row_dst[mail]"; + $betreff = "Bewerbung zur praktischen Ausbildung BPM"; + + ######################################################### + ## dieselbe Mail ist auch in /upload/index.php + ######################################################### + if($row_hs['anrede'] != 'W'){ + # männliche Version + $text = "Guten Tag,
+
+ ein Bewerber hat Sie als Wunschausbildungsstelle für das Einführungspraktikum im Studiengang Public Management ausgewählt.
"; + + + if($tan == ""){ + $text .=" + Sie erhalten einen Link für die Einsicht der Bewerbungsunterlagen: +
+
+ $link"; + } + + if($tan != ""){ + $text .=" +
+
+ Bitte registrieren Sie Ihre Praxisstelle zunächst mit folgenden Logindaten:
+ Registrierung: $link_register
+ Benutzername: $empfaenger
+ Einmalpasswort: $tan + "; + } + + $text .= " +
+
+ Die Ausbildungsstellen führen das Auswahlverfahren nach § 7 Absätze 3 und 4 APrOVw gD durch. Sollten Sie sich für den Bewerber und selbiger für Ihre Ausbildungsstelle entscheiden, teilt die Ausbildungsstelle der zuständigen Hochschule schnellstmöglich, jedoch bis spätestens 22. Juli des Jahres des Ausbildungsbeginns schriftlich Ihre Entscheidung mit. +
+ Der Bewerber ist von Ihnen darauf hinzuweisen, sich um folgende personalrechtlichen Unterlagen zu bemühen und an Sie zu übersenden: + +
+ Diese Unterlagen sind von Ihnen als Einstellungsvoraussetzungen zum 1. September des Einstellungsjahres zu prüfen. Nach Ausbildungsbeginn müssen diese Unterlagen an die Hochschule übersendet werden, diese sind die Grundlage für die spätere Ernennung in ein Beamtenverhältnis. +

+ Bitte teilen Sie dem Bewerber mit, dass er nur dann einen Ausbildungsplatz bei Ihnen erhalten kann, wenn er eine endgültige Zulassung für einen Studienplatz durch die Hochschule erhält. Endgültige Zulassungen zum Studium können erst nach Abschluss der Bewerbungsphase und nach der Rückmeldefrist der Ausbildungsstellen (22. Juli des Jahres des Ausbildungsbeginns) erfolgen. Erst dann kann die finale Bewerberrangliste gebildet werden, die die Grundlage der Studienplatzvergabe darstellt. Das Nachrückverfahren kann in Einzelfällen wie bisher auch bis unmittelbar vor Praktikumsbeginn andauern. +
+
+ Freundliche Grüße +

+ Ihre Hochschule $hochschule +
+ $anschrift +
+

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; + }else{ + # weibliche Version + $text = "Guten Tag,
+
+ eine Bewerberin hat Sie als Wunschausbildungsstelle für das Einführungspraktikum im Studiengang Public Management ausgewählt.
"; + + if($tan == ""){ + $text .=" + Sie erhalten einen Link für die Einsicht der Bewerbungsunterlagen: +
+
+ $link"; + } + + if($tan != ""){ + $text .=" +
+
+ Bitte registrieren Sie Ihre Praxisstelle zunächst mit folgenden Logindaten:
+ Registrierung: $link_register
+ Benutzername: $empfaenger
+ Einmalpasswort: $tan + "; + } + + $text .= " +
+
+ Die Ausbildungsstellen führen das Auswahlverfahren nach § 7 Absätze 3 und 4 APrOVw gD durch. Sollten Sie sich für die Bewerberin und selbige für Ihre Ausbildungsstelle entscheiden, teilt die Ausbildungsstelle der zuständigen Hochschule schnellstmöglich, jedoch bis spätestens 22. Juli des Jahres des Ausbildungsbeginns schriftlich Ihre Entscheidung mit. +
+ Die Bewerberin ist von Ihnen darauf hinzuweisen, sich um folgende personalrechtlichen Unterlagen zu bemühen und an Sie zu übersenden: +

+
+ Diese Unterlagen sind von Ihnen als Einstellungsvoraussetzungen zum 1. September des Einstellungsjahres zu prüfen. Nach Ausbildungsbeginn müssen diese Unterlagen an die Hochschule übersendet werden, diese sind die Grundlage für die spätere Ernennung in ein Beamtenverhältnis. +

+ Bitte teilen Sie der Bewerberin mit, dass sie nur dann einen Ausbildungsplatz bei Ihnen erhalten kann, wenn sie eine endgültige Zulassung für einen Studienplatz durch die Hochschule erhält. Endgültige Zulassungen zum Studium können erst nach Abschluss der Bewerbungsphase und nach der Rückmeldefrist der Ausbildungsstellen (22. Juli des Jahres des Ausbildungsbeginns) erfolgen. Erst dann kann die finale Bewerberrangliste gebildet werden, die die Grundlage der Studienplatzvergabe darstellt. Das Nachrückverfahren kann in Einzelfällen wie bisher auch bis unmittelbar vor Praktikumsbeginn andauern. +
+
+ Freundliche Grüße +

+ Ihre Hochschule $hochschule +
+ $anschrift +
+

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; + } + +#echo " +#From: $sender - $sendermail
+#$empfaenger
+#$betreff
+#$text
"; +#exit; + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + + + if($return){ + $sql1 = $db->query("insert into bpm_dst_wunsch (dst_id, ka_id, datum, mail_text, mail_betreff, status, sendedat) + VALUES('$dst_id', '$username', '$datum_db', '$text_db', '$betreff', 'V', '$datum_db')"); + + }else{ + $sql1 = $db->query("insert into bpm_dst_wunsch (dst_id, ka_id, datum, mail_text, mail_betreff, status) + VALUES('$dst_id', '$username', '$datum_db', '$text_db', '$betreff', 'F')"); + } + echo ""; + +} + +if ($action == 'testback') { + $username = $_SESSION["username"]; + $tan = $_SESSION["tan"]; + + $sql1 = $db->query("UPDATE bpm_tanpool a + SET login_dat = '0000-00-00 00:00:00' + ,aktiv = 'A' + WHERE tp_id = (SELECT b.tp_id + FROM bpm_term_kand b + WHERE b.ka_id = '$username' + ORDER BY b.tk_id DESC + LIMIT 1 + ) + AND tan = '$tan' + "); + + echo ""; +} + +if ($action == 'skala') { + # Die Seite wird neu geladen und damit vom Element Spinner die Ranges gesetzt + #$skala = $_POST['notenskala']; + #$_SESSION["skala"] = $skala; + echo ""; +} + +if ($action == 'stammdaten_edit') { + $username = $_SESSION["username"]; + + + + $result = $db->query("SELECT ka_id, anrede, vorname, nachname, str, plz, ort, date_format(gebdat, '%d.%m.%Y') gebdat_form, mail, tel + FROM bpm_kandidat + WHERE ka_id = '$username' + LIMIT 1"); + $row = $result->fetch_array(); + + $smarty->assign('persdat_value_anrede', $row['anrede']); + $smarty->assign('persdat_value_vorname', $row['vorname']); + $smarty->assign('persdat_value_nachname', $row['nachname']); + $smarty->assign('persdat_value_gebdat', $row['gebdat_form']); + $smarty->assign('persdat_value_str', $row['str']); + $smarty->assign('persdat_value_plz', $row['plz']); + $smarty->assign('persdat_value_ort', $row['ort']); + $smarty->assign('persdat_value_mail', $row['mail']); + $smarty->assign('persdat_value_tel', $row['tel']); + + ## Fehlerhandling + $error1 = $_GET['error1']; + $error2 = $_GET['error2']; + $error3 = $_GET['error3']; + $error4 = $_GET['error4']; + $error5 = $_GET['error5']; + $error6 = $_GET['error6']; + $error7 = $_GET['error7']; + $error8 = $_GET['error8']; + $error9 = $_GET['error9']; + $error10 = $_GET['error10']; + $error11 = $_GET['error11']; + $error12 = $_GET['error12']; + $error13 = $_GET['error13']; + $error14 = $_GET['error14']; + + if ($error1 == 1){$smarty->assign('erf_hig_anrede', 1);}else{$smarty->assign('erf_hig_anrede', 0);} + if ($error2 == 1){$smarty->assign('erf_hig_vorname', 1);}else{$smarty->assign('erf_hig_vorname', 0);} + if ($error3 == 1){$smarty->assign('erf_hig_nachname', 1);}else{$smarty->assign('erf_hig_nachname', 0);} + if ($error4 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error5 == 1){$smarty->assign('erf_hig_str', 1);}else{$smarty->assign('erf_hig_str', 0);} + if ($error6 == 1){$smarty->assign('erf_hig_plz', 1);}else{$smarty->assign('erf_hig_plz', 0);} + if ($error7 == 1){$smarty->assign('erf_hig_ort', 1);}else{$smarty->assign('erf_hig_ort', 0);} + if ($error8 == 1){$smarty->assign('erf_hig_mail', 1);}else{$smarty->assign('erf_hig_mail', 0);} + if ($error14 == 1){$smarty->assign('erf_hig_tel', 1);}else{$smarty->assign('erf_hig_tel', 0);} + + #Telefon kein Pflichtfeld derzeit + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error9 == 1 or $error10 == 1){ + $smarty->assign('persdat_error', 1); + + if($error9 == 1){ + $smarty->assign('persdat_error_text', 'Bitte prüfen Sie das Geburtsdatum.'); + } + if($error10 == 1){ + $smarty->assign('persdat_error_text', 'Die E-Mailadresse enthält Fehler.'); + } +# if($error11 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung.'); +# } +# if($error12 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben Sie den Test bereits 1x wiederholt.'); +# } +# if($error13 == 1){ +# $smarty->assign('persdat_error_text', 'Bitte prüfen Sie die Kombination aus ID/TAN.'); +# } + + if($error20 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige ID darf nicht leer sein.'); + } + if($error21 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige TAN darf nicht leer sein.'); + } + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error14 == 1){ + $smarty->assign('persdat_error_text', 'Bitte füllen Sie die Pflichtfelder aus.'); + } + } +} + +if ($action == 'stammdaten2_edit') { + $username = $_SESSION["username"]; + + if(isset($_POST['anrede'])){ + $anrede = trim($_POST['anrede']); + } + + if(isset($_POST['vorname'])){ + $vorname = addslashes(trim($_POST['vorname'])); + } + + if(isset($_POST['nachname'])){ + $nachname = addslashes(trim($_POST['nachname'])); + } + + if(isset($_POST['gebdat'])){ + $gebdat = addslashes(trim($_POST['gebdat'])); + } + + if(isset($_POST['str'])){ + $str = addslashes(trim($_POST['str'])); + } + + if(isset($_POST['plz'])){ + $plz = addslashes(trim($_POST['plz'])); + } + + if(isset($_POST['ort'])){ + $ort = addslashes(trim($_POST['ort'])); + } + + if(isset($_POST['alter18'])){ + $alter18 = addslashes(trim($_POST['alter18'])); + } + + if(isset($_POST['mail'])){ + $mail = addslashes(trim($_POST['mail'])); + } + + if(isset($_POST['tel'])){ + $tel = addslashes(trim($_POST['tel'])); + } + + if ($anrede == '') { + $error1=1; + $error=true; + } + if ($vorname == ''){ + $error2=1; + $error=true; + } + if ($nachname == ''){ + $error3=1; + $error=true; + } + if ($gebdat == ''){ + $error4=1; + $error=true; + } + if ($str == ''){ + $error5=1; + $error=true; + } + if ($plz == ''){ + $error6=1; + $error=true; + } + if ($ort == ''){ + $error7=1; + $error=true; + } + if ($mail == ''){ + $error8=1; + $error=true; + } + +#Telefon kein Pflichtfeld derzeit +# if ($tel == ''){ +# $error14=1; +# $error=true; +# } + + # Datumsformat von DD.MM.YYYY nach YYYY-MM-DD + $gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); + + function validateDate($date, $format = 'Y-m-d'){ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + + if(!validateDate($gebdat_form)){ + $error9=1; + $error=true; + } + + if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) { + $error10=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + $sql1 = $db->query( "UPDATE bpm_kandidat + SET anrede = '$anrede' + ,vorname = '$vorname' + ,nachname = '$nachname' + ,gebdat = '$gebdat_form' + ,str = '$str' + ,plz = '$plz' + ,ort = '$ort' + ,mail = '$mail' + ,tel = '$tel' + WHERE ka_id = '$username' + " ); + +} + +if ($action == 'note') { +$tk_id = $_POST['tk_id']; +$note = $_POST['note']; + + + $sql1 = $db->query( "UPDATE bpm_term_kand + SET kurznotiz = '$note' + WHERE tk_id = '$tk_id' + " ); + +echo ""; +} + + +// ende Action +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/datencheck.php b/admin/datencheck.php new file mode 100755 index 0000000..d170a56 --- /dev/null +++ b/admin/datencheck.php @@ -0,0 +1,365 @@ +query($query0) or die("Cannot execute query1"); + while ($row0 = $result0->fetch_array()) { + + $id = $row0['Jahrgang']; + #Anzahl der getesteten Kandidaten + + + $result_anzget = $db->query("SELECT count(distinct ka_id) Anz + FROM bpm_term_kand a, bpm_tanpool b + WHERE a.tp_id = b.tp_id + AND a.ka_id in (SELECT ka_id from bpm_kandidat where id like '%".$id."') + AND b.login_dat != '0000-00-00 00:00:00'"); + $row_anzget = $result_anzget->fetch_array(); + #$smarty->assign('datenchk_anzget', $row_anzget['Anz']); + + #Anzahl der Kandidaten mit ausstehendem Test + $result_aussttest = $db->query("SELECT count(*) Anz + FROM bpm_term_kand a, bpm_tanpool b + WHERE a.tp_id=b.tp_id + AND verw_dat != '0000-00-00 00:00:00' + AND a.ka_id in (SELECT ka_id from bpm_kandidat where id like '%".$id."') + AND b.login_dat = '0000-00-00 00:00:00'"); + $row_aussttest = $result_aussttest->fetch_array(); + #$smarty->assign('datenchk_aussttest', $row_aussttest['Anz']); + + #Anzahl aller Anmeldung + $result_alleranm = $db->query("SELECT count(distinct ka_id) Anz + FROM bpm_term_kand a, bpm_tanpool b + WHERE a.tp_id = b.tp_id + AND a.ka_id in (SELECT ka_id from bpm_kandidat where id like '%".$id."') + AND b.verw_dat != '0000-00-00 00:00:00'"); + $row_alleranm = $result_alleranm->fetch_array(); + #$smarty->assign('datenchk_alleranm', $row_alleranm['Anz']); + + #Anzahl Durchfaller - komplizierter. Wenn er nach dem ersten Mal durchgefallen doch bestanden hat, gilt er nicht als Durchfaller + $query = "SELECT ka_id, max(tp_id) tp_id + FROM bpm_term_kand + GROUP BY ka_id + "; + + $result = $db->query($query) or die("Cannot execute query1"); + $zaehler = 0; + while ($row = $result->fetch_array()) { + $result_tan = $db->query("SELECT tan + FROM bpm_tanpool + WHERE tp_id = $row[tp_id]"); + $row_tan = $result_tan->fetch_array(); + + $result_bestanden = $db->query("SELECT bestanden + FROM bpm_ergebnisse + WHERE ka_id = $row[ka_id] + AND ka_id in (SELECT ka_id from bpm_kandidat where id like '%".$id."') + AND tan = '$row_tan[tan]'"); + $row_bestanden = $result_bestanden->fetch_array(); + if($row_bestanden['bestanden'] == 0 and $row_bestanden['bestanden'] != ''){ + $zaehler++; + } + } + # $smarty->assign('datenchk_anzdurchfaller', $zaehler); + + #Anzahl aller Bewerberungen + $result_anzbewerb = $db->query("SELECT count(distinct ka_id) Anz + FROM bpm_upload + WHERE upload_dat != '0000-00-00 00:00:00' + AND ka_id in (SELECT ka_id from bpm_kandidat where id like '%".$id."')"); + $row_anzbewerb = $result_anzbewerb->fetch_array(); + # $smarty->assign('datenchk_anzbewerbungen', $row_anzbewerb['Anz']); + + $row0['datenchk_anzget'] = $row_anzget['Anz']; + $row0['datenchk_aussttest'] = $row_aussttest['Anz']; + $row0['datenchk_alleranm'] = $row_alleranm['Anz']; + $row0['datenchk_anzdurchfaller'] = $zaehler; + $row0['datenchk_anzbewerbungen'] = $row_anzbewerb['Anz']; + $table_data[] = $row0; + + } + $smarty->assign('table_data', $table_data); +/* + # Gespeicherte Werte + $query1 = "SELECT a.ka_id, perso, vorname, nachname, mail, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' END as tm_standort + , behinderung, verkuerzung + , a.hochschule + , kurznotiz + FROM bpm_kandidat a, bpm_term_kand b, bpm_termine c, bpm_ergebnisse d, bpm_tanpool e + WHERE a.ka_id = b.ka_id + AND b.tm_id = c.tm_id + AND a.ka_id = d.ka_id + AND b.tp_id = e.tp_id + AND a.ka_id IN (SELECT distinct ka_id FROM bpm_ergebnisse) + AND a.ka_id IN (SELECT distinct ka_id FROM bpm_upload WHERE upload_dat != '0000-00-00 00:00:00') + AND d.bestanden = '1' + AND e.tan=d.tan + ORDER BY kurznotiz ASC, nachname ASC, vorname ASC + "; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + $row_cnt = $result1->num_rows; + $smarty->assign('dokverw_anzdb', $row_cnt); + + while ($row1 = $result1->fetch_array()) { + + $result_test = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id = '$row1[ka_id]' + AND bestanden = '1'"); + $row_test = $result_test->fetch_array(); + + $result_perso = $db->query("SELECT count(*) Anz + FROM bpm_kandidat + WHERE perso = '$row1[perso]' + "); + $row_perso = $result_perso->fetch_array(); + if($row_perso['Anz'] > 1){ + $perso_alert = "red"; + }else{ + $perso_alert = "black"; + } + + $result_rang3 = $db->query("SELECT rang3 + FROM bpm_tmp_jahrgang_kandidat + WHERE ka_id = '$row1[ka_id]' + "); + $row_rang3 = $result_rang3->fetch_array(); + + + $result_anzhzb = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung = 'HZB' + AND ka_id = '$row1[ka_id]'"); + $row_anzhzb = $result_anzhzb->fetch_array(); + if($row_anzhzb['Anz'] > 0){ + $image_hzb = "ok.gif"; + }else{ + $image_hzb = "cross.jpg"; + } + + $result_anzzusage = $db->query("SELECT b.bez + FROM bpm_dst_wunsch a, bpm_dienststellen b + WHERE a.dst_id = b.dst_id + AND a.zusage = 'J' + AND a.ka_id = '$row1[ka_id]'"); + + $row_anzzusage = $result_anzzusage->fetch_array(); + if($row_anzzusage['bez'] != ''){ + $image_zusage = "ok.gif"; + $dstzusagebez = $row_anzzusage['bez']; + }else{ + $image_zusage = "cross.jpg"; + $dstzusagebez = ""; + } + + # Wunschhochschule + $result_wunschhs = $db->query("SELECT wunsch_hs, zugewiesene_hs + FROM bpm_erw_daten + WHERE ka_id = '$row1[ka_id]'"); + $row_wunschhs = $result_wunschhs->fetch_array(); + if($row_wunschhs['wunsch_hs'] == 'E'){ + $wunsch_hs = "Egal"; + }elseif($row_wunschhs['wunsch_hs'] == 'K'){ + $wunsch_hs = "Kehl"; + }elseif($row_wunschhs['wunsch_hs'] == 'L'){ + $wunsch_hs = "Ludwigsburg"; + }elseif($row_wunschhs['wunsch_hs'] == ''){ + $wunsch_hs = ""; + } + + if($row_wunschhs['zugewiesene_hs'] == 'O'){ + $zugewiesene_hs = "Offen"; + }elseif($row_wunschhs['zugewiesene_hs'] == 'K'){ + $zugewiesene_hs = "Kehl"; + }elseif($row_wunschhs['zugewiesene_hs'] == 'L'){ + $zugewiesene_hs = "Ludwigsburg"; + }elseif($row_wunschhs['zugewiesene_hs'] == ''){ + $zugewiesene_hs = ""; + } + + + $result_anzzeug = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung like 'Zeugnis%' + AND ka_id = '$row1[ka_id]'"); + $row_anzzeug = $result_anzzeug->fetch_array(); + if($row_anzzeug['Anz'] >= 2){ + $image_zeug = "ok.gif"; + }else{ + $image_zeug = "cross.jpg"; + } + + $result_anzleben = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung = 'Lebenslauf' + AND ka_id = '$row1[ka_id]'"); + $row_anzleben = $result_anzleben->fetch_array(); + if($row_anzleben['Anz'] >= 1){ + $image_leben = "ok.gif"; + }else{ + $image_leben = "cross.jpg"; + } + + $result_notehzb = $db->query("SELECT hzb, zeugnisschnitt + FROM bpm_note + WHERE ka_id = '$row1[ka_id]'"); + $row_notehzb = $result_notehzb->fetch_array(); + if($row_notehzb['hzb'] == "0.00" or $row_notehzb['hzb'] == ""){ + $image_notehzb = "cross.jpg"; + $note_hzb = ''; + }else{ + $image_notehzb = "ok.gif"; + $note_hzb = number_format($row_notehzb['hzb'], 1, ',', '.'); + } + + if($row_notehzb['zeugnisschnitt'] == "0.00" or $row_notehzb['zeugnisschnitt'] == ""){ + $image_noteschnitt = "cross.jpg"; + $note_wert = ''; + }else{ + $image_noteschnitt = "ok.gif"; + $note_wert = number_format($row_notehzb['zeugnisschnitt'], 1, ',', '.'); + } + + $row1['image_zusage'] = $image_zusage; + $row1['perso_alert'] = $perso_alert; + $row1['rang3'] = $row_rang3['rang3']; + $row1['dstzusagebez'] = $dstzusagebez; + $row1['image_noteschnitt']= $image_noteschnitt; + $row1['note_wert'] = $note_wert; + $row1['image_notehzb'] = $image_notehzb; + $row1['note_hzb'] = $note_hzb; + $row1['image_leben'] = $image_leben; + $row1['image_zeug'] = $image_zeug; + $row1['anz_zeug'] = $row_anzzeug['Anz']; + $row1['image_hzb'] = $image_hzb; + $row1['testergebnis'] = $row_test['summe']; + $row1['wunsch_hs'] = $wunsch_hs; + $row1['zugewiesene_hs'] = $zugewiesene_hs; + $table_data1[] = $row1; + } + +echo "

";
+#print_r($table_data1);
+echo "
"; + + $kurznotiz = array_column($table_data1, 'kurznotiz'); + $ka_id = array_column($table_data1, 'ka_id'); + $nachname = array_column($table_data1, 'nachname'); + $rang3 = array_column($table_data1, 'rang3'); + $hochschule = array_column($table_data1, 'hochschule'); + $wunsch_hs = array_column($table_data1, 'wunsch_hs'); + $zugewiesene_hs = array_column($table_data1, 'zugewiesene_hs'); + $testergebnis = array_column($table_data1, 'testergebnis'); + $verkuerzung = array_column($table_data1, 'verkuerzung'); + $behinderung = array_column($table_data1, 'behinderung'); + $zusage = array_column($table_data1, 'dstzusagebez'); + $note_hzb = array_column($table_data1, 'note_hzb'); + $note_wert = array_column($table_data1, 'note_wert'); + $mail = array_column($table_data1, 'mail'); + $image_hzb = array_column($table_data1, 'image_hzb'); + $anz_zeug = array_column($table_data1, 'anz_zeug'); + $image_leben = array_column($table_data1, 'image_leben'); + $image_notehzb = array_column($table_data1, 'image_notehzb'); + $image_noteschnitt = array_column($table_data1, 'image_noteschnitt'); + + #setlocale ( LC_COLLATE ,'de_DE.utf8'); + setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); + + if($_GET['order'] == 4){ + $order = 3; + }else{ + $order = 4; + } + + if(isset($_GET['sort'])){ + $sort = $_GET['sort']; + }else{ + $sort = "kurznotiz"; + } + if($order == 3){ + $smarty->assign('check_order_klartext', 'Absteigend'); + }else{ + $smarty->assign('check_order_klartext', 'Aufsteigend'); + } + + if($sort == "kurznotiz"){ + $smarty->assign('check_sort_klartext', 'Kurznotiz'); + }elseif($sort == "ka_id"){ + $smarty->assign('check_sort_klartext', 'Bew. Nr.'); + }elseif($sort == "nachname"){ + $smarty->assign('check_sort_klartext', 'Name'); + }elseif($sort == "perso"){ + $smarty->assign('check_sort_klartext', 'Ausweis'); + }elseif($sort == "rang3"){ + $smarty->assign('check_sort_klartext', 'Ranglistenplatz 3'); + }elseif($sort == "hochschule"){ + $smarty->assign('check_sort_klartext', 'zuständige Hochschule'); + }elseif($sort == "wunsch_hs"){ + $smarty->assign('check_sort_klartext', 'Wunsch Hochschule'); + }elseif($sort == "zugewiesene_hs"){ + $smarty->assign('check_sort_klartext', 'Zugewiesene Hochschule'); + }elseif($sort == "testergebnis"){ + $smarty->assign('check_sort_klartext', 'Testergebnis'); + }elseif($sort == "verkuerzung"){ + $smarty->assign('check_sort_klartext', 'Verkürzung'); + }elseif($sort == "behinderung"){ + $smarty->assign('check_sort_klartext', 'Schwerbehinderung'); + }elseif($sort == "zusage"){ + $smarty->assign('check_sort_klartext', 'Stellenzusage'); + }elseif($sort == "note_hzb"){ + $smarty->assign('check_sort_klartext', 'Notenwert HZB'); + }elseif($sort == "note_wert"){ + $smarty->assign('check_sort_klartext', 'Notenwert Durchschnitt'); + }elseif($sort == "mail"){ + $smarty->assign('check_sort_klartext', 'Mailadresse'); + }elseif($sort == "image_hzb"){ + $smarty->assign('check_sort_klartext', 'PDF Upload HZB'); + }elseif($sort == "anz_zeug"){ + $smarty->assign('check_sort_klartext', 'PDF Upload Zeugnisse'); + }elseif($sort == "image_leben"){ + $smarty->assign('check_sort_klartext', 'Lebenslauf'); + }elseif($sort == "image_notehzb"){ + $smarty->assign('check_sort_klartext', 'Note HZB'); + }elseif($sort == "image_noteschnitt"){ + $smarty->assign('check_sort_klartext', 'Note Durchschnitt'); + + } + + #Sortiertyp + if($sort == 'kurznotiz' OR $sort == 'perso' OR $sort == 'nachname' OR $sort == 'hochschule' OR $sort == 'wunsch_hs' OR $sort == 'zugewiesene_hs' OR $sort == 'note_hzb' OR $sort == 'note_wert'){ + $sorttyp = SORT_LOCALE_STRING; + }elseif($sort == 'ka_id' OR $sort == 'rang3'){ + $sorttyp = SORT_NUMERIC; + }else{ + $sorttyp = SORT_REGULAR ; + } + $smarty->assign('check_sort', $sort); + $smarty->assign('check_order', $order); +# echo "array_multisort($$sort, $order, $sorttyp, table_data1)
"; + array_multisort($$sort, $order, $nachname, $order, $sorttyp, $table_data1); + + $smarty->assign('table_data1', $table_data1); +*/ +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/datencheck_excel.php b/admin/datencheck_excel.php new file mode 100755 index 0000000..60c87f3 --- /dev/null +++ b/admin/datencheck_excel.php @@ -0,0 +1,289 @@ +getActiveSheet()->getPageSetup()->setFitToWidth(1); +#$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0); + +$activeSheet = $spreadsheet->getActiveSheet(); + +$activeSheet->getStyle('A1:AD1')->applyFromArray(array( + 'font' => array( + 'bold' => true + ) +)); + + +$activeSheet->setCellValue('A1', 'Kurznotiz'); +$activeSheet->setCellValue('B1', 'Bewerbernr.'); +$activeSheet->setCellValue('C1', 'Anrede'); +$activeSheet->setCellValue('D1', 'Vorname'); +$activeSheet->setCellValue('E1', 'Nachname'); +$activeSheet->setCellValue('F1', 'Ausweis'); +$activeSheet->setCellValue('G1', 'Mail'); +$activeSheet->setCellValue('H1', 'Straße'); +$activeSheet->setCellValue('I1', 'PLZ'); +$activeSheet->setCellValue('J1', 'Ort'); +$activeSheet->setCellValue('K1', 'Geburtsdatum'); +$activeSheet->setCellValue('L1', 'Testdatum'); +$activeSheet->setCellValue('M1', 'Zuständige Hochschule'); +$activeSheet->setCellValue('M1', 'Wunsch Hochschule'); +$activeSheet->setCellValue('O1', 'Zugewiesene Hochschule'); +$activeSheet->setCellValue('P1', 'Testergebnis'); +$activeSheet->setCellValue('Q1', 'Verkürzung'); +$activeSheet->setCellValue('R1', 'Schwerbehinderung'); +$activeSheet->setCellValue('S1', 'PDF Upload HZB'); +$activeSheet->setCellValue('T1', 'PDF Upload Zeugnisse'); +$activeSheet->setCellValue('U1', 'Lebenslauf'); +$activeSheet->setCellValue('V1', 'Note HZB'); +$activeSheet->setCellValue('W1', 'Notenwert HZB'); +$activeSheet->setCellValue('X1', 'Note Durchschnitt'); +$activeSheet->setCellValue('Y1', 'Notewert Durchschnitt'); +$activeSheet->setCellValue('Z1', 'Bezeichnung Ausbildungsstelle'); +$activeSheet->setCellValue('AA1', 'Straße Ausbildungsstelle'); +$activeSheet->setCellValue('AB1', 'PLZ Ausbildungsstelle'); +$activeSheet->setCellValue('AC1', 'Ort Ausbildungsstelle'); +$activeSheet->setCellValue('AD1', 'Ranglistenplatz 3'); +$activeSheet->freezePane('A2'); + +$query = $db->query("SELECT a.ka_id + ,CASE anrede + WHEN 'W' THEN 'Frau' + WHEN 'M' THEN 'Herr' + ELSE '' END as Anrede + ,perso + ,vorname + ,nachname + ,mail + ,str + ,plz + ,ort + ,mail + ,date_format(gebdat, '%d.%m.%Y') Gebdat + ,date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum + ,CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' END as tm_standort + ,behinderung + ,verkuerzung + ,a.hochschule + ,kurznotiz + FROM bpm_kandidat a, bpm_term_kand b, bpm_termine c, bpm_ergebnisse d, bpm_tanpool e + WHERE a.ka_id = b.ka_id + AND b.tm_id = c.tm_id + AND a.ka_id = d.ka_id + AND b.tp_id = e.tp_id + AND a.ka_id IN (SELECT distinct ka_id FROM bpm_ergebnisse) + AND a.ka_id IN (SELECT distinct ka_id FROM bpm_upload WHERE upload_dat != '0000-00-00 00:00:00') + AND d.bestanden = '1' + AND e.tan=d.tan + ORDER BY nachname ASC, vorname ASC + "); + +if ($query->num_rows > 0) { + $i = 2; + while ($row = $query->fetch_assoc()) { + + $result_test = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id = '$row[ka_id]' + AND bestanden = '1'"); + $row_test = $result_test->fetch_array(); + + $result_rang3 = $db->query("SELECT rang3 + FROM bpm_tmp_jahrgang_kandidat + WHERE ka_id = '$row[ka_id]' + "); + $row_rang3 = $result_rang3->fetch_array(); + + if ($row['verkuerzung'] == 'J') { + $verkuerzung = 'Ja'; + } else { + $verkuerzung = ''; + } + if ($row['behinderung'] == 'J') { + $behinderung = 'Ja'; + } else { + $behinderung = ''; + } + + $result_anzhzb = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung = 'HZB' + AND ka_id = '$row[ka_id]'"); + $row_anzhzb = $result_anzhzb->fetch_array(); + if ($row_anzhzb['Anz'] > 0) { + $pdf_hzb = "Ja"; + } else { + $pdf_hzb = "Nein"; + } + + $result_anzzeug = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung like 'Zeugnis%' + AND ka_id = '$row[ka_id]'"); + $row_anzzeug = $result_anzzeug->fetch_array(); + + $result_anzleben = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE beschreibung = 'Lebenslauf' + AND ka_id = '$row[ka_id]'"); + $row_anzleben = $result_anzleben->fetch_array(); + if ($row_anzleben['Anz'] >= 1) { + $leben = "Ja"; + } else { + $leben = "Nein"; + } + + $result_notehzb = $db->query("SELECT hzb, zeugnisschnitt + FROM bpm_note + WHERE ka_id = '$row[ka_id]'"); + $row_notehzb = $result_notehzb->fetch_array(); + if ($row_notehzb['hzb'] == "0.00" or $row_notehzb['hzb'] == "") { + $notehzb = "Nein"; + $note_hzb = ''; + } else { + $notehzb = "Ja"; + $note_hzb = number_format($row_notehzb['hzb'], 1, ',', '.'); + } + + if ($row_notehzb['zeugnisschnitt'] == "0.00" or $row_notehzb['zeugnisschnitt'] == "") { + $noteschnitt = "Nein"; + $note_wert = ''; + } else { + $noteschnitt = "Ja"; + $note_wert = number_format($row_notehzb['zeugnisschnitt'], 1, ',', '.'); + } + + $result_dst = $db->query("SELECT bez, str, plz, ort + FROM bpm_dienststellen a + WHERE dst_id IN (SELECT dst_id + FROM bpm_dst_wunsch b + WHERE a.dst_id = b.dst_id + AND b.ka_id = '$row[ka_id]' + AND zusage ='J')"); + $row_dst = $result_dst->fetch_array(); + if ($row_dst['bez'] != "") { + $dst_bez = $row_dst['bez']; + $dst_str = $row_dst['str']; + $dst_plz = $row_dst['plz']; + $dst_ort = $row_dst['ort']; + } else { + $dst_bez = ''; + $dst_str = ''; + $dst_plz = ''; + $dst_ort = ''; + } + + $result_erwhs = $db->query("SELECT wunsch_hs, zugewiesene_hs + FROM bpm_erw_daten + WHERE ka_id = '$row[ka_id]' + "); + $row_erwhs = $result_erwhs->fetch_array(); + + if($row_erwhs['wunsch_hs'] == 'E'){ + $wunsch_hs = "Egal"; + }elseif($row_erwhs['wunsch_hs'] == 'K'){ + $wunsch_hs = "Kehl"; + }elseif($row_erwhs['wunsch_hs'] == 'L'){ + $wunsch_hs = "Ludwigsburg"; + }elseif($row_erwhs['wunsch_hs'] == ''){ + $wunsch_hs = ""; + } + + if($row_erwhs['zugewiesene_hs'] == 'O'){ + $zugewiesene_hs = "Offen"; + }elseif($row_erwhs['zugewiesene_hs'] == 'K'){ + $zugewiesene_hs = "Kehl"; + }elseif($row_erwhs['zugewiesene_hs'] == 'L'){ + $zugewiesene_hs = "Ludwigsburg"; + }elseif($row_erwhs['zugewiesene_hs'] == ''){ + $zugewiesene_hs = ""; + } + + + $activeSheet->setCellValue('A' . $i, $row['kurznotiz']); + $activeSheet->setCellValue('B' . $i, $row['ka_id']); + $activeSheet->setCellValue('C' . $i, "$row[Anrede]"); + $activeSheet->setCellValue('D' . $i, "$row[vorname]"); + $activeSheet->setCellValue('E' . $i, "$row[nachname]"); + $activeSheet->setCellValue('F' . $i, "$row[perso]"); + $activeSheet->setCellValue('G' . $i, "$row[mail]"); + $activeSheet->setCellValue('H' . $i, "$row[str]"); + $activeSheet->setCellValue('I' . $i, "$row[plz]"); + $activeSheet->setCellValue('J' . $i, "$row[ort]"); + $activeSheet->setCellValue('K' . $i, "$row[Gebdat]"); + $activeSheet->setCellValue('L' . $i, "$row[tm_datum] ($row[tm_standort])"); + $activeSheet->setCellValue('M' . $i, $row['hochschule']); + $activeSheet->setCellValue('N' . $i, $wunsch_hs); + $activeSheet->setCellValue('O' . $i, $zugewiesene_hs); + $activeSheet->setCellValue('P' . $i, "$row_test[summe] / 130"); + $activeSheet->setCellValue('Q' . $i, $verkuerzung); + $activeSheet->setCellValue('R' . $i, $behinderung); + $activeSheet->setCellValue('S' . $i, $pdf_hzb); + $activeSheet->setCellValue('T' . $i, "$row_anzzeug[Anz] / 2"); + $activeSheet->setCellValue('U' . $i, $leben); + $activeSheet->setCellValue('V' . $i, $notehzb); + $activeSheet->setCellValue('W' . $i, $note_hzb); + $activeSheet->setCellValue('X' . $i, $noteschnitt); + $activeSheet->setCellValue('Y' . $i, $note_wert); + $activeSheet->setCellValue('Z' . $i, $dst_bez); + $activeSheet->setCellValue('AA' . $i, $dst_str); + $activeSheet->setCellValue('AB' . $i, $dst_plz); + $activeSheet->setCellValue('AC' . $i, $dst_ort); + $activeSheet->setCellValue('AD' . $i, $row_rang3['rang3']); + $i++; + } + +} + +$spreadsheet->getActiveSheet()->setTitle("Datencheck"); +$spreadsheet->getActiveSheet()->getColumnDimension('A')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('D')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('E')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('F')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('G')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('H')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('I')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('J')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('K')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('L')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('M')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('N')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('O')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('P')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('Q')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('R')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('S')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('T')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('U')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('V')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('W')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('X')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('Y')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('Z')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('AA')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('AB')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('AC')->setAutoSize(true); +$spreadsheet->getActiveSheet()->getColumnDimension('AD')->setAutoSize(true); +$spreadsheet->getActiveSheet()->setSelectedCell('A1'); +$writer = new Xlsx($spreadsheet); +$filename = 'Datencheck.xlsx'; + +header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); +header('Content-Disposition: attachment;filename=' . $filename); +header('Cache-Control: max-age=0'); +$writer->save('php://output'); + +?> diff --git a/admin/dokverw.php b/admin/dokverw.php new file mode 100755 index 0000000..72ef845 --- /dev/null +++ b/admin/dokverw.php @@ -0,0 +1,110 @@ +query($query1) or die("Cannot execute query1"); + $row_cnt = $result1->num_rows; + $smarty->assign('dokverw_anzdb', $row_cnt); + + while ($row1 = $result1->fetch_array()) { + $result_kand = $db->query("SELECT vorname, nachname + FROM bpm_kandidat + WHERE ka_id = '$row1[ka_id]'"); + $row_kand = $result_kand->fetch_array(); + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + + $row1['vorname'] = $row_kand['vorname']; + $row1['nachname'] = $row_kand['nachname']; + $row1['exists'] = $exists; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + + + $dir = $_SERVER["DOCUMENT_ROOT"].dirname($_SERVER['PHP_SELF'])."/$verz"; + + $folder = dir($dir); + while ($dateiname = $folder->read()) { + if (filetype($dir.$dateiname) != "dir") { + $ext = strrchr($dateiname, '.'); + if($ext == '.pdf'){ + $result_checkdoc = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE file ='$verz$dateiname' + LIMIT 1"); + $row_checkdoc = $result_checkdoc->fetch_array(); + if($row_checkdoc['Anz'] == 0){ + $exists2 = 0; + $vorname = ""; + $nachname = ""; + }else{ + $result_checkdoc2 = $db->query("SELECT ka_id + FROM bpm_upload + WHERE file ='$verz$dateiname' + LIMIT 1"); + $row_checkdoc2 = $result_checkdoc2->fetch_array(); + + $result_kand = $db->query("SELECT vorname, nachname + FROM bpm_kandidat + WHERE ka_id = '$row_checkdoc2[ka_id]'"); + $row_kand = $result_kand->fetch_array(); + $vorname = $row_kand['vorname']; + $nachname = $row_kand['nachname']; + $exists2 = 1; + } + $row2['vorname'] = $vorname; + $row2['nachname'] = $nachname; + $row2['file'] = $dateiname; + $row2['exists'] = $exists2; + $row2['dateiname'] = $dateiname; + $table_data2[] = $row2; + } + } + } + $smarty->assign('table_data2', $table_data2); + $cntserver = count($table_data2); + $smarty->assign('dokverw_anzserver', $cntserver); +} +if ($action == 'delserver') { + $file = $verz.$_GET['file']; + @unlink($file); + echo ""; +} +if ($action == 'deldb') { + $up_id = $_GET['up_id']; + $sql1 = $db->query("DELETE FROM bpm_upload + WHERE up_id = $up_id + "); + echo ""; +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/downpdf.php b/admin/downpdf.php new file mode 100755 index 0000000..e92f0e3 --- /dev/null +++ b/admin/downpdf.php @@ -0,0 +1,35 @@ +window.top.location.href = \"index.php\";"; +exit; +} +$file = urldecode($_GET["file"]); +#$file = str_replace('%28', '(', $file); +#$file = str_replace('%29', ')', $file); +#$file = str_replace('%2C', ',', $file); +#$file = str_replace('%3B', ';', $file); +#$file = str_replace('%3B', ';', $file); +#$file = str_replace('%E2%80%93', '–', $file); + + +if (file_exists($file)) { +header("Content-Type: application/octet-stream"); +header("Content-Disposition: attachment; filename=" . urlencode(basename($file))); +header("Content-Type: application/download"); +header("Content-Description: File Transfer"); +header("Content-Length: " . filesize($file)); + +flush(); // This doesn't really matter. + +$fp = fopen($file, "r"); +while (!feof($fp)) { + echo fread($fp, 65536); + flush(); // This is essential for large downloads +} + +fclose($fp); +}else{ +echo "Datei nicht gefunden"; +} +?> \ No newline at end of file diff --git a/admin/ergebnisse.php b/admin/ergebnisse.php new file mode 100755 index 0000000..eccaca5 --- /dev/null +++ b/admin/ergebnisse.php @@ -0,0 +1,123 @@ +query("SET lc_time_names = 'de_DE';"); + + $query1 = "SELECT a.tm_id, date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine a, bpm_term_kand b, bpm_ergebnisse c + WHERE a.tm_id=b.tm_id + AND b.ka_id = c.ka_id + AND a.tm_datum > ADDDATE(now(), -365) + AND a.tm_datum < now() + GROUP BY a.tm_id, tm_datum_form, tm_standort + ORDER BY tm_datum desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + if ($row1['tm_standort'] == 'L') { + $standort = 'Ludwigsburg'; + } + if ($row1['tm_standort'] == 'K') { + $standort = 'Kehl'; + } + + $row1['tm_standort'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'ausgabe') { + if (isset($_POST["testtermin"])) { + $testtermin = $_POST["testtermin"]; + } else { + $testtermin = $_SESSION["testtermin"]; + } + + $_SESSION["testtermin"] = $testtermin; + + $result = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y') tm_datum, tm_standort + FROM bpm_termine + WHERE tm_id = $testtermin"); + $row = $result->fetch_array(); + + if ($row['tm_standort'] == 'L') { + $standort = 'Ludwigsburg'; + } + if ($row['tm_standort'] == 'K') { + $standort = 'Kehl'; + } + + $smarty->assign('erg_datum', $row['tm_datum']); + $smarty->assign('erg_standort', $standort); + + $query1 = "SELECT vorname, nachname, a.ka_id, a.tan, satzerg, gemeinsamkeiten, rechenaufgaben, zahlenreihen, rechenzeichen, matrizen, merkf, summe, bestanden, a.eg_id + FROM bpm_ergebnisse a, bpm_kandidat b, bpm_term_kand c, bpm_termine d, bpm_tanpool e + WHERE a.ka_id = b.ka_id + AND b.ka_id = c.ka_id + AND c.tm_id = d.tm_id + AND c.tp_id = e.tp_id + AND e.tan = a.tan + AND d.tm_id = $testtermin + ORDER BY nachname ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + $row1['tm_standort'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + + +if ($action == 'del') { +$ka_id = $_GET['ka_id']; +$eg_id = $_GET['eg_id']; + + $result = $db->query("SELECT vorname, nachname + FROM bpm_kandidat + WHERE ka_id = $ka_id"); + $row = $result->fetch_array(); + $smarty->assign('del_name', "$row[vorname] $row[nachname]"); + $smarty->assign('del_eg_id', $eg_id); + +} + +if ($action == 'del2') { + $eg_id = $_GET['eg_id']; + + $sql1 = $db->query("UPDATE bpm_ergebnisse + SET summe = 0 + ,bestanden='0' + WHERE eg_id= $eg_id"); + +echo ""; +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/admin/fetch.php b/admin/fetch.php new file mode 100755 index 0000000..c9839b1 --- /dev/null +++ b/admin/fetch.php @@ -0,0 +1,85 @@ + 0) +{ + while($row = mysqli_fetch_array($result)) + { + + $result2 = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y - %H:%i Uhr') tm_datum_form, tm_datum + FROM bpm_term_kand a, bpm_termine b + WHERE a.tm_id = b.tm_id + AND a.ka_id = '$row[ka_id]' + ORDER BY tk_id DESC + LIMIT 1"); + $row2 = $result2->fetch_array(); + if($row2['tm_datum'] == '0000-00-00 00:00:00'){ + $tm_datum_form = "-"; + }else{ + $tm_datum_form = $row2['tm_datum_form']; + } + + + if(mysqli_num_rows($result) == 1){ + $output .= " + + "; + + }else{ + $output .= " + + "; + + } + } + echo $output; +} +else +{ + echo 'Data Not Found'; +} +?> diff --git a/admin/hauptframe.php b/admin/hauptframe.php new file mode 100755 index 0000000..c5b2778 --- /dev/null +++ b/admin/hauptframe.php @@ -0,0 +1,9 @@ +display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100755 index 0000000..3c55aa4 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,86 @@ +assign('index_error', 1); + + if($errorno == 1){ + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden"); + } + + if($errorno == 2){ + $smarty->assign('index_error_text', "Der Benutzername ist im System nicht vorhanden"); + } + + if($errorno == 3){ + $smarty->assign('index_error_text', "Der Benutzername oder das Passwort ist nicht korrekt."); + } + + # Daten aufbereiten bei Fehler + if(isset($_SESSION["global_username"])){ + $smarty->assign('index_user', $_SESSION["global_username"]); + } + } + + +} + +if($action == 'anmeld'){ + $username=strtoupper($_POST["user"]); //remove case sensitivity on the username + $password=$_POST["password"]; + + if($_POST["user"] != ""){ + $_SESSION["global_username"]=$username; + } + + if($username == "" OR $password == ""){ + echo ""; + }else{ + + + $db = dbconnect(); + $result = $db->query("SELECT bpmuid, uid, passwort FROM bpm_admin WHERE UPPER(uid)='$username'"); + $row = $result->fetch_array(); + + + if ($username != strtoupper($row['uid'])) { + echo ""; + } + // Passwort falsch + elseif (md5($password) != $row['passwort']){ //verschlüsseltes Passwort überprüfen + # Cookies werden bereits gesetzt, falls sich jemand ein passwort zusenden lässt. + $_SESSION["global_uid"] = $row['bpmuid']; + $_SESSION["global_username"] = $row['uid']; + echo ""; + }else{ + $db = dbconnect(); + $datum=date("Y-m-d H:i:s"); + $ip=getenv("REMOTE_ADDR"); + $agent=getenv("HTTP_USER_AGENT"); + $user_admin = $row['bpmuid']; + $_SESSION["global_uid"] = $user_admin; + $_SESSION["global_username"] = $row['uid']; + $result_1 = $db->query("INSERT INTO bpm_adminlog (Datum, IP, user_agent, bpmuid) VALUES ('$datum', '$ip', '$agent', '$user_admin')"); + $smarty->assign('index_login', "1"); + } + } + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/indexframe.php b/admin/indexframe.php new file mode 100755 index 0000000..d3702f2 --- /dev/null +++ b/admin/indexframe.php @@ -0,0 +1,8 @@ +display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/kand_del.php b/admin/kand_del.php new file mode 100755 index 0000000..e40042e --- /dev/null +++ b/admin/kand_del.php @@ -0,0 +1,111 @@ +query("SET lc_time_names = 'de_DE';"); + +# Dropdown befüllen übernimmt ajax:fetch.php +# $query1 = "SELECT a.ka_id, vorname, nachname, date_format(gebdat, '%d.%m.%Y') geb_format +# FROM bpm_kandidat a, bpm_term_kand b, bpm_tanpool c +# WHERE a.ka_id =b.ka_id +# AND b.tp_id =c.tp_id +# AND c.login_dat = '0000-00-00 00:00:00' +# ORDER BY nachname ASC, vorname ASC"; +# +# $result1 = $db->query($query1) or die("Cannot execute query1"); +# +# +# while ($row1 = $result1->fetch_array()) { +# $table_data1[] = $row1; +# } +# $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'nachfrage') { + $ka_id = $_POST['user']; + + $result_id = $db->query("SELECT vorname, nachname + FROM bpm_kandidat + WHERE ka_id = '$ka_id'"); + $row_id = $result_id->fetch_array(); + + $smarty->assign('kand_name', "$row_id[vorname] $row_id[nachname]"); + $smarty->assign('kand_ka_id', $ka_id); + +} + +if ($action == 'delkand') { + $ka_id = $_GET['ka_id']; + + + $result_del = $db->query("SELECT count(*) Anz + FROM bpm_kandidat a, bpm_term_kand b, bpm_tanpool c + WHERE a.ka_id =b.ka_id + AND b.tp_id =c.tp_id + AND c.login_dat = '0000-00-00 00:00:00' + AND a.ka_id = $ka_id + "); + $row_del = $result_del->fetch_array(); + + # Kandidat war inzwischen nicht beim Test angemeldet + if ($row_del['Anz'] == 1) { + + #Aktuelle Tan ermitteln + $result_tan = $db->query("SELECT a.tp_id, tan + FROM bpm_tanpool a, bpm_term_kand b + WHERE a.tp_id = b.tp_id + AND b.ka_id = '$ka_id' + ORDER BY b.tk_id DESC + LIMIT 1"); + $row_tan = $result_tan->fetch_array(); + $tan = $row_tan['tan']; + $tp_id = $row_tan['tp_id']; + + + $sql1 = $db->query("DELETE FROM bpm_term_kand + WHERE tp_id = $tp_id + AND ka_id= $ka_id"); + + $sql1 = $db->query("DELETE FROM bpm_sonstige_mail + WHERE ka_id= $ka_id"); + + # TAN wieder freigeben + $sql2 = $db->query("UPDATE bpm_tanpool + SET verw_dat = '0000-00-00 00:00:00' + ,login_dat = '0000-00-00 00:00:00' + WHERE tp_id= $tp_id + AND tan = '$tan'"); + + # Prüfen, ob es noch eine alte Bewerbung zum Test gibt, den er nicht bestanden hatte. Dann sollen die Stammdaten erhalten bleiben + $result_del2 = $db->query("SELECT count(*) Anz + FROM bpm_term_kand + WHERE ka_id ='$ka_id' + "); + $row_del2 = $result_del2->fetch_array(); + + if($row_del2['Anz'] == 0){ + $sql3 = $db->query("DELETE FROM bpm_kandidat + WHERE ka_id= $ka_id"); + } + } + +echo ""; +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/liste_tn.php b/admin/liste_tn.php new file mode 100755 index 0000000..c95c7a8 --- /dev/null +++ b/admin/liste_tn.php @@ -0,0 +1,262 @@ +query("SET lc_time_names = 'de_DE';"); + + $query1 = "SELECT a.tm_id, date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine a, bpm_term_kand b + WHERE a.tm_id=b.tm_id + AND a.tm_datum > ADDDATE(now(), -7) + GROUP BY a.tm_id, tm_datum_form, tm_standort + ORDER BY tm_datum ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + $row1['tm_standort'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'ausgabe') { + $testtermin = $_POST["testtermin"]; + $german = $db->query("SET lc_time_names = 'de_DE';"); + $query_termin = $db->query("SELECT date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine + WHERE tm_id = $testtermin"); + $row_get_termin = $query_termin->fetch_array(); + + if($row_get_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row_get_termin['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + +$buffer = ''; +$buffer .= ""; + +$buffer.="

$row_get_termin[tm_datum_form], $standort

+ + + + + + + + + + + +"; + $query1 = "SELECT anrede, perso, vorname, nachname, str, plz, ort, alter18, id, date_format(gebdat,'%d.%m.%Y') gebdat_form, tan, tinyurl, mail + FROM bpm_term_kand a, bpm_tanpool b, bpm_kandidat c + WHERE a.tp_id= b.tp_id + AND a.ka_id = c.ka_id + AND a.tm_id = $testtermin + ORDER BY nachname, vorname + "; + + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $smarty->assign('termine_aktdat', date("d.m.Y H:i", time() ) ) ; + while ($row1 = $result1->fetch_array()) { + if($row1['alter18'] == 0){ + $minderj = 'ja'; + } + if($row1['alter18'] == 1){ + $minderj = 'nein'; + } + if($row1['perso'] != ''){ + $ausweis = "
Ausweis: $row1[perso]"; + }else{ + $ausweis = ""; + } +$buffer.=" + + + + + + + + +"; + } + +$buffer.=" +
+ Name + + Geburtstag + + Minderjährig + + ID + + Mail + + TAN + + Link +
+ $row1[nachname], $row1[vorname] ($row1[anrede])
+ $row1[str]
+ $row1[plz] $row1[ort] + $ausweis +
+ $row1[gebdat_form] + + $minderj + + $row1[id] + + $row1[mail] + + $row1[tan] + + $row1[tinyurl] +
+
"; + +require_once("../mpdf/vendor/autoload.php"); +$mpdf = new \Mpdf\Mpdf([ + 'mode' => 'utf-8', + 'format' => 'A4', + 'orientation' => 'P', + 'margin_top' => 10, + 'margin_bottom' => 10, + 'margin_left' => 10, + 'margin_right' => 16, + 'default_font' => 'arial' +]); + + + + $query2 = "SELECT anrede, vorname, nachname, str, plz, ort, alter18, id, date_format(gebdat,'%d.%m.%Y') gebdat_form, tan, tinyurl, mail, hochschule + FROM bpm_term_kand a, bpm_tanpool b, bpm_kandidat c + WHERE a.tp_id= b.tp_id + AND a.ka_id = c.ka_id + AND a.tm_id = $testtermin + ORDER BY nachname, vorname + "; + + + $result2 = $db->query($query2) or die("Cannot execute query2"); + + $smarty->assign('termine_aktdat', date("d.m.Y H:i", time() ) ) ; + while ($row2 = $result2->fetch_array()) { + + if($row2['alter18'] == 0){ + $minderj = 'ja'; + } + if($row2['alter18'] == 1){ + $minderj = 'nein'; + } + + if($row2['hochschule'] == 'Ludwigsburg'){ + $link = "https://www.hs-ludwigsburg.de/studium/public-management-ba/bewerben.html"; + } + if($row2['hochschule'] == 'Kehl'){ + $link = "http://www.hs-kehl.de/studium-lehre/bachelor-studiengaenge/public-management-ba/bewerbung/"; + } + if($row2['hochschule'] == 'NA'){ + $link = "http://www.hs-kehl.de/studium-lehre/bachelor-studiengaenge/public-management-ba/bewerbung/ bzw.
https://www.hs-ludwigsburg.de/studium/public-management-ba/bewerben.html"; + } + $buffer.=" + + +

Anmeldedaten für $row2[vorname] $row2[nachname] ($row2[gebdat_form])

+

+ Bitte bewahren Sie die nachfolgenden Anmeldedaten für das gesamte Bewerbungsverfahren auf. +
+
+ + + + + + + + + + + +
+ Persönliche ID + + Passwort/TAN +
+ $row2[id] + + $row2[tan] +
+
+
+ Weiterführende Links: + + + + + +
+ Weitere Informationen: + + $link +
+
"; + } +#$mpdf->setFooter("Teilnehmerliste|$row_get_termin[tm_datum_form], $standort|{PAGENO} / {nb}"); +$mpdf->setFooter("Testteilnehmer||$row_get_termin[tm_datum_form], $standort"); + + + +$mpdf->WriteHTML($buffer); + +// Output a PDF file directly to the browser +$mpdf->Output(); + + +} +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/logout.php b/admin/logout.php new file mode 100755 index 0000000..c148555 --- /dev/null +++ b/admin/logout.php @@ -0,0 +1,12 @@ +display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/mail_test.php b/admin/mail_test.php new file mode 100755 index 0000000..2327e3c --- /dev/null +++ b/admin/mail_test.php @@ -0,0 +1,151 @@ +query("SET lc_time_names = 'de_DE';"); + + $query1 = "SELECT a.tm_id, date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine a, bpm_term_kand b + WHERE a.tm_id=b.tm_id + AND a.tm_datum > ADDDATE(now(), -7) + GROUP BY a.tm_id, tm_datum_form, tm_standort + ORDER BY tm_datum ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + $row1['tm_standort'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'mailsenden_test') { + $testtermin = $_POST["testtermin"]; + $_SESSION["testtermin"] = $testtermin; + + $german = $db->query("SET lc_time_names = 'de_DE';"); + $query_termin = $db->query("SELECT date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine + WHERE tm_id = $testtermin"); + $row_get_termin = $query_termin->fetch_array(); + + if($row_get_termin['tm_standort'] == 'L'){ + $sender = 'Hochschule Ludwigsburg'; + $sendermail = trim(get_parameter(8)); + } + if($row_get_termin['tm_standort'] == 'K'){ + $sender = 'Hochschule Kehl'; + $sendermail = trim(get_parameter(7)); + } + $smarty->assign('mail_sender', $sender); + $smarty->assign('mail_sendermail', $sendermail); + + $query1 = "SELECT vorname, nachname, mail + FROM bpm_kandidat + WHERE ka_id IN (SELECT ka_id FROM bpm_term_kand WHERE tm_id = $testtermin)"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $mail = ""; + while ($row1 = $result1->fetch_array()) { + $mail .= $row1['mail'].", "; + } + $mail = substr($mail,0,-2); + $smarty->assign('empfaenger', $mail); +} + +if ($action == 'mailsenden2_test') { + $testtermin = $_SESSION["testtermin"]; + + $german = $db->query("SET lc_time_names = 'de_DE';"); + $query_termin = $db->query("SELECT date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine + WHERE tm_id = $testtermin"); + $row_get_termin = $query_termin->fetch_array(); + + if($row_get_termin['tm_standort'] == 'L'){ + $sender = 'Hochschule Ludwigsburg'; + $sendermail = trim(get_parameter(8)); + } + if($row_get_termin['tm_standort'] == 'K'){ + $sender = 'Hochschule Kehl'; + $sendermail = trim(get_parameter(7)); + } + + $empfaenger_alle = $_POST['mail_mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + + $empf_array = explode(",", $empfaenger_alle); +# echo " +#
+#  From: $sender - $sendermail
+# $empfaenger
+# $betreff
+# $text
"; +# #print_r($empf_array); +# echo "
"; +# exit; + + $style =""; + $text = $style.$text; + + for($i=0;$iquery("SELECT ka_id + FROM bpm_kandidat + WHERE mail = '$empfaenger'"); + $row_kaid = $query_kaid->fetch_array(); + + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$row_kaid[ka_id]', '$empfaenger', '$betreff', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$row_kaid[ka_id]', '$empfaenger', '$betreff', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Prüfen Sie die Mailadresse das Kandidaten."); + } + } +} +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/menu_administration.php b/admin/menu_administration.php new file mode 100755 index 0000000..69926f5 --- /dev/null +++ b/admin/menu_administration.php @@ -0,0 +1,16 @@ +assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/menu_verwaltung.php b/admin/menu_verwaltung.php new file mode 100755 index 0000000..68d5e91 --- /dev/null +++ b/admin/menu_verwaltung.php @@ -0,0 +1,16 @@ +assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/parameter.php b/admin/parameter.php new file mode 100755 index 0000000..988a094 --- /dev/null +++ b/admin/parameter.php @@ -0,0 +1,84 @@ +query($query1) or die("Cannot execute query1"); + + $result_ct = $db->query("SELECT count(*) Anz FROM bpm_tanpool where verw_dat = '0000-00-00 00:00:00'"); + $row_ct = $result_ct->fetch_array(); + $smarty->assign('parameter_anzahltan', "$row_ct[Anz]"); + + while ($row1 = $result1->fetch_array()) { + # Passwort fr die Praxisstellen wird verschlsselt gespeichert + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + $row1['zaehler'] = $zaehler; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} + +if($action == 'save'){ + + + $query2 = "SELECT pid + FROM bpm_parameter + ORDER BY pid ASC"; + $result2 = $db->query( $query2) + or die ("Cannot execute query2"); + + while ($row2 = $result2->fetch_array()){ + $pid = $row2['pid']; + $pid_value = $_POST[$pid]; + + + $sql1 = $db->query( "UPDATE bpm_parameter + SET wert = '$pid_value' + WHERE pid = $pid + " ); + + } + + if(!$sql1){ + $error = TRUE; + $error_reason .= "Fehler beim Update [bpm_parameter]
"; + }else{ + $error = FALSE; + $smarty->assign('parameter_inserterr', "2"); + echo ""; + } + + if($error){ + $smarty->assign('parameter_inserterr', "1"); + $smarty->assign('parameter_reason', "$error_reason"); // Kein Mailversand + } // Ende IF : Insert hat geklappt + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/praxisstellen_edit.php b/admin/praxisstellen_edit.php new file mode 100755 index 0000000..7e8943c --- /dev/null +++ b/admin/praxisstellen_edit.php @@ -0,0 +1,346 @@ +query("SELECT vorname, nachname + FROM bpm_kandidat + WHERE ka_id = $user"); + $row_name = $result_name->fetch_array(); + $_SESSION["prxedit_user"] = $user; + $_SESSION["prxedit_username"] = "$row_name[vorname] $row_name[nachname]"; + # Falls aus bewerber_daten.php kommend, bietet man einen zurückbutton an + $smarty->assign('prxedit_value_user', $_SESSION["prxedit_user"]); + $smarty->assign('prxedit_value_username', $_SESSION["prxedit_username"]); + } + + $result_all = $db->query("SELECT count(*) Anz + FROM bpm_dienststellen + "); + $row_all = $result_all->fetch_array(); + $smarty->assign('prxedit_value_anzall', $row_all['Anz']); + + + $result_unreg = $db->query("SELECT count(*) Anz + FROM bpm_dienststellen + WHERE register_dat = '0000-00-00 00:00:00'"); + $row_unreg = $result_unreg->fetch_array(); + $smarty->assign('prxedit_value_anzunreg', $row_unreg['Anz']); + + $result_reg = $db->query("SELECT count(*) Anz + FROM bpm_dienststellen + WHERE register_dat != '0000-00-00 00:00:00'"); + $row_reg = $result_reg->fetch_array(); + $smarty->assign('prxedit_value_anzreg', $row_reg['Anz']); + + + + # -- Fehlermeldungen -- # + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('prxedit_error', 1); + + $smarty->assign('prxedit_value_art', $_SESSION["prxedit_value_art"]); + $smarty->assign('prxedit_value_name', $_SESSION["prxedit_value_name"]); + $smarty->assign('prxedit_value_str', $_SESSION["prxedit_value_str"]); + $smarty->assign('prxedit_value_plz', $_SESSION["prxedit_value_plz"]); + $smarty->assign('prxedit_value_ort', $_SESSION["prxedit_value_ort"]); + $smarty->assign('prxedit_value_mail', $_SESSION["prxedit_value_mail"]); + $smarty->assign('prxedit_value_gueltigvon', $_SESSION["prxedit_value_gueltigvon"]); + $smarty->assign('prxedit_value_gueltigbis', $_SESSION["prxedit_value_gueltigbis"]); + + + + if ($errorno == 3) { + # ungültiges Datum + $smarty->assign('prxedit_error_text', "Das eingegebene Gültig von Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + if ($errorno == 4) { + # ungültiges Datum + $smarty->assign('prxedit_error_text', "Das eingegebene Gültig bis Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + } + + # --- Wenn Werte editiert werden ------------ + if ($_SESSION["prxedit_status"] == 'edit') { + + $result_edit = $db->query("SELECT dst_id, bezeichnung, name, str, plz, ort, mail, date_format(gueltig_von, '%d.%m.%Y') gueltig_von_form, date_format(gueltig_bis, '%d.%m.%Y') gueltig_bis_form + FROM bpm_dienststellen + WHERE dst_id = $id"); + $row_edit = $result_edit->fetch_array(); + if($row_edit['gueltig_von_form'] == '00.00.0000'){ + $gueltig_von_form = ""; + }else{ + $gueltig_von_form = $row_edit['gueltig_von_form']; + } + if($row_edit['gueltig_bis_form'] == '00.00.0000'){ + $gueltig_bis_form = ""; + }else{ + $gueltig_bis_form = $row_edit['gueltig_bis_form']; + } + $smarty->assign('prxedit_value_art', "$row_edit[bezeichnung]"); + $smarty->assign('prxedit_value_name', "$row_edit[name]"); + $smarty->assign('prxedit_value_str', "$row_edit[str]"); + $smarty->assign('prxedit_value_plz', "$row_edit[plz]"); + $smarty->assign('prxedit_value_ort', "$row_edit[ort]"); + $smarty->assign('prxedit_value_mail', "$row_edit[mail]"); + $smarty->assign('prxedit_value_gueltigvon', "$gueltig_von_form"); + $smarty->assign('prxedit_value_gueltigbis', "$gueltig_bis_form"); + + } + # --- Wenn Werte editiert werden Ende ------- + + if ($_GET['editende'] == 1) { + # Editieren ist beendet, als ein update auf einen Datensatz. Dann ist der status wieder Neu, damit wird wieder ein Insert durchgeführt + $_SESSION["prxedit_status"] = 'neu'; + } + + + +} + + +if ($action == 'save') { + +$art = $_POST['art']; +$name = $_POST['name']; +$str = $_POST['str']; +$plz = $_POST['plz']; +$ort = $_POST['ort']; +$mail = $_POST['mail']; +$gueltigvon = $_POST['gueltigvon']; +$gueltigbis = $_POST['gueltigbis']; +$regmail = $_POST['regmail']; + +$_SESSION["prxedit_value_art"] = $art; +$_SESSION["prxedit_value_name"] = $name; +$_SESSION["prxedit_value_str"] = $str; +$_SESSION["prxedit_value_plz"] = $plz; +$_SESSION["prxedit_value_ort"] = $ort; +$_SESSION["prxedit_value_mail"] = $mail; + +$gueltigvon_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gueltigvon); +$gueltigbis_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gueltigbis); + + +function validateDate($date, $format = 'Y-m-d') +{ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; +} + +if(!validateDate($gueltigvon_form) AND $gueltigvon_form != ''){ + echo ""; + exit; +} + +if(!validateDate($gueltigbis_form) AND $gueltigbis_form != ''){ + echo ""; + exit; +} + +if($gueltigvon_form == ''){ + $gueltigvon_form ='0000-00-00'; +} + +if($gueltigbis_form == ''){ + $gueltigbis_form ='0000-00-00'; +} + + $bez = $art." ".$name; + + #$datum = date("Y-m-d H:i:s"); + + if ($_SESSION["prxedit_status"] == 'neu') { + $tan = tangen(); + $sql1 = $db->query("INSERT INTO bpm_dienststellen ( bezeichnung + , name + , bez + , str + , plz + , ort + , mail + , init_tan + , gueltig_von + , gueltig_bis + ) + VALUES + ( '$art' + , '$name' + , '$bez' + , '$str' + , '$plz' + , '$ort' + , '$mail' + , '$tan' + , '$gueltigvon_form' + , '$gueltigbis_form' + ) + "); + } + + if ($_SESSION["prxedit_status"] == 'edit') { + $id = $_SESSION["prxedit_id"]; + $ka_id = $_SESSION["prxedit_user"]; + if($regmail == 'j'){ + $tan = tangen(); + $result = $db->query("UPDATE bpm_dienststellen + SET bezeichnung = '$art' + , name = '$name' + , bez = '$bez' + , str = '$str' + , plz = '$plz' + , ort = '$ort' + , mail = '$mail' + , init_tan = '$tan' + , gueltig_von = '$gueltigvon_form' + , gueltig_bis = '$gueltigbis_form' + , regmail_betreff = '' + , regmail_text = '' + , regmail_status = 'O' + , regmail_sendedat = '0000-00-00 00:00:00' + , pwd = '' + , register_dat = '0000-00-00 00:00:00' + WHERE dst_id = $id + "); + }else{ + $result = $db->query("UPDATE bpm_dienststellen + SET bezeichnung = '$art' + , name = '$name' + , bez = '$bez' + , str = '$str' + , plz = '$plz' + , ort = '$ort' + , mail = '$mail' + , gueltig_von = '$gueltigvon_form' + , gueltig_bis = '$gueltigbis_form' + WHERE dst_id = $id + "); + } + unset($_SESSION['prxedit_id']); + } + # Dann bekommts beim refresh den status neu, also es wird beim Abschicken ein Insert gemacht + $editende = 1; + echo ""; + + +} +if ($action == 'del') { + $id = $_GET['id']; + + $del1 = $db->query("DELETE FROM bpm_termine WHERE id = $id"); + + echo ""; +} + + +if ($action == 'mailsenden') { + + $dst_id = $_GET['dst_id']; + $result_erg = $db->query("SELECT regmail_betreff, regmail_text, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_erg = $result_erg->fetch_array(); + + $sender = "Hochschule Ludwigsburg"; + $sendermail = get_parameter(8); + + $smarty->assign('mail_sender', $sender); + $smarty->assign('mail_sendermail', $sendermail); + + + $smarty->assign('mail_text', $row_erg['regmail_text']); + $smarty->assign('mail_betreff', $row_erg['regmail_betreff']); + $smarty->assign('mail_mail', $row_erg['mail']); + $smarty->assign('mail_dstid', $dst_id); +} + +if ($action == 'mailsenden2') { + $dst_id = $_POST['dst_id']; + $sender = $_POST['mail_sender']; + $sendermail = $_POST['mail_sendermail']; + $empfaenger = $_POST['mail_mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style =" + + + "; + $text = $style.$text; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
"; + #exit; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + if ($return) { + $sql1 = $db->query("UPDATE bpm_dienststellen + SET regmail_text = '$text_db' + , regmail_betreff = '$betreff' + , regmail_status = 'V' + , regmail_sendedat = '$datum_db' + WHERE dst_id = $dst_id + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("UPDATE bpm_dienststellen + SET regmail_text = '$text_db' + , regmail_betreff = '$betreff_db' + , status = 'F' + WHERE dst_id = $dst_id + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Prüfen Sie die Mailadresse der Praxissstelle."); + } +} + + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/praxisstellen_news.php b/admin/praxisstellen_news.php new file mode 100755 index 0000000..0a8efab --- /dev/null +++ b/admin/praxisstellen_news.php @@ -0,0 +1,151 @@ +assign('news_error', 1); + + $smarty->assign('news_value_headline', $_SESSION["news_value_headline"]); + $smarty->assign('news_value_text', $_SESSION["news_value_text"]); + + if ($errorno == 1) { + # ungültiges Datum + $smarty->assign('news_error_text', "Bitte füllen Sie alle Felder aus!"); + } + } + + # --- Wenn Werte editiert werden ------------ + if ($_SESSION["news_status"] == 'edit') { + $result_edit = $db->query("SELECT pn_id, pn_headline, pn_text + FROM bpm_prxnews + WHERE pn_id = $pn_id"); + $row_edit = $result_edit->fetch_array(); + $smarty->assign('news_value_headline', "$row_edit[pn_headline]"); + $smarty->assign('news_value_text', "$row_edit[pn_text]"); + + } + # --- Wenn Werte editiert werden Ende ------- + + if ($_GET['editende'] == 1) { + # Editieren ist beendet, als ein update auf einen Datensatz. Dann ist der status wieder Neu, damit wird wieder ein Insert durchgeführt + $_SESSION["news_status"] = 'neu'; + } + + + # Gespeicherte Werte + $query1 = "SELECT pn_id, pn_headline, pn_text, date_format(pn_date, '%d.%m.%Y - %H:%i Uhr') pn_date_form + FROM bpm_prxnews + ORDER BY pn_date DESC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + + +if ($action == 'save') { + +$headline = $_POST['headline']; +$text = $_POST['text']; + +$_SESSION["news_value_headline"] = $headline; +$_SESSION["news_value_text"] = $text; + + +if($text == "" or $headline == ""){ + echo ""; + exit; +} + + + $datum = date("Y-m-d H:i:s"); + $headline_db = addslashes($headline); + $text_db = addslashes($text); + + if ($_SESSION["news_status"] == 'neu') { + + $sql1 = $db->query("INSERT INTO bpm_prxnews ( pn_headline + , pn_text + , pn_date + ) + VALUES + ( '$headline_db' + , '$text_db' + , '$datum' + ) + "); + } + + if ($_SESSION["news_status"] == 'edit') { + $pn_id = $_SESSION["news_pn_id"]; + + $result = $db->query("UPDATE bpm_prxnews + SET pn_headline = '$headline_db' + , pn_text = '$text_db' + WHERE pn_id = $pn_id + "); + + unset($_SESSION['news_pn_id']); + + } + # Dann bekommts beim refresh den status neu, also es wird beim Abschicken ein Insert gemacht + $editende = 1; + echo ""; + + +} + +if ($action == 'show') { + $pn_id = $_GET['pn_id']; + $result_show = $db->query("SELECT pn_headline, pn_text + FROM bpm_prxnews + WHERE pn_id = $pn_id + "); + $row_show = $result_show->fetch_array(); + $smarty->assign('prx_show_headline', $row_show['pn_headline']); + $smarty->assign('prx_show_text', $row_show['pn_text']); +} + +if ($action == 'del') { + $pn_id = $_GET['pn_id']; + + $del1 = $db->query("DELETE FROM bpm_prxnews WHERE pn_id = $pn_id"); + + echo ""; +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/prx_search.php b/admin/prx_search.php new file mode 100755 index 0000000..0b26be2 --- /dev/null +++ b/admin/prx_search.php @@ -0,0 +1,163 @@ +query("SELECT dst_id, bezeichnung, name, str, plz, ort, mail, date_format(gueltig_von, '%d.%m.%Y') gueltig_von_form, date_format(gueltig_bis, '%d.%m.%Y') gueltig_bis_form + , gueltig_von, gueltig_bis, register_dat, init_tan, regmail_status, date_format(regmail_sendedat, '%d.%m.%Y - %H:%i') regmail_sendedat_form + FROM bpm_dienststellen + WHERE register_dat != '0000-00-00 00:00:00' + ORDER BY name ASC"); + }elseif($_GET['search'] == 'unreg'){ + $result1 = $db->query("SELECT dst_id, bezeichnung, name, str, plz, ort, mail, date_format(gueltig_von, '%d.%m.%Y') gueltig_von_form, date_format(gueltig_bis, '%d.%m.%Y') gueltig_bis_form + , gueltig_von, gueltig_bis, register_dat, init_tan, regmail_status, date_format(regmail_sendedat, '%d.%m.%Y - %H:%i') regmail_sendedat_form + FROM bpm_dienststellen + WHERE register_dat = '0000-00-00 00:00:00' + ORDER BY name ASC"); + }else{ + + $result1 = $db->query("SELECT dst_id, bezeichnung, name, str, plz, ort, mail, date_format(gueltig_von, '%d.%m.%Y') gueltig_von_form, date_format(gueltig_bis, '%d.%m.%Y') gueltig_bis_form + , gueltig_von, gueltig_bis, register_dat, init_tan, regmail_status, date_format(regmail_sendedat, '%d.%m.%Y - %H:%i') regmail_sendedat_form + FROM bpm_dienststellen + WHERE upper(name) LIKE '%" . strtoupper($_GET['search']) . "%' + OR plz LIKE '%" . $_GET['search'] . "%' + OR bezeichnung LIKE '%" . $_GET['search'] . "%' + ORDER BY name ASC"); + } +echo " + + + + + + + + + + + + + + + + +"; + + while($row = $result1->fetch_array()) + { + if($row['gueltig_von'] != '0000-00-00'){ + $gueltig_von = $row['gueltig_von_form']; + }else{ + $gueltig_von = ''; + } + + if($row['gueltig_bis'] != '0000-00-00'){ + $gueltig_bis = $row['gueltig_bis_form']; + }else{ + $gueltig_bis = ''; + } + + if($row['register_dat'] == '0000-00-00 00:00:00'){ + $tan = $row['init_tan']; + $id_url = cryption($row['dst_id'], 'e'); + $link_register = "Registrierungslink"; + $status = ""; + + }else{ + $tan = ""; + $link_register = ""; + } + if ($row['regmail_status'] == 'V') { + $status = "Versendet
$row[regmail_sendedat_form]"; + } + if ($row['regmail_status'] == 'F') { + $status = "Fehler"; + } + + + + $lnnr++; + echo ''; + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + echo ''; + } +echo "
+ # + + Behördenart + + Name + + Straße + + PLZ + + Ort + + Mailadresse + + Registrierungstan + + Registrierungslink + + Registrierungsmail + + Gültig von + + Gültig bis + + Edit +
'; + echo $lnnr; + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['bezeichnung']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['name']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['str']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['plz']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['ort']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $row['mail']); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $tan); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $link_register); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $status); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $gueltig_von); + echo ''; + echo preg_replace('/(' . $_GET['search'] . ')/Usi', '\\1', $gueltig_bis); + echo ''; + echo ''; + echo '
"; +?> diff --git a/admin/rangliste1.php b/admin/rangliste1.php new file mode 100755 index 0000000..9316ee3 --- /dev/null +++ b/admin/rangliste1.php @@ -0,0 +1,82 @@ +query($query_punkte) or die("Cannot execute punkte"); + $row_cnt_punkte = $result_punkte->num_rows; + $smarty->assign('anz_punkte', $row_cnt_punkte); + while ($row_punkte = $result_punkte->fetch_array()) + { + $row_punkte['hzb_form'] = number_format($row_punkte['hzb'], 2, ',', '.'); + $row_punkte['hzb_punkte_form'] = number_format($row_punkte['hzb_punkte'], 2, ',', '.'); + $table_punkte[] = $row_punkte; + } + $smarty->assign('table_punkte', $table_punkte); + + + # Wann wurden die Ranglisten berechnet + $query_tab_created = $db->query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + $smarty->assign('create_time', $row_tab_created['create_time']); + + # Gespeicherte Werte + $query1 = "SELECT ka_id + , vorname + , nachname + , hzb + , id + , mail + , rang1 + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang1 ASC + "; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + $row_cnt = $result1->num_rows; + $smarty->assign('dokverw_anzdb', $row_cnt); + + while ($row1 = $result1->fetch_array()) + { + $row1['hzb_form'] = number_format($row1['hzb'], 2, ',', '.'); + $row1['rangliste'] = $row1['rang1']; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/rangliste1_excel.php b/admin/rangliste1_excel.php new file mode 100755 index 0000000..4aacee9 --- /dev/null +++ b/admin/rangliste1_excel.php @@ -0,0 +1,99 @@ +getActiveSheet()->getPageSetup()->setFitToWidth(1); +#$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0); +$activeSheet = $spreadsheet->getActiveSheet(); + +$activeSheet->getStyle('A1:F2') + ->applyFromArray(array( + 'font' => array( + 'bold' => true + ) +)); + + # Wann wurden die Ranglisten berechnet + $query_tab_created = $db->query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + +$activeSheet->setCellValue('A1', 'Stand:'); +$activeSheet->setCellValue('B1', "$row_tab_created[create_time]"); +$activeSheet->setCellValue('A2', 'Ranglistenplatz'); +$activeSheet->setCellValue('B2', 'Vorname'); +$activeSheet->setCellValue('C2', 'Nachname'); +$activeSheet->setCellValue('D2', 'Mail'); +$activeSheet->setCellValue('E2', 'ID'); +$activeSheet->setCellValue('F2', 'HZB-Note'); +$activeSheet->freezePane('A3'); + +$query = $db->query("SELECT ka_id + , vorname + , nachname + , hzb + , id + , mail + , rang1 + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang1 ASC + "); + +if ($query->num_rows > 0) +{ + $i = 3; + + while ($row = $query->fetch_assoc()) + { + + $activeSheet->setCellValue('A' . $i, $row['rang1']); + $activeSheet->setCellValue('B' . $i, $row['nachname']); + $activeSheet->setCellValue('C' . $i, $row['vorname']); + $activeSheet->setCellValue('D' . $i, $row['mail']); + $activeSheet->setCellValue('E' . $i, $row['id']); + $activeSheet->setCellValue('F' . $i, $row['hzb']); + $i++; + } + +} +$spreadsheet->getActiveSheet() + ->setTitle("Rangliste 1"); +$spreadsheet->getActiveSheet() + ->setSelectedCell('A1'); +$spreadsheet->getActiveSheet() + ->getColumnDimension('A') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('B') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('C') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('D') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('E') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('F') + ->setAutoSize(true); + +$writer = new Xlsx($spreadsheet); +$filename = 'Rangliste1.xlsx'; + +header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); +header('Content-Disposition: attachment;filename=' . $filename); +header('Cache-Control: max-age=0'); +$writer->save('php://output'); + +?> \ No newline at end of file diff --git a/admin/rangliste2.php b/admin/rangliste2.php new file mode 100755 index 0000000..d9f8456 --- /dev/null +++ b/admin/rangliste2.php @@ -0,0 +1,66 @@ +query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + $smarty->assign('create_time', $row_tab_created['create_time']); + + # Gespeicherte Werte + $query1 = "SELECT ka_id + , vorname + , nachname + , date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum + , CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' + END as tm_standort + , testergebnis + , id + , mail + , rang2 + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang2 ASC + "; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + $row_cnt = $result1->num_rows; + $smarty->assign('dokverw_anzdb', $row_cnt); + + while ($row1 = $result1->fetch_array()) + { + $row1['rangliste'] = $row1['rang2']; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/rangliste2_excel.php b/admin/rangliste2_excel.php new file mode 100755 index 0000000..5c589c4 --- /dev/null +++ b/admin/rangliste2_excel.php @@ -0,0 +1,105 @@ +getActiveSheet()->getPageSetup()->setFitToWidth(1); +#$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0); +$activeSheet = $spreadsheet->getActiveSheet(); + +$activeSheet->getStyle('A1:G2') + ->applyFromArray(array( + 'font' => array( + 'bold' => true + ) +)); + + # Wann wurden die Ranglisten berechnet + $query_tab_created = $db->query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + +$activeSheet->setCellValue('A1', 'Stand:'); +$activeSheet->setCellValue('B1', "$row_tab_created[create_time]"); +$activeSheet->setCellValue('A2', 'Ranglistenplatz'); +$activeSheet->setCellValue('B2', 'Vorname'); +$activeSheet->setCellValue('C2', 'Nachname'); +$activeSheet->setCellValue('D2', 'Mail'); +$activeSheet->setCellValue('E2', 'ID'); +$activeSheet->setCellValue('F2', 'Testdatum'); +$activeSheet->setCellValue('G2', 'Ergebnis'); +$activeSheet->freezePane('A3'); + +$query = $db->query("SELECT ka_id, vorname, nachname, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' END as tm_standort + , testergebnis + , id + , mail + ,rang2 + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang2 ASC + "); + +if ($query->num_rows > 0) +{ + $i = 3; + + while ($row = $query->fetch_assoc()) + { + + $activeSheet->setCellValue('A' . $i, $row['rang2']); + $activeSheet->setCellValue('B' . $i, $row['nachname']); + $activeSheet->setCellValue('C' . $i, $row['vorname']); + $activeSheet->setCellValue('D' . $i, $row['mail']); + $activeSheet->setCellValue('E' . $i, $row['id']); + $activeSheet->setCellValue('F' . $i, "$row[tm_datum] ($row[tm_standort])"); + $activeSheet->setCellValue('G' . $i, $row['testergebnis']); + $i++; + } + +} +$spreadsheet->getActiveSheet() + ->setTitle("Rangliste 2"); +$spreadsheet->getActiveSheet() + ->setSelectedCell('A1'); +$spreadsheet->getActiveSheet() + ->getColumnDimension('A') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('B') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('C') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('D') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('E') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('F') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('G') + ->setAutoSize(true); + +$writer = new Xlsx($spreadsheet); +$filename = 'Rangliste2.xlsx'; + +header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); +header('Content-Disposition: attachment;filename=' . $filename); +header('Cache-Control: max-age=0'); +$writer->save('php://output'); + +?> \ No newline at end of file diff --git a/admin/rangliste3.php b/admin/rangliste3.php new file mode 100755 index 0000000..c42cb9e --- /dev/null +++ b/admin/rangliste3.php @@ -0,0 +1,72 @@ +query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + $smarty->assign('create_time', $row_tab_created['create_time']); + + # Gespeicherte Werte + $query1 = "SELECT ka_id + , vorname + , nachname, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum + , CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' + END as tm_standort + , testergebnis + , id + , mail + , hzb + , testergebnis + , rang1 + , rang2 + , rang3 + , (rang1+rang2)/2 rang3_berech + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang3 ASC + "; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + $row_cnt = $result1->num_rows; + $smarty->assign('dokverw_anzdb', $row_cnt); + + while ($row1 = $result1->fetch_array()) + { + $row1['hzb_form'] = number_format($row1['hzb'], 2, ',', '.'); + $row1['rang3_berech_form'] = number_format($row1['rang3_berech'], 2, ',', '.'); + $row1['rangliste'] = $row1['rang3']; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/rangliste3_excel.php b/admin/rangliste3_excel.php new file mode 100755 index 0000000..469fa78 --- /dev/null +++ b/admin/rangliste3_excel.php @@ -0,0 +1,130 @@ +getActiveSheet()->getPageSetup()->setFitToWidth(1); +#$spreadsheet->getActiveSheet()->getPageSetup()->setFitToHeight(0); +$activeSheet = $spreadsheet->getActiveSheet(); + +$activeSheet->getStyle('A1:J2') + ->applyFromArray(array( + 'font' => array( + 'bold' => true + ) +)); + + # Wann wurden die Ranglisten berechnet + $query_tab_created = $db->query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time + FROM INFORMATION_SCHEMA.TABLES + WHERE table_schema = 'bpm' + AND table_name = 'bpm_tmp_jahrgang_kandidat' + "); + $row_tab_created = $query_tab_created->fetch_array(); + +$activeSheet->setCellValue('A1', 'Stand:'); +$activeSheet->setCellValue('B1', "$row_tab_created[create_time]"); +$activeSheet->setCellValue('A2', 'Ranglistenplatz'); +$activeSheet->setCellValue('B2', 'Vorname'); +$activeSheet->setCellValue('C2', 'Nachname'); +$activeSheet->setCellValue('D2', 'Mail'); +$activeSheet->setCellValue('E2', 'ID'); +$activeSheet->setCellValue('F2', 'HZB'); +$activeSheet->setCellValue('G2', 'Rangliste1'); +$activeSheet->setCellValue('H2', 'Testergebnis'); +$activeSheet->setCellValue('I2', 'Rangliste2'); +$activeSheet->setCellValue('J2', 'Berechnung Rangliste3'); +$activeSheet->freezePane('A3'); + +$query = $db->query("SELECT ka_id + , vorname + , nachname + , date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum + , CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' + END as tm_standort + , testergebnis + , id + , mail + , hzb + , testergebnis + , rang1 + , rang2 + , rang3 + , (rang1+rang2)/2 rang3_berech + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang3 ASC + "); + +if ($query->num_rows > 0) +{ + $i = 3; + + while ($row = $query->fetch_assoc()) + { + + $activeSheet->setCellValue('A' . $i, "$row[rang3]"); + $activeSheet->setCellValue('B' . $i, "$row[nachname]"); + $activeSheet->setCellValue('C' . $i, "$row[vorname]"); + $activeSheet->setCellValue('D' . $i, "$row[mail]"); + $activeSheet->setCellValue('E' . $i, "$row[id]"); + $activeSheet->setCellValue('F' . $i, "$row[hzb]"); + $activeSheet->setCellValue('G' . $i, "$row[rang1]"); + $activeSheet->setCellValue('H' . $i, "$row[testergebnis]"); + $activeSheet->setCellValue('I' . $i, "$row[rang2]"); + $activeSheet->setCellValue('J' . $i, '=(G' . $i . '+I' . $i . ')/2'); + $i++; + } + +} +$spreadsheet->getActiveSheet() + ->setTitle("Rangliste 3"); +$spreadsheet->getActiveSheet() + ->setSelectedCell('A1'); +$spreadsheet->getActiveSheet() + ->getColumnDimension('A') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('B') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('C') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('D') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('E') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('F') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('G') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('H') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('I') + ->setAutoSize(true); +$spreadsheet->getActiveSheet() + ->getColumnDimension('J') + ->setAutoSize(true); + +$writer = new Xlsx($spreadsheet); +$filename = 'Rangliste3.xlsx'; + +header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); +header('Content-Disposition: attachment;filename=' . $filename); +header('Cache-Control: max-age=0'); +$writer->save('php://output'); + +?> diff --git a/admin/rangliste_prepare.php b/admin/rangliste_prepare.php new file mode 100755 index 0000000..7ed0c51 --- /dev/null +++ b/admin/rangliste_prepare.php @@ -0,0 +1,266 @@ +query("SET lc_time_names = 'de_DE';"); + + $query1 = "SELECT ausbildungsbeginn + FROM bpm_stichtage + ORDER BY ausbildungsbeginn ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) + { + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'ausgabe') +{ + # Berechnung der Personen, fr die eine Rangliste erzeugt wird + # 1) Personen Selektieren, die zum ausgewhlten Jahrgang gehren + # 2) Personen, die keine HZB Note abgegeben haben lschen + # 3) Personen lschen, die sich nicht beworben haben (Dokumente nicht abschlieend hochgeladen haben beim Bewerbungsverfahren) + # 4) ausgeschlossene Personen lschen + # Berechnung der Ranglistenpltze 1-3 + + + # 1) Personen des Jahrgangs selektieren + $ausbildungsbeginn = $_POST['ausbildungsbeginn']; + + # Performance erhhen, commit erst am Ende absetzen + $db->autocommit(false); + + # Drop Table, damit das create Datum ausgelesen werden kann in den Ranglisten + $sql1 = $db->query("DROP TABLE bpm_tmp_jahrgang_kandidat"); + $sql1 = $db->query("CREATE TABLE `bpm_tmp_jahrgang_kandidat` ( + `tjk_id` int(11) NOT NULL, + `ka_id` int(11) NOT NULL, + `vorname` varchar(250) NOT NULL, + `nachname` varchar(250) NOT NULL, + `id` varchar(200) NOT NULL, + `mail` varchar(250) NOT NULL, + `ausbildungsbeginn` int(4) NOT NULL, + `hzb` decimal(10,2) NOT NULL, + `tm_datum` datetime DEFAULT NULL, + `tm_standort` enum('K','L') NOT NULL, + `testergebnis` int(5) NOT NULL COMMENT 'Nur bestandene Tests', + `rang1` int(11) NOT NULL, + `rang2` int(11) NOT NULL, + `rang3` int(11) NOT NULL + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"); + $sql1 = $db->query("ALTER TABLE `bpm_tmp_jahrgang_kandidat` ADD PRIMARY KEY (`tjk_id`);"); + $sql1 = $db->query("ALTER TABLE `bpm_tmp_jahrgang_kandidat` MODIFY `tjk_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;"); + + $query = "SELECT ka_id, vorname, nachname,id, mail + FROM bpm_kandidat + where upper(nachname) not like '%TEST%' + ORDER BY nachname ASC, vorname ASC + "; + + $result = $db->query($query) or die("Cannot execute query"); + + while ($row = $result->fetch_array()) + { + + # Prfung der Testgltigkeit: 1) Wann hat der Kandidat den Test gemacht + $query_bpmtesttg = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_term_kand a, bpm_termine b, bpm_kandidat c + WHERE a.tm_id = b.tm_id + AND a.ka_id = c.ka_id + AND upper(c.id) = '$row[id]' + ORDER BY tk_id desc + LIMIT 1 + "); + $row_bpmtesttg = $query_bpmtesttg->fetch_array(); + + # Prfung der Testgltigkeit: 2) Fr welchen Ausbildungsbeginn(/Semester) gilt der Test + $query_bpmausbb = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE beginn <= '$row_bpmtesttg[tm_datum]' + AND ende >= '$row_bpmtesttg[tm_datum]' + LIMIT 1 + "); + $row_bpmausbb = $query_bpmausbb->fetch_array(); + + if ($row_bpmausbb['ausbildungsbeginn'] == $ausbildungsbeginn) + { + $nachname = addslashes(trim($row['nachname'])); + $vorname = addslashes(trim($row['vorname'])); + + $query_bpmnote = $db->query("SELECT hzb + FROM bpm_note + WHERE ka_id = '$row[ka_id]' + ORDER BY no_id desc + LIMIT 1 + "); + $row_bpmanote = $query_bpmnote->fetch_array(); + $hzb = $row_bpmanote['hzb']; + + $query_bpmerg = $db->query("SELECT summe, bestanden, tm_datum, tm_standort + FROM bpm_ergebnisse a, bpm_tanpool b, bpm_term_kand c, bpm_termine d + WHERE a.tan=b.tan + AND b.tp_id=c.tp_id + AND c.tm_id=d.tm_id + AND a.ka_id = '$row[ka_id]' + ORDER BY eg_id DESC + Limit 1 + "); + $row_bpmerg = $query_bpmerg->fetch_array(); + $summe = $row_bpmerg['summe']; + $tm_datum = $row_bpmerg['tm_datum']; + $tm_standort = $row_bpmerg['tm_standort']; + + if ($row_bpmerg['bestanden'] == 1) + { + # Nur wenn der Test bestanden wurde hinzufgen + $sql1 = $db->query("insert into bpm_tmp_jahrgang_kandidat (ka_id, vorname, nachname, id, mail, ausbildungsbeginn, hzb, tm_datum, tm_standort, testergebnis) VALUES('$row[ka_id]', '$vorname', '$nachname', '$row[id]', '$row[mail]', '$ausbildungsbeginn', '$hzb', '$tm_datum', '$tm_standort', '$summe')"); + } + } + } + + # 2) Personen ohne HZB lschen + $sql1 = $db->query("DELETE FROM bpm_tmp_jahrgang_kandidat WHERE hzb='0.00'"); + $sql1 = $db->query("DELETE FROM bpm_tmp_jahrgang_kandidat WHERE ka_id NOT IN (SELECT ka_id FROM bpm_ergebnisse)"); + + # 3) Personen ohne vollstndige Bewerbung lschen + $sql1 = $db->query("DELETE FROM bpm_tmp_jahrgang_kandidat WHERE ka_id in (SELECT ka_id FROM bpm_upload WHERE upload_dat='0000-00-00 00:00:00')"); + $sql1 = $db->query("DELETE FROM bpm_tmp_jahrgang_kandidat WHERE ka_id NOT IN (SELECT ka_id FROM bpm_upload)"); + + # 4) Ausgeschlossene Personen lschen + $sql1 = $db->query("DELETE FROM bpm_tmp_jahrgang_kandidat WHERE ka_id in (select ka_id from bpm_ausgeschlossene_kandidaten)"); + + # Rnge berechnen + # Rangliste1 + $query1 = "SELECT ka_id, vorname, nachname + , hzb + , id + , mail + FROM bpm_tmp_jahrgang_kandidat + ORDER BY hzb ASC, nachname ASC, vorname ASC + "; + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $rangliste1 = 0; + $lfd_nr2_1 = 0; + $lfd_nr3_1 = 0; + $hzbvorher = 0; + + while ($row1 = $result1->fetch_array()) + { + + $lfd_nr2_1++; + + $hzb = $row1['hzb']; + if ($hzb == $hzbvorher) + { + $rangliste1 = $lfd_nr3_1; + } + else + { + $rangliste1 = $lfd_nr2_1; + $lfd_nr3_1 = $lfd_nr2_1; + } + $hzbvorher = $row1['hzb']; + $sql1 = $db->query("UPDATE bpm_tmp_jahrgang_kandidat SET rang1='$rangliste1' WHERE ka_id=$row1[ka_id]"); + } + + # Rangliste2 + $query2 = "SELECT ka_id, vorname, nachname, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, CASE tm_standort + WHEN 'L' THEN 'Ludwigsburg' + WHEN 'K' THEN 'Kehl' + ELSE '' END as tm_standort + , testergebnis + , id + , mail + FROM bpm_tmp_jahrgang_kandidat + ORDER BY testergebnis DESC, nachname ASC, vorname ASC + "; + + $result2 = $db->query($query2) or die("Cannot execute query2"); + + $rangliste2 = 0; + $lfd_nr2_2 = 0; + $lfd_nr3_2 = 0; + $testergebnisvorher = 0; + + while ($row2 = $result2->fetch_array()) + { + + $lfd_nr2_2++; + + $testergebnis = $row2['testergebnis']; + if ($testergebnis == $testergebnisvorher) + { + $rangliste2 = $lfd_nr3_2; + } + else + { + $rangliste2 = $lfd_nr2_2; + $lfd_nr3_2 = $lfd_nr2_2; + } + $testergebnisvorher = $row2['testergebnis']; + + $sql1 = $db->query("UPDATE bpm_tmp_jahrgang_kandidat SET rang2='$rangliste2' WHERE ka_id=$row2[ka_id]"); + } + $smarty->assign('table_data1', $table_data1); + + # Rangliste3 + $query3 = "SELECT ka_id, (rang1+rang2)/2 rang3 + FROM bpm_tmp_jahrgang_kandidat + ORDER BY rang3 ASC, nachname ASC, vorname ASC + "; + $result3 = $db->query($query3) or die("Cannot execute query3"); + + $rangliste3 = 0; + $lfd_nr2_3 = 0; + $lfd_nr3_3 = 0; + $rang3vorher = 0; + + while ($row3 = $result3->fetch_array()) + { + + $lfd_nr2_3++; + + $rang3 = $row3['rang3']; + if ($rang3 == $rang3vorher) + { + $rangliste3 = $lfd_nr3_3; + } + else + { + $rangliste3 = $lfd_nr2_3; + $lfd_nr3_3 = $lfd_nr2_3; + } + $rang3vorher = $row3['rang3']; + $sql1 = $db->query("UPDATE bpm_tmp_jahrgang_kandidat SET rang3='$rangliste3' WHERE ka_id=$row3[ka_id]"); + } + + $db->autocommit(true); +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/admin/save_hs.php b/admin/save_hs.php new file mode 100755 index 0000000..09d1b14 --- /dev/null +++ b/admin/save_hs.php @@ -0,0 +1,56 @@ +query("UPDATE bpm_kandidat + SET hochschule = '$resp_hs' + WHERE ka_id = '$ka_id'"); + } + + if($art == 'W'){ + #Wunsch Hochschule + $result_countid = $db->query("SELECT count(*) Anz + FROM bpm_erw_daten + WHERE ka_id = '$ka_id'"); + $row_countid = $result_countid->fetch_array(); + if($resp_hs != ''){ + if($row_countid['Anz'] == 0){ + $sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, wunsch_hs) VALUES ($ka_id, '$resp_hs')"); + }else{ + $sql1 = $db->query("UPDATE bpm_erw_daten + SET wunsch_hs = '$resp_hs' + WHERE ka_id = '$ka_id'"); + } + } + } + + if($art == 'Z'){ + #zugewiesene Hochschule + $result_countid = $db->query("SELECT count(*) Anz + FROM bpm_erw_daten + WHERE ka_id = '$ka_id'"); + $row_countid = $result_countid->fetch_array(); + if($resp_hs != ''){ + if($row_countid['Anz'] == 0){ + $sql1 = $db->query("INSERT INTO bpm_erw_daten (ka_id, zugewiesene_hs) VALUES ($ka_id, '$resp_hs')"); + }else{ + $sql1 = $db->query("UPDATE bpm_erw_daten + SET zugewiesene_hs = '$resp_hs' + WHERE ka_id = '$ka_id'"); + } + } + } + + exit; + +?> + diff --git a/admin/save_note.php b/admin/save_note.php new file mode 100755 index 0000000..e6b2a4b --- /dev/null +++ b/admin/save_note.php @@ -0,0 +1,88 @@ +query("SELECT count(*) Anz + FROM bpm_note + WHERE ka_id = $ka_id"); + $row_anz = $query_anz->fetch_array(); + if($row_anz['Anz'] == 0){ + #Insert + $sql1 = $db->query("INSERT INTO bpm_note (ka_id, hzb, hzb_punkte, zeugnisschnitt, zeugnisschnitt_punkte, erfdat_hzb, erfdat_schnitt) VALUES('$ka_id', '$hzbnote', '$hzbpunkte', '$durchschnittnote', '$durchschnittpunkte', '$erfdat_hzb', '$erfdat_schnitt')"); + }else{ + #Update + $sql1 = $db->query("UPDATE bpm_note + SET hzb = '$hzbnote' + ,hzb_punkte = '$hzbpunkte' + ,zeugnisschnitt = '$durchschnittnote' + ,zeugnisschnitt_punkte = '$durchschnittpunkte' + ,erfdat_hzb = '$erfdat_hzb' + ,erfdat_schnitt = '$erfdat_schnitt' + WHERE ka_id = '$ka_id'"); + } + + + + exit; + +?> + diff --git a/admin/tanimport.php b/admin/tanimport.php new file mode 100755 index 0000000..b629540 --- /dev/null +++ b/admin/tanimport.php @@ -0,0 +1,274 @@ + Semikolon +// oder $trennzeichen_excel = ","; --> Komma +############################################################# + + + + +$_SESSION["ck_verz"] = $verz; + + +if ($action == '') { + # Den Testtermin wählt man, damit jede Hochschule seine eigenen Daten importieren kann. Wenn eine Hochschule am selben TAg einen Test hat vermeidet man dass ein halbfertiger Test importiert wird + if (isset($_POST["testtermin"])) { + $testtermin = $_POST["testtermin"]; + } else { + $testtermin = $_SESSION["testtermin"]; + } + + $_SESSION["testtermin"] = $testtermin; + + + # Uploadverzeichnis aufräumen. Temporäre Dateien, die älter als 2 Wochen sind, werden gelöscht + $dir = $_SERVER["DOCUMENT_ROOT"].dirname($_SERVER['PHP_SELF'])."/$verz"; + $folder = dir($dir); + while ($dateiname = $folder->read()) { + if (filetype($dir.$dateiname) != "dir") { + if (strtotime("-2 weeks") > + @filemtime($dir.$dateiname)) { + if (@unlink($dir.$dateiname) != false){ + # echo $dateiname.' wurde gelöscht
'; + }else{ + # echo $dateiname.' konnte nichtgelöscht werden
'; + } + } + } + } + + $result_ct = $db->query("SELECT count(*) Anz FROM bpm_tanpool where verw_dat = '0000-00-00 00:00:00'"); + $row_ct = $result_ct->fetch_array(); + $smarty->assign('tanimp_anzahltan', "$row_ct[Anz]"); + + # Fehler beim Upload anzeigen + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es dürfen nur CSV Dateien hochgeladen werden."); + } + if ($errorno == 2) { + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $smarty->assign('index_error_text', "Die Datei ist zu groß. Die Dateigröße darf max. $size_mb MB betragen."); + } + if ($errorno == 3) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde vom Server gelöscht"); + } + if ($errorno == 4) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde nicht vom Server gelöscht"); + } + } +} + +if ($action == 'csvimp') { + + $testtermin = $_SESSION["testtermin"]; + + // http://www.tutorials.de/tutorials65420.html + #echo '

', print_r($_POST, true), '
'; + + $tempname = $_FILES['file']['tmp_name']; + $name = $_FILES['file']['name']; + + $type = $_FILES['file']['type']; + $size = $_FILES['file']['size']; + $einheit = "Byte"; // Für die Efolgsmeldung. + + $limitedext = array( + ".csv" + ); //Erlaubte Dateieindung beim Upload + + $extlimit = "yes"; //Do you want to limit the extensions of files uploaded + $ext = strrchr($name, '.'); + + if (($extlimit == "yes") && (!in_array($ext, $limitedext))) { + echo ""; + exit; + } + + + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $size_bt = $size_mb * 1024 * 1024; + + if ($size > $size_bt) { + echo ""; + exit; + } + + + $name = str_replace(array( + "ä", + "ö", + "ü", + "ß", + "Ä", + "Ö", + "Ü", + " " + ), array( + "ae", + "oe", + "ue", + "ss", + "Ae", + "Oe", + "Ue", + "_" + ), $name); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $heuteformat = date("H-i-s_Y-m-d", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $neu = $heuteformat . "_" . $name; + $_SESSION["ck_neu"] = $neu; + move_uploaded_file("$tempname", "$verz$neu"); // Unterverzeichnisse wie folgt: copy("$tempname", "pdf/$neu"); + + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + + # Hier vor der Schleife erste Zeile holen und ignorieren. Enthält Überschrift + # fgetcsv($handle, 0, $trennzeichen_excel); + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + $tan = $data[1]; + $tinyurl = $data[2]; + + $row1['zaehler'] = $zaehler; + $row1['tan'] = $tan; + $row1['tinyurl'] = $tinyurl; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + fclose($handle); + +} + +if ($action == 'csvimp2') { + $neu = $_SESSION["ck_neu"]; //CSV-Dateinamen um Datei löschen zu können + $verz = $_SESSION["ck_verz"]; //Uploadverzeichnis aus Cookie holen + $testtermin = $_SESSION["testtermin"]; + + + if ($_POST['import'] == "0") // DS sollen nicht importiert werden + { + $dateiname = "$verz$neu"; + if (@unlink($dateiname)) // Funktion löscht Dateien und gibt true / false zurück + { + # Abbruch, datei gelöscht + echo ""; + exit; + } else { + # Abbruch, datei nicht gelöscht + echo ""; + exit; + } // End if + + } elseif ($_POST['import'] == "1") // DS sollen importiert werden + { + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + + $dummy_name = 'Testuser-bpm'; + $dummy_vorname = $data[0]; + $tan = $data[1]; + $tinyurl = $data[2]; + + $result_ct = $db->query("SELECT count(*) Anz + FROM bpm_tanpool + WHERE tan = '$tan'"); + $row_ct = $result_ct->fetch_array(); + + if ($row_ct['Anz'] == 0) { + # keine TANs vorhanden, insert + + $sql1 = $db->query("insert into bpm_tanpool (dummy_name + , dummy_vorname + , tan + , tinyurl + , aktiv) + VALUES ( '$dummy_name' + , '$dummy_vorname' + , '$tan' + , '$tinyurl' + , 'A' + )"); + if (!$sql1) { + $hinweis['hinweis'] = "TAN: " . $tan . " Fehler: TAN nicht gespeichert
"; + $smarty->assign('index_error', 1); + } + } else { + # Ergebnisse gibt es schon, kein insert + $hinweis['hinweis'] = "TAN: " . $tan . " schon vorhanden
"; + $smarty->assign('index_error', 1); + } + + $table_data2[] = $hinweis; + } + $smarty->assign('table_data2', $table_data2); + + + fclose($handle); + + } else { // Es wurde kein Radiobutton gewählt! Technisch aber ausgeschlossen + + echo "sie müssen eine Auswahl treffen"; + + } + + function deleteFiles($verz) + { + $handle = opendir($verz); + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + + $datei = $verz . $file; + + if (@unlink($datei)) { + $error = TRUE; + } else { + $error = FALSE; + } + } + } + closedir($handle); + return $error; + } + + deleteFiles($verz); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären + +} // ende Action + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/admin/termine.php b/admin/termine.php new file mode 100755 index 0000000..e41a098 --- /dev/null +++ b/admin/termine.php @@ -0,0 +1,404 @@ +assign('termine_error', 1); + + $smarty->assign('termine_value_datum', $_SESSION["termine_value_tm_datum"]); + $smarty->assign('termine_value_zeit', $_SESSION["termine_value_tm_zeit"]); + $smarty->assign('termine_value_tm_standort', $_SESSION["termine_value_tm_standort"]); + $smarty->assign('termine_value_tm_plaetze', $_SESSION["termine_value_tm_plaetze"]); + $smarty->assign('termine_value_tm_raum', $_SESSION["termine_value_tm_raum"]); + $smarty->assign('termine_value_tm_referenznr', $_SESSION["termine_value_tm_referenznr"]); + + if ($errorno == 3) { + # ungültiges Datum + $smarty->assign('termine_error_text', "Das eingegebene Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + } + + # --- Wenn Werte editiert werden ------------ + if ($_SESSION["termine_status"] == 'edit') { + $result_edit = $db->query("SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM bpm_termine + WHERE tm_id = $tm_id"); + $row_edit = $result_edit->fetch_array(); + $smarty->assign('termine_value_datum', "$row_edit[datum]"); + $smarty->assign('termine_value_zeit', "$row_edit[zeit]"); + $smarty->assign('termine_value_tm_standort', "$row_edit[tm_standort]"); + $smarty->assign('termine_value_tm_plaetze', "$row_edit[tm_plaetze]"); + $smarty->assign('termine_value_tm_raum', "$row_edit[tm_raum]"); + $smarty->assign('termine_value_tm_referenznr', "$row_edit[tm_referenznr]"); + + } + # --- Wenn Werte editiert werden Ende ------- + + if ($_GET['editende'] == 1) { + # Editieren ist beendet, als ein update auf einen Datensatz. Dann ist der status wieder Neu, damit wird wieder ein Insert durchgeführt + $_SESSION["termine_status"] = 'neu'; + } + + + # Gespeicherte Werte + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM bpm_termine + WHERE tm_datum > DATE_SUB( NOW() , INTERVAL 30 DAY ) + ORDER BY tm_datum ASC, zeit ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz != $row1['tm_plaetze']){ + $disable = 0; + }else{ + $disable = 1; + } + $row1['restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $row1['standort_form'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + + +if ($action == 'save') { + +$tm_datum = $_POST['tm_datum']; +$tm_zeit = $_POST['tm_zeit']; +$tm_plaetze = $_POST['tm_plaetze']; +$tm_standort = $_POST['tm_standort']; +$tm_raum = $_POST['tm_raum']; +$tm_referenznr = trim($_POST['tm_referenznr']); + + +$_SESSION["termine_value_tm_datum"] = $tm_datum; +$_SESSION["termine_value_tm_zeit"] = $tm_zeit; +$_SESSION["termine_value_tm_plaetze"] = $tm_plaetze; +$_SESSION["termine_value_tm_standort"] = $tm_standort; +$_SESSION["termine_value_tm_raum"] = $tm_raum; +$_SESSION["termine_value_tm_referenznr"] = $tm_referenznr; + +$tm_datum_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $tm_datum); +$testdatum = $tm_datum_form." ".$tm_zeit.":00"; +$_SESSION["termine_value_tm_testdatum"] = $testdatum; +function validateDate($date, $format = 'Y-m-d') +{ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; +} + +if(!validateDate($tm_datum_form)){ + echo ""; + exit; +} + + + #$datum = date("Y-m-d H:i:s"); + if ($_SESSION["termine_status"] == 'neu') { + $sql1 = $db->query("INSERT INTO bpm_termine ( tm_datum + , tm_standort + , tm_plaetze + , tm_raum + , tm_referenznr + ) + VALUES + ( '$testdatum' + , '$tm_standort' + , '$tm_plaetze' + , '$tm_raum' + , '$tm_referenznr' + ) + "); + } + + if ($_SESSION["termine_status"] == 'edit') { + $tm_id = $_SESSION["termine_tm_id"]; + + # Prüfen, ob zu diesem Termin bereits Kandidaten gebucht sind. Wenn ja, dann Weiterleitung zum Mailanschreiben und dann Termin ändern + $result_vorh = $db->query("SELECT count(*) Anz + FROM bpm_term_kand + WHERE tm_id ='$tm_id' + "); + $row_vorh = $result_vorh->fetch_array(); + + # Prüfen, ob der Kandidat angeschrieben werden muss. Nur bei einer Änderung der Anzahl muss der Kandidat nicht extra informiert werden + $result_vorh1 = $db->query("SELECT count(*) Anz + FROM bpm_termine + WHERE tm_id ='$tm_id' + AND (tm_datum != '$testdatum' + OR tm_standort != '$tm_standort' + OR tm_raum != '$tm_raum' + OR tm_referenznr != '$tm_referenznr' + ) + "); + $row_vorh1 = $result_vorh1->fetch_array(); + if($row_vorh['Anz'] != 0 AND $row_vorh1['Anz'] != 0){ + echo ""; + exit; + }else{ + $result = $db->query("UPDATE bpm_termine + SET tm_datum = '$testdatum' + , tm_standort = '$tm_standort' + , tm_plaetze = '$tm_plaetze' + , tm_raum = '$tm_raum' + , tm_referenznr = '$tm_referenznr' + WHERE tm_id = $tm_id + "); + + unset($_SESSION['termine_tm_id']); + } + + } + # Dann bekommts beim refresh den status neu, also es wird beim Abschicken ein Insert gemacht + $editende = 1; + echo ""; + + +} +if ($action == 'del') { + $tm_id = $_GET['tm_id']; + + $del1 = $db->query("DELETE FROM bpm_termine WHERE tm_id = $tm_id"); + + echo ""; +} + +if ($action == 'mailterminupdate') { + $tm_id = $_SESSION["termine_tm_id"]; + + # Gespeicherte Werte + $query1 = "SELECT mail + FROM bpm_kandidat + WHERE ka_id IN (SELECT ka_id + FROM bpm_term_kand + WHERE tm_id = $tm_id) + ORDER BY nachname ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $mail .= "$row1[mail], "; + } + $mail_lubu = get_parameter(8); + $mail_kehl = get_parameter(7); + + $mail_an = "$mail_kehl, $mail_lubu"; + $mail_bcc = substr(trim($mail),0,-1); + $smarty->assign('mtupd_mailadressen_an', "$mail_an"); + $smarty->assign('mtupd_mailadressen_bcc', "$mail_bcc"); + +} + +if ($action == 'mailsenden2') { + + $tm_id = $_SESSION["termine_tm_id"]; + $tm_plaetze = $_SESSION["termine_value_tm_plaetze"]; + $tm_standort = $_SESSION["termine_value_tm_standort"]; + $tm_raum = $_SESSION["termine_value_tm_raum"]; + $tm_referenznr = $_SESSION["termine_value_tm_referenznr"]; + $testdatum = $_SESSION["termine_value_tm_testdatum"]; + $empfaenger_an = $_POST['empfaenger_an']; + $empfaenger_bcc = $_POST['empfaenger_bcc']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + $absender = $_POST['absender']; + + if($absender == 'Kehl'){ + $sendermail = get_parameter(7); + $sender = 'Hochschule Kehl'; + } + + if($absender == 'Ludwigsburg'){ + $sendermail = get_parameter(8); + $sender = 'Hochschule Ludwigsburg'; + } + + # Update + $result = $db->query("UPDATE bpm_termine + SET tm_datum = '$testdatum' + , tm_standort = '$tm_standort' + , tm_plaetze = '$tm_plaetze' + , tm_raum = '$tm_raum' + , tm_referenznr = '$tm_referenznr' + WHERE tm_id = $tm_id + "); + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr FROM bpm_termine WHERE tm_id='$tm_id'"); + $row_termin = $query_termin->fetch_array(); + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + $sendermail = get_parameter(8); + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + $sendermail = get_parameter(7); + } + $text = $text." +
+
+ Neue Daten: +
+ + + + + + + + + + + + + +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+
+ "; + + $query1 = "SELECT mail, ka_id + FROM bpm_kandidat + WHERE ka_id IN (SELECT ka_id + FROM bpm_term_kand + WHERE tm_id = $tm_id) + ORDER BY nachname ASC"; + $result1 = $db->query($query1) or die("Cannot execute query1a $tm_id"); + $lnnr = 0; + while ($row1 = $result1->fetch_array()) { + $mail[$lnnr]['mail'] = "$row1[mail]"; + $mail[$lnnr]['ka_id'] = "$row1[ka_id]"; + $lnnr++; + } + $lfdnr = $lfdnr++; + # Mail auch an die zuständige HS + $mail[$lnnr][mail]= $sendermail; + $mail[$lnnr][ka_id]= ""; + + #echo "
";
+  #print_r($mail);
+  #echo "

"; + #exit; + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #echo "$text
"; + #echo ""; + #$hochschule
"; + #exit; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style =" + + + "; + $text = $style.$text; + + for($i=0;$iquery("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '".$mail[$i][ka_id]."', '".$mail[$i][mail]."', '$betreff', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + }else{ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '".$mail[$i][ka_id]."', '".$mail[$i][mail]."', '$betreff', '$text_db', 'F', '$datum_db') + "); + + $err = 1; + $mail_err .= $mail[$i][mail]."
"; + + } + } + } + + unset($_SESSION['termine_tm_id']); + $editende = 1; + + + if($err == 1){ + $smarty->assign('mail_senderg', "Die Mails konnten nicht verschickt werden!
Prüfen Sie die folgenden Mailadressen:

$mail_err"); + }else{ + $smarty->assign('mail_senderg', "Die Mails wurden verschickt!"); + echo ""; + } +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/termine.php_bcc b/admin/termine.php_bcc new file mode 100755 index 0000000..3747953 --- /dev/null +++ b/admin/termine.php_bcc @@ -0,0 +1,352 @@ +assign('termine_error', 1); + + $smarty->assign('termine_value_datum', $_SESSION["termine_value_tm_datum"]); + $smarty->assign('termine_value_zeit', $_SESSION["termine_value_tm_zeit"]); + $smarty->assign('termine_value_tm_standort', $_SESSION["termine_value_tm_standort"]); + $smarty->assign('termine_value_tm_plaetze', $_SESSION["termine_value_tm_plaetze"]); + $smarty->assign('termine_value_tm_raum', $_SESSION["termine_value_tm_raum"]); + $smarty->assign('termine_value_tm_referenznr', $_SESSION["termine_value_tm_referenznr"]); + + if ($errorno == 3) { + # ungültiges Datum + $smarty->assign('termine_error_text', "Das eingegebene Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + } + + # --- Wenn Werte editiert werden ------------ + if ($_SESSION["termine_status"] == 'edit') { + $result_edit = $db->query("SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM dvm_termine + WHERE tm_id = $tm_id"); + $row_edit = $result_edit->fetch_array(); + $smarty->assign('termine_value_datum', "$row_edit[datum]"); + $smarty->assign('termine_value_zeit', "$row_edit[zeit]"); + $smarty->assign('termine_value_tm_standort', "$row_edit[tm_standort]"); + $smarty->assign('termine_value_tm_plaetze', "$row_edit[tm_plaetze]"); + $smarty->assign('termine_value_tm_raum', "$row_edit[tm_raum]"); + $smarty->assign('termine_value_tm_referenznr', "$row_edit[tm_referenznr]"); + + } + # --- Wenn Werte editiert werden Ende ------- + + if ($_GET['editende'] == 1) { + # Editieren ist beendet, als ein update auf einen Datensatz. Dann ist der status wieder Neu, damit wird wieder ein Insert durchgeführt + $_SESSION["termine_status"] = 'neu'; + } + + + # Gespeicherte Werte + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM dvm_termine + WHERE tm_datum > now() + ORDER BY tm_datum ASC, zeit ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz != $row1['tm_plaetze']){ + $disable = 0; + }else{ + $disable = 1; + } + $row1['restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $row1['standort_form'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + + +if ($action == 'save') { + +$tm_datum = $_POST['tm_datum']; +$tm_zeit = $_POST['tm_zeit']; +$tm_plaetze = $_POST['tm_plaetze']; +$tm_standort = $_POST['tm_standort']; +$tm_raum = $_POST['tm_raum']; +$tm_referenznr = trim($_POST['tm_referenznr']); + + +$_SESSION["termine_value_tm_datum"] = $tm_datum; +$_SESSION["termine_value_tm_zeit"] = $tm_zeit; +$_SESSION["termine_value_tm_plaetze"] = $tm_plaetze; +$_SESSION["termine_value_tm_standort"] = $tm_standort; +$_SESSION["termine_value_tm_raum"] = $tm_raum; +$_SESSION["termine_value_tm_referenznr"] = $tm_referenznr; + +$tm_datum_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $tm_datum); +$testdatum = $tm_datum_form." ".$tm_zeit.":00"; +$_SESSION["termine_value_tm_testdatum"] = $testdatum; +function validateDate($date, $format = 'Y-m-d') +{ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; +} + +if(!validateDate($tm_datum_form)){ + echo ""; + exit; +} + + + #$datum = date("Y-m-d H:i:s"); + if ($_SESSION["termine_status"] == 'neu') { + $sql1 = $db->query("INSERT INTO dvm_termine ( tm_datum + , tm_standort + , tm_plaetze + , tm_raum + , tm_referenznr + ) + VALUES + ( '$testdatum' + , '$tm_standort' + , '$tm_plaetze' + , '$tm_raum' + , '$tm_referenznr' + ) + "); + } + + if ($_SESSION["termine_status"] == 'edit') { + $tm_id = $_SESSION["termine_tm_id"]; + + # Prüfen, ob zu diesem Termin bereits Kandidaten gebucht sind. Wenn ja, dann Weiterleitung zum Mailanschreiben und dann Termin ändern + $result_vorh = $db->query("SELECT count(*) Anz + FROM dvm_term_kand + WHERE tm_id ='$tm_id' + "); + $row_vorh = $result_vorh->fetch_array(); + + # Prüfen, ob der Kandidat angeschrieben werden muss. Nur bei einer Änderung der Anzahl muss der Kandidat nicht extra informiert werden + $result_vorh1 = $db->query("SELECT count(*) Anz + FROM dvm_termine + WHERE tm_id ='$tm_id' + AND (tm_datum != '$testdatum' + OR tm_standort != '$tm_standort' + OR tm_raum != '$tm_raum' + OR tm_referenznr != '$tm_referenznr' + ) + "); + $row_vorh1 = $result_vorh1->fetch_array(); + if($row_vorh['Anz'] != 0 AND $row_vorh1['Anz'] != 0){ + echo ""; + exit; + }else{ + $result = $db->query("UPDATE dvm_termine + SET tm_datum = '$testdatum' + , tm_standort = '$tm_standort' + , tm_plaetze = '$tm_plaetze' + , tm_raum = '$tm_raum' + , tm_referenznr = '$tm_referenznr' + WHERE tm_id = $tm_id + "); + + unset($_SESSION['termine_tm_id']); + } + + } + # Dann bekommts beim refresh den status neu, also es wird beim Abschicken ein Insert gemacht + $editende = 1; + echo ""; + + +} +if ($action == 'del') { + $tm_id = $_GET['tm_id']; + + $del1 = $db->query("DELETE FROM dvm_termine WHERE tm_id = $tm_id"); + + echo ""; +} + +if ($action == 'mailterminupdate') { + $tm_id = $_SESSION["termine_tm_id"]; + + # Gespeicherte Werte + $query1 = "SELECT mail + FROM dvm_kandidat + WHERE ka_id IN (SELECT ka_id + FROM dvm_term_kand + WHERE tm_id = $tm_id) + ORDER BY nachname ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $mail .= "$row1[mail], "; + } + $mail_lubu = get_parameter(8); + $mail_kehl = get_parameter(7); + + $mail_an = "$mail_kehl, $mail_lubu"; + $mail_bcc = substr(trim($mail),0,-1); + $smarty->assign('mtupd_mailadressen_an', "$mail_an"); + $smarty->assign('mtupd_mailadressen_bcc', "$mail_bcc"); + +} + +if ($action == 'mailsenden2') { + + $tm_id = $_SESSION["termine_tm_id"]; + $tm_plaetze = $_SESSION["termine_value_tm_plaetze"]; + $tm_standort = $_SESSION["termine_value_tm_standort"]; + $tm_raum = $_SESSION["termine_value_tm_raum"]; + $tm_referenznr = $_SESSION["termine_value_tm_referenznr"]; + $testdatum = $_SESSION["termine_value_tm_testdatum"]; + $empfaenger_an = $_POST['empfaenger_an']; + $empfaenger_bcc = $_POST['empfaenger_bcc']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + $absender = $_POST['absender']; + + if($absender == 'Kehl'){ + $sendermail = get_parameter(7); + $sender = 'Hochschule Kehl'; + } + + if($absender == 'Ludwigsburg'){ + $sendermail = get_parameter(8); + $sender = 'Hochschule Ludwigsburg'; + } + + # Update + $result = $db->query("UPDATE dvm_termine + SET tm_datum = '$testdatum' + , tm_standort = '$tm_standort' + , tm_plaetze = '$tm_plaetze' + , tm_raum = '$tm_raum' + , tm_referenznr = '$tm_referenznr' + WHERE tm_id = $tm_id + "); + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr FROM dvm_termine WHERE tm_id='$tm_id'"); + $row_termin = $query_termin->fetch_array(); + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + } + $text = $text." +
+
+ Neue Daten:
+ + + + + + + + + + + + + + +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+ "; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
+ #$hochschule
"; + #exit; + + + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $headers .= "Bcc: $empfaenger_bcc\n"; + + $return = @mail($empfaenger_an, $betreff, $text, $headers); + + if ($return) { + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Prüfen Sie die Mailadressen."); + } + + + + + unset($_SESSION['termine_tm_id']); + $editende = 1; + echo ""; +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/termine_kandidat.php b/admin/termine_kandidat.php new file mode 100755 index 0000000..016dc7b --- /dev/null +++ b/admin/termine_kandidat.php @@ -0,0 +1,343 @@ +query("SET lc_time_names = 'de_DE';"); +# Dropdown befüllen übernimmt ajax:fetch.php +# $query1 = "SELECT ka_id, vorname, nachname +# FROM bpm_kandidat +# ORDER BY nachname, vorname"; +# +# $result1 = $db->query($query1) or die("Cannot execute query1a"); +# +# +# while ($row1 = $result1->fetch_array()) { +# $table_data1[] = $row1; +# } +# $smarty->assign('table_data1', $table_data1); + + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('bewerber_error', 1); + if ($errorno == 1) { + $smarty->assign('bewerber_error_text', "Es muss ein Bewerber ausgewählt werden."); + } + + } +} + +if ($action == 'ausgabe') { + if (isset($_POST['user'])) { + $username = mb_strtoupper($_POST["user"]); //remove case sensitivity on the username + } else { + $username = $_SESSION["username"]; + } + + $_SESSION["username"] = $username; + + if(isset($_GET['error'])){ + + $errorno = $_GET['error']; + $smarty->assign('termine_error', 1); + + if($errorno == 1){ + $smarty->assign('termine_error_text', "Es muss ein Termin gewählt werden"); + } + } + + if ($username == "") { + echo ""; + exit; + } + # Kandidat + $result_kandidat = $db->query("SELECT anrede, vorname, nachname + FROM bpm_kandidat + WHERE ka_id = '$username' + "); + $row_kandidat = $result_kandidat->fetch_array(); + if($row_kandidat['anrede'] == 'W'){ + $anrede = 'Frau'; + } + if($row_kandidat['anrede'] == 'M'){ + $anrede = 'Herrn'; + } + $smarty->assign('term_kand_anrede', $anrede); + $smarty->assign('term_kand_vorname', $row_kandidat['vorname']); + $smarty->assign('term_kand_nachname', $row_kandidat['nachname']); + + # Wo ist der Kandidat bisher eingebucht + $result_bisher = $db->query("SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM bpm_termine + WHERE tm_id = (SELECT tm_id + FROM bpm_term_kand + WHERE ka_id = '$username' + ORDER BY tk_id desc + LIMIT 1) + "); + $row_bisher = $result_bisher->fetch_array(); + if($row_bisher['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row_bisher['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $smarty->assign('term_kand_datum', $row_bisher['datum']); + $smarty->assign('term_kand_zeit', $row_bisher['zeit']); + $smarty->assign('term_kand_tm_id', $row_bisher['tm_id']); + $smarty->assign('term_kand_standort', $standort); + + # Gespeicherte Termine + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y') datum, date_format(tm_datum, '%H:%i') zeit, tm_standort, tm_plaetze, tm_raum, tm_referenznr + FROM bpm_termine + WHERE tm_datum > NOW() + ORDER BY tm_datum ASC, zeit ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz != $row1['tm_plaetze']){ + $disable = 0; + }else{ + $disable = 1; + } + $row1['restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $row1['standort_form'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + +if ($action == 'mail') { + $tm_id = $_POST['tm_id']; + + $username = $_SESSION["username"]; + + if($tm_id == ""){ + echo ""; + exit; + } + $_SESSION["termine_tm_id"] = $tm_id; + + # Gespeicherte Werte + $query1 = "SELECT mail + FROM bpm_kandidat + WHERE ka_id = '$username' + LIMIT 1"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $mail .= "$row1[mail]"; + } + + $smarty->assign('mtupd_mailadressen_an', "$mail"); +} + + + +if ($action == 'mailsenden2') { + + $tm_id = $_SESSION["termine_tm_id"]; + $username = $_SESSION["username"]; + $empfaenger = $_POST['empfaenger_an']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + $absender = $_POST['absender']; + + if($absender == 'Kehl'){ + $sendermail = get_parameter(7); + $sender = 'Hochschule Kehl'; + } + + if($absender == 'Ludwigsburg'){ + $sendermail = get_parameter(8); + $sender = 'Hochschule Ludwigsburg'; + } + + # Update + $result_curid = $db->query("SELECT tp_id + FROM bpm_term_kand + WHERE ka_id = $username + ORDER BY tp_id desc + LIMIT 1 + "); + $row_curid = $result_curid->fetch_array(); + $akt_tpid = $row_curid['tp_id']; + + $result = $db->query("UPDATE bpm_term_kand + SET tm_id = '$tm_id' + WHERE tp_id = $akt_tpid + "); + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr + FROM bpm_termine + WHERE tm_id='$tm_id'"); + + $row_termin = $query_termin->fetch_array(); + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + $sendermail = get_parameter(8); + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + $sendermail = get_parameter(7); + } + $text = $text." +
+
+ Neue Daten: +

+ + + + + + + + + + + + + +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+
+ "; + + $query1 = "SELECT mail, ka_id + FROM bpm_kandidat + WHERE ka_id = $username + ORDER BY nachname ASC"; + $result1 = $db->query($query1) or die("Cannot execute query1a $tm_id"); + $lnnr = 0; + while ($row1 = $result1->fetch_array()) { + $mail[$lnnr]['mail'] = "$row1[mail]"; + $mail[$lnnr]['ka_id'] = "$row1[ka_id]"; + $lnnr++; + } + $lfdnr = $lfdnr++; + # Mail auch an die zuständige HS + $mail[$lnnr][mail]= $sendermail; + $mail[$lnnr][ka_id]= ""; + + #echo "
";
+  #print_r($mail);
+  #echo "

"; + #exit; + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #echo "$text
"; + #echo ""; + #$hochschule
"; + #exit; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style =" + + + "; + $text = $style.$text; + + for($i=0;$iquery("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '".$mail[$i][ka_id]."', '".$mail[$i][mail]."', '$betreff', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + }else{ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '".$mail[$i][ka_id]."', '".$mail[$i][mail]."', '$betreff', '$text_db', 'F', '$datum_db') + "); + + $err = 1; + $mail_err .= $mail[$i][mail]."
"; + + } + } + } + + unset($_SESSION['termine_tm_id']); + $editende = 1; + + + if($err == 1){ + $smarty->assign('mail_senderg', "Die Mails konnten nicht verschickt werden!
Prüfen Sie die folgenden Mailadressen:

$mail_err"); + }else{ + $smarty->assign('mail_senderg', "Die Mails wurden verschickt!"); + echo ""; + } +} +// ende Action +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> \ No newline at end of file diff --git a/admin/test_csv.php b/admin/test_csv.php new file mode 100755 index 0000000..1afc51c --- /dev/null +++ b/admin/test_csv.php @@ -0,0 +1,889 @@ + Semikolon + // oder $trennzeichen_excel = ","; --> Komma +############################################################# + + + + +$_SESSION["ck_verz"]=$verz; + +$limitedext = array(".csv"); //Erlaubte Dateieindung beim Upload + +if ($action == '') { + +$heute = mktime(0, 0, 0, date("m"), date("d"), date("Y")); // heutiges Datum +$heute_format = date("Y-m-d", $heute); // ISO-8601 Format wie in der Datenbank: Formatierung für Vergleiche erforderlich + +function deleteFiles($verz){ + $handle = opendir($verz); + while ($file = readdir ($handle)) { + if($file != "." && $file != "..") { + + $datei = $verz.$file; + + if(@unlink($datei)){ + $error = TRUE; + } + else + { + $error = FALSE; + } + } + } + closedir($handle); + return $error; +} + +deleteFiles($verz); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären + + +echo " + + + + +CSV Upload + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ CSV Upload
+ Import eines Studienjahrgangs +
+
+ +
+ + + + + + + + + +
+ Datei wählen:
Erlaubte Dateiendungen: *.csv +
+

+

+
+ +

+ +

+
+
+
+ + + + + +
+
+
+ +"; + +} + +if ($action == 'csvimp') { + + +// http://www.tutorials.de/tutorials65420.html +$tempname = $_FILES['file']['tmp_name']; +$name = $_FILES['file']['name']; + +$type = $_FILES['file']['type']; +$size = $_FILES['file']['size']; +$einheit = "Byte"; // Für die Efolgsmeldung. + +$extlimit = "yes"; //Do you want to limit the extensions of files uploaded +$ext = strrchr($name,'.'); +if (($extlimit == "yes") && (!in_array($ext,$limitedext))) { + +$err[] = " + + + + +Falscher Dateityp + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ Falscher Dateityp +
+
+ +
+

Es dürfen nur csv-Dateien hochgeladen werden! +

+

+ +

+
+
+ + + + + +
+
+
+ +"; +} + +if($size > "9900000") { +$err[] = " + + + + +Datei zu groß + + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ +
+ Datei zu groß +
+
+ +
+

Die Datei welche Sie hochladen wollen, ist zu gross!
Maximale Dateigroesse beträgt 9.900 KB! +

+

+ +

+
+
+ + + + + +
+
+
+ +"; +} +$name = str_replace (array("ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"," "), array("ae", "oe", "ue", "ss", "Ae", "Oe", "Ue", "_"), $name); +$heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php +$heuteformat = date("H-i-s_Y-m-d", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll +$datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll +$neu = $heuteformat."_".$name; +$_SESSION["ck_neu"]=$neu; + +If(empty($err)) { + move_uploaded_file("$tempname", "$verz$neu"); // Unterverzeichnisse wie folgt: copy("$tempname", "pdf/$neu"); + + $row = 1; // Anzahl der Arrays + $handle = fopen ("$verz$neu","r"); // Datei zum Lesen öffnen + + echo " + + + + + Datensätze prüfen + + + + + '; + } + + // Format the HTML + for(i=0; i 11){ + nextMonth = 0; + nextYear++; + } + + prevImgHTML = '<<'; + prevLinkHTML = '' + prevImgHTML + ''; + nextImgHTML = '<<'; + nextLinkHTML = '' + nextImgHTML + ''; + + /** + * Build month combo + */ + if (this.useMonthCombo) { + monthComboOptions = ''; + for (i=0; i<12; i++) { + selected = (i == thisMonth.getMonth() ? 'selected="selected"' : ''); + monthComboOptions += ''; + } + monthCombo = ''; + } else { + monthCombo = monthnames[thisMonth.getMonth()]; + } + + /** + * Build year combo + */ + if (this.useYearCombo) { + yearComboOptions = ''; + for (i = thisMonth.getFullYear() - this.yearComboRange; i <= (thisMonth.getFullYear() + this.yearComboRange); i++) { + selected = (i == thisMonth.getFullYear() ? 'selected="selected"' : ''); + yearComboOptions += ''; + } + yearCombo = ''; + } else { + yearCombo = thisMonth.getFullYear(); + } + + html = '
+
+ + + + + + + + + + + + + + + + +
+ +
+ Datensätze prüfen
+
+
+ + + + + + + + + + + + + + + + + + + "; + + + while ( ($data = fgetcsv ($handle, 0, $trennzeichen_excel)) !== FALSE ) // Daten werden aus der Datei in ein Array $data gelesen + { + $num = count ($data); // Felder im Array $data werden gezählt + //print "

$num fields in line $row:
\n"; + print "\n"; + $row++; // Anzahl der Arrays wird + // inkrementiert + + $passwd = str_replace(".", "", $data[13]); + + print "

"; + // for ($c=0; $c < $num; $c++) { // FOR-Schleife: Oder Anzahl der zu importierenden Felder ($num) + print "\n"; // uid + print "\n"; // Nacname + print "\n"; // Vorname + print "\n"; // Matrikelnr + print "\n"; // KFZ + print "\n"; // HS + print "\n"; // PLZ + print "\n"; // ORT + print "\n"; // Straße + print "\n"; // STG + print "\n"; // StgText + print "\n"; // AG + print "\n"; // Jahrgang + #print "\n"; // Passwort in Kleinbuchstaben + print "\n"; // Passwort + print "\n"; // Mail + // } + print ""; + $ln_inserts[]++; //zählt die Anzahl der importierenden DS + } + echo " +
+ uid + + Nachname + + Vorname + + Matrikelnr. + + KFZ + + HS + + PLZ + + Ort + + Straße + + Stg + + StgText + + AG + + Jahr + + Passwort + + Mail +
".strtolower($data[0]) . "".$data[1] . "".$data[2] . "".$data[3] . "".$data[4] . "".$data[5] . "".$data[6] . "".$data[7] . "".$data[8] . "".$data[9] . "".$data[10] . "".strtoupper($data[11]) . "".$data[12] . "".strtolower($data[12]) . "".$passwd . "".$data[14] . "
+
+ +
+ + + + + +
+
"; + $zahl=count($ln_inserts); + + echo" + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + +
+ Sollen die $zahl Datensätze importiert werden?
+ +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+ Auswahl + + Markieren +
Datensätze nicht importieren + +
Datensätze importieren + +
+   + +   +
+   + + +
+
+ +
+ + + + + +
+
+
+ + + "; +}else { + + foreach($err as $error) + echo "$error"; + exit; +} //Ende if error +fclose ($handle); + +} + +if ($action == 'csvimp2') { +$neu=$_SESSION["ck_neu"]; //CSV-Dateinamen um Datei löschen zu können +$verz=$_SESSION["ck_verz"]; //Uploadverzeichnis aus Cookie holen + + +if ($_POST['import'] == "0") // DS sollen nicht importiert werden +{ + $dateiname="$verz$neu"; + if (@unlink($dateiname)) // Funktion löscht Dateien und gibt true / false zurück + { + echo" + + + + + + Import beendet + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ Importvorgang abgebrochen
+
+
+
+

Datemsätze wurden nicht importiert!
Die CSV-Datei wurde vom Server gelöscht! +

+

+
+

+

+

+

+

+


+

+
+
+ + +
+
+
+ + "; + + }else{ + + echo" + + + + + Datei nicht gelöscht + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ Importvorgang abgebrochen
+
+
+
+

Datemsätze wurden nicht importiert!
Die CSV-Datei ($neu) konnte nicht vom Server gelöscht werden! +

+

+
+

+

+

+

+

+


+

+
+
+ + +
+
+
+ + "; + } // End if + +} elseif($_POST['import'] == "1") // DS sollen importiert werden +{ + $row = 1; // Anzahl der Arrays + $handle = fopen ("$verz$neu","r"); // Datei zum Lesen öffnen + while ( ($data = fgetcsv ($handle, 1000, $trennzeichen_excel)) !== FALSE ) // Daten werden aus der Datei in ein Array $data gelesen + { + $num = count ($data); // Felder im Array $data werden gezählt + //print "

$num fields in line $row:
\n"; + print "\n"; + $row++; // Anzahl der Arrays wird + // inkrementiert + #$pwd = strtolower($data[13]); + $pwd = str_replace(".", "", $data[13]); + $passwd = md5($pwd); + $uid = strtolower($data[0]); + + $geb = preg_split('/\./', $data[13]); + $tag = $geb[0]; + $mon = $geb[1]; + $jahr = $geb[2]; + $gebtag = "$jahr-$mon-$tag"; + //$passwd = mysql_escape_string($passwd); + + + // ACHTUNG: AN DIESER ZEILE NICHTS ÄNDERN, da die erste Zeile des Strings rausgefiltert wird bei der Ausgabe der nichtimportierten DS + $insert[] .= "INSERT INTO stud (uid, nachname, vorname, mtknr, pokfz, hs, poplz, poOrt, poStrasse, stg, stgText, AG, Jahrgang, Pwd, mail, geburtstag) VALUES ( lower('$data[0]') + ,'$data[1]' + ,'$data[2]' + ,'$data[3]' + ,'$data[4]' + ,'$data[5]' + ,'$data[6]' + ,'$data[7]' + ,'$data[8]' + ,'$data[9]' + ,'$data[10]' + ,upper('$data[11]') + ,'$data[12]' + ,'$passwd' + ,'$data[14]' + ,'$gebtag' + ) + "; + } + + + for ($i=0;$i + + + + Import beendet + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ Importvorgang erfolgreich
+
+
+
+

Der Importvorgang wurde erfolgreich beendet!
Die CSV-Datei wurde vom Server gelöscht! +

"; + $num1 = count ($y); // Anzahl der nicht importierten UIDs + if ($y != "") + { + echo"Es wurden $num1 Datensätze nicht importiert
+ Wahrscheinlich ist die UID bereits in der Datenbank vorhanden,
+ oder eines der Felder ist zu lang: +

"; + } + // Ausgabe der nicht importierten DS + for ($i=0;$i"; + } + echo" +

+
+

+

+

+

+

+


+

+
+
+ + +
+
+
+ + "; + + }else{ + + echo" + + + + + Datei nicht gelöscht + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ +
+ Importvorgang erfolgreich
+
+
+
+

Der Importvorgang wurde erfolgreich beendet!
Die CSV-Datei ($neu) konnte nicht vom Server gelöscht werden! +

"; + $num1 = count ($y); // Anzahl der nicht importierten UIDs + if ($y != "") + { + echo"Es wurden $num1 Datensätze nicht importiert
+ Wahrscheinlich ist die UID bereits in der Datenbank vorhanden,
+ oder eines der Felder ist zu lang: +

"; + } + // Ausgabe der nicht importierten DS + for ($i=0;$i"; + } + echo" +

+
+

+

+

+

+

+


+

+
+
+ + +
+
+
+ + "; + } // End if + +}else { // Es wurde kein Radiobutton gewählt! Technisch aber ausgeschlossen + + echo "sie müssen eine Auswahl treffen"; + +} + +function deleteFiles($verz){ + $handle = opendir($verz); + while ($file = readdir ($handle)) { + if($file != "." && $file != "..") { + + $datei = $verz.$file; + + if(@unlink($datei)){ + $error = TRUE; + } + else + { + $error = FALSE; + } + } + } + closedir($handle); + return $error; +} + +deleteFiles($verz); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären + +} // ende Action + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/admin/titel.php b/admin/titel.php new file mode 100755 index 0000000..5d42eef --- /dev/null +++ b/admin/titel.php @@ -0,0 +1,51 @@ +window.top.location.href = \"index.php\";"; +} + +/* +$db = dbconnect(); + +#Hat User ein Adminrecht + +$result_admin = $db->query("SELECT count(*) Anz FROM dep_rollen_user_zuord WHERE imtuid = '$uid' AND roid='1'"); +#echo "SELECT count(*) Anz FROM dep_rollen_user_zuord WHERE imtuid = '$uid' AND roid='1'
"; +$row_admin = $result_admin->fetch_array(); + +if($row_admin[Anz] > 0){ + $smarty->assign('titel_admin', "1"); +} + + +$result_ausschuss = $db->query("SELECT count(*) Anz FROM dep_rollen_user_zuord WHERE imtuid = '$uid' AND roid in (4,5)"); +$row_ausschuss = $result_ausschuss->fetch_array(); + +if($row_ausschuss[Anz] > 0){ + $smarty->assign('titel_ausschuss', "1"); +} + + +$result_beteiligte = $db->query("SELECT count(*) Anz FROM dep_rollen_user_zuord WHERE imtuid = '$uid' AND roid='3'"); +$row_beteiligte = $result_beteiligte->fetch_array(); + +if($row_beteiligte[Anz] > 0){ + $smarty->assign('titel_beteiligte', "1"); +} + + +$result_gutachter = $db->query("SELECT count(*) Anz FROM dep_rollen_user_zuord WHERE imtuid = '$uid' AND roid='2'"); +$row_gutachter = $result_gutachter->fetch_array(); + +if($row_gutachter[Anz] > 0){ + $smarty->assign('titel_gutachter', "1"); +} + +*/ +$smarty->display("$template/admin/$templatename"); +?> \ No newline at end of file diff --git a/admin/upload.php b/admin/upload.php new file mode 100755 index 0000000..88361d9 --- /dev/null +++ b/admin/upload.php @@ -0,0 +1,402 @@ + Semikolon +// oder $trennzeichen_excel = ","; --> Komma +############################################################# + + + + +$_SESSION["ck_verz"] = $verz; + + +if ($action == '') { + + $german = $db->query("SET lc_time_names = 'de_DE';"); + + $query1 = "SELECT a.tm_id, date_format(tm_datum, '%a, %d.%m.%Y - %H:%i Uhr')tm_datum_form, tm_standort + FROM bpm_termine a, bpm_term_kand b + WHERE a.tm_id=b.tm_id + AND a.tm_datum > ADDDATE(now(), -7) + GROUP BY a.tm_id, tm_datum_form, tm_standort + ORDER BY tm_datum ASC"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + if ($row1['tm_standort'] == 'L') { + $standort = 'Ludwigsburg'; + } + if ($row1['tm_standort'] == 'K') { + $standort = 'Kehl'; + } + + $row1['tm_standort'] = $standort; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'upload') { + # Den Testtermin wählt man, damit jede Hochschule seine eigenen Daten importieren kann. Wenn eine Hochschule am selben TAg einen Test hat vermeidet man dass ein halbfertiger Test importiert wird + if (isset($_POST["testtermin"])) { + $testtermin = $_POST["testtermin"]; + } else { + $testtermin = $_SESSION["testtermin"]; + } + + $_SESSION["testtermin"] = $testtermin; + + + # Uploadverzeichnis aufräumen. Temporäre Dateien, die älter als 2 Wochen sind, werden gelöscht + $dir = $_SERVER["DOCUMENT_ROOT"].dirname($_SERVER['PHP_SELF'])."/$verz"; + $folder = dir($dir); + while ($dateiname = $folder->read()) { + if (filetype($dir.$dateiname) != "dir") { + if (strtotime("-2 weeks") > + @filemtime($dir.$dateiname)) { + if (@unlink($dir.$dateiname) != false){ + # echo $dateiname.' wurde gelöscht
'; + }else{ + # echo $dateiname.' konnte nichtgelöscht werden
'; + } + } + } + } + + + # Fehler beim Upload anzeigen + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es dürfen nur CSV Dateien hochgeladen werden."); + } + if ($errorno == 2) { + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $smarty->assign('index_error_text', "Die Datei ist zu groß. Die Dateigröße darf max. $size_mb MB betragen."); + } + if ($errorno == 3) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde vom Server gelöscht"); + } + if ($errorno == 4) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde nicht vom Server gelöscht"); + } + } +} + +if ($action == 'csvimp') { + + $testtermin = $_SESSION["testtermin"]; + + // http://www.tutorials.de/tutorials65420.html + #echo '

', print_r($_POST, true), '
'; + + $tempname = $_FILES['file']['tmp_name']; + $name = $_FILES['file']['name']; + + $type = $_FILES['file']['type']; + $size = $_FILES['file']['size']; + $einheit = "Byte"; // Für die Efolgsmeldung. + + $limitedext = array( + ".csv" + ); //Erlaubte Dateieindung beim Upload + + $extlimit = "yes"; //Do you want to limit the extensions of files uploaded + $ext = strrchr($name, '.'); + + if (($extlimit == "yes") && (!in_array($ext, $limitedext))) { + echo ""; + exit; + } + + + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $size_bt = $size_mb * 1024 * 1024; + + if ($size > $size_bt) { + echo ""; + exit; + } + + + $name = str_replace(array( + "ä", + "ö", + "ü", + "ß", + "Ä", + "Ö", + "Ü", + " " + ), array( + "ae", + "oe", + "ue", + "ss", + "Ae", + "Oe", + "Ue", + "_" + ), $name); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $heuteformat = date("H-i-s_Y-m-d", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $neu = $heuteformat . "_" . $name; + $_SESSION["ck_neu"] = $neu; + move_uploaded_file("$tempname", "$verz$neu"); // Unterverzeichnisse wie folgt: copy("$tempname", "pdf/$neu"); + + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + # Bestehnswert 65 Punkte + $bestehenswert = trim(get_parameter(11)); + + # Hier vor der Schleife erste Zeile holen und ignorieren. Enthält Überschrift + fgetcsv($handle, 0, $trennzeichen_excel); + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + #2020-02-23T17:44:56 + $tag = substr($data[11], 8, 2); + $monat = substr($data[11], 5, 2); + $jahr = substr($data[11], 0, 4); + $std = substr($data[11], 11, 2); + $min = substr($data[11], 14, 2); + $sek = substr($data[11], 17, 2); + $datum = "$tag.$monat.$jahr - $std:$min:$sek"; + $datum_db = "$jahr-$monat-$tag"; + $tan = $data[7]; + + $result_ct = $db->query("SELECT concat(vorname,' ', nachname) name, date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_kandidat a, bpm_term_kand b, bpm_termine c, bpm_tanpool d + WHERE a.ka_id = b.ka_id + AND b.tm_id = c.tm_id + AND b.tp_id = d.tp_id + AND d.tan = '$tan' + AND c.tm_id = $testtermin"); + $row_ct = $result_ct->fetch_array(); + + if ($row_ct['name'] != '' AND $row_ct['tm_datum'] == $datum_db) { + + $satzerg_raw = $data[13]; + #$analogie_raw = $data[14]; + $gemeinsamkeiten_raw = $data[15]; + $rechenaufgaben_raw = $data[16]; + $zahlenreihen_raw = $data[17]; + $rechenzeichen_raw = $data[18]; + $matrizen_raw = $data[21]; + $merkf_raw = $data[26]; + + $row1['tan'] = $tan; + $row1['name'] = $row_ct['name']; + $row1['datum'] = $datum; + $row1['satzerg_raw'] = $satzerg_raw; + #$row1['analogie_raw'] = $analogie_raw; + $row1['gemeinsamkeiten_raw'] = $gemeinsamkeiten_raw; + $row1['rechenaufgaben_raw'] = $rechenaufgaben_raw; + $row1['zahlenreihen_raw'] = $zahlenreihen_raw; + $row1['rechenzeichen_raw'] = $rechenzeichen_raw; + $row1['matrizen_raw'] = $matrizen_raw; + $row1['merkf_raw'] = $merkf_raw; + + # In die Berechnung fliest verb/num Intelligenz nicht mit ein. Das sind interne Berechnungen und keine Testaufgaben + $summe = $satzerg_raw + $gemeinsamkeiten_raw + $rechenaufgaben_raw + $zahlenreihen_raw + $rechenzeichen_raw + $matrizen_raw + $merkf_raw; + + $row1['summe'] = $summe; + if ($summe >= $bestehenswert) { + $bestanden = 1; + } else { + $bestanden = 0; + } + $row1['bestanden'] = $bestanden; + $table_data1[] = $row1; + } + + } + + $smarty->assign('table_data1', $table_data1); + fclose($handle); + +} + +if ($action == 'csvimp2') { + $neu = $_SESSION["ck_neu"]; //CSV-Dateinamen um Datei löschen zu können + $verz = $_SESSION["ck_verz"]; //Uploadverzeichnis aus Cookie holen + $testtermin = $_SESSION["testtermin"]; + + + if ($_POST['import'] == "0") // DS sollen nicht importiert werden + { + $dateiname = "$verz$neu"; + if (@unlink($dateiname)) // Funktion löscht Dateien und gibt true / false zurück + { + # Abbruch, datei gelöscht + echo ""; + exit; + } else { + # Abbruch, datei nicht gelöscht + echo ""; + exit; + } // End if + + } elseif ($_POST['import'] == "1") // DS sollen importiert werden + { + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + # Bestehnswert 65 Punkte + $bestehenswert = trim(get_parameter(11)); + + # Hier vor der Schleife erste Zeile holen und ignorieren. Enthält Überschrift + fgetcsv($handle, 0, $trennzeichen_excel); + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + + #2020-02-23T17:44:56 + $tag = substr($data[11], 8, 2); + $monat = substr($data[11], 5, 2); + $jahr = substr($data[11], 0, 4); + $std = substr($data[11], 11, 2); + $min = substr($data[11], 14, 2); + $sek = substr($data[11], 17, 2); + $datum = "$tag.$monat.$jahr - $std:$min:$sek"; + $datum_db = "$jahr-$monat-$tag"; + $tan = $data[7]; + + $result_ct = $db->query("SELECT a.ka_id, concat(vorname,' ', nachname) name, date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_kandidat a, bpm_term_kand b, bpm_termine c, bpm_tanpool d + WHERE a.ka_id = b.ka_id + AND b.tm_id = c.tm_id + AND b.tp_id = d.tp_id + AND d.tan = '$tan' + AND c.tm_id = $testtermin"); + $row_ct = $result_ct->fetch_array(); + + if ($row_ct['name'] != '' AND $row_ct['tm_datum'] == $datum_db) { + + $satzerg_raw = $data[13]; + #$analogie_raw = $data[14]; + $gemeinsamkeiten_raw = $data[15]; + $rechenaufgaben_raw = $data[16]; + $zahlenreihen_raw = $data[17]; + $rechenzeichen_raw = $data[18]; + $matrizen_raw = $data[21]; + $merkf_raw = $data[26]; + $summe = $satzerg_raw + $gemeinsamkeiten_raw + $rechenaufgaben_raw + $zahlenreihen_raw + $rechenzeichen_raw + $matrizen_raw + $merkf_raw; + if ($summe >= $bestehenswert) { + $bestanden = 1; + } else { + $bestanden = 0; + # Tan Inaktiv setzen + $result_1 = $db->query("UPDATE bpm_tanpool + SET aktiv='I' + WHERE tan = '$tan'"); + } + $result_ct1 = $db->query("SELECT count(*) Anz + FROM bpm_ergebnisse + WHERE ka_id = $row_ct[ka_id] + AND tan = '$tan'"); + $row_ct1 = $result_ct1->fetch_array(); + if ($row_ct1['Anz'] == 0) { + # keine Ergebnisse vorhanden, insert + + $sql1 = $db->query("insert into bpm_ergebnisse (ka_id + , tan + , satzerg + , gemeinsamkeiten + , rechenaufgaben + , zahlenreihen + , rechenzeichen + , matrizen + , merkf + , summe + , bestanden) + VALUES ('$row_ct[ka_id]' + , '$tan' + , '$satzerg_raw' + , '$gemeinsamkeiten_raw' + , '$rechenaufgaben_raw' + , '$zahlenreihen_raw' + , '$rechenzeichen_raw' + , '$matrizen_raw' + , '$merkf_raw' + , '$summe' + , '$bestanden')"); + if (!$sql1) { + $hinweis['hinweis'] = "TAN: " . $tan . " Fehler: Ergebnis nicht gespeichert
"; + $smarty->assign('index_error', 1); + } + } else { + # Ergebnisse gibt es schon, kein insert + $hinweis['hinweis'] = "TAN: " . $tan . " Ergebnisse schon gespeichert
"; + $smarty->assign('index_error', 1); + } + + } else { + # Testdatum stimmt nicht, kein Student gefunden + $hinweis['hinweis'] = "TAN: " . $tan . " in der CSV gehört nicht zu diesem Datum (Kein Fehler)
"; + $smarty->assign('index_error', 1); + } + $table_data2[] = $hinweis; + } + $smarty->assign('table_data2', $table_data2); + + + fclose($handle); + + } else { // Es wurde kein Radiobutton gewählt! Technisch aber ausgeschlossen + + echo "sie müssen eine Auswahl treffen"; + + } + + function deleteFiles($verz) + { + $handle = opendir($verz); + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + + $datei = $verz . $file; + + if (@unlink($datei)) { + $error = TRUE; + } else { + $error = FALSE; + } + } + } + closedir($handle); + return $error; + } + + deleteFiles($verz); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären + +} // ende Action + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/admin/verwaltung_frame.php b/admin/verwaltung_frame.php new file mode 100755 index 0000000..14552bf --- /dev/null +++ b/admin/verwaltung_frame.php @@ -0,0 +1,6 @@ +display("$template/admin/$templatename"); ?> \ No newline at end of file diff --git a/ajaxtabs/Thumbs.db b/ajaxtabs/Thumbs.db new file mode 100755 index 0000000..d5de7d8 Binary files /dev/null and b/ajaxtabs/Thumbs.db differ diff --git a/ajaxtabs/ajaxtabs.js b/ajaxtabs/ajaxtabs.js new file mode 100755 index 0000000..997e146 --- /dev/null +++ b/ajaxtabs/ajaxtabs.js @@ -0,0 +1,224 @@ +//** Ajax Tabs Content script v2.0- Dynamic Drive DHTML code library (http://www.dynamicdrive.com) +//** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements +//** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0. +//** Updated April 8th, 08 to version 2.2: +// -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) +// -Modified Ajax routine so testing the script out locally in IE7 now works + +var ddajaxtabssettings={} +ddajaxtabssettings.bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no) +ddajaxtabssettings.loadstatustext=" Requesting content..." + + +////NO NEED TO EDIT BELOW//////////////////////// + +function ddajaxtabs(tabinterfaceid, contentdivid){ + this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container + this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container + this.enabletabpersistence=true + this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container + this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array + this.contentdivid=contentdivid + this.defaultHTML="" + this.defaultIframe='' + this.defaultIframe=this.defaultIframe.replace(/"+"
"}},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>{const e=t[1];return'
'+`"+"
"}},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:t=>{const e=t[1];return'
'+`"+"
"}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>{const e=t[1];return'
'+`"+"
"}},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]});this.registry=new sA(t.locale,t.config.get("mediaEmbed"))}init(){const t=this.editor;const e=t.model.schema;const n=t.t;const i=t.conversion;const o=t.config.get("mediaEmbed.previewsInData");const r=this.registry;t.commands.add("mediaEmbed",new iA(t));e.register("media",{isObject:true,isBlock:true,allowWhere:"$block",allowAttributes:["url"]});i.for("dataDowncast").elementToElement({model:"media",view:(t,e)=>{const n=t.getAttribute("url");return XC(e,r,n,{renderMediaPreview:n&&o})}});i.for("dataDowncast").add(QC(r,{renderMediaPreview:o}));i.for("editingDowncast").elementToElement({model:"media",view:(t,e)=>{const i=t.getAttribute("url");const o=XC(e,r,i,{renderForEditingView:true});return KC(o,e,n("m"))}});i.for("editingDowncast").add(QC(r,{renderForEditingView:true}));i.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:true}},model:(t,e)=>{const n=t.getAttribute("url");if(r.hasMedia(n)){return e.createElement("media",{url:n})}}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":true}},model:(t,e)=>{const n=t.getAttribute("data-oembed-url");if(r.hasMedia(n)){return e.createElement("media",{url:n})}}})}}const dA=new Map;function uA(t,e,n){let i=dA.get(t);if(!i){i=new Map;dA.set(t,i)}i.set(e,n)}function hA(t,e){const n=dA.get(t);if(n&&n.has(e)){return n.get(e)}return fA}function fA(t){return[t]}function mA(t,e,n={}){const i=hA(t.constructor,e.constructor);try{t=t.clone();return i(t,e,n)}catch(t){throw t}}function gA(t,e,n){t=t.slice();e=e.slice();const i=new pA(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(t);i.setOriginalOperations(e);const o=i.originalOperations;if(t.length==0||e.length==0){return{operationsA:t,operationsB:e,originalOperations:o}}const r=new WeakMap;for(const e of t){r.set(e,0)}const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;while(a{if(t.key===e.key){const i=t.range.getDifference(e.range).map(e=>new Zm(e,t.key,t.oldValue,t.newValue,0));const o=t.range.getIntersection(e.range);if(o){if(n.aIsStrong){i.push(new Zm(o,e.key,e.newValue,t.newValue,0))}}if(i.length==0){return[new Mg(0)]}return i}else{return[t]}});uA(Zm,eg,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes);const i=n.map(e=>new Zm(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const n=kA(e,t.key,t.oldValue);if(n){i.unshift(n)}}return i}t.range=t.range._getTransformedByInsertion(e.position,e.howMany,false)[0];return[t]});function kA(t,e,n){const i=t.nodes;const o=i.getNode(0).getAttribute(e);if(o==n){return null}const r=new Gh(t.position,t.position.getShiftedBy(t.howMany));return new Zm(r,e,o,n,0)}uA(Zm,rg,(t,e)=>{const n=[];if(t.range.start.hasSameParentAs(e.deletionPosition)){if(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition)){n.push(Gh._createFromPositionAndShift(e.graveyardPosition,1))}}const i=t.range._getTransformedByMergeOperation(e);if(!i.isCollapsed){n.push(i)}return n.map(e=>new Zm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});uA(Zm,tg,(t,e)=>{const n=_A(t.range,e);return n.map(e=>new Zm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});function _A(t,e){const n=Gh._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null;let o=[];if(n.containsRange(t,true)){i=t}else if(t.start.hasSameParentAs(n.start)){o=t.getDifference(n);i=t.getIntersection(n)}else{o=[t]}const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart();const i=t.start.hasSameParentAs(n);t=t._getTransformedByInsertion(n,e.howMany,i);r.push(...t)}if(i){r.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,false)[0])}return r}uA(Zm,sg,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.range.end.offset++}return[t]}if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();n.range=new Gh(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition));t.range.end=e.splitPosition.clone();t.range.end.stickiness="toPrevious";return[t,n]}t.range=t.range._getTransformedBySplitOperation(e);return[t]});uA(eg,Zm,(t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=kA(t,e.key,e.newValue);if(i){n.push(i)}}return n});uA(eg,eg,(t,e,n)=>{if(t.position.isEqual(e.position)&&n.aIsStrong){return[t]}t.position=t.position._getTransformedByInsertOperation(e);return[t]});uA(eg,tg,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});uA(eg,sg,(t,e)=>{t.position=t.position._getTransformedBySplitOperation(e);return[t]});uA(eg,rg,(t,e)=>{t.position=t.position._getTransformedByMergeOperation(e);return[t]});uA(ng,eg,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]}if(t.newRange){t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]}return[t]});uA(ng,ng,(t,e,n)=>{if(t.name==e.name){if(n.aIsStrong){t.oldRange=e.newRange?e.newRange.clone():null}else{return[new Mg(0)]}}return[t]});uA(ng,rg,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByMergeOperation(e)}if(t.newRange){t.newRange=t.newRange._getTransformedByMergeOperation(e)}return[t]});uA(ng,tg,(t,e,n)=>{if(t.oldRange){t.oldRange=Gh._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))}if(t.newRange){if(n.abRelation){const i=Gh._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if(n.abRelation.side=="left"&&e.targetPosition.isEqual(t.newRange.start)){t.newRange.start.path=n.abRelation.path;t.newRange.end=i.end;return[t]}else if(n.abRelation.side=="right"&&e.targetPosition.isEqual(t.newRange.end)){t.newRange.start=i.start;t.newRange.end.path=n.abRelation.path;return[t]}}t.newRange=Gh._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]});uA(ng,sg,(t,e,n)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedBySplitOperation(e)}if(t.newRange){if(n.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);if(t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement){t.newRange.start=$h._createAt(e.insertionPosition)}else if(t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement){t.newRange.start=$h._createAt(e.moveTargetPosition)}if(t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement){t.newRange.end=$h._createAt(e.moveTargetPosition)}else if(t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement){t.newRange.end=$h._createAt(e.insertionPosition)}else{t.newRange.end=i.end}return[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]});uA(rg,eg,(t,e)=>{if(t.sourcePosition.hasSameParentAs(e.position)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e);t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e);return[t]});uA(rg,rg,(t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(!n.bWasUndone){return[new Mg(0)]}else{const n=e.graveyardPosition.path.slice();n.push(0);t.sourcePosition=new $h(e.graveyardPosition.root,n);t.howMany=0;return[t]}}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&n.abRelation!="splitAtSource"){const i=t.targetPosition.root.rootName=="$graveyard";const o=e.targetPosition.root.rootName=="$graveyard";const r=i&&!o;const s=o&&!i;const a=s||!r&&n.aIsStrong;if(a){const n=e.targetPosition._getTransformedByMergeOperation(e);const i=t.targetPosition._getTransformedByMergeOperation(e);return[new tg(n,t.howMany,i,0)]}else{return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e);t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);if(!t.graveyardPosition.isEqual(e.graveyardPosition)||!n.aIsStrong){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});uA(rg,tg,(t,e,n)=>{const i=Gh._createFromPositionAndShift(e.sourcePosition,e.howMany);if(e.type=="remove"&&!n.bWasUndone&&!n.forceWeakRemove){if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)){return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}if(t.sourcePosition.hasSameParentAs(e.sourcePosition)){t.howMany-=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e);t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e);if(!t.graveyardPosition.isEqual(e.targetPosition)){t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}return[t]});uA(rg,sg,(t,e,n)=>{if(e.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1);if(t.deletionPosition.isEqual(e.graveyardPosition)){t.howMany=e.howMany}}if(t.targetPosition.isEqual(e.splitPosition)){const i=e.howMany!=0;const o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(i||o||n.abRelation=="mergeTargetNotMoved"){t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.isEqual(e.splitPosition)){if(n.abRelation=="mergeSourceNotMoved"){t.howMany=0;t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}if(n.abRelation=="mergeSameElement"||t.sourcePosition.offset>0){t.sourcePosition=e.moveTargetPosition.clone();t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.hasSameParentAs(e.splitPosition)){t.howMany=e.splitPosition.offset}t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]});uA(tg,eg,(t,e)=>{const n=Gh._createFromPositionAndShift(t.sourcePosition,t.howMany);const i=n._getTransformedByInsertOperation(e,false)[0];t.sourcePosition=i.start;t.howMany=i.end.offset-i.start.offset;if(!t.targetPosition.isEqual(e.position)){t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)}return[t]});uA(tg,tg,(t,e,n)=>{const i=Gh._createFromPositionAndShift(t.sourcePosition,t.howMany);const o=Gh._createFromPositionAndShift(e.sourcePosition,e.howMany);let r=n.aIsStrong;let s=!n.aIsStrong;if(n.abRelation=="insertBefore"||n.baRelation=="insertAfter"){s=true}else if(n.abRelation=="insertAfter"||n.baRelation=="insertBefore"){s=false}let a;if(t.targetPosition.isEqual(e.targetPosition)&&s){a=t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}else{a=t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}if(vA(t,e)&&vA(e,t)){return[e.getReversed()]}const c=i.containsPosition(e.targetPosition);if(c&&i.containsRange(o,true)){i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return yA([i],a)}const l=o.containsPosition(t.targetPosition);if(l&&o.containsRange(i,true)){i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart());i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart());return yA([i],a)}const d=Os(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(d=="prefix"||d=="extension"){i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return yA([i],a)}if(t.type=="remove"&&e.type!="remove"&&!n.aWasUndone&&!n.forceWeakRemove){r=true}else if(t.type!="remove"&&e.type=="remove"&&!n.bWasUndone&&!n.forceWeakRemove){r=false}const u=[];const h=i.getDifference(o);for(const t of h){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany);t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=Os(t.start.getParentPath(),e.getMovedRangeStart().getParentPath())=="same";const i=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);u.push(...i)}const f=i.getIntersection(o);if(f!==null&&r){f.start=f.start._getCombined(e.sourcePosition,e.getMovedRangeStart());f.end=f.end._getCombined(e.sourcePosition,e.getMovedRangeStart());if(u.length===0){u.push(f)}else if(u.length==1){if(o.start.isBefore(i.start)||o.start.isEqual(i.start)){u.unshift(f)}else{u.push(f)}}else{u.splice(1,0,f)}}if(u.length===0){return[new Mg(t.baseVersion)]}return yA(u,a)});uA(tg,sg,(t,e,n)=>{let i=t.targetPosition.clone();if(!t.targetPosition.isEqual(e.insertionPosition)||!e.graveyardPosition||n.abRelation=="moveTargetAfter"){i=t.targetPosition._getTransformedBySplitOperation(e)}const o=Gh._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.howMany++}t.targetPosition=i;return[t]}if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new Gh(e.splitPosition,o.end);t=t._getTransformedBySplitOperation(e);const n=[new Gh(o.start,e.splitPosition),t];return yA(n,i)}if(t.targetPosition.isEqual(e.splitPosition)&&n.abRelation=="insertAtSource"){i=e.moveTargetPosition}if(t.targetPosition.isEqual(e.insertionPosition)&&n.abRelation=="insertBetween"){i=t.targetPosition}const r=o._getTransformedBySplitOperation(e);const s=[r];if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(t.howMany>1&&i&&!n.aWasUndone){s.push(Gh._createFromPositionAndShift(e.insertionPosition,1))}}return yA(s,i)});uA(tg,rg,(t,e,n)=>{const i=Gh._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)){if(t.type=="remove"&&!n.forceWeakRemove){if(!n.aWasUndone){const n=[];let i=e.graveyardPosition.clone();let o=e.targetPosition._getTransformedByMergeOperation(e);if(t.howMany>1){n.push(new tg(t.sourcePosition,t.howMany-1,t.targetPosition,0));i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1);o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1)}const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition);const s=new tg(i,1,r,0);const a=s.getMovedRangeStart().path.slice();a.push(0);const c=new $h(s.targetPosition.root,a);o=o._getTransformedByMove(i,r,1);const l=new tg(o,e.howMany,c,0);n.push(s);n.push(l);return n}}else{if(t.howMany==1){if(!n.bWasUndone){return[new Mg(0)]}else{t.sourcePosition=e.graveyardPosition.clone();t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]}}}}const o=Gh._createFromPositionAndShift(t.sourcePosition,t.howMany);const r=o._getTransformedByMergeOperation(e);t.sourcePosition=r.start;t.howMany=r.end.offset-r.start.offset;t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]});uA(ig,eg,(t,e)=>{t.position=t.position._getTransformedByInsertOperation(e);return[t]});uA(ig,rg,(t,e)=>{if(t.position.isEqual(e.deletionPosition)){t.position=e.graveyardPosition.clone();t.position.stickiness="toNext";return[t]}t.position=t.position._getTransformedByMergeOperation(e);return[t]});uA(ig,tg,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});uA(ig,ig,(t,e,n)=>{if(t.position.isEqual(e.position)){if(n.aIsStrong){t.oldName=e.newName}else{return[new Mg(0)]}}return[t]});uA(ig,sg,(t,e)=>{const n=t.position.path;const i=e.splitPosition.getParentPath();if(Os(n,i)=="same"&&!e.graveyardPosition){const e=new ig(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}t.position=t.position._getTransformedBySplitOperation(e);return[t]});uA(og,og,(t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue){return[new Mg(0)]}else{t.oldValue=e.newValue}}return[t]});uA(sg,eg,(t,e)=>{if(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const i=new $h(e.graveyardPosition.root,n);const o=sg.getInsertionPosition(new $h(e.graveyardPosition.root,n));const r=new sg(i,0,null,0);r.insertionPosition=o;t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=sg.getInsertionPosition(t.splitPosition);t.graveyardPosition=r.insertionPosition.clone();t.graveyardPosition.stickiness="toNext";return[r,t]}if(t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)){t.howMany--}if(t.splitPosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=sg.getInsertionPosition(t.splitPosition);if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});uA(sg,tg,(t,e,n)=>{const i=Gh._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&o){const n=t.splitPosition._getTransformedByMoveOperation(e);const i=t.graveyardPosition._getTransformedByMoveOperation(e);const o=i.path.slice();o.push(0);const r=new $h(i.root,o);const s=new tg(n,t.howMany,r,0);return[s]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);t.howMany-=n;if(t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition){return[new Mg(0)]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){return[new Mg(0)]}if(n.abRelation=="splitBefore"){t.howMany=0;t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e);return[t]}}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i=t.splitPosition.root.rootName=="$graveyard";const o=e.splitPosition.root.rootName=="$graveyard";const r=i&&!o;const s=o&&!i;const a=s||!r&&n.aIsStrong;if(a){const n=[];if(e.howMany){n.push(new tg(e.moveTargetPosition,e.howMany,e.splitPosition,0))}if(t.howMany){n.push(new tg(t.splitPosition,t.howMany,t.moveTargetPosition,0))}return n}else{return[new Mg(0)]}}if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)}if(t.splitPosition.isEqual(e.insertionPosition)&&n.abRelation=="splitBefore"){t.howMany++;return[t]}if(e.splitPosition.isEqual(t.insertionPosition)&&n.baRelation=="splitBefore"){const n=e.insertionPosition.path.slice();n.push(0);const i=new $h(e.insertionPosition.root,n);const o=new tg(t.insertionPosition,1,i,0);return[t,o]}if(t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset0}addBatch(t){const e=this.editor.model.document.selection;const n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n});this.refresh()}clearStack(){this._stack=[];this.refresh()}_restoreSelection(t,e,n){const i=this.editor.model;const o=i.document;const r=[];for(const e of t){const t=CA(e,n);const i=t.find(t=>t.start.root!=o.graveyard);if(i){r.push(i)}}if(r.length){i.change(t=>{t.setSelection(r,{backward:e})})}}_undo(t,e){const n=this.editor.model;const i=n.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1;const r=Array.from(i.history.getOperations(o));const s=gA([t.getReversed()],r,{useRelations:true,document:this.editor.model.document,padWithNoOps:false,forceWeakRemove:true});const a=s.operationsA;for(const o of a){e.addOperation(o);n.applyOperation(o);i.history.setOperationAsUndone(t,o)}}}}function CA(t,e){const n=t.getTransformedByOperations(e);n.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let t=1;te.batch==t):this._stack.length-1;const n=this._stack.splice(e,1)[0];const i=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t);this.fire("revert",n.batch,i)});this.refresh()}}class TA extends xA{execute(){const t=this._stack.pop();const e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const n=t.batch.operations[t.batch.operations.length-1];const i=n.baseVersion+1;const o=this.editor.model.document.history.getOperations(i);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o);this._undo(t.batch,e)});this.refresh()}}class PA extends Ow{static get pluginName(){return"UndoEditing"}constructor(t){super(t);this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new AA(t);this._redoCommand=new TA(t);t.commands.add("undo",this._undoCommand);t.commands.add("redo",this._redoCommand);this.listenTo(t.model,"applyOperation",(t,e)=>{const n=e[0];if(!n.isDocumentOperation){return}const i=n.batch;const o=this._redoCommand._createdBatches.has(i);const r=this._undoCommand._createdBatches.has(i);const s=this._batchRegistry.has(i);if(s||i.type=="transparent"&&!o&&!r){return}else{if(o){this._undoCommand.addBatch(i)}else if(!r){this._undoCommand.addBatch(i);this._redoCommand.clearStack()}}this._batchRegistry.add(i)},{priority:"highest"});this.listenTo(this._undoCommand,"revert",(t,e,n)=>{this._redoCommand.addBatch(n)});t.keystrokes.set("CTRL+Z","undo");t.keystrokes.set("CTRL+Y","redo");t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var SA='';var MA='';class EA extends Ow{init(){const t=this.editor;const e=t.locale;const n=t.t;const i=e.uiLanguageDirection=="ltr"?SA:MA;const o=e.uiLanguageDirection=="ltr"?MA:SA;this._addButton("undo",n("by"),"CTRL+Z",i);this._addButton("redo",n("bz"),"CTRL+Y",o)}_addButton(t,e,n,i){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t);const a=new Xb(r);a.set({label:e,icon:i,keystroke:n,tooltip:true});a.bind("isEnabled").to(s,"isEnabled");this.listenTo(a,"execute",()=>{o.execute(t);o.editing.view.focus()});return a})}}class IA extends Ow{static get requires(){return[PA,EA]}static get pluginName(){return"Undo"}}const NA=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class OA extends Ow{static get requires(){return[Rx,IA]}static get pluginName(){return"AutoMediaEmbed"}constructor(t){super(t);this._timeoutId=null;this._positionToInsert=null}init(){const t=this.editor;const e=t.model.document;this.listenTo(t.plugins.get(Rx),"inputTransformation",()=>{const t=e.selection.getFirstRange();const n=Ng.fromPosition(t.start);n.stickiness="toPrevious";const i=Ng.fromPosition(t.end);i.stickiness="toNext";e.once("change:data",()=>{this._embedMediaBetweenPositions(n,i);n.detach();i.detach()},{priority:"high"})});t.commands.get("undo").on("execute",()=>{if(this._timeoutId){Od.window.clearTimeout(this._timeoutId);this._positionToInsert.detach();this._timeoutId=null;this._positionToInsert=null}},{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor;const i=n.plugins.get(lA).registry;const o=new sf(t,e);const r=o.getWalker({ignoreElementEnd:true});let s="";for(const t of r){if(t.item.is("textProxy")){s+=t.item.data}}s=s.trim();if(!s.match(NA)){return}if(!i.hasMedia(s)){return}const a=n.commands.get("mediaEmbed");if(!a.isEnabled){return}this._positionToInsert=Ng.fromPosition(t);this._timeoutId=Od.window.setTimeout(()=>{n.model.change(t=>{this._timeoutId=null;t.remove(o);let e;if(this._positionToInsert.root.rootName!=="$graveyard"){e=this._positionToInsert}eA(n.model,s,e);this._positionToInsert.detach();this._positionToInsert=null})},100)}}var RA=n(82);class VA extends pb{constructor(t,e){super(e);const n=e.t;this.focusTracker=new Cp;this.keystrokes=new up;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(n("cw"),Yv,"ck-button-save");this.saveButtonView.type="submit";this.cancelButtonView=this._createButton(n("cx"),Qv,"ck-button-cancel","cancel");this._focusables=new Bp;this._focusCycler=new Ob({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});this._validators=t;this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render();Gv({view:this});const t=[this.urlInputView,this.saveButtonView,this.cancelButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e);this.keystrokes.set("arrowleft",e);this.keystrokes.set("arrowup",e);this.keystrokes.set("arrowdown",e);this.listenTo(this.urlInputView.element,"selectstart",(t,e)=>{e.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e){this.urlInputView.errorText=e;return false}}return true}resetFormStatus(){this.urlInputView.errorText=null;this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t;const e=new Wv(this.locale,$v);const n=e.inputView;this._urlInputViewInfoDefault=t("ed");this._urlInputViewInfoTip=t("ee");e.label=t("ef");e.infoText=this._urlInputViewInfoDefault;n.placeholder="https://example.com";n.on("input",()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault});return e}_createButton(t,e,n,i){const o=new Xb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:n}});if(i){o.delegate("execute").to(this,i)}return o}}var DA='';class LA extends Ow{static get requires(){return[lA]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor;const e=t.commands.get("mediaEmbed");const n=t.plugins.get(lA).registry;this.form=new VA(jA(t.t,n),t.locale);t.ui.componentFactory.add("mediaEmbed",n=>{const i=uw(n);this._setUpDropdown(i,this.form,e,t);this._setUpForm(this.form,i,e);return i})}_setUpDropdown(t,e,n){const i=this.editor;const o=i.t;const r=t.buttonView;t.bind("isEnabled").to(n);t.panelView.children.add(e);r.set({label:o("n"),icon:DA,tooltip:true});r.on("open",()=>{e.url=n.value||"";e.urlInputView.select();e.focus()},{priority:"low"});t.on("submit",()=>{if(e.isValid()){i.execute("mediaEmbed",e.url);s()}});t.on("change:isOpen",()=>e.resetFormStatus());t.on("cancel",()=>s());function s(){i.editing.view.focus();t.isOpen=false}}_setUpForm(t,e,n){t.delegate("submit","cancel").to(e);t.urlInputView.bind("value").to(n,"value");t.urlInputView.bind("isReadOnly").to(n,"isEnabled",t=>!t);t.saveButtonView.bind("isEnabled").to(n)}}function jA(t,e){return[e=>{if(!e.url.length){return t("o")}},n=>{if(!e.hasMedia(n.url)){return t("p")}}]}var zA=n(84);class BA extends Ow{static get requires(){return[lA,LA,OA,Vv]}static get pluginName(){return"MediaEmbed"}}function FA(t,e){for(const n of t.getChildren()){if(n.is("b")&&n.getStyle("font-weight")==="normal"){const i=t.getChildIndex(n);e.remove(n);e.insertChild(i,n.getChildren(),t)}}}function HA(t,e){if(!t.childCount){return}const n=new Vx;const i=WA(t,n);if(!i.length){return}let o=null;i.forEach((t,r)=>{if(!o||KA(i[r-1],t)){const i=qA(t,e);o=$A(i,t.element,n)}const s=GA(t.element,n);n.appendChild(s,o)})}function UA(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("li")){const n=t.getChild(0);if(n.is("p")){e.unwrapElement(n)}}}}function WA(t,e){const n=e.createRangeIn(t);const i=new Us({name:/^p|h\d+$/,styles:{"mso-list":/.*/}});const o=[];for(const t of n){if(t.type==="elementStart"&&i.match(t.item)){const e=YA(t.item);o.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}}return o}function qA(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi");const i=/mso-level-number-format:([^;]*);/gi;const o=n.exec(e);let r="decimal";if(o&&o[1]){const t=i.exec(o[1]);if(t&&t[1]){r=t[1].trim()}}return{type:r!=="bullet"&&r!=="image"?"ol":"ul",style:r}}function $A(t,e,n){const i=new Lc(t.type);const o=e.parent.getChildIndex(e);n.insertChild(o,i,e.parent);return i}function GA(t,e){QA(t,e);return e.rename("li",t)}function YA(t){const e={};const n=t.getStyle("mso-list");if(n){const t=n.match(/(^|\s+)l(\d+)/i);const i=n.match(/\s*lfo(\d+)/i);const o=n.match(/\s*level(\d+)/i);if(t&&i&&o){e.id=t[2];e.order=i[1];e.indent=o[1]}}return e}function QA(t,e){const n=new Us({name:"span",styles:{"mso-list":"Ignore"}});const i=e.createRangeIn(t);for(const t of i){if(t.type==="elementStart"&&n.match(t.item)){e.remove(t.item)}}}function KA(t,e){if(t.id!==e.id){return true}const n=e.element.previousSibling;if(!n){return true}return!JA(n)}function JA(t){return t.is("ol")||t.is("ul")}const ZA=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class XA{isActive(t){return ZA.test(t)}execute(t){const e=new Vx;FA(t.content,e);UA(t.content,e)}}function tT(t){return nT(nT(t)).replace(/([\s]*?)[\r\n]+(\s*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>(\s*[\r\n]\s*)<")}function eT(t){t.querySelectorAll("span[style*=spacerun]").forEach(t=>{const e=t.childNodes&&t.childNodes[0]&&t.childNodes[0].data&&t.childNodes[0].data.length||0;t.innerHTML=Array(e+1).join("  ").substr(0,e)})}function nT(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>e.length===1?" ":Array(e.length+1).join("  ").substr(0,e.length))}function iT(t){const e=new DOMParser;t=t.replace(/ end hide JavaScript diff --git a/datepicker/dynCalendar.css b/datepicker/dynCalendar.css new file mode 100755 index 0000000..fff6717 --- /dev/null +++ b/datepicker/dynCalendar.css @@ -0,0 +1,40 @@ +.dynCalendar_header{ + font-family: Arial, Verdana, Helvetica, Sans-Serif; + font-size: 10pt; + font-weight: bold; + z-index: 1000; +} +.dynCalendar_dayname { + background-color: #eeeeee; + border: 1px solid #c0c0c0; + font-family: Arial, Verdana, Helvetica, Sans-Serif; + font-size: 8pt; + text-align: center; + z-index: 1000; +} + +.dynCalendar_day { + background-color: #eeeeee; + color: #000000; + font-family: Arial, Verdana, Helvetica, Sans-Serif; + font-size: 8pt; + z-index: 1000; +} + +.dynCalendar_today { + background-color: #ffffff; + border: 1px solid #c0c0c0; + font-family: Arial, Verdana, Helvetica, Sans-Serif; + font-size: 8pt; + z-index: 1000; +} + +.dynCalendar { + background-color: #c0c0c0; + border: 2px outset white; + visibility: hidden; + position: absolute; + top: 1px; + left: 1px; + z-index: 1000; +} diff --git a/datepicker/dynCalendar.js b/datepicker/dynCalendar.js new file mode 100755 index 0000000..eab9cc6 --- /dev/null +++ b/datepicker/dynCalendar.js @@ -0,0 +1,465 @@ + + /** + * o------------------------------------------------------------------------------o + * | This package is licensed under the Phpguru license. A quick summary is | + * | that the code is free to use for non-commercial purposes. For commercial | + * | purposes of any kind there is a small license fee to pay. You can read more | + * | at: | + * | http://www.phpguru.org/static/license.html | + * o------------------------------------------------------------------------------o + * + * Copyright 2008 Richard Heyes + */ + +/** +* Global variables +*/ + dynCalendar_layers = new Array(); + dynCalendar_mouseoverStatus = false; + dynCalendar_mouseX = 0; + dynCalendar_mouseY = 0; + +/** +* The calendar constructor +* +* @access public +* @param string objName Name of the object that you create +* @param string callbackFunc Name of the callback function +* @param string OPTIONAL Optional layer name +* @param string OPTIONAL Optional images path +*/ + function dynCalendar(objName, callbackFunc) + { + /** + * Properties + */ + // Todays date + this.today = new Date(); + this.date = this.today.getDate(); + this.month = this.today.getMonth(); + this.year = this.today.getFullYear(); + + this.objName = objName; + this.callbackFunc = callbackFunc; + this.imagesPath = arguments[2] ? arguments[2] : 'images/'; + this.layerID = arguments[3] ? arguments[3] : 'dynCalendar_layer_' + dynCalendar_layers.length; + + /*byAli*/ + this.pos = arguments[4]; + + this.offsetX = 5; + this.offsetY = -155; + + this.useMonthCombo = true; + this.useYearCombo = true; + this.yearComboRange = 5; + + this.currentMonth = this.month; + this.currentYear = this.year; + + /** + * Public Methods + */ + this.show = dynCalendar_show; + this.writeHTML = dynCalendar_writeHTML; + + // Accessor methods + this.setOffset = dynCalendar_setOffset; + this.setOffsetX = dynCalendar_setOffsetX; + this.setOffsetY = dynCalendar_setOffsetY; + this.setImagesPath = dynCalendar_setImagesPath; + this.setMonthCombo = dynCalendar_setMonthCombo; + this.setYearCombo = dynCalendar_setYearCombo; + this.setCurrentMonth = dynCalendar_setCurrentMonth; + this.setCurrentYear = dynCalendar_setCurrentYear; + this.setYearComboRange = dynCalendar_setYearComboRange; + + /** + * Private methods + */ + // Layer manipulation + this._getLayer = dynCalendar_getLayer; + this._hideLayer = dynCalendar_hideLayer; + this._showLayer = dynCalendar_showLayer; + this._setLayerPosition = dynCalendar_setLayerPosition; + this._setHTML = dynCalendar_setHTML; + + // Miscellaneous + this._getDaysInMonth = dynCalendar_getDaysInMonth; + this._mouseover = dynCalendar_mouseover; + + /** + * Constructor type code + */ + dynCalendar_layers[dynCalendar_layers.length] = this; + this.writeHTML(); + } + +/** +* Shows the calendar, or updates the layer if +* already visible. +* +* @access public +* @param integer month Optional month number (0-11) +* @param integer year Optional year (YYYY format) +*/ + function dynCalendar_show() + { + // Variable declarations to prevent globalisation + var month, year, monthnames, numdays, thisMonth, firstOfMonth; + var ret, row, i, cssClass, linkHTML, previousMonth, previousYear; + var nextMonth, nextYear, prevImgHTML, prevLinkHTML, nextImgHTML, nextLinkHTML; + var monthComboOptions, monthCombo, yearComboOptions, yearCombo, html; + + this.currentMonth = month = arguments[0] != null ? arguments[0] : this.currentMonth; + this.currentYear = year = arguments[1] != null ? arguments[1] : this.currentYear; + + monthnames = new Array('Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'); + numdays = this._getDaysInMonth(month, year); + + thisMonth = new Date(year, month, 1); + firstOfMonth = thisMonth.getDay(); + + // First few blanks up to first day + ret = new Array(new Array()); + for(i=0; i' + (i++) + ''; + ret[row][ret[row].length] = '
' + linkHTML + '
'; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += '' + ret.join('\n') + ''; + html += '
' + prevLinkHTML + '' + monthCombo + ' ' + yearCombo + '' + nextLinkHTML + '
SoMoDiMiDoFrSa
'; + + this._setHTML(html); + if (!arguments[0] && !arguments[1]) { + this._showLayer(); + this._setLayerPosition(); + } + } + +/** +* Writes HTML to document for layer +* +* @access public +*/ + function dynCalendar_writeHTML() + { + if (is_ie5up || is_nav6up || is_gecko) { + document.write(''); + document.write('

'); + } + } + +/** +* Sets the offset to the mouse position +* that the calendar appears at. +* +* @access public +* @param integer Xoffset Number of pixels for vertical +* offset from mouse position +* @param integer Yoffset Number of pixels for horizontal +* offset from mouse position +*/ + function dynCalendar_setOffset(Xoffset, Yoffset) + { + this.setOffsetX(Xoffset); + this.setOffsetY(Yoffset); + } + +/** +* Sets the X offset to the mouse position +* that the calendar appears at. +* +* @access public +* @param integer Xoffset Number of pixels for horizontal +* offset from mouse position +*/ + function dynCalendar_setOffsetX(Xoffset) + { + this.offsetX = Xoffset; + } + +/** +* Sets the Y offset to the mouse position +* that the calendar appears at. +* +* @access public +* @param integer Yoffset Number of pixels for vertical +* offset from mouse position +*/ + function dynCalendar_setOffsetY(Yoffset) + { + this.offsetY = Yoffset; + } + +/** +* Sets the images path +* +* @access public +* @param string path Path to use for images +*/ + function dynCalendar_setImagesPath(path) + { + this.imagesPath = path; + } + +/** +* Turns on/off the month dropdown +* +* @access public +* @param boolean useMonthCombo Whether to use month dropdown or not +*/ + function dynCalendar_setMonthCombo(useMonthCombo) + { + this.useMonthCombo = useMonthCombo; + } + +/** +* Turns on/off the year dropdown +* +* @access public +* @param boolean useYearCombo Whether to use year dropdown or not +*/ + function dynCalendar_setYearCombo(useYearCombo) + { + this.useYearCombo = useYearCombo; + } + +/** +* Sets the current month being displayed +* +* @access public +* @param boolean month The month to set the current month to +*/ + function dynCalendar_setCurrentMonth(month) + { + this.currentMonth = month; + } + +/** +* Sets the current month being displayed +* +* @access public +* @param boolean year The year to set the current year to +*/ + function dynCalendar_setCurrentYear(year) + { + this.currentYear = year; + } + +/** +* Sets the range of the year combo. Displays this number of +* years either side of the year being displayed. +* +* @access public +* @param integer range The range to set +*/ + function dynCalendar_setYearComboRange(range) + { + this.yearComboRange = range; + } + +/** +* Returns the layer object +* +* @access private +*/ + function dynCalendar_getLayer() + { + var layerID = this.layerID; + + if (document.getElementById(layerID)) { + + return document.getElementById(layerID); + + } else if (document.all(layerID)) { + return document.all(layerID); + } + } + +/** +* Hides the calendar layer +* +* @access private +*/ + function dynCalendar_hideLayer() + { + this._getLayer().style.visibility = 'hidden'; + } + +/** +* Shows the calendar layer +* +* @access private +*/ + function dynCalendar_showLayer() + { + this._getLayer().style.visibility = 'visible'; + } + +/** +* Sets the layers position +* +* @access private +*/ + function dynCalendar_setLayerPosition() + { + this._getLayer().style.top = (dynCalendar_mouseY + this.offsetY) + 'px'; + this._getLayer().style.left = (dynCalendar_mouseX + this.offsetX) + 'px'; + } + +/** +* Sets the innerHTML attribute of the layer +* +* @access private +*/ + function dynCalendar_setHTML(html) + { + this._getLayer().innerHTML = html; + } + +/** +* Returns number of days in the supplied month +* +* @access private +* @param integer month The month to get number of days in +* @param integer year The year of the month in question +*/ + function dynCalendar_getDaysInMonth(month, year) + { + monthdays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + if (month != 1) { + return monthdays[month]; + } else { + return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28); + } + } + +/** +* onMouse(Over|Out) event handler +* +* @access private +* @param boolean status Whether the mouse is over the +* calendar or not +*/ + function dynCalendar_mouseover(status) + { + dynCalendar_mouseoverStatus = status; + return true; + } + +/** +* onMouseMove event handler +*/ + dynCalendar_oldOnmousemove = document.onmousemove ? document.onmousemove : new Function; + + document.onmousemove = function () + { + if (is_ie5up || is_nav6up || is_gecko) { + if (arguments[0]) { + dynCalendar_mouseX = arguments[0].pageX; + dynCalendar_mouseY = arguments[0].pageY; + } else { + dynCalendar_mouseX = event.clientX + document.body.scrollLeft; + dynCalendar_mouseY = event.clientY + document.body.scrollTop; + arguments[0] = null; + } + + dynCalendar_oldOnmousemove(); + } + } + +/** +* Callbacks for document.onclick +*/ + dynCalendar_oldOnclick = document.onclick ? document.onclick : new Function; + + document.onclick = function () + { + if (is_ie5up || is_nav6up || is_gecko) { + if(!dynCalendar_mouseoverStatus){ + for(i=0; i + + + + + + + + + + + + + + + + + + + + +
+ + .. + + bis + + .. + + +
+ + .. + + + +
+ + + + + +"; + +?> \ No newline at end of file diff --git a/datepicker/images/dynCalendar.gif b/datepicker/images/dynCalendar.gif new file mode 100755 index 0000000..b2bd3b4 Binary files /dev/null and b/datepicker/images/dynCalendar.gif differ diff --git a/datepicker/images/next.gif b/datepicker/images/next.gif new file mode 100755 index 0000000..b25fe2d Binary files /dev/null and b/datepicker/images/next.gif differ diff --git a/datepicker/images/prev.gif b/datepicker/images/prev.gif new file mode 100755 index 0000000..c880a45 Binary files /dev/null and b/datepicker/images/prev.gif differ diff --git a/fancybox-2.1.7/.gitattributes b/fancybox-2.1.7/.gitattributes new file mode 100755 index 0000000..f6bb280 --- /dev/null +++ b/fancybox-2.1.7/.gitattributes @@ -0,0 +1,7 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary +*.gif binary \ No newline at end of file diff --git a/fancybox-2.1.7/.gitignore b/fancybox-2.1.7/.gitignore new file mode 100755 index 0000000..ce2fd5f --- /dev/null +++ b/fancybox-2.1.7/.gitignore @@ -0,0 +1,3 @@ +.project +.settings +dist/ \ No newline at end of file diff --git a/fancybox-2.1.7/CHANGELOG.md b/fancybox-2.1.7/CHANGELOG.md new file mode 100755 index 0000000..b0d847e --- /dev/null +++ b/fancybox-2.1.7/CHANGELOG.md @@ -0,0 +1,125 @@ +fancyBox - Changelog +========= + +### Version 2.1.5 - June 14, 2013 +* Fixed #493 - Broken slideshow +* Fixed #556 - Parent option +* Retina graphics (#564) and retina display support (#420) +* Improved "lock" feature + +### Version 2.1.4 - January 10, 2013 +* Update to be compatible with jQuery v1.9 +* Small changes that should fix usability issues for certain users + +### Version 2.1.3 - October 23, 2012 + +* Fixed #426 - Broken IE7 +* Fixed #423 - Background flickering on iOS +* Fixed #418 - Automatically Grow/Shrink and Center +* Updated the script to work with jQuery 1.6 +* Media helper supports YouTube video series + +### Version 2.1.2 - October 15, 2012 + +* Fixed #414 - Don't allow nextClick if there is only one item +* Fixed #397 - Button helper 'Menu' not visible in IE7 +* Overlay can be opened/closed manually: +* $.fancybox.helpers.overlay.open(); +* $.fancybox.helpers.overlay.open({closeClick : false}); +* $.fancybox.helpers.overlay.close(); +* Optimized for Internet Explorer 10 (Windows 8) + +### Version 2.1.1 - October 01, 2012 + +* Fixed #357 - Converting values like 'auto' in getScalar() +* Fixed #358 - Updated overlay background image +* New "fancybox-href" and "fancybox-title" HTML5 data-attributes (#317) +* Improved helpers: +* - now they can have a property 'defaults' that contains default settings +* - updated vimeo and youtube parsers for media helper +* Content locking now can be turned off + +### Version 2.1.0 - August 20, 2012 + +* Fixed #103 - DOM element re-injection after closing +* Fixed #188 - navigation keys inside editable content +* New animation directions (see https://github.com/fancyapps/fancyBox/issues/233#issuecomment-5512453) +* New option "iframe" - it is now possible to separate scrolling for iframe and wrapping element; choose to preload +* New option "swf" - brings back functionality from fancyBox v1 +* Improved media helper - better support for vimeo and youtube; links are now configurable +* Rewritten overlay helper: +* - new option "showEarly" - toggles if should be open before of after content is loaded +* - Facebook-style (https://github.com/fancyapps/fancyBox/issues/24) and therefore uses image for background +* Option "padding" accepts array (e.g., padding: [15, 50, 10, 5]) +* One of dimensions (width or height) can now be set to "auto" (option "autoSize" needs to be "false") +* Updated callbacks: +* - "beforeClose" is now called only once +* - "afterLoad" receives current and previous object as arguments +* Method "$.fancybox.update();" recalculates content width/height +* Updated to work with jQuery v1.8 + +### Version 2.0.6 - April 16, 2012 + +* Fixed #188 - keystrokes in contenteditable +* Fixed #171 - non-images should not be preloaded +* Fixed #158 - 'closeClick: true' breaks gallery navigation +* New "media" helper - detects and displays various media types +* New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group" +* New feature - selector expressions in URLs, see #170 +* Improved 'overlay' helper to use "position: fixed" +* Improved autoSize, fixed wrong height in some cases +* Improved centering and iframe scrolling for iOS +* Updated markup, new element '.fancybox-skin' is now used for styling + +### Version 2.0.5 - February 21, 2012 + +* Fixed #155 - easing for prev/next animations +* Fixed #153 - overriding "keys" options +* Fixed #147 - IE7 problem with #hash links +* Fixed #130 - changing dynamically data-fancybox-group +* Fixed #126 - obey minWidth/minHeight +* Fixed #118 - placement of loading icon and navigation arrows +* Fixed #101 - "index" option not working +* Fixed #94 - "orig" option not working +* Fixed #80 - does not work on IE6 +* Fixed #72 - can't set overlay opacity to 0 +* Fixed #63 - properly set gallery index +* New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default +* New option "autoResize" - toggles responsivity, disabled for mobile devices by default +* New option "preload" - number of images to preload +* New feature to target mobile/desktop browsers using CSS, see #108 +* Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128 +* Updated loading icon for IE7, IE8 +* Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page + +### Version 2.0.4 - December 12, 2011 + +* Fixed #47 - fix overriding properties +* New option "position" to thumbnail and button helpers + + +### Version 2.0.3 - November 29, 2011 + +* Fixed #29 - broken elastic transitions + + +### Version 2.0.2 - November 28, 2011 + +* Fixed slideshow +* Fixed scrollbars issue when displayed a very tall image +* New option "nextClick" - navigate to next gallery item when user clicks the content +* New option "modal" - to disable navigation and closing +* Add 'metadata' plugin support +* Add ability to create groups using 'data-fancybox-group' attribute +* Updated manual usage to match earlier releases + + +### Version 2.0.1 - November 23, 2011 + +* Fixed keyboard events inside form elements +* Fixed manual usage + + +### Version 2.0.0 - November 21, 2011 + +First release - completely rewritten, many new features and updated graphics. \ No newline at end of file diff --git a/fancybox-2.1.7/README.md b/fancybox-2.1.7/README.md new file mode 100755 index 0000000..5fbd78d --- /dev/null +++ b/fancybox-2.1.7/README.md @@ -0,0 +1,244 @@ +fancyBox +======== + +fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. + +More information and examples: http://www.fancyapps.com/fancybox/ + +License: http://www.fancyapps.com/fancybox/#license + +Copyright (c) 2017 fancyapps.com + + +How to use +---------- + +To get started, download the plugin, unzip it and copy files to your website/application directory. +Load files in the section of your HTML document. Make sure you also add the jQuery library. + +```html + + + + + +``` + +Create your links with a `title` (or `data-fancybox-title`) if you want a title to be shown, and add a class: + +```html + +``` + +If you have a set of related items that you would like to group, +additionally include a group name in the `rel` (or `data-fancybox-group`) attribute: + +```html + + +``` + +Initialise the script like this: + +```html + +``` + +May also be passed an optional options object which will extend the default values. Example: + +```html + +``` + +Tip: Automatically group and apply fancyBox to all images: + +```js +$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox(); +``` + +Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display. +You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute: + +```html +//Ajax: +Example +//or +Example + +//Iframe: +Example + +//Inline (will display an element with `id="example"`) +Example + +//SWF: +Example + +//Image: +Example +``` + +Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy). +If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed. +(this is different from previsous versions where 'ajax' was used as default type or an error message was displayed). + +Advanced +-------- + +### Helpers + +Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'. +You can disable them, set custom options or enable other helpers. Examples: + +```js +//Disable title helper +$(".fancybox").fancybox({ + helpers: { + title: null + } +}); + +//Disable overlay helper +$(".fancybox").fancybox({ + helpers: { + overlay : null + } +}); + +//Change title position and overlay color +$(".fancybox").fancybox({ + helpers: { + title : { + type : 'inside' + }, + overlay : { + css : { + 'background' : 'rgba(255,255,255,0.5)' + } + } + } +}); + +//Enable thumbnail helper and set custom options +$(".fancybox").fancybox({ + helpers: { + thumbs : { + width: 50, + height: 50 + } + } +}); +``` + +### API + +Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title: + +```js +$(".fancybox").fancybox({ + beforeLoad : function() { + this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + + /* + "this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title: + this.title = $(this.element).find('img').attr('alt'); + */ + } +}); +``` + +It`s possible to open fancyBox programmatically in various ways: + +```js +//HTML content: +$.fancybox( '

Lorem Lipsum

Lorem lipsum

', { + title : 'Custom Title' +}); + +//DOM element: +$.fancybox( $("#inline"), { + title : 'Custom Title' +}); + +//Custom object: +$.fancybox({ + href: 'example.jpg', + title : 'Custom Title' +}); + +//Array of objects: +$.fancybox([ + { + href: 'example1.jpg', + title : 'Custom Title 1' + }, + { + href: 'example2.jpg', + title : 'Custom Title 2' + } +], { + padding: 0 +}); +``` + +There are several methods that allow you to interact with and manipulate fancyBox, example: + +```js +//Close fancybox: +$.fancybox.close(); +``` + +There is a simply way to access wrapping elements using JS: + +```js +$.fancybox.wrap +$.fancybox.skin +$.fancybox.outer +$.fancybox.inner +``` + +You can override CSS to customize the look. For example, make navigation arrows always visible, +change width and move them outside of area (use this snippet after including fancybox.css): + +```css +.fancybox-nav span { + visibility: visible; +} + +.fancybox-nav { + width: 80px; +} + +.fancybox-prev { + left: -80px; +} + +.fancybox-next { + right: -80px; +} +``` + +In that case, you might want to increase space around box: + +```js +$(".fancybox").fancybox({ + margin : [20, 60, 20, 60] +}); +``` + +Bug tracker +----------- + +Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues diff --git a/fancybox-2.1.7/bower.json b/fancybox-2.1.7/bower.json new file mode 100755 index 0000000..fcfcb1d --- /dev/null +++ b/fancybox-2.1.7/bower.json @@ -0,0 +1,35 @@ +{ + "name": "fancybox", + "title": "fancyBox", + "version": "2.1.7", + "description": "fancyBox offers an elegant way to present images, html content and multimedia for webpages", + "keywords": [ + "lightbox", + "effect", + "responsive", + "modal", + "window", + "ui" + ], + "license": "GPLv3", + "homepage": "http://fancyapps.com/fancybox/", + "main": [ + "source/jquery.fancybox.css", + "source/jquery.fancybox.pack.js", + "source/blank.gif", + "source/fancybox_loading.gif", + "source/fancybox_loading@2x.gif", + "source/fancybox_overlay.png", + "source/fancybox_sprite.png", + "source/fancybox_sprite@2x.png" + ], + "ignore": [ + "**/.*", + "fancybox.jquery.json", + "demo" + ], + "dependencies": { + "jquery": ">=1.10", + "jquery-mousewheel": "~3.1.3" + } +} diff --git a/fancybox-2.1.7/composer.json b/fancybox-2.1.7/composer.json new file mode 100755 index 0000000..23e936f --- /dev/null +++ b/fancybox-2.1.7/composer.json @@ -0,0 +1,14 @@ +{ + "name": "fancyapps/fancybox", + "type": "component", + "require": { + "robloach/component-installer": "*" + }, + "extra": { + "component": { + "files": [ + "source/*" + ] + } + } +} \ No newline at end of file diff --git a/fancybox-2.1.7/demo/1_b.jpg b/fancybox-2.1.7/demo/1_b.jpg new file mode 100755 index 0000000..0f662e3 Binary files /dev/null and b/fancybox-2.1.7/demo/1_b.jpg differ diff --git a/fancybox-2.1.7/demo/1_s.jpg b/fancybox-2.1.7/demo/1_s.jpg new file mode 100755 index 0000000..ef0bd55 Binary files /dev/null and b/fancybox-2.1.7/demo/1_s.jpg differ diff --git a/fancybox-2.1.7/demo/2_b.jpg b/fancybox-2.1.7/demo/2_b.jpg new file mode 100755 index 0000000..977cb6a Binary files /dev/null and b/fancybox-2.1.7/demo/2_b.jpg differ diff --git a/fancybox-2.1.7/demo/2_s.jpg b/fancybox-2.1.7/demo/2_s.jpg new file mode 100755 index 0000000..258cbcb Binary files /dev/null and b/fancybox-2.1.7/demo/2_s.jpg differ diff --git a/fancybox-2.1.7/demo/3_b.jpg b/fancybox-2.1.7/demo/3_b.jpg new file mode 100755 index 0000000..e007a51 Binary files /dev/null and b/fancybox-2.1.7/demo/3_b.jpg differ diff --git a/fancybox-2.1.7/demo/3_s.jpg b/fancybox-2.1.7/demo/3_s.jpg new file mode 100755 index 0000000..7206f24 Binary files /dev/null and b/fancybox-2.1.7/demo/3_s.jpg differ diff --git a/fancybox-2.1.7/demo/4_b.jpg b/fancybox-2.1.7/demo/4_b.jpg new file mode 100755 index 0000000..a3a12a6 Binary files /dev/null and b/fancybox-2.1.7/demo/4_b.jpg differ diff --git a/fancybox-2.1.7/demo/4_s.jpg b/fancybox-2.1.7/demo/4_s.jpg new file mode 100755 index 0000000..b9ea423 Binary files /dev/null and b/fancybox-2.1.7/demo/4_s.jpg differ diff --git a/fancybox-2.1.7/demo/5_b.jpg b/fancybox-2.1.7/demo/5_b.jpg new file mode 100755 index 0000000..ea1cfbc Binary files /dev/null and b/fancybox-2.1.7/demo/5_b.jpg differ diff --git a/fancybox-2.1.7/demo/5_s.jpg b/fancybox-2.1.7/demo/5_s.jpg new file mode 100755 index 0000000..989975d Binary files /dev/null and b/fancybox-2.1.7/demo/5_s.jpg differ diff --git a/fancybox-2.1.7/demo/ajax.txt b/fancybox-2.1.7/demo/ajax.txt new file mode 100755 index 0000000..6f9788c --- /dev/null +++ b/fancybox-2.1.7/demo/ajax.txt @@ -0,0 +1,15 @@ +
+

Lorem ipsum dolor sit amet3

+

+ Close me +

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas fermentum ante et sapien dignissim in viverra magna feugiat. Donec tempus ipsum nec neque dignissim quis eleifend eros gravida. Praesent nisi massa, sodales quis tincidunt ac, semper quis risus. In suscipit nisl sed leo aliquet consequat. Integer vitae augue in risus porttitor pellentesque eu eget odio. Fusce ut sagittis quam. Morbi aliquam interdum blandit. Integer pharetra tempor velit, aliquam dictum justo tempus sed. Morbi congue fringilla justo a feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis metus et nisl consectetur pharetra. Nam bibendum turpis eu metus luctus eu volutpat sem molestie. Nam sollicitudin porttitor lorem, ac ultricies est venenatis eu. Ut dignissim elit et orci feugiat ac placerat purus euismod. Ut mi lorem, cursus et sagittis elementum, luctus ac massa. +

+

+ Phasellus et ligula vel diam ullamcorper volutpat. Integer rhoncus rhoncus aliquam. Aliquam erat volutpat. Aenean luctus vestibulum placerat. Quisque quam neque, lacinia aliquet eleifend ac, aliquet blandit felis. Curabitur porta ultricies dui, sit amet mattis quam euismod a. Ut eleifend scelerisque neque, sit amet accumsan odio consequat ut. Proin facilisis auctor elit sed accumsan. Cras dapibus nisl in nisi rhoncus laoreet. Nullam pellentesque tortor libero, eget facilisis ipsum. Donec ultricies tellus tellus, in tincidunt purus. Nullam in est aliquam velit scelerisque blandit. In tincidunt, magna a dapibus imperdiet, quam urna elementum leo, vitae rhoncus nisl velit cursus velit. In dignissim sem ac mauris rhoncus ornare. +

+

+ Duis imperdiet velit vel quam malesuada suscipit imperdiet tellus hendrerit. Mauris vestibulum odio mauris, ut placerat leo. Mauris quis neque at tellus feugiat congue id non enim. Nam vehicula posuere nulla eget vehicula. Donec pretium purus nec ligula porta eu laoreet sapien venenatis. Nulla facilisi. Phasellus eget mi enim. Phasellus molestie tincidunt ultrices. Aenean id sem a tellus lobortis tincidunt. Nam laoreet nulla vel velit tincidunt ac rutrum libero malesuada. Nulla consequat dolor quis nisl tempor fermentum. Integer sodales pretium varius. Aenean a leo vitae odio dictum dignissim malesuada nec dolor. Phasellus adipiscing viverra est, ac sagittis libero sagittis quis. Sed interdum dapibus nunc et fringilla. Nunc vel velit et urna laoreet bibendum. +

+
\ No newline at end of file diff --git a/fancybox-2.1.7/demo/iframe.html b/fancybox-2.1.7/demo/iframe.html new file mode 100755 index 0000000..b586e15 --- /dev/null +++ b/fancybox-2.1.7/demo/iframe.html @@ -0,0 +1,26 @@ + + + + fancyBox - iframe demo + + + +

fancyBox - iframe demo

+ +

+ Close iframe parent + + | + + Change content +

+ +

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque justo ac eros consectetur bibendum. In hac habitasse platea dictumst. Nulla aliquam turpis et tellus elementum luctus. Duis sit amet rhoncus velit. Duis nisl ligula, mattis interdum blandit laoreet, mattis id ante. Cras pulvinar lacus vitae nisi egestas non euismod neque bibendum. Vestibulum faucibus libero id ante molestie ultricies. Vestibulum quis nibh felis. Vestibulum libero nisl, vehicula vel ullamcorper sit amet, tristique sit amet augue. Etiam urna neque, porttitor sed sodales lacinia, posuere a nisl. Vestibulum blandit neque in sapien volutpat ac condimentum sapien auctor. Ut imperdiet venenatis ultricies. Phasellus accumsan, sem eu placerat commodo, felis purus commodo ipsum, sit amet vulputate orci est viverra est. +

+ +

+ Aenean velit est, condimentum ut iaculis ut, accumsan at mi. Maecenas velit mi, venenatis ut condimentum at, ultrices vel tortor. Curabitur pharetra ornare dapibus. Ut volutpat cursus semper. In hac habitasse platea dictumst. Donec eu iaculis ipsum. Morbi eu dolor velit, a semper nunc. +

+ + \ No newline at end of file diff --git a/fancybox-2.1.7/demo/index.html b/fancybox-2.1.7/demo/index.html new file mode 100755 index 0000000..e227c7a --- /dev/null +++ b/fancybox-2.1.7/demo/index.html @@ -0,0 +1,312 @@ + + + + fancyBox - Fancy jQuery Lightbox Alternative | Demonstration + + + + + + + + + + + + + + + + + + + + + + + + + + + +

fancyBox

+ +

This is a demonstration. More information and examples: www.fancyapps.com/fancybox/

+ +

Simple image gallery

+

+ + + + + + + +

+ +

Different effects

+

+ + + + + + + +

+ +

Various types

+

+ fancyBox will try to guess content type from href attribute but you can specify it directly by adding classname (fancybox.image, fancybox.iframe, etc). +

+ + + + +

+ Ajax example will not run from your local computer and requires a server to run. +

+ +

Button helper

+

+ + + + + + + +

+ +

Thumbnail helper

+

+ + + + + + + +

+ +

Media helper

+

+ Will not run from your local computer, requires a server to run. +

+ + + +

Open manually

+ + +

+ Photo Credit: Instagrammer @whitjohns +

+ + \ No newline at end of file diff --git a/fancybox-2.1.7/fancybox.jquery.json b/fancybox-2.1.7/fancybox.jquery.json new file mode 100755 index 0000000..a32e45f --- /dev/null +++ b/fancybox-2.1.7/fancybox.jquery.json @@ -0,0 +1,31 @@ +{ + "name": "fancybox", + "title": "fancyBox", + "description": "fancyBox offers an elegant way to present images, html content and multimedia for webpages", + "keywords": [ + "lightbox", + "effect", + "responsive", + "modal", + "window", + "ui" + ], + "version": "2.1.5", + "author": { + "name": "Janis Skarnelis", + "url": "http://fancyapps.com/contact/" + }, + "licenses": [ + { + "type": "fancyBox", + "url": "http://fancyapps.com/fancybox/#license" + } + ], + "homepage": "http://fancyapps.com/fancybox/", + "docs": "http://fancyapps.com/fancybox/#docs", + "download": "http://fancyapps.com/fancybox/#license", + "bugs": "https://github.com/fancyapps/fancyBox/issues", + "dependencies": { + "jquery": ">=1.7" + } +} \ No newline at end of file diff --git a/fancybox-2.1.7/gulpfile.js b/fancybox-2.1.7/gulpfile.js new file mode 100755 index 0000000..4b1cebe --- /dev/null +++ b/fancybox-2.1.7/gulpfile.js @@ -0,0 +1,76 @@ +/* jshint node: true */ +/* global $: true */ +"use strict"; + +var gulp = require("gulp"), + $ = require("gulp-load-plugins")(); +var config = { + js: [ + "lib/jquery.mousewheel.pack.js", + "source/jquery.fancybox.pack.js", + "source/helpers/jquery.fancybox-buttons.js", + "source/helpers/jquery.fancybox-thumbs.js", + "source/helpers/jquery.fancybox-media.js" + ], + css: [ + "source/jquery.fancybox.css", + "source/helpers/jquery.fancybox-buttons.css", + "source/helpers/jquery.fancybox-thumbs.css" + ], + images: [ + "source/helpers/**/*.{jpg,png,svg,gif,webp,ico}", + "source/*.{jpg,png,svg,gif,webp,ico}" + ] + }, + dist = { + images: "dist/images/fancybox", + css: "dist/css", + js: "dist/js" + }; + + +/* + - |-------------------------------------------------------------------------- + - | Gulp Front Tasks + - |-------------------------------------------------------------------------- + - | + + * + + * + */ + +gulp.task("clean", function () { + return gulp.src("dist", {read: false}) + .pipe($.clean()); +}); + +gulp.task("scripts", function () { + return gulp.src(config.js) + .pipe($.plumberNotifier()) + .pipe($.concat("jquery.fancybox.min.js")) + .pipe($.uglify()) + .pipe(gulp.dest(dist.js)); +}); + +gulp.task("styles", function () { + return gulp.src(config.css) + .pipe($.plumberNotifier()) + .pipe($.concat("jquery.fancybox.min.css")) + .pipe($.autoprefixer("last 5 version")) + .pipe($.replace(/url\('?(.*)'?\)/g, "url('../images/fancybox/$1')")) + .pipe($.replace("''", "'")) + .pipe($.cleanCss({compatibility: 'ie8'})) + .pipe(gulp.dest(dist.css)) +}); + +gulp.task("images", function () { + return gulp.src(config.images) + .pipe($.newer(dist.images)) + .pipe(gulp.dest(dist.images)); +}); + + +gulp.task('default', ["images", "styles", "scripts"]); + + + + \ No newline at end of file diff --git a/fancybox-2.1.7/lib/jquery-1.10.2.min.js b/fancybox-2.1.7/lib/jquery-1.10.2.min.js new file mode 100755 index 0000000..da41706 --- /dev/null +++ b/fancybox-2.1.7/lib/jquery-1.10.2.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-1.10.2.min.map +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
t
",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t +}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("', + error : '

The requested content cannot be loaded.
Please try again later.

', + closeBtn : '', + next : '', + prev : '', + loading : '
' + }, + + // Properties for each animation type + // Opening fancyBox + openEffect : 'fade', // 'elastic', 'fade' or 'none' + openSpeed : 250, + openEasing : 'swing', + openOpacity : true, + openMethod : 'zoomIn', + + // Closing fancyBox + closeEffect : 'fade', // 'elastic', 'fade' or 'none' + closeSpeed : 250, + closeEasing : 'swing', + closeOpacity : true, + closeMethod : 'zoomOut', + + // Changing next gallery item + nextEffect : 'elastic', // 'elastic', 'fade' or 'none' + nextSpeed : 250, + nextEasing : 'swing', + nextMethod : 'changeIn', + + // Changing previous gallery item + prevEffect : 'elastic', // 'elastic', 'fade' or 'none' + prevSpeed : 250, + prevEasing : 'swing', + prevMethod : 'changeOut', + + // Enable default helpers + helpers : { + overlay : true, + title : true + }, + + // Callbacks + onCancel : $.noop, // If canceling + beforeLoad : $.noop, // Before loading + afterLoad : $.noop, // After loading + beforeShow : $.noop, // Before changing in current item + afterShow : $.noop, // After opening + beforeChange : $.noop, // Before changing gallery item + beforeClose : $.noop, // Before closing + afterClose : $.noop // After closing + }, + + //Current state + group : {}, // Selected group + opts : {}, // Group options + previous : null, // Previous element + coming : null, // Element being loaded + current : null, // Currently loaded element + isActive : false, // Is activated + isOpen : false, // Is currently open + isOpened : false, // Have been fully opened at least once + + wrap : null, + skin : null, + outer : null, + inner : null, + + player : { + timer : null, + isActive : false + }, + + // Loaders + ajaxLoad : null, + imgPreload : null, + + // Some collections + transitions : {}, + helpers : {}, + + /* + * Static methods + */ + + open: function (group, opts) { + if (!group) { + return; + } + + if (!$.isPlainObject(opts)) { + opts = {}; + } + + // Close if already active + if (false === F.close(true)) { + return; + } + + // Normalize group + if (!$.isArray(group)) { + group = isQuery(group) ? $(group).get() : [group]; + } + + // Recheck if the type of each element is `object` and set content type (image, ajax, etc) + $.each(group, function(i, element) { + var obj = {}, + href, + title, + content, + type, + rez, + hrefParts, + selector; + + if ($.type(element) === "object") { + // Check if is DOM element + if (element.nodeType) { + element = $(element); + } + + if (isQuery(element)) { + obj = { + href : element.data('fancybox-href') || element.attr('href'), + title : $('
').text( element.data('fancybox-title') || element.attr('title') || '' ).html(), + isDom : true, + element : element + }; + + if ($.metadata) { + $.extend(true, obj, element.metadata()); + } + + } else { + obj = element; + } + } + + href = opts.href || obj.href || (isString(element) ? element : null); + title = opts.title !== undefined ? opts.title : obj.title || ''; + + content = opts.content || obj.content; + type = content ? 'html' : (opts.type || obj.type); + + if (!type && obj.isDom) { + type = element.data('fancybox-type'); + + if (!type) { + rez = element.prop('class').match(/fancybox\.(\w+)/); + type = rez ? rez[1] : null; + } + } + + if (isString(href)) { + // Try to guess the content type + if (!type) { + if (F.isImage(href)) { + type = 'image'; + + } else if (F.isSWF(href)) { + type = 'swf'; + + } else if (href.charAt(0) === '#') { + type = 'inline'; + + } else if (isString(element)) { + type = 'html'; + content = element; + } + } + + // Split url into two pieces with source url and content selector, e.g, + // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" + if (type === 'ajax') { + hrefParts = href.split(/\s+/, 2); + href = hrefParts.shift(); + selector = hrefParts.shift(); + } + } + + if (!content) { + if (type === 'inline') { + if (href) { + content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 + + } else if (obj.isDom) { + content = element; + } + + } else if (type === 'html') { + content = href; + + } else if (!type && !href && obj.isDom) { + type = 'inline'; + content = element; + } + } + + $.extend(obj, { + href : href, + type : type, + content : content, + title : title, + selector : selector + }); + + group[ i ] = obj; + }); + + // Extend the defaults + F.opts = $.extend(true, {}, F.defaults, opts); + + // All options are merged recursive except keys + if (opts.keys !== undefined) { + F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; + } + + F.group = group; + + return F._start(F.opts.index); + }, + + // Cancel image loading or abort ajax request + cancel: function () { + var coming = F.coming; + + if (coming && false === F.trigger('onCancel')) { + return; + } + + F.hideLoading(); + + if (!coming) { + return; + } + + if (F.ajaxLoad) { + F.ajaxLoad.abort(); + } + + F.ajaxLoad = null; + + if (F.imgPreload) { + F.imgPreload.onload = F.imgPreload.onerror = null; + } + + if (coming.wrap) { + coming.wrap.stop(true, true).trigger('onReset').remove(); + } + + F.coming = null; + + // If the first item has been canceled, then clear everything + if (!F.current) { + F._afterZoomOut( coming ); + } + }, + + // Start closing animation if is open; remove immediately if opening/closing + close: function (event) { + F.cancel(); + + if (false === F.trigger('beforeClose')) { + return; + } + + F.unbindEvents(); + + if (!F.isActive) { + return; + } + + if (!F.isOpen || event === true) { + $('.fancybox-wrap').stop(true).trigger('onReset').remove(); + + F._afterZoomOut(); + + } else { + F.isOpen = F.isOpened = false; + F.isClosing = true; + + $('.fancybox-item, .fancybox-nav').remove(); + + F.wrap.stop(true, true).removeClass('fancybox-opened'); + + F.transitions[ F.current.closeMethod ](); + } + }, + + // Manage slideshow: + // $.fancybox.play(); - toggle slideshow + // $.fancybox.play( true ); - start + // $.fancybox.play( false ); - stop + play: function ( action ) { + var clear = function () { + clearTimeout(F.player.timer); + }, + set = function () { + clear(); + + if (F.current && F.player.isActive) { + F.player.timer = setTimeout(F.next, F.current.playSpeed); + } + }, + stop = function () { + clear(); + + D.unbind('.player'); + + F.player.isActive = false; + + F.trigger('onPlayEnd'); + }, + start = function () { + if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { + F.player.isActive = true; + + D.bind({ + 'onCancel.player beforeClose.player' : stop, + 'onUpdate.player' : set, + 'beforeLoad.player' : clear + }); + + set(); + + F.trigger('onPlayStart'); + } + }; + + if (action === true || (!F.player.isActive && action !== false)) { + start(); + } else { + stop(); + } + }, + + // Navigate to next gallery item + next: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.next; + } + + F.jumpto(current.index + 1, direction, 'next'); + } + }, + + // Navigate to previous gallery item + prev: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.prev; + } + + F.jumpto(current.index - 1, direction, 'prev'); + } + }, + + // Navigate to gallery item by index + jumpto: function ( index, direction, router ) { + var current = F.current; + + if (!current) { + return; + } + + index = getScalar(index); + + F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; + F.router = router || 'jumpto'; + + if (current.loop) { + if (index < 0) { + index = current.group.length + (index % current.group.length); + } + + index = index % current.group.length; + } + + if (current.group[ index ] !== undefined) { + F.cancel(); + + F._start(index); + } + }, + + // Center inside viewport and toggle position type to fixed or absolute if needed + reposition: function (e, onlyAbsolute) { + var current = F.current, + wrap = current ? current.wrap : null, + pos; + + if (wrap) { + pos = F._getPosition(onlyAbsolute); + + if (e && e.type === 'scroll') { + delete pos.position; + + wrap.stop(true, true).animate(pos, 200); + + } else { + wrap.css(pos); + + current.pos = $.extend({}, current.dim, pos); + } + } + }, + + update: function (e) { + var type = (e && e.originalEvent && e.originalEvent.type), + anyway = !type || type === 'orientationchange'; + + if (anyway) { + clearTimeout(didUpdate); + + didUpdate = null; + } + + if (!F.isOpen || didUpdate) { + return; + } + + didUpdate = setTimeout(function() { + var current = F.current; + + if (!current || F.isClosing) { + return; + } + + F.wrap.removeClass('fancybox-tmp'); + + if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { + F._setDimension(); + } + + if (!(type === 'scroll' && current.canShrink)) { + F.reposition(e); + } + + F.trigger('onUpdate'); + + didUpdate = null; + + }, (anyway && !isTouch ? 0 : 300)); + }, + + // Shrink content to fit inside viewport or restore if resized + toggle: function ( action ) { + if (F.isOpen) { + F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; + + // Help browser to restore document dimensions + if (isTouch) { + F.wrap.removeAttr('style').addClass('fancybox-tmp'); + + F.trigger('onUpdate'); + } + + F.update(); + } + }, + + hideLoading: function () { + D.unbind('.loading'); + + $('#fancybox-loading').remove(); + }, + + showLoading: function () { + var el, viewport; + + F.hideLoading(); + + el = $(F.opts.tpl.loading).click(F.cancel).appendTo('body'); + + // If user will press the escape-button, the request will be canceled + D.bind('keydown.loading', function(e) { + if ((e.which || e.keyCode) === 27) { + e.preventDefault(); + + F.cancel(); + } + }); + + if (!F.defaults.fixed) { + viewport = F.getViewport(); + + el.css({ + position : 'absolute', + top : (viewport.h * 0.5) + viewport.y, + left : (viewport.w * 0.5) + viewport.x + }); + } + + F.trigger('onLoading'); + }, + + getViewport: function () { + var locked = (F.current && F.current.locked) || false, + rez = { + x: W.scrollLeft(), + y: W.scrollTop() + }; + + if (locked && locked.length) { + rez.w = locked[0].clientWidth; + rez.h = locked[0].clientHeight; + + } else { + // See http://bugs.jquery.com/ticket/6724 + rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); + rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); + } + + return rez; + }, + + // Unbind the keyboard / clicking actions + unbindEvents: function () { + if (F.wrap && isQuery(F.wrap)) { + F.wrap.unbind('.fb'); + } + + D.unbind('.fb'); + W.unbind('.fb'); + }, + + bindEvents: function () { + var current = F.current, + keys; + + if (!current) { + return; + } + + // Changing document height on iOS devices triggers a 'resize' event, + // that can change document height... repeating infinitely + W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); + + keys = current.keys; + + if (keys) { + D.bind('keydown.fb', function (e) { + var code = e.which || e.keyCode, + target = e.target || e.srcElement; + + // Skip esc key if loading, because showLoading will cancel preloading + if (code === 27 && F.coming) { + return false; + } + + // Ignore key combinations and key events within form elements + if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { + $.each(keys, function(i, val) { + if (current.group.length > 1 && val[ code ] !== undefined) { + F[ i ]( val[ code ] ); + + e.preventDefault(); + return false; + } + + if ($.inArray(code, val) > -1) { + F[ i ] (); + + e.preventDefault(); + return false; + } + }); + } + }); + } + + if ($.fn.mousewheel && current.mouseWheel) { + F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { + var target = e.target || null, + parent = $(target), + canScroll = false; + + while (parent.length) { + if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { + break; + } + + canScroll = isScrollable( parent[0] ); + parent = $(parent).parent(); + } + + if (delta !== 0 && !canScroll) { + if (F.group.length > 1 && !current.canShrink) { + if (deltaY > 0 || deltaX > 0) { + F.prev( deltaY > 0 ? 'down' : 'left' ); + + } else if (deltaY < 0 || deltaX < 0) { + F.next( deltaY < 0 ? 'up' : 'right' ); + } + + e.preventDefault(); + } + } + }); + } + }, + + trigger: function (event, o) { + var ret, obj = o || F.coming || F.current; + + if (obj) { + if ($.isFunction( obj[event] )) { + ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); + } + + if (ret === false) { + return false; + } + + if (obj.helpers) { + $.each(obj.helpers, function (helper, opts) { + if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { + F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); + } + }); + } + } + + D.trigger(event); + }, + + isImage: function (str) { + return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); + }, + + isSWF: function (str) { + return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); + }, + + _start: function (index) { + var coming = {}, + obj, + href, + type, + margin, + padding; + + index = getScalar( index ); + obj = F.group[ index ] || null; + + if (!obj) { + return false; + } + + coming = $.extend(true, {}, F.opts, obj); + + // Convert margin and padding properties to array - top, right, bottom, left + margin = coming.margin; + padding = coming.padding; + + if ($.type(margin) === 'number') { + coming.margin = [margin, margin, margin, margin]; + } + + if ($.type(padding) === 'number') { + coming.padding = [padding, padding, padding, padding]; + } + + // 'modal' propery is just a shortcut + if (coming.modal) { + $.extend(true, coming, { + closeBtn : false, + closeClick : false, + nextClick : false, + arrows : false, + mouseWheel : false, + keys : null, + helpers: { + overlay : { + closeClick : false + } + } + }); + } + + // 'autoSize' property is a shortcut, too + if (coming.autoSize) { + coming.autoWidth = coming.autoHeight = true; + } + + if (coming.width === 'auto') { + coming.autoWidth = true; + } + + if (coming.height === 'auto') { + coming.autoHeight = true; + } + + /* + * Add reference to the group, so it`s possible to access from callbacks, example: + * afterLoad : function() { + * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + * } + */ + + coming.group = F.group; + coming.index = index; + + // Give a chance for callback or helpers to update coming item (type, title, etc) + F.coming = coming; + + if (false === F.trigger('beforeLoad')) { + F.coming = null; + + return; + } + + type = coming.type; + href = coming.href; + + if (!type) { + F.coming = null; + + //If we can not determine content type then drop silently or display next/prev item if looping through gallery + if (F.current && F.router && F.router !== 'jumpto') { + F.current.index = index; + + return F[ F.router ]( F.direction ); + } + + return false; + } + + F.isActive = true; + + if (type === 'image' || type === 'swf') { + coming.autoHeight = coming.autoWidth = false; + coming.scrolling = 'visible'; + } + + if (type === 'image') { + coming.aspectRatio = true; + } + + if (type === 'iframe' && isTouch) { + coming.scrolling = 'scroll'; + } + + // Build the neccessary markup + coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); + + $.extend(coming, { + skin : $('.fancybox-skin', coming.wrap), + outer : $('.fancybox-outer', coming.wrap), + inner : $('.fancybox-inner', coming.wrap) + }); + + $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { + coming.skin.css('padding' + v, getValue(coming.padding[ i ])); + }); + + F.trigger('onReady'); + + // Check before try to load; 'inline' and 'html' types need content, others - href + if (type === 'inline' || type === 'html') { + if (!coming.content || !coming.content.length) { + return F._error( 'content' ); + } + + } else if (!href) { + return F._error( 'href' ); + } + + if (type === 'image') { + F._loadImage(); + + } else if (type === 'ajax') { + F._loadAjax(); + + } else if (type === 'iframe') { + F._loadIframe(); + + } else { + F._afterLoad(); + } + }, + + _error: function ( type ) { + $.extend(F.coming, { + type : 'html', + autoWidth : true, + autoHeight : true, + minWidth : 0, + minHeight : 0, + scrolling : 'no', + hasError : type, + content : F.coming.tpl.error + }); + + F._afterLoad(); + }, + + _loadImage: function () { + // Reset preload image so it is later possible to check "complete" property + var img = F.imgPreload = new Image(); + + img.onload = function () { + this.onload = this.onerror = null; + + F.coming.width = this.width / F.opts.pixelRatio; + F.coming.height = this.height / F.opts.pixelRatio; + + F._afterLoad(); + }; + + img.onerror = function () { + this.onload = this.onerror = null; + + F._error( 'image' ); + }; + + img.src = F.coming.href; + + if (img.complete !== true) { + F.showLoading(); + } + }, + + _loadAjax: function () { + var coming = F.coming; + + F.showLoading(); + + F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { + url: coming.href, + error: function (jqXHR, textStatus) { + if (F.coming && textStatus !== 'abort') { + F._error( 'ajax', jqXHR ); + + } else { + F.hideLoading(); + } + }, + success: function (data, textStatus) { + if (textStatus === 'success') { + coming.content = data; + + F._afterLoad(); + } + } + })); + }, + + _loadIframe: function() { + var coming = F.coming, + iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) + .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) + .attr('src', coming.href); + + // This helps IE + $(coming.wrap).bind('onReset', function () { + try { + $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); + } catch (e) {} + }); + + if (coming.iframe.preload) { + F.showLoading(); + + iframe.one('load', function() { + $(this).data('ready', 1); + + // iOS will lose scrolling if we resize + if (!isTouch) { + $(this).bind('load.fb', F.update); + } + + // Without this trick: + // - iframe won't scroll on iOS devices + // - IE7 sometimes displays empty iframe + $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); + + F._afterLoad(); + }); + } + + coming.content = iframe.appendTo( coming.inner ); + + if (!coming.iframe.preload) { + F._afterLoad(); + } + }, + + _preloadImages: function() { + var group = F.group, + current = F.current, + len = group.length, + cnt = current.preload ? Math.min(current.preload, len - 1) : 0, + item, + i; + + for (i = 1; i <= cnt; i += 1) { + item = group[ (current.index + i ) % len ]; + + if (item.type === 'image' && item.href) { + new Image().src = item.href; + } + } + }, + + _afterLoad: function () { + var coming = F.coming, + previous = F.current, + placeholder = 'fancybox-placeholder', + current, + content, + type, + scrolling, + href, + embed; + + F.hideLoading(); + + if (!coming || F.isActive === false) { + return; + } + + if (false === F.trigger('afterLoad', coming, previous)) { + coming.wrap.stop(true).trigger('onReset').remove(); + + F.coming = null; + + return; + } + + if (previous) { + F.trigger('beforeChange', previous); + + previous.wrap.stop(true).removeClass('fancybox-opened') + .find('.fancybox-item, .fancybox-nav') + .remove(); + } + + F.unbindEvents(); + + current = coming; + content = coming.content; + type = coming.type; + scrolling = coming.scrolling; + + $.extend(F, { + wrap : current.wrap, + skin : current.skin, + outer : current.outer, + inner : current.inner, + current : current, + previous : previous + }); + + href = current.href; + + switch (type) { + case 'inline': + case 'ajax': + case 'html': + if (current.selector) { + content = $('
').html(content).find(current.selector); + + } else if (isQuery(content)) { + if (!content.data(placeholder)) { + content.data(placeholder, $('
').insertAfter( content ).hide() ); + } + + content = content.show().detach(); + + current.wrap.bind('onReset', function () { + if ($(this).find(content).length) { + content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); + } + }); + } + break; + + case 'image': + content = current.tpl.image.replace(/\{href\}/g, href); + break; + + case 'swf': + content = ''; + embed = ''; + + $.each(current.swf, function(name, val) { + content += ''; + embed += ' ' + name + '="' + val + '"'; + }); + + content += ''; + break; + } + + if (!(isQuery(content) && content.parent().is(current.inner))) { + current.inner.append( content ); + } + + // Give a chance for helpers or callbacks to update elements + F.trigger('beforeShow'); + + // Set scrolling before calculating dimensions + current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); + + // Set initial dimensions and start position + F._setDimension(); + + F.reposition(); + + F.isOpen = false; + F.coming = null; + + F.bindEvents(); + + if (!F.isOpened) { + $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); + + } else if (previous.prevMethod) { + F.transitions[ previous.prevMethod ](); + } + + F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); + + F._preloadImages(); + }, + + _setDimension: function () { + var viewport = F.getViewport(), + steps = 0, + canShrink = false, + canExpand = false, + wrap = F.wrap, + skin = F.skin, + inner = F.inner, + current = F.current, + width = current.width, + height = current.height, + minWidth = current.minWidth, + minHeight = current.minHeight, + maxWidth = current.maxWidth, + maxHeight = current.maxHeight, + scrolling = current.scrolling, + scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, + margin = current.margin, + wMargin = getScalar(margin[1] + margin[3]), + hMargin = getScalar(margin[0] + margin[2]), + wPadding, + hPadding, + wSpace, + hSpace, + origWidth, + origHeight, + origMaxWidth, + origMaxHeight, + ratio, + width_, + height_, + maxWidth_, + maxHeight_, + iframe, + body; + + // Reset dimensions so we could re-check actual size + wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); + + wPadding = getScalar(skin.outerWidth(true) - skin.width()); + hPadding = getScalar(skin.outerHeight(true) - skin.height()); + + // Any space between content and viewport (margin, padding, border, title) + wSpace = wMargin + wPadding; + hSpace = hMargin + hPadding; + + origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; + origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; + + if (current.type === 'iframe') { + iframe = current.content; + + if (current.autoHeight && iframe && iframe.data('ready') === 1) { + try { + if (iframe[0].contentWindow.document.location) { + inner.width( origWidth ).height(9999); + + body = iframe.contents().find('body'); + + if (scrollOut) { + body.css('overflow-x', 'hidden'); + } + + origHeight = body.outerHeight(true); + } + + } catch (e) {} + } + + } else if (current.autoWidth || current.autoHeight) { + inner.addClass( 'fancybox-tmp' ); + + // Set width or height in case we need to calculate only one dimension + if (!current.autoWidth) { + inner.width( origWidth ); + } + + if (!current.autoHeight) { + inner.height( origHeight ); + } + + if (current.autoWidth) { + origWidth = inner.width(); + } + + if (current.autoHeight) { + origHeight = inner.height(); + } + + inner.removeClass( 'fancybox-tmp' ); + } + + width = getScalar( origWidth ); + height = getScalar( origHeight ); + + ratio = origWidth / origHeight; + + // Calculations for the content + minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); + maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); + + minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); + maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); + + // These will be used to determine if wrap can fit in the viewport + origMaxWidth = maxWidth; + origMaxHeight = maxHeight; + + if (current.fitToView) { + maxWidth = Math.min(viewport.w - wSpace, maxWidth); + maxHeight = Math.min(viewport.h - hSpace, maxHeight); + } + + maxWidth_ = viewport.w - wMargin; + maxHeight_ = viewport.h - hMargin; + + if (current.aspectRatio) { + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + if (height > maxHeight) { + height = maxHeight; + width = getScalar(height * ratio); + } + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (height < minHeight) { + height = minHeight; + width = getScalar(height * ratio); + } + + } else { + width = Math.max(minWidth, Math.min(width, maxWidth)); + + if (current.autoHeight && current.type !== 'iframe') { + inner.width( width ); + + height = inner.height(); + } + + height = Math.max(minHeight, Math.min(height, maxHeight)); + } + + // Try to fit inside viewport (including the title) + if (current.fitToView) { + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + // Real wrap dimensions + width_ = wrap.width(); + height_ = wrap.height(); + + if (current.aspectRatio) { + while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { + if (steps++ > 19) { + break; + } + + height = Math.max(minHeight, Math.min(maxHeight, height - 10)); + width = getScalar(height * ratio); + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + } + + } else { + width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); + height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); + } + } + + if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { + width += scrollOut; + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + + canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; + canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); + + $.extend(current, { + dim : { + width : getValue( width_ ), + height : getValue( height_ ) + }, + origWidth : origWidth, + origHeight : origHeight, + canShrink : canShrink, + canExpand : canExpand, + wPadding : wPadding, + hPadding : hPadding, + wrapSpace : height_ - skin.outerHeight(true), + skinSpace : skin.height() - height + }); + + if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { + inner.height('auto'); + } + }, + + _getPosition: function (onlyAbsolute) { + var current = F.current, + viewport = F.getViewport(), + margin = current.margin, + width = F.wrap.width() + margin[1] + margin[3], + height = F.wrap.height() + margin[0] + margin[2], + rez = { + position: 'absolute', + top : margin[0], + left : margin[3] + }; + + if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { + rez.position = 'fixed'; + + } else if (!current.locked) { + rez.top += viewport.y; + rez.left += viewport.x; + } + + rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); + rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); + + return rez; + }, + + _afterZoomIn: function () { + var current = F.current; + + if (!current) { + return; + } + + F.isOpen = F.isOpened = true; + + F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); + + F.update(); + + // Assign a click event + if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { + F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { + if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { + e.preventDefault(); + + F[ current.closeClick ? 'close' : 'next' ](); + } + }); + } + + // Create a close button + if (current.closeBtn) { + $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { + e.preventDefault(); + + F.close(); + }); + } + + // Create navigation arrows + if (current.arrows && F.group.length > 1) { + if (current.loop || current.index > 0) { + $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); + } + + if (current.loop || current.index < F.group.length - 1) { + $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); + } + } + + F.trigger('afterShow'); + + // Stop the slideshow if this is the last item + if (!current.loop && current.index === current.group.length - 1) { + + F.play( false ); + + } else if (F.opts.autoPlay && !F.player.isActive) { + F.opts.autoPlay = false; + + F.play(true); + } + }, + + _afterZoomOut: function ( obj ) { + obj = obj || F.current; + + $('.fancybox-wrap').trigger('onReset').remove(); + + $.extend(F, { + group : {}, + opts : {}, + router : false, + current : null, + isActive : false, + isOpened : false, + isOpen : false, + isClosing : false, + wrap : null, + skin : null, + outer : null, + inner : null + }); + + F.trigger('afterClose', obj); + } + }); + + /* + * Default transitions + */ + + F.transitions = { + getOrigPosition: function () { + var current = F.current, + element = current.element, + orig = current.orig, + pos = {}, + width = 50, + height = 50, + hPadding = current.hPadding, + wPadding = current.wPadding, + viewport = F.getViewport(); + + if (!orig && current.isDom && element.is(':visible')) { + orig = element.find('img:first'); + + if (!orig.length) { + orig = element; + } + } + + if (isQuery(orig)) { + pos = orig.offset(); + + if (orig.is('img')) { + width = orig.outerWidth(); + height = orig.outerHeight(); + } + + } else { + pos.top = viewport.y + (viewport.h - height) * current.topRatio; + pos.left = viewport.x + (viewport.w - width) * current.leftRatio; + } + + if (F.wrap.css('position') === 'fixed' || current.locked) { + pos.top -= viewport.y; + pos.left -= viewport.x; + } + + pos = { + top : getValue(pos.top - hPadding * current.topRatio), + left : getValue(pos.left - wPadding * current.leftRatio), + width : getValue(width + wPadding), + height : getValue(height + hPadding) + }; + + return pos; + }, + + step: function (now, fx) { + var ratio, + padding, + value, + prop = fx.prop, + current = F.current, + wrapSpace = current.wrapSpace, + skinSpace = current.skinSpace; + + if (prop === 'width' || prop === 'height') { + ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); + + if (F.isClosing) { + ratio = 1 - ratio; + } + + padding = prop === 'width' ? current.wPadding : current.hPadding; + value = now - padding; + + F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); + F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); + } + }, + + zoomIn: function () { + var current = F.current, + startPos = current.pos, + effect = current.openEffect, + elastic = effect === 'elastic', + endPos = $.extend({opacity : 1}, startPos); + + // Remove "position" property that breaks older IE + delete endPos.position; + + if (elastic) { + startPos = this.getOrigPosition(); + + if (current.openOpacity) { + startPos.opacity = 0.1; + } + + } else if (effect === 'fade') { + startPos.opacity = 0.1; + } + + F.wrap.css(startPos).animate(endPos, { + duration : effect === 'none' ? 0 : current.openSpeed, + easing : current.openEasing, + step : elastic ? this.step : null, + complete : F._afterZoomIn + }); + }, + + zoomOut: function () { + var current = F.current, + effect = current.closeEffect, + elastic = effect === 'elastic', + endPos = {opacity : 0.1}; + + if (elastic) { + endPos = this.getOrigPosition(); + + if (current.closeOpacity) { + endPos.opacity = 0.1; + } + } + + F.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : current.closeSpeed, + easing : current.closeEasing, + step : elastic ? this.step : null, + complete : F._afterZoomOut + }); + }, + + changeIn: function () { + var current = F.current, + effect = current.nextEffect, + startPos = current.pos, + endPos = { opacity : 1 }, + direction = F.direction, + distance = 200, + field; + + startPos.opacity = 0.1; + + if (effect === 'elastic') { + field = direction === 'down' || direction === 'up' ? 'top' : 'left'; + + if (direction === 'down' || direction === 'right') { + startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); + endPos[ field ] = '+=' + distance + 'px'; + + } else { + startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); + endPos[ field ] = '-=' + distance + 'px'; + } + } + + // Workaround for http://bugs.jquery.com/ticket/12273 + if (effect === 'none') { + F._afterZoomIn(); + + } else { + F.wrap.css(startPos).animate(endPos, { + duration : current.nextSpeed, + easing : current.nextEasing, + complete : F._afterZoomIn + }); + } + }, + + changeOut: function () { + var previous = F.previous, + effect = previous.prevEffect, + endPos = { opacity : 0.1 }, + direction = F.direction, + distance = 200; + + if (effect === 'elastic') { + endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; + } + + previous.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : previous.prevSpeed, + easing : previous.prevEasing, + complete : function () { + $(this).trigger('onReset').remove(); + } + }); + } + }; + + /* + * Overlay helper + */ + + F.helpers.overlay = { + defaults : { + closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay + speedOut : 200, // duration of fadeOut animation + showEarly : true, // indicates if should be opened immediately or wait until the content is ready + css : {}, // custom CSS properties + locked : !isTouch, // if true, the content will be locked into overlay + fixed : true // if false, the overlay CSS position property will not be set to "fixed" + }, + + overlay : null, // current handle + fixed : false, // indicates if the overlay has position "fixed" + el : $('html'), // element that contains "the lock" + + // Public methods + create : function(opts) { + var parent; + + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.close(); + } + + parent = F.coming ? F.coming.parent : opts.parent; + + this.overlay = $('
').appendTo( parent && parent.length ? parent : 'body' ); + this.fixed = false; + + if (opts.fixed && F.defaults.fixed) { + this.overlay.addClass('fancybox-overlay-fixed'); + + this.fixed = true; + } + }, + + open : function(opts) { + var that = this; + + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.overlay.unbind('.overlay').width('auto').height('auto'); + + } else { + this.create(opts); + } + + if (!this.fixed) { + W.bind('resize.overlay', $.proxy( this.update, this) ); + + this.update(); + } + + if (opts.closeClick) { + this.overlay.bind('click.overlay', function(e) { + if ($(e.target).hasClass('fancybox-overlay')) { + if (F.isActive) { + F.close(); + } else { + that.close(); + } + + return false; + } + }); + } + + this.overlay.css( opts.css ).show(); + }, + + close : function() { + W.unbind('resize.overlay'); + + if (this.el.hasClass('fancybox-lock')) { + $('.fancybox-margin').removeClass('fancybox-margin'); + + this.el.removeClass('fancybox-lock'); + + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); + } + + $('.fancybox-overlay').remove().hide(); + + $.extend(this, { + overlay : null, + fixed : false + }); + }, + + // Private, callbacks + + update : function () { + var width = '100%', offsetWidth; + + // Reset width/height so it will not mess + this.overlay.width(width).height('100%'); + + // jQuery does not return reliable result for IE + if (IE) { + offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); + + if (D.width() > offsetWidth) { + width = D.width(); + } + + } else if (D.width() > W.width()) { + width = D.width(); + } + + this.overlay.width(width).height(D.height()); + }, + + // This is where we can manipulate DOM, because later it would cause iframes to reload + onReady : function (opts, obj) { + var overlay = this.overlay; + + $('.fancybox-overlay').stop(true, true); + + if (!overlay) { + this.create(opts); + } + + if (opts.locked && this.fixed && obj.fixed) { + obj.locked = this.overlay.append( obj.wrap ); + obj.fixed = false; + } + + if (opts.showEarly === true) { + this.beforeShow.apply(this, arguments); + } + }, + + beforeShow : function(opts, obj) { + if (obj.locked && !this.el.hasClass('fancybox-lock')) { + if (this.fixPosition !== false) { + $('*:not(object)').filter(function(){ + return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); + }).addClass('fancybox-margin'); + } + + this.el.addClass('fancybox-margin'); + + this.scrollV = W.scrollTop(); + this.scrollH = W.scrollLeft(); + + this.el.addClass('fancybox-lock'); + + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); + } + + this.open(opts); + }, + + onUpdate : function() { + if (!this.fixed) { + this.update(); + } + }, + + afterClose: function (opts) { + // Remove overlay if exists and fancyBox is not opening + // (e.g., it is not being open using afterClose callback) + if (this.overlay && !F.coming) { + this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); + } + } + }; + + /* + * Title helper + */ + + F.helpers.title = { + defaults : { + type : 'float', // 'float', 'inside', 'outside' or 'over', + position : 'bottom' // 'top' or 'bottom' + }, + + beforeShow: function (opts) { + var current = F.current, + text = current.title, + type = opts.type, + title, + target; + + if ($.isFunction(text)) { + text = text.call(current.element, current); + } + + if (!isString(text) || $.trim(text) === '') { + return; + } + + title = $('
' + text + '
'); + + switch (type) { + case 'inside': + target = F.skin; + break; + + case 'outside': + target = F.wrap; + break; + + case 'over': + target = F.inner; + break; + + default: // 'float' + target = F.skin; + + title.appendTo('body'); + + if (IE) { + title.width( title.width() ); + } + + title.wrapInner(''); + + //Increase bottom margin so this title will also fit into viewport + F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); + break; + } + + title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); + } + }; + + // jQuery plugin initialization + $.fn.fancybox = function (options) { + var index, + that = $(this), + selector = this.selector || '', + run = function(e) { + var what = $(this).blur(), idx = index, relType, relVal; + + if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { + relType = options.groupAttr || 'data-fancybox-group'; + relVal = what.attr(relType); + + if (!relVal) { + relType = 'rel'; + relVal = what.get(0)[ relType ]; + } + + if (relVal && relVal !== '' && relVal !== 'nofollow') { + what = selector.length ? $(selector) : that; + what = what.filter('[' + relType + '="' + relVal + '"]'); + idx = what.index(this); + } + + options.index = idx; + + // Stop an event from bubbling if everything is fine + if (F.open(what, options) !== false) { + e.preventDefault(); + } + } + }; + + options = options || {}; + index = options.index || 0; + + if (!selector || options.live === false) { + that.unbind('click.fb-start').bind('click.fb-start', run); + + } else { + D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); + } + + this.filter('[data-fancybox-start=1]').trigger('click'); + + return this; + }; + + // Tests that need a body at doc ready + D.ready(function() { + var w1, w2; + + if ( $.scrollbarWidth === undefined ) { + // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth + $.scrollbarWidth = function() { + var parent = $('
').appendTo('body'), + child = parent.children(), + width = child.innerWidth() - child.height( 99 ).innerWidth(); + + parent.remove(); + + return width; + }; + } + + if ( $.support.fixedPosition === undefined ) { + $.support.fixedPosition = (function() { + var elem = $('
').appendTo('body'), + fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); + + elem.remove(); + + return fixed; + }()); + } + + $.extend(F.defaults, { + scrollbarWidth : $.scrollbarWidth(), + fixed : $.support.fixedPosition, + parent : $('body') + }); + + //Get real width of page scroll-bar + w1 = $(window).width(); + + H.addClass('fancybox-lock-test'); + + w2 = $(window).width(); + + H.removeClass('fancybox-lock-test'); + + $("").appendTo("head"); + }); + +}(window, document, jQuery)); diff --git a/fancybox-2.1.7/source/jquery.fancybox.pack.js b/fancybox-2.1.7/source/jquery.fancybox.pack.js new file mode 100755 index 0000000..640e016 --- /dev/null +++ b/fancybox-2.1.7/source/jquery.fancybox.pack.js @@ -0,0 +1,46 @@ +/*! fancyBox v2.1.7 fancyapps.com | fancyapps.com/fancybox/#license */ +(function(t,J,f,x){var L=f("html"),q=f(t),p=f(J),b=f.fancybox=function(){b.open.apply(this,arguments)},K=navigator.userAgent.match(/msie/i),D=null,u=J.createTouch!==x,v=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},G=function(a){return r(a)&&0
',image:'',iframe:'",error:'

The requested content cannot be loaded.
Please try again later.

',closeBtn:'',next:'',prev:'',loading:'
'},openEffect:"fade", +openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{}, +previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=v(a)?f(a).get():[a]),f.each(a,function(d,e){var k={},g,l,h,n,m;"object"===f.type(e)&&(e.nodeType&&(e=f(e)),v(e)?(k={href:e.data("fancybox-href")||e.attr("href"),title:f("
").text(e.data("fancybox-title")|| +e.attr("title")||"").html(),isDom:!0,element:e},f.metadata&&f.extend(!0,k,e.metadata())):k=e);g=c.href||k.href||(r(e)?e:null);l=c.title!==x?c.title:k.title||"";n=(h=c.content||k.content)?"html":c.type||k.type;!n&&k.isDom&&(n=e.data("fancybox-type"),n||(n=(n=e.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(e)&&(n="html",h=e)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));h||("inline"===n?g?h=f(r(g)? +g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(h=e):"html"===n?h=g:n||g||!k.isDom||(n="inline",h=e));f.extend(k,{href:g,type:n,content:h,title:l,selector:m});a[d]=k}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==x&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&& +a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var c=function(){clearTimeout(b.player.timer)}, +d=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},e=function(){c();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index=e.index?"next":"prev"],b.router=d||"jumpto",e.loop&&(0>a&&(a=e.group.length+a%e.group.length),a%=e.group.length),e.group[a]!==x&&(b.cancel(),b._start(a)))},reposition:function(a,c){var d=b.current,e=d?d.wrap:null,k;e&&(k=b._getPosition(c),a&&"scroll"===a.type?(delete k.position,e.stop(!0,!0).animate(k,200)):(e.css(k), +d.pos=f.extend({},d.dim,k)))},update:function(a){var c=a&&a.originalEvent&&a.originalEvent.type,d=!c||"orientationchange"===c;d&&(clearTimeout(D),D=null);b.isOpen&&!D&&(D=setTimeout(function(){var e=b.current;e&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(d||"load"===c||"resize"===c&&e.autoResize)&&b._setDimension(),"scroll"===c&&e.canShrink||b.reposition(a),b.trigger("onUpdate"),D=null)},d&&!u?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView, +u&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();a=f(b.opts.tpl.loading).click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:.5*c.h+c.y,left:.5*c.w+c.x}));b.trigger("onLoading")},getViewport:function(){var a= +b.current&&b.current.locked||!1,c={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=u&&t.innerWidth?t.innerWidth:q.width(),c.h=u&&t.innerHeight?t.innerHeight:q.height());return c},unbindEvents:function(){b.wrap&&v(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(q.bind("orientationchange.fb"+(u?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&p.bind("keydown.fb", +function(d){var e=d.which||d.keyCode,k=d.target||d.srcElement;if(27===e&&b.coming)return!1;d.ctrlKey||d.altKey||d.shiftKey||d.metaKey||k&&(k.type||f(k).is("[contenteditable]"))||f.each(c,function(c,k){if(1h.clientWidth||h.clientHeight&&h.scrollHeight>h.clientHeight),d=f(d).parent();0!==e&&!h&&1g||0>k)&&b.next(0>g?"up":"right"),c.preventDefault())}))},trigger:function(a,c){var d,e=c||b.coming||b.current;if(e){f.isFunction(e[a])&&(d=e[a].apply(e,Array.prototype.slice.call(arguments,1)));if(!1===d)return!1;e.helpers&&f.each(e.helpers,function(c, +d){if(d&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](f.extend(!0,{},b.helpers[c].defaults,d),e)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},d,e;a=m(a);d=b.group[a]||null;if(!d)return!1;c=f.extend(!0,{},b.opts,d);d=c.margin;e=c.padding;"number"===f.type(d)&&(c.margin=[d,d,d,d]);"number"===f.type(e)&&(c.padding= +[e,e,e,e]);c.modal&&f.extend(!0,c,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{e=c.type;d=c.href;if(!e)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== +e||"swf"===e)c.autoHeight=c.autoWidth=!1,c.scrolling="visible";"image"===e&&(c.aspectRatio=!0);"iframe"===e&&u&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(u?"mobile":"desktop")+" fancybox-type-"+e+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent||"body");f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,y(c.padding[a]))});b.trigger("onReady"); +if("inline"===e||"html"===e){if(!c.content||!c.content.length)return b._error("content")}else if(!d)return b._error("href");"image"===e?b._loadImage():"ajax"===e?b._loadAjax():"iframe"===e?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= +this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,d){b.coming&&"abort"!==d?b._error("ajax",a):b.hideLoading()},success:function(c,d){"success"===d&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, +c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",u?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(d){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);u||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload|| +b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,d=a.length,e=c.preload?Math.min(c.preload,d-1):0,f,g;for(g=1;g<=e;g+=1)f=a[(c.index+g)%d],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,d,e,k,g,l;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); +b.unbindEvents();d=a.content;e=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(e){case "inline":case "ajax":case "html":a.selector?d=f("
").html(d).find(a.selector):v(d)&&(d.data("fancybox-placeholder")||d.data("fancybox-placeholder",f('
').insertAfter(d).hide()),d=d.show().detach(),a.wrap.bind("onReset",function(){f(this).find(d).length&&d.hide().replaceAll(d.data("fancybox-placeholder")).data("fancybox-placeholder", +!1)}));break;case "image":d=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":d='',l="",f.each(a.swf,function(a,b){d+='';l+=" "+a+'="'+b+'"'}),d+='"}v(d)&&d.parent().is(a.inner)||a.inner.append(d);b.trigger("beforeShow"); +a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(c.prevMethod)b.transitions[c.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,d,e=b.wrap,k=b.skin,g=b.inner,l=b.current;d=l.width;var h=l.height,n=l.minWidth,w=l.minHeight,p=l.maxWidth, +q=l.maxHeight,u=l.scrolling,r=l.scrollOutside?l.scrollbarWidth:0,z=l.margin,A=m(z[1]+z[3]),t=m(z[0]+z[2]),x,B,v,E,C,H,D,F,I;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");z=m(k.outerWidth(!0)-k.width());x=m(k.outerHeight(!0)-k.height());B=A+z;v=t+x;E=G(d)?(a.w-B)*m(d)/100:d;C=G(h)?(a.h-v)*m(h)/100:h;if("iframe"===l.type){if(I=l.content,l.autoHeight&&I&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(E).height(9999),H=I.contents().find("body"),r&&H.css("overflow-x", +"hidden"),C=H.outerHeight(!0))}catch(M){}}else if(l.autoWidth||l.autoHeight)g.addClass("fancybox-tmp"),l.autoWidth||g.width(E),l.autoHeight||g.height(C),l.autoWidth&&(E=g.width()),l.autoHeight&&(C=g.height()),g.removeClass("fancybox-tmp");d=m(E);h=m(C);F=E/C;n=m(G(n)?m(n,"w")-B:n);p=m(G(p)?m(p,"w")-B:p);w=m(G(w)?m(w,"h")-v:w);q=m(G(q)?m(q,"h")-v:q);H=p;D=q;l.fitToView&&(p=Math.min(a.w-B,p),q=Math.min(a.h-v,q));B=a.w-A;t=a.h-t;l.aspectRatio?(d>p&&(d=p,h=m(d/F)),h>q&&(h=q,d=m(h*F)),dB||A>t)&&d>n&&h>w&&!(19p&&(d=p,h=m(d/F)),g.width(d).height(h),e.width(d+z),a=e.width(),A=e.height();else d=Math.max(n,Math.min(d,d-(a-B))),h=Math.max(w,Math.min(h,h-(A-t)));r&&"auto"===u&&hB||A>t)&&d>n&&h>w;d=l.aspectRatio?dw&&h
').appendTo(c&&c.length?c:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var c=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&& +this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():c.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); +K?(b=Math.max(J.documentElement.offsetWidth,J.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var d=this.overlay;f(".fancybox-overlay").stop(!0,!0);d||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*:not(object)").filter(function(){return"fixed"=== +f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", +position:"bottom"},beforeShow:function(a){var c=b.current,d=c.title,e=a.type;f.isFunction(d)&&(d=d.call(c.element,c));if(r(d)&&""!==f.trim(d)){c=f('
'+d+"
");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body"),K&&c.width(c.width()),c.wrapInner(''),b.current.margin[2]+=Math.abs(m(c.css("margin-bottom")))}c["top"===a.position?"prependTo": +"appendTo"](e)}}};f.fn.fancybox=function(a){var c,d=f(this),e=this.selector||"",k=function(g){var l=f(this).blur(),h=c,k,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||l.is(".fancybox-wrap")||(k=a.groupAttr||"data-fancybox-group",m=l.attr(k),m||(k="rel",m=l.get(0)[k]),m&&""!==m&&"nofollow"!==m&&(l=e.length?f(e):d,l=l.filter("["+k+'="'+m+'"]'),h=l.index(this)),a.index=h,!1!==b.open(l,a)&&g.preventDefault())};a=a||{};c=a.index||0;e&&!1!==a.live?p.undelegate(e,"click.fb-start").delegate(e+":not('.fancybox-item, .fancybox-nav')", +"click.fb-start",k):d.unbind("click.fb-start").bind("click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,c;f.scrollbarWidth===x&&(f.scrollbarWidth=function(){var a=f('
').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===x&&(f.support.fixedPosition=function(){var a=f('
').appendTo("body"), +b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(t).width();L.addClass("fancybox-lock-test");c=f(t).width();L.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); diff --git a/fancybox-2.1.7/sprite.psd b/fancybox-2.1.7/sprite.psd new file mode 100755 index 0000000..6f2032d Binary files /dev/null and b/fancybox-2.1.7/sprite.psd differ diff --git a/fetch_gebdat.php b/fetch_gebdat.php new file mode 100755 index 0000000..8c43312 --- /dev/null +++ b/fetch_gebdat.php @@ -0,0 +1,22 @@ + 18"); +# Ausgabe 0, nicht volljährig; Ausgabe 1, volljährig + + +#if(isset($_POST['get_option'])){ + + + $gebdat = $_POST['get_option']; +if(ifAge ("$gebdat > 18") == 1){ + echo "||1"; +}else{ + echo "Bitte bringen Sie zum Testtermin die schriftliche Einwilligung Ihrer gesetzlicher Vertreter mit, dass diese mit Ihrer Testteilnahme einverstanden sind.||0";; +} +# Ausgabe 0, nicht volljährig; Ausgabe 1, volljährig + + exit; +#} +?> + diff --git a/func_age.php b/func_age.php new file mode 100755 index 0000000..a824ba5 --- /dev/null +++ b/func_age.php @@ -0,0 +1,15 @@ +=]{1,2})\s*(\d+)%", $check, $check)) + return false; + $date = explode (".", $check[1]); + $date = mktime (0, 0, 0, $date[1], $date[0], $date[2]); + $date = strtotime ("+ $check[3] years", $date); + + eval ("\$value = (" . time() . " $check[2] $date);"); + return $value; + + } +# echo (int) ifAge ("29.01.2002 > 18"); +# Ausgabe 0, nicht volljhrig; Ausgabe 1, volljhrig +?> \ No newline at end of file diff --git a/func_fetch_tan.php b/func_fetch_tan.php new file mode 100755 index 0000000..9ab8987 --- /dev/null +++ b/func_fetch_tan.php @@ -0,0 +1,67 @@ +query("SELECT tp_id + FROM bpm_tanpool + WHERE verw_dat = '0000-00-00 00:00:00' + LIMIT 1"); + $row_get_tan = $query_get_tan->fetch_array(); + $id = $row_get_tan['tp_id']; + $datum = date("Y-m-d H:i:s"); + $query_get_tan = $db->query("UPDATE bpm_tanpool + SET verw_dat = '$datum' + WHERE tp_id = $id"); + + $query_verf_liz = $db->query("SELECT count(*) Anz + FROM bpm_tanpool + WHERE verw_dat = '0000-00-00 00:00:00'"); + $row_verf_liz = $query_verf_liz->fetch_array(); + $restlizenz = $row_verf_liz['Anz']; + $warnmeldung = get_parameter(1); + + if($restlizenz <= $warnmeldung){ + $empfaenger_k = get_parameter(2); + + $empfaenger = "$empfaenger_k; $empfaenger_l"; + $betreff = "Mindestbestand Hogrefe Lizenzen im BPM erreicht"; + $text = " + + + Mindestbestand Hogrefe Lizenzen im BPM erreicht + + + + Guten Tag +

+ Es wurde der Mindestbestand an Hogrefe Lizenzen erreicht.
+ Bitte beschaffen Sie neue Lizenzen und importieren Sie diese im System, + damit sich Bewerber auch zukünftig registrieren können. +
+
+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; +/* +echo " +$empfaenger
+$betreff
+$text
"; +*/ + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + } + return $id; +} +# echo fetch_tan(); +# UPDATE bpm_tanpool SET verw_dat ='0000-00-00 00:00:00'; +?> diff --git a/func_get_parameter.php b/func_get_parameter.php new file mode 100755 index 0000000..3c38c22 --- /dev/null +++ b/func_get_parameter.php @@ -0,0 +1,16 @@ +query("SELECT wert FROM bpm_parameter WHERE pid=$pid"); + $row_get_parameter= $query_get_parameter->fetch_array(); + $wert = $row_get_parameter['wert']; + return $wert; +} + +#echo get_parameter(6); + +?> diff --git a/func_get_restplatz.php b/func_get_restplatz.php new file mode 100755 index 0000000..8516641 --- /dev/null +++ b/func_get_restplatz.php @@ -0,0 +1,20 @@ +query("SELECT tm_plaetze FROM bpm_termine WHERE tm_id=$tm_id"); + $row_ges_platz = $query_ges_platz->fetch_array(); + + $query_verf_platz = $db->query("SELECT count(*) Anz FROM bpm_term_kand WHERE tm_id=$tm_id"); + $row_verf_platz = $query_verf_platz->fetch_array(); + + $restplatz = $row_ges_platz['tm_plaetze'] - $row_verf_platz['Anz']; + return $restplatz; +} + +#echo get_restplatz(12); + +?> diff --git a/func_id.php b/func_id.php new file mode 100755 index 0000000..e0be609 --- /dev/null +++ b/func_id.php @@ -0,0 +1,80 @@ + MUSTHA0204199801 + +Falls der Nachname weniger als 4 Zeichen hätte, füllt man diesen mit dem letzten Buchstaben bis auf 4 Zeichen auf. + +Das hätte den Vorteil, dass man die ID für Kontrollmechanismen jederzeit neu generieren könnte und eine Fehlersuche vereinfacht. Die Eindeutigkeit der ID sollte gewährleistet sein. + +Viele Grüße +Klaus Oberle + +*/ +$db = dbconnect(); + +$nachname = str_replace (array("'", "ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"," "), array("", "ae", "oe", "ue", "ss", "Ae", "Oe", "Ue", "_"), $nachname); +$vorname = str_replace (array("'", "ä", "ö", "ü", "ß", "Ä", "Ö", "Ü"," "), array("", "ae", "oe", "ue", "ss", "Ae", "Oe", "Ue", "_"), $vorname); + +$lfd = 1; +$lfd_exit = FALSE; + +while (mb_strlen($nachname) <=4){ + $postfix = mb_substr ($nachname,-1,1); + $nachname = $nachname.$postfix; +} +$nachname = mb_substr (mb_strtoupper($nachname),0,4); +$vorname = mb_substr (mb_strtoupper($vorname),0,2); +$gebdat = str_replace('.','', $gebdat); + + +while(!$lfd_exit){ + + if($lfd < 10){ + $lfd_neu = '0'.$lfd; + }else{ + $lfd_neu = $lfd; + } + $uuid = $nachname.$vorname.$gebdat.$lfd_neu."-".$jahr; + $query_vorh = $db->query("SELECT count(*) Anz FROM bpm_kandidat WHERE id='$uuid'"); + $row_vorh = $query_vorh->fetch_array(); + if($row_vorh['Anz'] == 0){ + $lfd_exit = TRUE; + }else{ + $lfd++; + } +} + +return $uuid; +} + +/* +$nachname = 'Buchholz'; +$vorname = 'Maik'; +$gebdat = '18.12.1979'; +$jahr = "2022"; +echo uuid($nachname, $vorname, $gebdat, $jahr); +*/ +?> \ No newline at end of file diff --git a/func_notenskala.php b/func_notenskala.php new file mode 100755 index 0000000..ae33b67 --- /dev/null +++ b/func_notenskala.php @@ -0,0 +1,63 @@ +"; + switch (round($punkte)){ + case 15: + $value = "0.70"; + break; + case 14: + $value = "1.00"; + break; + case 13: + $value = "1.30"; + break; + case 12: + $value = "1.70"; + break; + case 11: + $value = "2.00"; + break; + case 10: + $value = "2.30"; + break; + case 9: + $value = "2.70"; + break; + case 8: + $value = "3.00"; + break; + case 7: + $value = "3.30"; + break; + case 6: + $value = "3.70"; + break; + case 5: + $value = "4.00"; + break; + case 4: + $value = "4.30"; + break; + case 3: + $value = "4.70"; + break; + case 2: + $value = "5.00"; + break; + case 1: + $value = "5.30"; + break; + case "0": + $value = "0.00"; + break; + default: + $value = "99.00"; + break; + } + + return $value; +} +#echo notenskala(""); + +?> \ No newline at end of file diff --git a/func_standard_hs.php b/func_standard_hs.php new file mode 100755 index 0000000..950faf4 --- /dev/null +++ b/func_standard_hs.php @@ -0,0 +1,24 @@ +query("SELECT hs + FROM bpm_zuordnung_hs + WHERE plz = '$plz' + LIMIT 1"); + $row_hs = $query_hs->fetch_array(); + + if($row_hs['hs'] == ''){ + $hochschule = 'NA'; + }else{ + $hochschule = $row_hs['hs']; + } + return $hochschule; +} + +#echo standard_hs(88812); + +?> diff --git a/func_tangen.php b/func_tangen.php new file mode 100755 index 0000000..e6ff82e --- /dev/null +++ b/func_tangen.php @@ -0,0 +1,18 @@ + diff --git a/func_terminwahl.php b/func_terminwahl.php new file mode 100755 index 0000000..d10af8e --- /dev/null +++ b/func_terminwahl.php @@ -0,0 +1,127 @@ +query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $tm_id + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + if ($wh_test == 0) { + $query_doppelt = $db->query("SELECT id + FROM bpm_kandidat + WHERE nachname='$nachname' + AND vorname ='$vorname' + AND gebdat='$gebdat_form' + AND id LIKE '%$curr_jahr'"); + $row_doppelt = $query_doppelt->fetch_array(); + + # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt + # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat + if ($row_doppelt['id'] != '') { + return 1; + } else { + return 0; + } + } + + if ($wh_test == 1) { + # Falls jemand mal eine doppelte ID haben sollte, dann liegt das daran, dass er eine WiederholungsID vom Vorjahr eingegeben hat + # und sich mehrfach in einer neuen Bewerbungsphase eingeloggt hat + + + # War der Kandidat bereits da mit durchgefallenem Test + $query_bes = $db->query("SELECT sum(bestanden) bestanden + FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND c.tp_id = d.tp_id + AND a.id = '$id_wied' + AND b.bestanden='1' + AND id LIKE '%$curr_jahr'"); + + $row_bes = $query_bes->fetch_array(); + + if ($row_bes['bestanden'] > 0) { + return 3; + } else { + + + $query_anz = $db->query("SELECT count(*) Anz + FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND c.tp_id = d.tp_id + AND a.id = '$id_wied' + AND b.bestanden='1' + AND id LIKE '%$curr_jahr'"); + + $row_anz = $query_anz->fetch_array(); + + if ($row_anz['Anz'] == '1') { + # Test wurde bereis einmal wiederholt + return 3; + } else { + # Wie oft ist Kandidat schon durchgefallen + $query_anz2 = $db->query("SELECT count(*) Anz + FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND c.tp_id = d.tp_id + AND a.id = '$id_wied' + AND b.bestanden='0' + AND d.tan=b.tan + AND id LIKE '%$curr_jahr'"); + + $row_anz2 = $query_anz2->fetch_array(); + # Wenn Anzahl 0, dann darf er wiederholen. >1 gibts nicht, da es hier geblockt wird + if ($row_anz2['Anz'] == 2) { + return 4; + } else { + + #ID Kombination prüfen. Stimmen Logindaten aus erstem Test + $query_anz1 = $db->query("SELECT count(*) Anz + FROM bpm_kandidat a, bpm_term_kand c, bpm_tanpool d + WHERE a.ka_id = c.ka_id + AND c.tp_id = d.tp_id + AND a.id = '$id_wied' + AND d.tan = '$tan_wied'"); + $row_anz1 = $query_anz1->fetch_array(); + # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung + + # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt + # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat + if ($row_anz1['Anz'] == '0') { + return 2; + } else { + return 0; + } + } + } + } + + } +} + +# Kein Wiederholer +# echo terminwahl(7, 'Alexander', 'Schwarz', '1979-08-15', '0', '', ''); + +#Wiederholer in derselben Bewerbungsphase +#echo terminwahl(7, 'Alexander', 'Schwarz', '1979-08-15', '1', 'SCHWAL1508197901-2022', 'K3NN'); + + +?> \ No newline at end of file diff --git a/hogrefe/index.php b/hogrefe/index.php new file mode 100755 index 0000000..b8f34c3 --- /dev/null +++ b/hogrefe/index.php @@ -0,0 +1,88 @@ +assign('index_error', 1); + + if($errorno == 1){ + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden"); + } + + if($errorno == 2){ + $smarty->assign('index_error_text', "Der Benutzername ist im System nicht vorhanden oder nicht mehr gültig"); + } + + if($errorno == 3){ + $smarty->assign('index_error_text', "Der Benutzername oder das Passwort ist nicht korrekt
Sie können hier ein neues Passwort beantragen"); + } + + # Daten aufbereiten bei Fehler + if(isset($_SESSION["global_username"])){ + $smarty->assign('index_user', $_SESSION["global_username"]); + } + } + + +} + +if($action == 'anmeld'){ + $username=mb_strtoupper($_POST["user"]); //remove case sensitivity on the username + $tan=$_POST["password"]; + + + if($username == "" OR $tan == ""){ + echo ""; + }else{ + + + $db = dbconnect(); + $result = $db->query("SELECT a.id, c.tp_id, c.tan, c.tinyurl + FROM bpm_kandidat a, bpm_term_kand b, bpm_tanpool c + WHERE a.ka_id = b.ka_id + AND b.tp_id = c.tp_id + AND a.id = '$username' + AND c.tan= '$tan' + AND c.login_dat = '0000-00-00 00:00:00'"); + $row = $result->fetch_array(); + + + if ($username != strtoupper($row['id'])) { + echo ""; + } + // Passwort falsch + elseif ($tan != $row['tan']){ + echo ""; + }else{ + $datum=date("Y-m-d H:i:s"); + $result_1 = $db->query("UPDATE bpm_tanpool + SET login_dat='$datum' + WHERE tp_id =$row[tp_id]"); + echo ""; + } + } + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/hogrefe/$templatename"); +?> \ No newline at end of file diff --git a/index.php b/index.php new file mode 100755 index 0000000..0e69737 --- /dev/null +++ b/index.php @@ -0,0 +1,848 @@ +"; +#echo nl2br(print_r($_SESSION,true)); +#echo ""; + # Hinweis, ob im laufenden Ausbildungsjahr bereits ein Test + $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= date_format(now(), '%Y-%m-%d') + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_beginn = $row_curausbjahr['beginn']; + $curr_ende = $row_curausbjahr['ende']; + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + $smarty->assign('persdat_cur_beginn', $curr_beginn); + $smarty->assign('persdat_cur_ende', $curr_ende); + $smarty->assign('persdat_cur_ausbjahr', $curr_jahr); + + + $smarty->assign('persdat_value_anrede', $_SESSION["anrede"]); + #$smarty->assign('persdat_value_vorname', stripslashes($_SESSION["perso"])); + $smarty->assign('persdat_value_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('persdat_value_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('persdat_value_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('persdat_value_str', stripslashes($_SESSION["str"])); + $smarty->assign('persdat_value_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('persdat_value_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('persdat_value_alter18', stripslashes($_SESSION["alter18"])); + $smarty->assign('persdat_value_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('persdat_value_tel', stripslashes($_SESSION["tel"])); + $smarty->assign('persdat_value_wh_test', stripslashes($_SESSION["wh_test"])); + $smarty->assign('persdat_value_id_wied', stripslashes($_SESSION["id_wied"])); + $smarty->assign('persdat_value_tan_wied', stripslashes($_SESSION["tan_wied"])); + + ## Fehlerhandling + $error1 = $_GET['error1']; + $error2 = $_GET['error2']; + $error3 = $_GET['error3']; + $error4 = $_GET['error4']; + $error5 = $_GET['error5']; + $error6 = $_GET['error6']; + $error7 = $_GET['error7']; + $error8 = $_GET['error8']; + $error9 = $_GET['error9']; + $error10 = $_GET['error10']; + $error11 = $_GET['error11']; + $error12 = $_GET['error12']; + $error13 = $_GET['error13']; + $error14 = $_GET['error14']; + $error15 = $_GET['error15']; + $error16 = $_GET['error16']; + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + + if ($error1 == 1){$smarty->assign('erf_hig_anrede', 1);}else{$smarty->assign('erf_hig_anrede', 0);} + #if ($error16 == 1){$smarty->assign('erf_hig_perso', 1);}else{$smarty->assign('erf_hig_perso', 0);} + if ($error2 == 1){$smarty->assign('erf_hig_vorname', 1);}else{$smarty->assign('erf_hig_vorname', 0);} + if ($error3 == 1){$smarty->assign('erf_hig_nachname', 1);}else{$smarty->assign('erf_hig_nachname', 0);} + if ($error4 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error5 == 1){$smarty->assign('erf_hig_str', 1);}else{$smarty->assign('erf_hig_str', 0);} + if ($error6 == 1){$smarty->assign('erf_hig_plz', 1);}else{$smarty->assign('erf_hig_plz', 0);} + if ($error7 == 1){$smarty->assign('erf_hig_ort', 1);}else{$smarty->assign('erf_hig_ort', 0);} + if ($error8 == 1){$smarty->assign('erf_hig_mail', 1);}else{$smarty->assign('erf_hig_mail', 0);} + if ($error14 == 1){$smarty->assign('erf_hig_tel', 1);}else{$smarty->assign('erf_hig_tel', 0);} + if ($error15 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error20 == 1){$smarty->assign('erf_hig_id', 1);}else{$smarty->assign('erf_hig_id', 0);} + if ($error21 == 1){$smarty->assign('erf_hig_tan', 1);}else{$smarty->assign('erf_hig_tan', 0);} + + + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error9 == 1 or $error10 == 1 or $error11 == 1 or $error12 == 1 or $error13 == 1 or $error14 == 1 or $error15 == 1 or $error20 == 1 or $error21 == 1){ + $smarty->assign('persdat_error', 1); + + if($error9 == 1){ + $smarty->assign('persdat_error_text', 'Bitte prüfen Sie das Geburtsdatum.'); + } + if($error10 == 1){ + $smarty->assign('persdat_error_text', 'Die E-Mailadresse enthält Fehler.'); + } +# if($error11 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung.'); +# } +# if($error12 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben Sie den Test bereits 1x wiederholt.'); +# } +# if($error13 == 1){ +# $smarty->assign('persdat_error_text', 'Bitte prüfen Sie die Kombination aus ID/TAN.'); +# } + + if($error15 == 1){ + $smarty->assign('persdat_error_text', 'Bitte überprüfen Sie das Geburtsjahr.'); + } + + if($error20 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige ID darf nicht leer sein.'); + } + if($error21 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige TAN darf nicht leer sein.'); + } + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error14 == 1){ + $smarty->assign('persdat_error_text', 'Bitte füllen Sie die Pflichtfelder aus.'); + } + } + +} + +if ($action == 'termine') { + + # Im Fehlerfall oder beim zurückgehen sollen die Felder ausgefüllt sein + $smarty->assign('termine_value_testdatum', $_SESSION["testdatum"]); + +#echo '
', print_r($_POST, true), '
'; +#exit; +if(isset($_POST['anrede'])){ + $anrede = trim($_POST['anrede']); +}else{ + $anrede = $_SESSION["anrede"]; +} + +#if(isset($_POST['perso'])){ +# $perso = addslashes(trim($_POST['perso'])); +#}else{ +# $perso = $_SESSION["perso"]; +#} + +if(isset($_POST['vorname'])){ + $vorname = addslashes(trim($_POST['vorname'])); +}else{ + $vorname = $_SESSION["vorname"]; +} + +if(isset($_POST['nachname'])){ + $nachname = addslashes(trim($_POST['nachname'])); +}else{ + $nachname = $_SESSION["nachname"]; +} + +if(isset($_POST['gebdat'])){ + $gebdat = addslashes(trim($_POST['gebdat'])); +}else{ + $gebdat = $_SESSION["gebdat"]; +} + +if(isset($_POST['str'])){ + $str = addslashes(trim($_POST['str'])); +}else{ + $str = $_SESSION["str"]; +} + +if(isset($_POST['plz'])){ + $plz = addslashes(trim($_POST['plz'])); +}else{ + $plz = $_SESSION["plz"]; +} + +if(isset($_POST['ort'])){ + $ort = addslashes(trim($_POST['ort'])); +}else{ + $ort = $_SESSION["ort"]; +} + +if(isset($_POST['alter18'])){ + $alter18 = addslashes(trim($_POST['alter18'])); +}else{ + $alter18 = $_SESSION["alter18"]; +} + +if(isset($_POST['mail'])){ + $mail = addslashes(trim($_POST['mail'])); +}else{ + $mail = $_SESSION["mail"]; +} + +if(isset($_POST['tel'])){ + $tel = addslashes(trim($_POST['tel'])); +}else{ + $tel = $_SESSION["tel"]; +} + +if(isset($_POST['wh_test'])){ + $wh_test = addslashes(trim($_POST['wh_test'])); +}else{ + $wh_test = $_SESSION["wh_test"]; +} + +if(isset($_POST['id_wied'])){ + $id_wied = addslashes(trim($_POST['id_wied'])); +}else{ + $id_wied = $_SESSION["id_wied"]; +} + +if(isset($_POST['tan_wied'])){ + $tan_wied = addslashes(trim($_POST['tan_wied'])); +}else{ + $tan_wied = $_SESSION["tan_wied"]; +} + +$_SESSION["anrede"] = $anrede; +$_SESSION["vorname"] = $vorname; +#$_SESSION["perso"] = $perso; +$_SESSION["nachname"] = $nachname; +$_SESSION["gebdat"] = $gebdat; +$_SESSION["str"] = $str; +$_SESSION["plz"] = $plz; +$_SESSION["ort"] = $ort; +$_SESSION["alter18"] = $alter18; +$_SESSION["mail"] = $mail; +$_SESSION["tel"] = $tel; +$_SESSION["wh_test"] = $wh_test; +$_SESSION["id_wied"] = $id_wied; +$_SESSION["tan_wied"] = $tan_wied; + + + if ($anrede == '') { + $error1=1; + $error=true; + } +# if ($perso == ''){ +# $error16=1; +# $error=true; +# } + if ($vorname == ''){ + $error2=1; + $error=true; + } + if ($nachname == ''){ + $error3=1; + $error=true; + } + if ($gebdat == ''){ + $error4=1; + $error=true; + } + if ($str == ''){ + $error5=1; + $error=true; + } + if ($plz == ''){ + $error6=1; + $error=true; + } + if ($ort == ''){ + $error7=1; + $error=true; + } + if ($mail == ''){ + $error8=1; + $error=true; + } + + if ($tel == ''){ + $error14=1; + $error=true; + } + + if ($wh_test == '1' AND $id_wied == ''){ + $error20=1; + $error=true; + } + + if ($wh_test == '1' AND $tan_wied == ''){ + $error21=1; + $error=true; + } + + + # Datumsformat von DD.MM.YYYY nach YYYY-MM-DD + $gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); + + $curjahr = date("Y"); + $gebjahr = substr($gebdat_form,0,4); + if(($curjahr-$gebjahr)<=10){ + $error15=1; + $error=true; + } + + function validateDate($date, $format = 'Y-m-d'){ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + + if(!validateDate($gebdat_form)){ + $error9=1; + $error=true; + } + + if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) { + $error10=1; + $error=true; + } + +# # Test wurde nicht wiederholt +# if($wh_test == 0){ +# # doppelte Anmeldungen prüfen: +# +# # prüfen, ob die ID das aktuelle Jahr beinhaltet +# $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn +# FROM bpm_stichtage +# WHERE beginn >= date_format(now(), '%Y-%m-%d') +# ORDER BY sttg_id ASC +# LIMIT 1 +# "); +# $row_curausbjahr = $query_curausbjahr->fetch_array(); +# $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; +# +# $query_doppelt = $db->query("SELECT id +# FROM bpm_kandidat +# WHERE nachname='$nachname' +# AND vorname ='$vorname' +# AND gebdat='$gebdat_form' +# AND id LIKE '%$curr_jahr'"); +# $row_doppelt = $query_doppelt->fetch_array(); +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_doppelt['id'] != ''){ +# $error11=1; +# $error=true; +# } +# } + +# if($wh_test == 1){ +# # War der Kandidat bereits da mit durchgefallenem Test +# $query_anz = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = b.ka_id +# AND a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND b.bestanden='0'"); +# $row_anz = $query_anz->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz['Anz'] != '1'){ +# $error12=1; +# $error=true; +# } +# +# # Tan /ID Kombination prüfen +# $query_anz1 = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND d.tan = '$tan_wied'"); +# $row_anz1 = $query_anz1->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz1['Anz'] == '0'){ +# $error13=1; +# $error=true; +# } +# } + + if(isset($error)){ + echo ""; + exit; + } + + # Falls auf dieser Seite kein Testtermin gewählt wurde + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + if($error20 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'Bitte wählen Sie einen Termin.'); + } + if($error21 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'In der Zwischenzeit gibt es keine Plätze mehr zu diesem Termin
Bitte wählen Sie einen anderen Termin aus.'); + } + + ### Fehlerprüfung Ende + + # Auswahl der 5 Termine, die 14 Tage von heute in der Zukunft liegen, damit der Kandidat noch überweisen kann. + $anz_tage = trim(get_parameter(16)); + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr')tm_datum_form, tm_standort, tm_plaetze + FROM bpm_termine + WHERE tm_datum >= ADDDATE(now(), +$anz_tage) + ORDER BY tm_datum ASC + LIMIT 0,15"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $smarty->assign('termine_aktdat', date("d.m.Y H:i", time() ) ) ; + while ($row1 = $result1->fetch_array()) { + $pos_select = terminwahl($row1['tm_id'], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied); + +#echo "terminwahl($row1[tm_id], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied)
"; +#echo $pos_select."

"; + + if($pos_select == 0) { + $select = 1; + $select_err = ""; + }elseif($pos_select == 1){ + $select = 0; + $select_err = "Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung."; + }elseif($pos_select == 2){ + $select = 0; + $select_err = "Bitte prüfen Sie die Kombination aus ID/TAN."; + }elseif($pos_select == 3){ + $select = 0; + $select_err = "Sie haben den Test im Bewerbungsverfahren bestanden."; + }elseif($pos_select == 4){ + $select = 0; + $select_err = "Sie haben Sie den Test bereits 2x durchgeführt."; + } + + + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $row1[tm_id] + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + + # Freie Plätze berechnen + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz == 0){ + $disable = 0; + }else{ + $disable = 1; + } + + $row1['select'] = $select; + $row1['select_err'] = $select_err; + $row1['curr_jahr'] = $curr_jahr; + $row1['zaehler'] = $zaehler; + $row1['tm_standort'] = $standort; + $row1['tm_restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} +if ($action == 'check') { + +if(isset($_POST['testdatum'])){ + $testdatum = trim($_POST['testdatum']); +}else{ + $testdatum = $_SESSION["testdatum"]; +} + +$_SESSION["testdatum"] = $testdatum; + if ($testdatum == '') { + $error20=1; + $error=true; + } + + + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $anrede = $_SESSION["anrede"]; + if($anrede == 'm'){ + $anrede_ausg = 'Herr'; + } + if($anrede == 'w'){ + $anrede_ausg = 'Frau'; + } + + $smarty->assign('check_anrede', $anrede_ausg); + #$smarty->assign('check_perso', stripslashes($_SESSION["perso"])); + $smarty->assign('check_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('check_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('check_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('check_str', stripslashes($_SESSION["str"])); + $smarty->assign('check_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('check_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('check_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('check_tel', stripslashes($_SESSION["tel"])); + $betrag = trim(get_parameter(9)); + $smarty->assign('check_betrag', $betrag); + $smarty->assign('check_datum', $row_termin['tm_datum']); + $smarty->assign('check_standort', $standort); + $smarty->assign('check_raum', $row_termin['tm_raum']); + + # Ausgabe vorbereiten + + +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; +} + +if ($action == 'save') { +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; + +$anrede = $_SESSION["anrede"]; +#$perso = $_SESSION["perso"]; +$vorname = $_SESSION["vorname"]; +$nachname = $_SESSION["nachname"]; +$gebdat = $_SESSION["gebdat"]; +# Datumsformat von DD.MM.YYYY nach YYYY-MM-DD +$gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); +$str = $_SESSION["str"]; +$plz = $_SESSION["plz"]; +$ort = $_SESSION["ort"]; +$alter18 = $_SESSION["alter18"]; +$mail = $_SESSION["mail"]; +$tel = $_SESSION["tel"]; +$testdatum = $_SESSION["testdatum"]; +$wh_test = $_SESSION["wh_test"]; +$id_wied = $_SESSION["id_wied"]; +$tan_wied = $_SESSION["tan_wied"]; + +if($testdatum == ''){ + $smarty->assign('save_error', 1); + $smarty->assign('save_error_text', "Die Sitzung ist abgelaufen"); + +}else{ + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + $datum=date("Y-m-d H:i:s"); + # Hochschule wird festgesstellt. Das braucht man für den /status/index.php. Entsprechend wird bei Bestehen/Durchfallen einen Link auf die jeweilige Hochschule verwiesen. + # Die eigentliche Zuordnung, auch wenn Hochschule außerhalb BWs ist, mit Abfrage der Wunschhochschule kommt erst bei /upload/index.php (Dokumentenupload, Abschluß des Bewerbungsverfahrens) + # Somit wird hier auch noch "NA" als Antwort der Funktion "standard_hs" akzeptiert. + $hs = standard_hs($plz); + + + # Wenn der Kandidat sich einen Termin in der nächsten Bewerbungsphase auswählt, ist es keine Wiederholung mehr, sondern er bekommt eine neue ID + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $testdatum + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + # Beim anderen Bewerbungsphase ist es keine Wiederholung mehr + if(strpos($id_wied,$curr_jahr)==false){ + $wh_test = 0; + } + + + if($wh_test == 0){ + + $id = uuid($nachname, $vorname, $gebdat, $curr_jahr); + # Personensatz speichern + + #Personalausweinr rausgenommen: 27.10.2021 + #$sql1 = $db->query("insert into bpm_kandidat (anrede, perso, vorname, nachname, gebdat, str, plz, ort, alter18, mail, tel, id, hochschule, register_dat) VALUES('$anrede', '$perso', '$vorname', '$nachname', '$gebdat_form', '$str', '$plz', '$ort', '$alter18', '$mail', '$tel', '$id', '$hs', '$datum')"); + $sql1 = $db->query("insert into bpm_kandidat (anrede, vorname, nachname, gebdat, str, plz, ort, alter18, mail, tel, id, hochschule, register_dat) VALUES('$anrede', '$vorname', '$nachname', '$gebdat_form', '$str', '$plz', '$ort', '$alter18', '$mail', '$tel', '$id', '$hs', '$datum')"); + $ka_id = $db->insert_id; + }else{ + # Bei Wiederholern wird der Stammsatz erhalten und man macht nur ein Update auf die Adressdaten + $id = $id_wied; + + /* + $sql1 = $db->query( "UPDATE bpm_kandidat + SET anrede = '$anrede' + ,perso = '$perso' + ,vorname = '$vorname' + ,nachname = '$nachname' + ,gebdat = '$gebdat_form' + ,str = '$str' + ,plz = '$plz' + ,ort = '$ort' + ,alter18 = '$alter18' + ,mail = '$mail' + ,tel = '$tel' + ,hochschule = '$hs' + ,modify_dat = '$datum' + WHERE id = '$id' + " ); + */ + $sql1 = $db->query( "UPDATE bpm_kandidat + SET anrede = '$anrede' + ,vorname = '$vorname' + ,nachname = '$nachname' + ,gebdat = '$gebdat_form' + ,str = '$str' + ,plz = '$plz' + ,ort = '$ort' + ,alter18 = '$alter18' + ,mail = '$mail' + ,tel = '$tel' + ,hochschule = '$hs' + ,modify_dat = '$datum' + WHERE id = '$id' + " ); + + $query_kaid = $db->query("SELECT ka_id FROM bpm_kandidat WHERE id = '$id'"); + $row_kaid = $query_kaid->fetch_array(); + $ka_id = $row_kaid['ka_id']; + } + # Freien Tan aus Pool holen + $tan = fetch_tan(); + + # Termin speichern mit TAN, den gibts aber noch nicht + $sql2 = $db->query("insert into bpm_term_kand (ka_id, tm_id, tp_id) VALUES($ka_id, $testdatum, $tan)"); + + if($sql1 and $sql2){ + session_destroy(); + + # Emailversand + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + $sender = "Hochschule Ludwigsburg"; + $iban = get_parameter(5); + $bic = get_parameter(6); + $sendermail = get_parameter(8); + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + $sender = "Hochschule Kehl"; + $iban = get_parameter(3); + $bic = get_parameter(4); + $sendermail = get_parameter(7); + } + $betrag = get_parameter(9); + $referenznr = $row_termin['tm_referenznr']; + $smarty->assign('save_id', $id); + $smarty->assign('save_vorname', stripslashes($vorname)); + $smarty->assign('save_nachname', stripslashes($nachname)); + $smarty->assign('save_empf', stripslashes($sender)); + $smarty->assign('save_iban', stripslashes($iban)); + $smarty->assign('save_bic', stripslashes($bic)); + $smarty->assign('save_betrag', stripslashes($betrag)); + $smarty->assign('save_ref', stripslashes($referenznr)); + + # Damit bei der Mail nichts mit \ kommt + $vorname = stripslashes($vorname); + $nachname = stripslashes($nachname); + + $empfaenger = "$mail"; + $betreff = "Anmeldung zum Eignungstest BPM"; + $text = " + + + Anmeldung zum Eignungstest + + + + Guten Tag $vorname $nachname! +

+ Sie haben verbindlich Ihre Teilnahme am Studierfähigkeitstest BPM (Bachelor of Arts - Public Management) gebucht. +
+
+
+ + + + + + + + + + + + + + + + "; + if($alter18 == 0){ + $text .=" + + + + "; + } + $betrag = trim(get_parameter(9)); + $text .= " +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+ + Persönliche ID: + + + + $id + +
+ + Hinweis: + + + + Bitte bringen Sie zum Testtermin die schriftliche Einwilligung Ihrer gesetzlicher Vertreter mit, dass diese mit Ihrer Testteilnahme einverstanden sind. + +
+
+ Bitte überweisen Sie die Testgebühr in Höhe von $betrag Euro auf folgende Kontoverbindung IBAN $iban. Geben Sie unbedingt die Referenznummer $referenznr und Ihren Namen ein!
+ Die Gebühr ist sofort zur Zahlung fällig. Ohne Zahlungseingang ist eine Teilnahme am Test nicht möglich.
+ Es ist unbedingt erforderlich, dass Sie diese E-Mail zum Test mitbringen. +

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; +/* +echo " +

+$empfaenger
+$betreff
+$text
+
+"; +*/ + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + if($return){ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'V', '$datum_db') + "); + }else{ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'F', '$datum_db') + "); + } + } +} #end if, wenn Sitzung abgelaufen ist + + + + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/$templatename"); +?> \ No newline at end of file diff --git a/index.php_Ausbildungsjahr_dynamisch b/index.php_Ausbildungsjahr_dynamisch new file mode 100755 index 0000000..736942a --- /dev/null +++ b/index.php_Ausbildungsjahr_dynamisch @@ -0,0 +1,812 @@ +"; +#echo nl2br(print_r($_SESSION,true)); +#echo ""; + # Hinweis, ob im laufenden Ausbildungsjahr bereits ein Test + $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= date_format(now(), '%Y-%m-%d') + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_beginn = $row_curausbjahr['beginn']; + $curr_ende = $row_curausbjahr['ende']; + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + $smarty->assign('persdat_cur_beginn', $curr_beginn); + $smarty->assign('persdat_cur_ende', $curr_ende); + $smarty->assign('persdat_cur_ausbjahr', $curr_jahr); + + + $smarty->assign('persdat_value_anrede', $_SESSION["anrede"]); + $smarty->assign('persdat_value_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('persdat_value_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('persdat_value_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('persdat_value_str', stripslashes($_SESSION["str"])); + $smarty->assign('persdat_value_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('persdat_value_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('persdat_value_alter18', stripslashes($_SESSION["alter18"])); + $smarty->assign('persdat_value_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('persdat_value_tel', stripslashes($_SESSION["tel"])); + $smarty->assign('persdat_value_wh_test', stripslashes($_SESSION["wh_test"])); + $smarty->assign('persdat_value_id_wied', stripslashes($_SESSION["id_wied"])); + $smarty->assign('persdat_value_tan_wied', stripslashes($_SESSION["tan_wied"])); + + ## Fehlerhandling + $error1 = $_GET['error1']; + $error2 = $_GET['error2']; + $error3 = $_GET['error3']; + $error4 = $_GET['error4']; + $error5 = $_GET['error5']; + $error6 = $_GET['error6']; + $error7 = $_GET['error7']; + $error8 = $_GET['error8']; + $error9 = $_GET['error9']; + $error10 = $_GET['error10']; + $error11 = $_GET['error11']; + $error12 = $_GET['error12']; + $error13 = $_GET['error13']; + $error14 = $_GET['error14']; + $error15 = $_GET['error15']; + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + + if ($error1 == 1){$smarty->assign('erf_hig_anrede', 1);}else{$smarty->assign('erf_hig_anrede', 0);} + if ($error2 == 1){$smarty->assign('erf_hig_vorname', 1);}else{$smarty->assign('erf_hig_vorname', 0);} + if ($error3 == 1){$smarty->assign('erf_hig_nachname', 1);}else{$smarty->assign('erf_hig_nachname', 0);} + if ($error4 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error5 == 1){$smarty->assign('erf_hig_str', 1);}else{$smarty->assign('erf_hig_str', 0);} + if ($error6 == 1){$smarty->assign('erf_hig_plz', 1);}else{$smarty->assign('erf_hig_plz', 0);} + if ($error7 == 1){$smarty->assign('erf_hig_ort', 1);}else{$smarty->assign('erf_hig_ort', 0);} + if ($error8 == 1){$smarty->assign('erf_hig_mail', 1);}else{$smarty->assign('erf_hig_mail', 0);} + if ($error14 == 1){$smarty->assign('erf_hig_tel', 1);}else{$smarty->assign('erf_hig_tel', 0);} + if ($error15 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error20 == 1){$smarty->assign('erf_hig_id', 1);}else{$smarty->assign('erf_hig_id', 0);} + if ($error21 == 1){$smarty->assign('erf_hig_tan', 1);}else{$smarty->assign('erf_hig_tan', 0);} + + + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error9 == 1 or $error10 == 1 or $error11 == 1 or $error12 == 1 or $error13 == 1 or $error14 == 1 or $error15 == 1 or $error20 == 1 or $error21 == 1){ + $smarty->assign('persdat_error', 1); + + if($error9 == 1){ + $smarty->assign('persdat_error_text', 'Bitte prüfen Sie das Geburtsdatum.'); + } + if($error10 == 1){ + $smarty->assign('persdat_error_text', 'Die E-Mailadresse enthält Fehler.'); + } +# if($error11 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung.'); +# } +# if($error12 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben Sie den Test bereits 1x wiederholt.'); +# } +# if($error13 == 1){ +# $smarty->assign('persdat_error_text', 'Bitte prüfen Sie die Kombination aus ID/TAN.'); +# } + + if($error15 == 1){ + $smarty->assign('persdat_error_text', 'Bitte überprüfen Sie das Geburtsjahr.'); + } + + if($error20 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige ID darf nicht leer sein.'); + } + if($error21 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige TAN darf nicht leer sein.'); + } + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error14 == 1){ + $smarty->assign('persdat_error_text', 'Bitte füllen Sie die Pflichtfelder aus.'); + } + } + +} + +if ($action == 'termine') { + + # Im Fehlerfall oder beim zurückgehen sollen die Felder ausgefüllt sein + $smarty->assign('termine_value_testdatum', $_SESSION["testdatum"]); + +#echo '
', print_r($_POST, true), '
'; +#exit; +if(isset($_POST['anrede'])){ + $anrede = trim($_POST['anrede']); +}else{ + $anrede = $_SESSION["anrede"]; +} + +if(isset($_POST['vorname'])){ + $vorname = addslashes(trim($_POST['vorname'])); +}else{ + $vorname = $_SESSION["vorname"]; +} + +if(isset($_POST['nachname'])){ + $nachname = addslashes(trim($_POST['nachname'])); +}else{ + $nachname = $_SESSION["nachname"]; +} + +if(isset($_POST['gebdat'])){ + $gebdat = addslashes(trim($_POST['gebdat'])); +}else{ + $gebdat = $_SESSION["gebdat"]; +} + +if(isset($_POST['str'])){ + $str = addslashes(trim($_POST['str'])); +}else{ + $str = $_SESSION["str"]; +} + +if(isset($_POST['plz'])){ + $plz = addslashes(trim($_POST['plz'])); +}else{ + $plz = $_SESSION["plz"]; +} + +if(isset($_POST['ort'])){ + $ort = addslashes(trim($_POST['ort'])); +}else{ + $ort = $_SESSION["ort"]; +} + +if(isset($_POST['alter18'])){ + $alter18 = addslashes(trim($_POST['alter18'])); +}else{ + $alter18 = $_SESSION["alter18"]; +} + +if(isset($_POST['mail'])){ + $mail = addslashes(trim($_POST['mail'])); +}else{ + $mail = $_SESSION["mail"]; +} + +if(isset($_POST['tel'])){ + $tel = addslashes(trim($_POST['tel'])); +}else{ + $tel = $_SESSION["tel"]; +} + +if(isset($_POST['wh_test'])){ + $wh_test = addslashes(trim($_POST['wh_test'])); +}else{ + $wh_test = $_SESSION["wh_test"]; +} + +if(isset($_POST['id_wied'])){ + $id_wied = addslashes(trim($_POST['id_wied'])); +}else{ + $id_wied = $_SESSION["id_wied"]; +} + +if(isset($_POST['tan_wied'])){ + $tan_wied = addslashes(trim($_POST['tan_wied'])); +}else{ + $tan_wied = $_SESSION["tan_wied"]; +} + +$_SESSION["anrede"] = $anrede; +$_SESSION["vorname"] = $vorname; +$_SESSION["nachname"] = $nachname; +$_SESSION["gebdat"] = $gebdat; +$_SESSION["str"] = $str; +$_SESSION["plz"] = $plz; +$_SESSION["ort"] = $ort; +$_SESSION["alter18"] = $alter18; +$_SESSION["mail"] = $mail; +$_SESSION["tel"] = $tel; +$_SESSION["wh_test"] = $wh_test; +$_SESSION["id_wied"] = $id_wied; +$_SESSION["tan_wied"] = $tan_wied; + + + if ($anrede == '') { + $error1=1; + $error=true; + } + if ($vorname == ''){ + $error2=1; + $error=true; + } + if ($nachname == ''){ + $error3=1; + $error=true; + } + if ($gebdat == ''){ + $error4=1; + $error=true; + } + if ($str == ''){ + $error5=1; + $error=true; + } + if ($plz == ''){ + $error6=1; + $error=true; + } + if ($ort == ''){ + $error7=1; + $error=true; + } + if ($mail == ''){ + $error8=1; + $error=true; + } + + if ($tel == ''){ + $error14=1; + $error=true; + } + + if ($wh_test == '1' AND $id_wied == ''){ + $error20=1; + $error=true; + } + + if ($wh_test == '1' AND $tan_wied == ''){ + $error21=1; + $error=true; + } + + + # Datumsformat von DD.MM.YYYY nach YYYY-MM-DD + $gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); + + $curjahr = date("Y"); + $gebjahr = substr($gebdat_form,0,4); + if(($curjahr-$gebjahr)<=10){ + $error15=1; + $error=true; + } + + function validateDate($date, $format = 'Y-m-d'){ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + + if(!validateDate($gebdat_form)){ + $error9=1; + $error=true; + } + + if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) { + $error10=1; + $error=true; + } + +# # Test wurde nicht wiederholt +# if($wh_test == 0){ +# # doppelte Anmeldungen prüfen: +# +# # prüfen, ob die ID das aktuelle Jahr beinhaltet +# $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn +# FROM bpm_stichtage +# WHERE beginn >= date_format(now(), '%Y-%m-%d') +# ORDER BY sttg_id ASC +# LIMIT 1 +# "); +# $row_curausbjahr = $query_curausbjahr->fetch_array(); +# $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; +# +# $query_doppelt = $db->query("SELECT id +# FROM bpm_kandidat +# WHERE nachname='$nachname' +# AND vorname ='$vorname' +# AND gebdat='$gebdat_form' +# AND id LIKE '%$curr_jahr'"); +# $row_doppelt = $query_doppelt->fetch_array(); +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_doppelt['id'] != ''){ +# $error11=1; +# $error=true; +# } +# } + +# if($wh_test == 1){ +# # War der Kandidat bereits da mit durchgefallenem Test +# $query_anz = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = b.ka_id +# AND a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND b.bestanden='0'"); +# $row_anz = $query_anz->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz['Anz'] != '1'){ +# $error12=1; +# $error=true; +# } +# +# # Tan /ID Kombination prüfen +# $query_anz1 = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND d.tan = '$tan_wied'"); +# $row_anz1 = $query_anz1->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz1['Anz'] == '0'){ +# $error13=1; +# $error=true; +# } +# } + + if(isset($error)){ + echo ""; + exit; + } + + # Falls auf dieser Seite kein Testtermin gewählt wurde + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + if($error20 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'Bitte wählen Sie einen Termin.'); + } + if($error21 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'In der Zwischenzeit gibt es keine Plätze mehr zu diesem Termin
Bitte wählen Sie einen anderen Termin aus.'); + } + + ### Fehlerprüfung Ende + + # Auswahl der 5 Termine, die 14 Tage von heute in der Zukunft liegen, damit der Kandidat noch überweisen kann. + $anz_tage = trim(get_parameter(16)); + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr')tm_datum_form, tm_standort, tm_plaetze + FROM bpm_termine + WHERE tm_datum >= ADDDATE(now(), +$anz_tage) + ORDER BY tm_datum ASC + LIMIT 0,15"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $smarty->assign('termine_aktdat', date("d.m.Y H:i", time() ) ) ; + while ($row1 = $result1->fetch_array()) { + $pos_select = terminwahl($row1['tm_id'], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied); + +#echo "terminwahl($row1[tm_id], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied)
"; +#echo $pos_select."

"; + + if($pos_select == 0) { + $select = 1; + $select_err = ""; + }elseif($pos_select == 1){ + $select = 0; + $select_err = "Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung."; + }elseif($pos_select == 2){ + $select = 0; + $select_err = "Bitte prüfen Sie die Kombination aus ID/TAN."; + }elseif($pos_select == 3){ + $select = 0; + $select_err = "Sie haben den Test im Bewerbungsverfahren bestanden."; + }elseif($pos_select == 4){ + $select = 0; + $select_err = "Sie haben Sie den Test bereits 2x durchgeführt."; + } + + + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $row1[tm_id] + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + + # Freie Plätze berechnen + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz == 0){ + $disable = 0; + }else{ + $disable = 1; + } + + $row1['select'] = $select; + $row1['select_err'] = $select_err; + $row1['curr_jahr'] = $curr_jahr; + $row1['zaehler'] = $zaehler; + $row1['tm_standort'] = $standort; + $row1['tm_restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} +if ($action == 'check') { + +if(isset($_POST['testdatum'])){ + $testdatum = trim($_POST['testdatum']); +}else{ + $testdatum = $_SESSION["testdatum"]; +} + +$_SESSION["testdatum"] = $testdatum; + if ($testdatum == '') { + $error20=1; + $error=true; + } + + + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $anrede = $_SESSION["anrede"]; + if($anrede == 'm'){ + $anrede_ausg = 'Herr'; + } + if($anrede == 'w'){ + $anrede_ausg = 'Frau'; + } + + $smarty->assign('check_anrede', $anrede_ausg); + $smarty->assign('check_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('check_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('check_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('check_str', stripslashes($_SESSION["str"])); + $smarty->assign('check_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('check_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('check_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('check_tel', stripslashes($_SESSION["tel"])); + $betrag = trim(get_parameter(9)); + $smarty->assign('check_betrag', $betrag); + $smarty->assign('check_datum', $row_termin['tm_datum']); + $smarty->assign('check_standort', $standort); + $smarty->assign('check_raum', $row_termin['tm_raum']); + + # Ausgabe vorbereiten + + +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; +} + +if ($action == 'save') { +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; + +$anrede = $_SESSION["anrede"]; +$vorname = $_SESSION["vorname"]; +$nachname = $_SESSION["nachname"]; +$gebdat = $_SESSION["gebdat"]; +# Datumsformat von DD.MM.YYYY nach YYYY-MM-DD +$gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); +$str = $_SESSION["str"]; +$plz = $_SESSION["plz"]; +$ort = $_SESSION["ort"]; +$alter18 = $_SESSION["alter18"]; +$mail = $_SESSION["mail"]; +$tel = $_SESSION["tel"]; +$testdatum = $_SESSION["testdatum"]; +$wh_test = $_SESSION["wh_test"]; +$id_wied = $_SESSION["id_wied"]; +$tan_wied = $_SESSION["tan_wied"]; + +if($testdatum == ''){ + $smarty->assign('save_error', 1); + $smarty->assign('save_error_text', "Die Sitzung ist abgelaufen"); + +}else{ + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + $datum=date("Y-m-d H:i:s"); + # Hochschule wird festgesstellt. Das braucht man für den /status/index.php. Entsprechend wird bei Bestehen/Durchfallen einen Link auf die jeweilige Hochschule verwiesen. + # Die eigentliche Zuordnung, auch wenn Hochschule außerhalb BWs ist, mit Abfrage der Wunschhochschule kommt erst bei /upload/index.php (Dokumentenupload, Abschluß des Bewerbungsverfahrens) + # Somit wird hier auch noch "NA" als Antwort der Funktion "standard_hs" akzeptiert. + $hs = standard_hs($plz); + + + # Wenn der Kandidat sich einen Termin in der nächsten Bewerbungsphase auswählt, ist es keine Wiederholung mehr, sondern er bekommt eine neue ID + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $testdatum + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + # Beim anderen Bewerbungsphase ist es keine Wiederholung mehr + if(strpos($id_wied,$curr_jahr)==false){ + $wh_test = 0; + } + + + if($wh_test == 0){ + + $id = uuid($nachname, $vorname, $gebdat, $curr_jahr); + # Personensatz speichern + + $sql1 = $db->query("insert into bpm_kandidat (anrede, vorname, nachname, gebdat, str, plz, ort, alter18, mail, tel, id, hochschule, register_dat) VALUES('$anrede', '$vorname', '$nachname', '$gebdat_form', '$str', '$plz', '$ort', '$alter18', '$mail', '$tel', '$id', '$hs', '$datum')"); + $ka_id = $db->insert_id; + }else{ + # Bei Wiederholern wird der Stammsatz erhalten und man macht nur ein Update auf die Adressdaten + $id = $id_wied; + + $sql1 = $db->query( "UPDATE bpm_kandidat + SET anrede = '$anrede' + ,vorname = '$vorname' + ,nachname = '$nachname' + ,gebdat = '$gebdat_form' + ,str = '$str' + ,plz = '$plz' + ,ort = '$ort' + ,alter18 = '$alter18' + ,mail = '$mail' + ,tel = '$tel' + ,hochschule = '$hs' + ,modify_dat = '$datum' + WHERE id = '$id' + " ); + + $query_kaid = $db->query("SELECT ka_id FROM bpm_kandidat WHERE id = '$id'"); + $row_kaid = $query_kaid->fetch_array(); + $ka_id = $row_kaid['ka_id']; + } + # Freien Tan aus Pool holen + $tan = fetch_tan(); + + # Termin speichern mit TAN, den gibts aber noch nicht + $sql2 = $db->query("insert into bpm_term_kand (ka_id, tm_id, tp_id) VALUES($ka_id, $testdatum, $tan)"); + + if($sql1 and $sql2){ + session_destroy(); + + # Emailversand + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + $sender = "Hochschule Ludwigsburg"; + $iban = get_parameter(5); + $bic = get_parameter(6); + $sendermail = get_parameter(8); + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + $sender = "Hochschule Kehl"; + $iban = get_parameter(3); + $bic = get_parameter(4); + $sendermail = get_parameter(7); + } + $betrag = get_parameter(9); + $referenznr = $row_termin['tm_referenznr']; + $smarty->assign('save_id', $id); + $smarty->assign('save_vorname', stripslashes($vorname)); + $smarty->assign('save_nachname', stripslashes($nachname)); + $smarty->assign('save_empf', stripslashes($sender)); + $smarty->assign('save_iban', stripslashes($iban)); + $smarty->assign('save_bic', stripslashes($bic)); + $smarty->assign('save_betrag', stripslashes($betrag)); + $smarty->assign('save_ref', stripslashes($referenznr)); + + # Damit bei der Mail nichts mit \ kommt + $vorname = stripslashes($vorname); + $nachname = stripslashes($nachname); + + $empfaenger = "$mail"; + $betreff = "Anmeldung zum Eignungstest BPM"; + $text = " + + + Anmeldung zum Eignungstest + + + + Guten Tag $vorname $nachname! +

+ Sie haben verbindlich Ihre Teilnahme am Studierfähigkeitstest BPM (Bachelor of Arts - Public Management) gebucht. +
+
+ + + + + + + + + + + + + + + + + "; + if($alter18 == 0){ + $text .=" + + + + "; + } + $betrag = trim(get_parameter(9)); + $text .= " +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+ + Persönliche ID: + + + + $id + +
+ + Hinweis: + + + + Bitte bringen Sie zum Testtermin die schriftliche Einwilligung Ihrer gesetzlicher Vertreter mit, dass diese mit Ihrer Testteilnahme einverstanden sind. + +
+
+ Bitte überweisen Sie die Testgebühr in Höhe von $betrag Euro auf folgende Kontoverbindung IBAN $iban. Geben Sie unbedingt die Referenznummer $referenznr und Ihren Namen ein!
+ Die Gebühr ist sofort zur Zahlung fällig. Ohne Zahlungseingang ist eine Teilnahme am Test nicht möglich.
+ Es ist unbedingt erforderlich, dass Sie diese E-Mail zum Test mitbringen. +

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; +/* +echo " +

+$empfaenger
+$betreff
+$text
+
+"; +*/ + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + if($return){ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'V', '$datum_db') + "); + }else{ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'F', '$datum_db') + "); + } + } +} #end if, wenn Sitzung abgelaufen ist + + + + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/$templatename"); +?> \ No newline at end of file diff --git a/index.php_Ausbildungsjahr_text b/index.php_Ausbildungsjahr_text new file mode 100755 index 0000000..736942a --- /dev/null +++ b/index.php_Ausbildungsjahr_text @@ -0,0 +1,812 @@ +"; +#echo nl2br(print_r($_SESSION,true)); +#echo ""; + # Hinweis, ob im laufenden Ausbildungsjahr bereits ein Test + $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= date_format(now(), '%Y-%m-%d') + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_beginn = $row_curausbjahr['beginn']; + $curr_ende = $row_curausbjahr['ende']; + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + $smarty->assign('persdat_cur_beginn', $curr_beginn); + $smarty->assign('persdat_cur_ende', $curr_ende); + $smarty->assign('persdat_cur_ausbjahr', $curr_jahr); + + + $smarty->assign('persdat_value_anrede', $_SESSION["anrede"]); + $smarty->assign('persdat_value_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('persdat_value_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('persdat_value_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('persdat_value_str', stripslashes($_SESSION["str"])); + $smarty->assign('persdat_value_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('persdat_value_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('persdat_value_alter18', stripslashes($_SESSION["alter18"])); + $smarty->assign('persdat_value_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('persdat_value_tel', stripslashes($_SESSION["tel"])); + $smarty->assign('persdat_value_wh_test', stripslashes($_SESSION["wh_test"])); + $smarty->assign('persdat_value_id_wied', stripslashes($_SESSION["id_wied"])); + $smarty->assign('persdat_value_tan_wied', stripslashes($_SESSION["tan_wied"])); + + ## Fehlerhandling + $error1 = $_GET['error1']; + $error2 = $_GET['error2']; + $error3 = $_GET['error3']; + $error4 = $_GET['error4']; + $error5 = $_GET['error5']; + $error6 = $_GET['error6']; + $error7 = $_GET['error7']; + $error8 = $_GET['error8']; + $error9 = $_GET['error9']; + $error10 = $_GET['error10']; + $error11 = $_GET['error11']; + $error12 = $_GET['error12']; + $error13 = $_GET['error13']; + $error14 = $_GET['error14']; + $error15 = $_GET['error15']; + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + + if ($error1 == 1){$smarty->assign('erf_hig_anrede', 1);}else{$smarty->assign('erf_hig_anrede', 0);} + if ($error2 == 1){$smarty->assign('erf_hig_vorname', 1);}else{$smarty->assign('erf_hig_vorname', 0);} + if ($error3 == 1){$smarty->assign('erf_hig_nachname', 1);}else{$smarty->assign('erf_hig_nachname', 0);} + if ($error4 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error5 == 1){$smarty->assign('erf_hig_str', 1);}else{$smarty->assign('erf_hig_str', 0);} + if ($error6 == 1){$smarty->assign('erf_hig_plz', 1);}else{$smarty->assign('erf_hig_plz', 0);} + if ($error7 == 1){$smarty->assign('erf_hig_ort', 1);}else{$smarty->assign('erf_hig_ort', 0);} + if ($error8 == 1){$smarty->assign('erf_hig_mail', 1);}else{$smarty->assign('erf_hig_mail', 0);} + if ($error14 == 1){$smarty->assign('erf_hig_tel', 1);}else{$smarty->assign('erf_hig_tel', 0);} + if ($error15 == 1){$smarty->assign('erf_hig_gebdat', 1);}else{$smarty->assign('erf_hig_gebdat', 0);} + if ($error20 == 1){$smarty->assign('erf_hig_id', 1);}else{$smarty->assign('erf_hig_id', 0);} + if ($error21 == 1){$smarty->assign('erf_hig_tan', 1);}else{$smarty->assign('erf_hig_tan', 0);} + + + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error9 == 1 or $error10 == 1 or $error11 == 1 or $error12 == 1 or $error13 == 1 or $error14 == 1 or $error15 == 1 or $error20 == 1 or $error21 == 1){ + $smarty->assign('persdat_error', 1); + + if($error9 == 1){ + $smarty->assign('persdat_error_text', 'Bitte prüfen Sie das Geburtsdatum.'); + } + if($error10 == 1){ + $smarty->assign('persdat_error_text', 'Die E-Mailadresse enthält Fehler.'); + } +# if($error11 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung.'); +# } +# if($error12 == 1){ +# $smarty->assign('persdat_error_text', 'Sie haben Sie den Test bereits 1x wiederholt.'); +# } +# if($error13 == 1){ +# $smarty->assign('persdat_error_text', 'Bitte prüfen Sie die Kombination aus ID/TAN.'); +# } + + if($error15 == 1){ + $smarty->assign('persdat_error_text', 'Bitte überprüfen Sie das Geburtsjahr.'); + } + + if($error20 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige ID darf nicht leer sein.'); + } + if($error21 == 1){ + $smarty->assign('persdat_error_text', 'Die damalige TAN darf nicht leer sein.'); + } + if($error1 == 1 or $error2 == 1 or $error3 == 1 or $error4 == 1 or $error5 == 1 or $error6 == 1 or $error7 == 1 or $error8 == 1 or $error14 == 1){ + $smarty->assign('persdat_error_text', 'Bitte füllen Sie die Pflichtfelder aus.'); + } + } + +} + +if ($action == 'termine') { + + # Im Fehlerfall oder beim zurückgehen sollen die Felder ausgefüllt sein + $smarty->assign('termine_value_testdatum', $_SESSION["testdatum"]); + +#echo '
', print_r($_POST, true), '
'; +#exit; +if(isset($_POST['anrede'])){ + $anrede = trim($_POST['anrede']); +}else{ + $anrede = $_SESSION["anrede"]; +} + +if(isset($_POST['vorname'])){ + $vorname = addslashes(trim($_POST['vorname'])); +}else{ + $vorname = $_SESSION["vorname"]; +} + +if(isset($_POST['nachname'])){ + $nachname = addslashes(trim($_POST['nachname'])); +}else{ + $nachname = $_SESSION["nachname"]; +} + +if(isset($_POST['gebdat'])){ + $gebdat = addslashes(trim($_POST['gebdat'])); +}else{ + $gebdat = $_SESSION["gebdat"]; +} + +if(isset($_POST['str'])){ + $str = addslashes(trim($_POST['str'])); +}else{ + $str = $_SESSION["str"]; +} + +if(isset($_POST['plz'])){ + $plz = addslashes(trim($_POST['plz'])); +}else{ + $plz = $_SESSION["plz"]; +} + +if(isset($_POST['ort'])){ + $ort = addslashes(trim($_POST['ort'])); +}else{ + $ort = $_SESSION["ort"]; +} + +if(isset($_POST['alter18'])){ + $alter18 = addslashes(trim($_POST['alter18'])); +}else{ + $alter18 = $_SESSION["alter18"]; +} + +if(isset($_POST['mail'])){ + $mail = addslashes(trim($_POST['mail'])); +}else{ + $mail = $_SESSION["mail"]; +} + +if(isset($_POST['tel'])){ + $tel = addslashes(trim($_POST['tel'])); +}else{ + $tel = $_SESSION["tel"]; +} + +if(isset($_POST['wh_test'])){ + $wh_test = addslashes(trim($_POST['wh_test'])); +}else{ + $wh_test = $_SESSION["wh_test"]; +} + +if(isset($_POST['id_wied'])){ + $id_wied = addslashes(trim($_POST['id_wied'])); +}else{ + $id_wied = $_SESSION["id_wied"]; +} + +if(isset($_POST['tan_wied'])){ + $tan_wied = addslashes(trim($_POST['tan_wied'])); +}else{ + $tan_wied = $_SESSION["tan_wied"]; +} + +$_SESSION["anrede"] = $anrede; +$_SESSION["vorname"] = $vorname; +$_SESSION["nachname"] = $nachname; +$_SESSION["gebdat"] = $gebdat; +$_SESSION["str"] = $str; +$_SESSION["plz"] = $plz; +$_SESSION["ort"] = $ort; +$_SESSION["alter18"] = $alter18; +$_SESSION["mail"] = $mail; +$_SESSION["tel"] = $tel; +$_SESSION["wh_test"] = $wh_test; +$_SESSION["id_wied"] = $id_wied; +$_SESSION["tan_wied"] = $tan_wied; + + + if ($anrede == '') { + $error1=1; + $error=true; + } + if ($vorname == ''){ + $error2=1; + $error=true; + } + if ($nachname == ''){ + $error3=1; + $error=true; + } + if ($gebdat == ''){ + $error4=1; + $error=true; + } + if ($str == ''){ + $error5=1; + $error=true; + } + if ($plz == ''){ + $error6=1; + $error=true; + } + if ($ort == ''){ + $error7=1; + $error=true; + } + if ($mail == ''){ + $error8=1; + $error=true; + } + + if ($tel == ''){ + $error14=1; + $error=true; + } + + if ($wh_test == '1' AND $id_wied == ''){ + $error20=1; + $error=true; + } + + if ($wh_test == '1' AND $tan_wied == ''){ + $error21=1; + $error=true; + } + + + # Datumsformat von DD.MM.YYYY nach YYYY-MM-DD + $gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); + + $curjahr = date("Y"); + $gebjahr = substr($gebdat_form,0,4); + if(($curjahr-$gebjahr)<=10){ + $error15=1; + $error=true; + } + + function validateDate($date, $format = 'Y-m-d'){ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + + if(!validateDate($gebdat_form)){ + $error9=1; + $error=true; + } + + if (!filter_var($mail, FILTER_VALIDATE_EMAIL)) { + $error10=1; + $error=true; + } + +# # Test wurde nicht wiederholt +# if($wh_test == 0){ +# # doppelte Anmeldungen prüfen: +# +# # prüfen, ob die ID das aktuelle Jahr beinhaltet +# $query_curausbjahr = $db->query("SELECT date_format(beginn, '%d.%m.%Y') beginn, date_format(ende, '%d.%m.%Y') ende, ausbildungsbeginn +# FROM bpm_stichtage +# WHERE beginn >= date_format(now(), '%Y-%m-%d') +# ORDER BY sttg_id ASC +# LIMIT 1 +# "); +# $row_curausbjahr = $query_curausbjahr->fetch_array(); +# $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; +# +# $query_doppelt = $db->query("SELECT id +# FROM bpm_kandidat +# WHERE nachname='$nachname' +# AND vorname ='$vorname' +# AND gebdat='$gebdat_form' +# AND id LIKE '%$curr_jahr'"); +# $row_doppelt = $query_doppelt->fetch_array(); +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_doppelt['id'] != ''){ +# $error11=1; +# $error=true; +# } +# } + +# if($wh_test == 1){ +# # War der Kandidat bereits da mit durchgefallenem Test +# $query_anz = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_ergebnisse b, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = b.ka_id +# AND a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND b.bestanden='0'"); +# $row_anz = $query_anz->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz['Anz'] != '1'){ +# $error12=1; +# $error=true; +# } +# +# # Tan /ID Kombination prüfen +# $query_anz1 = $db->query("SELECT count(*) Anz +# FROM bpm_kandidat a, bpm_term_kand c, bpm_tanpool d +# WHERE a.ka_id = c.ka_id +# AND c.tp_id = d.tp_id +# AND a.id = '$id_wied' +# AND d.tan = '$tan_wied'"); +# $row_anz1 = $query_anz1->fetch_array(); +# # wenn hier nichts gefunden wird, dann stimmt TAN Wiederholung +# +# # Bei Wiederholungskandidat muss hier das übersprungen werden und gewährleistet werden, dass er nicht ein drittes Mal sich bewirbt +# # Außerdem muss das Testergebnis herangezogen werden, ob er nicht bestanden hat +# if($row_anz1['Anz'] == '0'){ +# $error13=1; +# $error=true; +# } +# } + + if(isset($error)){ + echo ""; + exit; + } + + # Falls auf dieser Seite kein Testtermin gewählt wurde + $error20 = $_GET['error20']; + $error21 = $_GET['error21']; + if($error20 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'Bitte wählen Sie einen Termin.'); + } + if($error21 == 1){ + $smarty->assign('termine_error', 1); + $smarty->assign('termine_error_text', 'In der Zwischenzeit gibt es keine Plätze mehr zu diesem Termin
Bitte wählen Sie einen anderen Termin aus.'); + } + + ### Fehlerprüfung Ende + + # Auswahl der 5 Termine, die 14 Tage von heute in der Zukunft liegen, damit der Kandidat noch überweisen kann. + $anz_tage = trim(get_parameter(16)); + $query1 = "SELECT tm_id, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr')tm_datum_form, tm_standort, tm_plaetze + FROM bpm_termine + WHERE tm_datum >= ADDDATE(now(), +$anz_tage) + ORDER BY tm_datum ASC + LIMIT 0,15"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + $smarty->assign('termine_aktdat', date("d.m.Y H:i", time() ) ) ; + while ($row1 = $result1->fetch_array()) { + $pos_select = terminwahl($row1['tm_id'], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied); + +#echo "terminwahl($row1[tm_id], $vorname, $nachname, $gebdat_form, $wh_test, $id_wied, $tan_wied)
"; +#echo $pos_select."

"; + + if($pos_select == 0) { + $select = 1; + $select_err = ""; + }elseif($pos_select == 1){ + $select = 0; + $select_err = "Sie haben sich bereits registriert. Setzen Sie sich ggf. mit der Hochschule in Verbindung."; + }elseif($pos_select == 2){ + $select = 0; + $select_err = "Bitte prüfen Sie die Kombination aus ID/TAN."; + }elseif($pos_select == 3){ + $select = 0; + $select_err = "Sie haben den Test im Bewerbungsverfahren bestanden."; + }elseif($pos_select == 4){ + $select = 0; + $select_err = "Sie haben Sie den Test bereits 2x durchgeführt."; + } + + + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $row1[tm_id] + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + if($row1['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + if($row1['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + + # Freie Plätze berechnen + $restplatz = get_restplatz($row1['tm_id']); + if($restplatz == 0){ + $disable = 0; + }else{ + $disable = 1; + } + + $row1['select'] = $select; + $row1['select_err'] = $select_err; + $row1['curr_jahr'] = $curr_jahr; + $row1['zaehler'] = $zaehler; + $row1['tm_standort'] = $standort; + $row1['tm_restplatz'] = $restplatz; + $row1['tm_disable'] = $disable; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} +if ($action == 'check') { + +if(isset($_POST['testdatum'])){ + $testdatum = trim($_POST['testdatum']); +}else{ + $testdatum = $_SESSION["testdatum"]; +} + +$_SESSION["testdatum"] = $testdatum; + if ($testdatum == '') { + $error20=1; + $error=true; + } + + + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg'; + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl'; + } + $anrede = $_SESSION["anrede"]; + if($anrede == 'm'){ + $anrede_ausg = 'Herr'; + } + if($anrede == 'w'){ + $anrede_ausg = 'Frau'; + } + + $smarty->assign('check_anrede', $anrede_ausg); + $smarty->assign('check_vorname', stripslashes($_SESSION["vorname"])); + $smarty->assign('check_nachname', stripslashes($_SESSION["nachname"])); + $smarty->assign('check_gebdat', stripslashes($_SESSION["gebdat"])); + $smarty->assign('check_str', stripslashes($_SESSION["str"])); + $smarty->assign('check_plz', stripslashes($_SESSION["plz"])); + $smarty->assign('check_ort', stripslashes($_SESSION["ort"])); + $smarty->assign('check_mail', stripslashes($_SESSION["mail"])); + $smarty->assign('check_tel', stripslashes($_SESSION["tel"])); + $betrag = trim(get_parameter(9)); + $smarty->assign('check_betrag', $betrag); + $smarty->assign('check_datum', $row_termin['tm_datum']); + $smarty->assign('check_standort', $standort); + $smarty->assign('check_raum', $row_termin['tm_raum']); + + # Ausgabe vorbereiten + + +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; +} + +if ($action == 'save') { +#echo "
";
+#echo nl2br(print_r($_SESSION,true));
+#echo "
"; + +$anrede = $_SESSION["anrede"]; +$vorname = $_SESSION["vorname"]; +$nachname = $_SESSION["nachname"]; +$gebdat = $_SESSION["gebdat"]; +# Datumsformat von DD.MM.YYYY nach YYYY-MM-DD +$gebdat_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gebdat); +$str = $_SESSION["str"]; +$plz = $_SESSION["plz"]; +$ort = $_SESSION["ort"]; +$alter18 = $_SESSION["alter18"]; +$mail = $_SESSION["mail"]; +$tel = $_SESSION["tel"]; +$testdatum = $_SESSION["testdatum"]; +$wh_test = $_SESSION["wh_test"]; +$id_wied = $_SESSION["id_wied"]; +$tan_wied = $_SESSION["tan_wied"]; + +if($testdatum == ''){ + $smarty->assign('save_error', 1); + $smarty->assign('save_error_text', "Die Sitzung ist abgelaufen"); + +}else{ + # Checken, ob noch Restplätze vorhanden sind + $restplatz = get_restplatz($testdatum); + if($restplatz == 0){ + $error21=1; + $error=true; + } + + if(isset($error)){ + echo ""; + exit; + } + $datum=date("Y-m-d H:i:s"); + # Hochschule wird festgesstellt. Das braucht man für den /status/index.php. Entsprechend wird bei Bestehen/Durchfallen einen Link auf die jeweilige Hochschule verwiesen. + # Die eigentliche Zuordnung, auch wenn Hochschule außerhalb BWs ist, mit Abfrage der Wunschhochschule kommt erst bei /upload/index.php (Dokumentenupload, Abschluß des Bewerbungsverfahrens) + # Somit wird hier auch noch "NA" als Antwort der Funktion "standard_hs" akzeptiert. + $hs = standard_hs($plz); + + + # Wenn der Kandidat sich einen Termin in der nächsten Bewerbungsphase auswählt, ist es keine Wiederholung mehr, sondern er bekommt eine neue ID + # Checken, zu welchem Ausbildungsjahr das gewählte Testdatum gehört: + $query_curtermin = $db->query("SELECT date_format(tm_datum, '%Y-%m-%d') tm_datum + FROM bpm_termine + WHERE tm_id = $testdatum + "); + $row_curtermin = $query_curtermin->fetch_array(); + + $query_curausbjahr = $db->query("SELECT ausbildungsbeginn + FROM bpm_stichtage + WHERE ende >= '$row_curtermin[tm_datum]' + ORDER BY beginn ASC + LIMIT 1 + "); + $row_curausbjahr = $query_curausbjahr->fetch_array(); + $curr_jahr = $row_curausbjahr['ausbildungsbeginn']; + + # Beim anderen Bewerbungsphase ist es keine Wiederholung mehr + if(strpos($id_wied,$curr_jahr)==false){ + $wh_test = 0; + } + + + if($wh_test == 0){ + + $id = uuid($nachname, $vorname, $gebdat, $curr_jahr); + # Personensatz speichern + + $sql1 = $db->query("insert into bpm_kandidat (anrede, vorname, nachname, gebdat, str, plz, ort, alter18, mail, tel, id, hochschule, register_dat) VALUES('$anrede', '$vorname', '$nachname', '$gebdat_form', '$str', '$plz', '$ort', '$alter18', '$mail', '$tel', '$id', '$hs', '$datum')"); + $ka_id = $db->insert_id; + }else{ + # Bei Wiederholern wird der Stammsatz erhalten und man macht nur ein Update auf die Adressdaten + $id = $id_wied; + + $sql1 = $db->query( "UPDATE bpm_kandidat + SET anrede = '$anrede' + ,vorname = '$vorname' + ,nachname = '$nachname' + ,gebdat = '$gebdat_form' + ,str = '$str' + ,plz = '$plz' + ,ort = '$ort' + ,alter18 = '$alter18' + ,mail = '$mail' + ,tel = '$tel' + ,hochschule = '$hs' + ,modify_dat = '$datum' + WHERE id = '$id' + " ); + + $query_kaid = $db->query("SELECT ka_id FROM bpm_kandidat WHERE id = '$id'"); + $row_kaid = $query_kaid->fetch_array(); + $ka_id = $row_kaid['ka_id']; + } + # Freien Tan aus Pool holen + $tan = fetch_tan(); + + # Termin speichern mit TAN, den gibts aber noch nicht + $sql2 = $db->query("insert into bpm_term_kand (ka_id, tm_id, tp_id) VALUES($ka_id, $testdatum, $tan)"); + + if($sql1 and $sql2){ + session_destroy(); + + # Emailversand + $query_termin = $db->query("SELECT date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum, tm_standort, tm_raum, tm_plaetze, tm_referenznr FROM bpm_termine WHERE tm_id='$testdatum'"); + $row_termin = $query_termin->fetch_array(); + + if($row_termin['tm_standort'] == 'L'){ + $standort = 'Ludwigsburg - Reuteallee 36, 71634 Ludwigsburg'; + $sender = "Hochschule Ludwigsburg"; + $iban = get_parameter(5); + $bic = get_parameter(6); + $sendermail = get_parameter(8); + } + + if($row_termin['tm_standort'] == 'K'){ + $standort = 'Kehl - Kinzigallee 1, 77694 Kehl'; + $sender = "Hochschule Kehl"; + $iban = get_parameter(3); + $bic = get_parameter(4); + $sendermail = get_parameter(7); + } + $betrag = get_parameter(9); + $referenznr = $row_termin['tm_referenznr']; + $smarty->assign('save_id', $id); + $smarty->assign('save_vorname', stripslashes($vorname)); + $smarty->assign('save_nachname', stripslashes($nachname)); + $smarty->assign('save_empf', stripslashes($sender)); + $smarty->assign('save_iban', stripslashes($iban)); + $smarty->assign('save_bic', stripslashes($bic)); + $smarty->assign('save_betrag', stripslashes($betrag)); + $smarty->assign('save_ref', stripslashes($referenznr)); + + # Damit bei der Mail nichts mit \ kommt + $vorname = stripslashes($vorname); + $nachname = stripslashes($nachname); + + $empfaenger = "$mail"; + $betreff = "Anmeldung zum Eignungstest BPM"; + $text = " + + + Anmeldung zum Eignungstest + + + + Guten Tag $vorname $nachname! +

+ Sie haben verbindlich Ihre Teilnahme am Studierfähigkeitstest BPM (Bachelor of Arts - Public Management) gebucht. +
+
+ + + + + + + + + + + + + + + + + "; + if($alter18 == 0){ + $text .=" + + + + "; + } + $betrag = trim(get_parameter(9)); + $text .= " +
+ + Testtag: + + + + $row_termin[tm_datum] + +
+ + Hochschule: + + + + $standort + +
+ + Gebäude / Raum: + + + + $row_termin[tm_raum] + +
+ + Persönliche ID: + + + + $id + +
+ + Hinweis: + + + + Bitte bringen Sie zum Testtermin die schriftliche Einwilligung Ihrer gesetzlicher Vertreter mit, dass diese mit Ihrer Testteilnahme einverstanden sind. + +
+
+ Bitte überweisen Sie die Testgebühr in Höhe von $betrag Euro auf folgende Kontoverbindung IBAN $iban. Geben Sie unbedingt die Referenznummer $referenznr und Ihren Namen ein!
+ Die Gebühr ist sofort zur Zahlung fällig. Ohne Zahlungseingang ist eine Teilnahme am Test nicht möglich.
+ Es ist unbedingt erforderlich, dass Sie diese E-Mail zum Test mitbringen. +

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; +/* +echo " +

+$empfaenger
+$betreff
+$text
+
+"; +*/ + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + if($return){ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'V', '$datum_db') + "); + }else{ + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff', '$text_db', 'F', '$datum_db') + "); + } + } +} #end if, wenn Sitzung abgelaufen ist + + + + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/$templatename"); +?> \ No newline at end of file diff --git a/jquery/AUTHORS.txt b/jquery/AUTHORS.txt new file mode 100755 index 0000000..a75056b --- /dev/null +++ b/jquery/AUTHORS.txt @@ -0,0 +1,333 @@ +Authors ordered by first contribution +A list of current team members is available at http://jqueryui.com/about + +Paul Bakaus +Richard Worth +Yehuda Katz +Sean Catchpole +John Resig +Tane Piper +Dmitri Gaskin +Klaus Hartl +Stefan Petre +Gilles van den Hoven +Micheil Bryan Smith +Jörn Zaefferer +Marc Grabanski +Keith Wood +Brandon Aaron +Scott González +Eduardo Lundgren +Aaron Eisenberger +Joan Piedra +Bruno Basto +Remy Sharp +Bohdan Ganicky +David Bolter +Chi Cheng +Ca-Phun Ung +Ariel Flesler +Maggie Wachs +Scott Jehl +Todd Parker +Andrew Powell +Brant Burnett +Douglas Neiner +Paul Irish +Ralph Whitbeck +Thibault Duplessis +Dominique Vincent +Jack Hsu +Adam Sontag +Carl Fürstenberg +Kevin Dalman +Alberto Fernández Capel +Jacek Jędrzejewski (http://jacek.jedrzejewski.name) +Ting Kuei +Samuel Cormier-Iijima +Jon Palmer +Ben Hollis +Justin MacCarthy +Eyal Kobrigo +Tiago Freire +Diego Tres +Holger Rüprich +Ziling Zhao +Mike Alsup +Robson Braga Araujo +Pierre-Henri Ausseil +Christopher McCulloh +Andrew Newcomb +Lim Chee Aun +Jorge Barreiro +Daniel Steigerwald +John Firebaugh +John Enters +Andrey Kapitcyn +Dmitry Petrov +Eric Hynds +Chairat Sunthornwiphat +Josh Varner +Stéphane Raimbault +Jay Merrifield +J. Ryan Stinnett +Peter Heiberg +Alex Dovenmuehle +Jamie Gegerson +Raymond Schwartz +Phillip Barnes +Kyle Wilkinson +Khaled AlHourani +Marian Rudzynski +Jean-Francois Remy +Doug Blood +Filippo Cavallarin +Heiko Henning +Aliaksandr Rahalevich +Mario Visic +Xavi Ramirez +Max Schnur +Saji Nediyanchath +Corey Frang +Aaron Peterson +Ivan Peters +Mohamed Cherif Bouchelaghem +Marcos Sousa +Michael DellaNoce +George Marshall +Tobias Brunner +Martin Solli +David Petersen +Dan Heberden +William Kevin Manire +Gilmore Davidson +Michael Wu +Adam Parod +Guillaume Gautreau +Marcel Toele +Dan Streetman +Matt Hoskins +Giovanni Giacobbi +Kyle Florence +Pavol Hluchý +Hans Hillen +Mark Johnson +Trey Hunner +Shane Whittet +Edward A Faulkner +Adam Baratz +Kato Kazuyoshi +Eike Send +Kris Borchers +Eddie Monge +Israel Tsadok +Carson McDonald +Jason Davies +Garrison Locke +David Murdoch +Benjamin Scott Boyle +Jesse Baird +Jonathan Vingiano +Dylan Just +Hiroshi Tomita +Glenn Goodrich +Tarafder Ashek-E-Elahi +Ryan Neufeld +Marc Neuwirth +Philip Graham +Benjamin Sterling +Wesley Walser +Kouhei Sutou +Karl Kirch +Chris Kelly +Jason Oster +Felix Nagel +Alexander Polomoshnov +David Leal +Igor Milla +Dave Methvin +Florian Gutmann +Marwan Al Jubeh +Milan Broum +Sebastian Sauer +Gaëtan Muller +Michel Weimerskirch +William Griffiths +Stojce Slavkovski +David Soms +David De Sloovere +Michael P. Jung +Shannon Pekary +Dan Wellman +Matthew Edward Hutton +James Khoury +Rob Loach +Alberto Monteiro +Alex Rhea +Krzysztof Rosiński +Ryan Olton +Genie <386@mail.com> +Rick Waldron +Ian Simpson +Lev Kitsis +TJ VanToll +Justin Domnitz +Douglas Cerna +Bert ter Heide +Jasvir Nagra +Yuriy Khabarov <13real008@gmail.com> +Harri Kilpiö +Lado Lomidze +Amir E. Aharoni +Simon Sattes +Jo Liss +Guntupalli Karunakar +Shahyar Ghobadpour +Lukasz Lipinski +Timo Tijhof +Jason Moon +Martin Frost +Eneko Illarramendi +EungJun Yi +Courtland Allen +Viktar Varvanovich +Danny Trunk +Pavel Stetina +Michael Stay +Steven Roussey +Michael Hollis +Lee Rowlands +Timmy Willison +Karl Swedberg +Baoju Yuan +Maciej Mroziński +Luis Dalmolin +Mark Aaron Shirley +Martin Hoch +Jiayi Yang +Philipp Benjamin Köppchen +Sindre Sorhus +Bernhard Sirlinger +Jared A. Scheel +Rafael Xavier de Souza +John Chen +Robert Beuligmann +Dale Kocian +Mike Sherov +Andrew Couch +Marc-Andre Lafortune +Nate Eagle +David Souther +Mathias Stenbom +Sergey Kartashov +Avinash R +Ethan Romba +Cory Gackenheimer +Juan Pablo Kaniefsky +Roman Salnikov +Anika Henke +Samuel Bovée +Fabrício Matté +Viktor Kojouharov +Pawel Maruszczyk (http://hrabstwo.net) +Pavel Selitskas +Bjørn Johansen +Matthieu Penant +Dominic Barnes +David Sullivan +Thomas Jaggi +Vahid Sohrabloo +Travis Carden +Bruno M. Custódio +Nathanael Silverman +Christian Wenz +Steve Urmston +Zaven Muradyan +Woody Gilk +Zbigniew Motyka +Suhail Alkowaileet +Toshi MARUYAMA +David Hansen +Brian Grinstead +Christian Klammer +Steven Luscher +Gan Eng Chin +Gabriel Schulhof +Alexander Schmitz +Vilhjálmur Skúlason +Siebrand Mazeland +Mohsen Ekhtiari +Pere Orga +Jasper de Groot +Stephane Deschamps +Jyoti Deka +Andrei Picus +Ondrej Novy +Jacob McCutcheon +Monika Piotrowicz +Imants Horsts +Eric Dahl +Dave Stein +Dylan Barrell +Daniel DeGroff +Michael Wiencek +Thomas Meyer +Ruslan Yakhyaev +Brian J. Dowling +Ben Higgins +Yermo Lamers +Patrick Stapleton +Trisha Crowley +Usman Akeju +Rodrigo Menezes +Jacques Perrault +Frederik Elvhage +Will Holley +Uri Gilad +Richard Gibson +Simen Bekkhus +Chen Eshchar +Bruno Pérel +Mohammed Alshehri +Lisa Seacat DeLuca +Anne-Gaelle Colom +Adam Foster +Luke Page +Daniel Owens +Michael Orchard +Marcus Warren +Nils Heuermann +Marco Ziech +Patricia Juarez +Ben Mosher +Ablay Keldibek +Thomas Applencourt +Jiabao Wu +Eric Lee Carraway +Victor Homyakov +Myeongjin Lee +Liran Sharir +Weston Ruter +Mani Mishra +Hannah Methvin +Leonardo Balter +Benjamin Albert +Michał Gołębiowski +Alyosha Pushak +Fahad Ahmad +Matt Brundage +Francesc Baeta +Piotr Baran +Mukul Hase +Konstantin Dinev +Rand Scullard +Dan Strohl +Maksim Ryzhikov +Amine HADDAD +Amanpreet Singh +Alexey Balchunas +Peter Kehl +Peter Dave Hello +Johannes Schäfer +Ville Skyttä +Ryan Oriecuia diff --git a/jquery/LICENSE.txt b/jquery/LICENSE.txt new file mode 100755 index 0000000..4819e54 --- /dev/null +++ b/jquery/LICENSE.txt @@ -0,0 +1,43 @@ +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. diff --git a/jquery/bootstrap.min.css b/jquery/bootstrap.min.css new file mode 100755 index 0000000..ca98845 --- /dev/null +++ b/jquery/bootstrap.min.css @@ -0,0 +1,5740 @@ +/*! * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{ + display:block +} +audio,canvas,progress,video{ + display:inline-block; + vertical-align:baseline +} +audio:not([controls]){ + display:none; + height:0 +} +[hidden],template{ + display:none +} +a{ + background-color:transparent +} +a:active,a:hover{ + outline:0 +} +abbr[title]{ + border-bottom:1px dotted +} +b,strong{ + font-weight:700 +} +dfn{ + font-style:italic +} +h1{ + margin:.67em 0; + font-size:2em +} +mark{ + color:#000; + background:#ff0 +} +small{ + font-size:80% +} +sub,sup{ + position:relative; + font-size:75%; + line-height:0; + vertical-align:baseline +} +sup{ + top:-.5em +} +sub{ + bottom:-.25em +} +img{ + border:0 +} +svg:not(:root){ + overflow:hidden +} +figure{ + margin:1em 40px +} +hr{ + height:0; + -webkit-box-sizing:content-box; + -moz-box-sizing:content-box; + box-sizing:content-box +} +pre{ + overflow:auto +} +code,kbd,pre,samp{ + font-family:monospace,monospace; + font-size:1em +} +button,input,optgroup,select,textarea{ + margin:0; + font:inherit; + color:inherit +} +button{ + overflow:visible +} +button,select{ + text-transform:none +} +button,html input[type=button],input[type=reset],input[type=submit]{ + -webkit-appearance:button; + cursor:pointer +} +button[disabled],html input[disabled]{ + cursor:default +} +button::-moz-focus-inner,input::-moz-focus-inner{ + padding:0; + border:0 +} +input{ + line-height:normal +} +input[type=checkbox],input[type=radio]{ + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + padding:0 +} +input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{ + height:auto +} +input[type=search]{ + -webkit-box-sizing:content-box; + -moz-box-sizing:content-box; + box-sizing:content-box; + -webkit-appearance:textfield +} +input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{ + -webkit-appearance:none +} + + +textarea{ + overflow:auto +} +optgroup{ + font-weight:700 +} +table{ + border-spacing:0; + border-collapse:collapse +} +td,th{ + padding:0 +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print{ + *,:after,:before{ + color:#000!important; + text-shadow:none!important; + background:0 0!important; + -webkit-box-shadow:none!important; + box-shadow:none!important + } + a,a:visited{ + text-decoration:underline + } + a[href]:after{ + content:" (" attr(href) ")" + } + abbr[title]:after{ + content:" (" attr(title) ")" + } + a[href^="javascript:"]:after,a[href^="#"]:after{ + content:"" + } + blockquote,pre{ + border:1px solid #999; + page-break-inside:avoid + } + thead{ + display:table-header-group + } + img,tr{ + page-break-inside:avoid + } + img{ + max-width:100%!important + } + h2,h3,p{ + orphans:3; + widows:3 + } + h2,h3{ + page-break-after:avoid + } + .navbar{ + display:none + } + .btn>.caret,.dropup>.btn>.caret{ + border-top-color:#000!important + } + .label{ + border:1px solid #000 + } + .table{ + border-collapse:collapse!important + } + .table td,.table th{ + background-color:#fff!important + } + .table-bordered td,.table-bordered th{ + border:1px solid #ddd!important + } +} +@font-face{ + font-family:'Glyphicons Halflings'; + src:url(../fonts/glyphicons-halflings-regular.eot); + src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg') +} +.glyphicon{ + position:relative; + top:1px; + display:inline-block; + font-family:'Glyphicons Halflings'; + font-style:normal; + font-weight:400; + line-height:1; + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale +} +.glyphicon-asterisk:before{ + content:"\002a" +} +.glyphicon-plus:before{ + content:"\002b" +} +.glyphicon-eur:before,.glyphicon-euro:before{ + content:"\20ac" +} +.glyphicon-minus:before{ + content:"\2212" +} +.glyphicon-cloud:before{ + content:"\2601" +} +.glyphicon-envelope:before{ + content:"\2709" +} +.glyphicon-pencil:before{ + content:"\270f" +} +.glyphicon-glass:before{ + content:"\e001" +} +.glyphicon-music:before{ + content:"\e002" +} +.glyphicon-search:before{ + content:"\e003" +} +.glyphicon-heart:before{ + content:"\e005" +} +.glyphicon-star:before{ + content:"\e006" +} +.glyphicon-star-empty:before{ + content:"\e007" +} +.glyphicon-user:before{ + content:"\e008" +} +.glyphicon-film:before{ + content:"\e009" +} +.glyphicon-th-large:before{ + content:"\e010" +} +.glyphicon-th:before{ + content:"\e011" +} +.glyphicon-th-list:before{ + content:"\e012" +} +.glyphicon-ok:before{ + content:"\e013" +} +.glyphicon-remove:before{ + content:"\e014" +} +.glyphicon-zoom-in:before{ + content:"\e015" +} +.glyphicon-zoom-out:before{ + content:"\e016" +} +.glyphicon-off:before{ + content:"\e017" +} +.glyphicon-signal:before{ + content:"\e018" +} +.glyphicon-cog:before{ + content:"\e019" +} +.glyphicon-trash:before{ + content:"\e020" +} +.glyphicon-home:before{ + content:"\e021" +} +.glyphicon-file:before{ + content:"\e022" +} +.glyphicon-time:before{ + content:"\e023" +} +.glyphicon-road:before{ + content:"\e024" +} +.glyphicon-download-alt:before{ + content:"\e025" +} +.glyphicon-download:before{ + content:"\e026" +} +.glyphicon-upload:before{ + content:"\e027" +} +.glyphicon-inbox:before{ + content:"\e028" +} +.glyphicon-play-circle:before{ + content:"\e029" +} +.glyphicon-repeat:before{ + content:"\e030" +} +.glyphicon-refresh:before{ + content:"\e031" +} +.glyphicon-list-alt:before{ + content:"\e032" +} +.glyphicon-lock:before{ + content:"\e033" +} +.glyphicon-flag:before{ + content:"\e034" +} +.glyphicon-headphones:before{ + content:"\e035" +} +.glyphicon-volume-off:before{ + content:"\e036" +} +.glyphicon-volume-down:before{ + content:"\e037" +} +.glyphicon-volume-up:before{ + content:"\e038" +} +.glyphicon-qrcode:before{ + content:"\e039" +} +.glyphicon-barcode:before{ + content:"\e040" +} +.glyphicon-tag:before{ + content:"\e041" +} +.glyphicon-tags:before{ + content:"\e042" +} +.glyphicon-book:before{ + content:"\e043" +} +.glyphicon-bookmark:before{ + content:"\e044" +} +.glyphicon-print:before{ + content:"\e045" +} +.glyphicon-camera:before{ + content:"\e046" +} +.glyphicon-font:before{ + content:"\e047" +} +.glyphicon-bold:before{ + content:"\e048" +} +.glyphicon-italic:before{ + content:"\e049" +} +.glyphicon-text-height:before{ + content:"\e050" +} +.glyphicon-text-width:before{ + content:"\e051" +} +.glyphicon-align-left:before{ + content:"\e052" +} +.glyphicon-align-center:before{ + content:"\e053" +} +.glyphicon-align-right:before{ + content:"\e054" +} +.glyphicon-align-justify:before{ + content:"\e055" +} +.glyphicon-list:before{ + content:"\e056" +} +.glyphicon-indent-left:before{ + content:"\e057" +} +.glyphicon-indent-right:before{ + content:"\e058" +} +.glyphicon-facetime-video:before{ + content:"\e059" +} +.glyphicon-picture:before{ + content:"\e060" +} +.glyphicon-map-marker:before{ + content:"\e062" +} +.glyphicon-adjust:before{ + content:"\e063" +} +.glyphicon-tint:before{ + content:"\e064" +} +.glyphicon-edit:before{ + content:"\e065" +} +.glyphicon-share:before{ + content:"\e066" +} +.glyphicon-check:before{ + content:"\e067" +} +.glyphicon-move:before{ + content:"\e068" +} +.glyphicon-step-backward:before{ + content:"\e069" +} +.glyphicon-fast-backward:before{ + content:"\e070" +} +.glyphicon-backward:before{ + content:"\e071" +} +.glyphicon-play:before{ + content:"\e072" +} +.glyphicon-pause:before{ + content:"\e073" +} +.glyphicon-stop:before{ + content:"\e074" +} +.glyphicon-forward:before{ + content:"\e075" +} +.glyphicon-fast-forward:before{ + content:"\e076" +} +.glyphicon-step-forward:before{ + content:"\e077" +} +.glyphicon-eject:before{ + content:"\e078" +} +.glyphicon-chevron-left:before{ + content:"\e079" +} +.glyphicon-chevron-right:before{ + content:"\e080" +} +.glyphicon-plus-sign:before{ + content:"\e081" +} +.glyphicon-minus-sign:before{ + content:"\e082" +} +.glyphicon-remove-sign:before{ + content:"\e083" +} +.glyphicon-ok-sign:before{ + content:"\e084" +} +.glyphicon-question-sign:before{ + content:"\e085" +} +.glyphicon-info-sign:before{ + content:"\e086" +} +.glyphicon-screenshot:before{ + content:"\e087" +} +.glyphicon-remove-circle:before{ + content:"\e088" +} +.glyphicon-ok-circle:before{ + content:"\e089" +} +.glyphicon-ban-circle:before{ + content:"\e090" +} +.glyphicon-arrow-left:before{ + content:"\e091" +} +.glyphicon-arrow-right:before{ + content:"\e092" +} +.glyphicon-arrow-up:before{ + content:"\e093" +} +.glyphicon-arrow-down:before{ + content:"\e094" +} +.glyphicon-share-alt:before{ + content:"\e095" +} +.glyphicon-resize-full:before{ + content:"\e096" +} +.glyphicon-resize-small:before{ + content:"\e097" +} +.glyphicon-exclamation-sign:before{ + content:"\e101" +} +.glyphicon-gift:before{ + content:"\e102" +} +.glyphicon-leaf:before{ + content:"\e103" +} +.glyphicon-fire:before{ + content:"\e104" +} +.glyphicon-eye-open:before{ + content:"\e105" +} +.glyphicon-eye-close:before{ + content:"\e106" +} +.glyphicon-warning-sign:before{ + content:"\e107" +} +.glyphicon-plane:before{ + content:"\e108" +} +.glyphicon-calendar:before{ + content:"\e109" +} +.glyphicon-random:before{ + content:"\e110" +} +.glyphicon-comment:before{ + content:"\e111" +} +.glyphicon-magnet:before{ + content:"\e112" +} +.glyphicon-chevron-up:before{ + content:"\e113" +} +.glyphicon-chevron-down:before{ + content:"\e114" +} +.glyphicon-retweet:before{ + content:"\e115" +} +.glyphicon-shopping-cart:before{ + content:"\e116" +} +.glyphicon-folder-close:before{ + content:"\e117" +} +.glyphicon-folder-open:before{ + content:"\e118" +} +.glyphicon-resize-vertical:before{ + content:"\e119" +} +.glyphicon-resize-horizontal:before{ + content:"\e120" +} +.glyphicon-hdd:before{ + content:"\e121" +} +.glyphicon-bullhorn:before{ + content:"\e122" +} +.glyphicon-bell:before{ + content:"\e123" +} +.glyphicon-certificate:before{ + content:"\e124" +} +.glyphicon-thumbs-up:before{ + content:"\e125" +} +.glyphicon-thumbs-down:before{ + content:"\e126" +} +.glyphicon-hand-right:before{ + content:"\e127" +} +.glyphicon-hand-left:before{ + content:"\e128" +} +.glyphicon-hand-up:before{ + content:"\e129" +} +.glyphicon-hand-down:before{ + content:"\e130" +} +.glyphicon-circle-arrow-right:before{ + content:"\e131" +} +.glyphicon-circle-arrow-left:before{ + content:"\e132" +} +.glyphicon-circle-arrow-up:before{ + content:"\e133" +} +.glyphicon-circle-arrow-down:before{ + content:"\e134" +} +.glyphicon-globe:before{ + content:"\e135" +} +.glyphicon-wrench:before{ + content:"\e136" +} +.glyphicon-tasks:before{ + content:"\e137" +} +.glyphicon-filter:before{ + content:"\e138" +} +.glyphicon-briefcase:before{ + content:"\e139" +} +.glyphicon-fullscreen:before{ + content:"\e140" +} +.glyphicon-dashboard:before{ + content:"\e141" +} +.glyphicon-paperclip:before{ + content:"\e142" +} +.glyphicon-heart-empty:before{ + content:"\e143" +} +.glyphicon-link:before{ + content:"\e144" +} +.glyphicon-phone:before{ + content:"\e145" +} +.glyphicon-pushpin:before{ + content:"\e146" +} +.glyphicon-usd:before{ + content:"\e148" +} +.glyphicon-gbp:before{ + content:"\e149" +} +.glyphicon-sort:before{ + content:"\e150" +} +.glyphicon-sort-by-alphabet:before{ + content:"\e151" +} +.glyphicon-sort-by-alphabet-alt:before{ + content:"\e152" +} +.glyphicon-sort-by-order:before{ + content:"\e153" +} +.glyphicon-sort-by-order-alt:before{ + content:"\e154" +} +.glyphicon-sort-by-attributes:before{ + content:"\e155" +} +.glyphicon-sort-by-attributes-alt:before{ + content:"\e156" +} +.glyphicon-unchecked:before{ + content:"\e157" +} +.glyphicon-expand:before{ + content:"\e158" +} +.glyphicon-collapse-down:before{ + content:"\e159" +} +.glyphicon-collapse-up:before{ + content:"\e160" +} +.glyphicon-log-in:before{ + content:"\e161" +} +.glyphicon-flash:before{ + content:"\e162" +} +.glyphicon-log-out:before{ + content:"\e163" +} +.glyphicon-new-window:before{ + content:"\e164" +} +.glyphicon-record:before{ + content:"\e165" +} +.glyphicon-save:before{ + content:"\e166" +} +.glyphicon-open:before{ + content:"\e167" +} +.glyphicon-saved:before{ + content:"\e168" +} +.glyphicon-import:before{ + content:"\e169" +} +.glyphicon-export:before{ + content:"\e170" +} +.glyphicon-send:before{ + content:"\e171" +} +.glyphicon-floppy-disk:before{ + content:"\e172" +} +.glyphicon-floppy-saved:before{ + content:"\e173" +} +.glyphicon-floppy-remove:before{ + content:"\e174" +} +.glyphicon-floppy-save:before{ + content:"\e175" +} +.glyphicon-floppy-open:before{ + content:"\e176" +} +.glyphicon-credit-card:before{ + content:"\e177" +} +.glyphicon-transfer:before{ + content:"\e178" +} +.glyphicon-cutlery:before{ + content:"\e179" +} +.glyphicon-header:before{ + content:"\e180" +} +.glyphicon-compressed:before{ + content:"\e181" +} +.glyphicon-earphone:before{ + content:"\e182" +} +.glyphicon-phone-alt:before{ + content:"\e183" +} +.glyphicon-tower:before{ + content:"\e184" +} +.glyphicon-stats:before{ + content:"\e185" +} +.glyphicon-sd-video:before{ + content:"\e186" +} +.glyphicon-hd-video:before{ + content:"\e187" +} +.glyphicon-subtitles:before{ + content:"\e188" +} +.glyphicon-sound-stereo:before{ + content:"\e189" +} +.glyphicon-sound-dolby:before{ + content:"\e190" +} +.glyphicon-sound-5-1:before{ + content:"\e191" +} +.glyphicon-sound-6-1:before{ + content:"\e192" +} +.glyphicon-sound-7-1:before{ + content:"\e193" +} +.glyphicon-copyright-mark:before{ + content:"\e194" +} +.glyphicon-registration-mark:before{ + content:"\e195" +} +.glyphicon-cloud-download:before{ + content:"\e197" +} +.glyphicon-cloud-upload:before{ + content:"\e198" +} +.glyphicon-tree-conifer:before{ + content:"\e199" +} +.glyphicon-tree-deciduous:before{ + content:"\e200" +} +.glyphicon-cd:before{ + content:"\e201" +} +.glyphicon-save-file:before{ + content:"\e202" +} +.glyphicon-open-file:before{ + content:"\e203" +} +.glyphicon-level-up:before{ + content:"\e204" +} +.glyphicon-copy:before{ + content:"\e205" +} +.glyphicon-paste:before{ + content:"\e206" +} +.glyphicon-alert:before{ + content:"\e209" +} +.glyphicon-equalizer:before{ + content:"\e210" +} +.glyphicon-king:before{ + content:"\e211" +} +.glyphicon-queen:before{ + content:"\e212" +} +.glyphicon-pawn:before{ + content:"\e213" +} +.glyphicon-bishop:before{ + content:"\e214" +} +.glyphicon-knight:before{ + content:"\e215" +} +.glyphicon-baby-formula:before{ + content:"\e216" +} +.glyphicon-tent:before{ + content:"\26fa" +} +.glyphicon-blackboard:before{ + content:"\e218" +} +.glyphicon-bed:before{ + content:"\e219" +} +.glyphicon-apple:before{ + content:"\f8ff" +} +.glyphicon-erase:before{ + content:"\e221" +} +.glyphicon-hourglass:before{ + content:"\231b" +} +.glyphicon-lamp:before{ + content:"\e223" +} +.glyphicon-duplicate:before{ + content:"\e224" +} +.glyphicon-piggy-bank:before{ + content:"\e225" +} +.glyphicon-scissors:before{ + content:"\e226" +} +.glyphicon-bitcoin:before{ + content:"\e227" +} +.glyphicon-btc:before{ + content:"\e227" +} +.glyphicon-xbt:before{ + content:"\e227" +} +.glyphicon-yen:before{ + content:"\00a5" +} +.glyphicon-jpy:before{ + content:"\00a5" +} +.glyphicon-ruble:before{ + content:"\20bd" +} +.glyphicon-rub:before{ + content:"\20bd" +} +.glyphicon-scale:before{ + content:"\e230" +} +.glyphicon-ice-lolly:before{ + content:"\e231" +} +.glyphicon-ice-lolly-tasted:before{ + content:"\e232" +} +.glyphicon-education:before{ + content:"\e233" +} +.glyphicon-option-horizontal:before{ + content:"\e234" +} +.glyphicon-option-vertical:before{ + content:"\e235" +} +.glyphicon-menu-hamburger:before{ + content:"\e236" +} +.glyphicon-modal-window:before{ + content:"\e237" +} +.glyphicon-oil:before{ + content:"\e238" +} +.glyphicon-grain:before{ + content:"\e239" +} +.glyphicon-sunglasses:before{ + content:"\e240" +} +.glyphicon-text-size:before{ + content:"\e241" +} +.glyphicon-text-color:before{ + content:"\e242" +} +.glyphicon-text-background:before{ + content:"\e243" +} +.glyphicon-object-align-top:before{ + content:"\e244" +} +.glyphicon-object-align-bottom:before{ + content:"\e245" +} +.glyphicon-object-align-horizontal:before{ + content:"\e246" +} +.glyphicon-object-align-left:before{ + content:"\e247" +} +.glyphicon-object-align-vertical:before{ + content:"\e248" +} +.glyphicon-object-align-right:before{ + content:"\e249" +} +.glyphicon-triangle-right:before{ + content:"\e250" +} +.glyphicon-triangle-left:before{ + content:"\e251" +} +.glyphicon-triangle-bottom:before{ + content:"\e252" +} +.glyphicon-triangle-top:before{ + content:"\e253" +} +.glyphicon-console:before{ + content:"\e254" +} +.glyphicon-superscript:before{ + content:"\e255" +} +.glyphicon-subscript:before{ + content:"\e256" +} +.glyphicon-menu-left:before{ + content:"\e257" +} +.glyphicon-menu-right:before{ + content:"\e258" +} +.glyphicon-menu-down:before{ + content:"\e259" +} +.glyphicon-menu-up:before{ + content:"\e260" +} +*{ + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box +} +:after,:before{ + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box +} +html{ + font-size:10px; + -webkit-tap-highlight-color:rgba(0,0,0,0) +} +body{ + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:14px; + line-height:1.42857143; + color:#333; + background-color:#fff +} +button,input,select,textarea{ + font-family:inherit; + font-size:inherit; + line-height:inherit +} +a{ + color:#337ab7; + text-decoration:none +} +a:focus,a:hover{ + color:#23527c; + text-decoration:underline +} +a:focus{ + outline:thin dotted; + outline:5px auto -webkit-focus-ring-color; + outline-offset:-2px +} +figure{ + margin:0 +} +img{ + vertical-align:middle +} +.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{ + display:block; + max-width:100%; + height:auto +} +.img-rounded{ + border-radius:6px +} +.img-thumbnail{ + display:inline-block; + max-width:100%; + height:auto; + padding:4px; + line-height:1.42857143; + background-color:#fff; + border:1px solid #ddd; + border-radius:4px; + -webkit-transition:all .2s ease-in-out; + -o-transition:all .2s ease-in-out; + transition:all .2s ease-in-out +} +.img-circle{ + border-radius:50% +} +hr{ + margin-top:20px; + margin-bottom:20px; + border:0; + border-top:1px solid #eee +} +.sr-only{ + position:absolute; + width:1px; + height:1px; + padding:0; + margin:-1px; + overflow:hidden; + clip:rect(0,0,0,0); + border:0 +} +.sr-only-focusable:active,.sr-only-focusable:focus{ + position:static; + width:auto; + height:auto; + margin:0; + overflow:visible; + clip:auto +} +[role=button]{ + cursor:pointer +} +.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{ + font-family:inherit; + font-weight:500; + line-height:1.1; + color:inherit +} +.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{ + font-weight:400; + line-height:1; + color:#777 +} +.h1,.h2,.h3,h1,h2,h3{ + margin-top:20px; + margin-bottom:10px +} +.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{ + font-size:65% +} +.h4,.h5,.h6,h4,h5,h6{ + margin-top:10px; + margin-bottom:10px +} +.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{ + font-size:75% +} +.h1,h1{ + font-size:36px +} +.h2,h2{ + font-size:30px +} +.h3,h3{ + font-size:24px +} +.h4,h4{ + font-size:18px +} +.h5,h5{ + font-size:14px +} +.h6,h6{ + font-size:12px +} +p{ + margin:0 0 10px +} +.lead{ + margin-bottom:20px; + font-size:16px; + font-weight:300; + line-height:1.4 +} +@media (min-width:768px){ + .lead{ + font-size:21px + } +} +.small,small{ + font-size:85% +} +.mark,mark{ + padding:.2em; + background-color:#fcf8e3 +} +.text-left{ + text-align:left +} +.text-right{ + text-align:right +} +.text-center{ + text-align:center +} +.text-justify{ + text-align:justify +} +.text-nowrap{ + white-space:nowrap +} +.text-lowercase{ + text-transform:lowercase +} +.text-uppercase{ + text-transform:uppercase +} +.text-capitalize{ + text-transform:capitalize +} +.text-muted{ + color:#777 +} +.text-primary{ + color:#337ab7 +} +a.text-primary:focus,a.text-primary:hover{ + color:#286090 +} +.text-success{ + color:#3c763d +} +a.text-success:focus,a.text-success:hover{ + color:#2b542c +} +.text-info{ + color:#31708f +} +a.text-info:focus,a.text-info:hover{ + color:#245269 +} +.text-warning{ + color:#8a6d3b +} +a.text-warning:focus,a.text-warning:hover{ + color:#66512c +} +.text-danger{ + color:#a94442 +} +a.text-danger:focus,a.text-danger:hover{ + color:#843534 +} +.bg-primary{ + color:#fff; + background-color:#337ab7 +} +a.bg-primary:focus,a.bg-primary:hover{ + background-color:#286090 +} +.bg-success{ + background-color:#dff0d8 +} +a.bg-success:focus,a.bg-success:hover{ + background-color:#c1e2b3 +} +.bg-info{ + background-color:#d9edf7 +} +a.bg-info:focus,a.bg-info:hover{ + background-color:#afd9ee +} +.bg-warning{ + background-color:#fcf8e3 +} +a.bg-warning:focus,a.bg-warning:hover{ + background-color:#f7ecb5 +} +.bg-danger{ + background-color:#f2dede +} +a.bg-danger:focus,a.bg-danger:hover{ + background-color:#e4b9b9 +} +.page-header{ + padding-bottom:9px; + margin:40px 0 20px; + border-bottom:1px solid #eee +} +ol,ul{ + margin-top:0; + margin-bottom:10px +} +ol ol,ol ul,ul ol,ul ul{ + margin-bottom:0 +} +.list-unstyled{ + padding-left:0; + list-style:none +} +.list-inline{ + padding-left:0; + margin-left:-5px; + list-style:none +} +.list-inline>li{ + display:inline-block; + padding-right:5px; + padding-left:5px +} +dl{ + margin-top:0; + margin-bottom:20px +} +dd,dt{ + line-height:1.42857143 +} +dt{ + font-weight:700 +} +dd{ + margin-left:0 +} +@media (min-width:768px){ + .dl-horizontal dt{ + float:left; + width:160px; + overflow:hidden; + clear:left; + text-align:right; + text-overflow:ellipsis; + white-space:nowrap + } + .dl-horizontal dd{ + margin-left:180px + } +} +abbr[data-original-title],abbr[title]{ + cursor:help; + border-bottom:1px dotted #777 +} +.initialism{ + font-size:90%; + text-transform:uppercase +} +blockquote{ + padding:10px 20px; + margin:0 0 20px; + font-size:17.5px; + border-left:5px solid #eee +} +blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{ + margin-bottom:0 +} +blockquote .small,blockquote footer,blockquote small{ + display:block; + font-size:80%; + line-height:1.42857143; + color:#777 +} +blockquote .small:before,blockquote footer:before,blockquote small:before{ + content:'\2014 \00A0' +} +.blockquote-reverse,blockquote.pull-right{ + padding-right:15px; + padding-left:0; + text-align:right; + border-right:5px solid #eee; + border-left:0 +} +.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{ + content:'' +} +.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{ + content:'\00A0 \2014' +} +address{ + margin-bottom:20px; + font-style:normal; + line-height:1.42857143 +} +code,kbd,pre,samp{ + font-family:Menlo,Monaco,Consolas,"Courier New",monospace +} +code{ + padding:2px 4px; + font-size:90%; + color:#c7254e; + background-color:#f9f2f4; + border-radius:4px +} +kbd{ + padding:2px 4px; + font-size:90%; + color:#fff; + background-color:#333; + border-radius:3px; + -webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25); + box-shadow:inset 0 -1px 0 rgba(0,0,0,.25) +} +kbd kbd{ + padding:0; + font-size:100%; + font-weight:700; + -webkit-box-shadow:none; + box-shadow:none +} +pre{ + display:block; + padding:9.5px; + margin:0 0 10px; + font-size:13px; + line-height:1.42857143; + color:#333; + word-break:break-all; + word-wrap:break-word; + background-color:#f5f5f5; + border:1px solid #ccc; + border-radius:4px +} +pre code{ + padding:0; + font-size:inherit; + color:inherit; + white-space:pre-wrap; + background-color:transparent; + border-radius:0 +} +.pre-scrollable{ + max-height:340px; + overflow-y:scroll +} +.container{ + padding-right:15px; + padding-left:15px; + margin-right:auto; + margin-left:auto +} +@media (min-width:768px){ + .container{ + width:750px + } +} +@media (min-width:992px){ + .container{ + width:970px + } +} +@media (min-width:1200px){ + .container{ + width:1170px + } +} +.container-fluid{ + padding-right:15px; + padding-left:15px; + margin-right:auto; + margin-left:auto +} +.row{ + margin-right:-15px; + margin-left:-15px +} +.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{ + position:relative; + min-height:1px; + padding-right:15px; + padding-left:15px +} +.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{ + float:left +} +.col-xs-12{ + width:100% +} +.col-xs-11{ + width:91.66666667% +} +.col-xs-10{ + width:83.33333333% +} +.col-xs-9{ + width:75% +} +.col-xs-8{ + width:66.66666667% +} +.col-xs-7{ + width:58.33333333% +} +.col-xs-6{ + width:50% +} +.col-xs-5{ + width:41.66666667% +} +.col-xs-4{ + width:33.33333333% +} +.col-xs-3{ + width:25% +} +.col-xs-2{ + width:16.66666667% +} +.col-xs-1{ + width:8.33333333% +} +.col-xs-pull-12{ + right:100% +} +.col-xs-pull-11{ + right:91.66666667% +} +.col-xs-pull-10{ + right:83.33333333% +} +.col-xs-pull-9{ + right:75% +} +.col-xs-pull-8{ + right:66.66666667% +} +.col-xs-pull-7{ + right:58.33333333% +} +.col-xs-pull-6{ + right:50% +} +.col-xs-pull-5{ + right:41.66666667% +} +.col-xs-pull-4{ + right:33.33333333% +} +.col-xs-pull-3{ + right:25% +} +.col-xs-pull-2{ + right:16.66666667% +} +.col-xs-pull-1{ + right:8.33333333% +} +.col-xs-pull-0{ + right:auto +} +.col-xs-push-12{ + left:100% +} +.col-xs-push-11{ + left:91.66666667% +} +.col-xs-push-10{ + left:83.33333333% +} +.col-xs-push-9{ + left:75% +} +.col-xs-push-8{ + left:66.66666667% +} +.col-xs-push-7{ + left:58.33333333% +} +.col-xs-push-6{ + left:50% +} +.col-xs-push-5{ + left:41.66666667% +} +.col-xs-push-4{ + left:33.33333333% +} +.col-xs-push-3{ + left:25% +} +.col-xs-push-2{ + left:16.66666667% +} +.col-xs-push-1{ + left:8.33333333% +} +.col-xs-push-0{ + left:auto +} +.col-xs-offset-12{ + margin-left:100% +} +.col-xs-offset-11{ + margin-left:91.66666667% +} +.col-xs-offset-10{ + margin-left:83.33333333% +} +.col-xs-offset-9{ + margin-left:75% +} +.col-xs-offset-8{ + margin-left:66.66666667% +} +.col-xs-offset-7{ + margin-left:58.33333333% +} +.col-xs-offset-6{ + margin-left:50% +} +.col-xs-offset-5{ + margin-left:41.66666667% +} +.col-xs-offset-4{ + margin-left:33.33333333% +} +.col-xs-offset-3{ + margin-left:25% +} +.col-xs-offset-2{ + margin-left:16.66666667% +} +.col-xs-offset-1{ + margin-left:8.33333333% +} +.col-xs-offset-0{ + margin-left:0 +} +@media (min-width:768px){ + .col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{ + float:left + } + .col-sm-12{ + width:100% + } + .col-sm-11{ + width:91.66666667% + } + .col-sm-10{ + width:83.33333333% + } + .col-sm-9{ + width:75% + } + .col-sm-8{ + width:66.66666667% + } + .col-sm-7{ + width:58.33333333% + } + .col-sm-6{ + width:50% + } + .col-sm-5{ + width:41.66666667% + } + .col-sm-4{ + width:33.33333333% + } + .col-sm-3{ + width:25% + } + .col-sm-2{ + width:16.66666667% + } + .col-sm-1{ + width:8.33333333% + } + .col-sm-pull-12{ + right:100% + } + .col-sm-pull-11{ + right:91.66666667% + } + .col-sm-pull-10{ + right:83.33333333% + } + .col-sm-pull-9{ + right:75% + } + .col-sm-pull-8{ + right:66.66666667% + } + .col-sm-pull-7{ + right:58.33333333% + } + .col-sm-pull-6{ + right:50% + } + .col-sm-pull-5{ + right:41.66666667% + } + .col-sm-pull-4{ + right:33.33333333% + } + .col-sm-pull-3{ + right:25% + } + .col-sm-pull-2{ + right:16.66666667% + } + .col-sm-pull-1{ + right:8.33333333% + } + .col-sm-pull-0{ + right:auto + } + .col-sm-push-12{ + left:100% + } + .col-sm-push-11{ + left:91.66666667% + } + .col-sm-push-10{ + left:83.33333333% + } + .col-sm-push-9{ + left:75% + } + .col-sm-push-8{ + left:66.66666667% + } + .col-sm-push-7{ + left:58.33333333% + } + .col-sm-push-6{ + left:50% + } + .col-sm-push-5{ + left:41.66666667% + } + .col-sm-push-4{ + left:33.33333333% + } + .col-sm-push-3{ + left:25% + } + .col-sm-push-2{ + left:16.66666667% + } + .col-sm-push-1{ + left:8.33333333% + } + .col-sm-push-0{ + left:auto + } + .col-sm-offset-12{ + margin-left:100% + } + .col-sm-offset-11{ + margin-left:91.66666667% + } + .col-sm-offset-10{ + margin-left:83.33333333% + } + .col-sm-offset-9{ + margin-left:75% + } + .col-sm-offset-8{ + margin-left:66.66666667% + } + .col-sm-offset-7{ + margin-left:58.33333333% + } + .col-sm-offset-6{ + margin-left:50% + } + .col-sm-offset-5{ + margin-left:41.66666667% + } + .col-sm-offset-4{ + margin-left:33.33333333% + } + .col-sm-offset-3{ + margin-left:25% + } + .col-sm-offset-2{ + margin-left:16.66666667% + } + .col-sm-offset-1{ + margin-left:8.33333333% + } + .col-sm-offset-0{ + margin-left:0 + } +} +@media (min-width:992px){ + .col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{ + float:left + } + .col-md-12{ + width:100% + } + .col-md-11{ + width:91.66666667% + } + .col-md-10{ + width:83.33333333% + } + .col-md-9{ + width:75% + } + .col-md-8{ + width:66.66666667% + } + .col-md-7{ + width:58.33333333% + } + .col-md-6{ + width:50% + } + .col-md-5{ + width:41.66666667% + } + .col-md-4{ + width:33.33333333% + } + .col-md-3{ + width:25% + } + .col-md-2{ + width:16.66666667% + } + .col-md-1{ + width:8.33333333% + } + .col-md-pull-12{ + right:100% + } + .col-md-pull-11{ + right:91.66666667% + } + .col-md-pull-10{ + right:83.33333333% + } + .col-md-pull-9{ + right:75% + } + .col-md-pull-8{ + right:66.66666667% + } + .col-md-pull-7{ + right:58.33333333% + } + .col-md-pull-6{ + right:50% + } + .col-md-pull-5{ + right:41.66666667% + } + .col-md-pull-4{ + right:33.33333333% + } + .col-md-pull-3{ + right:25% + } + .col-md-pull-2{ + right:16.66666667% + } + .col-md-pull-1{ + right:8.33333333% + } + .col-md-pull-0{ + right:auto + } + .col-md-push-12{ + left:100% + } + .col-md-push-11{ + left:91.66666667% + } + .col-md-push-10{ + left:83.33333333% + } + .col-md-push-9{ + left:75% + } + .col-md-push-8{ + left:66.66666667% + } + .col-md-push-7{ + left:58.33333333% + } + .col-md-push-6{ + left:50% + } + .col-md-push-5{ + left:41.66666667% + } + .col-md-push-4{ + left:33.33333333% + } + .col-md-push-3{ + left:25% + } + .col-md-push-2{ + left:16.66666667% + } + .col-md-push-1{ + left:8.33333333% + } + .col-md-push-0{ + left:auto + } + .col-md-offset-12{ + margin-left:100% + } + .col-md-offset-11{ + margin-left:91.66666667% + } + .col-md-offset-10{ + margin-left:83.33333333% + } + .col-md-offset-9{ + margin-left:75% + } + .col-md-offset-8{ + margin-left:66.66666667% + } + .col-md-offset-7{ + margin-left:58.33333333% + } + .col-md-offset-6{ + margin-left:50% + } + .col-md-offset-5{ + margin-left:41.66666667% + } + .col-md-offset-4{ + margin-left:33.33333333% + } + .col-md-offset-3{ + margin-left:25% + } + .col-md-offset-2{ + margin-left:16.66666667% + } + .col-md-offset-1{ + margin-left:8.33333333% + } + .col-md-offset-0{ + margin-left:0 + } +} +@media (min-width:1200px){ + .col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{ + float:left + } + .col-lg-12{ + width:100% + } + .col-lg-11{ + width:91.66666667% + } + .col-lg-10{ + width:83.33333333% + } + .col-lg-9{ + width:75% + } + .col-lg-8{ + width:66.66666667% + } + .col-lg-7{ + width:58.33333333% + } + .col-lg-6{ + width:50% + } + .col-lg-5{ + width:41.66666667% + } + .col-lg-4{ + width:33.33333333% + } + .col-lg-3{ + width:25% + } + .col-lg-2{ + width:16.66666667% + } + .col-lg-1{ + width:8.33333333% + } + .col-lg-pull-12{ + right:100% + } + .col-lg-pull-11{ + right:91.66666667% + } + .col-lg-pull-10{ + right:83.33333333% + } + .col-lg-pull-9{ + right:75% + } + .col-lg-pull-8{ + right:66.66666667% + } + .col-lg-pull-7{ + right:58.33333333% + } + .col-lg-pull-6{ + right:50% + } + .col-lg-pull-5{ + right:41.66666667% + } + .col-lg-pull-4{ + right:33.33333333% + } + .col-lg-pull-3{ + right:25% + } + .col-lg-pull-2{ + right:16.66666667% + } + .col-lg-pull-1{ + right:8.33333333% + } + .col-lg-pull-0{ + right:auto + } + .col-lg-push-12{ + left:100% + } + .col-lg-push-11{ + left:91.66666667% + } + .col-lg-push-10{ + left:83.33333333% + } + .col-lg-push-9{ + left:75% + } + .col-lg-push-8{ + left:66.66666667% + } + .col-lg-push-7{ + left:58.33333333% + } + .col-lg-push-6{ + left:50% + } + .col-lg-push-5{ + left:41.66666667% + } + .col-lg-push-4{ + left:33.33333333% + } + .col-lg-push-3{ + left:25% + } + .col-lg-push-2{ + left:16.66666667% + } + .col-lg-push-1{ + left:8.33333333% + } + .col-lg-push-0{ + left:auto + } + .col-lg-offset-12{ + margin-left:100% + } + .col-lg-offset-11{ + margin-left:91.66666667% + } + .col-lg-offset-10{ + margin-left:83.33333333% + } + .col-lg-offset-9{ + margin-left:75% + } + .col-lg-offset-8{ + margin-left:66.66666667% + } + .col-lg-offset-7{ + margin-left:58.33333333% + } + .col-lg-offset-6{ + margin-left:50% + } + .col-lg-offset-5{ + margin-left:41.66666667% + } + .col-lg-offset-4{ + margin-left:33.33333333% + } + .col-lg-offset-3{ + margin-left:25% + } + .col-lg-offset-2{ + margin-left:16.66666667% + } + .col-lg-offset-1{ + margin-left:8.33333333% + } + .col-lg-offset-0{ + margin-left:0 + } +} +table{ + background-color:transparent +} +caption{ + padding-top:8px; + padding-bottom:8px; + color:#777; + text-align:left +} +th{ + text-align:left +} +.table{ + width:100%; + max-width:100%; + margin-bottom:20px +} +.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{ + padding:8px; + line-height:1.42857143; + vertical-align:top; + border-top:1px solid #ddd +} +.table>thead>tr>th{ + vertical-align:bottom; + border-bottom:2px solid #ddd +} +.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{ + border-top:0 +} +.table>tbody+tbody{ + border-top:2px solid #ddd +} +.table .table{ + background-color:#fff +} +.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{ + padding:5px +} +.table-bordered{ + border:1px solid #ddd +} +.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{ + border:1px solid #ddd +} +.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{ + border-bottom-width:2px +} +.table-striped>tbody>tr:nth-of-type(odd){ + background-color:#f9f9f9 +} +.table-hover>tbody>tr:hover{ + background-color:#f5f5f5 +} +table col[class*=col-]{ + position:static; + display:table-column; + float:none +} +table td[class*=col-],table th[class*=col-]{ + position:static; + display:table-cell; + float:none +} +.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{ + background-color:#f5f5f5 +} +.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{ + background-color:#e8e8e8 +} +.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{ + background-color:#dff0d8 +} +.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{ + background-color:#d0e9c6 +} +.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{ + background-color:#d9edf7 +} +.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{ + background-color:#c4e3f3 +} +.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{ + background-color:#fcf8e3 +} +.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{ + background-color:#faf2cc +} +.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{ + background-color:#f2dede +} +.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{ + background-color:#ebcccc +} +.table-responsive{ + min-height:.01%; + overflow-x:auto +} +@media screen and (max-width:767px){ + .table-responsive{ + width:100%; + margin-bottom:15px; + overflow-y:hidden; + -ms-overflow-style:-ms-autohiding-scrollbar; + border:1px solid #ddd + } + .table-responsive>.table{ + margin-bottom:0 + } + .table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{ + white-space:nowrap + } + .table-responsive>.table-bordered{ + border:0 + } + .table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{ + border-left:0 + } + .table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{ + border-right:0 + } + .table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{ + border-bottom:0 + } +} + + +label{ + display:inline-block; + max-width:100%; + margin-bottom:5px; + font-weight:700 +} +input[type=search]{ + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box +} +input[type=checkbox],input[type=radio]{ + margin:4px 0 0; + margin-top:1px\9; + line-height:normal +} +input[type=file]{ + display:block +} +input[type=range]{ + display:block; + width:100% +} +select[multiple],select[size]{ + height:auto +} +input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{ + outline:thin dotted; + outline:5px auto -webkit-focus-ring-color; + outline-offset:-2px +} +output{ + display:block; + padding-top:7px; + font-size:14px; + line-height:1.42857143; + color:#555 +} +.form-control{ + display:block; + width:100%; + height:34px; + padding:6px 12px; + font-size:14px; + line-height:1.42857143; + color:#555; + background-color:#fff; + background-image:none; + border:1px solid #ccc; + border-radius:4px; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075); + box-shadow:inset 0 1px 1px rgba(0,0,0,.075); + -webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; + -o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s; + transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s +} +.form-control:focus{ + border-color:#66afe9; + outline:0; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6); + box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6) +} +.form-control::-moz-placeholder{ + color:#999; + opacity:1 +} +.form-control:-ms-input-placeholder{ + color:#999 +} +.form-control::-webkit-input-placeholder{ + color:#999 +} +.form-control::-ms-expand{ + background-color:transparent; + border:0 +} +.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{ + background-color:#eee; + opacity:1 +} +.form-control[disabled],fieldset[disabled] .form-control{ + cursor:not-allowed +} +textarea.form-control{ + height:auto +} +input[type=search]{ + -webkit-appearance:none +} +@media screen and (-webkit-min-device-pixel-ratio:0){ + input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{ + line-height:34px + } + .input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{ + line-height:30px + } + .input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{ + line-height:46px + } +} +.form-group{ + margin-bottom:15px +} +.checkbox,.radio{ + position:relative; + display:block; + margin-top:10px; + margin-bottom:10px +} +.checkbox label,.radio label{ + min-height:20px; + padding-left:20px; + margin-bottom:0; + font-weight:400; + cursor:pointer +} +.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{ + position:absolute; + margin-top:4px\9; + margin-left:-20px +} +.checkbox+.checkbox,.radio+.radio{ + margin-top:-5px +} +.checkbox-inline,.radio-inline{ + position:relative; + display:inline-block; + padding-left:20px; + margin-bottom:0; + font-weight:400; + vertical-align:middle; + cursor:pointer +} +.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{ + margin-top:0; + margin-left:10px +} +fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{ + cursor:not-allowed +} +.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{ + cursor:not-allowed +} +.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{ + cursor:not-allowed +} +.form-control-static{ + min-height:34px; + padding-top:7px; + padding-bottom:7px; + margin-bottom:0 +} +.form-control-static.input-lg,.form-control-static.input-sm{ + padding-right:0; + padding-left:0 +} +.input-sm{ + height:30px; + padding:5px 10px; + font-size:12px; + line-height:1.5; + border-radius:3px +} +select.input-sm{ + height:30px; + line-height:30px +} +select[multiple].input-sm,textarea.input-sm{ + height:auto +} +.form-group-sm .form-control{ + height:30px; + padding:5px 10px; + font-size:12px; + line-height:1.5; + border-radius:3px +} +.form-group-sm select.form-control{ + height:30px; + line-height:30px +} +.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{ + height:auto +} +.form-group-sm .form-control-static{ + height:30px; + min-height:32px; + padding:6px 10px; + font-size:12px; + line-height:1.5 +} +.input-lg{ + height:46px; + padding:10px 16px; + font-size:18px; + line-height:1.3333333; + border-radius:6px +} +select.input-lg{ + height:46px; + line-height:46px +} +select[multiple].input-lg,textarea.input-lg{ + height:auto +} +.form-group-lg .form-control{ + height:46px; + padding:10px 16px; + font-size:18px; + line-height:1.3333333; + border-radius:6px +} +.form-group-lg select.form-control{ + height:46px; + line-height:46px +} +.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{ + height:auto +} +.form-group-lg .form-control-static{ + height:46px; + min-height:38px; + padding:11px 16px; + font-size:18px; + line-height:1.3333333 +} +.has-feedback{ + position:relative +} +.has-feedback .form-control{ + padding-right:42.5px +} +.form-control-feedback{ + position:absolute; + top:0; + right:0; + z-index:2; + display:block; + width:34px; + height:34px; + line-height:34px; + text-align:center; + pointer-events:none +} +.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{ + width:46px; + height:46px; + line-height:46px +} +.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{ + width:30px; + height:30px; + line-height:30px +} +.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{ + color:#3c763d +} +.has-success .form-control{ + border-color:#3c763d; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075); + box-shadow:inset 0 1px 1px rgba(0,0,0,.075) +} +.has-success .form-control:focus{ + border-color:#2b542c; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168; + box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168 +} +.has-success .input-group-addon{ + color:#3c763d; + background-color:#dff0d8; + border-color:#3c763d +} +.has-success .form-control-feedback{ + color:#3c763d +} +.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{ + color:#8a6d3b +} +.has-warning .form-control{ + border-color:#8a6d3b; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075); + box-shadow:inset 0 1px 1px rgba(0,0,0,.075) +} +.has-warning .form-control:focus{ + border-color:#66512c; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b; + box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b +} +.has-warning .input-group-addon{ + color:#8a6d3b; + background-color:#fcf8e3; + border-color:#8a6d3b +} +.has-warning .form-control-feedback{ + color:#8a6d3b +} +.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{ + color:#a94442 +} +.has-error .form-control{ + border-color:#a94442; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075); + box-shadow:inset 0 1px 1px rgba(0,0,0,.075) +} +.has-error .form-control:focus{ + border-color:#843534; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483; + box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483 +} +.has-error .input-group-addon{ + color:#a94442; + background-color:#f2dede; + border-color:#a94442 +} +.has-error .form-control-feedback{ + color:#a94442 +} +.has-feedback label~.form-control-feedback{ + top:25px +} +.has-feedback label.sr-only~.form-control-feedback{ + top:0 +} +.help-block{ + display:block; + margin-top:5px; + margin-bottom:10px; + color:#737373 +} +@media (min-width:768px){ + .form-inline .form-group{ + display:inline-block; + margin-bottom:0; + vertical-align:middle + } + .form-inline .form-control{ + display:inline-block; + width:auto; + vertical-align:middle + } + .form-inline .form-control-static{ + display:inline-block + } + .form-inline .input-group{ + display:inline-table; + vertical-align:middle + } + .form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{ + width:auto + } + .form-inline .input-group>.form-control{ + width:100% + } + .form-inline .control-label{ + margin-bottom:0; + vertical-align:middle + } + .form-inline .checkbox,.form-inline .radio{ + display:inline-block; + margin-top:0; + margin-bottom:0; + vertical-align:middle + } + .form-inline .checkbox label,.form-inline .radio label{ + padding-left:0 + } + .form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{ + position:relative; + margin-left:0 + } + .form-inline .has-feedback .form-control-feedback{ + top:0 + } +} +.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{ + padding-top:7px; + margin-top:0; + margin-bottom:0 +} +.form-horizontal .checkbox,.form-horizontal .radio{ + min-height:27px +} +.form-horizontal .form-group{ + margin-right:-15px; + margin-left:-15px +} +@media (min-width:768px){ + .form-horizontal .control-label{ + padding-top:7px; + margin-bottom:0; + text-align:right + } +} +.form-horizontal .has-feedback .form-control-feedback{ + right:15px +} +@media (min-width:768px){ + .form-horizontal .form-group-lg .control-label{ + padding-top:11px; + font-size:18px + } +} +@media (min-width:768px){ + .form-horizontal .form-group-sm .control-label{ + padding-top:6px; + font-size:12px + } +} +.btn{ + display:inline-block; + padding:6px 12px; + margin-bottom:0; + font-size:14px; + font-weight:400; + line-height:1.42857143; + text-align:center; + white-space:nowrap; + vertical-align:middle; + -ms-touch-action:manipulation; + touch-action:manipulation; + cursor:pointer; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + user-select:none; + background-image:none; + border:1px solid transparent; + border-radius:4px +} +.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{ + outline:thin dotted; + outline:5px auto -webkit-focus-ring-color; + outline-offset:-2px +} +.btn.focus,.btn:focus,.btn:hover{ + color:#333; + text-decoration:none +} +.btn.active,.btn:active{ + background-image:none; + outline:0; + -webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125); + box-shadow:inset 0 3px 5px rgba(0,0,0,.125) +} +.btn.disabled,.btn[disabled],fieldset[disabled] .btn{ + cursor:not-allowed; + filter:alpha(opacity=65); + -webkit-box-shadow:none; + box-shadow:none; + opacity:.65 +} +a.btn.disabled,fieldset[disabled] a.btn{ + pointer-events:none +} +.btn-default{ + color:#333; + background-color:#fff; + border-color:#ccc +} +.btn-default.focus,.btn-default:focus{ + color:#333; + background-color:#e6e6e6; + border-color:#8c8c8c +} +.btn-default:hover{ + color:#333; + background-color:#e6e6e6; + border-color:#adadad +} +.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{ + color:#333; + background-color:#e6e6e6; + border-color:#adadad +} +.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{ + color:#333; + background-color:#d4d4d4; + border-color:#8c8c8c +} +.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{ + background-image:none +} +.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{ + background-color:#fff; + border-color:#ccc +} +.btn-default .badge{ + color:#fff; + background-color:#333 +} +.btn-primary{ + color:#fff; + background-color:#337ab7; + border-color:#2e6da4 +} +.btn-primary.focus,.btn-primary:focus{ + color:#fff; + background-color:#286090; + border-color:#122b40 +} +.btn-primary:hover{ + color:#fff; + background-color:#286090; + border-color:#204d74 +} +.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{ + color:#fff; + background-color:#286090; + border-color:#204d74 +} +.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{ + color:#fff; + background-color:#204d74; + border-color:#122b40 +} +.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{ + background-image:none +} +.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{ + background-color:#337ab7; + border-color:#2e6da4 +} +.btn-primary .badge{ + color:#337ab7; + background-color:#fff +} +.btn-success{ + color:#fff; + background-color:#5cb85c; + border-color:#4cae4c +} +.btn-success.focus,.btn-success:focus{ + color:#fff; + background-color:#449d44; + border-color:#255625 +} +.btn-success:hover{ + color:#fff; + background-color:#449d44; + border-color:#398439 +} +.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{ + color:#fff; + background-color:#449d44; + border-color:#398439 +} +.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{ + color:#fff; + background-color:#398439; + border-color:#255625 +} +.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{ + background-image:none +} +.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{ + background-color:#5cb85c; + border-color:#4cae4c +} +.btn-success .badge{ + color:#5cb85c; + background-color:#fff +} +.btn-info{ + color:#fff; + background-color:#5bc0de; + border-color:#46b8da +} +.btn-info.focus,.btn-info:focus{ + color:#fff; + background-color:#31b0d5; + border-color:#1b6d85 +} +.btn-info:hover{ + color:#fff; + background-color:#31b0d5; + border-color:#269abc +} +.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{ + color:#fff; + background-color:#31b0d5; + border-color:#269abc +} +.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{ + color:#fff; + background-color:#269abc; + border-color:#1b6d85 +} +.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{ + background-image:none +} +.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{ + background-color:#5bc0de; + border-color:#46b8da +} +.btn-info .badge{ + color:#5bc0de; + background-color:#fff +} +.btn-warning{ + color:#fff; + background-color:#f0ad4e; + border-color:#eea236 +} +.btn-warning.focus,.btn-warning:focus{ + color:#fff; + background-color:#ec971f; + border-color:#985f0d +} +.btn-warning:hover{ + color:#fff; + background-color:#ec971f; + border-color:#d58512 +} +.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{ + color:#fff; + background-color:#ec971f; + border-color:#d58512 +} +.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{ + color:#fff; + background-color:#d58512; + border-color:#985f0d +} +.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{ + background-image:none +} +.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{ + background-color:#f0ad4e; + border-color:#eea236 +} +.btn-warning .badge{ + color:#f0ad4e; + background-color:#fff +} +.btn-danger{ + color:#fff; + background-color:#d9534f; + border-color:#d43f3a +} +.btn-danger.focus,.btn-danger:focus{ + color:#fff; + background-color:#c9302c; + border-color:#761c19 +} +.btn-danger:hover{ + color:#fff; + background-color:#c9302c; + border-color:#ac2925 +} +.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{ + color:#fff; + background-color:#c9302c; + border-color:#ac2925 +} +.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{ + color:#fff; + background-color:#ac2925; + border-color:#761c19 +} +.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{ + background-image:none +} +.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{ + background-color:#d9534f; + border-color:#d43f3a +} +.btn-danger .badge{ + color:#d9534f; + background-color:#fff +} +.btn-link{ + font-weight:400; + color:#337ab7; + border-radius:0 +} +.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{ + background-color:transparent; + -webkit-box-shadow:none; + box-shadow:none +} +.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{ + border-color:transparent +} +.btn-link:focus,.btn-link:hover{ + color:#23527c; + text-decoration:underline; + background-color:transparent +} +.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{ + color:#777; + text-decoration:none +} +.btn-group-lg>.btn,.btn-lg{ + padding:10px 16px; + font-size:18px; + line-height:1.3333333; + border-radius:6px +} +.btn-group-sm>.btn,.btn-sm{ + padding:5px 10px; + font-size:12px; + line-height:1.5; + border-radius:3px +} +.btn-group-xs>.btn,.btn-xs{ + padding:1px 5px; + font-size:12px; + line-height:1.5; + border-radius:3px +} +.btn-block{ + display:block; + width:100% +} +.btn-block+.btn-block{ + margin-top:5px +} +input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{ + width:100% +} +.fade{ + opacity:0; + -webkit-transition:opacity .15s linear; + -o-transition:opacity .15s linear; + transition:opacity .15s linear +} +.fade.in{ + opacity:1 +} +.collapse{ + display:none +} +.collapse.in{ + display:block +} +tr.collapse.in{ + display:table-row +} +tbody.collapse.in{ + display:table-row-group +} +.collapsing{ + position:relative; + height:0; + overflow:hidden; + -webkit-transition-timing-function:ease; + -o-transition-timing-function:ease; + transition-timing-function:ease; + -webkit-transition-duration:.35s; + -o-transition-duration:.35s; + transition-duration:.35s; + -webkit-transition-property:height,visibility; + -o-transition-property:height,visibility; + transition-property:height,visibility +} +.caret{ + display:inline-block; + width:0; + height:0; + margin-left:2px; + vertical-align:middle; + border-top:4px dashed; + border-top:4px solid\9; + border-right:4px solid transparent; + border-left:4px solid transparent +} +.dropdown,.dropup{ + position:relative +} +.dropdown-toggle:focus{ + outline:0 +} +.dropdown-menu{ + position:absolute; + top:100%; + left:0; + z-index:1000; + display:none; + float:left; + min-width:160px; + padding:5px 0; + margin:2px 0 0; + font-size:14px; + text-align:left; + list-style:none; + background-color:#fff; + -webkit-background-clip:padding-box; + background-clip:padding-box; + border:1px solid #ccc; + border:1px solid rgba(0,0,0,.15); + border-radius:4px; + -webkit-box-shadow:0 6px 12px rgba(0,0,0,.175); + box-shadow:0 6px 12px rgba(0,0,0,.175) +} +.dropdown-menu.pull-right{ + right:0; + left:auto +} +.dropdown-menu .divider{ + height:1px; + margin:9px 0; + overflow:hidden; + background-color:#e5e5e5 +} +.dropdown-menu>li>a{ + display:block; + padding:3px 20px; + clear:both; + font-weight:400; + line-height:1.42857143; + color:#333; + white-space:nowrap +} +.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{ + color:#262626; + text-decoration:none; + background-color:#f5f5f5 +} +.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{ + color:#fff; + text-decoration:none; + background-color:#337ab7; + outline:0 +} +.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{ + color:#777 +} +.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{ + text-decoration:none; + cursor:not-allowed; + background-color:transparent; + background-image:none; + filter:progid:DXImageTransform.Microsoft.gradient(enabled=false) +} +.open>.dropdown-menu{ + display:block +} +.open>a{ + outline:0 +} +.dropdown-menu-right{ + right:0; + left:auto +} +.dropdown-menu-left{ + right:auto; + left:0 +} +.dropdown-header{ + display:block; + padding:3px 20px; + font-size:12px; + line-height:1.42857143; + color:#777; + white-space:nowrap +} +.dropdown-backdrop{ + position:fixed; + top:0; + right:0; + bottom:0; + left:0; + z-index:990 +} +.pull-right>.dropdown-menu{ + right:0; + left:auto +} +.dropup .caret,.navbar-fixed-bottom .dropdown .caret{ + content:""; + border-top:0; + border-bottom:4px dashed; + border-bottom:4px solid\9 +} +.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{ + top:auto; + bottom:100%; + margin-bottom:2px +} +@media (min-width:768px){ + .navbar-right .dropdown-menu{ + right:0; + left:auto + } + .navbar-right .dropdown-menu-left{ + right:auto; + left:0 + } +} +.btn-group,.btn-group-vertical{ + position:relative; + display:inline-block; + vertical-align:middle +} +.btn-group-vertical>.btn,.btn-group>.btn{ + position:relative; + float:left +} +.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{ + z-index:2 +} +.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{ + margin-left:-1px +} +.btn-toolbar{ + margin-left:-5px +} +.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{ + float:left +} +.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{ + margin-left:5px +} +.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){ + border-radius:0 +} +.btn-group>.btn:first-child{ + margin-left:0 +} +.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){ + border-top-right-radius:0; + border-bottom-right-radius:0 +} +.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){ + border-top-left-radius:0; + border-bottom-left-radius:0 +} +.btn-group>.btn-group{ + float:left +} +.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{ + border-radius:0 +} +.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{ + border-top-right-radius:0; + border-bottom-right-radius:0 +} +.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{ + border-top-left-radius:0; + border-bottom-left-radius:0 +} +.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{ + outline:0 +} +.btn-group>.btn+.dropdown-toggle{ + padding-right:8px; + padding-left:8px +} +.btn-group>.btn-lg+.dropdown-toggle{ + padding-right:12px; + padding-left:12px +} +.btn-group.open .dropdown-toggle{ + -webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125); + box-shadow:inset 0 3px 5px rgba(0,0,0,.125) +} +.btn-group.open .dropdown-toggle.btn-link{ + -webkit-box-shadow:none; + box-shadow:none +} +.btn .caret{ + margin-left:0 +} +.btn-lg .caret{ + border-width:5px 5px 0; + border-bottom-width:0 +} +.dropup .btn-lg .caret{ + border-width:0 5px 5px +} +.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{ + display:block; + float:none; + width:100%; + max-width:100% +} +.btn-group-vertical>.btn-group>.btn{ + float:none +} +.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{ + margin-top:-1px; + margin-left:0 +} +.btn-group-vertical>.btn:not(:first-child):not(:last-child){ + border-radius:0 +} +.btn-group-vertical>.btn:first-child:not(:last-child){ + border-top-left-radius:4px; + border-top-right-radius:4px; + border-bottom-right-radius:0; + border-bottom-left-radius:0 +} +.btn-group-vertical>.btn:last-child:not(:first-child){ + border-top-left-radius:0; + border-top-right-radius:0; + border-bottom-right-radius:4px; + border-bottom-left-radius:4px +} +.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{ + border-radius:0 +} +.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{ + border-bottom-right-radius:0; + border-bottom-left-radius:0 +} +.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{ + border-top-left-radius:0; + border-top-right-radius:0 +} +.btn-group-justified{ + display:table; + width:100%; + table-layout:fixed; + border-collapse:separate +} +.btn-group-justified>.btn,.btn-group-justified>.btn-group{ + display:table-cell; + float:none; + width:1% +} +.btn-group-justified>.btn-group .btn{ + width:100% +} +.btn-group-justified>.btn-group .dropdown-menu{ + left:auto +} +[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{ + position:absolute; + clip:rect(0,0,0,0); + pointer-events:none +} +.input-group{ + position:relative; + display:table; + border-collapse:separate +} +.input-group[class*=col-]{ + float:none; + padding-right:0; + padding-left:0 +} +.input-group .form-control{ + position:relative; + z-index:2; + float:left; + width:100%; + margin-bottom:0 +} +.input-group .form-control:focus{ + z-index:3 +} +.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{ + height:46px; + padding:10px 16px; + font-size:18px; + line-height:1.3333333; + border-radius:6px +} +select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{ + height:46px; + line-height:46px +} +select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{ + height:auto +} +.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{ + height:30px; + padding:5px 10px; + font-size:12px; + line-height:1.5; + border-radius:3px +} +select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{ + height:30px; + line-height:30px +} +select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{ + height:auto +} +.input-group .form-control,.input-group-addon,.input-group-btn{ + display:table-cell +} +.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){ + border-radius:0 +} +.input-group-addon,.input-group-btn{ + width:1%; + white-space:nowrap; + vertical-align:middle +} +.input-group-addon{ + padding:6px 12px; + font-size:14px; + font-weight:400; + line-height:1; + color:#555; + text-align:center; + background-color:#eee; + border:1px solid #ccc; + border-radius:4px +} +.input-group-addon.input-sm{ + padding:5px 10px; + font-size:12px; + border-radius:3px +} +.input-group-addon.input-lg{ + padding:10px 16px; + font-size:18px; + border-radius:6px +} +.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{ + margin-top:0 +} +.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){ + border-top-right-radius:0; + border-bottom-right-radius:0 +} +.input-group-addon:first-child{ + border-right:0 +} +.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{ + border-top-left-radius:0; + border-bottom-left-radius:0 +} +.input-group-addon:last-child{ + border-left:0 +} +.input-group-btn{ + position:relative; + font-size:0; + white-space:nowrap +} +.input-group-btn>.btn{ + position:relative +} +.input-group-btn>.btn+.btn{ + margin-left:-1px +} +.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{ + z-index:2 +} +.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{ + margin-right:-1px +} +.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{ + z-index:2; + margin-left:-1px +} +.nav{ + padding-left:0; + margin-bottom:0; + list-style:none +} +.nav>li{ + position:relative; + display:block +} +.nav>li>a{ + position:relative; + display:block; + padding:10px 15px +} +.nav>li>a:focus,.nav>li>a:hover{ + text-decoration:none; + background-color:#eee +} +.nav>li.disabled>a{ + color:#777 +} +.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{ + color:#777; + text-decoration:none; + cursor:not-allowed; + background-color:transparent +} +.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{ + background-color:#eee; + border-color:#337ab7 +} +.nav .nav-divider{ + height:1px; + margin:9px 0; + overflow:hidden; + background-color:#e5e5e5 +} +.nav>li>a>img{ + max-width:none +} +.nav-tabs{ + border-bottom:1px solid #ddd +} +.nav-tabs>li{ + float:left; + margin-bottom:-1px +} +.nav-tabs>li>a{ + margin-right:2px; + line-height:1.42857143; + border:1px solid transparent; + border-radius:4px 4px 0 0 +} +.nav-tabs>li>a:hover{ + border-color:#eee #eee #ddd +} +.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{ + color:#555; + cursor:default; + background-color:#fff; + border:1px solid #ddd; + border-bottom-color:transparent +} +.nav-tabs.nav-justified{ + width:100%; + border-bottom:0 +} +.nav-tabs.nav-justified>li{ + float:none +} +.nav-tabs.nav-justified>li>a{ + margin-bottom:5px; + text-align:center +} +.nav-tabs.nav-justified>.dropdown .dropdown-menu{ + top:auto; + left:auto +} +@media (min-width:768px){ + .nav-tabs.nav-justified>li{ + display:table-cell; + width:1% + } + .nav-tabs.nav-justified>li>a{ + margin-bottom:0 + } +} +.nav-tabs.nav-justified>li>a{ + margin-right:0; + border-radius:4px +} +.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{ + border:1px solid #ddd +} +@media (min-width:768px){ + .nav-tabs.nav-justified>li>a{ + border-bottom:1px solid #ddd; + border-radius:4px 4px 0 0 + } + .nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{ + border-bottom-color:#fff + } +} +.nav-pills>li{ + float:left +} +.nav-pills>li>a{ + border-radius:4px +} +.nav-pills>li+li{ + margin-left:2px +} +.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{ + color:#fff; + background-color:#337ab7 +} +.nav-stacked>li{ + float:none +} +.nav-stacked>li+li{ + margin-top:2px; + margin-left:0 +} +.nav-justified{ + width:100% +} +.nav-justified>li{ + float:none +} +.nav-justified>li>a{ + margin-bottom:5px; + text-align:center +} +.nav-justified>.dropdown .dropdown-menu{ + top:auto; + left:auto +} +@media (min-width:768px){ + .nav-justified>li{ + display:table-cell; + width:1% + } + .nav-justified>li>a{ + margin-bottom:0 + } +} +.nav-tabs-justified{ + border-bottom:0 +} +.nav-tabs-justified>li>a{ + margin-right:0; + border-radius:4px +} +.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{ + border:1px solid #ddd +} +@media (min-width:768px){ + .nav-tabs-justified>li>a{ + border-bottom:1px solid #ddd; + border-radius:4px 4px 0 0 + } + .nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{ + border-bottom-color:#fff + } +} +.tab-content>.tab-pane{ + display:none +} +.tab-content>.active{ + display:block +} +.nav-tabs .dropdown-menu{ + margin-top:-1px; + border-top-left-radius:0; + border-top-right-radius:0 +} +.navbar{ + position:relative; + min-height:50px; + margin-bottom:20px; + border:1px solid transparent +} +@media (min-width:768px){ + .navbar{ + border-radius:4px + } +} +@media (min-width:768px){ + .navbar-header{ + float:left + } +} +.navbar-collapse{ + padding-right:15px; + padding-left:15px; + overflow-x:visible; + -webkit-overflow-scrolling:touch; + border-top:1px solid transparent; + -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1); + box-shadow:inset 0 1px 0 rgba(255,255,255,.1) +} +.navbar-collapse.in{ + overflow-y:auto +} +@media (min-width:768px){ + .navbar-collapse{ + width:auto; + border-top:0; + -webkit-box-shadow:none; + box-shadow:none + } + .navbar-collapse.collapse{ + display:block!important; + height:auto!important; + padding-bottom:0; + overflow:visible!important + } + .navbar-collapse.in{ + overflow-y:visible + } + .navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{ + padding-right:0; + padding-left:0 + } +} +.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{ + max-height:340px +} +@media (max-device-width:480px) and (orientation:landscape){ + .navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{ + max-height:200px + } +} +.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{ + margin-right:-15px; + margin-left:-15px +} +@media (min-width:768px){ + .container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{ + margin-right:0; + margin-left:0 + } +} +.navbar-static-top{ + z-index:1000; + border-width:0 0 1px +} +@media (min-width:768px){ + .navbar-static-top{ + border-radius:0 + } +} +.navbar-fixed-bottom,.navbar-fixed-top{ + position:fixed; + right:0; + left:0; + z-index:1030 +} +@media (min-width:768px){ + .navbar-fixed-bottom,.navbar-fixed-top{ + border-radius:0 + } +} +.navbar-fixed-top{ + top:0; + border-width:0 0 1px +} +.navbar-fixed-bottom{ + bottom:0; + margin-bottom:0; + border-width:1px 0 0 +} +.navbar-brand{ + float:left; + height:50px; + padding:15px 15px; + font-size:18px; + line-height:20px +} +.navbar-brand:focus,.navbar-brand:hover{ + text-decoration:none +} +.navbar-brand>img{ + display:block +} +@media (min-width:768px){ + .navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{ + margin-left:-15px + } +} +.navbar-toggle{ + position:relative; + float:right; + padding:9px 10px; + margin-top:8px; + margin-right:15px; + margin-bottom:8px; + background-color:transparent; + background-image:none; + border:1px solid transparent; + border-radius:4px +} +.navbar-toggle:focus{ + outline:0 +} +.navbar-toggle .icon-bar{ + display:block; + width:22px; + height:2px; + border-radius:1px +} +.navbar-toggle .icon-bar+.icon-bar{ + margin-top:4px +} +@media (min-width:768px){ + .navbar-toggle{ + display:none + } +} +.navbar-nav{ + margin:7.5px -15px +} +.navbar-nav>li>a{ + padding-top:10px; + padding-bottom:10px; + line-height:20px +} +@media (max-width:767px){ + .navbar-nav .open .dropdown-menu{ + position:static; + float:none; + width:auto; + margin-top:0; + background-color:transparent; + border:0; + -webkit-box-shadow:none; + box-shadow:none + } + .navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{ + padding:5px 15px 5px 25px + } + .navbar-nav .open .dropdown-menu>li>a{ + line-height:20px + } + .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{ + background-image:none + } +} +@media (min-width:768px){ + .navbar-nav{ + float:left; + margin:0 + } + .navbar-nav>li{ + float:left + } + .navbar-nav>li>a{ + padding-top:15px; + padding-bottom:15px + } +} +.navbar-form{ + padding:10px 15px; + margin-top:8px; + margin-right:-15px; + margin-bottom:8px; + margin-left:-15px; + border-top:1px solid transparent; + border-bottom:1px solid transparent; + -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1); + box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1) +} +@media (min-width:768px){ + .navbar-form .form-group{ + display:inline-block; + margin-bottom:0; + vertical-align:middle + } + .navbar-form .form-control{ + display:inline-block; + width:auto; + vertical-align:middle + } + .navbar-form .form-control-static{ + display:inline-block + } + .navbar-form .input-group{ + display:inline-table; + vertical-align:middle + } + .navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{ + width:auto + } + .navbar-form .input-group>.form-control{ + width:100% + } + .navbar-form .control-label{ + margin-bottom:0; + vertical-align:middle + } + .navbar-form .checkbox,.navbar-form .radio{ + display:inline-block; + margin-top:0; + margin-bottom:0; + vertical-align:middle + } + .navbar-form .checkbox label,.navbar-form .radio label{ + padding-left:0 + } + .navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{ + position:relative; + margin-left:0 + } + .navbar-form .has-feedback .form-control-feedback{ + top:0 + } +} +@media (max-width:767px){ + .navbar-form .form-group{ + margin-bottom:5px + } + .navbar-form .form-group:last-child{ + margin-bottom:0 + } +} +@media (min-width:768px){ + .navbar-form{ + width:auto; + padding-top:0; + padding-bottom:0; + margin-right:0; + margin-left:0; + border:0; + -webkit-box-shadow:none; + box-shadow:none + } +} +.navbar-nav>li>.dropdown-menu{ + margin-top:0; + border-top-left-radius:0; + border-top-right-radius:0 +} +.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{ + margin-bottom:0; + border-top-left-radius:4px; + border-top-right-radius:4px; + border-bottom-right-radius:0; + border-bottom-left-radius:0 +} +.navbar-btn{ + margin-top:8px; + margin-bottom:8px +} +.navbar-btn.btn-sm{ + margin-top:10px; + margin-bottom:10px +} +.navbar-btn.btn-xs{ + margin-top:14px; + margin-bottom:14px +} +.navbar-text{ + margin-top:15px; + margin-bottom:15px +} +@media (min-width:768px){ + .navbar-text{ + float:left; + margin-right:15px; + margin-left:15px + } +} +@media (min-width:768px){ + .navbar-left{ + float:left!important + } + .navbar-right{ + float:right!important; + margin-right:-15px + } + .navbar-right~.navbar-right{ + margin-right:0 + } +} +.navbar-default{ + background-color:#f8f8f8; + border-color:#e7e7e7 +} +.navbar-default .navbar-brand{ + color:#777 +} +.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{ + color:#5e5e5e; + background-color:transparent +} +.navbar-default .navbar-text{ + color:#777 +} +.navbar-default .navbar-nav>li>a{ + color:#777 +} +.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{ + color:#333; + background-color:transparent +} +.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{ + color:#555; + background-color:#e7e7e7 +} +.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{ + color:#ccc; + background-color:transparent +} +.navbar-default .navbar-toggle{ + border-color:#ddd +} +.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{ + background-color:#ddd +} +.navbar-default .navbar-toggle .icon-bar{ + background-color:#888 +} +.navbar-default .navbar-collapse,.navbar-default .navbar-form{ + border-color:#e7e7e7 +} +.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{ + color:#555; + background-color:#e7e7e7 +} +@media (max-width:767px){ + .navbar-default .navbar-nav .open .dropdown-menu>li>a{ + color:#777 + } + .navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{ + color:#333; + background-color:transparent + } + .navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{ + color:#555; + background-color:#e7e7e7 + } + .navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{ + color:#ccc; + background-color:transparent + } +} +.navbar-default .navbar-link{ + color:#777 +} +.navbar-default .navbar-link:hover{ + color:#333 +} +.navbar-default .btn-link{ + color:#777 +} +.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{ + color:#333 +} +.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{ + color:#ccc +} +.navbar-inverse{ + background-color:#222; + border-color:#080808 +} +.navbar-inverse .navbar-brand{ + color:#9d9d9d +} +.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{ + color:#fff; + background-color:transparent +} +.navbar-inverse .navbar-text{ + color:#9d9d9d +} +.navbar-inverse .navbar-nav>li>a{ + color:#9d9d9d +} +.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{ + color:#fff; + background-color:transparent +} +.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{ + color:#fff; + background-color:#080808 +} +.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{ + color:#444; + background-color:transparent +} +.navbar-inverse .navbar-toggle{ + border-color:#333 +} +.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{ + background-color:#333 +} +.navbar-inverse .navbar-toggle .icon-bar{ + background-color:#fff +} +.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{ + border-color:#101010 +} +.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{ + color:#fff; + background-color:#080808 +} +@media (max-width:767px){ + .navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{ + border-color:#080808 + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider{ + background-color:#080808 + } + .navbar-inverse .navbar-nav .open .dropdown-menu>li>a{ + color:#9d9d9d + } + .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{ + color:#fff; + background-color:transparent + } + .navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{ + color:#fff; + background-color:#080808 + } + .navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{ + color:#444; + background-color:transparent + } +} +.navbar-inverse .navbar-link{ + color:#9d9d9d +} +.navbar-inverse .navbar-link:hover{ + color:#fff +} +.navbar-inverse .btn-link{ + color:#9d9d9d +} +.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{ + color:#fff +} +.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{ + color:#444 +} +.breadcrumb{ + padding:8px 15px; + margin-bottom:20px; + list-style:none; + background-color:#f5f5f5; + border-radius:4px +} +.breadcrumb>li{ + display:inline-block +} +.breadcrumb>li+li:before{ + padding:0 5px; + color:#ccc; + content:"/\00a0" +} +.breadcrumb>.active{ + color:#777 +} +.pagination{ + display:inline-block; + padding-left:0; + margin:20px 0; + border-radius:4px +} +.pagination>li{ + display:inline +} +.pagination>li>a,.pagination>li>span{ + position:relative; + float:left; + padding:6px 12px; + margin-left:-1px; + line-height:1.42857143; + color:#337ab7; + text-decoration:none; + background-color:#fff; + border:1px solid #ddd +} +.pagination>li:first-child>a,.pagination>li:first-child>span{ + margin-left:0; + border-top-left-radius:4px; + border-bottom-left-radius:4px +} +.pagination>li:last-child>a,.pagination>li:last-child>span{ + border-top-right-radius:4px; + border-bottom-right-radius:4px +} +.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{ + z-index:2; + color:#23527c; + background-color:#eee; + border-color:#ddd +} +.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{ + z-index:3; + color:#fff; + cursor:default; + background-color:#337ab7; + border-color:#337ab7 +} +.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{ + color:#777; + cursor:not-allowed; + background-color:#fff; + border-color:#ddd +} +.pagination-lg>li>a,.pagination-lg>li>span{ + padding:10px 16px; + font-size:18px; + line-height:1.3333333 +} +.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{ + border-top-left-radius:6px; + border-bottom-left-radius:6px +} +.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{ + border-top-right-radius:6px; + border-bottom-right-radius:6px +} +.pagination-sm>li>a,.pagination-sm>li>span{ + padding:5px 10px; + font-size:12px; + line-height:1.5 +} +.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{ + border-top-left-radius:3px; + border-bottom-left-radius:3px +} +.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{ + border-top-right-radius:3px; + border-bottom-right-radius:3px +} +.pager{ + padding-left:0; + margin:20px 0; + text-align:center; + list-style:none +} +.pager li{ + display:inline +} +.pager li>a,.pager li>span{ + display:inline-block; + padding:5px 14px; + background-color:#fff; + border:1px solid #ddd; + border-radius:15px +} +.pager li>a:focus,.pager li>a:hover{ + text-decoration:none; + background-color:#eee +} +.pager .next>a,.pager .next>span{ + float:right +} +.pager .previous>a,.pager .previous>span{ + float:left +} +.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{ + color:#777; + cursor:not-allowed; + background-color:#fff +} +.label{ + display:inline; + padding:.2em .6em .3em; + font-size:75%; + font-weight:700; + line-height:1; + color:#fff; + text-align:center; + white-space:nowrap; + vertical-align:baseline; + border-radius:.25em +} +a.label:focus,a.label:hover{ + color:#fff; + text-decoration:none; + cursor:pointer +} +.label:empty{ + display:none +} +.btn .label{ + position:relative; + top:-1px +} +.label-default{ + background-color:#777 +} +.label-default[href]:focus,.label-default[href]:hover{ + background-color:#5e5e5e +} +.label-primary{ + background-color:#337ab7 +} +.label-primary[href]:focus,.label-primary[href]:hover{ + background-color:#286090 +} +.label-success{ + background-color:#5cb85c +} +.label-success[href]:focus,.label-success[href]:hover{ + background-color:#449d44 +} +.label-info{ + background-color:#5bc0de +} +.label-info[href]:focus,.label-info[href]:hover{ + background-color:#31b0d5 +} +.label-warning{ + background-color:#f0ad4e +} +.label-warning[href]:focus,.label-warning[href]:hover{ + background-color:#ec971f +} +.label-danger{ + background-color:#d9534f +} +.label-danger[href]:focus,.label-danger[href]:hover{ + background-color:#c9302c +} +.badge{ + display:inline-block; + min-width:10px; + padding:3px 7px; + font-size:12px; + font-weight:700; + line-height:1; + color:#fff; + text-align:center; + white-space:nowrap; + vertical-align:middle; + background-color:#777; + border-radius:10px +} +.badge:empty{ + display:none +} +.btn .badge{ + position:relative; + top:-1px +} +.btn-group-xs>.btn .badge,.btn-xs .badge{ + top:0; + padding:1px 5px +} +a.badge:focus,a.badge:hover{ + color:#fff; + text-decoration:none; + cursor:pointer +} +.list-group-item.active>.badge,.nav-pills>.active>a>.badge{ + color:#337ab7; + background-color:#fff +} +.list-group-item>.badge{ + float:right +} +.list-group-item>.badge+.badge{ + margin-right:5px +} +.nav-pills>li>a>.badge{ + margin-left:3px +} +.jumbotron{ + padding-top:30px; + padding-bottom:30px; + margin-bottom:30px; + color:inherit; + background-color:#eee +} +.jumbotron .h1,.jumbotron h1{ + color:inherit +} +.jumbotron p{ + margin-bottom:15px; + font-size:21px; + font-weight:200 +} +.jumbotron>hr{ + border-top-color:#d5d5d5 +} +.container .jumbotron,.container-fluid .jumbotron{ + padding-right:15px; + padding-left:15px; + border-radius:6px +} +.jumbotron .container{ + max-width:100% +} +@media screen and (min-width:768px){ + .jumbotron{ + padding-top:48px; + padding-bottom:48px + } + .container .jumbotron,.container-fluid .jumbotron{ + padding-right:60px; + padding-left:60px + } + .jumbotron .h1,.jumbotron h1{ + font-size:63px + } +} +.thumbnail{ + display:block; + padding:4px; + margin-bottom:20px; + line-height:1.42857143; + background-color:#fff; + border:1px solid #ddd; + border-radius:4px; + -webkit-transition:border .2s ease-in-out; + -o-transition:border .2s ease-in-out; + transition:border .2s ease-in-out +} +.thumbnail a>img,.thumbnail>img{ + margin-right:auto; + margin-left:auto +} +a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{ + border-color:#337ab7 +} +.thumbnail .caption{ + padding:9px; + color:#333 +} +.alert{ + padding:15px; + margin-bottom:20px; + border:1px solid transparent; + border-radius:4px +} +.alert h4{ + margin-top:0; + color:inherit +} +.alert .alert-link{ + font-weight:700 +} +.alert>p,.alert>ul{ + margin-bottom:0 +} +.alert>p+p{ + margin-top:5px +} +.alert-dismissable,.alert-dismissible{ + padding-right:35px +} +.alert-dismissable .close,.alert-dismissible .close{ + position:relative; + top:-2px; + right:-21px; + color:inherit +} +.alert-success{ + color:#3c763d; + background-color:#dff0d8; + border-color:#d6e9c6 +} +.alert-success hr{ + border-top-color:#c9e2b3 +} +.alert-success .alert-link{ + color:#2b542c +} +.alert-info{ + color:#31708f; + background-color:#d9edf7; + border-color:#bce8f1 +} +.alert-info hr{ + border-top-color:#a6e1ec +} +.alert-info .alert-link{ + color:#245269 +} +.alert-warning{ + color:#8a6d3b; + background-color:#fcf8e3; + border-color:#faebcc +} +.alert-warning hr{ + border-top-color:#f7e1b5 +} +.alert-warning .alert-link{ + color:#66512c +} +.alert-danger{ + color:#a94442; + background-color:#f2dede; + border-color:#ebccd1 +} +.alert-danger hr{ + border-top-color:#e4b9c0 +} +.alert-danger .alert-link{ + color:#843534 +} +@-webkit-keyframes progress-bar-stripes{ + from{ + background-position:40px 0 + } + to{ + background-position:0 0 + } +} +@-o-keyframes progress-bar-stripes{ + from{ + background-position:40px 0 + } + to{ + background-position:0 0 + } +} +@keyframes progress-bar-stripes{ + from{ + background-position:40px 0 + } + to{ + background-position:0 0 + } +} +.progress{ + height:20px; + margin-bottom:20px; + overflow:hidden; + background-color:#f5f5f5; + border-radius:4px; + -webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1); + box-shadow:inset 0 1px 2px rgba(0,0,0,.1) +} +.progress-bar{ + float:left; + width:0; + height:100%; + font-size:12px; + line-height:20px; + color:#fff; + text-align:center; + background-color:#337ab7; + -webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow:inset 0 -1px 0 rgba(0,0,0,.15); + -webkit-transition:width .6s ease; + -o-transition:width .6s ease; + transition:width .6s ease +} +.progress-bar-striped,.progress-striped .progress-bar{ + background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + -webkit-background-size:40px 40px; + background-size:40px 40px +} +.progress-bar.active,.progress.active .progress-bar{ + -webkit-animation:progress-bar-stripes 2s linear infinite; + -o-animation:progress-bar-stripes 2s linear infinite; + animation:progress-bar-stripes 2s linear infinite +} +.progress-bar-success{ + background-color:#5cb85c +} +.progress-striped .progress-bar-success{ + background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent) +} +.progress-bar-info{ + background-color:#5bc0de +} +.progress-striped .progress-bar-info{ + background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent) +} +.progress-bar-warning{ + background-color:#f0ad4e +} +.progress-striped .progress-bar-warning{ + background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent) +} +.progress-bar-danger{ + background-color:#d9534f +} +.progress-striped .progress-bar-danger{ + background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent); + background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent) +} +.media{ + margin-top:15px +} +.media:first-child{ + margin-top:0 +} +.media,.media-body{ + overflow:hidden; + zoom:1 +} +.media-body{ + width:10000px +} +.media-object{ + display:block +} +.media-object.img-thumbnail{ + max-width:none +} +.media-right,.media>.pull-right{ + padding-left:10px +} +.media-left,.media>.pull-left{ + padding-right:10px +} +.media-body,.media-left,.media-right{ + display:table-cell; + vertical-align:top +} +.media-middle{ + vertical-align:middle +} +.media-bottom{ + vertical-align:bottom +} +.media-heading{ + margin-top:0; + margin-bottom:5px +} +.media-list{ + padding-left:0; + list-style:none +} +.list-group{ + padding-left:0; + margin-bottom:20px +} +.list-group-item{ + position:relative; + display:block; + padding:10px 15px; + margin-bottom:-1px; + background-color:#fff; + border:1px solid #ddd +} +.list-group-item:first-child{ + border-top-left-radius:4px; + border-top-right-radius:4px +} +.list-group-item:last-child{ + margin-bottom:0; + border-bottom-right-radius:4px; + border-bottom-left-radius:4px +} +a.list-group-item,button.list-group-item{ + color:#555 +} +a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{ + color:#333 +} +a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{ + color:#555; + text-decoration:none; + background-color:#f5f5f5 +} +button.list-group-item{ + width:100%; + text-align:left +} +.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{ + color:#777; + cursor:not-allowed; + background-color:#eee +} +.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{ + color:inherit +} +.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{ + color:#777 +} +.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{ + z-index:2; + color:#fff; + background-color:#337ab7; + border-color:#337ab7 +} +.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{ + color:inherit +} +.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{ + color:#c7ddef +} +.list-group-item-success{ + color:#3c763d; + background-color:#dff0d8 +} +a.list-group-item-success,button.list-group-item-success{ + color:#3c763d +} +a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{ + color:inherit +} +a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{ + color:#3c763d; + background-color:#d0e9c6 +} +a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{ + color:#fff; + background-color:#3c763d; + border-color:#3c763d +} +.list-group-item-info{ + color:#31708f; + background-color:#d9edf7 +} +a.list-group-item-info,button.list-group-item-info{ + color:#31708f +} +a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{ + color:inherit +} +a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{ + color:#31708f; + background-color:#c4e3f3 +} +a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{ + color:#fff; + background-color:#31708f; + border-color:#31708f +} +.list-group-item-warning{ + color:#8a6d3b; + background-color:#fcf8e3 +} +a.list-group-item-warning,button.list-group-item-warning{ + color:#8a6d3b +} +a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{ + color:inherit +} +a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{ + color:#8a6d3b; + background-color:#faf2cc +} +a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{ + color:#fff; + background-color:#8a6d3b; + border-color:#8a6d3b +} +.list-group-item-danger{ + color:#a94442; + background-color:#f2dede +} +a.list-group-item-danger,button.list-group-item-danger{ + color:#a94442 +} +a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{ + color:inherit +} +a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{ + color:#a94442; + background-color:#ebcccc +} +a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{ + color:#fff; + background-color:#a94442; + border-color:#a94442 +} +.list-group-item-heading{ + margin-top:0; + margin-bottom:5px +} +.list-group-item-text{ + margin-bottom:0; + line-height:1.3 +} +.panel{ + margin-bottom:20px; + background-color:#fff; + border:1px solid transparent; + border-radius:4px; + -webkit-box-shadow:0 1px 1px rgba(0,0,0,.05); + box-shadow:0 1px 1px rgba(0,0,0,.05) +} +.panel-body{ + padding:15px +} +.panel-heading{ + padding:10px 15px; + border-bottom:1px solid transparent; + border-top-left-radius:3px; + border-top-right-radius:3px +} +.panel-heading>.dropdown .dropdown-toggle{ + color:inherit +} +.panel-title{ + margin-top:0; + margin-bottom:0; + font-size:16px; + color:inherit +} +.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{ + color:inherit +} +.panel-footer{ + padding:10px 15px; + background-color:#f5f5f5; + border-top:1px solid #ddd; + border-bottom-right-radius:3px; + border-bottom-left-radius:3px +} +.panel>.list-group,.panel>.panel-collapse>.list-group{ + margin-bottom:0 +} +.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{ + border-width:1px 0; + border-radius:0 +} +.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{ + border-top:0; + border-top-left-radius:3px; + border-top-right-radius:3px +} +.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{ + border-bottom:0; + border-bottom-right-radius:3px; + border-bottom-left-radius:3px +} +.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{ + border-top-left-radius:0; + border-top-right-radius:0 +} +.panel-heading+.list-group .list-group-item:first-child{ + border-top-width:0 +} +.list-group+.panel-footer{ + border-top-width:0 +} +.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{ + margin-bottom:0 +} +.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{ + padding-right:15px; + padding-left:15px +} +.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{ + border-top-left-radius:3px; + border-top-right-radius:3px +} +.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{ + border-top-left-radius:3px; + border-top-right-radius:3px +} +.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{ + border-top-left-radius:3px +} +.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{ + border-top-right-radius:3px +} +.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{ + border-bottom-right-radius:3px; + border-bottom-left-radius:3px +} +.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{ + border-bottom-right-radius:3px; + border-bottom-left-radius:3px +} +.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{ + border-bottom-left-radius:3px +} +.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{ + border-bottom-right-radius:3px +} +.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{ + border-top:1px solid #ddd +} +.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{ + border-top:0 +} +.panel>.table-bordered,.panel>.table-responsive>.table-bordered{ + border:0 +} +.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{ + border-left:0 +} +.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{ + border-right:0 +} +.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{ + border-bottom:0 +} +.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{ + border-bottom:0 +} +.panel>.table-responsive{ + margin-bottom:0; + border:0 +} +.panel-group{ + margin-bottom:20px +} +.panel-group .panel{ + margin-bottom:0; + border-radius:4px +} +.panel-group .panel+.panel{ + margin-top:5px +} +.panel-group .panel-heading{ + border-bottom:0 +} +.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{ + border-top:1px solid #ddd +} +.panel-group .panel-footer{ + border-top:0 +} +.panel-group .panel-footer+.panel-collapse .panel-body{ + border-bottom:1px solid #ddd +} +.panel-default{ + border-color:#ddd +} +.panel-default>.panel-heading{ + color:#333; + background-color:#f5f5f5; + border-color:#ddd +} +.panel-default>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#ddd +} +.panel-default>.panel-heading .badge{ + color:#f5f5f5; + background-color:#333 +} +.panel-default>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#ddd +} +.panel-primary{ + border-color:#337ab7 +} +.panel-primary>.panel-heading{ + color:#fff; + background-color:#337ab7; + border-color:#337ab7 +} +.panel-primary>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#337ab7 +} +.panel-primary>.panel-heading .badge{ + color:#337ab7; + background-color:#fff +} +.panel-primary>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#337ab7 +} +.panel-success{ + border-color:#d6e9c6 +} +.panel-success>.panel-heading{ + color:#3c763d; + background-color:#dff0d8; + border-color:#d6e9c6 +} +.panel-success>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#d6e9c6 +} +.panel-success>.panel-heading .badge{ + color:#dff0d8; + background-color:#3c763d +} +.panel-success>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#d6e9c6 +} +.panel-info{ + border-color:#bce8f1 +} +.panel-info>.panel-heading{ + color:#31708f; + background-color:#d9edf7; + border-color:#bce8f1 +} +.panel-info>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#bce8f1 +} +.panel-info>.panel-heading .badge{ + color:#d9edf7; + background-color:#31708f +} +.panel-info>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#bce8f1 +} +.panel-warning{ + border-color:#faebcc +} +.panel-warning>.panel-heading{ + color:#8a6d3b; + background-color:#fcf8e3; + border-color:#faebcc +} +.panel-warning>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#faebcc +} +.panel-warning>.panel-heading .badge{ + color:#fcf8e3; + background-color:#8a6d3b +} +.panel-warning>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#faebcc +} +.panel-danger{ + border-color:#ebccd1 +} +.panel-danger>.panel-heading{ + color:#a94442; + background-color:#f2dede; + border-color:#ebccd1 +} +.panel-danger>.panel-heading+.panel-collapse>.panel-body{ + border-top-color:#ebccd1 +} +.panel-danger>.panel-heading .badge{ + color:#f2dede; + background-color:#a94442 +} +.panel-danger>.panel-footer+.panel-collapse>.panel-body{ + border-bottom-color:#ebccd1 +} +.embed-responsive{ + position:relative; + display:block; + height:0; + padding:0; + overflow:hidden +} +.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{ + position:absolute; + top:0; + bottom:0; + left:0; + width:100%; + height:100%; + border:0 +} +.embed-responsive-16by9{ + padding-bottom:56.25% +} +.embed-responsive-4by3{ + padding-bottom:75% +} +.well{ + min-height:20px; + padding:19px; + margin-bottom:20px; + background-color:#f5f5f5; + border:1px solid #e3e3e3; + border-radius:4px; + -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05); + box-shadow:inset 0 1px 1px rgba(0,0,0,.05) +} +.well blockquote{ + border-color:#ddd; + border-color:rgba(0,0,0,.15) +} +.well-lg{ + padding:24px; + border-radius:6px +} +.well-sm{ + padding:9px; + border-radius:3px +} +.close{ + float:right; + font-size:21px; + font-weight:700; + line-height:1; + color:#000; + text-shadow:0 1px 0 #fff; + filter:alpha(opacity=20); + opacity:.2 +} +.close:focus,.close:hover{ + color:#000; + text-decoration:none; + cursor:pointer; + filter:alpha(opacity=50); + opacity:.5 +} +button.close{ + -webkit-appearance:none; + padding:0; + cursor:pointer; + background:0 0; + border:0 +} +.modal-open{ + overflow:hidden +} +.modal{ + position:fixed; + top:0; + right:0; + bottom:0; + left:0; + z-index:1050; + display:none; + overflow:hidden; + -webkit-overflow-scrolling:touch; + outline:0 +} +.modal.fade .modal-dialog{ + -webkit-transition:-webkit-transform .3s ease-out; + -o-transition:-o-transform .3s ease-out; + transition:transform .3s ease-out; + -webkit-transform:translate(0,-25%); + -ms-transform:translate(0,-25%); + -o-transform:translate(0,-25%); + transform:translate(0,-25%) +} +.modal.in .modal-dialog{ + -webkit-transform:translate(0,0); + -ms-transform:translate(0,0); + -o-transform:translate(0,0); + transform:translate(0,0) +} +.modal-open .modal{ + overflow-x:hidden; + overflow-y:auto +} +.modal-dialog{ + position:relative; + width:auto; + margin:10px +} +.modal-content{ + position:relative; + background-color:#fff; + -webkit-background-clip:padding-box; + background-clip:padding-box; + border:1px solid #999; + border:1px solid rgba(0,0,0,.2); + border-radius:6px; + outline:0; + -webkit-box-shadow:0 3px 9px rgba(0,0,0,.5); + box-shadow:0 3px 9px rgba(0,0,0,.5) +} +.modal-backdrop{ + position:fixed; + top:0; + right:0; + bottom:0; + left:0; + z-index:1040; + background-color:#000 +} +.modal-backdrop.fade{ + filter:alpha(opacity=0); + opacity:0 +} +.modal-backdrop.in{ + filter:alpha(opacity=50); + opacity:.5 +} +.modal-header{ + padding:15px; + border-bottom:1px solid #e5e5e5 +} +.modal-header .close{ + margin-top:-2px +} +.modal-title{ + margin:0; + line-height:1.42857143 +} +.modal-body{ + position:relative; + padding:15px +} +.modal-footer{ + padding:15px; + text-align:right; + border-top:1px solid #e5e5e5 +} +.modal-footer .btn+.btn{ + margin-bottom:0; + margin-left:5px +} +.modal-footer .btn-group .btn+.btn{ + margin-left:-1px +} +.modal-footer .btn-block+.btn-block{ + margin-left:0 +} +.modal-scrollbar-measure{ + position:absolute; + top:-9999px; + width:50px; + height:50px; + overflow:scroll +} +@media (min-width:768px){ + .modal-dialog{ + width:600px; + margin:30px auto + } + .modal-content{ + -webkit-box-shadow:0 5px 15px rgba(0,0,0,.5); + box-shadow:0 5px 15px rgba(0,0,0,.5) + } + .modal-sm{ + width:300px + } +} +@media (min-width:992px){ + .modal-lg{ + width:900px + } +} +.tooltip{ + position:absolute; + z-index:1070; + display:block; + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:12px; + font-style:normal; + font-weight:400; + line-height:1.42857143; + text-align:left; + text-align:start; + text-decoration:none; + text-shadow:none; + text-transform:none; + letter-spacing:normal; + word-break:normal; + word-spacing:normal; + word-wrap:normal; + white-space:normal; + filter:alpha(opacity=0); + opacity:0; + line-break:auto +} +.tooltip.in{ + filter:alpha(opacity=90); + opacity:.9 +} +.tooltip.top{ + padding:5px 0; + margin-top:-3px +} +.tooltip.right{ + padding:0 5px; + margin-left:3px +} +.tooltip.bottom{ + padding:5px 0; + margin-top:3px +} +.tooltip.left{ + padding:0 5px; + margin-left:-3px +} +.tooltip-inner{ + max-width:200px; + padding:3px 8px; + color:#fff; + text-align:center; + background-color:#000; + border-radius:4px +} +.tooltip-arrow{ + position:absolute; + width:0; + height:0; + border-color:transparent; + border-style:solid +} +.tooltip.top .tooltip-arrow{ + bottom:0; + left:50%; + margin-left:-5px; + border-width:5px 5px 0; + border-top-color:#000 +} +.tooltip.top-left .tooltip-arrow{ + right:5px; + bottom:0; + margin-bottom:-5px; + border-width:5px 5px 0; + border-top-color:#000 +} +.tooltip.top-right .tooltip-arrow{ + bottom:0; + left:5px; + margin-bottom:-5px; + border-width:5px 5px 0; + border-top-color:#000 +} +.tooltip.right .tooltip-arrow{ + top:50%; + left:0; + margin-top:-5px; + border-width:5px 5px 5px 0; + border-right-color:#000 +} +.tooltip.left .tooltip-arrow{ + top:50%; + right:0; + margin-top:-5px; + border-width:5px 0 5px 5px; + border-left-color:#000 +} +.tooltip.bottom .tooltip-arrow{ + top:0; + left:50%; + margin-left:-5px; + border-width:0 5px 5px; + border-bottom-color:#000 +} +.tooltip.bottom-left .tooltip-arrow{ + top:0; + right:5px; + margin-top:-5px; + border-width:0 5px 5px; + border-bottom-color:#000 +} +.tooltip.bottom-right .tooltip-arrow{ + top:0; + left:5px; + margin-top:-5px; + border-width:0 5px 5px; + border-bottom-color:#000 +} +.popover{ + position:absolute; + top:0; + left:0; + z-index:1060; + display:none; + max-width:276px; + padding:1px; + font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:14px; + font-style:normal; + font-weight:400; + line-height:1.42857143; + text-align:left; + text-align:start; + text-decoration:none; + text-shadow:none; + text-transform:none; + letter-spacing:normal; + word-break:normal; + word-spacing:normal; + word-wrap:normal; + white-space:normal; + background-color:#fff; + -webkit-background-clip:padding-box; + background-clip:padding-box; + border:1px solid #ccc; + border:1px solid rgba(0,0,0,.2); + border-radius:6px; + -webkit-box-shadow:0 5px 10px rgba(0,0,0,.2); + box-shadow:0 5px 10px rgba(0,0,0,.2); + line-break:auto +} +.popover.top{ + margin-top:-10px +} +.popover.right{ + margin-left:10px +} +.popover.bottom{ + margin-top:10px +} +.popover.left{ + margin-left:-10px +} +.popover-title{ + padding:8px 14px; + margin:0; + font-size:14px; + background-color:#f7f7f7; + border-bottom:1px solid #ebebeb; + border-radius:5px 5px 0 0 +} +.popover-content{ + padding:9px 14px +} +.popover>.arrow,.popover>.arrow:after{ + position:absolute; + display:block; + width:0; + height:0; + border-color:transparent; + border-style:solid +} +.popover>.arrow{ + border-width:11px +} +.popover>.arrow:after{ + content:""; + border-width:10px +} +.popover.top>.arrow{ + bottom:-11px; + left:50%; + margin-left:-11px; + border-top-color:#999; + border-top-color:rgba(0,0,0,.25); + border-bottom-width:0 +} +.popover.top>.arrow:after{ + bottom:1px; + margin-left:-10px; + content:" "; + border-top-color:#fff; + border-bottom-width:0 +} +.popover.right>.arrow{ + top:50%; + left:-11px; + margin-top:-11px; + border-right-color:#999; + border-right-color:rgba(0,0,0,.25); + border-left-width:0 +} +.popover.right>.arrow:after{ + bottom:-10px; + left:1px; + content:" "; + border-right-color:#fff; + border-left-width:0 +} +.popover.bottom>.arrow{ + top:-11px; + left:50%; + margin-left:-11px; + border-top-width:0; + border-bottom-color:#999; + border-bottom-color:rgba(0,0,0,.25) +} +.popover.bottom>.arrow:after{ + top:1px; + margin-left:-10px; + content:" "; + border-top-width:0; + border-bottom-color:#fff +} +.popover.left>.arrow{ + top:50%; + right:-11px; + margin-top:-11px; + border-right-width:0; + border-left-color:#999; + border-left-color:rgba(0,0,0,.25) +} +.popover.left>.arrow:after{ + right:1px; + bottom:-10px; + content:" "; + border-right-width:0; + border-left-color:#fff +} +.carousel{ + position:relative +} +.carousel-inner{ + position:relative; + width:100%; + overflow:hidden +} +.carousel-inner>.item{ + position:relative; + display:none; + -webkit-transition:.6s ease-in-out left; + -o-transition:.6s ease-in-out left; + transition:.6s ease-in-out left +} +.carousel-inner>.item>a>img,.carousel-inner>.item>img{ + line-height:1 +} +@media all and (transform-3d),(-webkit-transform-3d){ + .carousel-inner>.item{ + -webkit-transition:-webkit-transform .6s ease-in-out; + -o-transition:-o-transform .6s ease-in-out; + transition:transform .6s ease-in-out; + -webkit-backface-visibility:hidden; + backface-visibility:hidden; + -webkit-perspective:1000px; + perspective:1000px + } + .carousel-inner>.item.active.right,.carousel-inner>.item.next{ + left:0; + -webkit-transform:translate3d(100%,0,0); + transform:translate3d(100%,0,0) + } + .carousel-inner>.item.active.left,.carousel-inner>.item.prev{ + left:0; + -webkit-transform:translate3d(-100%,0,0); + transform:translate3d(-100%,0,0) + } + .carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{ + left:0; + -webkit-transform:translate3d(0,0,0); + transform:translate3d(0,0,0) + } +} +.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{ + display:block +} +.carousel-inner>.active{ + left:0 +} +.carousel-inner>.next,.carousel-inner>.prev{ + position:absolute; + top:0; + width:100% +} +.carousel-inner>.next{ + left:100% +} +.carousel-inner>.prev{ + left:-100% +} +.carousel-inner>.next.left,.carousel-inner>.prev.right{ + left:0 +} +.carousel-inner>.active.left{ + left:-100% +} +.carousel-inner>.active.right{ + left:100% +} +.carousel-control{ + position:absolute; + top:0; + bottom:0; + left:0; + width:15%; + font-size:20px; + color:#fff; + text-align:center; + text-shadow:0 1px 2px rgba(0,0,0,.6); + background-color:rgba(0,0,0,0); + filter:alpha(opacity=50); + opacity:.5 +} +.carousel-control.left{ + background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%); + background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%); + background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001))); + background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat:repeat-x +} +.carousel-control.right{ + right:0; + left:auto; + background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%); + background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%); + background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5))); + background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat:repeat-x +} +.carousel-control:focus,.carousel-control:hover{ + color:#fff; + text-decoration:none; + filter:alpha(opacity=90); + outline:0; + opacity:.9 +} +.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{ + position:absolute; + top:50%; + z-index:5; + display:inline-block; + margin-top:-10px +} +.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{ + left:50%; + margin-left:-10px +} +.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{ + right:50%; + margin-right:-10px +} +.carousel-control .icon-next,.carousel-control .icon-prev{ + width:20px; + height:20px; + font-family:serif; + line-height:1 +} +.carousel-control .icon-prev:before{ + content:'\2039' +} +.carousel-control .icon-next:before{ + content:'\203a' +} +.carousel-indicators{ + position:absolute; + bottom:10px; + left:50%; + z-index:15; + width:60%; + padding-left:0; + margin-left:-30%; + text-align:center; + list-style:none +} +.carousel-indicators li{ + display:inline-block; + width:10px; + height:10px; + margin:1px; + text-indent:-999px; + cursor:pointer; + background-color:#000\9; + background-color:rgba(0,0,0,0); + border:1px solid #fff; + border-radius:10px +} +.carousel-indicators .active{ + width:12px; + height:12px; + margin:0; + background-color:#fff +} +.carousel-caption{ + position:absolute; + right:15%; + bottom:20px; + left:15%; + z-index:10; + padding-top:20px; + padding-bottom:20px; + color:#fff; + text-align:center; + text-shadow:0 1px 2px rgba(0,0,0,.6) +} +.carousel-caption .btn{ + text-shadow:none +} +@media screen and (min-width:768px){ + .carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{ + width:30px; + height:30px; + margin-top:-10px; + font-size:30px + } + .carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{ + margin-left:-10px + } + .carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{ + margin-right:-10px + } + .carousel-caption{ + right:20%; + left:20%; + padding-bottom:30px + } + .carousel-indicators{ + bottom:20px + } +} +.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{ + display:table; + content:" " +} +.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{ + clear:both +} +.center-block{ + display:block; + margin-right:auto; + margin-left:auto +} +.pull-right{ + float:right!important +} +.pull-left{ + float:left!important +} +.hide{ + display:none!important +} +.show{ + display:block!important +} +.invisible{ + visibility:hidden +} +.text-hide{ + font:0/0 a; + color:transparent; + text-shadow:none; + background-color:transparent; + border:0 +} +.hidden{ + display:none!important +} +.affix{ + position:fixed +} +@-ms-viewport{ + width:device-width +} +.visible-lg,.visible-md,.visible-sm,.visible-xs{ + display:none!important +} +.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{ + display:none!important +} +@media (max-width:767px){ + .visible-xs{ + display:block!important + } + table.visible-xs{ + display:table!important + } + tr.visible-xs{ + display:table-row!important + } + td.visible-xs,th.visible-xs{ + display:table-cell!important + } +} +@media (max-width:767px){ + .visible-xs-block{ + display:block!important + } +} +@media (max-width:767px){ + .visible-xs-inline{ + display:inline!important + } +} +@media (max-width:767px){ + .visible-xs-inline-block{ + display:inline-block!important + } +} +@media (min-width:768px) and (max-width:991px){ + .visible-sm{ + display:block!important + } + table.visible-sm{ + display:table!important + } + tr.visible-sm{ + display:table-row!important + } + td.visible-sm,th.visible-sm{ + display:table-cell!important + } +} +@media (min-width:768px) and (max-width:991px){ + .visible-sm-block{ + display:block!important + } +} +@media (min-width:768px) and (max-width:991px){ + .visible-sm-inline{ + display:inline!important + } +} +@media (min-width:768px) and (max-width:991px){ + .visible-sm-inline-block{ + display:inline-block!important + } +} +@media (min-width:992px) and (max-width:1199px){ + .visible-md{ + display:block!important + } + table.visible-md{ + display:table!important + } + tr.visible-md{ + display:table-row!important + } + td.visible-md,th.visible-md{ + display:table-cell!important + } +} +@media (min-width:992px) and (max-width:1199px){ + .visible-md-block{ + display:block!important + } +} +@media (min-width:992px) and (max-width:1199px){ + .visible-md-inline{ + display:inline!important + } +} +@media (min-width:992px) and (max-width:1199px){ + .visible-md-inline-block{ + display:inline-block!important + } +} +@media (min-width:1200px){ + .visible-lg{ + display:block!important + } + table.visible-lg{ + display:table!important + } + tr.visible-lg{ + display:table-row!important + } + td.visible-lg,th.visible-lg{ + display:table-cell!important + } +} +@media (min-width:1200px){ + .visible-lg-block{ + display:block!important + } +} +@media (min-width:1200px){ + .visible-lg-inline{ + display:inline!important + } +} +@media (min-width:1200px){ + .visible-lg-inline-block{ + display:inline-block!important + } +} +@media (max-width:767px){ + .hidden-xs{ + display:none!important + } +} +@media (min-width:768px) and (max-width:991px){ + .hidden-sm{ + display:none!important + } +} +@media (min-width:992px) and (max-width:1199px){ + .hidden-md{ + display:none!important + } +} +@media (min-width:1200px){ + .hidden-lg{ + display:none!important + } +} +.visible-print{ + display:none!important +} +@media print{ + .visible-print{ + display:block!important + } + table.visible-print{ + display:table!important + } + tr.visible-print{ + display:table-row!important + } + td.visible-print,th.visible-print{ + display:table-cell!important + } +} +.visible-print-block{ + display:none!important +} +@media print{ + .visible-print-block{ + display:block!important + } +} +.visible-print-inline{ + display:none!important +} +@media print{ + .visible-print-inline{ + display:inline!important + } +} +.visible-print-inline-block{ + display:none!important +} +@media print{ + .visible-print-inline-block{ + display:inline-block!important + } +} +@media print{ + .hidden-print{ + display:none!important + } +} +/*# sourceMappingURL=bootstrap.min.css.map */ diff --git a/jquery/bootstrap.min.js b/jquery/bootstrap.min.js new file mode 100755 index 0000000..9118c66 --- /dev/null +++ b/jquery/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.0.0-beta.3 (https://getbootstrap.com) + * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(i.end)},supportsTransitionEnd:function(){return Boolean(i)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,n,i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var o=i[r],a=n[r],l=a&&s.isElement(a)?"element":e(a);if(!new RegExp(o).test(l))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+o+'".')}}};return i=!window.QUnit&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,s.supportsTransitionEnd()&&(t.event.special[s.TRANSITION_END]={bindType:i.end,delegateType:i.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),s}(e),a=function(t){var e="alert",n="bs.alert",i="."+n,r=t.fn[e],a={CLOSE:"close"+i,CLOSED:"closed"+i,CLICK_DATA_API:"click"+i+".data-api"},l="alert",h="fade",c="show",u=function(){function e(t){this._element=t}var i=e.prototype;return i.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},i.dispose=function(){t.removeData(this._element,n),this._element=null},i._getRootElement=function(e){var n=o.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+l)[0]),i},i._triggerCloseEvent=function(e){var n=t.Event(a.CLOSE);return t(e).trigger(n),n},i._removeElement=function(e){var n=this;t(e).removeClass(c),o.supportsTransitionEnd()&&t(e).hasClass(h)?t(e).one(o.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},i._destroyElement=function(e){t(e).detach().trigger(a.CLOSED).remove()},e._jQueryInterface=function(i){return this.each(function(){var s=t(this),r=s.data(n);r||(r=new e(this),s.data(n,r)),"close"===i&&r[i](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta.3"}}]),e}();return t(document).on(a.CLICK_DATA_API,'[data-dismiss="alert"]',u._handleDismiss(new u)),t.fn[e]=u._jQueryInterface,t.fn[e].Constructor=u,t.fn[e].noConflict=function(){return t.fn[e]=r,u._jQueryInterface},u}(e),l=function(t){var e="button",n="bs.button",i="."+n,r=".data-api",o=t.fn[e],a="active",l="btn",h="focus",c='[data-toggle^="button"]',u='[data-toggle="buttons"]',f="input",d=".active",_=".btn",g={CLICK_DATA_API:"click"+i+r,FOCUS_BLUR_DATA_API:"focus"+i+r+" blur"+i+r},m=function(){function e(t){this._element=t}var i=e.prototype;return i.toggle=function(){var e=!0,n=!0,i=t(this._element).closest(u)[0];if(i){var s=t(this._element).find(f)[0];if(s){if("radio"===s.type)if(s.checked&&t(this._element).hasClass(a))e=!1;else{var r=t(i).find(d)[0];r&&t(r).removeClass(a)}if(e){if(s.hasAttribute("disabled")||i.hasAttribute("disabled")||s.classList.contains("disabled")||i.classList.contains("disabled"))return;s.checked=!t(this._element).hasClass(a),t(s).trigger("change")}s.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!t(this._element).hasClass(a)),e&&t(this._element).toggleClass(a)},i.dispose=function(){t.removeData(this._element,n),this._element=null},e._jQueryInterface=function(i){return this.each(function(){var s=t(this).data(n);s||(s=new e(this),t(this).data(n,s)),"toggle"===i&&s[i]()})},s(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta.3"}}]),e}();return t(document).on(g.CLICK_DATA_API,c,function(e){e.preventDefault();var n=e.target;t(n).hasClass(l)||(n=t(n).closest(_)),m._jQueryInterface.call(t(n),"toggle")}).on(g.FOCUS_BLUR_DATA_API,c,function(e){var n=t(e.target).closest(_)[0];t(n).toggleClass(h,/^focus(in)?$/.test(e.type))}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),h=function(t){var e="carousel",n="bs.carousel",i="."+n,a=t.fn[e],l={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},h={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},c="next",u="prev",f="left",d="right",_={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},g="carousel",m="active",p="slide",v="carousel-item-right",E="carousel-item-left",T="carousel-item-next",y="carousel-item-prev",C={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},I=function(){function a(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(C.INDICATORS)[0],this._addEventListeners()}var I=a.prototype;return I.next=function(){this._isSliding||this._slide(c)},I.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},I.prev=function(){this._isSliding||this._slide(u)},I.pause=function(e){e||(this._isPaused=!0),t(this._element).find(C.NEXT_PREV)[0]&&o.supportsTransitionEnd()&&(o.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},I.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},I.to=function(e){var n=this;this._activeElement=t(this._element).find(C.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(_.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?c:u;this._slide(s,this._items[e])}},I.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},I._getConfig=function(t){return t=r({},l,t),o.typeCheckConfig(e,t,h),t},I._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(_.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(_.MOUSEENTER,function(t){return e.pause(t)}).on(_.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(_.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},I._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next();break;default:return}},I._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(C.ITEM)),this._items.indexOf(e)},I._getItemByDirection=function(t,e){var n=t===c,i=t===u,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===u?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},I._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(C.ACTIVE_ITEM)[0]),r=t.Event(_.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},I._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(C.ACTIVE).removeClass(m);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(m)}},I._slide=function(e,n){var i,s,r,a=this,l=t(this._element).find(C.ACTIVE_ITEM)[0],h=this._getItemIndex(l),u=n||l&&this._getItemByDirection(e,l),g=this._getItemIndex(u),I=Boolean(this._interval);if(e===c?(i=E,s=T,r=f):(i=v,s=y,r=d),u&&t(u).hasClass(m))this._isSliding=!1;else{if(!this._triggerSlideEvent(u,r).isDefaultPrevented()&&l&&u){this._isSliding=!0,I&&this.pause(),this._setActiveIndicatorElement(u);var A=t.Event(_.SLID,{relatedTarget:u,direction:r,from:h,to:g});o.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(u).addClass(s),o.reflow(u),t(l).addClass(i),t(u).addClass(i),t(l).one(o.TRANSITION_END,function(){t(u).removeClass(i+" "+s).addClass(m),t(l).removeClass(m+" "+s+" "+i),a._isSliding=!1,setTimeout(function(){return t(a._element).trigger(A)},0)}).emulateTransitionEnd(600)):(t(l).removeClass(m),t(u).addClass(m),this._isSliding=!1,t(this._element).trigger(A)),I&&this.cycle()}}},a._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},l,t(this).data());"object"==typeof e&&(s=r({},s,e));var o="string"==typeof e?e:s.slide;if(i||(i=new a(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof o){if("undefined"==typeof i[o])throw new Error('No method named "'+o+'"');i[o]()}else s.interval&&(i.pause(),i.cycle())})},a._dataApiClickHandler=function(e){var i=o.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(g)){var l=r({},t(s).data(),t(this).data()),h=this.getAttribute("data-slide-to");h&&(l.interval=!1),a._jQueryInterface.call(t(s),l),h&&t(s).data(n).to(h),e.preventDefault()}}},s(a,null,[{key:"VERSION",get:function(){return"4.0.0-beta.3"}},{key:"Default",get:function(){return l}}]),a}();return t(document).on(_.CLICK_DATA_API,C.DATA_SLIDE,I._dataApiClickHandler),t(window).on(_.LOAD_DATA_API,function(){t(C.DATA_RIDE).each(function(){var e=t(this);I._jQueryInterface.call(e,e.data())})}),t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),c=function(t){var e="collapse",n="bs.collapse",i="."+n,a=t.fn[e],l={toggle:!0,parent:""},h={toggle:"boolean",parent:"(string|element)"},c={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},u="show",f="collapse",d="collapsing",_="collapsed",g="width",m="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},v=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s0&&this._triggerArray.push(r)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var a=i.prototype;return a.toggle=function(){t(this._element).hasClass(u)?this.hide():this.show()},a.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(u)){var s,r;if(this._parent&&((s=t.makeArray(t(this._parent).children().children(p.ACTIVES))).length||(s=null)),!(s&&(r=t(s).data(n))&&r._isTransitioning)){var a=t.Event(c.SHOW);if(t(this._element).trigger(a),!a.isDefaultPrevented()){s&&(i._jQueryInterface.call(t(s),"hide"),r||t(s).data(n,null));var l=this._getDimension();t(this._element).removeClass(f).addClass(d),this._element.style[l]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(_).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(d).addClass(f).addClass(u),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(c.SHOWN)};if(o.supportsTransitionEnd()){var g="scroll"+(l[0].toUpperCase()+l.slice(1));t(this._element).one(o.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[g]+"px"}else h()}}}},a.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(u)){var n=t.Event(c.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",o.reflow(this._element),t(this._element).addClass(d).removeClass(f).removeClass(u),this._triggerArray.length)for(var s=0;s0},h._getPopperConfig=function(){var t=this,e={};"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset;return{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new l(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new Error('No method named "'+e+'"');n[e]()}})},l._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(T)),s=0;s0&&r--,40===e.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},d="show",_="out",g={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},m="fade",p="show",v=".tooltip-inner",E=".arrow",T="hover",y="focus",C="click",I="manual",A=function(){function l(t,e){if("undefined"==typeof n)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var A=l.prototype;return A.enable=function(){this._isEnabled=!0},A.disable=function(){this._isEnabled=!1},A.toggleEnabled=function(){this._isEnabled=!this._isEnabled},A.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},A.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},A.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),a=o.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass(m);var h="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(h);this.addAttachmentClass(c);var u=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(u),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:E},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var f=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===_&&e._leave(null,e)};o.supportsTransitionEnd()&&t(this.tip).hasClass(m)?t(this.tip).one(o.TRANSITION_END,f).emulateTransitionEnd(l._TRANSITION_DURATION):f()}},A.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==d&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[C]=!1,this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,o.supportsTransitionEnd()&&t(this.tip).hasClass(m)?t(i).one(o.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},A.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},A.isWithContent=function(){return Boolean(this.getTitle())},A.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},A.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},A.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(v),this.getTitle()),e.removeClass(m+" "+p)},A.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},A.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},A._getAttachment=function(t){return u[t.toUpperCase()]},A._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==I){var i=n===T?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===T?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},A._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},A._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?y:T]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===d?n._hoverState=d:(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===d&&n.show()},n.config.delay.show):n.show())},A._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?y:T]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=_,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===_&&n.hide()},n.config.delay.hide):n.hide())},A._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},A._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),o.typeCheckConfig(e,n,this.constructor.DefaultType),n},A._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},A._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(h);null!==n&&n.length>0&&e.removeClass(n.join(""))},A._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},A._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(m),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new l(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new Error('No method named "'+e+'"');n[e]()}})},s(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta.3"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return g}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return c}}]),l}();return t.fn[e]=A._jQueryInterface,t.fn[e].Constructor=A,t.fn[e].noConflict=function(){return t.fn[e]=l,A._jQueryInterface},A}(e),_=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},d.Default,{placement:"right",trigger:"click",content:"",template:''}),h=r({},d.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",_=".popover-body",g={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},m=function(r){function o(){return r.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(o,r);var d=o.prototype;return d.isWithContent=function(){return this.getTitle()||this._getContent()},d.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},d.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},d.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(_),n),e.removeClass(c+" "+u)},d._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},d._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new o(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new Error('No method named "'+e+'"');i[e]()}})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0-beta.3"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return g}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),o}(d);return t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),g=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,a=t.fn[e],l={offset:10,method:"auto",target:""},h={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},u="dropdown-item",f="active",d={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},_="offset",g="position",m=function(){function a(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+d.NAV_LINKS+","+this._config.target+" "+d.LIST_ITEMS+","+this._config.target+" "+d.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(c.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var m=a.prototype;return m.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?g:_,i="auto"===this._config.method?n:this._config.method,s=i===g?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();t.makeArray(t(this._selector)).map(function(e){var n,r=o.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},m.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},m._getConfig=function(n){if("string"!=typeof(n=r({},l,n)).target){var i=t(n.target).attr("id");i||(i=o.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return o.typeCheckConfig(e,n,h),n},m._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},m._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},m._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},m._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=o,t.Alert=a,t.Button=l,t.Carousel=h,t.Collapse=c,t.Dropdown=u,t.Modal=f,t.Popover=_,t.Scrollspy=g,t.Tab=m,t.Tooltip=d,Object.defineProperty(t,"__esModule",{value:!0})}); +//# sourceMappingURL=bootstrap.min.js.map diff --git a/jquery/controls.js b/jquery/controls.js new file mode 100755 index 0000000..535269a --- /dev/null +++ b/jquery/controls.js @@ -0,0 +1,108 @@ +$(function(){ + /* + * For the sake keeping the code clean and the examples simple this file + * contains only the plugin configuration & callbacks. + * + * UI functions ui_* can be located in: + * - assets/demo/uploader/js/ui-main.js + * - assets/demo/uploader/js/ui-multiple.js + * - assets/demo/uploader/js/ui-single.js + */ + $('#drag-and-drop-zone').dmUploader({ // + url: '/demo/java-script/upload', + maxFileSize: 3000000, // 3 Megs max + auto: false, + queue: false, + onDragEnter: function(){ + // Happens when dragging something over the DnD area + this.addClass('active'); + }, + onDragLeave: function(){ + // Happens when dragging something OUT of the DnD area + this.removeClass('active'); + }, + onInit: function(){ + // Plugin is ready to use + ui_add_log('Penguin initialized :)', 'info'); + }, + onComplete: function(){ + // All files in the queue are processed (success or error) + ui_add_log('All pending tranfers finished'); + }, + onNewFile: function(id, file){ + // When a new file is added using the file selector or the DnD area + ui_add_log('New file added #' + id); + ui_multi_add_file(id, file); + }, + onBeforeUpload: function(id){ + // about tho start uploading a file + ui_add_log('Starting the upload of #' + id); + ui_multi_update_file_status(id, 'uploading', 'Uploading...'); + ui_multi_update_file_progress(id, 0, '', true); + ui_multi_update_file_controls(id, false, true); // change control buttons status + }, + onUploadProgress: function(id, percent){ + // Updating file progress + ui_multi_update_file_progress(id, percent); + }, + onUploadSuccess: function(id, data){ + // A file was successfully uploaded + ui_add_log('Server Response for file #' + id + ': ' + JSON.stringify(data)); + ui_add_log('Upload of file #' + id + ' COMPLETED', 'success'); + ui_multi_update_file_status(id, 'success', 'Upload Complete'); + ui_multi_update_file_progress(id, 100, 'success', false); + ui_multi_update_file_controls(id, false, false); // change control buttons status + }, + onUploadCanceled: function(id) { + // Happens when a file is directly canceled by the user. + ui_multi_update_file_status(id, 'warning', 'Canceled by User'); + ui_multi_update_file_progress(id, 0, 'warning', false); + ui_multi_update_file_controls(id, true, false); + }, + onUploadError: function(id, xhr, status, message){ + // Happens when an upload error happens + ui_multi_update_file_status(id, 'danger', message); + ui_multi_update_file_progress(id, 0, 'danger', false); + ui_multi_update_file_controls(id, true, false, true); // change control buttons status + }, + onFallbackMode: function(){ + // When the browser doesn't support this plugin :( + ui_add_log('Plugin cant be used here, running Fallback callback', 'danger'); + }, + onFileSizeError: function(file){ + ui_add_log('File \'' + file.name + '\' cannot be added: size excess limit', 'danger'); + } + }); + + /* + Global controls + */ + $('#btnApiStart').on('click', function(evt){ + evt.preventDefault(); + + $('#drag-and-drop-zone').dmUploader('start'); + }); + + $('#btnApiCancel').on('click', function(evt){ + evt.preventDefault(); + + $('#drag-and-drop-zone').dmUploader('cancel'); + }); + + /* + Each File element action + */ + $('#files').on('click', 'button.start', function(evt){ + evt.preventDefault(); + + var id = $(this).closest('li.media').data('file-id'); + $('#drag-and-drop-zone').dmUploader('start', id); + }); + + $('#files').on('click', 'button.cancel', function(evt){ + evt.preventDefault(); + + var id = $(this).closest('li.media').data('file-id'); + $('#drag-and-drop-zone').dmUploader('cancel', id); + }); +}); diff --git a/jquery/external/jquery/jquery.js b/jquery/external/jquery/jquery.js new file mode 100755 index 0000000..7fc60fc --- /dev/null +++ b/jquery/external/jquery/jquery.js @@ -0,0 +1,11008 @@ +/*! + * jQuery JavaScript Library v1.12.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-05-20T17:17Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +//"use strict"; +var deletedIds = []; + +var document = window.document; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.12.4", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = jQuery.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type( obj ) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + var realStringObj = obj && obj.toString(); + return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call( obj, "constructor" ) && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + } catch ( e ) { + + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( !support.ownFirst ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[ j ] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +// JSHint would error on this code due to the Symbol not being defined in ES5. +// Defining this global in .jshintrc would create a danger of using the global +// unguarded in another place, it seems safer to just disable JSHint for these +// three lines. +/* jshint ignore: start */ +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; +} +/* jshint ignore: end */ + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.1 + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-10-17 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, nidselect, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; + while ( i-- ) { + groups[i] = nidselect + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( (parent = document.defaultView) && parent.top !== parent ) { + // Support: IE 11 + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( document.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var m = context.getElementById( id ); + return m ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( (oldCache = uniqueCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + } ); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not; + } ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // init accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt( 0 ) === "<" && + selector.charAt( selector.length - 1 ) === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[ 2 ] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[ 0 ] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof root.ready !== "undefined" ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( pos ? + pos.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[ 0 ], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.uniqueSort( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +} ); +var rnotwhite = ( /\S+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = true; + if ( !memory ) { + self.disable(); + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], + [ "notify", "progress", jQuery.Callbacks( "memory" ) ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this === promise ? newDefer.promise() : this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( function() { + + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || + ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. + // If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .progress( updateFunc( i, progressContexts, progressValues ) ) + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +} ); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +} ); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || + window.event.type === "load" || + document.readyState === "complete" ) { + + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called + // after the browser event has already occurred. + // Support: IE6-10 + // Older IE sometimes signals "interactive" too soon + if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); + + // If IE event model is used + } else { + + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch ( e ) {} + + if ( top && top.doScroll ) { + ( function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll( "left" ); + } catch ( e ) { + return window.setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + } )(); + } + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownFirst = i === "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery( function() { + + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== "undefined" ) { + + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +} ); + + +( function() { + var div = document.createElement( "div" ); + + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch ( e ) { + support.deleteExpando = false; + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); +var acceptData = function( elem ) { + var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute( "classid" ) === noData; +}; + + + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) && + data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } else { + + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[ i ] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, undefined + } else { + cache[ id ] = undefined; + } +} + +jQuery.extend( { + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + jQuery.data( this, key ); + } ); + } + + return arguments.length > 1 ? + + // Sets one value + this.each( function() { + jQuery.data( this, key, value ); + } ) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each( function() { + jQuery.removeData( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = jQuery._data( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, + // or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); + + +( function() { + var shrinkWrapBlocksVal; + + support.shrinkWrapBlocks = function() { + if ( shrinkWrapBlocksVal != null ) { + return shrinkWrapBlocksVal; + } + + // Will be changed later if needed. + shrinkWrapBlocksVal = false; + + // Minified: var b,c,d + var div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Test fired too early or in an unsupported environment, exit. + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + if ( typeof div.style.zoom !== "undefined" ) { + + // Reset CSS: box-sizing; display; margin; border + div.style.cssText = + + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;" + + "padding:1px;width:1px;zoom:1"; + div.appendChild( document.createElement( "div" ) ).style.width = "5px"; + shrinkWrapBlocksVal = div.offsetWidth !== 3; + } + + body.removeChild( container ); + + return shrinkWrapBlocksVal; + }; + +} )(); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { return tween.cur(); } : + function() { return jQuery.css( elem, prop, "" ); }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( + elems[ i ], + key, + raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[ 0 ], key ) : emptyGet; +}; +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([\w:-]+)/ ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + +var rleadingWhitespace = ( /^\s+/ ); + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + + +( function() { + var div = document.createElement( "div" ), + fragment = document.createDocumentFragment(), + input = document.createElement( "input" ); + + // Setup + div.innerHTML = "
a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input = document.createElement( "input" ); + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ + support.noCloneEvent = !!div.addEventListener; + + // Support: IE<9 + // Since attributes and properties are the same in IE, + // cleanData must set properties to undefined rather than use removeAttribute + div[ jQuery.expando ] = 1; + support.attributes = !div.getAttribute( jQuery.expando ); +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + area: [ 1, "", "" ], + + // Support: IE8 + param: [ 1, "", "" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + col: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
", "
" ] +}; + +// Support: IE8-IE9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== "undefined" ? + context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; + ( elem = elems[ i ] ) != null; + i++ + ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + jQuery._data( + elem, + "globalEval", + !refElements || jQuery._data( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/, + rtbody = / from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[ 1 ] === "
" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) && + !tbody.childNodes.length ) { + + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; +} + + +( function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) + for ( i in { submit: true, change: true, focusin: true } ) { + eventName = "on" + i; + + if ( !( support[ i ] = eventName in window ) ) { + + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE9 +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && + ( !e || jQuery.event.triggered !== e.type ) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + + // Add elem as a property of the handle fn to prevent a memory leak + // with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && + jQuery._data( cur, "handle" ); + + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( + ( !special._default || + special._default.apply( eventPath.pop(), data ) === false + ) && acceptData( elem ) + ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if ( delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push( { elem: cur, handlers: matches } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Safari 6-8+ + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split( " " ), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: ( "button buttons clientX clientY fromElement offsetX offsetY " + + "pageX pageY screenX screenY toElement" ).split( " " ), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? + original.toElement : + fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + // Piggyback on a donor event to simulate a different one + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + + // Previously, `originalEvent: {}` was set here, so stopPropagation call + // would not be triggered on donor event, since in our own + // jQuery.event.stopPropagation function we had a check for existence of + // originalEvent.stopPropagation method, so, consequently it would be a noop. + // + // Guard for simulated events was moved to jQuery.event.stopPropagation function + // since `originalEvent` should point to the original event for the + // constancy with other events and for more focused logic + } + ); + + jQuery.event.trigger( e, null, elem ); + + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, + // to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( !e || this.isSimulated ) { + return; + } + + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +// IE submit delegation +if ( !support.submit ) { + + jQuery.event.special.submit = { + setup: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? + + // Support: IE <=8 + // We use jQuery.prop instead of elem.form + // to allow fixing the IE8 delegated submit issue (gh-2332) + // by 3rd party polyfills/workarounds. + jQuery.prop( elem, "form" ) : + undefined; + + if ( form && !jQuery._data( form, "submit" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submitBubble = true; + } ); + jQuery._data( form, "submit", true ); + } + } ); + + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + + // If form was submitted by the user, bubble the event up the tree + if ( event._submitBubble ) { + delete event._submitBubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event ); + } + } + }, + + teardown: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.change ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._justChanged = true; + } + } ); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._justChanged && !event.isTrigger ) { + this._justChanged = false; + } + + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event ); + } ); + } + return false; + } + + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event ); + } + } ); + jQuery._data( elem, "change", true ); + } + } ); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || + ( elem.type !== "radio" && elem.type !== "checkbox" ) ) { + + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Support: Firefox +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome, Safari +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + } ); +} + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + }, + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName( "tbody" )[ 0 ] || + elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + return elem; +} + +function cloneCopyEvent( src, dest ) { + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( + ( node.text || node.textContent || node.innerHTML || "" ) + .replace( rcleanScript, "" ) + ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + elems = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = elems[ i ] ) != null; i++ ) { + + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc( elem ) || + !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( ( !support.noCloneEvent || !support.noCloneChecked ) && + ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) { + + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[ i ] ) { + fixCloneNodeIssues( node, destElements[ i ] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) { + cloneCopyEvent( node, destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + cleanData: function( elems, /* internal */ forceAcceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + attributes = support.attributes, + special = jQuery.event.special; + + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + if ( forceAcceptData || acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // Support: IE<9 + // IE does not allow us to delete expando properties from nodes + // IE creates expando attributes along with the property + // IE does not have a removeAttribute function on Document nodes + if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { + elem.removeAttribute( internalKey ); + + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://code.google.com/p/chromium/issues/detail?id=378607 + } else { + elem[ internalKey ] = undefined; + } + + deletedIds.push( id ); + } + } + } + } + } +} ); + +jQuery.fn.extend( { + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( + ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) + ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + + // Remove element nodes and prevent memory leaks + elem = this[ i ] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); + + +var iframe, + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ + +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + display = jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = ( iframe || jQuery( "';} +function hideSelectBox(){if(olNs4||olOp||olIe55)return;var px,py,pw,ph,sx,sw,sy,sh,selEl,v; +if(olIe4)v=0;else{v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v)return;v=parseInt(v[1]);} +if(v<20030624){px=parseInt(over.style.left);py=parseInt(over.style.top);pw=o3_width;ph=(o3_aboveheight?parseInt(o3_aboveheight):over.offsetHeight);selEl=(olIe4)?o3_frame.document.all.tags("SELECT"):o3_frame.document.getElementsByTagName("SELECT");for(var i=0;i(sx+sw)||(py+ph)(sy+sh))continue;selEl[i].isHidden=1;selEl[i].style.visibility='hidden';}}} +function showSelectBox(){if(olNs4||olOp||olIe55)return;var selEl,v; +if(olIe4)v=0;else{v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v)return;v=parseInt(v[1]);} +if(v<20030624){selEl=(olIe4)?o3_frame.document.all.tags("SELECT"):o3_frame.document.getElementsByTagName("SELECT");for(var i=0;i\n\n');} +f=capExtent.onmousemove.toString().match(/function[ ]+(\w*)\(/);if(f&&f[1]!='anonymous')capExtent.onmousemove=olMouseMove;} +registerHook("createPopup",generatePopUp,FAFTER);registerHook("hideObject",showSelectBox,FAFTER);olHideForm=1;} diff --git a/overlib/Mini/overlib_mini.js b/overlib/Mini/overlib_mini.js new file mode 100755 index 0000000..704d123 --- /dev/null +++ b/overlib/Mini/overlib_mini.js @@ -0,0 +1,322 @@ +//\///// +//\ overLIB 4.21 - You may not remove or change this notice. +//\ Copyright Erik Bosrup 1998-2004. All rights reserved. +//\ +//\ Contributors are listed on the homepage. +//\ This file might be old, always check for the latest version at: +//\ http://www.bosrup.com/web/overlib/ +//\ +//\ Please read the license agreement (available through the link above) +//\ before using overLIB. Direct any licensing questions to erik@bosrup.com. +//\ +//\ Do not sell this as your own work or remove this copyright notice. +//\ For full details on copying or changing this script please read the +//\ license agreement at the link above. Please give credit on sites that +//\ use overLIB and submit changes of the script so other people can use +//\ them as well. +//\///// +//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL! +var olLoaded=0,pmStart=10000000,pmUpper=10001000,pmCount=pmStart+1,pmt='',pms=new Array(),olInfo=new Info('4.21',1),FREPLACE=0,FBEFORE=1,FAFTER=2,FALTERNATE=3,FCHAIN=4,olHideForm=0,olHautoFlag=0,olVautoFlag=0,hookPts=new Array(),postParse=new Array(),cmdLine=new Array(),runTime=new Array(); +registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass'); +if(typeof ol_fgcolor=='undefined')var ol_fgcolor="#CCCCFF";if(typeof ol_bgcolor=='undefined')var ol_bgcolor="#333399";if(typeof ol_textcolor=='undefined')var ol_textcolor="#000000";if(typeof ol_capcolor=='undefined')var ol_capcolor="#FFFFFF";if(typeof ol_closecolor=='undefined')var ol_closecolor="#9999FF";if(typeof ol_textfont=='undefined')var ol_textfont="Verdana,Arial,Helvetica";if(typeof ol_captionfont=='undefined')var ol_captionfont="Verdana,Arial,Helvetica";if(typeof ol_closefont=='undefined')var ol_closefont="Verdana,Arial,Helvetica";if(typeof ol_textsize=='undefined')var ol_textsize="1";if(typeof ol_captionsize=='undefined')var ol_captionsize="1";if(typeof ol_closesize=='undefined')var ol_closesize="1";if(typeof ol_width=='undefined')var ol_width="200";if(typeof ol_border=='undefined')var ol_border="1";if(typeof ol_cellpad=='undefined')var ol_cellpad=2;if(typeof ol_offsetx=='undefined')var ol_offsetx=10;if(typeof ol_offsety=='undefined')var ol_offsety=10;if(typeof ol_text=='undefined')var ol_text="Default Text";if(typeof ol_cap=='undefined')var ol_cap="";if(typeof ol_sticky=='undefined')var ol_sticky=0;if(typeof ol_background=='undefined')var ol_background="";if(typeof ol_close=='undefined')var ol_close="Close";if(typeof ol_hpos=='undefined')var ol_hpos=RIGHT;if(typeof ol_status=='undefined')var ol_status="";if(typeof ol_autostatus=='undefined')var ol_autostatus=0;if(typeof ol_height=='undefined')var ol_height=-1;if(typeof ol_snapx=='undefined')var ol_snapx=0;if(typeof ol_snapy=='undefined')var ol_snapy=0;if(typeof ol_fixx=='undefined')var ol_fixx=-1;if(typeof ol_fixy=='undefined')var ol_fixy=-1;if(typeof ol_relx=='undefined')var ol_relx=null;if(typeof ol_rely=='undefined')var ol_rely=null;if(typeof ol_fgbackground=='undefined')var ol_fgbackground="";if(typeof ol_bgbackground=='undefined')var ol_bgbackground="";if(typeof ol_padxl=='undefined')var ol_padxl=1;if(typeof ol_padxr=='undefined')var ol_padxr=1;if(typeof ol_padyt=='undefined')var ol_padyt=1;if(typeof ol_padyb=='undefined')var ol_padyb=1;if(typeof ol_fullhtml=='undefined')var ol_fullhtml=0;if(typeof ol_vpos=='undefined')var ol_vpos=BELOW;if(typeof ol_aboveheight=='undefined')var ol_aboveheight=0;if(typeof ol_capicon=='undefined')var ol_capicon="";if(typeof ol_frame=='undefined')var ol_frame=self;if(typeof ol_timeout=='undefined')var ol_timeout=0;if(typeof ol_function=='undefined')var ol_function=null;if(typeof ol_delay=='undefined')var ol_delay=0;if(typeof ol_hauto=='undefined')var ol_hauto=0;if(typeof ol_vauto=='undefined')var ol_vauto=0;if(typeof ol_closeclick=='undefined')var ol_closeclick=0;if(typeof ol_wrap=='undefined')var ol_wrap=0;if(typeof ol_followmouse=='undefined')var ol_followmouse=1;if(typeof ol_mouseoff=='undefined')var ol_mouseoff=0;if(typeof ol_closetitle=='undefined')var ol_closetitle='Close';if(typeof ol_compatmode=='undefined')var ol_compatmode=0;if(typeof ol_css=='undefined')var ol_css=CSSOFF;if(typeof ol_fgclass=='undefined')var ol_fgclass="";if(typeof ol_bgclass=='undefined')var ol_bgclass="";if(typeof ol_textfontclass=='undefined')var ol_textfontclass="";if(typeof ol_captionfontclass=='undefined')var ol_captionfontclass="";if(typeof ol_closefontclass=='undefined')var ol_closefontclass=""; +if(typeof ol_texts=='undefined')var ol_texts=new Array("Text 0","Text 1");if(typeof ol_caps=='undefined')var ol_caps=new Array("Caption 0","Caption 1"); +var o3_text="",o3_cap="",o3_sticky=0,o3_background="",o3_close="Close",o3_hpos=RIGHT,o3_offsetx=2,o3_offsety=2,o3_fgcolor="",o3_bgcolor="",o3_textcolor="",o3_capcolor="",o3_closecolor="",o3_width=100,o3_border=1,o3_cellpad=2,o3_status="",o3_autostatus=0,o3_height=-1,o3_snapx=0,o3_snapy=0,o3_fixx=-1,o3_fixy=-1,o3_relx=null,o3_rely=null,o3_fgbackground="",o3_bgbackground="",o3_padxl=0,o3_padxr=0,o3_padyt=0,o3_padyb=0,o3_fullhtml=0,o3_vpos=BELOW,o3_aboveheight=0,o3_capicon="",o3_textfont="Verdana,Arial,Helvetica",o3_captionfont="Verdana,Arial,Helvetica",o3_closefont="Verdana,Arial,Helvetica",o3_textsize="1",o3_captionsize="1",o3_closesize="1",o3_frame=self,o3_timeout=0,o3_timerid=0,o3_allowmove=0,o3_function=null,o3_delay=0,o3_delayid=0,o3_hauto=0,o3_vauto=0,o3_closeclick=0,o3_wrap=0,o3_followmouse=1,o3_mouseoff=0,o3_closetitle='',o3_compatmode=0,o3_css=CSSOFF,o3_fgclass="",o3_bgclass="",o3_textfontclass="",o3_captionfontclass="",o3_closefontclass=""; +var o3_x=0,o3_y=0,o3_showingsticky=0,o3_removecounter=0; +var over=null,fnRef,hoveringSwitch=false,olHideDelay; +var isMac=(navigator.userAgent.indexOf("Mac")!=-1),olOp=(navigator.userAgent.toLowerCase().indexOf('opera')>-1&&document.createTextNode),olNs4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4),olNs6=(document.getElementById)?true:false,olKq=(olNs6&&/konqueror/i.test(navigator.userAgent)),olIe4=(document.all)?true:false,olIe5=false,olIe55=false,docRoot='document.body'; +if(olNs4){var oW=window.innerWidth;var oH=window.innerHeight;window.onresize=function(){if(oW!=window.innerWidth||oH!=window.innerHeight)location.reload();}} +if(olIe4){var agent=navigator.userAgent;if(/MSIE/.test(agent)){var versNum=parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/i)[1]);if(versNum>=5){olIe5=true;olIe55=(versNum>=5.5&&!olOp)?true:false;if(olNs6)olNs6=false;}} +if(olNs6)olIe4=false;} +if(document.compatMode&&document.compatMode=='CSS1Compat'){docRoot=((olIe4&&!olOp)?'document.documentElement':docRoot);} +if(window.addEventListener)window.addEventListener("load",OLonLoad_handler,false);else if(window.attachEvent)window.attachEvent("onload",OLonLoad_handler); +var capExtent; +function overlib(){if(!olLoaded||isExclusive(overlib.arguments))return true;if(olCheckMouseCapture)olMouseCapture();if(over){over=(typeof over.id!='string')?o3_frame.document.all['overDiv']:over;cClick();} +olHideDelay=0;o3_text=ol_text;o3_cap=ol_cap;o3_sticky=ol_sticky;o3_background=ol_background;o3_close=ol_close;o3_hpos=ol_hpos;o3_offsetx=ol_offsetx;o3_offsety=ol_offsety;o3_fgcolor=ol_fgcolor;o3_bgcolor=ol_bgcolor;o3_textcolor=ol_textcolor;o3_capcolor=ol_capcolor;o3_closecolor=ol_closecolor;o3_width=ol_width;o3_border=ol_border;o3_cellpad=ol_cellpad;o3_status=ol_status;o3_autostatus=ol_autostatus;o3_height=ol_height;o3_snapx=ol_snapx;o3_snapy=ol_snapy;o3_fixx=ol_fixx;o3_fixy=ol_fixy;o3_relx=ol_relx;o3_rely=ol_rely;o3_fgbackground=ol_fgbackground;o3_bgbackground=ol_bgbackground;o3_padxl=ol_padxl;o3_padxr=ol_padxr;o3_padyt=ol_padyt;o3_padyb=ol_padyb;o3_fullhtml=ol_fullhtml;o3_vpos=ol_vpos;o3_aboveheight=ol_aboveheight;o3_capicon=ol_capicon;o3_textfont=ol_textfont;o3_captionfont=ol_captionfont;o3_closefont=ol_closefont;o3_textsize=ol_textsize;o3_captionsize=ol_captionsize;o3_closesize=ol_closesize;o3_timeout=ol_timeout;o3_function=ol_function;o3_delay=ol_delay;o3_hauto=ol_hauto;o3_vauto=ol_vauto;o3_closeclick=ol_closeclick;o3_wrap=ol_wrap;o3_followmouse=ol_followmouse;o3_mouseoff=ol_mouseoff;o3_closetitle=ol_closetitle;o3_css=ol_css;o3_compatmode=ol_compatmode;o3_fgclass=ol_fgclass;o3_bgclass=ol_bgclass;o3_textfontclass=ol_textfontclass;o3_captionfontclass=ol_captionfontclass;o3_closefontclass=ol_closefontclass; +setRunTimeVariables(); +fnRef=''; +o3_frame=ol_frame; +if(!(over=createDivContainer()))return false; +parseTokens('o3_',overlib.arguments);if(!postParseChecks())return false; +if(o3_delay==0){return runHook("olMain",FREPLACE);}else{o3_delayid=setTimeout("runHook('olMain',FREPLACE)",o3_delay);return false;}} +function nd(time){if(olLoaded&&!isExclusive()){hideDelay(time); +if(o3_removecounter>=1){o3_showingsticky=0 }; +if(o3_showingsticky==0){o3_allowmove=0;if(over!=null&&o3_timerid==0)runHook("hideObject",FREPLACE,over);}else{o3_removecounter++;}} +return true;} +function cClick(){if(olLoaded){runHook("hideObject",FREPLACE,over);o3_showingsticky=0;} +return false;} +function overlib_pagedefaults(){parseTokens('ol_',overlib_pagedefaults.arguments);} +function olMain(){var layerhtml,styleType;runHook("olMain",FBEFORE); +if(o3_background!=""||o3_fullhtml){ +layerhtml=runHook('ol_content_background',FALTERNATE,o3_css,o3_text,o3_background,o3_fullhtml);}else{ +styleType=(pms[o3_css-1-pmStart]=="cssoff"||pms[o3_css-1-pmStart]=="cssclass"); +if(o3_fgbackground!="")o3_fgbackground="background=\""+o3_fgbackground+"\"";if(o3_bgbackground!="")o3_bgbackground=(styleType?"background=\""+o3_bgbackground+"\"":o3_bgbackground); +if(o3_fgcolor!="")o3_fgcolor=(styleType?"bgcolor=\""+o3_fgcolor+"\"":o3_fgcolor);if(o3_bgcolor!="")o3_bgcolor=(styleType?"bgcolor=\""+o3_bgcolor+"\"":o3_bgcolor); +if(o3_height>0)o3_height=(styleType?"height=\""+o3_height+"\"":o3_height);else o3_height=""; +if(o3_cap==""){ +layerhtml=runHook('ol_content_simple',FALTERNATE,o3_css,o3_text);}else{ +if(o3_sticky){ +layerhtml=runHook('ol_content_caption',FALTERNATE,o3_css,o3_text,o3_cap,o3_close);}else{ +layerhtml=runHook('ol_content_caption',FALTERNATE,o3_css,o3_text,o3_cap,"");}}} +if(o3_sticky){if(o3_timerid>0){clearTimeout(o3_timerid);o3_timerid=0;} +o3_showingsticky=1;o3_removecounter=0;} +if(!runHook("createPopup",FREPLACE,layerhtml))return false; +if(o3_autostatus>0){o3_status=o3_text;if(o3_autostatus>1)o3_status=o3_cap;} +o3_allowmove=0; +if(o3_timeout>0){if(o3_timerid>0)clearTimeout(o3_timerid);o3_timerid=setTimeout("cClick()",o3_timeout);} +runHook("disp",FREPLACE,o3_status);runHook("olMain",FAFTER); +return(olOp&&event&&event.type=='mouseover'&&!o3_status)?'':(o3_status!='');} +function ol_content_simple(text){var cpIsMultiple=/,/.test(o3_cellpad);var txt='
':((!olNs4&&cpIsMultiple)?' style="'+setCellPadStr(o3_cellpad)+'">':'>'))+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
'; +set_background("");return txt;} +function ol_content_caption(text,title,close){var nameId,txt,cpIsMultiple=/,/.test(o3_cellpad);var closing,closeevent; +closing="";closeevent="onmouseover";if(o3_closeclick==1)closeevent=(o3_closetitle?"title='"+o3_closetitle+"'":"")+" onclick";if(o3_capicon!=""){nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';if(typeof o3_dragimg!='undefined'&&o3_dragimg)nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';o3_capicon='';} +if(close!="") +closing=''+(o3_closefontclass?'':wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass?'':wrapStr(1,o3_closesize,'close'))+'';txt='
':'>')+(o3_captionfontclass?'':''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass?'':wrapStr(1,o3_captionsize)+'')+''+closing+'
' :((!olNs4&&cpIsMultiple)?' style="'+setCellPadStr(o3_cellpad)+'">':'>'))+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
'; +set_background("");return txt;} +function ol_content_background(text,picture,hasfullhtml){if(hasfullhtml){txt=text;}else{txt='
'+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
';} +set_background(picture);return txt;} +function set_background(pic){if(pic==""){if(olNs4){over.background.src=null;}else if(over.style){over.style.backgroundImage="none";} +}else{if(olNs4){over.background.src=pic;}else if(over.style){over.style.width=o3_width+'px';over.style.backgroundImage="url("+pic+")";}}} +var olShowId=-1; +function disp(statustext){runHook("disp",FBEFORE); +if(o3_allowmove==0){runHook("placeLayer",FREPLACE);(olNs6&&olShowId<0)?olShowId=setTimeout("runHook('showObject',FREPLACE,over)",1):runHook("showObject",FREPLACE,over);o3_allowmove=(o3_sticky||o3_followmouse==0)?0:1;} +runHook("disp",FAFTER); +if(statustext!="")self.status=statustext;} +function createPopup(lyrContent){runHook("createPopup",FBEFORE); +if(o3_wrap){var wd,ww,theObj=(olNs4?over:over.style);theObj.top=theObj.left=((olIe4&&!olOp)?0:-10000)+(!olNs4?'px':0);layerWrite(lyrContent);wd=(olNs4?over.clip.width:over.offsetWidth);if(wd>(ww=windowWidth())){lyrContent=lyrContent.replace(/\ /g,' ');o3_width=ww;o3_wrap=0;}} +layerWrite(lyrContent); +if(o3_wrap)o3_width=(olNs4?over.clip.width:over.offsetWidth); +runHook("createPopup",FAFTER,lyrContent); +return true;} +function placeLayer(){var placeX,placeY,widthFix=0; +if(o3_frame.innerWidth)widthFix=18;iwidth=windowWidth(); +winoffset=(olIe4)?eval('o3_frame.'+docRoot+'.scrollLeft'):o3_frame.pageXOffset; +placeX=runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix); +if(o3_frame.innerHeight){iheight=o3_frame.innerHeight;}else if(eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientHeight=='number'")&&eval('o3_frame.'+docRoot+'.clientHeight')){iheight=eval('o3_frame.'+docRoot+'.clientHeight');} +scrolloffset=(olIe4)?eval('o3_frame.'+docRoot+'.scrollTop'):o3_frame.pageYOffset;placeY=runHook('verticalPlacement',FCHAIN,iheight,scrolloffset); +repositionTo(over,placeX,placeY);} +function olMouseMove(e){var e=(e)?e:event; +if(e.pageX){o3_x=e.pageX;o3_y=e.pageY;}else if(e.clientX){o3_x=eval('e.clientX+o3_frame.'+docRoot+'.scrollLeft');o3_y=eval('e.clientY+o3_frame.'+docRoot+'.scrollTop');} +if(o3_allowmove==1)runHook("placeLayer",FREPLACE); +if(hoveringSwitch&&!olNs4&&runHook("cursorOff",FREPLACE)){(olHideDelay?hideDelay(olHideDelay):cClick());hoveringSwitch=!hoveringSwitch;}} +function no_overlib(){return ver3fix;} +function olMouseCapture(){capExtent=document;var fN,str='',l,k,f,wMv,sS,mseHandler=olMouseMove;var re=/function[ ]*(\w*)\(/; +wMv=(!olIe4&&window.onmousemove);if(document.onmousemove||wMv){if(wMv)capExtent=window;f=capExtent.onmousemove.toString();fN=f.match(re);if(fN==null){str=f+'(e);';}else if(fN[1]=='anonymous'||fN[1]=='olMouseMove'||(wMv&&fN[1]=='onmousemove')){if(!olOp&&wMv){l=f.indexOf('{')+1;k=f.lastIndexOf('}');sS=f.substring(l,k);if((l=sS.indexOf('('))!=-1){sS=sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,'');if(eval("typeof "+sS+"=='undefined'"))window.onmousemove=null;else str=sS+'(e);';}} +if(!str){olCheckMouseCapture=false;return;} +}else{if(fN[1])str=fN[1]+'(e);';else{l=f.indexOf('{')+1;k=f.lastIndexOf('}');str=f.substring(l,k)+'\n';}} +str+='olMouseMove(e);';mseHandler=new Function('e',str);} +capExtent.onmousemove=mseHandler;if(olNs4)capExtent.captureEvents(Event.MOUSEMOVE);} +function parseTokens(pf,ar){ +var v,i,mode=-1,par=(pf!='ol_'),fnMark=(par&&!ar.length?1:0); +for(i=0;ipmStart&&ar[i]=pmCount||ar[i]==DONOTHING){continue;} +if(ar[i]==INARRAY){fnMark=0;eval(pf+'text=ol_texts['+ar[++i]+'].toString()');continue;} +if(ar[i]==CAPARRAY){eval(pf+'cap=ol_caps['+ar[++i]+'].toString()');continue;} +if(ar[i]==STICKY){if(pf!='ol_')eval(pf+'sticky=1');continue;} +if(ar[i]==BACKGROUND){eval(pf+'background="'+ar[++i]+'"');continue;} +if(ar[i]==NOCLOSE){if(pf!='ol_')opt_NOCLOSE();continue;} +if(ar[i]==CAPTION){eval(pf+"cap='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==CENTER||ar[i]==LEFT||ar[i]==RIGHT){eval(pf+'hpos='+ar[i]);if(pf!='ol_')olHautoFlag=1;continue;} +if(ar[i]==OFFSETX){eval(pf+'offsetx='+ar[++i]);continue;} +if(ar[i]==OFFSETY){eval(pf+'offsety='+ar[++i]);continue;} +if(ar[i]==FGCOLOR){eval(pf+'fgcolor="'+ar[++i]+'"');continue;} +if(ar[i]==BGCOLOR){eval(pf+'bgcolor="'+ar[++i]+'"');continue;} +if(ar[i]==TEXTCOLOR){eval(pf+'textcolor="'+ar[++i]+'"');continue;} +if(ar[i]==CAPCOLOR){eval(pf+'capcolor="'+ar[++i]+'"');continue;} +if(ar[i]==CLOSECOLOR){eval(pf+'closecolor="'+ar[++i]+'"');continue;} +if(ar[i]==WIDTH){eval(pf+'width='+ar[++i]);continue;} +if(ar[i]==BORDER){eval(pf+'border='+ar[++i]);continue;} +if(ar[i]==CELLPAD){i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad'));continue;} +if(ar[i]==STATUS){eval(pf+"status='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==AUTOSTATUS){eval(pf+'autostatus=('+pf+'autostatus==1)?0:1');continue;} +if(ar[i]==AUTOSTATUSCAP){eval(pf+'autostatus=('+pf+'autostatus==2)?0:2');continue;} +if(ar[i]==HEIGHT){eval(pf+'height='+pf+'aboveheight='+ar[++i]);continue;} +if(ar[i]==CLOSETEXT){eval(pf+"close='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==SNAPX){eval(pf+'snapx='+ar[++i]);continue;} +if(ar[i]==SNAPY){eval(pf+'snapy='+ar[++i]);continue;} +if(ar[i]==FIXX){eval(pf+'fixx='+ar[++i]);continue;} +if(ar[i]==FIXY){eval(pf+'fixy='+ar[++i]);continue;} +if(ar[i]==RELX){eval(pf+'relx='+ar[++i]);continue;} +if(ar[i]==RELY){eval(pf+'rely='+ar[++i]);continue;} +if(ar[i]==FGBACKGROUND){eval(pf+'fgbackground="'+ar[++i]+'"');continue;} +if(ar[i]==BGBACKGROUND){eval(pf+'bgbackground="'+ar[++i]+'"');continue;} +if(ar[i]==PADX){eval(pf+'padxl='+ar[++i]);eval(pf+'padxr='+ar[++i]);continue;} +if(ar[i]==PADY){eval(pf+'padyt='+ar[++i]);eval(pf+'padyb='+ar[++i]);continue;} +if(ar[i]==FULLHTML){if(pf!='ol_')eval(pf+'fullhtml=1');continue;} +if(ar[i]==BELOW||ar[i]==ABOVE){eval(pf+'vpos='+ar[i]);if(pf!='ol_')olVautoFlag=1;continue;} +if(ar[i]==CAPICON){eval(pf+'capicon="'+ar[++i]+'"');continue;} +if(ar[i]==TEXTFONT){eval(pf+"textfont='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==CAPTIONFONT){eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==CLOSEFONT){eval(pf+"closefont='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==TEXTSIZE){eval(pf+'textsize="'+ar[++i]+'"');continue;} +if(ar[i]==CAPTIONSIZE){eval(pf+'captionsize="'+ar[++i]+'"');continue;} +if(ar[i]==CLOSESIZE){eval(pf+'closesize="'+ar[++i]+'"');continue;} +if(ar[i]==TIMEOUT){eval(pf+'timeout='+ar[++i]);continue;} +if(ar[i]==FUNCTION){if(pf=='ol_'){if(typeof ar[i+1]!='number'){v=ar[++i];ol_function=(typeof v=='function'?v:null);}}else{fnMark=0;v=null;if(typeof ar[i+1]!='number')v=ar[++i]; opt_FUNCTION(v);} continue;} +if(ar[i]==DELAY){eval(pf+'delay='+ar[++i]);continue;} +if(ar[i]==HAUTO){eval(pf+'hauto=('+pf+'hauto==0)?1:0');continue;} +if(ar[i]==VAUTO){eval(pf+'vauto=('+pf+'vauto==0)?1:0');continue;} +if(ar[i]==CLOSECLICK){eval(pf+'closeclick=('+pf+'closeclick==0)?1:0');continue;} +if(ar[i]==WRAP){eval(pf+'wrap=('+pf+'wrap==0)?1:0');continue;} +if(ar[i]==FOLLOWMOUSE){eval(pf+'followmouse=('+pf+'followmouse==1)?0:1');continue;} +if(ar[i]==MOUSEOFF){eval(pf+'mouseoff=('+pf+'mouseoff==0)?1:0');v=ar[i+1];if(pf!='ol_'&&eval(pf+'mouseoff')&&typeof v=='number'&&(vpmUpper))olHideDelay=ar[++i];continue;} +if(ar[i]==CLOSETITLE){eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'");continue;} +if(ar[i]==CSSOFF||ar[i]==CSSCLASS){eval(pf+'css='+ar[i]);continue;} +if(ar[i]==COMPATMODE){eval(pf+'compatmode=('+pf+'compatmode==0)?1:0');continue;} +if(ar[i]==FGCLASS){eval(pf+'fgclass="'+ar[++i]+'"');continue;} +if(ar[i]==BGCLASS){eval(pf+'bgclass="'+ar[++i]+'"');continue;} +if(ar[i]==TEXTFONTCLASS){eval(pf+'textfontclass="'+ar[++i]+'"');continue;} +if(ar[i]==CAPTIONFONTCLASS){eval(pf+'captionfontclass="'+ar[++i]+'"');continue;} +if(ar[i]==CLOSEFONTCLASS){eval(pf+'closefontclass="'+ar[++i]+'"');continue;} +i=parseCmdLine(pf,i,ar);}} +if(fnMark&&o3_function)o3_text=o3_function(); +if((pf=='o3_')&&o3_wrap){o3_width=0; +var tReg=/<.*\n*>/ig;if(!tReg.test(o3_text))o3_text=o3_text.replace(/[ ]+/g,' ');if(!tReg.test(o3_cap))o3_cap=o3_cap.replace(/[ ]+/g,' ');} +if((pf=='o3_')&&o3_sticky){if(!o3_close&&(o3_frame!=ol_frame))o3_close=ol_close;if(o3_mouseoff&&(o3_frame==ol_frame))opt_NOCLOSE(' ');}} +function layerWrite(txt){txt+="\n";if(olNs4){var lyr=o3_frame.document.layers['overDiv'].document +lyr.write(txt) +lyr.close() +}else if(typeof over.innerHTML!='undefined'){if(olIe5&&isMac)over.innerHTML='';over.innerHTML=txt;}else{range=o3_frame.document.createRange();range.setStartAfter(over);domfrag=range.createContextualFragment(txt); +while(over.hasChildNodes()){over.removeChild(over.lastChild);} +over.appendChild(domfrag);}} +function showObject(obj){runHook("showObject",FBEFORE); +var theObj=(olNs4?obj:obj.style);theObj.visibility='visible'; +runHook("showObject",FAFTER);} +function hideObject(obj){runHook("hideObject",FBEFORE); +var theObj=(olNs4?obj:obj.style);if(olNs6&&olShowId>0){clearTimeout(olShowId);olShowId=0;} +theObj.visibility='hidden';theObj.top=theObj.left=((olIe4&&!olOp)?0:-10000)+(!olNs4?'px':0); +if(o3_timerid>0)clearTimeout(o3_timerid);if(o3_delayid>0)clearTimeout(o3_delayid); +o3_timerid=0;o3_delayid=0;self.status=""; +if(obj.onmouseout||obj.onmouseover){if(olNs4)obj.releaseEvents(Event.MOUSEOUT||Event.MOUSEOVER);obj.onmouseout=obj.onmouseover=null;} +runHook("hideObject",FAFTER);} +function repositionTo(obj,xL,yL){var theObj=(olNs4?obj:obj.style);theObj.left=xL+(!olNs4?'px':0);theObj.top=yL+(!olNs4?'px':0);} +function cursorOff(){var left=parseInt(over.style.left);var top=parseInt(over.style.top);var right=left+(over.offsetWidth>=parseInt(o3_width)?over.offsetWidth:parseInt(o3_width));var bottom=top+(over.offsetHeight>=o3_aboveheight?over.offsetHeight:o3_aboveheight); +if(o3_xright||o3_ybottom)return true; +return false;} +function opt_FUNCTION(callme){o3_text=(callme?(typeof callme=='string'?(/.+\(.*\)/.test(callme)?eval(callme):callme):callme()):(o3_function?o3_function():'No Function')); +return 0;} +function opt_NOCLOSE(unused){if(!unused)o3_close=""; +if(olNs4){over.captureEvents(Event.MOUSEOUT||Event.MOUSEOVER);over.onmouseover=function(){if(o3_timerid>0){clearTimeout(o3_timerid);o3_timerid=0;} } +over.onmouseout=function(e){if(olHideDelay)hideDelay(olHideDelay);else cClick(e);} +}else{over.onmouseover=function(){hoveringSwitch=true;if(o3_timerid>0){clearTimeout(o3_timerid);o3_timerid=0;} }} +return 0;} +function opt_MULTIPLEARGS(i,args,parameter){var k=i,re,pV,str=''; +for(k=i;kpmStart)break;str+=args[k]+',';} +if(str)str=str.substring(0,--str.length); +k--;pV=(olNs4&&/cellpad/i.test(parameter))?str.split(',')[0]:str;eval(parameter+'="'+pV+'"'); +return k;} +function nbspCleanup(){if(o3_wrap){o3_text=o3_text.replace(/\ /g,' ');o3_cap=o3_cap.replace(/\ /g,' ');}} +function escSglQuote(str){return str.toString().replace(/'/g,"\\'");} +function OLonLoad_handler(e){var re=/\w+\(.*\)[;\s]+/g,olre=/overlib\(|nd\(|cClick\(/,fn,l,i; +if(!olLoaded)olLoaded=1; +if(window.removeEventListener&&e.eventPhase==3)window.removeEventListener("load",OLonLoad_handler,false);else if(window.detachEvent){window.detachEvent("onload",OLonLoad_handler);var fN=document.body.getAttribute('onload');if(fN){fN=fN.toString().match(re);if(fN&&fN.length){for(i=0;i':''):'
';else{fontStr='o3_'+whichString+'font';fontColor='o3_'+((whichString=='caption')? 'cap':whichString)+'color';return(hasDims&&!olNs4)?(isClose?'':'
'):'';}} +function quoteMultiNameFonts(theFont){var v,pM=theFont.split(',');for(var i=0;i0)clearTimeout(o3_timerid); +o3_timerid=setTimeout("cClick()",(o3_timeout=time));}} +function horizontalPlacement(browserWidth,horizontalScrollAmount,widthFix){var placeX,iwidth=browserWidth,winoffset=horizontalScrollAmount;var parsedWidth=parseInt(o3_width); +if(o3_fixx>-1||o3_relx!=null){ +placeX=(o3_relx!=null?( o3_relx<0?winoffset+o3_relx+iwidth-parsedWidth-widthFix:winoffset+o3_relx):o3_fixx);}else{ +if(o3_hauto==1){if((o3_x-winoffset)>(iwidth/2)){o3_hpos=LEFT;}else{o3_hpos=RIGHT;}} +if(o3_hpos==CENTER){placeX=o3_x+o3_offsetx-(parsedWidth/2); +if(placeX(winoffset+iwidth-widthFix)){placeX=iwidth+winoffset-parsedWidth-widthFix;if(placeX<0)placeX=0;}} +if(o3_hpos==LEFT){placeX=o3_x-o3_offsetx-parsedWidth;if(placeX1){var snapping=placeX % o3_snapx; +if(o3_hpos==LEFT){placeX=placeX-(o3_snapx+snapping);}else{ +placeX=placeX+(o3_snapx-snapping);} +if(placeX-1||o3_rely!=null){ +placeY=(o3_rely!=null?(o3_rely<0?scrolloffset+o3_rely+iheight-parsedHeight:scrolloffset+o3_rely):o3_fixy);}else{ +if(o3_vauto==1){if((o3_y-scrolloffset)>(iheight/2)&&o3_vpos==BELOW&&(o3_y+parsedHeight+o3_offsety-(scrolloffset+iheight)>0)){o3_vpos=ABOVE;}else if(o3_vpos==ABOVE&&(o3_y-(parsedHeight+o3_offsety)-scrolloffset<0)){o3_vpos=BELOW;}} +if(o3_vpos==ABOVE){if(o3_aboveheight==0)o3_aboveheight=parsedHeight; +placeY=o3_y-(o3_aboveheight+o3_offsety);if(placeY1){var snapping=placeY % o3_snapy; +if(o3_aboveheight>0&&o3_vpos==ABOVE){placeY=placeY-(o3_snapy+snapping);}else{placeY=placeY+(o3_snapy-snapping);} +if(placeY
');divContainer=layerReference(id);}else{divContainer=frm.document.createElement("DIV");divContainer.id=id;body.appendChild(divContainer);} +objRef=divContainer.style;} +objRef.position='absolute';objRef.visibility='hidden';objRef.zIndex=zValue;if(olIe4&&!olOp)objRef.left=objRef.top='0px';else objRef.left=objRef.top=-10000+(!olNs4?'px':0);} +return divContainer;} +function layerReference(id){return(olNs4?o3_frame.document.layers[id]:(document.all?o3_frame.document.all[id]:o3_frame.document.getElementById(id)));} +function isFunction(fnRef){var rtn=true; +if(typeof fnRef=='object'){for(var i=0;ijS){for(var k=jS;k-1){i=j;break;}}} +return i;} +function postParseChecks(pf,args){if(typeof postParse!='undefined'&&postParse.length){for(var k=0;k-1)hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; +}else if(hookType==FBEFORE||hookType==FAFTER){var hookPt=(hookType==1?hookPt.before:hookPt.after); +if(typeof fnRef=='object'){hookPt=hookPt.concat(fnRef);}else{hookPt[hookPt.length++]=fnRef;} +if(optPm)hookPt=reOrder(hookPt,fnRef,optPm); +}else if(hookType==FALTERNATE){if(last=='number')hookPt.alt[pms[optPm-1-pmStart]]=fnRef;}else if(hookType==FCHAIN){hookPt=hookPt.chain;if(typeof fnRef=='object')hookPt=hookPt.concat(fnRef);else hookPt[hookPt.length++]=fnRef;} +return;}} +function registerRunTimeFunction(fn){if(isFunction(fn)){if(typeof fn=='object'){runTime=runTime.concat(fn);}else{runTime[runTime.length++]=fn;}}} +function registerCmdLineFunction(fn){if(isFunction(fn)){if(typeof fn=='object'){cmdLine=cmdLine.concat(fn);}else{cmdLine[cmdLine.length++]=fn;}}} +function registerPostParseFunction(fn){if(isFunction(fn)){if(typeof fn=='object'){postParse=postParse.concat(fn);}else{postParse[postParse.length++]=fn;}}} +function runHook(fnHookTo,hookType){var l=hookPts[fnHookTo],k,rtnVal=null,optPm,arS,ar=runHook.arguments; +if(hookType==FREPLACE){arS=argToString(ar,2); +if(typeof l=='undefined'||!(l=l.ovload))rtnVal=eval(fnHookTo+'('+arS+')');else rtnVal=eval('l('+arS+')'); +}else if(hookType==FBEFORE||hookType==FAFTER){if(typeof l!='undefined'){l=(hookType==1?l.before:l.after); +if(l.length){arS=argToString(ar,2);for(var k=0;k0;k--)if((rtnVal=eval('l[k-1]('+arS+')'))!=void(0))break;} +return rtnVal;} +function FunctionReference(){this.ovload=null;this.before=new Array();this.after=new Array();this.alt=new Array();this.chain=new Array();} +function Info(version,prerelease){this.version=version;this.prerelease=prerelease; +this.simpleversion=Math.round(this.version*100);this.major=parseInt(this.simpleversion/100);this.minor=parseInt(this.simpleversion/10)-this.major * 10;this.revision=parseInt(this.simpleversion)-this.major * 100-this.minor * 10;this.meets=meets;} +function meets(reqdVersion){return(!reqdVersion)?false:this.simpleversion>=Math.round(100*parseFloat(reqdVersion));} +registerHook("ol_content_simple",ol_content_simple,FALTERNATE,CSSOFF);registerHook("ol_content_caption",ol_content_caption,FALTERNATE,CSSOFF);registerHook("ol_content_background",ol_content_background,FALTERNATE,CSSOFF);registerHook("ol_content_simple",ol_content_simple,FALTERNATE,CSSCLASS);registerHook("ol_content_caption",ol_content_caption,FALTERNATE,CSSCLASS);registerHook("ol_content_background",ol_content_background,FALTERNATE,CSSCLASS);registerPostParseFunction(checkPositionFlags);registerHook("hideObject",nbspCleanup,FAFTER);registerHook("horizontalPlacement",horizontalPlacement,FCHAIN);registerHook("verticalPlacement",verticalPlacement,FCHAIN);if(olNs4||(olIe5&&isMac)||olKq)olLoaded=1;registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode'); +var olCheckMouseCapture=true;if((olNs4||olNs6||olIe4)){olMouseCapture();}else{overlib=no_overlib;nd=no_overlib;ver3fix=true;} diff --git a/overlib/Mini/overlib_setonoff_mini.js b/overlib/Mini/overlib_setonoff_mini.js new file mode 100755 index 0000000..95659e8 --- /dev/null +++ b/overlib/Mini/overlib_setonoff_mini.js @@ -0,0 +1,32 @@ +//\///// +//\ overLIB Set On/Off Plugin +//\ This file requires overLIB 4.10 or later. +//\ +//\ overLIB 4.10 - You may not remove or change this notice. +//\ Copyright Erik Bosrup 1998-2003. All rights reserved. +//\ Contributors are listed on the homepage. +//\ See http://www.bosrup.com/web/overlib/ for details. +//\///// +//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL! +if(typeof olInfo=='undefined'||typeof olInfo.meets=='undefined'||!olInfo.meets(4.10))alert('overLIB 4.10 or later is required for the Set On/Off Plugin.');else{registerCommands('seton,setoff');var olSetType; +function setOnOffVariables(){olSetType=0;} +function parseOnOffExtras(pf,i,ar){var k=i,v; +if(k-1){je=opt_MULTICOMMANDS(k+1,args);for(j=k+1;j<(k+je);j++)setNoParamCommand(1,pf,args[j]);k+=(je-1);} +k=-1;while((k=hasCommand(++k,args,SETOFF))-1){je=opt_MULTICOMMANDS(k+1,args);for(j=k+1;j<(k+je);j++)setNoParamCommand(0,pf,args[j]);k+=(je-1);}} +return true;} +var olRe; +function setNoParamCommand(whichType,pf,COMMAND){var v=pms[COMMAND-1-pmStart]; +if(pmt&&!olRe)olRe=eval('/'+pmt.split(',').join('|')+'/');if(pf!='ol_'&& /capturefirst/.test(v))return;if(pf!='ol_'&& /wrap/.test(v)&& eval(pf+'wrap')&&(whichType==0)){nbspCleanup();o3_width=ol_width;} +if(olRe.test(v))eval(pf+v+'='+((whichType&&COMMAND==AUTOSTATUSCAP)?whichType++:whichType));} +function opt_MULTICOMMANDS(i,ar){var k=i; +while(kpmStart){k++;if(ar[k-1]=='SETON'||ar[k-1]=='SETOFF')break;} +k-=(kright||o3_ybottom)return true;return false;} +function checkShadowPreHide(){if(o3_shadow&&o3_shadowopacity)cleanUpShadowEffects();if(o3_shadow&&(olIe4&&isMac) )over.style.pixelWidth=over.style.pixelHeight=0;} +function generateShadow(content){var wd,ht,X=0,Y=0,zIdx=0,txt,dpObj,puObj,bS='',aPos,posStr=new Array(); +if(!o3_shadow||(o3_shadowx==0&&o3_shadowy==0))return; +X=Math.abs(o3_shadowx);Y=Math.abs(o3_shadowy);wd=parseInt(o3_width);ht=(olNs4)?over.clip.height:over.offsetHeight; +if(o3_shadowx==0){if(o3_shadowy<0){posStr[0]=' left:0;top: 0';posStr[1]=' left:0;top: '+Y+'px';}else if(o3_shadowy>0){posStr[0]=' left:0;top: '+Y+'px';posStr[1]=' left:0;top:0';} +}else if(o3_shadowy==0){if(o3_shadowx<0){posStr[0]=' left:0;top: 0';posStr[1]=' left: '+X+'px';}else if(o3_shadowx>0){posStr[0]=' left: '+X+'px;top: 0';posStr[1]=' left:0;top:0';} +}else if(o3_shadowx>0){if(o3_shadowy>0){posStr[0]=' left:'+X+'px;top:'+Y+'px';posStr[1]=' left:0;top:0';}else if(o3_shadowy<0){posStr[0]=' left:'+X+'px;top:0';posStr[1]=' left:0;top: '+Y+'px';} +}else if(o3_shadowx<0){if(o3_shadowy>0){posStr[0]=' left:0;top:'+Y+'px';posStr[1]=' left:'+X+'px;top:0';}else if(o3_shadowy<0){posStr[0]=' left:0;top:0';posStr[1]=' left:'+X+'px;top:'+Y+'px';}} +txt=(olNs4)?'
':((olIe55&&olHideForm)?backDropSource(wd+X,ht+Y,zIdx++):'')+'
'+content+'
';}else{txt+=bS+'">
'+content+'
';} +layerWrite(txt); +if(olNs4&&bkSet){dpObj=over.document.layers['backdrop'];if(typeof dpObj=='undefined')return; +puObj=over.document.layers['PUContent'];wd=puObj.clip.width;ht=puObj.clip.height;aPos=posStr[0].split(';'); +dpObj.clip.width=wd;dpObj.clip.height=ht;dpObj.left=parseInt(aPos[0].split(':')[1]);dpObj.top=parseInt(aPos[1].split(':')[1]); +dpObj.bgColor=(bkSet==1)?null:o3_shadowcolor;dpObj.background.src=(bkSet==2)?null:o3_shadowimage;dpObj.zIndex=0; +aPos=posStr[1].split(';');puObj.left=parseInt(aPos[0].split(':')[1]);puObj.top=parseInt(aPos[1].split(':')[1]);puObj.zIndex=1; +}else{puObj=(olIe4?o3_frame.document.all['PUContent']:o3_frame.document.getElementById('PUContent'));dpObj=(olIe4?o3_frame.document.all['backdrop']:o3_frame.document.getElementById('backdrop'));ht=puObj.offsetHeight;dpObj.style.height=ht+'px'; +if(o3_shadowopacity){var op=o3_shadowopacity;op=(op<=100?op:100); +setBrowserOpacity(op,dpObj);}} +o3_width=wd+X;o3_aboveheight=ht+Y;} +function cleanUpShadowEffects(){if(olNs4||olOp)return;var dpObj=(olIe4?o3_frame.document.all['backdrop']:o3_frame.document.getElementById('backdrop'));cleanUpBrowserOpacity(dpObj);} +function setBrowserOpacity(op,lyr){if(olNs4||!op)return;lyr=(lyr)?lyr:over;if(olIe4&&typeof lyr.filters!='undefined'){lyr.style.filter='Alpha(Opacity='+op+')';lyr.filters.alpha.enabled=true;}else{var sOp=(typeof(lyr.style.MozOpacity)!='undefined')?'MozOpacity':(typeof(lyr.style.KhtmlOpacity)!='undefined'?'KhtmlOpacity':(typeof(lyr.style.opacity)!='undefined'?'opacity':''));if(sOp)eval('lyr.style.'+sOp+'=op/100');}} +function cleanUpBrowserOpacity(lyr){if(olNs4)return;lyr=(lyr)?lyr:over;if(olIe4&&(typeof lyr.filters!='undefined'&&lyr.filters.alpha.enabled)){lyr.style.filter='Alpha(Opacity=100)';lyr.filters.alpha.enabled=false;}else{var sOp=(typeof(lyr.style.MozOpacity)!='undefined')?'MozOpacity':(typeof(lyr.style.KhtmlOpacity)!='undefined'?'KhtmlOpacity':(typeof(lyr.style.opacity)!='undefined'?'opacity':''));if(sOp)eval('lyr.style.'+sOp+'=1.0');}} +function shadowAdjust(){if(!olNs4)return;var fac=ol_shadowadjust;if(olNs4){document.write('' . PHP_EOL; + } + + // Return + return $html; + } + + private function buildCssRowHeights(Worksheet $sheet, array &$css, int $sheetIndex): void + { + // Calculate row heights + foreach ($sheet->getRowDimensions() as $rowDimension) { + $row = $rowDimension->getRowIndex() - 1; + + // table.sheetN tr.rowYYYYYY { } + $css['table.sheet' . $sheetIndex . ' tr.row' . $row] = []; + + if ($rowDimension->getRowHeight() != -1) { + $pt_height = $rowDimension->getRowHeight(); + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'] = $pt_height . 'pt'; + } + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['visibility'] = 'hidden'; + } + } + } + + private function buildCssPerSheet(Worksheet $sheet, array &$css): void + { + // Calculate hash code + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + // Build styles + // Calculate column widths + $sheet->calculateColumnWidths(); + + // col elements, initialize + $highestColumnIndex = Coordinate::columnIndexFromString($sheet->getHighestColumn()) - 1; + $column = -1; + while ($column++ < $highestColumnIndex) { + $this->columnWidths[$sheetIndex][$column] = 42; // approximation + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = '42pt'; + } + + // col elements, loop through columnDimensions and set width + foreach ($sheet->getColumnDimensions() as $columnDimension) { + $column = Coordinate::columnIndexFromString($columnDimension->getColumnIndex()) - 1; + $width = SharedDrawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont); + $width = SharedDrawing::pixelsToPoints($width); + if ($columnDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' .column' . $column]['display'] = 'none'; + } + if ($width >= 0) { + $this->columnWidths[$sheetIndex][$column] = $width; + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt'; + } + } + + // Default row height + $rowDimension = $sheet->getDefaultRowDimension(); + + // table.sheetN tr { } + $css['table.sheet' . $sheetIndex . ' tr'] = []; + + if ($rowDimension->getRowHeight() == -1) { + $pt_height = SharedFont::getDefaultRowHeightByFont($this->spreadsheet->getDefaultStyle()->getFont()); + } else { + $pt_height = $rowDimension->getRowHeight(); + } + $css['table.sheet' . $sheetIndex . ' tr']['height'] = $pt_height . 'pt'; + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr']['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr']['visibility'] = 'hidden'; + } + + $this->buildCssRowHeights($sheet, $css, $sheetIndex); + } + + /** + * Build CSS styles. + * + * @param bool $generateSurroundingHTML Generate surrounding HTML style? (html { }) + * + * @return array + */ + public function buildCSS($generateSurroundingHTML = true) + { + // Cached? + if ($this->cssStyles !== null) { + return $this->cssStyles; + } + + // Ensure that spans have been calculated + $this->calculateSpans(); + + // Construct CSS + $css = []; + + // Start styles + if ($generateSurroundingHTML) { + // html { } + $css['html']['font-family'] = 'Calibri, Arial, Helvetica, sans-serif'; + $css['html']['font-size'] = '11pt'; + $css['html']['background-color'] = 'white'; + } + + // CSS for comments as found in LibreOffice + $css['a.comment-indicator:hover + div.comment'] = [ + 'background' => '#ffd', + 'position' => 'absolute', + 'display' => 'block', + 'border' => '1px solid black', + 'padding' => '0.5em', + ]; + + $css['a.comment-indicator'] = [ + 'background' => 'red', + 'display' => 'inline-block', + 'border' => '1px solid black', + 'width' => '0.5em', + 'height' => '0.5em', + ]; + + $css['div.comment']['display'] = 'none'; + + // table { } + $css['table']['border-collapse'] = 'collapse'; + + // .b {} + $css['.b']['text-align'] = 'center'; // BOOL + + // .e {} + $css['.e']['text-align'] = 'center'; // ERROR + + // .f {} + $css['.f']['text-align'] = 'right'; // FORMULA + + // .inlineStr {} + $css['.inlineStr']['text-align'] = 'left'; // INLINE + + // .n {} + $css['.n']['text-align'] = 'right'; // NUMERIC + + // .s {} + $css['.s']['text-align'] = 'left'; // STRING + + // Calculate cell style hashes + foreach ($this->spreadsheet->getCellXfCollection() as $index => $style) { + $css['td.style' . $index] = $this->createCSSStyle($style); + $css['th.style' . $index] = $this->createCSSStyle($style); + } + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Build styles per sheet + foreach ($sheets as $sheet) { + $this->buildCssPerSheet($sheet, $css); + } + + // Cache + if ($this->cssStyles === null) { + $this->cssStyles = $css; + } + + // Return + return $css; + } + + /** + * Create CSS style. + * + * @return array + */ + private function createCSSStyle(Style $pStyle) + { + // Create CSS + return array_merge( + $this->createCSSStyleAlignment($pStyle->getAlignment()), + $this->createCSSStyleBorders($pStyle->getBorders()), + $this->createCSSStyleFont($pStyle->getFont()), + $this->createCSSStyleFill($pStyle->getFill()) + ); + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Alignment). + * + * @param Alignment $pStyle \PhpOffice\PhpSpreadsheet\Style\Alignment + * + * @return array + */ + private function createCSSStyleAlignment(Alignment $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['vertical-align'] = $this->mapVAlign($pStyle->getVertical()); + $textAlign = $this->mapHAlign($pStyle->getHorizontal()); + if ($textAlign) { + $css['text-align'] = $textAlign; + if (in_array($textAlign, ['left', 'right'])) { + $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px'; + } + } + + return $css; + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Font). + * + * @return array + */ + private function createCSSStyleFont(Font $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + if ($pStyle->getBold()) { + $css['font-weight'] = 'bold'; + } + if ($pStyle->getUnderline() != Font::UNDERLINE_NONE && $pStyle->getStrikethrough()) { + $css['text-decoration'] = 'underline line-through'; + } elseif ($pStyle->getUnderline() != Font::UNDERLINE_NONE) { + $css['text-decoration'] = 'underline'; + } elseif ($pStyle->getStrikethrough()) { + $css['text-decoration'] = 'line-through'; + } + if ($pStyle->getItalic()) { + $css['font-style'] = 'italic'; + } + + $css['color'] = '#' . $pStyle->getColor()->getRGB(); + $css['font-family'] = '\'' . $pStyle->getName() . '\''; + $css['font-size'] = $pStyle->getSize() . 'pt'; + + return $css; + } + + /** + * Create CSS style (Borders). + * + * @param Borders $pStyle Borders + * + * @return array + */ + private function createCSSStyleBorders(Borders $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['border-bottom'] = $this->createCSSStyleBorder($pStyle->getBottom()); + $css['border-top'] = $this->createCSSStyleBorder($pStyle->getTop()); + $css['border-left'] = $this->createCSSStyleBorder($pStyle->getLeft()); + $css['border-right'] = $this->createCSSStyleBorder($pStyle->getRight()); + + return $css; + } + + /** + * Create CSS style (Border). + * + * @param Border $pStyle Border + * + * @return string + */ + private function createCSSStyleBorder(Border $pStyle) + { + // Create CSS - add !important to non-none border styles for merged cells + $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle()); + + return $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); + } + + /** + * Create CSS style (Fill). + * + * @param Fill $pStyle Fill + * + * @return array + */ + private function createCSSStyleFill(Fill $pStyle) + { + // Construct HTML + $css = []; + + // Create CSS + $value = $pStyle->getFillType() == Fill::FILL_NONE ? + 'white' : '#' . $pStyle->getStartColor()->getRGB(); + $css['background-color'] = $value; + + return $css; + } + + /** + * Generate HTML footer. + */ + public function generateHTMLFooter() + { + // Construct HTML + $html = ''; + $html .= ' ' . PHP_EOL; + $html .= '' . PHP_EOL; + + return $html; + } + + private function generateTableTagInline($pSheet, $id) + { + $style = isset($this->cssStyles['table']) ? + $this->assembleCSS($this->cssStyles['table']) : ''; + + $prntgrid = $pSheet->getPrintGridlines(); + $viewgrid = $this->isPdf ? $prntgrid : $pSheet->getShowGridlines(); + if ($viewgrid && $prntgrid) { + $html = " " . PHP_EOL; + } elseif ($viewgrid) { + $html = "
" . PHP_EOL; + } elseif ($prntgrid) { + $html = "
" . PHP_EOL; + } else { + $html = "
" . PHP_EOL; + } + + return $html; + } + + private function generateTableTag($pSheet, $id, &$html, $sheetIndex): void + { + if (!$this->useInlineCss) { + $gridlines = $pSheet->getShowGridlines() ? ' gridlines' : ''; + $gridlinesp = $pSheet->getPrintGridlines() ? ' gridlinesp' : ''; + $html .= "
" . PHP_EOL; + } else { + $html .= $this->generateTableTagInline($pSheet, $id); + } + } + + /** + * Generate table header. + * + * @param Worksheet $pSheet The worksheet for the table we are writing + * @param bool $showid whether or not to add id to table tag + * + * @return string + */ + private function generateTableHeader($pSheet, $showid = true) + { + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + + // Construct HTML + $html = ''; + $id = $showid ? "id='sheet$sheetIndex'" : ''; + if ($showid) { + $html .= "
\n"; + } else { + $html .= "
\n"; + } + + $this->generateTableTag($pSheet, $id, $html, $sheetIndex); + + // Write
elements + $highestColumnIndex = Coordinate::columnIndexFromString($pSheet->getHighestColumn()) - 1; + $i = -1; + while ($i++ < $highestColumnIndex) { + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) ? + $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : ''; + $html .= ' ' . PHP_EOL; + } + } + + return $html; + } + + /** + * Generate table footer. + */ + private function generateTableFooter() + { + return '
' . PHP_EOL . '' . PHP_EOL; + } + + /** + * Generate row start. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param int $sheetIndex Sheet index (0-based) + * @param int $pRow row number + * + * @return string + */ + private function generateRowStart(Worksheet $pSheet, $sheetIndex, $pRow) + { + $html = ''; + if (count($pSheet->getBreaks()) > 0) { + $breaks = $pSheet->getBreaks(); + + // check if a break is needed before this row + if (isset($breaks['A' . $pRow])) { + // close table: + $html .= $this->generateTableFooter(); + if ($this->isPdf && $this->useInlineCss) { + $html .= '
'; + } + + // open table again: + etc. + $html .= $this->generateTableHeader($pSheet, false); + $html .= '' . PHP_EOL; + } + } + + // Write row start + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) + ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) : ''; + + $html .= ' ' . PHP_EOL; + } + + return $html; + } + + private function generateRowCellCss($pSheet, $cellAddress, $pRow, $colNum) + { + $cell = ($cellAddress > '') ? $pSheet->getCell($cellAddress) : ''; + $coordinate = Coordinate::stringFromColumnIndex($colNum + 1) . ($pRow + 1); + if (!$this->useInlineCss) { + $cssClass = 'column' . $colNum; + } else { + $cssClass = []; + // The statements below do nothing. + // Commenting out the code rather than deleting it + // in case someone can figure out what their intent was. + //if ($cellType == 'th') { + // if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum])) { + // $this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum]; + // } + //} else { + // if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum])) { + // $this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum]; + // } + //} + // End of mystery statements. + } + + return [$cell, $cssClass, $coordinate]; + } + + private function generateRowCellDataValueRich($cell, &$cellData): void + { + // Loop through rich text elements + $elements = $cell->getValue()->getRichTextElements(); + foreach ($elements as $element) { + // Rich text start? + if ($element instanceof Run) { + $cellData .= ''; + + $cellEnd = ''; + if ($element->getFont()->getSuperscript()) { + $cellData .= ''; + $cellEnd = ''; + } elseif ($element->getFont()->getSubscript()) { + $cellData .= ''; + $cellEnd = ''; + } + + // Convert UTF8 data to PCDATA + $cellText = $element->getText(); + $cellData .= htmlspecialchars($cellText); + + $cellData .= $cellEnd; + + $cellData .= ''; + } else { + // Convert UTF8 data to PCDATA + $cellText = $element->getText(); + $cellData .= htmlspecialchars($cellText); + } + } + } + + private function generateRowCellDataValue($pSheet, $cell, &$cellData): void + { + if ($cell->getValue() instanceof RichText) { + $this->generateRowCellDataValueRich($cell, $cellData); + } else { + $origData = $this->preCalculateFormulas ? $cell->getCalculatedValue() : $cell->getValue(); + $cellData = NumberFormat::toFormattedString( + $origData, + $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), + [$this, 'formatColor'] + ); + if ($cellData === $origData) { + $cellData = htmlspecialchars($cellData); + } + if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperscript()) { + $cellData = '' . $cellData . ''; + } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubscript()) { + $cellData = '' . $cellData . ''; + } + } + } + + private function generateRowCellData($pSheet, $cell, &$cssClass, $cellType) + { + $cellData = ' '; + if ($cell instanceof Cell) { + $cellData = ''; + // Don't know what this does, and no test cases. + //if ($cell->getParent() === null) { + // $cell->attach($pSheet); + //} + // Value + $this->generateRowCellDataValue($pSheet, $cell, $cellData); + + // Converts the cell content so that spaces occuring at beginning of each new line are replaced by   + // Example: " Hello\n to the world" is converted to "  Hello\n to the world" + $cellData = preg_replace('/(?m)(?:^|\\G) /', ' ', $cellData); + + // convert newline "\n" to '
' + $cellData = nl2br($cellData); + + // Extend CSS class? + if (!$this->useInlineCss) { + $cssClass .= ' style' . $cell->getXfIndex(); + $cssClass .= ' ' . $cell->getDataType(); + } else { + if ($cellType == 'th') { + if (isset($this->cssStyles['th.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['th.style' . $cell->getXfIndex()]); + } + } else { + if (isset($this->cssStyles['td.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['td.style' . $cell->getXfIndex()]); + } + } + + // General horizontal alignment: Actual horizontal alignment depends on dataType + $sharedStyle = $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex()); + if ($sharedStyle->getAlignment()->getHorizontal() == Alignment::HORIZONTAL_GENERAL + && isset($this->cssStyles['.' . $cell->getDataType()]['text-align']) + ) { + $cssClass['text-align'] = $this->cssStyles['.' . $cell->getDataType()]['text-align']; + } + } + } else { + // Use default borders for empty cell + if (is_string($cssClass)) { + $cssClass .= ' style0'; + } + } + + return $cellData; + } + + private function generateRowIncludeCharts($pSheet, $coordinate) + { + return $this->includeCharts ? $this->writeChartInCell($pSheet, $coordinate) : ''; + } + + private function generateRowSpans($html, $rowSpan, $colSpan) + { + $html .= ($colSpan > 1) ? (' colspan="' . $colSpan . '"') : ''; + $html .= ($rowSpan > 1) ? (' rowspan="' . $rowSpan . '"') : ''; + + return $html; + } + + private function generateRowWriteCell(&$html, $pSheet, $coordinate, $cellType, $cellData, $colSpan, $rowSpan, $cssClass, $colNum, $sheetIndex, $pRow): void + { + // Image? + $htmlx = $this->writeImageInCell($pSheet, $coordinate); + // Chart? + $htmlx .= $this->generateRowIncludeCharts($pSheet, $coordinate); + // Column start + $html .= ' <' . $cellType; + if (!$this->useInlineCss && !$this->isPdf) { + $html .= ' class="' . $cssClass . '"'; + if ($htmlx) { + $html .= " style='position: relative;'"; + } + } else { + //** Necessary redundant code for the sake of \PhpOffice\PhpSpreadsheet\Writer\Pdf ** + // We must explicitly write the width of the + if ($this->useInlineCss) { + $xcssClass = $cssClass; + } else { + $html .= ' class="' . $cssClass . '"'; + $xcssClass = []; + } + $width = 0; + $i = $colNum - 1; + $e = $colNum + $colSpan - 1; + while ($i++ < $e) { + if (isset($this->columnWidths[$sheetIndex][$i])) { + $width += $this->columnWidths[$sheetIndex][$i]; + } + } + $xcssClass['width'] = $width . 'pt'; + + // We must also explicitly write the height of the + if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height'])) { + $height = $this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height']; + $xcssClass['height'] = $height; + } + //** end of redundant code ** + + if ($htmlx) { + $xcssClass['position'] = 'relative'; + } + $html .= ' style="' . $this->assembleCSS($xcssClass) . '"'; + } + $html = $this->generateRowSpans($html, $rowSpan, $colSpan); + + $html .= '>'; + $html .= $htmlx; + + $html .= $this->writeComment($pSheet, $coordinate); + + // Cell data + $html .= $cellData; + + // Column end + $html .= '' . PHP_EOL; + } + + /** + * Generate row. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param array $pValues Array containing cells in a row + * @param int $pRow Row number (0-based) + * @param string $cellType eg: 'td' + * + * @return string + */ + private function generateRow(Worksheet $pSheet, array $pValues, $pRow, $cellType) + { + // Sheet index + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + $html = $this->generateRowStart($pSheet, $sheetIndex, $pRow); + + // Write cells + $colNum = 0; + foreach ($pValues as $cellAddress) { + [$cell, $cssClass, $coordinate] = $this->generateRowCellCss($pSheet, $cellAddress, $pRow, $colNum); + + $colSpan = 1; + $rowSpan = 1; + + // Cell Data + $cellData = $this->generateRowCellData($pSheet, $cell, $cssClass, $cellType); + + // Hyperlink? + if ($pSheet->hyperlinkExists($coordinate) && !$pSheet->getHyperlink($coordinate)->isInternal()) { + $cellData = '' . $cellData . ''; + } + + // Should the cell be written or is it swallowed by a rowspan or colspan? + $writeCell = !(isset($this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]) + && $this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]); + + // Colspan and Rowspan + $colspan = 1; + $rowspan = 1; + if (isset($this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum])) { + $spans = $this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]; + $rowSpan = $spans['rowspan']; + $colSpan = $spans['colspan']; + + // Also apply style from last cell in merge to fix borders - + // relies on !important for non-none border declarations in createCSSStyleBorder + $endCellCoord = Coordinate::stringFromColumnIndex($colNum + $colSpan) . ($pRow + $rowSpan); + if (!$this->useInlineCss) { + $cssClass .= ' style' . $pSheet->getCell($endCellCoord)->getXfIndex(); + } + } + + // Write + if ($writeCell) { + $this->generateRowWriteCell($html, $pSheet, $coordinate, $cellType, $cellData, $colSpan, $rowSpan, $cssClass, $colNum, $sheetIndex, $pRow); + } + + // Next column + ++$colNum; + } + + // Write row end + $html .= ' ' . PHP_EOL; + + // Return + return $html; + } + + /** + * Takes array where of CSS properties / values and converts to CSS string. + * + * @return string + */ + private function assembleCSS(array $pValue = []) + { + $pairs = []; + foreach ($pValue as $property => $value) { + $pairs[] = $property . ':' . $value; + } + $string = implode('; ', $pairs); + + return $string; + } + + /** + * Get images root. + * + * @return string + */ + public function getImagesRoot() + { + return $this->imagesRoot; + } + + /** + * Set images root. + * + * @param string $pValue + * + * @return $this + */ + public function setImagesRoot($pValue) + { + $this->imagesRoot = $pValue; + + return $this; + } + + /** + * Get embed images. + * + * @return bool + */ + public function getEmbedImages() + { + return $this->embedImages; + } + + /** + * Set embed images. + * + * @param bool $pValue + * + * @return $this + */ + public function setEmbedImages($pValue) + { + $this->embedImages = $pValue; + + return $this; + } + + /** + * Get use inline CSS? + * + * @return bool + */ + public function getUseInlineCss() + { + return $this->useInlineCss; + } + + /** + * Set use inline CSS? + * + * @param bool $pValue + * + * @return $this + */ + public function setUseInlineCss($pValue) + { + $this->useInlineCss = $pValue; + + return $this; + } + + /** + * Get use embedded CSS? + * + * @return bool + * + * @codeCoverageIgnore + * + * @deprecated no longer used + */ + public function getUseEmbeddedCSS() + { + return $this->useEmbeddedCSS; + } + + /** + * Set use embedded CSS? + * + * @param bool $pValue + * + * @return $this + * + * @codeCoverageIgnore + * + * @deprecated no longer used + */ + public function setUseEmbeddedCSS($pValue) + { + $this->useEmbeddedCSS = $pValue; + + return $this; + } + + /** + * Add color to formatted string as inline style. + * + * @param string $pValue Plain formatted value without color + * @param string $pFormat Format code + * + * @return string + */ + public function formatColor($pValue, $pFormat) + { + // Color information, e.g. [Red] is always at the beginning + $color = null; // initialize + $matches = []; + + $color_regex = '/^\\[[a-zA-Z]+\\]/'; + if (preg_match($color_regex, $pFormat, $matches)) { + $color = str_replace(['[', ']'], '', $matches[0]); + $color = strtolower($color); + } + + // convert to PCDATA + $value = htmlspecialchars($pValue); + + // color span tag + if ($color !== null) { + $value = '' . $value . ''; + } + + return $value; + } + + /** + * Calculate information about HTML colspan and rowspan which is not always the same as Excel's. + */ + private function calculateSpans(): void + { + if ($this->spansAreCalculated) { + return; + } + // Identify all cells that should be omitted in HTML due to cell merge. + // In HTML only the upper-left cell should be written and it should have + // appropriate rowspan / colspan attribute + $sheetIndexes = $this->sheetIndex !== null ? + [$this->sheetIndex] : range(0, $this->spreadsheet->getSheetCount() - 1); + + foreach ($sheetIndexes as $sheetIndex) { + $sheet = $this->spreadsheet->getSheet($sheetIndex); + + $candidateSpannedRow = []; + + // loop through all Excel merged cells + foreach ($sheet->getMergeCells() as $cells) { + [$cells] = Coordinate::splitRange($cells); + $first = $cells[0]; + $last = $cells[1]; + + [$fc, $fr] = Coordinate::coordinateFromString($first); + $fc = Coordinate::columnIndexFromString($fc) - 1; + + [$lc, $lr] = Coordinate::coordinateFromString($last); + $lc = Coordinate::columnIndexFromString($lc) - 1; + + // loop through the individual cells in the individual merge + $r = $fr - 1; + while ($r++ < $lr) { + // also, flag this row as a HTML row that is candidate to be omitted + $candidateSpannedRow[$r] = $r; + + $c = $fc - 1; + while ($c++ < $lc) { + if (!($c == $fc && $r == $fr)) { + // not the upper-left cell (should not be written in HTML) + $this->isSpannedCell[$sheetIndex][$r][$c] = [ + 'baseCell' => [$fr, $fc], + ]; + } else { + // upper-left is the base cell that should hold the colspan/rowspan attribute + $this->isBaseCell[$sheetIndex][$r][$c] = [ + 'xlrowspan' => $lr - $fr + 1, // Excel rowspan + 'rowspan' => $lr - $fr + 1, // HTML rowspan, value may change + 'xlcolspan' => $lc - $fc + 1, // Excel colspan + 'colspan' => $lc - $fc + 1, // HTML colspan, value may change + ]; + } + } + } + } + + $this->calculateSpansOmitRows($sheet, $sheetIndex, $candidateSpannedRow); + + // TODO: Same for columns + } + + // We have calculated the spans + $this->spansAreCalculated = true; + } + + private function calculateSpansOmitRows($sheet, $sheetIndex, $candidateSpannedRow): void + { + // Identify which rows should be omitted in HTML. These are the rows where all the cells + // participate in a merge and the where base cells are somewhere above. + $countColumns = Coordinate::columnIndexFromString($sheet->getHighestColumn()); + foreach ($candidateSpannedRow as $rowIndex) { + if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { + if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { + $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; + } + } + } + + // For each of the omitted rows we found above, the affected rowspans should be subtracted by 1 + if (isset($this->isSpannedRow[$sheetIndex])) { + foreach ($this->isSpannedRow[$sheetIndex] as $rowIndex) { + $adjustedBaseCells = []; + $c = -1; + $e = $countColumns - 1; + while ($c++ < $e) { + $baseCell = $this->isSpannedCell[$sheetIndex][$rowIndex][$c]['baseCell']; + + if (!in_array($baseCell, $adjustedBaseCells)) { + // subtract rowspan by 1 + --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan']; + $adjustedBaseCells[] = $baseCell; + } + } + } + } + } + + /** + * Write a comment in the same format as LibreOffice. + * + * @see https://github.com/LibreOffice/core/blob/9fc9bf3240f8c62ad7859947ab8a033ac1fe93fa/sc/source/filter/html/htmlexp.cxx#L1073-L1092 + * + * @param string $coordinate + * + * @return string + */ + private function writeComment(Worksheet $pSheet, $coordinate) + { + $result = ''; + if (!$this->isPdf && isset($pSheet->getComments()[$coordinate])) { + $result .= ''; + $result .= '
' . nl2br($pSheet->getComment($coordinate)->getText()->getPlainText()) . '
'; + $result .= PHP_EOL; + } + + return $result; + } + + /** + * Generate @page declarations. + * + * @param bool $generateSurroundingHTML + * + * @return string + */ + private function generatePageDeclarations($generateSurroundingHTML) + { + // Ensure that Spans have been calculated? + $this->calculateSpans(); + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Construct HTML + $htmlPage = $generateSurroundingHTML ? ('' . PHP_EOL) : ''; + + return $htmlPage; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php new file mode 100755 index 0000000..5129d65 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php @@ -0,0 +1,87 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'content' => Content::class, + 'meta' => Meta::class, + 'meta_inf' => MetaInf::class, + 'mimetype' => Mimetype::class, + 'settings' => Settings::class, + 'styles' => Styles::class, + 'thumbnails' => Thumbnails::class, + ]; + + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return null|Ods\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + if (!$this->spreadSheet) { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + + // garbage collect + $this->spreadSheet->garbageCollect(); + + $this->openFileHandle($pFilename); + + $zip = $this->createZip(); + + $zip->addFile('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest()); + $zip->addFile('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail()); + $zip->addFile('content.xml', $this->getWriterPart('content')->write()); + $zip->addFile('meta.xml', $this->getWriterPart('meta')->write()); + $zip->addFile('mimetype', $this->getWriterPart('mimetype')->write()); + $zip->addFile('settings.xml', $this->getWriterPart('settings')->write()); + $zip->addFile('styles.xml', $this->getWriterPart('styles')->write()); + + // Close file + try { + $zip->finish(); + } catch (OverflowException $e) { + throw new WriterException('Could not close resource.'); + } + + $this->maybeCloseFileHandle(); + } + + /** + * Create zip object. + * + * @return ZipStream + */ + private function createZip() + { + // Try opening the ZIP file + if (!is_resource($this->fileHandle)) { + throw new WriterException('Could not open resource for writing.'); + } + + // Create new ZIP stream + $options = new Archive(); + $options->setEnableZip64(false); + $options->setOutputStream($this->fileHandle); + + return new ZipStream(null, $options); + } + + /** + * Get Spreadsheet object. + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No PhpSpreadsheet assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return $this + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php new file mode 100755 index 0000000..b0829bf --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php @@ -0,0 +1,30 @@ + + */ +class Comment +{ + public static function write(XMLWriter $objWriter, Cell $cell): void + { + $comments = $cell->getWorksheet()->getComments(); + if (!isset($comments[$cell->getCoordinate()])) { + return; + } + $comment = $comments[$cell->getCoordinate()]; + + $objWriter->startElement('office:annotation'); + $objWriter->writeAttribute('svg:width', $comment->getWidth()); + $objWriter->writeAttribute('svg:height', $comment->getHeight()); + $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); + $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); + $objWriter->writeElement('dc:creator', $comment->getAuthor()); + $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php new file mode 100755 index 0000000..6588473 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php @@ -0,0 +1,367 @@ + + */ +class Content extends WriterPart +{ + const NUMBER_COLS_REPEATED_MAX = 1024; + const NUMBER_ROWS_REPEATED_MAX = 1048576; + const CELL_STYLE_PREFIX = 'ce'; + + /** + * Write content.xml to XML format. + * + * @return string XML Output + */ + public function write() + { + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-content'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms'); + $objWriter->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0'); + $objWriter->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:scripts'); + $objWriter->writeElement('office:font-face-decls'); + + // Styles XF + $objWriter->startElement('office:automatic-styles'); + $this->writeXfStyles($objWriter, $this->getParentWriter()->getSpreadsheet()); + $objWriter->endElement(); + + $objWriter->startElement('office:body'); + $objWriter->startElement('office:spreadsheet'); + $objWriter->writeElement('table:calculation-settings'); + + $this->writeSheets($objWriter); + + $objWriter->writeElement('table:named-expressions'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write sheets. + */ + private function writeSheets(XMLWriter $objWriter): void + { + $spreadsheet = $this->getParentWriter()->getSpreadsheet(); /** @var Spreadsheet $spreadsheet */ + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->startElement('table:table'); + $objWriter->writeAttribute('table:name', $spreadsheet->getSheet($i)->getTitle()); + $objWriter->writeElement('office:forms'); + $objWriter->startElement('table:table-column'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $this->writeRows($objWriter, $spreadsheet->getSheet($i)); + $objWriter->endElement(); + } + } + + /** + * Write rows of the specified sheet. + */ + private function writeRows(XMLWriter $objWriter, Worksheet $sheet): void + { + $numberRowsRepeated = self::NUMBER_ROWS_REPEATED_MAX; + $span_row = 0; + $rows = $sheet->getRowIterator(); + while ($rows->valid()) { + --$numberRowsRepeated; + $row = $rows->current(); + if ($row->getCellIterator()->valid()) { + if ($span_row) { + $objWriter->startElement('table:table-row'); + if ($span_row > 1) { + $objWriter->writeAttribute('table:number-rows-repeated', $span_row); + } + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $objWriter->endElement(); + $span_row = 0; + } + $objWriter->startElement('table:table-row'); + $this->writeCells($objWriter, $row); + $objWriter->endElement(); + } else { + ++$span_row; + } + $rows->next(); + } + } + + /** + * Write cells of the specified row. + */ + private function writeCells(XMLWriter $objWriter, Row $row): void + { + $numberColsRepeated = self::NUMBER_COLS_REPEATED_MAX; + $prevColumn = -1; + $cells = $row->getCellIterator(); + while ($cells->valid()) { + /** @var \PhpOffice\PhpSpreadsheet\Cell\Cell $cell */ + $cell = $cells->current(); + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + $this->writeCellSpan($objWriter, $column, $prevColumn); + $objWriter->startElement('table:table-cell'); + $this->writeCellMerge($objWriter, $cell); + + // Style XF + $style = $cell->getXfIndex(); + if ($style !== null) { + $objWriter->writeAttribute('table:style-name', self::CELL_STYLE_PREFIX . $style); + } + + switch ($cell->getDataType()) { + case DataType::TYPE_BOOL: + $objWriter->writeAttribute('office:value-type', 'boolean'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_ERROR: + throw new Exception('Writing of error not implemented yet.'); + + break; + case DataType::TYPE_FORMULA: + $formulaValue = $cell->getValue(); + if ($this->getParentWriter()->getPreCalculateFormulas()) { + try { + $formulaValue = $cell->getCalculatedValue(); + } catch (Exception $e) { + // don't do anything + } + } + $objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue()); + if (is_numeric($formulaValue)) { + $objWriter->writeAttribute('office:value-type', 'float'); + } else { + $objWriter->writeAttribute('office:value-type', 'string'); + } + $objWriter->writeAttribute('office:value', $formulaValue); + $objWriter->writeElement('text:p', $formulaValue); + + break; + case DataType::TYPE_INLINE: + throw new Exception('Writing of inline not implemented yet.'); + + break; + case DataType::TYPE_NUMERIC: + $objWriter->writeAttribute('office:value-type', 'float'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_STRING: + $objWriter->writeAttribute('office:value-type', 'string'); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + } + Comment::write($objWriter, $cell); + $objWriter->endElement(); + $prevColumn = $column; + $cells->next(); + } + $numberColsRepeated = $numberColsRepeated - $prevColumn - 1; + if ($numberColsRepeated > 0) { + if ($numberColsRepeated > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $numberColsRepeated); + $objWriter->endElement(); + } else { + $objWriter->writeElement('table:table-cell'); + } + } + } + + /** + * Write span. + * + * @param int $curColumn + * @param int $prevColumn + */ + private function writeCellSpan(XMLWriter $objWriter, $curColumn, $prevColumn): void + { + $diff = $curColumn - $prevColumn - 1; + if (1 === $diff) { + $objWriter->writeElement('table:table-cell'); + } elseif ($diff > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $diff); + $objWriter->endElement(); + } + } + + /** + * Write XF cell styles. + */ + private function writeXfStyles(XMLWriter $writer, Spreadsheet $spreadsheet): void + { + foreach ($spreadsheet->getCellXfCollection() as $style) { + $writer->startElement('style:style'); + $writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX . $style->getIndex()); + $writer->writeAttribute('style:family', 'table-cell'); + $writer->writeAttribute('style:parent-style-name', 'Default'); + + // style:text-properties + + // Font + $writer->startElement('style:text-properties'); + + $font = $style->getFont(); + + if ($font->getBold()) { + $writer->writeAttribute('fo:font-weight', 'bold'); + $writer->writeAttribute('style:font-weight-complex', 'bold'); + $writer->writeAttribute('style:font-weight-asian', 'bold'); + } + + if ($font->getItalic()) { + $writer->writeAttribute('fo:font-style', 'italic'); + } + + if ($color = $font->getColor()) { + $writer->writeAttribute('fo:color', sprintf('#%s', $color->getRGB())); + } + + if ($family = $font->getName()) { + $writer->writeAttribute('fo:font-family', $family); + } + + if ($size = $font->getSize()) { + $writer->writeAttribute('fo:font-size', sprintf('%.1Fpt', $size)); + } + + if ($font->getUnderline() && $font->getUnderline() != Font::UNDERLINE_NONE) { + $writer->writeAttribute('style:text-underline-style', 'solid'); + $writer->writeAttribute('style:text-underline-width', 'auto'); + $writer->writeAttribute('style:text-underline-color', 'font-color'); + + switch ($font->getUnderline()) { + case Font::UNDERLINE_DOUBLE: + $writer->writeAttribute('style:text-underline-type', 'double'); + + break; + case Font::UNDERLINE_SINGLE: + $writer->writeAttribute('style:text-underline-type', 'single'); + + break; + } + } + + $writer->endElement(); // Close style:text-properties + + // style:table-cell-properties + + $writer->startElement('style:table-cell-properties'); + $writer->writeAttribute('style:rotation-align', 'none'); + + // Fill + if ($fill = $style->getFill()) { + switch ($fill->getFillType()) { + case Fill::FILL_SOLID: + $writer->writeAttribute('fo:background-color', sprintf( + '#%s', + strtolower($fill->getStartColor()->getRGB()) + )); + + break; + case Fill::FILL_GRADIENT_LINEAR: + case Fill::FILL_GRADIENT_PATH: + /// TODO :: To be implemented + break; + case Fill::FILL_NONE: + default: + } + } + + $writer->endElement(); // Close style:table-cell-properties + + // End + + $writer->endElement(); // Close style:style + } + } + + /** + * Write attributes for merged cell. + */ + private function writeCellMerge(XMLWriter $objWriter, Cell $cell): void + { + if (!$cell->isMergeRangeValueCell()) { + return; + } + + $mergeRange = Coordinate::splitRange($cell->getMergeRange()); + [$startCell, $endCell] = $mergeRange[0]; + $start = Coordinate::coordinateFromString($startCell); + $end = Coordinate::coordinateFromString($endCell); + $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1; + $rowSpan = $end[1] - $start[1] + 1; + + $objWriter->writeAttribute('table:number-columns-spanned', $columnSpan); + $objWriter->writeAttribute('table:number-rows-spanned', $rowSpan); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php new file mode 100755 index 0000000..365221f --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php @@ -0,0 +1,75 @@ +getParentWriter()->getSpreadsheet(); + } + + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Meta + $objWriter->startElement('office:document-meta'); + + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:meta'); + + $objWriter->writeElement('meta:initial-creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + $keywords = explode(' ', $spreadsheet->getProperties()->getKeywords()); + foreach ($keywords as $keyword) { + $objWriter->writeElement('meta:keyword', $keyword); + } + + // + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'Company'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCompany()); + $objWriter->endElement(); + + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'category'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCategory()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php new file mode 100755 index 0000000..c9085cf --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php @@ -0,0 +1,60 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Manifest + $objWriter->startElement('manifest:manifest'); + $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); + $objWriter->writeAttribute('manifest:version', '1.2'); + + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', '/'); + $objWriter->writeAttribute('manifest:version', '1.2'); + $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'content.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); + $objWriter->writeAttribute('manifest:media-type', 'image/png'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php new file mode 100755 index 0000000..4aac368 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php @@ -0,0 +1,20 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Settings + $objWriter->startElement('office:document-settings'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:settings'); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:view-settings'); + $objWriter->startElement('config:config-item-map-indexed'); + $objWriter->writeAttribute('config:name', 'Views'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:configuration-settings'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php new file mode 100755 index 0000000..7ba7eba --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php @@ -0,0 +1,68 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-styles'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:font-face-decls'); + $objWriter->writeElement('office:styles'); + $objWriter->writeElement('office:automatic-styles'); + $objWriter->writeElement('office:master-styles'); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php new file mode 100755 index 0000000..dfab065 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php @@ -0,0 +1,20 @@ +parentWriter; + } + + /** + * Set parent Ods writer. + */ + public function __construct(Ods $writer) + { + $this->parentWriter = $writer; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php new file mode 100755 index 0000000..8722045 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php @@ -0,0 +1,253 @@ + 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_LETTER_SMALL => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_TABLOID => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_LEDGER => [1224.00, 792.00], // (17 in. by 11 in.) + PageSetup::PAPERSIZE_LEGAL => 'LEGAL', // (8.5 in. by 14 in.) + PageSetup::PAPERSIZE_STATEMENT => [396.00, 612.00], // (5.5 in. by 8.5 in.) + PageSetup::PAPERSIZE_EXECUTIVE => 'EXECUTIVE', // (7.25 in. by 10.5 in.) + PageSetup::PAPERSIZE_A3 => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A4 => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A4_SMALL => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A5 => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5 => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_FOLIO => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_QUARTO => [609.45, 779.53], // (215 mm by 275 mm) + PageSetup::PAPERSIZE_STANDARD_1 => [720.00, 1008.00], // (10 in. by 14 in.) + PageSetup::PAPERSIZE_STANDARD_2 => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_NOTE => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_NO9_ENVELOPE => [279.00, 639.00], // (3.875 in. by 8.875 in.) + PageSetup::PAPERSIZE_NO10_ENVELOPE => [297.00, 684.00], // (4.125 in. by 9.5 in.) + PageSetup::PAPERSIZE_NO11_ENVELOPE => [324.00, 747.00], // (4.5 in. by 10.375 in.) + PageSetup::PAPERSIZE_NO12_ENVELOPE => [342.00, 792.00], // (4.75 in. by 11 in.) + PageSetup::PAPERSIZE_NO14_ENVELOPE => [360.00, 828.00], // (5 in. by 11.5 in.) + PageSetup::PAPERSIZE_C => [1224.00, 1584.00], // (17 in. by 22 in.) + PageSetup::PAPERSIZE_D => [1584.00, 2448.00], // (22 in. by 34 in.) + PageSetup::PAPERSIZE_E => [2448.00, 3168.00], // (34 in. by 44 in.) + PageSetup::PAPERSIZE_DL_ENVELOPE => [311.81, 623.62], // (110 mm by 220 mm) + PageSetup::PAPERSIZE_C5_ENVELOPE => 'C5', // (162 mm by 229 mm) + PageSetup::PAPERSIZE_C3_ENVELOPE => 'C3', // (324 mm by 458 mm) + PageSetup::PAPERSIZE_C4_ENVELOPE => 'C4', // (229 mm by 324 mm) + PageSetup::PAPERSIZE_C6_ENVELOPE => 'C6', // (114 mm by 162 mm) + PageSetup::PAPERSIZE_C65_ENVELOPE => [323.15, 649.13], // (114 mm by 229 mm) + PageSetup::PAPERSIZE_B4_ENVELOPE => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5_ENVELOPE => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_B6_ENVELOPE => [498.90, 354.33], // (176 mm by 125 mm) + PageSetup::PAPERSIZE_ITALY_ENVELOPE => [311.81, 651.97], // (110 mm by 230 mm) + PageSetup::PAPERSIZE_MONARCH_ENVELOPE => [279.00, 540.00], // (3.875 in. by 7.5 in.) + PageSetup::PAPERSIZE_6_3_4_ENVELOPE => [261.00, 468.00], // (3.625 in. by 6.5 in.) + PageSetup::PAPERSIZE_US_STANDARD_FANFOLD => [1071.00, 792.00], // (14.875 in. by 11 in.) + PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD => [612.00, 864.00], // (8.5 in. by 12 in.) + PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_ISO_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD => [566.93, 419.53], // (200 mm by 148 mm) + PageSetup::PAPERSIZE_STANDARD_PAPER_1 => [648.00, 792.00], // (9 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_2 => [720.00, 792.00], // (10 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_3 => [1080.00, 792.00], // (15 in. by 11 in.) + PageSetup::PAPERSIZE_INVITE_ENVELOPE => [623.62, 623.62], // (220 mm by 220 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER => [667.80, 1080.00], // (9.275 in. by 15 in.) + PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER => [841.68, 1296.00], // (11.69 in. by 18 in.) + PageSetup::PAPERSIZE_A4_EXTRA_PAPER => [668.98, 912.76], // (236 mm by 322 mm) + PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER => [595.80, 792.00], // (8.275 in. by 11 in.) + PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER => [643.46, 1009.13], // (227 mm by 356 mm) + PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER => [864.57, 1380.47], // (305 mm by 487 mm) + PageSetup::PAPERSIZE_LETTER_PLUS_PAPER => [612.00, 913.68], // (8.5 in. by 12.69 in.) + PageSetup::PAPERSIZE_A4_PLUS_PAPER => [595.28, 935.43], // (210 mm by 330 mm) + PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER => [515.91, 728.50], // (182 mm by 257 mm) + PageSetup::PAPERSIZE_A3_EXTRA_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + PageSetup::PAPERSIZE_A5_EXTRA_PAPER => [493.23, 666.14], // (174 mm by 235 mm) + PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER => [569.76, 782.36], // (201 mm by 276 mm) + PageSetup::PAPERSIZE_A2_PAPER => 'A2', // (420 mm by 594 mm) + PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + ]; + + /** + * Create a new PDF Writer instance. + * + * @param Spreadsheet $spreadsheet Spreadsheet object + */ + public function __construct(Spreadsheet $spreadsheet) + { + parent::__construct($spreadsheet); + //$this->setUseInlineCss(true); + $this->tempDir = File::sysGetTempDir() . '/phpsppdf'; + $this->isPdf = true; + } + + /** + * Get Font. + * + * @return string + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. Examples: + * 'arialunicid0-chinese-simplified' + * 'arialunicid0-chinese-traditional' + * 'arialunicid0-korean' + * 'arialunicid0-japanese'. + * + * @param string $fontName + * + * @return $this + */ + public function setFont($fontName) + { + $this->font = $fontName; + + return $this; + } + + /** + * Get Paper Size. + * + * @return int + */ + public function getPaperSize() + { + return $this->paperSize; + } + + /** + * Set Paper Size. + * + * @param string $pValue Paper size see PageSetup::PAPERSIZE_* + * + * @return self + */ + public function setPaperSize($pValue) + { + $this->paperSize = $pValue; + + return $this; + } + + /** + * Get Orientation. + * + * @return string + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Set Orientation. + * + * @param string $pValue Page orientation see PageSetup::ORIENTATION_* + * + * @return self + */ + public function setOrientation($pValue) + { + $this->orientation = $pValue; + + return $this; + } + + /** + * Get temporary storage directory. + * + * @return string + */ + public function getTempDir() + { + return $this->tempDir; + } + + /** + * Set temporary storage directory. + * + * @param string $pValue Temporary storage directory + * + * @return self + */ + public function setTempDir($pValue) + { + if (is_dir($pValue)) { + $this->tempDir = $pValue; + } else { + throw new WriterException("Directory does not exist: $pValue"); + } + + return $this; + } + + /** + * Save Spreadsheet to PDF file, pre-save. + * + * @param string $pFilename Name of the file to save as + * + * @return resource + */ + protected function prepareForSave($pFilename) + { + // Open file + $this->openFileHandle($pFilename); + + return $this->fileHandle; + } + + /** + * Save PhpSpreadsheet to PDF file, post-save. + */ + protected function restoreStateAfterSave(): void + { + $this->maybeCloseFileHandle(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php new file mode 100755 index 0000000..9ae2cce --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php @@ -0,0 +1,72 @@ +getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + + $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance(); + $pdf->setPaper(strtolower($paperSize), $orientation); + + $pdf->loadHtml($this->generateHTMLAll()); + $pdf->render(); + + // Write to file + fwrite($fileHandle, $pdf->output()); + + parent::restoreStateAfterSave(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php new file mode 100755 index 0000000..75e0010 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php @@ -0,0 +1,106 @@ +getSheetIndex()) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + $this->setOrientation($orientation); + + // Override Page Orientation + if (null !== $this->getOrientation()) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + $orientation = strtoupper($orientation); + + // Override Paper Size + if (null !== $this->getPaperSize()) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $config = ['tempDir' => $this->tempDir . '/mpdf']; + $pdf = $this->createExternalWriterInstance($config); + $ortmp = $orientation; + $pdf->_setPageSize(strtoupper($paperSize), $ortmp); + $pdf->DefOrientation = $orientation; + $pdf->AddPageByArray([ + 'orientation' => $orientation, + 'margin-left' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getLeft()), + 'margin-right' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getRight()), + 'margin-top' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getTop()), + 'margin-bottom' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getBottom()), + ]); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + $html = $this->generateHTMLAll(); + foreach (\array_chunk(\explode(PHP_EOL, $html), 1000) as $lines) { + $pdf->WriteHTML(\implode(PHP_EOL, $lines)); + } + + // Write to file + fwrite($fileHandle, $pdf->Output('', 'S')); + + parent::restoreStateAfterSave(); + } + + /** + * Convert inches to mm. + * + * @param float $inches + * + * @return float + */ + private function inchesToMm($inches) + { + return $inches * 25.4; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php new file mode 100755 index 0000000..7530b1e --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php @@ -0,0 +1,104 @@ +setUseInlineCss(true); + } + + /** + * Gets the implementation of external PDF library that should be used. + * + * @param string $orientation Page orientation + * @param string $unit Unit measure + * @param string $paperSize Paper size + * + * @return \TCPDF implementation + */ + protected function createExternalWriterInstance($orientation, $unit, $paperSize) + { + return new \TCPDF($orientation, $unit, $paperSize); + } + + /** + * Save Spreadsheet to file. + * + * @param string $pFilename Name of the file to save as + */ + public function save($pFilename): void + { + $fileHandle = parent::prepareForSave($pFilename); + + // Default PDF paper size + $paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.) + + // Check for paper size and page orientation + if ($this->getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet(0)->getPageMargins(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageMargins(); + } + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) + ? 'L' + : 'P'; + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance($orientation, 'pt', $paperSize); + $pdf->setFontSubsetting(false); + // Set margins, converting inches to points (using 72 dpi) + $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72); + $pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72); + + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + + $pdf->AddPage(); + + // Set the appropriate font + $pdf->SetFont($this->getFont()); + $pdf->writeHTML($this->generateHTMLAll()); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + // Write to file + fwrite($fileHandle, $pdf->output($pFilename, 'S')); + + parent::restoreStateAfterSave(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php new file mode 100755 index 0000000..4f4b256 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php @@ -0,0 +1,901 @@ +spreadsheet = $spreadsheet; + + $this->parser = new Xls\Parser(); + } + + /** + * Save Spreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // initialize colors array + $this->colors = []; + + // Initialise workbook writer + $this->writerWorkbook = new Xls\Workbook($this->spreadsheet, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser); + + // Initialise worksheet writers + $countSheets = $this->spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i] = new Xls\Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->spreadsheet->getSheet($i)); + } + + // build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook. + $this->buildWorksheetEschers(); + $this->buildWorkbookEscher(); + + // add 15 identical cell style Xfs + // for now, we use the first cellXf instead of cellStyleXf + $cellXfCollection = $this->spreadsheet->getCellXfCollection(); + for ($i = 0; $i < 15; ++$i) { + $this->writerWorkbook->addXfWriter($cellXfCollection[0], true); + } + + // add all the cell Xfs + foreach ($this->spreadsheet->getCellXfCollection() as $style) { + $this->writerWorkbook->addXfWriter($style, false); + } + + // add fonts from rich text eleemnts + for ($i = 0; $i < $countSheets; ++$i) { + foreach ($this->writerWorksheets[$i]->phpSheet->getCoordinates() as $coordinate) { + $cell = $this->writerWorksheets[$i]->phpSheet->getCell($coordinate); + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + if ($element instanceof Run) { + $font = $element->getFont(); + $this->writerWorksheets[$i]->fontHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font); + } + } + } + } + } + + // initialize OLE file + $workbookStreamName = 'Workbook'; + $OLE = new File(OLE::ascToUcs($workbookStreamName)); + + // Write the worksheet streams before the global workbook stream, + // because the byte sizes of these are needed in the global workbook stream + $worksheetSizes = []; + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i]->close(); + $worksheetSizes[] = $this->writerWorksheets[$i]->_datasize; + } + + // add binary data for global workbook stream + $OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes)); + + // add binary data for sheet streams + for ($i = 0; $i < $countSheets; ++$i) { + $OLE->append($this->writerWorksheets[$i]->getData()); + } + + $this->documentSummaryInformation = $this->writeDocumentSummaryInformation(); + // initialize OLE Document Summary Information + if (isset($this->documentSummaryInformation) && !empty($this->documentSummaryInformation)) { + $OLE_DocumentSummaryInformation = new File(OLE::ascToUcs(chr(5) . 'DocumentSummaryInformation')); + $OLE_DocumentSummaryInformation->append($this->documentSummaryInformation); + } + + $this->summaryInformation = $this->writeSummaryInformation(); + // initialize OLE Summary Information + if (isset($this->summaryInformation) && !empty($this->summaryInformation)) { + $OLE_SummaryInformation = new File(OLE::ascToUcs(chr(5) . 'SummaryInformation')); + $OLE_SummaryInformation->append($this->summaryInformation); + } + + // define OLE Parts + $arrRootData = [$OLE]; + // initialize OLE Properties file + if (isset($OLE_SummaryInformation)) { + $arrRootData[] = $OLE_SummaryInformation; + } + // initialize OLE Extended Properties file + if (isset($OLE_DocumentSummaryInformation)) { + $arrRootData[] = $OLE_DocumentSummaryInformation; + } + + $root = new Root(time(), time(), $arrRootData); + // save the OLE file + $this->openFileHandle($pFilename); + $root->save($this->fileHandle); + $this->maybeCloseFileHandle(); + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Build the Worksheet Escher objects. + */ + private function buildWorksheetEschers(): void + { + // 1-based index to BstoreContainer + $blipIndex = 0; + $lastReducedSpId = 0; + $lastSpId = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + // sheet index + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + $escher = null; + + // check if there are any shapes for this sheet + $filterRange = $sheet->getAutoFilter()->getRange(); + if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) { + continue; + } + + // create intermediate Escher object + $escher = new Escher(); + + // dgContainer + $dgContainer = new DgContainer(); + + // set the drawing index (we use sheet index + 1) + $dgId = $sheet->getParent()->getIndex($sheet) + 1; + $dgContainer->setDgId($dgId); + $escher->setDgContainer($dgContainer); + + // spgrContainer + $spgrContainer = new SpgrContainer(); + $dgContainer->setSpgrContainer($spgrContainer); + + // add one shape which is the group shape + $spContainer = new SpContainer(); + $spContainer->setSpgr(true); + $spContainer->setSpType(0); + $spContainer->setSpId(($sheet->getParent()->getIndex($sheet) + 1) << 10); + $spgrContainer->addChild($spContainer); + + // add the shapes + + $countShapes[$sheetIndex] = 0; // count number of shapes (minus group shape), in sheet + + foreach ($sheet->getDrawingCollection() as $drawing) { + ++$blipIndex; + + ++$countShapes[$sheetIndex]; + + // add the shape + $spContainer = new SpContainer(); + + // set the shape type + $spContainer->setSpType(0x004B); + // set the shape flag + $spContainer->setSpFlag(0x02); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + // set the BLIP index + $spContainer->setOPT(0x4104, $blipIndex); + + // set coordinates and offsets, client anchor + $coordinates = $drawing->getCoordinates(); + $offsetX = $drawing->getOffsetX(); + $offsetY = $drawing->getOffsetY(); + $width = $drawing->getWidth(); + $height = $drawing->getHeight(); + + $twoAnchor = \PhpOffice\PhpSpreadsheet\Shared\Xls::oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height); + + $spContainer->setStartCoordinates($twoAnchor['startCoordinates']); + $spContainer->setStartOffsetX($twoAnchor['startOffsetX']); + $spContainer->setStartOffsetY($twoAnchor['startOffsetY']); + $spContainer->setEndCoordinates($twoAnchor['endCoordinates']); + $spContainer->setEndOffsetX($twoAnchor['endOffsetX']); + $spContainer->setEndOffsetY($twoAnchor['endOffsetY']); + + $spgrContainer->addChild($spContainer); + } + + // AutoFilters + if (!empty($filterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($filterRange); + $iNumColStart = $rangeBounds[0][0]; + $iNumColEnd = $rangeBounds[1][0]; + + $iInc = $iNumColStart; + while ($iInc <= $iNumColEnd) { + ++$countShapes[$sheetIndex]; + + // create an Drawing Object for the dropdown + $oDrawing = new BaseDrawing(); + // get the coordinates of drawing + $cDrawing = Coordinate::stringFromColumnIndex($iInc) . $rangeBounds[0][1]; + $oDrawing->setCoordinates($cDrawing); + $oDrawing->setWorksheet($sheet); + + // add the shape + $spContainer = new SpContainer(); + // set the shape type + $spContainer->setSpType(0x00C9); + // set the shape flag + $spContainer->setSpFlag(0x01); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + $spContainer->setOPT(0x007F, 0x01040104); // Protection -> fLockAgainstGrouping + $spContainer->setOPT(0x00BF, 0x00080008); // Text -> fFitTextToShape + $spContainer->setOPT(0x01BF, 0x00010000); // Fill Style -> fNoFillHitTest + $spContainer->setOPT(0x01FF, 0x00080000); // Line Style -> fNoLineDrawDash + $spContainer->setOPT(0x03BF, 0x000A0000); // Group Shape -> fPrint + + // set coordinates and offsets, client anchor + $endCoordinates = Coordinate::stringFromColumnIndex($iInc); + $endCoordinates .= $rangeBounds[0][1] + 1; + + $spContainer->setStartCoordinates($cDrawing); + $spContainer->setStartOffsetX(0); + $spContainer->setStartOffsetY(0); + $spContainer->setEndCoordinates($endCoordinates); + $spContainer->setEndOffsetX(0); + $spContainer->setEndOffsetY(0); + + $spgrContainer->addChild($spContainer); + ++$iInc; + } + } + + // identifier clusters, used for workbook Escher object + $this->IDCLs[$dgId] = $lastReducedSpId; + + // set last shape index + $dgContainer->setLastSpId($lastSpId); + + // set the Escher object + $this->writerWorksheets[$sheetIndex]->setEscher($escher); + } + } + + private function processMemoryDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing, string $renderingFunctionx): void + { + switch ($renderingFunctionx) { + case MemoryDrawing::RENDERING_JPEG: + $blipType = BSE::BLIPTYPE_JPEG; + $renderingFunction = 'imagejpeg'; + + break; + default: + $blipType = BSE::BLIPTYPE_PNG; + $renderingFunction = 'imagepng'; + + break; + } + + ob_start(); + call_user_func($renderingFunction, $drawing->getImageResource()); + $blipData = ob_get_contents(); + ob_end_clean(); + + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } + + private function processDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void + { + $blipData = ''; + $filename = $drawing->getPath(); + + [$imagesx, $imagesy, $imageFormat] = getimagesize($filename); + + switch ($imageFormat) { + case 1: // GIF, not supported by BIFF8, we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(imagecreatefromgif($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + case 2: // JPEG + $blipType = BSE::BLIPTYPE_JPEG; + $blipData = file_get_contents($filename); + + break; + case 3: // PNG + $blipType = BSE::BLIPTYPE_PNG; + $blipData = file_get_contents($filename); + + break; + case 6: // Windows DIB (BMP), we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(SharedDrawing::imagecreatefrombmp($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + } + if ($blipData) { + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } + } + + private function processBaseDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void + { + if ($drawing instanceof Drawing) { + $this->processDrawing($bstoreContainer, $drawing); + } elseif ($drawing instanceof MemoryDrawing) { + $this->processMemoryDrawing($bstoreContainer, $drawing, $drawing->getRenderingFunction()); + } + } + + private function checkForDrawings(): bool + { + // any drawings in this workbook? + $found = false; + foreach ($this->spreadsheet->getAllSheets() as $sheet) { + if (count($sheet->getDrawingCollection()) > 0) { + $found = true; + + break; + } + } + + return $found; + } + + /** + * Build the Escher object corresponding to the MSODRAWINGGROUP record. + */ + private function buildWorkbookEscher(): void + { + // nothing to do if there are no drawings + if (!$this->checkForDrawings()) { + return; + } + + // if we reach here, then there are drawings in the workbook + $escher = new Escher(); + + // dggContainer + $dggContainer = new DggContainer(); + $escher->setDggContainer($dggContainer); + + // set IDCLs (identifier clusters) + $dggContainer->setIDCLs($this->IDCLs); + + // this loop is for determining maximum shape identifier of all drawing + $spIdMax = 0; + $totalCountShapes = 0; + $countDrawings = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet + + $addCount = 0; + foreach ($sheet->getDrawingCollection() as $drawing) { + $addCount = 1; + ++$sheetCountShapes; + ++$totalCountShapes; + + $spId = $sheetCountShapes | ($this->spreadsheet->getIndex($sheet) + 1) << 10; + $spIdMax = max($spId, $spIdMax); + } + $countDrawings += $addCount; + } + + $dggContainer->setSpIdMax($spIdMax + 1); + $dggContainer->setCDgSaved($countDrawings); + $dggContainer->setCSpSaved($totalCountShapes + $countDrawings); // total number of shapes incl. one group shapes per drawing + + // bstoreContainer + $bstoreContainer = new BstoreContainer(); + $dggContainer->setBstoreContainer($bstoreContainer); + + // the BSE's (all the images) + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + foreach ($sheet->getDrawingCollection() as $drawing) { + $this->processBaseDrawing($bstoreContainer, $drawing); + } + } + + // Set the Escher object + $this->writerWorkbook->setEscher($escher); + } + + /** + * Build the OLE Part for DocumentSummary Information. + * + * @return string + */ + private function writeDocumentSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae + $data .= pack('vvvvvvvv', 0xD502, 0xD5CD, 0x2E9C, 0x101B, 0x9793, 0x0008, 0x2C2B, 0xAEF9); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // GKPIDDSI_CODEPAGE: CodePage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_CATEGORY : Category + $dataProp = $this->spreadsheet->getProperties()->getCategory(); + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x02], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // GKPIDDSI_VERSION :Version of the application that wrote the property storage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x17], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], + 'data' => ['pack' => 'V', 'data' => 0x000C0000], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SCALE : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0B], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x10], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SHAREDOC : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x16], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_DOCSPARTS + // MS-OSHARED p75 (2.3.3.2.2.1) + // Structure is VtVecUnalignedLpstrValue (2.3.3.1.9) + // cElements + $dataProp = pack('v', 0x0001); + $dataProp .= pack('v', 0x0000); + // array of UnalignedLpstr + // cch + $dataProp .= pack('v', 0x000A); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Worksheet' . chr(0); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0D], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x101E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_HEADINGPAIR + // VtVecHeadingPairValue + // cElements + $dataProp = pack('v', 0x0002); + $dataProp .= pack('v', 0x0000); + // Array of vtHeadingPair + // vtUnalignedString - headingString + // stringType + $dataProp .= pack('v', 0x001E); + // padding + $dataProp .= pack('v', 0x0000); + // UnalignedLpstr + // cch + $dataProp .= pack('v', 0x0013); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Feuilles de calcul'; + // vtUnalignedString - headingParts + // wType : 0x0003 = 32 bit signed integer + $dataProp .= pack('v', 0x0300); + // padding + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= pack('v', 0x0100); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0C], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x100C], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x0B) { // Boolean + $dataSection_Content .= pack('V', (int) $dataProp['data']['data']); + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + ++$dataProp['data']['length']; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + // Condition below can never be true + //} elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // $dataSection_Content .= $dataProp['data']['data']; + + // $dataSection_Content_Offset += 4 + 8; + } else { + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + $dataProp['data']['length']; + } + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } + + private function writeSummaryPropOle(int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void + { + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => $sumdata], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length + 'data' => ['data' => OLE::localDateToOLE($dataProp)], + ]; + ++$dataSection_NumProps; + } + } + + private function writeSummaryProp(string $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void + { + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => $sumdata], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + } + + /** + * Build the OLE Part for Summary Information. + * + * @return string + */ + private function writeSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 + $data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // CodePage : CP-1252 + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + $props = $this->spreadsheet->getProperties(); + $this->writeSummaryProp($props->getTitle(), $dataSection_NumProps, $dataSection, 0x02, 0x1e); + $this->writeSummaryProp($props->getSubject(), $dataSection_NumProps, $dataSection, 0x03, 0x1e); + $this->writeSummaryProp($props->getCreator(), $dataSection_NumProps, $dataSection, 0x04, 0x1e); + $this->writeSummaryProp($props->getKeywords(), $dataSection_NumProps, $dataSection, 0x05, 0x1e); + $this->writeSummaryProp($props->getDescription(), $dataSection_NumProps, $dataSection, 0x06, 0x1e); + $this->writeSummaryProp($props->getLastModifiedBy(), $dataSection_NumProps, $dataSection, 0x08, 0x1e); + $this->writeSummaryPropOle($props->getCreated(), $dataSection_NumProps, $dataSection, 0x0c, 0x40); + $this->writeSummaryPropOle($props->getModified(), $dataSection_NumProps, $dataSection, 0x0d, 0x40); + + // Security + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], // 4 byte signed integer + 'data' => ['data' => 0x00], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + ++$dataProp['data']['length']; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 8; + } + // Data Type Not Used at the moment + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php new file mode 100755 index 0000000..84e27d0 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php @@ -0,0 +1,224 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class BIFFwriter +{ + /** + * The byte order of this architecture. 0 => little endian, 1 => big endian. + * + * @var int + */ + private static $byteOrder; + + /** + * The string containing the data of the BIFF stream. + * + * @var string + */ + public $_data; + + /** + * The size of the data in bytes. Should be the same as strlen($this->_data). + * + * @var int + */ + public $_datasize; + + /** + * The maximum length for a BIFF record (excluding record header and length field). See addContinue(). + * + * @var int + * + * @see addContinue() + */ + private $limit = 8224; + + /** + * Constructor. + */ + public function __construct() + { + $this->_data = ''; + $this->_datasize = 0; + } + + /** + * Determine the byte order and store it as class data to avoid + * recalculating it for each call to new(). + * + * @return int + */ + public static function getByteOrder() + { + if (!isset(self::$byteOrder)) { + // Check if "pack" gives the required IEEE 64bit float + $teststr = pack('d', 1.2345); + $number = pack('C8', 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); + if ($number == $teststr) { + $byte_order = 0; // Little Endian + } elseif ($number == strrev($teststr)) { + $byte_order = 1; // Big Endian + } else { + // Give up. I'll fix this in a later version. + throw new WriterException('Required floating point format not supported on this platform.'); + } + self::$byteOrder = $byte_order; + } + + return self::$byteOrder; + } + + /** + * General storage function. + * + * @param string $data binary data to append + */ + protected function append($data): void + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_data .= $data; + $this->_datasize += strlen($data); + } + + /** + * General storage function like append, but returns string instead of modifying $this->_data. + * + * @param string $data binary data to write + * + * @return string + */ + public function writeData($data) + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_datasize += strlen($data); + + return $data; + } + + /** + * Writes Excel BOF record to indicate the beginning of a stream or + * sub-stream in the BIFF file. + * + * @param int $type type of BIFF file to write: 0x0005 Workbook, + * 0x0010 Worksheet + */ + protected function storeBof($type): void + { + $record = 0x0809; // Record identifier (BIFF5-BIFF8) + $length = 0x0010; + + // by inspection of real files, MS Office Excel 2007 writes the following + $unknown = pack('VV', 0x000100D1, 0x00000406); + + $build = 0x0DBB; // Excel 97 + $year = 0x07CC; // Excel 97 + + $version = 0x0600; // BIFF8 + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $version, $type, $build, $year); + $this->append($header . $data . $unknown); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + protected function storeEof(): void + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $this->append($header); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + public function writeEof() + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + $header = pack('vv', $record, $length); + + return $this->writeData($header); + } + + /** + * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In + * Excel 97 the limit is 8228 bytes. Records that are longer than these limits + * must be split up into CONTINUE blocks. + * + * This function takes a long BIFF record and inserts CONTINUE records as + * necessary. + * + * @param string $data The original binary data to be written + * + * @return string A very convenient string of continue blocks + */ + private function addContinue($data) + { + $limit = $this->limit; + $record = 0x003C; // Record identifier + + // The first 2080/8224 bytes remain intact. However, we have to change + // the length field of the record. + $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit); + + $header = pack('vv', $record, $limit); // Headers for continue records + + // Retrieve chunks of 2080/8224 bytes +4 for the header. + $data_length = strlen($data); + for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) { + $tmp .= $header; + $tmp .= substr($data, $i, $limit); + } + + // Retrieve the last chunk of data + $header = pack('vv', $record, strlen($data) - $i); + $tmp .= $header; + $tmp .= substr($data, $i); + + return $tmp; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php new file mode 100755 index 0000000..1ee2e90 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php @@ -0,0 +1,510 @@ +object = $object; + } + + /** + * Process the object to be written. + * + * @return string + */ + public function close() + { + // initialize + $this->data = ''; + + switch (get_class($this->object)) { + case \PhpOffice\PhpSpreadsheet\Shared\Escher::class: + if ($dggContainer = $this->object->getDggContainer()) { + $writer = new self($dggContainer); + $this->data = $writer->close(); + } elseif ($dgContainer = $this->object->getDgContainer()) { + $writer = new self($dgContainer); + $this->data = $writer->close(); + $this->spOffsets = $writer->getSpOffsets(); + $this->spTypes = $writer->getSpTypes(); + } + + break; + case DggContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dgg + $recVer = 0x0; + $recInstance = 0x0000; + $recType = 0xF006; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + // dgg data + $dggData = + pack( + 'VVVV', + $this->object->getSpIdMax(), // maximum shape identifier increased by one + $this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one + $this->object->getCSpSaved(), + $this->object->getCDgSaved() // count total number of drawings saved + ); + + // add file identifier clusters (one per drawing) + $IDCLs = $this->object->getIDCLs(); + + foreach ($IDCLs as $dgId => $maxReducedSpId) { + $dggData .= pack('VV', $dgId, $maxReducedSpId + 1); + } + + $header = pack('vvV', $recVerInstance, $recType, strlen($dggData)); + $innerData .= $header . $dggData; + + // write the bstoreContainer + if ($bstoreContainer = $this->object->getBstoreContainer()) { + $writer = new self($bstoreContainer); + $innerData .= $writer->close(); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF000; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BstoreContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // treat the inner data + if ($BSECollection = $this->object->getBSECollection()) { + foreach ($BSECollection as $BSE) { + $writer = new self($BSE); + $innerData .= $writer->close(); + } + } + + // write the record + $recVer = 0xF; + $recInstance = count($this->object->getBSECollection()); + $recType = 0xF001; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BSE::class: + // this is a semi-container record + + // initialize + $innerData = ''; + + // here we treat the inner data + if ($blip = $this->object->getBlip()) { + $writer = new self($blip); + $innerData .= $writer->close(); + } + + // initialize + $data = ''; + + $btWin32 = $this->object->getBlipType(); + $btMacOS = $this->object->getBlipType(); + $data .= pack('CC', $btWin32, $btMacOS); + + $rgbUid = pack('VVVV', 0, 0, 0, 0); // todo + $data .= $rgbUid; + + $tag = 0; + $size = strlen($innerData); + $cRef = 1; + $foDelay = 0; //todo + $unused1 = 0x0; + $cbName = 0x0; + $unused2 = 0x0; + $unused3 = 0x0; + $data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3); + + $data .= $innerData; + + // write the record + $recVer = 0x2; + $recInstance = $this->object->getBlipType(); + $recType = 0xF007; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $data; + + break; + case Blip::class: + // this is an atom record + + // write the record + switch ($this->object->getParent()->getBlipType()) { + case BSE::BLIPTYPE_JPEG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x46A; + $recType = 0xF01D; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + case BSE::BLIPTYPE_PNG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x6E0; + $recType = 0xF01E; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + } + + break; + case DgContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dg + $recVer = 0x0; + $recInstance = $this->object->getDgId(); + $recType = 0xF008; + $length = 8; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + // number of shapes in this drawing (including group shape) + $countShapes = count($this->object->getSpgrContainer()->getChildren()); + $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId()); + + // write the spgrContainer + if ($spgrContainer = $this->object->getSpgrContainer()) { + $writer = new self($spgrContainer); + $innerData .= $writer->close(); + + // get the shape offsets relative to the spgrContainer record + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + + // save the shape offsets relative to dgContainer + foreach ($spOffsets as &$spOffset) { + $spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes) + } + + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF002; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case SpgrContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // initialize spape offsets + $totalSize = 8; + $spOffsets = []; + $spTypes = []; + + // treat the inner data + foreach ($this->object->getChildren() as $spContainer) { + $writer = new self($spContainer); + $spData = $writer->close(); + $innerData .= $spData; + + // save the shape offsets (where new shape records begin) + $totalSize += strlen($spData); + $spOffsets[] = $totalSize; + + $spTypes = array_merge($spTypes, $writer->getSpTypes()); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF003; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + + break; + case SpContainer::class: + // initialize + $data = ''; + + // build the data + + // write group shape record, if necessary? + if ($this->object->getSpgr()) { + $recVer = 0x1; + $recInstance = 0x0000; + $recType = 0xF009; + $length = 0x00000010; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VVVV', 0, 0, 0, 0); + } + $this->spTypes[] = ($this->object->getSpType()); + + // write the shape record + $recVer = 0x2; + $recInstance = $this->object->getSpType(); // shape type + $recType = 0xF00A; + $length = 0x00000008; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); + + // the options + if ($this->object->getOPTCollection()) { + $optData = ''; + + $recVer = 0x3; + $recInstance = count($this->object->getOPTCollection()); + $recType = 0xF00B; + foreach ($this->object->getOPTCollection() as $property => $value) { + $optData .= pack('vV', $property, $value); + } + $length = strlen($optData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $optData; + } + + // the client anchor + if ($this->object->getStartCoordinates()) { + $clientAnchorData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF010; + + // start coordinates + [$column, $row] = Coordinate::coordinateFromString($this->object->getStartCoordinates()); + $c1 = Coordinate::columnIndexFromString($column) - 1; + $r1 = $row - 1; + + // start offsetX + $startOffsetX = $this->object->getStartOffsetX(); + + // start offsetY + $startOffsetY = $this->object->getStartOffsetY(); + + // end coordinates + [$column, $row] = Coordinate::coordinateFromString($this->object->getEndCoordinates()); + $c2 = Coordinate::columnIndexFromString($column) - 1; + $r2 = $row - 1; + + // end offsetX + $endOffsetX = $this->object->getEndOffsetX(); + + // end offsetY + $endOffsetY = $this->object->getEndOffsetY(); + + $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY); + + $length = strlen($clientAnchorData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientAnchorData; + } + + // the client data, just empty for now + if (!$this->object->getSpgr()) { + $clientDataData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF011; + + $length = strlen($clientDataData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientDataData; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF004; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $data; + + break; + } + + return $this->data; + } + + /** + * Gets the shape offsets. + * + * @return array + */ + public function getSpOffsets() + { + return $this->spOffsets; + } + + /** + * Gets the shape types. + * + * @return array + */ + public function getSpTypes() + { + return $this->spTypes; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php new file mode 100755 index 0000000..9cb31ea --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php @@ -0,0 +1,147 @@ +colorIndex = 0x7FFF; + $this->font = $font; + } + + /** + * Set the color index. + * + * @param int $colorIndex + */ + public function setColorIndex($colorIndex): void + { + $this->colorIndex = $colorIndex; + } + + /** + * Get font record data. + * + * @return string + */ + public function writeFont() + { + $font_outline = 0; + $font_shadow = 0; + + $icv = $this->colorIndex; // Index to color palette + if ($this->font->getSuperscript()) { + $sss = 1; + } elseif ($this->font->getSubscript()) { + $sss = 2; + } else { + $sss = 0; + } + $bFamily = 0; // Font family + $bCharSet = \PhpOffice\PhpSpreadsheet\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set + + $record = 0x31; // Record identifier + $reserved = 0x00; // Reserved + $grbit = 0x00; // Font attributes + if ($this->font->getItalic()) { + $grbit |= 0x02; + } + if ($this->font->getStrikethrough()) { + $grbit |= 0x08; + } + if ($font_outline) { + $grbit |= 0x10; + } + if ($font_shadow) { + $grbit |= 0x20; + } + + $data = pack( + 'vvvvvCCCC', + // Fontsize (in twips) + $this->font->getSize() * 20, + $grbit, + // Colour + $icv, + // Font weight + self::mapBold($this->font->getBold()), + // Superscript/Subscript + $sss, + self::mapUnderline($this->font->getUnderline()), + $bFamily, + $bCharSet, + $reserved + ); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($this->font->getName()); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Map to BIFF5-BIFF8 codes for bold. + * + * @param bool $bold + * + * @return int + */ + private static function mapBold($bold) + { + if ($bold) { + return 0x2BC; // 700 = Bold font weight + } + + return 0x190; // 400 = Normal font weight + } + + /** + * Map of BIFF2-BIFF8 codes for underline styles. + * + * @var array of int + */ + private static $mapUnderline = [ + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE => 0x00, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE => 0x01, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE => 0x02, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING => 0x21, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING => 0x22, + ]; + + /** + * Map underline. + * + * @param string $underline + * + * @return int + */ + private static function mapUnderline($underline) + { + if (isset(self::$mapUnderline[$underline])) { + return self::$mapUnderline[$underline]; + } + + return 0x00; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php new file mode 100755 index 0000000..621853c --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -0,0 +1,1440 @@ +=,;#()"{} + const REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&\<\>\=\,\;\#\(\)\"\{\}]+'; + + // Sheet title in quoted form (without surrounding quotes) + // Invalid sheet title characters cannot occur in the sheet title: + // *:/\?[] (usual invalid sheet title characters) + // Single quote is represented as a pair '' + const REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+'; + + /** + * The index of the character we are currently looking at. + * + * @var int + */ + public $currentCharacter; + + /** + * The token we are working on. + * + * @var string + */ + public $currentToken; + + /** + * The formula to parse. + * + * @var string + */ + private $formula; + + /** + * The character ahead of the current char. + * + * @var string + */ + public $lookAhead; + + /** + * The parse tree to be generated. + * + * @var string + */ + private $parseTree; + + /** + * Array of external sheets. + * + * @var array + */ + private $externalSheets; + + /** + * Array of sheet references in the form of REF structures. + * + * @var array + */ + public $references; + + /** + * The Excel ptg indices. + * + * @var array + */ + private $ptg = [ + 'ptgExp' => 0x01, + 'ptgTbl' => 0x02, + 'ptgAdd' => 0x03, + 'ptgSub' => 0x04, + 'ptgMul' => 0x05, + 'ptgDiv' => 0x06, + 'ptgPower' => 0x07, + 'ptgConcat' => 0x08, + 'ptgLT' => 0x09, + 'ptgLE' => 0x0A, + 'ptgEQ' => 0x0B, + 'ptgGE' => 0x0C, + 'ptgGT' => 0x0D, + 'ptgNE' => 0x0E, + 'ptgIsect' => 0x0F, + 'ptgUnion' => 0x10, + 'ptgRange' => 0x11, + 'ptgUplus' => 0x12, + 'ptgUminus' => 0x13, + 'ptgPercent' => 0x14, + 'ptgParen' => 0x15, + 'ptgMissArg' => 0x16, + 'ptgStr' => 0x17, + 'ptgAttr' => 0x19, + 'ptgSheet' => 0x1A, + 'ptgEndSheet' => 0x1B, + 'ptgErr' => 0x1C, + 'ptgBool' => 0x1D, + 'ptgInt' => 0x1E, + 'ptgNum' => 0x1F, + 'ptgArray' => 0x20, + 'ptgFunc' => 0x21, + 'ptgFuncVar' => 0x22, + 'ptgName' => 0x23, + 'ptgRef' => 0x24, + 'ptgArea' => 0x25, + 'ptgMemArea' => 0x26, + 'ptgMemErr' => 0x27, + 'ptgMemNoMem' => 0x28, + 'ptgMemFunc' => 0x29, + 'ptgRefErr' => 0x2A, + 'ptgAreaErr' => 0x2B, + 'ptgRefN' => 0x2C, + 'ptgAreaN' => 0x2D, + 'ptgMemAreaN' => 0x2E, + 'ptgMemNoMemN' => 0x2F, + 'ptgNameX' => 0x39, + 'ptgRef3d' => 0x3A, + 'ptgArea3d' => 0x3B, + 'ptgRefErr3d' => 0x3C, + 'ptgAreaErr3d' => 0x3D, + 'ptgArrayV' => 0x40, + 'ptgFuncV' => 0x41, + 'ptgFuncVarV' => 0x42, + 'ptgNameV' => 0x43, + 'ptgRefV' => 0x44, + 'ptgAreaV' => 0x45, + 'ptgMemAreaV' => 0x46, + 'ptgMemErrV' => 0x47, + 'ptgMemNoMemV' => 0x48, + 'ptgMemFuncV' => 0x49, + 'ptgRefErrV' => 0x4A, + 'ptgAreaErrV' => 0x4B, + 'ptgRefNV' => 0x4C, + 'ptgAreaNV' => 0x4D, + 'ptgMemAreaNV' => 0x4E, + 'ptgMemNoMemNV' => 0x4F, + 'ptgFuncCEV' => 0x58, + 'ptgNameXV' => 0x59, + 'ptgRef3dV' => 0x5A, + 'ptgArea3dV' => 0x5B, + 'ptgRefErr3dV' => 0x5C, + 'ptgAreaErr3dV' => 0x5D, + 'ptgArrayA' => 0x60, + 'ptgFuncA' => 0x61, + 'ptgFuncVarA' => 0x62, + 'ptgNameA' => 0x63, + 'ptgRefA' => 0x64, + 'ptgAreaA' => 0x65, + 'ptgMemAreaA' => 0x66, + 'ptgMemErrA' => 0x67, + 'ptgMemNoMemA' => 0x68, + 'ptgMemFuncA' => 0x69, + 'ptgRefErrA' => 0x6A, + 'ptgAreaErrA' => 0x6B, + 'ptgRefNA' => 0x6C, + 'ptgAreaNA' => 0x6D, + 'ptgMemAreaNA' => 0x6E, + 'ptgMemNoMemNA' => 0x6F, + 'ptgFuncCEA' => 0x78, + 'ptgNameXA' => 0x79, + 'ptgRef3dA' => 0x7A, + 'ptgArea3dA' => 0x7B, + 'ptgRefErr3dA' => 0x7C, + 'ptgAreaErr3dA' => 0x7D, + ]; + + /** + * Thanks to Michael Meeks and Gnumeric for the initial arg values. + * + * The following hash was generated by "function_locale.pl" in the distro. + * Refer to function_locale.pl for non-English function names. + * + * The array elements are as follow: + * ptg: The Excel function ptg code. + * args: The number of arguments that the function takes: + * >=0 is a fixed number of arguments. + * -1 is a variable number of arguments. + * class: The reference, value or array class of the function args. + * vol: The function is volatile. + * + * @var array + */ + private $functions = [ + // function ptg args class vol + 'COUNT' => [0, -1, 0, 0], + 'IF' => [1, -1, 1, 0], + 'ISNA' => [2, 1, 1, 0], + 'ISERROR' => [3, 1, 1, 0], + 'SUM' => [4, -1, 0, 0], + 'AVERAGE' => [5, -1, 0, 0], + 'MIN' => [6, -1, 0, 0], + 'MAX' => [7, -1, 0, 0], + 'ROW' => [8, -1, 0, 0], + 'COLUMN' => [9, -1, 0, 0], + 'NA' => [10, 0, 0, 0], + 'NPV' => [11, -1, 1, 0], + 'STDEV' => [12, -1, 0, 0], + 'DOLLAR' => [13, -1, 1, 0], + 'FIXED' => [14, -1, 1, 0], + 'SIN' => [15, 1, 1, 0], + 'COS' => [16, 1, 1, 0], + 'TAN' => [17, 1, 1, 0], + 'ATAN' => [18, 1, 1, 0], + 'PI' => [19, 0, 1, 0], + 'SQRT' => [20, 1, 1, 0], + 'EXP' => [21, 1, 1, 0], + 'LN' => [22, 1, 1, 0], + 'LOG10' => [23, 1, 1, 0], + 'ABS' => [24, 1, 1, 0], + 'INT' => [25, 1, 1, 0], + 'SIGN' => [26, 1, 1, 0], + 'ROUND' => [27, 2, 1, 0], + 'LOOKUP' => [28, -1, 0, 0], + 'INDEX' => [29, -1, 0, 1], + 'REPT' => [30, 2, 1, 0], + 'MID' => [31, 3, 1, 0], + 'LEN' => [32, 1, 1, 0], + 'VALUE' => [33, 1, 1, 0], + 'TRUE' => [34, 0, 1, 0], + 'FALSE' => [35, 0, 1, 0], + 'AND' => [36, -1, 0, 0], + 'OR' => [37, -1, 0, 0], + 'NOT' => [38, 1, 1, 0], + 'MOD' => [39, 2, 1, 0], + 'DCOUNT' => [40, 3, 0, 0], + 'DSUM' => [41, 3, 0, 0], + 'DAVERAGE' => [42, 3, 0, 0], + 'DMIN' => [43, 3, 0, 0], + 'DMAX' => [44, 3, 0, 0], + 'DSTDEV' => [45, 3, 0, 0], + 'VAR' => [46, -1, 0, 0], + 'DVAR' => [47, 3, 0, 0], + 'TEXT' => [48, 2, 1, 0], + 'LINEST' => [49, -1, 0, 0], + 'TREND' => [50, -1, 0, 0], + 'LOGEST' => [51, -1, 0, 0], + 'GROWTH' => [52, -1, 0, 0], + 'PV' => [56, -1, 1, 0], + 'FV' => [57, -1, 1, 0], + 'NPER' => [58, -1, 1, 0], + 'PMT' => [59, -1, 1, 0], + 'RATE' => [60, -1, 1, 0], + 'MIRR' => [61, 3, 0, 0], + 'IRR' => [62, -1, 0, 0], + 'RAND' => [63, 0, 1, 1], + 'MATCH' => [64, -1, 0, 0], + 'DATE' => [65, 3, 1, 0], + 'TIME' => [66, 3, 1, 0], + 'DAY' => [67, 1, 1, 0], + 'MONTH' => [68, 1, 1, 0], + 'YEAR' => [69, 1, 1, 0], + 'WEEKDAY' => [70, -1, 1, 0], + 'HOUR' => [71, 1, 1, 0], + 'MINUTE' => [72, 1, 1, 0], + 'SECOND' => [73, 1, 1, 0], + 'NOW' => [74, 0, 1, 1], + 'AREAS' => [75, 1, 0, 1], + 'ROWS' => [76, 1, 0, 1], + 'COLUMNS' => [77, 1, 0, 1], + 'OFFSET' => [78, -1, 0, 1], + 'SEARCH' => [82, -1, 1, 0], + 'TRANSPOSE' => [83, 1, 1, 0], + 'TYPE' => [86, 1, 1, 0], + 'ATAN2' => [97, 2, 1, 0], + 'ASIN' => [98, 1, 1, 0], + 'ACOS' => [99, 1, 1, 0], + 'CHOOSE' => [100, -1, 1, 0], + 'HLOOKUP' => [101, -1, 0, 0], + 'VLOOKUP' => [102, -1, 0, 0], + 'ISREF' => [105, 1, 0, 0], + 'LOG' => [109, -1, 1, 0], + 'CHAR' => [111, 1, 1, 0], + 'LOWER' => [112, 1, 1, 0], + 'UPPER' => [113, 1, 1, 0], + 'PROPER' => [114, 1, 1, 0], + 'LEFT' => [115, -1, 1, 0], + 'RIGHT' => [116, -1, 1, 0], + 'EXACT' => [117, 2, 1, 0], + 'TRIM' => [118, 1, 1, 0], + 'REPLACE' => [119, 4, 1, 0], + 'SUBSTITUTE' => [120, -1, 1, 0], + 'CODE' => [121, 1, 1, 0], + 'FIND' => [124, -1, 1, 0], + 'CELL' => [125, -1, 0, 1], + 'ISERR' => [126, 1, 1, 0], + 'ISTEXT' => [127, 1, 1, 0], + 'ISNUMBER' => [128, 1, 1, 0], + 'ISBLANK' => [129, 1, 1, 0], + 'T' => [130, 1, 0, 0], + 'N' => [131, 1, 0, 0], + 'DATEVALUE' => [140, 1, 1, 0], + 'TIMEVALUE' => [141, 1, 1, 0], + 'SLN' => [142, 3, 1, 0], + 'SYD' => [143, 4, 1, 0], + 'DDB' => [144, -1, 1, 0], + 'INDIRECT' => [148, -1, 1, 1], + 'CALL' => [150, -1, 1, 0], + 'CLEAN' => [162, 1, 1, 0], + 'MDETERM' => [163, 1, 2, 0], + 'MINVERSE' => [164, 1, 2, 0], + 'MMULT' => [165, 2, 2, 0], + 'IPMT' => [167, -1, 1, 0], + 'PPMT' => [168, -1, 1, 0], + 'COUNTA' => [169, -1, 0, 0], + 'PRODUCT' => [183, -1, 0, 0], + 'FACT' => [184, 1, 1, 0], + 'DPRODUCT' => [189, 3, 0, 0], + 'ISNONTEXT' => [190, 1, 1, 0], + 'STDEVP' => [193, -1, 0, 0], + 'VARP' => [194, -1, 0, 0], + 'DSTDEVP' => [195, 3, 0, 0], + 'DVARP' => [196, 3, 0, 0], + 'TRUNC' => [197, -1, 1, 0], + 'ISLOGICAL' => [198, 1, 1, 0], + 'DCOUNTA' => [199, 3, 0, 0], + 'USDOLLAR' => [204, -1, 1, 0], + 'FINDB' => [205, -1, 1, 0], + 'SEARCHB' => [206, -1, 1, 0], + 'REPLACEB' => [207, 4, 1, 0], + 'LEFTB' => [208, -1, 1, 0], + 'RIGHTB' => [209, -1, 1, 0], + 'MIDB' => [210, 3, 1, 0], + 'LENB' => [211, 1, 1, 0], + 'ROUNDUP' => [212, 2, 1, 0], + 'ROUNDDOWN' => [213, 2, 1, 0], + 'ASC' => [214, 1, 1, 0], + 'DBCS' => [215, 1, 1, 0], + 'RANK' => [216, -1, 0, 0], + 'ADDRESS' => [219, -1, 1, 0], + 'DAYS360' => [220, -1, 1, 0], + 'TODAY' => [221, 0, 1, 1], + 'VDB' => [222, -1, 1, 0], + 'MEDIAN' => [227, -1, 0, 0], + 'SUMPRODUCT' => [228, -1, 2, 0], + 'SINH' => [229, 1, 1, 0], + 'COSH' => [230, 1, 1, 0], + 'TANH' => [231, 1, 1, 0], + 'ASINH' => [232, 1, 1, 0], + 'ACOSH' => [233, 1, 1, 0], + 'ATANH' => [234, 1, 1, 0], + 'DGET' => [235, 3, 0, 0], + 'INFO' => [244, 1, 1, 1], + 'DB' => [247, -1, 1, 0], + 'FREQUENCY' => [252, 2, 0, 0], + 'ERROR.TYPE' => [261, 1, 1, 0], + 'REGISTER.ID' => [267, -1, 1, 0], + 'AVEDEV' => [269, -1, 0, 0], + 'BETADIST' => [270, -1, 1, 0], + 'GAMMALN' => [271, 1, 1, 0], + 'BETAINV' => [272, -1, 1, 0], + 'BINOMDIST' => [273, 4, 1, 0], + 'CHIDIST' => [274, 2, 1, 0], + 'CHIINV' => [275, 2, 1, 0], + 'COMBIN' => [276, 2, 1, 0], + 'CONFIDENCE' => [277, 3, 1, 0], + 'CRITBINOM' => [278, 3, 1, 0], + 'EVEN' => [279, 1, 1, 0], + 'EXPONDIST' => [280, 3, 1, 0], + 'FDIST' => [281, 3, 1, 0], + 'FINV' => [282, 3, 1, 0], + 'FISHER' => [283, 1, 1, 0], + 'FISHERINV' => [284, 1, 1, 0], + 'FLOOR' => [285, 2, 1, 0], + 'GAMMADIST' => [286, 4, 1, 0], + 'GAMMAINV' => [287, 3, 1, 0], + 'CEILING' => [288, 2, 1, 0], + 'HYPGEOMDIST' => [289, 4, 1, 0], + 'LOGNORMDIST' => [290, 3, 1, 0], + 'LOGINV' => [291, 3, 1, 0], + 'NEGBINOMDIST' => [292, 3, 1, 0], + 'NORMDIST' => [293, 4, 1, 0], + 'NORMSDIST' => [294, 1, 1, 0], + 'NORMINV' => [295, 3, 1, 0], + 'NORMSINV' => [296, 1, 1, 0], + 'STANDARDIZE' => [297, 3, 1, 0], + 'ODD' => [298, 1, 1, 0], + 'PERMUT' => [299, 2, 1, 0], + 'POISSON' => [300, 3, 1, 0], + 'TDIST' => [301, 3, 1, 0], + 'WEIBULL' => [302, 4, 1, 0], + 'SUMXMY2' => [303, 2, 2, 0], + 'SUMX2MY2' => [304, 2, 2, 0], + 'SUMX2PY2' => [305, 2, 2, 0], + 'CHITEST' => [306, 2, 2, 0], + 'CORREL' => [307, 2, 2, 0], + 'COVAR' => [308, 2, 2, 0], + 'FORECAST' => [309, 3, 2, 0], + 'FTEST' => [310, 2, 2, 0], + 'INTERCEPT' => [311, 2, 2, 0], + 'PEARSON' => [312, 2, 2, 0], + 'RSQ' => [313, 2, 2, 0], + 'STEYX' => [314, 2, 2, 0], + 'SLOPE' => [315, 2, 2, 0], + 'TTEST' => [316, 4, 2, 0], + 'PROB' => [317, -1, 2, 0], + 'DEVSQ' => [318, -1, 0, 0], + 'GEOMEAN' => [319, -1, 0, 0], + 'HARMEAN' => [320, -1, 0, 0], + 'SUMSQ' => [321, -1, 0, 0], + 'KURT' => [322, -1, 0, 0], + 'SKEW' => [323, -1, 0, 0], + 'ZTEST' => [324, -1, 0, 0], + 'LARGE' => [325, 2, 0, 0], + 'SMALL' => [326, 2, 0, 0], + 'QUARTILE' => [327, 2, 0, 0], + 'PERCENTILE' => [328, 2, 0, 0], + 'PERCENTRANK' => [329, -1, 0, 0], + 'MODE' => [330, -1, 2, 0], + 'TRIMMEAN' => [331, 2, 0, 0], + 'TINV' => [332, 2, 1, 0], + 'CONCATENATE' => [336, -1, 1, 0], + 'POWER' => [337, 2, 1, 0], + 'RADIANS' => [342, 1, 1, 0], + 'DEGREES' => [343, 1, 1, 0], + 'SUBTOTAL' => [344, -1, 0, 0], + 'SUMIF' => [345, -1, 0, 0], + 'COUNTIF' => [346, 2, 0, 0], + 'COUNTBLANK' => [347, 1, 0, 0], + 'ISPMT' => [350, 4, 1, 0], + 'DATEDIF' => [351, 3, 1, 0], + 'DATESTRING' => [352, 1, 1, 0], + 'NUMBERSTRING' => [353, 2, 1, 0], + 'ROMAN' => [354, -1, 1, 0], + 'GETPIVOTDATA' => [358, -1, 0, 0], + 'HYPERLINK' => [359, -1, 1, 0], + 'PHONETIC' => [360, 1, 0, 0], + 'AVERAGEA' => [361, -1, 0, 0], + 'MAXA' => [362, -1, 0, 0], + 'MINA' => [363, -1, 0, 0], + 'STDEVPA' => [364, -1, 0, 0], + 'VARPA' => [365, -1, 0, 0], + 'STDEVA' => [366, -1, 0, 0], + 'VARA' => [367, -1, 0, 0], + 'BAHTTEXT' => [368, 1, 0, 0], + ]; + + /** + * The class constructor. + */ + public function __construct() + { + $this->currentCharacter = 0; + $this->currentToken = ''; // The token we are working on. + $this->formula = ''; // The formula to parse. + $this->lookAhead = ''; // The character ahead of the current char. + $this->parseTree = ''; // The parse tree to be generated. + $this->externalSheets = []; + $this->references = []; + } + + /** + * Convert a token to the proper ptg value. + * + * @param mixed $token the token to convert + * + * @return mixed the converted token on success + */ + private function convert($token) + { + if (preg_match('/"([^"]|""){0,255}"/', $token)) { + return $this->convertString($token); + } elseif (is_numeric($token)) { + return $this->convertNumber($token); + // match references like A1 or $A$1 + } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) { + return $this->convertRef2d($token); + // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?(\\d+)$/u', $token)) { + return $this->convertRef3d($token); + // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u", $token)) { + return $this->convertRef3d($token); + // match ranges like A1:B2 or $A$1:$B$2 + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) { + return $this->convertRange2d($token); + // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)\\:\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)$/u', $token)) { + return $this->convertRange3d($token); + // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u", $token)) { + return $this->convertRange3d($token); + // operators (including parentheses) + } elseif (isset($this->ptg[$token])) { + return pack('C', $this->ptg[$token]); + // match error codes + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) || $token == '#N/A') { + return $this->convertError($token); + // commented so argument number can be processed correctly. See toReversePolish(). + /*elseif (preg_match("/[A-Z0-9\xc0-\xdc\.]+/", $token)) + { + return($this->convertFunction($token, $this->_func_args)); + }*/ + // if it's an argument, ignore the token (the argument remains) + } elseif ($token == 'arg') { + return ''; + } + + // TODO: use real error codes + throw new WriterException("Unknown token $token"); + } + + /** + * Convert a number token to ptgInt or ptgNum. + * + * @param mixed $num an integer or double for conversion to its ptg value + * + * @return string + */ + private function convertNumber($num) + { + // Integer in the range 0..2**16-1 + if ((preg_match('/^\\d+$/', $num)) && ($num <= 65535)) { + return pack('Cv', $this->ptg['ptgInt'], $num); + } + + // A float + if (BIFFwriter::getByteOrder()) { // if it's Big Endian + $num = strrev($num); + } + + return pack('Cd', $this->ptg['ptgNum'], $num); + } + + /** + * Convert a string token to ptgStr. + * + * @param string $string a string for conversion to its ptg value + * + * @return mixed the converted token on success + */ + private function convertString($string) + { + // chop away beggining and ending quotes + $string = substr($string, 1, -1); + if (strlen($string) > 255) { + throw new WriterException('String is too long'); + } + + return pack('C', $this->ptg['ptgStr']) . StringHelper::UTF8toBIFF8UnicodeShort($string); + } + + /** + * Convert a function to a ptgFunc or ptgFuncVarV depending on the number of + * args that it takes. + * + * @param string $token the name of the function for convertion to ptg value + * @param int $num_args the number of arguments the function receives + * + * @return string The packed ptg for the function + */ + private function convertFunction($token, $num_args) + { + $args = $this->functions[$token][1]; + + // Fixed number of args eg. TIME($i, $j, $k). + if ($args >= 0) { + return pack('Cv', $this->ptg['ptgFuncV'], $this->functions[$token][0]); + } + // Variable number of args eg. SUM($i, $j, $k, ..). + if ($args == -1) { + return pack('CCv', $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]); + } + } + + /** + * Convert an Excel range such as A1:D4 to a ptgRefV. + * + * @param string $range An Excel range in the A1:A2 + * @param int $class + * + * @return string + */ + private function convertRange2d($range, $class = 0) + { + // TODO: possible class value 0,1,2 check Formula.pm + // Split the range into 2 cell refs + if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) { + [$cell1, $cell2] = explode(':', $range); + } else { + // TODO: use real error codes + throw new WriterException('Unknown range separator'); + } + + // Convert the cell references + [$row1, $col1] = $this->cellToPackedRowcol($cell1); + [$row2, $col2] = $this->cellToPackedRowcol($cell2); + + // The ptg value depends on the class of the ptg. + if ($class == 0) { + $ptgArea = pack('C', $this->ptg['ptgArea']); + } elseif ($class == 1) { + $ptgArea = pack('C', $this->ptg['ptgAreaV']); + } elseif ($class == 2) { + $ptgArea = pack('C', $this->ptg['ptgAreaA']); + } else { + // TODO: use real error codes + throw new WriterException("Unknown class $class"); + } + + return $ptgArea . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to + * a ptgArea3d. + * + * @param string $token an Excel range in the Sheet1!A1:A2 format + * + * @return mixed the packed ptgArea3d token on success + */ + private function convertRange3d($token) + { + // Split the ref at the ! symbol + [$ext_ref, $range] = PhpspreadsheetWorksheet::extractSheetTitle($token, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Split the range into 2 cell refs + [$cell1, $cell2] = explode(':', $range); + + // Convert the cell references + if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\\d+)$/', $cell1)) { + [$row1, $col1] = $this->cellToPackedRowcol($cell1); + [$row2, $col2] = $this->cellToPackedRowcol($cell2); + } else { // It's a rows range (like 26:27) + [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1 . ':' . $cell2); + } + + // The ptg value depends on the class of the ptg. + $ptgArea = pack('C', $this->ptg['ptgArea3d']); + + return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV. + * + * @param string $cell An Excel cell reference + * + * @return string The cell in packed() format with the corresponding ptg + */ + private function convertRef2d($cell) + { + // Convert the cell reference + $cell_array = $this->cellToPackedRowcol($cell); + [$row, $col] = $cell_array; + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRefA']); + + return $ptgRef . $row . $col; + } + + /** + * Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a + * ptgRef3d. + * + * @param string $cell An Excel cell reference + * + * @return mixed the packed ptgRef3d token on success + */ + private function convertRef3d($cell) + { + // Split the ref at the ! symbol + [$ext_ref, $cell] = PhpspreadsheetWorksheet::extractSheetTitle($cell, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Convert the cell reference part + [$row, $col] = $this->cellToPackedRowcol($cell); + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRef3dA']); + + return $ptgRef . $ext_ref . $row . $col; + } + + /** + * Convert an error code to a ptgErr. + * + * @param string $errorCode The error code for conversion to its ptg value + * + * @return string The error code ptgErr + */ + private function convertError($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return pack('C', 0x00); + case '#DIV/0!': + return pack('C', 0x07); + case '#VALUE!': + return pack('C', 0x0F); + case '#REF!': + return pack('C', 0x17); + case '#NAME?': + return pack('C', 0x1D); + case '#NUM!': + return pack('C', 0x24); + case '#N/A': + return pack('C', 0x2A); + } + + return pack('C', 0xFF); + } + + /** + * Look up the REF index that corresponds to an external sheet name + * (or range). If it doesn't exist yet add it to the workbook's references + * array. It assumes all sheet names given must exist. + * + * @param string $ext_ref The name of the external reference + * + * @return mixed The reference index in packed() format on success + */ + private function getRefIndex($ext_ref) + { + $ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any. + $ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any. + $ext_ref = str_replace('\'\'', '\'', $ext_ref); // Replace escaped '' with ' + + // Check if there is a sheet range eg., Sheet1:Sheet2. + if (preg_match('/:/', $ext_ref)) { + [$sheet_name1, $sheet_name2] = explode(':', $ext_ref); + + $sheet1 = $this->getSheetIndex($sheet_name1); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $sheet_name1 in formula"); + } + $sheet2 = $this->getSheetIndex($sheet_name2); + if ($sheet2 == -1) { + throw new WriterException("Unknown sheet name $sheet_name2 in formula"); + } + + // Reverse max and min sheet numbers if necessary + if ($sheet1 > $sheet2) { + [$sheet1, $sheet2] = [$sheet2, $sheet1]; + } + } else { // Single sheet name only. + $sheet1 = $this->getSheetIndex($ext_ref); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $ext_ref in formula"); + } + $sheet2 = $sheet1; + } + + // assume all references belong to this document + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $sheet1, $sheet2); + $totalreferences = count($this->references); + $index = -1; + for ($i = 0; $i < $totalreferences; ++$i) { + if ($ref == $this->references[$i]) { + $index = $i; + + break; + } + } + // if REF was not found add it to references array + if ($index == -1) { + $this->references[$totalreferences] = $ref; + $index = $totalreferences; + } + + return pack('v', $index); + } + + /** + * Look up the index that corresponds to an external sheet name. The hash of + * sheet names is updated by the addworksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @param string $sheet_name Sheet name + * + * @return int The sheet index, -1 if the sheet was not found + */ + private function getSheetIndex($sheet_name) + { + if (!isset($this->externalSheets[$sheet_name])) { + return -1; + } + + return $this->externalSheets[$sheet_name]; + } + + /** + * This method is used to update the array of sheet names. It is + * called by the addWorksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::addWorksheet() + * + * @param string $name The name of the worksheet being added + * @param int $index The index of the worksheet being added + */ + public function setExtSheet($name, $index): void + { + $this->externalSheets[$name] = $index; + } + + /** + * pack() row and column into the required 3 or 4 byte format. + * + * @param string $cell The Excel cell reference to be packed + * + * @return array Array containing the row and column in packed() format + */ + private function cellToPackedRowcol($cell) + { + $cell = strtoupper($cell); + [$row, $col, $row_rel, $col_rel] = $this->cellToRowcol($cell); + if ($col >= 256) { + throw new WriterException("Column in: $cell greater than 255"); + } + if ($row >= 65536) { + throw new WriterException("Row in: $cell greater than 65536 "); + } + + // Set the high bits to indicate if row or col are relative. + $col |= $col_rel << 14; + $col |= $row_rel << 15; + $col = pack('v', $col); + + $row = pack('v', $row); + + return [$row, $col]; + } + + /** + * pack() row range into the required 3 or 4 byte format. + * Just using maximum col/rows, which is probably not the correct solution. + * + * @param string $range The Excel range to be packed + * + * @return array Array containing (row1,col1,row2,col2) in packed() format + */ + private function rangeToPackedRange($range) + { + preg_match('/(\$)?(\d+)\:(\$)?(\d+)/', $range, $match); + // return absolute rows if there is a $ in the ref + $row1_rel = empty($match[1]) ? 1 : 0; + $row1 = $match[2]; + $row2_rel = empty($match[3]) ? 1 : 0; + $row2 = $match[4]; + // Convert 1-index to zero-index + --$row1; + --$row2; + // Trick poor inocent Excel + $col1 = 0; + $col2 = 65535; // FIXME: maximum possible value for Excel 5 (change this!!!) + + // FIXME: this changes for BIFF8 + if (($row1 >= 65536) || ($row2 >= 65536)) { + throw new WriterException("Row in: $range greater than 65536 "); + } + + // Set the high bits to indicate if rows are relative. + $col1 |= $row1_rel << 15; + $col2 |= $row2_rel << 15; + $col1 = pack('v', $col1); + $col2 = pack('v', $col2); + + $row1 = pack('v', $row1); + $row2 = pack('v', $row2); + + return [$row1, $col1, $row2, $col2]; + } + + /** + * Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero + * indexed row and column number. Also returns two (0,1) values to indicate + * whether the row or column are relative references. + * + * @param string $cell the Excel cell reference in A1 format + * + * @return array + */ + private function cellToRowcol($cell) + { + preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/', $cell, $match); + // return absolute column if there is a $ in the ref + $col_rel = empty($match[1]) ? 1 : 0; + $col_ref = $match[2]; + $row_rel = empty($match[3]) ? 1 : 0; + $row = $match[4]; + + // Convert base26 column string to a number. + $expn = strlen($col_ref) - 1; + $col = 0; + $col_ref_length = strlen($col_ref); + for ($i = 0; $i < $col_ref_length; ++$i) { + $col += (ord($col_ref[$i]) - 64) * 26 ** $expn; + --$expn; + } + + // Convert 1-index to zero-index + --$row; + --$col; + + return [$row, $col, $row_rel, $col_rel]; + } + + /** + * Advance to the next valid token. + */ + private function advance() + { + $i = $this->currentCharacter; + $formula_length = strlen($this->formula); + // eat up white spaces + if ($i < $formula_length) { + while ($this->formula[$i] == ' ') { + ++$i; + } + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } + $token = ''; + } + + while ($i < $formula_length) { + $token .= $this->formula[$i]; + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } else { + $this->lookAhead = ''; + } + + if ($this->match($token) != '') { + $this->currentCharacter = $i + 1; + $this->currentToken = $token; + + return 1; + } + + if ($i < ($formula_length - 2)) { + $this->lookAhead = $this->formula[$i + 2]; + } else { // if we run out of characters lookAhead becomes empty + $this->lookAhead = ''; + } + ++$i; + } + //die("Lexical error ".$this->currentCharacter); + } + + /** + * Checks if it's a valid token. + * + * @param mixed $token the token to check + * + * @return mixed The checked token or false on failure + */ + private function match($token) + { + switch ($token) { + case '+': + case '-': + case '*': + case '/': + case '(': + case ')': + case ',': + case ';': + case '>=': + case '<=': + case '=': + case '<>': + case '^': + case '&': + case '%': + return $token; + + break; + case '>': + if ($this->lookAhead === '=') { // it's a GE token + break; + } + + return $token; + + break; + case '<': + // it's a LE or a NE token + if (($this->lookAhead === '=') || ($this->lookAhead === '>')) { + break; + } + + return $token; + + break; + default: + // if it's a reference A1 or $A$1 or $A1 or A$1 + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.') && ($this->lookAhead !== '!')) { + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.')) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.')) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + return $token; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead)) { + // if it's a range A1:A2 or $A$1:$A$2 + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $token) && !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) && !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + return $token; + } elseif (is_numeric($token) && (!is_numeric($token . $this->lookAhead) || ($this->lookAhead == '')) && ($this->lookAhead !== '!') && ($this->lookAhead !== ':')) { + // If it's a number (check that it's not a sheet name or range) + return $token; + } elseif (preg_match('/"([^"]|""){0,255}"/', $token) && $this->lookAhead !== '"' && (substr_count($token, '"') % 2 == 0)) { + // If it's a string (of maximum 255 characters) + return $token; + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) || $token === '#N/A') { + // If it's an error code + return $token; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $token) && ($this->lookAhead === '(')) { + // if it's a function call + return $token; + } elseif (substr($token, -1) === ')') { + // It's an argument of some description (e.g. a named range), + // precise nature yet to be determined + return $token; + } + + return ''; + } + } + + /** + * The parsing method. It parses a formula. + * + * @param string $formula the formula to parse, without the initial equal + * sign (=) + * + * @return mixed true on success + */ + public function parse($formula) + { + $this->currentCharacter = 0; + $this->formula = (string) $formula; + $this->lookAhead = $formula[1] ?? ''; + $this->advance(); + $this->parseTree = $this->condition(); + + return true; + } + + /** + * It parses a condition. It assumes the following rule: + * Cond -> Expr [(">" | "<") Expr]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function condition() + { + $result = $this->expression(); + if ($this->currentToken == '<') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLT', $result, $result2); + } elseif ($this->currentToken == '>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGT', $result, $result2); + } elseif ($this->currentToken == '<=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLE', $result, $result2); + } elseif ($this->currentToken == '>=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGE', $result, $result2); + } elseif ($this->currentToken == '=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgEQ', $result, $result2); + } elseif ($this->currentToken == '<>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgNE', $result, $result2); + } elseif ($this->currentToken == '&') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgConcat', $result, $result2); + } + + return $result; + } + + /** + * It parses a expression. It assumes the following rule: + * Expr -> Term [("+" | "-") Term] + * -> "string" + * -> "-" Term : Negative value + * -> "+" Term : Positive value + * -> Error code. + * + * @return mixed The parsed ptg'd tree on success + */ + private function expression() + { + // If it's a string return a string node + if (preg_match('/"([^"]|""){0,255}"/', $this->currentToken)) { + $tmp = str_replace('""', '"', $this->currentToken); + if (($tmp == '"') || ($tmp == '')) { + // Trap for "" that has been used for an empty string + $tmp = '""'; + } + $result = $this->createTree($tmp, '', ''); + $this->advance(); + + return $result; + // If it's an error code + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken) || $this->currentToken == '#N/A') { + $result = $this->createTree($this->currentToken, 'ptgErr', ''); + $this->advance(); + + return $result; + // If it's a negative value + } elseif ($this->currentToken == '-') { + // catch "-" Term + $this->advance(); + $result2 = $this->expression(); + + return $this->createTree('ptgUminus', $result2, ''); + // If it's a positive value + } elseif ($this->currentToken == '+') { + // catch "+" Term + $this->advance(); + $result2 = $this->expression(); + + return $this->createTree('ptgUplus', $result2, ''); + } + $result = $this->term(); + while (($this->currentToken == '+') || + ($this->currentToken == '-') || + ($this->currentToken == '^')) { + if ($this->currentToken == '+') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgAdd', $result, $result2); + } elseif ($this->currentToken == '-') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgSub', $result, $result2); + } else { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgPower', $result, $result2); + } + } + + return $result; + } + + /** + * This function just introduces a ptgParen element in the tree, so that Excel + * doesn't get confused when working with a parenthesized formula afterwards. + * + * @see fact() + * + * @return array The parsed ptg'd tree + */ + private function parenthesizedExpression() + { + return $this->createTree('ptgParen', $this->expression(), ''); + } + + /** + * It parses a term. It assumes the following rule: + * Term -> Fact [("*" | "/") Fact]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function term() + { + $result = $this->fact(); + while (($this->currentToken == '*') || + ($this->currentToken == '/')) { + if ($this->currentToken == '*') { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgMul', $result, $result2); + } else { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgDiv', $result, $result2); + } + } + + return $result; + } + + /** + * It parses a factor. It assumes the following rule: + * Fact -> ( Expr ) + * | CellRef + * | CellRange + * | Number + * | Function. + * + * @return mixed The parsed ptg'd tree on success + */ + private function fact() + { + if ($this->currentToken === '(') { + $this->advance(); // eat the "(" + $result = $this->parenthesizedExpression(); + if ($this->currentToken !== ')') { + throw new WriterException("')' token expected."); + } + $this->advance(); // eat the ")" + + return $result; + } + // if it's a reference + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $this->currentToken)) { + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $this->currentToken)) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $this->currentToken)) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken) || + preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken)) { + // if it's a range A1:B2 or $A$1:$B$2 + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $this->currentToken)) { + // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $this->currentToken)) { + // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (is_numeric($this->currentToken)) { + // If it's a number or a percent + if ($this->lookAhead === '%') { + $result = $this->createTree('ptgPercent', $this->currentToken, ''); + $this->advance(); // Skip the percentage operator once we've pre-built that tree + } else { + $result = $this->createTree($this->currentToken, '', ''); + } + $this->advance(); + + return $result; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $this->currentToken)) { + // if it's a function call + return $this->func(); + } + + throw new WriterException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter); + } + + /** + * It parses a function call. It assumes the following rule: + * Func -> ( Expr [,Expr]* ). + * + * @return mixed The parsed ptg'd tree on success + */ + private function func() + { + $num_args = 0; // number of arguments received + $function = strtoupper($this->currentToken); + $result = ''; // initialize result + $this->advance(); + $this->advance(); // eat the "(" + while ($this->currentToken !== ')') { + if ($num_args > 0) { + if ($this->currentToken === ',' || $this->currentToken === ';') { + $this->advance(); // eat the "," or ";" + } else { + throw new WriterException("Syntax error: comma expected in function $function, arg #{$num_args}"); + } + $result2 = $this->condition(); + $result = $this->createTree('arg', $result, $result2); + } else { // first argument + $result2 = $this->condition(); + $result = $this->createTree('arg', '', $result2); + } + ++$num_args; + } + if (!isset($this->functions[$function])) { + throw new WriterException("Function $function() doesn't exist"); + } + $args = $this->functions[$function][1]; + // If fixed number of args eg. TIME($i, $j, $k). Check that the number of args is valid. + if (($args >= 0) && ($args != $num_args)) { + throw new WriterException("Incorrect number of arguments in function $function() "); + } + + $result = $this->createTree($function, $result, $num_args); + $this->advance(); // eat the ")" + + return $result; + } + + /** + * Creates a tree. In fact an array which may have one or two arrays (sub-trees) + * as elements. + * + * @param mixed $value the value of this node + * @param mixed $left the left array (sub-tree) or a final node + * @param mixed $right the right array (sub-tree) or a final node + * + * @return array A tree + */ + private function createTree($value, $left, $right) + { + return ['value' => $value, 'left' => $left, 'right' => $right]; + } + + /** + * Builds a string containing the tree in reverse polish notation (What you + * would use in a HP calculator stack). + * The following tree:. + * + * + + * / \ + * 2 3 + * + * produces: "23+" + * + * The following tree: + * + * + + * / \ + * 3 * + * / \ + * 6 A1 + * + * produces: "36A1*+" + * + * In fact all operands, functions, references, etc... are written as ptg's + * + * @param array $tree the optional tree to convert + * + * @return string The tree in reverse polish notation + */ + public function toReversePolish($tree = []) + { + $polish = ''; // the string we are going to return + if (empty($tree)) { // If it's the first call use parseTree + $tree = $this->parseTree; + } + + if (is_array($tree['left'])) { + $converted_tree = $this->toReversePolish($tree['left']); + $polish .= $converted_tree; + } elseif ($tree['left'] != '') { // It's a final node + $converted_tree = $this->convert($tree['left']); + $polish .= $converted_tree; + } + if (is_array($tree['right'])) { + $converted_tree = $this->toReversePolish($tree['right']); + $polish .= $converted_tree; + } elseif ($tree['right'] != '') { // It's a final node + $converted_tree = $this->convert($tree['right']); + $polish .= $converted_tree; + } + // if it's a function convert it here (so we can set it's arguments) + if (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/", $tree['value']) && + !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) && + !preg_match('/^[A-Ia-i]?[A-Za-z](\\d+)\\.\\.[A-Ia-i]?[A-Za-z](\\d+)$/', $tree['value']) && + !is_numeric($tree['value']) && + !isset($this->ptg[$tree['value']])) { + // left subtree for a function is always an array. + if ($tree['left'] != '') { + $left_tree = $this->toReversePolish($tree['left']); + } else { + $left_tree = ''; + } + // add it's left subtree and return. + return $left_tree . $this->convertFunction($tree['value'], $tree['right']); + } + $converted_tree = $this->convert($tree['value']); + + return $polish . $converted_tree; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php new file mode 100755 index 0000000..d5f61bf --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -0,0 +1,1147 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Workbook extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * The BIFF file size for the workbook. + * + * @var int + * + * @see calcSheetOffsets() + */ + private $biffSize; + + /** + * XF Writers. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Xf[] + */ + private $xfWriters = []; + + /** + * Array containing the colour palette. + * + * @var array + */ + private $palette; + + /** + * The codepage indicates the text encoding used for strings. + * + * @var int + */ + private $codepage; + + /** + * The country code used for localization. + * + * @var int + */ + private $countryCode; + + /** + * Workbook. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Fonts writers. + * + * @var Font[] + */ + private $fontWriters = []; + + /** + * Added fonts. Maps from font's hash => index in workbook. + * + * @var array + */ + private $addedFonts = []; + + /** + * Shared number formats. + * + * @var array + */ + private $numberFormats = []; + + /** + * Added number formats. Maps from numberFormat's hash => index in workbook. + * + * @var array + */ + private $addedNumberFormats = []; + + /** + * Sizes of the binary worksheet streams. + * + * @var array + */ + private $worksheetSizes = []; + + /** + * Offsets of the binary worksheet streams relative to the start of the global workbook stream. + * + * @var array + */ + private $worksheetOffsets = []; + + /** + * Total number of shared strings in workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Number of unique shared strings in workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Array of unique shared strings in workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Escher object corresponding to MSODRAWINGGROUP. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Class constructor. + * + * @param Spreadsheet $spreadsheet The Workbook + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array $str_table String Table + * @param array $colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + */ + public function __construct(Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, Parser $parser) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->parser = $parser; + $this->biffSize = 0; + $this->palette = []; + $this->countryCode = -1; + + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->setPaletteXl97(); + + $this->spreadsheet = $spreadsheet; + + $this->codepage = 0x04B0; + + // Add empty sheets and Build color cache + $countSheets = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $phpSheet = $spreadsheet->getSheet($i); + + $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser + + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $i, $i); + $this->parser->references[] = $ref; // Register reference with parser + + // Sheet tab colors? + if ($phpSheet->isTabColorSet()) { + $this->addColor($phpSheet->getTabColor()->getRGB()); + } + } + } + + /** + * Add a new XF writer. + * + * @param bool $isStyleXf Is it a style XF? + * + * @return int Index to XF record + */ + public function addXfWriter(Style $style, $isStyleXf = false) + { + $xfWriter = new Xf($style); + $xfWriter->setIsStyleXf($isStyleXf); + + // Add the font if not already added + $fontIndex = $this->addFont($style->getFont()); + + // Assign the font index to the xf record + $xfWriter->setFontIndex($fontIndex); + + // Background colors, best to treat these after the font so black will come after white in custom palette + $xfWriter->setFgColor($this->addColor($style->getFill()->getStartColor()->getRGB())); + $xfWriter->setBgColor($this->addColor($style->getFill()->getEndColor()->getRGB())); + $xfWriter->setBottomColor($this->addColor($style->getBorders()->getBottom()->getColor()->getRGB())); + $xfWriter->setTopColor($this->addColor($style->getBorders()->getTop()->getColor()->getRGB())); + $xfWriter->setRightColor($this->addColor($style->getBorders()->getRight()->getColor()->getRGB())); + $xfWriter->setLeftColor($this->addColor($style->getBorders()->getLeft()->getColor()->getRGB())); + $xfWriter->setDiagColor($this->addColor($style->getBorders()->getDiagonal()->getColor()->getRGB())); + + // Add the number format if it is not a built-in one and not already added + if ($style->getNumberFormat()->getBuiltInFormatCode() === false) { + $numberFormatHashCode = $style->getNumberFormat()->getHashCode(); + + if (isset($this->addedNumberFormats[$numberFormatHashCode])) { + $numberFormatIndex = $this->addedNumberFormats[$numberFormatHashCode]; + } else { + $numberFormatIndex = 164 + count($this->numberFormats); + $this->numberFormats[$numberFormatIndex] = $style->getNumberFormat(); + $this->addedNumberFormats[$numberFormatHashCode] = $numberFormatIndex; + } + } else { + $numberFormatIndex = (int) $style->getNumberFormat()->getBuiltInFormatCode(); + } + + // Assign the number format index to xf record + $xfWriter->setNumberFormatIndex($numberFormatIndex); + + $this->xfWriters[] = $xfWriter; + + return count($this->xfWriters) - 1; + } + + /** + * Add a font to added fonts. + * + * @return int Index to FONT record + */ + public function addFont(\PhpOffice\PhpSpreadsheet\Style\Font $font) + { + $fontHashCode = $font->getHashCode(); + if (isset($this->addedFonts[$fontHashCode])) { + $fontIndex = $this->addedFonts[$fontHashCode]; + } else { + $countFonts = count($this->fontWriters); + $fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1; + + $fontWriter = new Font($font); + $fontWriter->setColorIndex($this->addColor($font->getColor()->getRGB())); + $this->fontWriters[] = $fontWriter; + + $this->addedFonts[$fontHashCode] = $fontIndex; + } + + return $fontIndex; + } + + /** + * Alter color palette adding a custom color. + * + * @param string $rgb E.g. 'FF00AA' + * + * @return int Color index + */ + private function addColor($rgb) + { + if (!isset($this->colors[$rgb])) { + $color = + [ + hexdec(substr($rgb, 0, 2)), + hexdec(substr($rgb, 2, 2)), + hexdec(substr($rgb, 4)), + 0, + ]; + $colorIndex = array_search($color, $this->palette); + if ($colorIndex) { + $this->colors[$rgb] = $colorIndex; + } else { + if (count($this->colors) === 0) { + $lastColor = 7; + } else { + $lastColor = end($this->colors); + } + if ($lastColor < 57) { + // then we add a custom color altering the palette + $colorIndex = $lastColor + 1; + $this->palette[$colorIndex] = $color; + $this->colors[$rgb] = $colorIndex; + } else { + // no room for more custom colors, just map to black + $colorIndex = 0; + } + } + } else { + // fetch already added custom color + $colorIndex = $this->colors[$rgb]; + } + + return $colorIndex; + } + + /** + * Sets the colour palette to the Excel 97+ default. + */ + private function setPaletteXl97(): void + { + $this->palette = [ + 0x08 => [0x00, 0x00, 0x00, 0x00], + 0x09 => [0xff, 0xff, 0xff, 0x00], + 0x0A => [0xff, 0x00, 0x00, 0x00], + 0x0B => [0x00, 0xff, 0x00, 0x00], + 0x0C => [0x00, 0x00, 0xff, 0x00], + 0x0D => [0xff, 0xff, 0x00, 0x00], + 0x0E => [0xff, 0x00, 0xff, 0x00], + 0x0F => [0x00, 0xff, 0xff, 0x00], + 0x10 => [0x80, 0x00, 0x00, 0x00], + 0x11 => [0x00, 0x80, 0x00, 0x00], + 0x12 => [0x00, 0x00, 0x80, 0x00], + 0x13 => [0x80, 0x80, 0x00, 0x00], + 0x14 => [0x80, 0x00, 0x80, 0x00], + 0x15 => [0x00, 0x80, 0x80, 0x00], + 0x16 => [0xc0, 0xc0, 0xc0, 0x00], + 0x17 => [0x80, 0x80, 0x80, 0x00], + 0x18 => [0x99, 0x99, 0xff, 0x00], + 0x19 => [0x99, 0x33, 0x66, 0x00], + 0x1A => [0xff, 0xff, 0xcc, 0x00], + 0x1B => [0xcc, 0xff, 0xff, 0x00], + 0x1C => [0x66, 0x00, 0x66, 0x00], + 0x1D => [0xff, 0x80, 0x80, 0x00], + 0x1E => [0x00, 0x66, 0xcc, 0x00], + 0x1F => [0xcc, 0xcc, 0xff, 0x00], + 0x20 => [0x00, 0x00, 0x80, 0x00], + 0x21 => [0xff, 0x00, 0xff, 0x00], + 0x22 => [0xff, 0xff, 0x00, 0x00], + 0x23 => [0x00, 0xff, 0xff, 0x00], + 0x24 => [0x80, 0x00, 0x80, 0x00], + 0x25 => [0x80, 0x00, 0x00, 0x00], + 0x26 => [0x00, 0x80, 0x80, 0x00], + 0x27 => [0x00, 0x00, 0xff, 0x00], + 0x28 => [0x00, 0xcc, 0xff, 0x00], + 0x29 => [0xcc, 0xff, 0xff, 0x00], + 0x2A => [0xcc, 0xff, 0xcc, 0x00], + 0x2B => [0xff, 0xff, 0x99, 0x00], + 0x2C => [0x99, 0xcc, 0xff, 0x00], + 0x2D => [0xff, 0x99, 0xcc, 0x00], + 0x2E => [0xcc, 0x99, 0xff, 0x00], + 0x2F => [0xff, 0xcc, 0x99, 0x00], + 0x30 => [0x33, 0x66, 0xff, 0x00], + 0x31 => [0x33, 0xcc, 0xcc, 0x00], + 0x32 => [0x99, 0xcc, 0x00, 0x00], + 0x33 => [0xff, 0xcc, 0x00, 0x00], + 0x34 => [0xff, 0x99, 0x00, 0x00], + 0x35 => [0xff, 0x66, 0x00, 0x00], + 0x36 => [0x66, 0x66, 0x99, 0x00], + 0x37 => [0x96, 0x96, 0x96, 0x00], + 0x38 => [0x00, 0x33, 0x66, 0x00], + 0x39 => [0x33, 0x99, 0x66, 0x00], + 0x3A => [0x00, 0x33, 0x00, 0x00], + 0x3B => [0x33, 0x33, 0x00, 0x00], + 0x3C => [0x99, 0x33, 0x00, 0x00], + 0x3D => [0x99, 0x33, 0x66, 0x00], + 0x3E => [0x33, 0x33, 0x99, 0x00], + 0x3F => [0x33, 0x33, 0x33, 0x00], + ]; + } + + /** + * Assemble worksheets into a workbook and send the BIFF data to an OLE + * storage. + * + * @param array $pWorksheetSizes The sizes in bytes of the binary worksheet streams + * + * @return string Binary data for workbook stream + */ + public function writeWorkbook(array $pWorksheetSizes) + { + $this->worksheetSizes = $pWorksheetSizes; + + // Calculate the number of selected worksheet tabs and call the finalization + // methods for each worksheet + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // Add part 1 of the Workbook globals, what goes before the SHEET records + $this->storeBof(0x0005); + $this->writeCodepage(); + $this->writeWindow1(); + + $this->writeDateMode(); + $this->writeAllFonts(); + $this->writeAllNumberFormats(); + $this->writeAllXfs(); + $this->writeAllStyles(); + $this->writePalette(); + + // Prepare part 3 of the workbook global stream, what goes after the SHEET records + $part3 = ''; + if ($this->countryCode !== -1) { + $part3 .= $this->writeCountry(); + } + $part3 .= $this->writeRecalcId(); + + $part3 .= $this->writeSupbookInternal(); + /* TODO: store external SUPBOOK records and XCT and CRN records + in case of external references for BIFF8 */ + $part3 .= $this->writeExternalsheetBiff8(); + $part3 .= $this->writeAllDefinedNamesBiff8(); + $part3 .= $this->writeMsoDrawingGroup(); + $part3 .= $this->writeSharedStringsTable(); + + $part3 .= $this->writeEof(); + + // Add part 2 of the Workbook globals, the SHEET records + $this->calcSheetOffsets(); + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->writeBoundSheet($this->spreadsheet->getSheet($i), $this->worksheetOffsets[$i]); + } + + // Add part 3 of the Workbook globals + $this->_data .= $part3; + + return $this->_data; + } + + /** + * Calculate offsets for Worksheet BOF records. + */ + private function calcSheetOffsets(): void + { + $boundsheet_length = 10; // fixed length for a BOUNDSHEET record + + // size of Workbook globals part 1 + 3 + $offset = $this->_datasize; + + // add size of Workbook globals part 2, the length of the SHEET records + $total_worksheets = count($this->spreadsheet->getAllSheets()); + foreach ($this->spreadsheet->getWorksheetIterator() as $sheet) { + $offset += $boundsheet_length + strlen(StringHelper::UTF8toBIFF8UnicodeShort($sheet->getTitle())); + } + + // add the sizes of each of the Sheet substreams, respectively + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->worksheetOffsets[$i] = $offset; + $offset += $this->worksheetSizes[$i]; + } + $this->biffSize = $offset; + } + + /** + * Store the Excel FONT records. + */ + private function writeAllFonts(): void + { + foreach ($this->fontWriters as $fontWriter) { + $this->append($fontWriter->writeFont()); + } + } + + /** + * Store user defined numerical formats i.e. FORMAT records. + */ + private function writeAllNumberFormats(): void + { + foreach ($this->numberFormats as $numberFormatIndex => $numberFormat) { + $this->writeNumberFormat($numberFormat->getFormatCode(), $numberFormatIndex); + } + } + + /** + * Write all XF records. + */ + private function writeAllXfs(): void + { + foreach ($this->xfWriters as $xfWriter) { + $this->append($xfWriter->writeXf()); + } + } + + /** + * Write all STYLE records. + */ + private function writeAllStyles(): void + { + $this->writeStyle(); + } + + /** + * Writes all the DEFINEDNAME records (BIFF8). + * So far this is only used for repeating rows/columns (print titles) and print areas. + */ + private function writeAllDefinedNamesBiff8() + { + $chunk = ''; + + // Named ranges + if (count($this->spreadsheet->getNamedRanges()) > 0) { + // Loop named ranges + $namedRanges = $this->spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + // Create absolute coordinate + $range = Coordinate::splitRange($namedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteCoordinate($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteCoordinate($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); // e.g. Sheet1!$A$1:$B$2 + + // parse formula + try { + $error = $this->parser->parse($range); + $formulaData = $this->parser->toReversePolish(); + + // make sure tRef3d is of type tRef3dR (0x3A) + if (isset($formulaData[0]) && ($formulaData[0] == "\x7A" || $formulaData[0] == "\x5A")) { + $formulaData = "\x3A" . substr($formulaData, 1); + } + + if ($namedRange->getLocalOnly()) { + // local scope + $scope = $this->spreadsheet->getIndex($namedRange->getScope()) + 1; + } else { + // global scope + $scope = 0; + } + $chunk .= $this->writeData($this->writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false)); + } catch (PhpSpreadsheetException $e) { + // do nothing + } + } + } + + // total number of sheets + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // write the print titles (repeating rows, columns), if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + // simultaneous repeatColumns repeatRows + if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + + // construct formula data manually + $formulaData = pack('Cv', 0x29, 0x17); // tMemFunc + $formulaData .= pack('Cvvvvv', 0x3B, $i, 0, 65535, $colmin, $colmax); // tArea3d + $formulaData .= pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, 0, 255); // tArea3d + $formulaData .= pack('C', 0x10); // tList + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + + // (exclusive) either repeatColumns or repeatRows + } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { + // Columns to repeat + if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + } else { + $colmin = 0; + $colmax = 255; + } + // Rows to repeat + if ($sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + } else { + $rowmin = 0; + $rowmax = 65535; + } + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData = pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, $colmin, $colmax); + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + } + } + + // write the print areas, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + if ($sheetSetup->isPrintAreaSet()) { + // Print area, e.g. A3:J6,H1:X20 + $printArea = Coordinate::splitRange($sheetSetup->getPrintArea()); + $countPrintArea = count($printArea); + + $formulaData = ''; + for ($j = 0; $j < $countPrintArea; ++$j) { + $printAreaRect = $printArea[$j]; // e.g. A3:J6 + $printAreaRect[0] = Coordinate::coordinateFromString($printAreaRect[0]); + $printAreaRect[1] = Coordinate::coordinateFromString($printAreaRect[1]); + + $print_rowmin = $printAreaRect[0][1] - 1; + $print_rowmax = $printAreaRect[1][1] - 1; + $print_colmin = Coordinate::columnIndexFromString($printAreaRect[0][0]) - 1; + $print_colmax = Coordinate::columnIndexFromString($printAreaRect[1][0]) - 1; + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData .= pack('Cvvvvv', 0x3B, $i, $print_rowmin, $print_rowmax, $print_colmin, $print_colmax); + + if ($j > 0) { + $formulaData .= pack('C', 0x10); // list operator token ',' + } + } + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x06), $formulaData, $i + 1, true)); + } + } + + // write autofilters, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetAutoFilter = $this->spreadsheet->getSheet($i)->getAutoFilter(); + $autoFilterRange = $sheetAutoFilter->getRange(); + if (!empty($autoFilterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($autoFilterRange); + + //Autofilter built in name + $name = pack('C', 0x0D); + + $chunk .= $this->writeData($this->writeShortNameBiff8($name, $i + 1, $rangeBounds, true)); + } + } + + return $chunk; + } + + /** + * Write a DEFINEDNAME record for BIFF8 using explicit binary formula data. + * + * @param string $name The name in UTF-8 + * @param string $formulaData The binary formula data + * @param int $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param bool $isBuiltIn Built-in name? + * + * @return string Complete binary record data + */ + private function writeDefinedNameBiff8($name, $formulaData, $sheetIndex = 0, $isBuiltIn = false) + { + $record = 0x0018; + + // option flags + $options = $isBuiltIn ? 0x20 : 0x00; + + // length of the name, character count + $nlen = StringHelper::countCharacters($name); + + // name with stripped length field + $name = substr(StringHelper::UTF8toBIFF8UnicodeLong($name), 2); + + // size of the formula (in bytes) + $sz = strlen($formulaData); + + // combine the parts + $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0) + . $name . $formulaData; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Write a short NAME record. + * + * @param string $name + * @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param integer[][] $rangeBounds range boundaries + * @param bool $isHidden + * + * @return string Complete binary record data + * */ + private function writeShortNameBiff8($name, $sheetIndex, $rangeBounds, $isHidden = false) + { + $record = 0x0018; + + // option flags + $options = ($isHidden ? 0x21 : 0x00); + + $extra = pack( + 'Cvvvvv', + 0x3B, + $sheetIndex - 1, + $rangeBounds[0][1] - 1, + $rangeBounds[1][1] - 1, + $rangeBounds[0][0] - 1, + $rangeBounds[1][0] - 1 + ); + + // size of the formula (in bytes) + $sz = strlen($extra); + + // combine the parts + $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0) + . $name . $extra; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Stores the CODEPAGE biff record. + */ + private function writeCodepage(): void + { + $record = 0x0042; // Record identifier + $length = 0x0002; // Number of bytes to follow + $cv = $this->codepage; // The code page + + $header = pack('vv', $record, $length); + $data = pack('v', $cv); + + $this->append($header . $data); + } + + /** + * Write Excel BIFF WINDOW1 record. + */ + private function writeWindow1(): void + { + $record = 0x003D; // Record identifier + $length = 0x0012; // Number of bytes to follow + + $xWn = 0x0000; // Horizontal position of window + $yWn = 0x0000; // Vertical position of window + $dxWn = 0x25BC; // Width of window + $dyWn = 0x1572; // Height of window + + $grbit = 0x0038; // Option flags + + // not supported by PhpSpreadsheet, so there is only one selected sheet, the active + $ctabsel = 1; // Number of workbook tabs selected + + $wTabRatio = 0x0258; // Tab to scrollbar ratio + + // not supported by PhpSpreadsheet, set to 0 + $itabFirst = 0; // 1st displayed worksheet + $itabCur = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio); + $this->append($header . $data); + } + + /** + * Writes Excel BIFF BOUNDSHEET record. + * + * @param Worksheet $sheet Worksheet name + * @param int $offset Location of worksheet BOF + */ + private function writeBoundSheet($sheet, $offset): void + { + $sheetname = $sheet->getTitle(); + $record = 0x0085; // Record identifier + + // sheet state + switch ($sheet->getSheetState()) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE: + $ss = 0x00; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN: + $ss = 0x01; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN: + $ss = 0x02; + + break; + default: + $ss = 0x00; + + break; + } + + // sheet type + $st = 0x00; + + $grbit = 0x0000; // Visibility and sheet type + + $data = pack('VCC', $offset, $ss, $st); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname); + + $length = strlen($data); + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write Internal SUPBOOK record. + */ + private function writeSupbookInternal() + { + $record = 0x01AE; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401); + + return $this->writeData($header . $data); + } + + /** + * Writes the Excel BIFF EXTERNSHEET record. These references are used by + * formulas. + */ + private function writeExternalsheetBiff8() + { + $totalReferences = count($this->parser->references); + $record = 0x0017; // Record identifier + $length = 2 + 6 * $totalReferences; // Number of bytes to follow + + $supbook_index = 0; // FIXME: only using internal SUPBOOK record + $header = pack('vv', $record, $length); + $data = pack('v', $totalReferences); + for ($i = 0; $i < $totalReferences; ++$i) { + $data .= $this->parser->references[$i]; + } + + return $this->writeData($header . $data); + } + + /** + * Write Excel BIFF STYLE records. + */ + private function writeStyle(): void + { + $record = 0x0293; // Record identifier + $length = 0x0004; // Bytes to follow + + $ixfe = 0x8000; // Index to cell style XF + $BuiltIn = 0x00; // Built-in style + $iLevel = 0xff; // Outline style level + + $header = pack('vv', $record, $length); + $data = pack('vCC', $ixfe, $BuiltIn, $iLevel); + $this->append($header . $data); + } + + /** + * Writes Excel FORMAT record for non "built-in" numerical formats. + * + * @param string $format Custom format string + * @param int $ifmt Format index code + */ + private function writeNumberFormat($format, $ifmt): void + { + $record = 0x041E; // Record identifier + + $numberFormatString = StringHelper::UTF8toBIFF8UnicodeLong($format); + $length = 2 + strlen($numberFormatString); // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $ifmt) . $numberFormatString; + $this->append($header . $data); + } + + /** + * Write DATEMODE record to indicate the date system in use (1904 or 1900). + */ + private function writeDateMode(): void + { + $record = 0x0022; // Record identifier + $length = 0x0002; // Bytes to follow + + $f1904 = (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) + ? 1 + : 0; // Flag for 1904 date system + + $header = pack('vv', $record, $length); + $data = pack('v', $f1904); + $this->append($header . $data); + } + + /** + * Stores the COUNTRY record for localization. + * + * @return string + */ + private function writeCountry() + { + $record = 0x008C; // Record identifier + $length = 4; // Number of bytes to follow + + $header = pack('vv', $record, $length); + // using the same country code always for simplicity + $data = pack('vv', $this->countryCode, $this->countryCode); + + return $this->writeData($header . $data); + } + + /** + * Write the RECALCID record. + * + * @return string + */ + private function writeRecalcId() + { + $record = 0x01C1; // Record identifier + $length = 8; // Number of bytes to follow + + $header = pack('vv', $record, $length); + + // by inspection of real Excel files, MS Office Excel 2007 writes this + $data = pack('VV', 0x000001C1, 0x00001E667); + + return $this->writeData($header . $data); + } + + /** + * Stores the PALETTE biff record. + */ + private function writePalette(): void + { + $aref = $this->palette; + + $record = 0x0092; // Record identifier + $length = 2 + 4 * count($aref); // Number of bytes to follow + $ccv = count($aref); // Number of RGB values to follow + $data = ''; // The RGB data + + // Pack the RGB data + foreach ($aref as $color) { + foreach ($color as $byte) { + $data .= pack('C', $byte); + } + } + + $header = pack('vvv', $record, $length, $ccv); + $this->append($header . $data); + } + + /** + * Handling of the SST continue blocks is complicated by the need to include an + * additional continuation byte depending on whether the string is split between + * blocks or whether it starts at the beginning of the block. (There are also + * additional complications that will arise later when/if Rich Strings are + * supported). + * + * The Excel documentation says that the SST record should be followed by an + * EXTSST record. The EXTSST record is a hash table that is used to optimise + * access to SST. However, despite the documentation it doesn't seem to be + * required so we will ignore it. + * + * @return string Binary data + */ + private function writeSharedStringsTable() + { + // maximum size of record data (excluding record header) + $continue_limit = 8224; + + // initialize array of record data blocks + $recordDatas = []; + + // start SST record data block with total number of strings, total number of unique strings + $recordData = pack('VV', $this->stringTotal, $this->stringUnique); + + // loop through all (unique) strings in shared strings table + foreach (array_keys($this->stringTable) as $string) { + // here $string is a BIFF8 encoded string + + // length = character count + $headerinfo = unpack('vlength/Cencoding', $string); + + // currently, this is always 1 = uncompressed + $encoding = $headerinfo['encoding']; + + // initialize finished writing current $string + $finished = false; + + while ($finished === false) { + // normally, there will be only one cycle, but if string cannot immediately be written as is + // there will be need for more than one cylcle, if string longer than one record data block, there + // may be need for even more cycles + + if (strlen($recordData) + strlen($string) <= $continue_limit) { + // then we can write the string (or remainder of string) without any problems + $recordData .= $string; + + if (strlen($recordData) + strlen($string) == $continue_limit) { + // we close the record data block, and initialize a new one + $recordDatas[] = $recordData; + $recordData = ''; + } + + // we are finished writing this string + $finished = true; + } else { + // special treatment writing the string (or remainder of the string) + // If the string is very long it may need to be written in more than one CONTINUE record. + + // check how many bytes more there is room for in the current record + $space_remaining = $continue_limit - strlen($recordData); + + // minimum space needed + // uncompressed: 2 byte string length length field + 1 byte option flags + 2 byte character + // compressed: 2 byte string length length field + 1 byte option flags + 1 byte character + $min_space_needed = ($encoding == 1) ? 5 : 4; + + // We have two cases + // 1. space remaining is less than minimum space needed + // here we must waste the space remaining and move to next record data block + // 2. space remaining is greater than or equal to minimum space needed + // here we write as much as we can in the current block, then move to next record data block + + // 1. space remaining is less than minimum space needed + if ($space_remaining < $min_space_needed) { + // we close the block, store the block data + $recordDatas[] = $recordData; + + // and start new record data block where we start writing the string + $recordData = ''; + + // 2. space remaining is greater than or equal to minimum space needed + } else { + // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below + $effective_space_remaining = $space_remaining; + + // for uncompressed strings, sometimes effective space remaining is reduced by 1 + if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) { + --$effective_space_remaining; + } + + // one block fininshed, store the block data + $recordData .= substr($string, 0, $effective_space_remaining); + + $string = substr($string, $effective_space_remaining); // for next cycle in while loop + $recordDatas[] = $recordData; + + // start new record data block with the repeated option flags + $recordData = pack('C', $encoding); + } + } + } + } + + // Store the last record data block unless it is empty + // if there was no need for any continue records, this will be the for SST record data block itself + if (strlen($recordData) > 0) { + $recordDatas[] = $recordData; + } + + // combine into one chunk with all the blocks SST, CONTINUE,... + $chunk = ''; + foreach ($recordDatas as $i => $recordData) { + // first block should have the SST record header, remaing should have CONTINUE header + $record = ($i == 0) ? 0x00FC : 0x003C; + + $header = pack('vv', $record, strlen($recordData)); + $data = $header . $recordData; + + $chunk .= $this->writeData($data); + } + + return $chunk; + } + + /** + * Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records. + */ + private function writeMsoDrawingGroup() + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + + $record = 0x00EB; + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $this->writeData($header . $data); + } + + return ''; + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(?\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null): void + { + $this->escher = $pValue; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php new file mode 100755 index 0000000..0dce7ba --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -0,0 +1,4484 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Worksheet extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * Maximum number of characters for a string (LABEL record in BIFF5). + * + * @var int + */ + private $xlsStringMaxLength; + + /** + * Array containing format information for columns. + * + * @var array + */ + private $columnInfo; + + /** + * Array containing the selected area for the worksheet. + * + * @var array + */ + private $selection; + + /** + * The active pane for the worksheet. + * + * @var int + */ + private $activePane; + + /** + * Whether to use outline. + * + * @var int + */ + private $outlineOn; + + /** + * Auto outline styles. + * + * @var bool + */ + private $outlineStyle; + + /** + * Whether to have outline summary below. + * + * @var bool + */ + private $outlineBelow; + + /** + * Whether to have outline summary at the right. + * + * @var bool + */ + private $outlineRight; + + /** + * Reference to the total number of strings in the workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Reference to the number of unique strings in the workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Reference to the array containing all the unique strings in the workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Index of first used row (at least 0). + * + * @var int + */ + private $firstRowIndex; + + /** + * Index of last used row. (no used rows means -1). + * + * @var int + */ + private $lastRowIndex; + + /** + * Index of first used column (at least 0). + * + * @var int + */ + private $firstColumnIndex; + + /** + * Index of last used column (no used columns means -1). + * + * @var int + */ + private $lastColumnIndex; + + /** + * Sheet object. + * + * @var \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + */ + public $phpSheet; + + /** + * Count cell style Xfs. + * + * @var int + */ + private $countCellStyleXfs; + + /** + * Escher object corresponding to MSODRAWING. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Array of font hashes associated to FONT records index. + * + * @var array + */ + public $fontHashIndex; + + /** + * @var bool + */ + private $preCalculateFormulas; + + /** + * @var int + */ + private $printHeaders; + + /** + * Constructor. + * + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array &$str_table String Table + * @param array &$colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + * @param bool $preCalculateFormulas Flag indicating whether formulas should be calculated or just written + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet The worksheet to write + */ + public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, Parser $parser, $preCalculateFormulas, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->preCalculateFormulas = $preCalculateFormulas; + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->parser = $parser; + + $this->phpSheet = $phpSheet; + + $this->xlsStringMaxLength = 255; + $this->columnInfo = []; + $this->selection = [0, 0, 0, 0]; + $this->activePane = 3; + + $this->printHeaders = 0; + + $this->outlineStyle = 0; + $this->outlineBelow = 1; + $this->outlineRight = 1; + $this->outlineOn = 1; + + $this->fontHashIndex = []; + + // calculate values for DIMENSIONS record + $minR = 1; + $minC = 'A'; + + $maxR = $this->phpSheet->getHighestRow(); + $maxC = $this->phpSheet->getHighestColumn(); + + // Determine lowest and highest column and row + $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR; + + $this->firstColumnIndex = Coordinate::columnIndexFromString($minC); + $this->lastColumnIndex = Coordinate::columnIndexFromString($maxC); + +// if ($this->firstColumnIndex > 255) $this->firstColumnIndex = 255; + if ($this->lastColumnIndex > 255) { + $this->lastColumnIndex = 255; + } + + $this->countCellStyleXfs = count($phpSheet->getParent()->getCellStyleXfCollection()); + } + + /** + * Add data to the beginning of the workbook (note the reverse order) + * and to the end of the workbook. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::storeWorkbook() + */ + public function close(): void + { + $phpSheet = $this->phpSheet; + + // Storing selected cells and active sheet because it changes while parsing cells with formulas. + $selectedCells = $this->phpSheet->getSelectedCells(); + $activeSheetIndex = $this->phpSheet->getParent()->getActiveSheetIndex(); + + // Write BOF record + $this->storeBof(0x0010); + + // Write PRINTHEADERS + $this->writePrintHeaders(); + + // Write PRINTGRIDLINES + $this->writePrintGridlines(); + + // Write GRIDSET + $this->writeGridset(); + + // Calculate column widths + $phpSheet->calculateColumnWidths(); + + // Column dimensions + if (($defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth()) < 0) { + $defaultWidth = \PhpOffice\PhpSpreadsheet\Shared\Font::getDefaultColumnWidthByFont($phpSheet->getParent()->getDefaultStyle()->getFont()); + } + + $columnDimensions = $phpSheet->getColumnDimensions(); + $maxCol = $this->lastColumnIndex - 1; + for ($i = 0; $i <= $maxCol; ++$i) { + $hidden = 0; + $level = 0; + $xfIndex = 15; // there are 15 cell style Xfs + + $width = $defaultWidth; + + $columnLetter = Coordinate::stringFromColumnIndex($i + 1); + if (isset($columnDimensions[$columnLetter])) { + $columnDimension = $columnDimensions[$columnLetter]; + if ($columnDimension->getWidth() >= 0) { + $width = $columnDimension->getWidth(); + } + $hidden = $columnDimension->getVisible() ? 0 : 1; + $level = $columnDimension->getOutlineLevel(); + $xfIndex = $columnDimension->getXfIndex() + 15; // there are 15 cell style Xfs + } + + // Components of columnInfo: + // $firstcol first column on the range + // $lastcol last column on the range + // $width width to set + // $xfIndex The optional cell style Xf index to apply to the columns + // $hidden The optional hidden atribute + // $level The optional outline level + $this->columnInfo[] = [$i, $i, $width, $xfIndex, $hidden, $level]; + } + + // Write GUTS + $this->writeGuts(); + + // Write DEFAULTROWHEIGHT + $this->writeDefaultRowHeight(); + // Write WSBOOL + $this->writeWsbool(); + // Write horizontal and vertical page breaks + $this->writeBreaks(); + // Write page header + $this->writeHeader(); + // Write page footer + $this->writeFooter(); + // Write page horizontal centering + $this->writeHcenter(); + // Write page vertical centering + $this->writeVcenter(); + // Write left margin + $this->writeMarginLeft(); + // Write right margin + $this->writeMarginRight(); + // Write top margin + $this->writeMarginTop(); + // Write bottom margin + $this->writeMarginBottom(); + // Write page setup + $this->writeSetup(); + // Write sheet protection + $this->writeProtect(); + // Write SCENPROTECT + $this->writeScenProtect(); + // Write OBJECTPROTECT + $this->writeObjectProtect(); + // Write sheet password + $this->writePassword(); + // Write DEFCOLWIDTH record + $this->writeDefcol(); + + // Write the COLINFO records if they exist + if (!empty($this->columnInfo)) { + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $this->writeColinfo($this->columnInfo[$i]); + } + } + $autoFilterRange = $phpSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // Write AUTOFILTERINFO + $this->writeAutoFilterInfo(); + } + + // Write sheet dimensions + $this->writeDimensions(); + + // Row dimensions + foreach ($phpSheet->getRowDimensions() as $rowDimension) { + $xfIndex = $rowDimension->getXfIndex() + 15; // there are 15 cellXfs + $this->writeRow($rowDimension->getRowIndex() - 1, $rowDimension->getRowHeight(), $xfIndex, ($rowDimension->getVisible() ? '0' : '1'), $rowDimension->getOutlineLevel()); + } + + // Write Cells + foreach ($phpSheet->getCoordinates() as $coordinate) { + $cell = $phpSheet->getCell($coordinate); + $row = $cell->getRow() - 1; + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + // Don't break Excel break the code! + if ($row > 65535 || $column > 255) { + throw new WriterException('Rows or columns overflow! Excel5 has limit to 65535 rows and 255 columns. Use XLSX instead.'); + } + + // Write cell value + $xfIndex = $cell->getXfIndex() + 15; // there are 15 cell style Xfs + + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $arrcRun = []; + $str_len = StringHelper::countCharacters($cVal->getPlainText(), 'UTF-8'); + $str_pos = 0; + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + // FONT Index + if ($element instanceof Run) { + $str_fontidx = $this->fontHashIndex[$element->getFont()->getHashCode()]; + } else { + $str_fontidx = 0; + } + $arrcRun[] = ['strlen' => $str_pos, 'fontidx' => $str_fontidx]; + // Position FROM + $str_pos += StringHelper::countCharacters($element->getText(), 'UTF-8'); + } + $this->writeRichTextString($row, $column, $cVal->getPlainText(), $xfIndex, $arrcRun); + } else { + switch ($cell->getDatatype()) { + case DataType::TYPE_STRING: + case DataType::TYPE_NULL: + if ($cVal === '' || $cVal === null) { + $this->writeBlank($row, $column, $xfIndex); + } else { + $this->writeString($row, $column, $cVal, $xfIndex); + } + + break; + case DataType::TYPE_NUMERIC: + $this->writeNumber($row, $column, $cVal, $xfIndex); + + break; + case DataType::TYPE_FORMULA: + $calculatedValue = $this->preCalculateFormulas ? + $cell->getCalculatedValue() : null; + if (self::WRITE_FORMULA_EXCEPTION == $this->writeFormula($row, $column, $cVal, $xfIndex, $calculatedValue)) { + if ($calculatedValue === null) { + $calculatedValue = $cell->getCalculatedValue(); + } + $calctype = gettype($calculatedValue); + switch ($calctype) { + case 'integer': + case 'double': + $this->writeNumber($row, $column, $calculatedValue, $xfIndex); + + break; + case 'string': + $this->writeString($row, $column, $calculatedValue, $xfIndex); + + break; + case 'boolean': + $this->writeBoolErr($row, $column, $calculatedValue, 0, $xfIndex); + + break; + default: + $this->writeString($row, $column, $cVal, $xfIndex); + } + } + + break; + case DataType::TYPE_BOOL: + $this->writeBoolErr($row, $column, $cVal, 0, $xfIndex); + + break; + case DataType::TYPE_ERROR: + $this->writeBoolErr($row, $column, self::mapErrorCode($cVal), 1, $xfIndex); + + break; + } + } + } + + // Append + $this->writeMsoDrawing(); + + // Restoring active sheet. + $this->phpSheet->getParent()->setActiveSheetIndex($activeSheetIndex); + + // Write WINDOW2 record + $this->writeWindow2(); + + // Write PLV record + $this->writePageLayoutView(); + + // Write ZOOM record + $this->writeZoom(); + if ($phpSheet->getFreezePane()) { + $this->writePanes(); + } + + // Restoring selected cells. + $this->phpSheet->setSelectedCells($selectedCells); + + // Write SELECTION record + $this->writeSelection(); + + // Write MergedCellsTable Record + $this->writeMergedCells(); + + // Hyperlinks + foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { + [$column, $row] = Coordinate::coordinateFromString($coordinate); + + $url = $hyperlink->getUrl(); + + if (strpos($url, 'sheet://') !== false) { + // internal to current workbook + $url = str_replace('sheet://', 'internal:', $url); + } elseif (preg_match('/^(http:|https:|ftp:|mailto:)/', $url)) { + // URL + } else { + // external (local file) + $url = 'external:' . $url; + } + + $this->writeUrl($row - 1, Coordinate::columnIndexFromString($column) - 1, $url); + } + + $this->writeDataValidity(); + $this->writeSheetLayout(); + + // Write SHEETPROTECTION record + $this->writeSheetProtection(); + $this->writeRangeProtection(); + + $arrConditionalStyles = $phpSheet->getConditionalStylesCollection(); + if (!empty($arrConditionalStyles)) { + $arrConditional = []; + // @TODO CFRule & CFHeader + // Write CFHEADER record + $this->writeCFHeader(); + // Write ConditionalFormattingTable records + foreach ($arrConditionalStyles as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!isset($arrConditional[$conditional->getHashCode()])) { + // This hash code has been handled + $arrConditional[$conditional->getHashCode()] = true; + + // Write CFRULE record + $this->writeCFRule($conditional); + } + } + } + } + } + + $this->storeEof(); + } + + /** + * Write a cell range address in BIFF8 + * always fixed range + * See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format. + * + * @param string $range E.g. 'A1' or 'A1:B6' + * + * @return string Binary data + */ + private function writeBIFF8CellRangeAddressFixed($range) + { + $explodes = explode(':', $range); + + // extract first cell, e.g. 'A1' + $firstCell = $explodes[0]; + + // extract last cell, e.g. 'B6' + if (count($explodes) == 1) { + $lastCell = $firstCell; + } else { + $lastCell = $explodes[1]; + } + + $firstCellCoordinates = Coordinate::coordinateFromString($firstCell); // e.g. [0, 1] + $lastCellCoordinates = Coordinate::coordinateFromString($lastCell); // e.g. [1, 6] + + return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, Coordinate::columnIndexFromString($firstCellCoordinates[0]) - 1, Coordinate::columnIndexFromString($lastCellCoordinates[0]) - 1); + } + + /** + * Retrieves data from memory in one chunk, or from disk in $buffer + * sized chunks. + * + * @return string The data + */ + public function getData() + { + $buffer = 4096; + + // Return data stored in memory + if (isset($this->_data)) { + $tmp = $this->_data; + $this->_data = null; + + return $tmp; + } + + // No data to return + return false; + } + + /** + * Set the option to print the row and column headers on the printed page. + * + * @param int $print Whether to print the headers or not. Defaults to 1 (print). + */ + public function printRowColHeaders($print = 1): void + { + $this->printHeaders = $print; + } + + /** + * This method sets the properties for outlining and grouping. The defaults + * correspond to Excel's defaults. + * + * @param bool $visible + * @param bool $symbols_below + * @param bool $symbols_right + * @param bool $auto_style + */ + public function setOutline($visible = true, $symbols_below = true, $symbols_right = true, $auto_style = false): void + { + $this->outlineOn = $visible; + $this->outlineBelow = $symbols_below; + $this->outlineRight = $symbols_right; + $this->outlineStyle = $auto_style; + + // Ensure this is a boolean vale for Window2 + if ($this->outlineOn) { + $this->outlineOn = 1; + } + } + + /** + * Write a double to the specified row and column (zero indexed). + * An integer can be written as a double. Excel will display an + * integer. $format is optional. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param float $num The number to write + * @param mixed $xfIndex The optional XF format + * + * @return int + */ + private function writeNumber($row, $col, $num, $xfIndex) + { + $record = 0x0203; // Record identifier + $length = 0x000E; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $xl_double = pack('d', $num); + if (self::getByteOrder()) { // if it's Big Endian + $xl_double = strrev($xl_double); + } + + $this->append($header . $data . $xl_double); + + return 0; + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex Index to XF record + */ + private function writeString($row, $col, $str, $xfIndex): void + { + $this->writeLabelSst($row, $col, $str, $xfIndex); + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version + * It differs from writeString by the writing of rich text strings. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex The XF format index for the cell + * @param array $arrcRun Index to Font record and characters beginning + */ + private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun): void + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a string to the specified row and column (zero indexed). + * This is the BIFF8 version (no 255 chars limit). + * $format is optional. + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $str The string to write + * @param mixed $xfIndex The XF format index for the cell + */ + private function writeLabelSst($row, $col, $str, $xfIndex): void + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + + $str = StringHelper::UTF8toBIFF8UnicodeLong($str); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a blank cell to the specified row and column (zero indexed). + * A blank cell is used to specify formatting without adding a string + * or a number. + * + * A blank cell without a format serves no purpose. Therefore, we don't write + * a BLANK record unless a format is specified. + * + * Returns 0 : normal termination (including no format) + * -1 : insufficient number of arguments + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param mixed $xfIndex The XF format index + * + * @return int + */ + public function writeBlank($row, $col, $xfIndex) + { + $record = 0x0201; // Record identifier + $length = 0x0006; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $this->append($header . $data); + + return 0; + } + + /** + * Write a boolean or an error type to the specified row and column (zero indexed). + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param int $value + * @param bool $isError Error or Boolean? + * @param int $xfIndex + * + * @return int + */ + private function writeBoolErr($row, $col, $value, $isError, $xfIndex) + { + $record = 0x0205; + $length = 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError); + $this->append($header . $data); + + return 0; + } + + const WRITE_FORMULA_NORMAL = 0; + const WRITE_FORMULA_ERRORS = -1; + const WRITE_FORMULA_RANGE = -2; + const WRITE_FORMULA_EXCEPTION = -3; + + /** + * Write a formula to the specified row and column (zero indexed). + * The textual representation of the formula is passed to the parser in + * Parser.php which returns a packed binary string. + * + * Returns 0 : WRITE_FORMULA_NORMAL normal termination + * -1 : WRITE_FORMULA_ERRORS formula errors (bad formula) + * -2 : WRITE_FORMULA_RANGE row or column out of range + * -3 : WRITE_FORMULA_EXCEPTION parse raised exception, probably due to definedname + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $formula The formula text string + * @param mixed $xfIndex The XF format index + * @param mixed $calculatedValue Calculated value + * + * @return int + */ + private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue) + { + $record = 0x0006; // Record identifier + + // Initialize possible additional value for STRING record that should be written after the FORMULA record? + $stringValue = null; + + // calculated value + if (isset($calculatedValue)) { + // Since we can't yet get the data type of the calculated value, + // we use best effort to determine data type + if (is_bool($calculatedValue)) { + // Boolean value + $num = pack('CCCvCv', 0x01, 0x00, (int) $calculatedValue, 0x00, 0x00, 0xFFFF); + } elseif (is_int($calculatedValue) || is_float($calculatedValue)) { + // Numeric value + $num = pack('d', $calculatedValue); + } elseif (is_string($calculatedValue)) { + $errorCodes = DataType::getErrorCodes(); + if (isset($errorCodes[$calculatedValue])) { + // Error value + $num = pack('CCCvCv', 0x02, 0x00, self::mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF); + } elseif ($calculatedValue === '') { + // Empty string (and BIFF8) + $num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } else { + // Non-empty string value (or empty string BIFF5) + $stringValue = $calculatedValue; + $num = pack('CCCvCv', 0x00, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } + } else { + // We are really not supposed to reach here + $num = pack('d', 0x00); + } + } else { + $num = pack('d', 0x00); + } + + $grbit = 0x03; // Option flags + $unknown = 0x0000; // Must be zero + + // Strip the '=' or '@' sign at the beginning of the formula string + if ($formula[0] == '=') { + $formula = substr($formula, 1); + } else { + // Error handling + $this->writeString($row, $col, 'Unrecognised character for formula', 0); + + return self::WRITE_FORMULA_ERRORS; + } + + // Parse the formula using the parser in Parser.php + try { + $error = $this->parser->parse($formula); + $formula = $this->parser->toReversePolish(); + + $formlen = strlen($formula); // Length of the binary string + $length = 0x16 + $formlen; // Length of the record data + + $header = pack('vv', $record, $length); + + $data = pack('vvv', $row, $col, $xfIndex) + . $num + . pack('vVv', $grbit, $unknown, $formlen); + $this->append($header . $data . $formula); + + // Append also a STRING record if necessary + if ($stringValue !== null) { + $this->writeStringRecord($stringValue); + } + + return self::WRITE_FORMULA_NORMAL; + } catch (PhpSpreadsheetException $e) { + return self::WRITE_FORMULA_EXCEPTION; + } + } + + /** + * Write a STRING record. This. + * + * @param string $stringValue + */ + private function writeStringRecord($stringValue): void + { + $record = 0x0207; // Record identifier + $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + + /** + * Write a hyperlink. + * This is comprised of two elements: the visible label and + * the invisible link. The visible label is the same as the link unless an + * alternative string is specified. The label is written using the + * writeString() method. Therefore the 255 characters string limit applies. + * $string and $format are optional. + * + * The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external + * directory url. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * -3 : long string truncated to 255 chars + * + * @param int $row Row + * @param int $col Column + * @param string $url URL string + * + * @return int + */ + private function writeUrl($row, $col, $url) + { + // Add start row and col to arg list + return $this->writeUrlRange($row, $col, $row, $col, $url); + } + + /** + * This is the more general form of writeUrl(). It allows a hyperlink to be + * written to a range of cells. This function also decides the type of hyperlink + * to be written. These are either, Web (http, ftp, mailto), Internal + * (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1'). + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlRange($row1, $col1, $row2, $col2, $url) + { + // Check for internal/external sheet links or default to web link + if (preg_match('[^internal:]', $url)) { + return $this->writeUrlInternal($row1, $col1, $row2, $col2, $url); + } + if (preg_match('[^external:]', $url)) { + return $this->writeUrlExternal($row1, $col1, $row2, $col2, $url); + } + + return $this->writeUrlWeb($row1, $col1, $row2, $col2, $url); + } + + /** + * Used to write http, ftp and mailto hyperlinks. + * The link type ($options) is 0x03 is the same as absolute dir ref without + * sheet. However it is differentiated by the $unknown2 data stream. + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlWeb($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', 'E0C9EA79F9BACE118C8200AA004BA90B'); + + // Pack the option flags + $options = pack('V', 0x03); + + // Convert URL to a null terminated wchar string + $url = implode("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY)); + $url = $url . "\0\0\0"; + + // Pack the length of the URL + $url_len = pack('V', strlen($url)); + + // Calculate the data length + $length = 0x34 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url); + + return 0; + } + + /** + * Used to write internal reference hyperlinks such as "Sheet1!A1". + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlInternal($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type + $url = preg_replace('/^internal:/', '', $url); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + + // Pack the option flags + $options = pack('V', 0x08); + + // Convert the URL type and to a null terminated wchar string + $url .= "\0"; + + // character count + $url_len = StringHelper::countCharacters($url); + $url_len = pack('V', $url_len); + + $url = StringHelper::convertEncoding($url, 'UTF-16LE', 'UTF-8'); + + // Calculate the data length + $length = 0x24 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $url_len . $url); + + return 0; + } + + /** + * Write links to external directory names such as 'c:\foo.xls', + * c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'. + * + * Note: Excel writes some relative links with the $dir_long string. We ignore + * these cases for the sake of simpler code. + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlExternal($row1, $col1, $row2, $col2, $url) + { + // Network drives are different. We will handle them separately + // MS/Novell network drives and shares start with \\ + if (preg_match('[^external:\\\\]', $url)) { + return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format)); + } + + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type and change Unix dir separator to Dos style (if needed) + // + $url = preg_replace('/^external:/', '', $url); + $url = preg_replace('/\//', '\\', $url); + + // Determine if the link is relative or absolute: + // relative if link contains no dir separator, "somefile.xls" + // relative if link starts with up-dir, "..\..\somefile.xls" + // otherwise, absolute + + $absolute = 0x00; // relative path + if (preg_match('/^[A-Z]:/', $url)) { + $absolute = 0x02; // absolute path on Windows, e.g. C:\... + } + $link_type = 0x01 | $absolute; + + // Determine if the link contains a sheet reference and change some of the + // parameters accordingly. + // Split the dir name and sheet name (if it exists) + $dir_long = $url; + if (preg_match('/\\#/', $url)) { + $link_type |= 0x08; + } + + // Pack the link type + $link_type = pack('V', $link_type); + + // Calculate the up-level dir count e.g.. (..\..\..\ == 3) + $up_count = preg_match_all('/\\.\\.\\\\/', $dir_long, $useless); + $up_count = pack('v', $up_count); + + // Store the short dos dir name (null terminated) + $dir_short = preg_replace('/\\.\\.\\\\/', '', $dir_long) . "\0"; + + // Store the long dir name as a wchar string (non-null terminated) + $dir_long = $dir_long . "\0"; + + // Pack the lengths of the dir strings + $dir_short_len = pack('V', strlen($dir_short)); + $dir_long_len = pack('V', strlen($dir_long)); + $stream_len = pack('V', 0); //strlen($dir_long) + 0x06); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', '0303000000000000C000000000000046'); + $unknown3 = pack('H*', 'FFFFADDE000000000000000000000000000000000000000'); + $unknown4 = pack('v', 0x03); + + // Pack the main data stream + $data = pack('vvvv', $row1, $row2, $col1, $col2) . + $unknown1 . + $link_type . + $unknown2 . + $up_count . + $dir_short_len . + $dir_short . + $unknown3 . + $stream_len; /*. + $dir_long_len . + $unknown4 . + $dir_long . + $sheet_len . + $sheet ;*/ + + // Pack the header data + $length = strlen($data); + $header = pack('vv', $record, $length); + + // Write the packed data + $this->append($header . $data); + + return 0; + } + + /** + * This method is used to set the height and format for a row. + * + * @param int $row The row to set + * @param int $height Height we are giving to the row. + * Use null to set XF without setting height + * @param int $xfIndex The optional cell style Xf index to apply to the columns + * @param bool $hidden The optional hidden attribute + * @param int $level The optional outline level for row, in range [0,7] + */ + private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0): void + { + $record = 0x0208; // Record identifier + $length = 0x0010; // Number of bytes to follow + + $colMic = 0x0000; // First defined column + $colMac = 0x0000; // Last defined column + $irwMac = 0x0000; // Used by Excel to optimise loading + $reserved = 0x0000; // Reserved + $grbit = 0x0000; // Option flags + $ixfe = $xfIndex; + + if ($height < 0) { + $height = null; + } + + // Use writeRow($row, null, $XF) to set XF format without setting height + if ($height != null) { + $miyRw = $height * 20; // row height + } else { + $miyRw = 0xff; // default row height is 256 + } + + // Set the options flags. fUnsynced is used to show that the font and row + // heights are not compatible. This is usually the case for WriteExcel. + // The collapsed flag 0x10 doesn't seem to be used to indicate that a row + // is collapsed. Instead it is used to indicate that the previous row is + // collapsed. The zero height flag, 0x20, is used to collapse a row. + + $grbit |= $level; + if ($hidden) { + $grbit |= 0x0030; + } + if ($height !== null) { + $grbit |= 0x0040; // fUnsynced + } + if ($xfIndex !== 0xF) { + $grbit |= 0x0080; + } + $grbit |= 0x0100; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe); + $this->append($header . $data); + } + + /** + * Writes Excel DIMENSIONS to define the area in which there is data. + */ + private function writeDimensions(): void + { + $record = 0x0200; // Record identifier + + $length = 0x000E; + $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved + + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write BIFF record Window2. + */ + private function writeWindow2(): void + { + $record = 0x023E; // Record identifier + $length = 0x0012; + + $grbit = 0x00B6; // Option flags + $rwTop = 0x0000; // Top row visible in window + $colLeft = 0x0000; // Leftmost column visible in window + + // The options flags that comprise $grbit + $fDspFmla = 0; // 0 - bit + $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1 + $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2 + $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 + $fDspZeros = 1; // 4 + $fDefaultHdr = 1; // 5 + $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6 + $fDspGuts = $this->outlineOn; // 7 + $fFrozenNoSplit = 0; // 0 - bit + // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet + $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0; + $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW; + + $grbit = $fDspFmla; + $grbit |= $fDspGrid << 1; + $grbit |= $fDspRwCol << 2; + $grbit |= $fFrozen << 3; + $grbit |= $fDspZeros << 4; + $grbit |= $fDefaultHdr << 5; + $grbit |= $fArabic << 6; + $grbit |= $fDspGuts << 7; + $grbit |= $fFrozenNoSplit << 8; + $grbit |= $fSelected << 9; // Selected sheets. + $grbit |= $fSelected << 10; // Active sheet. + $grbit |= $fPageBreakPreview << 11; + + $header = pack('vv', $record, $length); + $data = pack('vvv', $grbit, $rwTop, $colLeft); + + // FIXME !!! + $rgbHdr = 0x0040; // Row/column heading and gridline color index + $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000); + $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal(); + + $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); + + $this->append($header . $data); + } + + /** + * Write BIFF record DEFAULTROWHEIGHT. + */ + private function writeDefaultRowHeight(): void + { + $defaultRowHeight = $this->phpSheet->getDefaultRowDimension()->getRowHeight(); + + if ($defaultRowHeight < 0) { + return; + } + + // convert to twips + $defaultRowHeight = (int) 20 * $defaultRowHeight; + + $record = 0x0225; // Record identifier + $length = 0x0004; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', 1, $defaultRowHeight); + $this->append($header . $data); + } + + /** + * Write BIFF record DEFCOLWIDTH if COLINFO records are in use. + */ + private function writeDefcol(): void + { + $defaultColWidth = 8; + + $record = 0x0055; // Record identifier + $length = 0x0002; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $defaultColWidth); + $this->append($header . $data); + } + + /** + * Write BIFF record COLINFO to define column widths. + * + * Note: The SDK says the record length is 0x0B but Excel writes a 0x0C + * length record. + * + * @param array $col_array This is the only parameter received and is composed of the following: + * 0 => First formatted column, + * 1 => Last formatted column, + * 2 => Col width (8.43 is Excel default), + * 3 => The optional XF format of the column, + * 4 => Option flags. + * 5 => Optional outline level + */ + private function writeColinfo($col_array): void + { + if (isset($col_array[0])) { + $colFirst = $col_array[0]; + } + if (isset($col_array[1])) { + $colLast = $col_array[1]; + } + if (isset($col_array[2])) { + $coldx = $col_array[2]; + } else { + $coldx = 8.43; + } + if (isset($col_array[3])) { + $xfIndex = $col_array[3]; + } else { + $xfIndex = 15; + } + if (isset($col_array[4])) { + $grbit = $col_array[4]; + } else { + $grbit = 0; + } + if (isset($col_array[5])) { + $level = $col_array[5]; + } else { + $level = 0; + } + $record = 0x007D; // Record identifier + $length = 0x000C; // Number of bytes to follow + + $coldx *= 256; // Convert to units of 1/256 of a char + + $ixfe = $xfIndex; + $reserved = 0x0000; // Reserved + + $level = max(0, min($level, 7)); + $grbit |= $level << 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved); + $this->append($header . $data); + } + + /** + * Write BIFF record SELECTION. + */ + private function writeSelection(): void + { + // look up the selected cell range + $selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells()); + $selectedCells = $selectedCells[0]; + if (count($selectedCells) == 2) { + [$first, $last] = $selectedCells; + } else { + $first = $selectedCells[0]; + $last = $selectedCells[0]; + } + + [$colFirst, $rwFirst] = Coordinate::coordinateFromString($first); + $colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index + --$rwFirst; // base 0 row index + + [$colLast, $rwLast] = Coordinate::coordinateFromString($last); + $colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index + --$rwLast; // base 0 row index + + // make sure we are not out of bounds + $colFirst = min($colFirst, 255); + $colLast = min($colLast, 255); + + $rwFirst = min($rwFirst, 65535); + $rwLast = min($rwLast, 65535); + + $record = 0x001D; // Record identifier + $length = 0x000F; // Number of bytes to follow + + $pnn = $this->activePane; // Pane position + $rwAct = $rwFirst; // Active row + $colAct = $colFirst; // Active column + $irefAct = 0; // Active cell ref + $cref = 1; // Number of refs + + if (!isset($rwLast)) { + $rwLast = $rwFirst; // Last row in reference + } + if (!isset($colLast)) { + $colLast = $colFirst; // Last col in reference + } + + // Swap last row/col for first row/col as necessary + if ($rwFirst > $rwLast) { + [$rwFirst, $rwLast] = [$rwLast, $rwFirst]; + } + + if ($colFirst > $colLast) { + [$colFirst, $colLast] = [$colLast, $colFirst]; + } + + $header = pack('vv', $record, $length); + $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast); + $this->append($header . $data); + } + + /** + * Store the MERGEDCELLS records for all ranges of merged cells. + */ + private function writeMergedCells(): void + { + $mergeCells = $this->phpSheet->getMergeCells(); + $countMergeCells = count($mergeCells); + + if ($countMergeCells == 0) { + return; + } + + // maximum allowed number of merged cells per record + $maxCountMergeCellsPerRecord = 1027; + + // record identifier + $record = 0x00E5; + + // counter for total number of merged cells treated so far by the writer + $i = 0; + + // counter for number of merged cells written in record currently being written + $j = 0; + + // initialize record data + $recordData = ''; + + // loop through the merged cells + foreach ($mergeCells as $mergeCell) { + ++$i; + ++$j; + + // extract the row and column indexes + $range = Coordinate::splitRange($mergeCell); + [$first, $last] = $range[0]; + [$firstColumn, $firstRow] = Coordinate::coordinateFromString($first); + [$lastColumn, $lastRow] = Coordinate::coordinateFromString($last); + + $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, Coordinate::columnIndexFromString($firstColumn) - 1, Coordinate::columnIndexFromString($lastColumn) - 1); + + // flush record if we have reached limit for number of merged cells, or reached final merged cell + if ($j == $maxCountMergeCellsPerRecord || $i == $countMergeCells) { + $recordData = pack('v', $j) . $recordData; + $length = strlen($recordData); + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + + // initialize for next record, if any + $recordData = ''; + $j = 0; + } + } + } + + /** + * Write SHEETLAYOUT record. + */ + private function writeSheetLayout(): void + { + if (!$this->phpSheet->isTabColorSet()) { + return; + } + + $recordData = pack( + 'vvVVVvv', + 0x0862, + 0x0000, // unused + 0x00000000, // unused + 0x00000000, // unused + 0x00000014, // size of record data + $this->colors[$this->phpSheet->getTabColor()->getRGB()], // color index + 0x0000 // unused + ); + + $length = strlen($recordData); + + $record = 0x0862; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + + /** + * Write SHEETPROTECTION. + */ + private function writeSheetProtection(): void + { + // record identifier + $record = 0x0867; + + // prepare options + $options = (int) !$this->phpSheet->getProtection()->getObjects() + | (int) !$this->phpSheet->getProtection()->getScenarios() << 1 + | (int) !$this->phpSheet->getProtection()->getFormatCells() << 2 + | (int) !$this->phpSheet->getProtection()->getFormatColumns() << 3 + | (int) !$this->phpSheet->getProtection()->getFormatRows() << 4 + | (int) !$this->phpSheet->getProtection()->getInsertColumns() << 5 + | (int) !$this->phpSheet->getProtection()->getInsertRows() << 6 + | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks() << 7 + | (int) !$this->phpSheet->getProtection()->getDeleteColumns() << 8 + | (int) !$this->phpSheet->getProtection()->getDeleteRows() << 9 + | (int) !$this->phpSheet->getProtection()->getSelectLockedCells() << 10 + | (int) !$this->phpSheet->getProtection()->getSort() << 11 + | (int) !$this->phpSheet->getProtection()->getAutoFilter() << 12 + | (int) !$this->phpSheet->getProtection()->getPivotTables() << 13 + | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14; + + // record data + $recordData = pack( + 'vVVCVVvv', + 0x0867, // repeated record identifier + 0x0000, // not used + 0x0000, // not used + 0x00, // not used + 0x01000200, // unknown data + 0xFFFFFFFF, // unknown data + $options, // options + 0x0000 // not used + ); + + $length = strlen($recordData); + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Write BIFF record RANGEPROTECTION. + * + * Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records + * Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records + */ + private function writeRangeProtection(): void + { + foreach ($this->phpSheet->getProtectedCells() as $range => $password) { + // number of ranges, e.g. 'A1:B3 C20:D25' + $cellRanges = explode(' ', $range); + $cref = count($cellRanges); + + $recordData = pack( + 'vvVVvCVvVv', + 0x0868, + 0x00, + 0x0000, + 0x0000, + 0x02, + 0x0, + 0x0000, + $cref, + 0x0000, + 0x00 + ); + + foreach ($cellRanges as $cellRange) { + $recordData .= $this->writeBIFF8CellRangeAddressFixed($cellRange); + } + + // the rgbFeat structure + $recordData .= pack( + 'VV', + 0x0000, + hexdec($password) + ); + + $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData)); + + $length = strlen($recordData); + + $record = 0x0868; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + } + + /** + * Writes the Excel BIFF PANE record. + * The panes can either be frozen or thawed (unfrozen). + * Frozen panes are specified in terms of an integer number of rows and columns. + * Thawed panes are specified in terms of Excel's units for rows and columns. + */ + private function writePanes(): void + { + $panes = []; + if ($this->phpSheet->getFreezePane()) { + [$column, $row] = Coordinate::coordinateFromString($this->phpSheet->getFreezePane()); + $panes[0] = Coordinate::columnIndexFromString($column) - 1; + $panes[1] = $row - 1; + + [$leftMostColumn, $topRow] = Coordinate::coordinateFromString($this->phpSheet->getTopLeftCell()); + //Coordinates are zero-based in xls files + $panes[2] = $topRow - 1; + $panes[3] = Coordinate::columnIndexFromString($leftMostColumn) - 1; + } else { + // thaw panes + return; + } + + $x = $panes[0] ?? null; + $y = $panes[1] ?? null; + $rwTop = $panes[2] ?? null; + $colLeft = $panes[3] ?? null; + if (count($panes) > 4) { // if Active pane was received + $pnnAct = $panes[4]; + } else { + $pnnAct = null; + } + $record = 0x0041; // Record identifier + $length = 0x000A; // Number of bytes to follow + + // Code specific to frozen or thawed panes. + if ($this->phpSheet->getFreezePane()) { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = $y; + } + if (!isset($colLeft)) { + $colLeft = $x; + } + } else { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = 0; + } + if (!isset($colLeft)) { + $colLeft = 0; + } + + // Convert Excel's row and column units to the internal units. + // The default row height is 12.75 + // The default column width is 8.43 + // The following slope and intersection values were interpolated. + // + $y = 20 * $y + 255; + $x = 113.879 * $x + 390; + } + + // Determine which pane should be active. There is also the undocumented + // option to override this should it be necessary: may be removed later. + // + if (!isset($pnnAct)) { + if ($x != 0 && $y != 0) { + $pnnAct = 0; // Bottom right + } + if ($x != 0 && $y == 0) { + $pnnAct = 1; // Top right + } + if ($x == 0 && $y != 0) { + $pnnAct = 2; // Bottom left + } + if ($x == 0 && $y == 0) { + $pnnAct = 3; // Top left + } + } + + $this->activePane = $pnnAct; // Used in writeSelection + + $header = pack('vv', $record, $length); + $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct); + $this->append($header . $data); + } + + /** + * Store the page setup SETUP BIFF record. + */ + private function writeSetup(): void + { + $record = 0x00A1; // Record identifier + $length = 0x0022; // Number of bytes to follow + + $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size + + $iScale = $this->phpSheet->getPageSetup()->getScale() ? + $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor + + $iPageStart = 0x01; // Starting page number + $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide + $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high + $grbit = 0x00; // Option flags + $iRes = 0x0258; // Print resolution + $iVRes = 0x0258; // Vertical print resolution + + $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin + + $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin + $iCopies = 0x01; // Number of copies + + $fLeftToRight = 0x0; // Print over then down + + // Page orientation + $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) ? + 0x0 : 0x1; + + $fNoPls = 0x0; // Setup not read from printer + $fNoColor = 0x0; // Print black and white + $fDraft = 0x0; // Print draft quality + $fNotes = 0x0; // Print notes + $fNoOrient = 0x0; // Orientation not set + $fUsePage = 0x0; // Use custom starting page + + $grbit = $fLeftToRight; + $grbit |= $fLandscape << 1; + $grbit |= $fNoPls << 2; + $grbit |= $fNoColor << 3; + $grbit |= $fDraft << 4; + $grbit |= $fNotes << 5; + $grbit |= $fNoOrient << 6; + $grbit |= $fUsePage << 7; + + $numHdr = pack('d', $numHdr); + $numFtr = pack('d', $numFtr); + if (self::getByteOrder()) { // if it's Big Endian + $numHdr = strrev($numHdr); + $numFtr = strrev($numFtr); + } + + $header = pack('vv', $record, $length); + $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes); + $data2 = $numHdr . $numFtr; + $data3 = pack('v', $iCopies); + $this->append($header . $data1 . $data2 . $data3); + } + + /** + * Store the header caption BIFF record. + */ + private function writeHeader(): void + { + $record = 0x0014; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the footer caption BIFF record. + */ + private function writeFooter(): void + { + $record = 0x0015; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the horizontal centering HCENTER BIFF record. + */ + private function writeHcenter(): void + { + $record = 0x0083; // Record identifier + $length = 0x0002; // Bytes to follow + + $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fHCenter); + + $this->append($header . $data); + } + + /** + * Store the vertical centering VCENTER BIFF record. + */ + private function writeVcenter(): void + { + $record = 0x0084; // Record identifier + $length = 0x0002; // Bytes to follow + + $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fVCenter); + $this->append($header . $data); + } + + /** + * Store the LEFTMARGIN BIFF record. + */ + private function writeMarginLeft(): void + { + $record = 0x0026; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the RIGHTMARGIN BIFF record. + */ + private function writeMarginRight(): void + { + $record = 0x0027; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the TOPMARGIN BIFF record. + */ + private function writeMarginTop(): void + { + $record = 0x0028; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the BOTTOMMARGIN BIFF record. + */ + private function writeMarginBottom(): void + { + $record = 0x0029; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Write the PRINTHEADERS BIFF record. + */ + private function writePrintHeaders(): void + { + $record = 0x002a; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintRwCol = $this->printHeaders; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintRwCol); + $this->append($header . $data); + } + + /** + * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the + * GRIDSET record. + */ + private function writePrintGridlines(): void + { + $record = 0x002b; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintGrid); + $this->append($header . $data); + } + + /** + * Write the GRIDSET BIFF record. Must be used in conjunction with the + * PRINTGRIDLINES record. + */ + private function writeGridset(): void + { + $record = 0x0082; // Record identifier + $length = 0x0002; // Bytes to follow + + $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fGridSet); + $this->append($header . $data); + } + + /** + * Write the AUTOFILTERINFO BIFF record. This is used to configure the number of autofilter select used in the sheet. + */ + private function writeAutoFilterInfo(): void + { + $record = 0x009D; // Record identifier + $length = 0x0002; // Bytes to follow + + $rangeBounds = Coordinate::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange()); + $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0]; + + $header = pack('vv', $record, $length); + $data = pack('v', $iNumFilters); + $this->append($header . $data); + } + + /** + * Write the GUTS BIFF record. This is used to configure the gutter margins + * where Excel outline symbols are displayed. The visibility of the gutters is + * controlled by a flag in WSBOOL. + * + * @see writeWsbool() + */ + private function writeGuts(): void + { + $record = 0x0080; // Record identifier + $length = 0x0008; // Bytes to follow + + $dxRwGut = 0x0000; // Size of row gutter + $dxColGut = 0x0000; // Size of col gutter + + // determine maximum row outline level + $maxRowOutlineLevel = 0; + foreach ($this->phpSheet->getRowDimensions() as $rowDimension) { + $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel()); + } + + $col_level = 0; + + // Calculate the maximum column outline level. The equivalent calculation + // for the row outline level is carried out in writeRow(). + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $col_level = max($this->columnInfo[$i][5], $col_level); + } + + // Set the limits for the outline levels (0 <= x <= 7). + $col_level = max(0, min($col_level, 7)); + + // The displayed level is one greater than the max outline levels + if ($maxRowOutlineLevel) { + ++$maxRowOutlineLevel; + } + if ($col_level) { + ++$col_level; + } + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level); + + $this->append($header . $data); + } + + /** + * Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction + * with the SETUP record. + */ + private function writeWsbool(): void + { + $record = 0x0081; // Record identifier + $length = 0x0002; // Bytes to follow + $grbit = 0x0000; + + // The only option that is of interest is the flag for fit to page. So we + // set all the options in one go. + // + // Set the option flags + $grbit |= 0x0001; // Auto page breaks visible + if ($this->outlineStyle) { + $grbit |= 0x0020; // Auto outline styles + } + if ($this->phpSheet->getShowSummaryBelow()) { + $grbit |= 0x0040; // Outline summary below + } + if ($this->phpSheet->getShowSummaryRight()) { + $grbit |= 0x0080; // Outline summary right + } + if ($this->phpSheet->getPageSetup()->getFitToPage()) { + $grbit |= 0x0100; // Page setup fit to page + } + if ($this->outlineOn) { + $grbit |= 0x0400; // Outline symbols displayed + } + + $header = pack('vv', $record, $length); + $data = pack('v', $grbit); + $this->append($header . $data); + } + + /** + * Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records. + */ + private function writeBreaks(): void + { + // initialize + $vbreaks = []; + $hbreaks = []; + + foreach ($this->phpSheet->getBreaks() as $cell => $breakType) { + // Fetch coordinates + $coordinates = Coordinate::coordinateFromString($cell); + + // Decide what to do by the type of break + switch ($breakType) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_COLUMN: + // Add to list of vertical breaks + $vbreaks[] = Coordinate::columnIndexFromString($coordinates[0]) - 1; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_ROW: + // Add to list of horizontal breaks + $hbreaks[] = $coordinates[1]; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_NONE: + default: + // Nothing to do + break; + } + } + + //horizontal page breaks + if (!empty($hbreaks)) { + // Sort and filter array of page breaks + sort($hbreaks, SORT_NUMERIC); + if ($hbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($hbreaks); + } + + $record = 0x001b; // Record identifier + $cbrk = count($hbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($hbreaks as $hbreak) { + $data .= pack('vvv', $hbreak, 0x0000, 0x00ff); + } + + $this->append($header . $data); + } + + // vertical page breaks + if (!empty($vbreaks)) { + // 1000 vertical pagebreaks appears to be an internal Excel 5 limit. + // It is slightly higher in Excel 97/200, approx. 1026 + $vbreaks = array_slice($vbreaks, 0, 1000); + + // Sort and filter array of page breaks + sort($vbreaks, SORT_NUMERIC); + if ($vbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($vbreaks); + } + + $record = 0x001a; // Record identifier + $cbrk = count($vbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($vbreaks as $vbreak) { + $data .= pack('vvv', $vbreak, 0x0000, 0xffff); + } + + $this->append($header . $data); + } + } + + /** + * Set the Biff PROTECT record to indicate that the worksheet is protected. + */ + private function writeProtect(): void + { + // Exit unless sheet protection has been specified + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + $record = 0x0012; // Record identifier + $length = 0x0002; // Bytes to follow + + $fLock = 1; // Worksheet is protected + + $header = pack('vv', $record, $length); + $data = pack('v', $fLock); + + $this->append($header . $data); + } + + /** + * Write SCENPROTECT. + */ + private function writeScenProtect(): void + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if scenarios are not protected + if (!$this->phpSheet->getProtection()->getScenarios()) { + return; + } + + $record = 0x00DD; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write OBJECTPROTECT. + */ + private function writeObjectProtect(): void + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if objects are not protected + if (!$this->phpSheet->getProtection()->getObjects()) { + return; + } + + $record = 0x0063; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write the worksheet PASSWORD record. + */ + private function writePassword(): void + { + // Exit unless sheet protection and password have been specified + if (!$this->phpSheet->getProtection()->getSheet() || !$this->phpSheet->getProtection()->getPassword()) { + return; + } + + $record = 0x0013; // Record identifier + $length = 0x0002; // Bytes to follow + + $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password + + $header = pack('vv', $record, $length); + $data = pack('v', $wPassword); + + $this->append($header . $data); + } + + /** + * Insert a 24bit bitmap image in a worksheet. + * + * @param int $row The row we are going to insert the bitmap into + * @param int $col The column we are going to insert the bitmap into + * @param mixed $bitmap The bitmap filename or GD-image resource + * @param int $x the horizontal position (offset) of the image inside the cell + * @param int $y the vertical position (offset) of the image inside the cell + * @param float $scale_x The horizontal scale + * @param float $scale_y The vertical scale + */ + public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1): void + { + $bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap)); + [$width, $height, $size, $data] = $bitmap_array; + + // Scale the frame of the image. + $width *= $scale_x; + $height *= $scale_y; + + // Calculate the vertices of the image and write the OBJ record + $this->positionImage($col, $row, $x, $y, $width, $height); + + // Write the IMDATA record to store the bitmap data + $record = 0x007f; + $length = 8 + $size; + $cf = 0x09; + $env = 0x01; + $lcb = $size; + + $header = pack('vvvvV', $record, $length, $cf, $env, $lcb); + $this->append($header . $data); + } + + /** + * Calculate the vertices that define the position of the image as required by + * the OBJ record. + * + * +------------+------------+ + * | A | B | + * +-----+------------+------------+ + * | |(x1,y1) | | + * | 1 |(A1)._______|______ | + * | | | | | + * | | | | | + * +-----+----| BITMAP |-----+ + * | | | | | + * | 2 | |______________. | + * | | | (B2)| + * | | | (x2,y2)| + * +---- +------------+------------+ + * + * Example of a bitmap that covers some of the area from cell A1 to cell B2. + * + * Based on the width and height of the bitmap we need to calculate 8 vars: + * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. + * The width and height of the cells are also variable and have to be taken into + * account. + * The values of $col_start and $row_start are passed in from the calling + * function. The values of $col_end and $row_end are calculated by subtracting + * the width and height of the bitmap from the width and height of the + * underlying cells. + * The vertices are expressed as a percentage of the underlying cell width as + * follows (rhs values are in pixels): + * + * x1 = X / W *1024 + * y1 = Y / H *256 + * x2 = (X-1) / W *1024 + * y2 = (Y-1) / H *256 + * + * Where: X is distance from the left side of the underlying cell + * Y is distance from the top of the underlying cell + * W is the width of the cell + * H is the height of the cell + * The SDK incorrectly states that the height should be expressed as a + * percentage of 1024. + * + * @param int $col_start Col containing upper left corner of object + * @param int $row_start Row containing top left corner of object + * @param int $x1 Distance to left side of object + * @param int $y1 Distance to top of object + * @param int $width Width of image frame + * @param int $height Height of image frame + */ + public function positionImage($col_start, $row_start, $x1, $y1, $width, $height): void + { + // Initialise end cell to the same as the start cell + $col_end = $col_start; // Col containing lower right corner of object + $row_end = $row_start; // Row containing bottom right corner of object + + // Zero the specified offset if greater than the cell dimensions + if ($x1 >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1))) { + $x1 = 0; + } + if ($y1 >= Xls::sizeRow($this->phpSheet, $row_start + 1)) { + $y1 = 0; + } + + $width = $width + $x1 - 1; + $height = $height + $y1 - 1; + + // Subtract the underlying cell widths to find the end cell of the image + while ($width >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1))) { + $width -= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)); + ++$col_end; + } + + // Subtract the underlying cell heights to find the end cell of the image + while ($height >= Xls::sizeRow($this->phpSheet, $row_end + 1)) { + $height -= Xls::sizeRow($this->phpSheet, $row_end + 1); + ++$row_end; + } + + // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell + // with zero eight or width. + // + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) == 0) { + return; + } + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_start + 1) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_end + 1) == 0) { + return; + } + + // Convert the pixel values to the percentage value expected by Excel + $x1 = $x1 / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) * 1024; + $y1 = $y1 / Xls::sizeRow($this->phpSheet, $row_start + 1) * 256; + $x2 = $width / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) * 1024; // Distance to right side of object + $y2 = $height / Xls::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object + + $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2); + } + + /** + * Store the OBJ record that precedes an IMDATA record. This could be generalise + * to support other Excel objects. + * + * @param int $colL Column containing upper left corner of object + * @param int $dxL Distance from left side of cell + * @param int $rwT Row containing top left corner of object + * @param int $dyT Distance from top of cell + * @param int $colR Column containing lower right corner of object + * @param int $dxR Distance from right of cell + * @param int $rwB Row containing bottom right corner of object + * @param int $dyB Distance from bottom of cell + */ + private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB): void + { + $record = 0x005d; // Record identifier + $length = 0x003c; // Bytes to follow + + $cObj = 0x0001; // Count of objects in file (set to 1) + $OT = 0x0008; // Object type. 8 = Picture + $id = 0x0001; // Object ID + $grbit = 0x0614; // Option flags + + $cbMacro = 0x0000; // Length of FMLA structure + $Reserved1 = 0x0000; // Reserved + $Reserved2 = 0x0000; // Reserved + + $icvBack = 0x09; // Background colour + $icvFore = 0x09; // Foreground colour + $fls = 0x00; // Fill pattern + $fAuto = 0x00; // Automatic fill + $icv = 0x08; // Line colour + $lns = 0xff; // Line style + $lnw = 0x01; // Line weight + $fAutoB = 0x00; // Automatic border + $frs = 0x0000; // Frame style + $cf = 0x0009; // Image format, 9 = bitmap + $Reserved3 = 0x0000; // Reserved + $cbPictFmla = 0x0000; // Length of FMLA structure + $Reserved4 = 0x0000; // Reserved + $grbit2 = 0x0001; // Option flags + $Reserved5 = 0x0000; // Reserved + + $header = pack('vv', $record, $length); + $data = pack('V', $cObj); + $data .= pack('v', $OT); + $data .= pack('v', $id); + $data .= pack('v', $grbit); + $data .= pack('v', $colL); + $data .= pack('v', $dxL); + $data .= pack('v', $rwT); + $data .= pack('v', $dyT); + $data .= pack('v', $colR); + $data .= pack('v', $dxR); + $data .= pack('v', $rwB); + $data .= pack('v', $dyB); + $data .= pack('v', $cbMacro); + $data .= pack('V', $Reserved1); + $data .= pack('v', $Reserved2); + $data .= pack('C', $icvBack); + $data .= pack('C', $icvFore); + $data .= pack('C', $fls); + $data .= pack('C', $fAuto); + $data .= pack('C', $icv); + $data .= pack('C', $lns); + $data .= pack('C', $lnw); + $data .= pack('C', $fAutoB); + $data .= pack('v', $frs); + $data .= pack('V', $cf); + $data .= pack('v', $Reserved3); + $data .= pack('v', $cbPictFmla); + $data .= pack('v', $Reserved4); + $data .= pack('v', $grbit2); + $data .= pack('V', $Reserved5); + + $this->append($header . $data); + } + + /** + * Convert a GD-image into the internal format. + * + * @param resource $image The image to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmapGd($image) + { + $width = imagesx($image); + $height = imagesy($image); + + $data = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + for ($j = $height; --$j;) { + for ($i = 0; $i < $width; ++$i) { + $color = imagecolorsforindex($image, imagecolorat($image, $i, $j)); + foreach (['red', 'green', 'blue'] as $key) { + $color[$key] = $color[$key] + round((255 - $color[$key]) * $color['alpha'] / 127); + } + $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']); + } + if (3 * $width % 4) { + $data .= str_repeat("\x00", 4 - 3 * $width % 4); + } + } + + return [$width, $height, strlen($data), $data]; + } + + /** + * Convert a 24 bit bitmap into the modified internal format used by Windows. + * This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the + * MSDN library. + * + * @param string $bitmap The bitmap to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmap($bitmap) + { + // Open file. + $bmp_fd = @fopen($bitmap, 'rb'); + if (!$bmp_fd) { + throw new WriterException("Couldn't import $bitmap"); + } + + // Slurp the file into a string. + $data = fread($bmp_fd, filesize($bitmap)); + + // Check that the file is big enough to be a bitmap. + if (strlen($data) <= 0x36) { + throw new WriterException("$bitmap doesn't contain enough data.\n"); + } + + // The first 2 bytes are used to identify the bitmap. + $identity = unpack('A2ident', $data); + if ($identity['ident'] != 'BM') { + throw new WriterException("$bitmap doesn't appear to be a valid bitmap image.\n"); + } + + // Remove bitmap data: ID. + $data = substr($data, 2); + + // Read and remove the bitmap size. This is more reliable than reading + // the data size at offset 0x22. + // + $size_array = unpack('Vsa', substr($data, 0, 4)); + $size = $size_array['sa']; + $data = substr($data, 4); + $size -= 0x36; // Subtract size of bitmap header. + $size += 0x0C; // Add size of BIFF header. + + // Remove bitmap data: reserved, offset, header length. + $data = substr($data, 12); + + // Read and remove the bitmap width and height. Verify the sizes. + $width_and_height = unpack('V2', substr($data, 0, 8)); + $width = $width_and_height[1]; + $height = $width_and_height[2]; + $data = substr($data, 8); + if ($width > 0xFFFF) { + throw new WriterException("$bitmap: largest image width supported is 65k.\n"); + } + if ($height > 0xFFFF) { + throw new WriterException("$bitmap: largest image height supported is 65k.\n"); + } + + // Read and remove the bitmap planes and bpp data. Verify them. + $planes_and_bitcount = unpack('v2', substr($data, 0, 4)); + $data = substr($data, 4); + if ($planes_and_bitcount[2] != 24) { // Bitcount + throw new WriterException("$bitmap isn't a 24bit true color bitmap.\n"); + } + if ($planes_and_bitcount[1] != 1) { + throw new WriterException("$bitmap: only 1 plane supported in bitmap image.\n"); + } + + // Read and remove the bitmap compression. Verify compression. + $compression = unpack('Vcomp', substr($data, 0, 4)); + $data = substr($data, 4); + + if ($compression['comp'] != 0) { + throw new WriterException("$bitmap: compression not supported in bitmap image.\n"); + } + + // Remove bitmap data: data size, hres, vres, colours, imp. colours. + $data = substr($data, 20); + + // Add the BITMAPCOREHEADER data + $header = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + $data = $header . $data; + + return [$width, $height, $size, $data]; + } + + /** + * Store the window zoom factor. This should be a reduced fraction but for + * simplicity we will store all fractions with a numerator of 100. + */ + private function writeZoom(): void + { + // If scale is 100 we don't need to write a record + if ($this->phpSheet->getSheetView()->getZoomScale() == 100) { + return; + } + + $record = 0x00A0; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100); + $this->append($header . $data); + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(?\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null): void + { + $this->escher = $pValue; + } + + /** + * Write MSODRAWING record. + */ + private function writeMsoDrawing(): void + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + // write the neccesary MSODRAWING, OBJ records + + // split the Escher stream + $spOffsets[0] = 0; + $nm = count($spOffsets) - 1; // number of shapes excluding first shape + for ($i = 1; $i <= $nm; ++$i) { + // MSODRAWING record + $record = 0x00EC; // Record identifier + + // chunk of Escher stream for one shape + $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]); + + $length = strlen($dataChunk); + $header = pack('vv', $record, $length); + + $this->append($header . $dataChunk); + + // OBJ record + $record = 0x005D; // record identifier + $objData = ''; + + // ftCmo + if ($spTypes[$i] == 0x00C9) { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0014, // object type, 0x0014 = filter + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x2101, // option flags, 0x2001 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + + // Add ftSbs Scroll bar subobject + $objData .= pack('vv', 0x00C, 0x0014); + $objData .= pack('H*', '0000000000000000640001000A00000010000100'); + // Add ftLbsData (List box data) subobject + $objData .= pack('vv', 0x0013, 0x1FEE); + $objData .= pack('H*', '00000000010001030000020008005700'); + } else { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0008, // object type, 0x0008 = picture + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x6011, // option flags, 0x6011 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + } + + // ftEnd + $objData .= + pack( + 'vv', + 0x0000, // 0x0000 = ftEnd + 0x0000 // length of ftEnd data + ); + + $length = strlen($objData); + $header = pack('vv', $record, $length); + $this->append($header . $objData); + } + } + } + + /** + * Store the DATAVALIDATIONS and DATAVALIDATION records. + */ + private function writeDataValidity(): void + { + // Datavalidation collection + $dataValidationCollection = $this->phpSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + // DATAVALIDATIONS record + $record = 0x01B2; // Record identifier + $length = 0x0012; // Bytes to follow + + $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records + $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position + $verPos = 0x00000000; // Vertical position of prompt box, if fixed position + $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible + + $header = pack('vv', $record, $length); + $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); + $this->append($header . $data); + + // DATAVALIDATION records + $record = 0x01BE; // Record identifier + + foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) { + // initialize record data + $data = ''; + + // options + $options = 0x00000000; + + // data type + $type = 0x00; + switch ($dataValidation->getType()) { + case DataValidation::TYPE_NONE: + $type = 0x00; + + break; + case DataValidation::TYPE_WHOLE: + $type = 0x01; + + break; + case DataValidation::TYPE_DECIMAL: + $type = 0x02; + + break; + case DataValidation::TYPE_LIST: + $type = 0x03; + + break; + case DataValidation::TYPE_DATE: + $type = 0x04; + + break; + case DataValidation::TYPE_TIME: + $type = 0x05; + + break; + case DataValidation::TYPE_TEXTLENGTH: + $type = 0x06; + + break; + case DataValidation::TYPE_CUSTOM: + $type = 0x07; + + break; + } + + $options |= $type << 0; + + // error style + $errorStyle = 0x00; + switch ($dataValidation->getErrorStyle()) { + case DataValidation::STYLE_STOP: + $errorStyle = 0x00; + + break; + case DataValidation::STYLE_WARNING: + $errorStyle = 0x01; + + break; + case DataValidation::STYLE_INFORMATION: + $errorStyle = 0x02; + + break; + } + + $options |= $errorStyle << 4; + + // explicit formula? + if ($type == 0x03 && preg_match('/^\".*\"$/', $dataValidation->getFormula1())) { + $options |= 0x01 << 7; + } + + // empty cells allowed + $options |= $dataValidation->getAllowBlank() << 8; + + // show drop down + $options |= (!$dataValidation->getShowDropDown()) << 9; + + // show input message + $options |= $dataValidation->getShowInputMessage() << 18; + + // show error message + $options |= $dataValidation->getShowErrorMessage() << 19; + + // condition operator + $operator = 0x00; + switch ($dataValidation->getOperator()) { + case DataValidation::OPERATOR_BETWEEN: + $operator = 0x00; + + break; + case DataValidation::OPERATOR_NOTBETWEEN: + $operator = 0x01; + + break; + case DataValidation::OPERATOR_EQUAL: + $operator = 0x02; + + break; + case DataValidation::OPERATOR_NOTEQUAL: + $operator = 0x03; + + break; + case DataValidation::OPERATOR_GREATERTHAN: + $operator = 0x04; + + break; + case DataValidation::OPERATOR_LESSTHAN: + $operator = 0x05; + + break; + case DataValidation::OPERATOR_GREATERTHANOREQUAL: + $operator = 0x06; + + break; + case DataValidation::OPERATOR_LESSTHANOREQUAL: + $operator = 0x07; + + break; + } + + $options |= $operator << 20; + + $data = pack('V', $options); + + // prompt title + $promptTitle = $dataValidation->getPromptTitle() !== '' ? + $dataValidation->getPromptTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($promptTitle); + + // error title + $errorTitle = $dataValidation->getErrorTitle() !== '' ? + $dataValidation->getErrorTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($errorTitle); + + // prompt text + $prompt = $dataValidation->getPrompt() !== '' ? + $dataValidation->getPrompt() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($prompt); + + // error text + $error = $dataValidation->getError() !== '' ? + $dataValidation->getError() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($error); + + // formula 1 + try { + $formula1 = $dataValidation->getFormula1(); + if ($type == 0x03) { // list type + $formula1 = str_replace(',', chr(0), $formula1); + } + $this->parser->parse($formula1); + $formula1 = $this->parser->toReversePolish(); + $sz1 = strlen($formula1); + } catch (PhpSpreadsheetException $e) { + $sz1 = 0; + $formula1 = ''; + } + $data .= pack('vv', $sz1, 0x0000); + $data .= $formula1; + + // formula 2 + try { + $formula2 = $dataValidation->getFormula2(); + if ($formula2 === '') { + throw new WriterException('No formula2'); + } + $this->parser->parse($formula2); + $formula2 = $this->parser->toReversePolish(); + $sz2 = strlen($formula2); + } catch (PhpSpreadsheetException $e) { + $sz2 = 0; + $formula2 = ''; + } + $data .= pack('vv', $sz2, 0x0000); + $data .= $formula2; + + // cell range address list + $data .= pack('v', 0x0001); + $data .= $this->writeBIFF8CellRangeAddressFixed($cellCoordinate); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + } + } + + /** + * Map Error code. + * + * @param string $errorCode + * + * @return int + */ + private static function mapErrorCode($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return 0x00; + case '#DIV/0!': + return 0x07; + case '#VALUE!': + return 0x0F; + case '#REF!': + return 0x17; + case '#NAME?': + return 0x1D; + case '#NUM!': + return 0x24; + case '#N/A': + return 0x2A; + } + + return 0; + } + + /** + * Write PLV Record. + */ + private function writePageLayoutView(): void + { + $record = 0x088B; // Record identifier + $length = 0x0010; // Bytes to follow + + $rt = 0x088B; // 2 + $grbitFrt = 0x0000; // 2 + $reserved = 0x0000000000000000; // 8 + $wScalvePLV = $this->phpSheet->getSheetView()->getZoomScale(); // 2 + + // The options flags that comprise $grbit + if ($this->phpSheet->getSheetView()->getView() == SheetView::SHEETVIEW_PAGE_LAYOUT) { + $fPageLayoutView = 1; + } else { + $fPageLayoutView = 0; + } + $fRulerVisible = 0; + $fWhitespaceHidden = 0; + + $grbit = $fPageLayoutView; // 2 + $grbit |= $fRulerVisible << 1; + $grbit |= $fWhitespaceHidden << 3; + + $header = pack('vv', $record, $length); + $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); + $this->append($header . $data); + } + + /** + * Write CFRule Record. + */ + private function writeCFRule(Conditional $conditional): void + { + $record = 0x01B1; // Record identifier + + // $type : Type of the CF + // $operatorType : Comparison operator + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + $type = 0x02; + $operatorType = 0x00; + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + $type = 0x01; + + switch ($conditional->getOperatorType()) { + case Conditional::OPERATOR_NONE: + $operatorType = 0x00; + + break; + case Conditional::OPERATOR_EQUAL: + $operatorType = 0x03; + + break; + case Conditional::OPERATOR_GREATERTHAN: + $operatorType = 0x05; + + break; + case Conditional::OPERATOR_GREATERTHANOREQUAL: + $operatorType = 0x07; + + break; + case Conditional::OPERATOR_LESSTHAN: + $operatorType = 0x06; + + break; + case Conditional::OPERATOR_LESSTHANOREQUAL: + $operatorType = 0x08; + + break; + case Conditional::OPERATOR_NOTEQUAL: + $operatorType = 0x04; + + break; + case Conditional::OPERATOR_BETWEEN: + $operatorType = 0x01; + + break; + // not OPERATOR_NOTBETWEEN 0x02 + } + } + + // $szValue1 : size of the formula data for first value or formula + // $szValue2 : size of the formula data for second value or formula + $arrConditions = $conditional->getConditions(); + $numConditions = count($arrConditions); + if ($numConditions == 1) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = 0x0000; + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = null; + } elseif ($numConditions == 2 && ($conditional->getOperatorType() == Conditional::OPERATOR_BETWEEN)) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = ($arrConditions[1] <= 65535 ? 3 : 0x0000); + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = pack('Cv', 0x1E, $arrConditions[1]); + } else { + $szValue1 = 0x0000; + $szValue2 = 0x0000; + $operand1 = null; + $operand2 = null; + } + + // $flags : Option flags + // Alignment + $bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() == null ? 1 : 0); + $bAlignVt = ($conditional->getStyle()->getAlignment()->getVertical() == null ? 1 : 0); + $bAlignWrapTx = ($conditional->getStyle()->getAlignment()->getWrapText() == false ? 1 : 0); + $bTxRotation = ($conditional->getStyle()->getAlignment()->getTextRotation() == null ? 1 : 0); + $bIndent = ($conditional->getStyle()->getAlignment()->getIndent() == 0 ? 1 : 0); + $bShrinkToFit = ($conditional->getStyle()->getAlignment()->getShrinkToFit() == false ? 1 : 0); + if ($bAlignHz == 0 || $bAlignVt == 0 || $bAlignWrapTx == 0 || $bTxRotation == 0 || $bIndent == 0 || $bShrinkToFit == 0) { + $bFormatAlign = 1; + } else { + $bFormatAlign = 0; + } + // Protection + $bProtLocked = ($conditional->getStyle()->getProtection()->getLocked() == null ? 1 : 0); + $bProtHidden = ($conditional->getStyle()->getProtection()->getHidden() == null ? 1 : 0); + if ($bProtLocked == 0 || $bProtHidden == 0) { + $bFormatProt = 1; + } else { + $bFormatProt = 0; + } + // Border + $bBorderLeft = ($conditional->getStyle()->getBorders()->getLeft()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getLeft()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderRight = ($conditional->getStyle()->getBorders()->getRight()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getRight()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderTop = ($conditional->getStyle()->getBorders()->getTop()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getTop()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderBottom = ($conditional->getStyle()->getBorders()->getBottom()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getBottom()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + if ($bBorderLeft == 0 || $bBorderRight == 0 || $bBorderTop == 0 || $bBorderBottom == 0) { + $bFormatBorder = 1; + } else { + $bFormatBorder = 0; + } + // Pattern + $bFillStyle = ($conditional->getStyle()->getFill()->getFillType() == null ? 0 : 1); + $bFillColor = ($conditional->getStyle()->getFill()->getStartColor()->getARGB() == null ? 0 : 1); + $bFillColorBg = ($conditional->getStyle()->getFill()->getEndColor()->getARGB() == null ? 0 : 1); + if ($bFillStyle == 0 || $bFillColor == 0 || $bFillColorBg == 0) { + $bFormatFill = 1; + } else { + $bFormatFill = 0; + } + // Font + if ($conditional->getStyle()->getFont()->getName() != null + || $conditional->getStyle()->getFont()->getSize() != null + || $conditional->getStyle()->getFont()->getBold() != null + || $conditional->getStyle()->getFont()->getItalic() != null + || $conditional->getStyle()->getFont()->getSuperscript() != null + || $conditional->getStyle()->getFont()->getSubscript() != null + || $conditional->getStyle()->getFont()->getUnderline() != null + || $conditional->getStyle()->getFont()->getStrikethrough() != null + || $conditional->getStyle()->getFont()->getColor()->getARGB() != null) { + $bFormatFont = 1; + } else { + $bFormatFont = 0; + } + // Alignment + $flags = 0; + $flags |= (1 == $bAlignHz ? 0x00000001 : 0); + $flags |= (1 == $bAlignVt ? 0x00000002 : 0); + $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); + $flags |= (1 == $bTxRotation ? 0x00000008 : 0); + // Justify last line flag + $flags |= (1 == 1 ? 0x00000010 : 0); + $flags |= (1 == $bIndent ? 0x00000020 : 0); + $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); + // Default + $flags |= (1 == 1 ? 0x00000080 : 0); + // Protection + $flags |= (1 == $bProtLocked ? 0x00000100 : 0); + $flags |= (1 == $bProtHidden ? 0x00000200 : 0); + // Border + $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); + $flags |= (1 == $bBorderRight ? 0x00000800 : 0); + $flags |= (1 == $bBorderTop ? 0x00001000 : 0); + $flags |= (1 == $bBorderBottom ? 0x00002000 : 0); + $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border + $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border + // Pattern + $flags |= (1 == $bFillStyle ? 0x00010000 : 0); + $flags |= (1 == $bFillColor ? 0x00020000 : 0); + $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); + $flags |= (1 == 1 ? 0x00380000 : 0); + // Font + $flags |= (1 == $bFormatFont ? 0x04000000 : 0); + // Alignment: + $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); + // Border + $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); + // Pattern + $flags |= (1 == $bFormatFill ? 0x20000000 : 0); + // Protection + $flags |= (1 == $bFormatProt ? 0x40000000 : 0); + // Text direction + $flags |= (1 == 0 ? 0x80000000 : 0); + + // Data Blocks + if ($bFormatFont == 1) { + // Font Name + if ($conditional->getStyle()->getFont()->getName() == null) { + $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + } else { + $dataBlockFont = StringHelper::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName()); + } + // Font Size + if ($conditional->getStyle()->getFont()->getSize() == null) { + $dataBlockFont .= pack('V', 20 * 11); + } else { + $dataBlockFont .= pack('V', 20 * $conditional->getStyle()->getFont()->getSize()); + } + // Font Options + $dataBlockFont .= pack('V', 0); + // Font weight + if ($conditional->getStyle()->getFont()->getBold() == true) { + $dataBlockFont .= pack('v', 0x02BC); + } else { + $dataBlockFont .= pack('v', 0x0190); + } + // Escapement type + if ($conditional->getStyle()->getFont()->getSubscript() == true) { + $dataBlockFont .= pack('v', 0x02); + $fontEscapement = 0; + } elseif ($conditional->getStyle()->getFont()->getSuperscript() == true) { + $dataBlockFont .= pack('v', 0x01); + $fontEscapement = 0; + } else { + $dataBlockFont .= pack('v', 0x00); + $fontEscapement = 1; + } + // Underline type + switch ($conditional->getStyle()->getFont()->getUnderline()) { + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE: + $dataBlockFont .= pack('C', 0x02); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING: + $dataBlockFont .= pack('C', 0x22); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE: + $dataBlockFont .= pack('C', 0x01); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING: + $dataBlockFont .= pack('C', 0x21); + $fontUnderline = 0; + + break; + default: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 1; + + break; + } + // Not used (3) + $dataBlockFont .= pack('vC', 0x0000, 0x00); + // Font color index + switch ($conditional->getStyle()->getFont()->getColor()->getRGB()) { + case '000000': + $colorIdx = 0x08; + + break; + case 'FFFFFF': + $colorIdx = 0x09; + + break; + case 'FF0000': + $colorIdx = 0x0A; + + break; + case '00FF00': + $colorIdx = 0x0B; + + break; + case '0000FF': + $colorIdx = 0x0C; + + break; + case 'FFFF00': + $colorIdx = 0x0D; + + break; + case 'FF00FF': + $colorIdx = 0x0E; + + break; + case '00FFFF': + $colorIdx = 0x0F; + + break; + case '800000': + $colorIdx = 0x10; + + break; + case '008000': + $colorIdx = 0x11; + + break; + case '000080': + $colorIdx = 0x12; + + break; + case '808000': + $colorIdx = 0x13; + + break; + case '800080': + $colorIdx = 0x14; + + break; + case '008080': + $colorIdx = 0x15; + + break; + case 'C0C0C0': + $colorIdx = 0x16; + + break; + case '808080': + $colorIdx = 0x17; + + break; + case '9999FF': + $colorIdx = 0x18; + + break; + case '993366': + $colorIdx = 0x19; + + break; + case 'FFFFCC': + $colorIdx = 0x1A; + + break; + case 'CCFFFF': + $colorIdx = 0x1B; + + break; + case '660066': + $colorIdx = 0x1C; + + break; + case 'FF8080': + $colorIdx = 0x1D; + + break; + case '0066CC': + $colorIdx = 0x1E; + + break; + case 'CCCCFF': + $colorIdx = 0x1F; + + break; + case '000080': + $colorIdx = 0x20; + + break; + case 'FF00FF': + $colorIdx = 0x21; + + break; + case 'FFFF00': + $colorIdx = 0x22; + + break; + case '00FFFF': + $colorIdx = 0x23; + + break; + case '800080': + $colorIdx = 0x24; + + break; + case '800000': + $colorIdx = 0x25; + + break; + case '008080': + $colorIdx = 0x26; + + break; + case '0000FF': + $colorIdx = 0x27; + + break; + case '00CCFF': + $colorIdx = 0x28; + + break; + case 'CCFFFF': + $colorIdx = 0x29; + + break; + case 'CCFFCC': + $colorIdx = 0x2A; + + break; + case 'FFFF99': + $colorIdx = 0x2B; + + break; + case '99CCFF': + $colorIdx = 0x2C; + + break; + case 'FF99CC': + $colorIdx = 0x2D; + + break; + case 'CC99FF': + $colorIdx = 0x2E; + + break; + case 'FFCC99': + $colorIdx = 0x2F; + + break; + case '3366FF': + $colorIdx = 0x30; + + break; + case '33CCCC': + $colorIdx = 0x31; + + break; + case '99CC00': + $colorIdx = 0x32; + + break; + case 'FFCC00': + $colorIdx = 0x33; + + break; + case 'FF9900': + $colorIdx = 0x34; + + break; + case 'FF6600': + $colorIdx = 0x35; + + break; + case '666699': + $colorIdx = 0x36; + + break; + case '969696': + $colorIdx = 0x37; + + break; + case '003366': + $colorIdx = 0x38; + + break; + case '339966': + $colorIdx = 0x39; + + break; + case '003300': + $colorIdx = 0x3A; + + break; + case '333300': + $colorIdx = 0x3B; + + break; + case '993300': + $colorIdx = 0x3C; + + break; + case '993366': + $colorIdx = 0x3D; + + break; + case '333399': + $colorIdx = 0x3E; + + break; + case '333333': + $colorIdx = 0x3F; + + break; + default: + $colorIdx = 0x00; + + break; + } + $dataBlockFont .= pack('V', $colorIdx); + // Not used (4) + $dataBlockFont .= pack('V', 0x00000000); + // Options flags for modified font attributes + $optionsFlags = 0; + $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0); + $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); + $optionsFlags |= (1 == 1 ? 0x00000008 : 0); + $optionsFlags |= (1 == 1 ? 0x00000010 : 0); + $optionsFlags |= (1 == 0 ? 0x00000020 : 0); + $optionsFlags |= (1 == 1 ? 0x00000080 : 0); + $dataBlockFont .= pack('V', $optionsFlags); + // Escapement type + $dataBlockFont .= pack('V', $fontEscapement); + // Underline type + $dataBlockFont .= pack('V', $fontUnderline); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Not used (8) + $dataBlockFont .= pack('VV', 0x00000000, 0x00000000); + // Always + $dataBlockFont .= pack('v', 0x0001); + } + if ($bFormatAlign == 1) { + $blockAlign = 0; + // Alignment and text break + switch ($conditional->getStyle()->getAlignment()->getHorizontal()) { + case Alignment::HORIZONTAL_GENERAL: + $blockAlign = 0; + + break; + case Alignment::HORIZONTAL_LEFT: + $blockAlign = 1; + + break; + case Alignment::HORIZONTAL_RIGHT: + $blockAlign = 3; + + break; + case Alignment::HORIZONTAL_CENTER: + $blockAlign = 2; + + break; + case Alignment::HORIZONTAL_CENTER_CONTINUOUS: + $blockAlign = 6; + + break; + case Alignment::HORIZONTAL_JUSTIFY: + $blockAlign = 5; + + break; + } + if ($conditional->getStyle()->getAlignment()->getWrapText() == true) { + $blockAlign |= 1 << 3; + } else { + $blockAlign |= 0 << 3; + } + switch ($conditional->getStyle()->getAlignment()->getVertical()) { + case Alignment::VERTICAL_BOTTOM: + $blockAlign = 2 << 4; + + break; + case Alignment::VERTICAL_TOP: + $blockAlign = 0 << 4; + + break; + case Alignment::VERTICAL_CENTER: + $blockAlign = 1 << 4; + + break; + case Alignment::VERTICAL_JUSTIFY: + $blockAlign = 3 << 4; + + break; + } + $blockAlign |= 0 << 7; + + // Text rotation angle + $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); + + // Indentation + $blockIndent = $conditional->getStyle()->getAlignment()->getIndent(); + if ($conditional->getStyle()->getAlignment()->getShrinkToFit() == true) { + $blockIndent |= 1 << 4; + } else { + $blockIndent |= 0 << 4; + } + $blockIndent |= 0 << 6; + + // Relative indentation + $blockIndentRelative = 255; + + $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000); + } + if ($bFormatBorder == 1) { + $blockLineStyle = 0; + switch ($conditional->getStyle()->getBorders()->getLeft()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D; + + break; + } + switch ($conditional->getStyle()->getBorders()->getRight()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 4; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 4; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 4; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 4; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 4; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 4; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 4; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 4; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 4; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 4; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 4; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 4; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 4; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 4; + + break; + } + switch ($conditional->getStyle()->getBorders()->getTop()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 8; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 8; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 8; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 8; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 8; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 8; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 8; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 8; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 8; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 8; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 8; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 8; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 8; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 8; + + break; + } + switch ($conditional->getStyle()->getBorders()->getBottom()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 12; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 12; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 12; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 12; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 12; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 12; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 12; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 12; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 12; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 12; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 12; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 12; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 12; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 12; + + break; + } + + // TODO writeCFRule() => $blockLineStyle => Index Color for left line + // TODO writeCFRule() => $blockLineStyle => Index Color for right line + // TODO writeCFRule() => $blockLineStyle => Top-left to bottom-right on/off + // TODO writeCFRule() => $blockLineStyle => Bottom-left to top-right on/off + $blockColor = 0; + // TODO writeCFRule() => $blockColor => Index Color for top line + // TODO writeCFRule() => $blockColor => Index Color for bottom line + // TODO writeCFRule() => $blockColor => Index Color for diagonal line + switch ($conditional->getStyle()->getBorders()->getDiagonal()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockColor |= 0x00 << 21; + + break; + case Border::BORDER_THIN: + $blockColor |= 0x01 << 21; + + break; + case Border::BORDER_MEDIUM: + $blockColor |= 0x02 << 21; + + break; + case Border::BORDER_DASHED: + $blockColor |= 0x03 << 21; + + break; + case Border::BORDER_DOTTED: + $blockColor |= 0x04 << 21; + + break; + case Border::BORDER_THICK: + $blockColor |= 0x05 << 21; + + break; + case Border::BORDER_DOUBLE: + $blockColor |= 0x06 << 21; + + break; + case Border::BORDER_HAIR: + $blockColor |= 0x07 << 21; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockColor |= 0x08 << 21; + + break; + case Border::BORDER_DASHDOT: + $blockColor |= 0x09 << 21; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockColor |= 0x0A << 21; + + break; + case Border::BORDER_DASHDOTDOT: + $blockColor |= 0x0B << 21; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockColor |= 0x0C << 21; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockColor |= 0x0D << 21; + + break; + } + $dataBlockBorder = pack('vv', $blockLineStyle, $blockColor); + } + if ($bFormatFill == 1) { + // Fill Patern Style + $blockFillPatternStyle = 0; + switch ($conditional->getStyle()->getFill()->getFillType()) { + case Fill::FILL_NONE: + $blockFillPatternStyle = 0x00; + + break; + case Fill::FILL_SOLID: + $blockFillPatternStyle = 0x01; + + break; + case Fill::FILL_PATTERN_MEDIUMGRAY: + $blockFillPatternStyle = 0x02; + + break; + case Fill::FILL_PATTERN_DARKGRAY: + $blockFillPatternStyle = 0x03; + + break; + case Fill::FILL_PATTERN_LIGHTGRAY: + $blockFillPatternStyle = 0x04; + + break; + case Fill::FILL_PATTERN_DARKHORIZONTAL: + $blockFillPatternStyle = 0x05; + + break; + case Fill::FILL_PATTERN_DARKVERTICAL: + $blockFillPatternStyle = 0x06; + + break; + case Fill::FILL_PATTERN_DARKDOWN: + $blockFillPatternStyle = 0x07; + + break; + case Fill::FILL_PATTERN_DARKUP: + $blockFillPatternStyle = 0x08; + + break; + case Fill::FILL_PATTERN_DARKGRID: + $blockFillPatternStyle = 0x09; + + break; + case Fill::FILL_PATTERN_DARKTRELLIS: + $blockFillPatternStyle = 0x0A; + + break; + case Fill::FILL_PATTERN_LIGHTHORIZONTAL: + $blockFillPatternStyle = 0x0B; + + break; + case Fill::FILL_PATTERN_LIGHTVERTICAL: + $blockFillPatternStyle = 0x0C; + + break; + case Fill::FILL_PATTERN_LIGHTDOWN: + $blockFillPatternStyle = 0x0D; + + break; + case Fill::FILL_PATTERN_LIGHTUP: + $blockFillPatternStyle = 0x0E; + + break; + case Fill::FILL_PATTERN_LIGHTGRID: + $blockFillPatternStyle = 0x0F; + + break; + case Fill::FILL_PATTERN_LIGHTTRELLIS: + $blockFillPatternStyle = 0x10; + + break; + case Fill::FILL_PATTERN_GRAY125: + $blockFillPatternStyle = 0x11; + + break; + case Fill::FILL_PATTERN_GRAY0625: + $blockFillPatternStyle = 0x12; + + break; + case Fill::FILL_GRADIENT_LINEAR: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + case Fill::FILL_GRADIENT_PATH: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + default: + $blockFillPatternStyle = 0x00; + + break; + } + // Color + switch ($conditional->getStyle()->getFill()->getStartColor()->getRGB()) { + case '000000': + $colorIdxBg = 0x08; + + break; + case 'FFFFFF': + $colorIdxBg = 0x09; + + break; + case 'FF0000': + $colorIdxBg = 0x0A; + + break; + case '00FF00': + $colorIdxBg = 0x0B; + + break; + case '0000FF': + $colorIdxBg = 0x0C; + + break; + case 'FFFF00': + $colorIdxBg = 0x0D; + + break; + case 'FF00FF': + $colorIdxBg = 0x0E; + + break; + case '00FFFF': + $colorIdxBg = 0x0F; + + break; + case '800000': + $colorIdxBg = 0x10; + + break; + case '008000': + $colorIdxBg = 0x11; + + break; + case '000080': + $colorIdxBg = 0x12; + + break; + case '808000': + $colorIdxBg = 0x13; + + break; + case '800080': + $colorIdxBg = 0x14; + + break; + case '008080': + $colorIdxBg = 0x15; + + break; + case 'C0C0C0': + $colorIdxBg = 0x16; + + break; + case '808080': + $colorIdxBg = 0x17; + + break; + case '9999FF': + $colorIdxBg = 0x18; + + break; + case '993366': + $colorIdxBg = 0x19; + + break; + case 'FFFFCC': + $colorIdxBg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxBg = 0x1B; + + break; + case '660066': + $colorIdxBg = 0x1C; + + break; + case 'FF8080': + $colorIdxBg = 0x1D; + + break; + case '0066CC': + $colorIdxBg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxBg = 0x1F; + + break; + case '000080': + $colorIdxBg = 0x20; + + break; + case 'FF00FF': + $colorIdxBg = 0x21; + + break; + case 'FFFF00': + $colorIdxBg = 0x22; + + break; + case '00FFFF': + $colorIdxBg = 0x23; + + break; + case '800080': + $colorIdxBg = 0x24; + + break; + case '800000': + $colorIdxBg = 0x25; + + break; + case '008080': + $colorIdxBg = 0x26; + + break; + case '0000FF': + $colorIdxBg = 0x27; + + break; + case '00CCFF': + $colorIdxBg = 0x28; + + break; + case 'CCFFFF': + $colorIdxBg = 0x29; + + break; + case 'CCFFCC': + $colorIdxBg = 0x2A; + + break; + case 'FFFF99': + $colorIdxBg = 0x2B; + + break; + case '99CCFF': + $colorIdxBg = 0x2C; + + break; + case 'FF99CC': + $colorIdxBg = 0x2D; + + break; + case 'CC99FF': + $colorIdxBg = 0x2E; + + break; + case 'FFCC99': + $colorIdxBg = 0x2F; + + break; + case '3366FF': + $colorIdxBg = 0x30; + + break; + case '33CCCC': + $colorIdxBg = 0x31; + + break; + case '99CC00': + $colorIdxBg = 0x32; + + break; + case 'FFCC00': + $colorIdxBg = 0x33; + + break; + case 'FF9900': + $colorIdxBg = 0x34; + + break; + case 'FF6600': + $colorIdxBg = 0x35; + + break; + case '666699': + $colorIdxBg = 0x36; + + break; + case '969696': + $colorIdxBg = 0x37; + + break; + case '003366': + $colorIdxBg = 0x38; + + break; + case '339966': + $colorIdxBg = 0x39; + + break; + case '003300': + $colorIdxBg = 0x3A; + + break; + case '333300': + $colorIdxBg = 0x3B; + + break; + case '993300': + $colorIdxBg = 0x3C; + + break; + case '993366': + $colorIdxBg = 0x3D; + + break; + case '333399': + $colorIdxBg = 0x3E; + + break; + case '333333': + $colorIdxBg = 0x3F; + + break; + default: + $colorIdxBg = 0x41; + + break; + } + // Fg Color + switch ($conditional->getStyle()->getFill()->getEndColor()->getRGB()) { + case '000000': + $colorIdxFg = 0x08; + + break; + case 'FFFFFF': + $colorIdxFg = 0x09; + + break; + case 'FF0000': + $colorIdxFg = 0x0A; + + break; + case '00FF00': + $colorIdxFg = 0x0B; + + break; + case '0000FF': + $colorIdxFg = 0x0C; + + break; + case 'FFFF00': + $colorIdxFg = 0x0D; + + break; + case 'FF00FF': + $colorIdxFg = 0x0E; + + break; + case '00FFFF': + $colorIdxFg = 0x0F; + + break; + case '800000': + $colorIdxFg = 0x10; + + break; + case '008000': + $colorIdxFg = 0x11; + + break; + case '000080': + $colorIdxFg = 0x12; + + break; + case '808000': + $colorIdxFg = 0x13; + + break; + case '800080': + $colorIdxFg = 0x14; + + break; + case '008080': + $colorIdxFg = 0x15; + + break; + case 'C0C0C0': + $colorIdxFg = 0x16; + + break; + case '808080': + $colorIdxFg = 0x17; + + break; + case '9999FF': + $colorIdxFg = 0x18; + + break; + case '993366': + $colorIdxFg = 0x19; + + break; + case 'FFFFCC': + $colorIdxFg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxFg = 0x1B; + + break; + case '660066': + $colorIdxFg = 0x1C; + + break; + case 'FF8080': + $colorIdxFg = 0x1D; + + break; + case '0066CC': + $colorIdxFg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxFg = 0x1F; + + break; + case '000080': + $colorIdxFg = 0x20; + + break; + case 'FF00FF': + $colorIdxFg = 0x21; + + break; + case 'FFFF00': + $colorIdxFg = 0x22; + + break; + case '00FFFF': + $colorIdxFg = 0x23; + + break; + case '800080': + $colorIdxFg = 0x24; + + break; + case '800000': + $colorIdxFg = 0x25; + + break; + case '008080': + $colorIdxFg = 0x26; + + break; + case '0000FF': + $colorIdxFg = 0x27; + + break; + case '00CCFF': + $colorIdxFg = 0x28; + + break; + case 'CCFFFF': + $colorIdxFg = 0x29; + + break; + case 'CCFFCC': + $colorIdxFg = 0x2A; + + break; + case 'FFFF99': + $colorIdxFg = 0x2B; + + break; + case '99CCFF': + $colorIdxFg = 0x2C; + + break; + case 'FF99CC': + $colorIdxFg = 0x2D; + + break; + case 'CC99FF': + $colorIdxFg = 0x2E; + + break; + case 'FFCC99': + $colorIdxFg = 0x2F; + + break; + case '3366FF': + $colorIdxFg = 0x30; + + break; + case '33CCCC': + $colorIdxFg = 0x31; + + break; + case '99CC00': + $colorIdxFg = 0x32; + + break; + case 'FFCC00': + $colorIdxFg = 0x33; + + break; + case 'FF9900': + $colorIdxFg = 0x34; + + break; + case 'FF6600': + $colorIdxFg = 0x35; + + break; + case '666699': + $colorIdxFg = 0x36; + + break; + case '969696': + $colorIdxFg = 0x37; + + break; + case '003366': + $colorIdxFg = 0x38; + + break; + case '339966': + $colorIdxFg = 0x39; + + break; + case '003300': + $colorIdxFg = 0x3A; + + break; + case '333300': + $colorIdxFg = 0x3B; + + break; + case '993300': + $colorIdxFg = 0x3C; + + break; + case '993366': + $colorIdxFg = 0x3D; + + break; + case '333399': + $colorIdxFg = 0x3E; + + break; + case '333333': + $colorIdxFg = 0x3F; + + break; + default: + $colorIdxFg = 0x40; + + break; + } + $dataBlockFill = pack('v', $blockFillPatternStyle); + $dataBlockFill .= pack('v', $colorIdxFg | ($colorIdxBg << 7)); + } + if ($bFormatProt == 1) { + $dataBlockProtection = 0; + if ($conditional->getStyle()->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1; + } + if ($conditional->getStyle()->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1 << 1; + } + } + + $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000); + if ($bFormatFont == 1) { // Block Formatting : OK + $data .= $dataBlockFont; + } + if ($bFormatAlign == 1) { + $data .= $dataBlockAlign; + } + if ($bFormatBorder == 1) { + $data .= $dataBlockBorder; + } + if ($bFormatFill == 1) { // Block Formatting : OK + $data .= $dataBlockFill; + } + if ($bFormatProt == 1) { + $data .= $dataBlockProtection; + } + if ($operand1 !== null) { + $data .= $operand1; + } + if ($operand2 !== null) { + $data .= $operand2; + } + $header = pack('vv', $record, strlen($data)); + $this->append($header . $data); + } + + /** + * Write CFHeader record. + */ + private function writeCFHeader(): void + { + $record = 0x01B0; // Record identifier + $length = 0x0016; // Bytes to follow + + $numColumnMin = null; + $numColumnMax = null; + $numRowMin = null; + $numRowMax = null; + $arrConditional = []; + foreach ($this->phpSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!in_array($conditional->getHashCode(), $arrConditional)) { + $arrConditional[] = $conditional->getHashCode(); + } + // Cells + $arrCoord = Coordinate::coordinateFromString($cellCoordinate); + if (!is_numeric($arrCoord[0])) { + $arrCoord[0] = Coordinate::columnIndexFromString($arrCoord[0]); + } + if ($numColumnMin === null || ($numColumnMin > $arrCoord[0])) { + $numColumnMin = $arrCoord[0]; + } + if ($numColumnMax === null || ($numColumnMax < $arrCoord[0])) { + $numColumnMax = $arrCoord[0]; + } + if ($numRowMin === null || ($numRowMin > $arrCoord[1])) { + $numRowMin = $arrCoord[1]; + } + if ($numRowMax === null || ($numRowMax < $arrCoord[1])) { + $numRowMax = $arrCoord[1]; + } + } + } + } + $needRedraw = 1; + $cellRange = pack('vvvv', $numRowMin - 1, $numRowMax - 1, $numColumnMin - 1, $numColumnMax - 1); + + $header = pack('vv', $record, $length); + $data = pack('vv', count($arrConditional), $needRedraw); + $data .= $cellRange; + $data .= pack('v', 0x0001); + $data .= $cellRange; + $this->append($header . $data); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php new file mode 100755 index 0000000..3e8169b --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php @@ -0,0 +1,548 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Xf +{ + /** + * Style XF or a cell XF ? + * + * @var bool + */ + private $isStyleXf; + + /** + * Index to the FONT record. Index 4 does not exist. + * + * @var int + */ + private $fontIndex; + + /** + * An index (2 bytes) to a FORMAT record (number format). + * + * @var int + */ + private $numberFormatIndex; + + /** + * 1 bit, apparently not used. + * + * @var int + */ + private $textJustLast; + + /** + * The cell's foreground color. + * + * @var int + */ + private $foregroundColor; + + /** + * The cell's background color. + * + * @var int + */ + private $backgroundColor; + + /** + * Color of the bottom border of the cell. + * + * @var int + */ + private $bottomBorderColor; + + /** + * Color of the top border of the cell. + * + * @var int + */ + private $topBorderColor; + + /** + * Color of the left border of the cell. + * + * @var int + */ + private $leftBorderColor; + + /** + * Color of the right border of the cell. + * + * @var int + */ + private $rightBorderColor; + + /** + * Constructor. + * + * @param Style $style The XF format + */ + public function __construct(Style $style) + { + $this->isStyleXf = false; + $this->fontIndex = 0; + + $this->numberFormatIndex = 0; + + $this->textJustLast = 0; + + $this->foregroundColor = 0x40; + $this->backgroundColor = 0x41; + + $this->_diag = 0; + + $this->bottomBorderColor = 0x40; + $this->topBorderColor = 0x40; + $this->leftBorderColor = 0x40; + $this->rightBorderColor = 0x40; + $this->_diag_color = 0x40; + $this->_style = $style; + } + + /** + * Generate an Excel BIFF XF record (style or cell). + * + * @return string The XF record + */ + public function writeXf() + { + // Set the type of the XF record and some of the attributes. + if ($this->isStyleXf) { + $style = 0xFFF5; + } else { + $style = self::mapLocked($this->_style->getProtection()->getLocked()); + $style |= self::mapHidden($this->_style->getProtection()->getHidden()) << 1; + } + + // Flags to indicate if attributes have been set. + $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0; + $atr_fnt = ($this->fontIndex != 0) ? 1 : 0; + $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; + $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0; + $atr_pat = (($this->foregroundColor != 0x40) || + ($this->backgroundColor != 0x41) || + self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0; + $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) + | self::mapHidden($this->_style->getProtection()->getHidden()); + + // Zero the default border colour if the border has not been set. + if (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) == 0) { + $this->bottomBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { + $this->topBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) == 0) { + $this->rightBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) == 0) { + $this->leftBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) == 0) { + $this->_diag_color = 0; + } + + $record = 0x00E0; // Record identifier + $length = 0x0014; // Number of bytes to follow + + $ifnt = $this->fontIndex; // Index to FONT record + $ifmt = $this->numberFormatIndex; // Index to FORMAT record + + $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment + $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; + $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; + $align |= $this->textJustLast << 7; + + $used_attrib = $atr_num << 2; + $used_attrib |= $atr_fnt << 3; + $used_attrib |= $atr_alc << 4; + $used_attrib |= $atr_bdr << 5; + $used_attrib |= $atr_pat << 6; + $used_attrib |= $atr_prot << 7; + + $icv = $this->foregroundColor; // fg and bg pattern colors + $icv |= $this->backgroundColor << 7; + + $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; + $border1 |= $this->leftBorderColor << 16; + $border1 |= $this->rightBorderColor << 23; + + $diagonalDirection = $this->_style->getBorders()->getDiagonalDirection(); + $diag_tl_to_rb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_DOWN; + $diag_tr_to_lb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_UP; + $border1 |= $diag_tl_to_rb << 30; + $border1 |= $diag_tr_to_lb << 31; + + $border2 = $this->topBorderColor; // Border color + $border2 |= $this->bottomBorderColor << 7; + $border2 |= $this->_diag_color << 14; + $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; + $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; + + $header = pack('vv', $record, $length); + + //BIFF8 options: identation, shrinkToFit and text direction + $biff8_options = $this->_style->getAlignment()->getIndent(); + $biff8_options |= (int) $this->_style->getAlignment()->getShrinkToFit() << 4; + + $data = pack('vvvC', $ifnt, $ifmt, $style, $align); + $data .= pack('CCC', self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib); + $data .= pack('VVv', $border1, $border2, $icv); + + return $header . $data; + } + + /** + * Is this a style XF ? + * + * @param bool $value + */ + public function setIsStyleXf($value): void + { + $this->isStyleXf = $value; + } + + /** + * Sets the cell's bottom border color. + * + * @param int $colorIndex Color index + */ + public function setBottomColor($colorIndex): void + { + $this->bottomBorderColor = $colorIndex; + } + + /** + * Sets the cell's top border color. + * + * @param int $colorIndex Color index + */ + public function setTopColor($colorIndex): void + { + $this->topBorderColor = $colorIndex; + } + + /** + * Sets the cell's left border color. + * + * @param int $colorIndex Color index + */ + public function setLeftColor($colorIndex): void + { + $this->leftBorderColor = $colorIndex; + } + + /** + * Sets the cell's right border color. + * + * @param int $colorIndex Color index + */ + public function setRightColor($colorIndex): void + { + $this->rightBorderColor = $colorIndex; + } + + /** + * Sets the cell's diagonal border color. + * + * @param int $colorIndex Color index + */ + public function setDiagColor($colorIndex): void + { + $this->_diag_color = $colorIndex; + } + + /** + * Sets the cell's foreground color. + * + * @param int $colorIndex Color index + */ + public function setFgColor($colorIndex): void + { + $this->foregroundColor = $colorIndex; + } + + /** + * Sets the cell's background color. + * + * @param int $colorIndex Color index + */ + public function setBgColor($colorIndex): void + { + $this->backgroundColor = $colorIndex; + } + + /** + * Sets the index to the number format record + * It can be date, time, currency, etc... + * + * @param int $numberFormatIndex Index to format record + */ + public function setNumberFormatIndex($numberFormatIndex): void + { + $this->numberFormatIndex = $numberFormatIndex; + } + + /** + * Set the font index. + * + * @param int $value Font index, note that value 4 does not exist + */ + public function setFontIndex($value): void + { + $this->fontIndex = $value; + } + + /** + * Map of BIFF2-BIFF8 codes for border styles. + * + * @var array of int + */ + private static $mapBorderStyles = [ + Border::BORDER_NONE => 0x00, + Border::BORDER_THIN => 0x01, + Border::BORDER_MEDIUM => 0x02, + Border::BORDER_DASHED => 0x03, + Border::BORDER_DOTTED => 0x04, + Border::BORDER_THICK => 0x05, + Border::BORDER_DOUBLE => 0x06, + Border::BORDER_HAIR => 0x07, + Border::BORDER_MEDIUMDASHED => 0x08, + Border::BORDER_DASHDOT => 0x09, + Border::BORDER_MEDIUMDASHDOT => 0x0A, + Border::BORDER_DASHDOTDOT => 0x0B, + Border::BORDER_MEDIUMDASHDOTDOT => 0x0C, + Border::BORDER_SLANTDASHDOT => 0x0D, + ]; + + /** + * Map border style. + * + * @param string $borderStyle + * + * @return int + */ + private static function mapBorderStyle($borderStyle) + { + if (isset(self::$mapBorderStyles[$borderStyle])) { + return self::$mapBorderStyles[$borderStyle]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for fill types. + * + * @var array of int + */ + private static $mapFillTypes = [ + Fill::FILL_NONE => 0x00, + Fill::FILL_SOLID => 0x01, + Fill::FILL_PATTERN_MEDIUMGRAY => 0x02, + Fill::FILL_PATTERN_DARKGRAY => 0x03, + Fill::FILL_PATTERN_LIGHTGRAY => 0x04, + Fill::FILL_PATTERN_DARKHORIZONTAL => 0x05, + Fill::FILL_PATTERN_DARKVERTICAL => 0x06, + Fill::FILL_PATTERN_DARKDOWN => 0x07, + Fill::FILL_PATTERN_DARKUP => 0x08, + Fill::FILL_PATTERN_DARKGRID => 0x09, + Fill::FILL_PATTERN_DARKTRELLIS => 0x0A, + Fill::FILL_PATTERN_LIGHTHORIZONTAL => 0x0B, + Fill::FILL_PATTERN_LIGHTVERTICAL => 0x0C, + Fill::FILL_PATTERN_LIGHTDOWN => 0x0D, + Fill::FILL_PATTERN_LIGHTUP => 0x0E, + Fill::FILL_PATTERN_LIGHTGRID => 0x0F, + Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, + Fill::FILL_PATTERN_GRAY125 => 0x11, + Fill::FILL_PATTERN_GRAY0625 => 0x12, + Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 + Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 + ]; + + /** + * Map fill type. + * + * @param string $fillType + * + * @return int + */ + private static function mapFillType($fillType) + { + if (isset(self::$mapFillTypes[$fillType])) { + return self::$mapFillTypes[$fillType]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for horizontal alignment. + * + * @var array of int + */ + private static $mapHAlignments = [ + Alignment::HORIZONTAL_GENERAL => 0, + Alignment::HORIZONTAL_LEFT => 1, + Alignment::HORIZONTAL_CENTER => 2, + Alignment::HORIZONTAL_RIGHT => 3, + Alignment::HORIZONTAL_FILL => 4, + Alignment::HORIZONTAL_JUSTIFY => 5, + Alignment::HORIZONTAL_CENTER_CONTINUOUS => 6, + ]; + + /** + * Map to BIFF2-BIFF8 codes for horizontal alignment. + * + * @param string $hAlign + * + * @return int + */ + private function mapHAlign($hAlign) + { + if (isset(self::$mapHAlignments[$hAlign])) { + return self::$mapHAlignments[$hAlign]; + } + + return 0; + } + + /** + * Map of BIFF2-BIFF8 codes for vertical alignment. + * + * @var array of int + */ + private static $mapVAlignments = [ + Alignment::VERTICAL_TOP => 0, + Alignment::VERTICAL_CENTER => 1, + Alignment::VERTICAL_BOTTOM => 2, + Alignment::VERTICAL_JUSTIFY => 3, + ]; + + /** + * Map to BIFF2-BIFF8 codes for vertical alignment. + * + * @param string $vAlign + * + * @return int + */ + private static function mapVAlign($vAlign) + { + if (isset(self::$mapVAlignments[$vAlign])) { + return self::$mapVAlignments[$vAlign]; + } + + return 2; + } + + /** + * Map to BIFF8 codes for text rotation angle. + * + * @param int $textRotation + * + * @return int + */ + private static function mapTextRotation($textRotation) + { + if ($textRotation >= 0) { + return $textRotation; + } elseif ($textRotation == -165) { + return 255; + } elseif ($textRotation < 0) { + return 90 - $textRotation; + } + } + + /** + * Map locked. + * + * @param string $locked + * + * @return int + */ + private static function mapLocked($locked) + { + switch ($locked) { + case Protection::PROTECTION_INHERIT: + return 1; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 1; + } + } + + /** + * Map hidden. + * + * @param string $hidden + * + * @return int + */ + private static function mapHidden($hidden) + { + switch ($hidden) { + case Protection::PROTECTION_INHERIT: + return 0; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 0; + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php new file mode 100755 index 0000000..4cb1028 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php @@ -0,0 +1,556 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'stringtable' => StringTable::class, + 'contenttypes' => ContentTypes::class, + 'docprops' => DocProps::class, + 'rels' => Rels::class, + 'theme' => Theme::class, + 'style' => Style::class, + 'workbook' => Workbook::class, + 'worksheet' => Worksheet::class, + 'drawing' => Drawing::class, + 'comments' => Comments::class, + 'chart' => Chart::class, + 'relsvba' => RelsVBA::class, + 'relsribbonobjects' => RelsRibbon::class, + ]; + + // Initialise writer parts + // and Assign their parent IWriters + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + + $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable', + 'bordersHashTable', 'numFmtHashTable', 'drawingHashTable', + 'styleHashTable', + ]; + + // Set HashTable variables + foreach ($hashTablesArray as $tableName) { + $this->$tableName = new HashTable(); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + if ($this->spreadSheet !== null) { + // garbage collect + $this->pathNames = []; + $this->spreadSheet->garbageCollect(); + + $this->openFileHandle($pFilename); + + $saveDebugLog = Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // Create string lookup table + $this->stringTable = []; + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $this->stringTable = $this->getWriterPart('StringTable')->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable); + } + + // Create styles dictionaries + $this->styleHashTable->addFromSource($this->getWriterPart('Style')->allStyles($this->spreadSheet)); + $this->stylesConditionalHashTable->addFromSource($this->getWriterPart('Style')->allConditionalStyles($this->spreadSheet)); + $this->fillHashTable->addFromSource($this->getWriterPart('Style')->allFills($this->spreadSheet)); + $this->fontHashTable->addFromSource($this->getWriterPart('Style')->allFonts($this->spreadSheet)); + $this->bordersHashTable->addFromSource($this->getWriterPart('Style')->allBorders($this->spreadSheet)); + $this->numFmtHashTable->addFromSource($this->getWriterPart('Style')->allNumberFormats($this->spreadSheet)); + + // Create drawing dictionary + $this->drawingHashTable->addFromSource($this->getWriterPart('Drawing')->allDrawings($this->spreadSheet)); + + $options = new Archive(); + $options->setEnableZip64(false); + $options->setOutputStream($this->fileHandle); + + $this->zip = new ZipStream(null, $options); + + // Add [Content_Types].xml to ZIP file + $this->addZipFile('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); + + //if hasMacros, add the vbaProject.bin file, Certificate file(if exists) + if ($this->spreadSheet->hasMacros()) { + $macrosCode = $this->spreadSheet->getMacrosCode(); + if ($macrosCode !== null) { + // we have the code ? + $this->addZipFile('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin + if ($this->spreadSheet->hasMacrosCertificate()) { + //signed macros ? + // Yes : add the certificate file and the related rels file + $this->addZipFile('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate()); + $this->addZipFile('xl/_rels/vbaProject.bin.rels', $this->getWriterPart('RelsVBA')->writeVBARelationships($this->spreadSheet)); + } + } + } + //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels) + if ($this->spreadSheet->hasRibbon()) { + $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target'); + $this->addZipFile($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); + if ($this->spreadSheet->hasRibbonBinObjects()) { + $tmpRootPath = dirname($tmpRibbonTarget) . '/'; + $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write + foreach ($ribbonBinObjects as $aPath => $aContent) { + $this->addZipFile($tmpRootPath . $aPath, $aContent); + } + //the rels for files + $this->addZipFile($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); + } + } + + // Add relationships to ZIP file + $this->addZipFile('_rels/.rels', $this->getWriterPart('Rels')->writeRelationships($this->spreadSheet)); + $this->addZipFile('xl/_rels/workbook.xml.rels', $this->getWriterPart('Rels')->writeWorkbookRelationships($this->spreadSheet)); + + // Add document properties to ZIP file + $this->addZipFile('docProps/app.xml', $this->getWriterPart('DocProps')->writeDocPropsApp($this->spreadSheet)); + $this->addZipFile('docProps/core.xml', $this->getWriterPart('DocProps')->writeDocPropsCore($this->spreadSheet)); + $customPropertiesPart = $this->getWriterPart('DocProps')->writeDocPropsCustom($this->spreadSheet); + if ($customPropertiesPart !== null) { + $this->addZipFile('docProps/custom.xml', $customPropertiesPart); + } + + // Add theme to ZIP file + $this->addZipFile('xl/theme/theme1.xml', $this->getWriterPart('Theme')->writeTheme($this->spreadSheet)); + + // Add string table to ZIP file + $this->addZipFile('xl/sharedStrings.xml', $this->getWriterPart('StringTable')->writeStringTable($this->stringTable)); + + // Add styles to ZIP file + $this->addZipFile('xl/styles.xml', $this->getWriterPart('Style')->writeStyles($this->spreadSheet)); + + // Add workbook to ZIP file + $this->addZipFile('xl/workbook.xml', $this->getWriterPart('Workbook')->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas)); + + $chartCount = 0; + // Add worksheets + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $this->addZipFile('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); + if ($this->includeCharts) { + $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); + if (count($charts) > 0) { + foreach ($charts as $chart) { + $this->addZipFile('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); + ++$chartCount; + } + } + } + } + + $chartRef1 = 0; + // Add worksheet relationships (drawings, ...) + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + // Add relationships + $this->addZipFile('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); + + // Add unparsedLoadedData + $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName(); + $unparsedLoadedData = $this->spreadSheet->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'] as $ctrlProp) { + $this->addZipFile($ctrlProp['filePath'], $ctrlProp['content']); + } + } + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'] as $ctrlProp) { + $this->addZipFile($ctrlProp['filePath'], $ctrlProp['content']); + } + } + + $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + if ($this->includeCharts) { + $chartCount = $this->spreadSheet->getSheet($i)->getChartCount(); + } + + // Add drawing and image relationship parts + if (($drawingCount > 0) || ($chartCount > 0)) { + // Drawing relationships + $this->addZipFile('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); + + // Drawings + $this->addZipFile('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } elseif (isset($unparsedLoadedData['sheets'][$sheetCodeName]['drawingAlternateContents'])) { + // Drawings + $this->addZipFile('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } + + // Add unparsed drawings + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'] as $relId => $drawingXml) { + $drawingFile = array_search($relId, $unparsedLoadedData['sheets'][$sheetCodeName]['drawingOriginalIds']); + if ($drawingFile !== false) { + $drawingFile = ltrim($drawingFile, '.'); + $this->addZipFile('xl' . $drawingFile, $drawingXml); + } + } + } + + // Add comment relationship parts + if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { + // VML Comments + $this->addZipFile('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); + + // Comments + $this->addZipFile('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); + } + + // Add unparsed relationship parts + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'] as $vmlDrawing) { + $this->addZipFile($vmlDrawing['filePath'], $vmlDrawing['content']); + } + } + + // Add header/footer relationship parts + if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + // VML Drawings + $this->addZipFile('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); + + // VML Drawing relationships + $this->addZipFile('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); + + // Media + foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + $this->addZipFile('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); + } + } + } + + // Add media + for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { + if ($this->getDrawingHashTable()->getByIndex($i) instanceof WorksheetDrawing) { + $imageContents = null; + $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath(); + if (strpos($imagePath, 'zip://') !== false) { + $imagePath = substr($imagePath, 6); + $imagePathSplitted = explode('#', $imagePath); + + $imageZip = new ZipArchive(); + $imageZip->open($imagePathSplitted[0]); + $imageContents = $imageZip->getFromName($imagePathSplitted[1]); + $imageZip->close(); + unset($imageZip); + } else { + $imageContents = file_get_contents($imagePath); + } + + $this->addZipFile('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + ob_start(); + call_user_func( + $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction(), + $this->getDrawingHashTable()->getByIndex($i)->getImageResource() + ); + $imageContents = ob_get_contents(); + ob_end_clean(); + + $this->addZipFile('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } + } + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + + // Close file + try { + $this->zip->finish(); + } catch (OverflowException $e) { + throw new WriterException('Could not close resource.'); + } + + $this->maybeCloseFileHandle(); + } else { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + } + + /** + * Get Spreadsheet object. + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No Spreadsheet object assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return $this + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } + + /** + * Get string table. + * + * @return string[] + */ + public function getStringTable() + { + return $this->stringTable; + } + + /** + * Get Style HashTable. + * + * @return HashTable + */ + public function getStyleHashTable() + { + return $this->styleHashTable; + } + + /** + * Get Conditional HashTable. + * + * @return HashTable + */ + public function getStylesConditionalHashTable() + { + return $this->stylesConditionalHashTable; + } + + /** + * Get Fill HashTable. + * + * @return HashTable + */ + public function getFillHashTable() + { + return $this->fillHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Style\Font HashTable. + * + * @return HashTable + */ + public function getFontHashTable() + { + return $this->fontHashTable; + } + + /** + * Get Borders HashTable. + * + * @return HashTable + */ + public function getBordersHashTable() + { + return $this->bordersHashTable; + } + + /** + * Get NumberFormat HashTable. + * + * @return HashTable + */ + public function getNumFmtHashTable() + { + return $this->numFmtHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\BaseDrawing HashTable. + * + * @return HashTable + */ + public function getDrawingHashTable() + { + return $this->drawingHashTable; + } + + /** + * Get Office2003 compatibility. + * + * @return bool + */ + public function getOffice2003Compatibility() + { + return $this->office2003compatibility; + } + + /** + * Set Office2003 compatibility. + * + * @param bool $pValue Office2003 compatibility? + * + * @return $this + */ + public function setOffice2003Compatibility($pValue) + { + $this->office2003compatibility = $pValue; + + return $this; + } + + private $pathNames = []; + + private function addZipFile(string $path, string $content): void + { + if (!in_array($path, $this->pathNames)) { + $this->pathNames[] = $path; + $this->zip->addFile($path, $content); + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php new file mode 100755 index 0000000..583b262 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -0,0 +1,1516 @@ +calculateCellValues = $calculateCellValues; + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + // Ensure that data series values are up-to-date before we save + if ($this->calculateCellValues) { + $pChart->refresh(); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // c:chartSpace + $objWriter->startElement('c:chartSpace'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->startElement('c:date1904'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + $objWriter->startElement('c:lang'); + $objWriter->writeAttribute('val', 'en-GB'); + $objWriter->endElement(); + $objWriter->startElement('c:roundedCorners'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writeAlternateContent($objWriter); + + $objWriter->startElement('c:chart'); + + $this->writeTitle($objWriter, $pChart->getTitle()); + + $objWriter->startElement('c:autoTitleDeleted'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writePlotArea($objWriter, $pChart->getWorksheet(), $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines()); + + $this->writeLegend($objWriter, $pChart->getLegend()); + + $objWriter->startElement('c:plotVisOnly'); + $objWriter->writeAttribute('val', (int) $pChart->getPlotVisibleOnly()); + $objWriter->endElement(); + + $objWriter->startElement('c:dispBlanksAs'); + $objWriter->writeAttribute('val', $pChart->getDisplayBlanksAs()); + $objWriter->endElement(); + + $objWriter->startElement('c:showDLblsOverMax'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + $this->writePrintSettings($objWriter); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Chart Title. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $title + */ + private function writeTitle(XMLWriter $objWriter, ?Title $title = null): void + { + if ($title === null) { + return; + } + + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + + $caption = $title->getCaption(); + if ((is_array($caption)) && (count($caption) > 0)) { + $caption = $caption[0]; + } + $this->getParentWriter()->getWriterPart('stringtable')->writeRichTextForCharts($objWriter, $caption, 'a'); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $title->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Legend. + * + * @param XMLWriter $objWriter XML Writer + * @param Legend $legend + */ + private function writeLegend(XMLWriter $objWriter, ?Legend $legend = null): void + { + if ($legend === null) { + return; + } + + $objWriter->startElement('c:legend'); + + $objWriter->startElement('c:legendPos'); + $objWriter->writeAttribute('val', $legend->getPosition()); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $legend->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0'); + $objWriter->endElement(); + + $objWriter->startElement('c:txPr'); + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:pPr'); + $objWriter->writeAttribute('rtl', 0); + + $objWriter->startElement('a:defRPr'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:endParaRPr'); + $objWriter->writeAttribute('lang', 'en-US'); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Plot Area. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $xAxisLabel + * @param Title $yAxisLabel + * @param Axis $xAxis + * @param Axis $yAxis + */ + private function writePlotArea(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet, PlotArea $plotArea, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null, ?GridLines $majorGridlines = null, ?GridLines $minorGridlines = null): void + { + if ($plotArea === null) { + return; + } + + $id1 = $id2 = 0; + $this->seriesIndex = 0; + $objWriter->startElement('c:plotArea'); + + $layout = $plotArea->getLayout(); + + $this->writeLayout($objWriter, $layout); + + $chartTypes = self::getChartType($plotArea); + $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; + $plotGroupingType = ''; + foreach ($chartTypes as $chartType) { + $objWriter->startElement('c:' . $chartType); + + $groupCount = $plotArea->getPlotGroupCount(); + for ($i = 0; $i < $groupCount; ++$i) { + $plotGroup = $plotArea->getPlotGroupByIndex($i); + $groupType = $plotGroup->getPlotType(); + if ($groupType == $chartType) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($groupType === DataSeries::TYPE_RADARCHART) { + $objWriter->startElement('c:radarStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } elseif ($groupType === DataSeries::TYPE_SCATTERCHART) { + $objWriter->startElement('c:scatterStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } + + $this->writePlotGroup($plotGroup, $chartType, $objWriter, $catIsMultiLevelSeries, $valIsMultiLevelSeries, $plotGroupingType); + } + } + + $this->writeDataLabels($objWriter, $layout); + + if ($chartType === DataSeries::TYPE_LINECHART) { + // Line only, Line3D can't be smoothed + $objWriter->startElement('c:smooth'); + $objWriter->writeAttribute('val', (int) $plotGroup->getSmoothLine()); + $objWriter->endElement(); + } elseif (($chartType === DataSeries::TYPE_BARCHART) || ($chartType === DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 150); + $objWriter->endElement(); + + if ($plotGroupingType == 'percentStacked' || $plotGroupingType == 'stacked') { + $objWriter->startElement('c:overlap'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + } + } elseif ($chartType === DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:bubbleScale'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + + $objWriter->startElement('c:showNegBubbles'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } elseif ($chartType === DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('c:hiLowLines'); + $objWriter->endElement(); + + $objWriter->startElement('c:upDownBars'); + + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 300); + $objWriter->endElement(); + + $objWriter->startElement('c:upBars'); + $objWriter->endElement(); + + $objWriter->startElement('c:downBars'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // Generate 2 unique numbers to use for axId values + $id1 = '75091328'; + $id2 = '75089408'; + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:firstSliceAng'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + if ($chartType === DataSeries::TYPE_DONUTCHART) { + $objWriter->startElement('c:holeSize'); + $objWriter->writeAttribute('val', 50); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + if ($chartType === DataSeries::TYPE_BUBBLECHART) { + $this->writeValueAxis($objWriter, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } else { + $this->writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $catIsMultiLevelSeries, $yAxis); + } + + $this->writeValueAxis($objWriter, $yAxisLabel, $chartType, $id1, $id2, $valIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } + + $objWriter->endElement(); + } + + /** + * Write Data Labels. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Chart\Layout $chartLayout Chart layout + */ + private function writeDataLabels(XMLWriter $objWriter, ?Layout $chartLayout = null): void + { + $objWriter->startElement('c:dLbls'); + + $objWriter->startElement('c:showLegendKey'); + $showLegendKey = (empty($chartLayout)) ? 0 : $chartLayout->getShowLegendKey(); + $objWriter->writeAttribute('val', ((empty($showLegendKey)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showVal'); + $showVal = (empty($chartLayout)) ? 0 : $chartLayout->getShowVal(); + $objWriter->writeAttribute('val', ((empty($showVal)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showCatName'); + $showCatName = (empty($chartLayout)) ? 0 : $chartLayout->getShowCatName(); + $objWriter->writeAttribute('val', ((empty($showCatName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showSerName'); + $showSerName = (empty($chartLayout)) ? 0 : $chartLayout->getShowSerName(); + $objWriter->writeAttribute('val', ((empty($showSerName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showPercent'); + $showPercent = (empty($chartLayout)) ? 0 : $chartLayout->getShowPercent(); + $objWriter->writeAttribute('val', ((empty($showPercent)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showBubbleSize'); + $showBubbleSize = (empty($chartLayout)) ? 0 : $chartLayout->getShowBubbleSize(); + $objWriter->writeAttribute('val', ((empty($showBubbleSize)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showLeaderLines'); + $showLeaderLines = (empty($chartLayout)) ? 1 : $chartLayout->getShowLeaderLines(); + $objWriter->writeAttribute('val', ((empty($showLeaderLines)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Category Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $xAxisLabel + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + */ + private function writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $isMultiLevelSeries, Axis $yAxis): void + { + $objWriter->startElement('c:catAx'); + + if ($id1 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('orientation')); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'b'); + $objWriter->endElement(); + + if ($xAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $xAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $layout = $xAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $yAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $yAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + if ($id2 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:auto'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + + $objWriter->startElement('c:lblAlgn'); + $objWriter->writeAttribute('val', 'ctr'); + $objWriter->endElement(); + + $objWriter->startElement('c:lblOffset'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + + if ($isMultiLevelSeries) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Value Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $yAxisLabel + * @param string $groupType Chart type + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + */ + private function writeValueAxis($objWriter, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, Axis $xAxis, GridLines $majorGridlines, GridLines $minorGridlines): void + { + $objWriter->startElement('c:valAx'); + + if ($id2 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + + if ($xAxis->getAxisOptionsProperty('maximum') !== null) { + $objWriter->startElement('c:max'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('maximum')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minimum') !== null) { + $objWriter->startElement('c:min'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minimum')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'l'); + $objWriter->endElement(); + + $objWriter->startElement('c:majorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($majorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$majorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $majorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($majorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + $objWriter->startElement('a:effectLst'); + + if ($majorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $majorGridlines->getGlowSize()); + $objWriter->startElement("a:{$majorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($majorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$majorGridlines->getShadowProperty('effect')}"); + if ($majorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $majorGridlines->getShadowProperty('blur')); + } + if ($majorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $majorGridlines->getShadowProperty('distance')); + } + if ($majorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $majorGridlines->getShadowProperty('direction')); + } + if ($majorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $majorGridlines->getShadowProperty('algn')); + } + if ($majorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $majorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($majorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $majorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($majorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $majorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($majorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $majorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$majorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'value'])); + + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($majorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $majorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end majorGridLines + + if ($minorGridlines->getObjectState()) { + $objWriter->startElement('c:minorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($minorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$minorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $minorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($minorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + + $objWriter->startElement('a:effectLst'); + + if ($minorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $minorGridlines->getGlowSize()); + $objWriter->startElement("a:{$minorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($minorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$minorGridlines->getShadowProperty('effect')}"); + if ($minorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $minorGridlines->getShadowProperty('blur')); + } + if ($minorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $minorGridlines->getShadowProperty('distance')); + } + if ($minorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $minorGridlines->getShadowProperty('direction')); + } + if ($minorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $minorGridlines->getShadowProperty('algn')); + } + if ($minorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $minorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($minorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $minorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($minorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $minorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($minorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $minorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$minorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($minorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $minorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end minorGridLines + } + + if ($yAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $yAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $layout = $yAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + } + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $xAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $xAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + + if ($xAxis->getFillProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:ln'); + + $objWriter->writeAttribute('w', $xAxis->getLineStyleProperty('width')); + $objWriter->writeAttribute('cap', $xAxis->getLineStyleProperty('cap')); + $objWriter->writeAttribute('cmpd', $xAxis->getLineStyleProperty('compound')); + + if ($xAxis->getLineProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $xAxis->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($xAxis->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('head')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('head')); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('end')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('end')); + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->startElement('a:effectLst'); + + if ($xAxis->getGlowProperty('size') !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $xAxis->getGlowProperty('size')); + $objWriter->startElement("a:{$xAxis->getGlowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($xAxis->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$xAxis->getShadowProperty('effect')}"); + + if ($xAxis->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $xAxis->getShadowProperty('blur')); + } + if ($xAxis->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $xAxis->getShadowProperty('distance')); + } + if ($xAxis->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $xAxis->getShadowProperty('direction')); + } + if ($xAxis->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $xAxis->getShadowProperty('algn')); + } + if ($xAxis->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(['size', 'sx'])); + } + if ($xAxis->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(['size', 'sy'])); + } + if ($xAxis->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(['size', 'kx'])); + } + if ($xAxis->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $xAxis->getShadowProperty('rotWithShape')); + } + + $objWriter->startElement("a:{$xAxis->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + if ($xAxis->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $xAxis->getSoftEdgesSize()); + $objWriter->endElement(); + } + + $objWriter->endElement(); //effectList + $objWriter->endElement(); //end spPr + + if ($id1 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('horizontal_crosses_value') !== null) { + $objWriter->startElement('c:crossesAt'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses_value')); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:crossBetween'); + $objWriter->writeAttribute('val', 'midCat'); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('major_unit') !== null) { + $objWriter->startElement('c:majorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_unit')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minor_unit') !== null) { + $objWriter->startElement('c:minorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_unit')); + $objWriter->endElement(); + } + } + + if ($isMultiLevelSeries) { + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Get the data series type(s) for a chart plot series. + * + * @param PlotArea $plotArea + * + * @return array|string + */ + private static function getChartType($plotArea) + { + $groupCount = $plotArea->getPlotGroupCount(); + + if ($groupCount == 1) { + $chartType = [$plotArea->getPlotGroupByIndex(0)->getPlotType()]; + } else { + $chartTypes = []; + for ($i = 0; $i < $groupCount; ++$i) { + $chartTypes[] = $plotArea->getPlotGroupByIndex($i)->getPlotType(); + } + $chartType = array_unique($chartTypes); + if (count($chartTypes) == 0) { + throw new WriterException('Chart is not yet implemented'); + } + } + + return $chartType; + } + + /** + * Method writing plot series values. + * + * @param XMLWriter $objWriter XML Writer + * @param int $val value for idx (default: 3) + * @param string $fillColor hex color (default: FF9900) + * + * @return XMLWriter XML Writer + */ + private function writePlotSeriesValuesElement($objWriter, $val = 3, $fillColor = 'FF9900') + { + $objWriter->startElement('c:dPt'); + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $val); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter; + } + + /** + * Write Plot Group (series of related plots). + * + * @param DataSeries $plotGroup + * @param string $groupType Type of plot for dataseries + * @param XMLWriter $objWriter XML Writer + * @param bool &$catIsMultiLevelSeries Is category a multi-series category + * @param bool &$valIsMultiLevelSeries Is value set a multi-series set + * @param string &$plotGroupingType Type of grouping for multi-series values + */ + private function writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType): void + { + if ($plotGroup === null) { + return; + } + + if (($groupType == DataSeries::TYPE_BARCHART) || ($groupType == DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:barDir'); + $objWriter->writeAttribute('val', $plotGroup->getPlotDirection()); + $objWriter->endElement(); + } + + if ($plotGroup->getPlotGrouping() !== null) { + $plotGroupingType = $plotGroup->getPlotGrouping(); + $objWriter->startElement('c:grouping'); + $objWriter->writeAttribute('val', $plotGroupingType); + $objWriter->endElement(); + } + + // Get these details before the loop, because we can use the count to check for varyColors + $plotSeriesOrder = $plotGroup->getPlotOrder(); + $plotSeriesCount = count($plotSeriesOrder); + + if (($groupType !== DataSeries::TYPE_RADARCHART) && ($groupType !== DataSeries::TYPE_STOCKCHART)) { + if ($groupType !== DataSeries::TYPE_LINECHART) { + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + } + + foreach ($plotSeriesOrder as $plotSeriesIdx => $plotSeriesRef) { + $objWriter->startElement('c:ser'); + + $plotLabel = $plotGroup->getPlotLabelByIndex($plotSeriesIdx); + if ($plotLabel) { + $fillColor = $plotLabel->getFillColor(); + if ($fillColor !== null && !is_array($fillColor)) { + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesIdx); + $objWriter->endElement(); + + $objWriter->startElement('c:order'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesRef); + $objWriter->endElement(); + + // Values + $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + $fillColorValues = $plotSeriesValues->getFillColor(); + if ($fillColorValues !== null && is_array($fillColorValues)) { + foreach ($plotSeriesValues->getDataValues() as $dataKey => $dataValue) { + $this->writePlotSeriesValuesElement($objWriter, $dataKey, ($fillColorValues[$dataKey] ?? 'FF9900')); + } + } else { + $this->writePlotSeriesValuesElement($objWriter); + } + } + + // Labels + $plotSeriesLabel = $plotGroup->getPlotLabelByIndex($plotSeriesRef); + if ($plotSeriesLabel && ($plotSeriesLabel->getPointCount() > 0)) { + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:strRef'); + $this->writePlotSeriesLabel($plotSeriesLabel, $objWriter); + $objWriter->endElement(); + $objWriter->endElement(); + } + + // Formatting for the points + if (($groupType == DataSeries::TYPE_LINECHART) || ($groupType == DataSeries::TYPE_STOCKCHART)) { + $plotLineWidth = 12700; + if ($plotSeriesValues) { + $plotLineWidth = $plotSeriesValues->getLineWidth(); + } + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $plotLineWidth); + if ($groupType == DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('a:noFill'); + $objWriter->endElement(); + } + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($plotSeriesValues) { + $plotSeriesMarker = $plotSeriesValues->getPointMarker(); + if ($plotSeriesMarker) { + $objWriter->startElement('c:marker'); + $objWriter->startElement('c:symbol'); + $objWriter->writeAttribute('val', $plotSeriesMarker); + $objWriter->endElement(); + + if ($plotSeriesMarker !== 'none') { + $objWriter->startElement('c:size'); + $objWriter->writeAttribute('val', 3); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + if (($groupType === DataSeries::TYPE_BARCHART) || ($groupType === DataSeries::TYPE_BARCHART_3D) || ($groupType === DataSeries::TYPE_BUBBLECHART)) { + $objWriter->startElement('c:invertIfNegative'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + // Category Labels + $plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesRef); + if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) { + $catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries(); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + if ($plotGroup->getPlotStyle() !== null) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($plotStyle) { + $objWriter->startElement('c:explosion'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + } + } + } + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:xVal'); + } else { + $objWriter->startElement('c:cat'); + } + + $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str'); + $objWriter->endElement(); + } + + // Values + if ($plotSeriesValues) { + $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries(); + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:yVal'); + } else { + $objWriter->startElement('c:val'); + } + + $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num'); + $objWriter->endElement(); + } + + if ($groupType === DataSeries::TYPE_BUBBLECHART) { + $this->writeBubbles($plotSeriesValues, $objWriter); + } + + $objWriter->endElement(); + } + + $this->seriesIndex += $plotSeriesIdx + 1; + } + + /** + * Write Plot Series Label. + * + * @param DataSeriesValues $plotSeriesLabel + * @param XMLWriter $objWriter XML Writer + */ + private function writePlotSeriesLabel($plotSeriesLabel, $objWriter): void + { + if ($plotSeriesLabel === null) { + return; + } + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesLabel->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:strCache'); + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesLabel->getPointCount()); + $objWriter->endElement(); + + foreach ($plotSeriesLabel->getDataValues() as $plotLabelKey => $plotLabelValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotLabelKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotLabelValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Plot Series Values. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + * @param string $groupType Type of plot for dataseries + * @param string $dataType Datatype of series values + */ + private function writePlotSeriesValues($plotSeriesValues, XMLWriter $objWriter, $groupType, $dataType = 'str'): void + { + if ($plotSeriesValues === null) { + return; + } + + if ($plotSeriesValues->isMultiLevelSeries()) { + $levelCount = $plotSeriesValues->multiLevelCount(); + + $objWriter->startElement('c:multiLvlStrRef'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:multiLvlStrCache'); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + for ($level = 0; $level < $levelCount; ++$level) { + $objWriter->startElement('c:lvl'); + + foreach ($plotSeriesValues->getDataValues() as $plotSeriesKey => $plotSeriesValue) { + if (isset($plotSeriesValue[$level])) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue[$level]); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } else { + $objWriter->startElement('c:' . $dataType . 'Ref'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:' . $dataType . 'Cache'); + + if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { + if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData($plotSeriesValues->getFormatCode()); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Bubble Chart Details. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + */ + private function writeBubbles($plotSeriesValues, $objWriter): void + { + if ($plotSeriesValues === null) { + return; + } + + $objWriter->startElement('c:bubbleSize'); + $objWriter->startElement('c:numLit'); + + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData('General'); + $objWriter->endElement(); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + $objWriter->startElement('c:v'); + $objWriter->writeRawData(1); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + /** + * Write Layout. + * + * @param XMLWriter $objWriter XML Writer + * @param Layout $layout + */ + private function writeLayout(XMLWriter $objWriter, ?Layout $layout = null): void + { + $objWriter->startElement('c:layout'); + + if ($layout !== null) { + $objWriter->startElement('c:manualLayout'); + + $layoutTarget = $layout->getLayoutTarget(); + if ($layoutTarget !== null) { + $objWriter->startElement('c:layoutTarget'); + $objWriter->writeAttribute('val', $layoutTarget); + $objWriter->endElement(); + } + + $xMode = $layout->getXMode(); + if ($xMode !== null) { + $objWriter->startElement('c:xMode'); + $objWriter->writeAttribute('val', $xMode); + $objWriter->endElement(); + } + + $yMode = $layout->getYMode(); + if ($yMode !== null) { + $objWriter->startElement('c:yMode'); + $objWriter->writeAttribute('val', $yMode); + $objWriter->endElement(); + } + + $x = $layout->getXPosition(); + if ($x !== null) { + $objWriter->startElement('c:x'); + $objWriter->writeAttribute('val', $x); + $objWriter->endElement(); + } + + $y = $layout->getYPosition(); + if ($y !== null) { + $objWriter->startElement('c:y'); + $objWriter->writeAttribute('val', $y); + $objWriter->endElement(); + } + + $w = $layout->getWidth(); + if ($w !== null) { + $objWriter->startElement('c:w'); + $objWriter->writeAttribute('val', $w); + $objWriter->endElement(); + } + + $h = $layout->getHeight(); + if ($h !== null) { + $objWriter->startElement('c:h'); + $objWriter->writeAttribute('val', $h); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Alternate Content block. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeAlternateContent($objWriter): void + { + $objWriter->startElement('mc:AlternateContent'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + + $objWriter->startElement('mc:Choice'); + $objWriter->writeAttribute('xmlns:c14', 'http://schemas.microsoft.com/office/drawing/2007/8/2/chart'); + $objWriter->writeAttribute('Requires', 'c14'); + + $objWriter->startElement('c14:style'); + $objWriter->writeAttribute('val', '102'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('mc:Fallback'); + $objWriter->startElement('c:style'); + $objWriter->writeAttribute('val', '2'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Printer Settings. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writePrintSettings($objWriter): void + { + $objWriter->startElement('c:printSettings'); + + $objWriter->startElement('c:headerFooter'); + $objWriter->endElement(); + + $objWriter->startElement('c:pageMargins'); + $objWriter->writeAttribute('footer', 0.3); + $objWriter->writeAttribute('header', 0.3); + $objWriter->writeAttribute('r', 0.7); + $objWriter->writeAttribute('l', 0.7); + $objWriter->writeAttribute('t', 0.75); + $objWriter->writeAttribute('b', 0.75); + $objWriter->endElement(); + + $objWriter->startElement('c:pageSetup'); + $objWriter->writeAttribute('orientation', 'portrait'); + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php new file mode 100755 index 0000000..73c4308 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php @@ -0,0 +1,232 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // Authors cache + $authors = []; + $authorId = 0; + foreach ($comments as $comment) { + if (!isset($authors[$comment->getAuthor()])) { + $authors[$comment->getAuthor()] = $authorId++; + } + } + + // comments + $objWriter->startElement('comments'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // Loop through authors + $objWriter->startElement('authors'); + foreach ($authors as $author => $index) { + $objWriter->writeElement('author', $author); + } + $objWriter->endElement(); + + // Loop through comments + $objWriter->startElement('commentList'); + foreach ($comments as $key => $value) { + $this->writeComment($objWriter, $key, $value, $authors); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference + * @param Comment $pComment Comment + * @param array $pAuthors Array of authors + */ + private function writeComment(XMLWriter $objWriter, $pCellReference, Comment $pComment, array $pAuthors): void + { + // comment + $objWriter->startElement('comment'); + $objWriter->writeAttribute('ref', $pCellReference); + $objWriter->writeAttribute('authorId', $pAuthors[$pComment->getAuthor()]); + + // text + $objWriter->startElement('text'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write VML comments to XML format. + * + * @return string XML Output + */ + public function writeVMLComments(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t202'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '202'); + $objWriter->writeAttribute('path', 'm,l,21600r21600,l21600,xe'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through comments + foreach ($comments as $key => $value) { + $this->writeVMLComment($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference, eg: 'A1' + * @param Comment $pComment Comment + */ + private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment): void + { + // Metadata + [$column, $row] = Coordinate::coordinateFromString($pCellReference); + $column = Coordinate::columnIndexFromString($column); + $id = 1024 + $column + $row; + $id = substr($id, 0, 4); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t202'); + $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden')); + $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->writeAttribute('o:insetmode', 'auto'); + + // v:fill + $objWriter->startElement('v:fill'); + $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->endElement(); + + // v:shadow + $objWriter->startElement('v:shadow'); + $objWriter->writeAttribute('on', 't'); + $objWriter->writeAttribute('color', 'black'); + $objWriter->writeAttribute('obscured', 't'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:connecttype', 'none'); + $objWriter->endElement(); + + // v:textbox + $objWriter->startElement('v:textbox'); + $objWriter->writeAttribute('style', 'mso-direction-alt:auto'); + + // div + $objWriter->startElement('div'); + $objWriter->writeAttribute('style', 'text-align:left'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // x:ClientData + $objWriter->startElement('x:ClientData'); + $objWriter->writeAttribute('ObjectType', 'Note'); + + // x:MoveWithCells + $objWriter->writeElement('x:MoveWithCells', ''); + + // x:SizeWithCells + $objWriter->writeElement('x:SizeWithCells', ''); + + // x:AutoFill + $objWriter->writeElement('x:AutoFill', 'False'); + + // x:Row + $objWriter->writeElement('x:Row', ($row - 1)); + + // x:Column + $objWriter->writeElement('x:Column', ($column - 1)); + + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php new file mode 100755 index 0000000..2cff1a8 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php @@ -0,0 +1,240 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Types + $objWriter->startElement('Types'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types'); + + // Theme + $this->writeOverrideContentType($objWriter, '/xl/theme/theme1.xml', 'application/vnd.openxmlformats-officedocument.theme+xml'); + + // Styles + $this->writeOverrideContentType($objWriter, '/xl/styles.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'); + + // Rels + $this->writeDefaultContentType($objWriter, 'rels', 'application/vnd.openxmlformats-package.relationships+xml'); + + // XML + $this->writeDefaultContentType($objWriter, 'xml', 'application/xml'); + + // VML + $this->writeDefaultContentType($objWriter, 'vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'); + + // Workbook + if ($spreadsheet->hasMacros()) { //Macros in workbook ? + // Yes : not standard content but "macroEnabled" + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'); + //... and define a new type for the VBA project + // Better use Override, because we can use 'bin' also for xl\printerSettings\printerSettings1.bin + $this->writeOverrideContentType($objWriter, '/xl/vbaProject.bin', 'application/vnd.ms-office.vbaProject'); + if ($spreadsheet->hasMacrosCertificate()) { + // signed macros ? + // Yes : add needed information + $this->writeOverrideContentType($objWriter, '/xl/vbaProjectSignature.bin', 'application/vnd.ms-office.vbaProjectSignature'); + } + } else { + // no macros in workbook, so standard type + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'); + } + + // DocProps + $this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml'); + + $this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + $this->writeOverrideContentType($objWriter, '/docProps/custom.xml', 'application/vnd.openxmlformats-officedocument.custom-properties+xml'); + } + + // Worksheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'); + } + + // Shared strings + $this->writeOverrideContentType($objWriter, '/xl/sharedStrings.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'); + + // Add worksheet relationship content types + $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData(); + $chart = 1; + for ($i = 0; $i < $sheetCount; ++$i) { + $drawings = $spreadsheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + $chartCount = ($includeCharts) ? $spreadsheet->getSheet($i)->getChartCount() : 0; + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$spreadsheet->getSheet($i)->getCodeName()]['drawingOriginalIds']); + + // We need a drawing relationship for the worksheet if we have either drawings or charts + if (($drawingCount > 0) || ($chartCount > 0) || $hasUnparsedDrawing) { + $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml'); + } + + // If we have charts, then we need a chart relationship for every individual chart + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'); + } + } + } + + // Comments + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getComments()) > 0) { + $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'); + } + } + + // Add media content-types + $aMediaContentTypes = []; + $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count(); + for ($i = 0; $i < $mediaCount; ++$i) { + $extension = ''; + $mimeType = ''; + + if ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getExtension()); + $mimeType = $this->getImageMimeType($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getPath()); + } elseif ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType()); + $extension = explode('/', $extension); + $extension = $extension[1]; + + $mimeType = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType(); + } + + if (!isset($aMediaContentTypes[$extension])) { + $aMediaContentTypes[$extension] = $mimeType; + + $this->writeDefaultContentType($objWriter, $extension, $mimeType); + } + } + if ($spreadsheet->hasRibbonBinObjects()) { + // Some additional objects in the ribbon ? + // we need to write "Extension" but not already write for media content + $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes)); + foreach ($tabRibbonTypes as $aRibbonType) { + $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor + $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType); + } + } + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + foreach ($spreadsheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + if (!isset($aMediaContentTypes[strtolower($image->getExtension())])) { + $aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath()); + + $this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]); + } + } + } + } + + // unparsed defaults + if (isset($unparsedLoadedData['default_content_types'])) { + foreach ($unparsedLoadedData['default_content_types'] as $extName => $contentType) { + $this->writeDefaultContentType($objWriter, $extName, $contentType); + } + } + + // unparsed overrides + if (isset($unparsedLoadedData['override_content_types'])) { + foreach ($unparsedLoadedData['override_content_types'] as $partName => $overrideType) { + $this->writeOverrideContentType($objWriter, $partName, $overrideType); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Get image mime type. + * + * @param string $pFile Filename + * + * @return string Mime Type + */ + private function getImageMimeType($pFile) + { + if (File::fileExists($pFile)) { + $image = getimagesize($pFile); + + return image_type_to_mime_type($image[2]); + } + + throw new WriterException("File $pFile does not exist"); + } + + /** + * Write Default content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + */ + private function writeDefaultContentType(XMLWriter $objWriter, $pPartname, $pContentType): void + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Default'); + $objWriter->writeAttribute('Extension', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + */ + private function writeOverrideContentType(XMLWriter $objWriter, $pPartname, $pContentType): void + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Override'); + $objWriter->writeAttribute('PartName', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php new file mode 100755 index 0000000..bcbc237 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php @@ -0,0 +1,239 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Properties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + // Application + $objWriter->writeElement('Application', 'Microsoft Excel'); + + // DocSecurity + $objWriter->writeElement('DocSecurity', '0'); + + // ScaleCrop + $objWriter->writeElement('ScaleCrop', 'false'); + + // HeadingPairs + $objWriter->startElement('HeadingPairs'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', '2'); + $objWriter->writeAttribute('baseType', 'variant'); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:lpstr', 'Worksheets'); + $objWriter->endElement(); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:i4', $spreadsheet->getSheetCount()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // TitlesOfParts + $objWriter->startElement('TitlesOfParts'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', $spreadsheet->getSheetCount()); + $objWriter->writeAttribute('baseType', 'lpstr'); + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->writeElement('vt:lpstr', $spreadsheet->getSheet($i)->getTitle()); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + + // Company + $objWriter->writeElement('Company', $spreadsheet->getProperties()->getCompany()); + + // Company + $objWriter->writeElement('Manager', $spreadsheet->getProperties()->getManager()); + + // LinksUpToDate + $objWriter->writeElement('LinksUpToDate', 'false'); + + // SharedDoc + $objWriter->writeElement('SharedDoc', 'false'); + + // HyperlinksChanged + $objWriter->writeElement('HyperlinksChanged', 'false'); + + // AppVersion + $objWriter->writeElement('AppVersion', '12.0000'); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/core.xml to XML format. + * + * @return string XML Output + */ + public function writeDocPropsCore(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('cp:coreProperties'); + $objWriter->writeAttribute('xmlns:cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:dcterms', 'http://purl.org/dc/terms/'); + $objWriter->writeAttribute('xmlns:dcmitype', 'http://purl.org/dc/dcmitype/'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + + // dc:creator + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + + // cp:lastModifiedBy + $objWriter->writeElement('cp:lastModifiedBy', $spreadsheet->getProperties()->getLastModifiedBy()); + + // dcterms:created + $objWriter->startElement('dcterms:created'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->endElement(); + + // dcterms:modified + $objWriter->startElement('dcterms:modified'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getModified())); + $objWriter->endElement(); + + // dc:title + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + + // dc:description + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + + // dc:subject + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + + // cp:keywords + $objWriter->writeElement('cp:keywords', $spreadsheet->getProperties()->getKeywords()); + + // cp:category + $objWriter->writeElement('cp:category', $spreadsheet->getProperties()->getCategory()); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/custom.xml to XML format. + * + * @return string XML Output + */ + public function writeDocPropsCustom(Spreadsheet $spreadsheet) + { + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (empty($customPropertyList)) { + return; + } + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + foreach ($customPropertyList as $key => $customProperty) { + $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty); + $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty); + + $objWriter->startElement('property'); + $objWriter->writeAttribute('fmtid', '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}'); + $objWriter->writeAttribute('pid', $key + 2); + $objWriter->writeAttribute('name', $customProperty); + + switch ($propertyType) { + case 'i': + $objWriter->writeElement('vt:i4', $propertyValue); + + break; + case 'f': + $objWriter->writeElement('vt:r8', $propertyValue); + + break; + case 'b': + $objWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false'); + + break; + case 'd': + $objWriter->startElement('vt:filetime'); + $objWriter->writeRawData(date(DATE_W3C, $propertyValue)); + $objWriter->endElement(); + + break; + default: + $objWriter->writeElement('vt:lpwstr', $propertyValue); + + break; + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php new file mode 100755 index 0000000..1713b98 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php @@ -0,0 +1,505 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // xdr:wsDr + $objWriter->startElement('xdr:wsDr'); + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + + // Loop through images and write drawings + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + /** @var BaseDrawing $pDrawing */ + $pDrawing = $iterator->current(); + $pRelationId = $i; + $hlinkClickId = $pDrawing->getHyperlink() === null ? null : ++$i; + + $this->writeDrawing($objWriter, $pDrawing, $pRelationId, $hlinkClickId); + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + $chartCount = $pWorksheet->getChartCount(); + // Loop through charts and write the chart position + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c + $i); + } + } + } + + // unparsed AlternateContent + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'])) { + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'] as $drawingAlternateContent) { + $objWriter->writeRaw($drawingAlternateContent); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pRelationId + */ + public function writeChart(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $pRelationId = -1): void + { + $tl = $pChart->getTopLeftPosition(); + $tl['colRow'] = Coordinate::coordinateFromString($tl['cell']); + $br = $pChart->getBottomRightPosition(); + $br['colRow'] = Coordinate::coordinateFromString($br['cell']); + + $objWriter->startElement('xdr:twoCellAnchor'); + + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($tl['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['xOffset'])); + $objWriter->writeElement('xdr:row', $tl['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['yOffset'])); + $objWriter->endElement(); + $objWriter->startElement('xdr:to'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($br['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['xOffset'])); + $objWriter->writeElement('xdr:row', $br['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['yOffset'])); + $objWriter->endElement(); + + $objWriter->startElement('xdr:graphicFrame'); + $objWriter->writeAttribute('macro', ''); + $objWriter->startElement('xdr:nvGraphicFramePr'); + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('name', 'Chart ' . $pRelationId); + $objWriter->writeAttribute('id', 1025 * $pRelationId); + $objWriter->endElement(); + $objWriter->startElement('xdr:cNvGraphicFramePr'); + $objWriter->startElement('a:graphicFrameLocks'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:xfrm'); + $objWriter->startElement('a:off'); + $objWriter->writeAttribute('x', '0'); + $objWriter->writeAttribute('y', '0'); + $objWriter->endElement(); + $objWriter->startElement('a:ext'); + $objWriter->writeAttribute('cx', '0'); + $objWriter->writeAttribute('cy', '0'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:graphic'); + $objWriter->startElement('a:graphicData'); + $objWriter->writeAttribute('uri', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->startElement('c:chart'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $pRelationId); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:clientData'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pRelationId + * @param null|int $hlinkClickId + */ + public function writeDrawing(XMLWriter $objWriter, BaseDrawing $pDrawing, $pRelationId = -1, $hlinkClickId = null): void + { + if ($pRelationId >= 0) { + // xdr:oneCellAnchor + $objWriter->startElement('xdr:oneCellAnchor'); + // Image location + $aCoordinates = Coordinate::coordinateFromString($pDrawing->getCoordinates()); + $aCoordinates[0] = Coordinate::columnIndexFromString($aCoordinates[0]); + + // xdr:from + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', $aCoordinates[0] - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetX())); + $objWriter->writeElement('xdr:row', $aCoordinates[1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetY())); + $objWriter->endElement(); + + // xdr:ext + $objWriter->startElement('xdr:ext'); + $objWriter->writeAttribute('cx', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getWidth())); + $objWriter->writeAttribute('cy', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getHeight())); + $objWriter->endElement(); + + // xdr:pic + $objWriter->startElement('xdr:pic'); + + // xdr:nvPicPr + $objWriter->startElement('xdr:nvPicPr'); + + // xdr:cNvPr + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('id', $pRelationId); + $objWriter->writeAttribute('name', $pDrawing->getName()); + $objWriter->writeAttribute('descr', $pDrawing->getDescription()); + + //a:hlinkClick + $this->writeHyperLinkDrawing($objWriter, $hlinkClickId); + + $objWriter->endElement(); + + // xdr:cNvPicPr + $objWriter->startElement('xdr:cNvPicPr'); + + // a:picLocks + $objWriter->startElement('a:picLocks'); + $objWriter->writeAttribute('noChangeAspect', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:blipFill + $objWriter->startElement('xdr:blipFill'); + + // a:blip + $objWriter->startElement('a:blip'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId); + $objWriter->endElement(); + + // a:stretch + $objWriter->startElement('a:stretch'); + $objWriter->writeElement('a:fillRect', null); + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:spPr + $objWriter->startElement('xdr:spPr'); + + // a:xfrm + $objWriter->startElement('a:xfrm'); + $objWriter->writeAttribute('rot', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getRotation())); + $objWriter->endElement(); + + // a:prstGeom + $objWriter->startElement('a:prstGeom'); + $objWriter->writeAttribute('prst', 'rect'); + + // a:avLst + $objWriter->writeElement('a:avLst', null); + + $objWriter->endElement(); + + if ($pDrawing->getShadow()->getVisible()) { + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getBlurRadius())); + $objWriter->writeAttribute('dist', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getDistance())); + $objWriter->writeAttribute('dir', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getShadow()->getDirection())); + $objWriter->writeAttribute('algn', $pDrawing->getShadow()->getAlignment()); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getColor()->getRGB()); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getAlpha() * 1000); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:clientData + $objWriter->writeElement('xdr:clientData', null); + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write VML header/footer images to XML format. + * + * @return string XML Output + */ + public function writeVMLHeaderFooterImages(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Header/footer images + $images = $pWorksheet->getHeaderFooter()->getImages(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t75'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '75'); + $objWriter->writeAttribute('o:preferrelative', 't'); + $objWriter->writeAttribute('path', 'm@4@5l@4@11@9@11@9@5xe'); + $objWriter->writeAttribute('filled', 'f'); + $objWriter->writeAttribute('stroked', 'f'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:formulas + $objWriter->startElement('v:formulas'); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'if lineDrawn pixelLineWidth 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 1 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum 0 0 @1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @2 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 0 1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @6 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @8 21600 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @10 21600 0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:extrusionok', 'f'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('aspectratio', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through images + foreach ($images as $key => $value) { + $this->writeVMLHeaderFooterImage($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pReference Reference + * @param HeaderFooterDrawing $pImage Image + */ + private function writeVMLHeaderFooterImage(XMLWriter $objWriter, $pReference, HeaderFooterDrawing $pImage): void + { + // Calculate object id + preg_match('{(\d+)}', md5($pReference), $m); + $id = 1500 + (substr($m[1], 0, 2) * 1); + + // Calculate offset + $width = $pImage->getWidth(); + $height = $pImage->getHeight(); + $marginLeft = $pImage->getOffsetX(); + $marginTop = $pImage->getOffsetY(); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', $pReference); + $objWriter->writeAttribute('o:spid', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t75'); + $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1"); + + // v:imagedata + $objWriter->startElement('v:imagedata'); + $objWriter->writeAttribute('o:relid', 'rId' . $pReference); + $objWriter->writeAttribute('o:title', $pImage->getName()); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('textRotation', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Get an array of all drawings. + * + * @return \PhpOffice\PhpSpreadsheet\Worksheet\Drawing[] All drawings in PhpSpreadsheet + */ + public function allDrawings(Spreadsheet $spreadsheet) + { + // Get an array of all drawings + $aDrawings = []; + + // Loop through PhpSpreadsheet + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // Loop through images and add to array + $iterator = $spreadsheet->getSheet($i)->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + $aDrawings[] = $iterator->current(); + + $iterator->next(); + } + } + + return $aDrawings; + } + + /** + * @param null|int $hlinkClickId + */ + private function writeHyperLinkDrawing(XMLWriter $objWriter, $hlinkClickId): void + { + if ($hlinkClickId === null) { + return; + } + + $objWriter->startElement('a:hlinkClick'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $hlinkClickId); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php new file mode 100755 index 0000000..a4e5769 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php @@ -0,0 +1,449 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 4, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties', + 'docProps/custom.xml' + ); + } + + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties', + 'docProps/app.xml' + ); + + // Relationship docProps/core.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', + 'docProps/core.xml' + ); + + // Relationship xl/workbook.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', + 'xl/workbook.xml' + ); + // a custom UI in workbook ? + if ($spreadsheet->hasRibbon()) { + $this->writeRelationShip( + $objWriter, + 5, + 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility', + $spreadsheet->getRibbonXMLData('target') + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write workbook relationships to XML format. + * + * @return string XML Output + */ + public function writeWorkbookRelationships(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Relationship styles.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', + 'styles.xml' + ); + + // Relationship theme/theme1.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', + 'theme/theme1.xml' + ); + + // Relationship sharedStrings.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', + 'sharedStrings.xml' + ); + + // Relationships with sheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeRelationship( + $objWriter, + ($i + 1 + 3), + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', + 'worksheets/sheet' . ($i + 1) . '.xml' + ); + } + // Relationships for vbaProject if needed + // id : just after the last sheet + if ($spreadsheet->hasMacros()) { + $this->writeRelationShip( + $objWriter, + ($i + 1 + 3), + 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', + 'vbaProject.bin' + ); + ++$i; //increment i if needed for an another relation + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write worksheet relationships to XML format. + * + * Numbering is as follows: + * rId1 - Drawings + * rId_hyperlink_x - Hyperlinks + * + * @param int $pWorksheetId + * @param bool $includeCharts Flag indicating if we should write charts + * + * @return string XML Output + */ + public function writeWorksheetRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, $pWorksheetId = 1, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Write drawing relationships? + $drawingOriginalIds = []; + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds']; + } + + if ($includeCharts) { + $charts = $pWorksheet->getChartCollection(); + } else { + $charts = []; + } + + if (($pWorksheet->getDrawingCollection()->count() > 0) || (count($charts) > 0) || $drawingOriginalIds) { + $rId = 1; + + // Use original $relPath to get original $rId. + // Take first. In future can be overwritten. + // (! synchronize with \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet::writeDrawings) + reset($drawingOriginalIds); + $relPath = key($drawingOriginalIds); + if (isset($drawingOriginalIds[$relPath])) { + $rId = (int) (substr($drawingOriginalIds[$relPath], 3)); + } + + // Generate new $relPath to write drawing relationship + $relPath = '../drawings/drawing' . $pWorksheetId . '.xml'; + $this->writeRelationship( + $objWriter, + $rId, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', + $relPath + ); + } + + // Write hyperlink relationships? + $i = 1; + foreach ($pWorksheet->getHyperlinkCollection() as $hyperlink) { + if (!$hyperlink->isInternal()) { + $this->writeRelationship( + $objWriter, + '_hyperlink_' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $hyperlink->getUrl(), + 'External' + ); + + ++$i; + } + } + + // Write comments relationship? + $i = 1; + if (count($pWorksheet->getComments()) > 0) { + $this->writeRelationship( + $objWriter, + '_comments_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawing' . $pWorksheetId . '.vml' + ); + + $this->writeRelationship( + $objWriter, + '_comments' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', + '../comments' . $pWorksheetId . '.xml' + ); + } + + // Write header/footer relationship? + $i = 1; + if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { + $this->writeRelationship( + $objWriter, + '_headerfooter_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' + ); + } + + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'ctrlProps', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'vmlDrawings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'printerSettings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'); + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + private function writeUnparsedRelationship(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, XMLWriter $objWriter, $relationship, $type): void + { + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (!isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship])) { + return; + } + + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship] as $rId => $value) { + $this->writeRelationship( + $objWriter, + $rId, + $type, + $value['relFilePath'] + ); + } + } + + /** + * Write drawing relationships to XML format. + * + * @param int &$chartRef Chart ID + * @param bool $includeCharts Flag indicating if we should write charts + * + * @return string XML Output + */ + public function writeDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, &$chartRef, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + if ($iterator->current() instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing + || $iterator->current() instanceof MemoryDrawing) { + // Write relationship for image drawing + /** @var \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing */ + $drawing = $iterator->current(); + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . str_replace(' ', '', $drawing->getIndexedFilename()) + ); + + $i = $this->writeDrawingHyperLink($objWriter, $drawing, $i); + } + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + // Loop through charts and write relationships + $chartCount = $pWorksheet->getChartCount(); + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeRelationship( + $objWriter, + $i++, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', + '../charts/chart' . ++$chartRef . '.xml' + ); + } + } + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write header/footer drawing relationships to XML format. + * + * @return string XML Output + */ + public function writeHeaderFooterDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + foreach ($pWorksheet->getHeaderFooter()->getImages() as $key => $value) { + // Write relationship for image drawing + $this->writeRelationship( + $objWriter, + $key, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . $value->getIndexedFilename() + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pId Relationship ID. rId will be prepended! + * @param string $pType Relationship type + * @param string $pTarget Relationship target + * @param string $pTargetMode Relationship target mode + */ + private function writeRelationship(XMLWriter $objWriter, $pId, $pType, $pTarget, $pTargetMode = ''): void + { + if ($pType != '' && $pTarget != '') { + // Write relationship + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId' . $pId); + $objWriter->writeAttribute('Type', $pType); + $objWriter->writeAttribute('Target', $pTarget); + + if ($pTargetMode != '') { + $objWriter->writeAttribute('TargetMode', $pTargetMode); + } + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * @param $objWriter + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing + * @param $i + * + * @return int + */ + private function writeDrawingHyperLink($objWriter, $drawing, $i) + { + if ($drawing->getHyperlink() === null) { + return $i; + } + + ++$i; + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $drawing->getHyperlink()->getUrl(), + $drawing->getHyperlink()->getTypeHyperlink() + ); + + return $i; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php new file mode 100755 index 0000000..8005207 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php @@ -0,0 +1,45 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $localRels = $spreadsheet->getRibbonBinObjects('names'); + if (is_array($localRels)) { + foreach ($localRels as $aId => $aTarget) { + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', $aId); + $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); + $objWriter->writeAttribute('Target', $aTarget); + $objWriter->endElement(); + } + } + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php new file mode 100755 index 0000000..55bcd36 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php @@ -0,0 +1,40 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId1'); + $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); + $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php new file mode 100755 index 0000000..872d034 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -0,0 +1,278 @@ +flipStringTable($aStringTable); + + // Loop through cells + foreach ($pSheet->getCoordinates() as $coordinate) { + $cell = $pSheet->getCell($coordinate); + $cellValue = $cell->getValue(); + if (!is_object($cellValue) && + ($cellValue !== null) && + $cellValue !== '' && + !isset($aFlippedStringTable[$cellValue]) && + ($cell->getDataType() == DataType::TYPE_STRING || $cell->getDataType() == DataType::TYPE_STRING2 || $cell->getDataType() == DataType::TYPE_NULL)) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue] = true; + } elseif ($cellValue instanceof RichText && + ($cellValue !== null) && + !isset($aFlippedStringTable[$cellValue->getHashCode()])) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue->getHashCode()] = true; + } + } + + return $aStringTable; + } + + /** + * Write string table to XML format. + * + * @param string[] $pStringTable + * + * @return string XML Output + */ + public function writeStringTable(array $pStringTable) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // String table + $objWriter->startElement('sst'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('uniqueCount', count($pStringTable)); + + // Loop through string table + foreach ($pStringTable as $textElement) { + $objWriter->startElement('si'); + + if (!$textElement instanceof RichText) { + $textToWrite = StringHelper::controlCharacterPHP2OOXML($textElement); + $objWriter->startElement('t'); + if ($textToWrite !== trim($textToWrite)) { + $objWriter->writeAttribute('xml:space', 'preserve'); + } + $objWriter->writeRawData($textToWrite); + $objWriter->endElement(); + } elseif ($textElement instanceof RichText) { + $this->writeRichText($objWriter, $textElement); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText $pRichText Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichText(XMLWriter $objWriter, RichText $pRichText, $prefix = null): void + { + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + if ($element instanceof Run) { + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // rFont + $objWriter->startElement($prefix . 'rFont'); + $objWriter->writeAttribute('val', $element->getFont()->getName()); + $objWriter->endElement(); + + // Bold + $objWriter->startElement($prefix . 'b'); + $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); + $objWriter->endElement(); + + // Italic + $objWriter->startElement($prefix . 'i'); + $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); + $objWriter->endElement(); + + // Superscript / subscript + if ($element->getFont()->getSuperscript() || $element->getFont()->getSubscript()) { + $objWriter->startElement($prefix . 'vertAlign'); + if ($element->getFont()->getSuperscript()) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($element->getFont()->getSubscript()) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Strikethrough + $objWriter->startElement($prefix . 'strike'); + $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); + $objWriter->endElement(); + + // Color + $objWriter->startElement($prefix . 'color'); + $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); + $objWriter->endElement(); + + // Size + $objWriter->startElement($prefix . 'sz'); + $objWriter->writeAttribute('val', $element->getFont()->getSize()); + $objWriter->endElement(); + + // Underline + $objWriter->startElement($prefix . 'u'); + $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText|string $pRichText text string or Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichTextForCharts(XMLWriter $objWriter, $pRichText = null, $prefix = null): void + { + if (!$pRichText instanceof RichText) { + $textRun = $pRichText; + $pRichText = new RichText(); + $pRichText->createTextRun($textRun); + } + + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // Bold + $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); + // Italic + $objWriter->writeAttribute('i', ($element->getFont()->getItalic() ? 1 : 0)); + // Underline + $underlineType = $element->getFont()->getUnderline(); + switch ($underlineType) { + case 'single': + $underlineType = 'sng'; + + break; + case 'double': + $underlineType = 'dbl'; + + break; + } + $objWriter->writeAttribute('u', $underlineType); + // Strikethrough + $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); + + // rFont + $objWriter->startElement($prefix . 'latin'); + $objWriter->writeAttribute('typeface', $element->getFont()->getName()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Flip string table (for index searching). + * + * @param array $stringTable Stringtable + * + * @return array + */ + public function flipStringTable(array $stringTable) + { + // Return value + $returnValue = []; + + // Loop through stringtable and add flipped items to $returnValue + foreach ($stringTable as $key => $value) { + if (!$value instanceof RichText) { + $returnValue[$value] = $key; + } elseif ($value instanceof RichText) { + $returnValue[$value->getHashCode()] = $key; + } + } + + return $returnValue; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php new file mode 100755 index 0000000..74300a9 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -0,0 +1,668 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // styleSheet + $objWriter->startElement('styleSheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // numFmts + $objWriter->startElement('numFmts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getNumFmtHashTable()->count()); + + // numFmt + for ($i = 0; $i < $this->getParentWriter()->getNumFmtHashTable()->count(); ++$i) { + $this->writeNumFmt($objWriter, $this->getParentWriter()->getNumFmtHashTable()->getByIndex($i), $i); + } + + $objWriter->endElement(); + + // fonts + $objWriter->startElement('fonts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFontHashTable()->count()); + + // font + for ($i = 0; $i < $this->getParentWriter()->getFontHashTable()->count(); ++$i) { + $this->writeFont($objWriter, $this->getParentWriter()->getFontHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // fills + $objWriter->startElement('fills'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFillHashTable()->count()); + + // fill + for ($i = 0; $i < $this->getParentWriter()->getFillHashTable()->count(); ++$i) { + $this->writeFill($objWriter, $this->getParentWriter()->getFillHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // borders + $objWriter->startElement('borders'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getBordersHashTable()->count()); + + // border + for ($i = 0; $i < $this->getParentWriter()->getBordersHashTable()->count(); ++$i) { + $this->writeBorder($objWriter, $this->getParentWriter()->getBordersHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // cellStyleXfs + $objWriter->startElement('cellStyleXfs'); + $objWriter->writeAttribute('count', 1); + + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('numFmtId', 0); + $objWriter->writeAttribute('fontId', 0); + $objWriter->writeAttribute('fillId', 0); + $objWriter->writeAttribute('borderId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // cellXfs + $objWriter->startElement('cellXfs'); + $objWriter->writeAttribute('count', count($spreadsheet->getCellXfCollection())); + + // xf + foreach ($spreadsheet->getCellXfCollection() as $cellXf) { + $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet); + } + + $objWriter->endElement(); + + // cellStyles + $objWriter->startElement('cellStyles'); + $objWriter->writeAttribute('count', 1); + + // cellStyle + $objWriter->startElement('cellStyle'); + $objWriter->writeAttribute('name', 'Normal'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('builtinId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // dxfs + $objWriter->startElement('dxfs'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getStylesConditionalHashTable()->count()); + + // dxf + for ($i = 0; $i < $this->getParentWriter()->getStylesConditionalHashTable()->count(); ++$i) { + $this->writeCellStyleDxf($objWriter, $this->getParentWriter()->getStylesConditionalHashTable()->getByIndex($i)->getStyle()); + } + + $objWriter->endElement(); + + // tableStyles + $objWriter->startElement('tableStyles'); + $objWriter->writeAttribute('defaultTableStyle', 'TableStyleMedium9'); + $objWriter->writeAttribute('defaultPivotStyle', 'PivotTableStyle1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeFill(XMLWriter $objWriter, Fill $pFill): void + { + // Check if this is a pattern type or gradient type + if ($pFill->getFillType() === Fill::FILL_GRADIENT_LINEAR || + $pFill->getFillType() === Fill::FILL_GRADIENT_PATH) { + // Gradient fill + $this->writeGradientFill($objWriter, $pFill); + } elseif ($pFill->getFillType() !== null) { + // Pattern fill + $this->writePatternFill($objWriter, $pFill); + } + } + + /** + * Write Gradient Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeGradientFill(XMLWriter $objWriter, Fill $pFill): void + { + // fill + $objWriter->startElement('fill'); + + // gradientFill + $objWriter->startElement('gradientFill'); + $objWriter->writeAttribute('type', $pFill->getFillType()); + $objWriter->writeAttribute('degree', $pFill->getRotation()); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '0'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '1'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Pattern Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writePatternFill(XMLWriter $objWriter, Fill $pFill): void + { + // fill + $objWriter->startElement('fill'); + + // patternFill + $objWriter->startElement('patternFill'); + $objWriter->writeAttribute('patternType', $pFill->getFillType()); + + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // fgColor + if ($pFill->getStartColor()->getARGB()) { + $objWriter->startElement('fgColor'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + } + } + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // bgColor + if ($pFill->getEndColor()->getARGB()) { + $objWriter->startElement('bgColor'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Font. + * + * @param XMLWriter $objWriter XML Writer + * @param Font $pFont Font style + */ + private function writeFont(XMLWriter $objWriter, Font $pFont): void + { + // font + $objWriter->startElement('font'); + // Weird! The order of these elements actually makes a difference when opening Xlsx + // files in Excel2003 with the compatibility pack. It's not documented behaviour, + // and makes for a real WTF! + + // Bold. We explicitly write this element also when false (like MS Office Excel 2007 does + // for conditional formatting). Otherwise it will apparently not be picked up in conditional + // formatting style dialog + if ($pFont->getBold() !== null) { + $objWriter->startElement('b'); + $objWriter->writeAttribute('val', $pFont->getBold() ? '1' : '0'); + $objWriter->endElement(); + } + + // Italic + if ($pFont->getItalic() !== null) { + $objWriter->startElement('i'); + $objWriter->writeAttribute('val', $pFont->getItalic() ? '1' : '0'); + $objWriter->endElement(); + } + + // Strikethrough + if ($pFont->getStrikethrough() !== null) { + $objWriter->startElement('strike'); + $objWriter->writeAttribute('val', $pFont->getStrikethrough() ? '1' : '0'); + $objWriter->endElement(); + } + + // Underline + if ($pFont->getUnderline() !== null) { + $objWriter->startElement('u'); + $objWriter->writeAttribute('val', $pFont->getUnderline()); + $objWriter->endElement(); + } + + // Superscript / subscript + if ($pFont->getSuperscript() === true || $pFont->getSubscript() === true) { + $objWriter->startElement('vertAlign'); + if ($pFont->getSuperscript() === true) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($pFont->getSubscript() === true) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Size + if ($pFont->getSize() !== null) { + $objWriter->startElement('sz'); + $objWriter->writeAttribute('val', StringHelper::formatNumber($pFont->getSize())); + $objWriter->endElement(); + } + + // Foreground color + if ($pFont->getColor()->getARGB() !== null) { + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFont->getColor()->getARGB()); + $objWriter->endElement(); + } + + // Name + if ($pFont->getName() !== null) { + $objWriter->startElement('name'); + $objWriter->writeAttribute('val', $pFont->getName()); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Border. + * + * @param XMLWriter $objWriter XML Writer + * @param Borders $pBorders Borders style + */ + private function writeBorder(XMLWriter $objWriter, Borders $pBorders): void + { + // Write border + $objWriter->startElement('border'); + // Diagonal? + switch ($pBorders->getDiagonalDirection()) { + case Borders::DIAGONAL_UP: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'false'); + + break; + case Borders::DIAGONAL_DOWN: + $objWriter->writeAttribute('diagonalUp', 'false'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + case Borders::DIAGONAL_BOTH: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + } + + // BorderPr + $this->writeBorderPr($objWriter, 'left', $pBorders->getLeft()); + $this->writeBorderPr($objWriter, 'right', $pBorders->getRight()); + $this->writeBorderPr($objWriter, 'top', $pBorders->getTop()); + $this->writeBorderPr($objWriter, 'bottom', $pBorders->getBottom()); + $this->writeBorderPr($objWriter, 'diagonal', $pBorders->getDiagonal()); + $objWriter->endElement(); + } + + /** + * Write Cell Style Xf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + * @param Spreadsheet $spreadsheet Workbook + */ + private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle, Spreadsheet $spreadsheet): void + { + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('fontId', (int) $this->getParentWriter()->getFontHashTable()->getIndexForHashCode($pStyle->getFont()->getHashCode())); + if ($pStyle->getQuotePrefix()) { + $objWriter->writeAttribute('quotePrefix', 1); + } + + if ($pStyle->getNumberFormat()->getBuiltInFormatCode() === false) { + $objWriter->writeAttribute('numFmtId', (int) ($this->getParentWriter()->getNumFmtHashTable()->getIndexForHashCode($pStyle->getNumberFormat()->getHashCode()) + 164)); + } else { + $objWriter->writeAttribute('numFmtId', (int) $pStyle->getNumberFormat()->getBuiltInFormatCode()); + } + + $objWriter->writeAttribute('fillId', (int) $this->getParentWriter()->getFillHashTable()->getIndexForHashCode($pStyle->getFill()->getHashCode())); + $objWriter->writeAttribute('borderId', (int) $this->getParentWriter()->getBordersHashTable()->getIndexForHashCode($pStyle->getBorders()->getHashCode())); + + // Apply styles? + $objWriter->writeAttribute('applyFont', ($spreadsheet->getDefaultStyle()->getFont()->getHashCode() != $pStyle->getFont()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyNumberFormat', ($spreadsheet->getDefaultStyle()->getNumberFormat()->getHashCode() != $pStyle->getNumberFormat()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyFill', ($spreadsheet->getDefaultStyle()->getFill()->getHashCode() != $pStyle->getFill()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyBorder', ($spreadsheet->getDefaultStyle()->getBorders()->getHashCode() != $pStyle->getBorders()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyAlignment', ($spreadsheet->getDefaultStyle()->getAlignment()->getHashCode() != $pStyle->getAlignment()->getHashCode()) ? '1' : '0'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('applyProtection', 'true'); + } + + // alignment + $objWriter->startElement('alignment'); + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + + $objWriter->writeAttribute('wrapText', ($pStyle->getAlignment()->getWrapText() ? 'true' : 'false')); + $objWriter->writeAttribute('shrinkToFit', ($pStyle->getAlignment()->getShrinkToFit() ? 'true' : 'false')); + + if ($pStyle->getAlignment()->getIndent() > 0) { + $objWriter->writeAttribute('indent', $pStyle->getAlignment()->getIndent()); + } + if ($pStyle->getAlignment()->getReadOrder() > 0) { + $objWriter->writeAttribute('readingOrder', $pStyle->getAlignment()->getReadOrder()); + } + $objWriter->endElement(); + + // protection + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if ($pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Cell Style Dxf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + */ + private function writeCellStyleDxf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle): void + { + // dxf + $objWriter->startElement('dxf'); + + // font + $this->writeFont($objWriter, $pStyle->getFont()); + + // numFmt + $this->writeNumFmt($objWriter, $pStyle->getNumberFormat()); + + // fill + $this->writeFill($objWriter, $pStyle->getFill()); + + // alignment + $objWriter->startElement('alignment'); + if ($pStyle->getAlignment()->getHorizontal() !== null) { + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + } + if ($pStyle->getAlignment()->getVertical() !== null) { + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + } + + if ($pStyle->getAlignment()->getTextRotation() !== null) { + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + } + $objWriter->endElement(); + + // border + $this->writeBorder($objWriter, $pStyle->getBorders()); + + // protection + if (($pStyle->getProtection()->getLocked() !== null) || ($pStyle->getProtection()->getHidden() !== null)) { + if ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT || + $pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if (($pStyle->getProtection()->getLocked() !== null) && + ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if (($pStyle->getProtection()->getHidden() !== null) && + ($pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Write BorderPr. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pName Element name + * @param Border $pBorder Border style + */ + private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder): void + { + // Write BorderPr + if ($pBorder->getBorderStyle() != Border::BORDER_NONE) { + $objWriter->startElement($pName); + $objWriter->writeAttribute('style', $pBorder->getBorderStyle()); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pBorder->getColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write NumberFormat. + * + * @param XMLWriter $objWriter XML Writer + * @param NumberFormat $pNumberFormat Number Format + * @param int $pId Number Format identifier + */ + private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0): void + { + // Translate formatcode + $formatCode = $pNumberFormat->getFormatCode(); + + // numFmt + if ($formatCode !== null) { + $objWriter->startElement('numFmt'); + $objWriter->writeAttribute('numFmtId', ($pId + 164)); + $objWriter->writeAttribute('formatCode', $formatCode); + $objWriter->endElement(); + } + } + + /** + * Get an array of all styles. + * + * @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet + */ + public function allStyles(Spreadsheet $spreadsheet) + { + return $spreadsheet->getCellXfCollection(); + } + + /** + * Get an array of all conditional styles. + * + * @return Conditional[] All conditional styles in PhpSpreadsheet + */ + public function allConditionalStyles(Spreadsheet $spreadsheet) + { + // Get an array of all styles + $aStyles = []; + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + foreach ($spreadsheet->getSheet($i)->getConditionalStylesCollection() as $conditionalStyles) { + foreach ($conditionalStyles as $conditionalStyle) { + $aStyles[] = $conditionalStyle; + } + } + } + + return $aStyles; + } + + /** + * Get an array of all fills. + * + * @return Fill[] All fills in PhpSpreadsheet + */ + public function allFills(Spreadsheet $spreadsheet) + { + // Get an array of unique fills + $aFills = []; + + // Two first fills are predefined + $fill0 = new Fill(); + $fill0->setFillType(Fill::FILL_NONE); + $aFills[] = $fill0; + + $fill1 = new Fill(); + $fill1->setFillType(Fill::FILL_PATTERN_GRAY125); + $aFills[] = $fill1; + // The remaining fills + $aStyles = $this->allStyles($spreadsheet); + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFills[$style->getFill()->getHashCode()])) { + $aFills[$style->getFill()->getHashCode()] = $style->getFill(); + } + } + + return $aFills; + } + + /** + * Get an array of all fonts. + * + * @return Font[] All fonts in PhpSpreadsheet + */ + public function allFonts(Spreadsheet $spreadsheet) + { + // Get an array of unique fonts + $aFonts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFonts[$style->getFont()->getHashCode()])) { + $aFonts[$style->getFont()->getHashCode()] = $style->getFont(); + } + } + + return $aFonts; + } + + /** + * Get an array of all borders. + * + * @return Borders[] All borders in PhpSpreadsheet + */ + public function allBorders(Spreadsheet $spreadsheet) + { + // Get an array of unique borders + $aBorders = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aBorders[$style->getBorders()->getHashCode()])) { + $aBorders[$style->getBorders()->getHashCode()] = $style->getBorders(); + } + } + + return $aBorders; + } + + /** + * Get an array of all number formats. + * + * @return NumberFormat[] All number formats in PhpSpreadsheet + */ + public function allNumberFormats(Spreadsheet $spreadsheet) + { + // Get an array of unique number formats + $aNumFmts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !isset($aNumFmts[$style->getNumberFormat()->getHashCode()])) { + $aNumFmts[$style->getNumberFormat()->getHashCode()] = $style->getNumberFormat(); + } + } + + return $aNumFmts; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php new file mode 100755 index 0000000..3a47be7 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -0,0 +1,837 @@ + 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Times New Roman', + 'Hebr' => 'Times New Roman', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'MoolBoran', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Times New Roman', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of Minor fonts to write. + * + * @var array of string + */ + private static $minorFonts = [ + 'Jpan' => 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Arial', + 'Hebr' => 'Arial', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'DaunPenh', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Arial', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of core colours. + * + * @var array of string + */ + private static $colourScheme = [ + 'dk2' => '1F497D', + 'lt2' => 'EEECE1', + 'accent1' => '4F81BD', + 'accent2' => 'C0504D', + 'accent3' => '9BBB59', + 'accent4' => '8064A2', + 'accent5' => '4BACC6', + 'accent6' => 'F79646', + 'hlink' => '0000FF', + 'folHlink' => '800080', + ]; + + /** + * Write theme to XML format. + * + * @return string XML Output + */ + public function writeTheme(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // a:theme + $objWriter->startElement('a:theme'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('name', 'Office Theme'); + + // a:themeElements + $objWriter->startElement('a:themeElements'); + + // a:clrScheme + $objWriter->startElement('a:clrScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:dk1 + $objWriter->startElement('a:dk1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'windowText'); + $objWriter->writeAttribute('lastClr', '000000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lt1 + $objWriter->startElement('a:lt1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'window'); + $objWriter->writeAttribute('lastClr', 'FFFFFF'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:dk2 + $this->writeColourScheme($objWriter); + + $objWriter->endElement(); + + // a:fontScheme + $objWriter->startElement('a:fontScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:majorFont + $objWriter->startElement('a:majorFont'); + $this->writeFonts($objWriter, 'Cambria', self::$majorFonts); + $objWriter->endElement(); + + // a:minorFont + $objWriter->startElement('a:minorFont'); + $this->writeFonts($objWriter, 'Calibri', self::$minorFonts); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:fmtScheme + $objWriter->startElement('a:fmtScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:fillStyleLst + $objWriter->startElement('a:fillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '50000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '35000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '37000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '15000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '51000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '80000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '93000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '94000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '135000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lnStyleLst + $objWriter->startElement('a:lnStyleLst'); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '9525'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '95000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '105000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '25400'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '38100'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyleLst + $objWriter->startElement('a:effectStyleLst'); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '20000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '38000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:scene3d + $objWriter->startElement('a:scene3d'); + + // a:camera + $objWriter->startElement('a:camera'); + $objWriter->writeAttribute('prst', 'orthographicFront'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lightRig + $objWriter->startElement('a:lightRig'); + $objWriter->writeAttribute('rig', 'threePt'); + $objWriter->writeAttribute('dir', 't'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '1200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:sp3d + $objWriter->startElement('a:sp3d'); + + // a:bevelT + $objWriter->startElement('a:bevelT'); + $objWriter->writeAttribute('w', '63500'); + $objWriter->writeAttribute('h', '25400'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:bgFillStyleLst + $objWriter->startElement('a:bgFillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '40000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '40000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '45000'); + $objWriter->endElement(); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '99000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '20000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '255000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '-80000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '180000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '80000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '30000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '50000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '50000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:objectDefaults + $objWriter->writeElement('a:objectDefaults', null); + + // a:extraClrSchemeLst + $objWriter->writeElement('a:extraClrSchemeLst', null); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write fonts to XML format. + * + * @param XMLWriter $objWriter + * @param string $latinFont + * @param array of string $fontSet + * + * @return string XML Output + */ + private function writeFonts($objWriter, $latinFont, $fontSet) + { + // a:latin + $objWriter->startElement('a:latin'); + $objWriter->writeAttribute('typeface', $latinFont); + $objWriter->endElement(); + + // a:ea + $objWriter->startElement('a:ea'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + // a:cs + $objWriter->startElement('a:cs'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + foreach ($fontSet as $fontScript => $typeface) { + $objWriter->startElement('a:font'); + $objWriter->writeAttribute('script', $fontScript); + $objWriter->writeAttribute('typeface', $typeface); + $objWriter->endElement(); + } + } + + /** + * Write colour scheme to XML format. + * + * @param XMLWriter $objWriter + * + * @return string XML Output + */ + private function writeColourScheme($objWriter) + { + foreach (self::$colourScheme as $colourName => $colourValue) { + $objWriter->startElement('a:' . $colourName); + + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $colourValue); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php new file mode 100755 index 0000000..88befd0 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -0,0 +1,406 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // workbook + $objWriter->startElement('workbook'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + // fileVersion + $this->writeFileVersion($objWriter); + + // workbookPr + $this->writeWorkbookPr($objWriter); + + // workbookProtection + $this->writeWorkbookProtection($objWriter, $spreadsheet); + + // bookViews + if ($this->getParentWriter()->getOffice2003Compatibility() === false) { + $this->writeBookViews($objWriter, $spreadsheet); + } + + // sheets + $this->writeSheets($objWriter, $spreadsheet); + + // definedNames + $this->writeDefinedNames($objWriter, $spreadsheet); + + // calcPr + $this->writeCalcPr($objWriter, $recalcRequired); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write file version. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeFileVersion(XMLWriter $objWriter): void + { + $objWriter->startElement('fileVersion'); + $objWriter->writeAttribute('appName', 'xl'); + $objWriter->writeAttribute('lastEdited', '4'); + $objWriter->writeAttribute('lowestEdited', '4'); + $objWriter->writeAttribute('rupBuild', '4505'); + $objWriter->endElement(); + } + + /** + * Write WorkbookPr. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeWorkbookPr(XMLWriter $objWriter): void + { + $objWriter->startElement('workbookPr'); + + if (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) { + $objWriter->writeAttribute('date1904', '1'); + } + + $objWriter->writeAttribute('codeName', 'ThisWorkbook'); + + $objWriter->endElement(); + } + + /** + * Write BookViews. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // bookViews + $objWriter->startElement('bookViews'); + + // workbookView + $objWriter->startElement('workbookView'); + + $objWriter->writeAttribute('activeTab', $spreadsheet->getActiveSheetIndex()); + $objWriter->writeAttribute('autoFilterDateGrouping', ($spreadsheet->getAutoFilterDateGrouping() ? 'true' : 'false')); + $objWriter->writeAttribute('firstSheet', $spreadsheet->getFirstSheetIndex()); + $objWriter->writeAttribute('minimized', ($spreadsheet->getMinimized() ? 'true' : 'false')); + $objWriter->writeAttribute('showHorizontalScroll', ($spreadsheet->getShowHorizontalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('showSheetTabs', ($spreadsheet->getShowSheetTabs() ? 'true' : 'false')); + $objWriter->writeAttribute('showVerticalScroll', ($spreadsheet->getShowVerticalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('tabRatio', $spreadsheet->getTabRatio()); + $objWriter->writeAttribute('visibility', $spreadsheet->getVisibility()); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write WorkbookProtection. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + if ($spreadsheet->getSecurity()->isSecurityEnabled()) { + $objWriter->startElement('workbookProtection'); + $objWriter->writeAttribute('lockRevision', ($spreadsheet->getSecurity()->getLockRevision() ? 'true' : 'false')); + $objWriter->writeAttribute('lockStructure', ($spreadsheet->getSecurity()->getLockStructure() ? 'true' : 'false')); + $objWriter->writeAttribute('lockWindows', ($spreadsheet->getSecurity()->getLockWindows() ? 'true' : 'false')); + + if ($spreadsheet->getSecurity()->getRevisionsPassword() != '') { + $objWriter->writeAttribute('revisionsPassword', $spreadsheet->getSecurity()->getRevisionsPassword()); + } + + if ($spreadsheet->getSecurity()->getWorkbookPassword() != '') { + $objWriter->writeAttribute('workbookPassword', $spreadsheet->getSecurity()->getWorkbookPassword()); + } + + $objWriter->endElement(); + } + } + + /** + * Write calcPr. + * + * @param XMLWriter $objWriter XML Writer + * @param bool $recalcRequired Indicate whether formulas should be recalculated before writing + */ + private function writeCalcPr(XMLWriter $objWriter, $recalcRequired = true): void + { + $objWriter->startElement('calcPr'); + + // Set the calcid to a higher value than Excel itself will use, otherwise Excel will always recalc + // If MS Excel does do a recalc, then users opening a file in MS Excel will be prompted to save on exit + // because the file has changed + $objWriter->writeAttribute('calcId', '999999'); + $objWriter->writeAttribute('calcMode', 'auto'); + // fullCalcOnLoad isn't needed if we've recalculating for the save + $objWriter->writeAttribute('calcCompleted', ($recalcRequired) ? 1 : 0); + $objWriter->writeAttribute('fullCalcOnLoad', ($recalcRequired) ? 0 : 1); + $objWriter->writeAttribute('forceFullCalc', ($recalcRequired) ? 0 : 1); + + $objWriter->endElement(); + } + + /** + * Write sheets. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Write sheets + $objWriter->startElement('sheets'); + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // sheet + $this->writeSheet( + $objWriter, + $spreadsheet->getSheet($i)->getTitle(), + ($i + 1), + ($i + 1 + 3), + $spreadsheet->getSheet($i)->getSheetState() + ); + } + + $objWriter->endElement(); + } + + /** + * Write sheet. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pSheetname Sheet name + * @param int $pSheetId Sheet id + * @param int $pRelId Relationship ID + * @param string $sheetState Sheet state (visible, hidden, veryHidden) + */ + private function writeSheet(XMLWriter $objWriter, $pSheetname, $pSheetId = 1, $pRelId = 1, $sheetState = 'visible'): void + { + if ($pSheetname != '') { + // Write sheet + $objWriter->startElement('sheet'); + $objWriter->writeAttribute('name', $pSheetname); + $objWriter->writeAttribute('sheetId', $pSheetId); + if ($sheetState !== 'visible' && $sheetState != '') { + $objWriter->writeAttribute('state', $sheetState); + } + $objWriter->writeAttribute('r:id', 'rId' . $pRelId); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Defined Names. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeDefinedNames(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Write defined names + $objWriter->startElement('definedNames'); + + // Named ranges + if (count($spreadsheet->getNamedRanges()) > 0) { + // Named ranges + $this->writeNamedRanges($objWriter, $spreadsheet); + } + + // Other defined names + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // definedName for autoFilter + $this->writeDefinedNameForAutofilter($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Titles + $this->writeDefinedNameForPrintTitles($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Area + $this->writeDefinedNameForPrintArea($objWriter, $spreadsheet->getSheet($i), $i); + } + + $objWriter->endElement(); + } + + /** + * Write named ranges. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeNamedRanges(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Loop named ranges + $namedRanges = $spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + $this->writeDefinedNameForNamedRange($objWriter, $namedRange); + } + } + + /** + * Write Defined Name for named range. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeDefinedNameForNamedRange(XMLWriter $objWriter, NamedRange $pNamedRange): void + { + // definedName for named range + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', $pNamedRange->getName()); + if ($pNamedRange->getLocalOnly()) { + $objWriter->writeAttribute('localSheetId', $pNamedRange->getScope()->getParent()->getIndex($pNamedRange->getScope())); + } + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($pNamedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteReference($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteReference($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); + + $objWriter->writeRawData($range); + + $objWriter->endElement(); + } + + /** + * Write Defined Name for autoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForAutofilter(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for autoFilter + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm._FilterDatabase'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + $objWriter->writeAttribute('hidden', '1'); + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref so we can make the cell ref absolute + [$ws, $range[0]] = Worksheet::extractSheetTitle($range[0], true); + + $range[0] = Coordinate::absoluteCoordinate($range[0]); + $range[1] = Coordinate::absoluteCoordinate($range[1]); + $range = implode(':', $range); + + $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForPrintTitles(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for PrintTitles + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Titles'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Setting string + $settingString = ''; + + // Columns to repeat + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + // Rows to repeat + if ($pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $settingString .= ','; + } + + $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + $objWriter->writeRawData($settingString); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForPrintArea(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for PrintArea + if ($pSheet->getPageSetup()->isPrintAreaSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Area'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Print area + $printArea = Coordinate::splitRange($pSheet->getPageSetup()->getPrintArea()); + + $chunks = []; + foreach ($printArea as $printAreaRect) { + $printAreaRect[0] = Coordinate::absoluteReference($printAreaRect[0]); + $printAreaRect[1] = Coordinate::absoluteReference($printAreaRect[1]); + $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect); + } + + $objWriter->writeRawData(implode(',', $chunks)); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php new file mode 100755 index 0000000..be06425 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -0,0 +1,1275 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Worksheet + $objWriter->startElement('worksheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:x14', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + $objWriter->writeAttribute('mc:Ignorable', 'x14ac'); + $objWriter->writeAttribute('xmlns:x14ac', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac'); + + // sheetPr + $this->writeSheetPr($objWriter, $pSheet); + + // Dimension + $this->writeDimension($objWriter, $pSheet); + + // sheetViews + $this->writeSheetViews($objWriter, $pSheet); + + // sheetFormatPr + $this->writeSheetFormatPr($objWriter, $pSheet); + + // cols + $this->writeCols($objWriter, $pSheet); + + // sheetData + $this->writeSheetData($objWriter, $pSheet, $pStringTable); + + // sheetProtection + $this->writeSheetProtection($objWriter, $pSheet); + + // protectedRanges + $this->writeProtectedRanges($objWriter, $pSheet); + + // autoFilter + $this->writeAutoFilter($objWriter, $pSheet); + + // mergeCells + $this->writeMergeCells($objWriter, $pSheet); + + // conditionalFormatting + $this->writeConditionalFormatting($objWriter, $pSheet); + + // dataValidations + $this->writeDataValidations($objWriter, $pSheet); + + // hyperlinks + $this->writeHyperlinks($objWriter, $pSheet); + + // Print options + $this->writePrintOptions($objWriter, $pSheet); + + // Page margins + $this->writePageMargins($objWriter, $pSheet); + + // Page setup + $this->writePageSetup($objWriter, $pSheet); + + // Header / footer + $this->writeHeaderFooter($objWriter, $pSheet); + + // Breaks + $this->writeBreaks($objWriter, $pSheet); + + // Drawings and/or Charts + $this->writeDrawings($objWriter, $pSheet, $includeCharts); + + // LegacyDrawing + $this->writeLegacyDrawing($objWriter, $pSheet); + + // LegacyDrawingHF + $this->writeLegacyDrawingHF($objWriter, $pSheet); + + // AlternateContent + $this->writeAlternateContent($objWriter, $pSheet); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write SheetPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetPr + $objWriter->startElement('sheetPr'); + if ($pSheet->getParent()->hasMacros()) { + //if the workbook have macros, we need to have codeName for the sheet + if (!$pSheet->hasCodeName()) { + $pSheet->setCodeName($pSheet->getTitle()); + } + $objWriter->writeAttribute('codeName', $pSheet->getCodeName()); + } + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->writeAttribute('filterMode', 1); + $pSheet->getAutoFilter()->showHideRows(); + } + + // tabColor + if ($pSheet->isTabColorSet()) { + $objWriter->startElement('tabColor'); + $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB()); + $objWriter->endElement(); + } + + // outlinePr + $objWriter->startElement('outlinePr'); + $objWriter->writeAttribute('summaryBelow', ($pSheet->getShowSummaryBelow() ? '1' : '0')); + $objWriter->writeAttribute('summaryRight', ($pSheet->getShowSummaryRight() ? '1' : '0')); + $objWriter->endElement(); + + // pageSetUpPr + if ($pSheet->getPageSetup()->getFitToPage()) { + $objWriter->startElement('pageSetUpPr'); + $objWriter->writeAttribute('fitToPage', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Dimension. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // dimension + $objWriter->startElement('dimension'); + $objWriter->writeAttribute('ref', $pSheet->calculateWorksheetDimension()); + $objWriter->endElement(); + } + + /** + * Write SheetViews. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetViews + $objWriter->startElement('sheetViews'); + + // Sheet selected? + $sheetSelected = false; + if ($this->getParentWriter()->getSpreadsheet()->getIndex($pSheet) == $this->getParentWriter()->getSpreadsheet()->getActiveSheetIndex()) { + $sheetSelected = true; + } + + // sheetView + $objWriter->startElement('sheetView'); + $objWriter->writeAttribute('tabSelected', $sheetSelected ? '1' : '0'); + $objWriter->writeAttribute('workbookViewId', '0'); + + // Zoom scales + if ($pSheet->getSheetView()->getZoomScale() != 100) { + $objWriter->writeAttribute('zoomScale', $pSheet->getSheetView()->getZoomScale()); + } + if ($pSheet->getSheetView()->getZoomScaleNormal() != 100) { + $objWriter->writeAttribute('zoomScaleNormal', $pSheet->getSheetView()->getZoomScaleNormal()); + } + + // Show zeros (Excel also writes this attribute only if set to false) + if ($pSheet->getSheetView()->getShowZeros() === false) { + $objWriter->writeAttribute('showZeros', 0); + } + + // View Layout Type + if ($pSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_NORMAL) { + $objWriter->writeAttribute('view', $pSheet->getSheetView()->getView()); + } + + // Gridlines + if ($pSheet->getShowGridlines()) { + $objWriter->writeAttribute('showGridLines', 'true'); + } else { + $objWriter->writeAttribute('showGridLines', 'false'); + } + + // Row and column headers + if ($pSheet->getShowRowColHeaders()) { + $objWriter->writeAttribute('showRowColHeaders', '1'); + } else { + $objWriter->writeAttribute('showRowColHeaders', '0'); + } + + // Right-to-left + if ($pSheet->getRightToLeft()) { + $objWriter->writeAttribute('rightToLeft', 'true'); + } + + $activeCell = $pSheet->getActiveCell(); + $sqref = $pSheet->getSelectedCells(); + + // Pane + $pane = ''; + if ($pSheet->getFreezePane()) { + [$xSplit, $ySplit] = Coordinate::coordinateFromString($pSheet->getFreezePane()); + $xSplit = Coordinate::columnIndexFromString($xSplit); + --$xSplit; + --$ySplit; + + $topLeftCell = $pSheet->getTopLeftCell(); + + // pane + $pane = 'topRight'; + $objWriter->startElement('pane'); + if ($xSplit > 0) { + $objWriter->writeAttribute('xSplit', $xSplit); + } + if ($ySplit > 0) { + $objWriter->writeAttribute('ySplit', $ySplit); + $pane = ($xSplit > 0) ? 'bottomRight' : 'bottomLeft'; + } + $objWriter->writeAttribute('topLeftCell', $topLeftCell); + $objWriter->writeAttribute('activePane', $pane); + $objWriter->writeAttribute('state', 'frozen'); + $objWriter->endElement(); + + if (($xSplit > 0) && ($ySplit > 0)) { + // Write additional selections if more than two panes (ie both an X and a Y split) + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'topRight'); + $objWriter->endElement(); + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'bottomLeft'); + $objWriter->endElement(); + } + } + + // Selection + // Only need to write selection element if we have a split pane + // We cheat a little by over-riding the active cell selection, setting it to the split cell + $objWriter->startElement('selection'); + if ($pane != '') { + $objWriter->writeAttribute('pane', $pane); + } + $objWriter->writeAttribute('activeCell', $activeCell); + $objWriter->writeAttribute('sqref', $sqref); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write SheetFormatPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetFormatPr + $objWriter->startElement('sheetFormatPr'); + + // Default row height + if ($pSheet->getDefaultRowDimension()->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', 'true'); + $objWriter->writeAttribute('defaultRowHeight', StringHelper::formatNumber($pSheet->getDefaultRowDimension()->getRowHeight())); + } else { + $objWriter->writeAttribute('defaultRowHeight', '14.4'); + } + + // Set Zero Height row + if ((string) $pSheet->getDefaultRowDimension()->getZeroHeight() === '1' || + strtolower((string) $pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true') { + $objWriter->writeAttribute('zeroHeight', '1'); + } + + // Default column width + if ($pSheet->getDefaultColumnDimension()->getWidth() >= 0) { + $objWriter->writeAttribute('defaultColWidth', StringHelper::formatNumber($pSheet->getDefaultColumnDimension()->getWidth())); + } + + // Outline level - row + $outlineLevelRow = 0; + foreach ($pSheet->getRowDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelRow) { + $outlineLevelRow = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelRow', (int) $outlineLevelRow); + + // Outline level - column + $outlineLevelCol = 0; + foreach ($pSheet->getColumnDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelCol) { + $outlineLevelCol = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelCol', (int) $outlineLevelCol); + + $objWriter->endElement(); + } + + /** + * Write Cols. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // cols + if (count($pSheet->getColumnDimensions()) > 0) { + $objWriter->startElement('cols'); + + $pSheet->calculateColumnWidths(); + + // Loop through column dimensions + foreach ($pSheet->getColumnDimensions() as $colDimension) { + // col + $objWriter->startElement('col'); + $objWriter->writeAttribute('min', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + $objWriter->writeAttribute('max', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + + if ($colDimension->getWidth() < 0) { + // No width set, apply default of 10 + $objWriter->writeAttribute('width', '9.10'); + } else { + // Width set + $objWriter->writeAttribute('width', StringHelper::formatNumber($colDimension->getWidth())); + } + + // Column visibility + if ($colDimension->getVisible() === false) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Auto size? + if ($colDimension->getAutoSize()) { + $objWriter->writeAttribute('bestFit', 'true'); + } + + // Custom width? + if ($colDimension->getWidth() != $pSheet->getDefaultColumnDimension()->getWidth()) { + $objWriter->writeAttribute('customWidth', 'true'); + } + + // Collapsed + if ($colDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($colDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $colDimension->getOutlineLevel()); + } + + // Style + $objWriter->writeAttribute('style', $colDimension->getXfIndex()); + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetProtection. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetProtection + $objWriter->startElement('sheetProtection'); + + $protection = $pSheet->getProtection(); + + if ($protection->getAlgorithm()) { + $objWriter->writeAttribute('algorithmName', $protection->getAlgorithm()); + $objWriter->writeAttribute('hashValue', $protection->getPassword()); + $objWriter->writeAttribute('saltValue', $protection->getSalt()); + $objWriter->writeAttribute('spinCount', $protection->getSpinCount()); + } elseif ($protection->getPassword() !== '') { + $objWriter->writeAttribute('password', $protection->getPassword()); + } + + $objWriter->writeAttribute('sheet', ($protection->getSheet() ? 'true' : 'false')); + $objWriter->writeAttribute('objects', ($protection->getObjects() ? 'true' : 'false')); + $objWriter->writeAttribute('scenarios', ($protection->getScenarios() ? 'true' : 'false')); + $objWriter->writeAttribute('formatCells', ($protection->getFormatCells() ? 'true' : 'false')); + $objWriter->writeAttribute('formatColumns', ($protection->getFormatColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('formatRows', ($protection->getFormatRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertColumns', ($protection->getInsertColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('insertRows', ($protection->getInsertRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertHyperlinks', ($protection->getInsertHyperlinks() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteColumns', ($protection->getDeleteColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteRows', ($protection->getDeleteRows() ? 'true' : 'false')); + $objWriter->writeAttribute('selectLockedCells', ($protection->getSelectLockedCells() ? 'true' : 'false')); + $objWriter->writeAttribute('sort', ($protection->getSort() ? 'true' : 'false')); + $objWriter->writeAttribute('autoFilter', ($protection->getAutoFilter() ? 'true' : 'false')); + $objWriter->writeAttribute('pivotTables', ($protection->getPivotTables() ? 'true' : 'false')); + $objWriter->writeAttribute('selectUnlockedCells', ($protection->getSelectUnlockedCells() ? 'true' : 'false')); + $objWriter->endElement(); + } + + private static function writeAttributeIf(XMLWriter $objWriter, $condition, string $attr, string $val): void + { + if ($condition) { + $objWriter->writeAttribute($attr, $val); + } + } + + private static function writeElementIf(XMLWriter $objWriter, $condition, string $attr, string $val): void + { + if ($condition) { + $objWriter->writeElement($attr, $val); + } + } + + private static function writeOtherCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void + { + if ($conditional->getConditionType() == Conditional::CONDITION_CELLIS + || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + || $conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + foreach ($conditional->getConditions() as $formula) { + // Formula + $objWriter->writeElement('formula', Xlfn::addXlfn($formula)); + } + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_NOTCONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))>0'); + } + } + + private static function writeTextCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void + { + $txt = $conditional->getText(); + if ($txt !== null) { + $objWriter->writeAttribute('text', $txt); + if ($conditional->getOperatorType() == Conditional::OPERATOR_CONTAINSTEXT) { + $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("' . $txt . '",' . $cellCoordinate . ')))'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_BEGINSWITH) { + $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',' . strlen($txt) . ')="' . $txt . '"'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_ENDSWITH) { + $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',' . strlen($txt) . ')="' . $txt . '"'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_NOTCONTAINS) { + $objWriter->writeElement('formula', 'ISERROR(SEARCH("' . $txt . '",' . $cellCoordinate . '))'); + } + } + } + + /** + * Write ConditionalFormatting. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Conditional id + $id = 1; + + // Loop through styles in the current worksheet + foreach ($pSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + // WHY was this again? + // if ($this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode()) == '') { + // continue; + // } + if ($conditional->getConditionType() != Conditional::CONDITION_NONE) { + // conditionalFormatting + $objWriter->startElement('conditionalFormatting'); + $objWriter->writeAttribute('sqref', $cellCoordinate); + + // cfRule + $objWriter->startElement('cfRule'); + $objWriter->writeAttribute('type', $conditional->getConditionType()); + $objWriter->writeAttribute('dxfId', $this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode())); + $objWriter->writeAttribute('priority', $id++); + + self::writeAttributeif( + $objWriter, + ($conditional->getConditionType() == Conditional::CONDITION_CELLIS || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT) + && $conditional->getOperatorType() != Conditional::OPERATOR_NONE, + 'operator', + $conditional->getOperatorType() + ); + + self::writeAttributeIf($objWriter, $conditional->getStopIfTrue(), 'stopIfTrue', '1'); + + if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT) { + self::writeTextCondElements($objWriter, $conditional, $cellCoordinate); + } else { + self::writeOtherCondElements($objWriter, $conditional, $cellCoordinate); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + } + + /** + * Write DataValidations. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Datavalidation collection + $dataValidationCollection = $pSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + $dataValidationCollection = Coordinate::mergeRangesInCollection($dataValidationCollection); + $objWriter->startElement('dataValidations'); + $objWriter->writeAttribute('count', count($dataValidationCollection)); + + foreach ($dataValidationCollection as $coordinate => $dv) { + $objWriter->startElement('dataValidation'); + + if ($dv->getType() != '') { + $objWriter->writeAttribute('type', $dv->getType()); + } + + if ($dv->getErrorStyle() != '') { + $objWriter->writeAttribute('errorStyle', $dv->getErrorStyle()); + } + + if ($dv->getOperator() != '') { + $objWriter->writeAttribute('operator', $dv->getOperator()); + } + + $objWriter->writeAttribute('allowBlank', ($dv->getAllowBlank() ? '1' : '0')); + $objWriter->writeAttribute('showDropDown', (!$dv->getShowDropDown() ? '1' : '0')); + $objWriter->writeAttribute('showInputMessage', ($dv->getShowInputMessage() ? '1' : '0')); + $objWriter->writeAttribute('showErrorMessage', ($dv->getShowErrorMessage() ? '1' : '0')); + + if ($dv->getErrorTitle() !== '') { + $objWriter->writeAttribute('errorTitle', $dv->getErrorTitle()); + } + if ($dv->getError() !== '') { + $objWriter->writeAttribute('error', $dv->getError()); + } + if ($dv->getPromptTitle() !== '') { + $objWriter->writeAttribute('promptTitle', $dv->getPromptTitle()); + } + if ($dv->getPrompt() !== '') { + $objWriter->writeAttribute('prompt', $dv->getPrompt()); + } + + $objWriter->writeAttribute('sqref', $coordinate); + + if ($dv->getFormula1() !== '') { + $objWriter->writeElement('formula1', $dv->getFormula1()); + } + if ($dv->getFormula2() !== '') { + $objWriter->writeElement('formula2', $dv->getFormula2()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write Hyperlinks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Hyperlink collection + $hyperlinkCollection = $pSheet->getHyperlinkCollection(); + + // Relation ID + $relationId = 1; + + // Write hyperlinks? + if (!empty($hyperlinkCollection)) { + $objWriter->startElement('hyperlinks'); + + foreach ($hyperlinkCollection as $coordinate => $hyperlink) { + $objWriter->startElement('hyperlink'); + + $objWriter->writeAttribute('ref', $coordinate); + if (!$hyperlink->isInternal()) { + $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId); + ++$relationId; + } else { + $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); + } + + if ($hyperlink->getTooltip() !== '') { + $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip()); + $objWriter->writeAttribute('display', $hyperlink->getTooltip()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write ProtectedRanges. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (count($pSheet->getProtectedCells()) > 0) { + // protectedRanges + $objWriter->startElement('protectedRanges'); + + // Loop protectedRanges + foreach ($pSheet->getProtectedCells() as $protectedCell => $passwordHash) { + // protectedRange + $objWriter->startElement('protectedRange'); + $objWriter->writeAttribute('name', 'p' . md5($protectedCell)); + $objWriter->writeAttribute('sqref', $protectedCell); + if (!empty($passwordHash)) { + $objWriter->writeAttribute('password', $passwordHash); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write MergeCells. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (count($pSheet->getMergeCells()) > 0) { + // mergeCells + $objWriter->startElement('mergeCells'); + + // Loop mergeCells + foreach ($pSheet->getMergeCells() as $mergeCell) { + // mergeCell + $objWriter->startElement('mergeCell'); + $objWriter->writeAttribute('ref', $mergeCell); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write PrintOptions. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // printOptions + $objWriter->startElement('printOptions'); + + $objWriter->writeAttribute('gridLines', ($pSheet->getPrintGridlines() ? 'true' : 'false')); + $objWriter->writeAttribute('gridLinesSet', 'true'); + + if ($pSheet->getPageSetup()->getHorizontalCentered()) { + $objWriter->writeAttribute('horizontalCentered', 'true'); + } + + if ($pSheet->getPageSetup()->getVerticalCentered()) { + $objWriter->writeAttribute('verticalCentered', 'true'); + } + + $objWriter->endElement(); + } + + /** + * Write PageMargins. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // pageMargins + $objWriter->startElement('pageMargins'); + $objWriter->writeAttribute('left', StringHelper::formatNumber($pSheet->getPageMargins()->getLeft())); + $objWriter->writeAttribute('right', StringHelper::formatNumber($pSheet->getPageMargins()->getRight())); + $objWriter->writeAttribute('top', StringHelper::formatNumber($pSheet->getPageMargins()->getTop())); + $objWriter->writeAttribute('bottom', StringHelper::formatNumber($pSheet->getPageMargins()->getBottom())); + $objWriter->writeAttribute('header', StringHelper::formatNumber($pSheet->getPageMargins()->getHeader())); + $objWriter->writeAttribute('footer', StringHelper::formatNumber($pSheet->getPageMargins()->getFooter())); + $objWriter->endElement(); + } + + /** + * Write AutoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // autoFilter + $objWriter->startElement('autoFilter'); + + // Strip any worksheet reference from the filter coordinates + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref + [$ws, $range[0]] = PhpspreadsheetWorksheet::extractSheetTitle($range[0], true); + $range = implode(':', $range); + + $objWriter->writeAttribute('ref', str_replace('$', '', $range)); + + $columns = $pSheet->getAutoFilter()->getColumns(); + if (count($columns) > 0) { + foreach ($columns as $columnID => $column) { + $rules = $column->getRules(); + if (count($rules) > 0) { + $objWriter->startElement('filterColumn'); + $objWriter->writeAttribute('colId', $pSheet->getAutoFilter()->getColumnOffset($columnID)); + + $objWriter->startElement($column->getFilterType()); + if ($column->getJoin() == Column::AUTOFILTER_COLUMN_JOIN_AND) { + $objWriter->writeAttribute('and', 1); + } + + foreach ($rules as $rule) { + if (($column->getFilterType() === Column::AUTOFILTER_FILTERTYPE_FILTER) && + ($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_EQUAL) && + ($rule->getValue() === '')) { + // Filter rule for Blanks + $objWriter->writeAttribute('blank', 1); + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER) { + // Dynamic Filter Rule + $objWriter->writeAttribute('type', $rule->getGrouping()); + $val = $column->getAttribute('val'); + if ($val !== null) { + $objWriter->writeAttribute('val', $val); + } + $maxVal = $column->getAttribute('maxVal'); + if ($maxVal !== null) { + $objWriter->writeAttribute('maxVal', $maxVal); + } + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_TOPTENFILTER) { + // Top 10 Filter Rule + $objWriter->writeAttribute('val', $rule->getValue()); + $objWriter->writeAttribute('percent', (($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) ? '1' : '0')); + $objWriter->writeAttribute('top', (($rule->getGrouping() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) ? '1' : '0')); + } else { + // Filter, DateGroupItem or CustomFilter + $objWriter->startElement($rule->getRuleType()); + + if ($rule->getOperator() !== Rule::AUTOFILTER_COLUMN_RULE_EQUAL) { + $objWriter->writeAttribute('operator', $rule->getOperator()); + } + if ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DATEGROUP) { + // Date Group filters + foreach ($rule->getValue() as $key => $value) { + if ($value > '') { + $objWriter->writeAttribute($key, $value); + } + } + $objWriter->writeAttribute('dateTimeGrouping', $rule->getGrouping()); + } else { + $objWriter->writeAttribute('val', $rule->getValue()); + } + + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + $objWriter->endElement(); + } + } + + /** + * Write PageSetup. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // pageSetup + $objWriter->startElement('pageSetup'); + $objWriter->writeAttribute('paperSize', $pSheet->getPageSetup()->getPaperSize()); + $objWriter->writeAttribute('orientation', $pSheet->getPageSetup()->getOrientation()); + + if ($pSheet->getPageSetup()->getScale() !== null) { + $objWriter->writeAttribute('scale', $pSheet->getPageSetup()->getScale()); + } + if ($pSheet->getPageSetup()->getFitToHeight() !== null) { + $objWriter->writeAttribute('fitToHeight', $pSheet->getPageSetup()->getFitToHeight()); + } else { + $objWriter->writeAttribute('fitToHeight', '0'); + } + if ($pSheet->getPageSetup()->getFitToWidth() !== null) { + $objWriter->writeAttribute('fitToWidth', $pSheet->getPageSetup()->getFitToWidth()); + } else { + $objWriter->writeAttribute('fitToWidth', '0'); + } + if ($pSheet->getPageSetup()->getFirstPageNumber() !== null) { + $objWriter->writeAttribute('firstPageNumber', $pSheet->getPageSetup()->getFirstPageNumber()); + $objWriter->writeAttribute('useFirstPageNumber', '1'); + } + + $getUnparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + if (isset($getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId'])) { + $objWriter->writeAttribute('r:id', $getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId']); + } + + $objWriter->endElement(); + } + + /** + * Write Header / Footer. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // headerFooter + $objWriter->startElement('headerFooter'); + $objWriter->writeAttribute('differentOddEven', ($pSheet->getHeaderFooter()->getDifferentOddEven() ? 'true' : 'false')); + $objWriter->writeAttribute('differentFirst', ($pSheet->getHeaderFooter()->getDifferentFirst() ? 'true' : 'false')); + $objWriter->writeAttribute('scaleWithDoc', ($pSheet->getHeaderFooter()->getScaleWithDocument() ? 'true' : 'false')); + $objWriter->writeAttribute('alignWithMargins', ($pSheet->getHeaderFooter()->getAlignWithMargins() ? 'true' : 'false')); + + $objWriter->writeElement('oddHeader', $pSheet->getHeaderFooter()->getOddHeader()); + $objWriter->writeElement('oddFooter', $pSheet->getHeaderFooter()->getOddFooter()); + $objWriter->writeElement('evenHeader', $pSheet->getHeaderFooter()->getEvenHeader()); + $objWriter->writeElement('evenFooter', $pSheet->getHeaderFooter()->getEvenFooter()); + $objWriter->writeElement('firstHeader', $pSheet->getHeaderFooter()->getFirstHeader()); + $objWriter->writeElement('firstFooter', $pSheet->getHeaderFooter()->getFirstFooter()); + $objWriter->endElement(); + } + + /** + * Write Breaks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Get row and column breaks + $aRowBreaks = []; + $aColumnBreaks = []; + foreach ($pSheet->getBreaks() as $cell => $breakType) { + if ($breakType == PhpspreadsheetWorksheet::BREAK_ROW) { + $aRowBreaks[] = $cell; + } elseif ($breakType == PhpspreadsheetWorksheet::BREAK_COLUMN) { + $aColumnBreaks[] = $cell; + } + } + + // rowBreaks + if (!empty($aRowBreaks)) { + $objWriter->startElement('rowBreaks'); + $objWriter->writeAttribute('count', count($aRowBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aRowBreaks)); + + foreach ($aRowBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', $coords[1]); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + // Second, write column breaks + if (!empty($aColumnBreaks)) { + $objWriter->startElement('colBreaks'); + $objWriter->writeAttribute('count', count($aColumnBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aColumnBreaks)); + + foreach ($aColumnBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', Coordinate::columnIndexFromString($coords[0]) - 1); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetData. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param string[] $pStringTable String table + */ + private function writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, array $pStringTable): void + { + // Flipped stringtable, for faster index searching + $aFlippedStringTable = $this->getParentWriter()->getWriterPart('stringtable')->flipStringTable($pStringTable); + + // sheetData + $objWriter->startElement('sheetData'); + + // Get column count + $colCount = Coordinate::columnIndexFromString($pSheet->getHighestColumn()); + + // Highest row number + $highestRow = $pSheet->getHighestRow(); + + // Loop through cells + $cellsByRow = []; + foreach ($pSheet->getCoordinates() as $coordinate) { + $cellAddress = Coordinate::coordinateFromString($coordinate); + $cellsByRow[$cellAddress[1]][] = $coordinate; + } + + $currentRow = 0; + while ($currentRow++ < $highestRow) { + // Get row dimension + $rowDimension = $pSheet->getRowDimension($currentRow); + + // Write current row? + $writeCurrentRow = isset($cellsByRow[$currentRow]) || $rowDimension->getRowHeight() >= 0 || $rowDimension->getVisible() == false || $rowDimension->getCollapsed() == true || $rowDimension->getOutlineLevel() > 0 || $rowDimension->getXfIndex() !== null; + + if ($writeCurrentRow) { + // Start a new row + $objWriter->startElement('row'); + $objWriter->writeAttribute('r', $currentRow); + $objWriter->writeAttribute('spans', '1:' . $colCount); + + // Row dimensions + if ($rowDimension->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', '1'); + $objWriter->writeAttribute('ht', StringHelper::formatNumber($rowDimension->getRowHeight())); + } + + // Row visibility + if (!$rowDimension->getVisible() === true) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Collapsed + if ($rowDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($rowDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $rowDimension->getOutlineLevel()); + } + + // Style + if ($rowDimension->getXfIndex() !== null) { + $objWriter->writeAttribute('s', $rowDimension->getXfIndex()); + $objWriter->writeAttribute('customFormat', '1'); + } + + // Write cells + if (isset($cellsByRow[$currentRow])) { + foreach ($cellsByRow[$currentRow] as $cellAddress) { + // Write cell + $this->writeCell($objWriter, $pSheet, $cellAddress, $aFlippedStringTable); + } + } + + // End row + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * @param RichText|string $cellValue + */ + private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, $cellValue): void + { + $objWriter->writeAttribute('t', $mappedType); + if (!$cellValue instanceof RichText) { + $objWriter->writeElement('t', StringHelper::controlCharacterPHP2OOXML(htmlspecialchars($cellValue))); + } elseif ($cellValue instanceof RichText) { + $objWriter->startElement('is'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $cellValue); + $objWriter->endElement(); + } + } + + /** + * @param RichText|string $cellValue + * @param string[] $pFlippedStringTable + */ + private function writeCellString(XMLWriter $objWriter, string $mappedType, $cellValue, array $pFlippedStringTable): void + { + $objWriter->writeAttribute('t', $mappedType); + if (!$cellValue instanceof RichText) { + self::writeElementIf($objWriter, isset($pFlippedStringTable[$cellValue]), 'v', $pFlippedStringTable[$cellValue]); + } else { + $objWriter->writeElement('v', $pFlippedStringTable[$cellValue->getHashCode()]); + } + } + + /** + * @param float|int $cellValue + */ + private function writeCellNumeric(XMLWriter $objWriter, $cellValue): void + { + //force a decimal to be written if the type is float + if (is_float($cellValue)) { + // force point as decimal separator in case current locale uses comma + $cellValue = str_replace(',', '.', (string) $cellValue); + if (strpos($cellValue, '.') === false) { + $cellValue = $cellValue . '.0'; + } + } + $objWriter->writeElement('v', $cellValue); + } + + private function writeCellBoolean(XMLWriter $objWriter, string $mappedType, bool $cellValue): void + { + $objWriter->writeAttribute('t', $mappedType); + $objWriter->writeElement('v', $cellValue ? '1' : '0'); + } + + private function writeCellError(XMLWriter $objWriter, string $mappedType, string $cellValue, string $formulaerr = '#NULL!'): void + { + $objWriter->writeAttribute('t', $mappedType); + $cellIsFormula = substr($cellValue, 0, 1) === '='; + self::writeElementIf($objWriter, $cellIsFormula, 'f', Xlfn::addXlfnStripEquals($cellValue)); + $objWriter->writeElement('v', $cellIsFormula ? $formulaerr : $cellValue); + } + + private function writeCellFormula(XMLWriter $objWriter, string $cellValue, Cell $pCell): void + { + $calculatedValue = $this->getParentWriter()->getPreCalculateFormulas() ? $pCell->getCalculatedValue() : $cellValue; + if (is_string($calculatedValue)) { + if (\PhpOffice\PhpSpreadsheet\Calculation\Functions::isError($calculatedValue)) { + $this->writeCellError($objWriter, 'e', $cellValue, $calculatedValue); + + return; + } + $objWriter->writeAttribute('t', 'str'); + } elseif (is_bool($calculatedValue)) { + $objWriter->writeAttribute('t', 'b'); + } + // array values are not yet supported + //$attributes = $pCell->getFormulaAttributes(); + //if (($attributes['t'] ?? null) === 'array') { + // $objWriter->startElement('f'); + // $objWriter->writeAttribute('t', 'array'); + // $objWriter->writeAttribute('ref', $pCellAddress); + // $objWriter->writeAttribute('aca', '1'); + // $objWriter->writeAttribute('ca', '1'); + // $objWriter->text(substr($cellValue, 1)); + // $objWriter->endElement(); + //} else { + // $objWriter->writeElement('f', Xlfn::addXlfnStripEquals($cellValue)); + //} + $objWriter->writeElement('f', Xlfn::addXlfnStripEquals($cellValue)); + self::writeElementIf( + $objWriter, + $this->getParentWriter()->getOffice2003Compatibility() === false, + 'v', + ($this->getParentWriter()->getPreCalculateFormulas() && !is_array($calculatedValue) && substr($calculatedValue, 0, 1) !== '#') + ? StringHelper::formatNumber($calculatedValue) : '0' + ); + } + + /** + * Write Cell. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param string $pCellAddress Cell Address + * @param string[] $pFlippedStringTable String table (flipped), for faster index searching + */ + private function writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, string $pCellAddress, array $pFlippedStringTable): void + { + // Cell + $pCell = $pSheet->getCell($pCellAddress); + $objWriter->startElement('c'); + $objWriter->writeAttribute('r', $pCellAddress); + + // Sheet styles + $xfi = $pCell->getXfIndex(); + self::writeAttributeIf($objWriter, $xfi, 's', $xfi); + + // If cell value is supplied, write cell value + $cellValue = $pCell->getValue(); + if (is_object($cellValue) || $cellValue !== '') { + // Map type + $mappedType = $pCell->getDataType(); + + // Write data depending on its type + switch (strtolower($mappedType)) { + case 'inlinestr': // Inline string + $this->writeCellInlineStr($objWriter, $mappedType, $cellValue); + + break; + case 's': // String + $this->writeCellString($objWriter, $mappedType, $cellValue, $pFlippedStringTable); + + break; + case 'f': // Formula + $this->writeCellFormula($objWriter, $cellValue, $pCell); + + break; + case 'n': // Numeric + $this->writeCellNumeric($objWriter, $cellValue); + + break; + case 'b': // Boolean + $this->writeCellBoolean($objWriter, $mappedType, $cellValue); + + break; + case 'e': // Error + $this->writeCellError($objWriter, $mappedType, $cellValue); + } + } + + $objWriter->endElement(); + } + + /** + * Write Drawings. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param bool $includeCharts Flag indicating if we should include drawing details for charts + */ + private function writeDrawings(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, $includeCharts = false): void + { + $unparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']); + $chartCount = ($includeCharts) ? $pSheet->getChartCollection()->count() : 0; + if ($chartCount == 0 && $pSheet->getDrawingCollection()->count() == 0 && !$hasUnparsedDrawing) { + return; + } + + // If sheet contains drawings, add the relationships + $objWriter->startElement('drawing'); + + $rId = 'rId1'; + if (isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']; + // take first. In future can be overriten + // (! synchronize with \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Rels::writeWorksheetRelationships) + $rId = reset($drawingOriginalIds); + } + + $objWriter->writeAttribute('r:id', $rId); + $objWriter->endElement(); + } + + /** + * Write LegacyDrawing. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // If sheet contains comments, add the relationships + if (count($pSheet->getComments()) > 0) { + $objWriter->startElement('legacyDrawing'); + $objWriter->writeAttribute('r:id', 'rId_comments_vml1'); + $objWriter->endElement(); + } + } + + /** + * Write LegacyDrawingHF. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // If sheet contains images, add the relationships + if (count($pSheet->getHeaderFooter()->getImages()) > 0) { + $objWriter->startElement('legacyDrawingHF'); + $objWriter->writeAttribute('r:id', 'rId_headerfooter_vml1'); + $objWriter->endElement(); + } + } + + private function writeAlternateContent(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (empty($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'])) { + return; + } + + foreach ($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'] as $alternateContent) { + $objWriter->writeRaw($alternateContent); + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php new file mode 100755 index 0000000..a9137df --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php @@ -0,0 +1,33 @@ +parentWriter; + } + + /** + * Set parent Xlsx object. + */ + public function __construct(Xlsx $pWriter) + { + $this->parentWriter = $pWriter; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Xlfn.php b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Xlfn.php new file mode 100755 index 0000000..8f7c07e --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Xlfn.php @@ -0,0 +1,159 @@ +=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/MessageInterface.php b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/MessageInterface.php new file mode 100755 index 0000000..dd46e5e --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,187 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader($name); + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader($name); + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine($name); + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader($name, $value); + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader($name, $value); + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader($name); + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body); +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/RequestInterface.php b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/RequestInterface.php new file mode 100755 index 0000000..a96d4fd --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,129 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute($name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute($name, $value); + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute($name); +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/StreamInterface.php b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/StreamInterface.php new file mode 100755 index 0000000..f68f391 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,158 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/.editorconfig b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/.editorconfig new file mode 100755 index 0000000..48542cb --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/.editorconfig @@ -0,0 +1,12 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/LICENSE.md b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/LICENSE.md new file mode 100755 index 0000000..e49a7c8 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2016 PHP Framework Interoperability Group + +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/README.md b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/README.md new file mode 100755 index 0000000..43641d1 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/README.md @@ -0,0 +1,8 @@ +PHP FIG Simple Cache PSR +======================== + +This repository holds all interfaces related to PSR-16. + +Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. + +You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/composer.json b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/composer.json new file mode 100755 index 0000000..2978fa5 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/composer.json @@ -0,0 +1,25 @@ +{ + "name": "psr/simple-cache", + "description": "Common interfaces for simple caching", + "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/CacheException.php b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/CacheException.php new file mode 100755 index 0000000..eba5381 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/CacheException.php @@ -0,0 +1,10 @@ + value pairs. Cache keys that do not exist or are stale will have $default as value. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function getMultiple($keys, $default = null); + + /** + * Persists a set of key => value pairs in the cache, with an optional TTL. + * + * @param iterable $values A list of key => value pairs for a multiple-set operation. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $values is neither an array nor a Traversable, + * or if any of the $values are not a legal value. + */ + public function setMultiple($values, $ttl = null); + + /** + * Deletes multiple cache items in a single operation. + * + * @param iterable $keys A list of string-based keys to be deleted. + * + * @return bool True if the items were successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function deleteMultiple($keys); + + /** + * Determines whether an item is present in the cache. + * + * NOTE: It is recommended that has() is only to be used for cache warming type purposes + * and not to be used within your live applications operations for get/set, as this method + * is subject to a race condition where your has() will return true and immediately after, + * another script can remove it making the state of your app out of date. + * + * @param string $key The cache item key. + * + * @return bool + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function has($key); +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/InvalidArgumentException.php b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/InvalidArgumentException.php new file mode 100755 index 0000000..6a9524a --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/psr/simple-cache/src/InvalidArgumentException.php @@ -0,0 +1,13 @@ += 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +For PHP version **`>= 5.6`**: + +``` +composer require ralouphie/getallheaders +``` + +For PHP version **`< 5.6`**: + +``` +composer require ralouphie/getallheaders "^2" +``` diff --git a/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/composer.json b/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/composer.json new file mode 100755 index 0000000..de8ce62 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,26 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5 || ^6.5", + "php-coveralls/php-coveralls": "^2.1" + }, + "autoload": { + "files": ["src/getallheaders.php"] + }, + "autoload-dev": { + "psr-4": { + "getallheaders\\Tests\\": "tests/" + } + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/src/getallheaders.php b/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100755 index 0000000..c7285a5 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/LICENSE b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100755 index 0000000..4cd8bdd --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Mbstring.php b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100755 index 0000000..15503bc --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,847 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + trigger_error('The length of each segment must be greater than zero', E_USER_WARNING); + + return false; + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + } + + $result = array(); + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/README.md b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/README.md new file mode 100755 index 0000000..4efb599 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100755 index 0000000..a22eca5 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ꭰ' => 'ꭰ', + 'Ꭱ' => 'ꭱ', + 'Ꭲ' => 'ꭲ', + 'Ꭳ' => 'ꭳ', + 'Ꭴ' => 'ꭴ', + 'Ꭵ' => 'ꭵ', + 'Ꭶ' => 'ꭶ', + 'Ꭷ' => 'ꭷ', + 'Ꭸ' => 'ꭸ', + 'Ꭹ' => 'ꭹ', + 'Ꭺ' => 'ꭺ', + 'Ꭻ' => 'ꭻ', + 'Ꭼ' => 'ꭼ', + 'Ꭽ' => 'ꭽ', + 'Ꭾ' => 'ꭾ', + 'Ꭿ' => 'ꭿ', + 'Ꮀ' => 'ꮀ', + 'Ꮁ' => 'ꮁ', + 'Ꮂ' => 'ꮂ', + 'Ꮃ' => 'ꮃ', + 'Ꮄ' => 'ꮄ', + 'Ꮅ' => 'ꮅ', + 'Ꮆ' => 'ꮆ', + 'Ꮇ' => 'ꮇ', + 'Ꮈ' => 'ꮈ', + 'Ꮉ' => 'ꮉ', + 'Ꮊ' => 'ꮊ', + 'Ꮋ' => 'ꮋ', + 'Ꮌ' => 'ꮌ', + 'Ꮍ' => 'ꮍ', + 'Ꮎ' => 'ꮎ', + 'Ꮏ' => 'ꮏ', + 'Ꮐ' => 'ꮐ', + 'Ꮑ' => 'ꮑ', + 'Ꮒ' => 'ꮒ', + 'Ꮓ' => 'ꮓ', + 'Ꮔ' => 'ꮔ', + 'Ꮕ' => 'ꮕ', + 'Ꮖ' => 'ꮖ', + 'Ꮗ' => 'ꮗ', + 'Ꮘ' => 'ꮘ', + 'Ꮙ' => 'ꮙ', + 'Ꮚ' => 'ꮚ', + 'Ꮛ' => 'ꮛ', + 'Ꮜ' => 'ꮜ', + 'Ꮝ' => 'ꮝ', + 'Ꮞ' => 'ꮞ', + 'Ꮟ' => 'ꮟ', + 'Ꮠ' => 'ꮠ', + 'Ꮡ' => 'ꮡ', + 'Ꮢ' => 'ꮢ', + 'Ꮣ' => 'ꮣ', + 'Ꮤ' => 'ꮤ', + 'Ꮥ' => 'ꮥ', + 'Ꮦ' => 'ꮦ', + 'Ꮧ' => 'ꮧ', + 'Ꮨ' => 'ꮨ', + 'Ꮩ' => 'ꮩ', + 'Ꮪ' => 'ꮪ', + 'Ꮫ' => 'ꮫ', + 'Ꮬ' => 'ꮬ', + 'Ꮭ' => 'ꮭ', + 'Ꮮ' => 'ꮮ', + 'Ꮯ' => 'ꮯ', + 'Ꮰ' => 'ꮰ', + 'Ꮱ' => 'ꮱ', + 'Ꮲ' => 'ꮲ', + 'Ꮳ' => 'ꮳ', + 'Ꮴ' => 'ꮴ', + 'Ꮵ' => 'ꮵ', + 'Ꮶ' => 'ꮶ', + 'Ꮷ' => 'ꮷ', + 'Ꮸ' => 'ꮸ', + 'Ꮹ' => 'ꮹ', + 'Ꮺ' => 'ꮺ', + 'Ꮻ' => 'ꮻ', + 'Ꮼ' => 'ꮼ', + 'Ꮽ' => 'ꮽ', + 'Ꮾ' => 'ꮾ', + 'Ꮿ' => 'ꮿ', + 'Ᏸ' => 'ᏸ', + 'Ᏹ' => 'ᏹ', + 'Ᏺ' => 'ᏺ', + 'Ᏻ' => 'ᏻ', + 'Ᏼ' => 'ᏼ', + 'Ᏽ' => 'ᏽ', + 'Ა' => 'ა', + 'Ბ' => 'ბ', + 'Გ' => 'გ', + 'Დ' => 'დ', + 'Ე' => 'ე', + 'Ვ' => 'ვ', + 'Ზ' => 'ზ', + 'Თ' => 'თ', + 'Ი' => 'ი', + 'Კ' => 'კ', + 'Ლ' => 'ლ', + 'Მ' => 'მ', + 'Ნ' => 'ნ', + 'Ო' => 'ო', + 'Პ' => 'პ', + 'Ჟ' => 'ჟ', + 'Რ' => 'რ', + 'Ს' => 'ს', + 'Ტ' => 'ტ', + 'Უ' => 'უ', + 'Ფ' => 'ფ', + 'Ქ' => 'ქ', + 'Ღ' => 'ღ', + 'Ყ' => 'ყ', + 'Შ' => 'შ', + 'Ჩ' => 'ჩ', + 'Ც' => 'ც', + 'Ძ' => 'ძ', + 'Წ' => 'წ', + 'Ჭ' => 'ჭ', + 'Ხ' => 'ხ', + 'Ჯ' => 'ჯ', + 'Ჰ' => 'ჰ', + 'Ჱ' => 'ჱ', + 'Ჲ' => 'ჲ', + 'Ჳ' => 'ჳ', + 'Ჴ' => 'ჴ', + 'Ჵ' => 'ჵ', + 'Ჶ' => 'ჶ', + 'Ჷ' => 'ჷ', + 'Ჸ' => 'ჸ', + 'Ჹ' => 'ჹ', + 'Ჺ' => 'ჺ', + 'Ჽ' => 'ჽ', + 'Ჾ' => 'ჾ', + 'Ჿ' => 'ჿ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ɪ' => 'ɪ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'Ʝ' => 'ʝ', + 'Ꭓ' => 'ꭓ', + 'Ꞵ' => 'ꞵ', + 'Ꞷ' => 'ꞷ', + 'Ꞹ' => 'ꞹ', + 'Ꞻ' => 'ꞻ', + 'Ꞽ' => 'ꞽ', + 'Ꞿ' => 'ꞿ', + 'Ꟃ' => 'ꟃ', + 'Ꞔ' => 'ꞔ', + 'Ʂ' => 'ʂ', + 'Ᶎ' => 'ᶎ', + 'Ꟈ' => 'ꟈ', + 'Ꟊ' => 'ꟊ', + 'Ꟶ' => 'ꟶ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𐒰' => '𐓘', + '𐒱' => '𐓙', + '𐒲' => '𐓚', + '𐒳' => '𐓛', + '𐒴' => '𐓜', + '𐒵' => '𐓝', + '𐒶' => '𐓞', + '𐒷' => '𐓟', + '𐒸' => '𐓠', + '𐒹' => '𐓡', + '𐒺' => '𐓢', + '𐒻' => '𐓣', + '𐒼' => '𐓤', + '𐒽' => '𐓥', + '𐒾' => '𐓦', + '𐒿' => '𐓧', + '𐓀' => '𐓨', + '𐓁' => '𐓩', + '𐓂' => '𐓪', + '𐓃' => '𐓫', + '𐓄' => '𐓬', + '𐓅' => '𐓭', + '𐓆' => '𐓮', + '𐓇' => '𐓯', + '𐓈' => '𐓰', + '𐓉' => '𐓱', + '𐓊' => '𐓲', + '𐓋' => '𐓳', + '𐓌' => '𐓴', + '𐓍' => '𐓵', + '𐓎' => '𐓶', + '𐓏' => '𐓷', + '𐓐' => '𐓸', + '𐓑' => '𐓹', + '𐓒' => '𐓺', + '𐓓' => '𐓻', + '𐲀' => '𐳀', + '𐲁' => '𐳁', + '𐲂' => '𐳂', + '𐲃' => '𐳃', + '𐲄' => '𐳄', + '𐲅' => '𐳅', + '𐲆' => '𐳆', + '𐲇' => '𐳇', + '𐲈' => '𐳈', + '𐲉' => '𐳉', + '𐲊' => '𐳊', + '𐲋' => '𐳋', + '𐲌' => '𐳌', + '𐲍' => '𐳍', + '𐲎' => '𐳎', + '𐲏' => '𐳏', + '𐲐' => '𐳐', + '𐲑' => '𐳑', + '𐲒' => '𐳒', + '𐲓' => '𐳓', + '𐲔' => '𐳔', + '𐲕' => '𐳕', + '𐲖' => '𐳖', + '𐲗' => '𐳗', + '𐲘' => '𐳘', + '𐲙' => '𐳙', + '𐲚' => '𐳚', + '𐲛' => '𐳛', + '𐲜' => '𐳜', + '𐲝' => '𐳝', + '𐲞' => '𐳞', + '𐲟' => '𐳟', + '𐲠' => '𐳠', + '𐲡' => '𐳡', + '𐲢' => '𐳢', + '𐲣' => '𐳣', + '𐲤' => '𐳤', + '𐲥' => '𐳥', + '𐲦' => '𐳦', + '𐲧' => '𐳧', + '𐲨' => '𐳨', + '𐲩' => '𐳩', + '𐲪' => '𐳪', + '𐲫' => '𐳫', + '𐲬' => '𐳬', + '𐲭' => '𐳭', + '𐲮' => '𐳮', + '𐲯' => '𐳯', + '𐲰' => '𐳰', + '𐲱' => '𐳱', + '𐲲' => '𐳲', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', + '𖹀' => '𖹠', + '𖹁' => '𖹡', + '𖹂' => '𖹢', + '𖹃' => '𖹣', + '𖹄' => '𖹤', + '𖹅' => '𖹥', + '𖹆' => '𖹦', + '𖹇' => '𖹧', + '𖹈' => '𖹨', + '𖹉' => '𖹩', + '𖹊' => '𖹪', + '𖹋' => '𖹫', + '𖹌' => '𖹬', + '𖹍' => '𖹭', + '𖹎' => '𖹮', + '𖹏' => '𖹯', + '𖹐' => '𖹰', + '𖹑' => '𖹱', + '𖹒' => '𖹲', + '𖹓' => '𖹳', + '𖹔' => '𖹴', + '𖹕' => '𖹵', + '𖹖' => '𖹶', + '𖹗' => '𖹷', + '𖹘' => '𖹸', + '𖹙' => '𖹹', + '𖹚' => '𖹺', + '𖹛' => '𖹻', + '𖹜' => '𖹼', + '𖹝' => '𖹽', + '𖹞' => '𖹾', + '𖹟' => '𖹿', + '𞤀' => '𞤢', + '𞤁' => '𞤣', + '𞤂' => '𞤤', + '𞤃' => '𞤥', + '𞤄' => '𞤦', + '𞤅' => '𞤧', + '𞤆' => '𞤨', + '𞤇' => '𞤩', + '𞤈' => '𞤪', + '𞤉' => '𞤫', + '𞤊' => '𞤬', + '𞤋' => '𞤭', + '𞤌' => '𞤮', + '𞤍' => '𞤯', + '𞤎' => '𞤰', + '𞤏' => '𞤱', + '𞤐' => '𞤲', + '𞤑' => '𞤳', + '𞤒' => '𞤴', + '𞤓' => '𞤵', + '𞤔' => '𞤶', + '𞤕' => '𞤷', + '𞤖' => '𞤸', + '𞤗' => '𞤹', + '𞤘' => '𞤺', + '𞤙' => '𞤻', + '𞤚' => '𞤼', + '𞤛' => '𞤽', + '𞤜' => '𞤾', + '𞤝' => '𞤿', + '𞤞' => '𞥀', + '𞤟' => '𞥁', + '𞤠' => '𞥂', + '𞤡' => '𞥃', +); diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100755 index 0000000..2a8f6e7 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɪ' => 'Ɪ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʂ' => 'Ʂ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʝ' => 'Ʝ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ა' => 'Ა', + 'ბ' => 'Ბ', + 'გ' => 'Გ', + 'დ' => 'Დ', + 'ე' => 'Ე', + 'ვ' => 'Ვ', + 'ზ' => 'Ზ', + 'თ' => 'Თ', + 'ი' => 'Ი', + 'კ' => 'Კ', + 'ლ' => 'Ლ', + 'მ' => 'Მ', + 'ნ' => 'Ნ', + 'ო' => 'Ო', + 'პ' => 'Პ', + 'ჟ' => 'Ჟ', + 'რ' => 'Რ', + 'ს' => 'Ს', + 'ტ' => 'Ტ', + 'უ' => 'Უ', + 'ფ' => 'Ფ', + 'ქ' => 'Ქ', + 'ღ' => 'Ღ', + 'ყ' => 'Ყ', + 'შ' => 'Შ', + 'ჩ' => 'Ჩ', + 'ც' => 'Ც', + 'ძ' => 'Ძ', + 'წ' => 'Წ', + 'ჭ' => 'Ჭ', + 'ხ' => 'Ხ', + 'ჯ' => 'Ჯ', + 'ჰ' => 'Ჰ', + 'ჱ' => 'Ჱ', + 'ჲ' => 'Ჲ', + 'ჳ' => 'Ჳ', + 'ჴ' => 'Ჴ', + 'ჵ' => 'Ჵ', + 'ჶ' => 'Ჶ', + 'ჷ' => 'Ჷ', + 'ჸ' => 'Ჸ', + 'ჹ' => 'Ჹ', + 'ჺ' => 'Ჺ', + 'ჽ' => 'Ჽ', + 'ჾ' => 'Ჾ', + 'ჿ' => 'Ჿ', + 'ᏸ' => 'Ᏸ', + 'ᏹ' => 'Ᏹ', + 'ᏺ' => 'Ᏺ', + 'ᏻ' => 'Ᏻ', + 'ᏼ' => 'Ᏼ', + 'ᏽ' => 'Ᏽ', + 'ᲀ' => 'В', + 'ᲁ' => 'Д', + 'ᲂ' => 'О', + 'ᲃ' => 'С', + 'ᲄ' => 'Т', + 'ᲅ' => 'Т', + 'ᲆ' => 'Ъ', + 'ᲇ' => 'Ѣ', + 'ᲈ' => 'Ꙋ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ᶎ' => 'Ᶎ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞔ' => 'Ꞔ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'ꞵ' => 'Ꞵ', + 'ꞷ' => 'Ꞷ', + 'ꞹ' => 'Ꞹ', + 'ꞻ' => 'Ꞻ', + 'ꞽ' => 'Ꞽ', + 'ꞿ' => 'Ꞿ', + 'ꟃ' => 'Ꟃ', + 'ꟈ' => 'Ꟈ', + 'ꟊ' => 'Ꟊ', + 'ꟶ' => 'Ꟶ', + 'ꭓ' => 'Ꭓ', + 'ꭰ' => 'Ꭰ', + 'ꭱ' => 'Ꭱ', + 'ꭲ' => 'Ꭲ', + 'ꭳ' => 'Ꭳ', + 'ꭴ' => 'Ꭴ', + 'ꭵ' => 'Ꭵ', + 'ꭶ' => 'Ꭶ', + 'ꭷ' => 'Ꭷ', + 'ꭸ' => 'Ꭸ', + 'ꭹ' => 'Ꭹ', + 'ꭺ' => 'Ꭺ', + 'ꭻ' => 'Ꭻ', + 'ꭼ' => 'Ꭼ', + 'ꭽ' => 'Ꭽ', + 'ꭾ' => 'Ꭾ', + 'ꭿ' => 'Ꭿ', + 'ꮀ' => 'Ꮀ', + 'ꮁ' => 'Ꮁ', + 'ꮂ' => 'Ꮂ', + 'ꮃ' => 'Ꮃ', + 'ꮄ' => 'Ꮄ', + 'ꮅ' => 'Ꮅ', + 'ꮆ' => 'Ꮆ', + 'ꮇ' => 'Ꮇ', + 'ꮈ' => 'Ꮈ', + 'ꮉ' => 'Ꮉ', + 'ꮊ' => 'Ꮊ', + 'ꮋ' => 'Ꮋ', + 'ꮌ' => 'Ꮌ', + 'ꮍ' => 'Ꮍ', + 'ꮎ' => 'Ꮎ', + 'ꮏ' => 'Ꮏ', + 'ꮐ' => 'Ꮐ', + 'ꮑ' => 'Ꮑ', + 'ꮒ' => 'Ꮒ', + 'ꮓ' => 'Ꮓ', + 'ꮔ' => 'Ꮔ', + 'ꮕ' => 'Ꮕ', + 'ꮖ' => 'Ꮖ', + 'ꮗ' => 'Ꮗ', + 'ꮘ' => 'Ꮘ', + 'ꮙ' => 'Ꮙ', + 'ꮚ' => 'Ꮚ', + 'ꮛ' => 'Ꮛ', + 'ꮜ' => 'Ꮜ', + 'ꮝ' => 'Ꮝ', + 'ꮞ' => 'Ꮞ', + 'ꮟ' => 'Ꮟ', + 'ꮠ' => 'Ꮠ', + 'ꮡ' => 'Ꮡ', + 'ꮢ' => 'Ꮢ', + 'ꮣ' => 'Ꮣ', + 'ꮤ' => 'Ꮤ', + 'ꮥ' => 'Ꮥ', + 'ꮦ' => 'Ꮦ', + 'ꮧ' => 'Ꮧ', + 'ꮨ' => 'Ꮨ', + 'ꮩ' => 'Ꮩ', + 'ꮪ' => 'Ꮪ', + 'ꮫ' => 'Ꮫ', + 'ꮬ' => 'Ꮬ', + 'ꮭ' => 'Ꮭ', + 'ꮮ' => 'Ꮮ', + 'ꮯ' => 'Ꮯ', + 'ꮰ' => 'Ꮰ', + 'ꮱ' => 'Ꮱ', + 'ꮲ' => 'Ꮲ', + 'ꮳ' => 'Ꮳ', + 'ꮴ' => 'Ꮴ', + 'ꮵ' => 'Ꮵ', + 'ꮶ' => 'Ꮶ', + 'ꮷ' => 'Ꮷ', + 'ꮸ' => 'Ꮸ', + 'ꮹ' => 'Ꮹ', + 'ꮺ' => 'Ꮺ', + 'ꮻ' => 'Ꮻ', + 'ꮼ' => 'Ꮼ', + 'ꮽ' => 'Ꮽ', + 'ꮾ' => 'Ꮾ', + 'ꮿ' => 'Ꮿ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𐓘' => '𐒰', + '𐓙' => '𐒱', + '𐓚' => '𐒲', + '𐓛' => '𐒳', + '𐓜' => '𐒴', + '𐓝' => '𐒵', + '𐓞' => '𐒶', + '𐓟' => '𐒷', + '𐓠' => '𐒸', + '𐓡' => '𐒹', + '𐓢' => '𐒺', + '𐓣' => '𐒻', + '𐓤' => '𐒼', + '𐓥' => '𐒽', + '𐓦' => '𐒾', + '𐓧' => '𐒿', + '𐓨' => '𐓀', + '𐓩' => '𐓁', + '𐓪' => '𐓂', + '𐓫' => '𐓃', + '𐓬' => '𐓄', + '𐓭' => '𐓅', + '𐓮' => '𐓆', + '𐓯' => '𐓇', + '𐓰' => '𐓈', + '𐓱' => '𐓉', + '𐓲' => '𐓊', + '𐓳' => '𐓋', + '𐓴' => '𐓌', + '𐓵' => '𐓍', + '𐓶' => '𐓎', + '𐓷' => '𐓏', + '𐓸' => '𐓐', + '𐓹' => '𐓑', + '𐓺' => '𐓒', + '𐓻' => '𐓓', + '𐳀' => '𐲀', + '𐳁' => '𐲁', + '𐳂' => '𐲂', + '𐳃' => '𐲃', + '𐳄' => '𐲄', + '𐳅' => '𐲅', + '𐳆' => '𐲆', + '𐳇' => '𐲇', + '𐳈' => '𐲈', + '𐳉' => '𐲉', + '𐳊' => '𐲊', + '𐳋' => '𐲋', + '𐳌' => '𐲌', + '𐳍' => '𐲍', + '𐳎' => '𐲎', + '𐳏' => '𐲏', + '𐳐' => '𐲐', + '𐳑' => '𐲑', + '𐳒' => '𐲒', + '𐳓' => '𐲓', + '𐳔' => '𐲔', + '𐳕' => '𐲕', + '𐳖' => '𐲖', + '𐳗' => '𐲗', + '𐳘' => '𐲘', + '𐳙' => '𐲙', + '𐳚' => '𐲚', + '𐳛' => '𐲛', + '𐳜' => '𐲜', + '𐳝' => '𐲝', + '𐳞' => '𐲞', + '𐳟' => '𐲟', + '𐳠' => '𐲠', + '𐳡' => '𐲡', + '𐳢' => '𐲢', + '𐳣' => '𐲣', + '𐳤' => '𐲤', + '𐳥' => '𐲥', + '𐳦' => '𐲦', + '𐳧' => '𐲧', + '𐳨' => '𐲨', + '𐳩' => '𐲩', + '𐳪' => '𐲪', + '𐳫' => '𐲫', + '𐳬' => '𐲬', + '𐳭' => '𐲭', + '𐳮' => '𐲮', + '𐳯' => '𐲯', + '𐳰' => '𐲰', + '𐳱' => '𐲱', + '𐳲' => '𐲲', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', + '𖹠' => '𖹀', + '𖹡' => '𖹁', + '𖹢' => '𖹂', + '𖹣' => '𖹃', + '𖹤' => '𖹄', + '𖹥' => '𖹅', + '𖹦' => '𖹆', + '𖹧' => '𖹇', + '𖹨' => '𖹈', + '𖹩' => '𖹉', + '𖹪' => '𖹊', + '𖹫' => '𖹋', + '𖹬' => '𖹌', + '𖹭' => '𖹍', + '𖹮' => '𖹎', + '𖹯' => '𖹏', + '𖹰' => '𖹐', + '𖹱' => '𖹑', + '𖹲' => '𖹒', + '𖹳' => '𖹓', + '𖹴' => '𖹔', + '𖹵' => '𖹕', + '𖹶' => '𖹖', + '𖹷' => '𖹗', + '𖹸' => '𖹘', + '𖹹' => '𖹙', + '𖹺' => '𖹚', + '𖹻' => '𖹛', + '𖹼' => '𖹜', + '𖹽' => '𖹝', + '𖹾' => '𖹞', + '𖹿' => '𖹟', + '𞤢' => '𞤀', + '𞤣' => '𞤁', + '𞤤' => '𞤂', + '𞤥' => '𞤃', + '𞤦' => '𞤄', + '𞤧' => '𞤅', + '𞤨' => '𞤆', + '𞤩' => '𞤇', + '𞤪' => '𞤈', + '𞤫' => '𞤉', + '𞤬' => '𞤊', + '𞤭' => '𞤋', + '𞤮' => '𞤌', + '𞤯' => '𞤍', + '𞤰' => '𞤎', + '𞤱' => '𞤏', + '𞤲' => '𞤐', + '𞤳' => '𞤑', + '𞤴' => '𞤒', + '𞤵' => '𞤓', + '𞤶' => '𞤔', + '𞤷' => '𞤕', + '𞤸' => '𞤖', + '𞤹' => '𞤗', + '𞤺' => '𞤘', + '𞤻' => '𞤙', + '𞤼' => '𞤚', + '𞤽' => '𞤛', + '𞤾' => '𞤜', + '𞤿' => '𞤝', + '𞥀' => '𞤞', + '𞥁' => '𞤟', + '𞥂' => '𞤠', + '𞥃' => '𞤡', +); diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/bootstrap.php b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100755 index 0000000..b36a092 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } +} +if (!function_exists('mb_language')) { + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } +} +if (!function_exists('mb_substr')) { + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } +} +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_ord')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } +} +if (!function_exists('mb_chr')) { + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/composer.json b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/composer.json new file mode 100755 index 0000000..06e6b31 --- /dev/null +++ b/phpspreadsheet-1.13_php-7.4/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/composer.json new file mode 100755 index 0000000..6239a65 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/composer.json @@ -0,0 +1 @@ +{"name":"dummy app","description":"This app is only a dummy for downloading with the option require.","homepage":"https://php-download.com/","type":"project","require":{"phpoffice/phpspreadsheet":"^1.8.1.0"}} \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/composer.lock b/phpspreadsheet_1.8.1.0_php-7.0/composer.lock new file mode 100755 index 0000000..bb85939 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/composer.lock @@ -0,0 +1,647 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "162c774ce42fa5587fb8266fc56e1f1b", + "packages": [ + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "time": "2020-05-30T13:11:16+00:00" + }, + { + "name": "markbaker/complex", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/8eaa40cceec7bf0518187530b2e63871be661b72", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2020-03-11T20:15:49+00:00" + }, + { + "name": "markbaker/matrix", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "dev-master", + "phploc/phploc": "^4", + "phpmd/phpmd": "dev-master", + "phpunit/phpunit": "^5.7", + "sebastian/phpcpd": "^3.0", + "squizlabs/php_codesniffer": "^3.0@dev" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2019-10-06T11:29:25+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2020-02-14T08:15:52+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.14.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "2383aad5689778470491581442aab38cec41bf1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2383aad5689778470491581442aab38cec41bf1d", + "reference": "2383aad5689778470491581442aab38cec41bf1d", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.2", + "php": "^7.2", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2020-07-19T09:51:35+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/index.php b/phpspreadsheet_1.8.1.0_php-7.0/index.php new file mode 100755 index 0000000..62fcd5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/index.php @@ -0,0 +1,4 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/LICENSE b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/LICENSE new file mode 100755 index 0000000..f27399a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_classmap.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_classmap.php new file mode 100755 index 0000000..7a91153 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => $vendorDir . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => $vendorDir . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => $vendorDir . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => $vendorDir . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => $vendorDir . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => $vendorDir . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => $vendorDir . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => $vendorDir . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => $vendorDir . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => $vendorDir . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => $vendorDir . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => $vendorDir . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => $vendorDir . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => $vendorDir . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => $vendorDir . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => $vendorDir . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => $vendorDir . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => $vendorDir . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => $vendorDir . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => $vendorDir . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => $vendorDir . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => $vendorDir . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => $vendorDir . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => $vendorDir . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => $vendorDir . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => $vendorDir . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => $vendorDir . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => $vendorDir . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => $vendorDir . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => $vendorDir . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => $vendorDir . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => $vendorDir . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => $vendorDir . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => $vendorDir . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => $vendorDir . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => $vendorDir . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php', + '9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php', + '6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php', + '4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php', + '901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php', + '83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php', + '07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php', + 'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php', + '499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php', + '1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php', + '95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php', + 'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php', + '5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php', + '684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php', + 'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php', + '75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php', + '6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php', +); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_namespaces.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_namespaces.php new file mode 100755 index 0000000..b7fc012 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/maennchen/zipstream-php/src'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), + 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), + 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), + 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), + 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), + 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), +); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_real.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_real.php new file mode 100755 index 0000000..4a16754 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit5703a41519d94f81d9a2a045a99c45ea::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit5703a41519d94f81d9a2a045a99c45ea::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire5703a41519d94f81d9a2a045a99c45ea($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire5703a41519d94f81d9a2a045a99c45ea($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_static.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_static.php new file mode 100755 index 0000000..54fb960 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/autoload_static.php @@ -0,0 +1,146 @@ + __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php', + '9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php', + '6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php', + '4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php', + '901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php', + '83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php', + '07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php', + 'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php', + '499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php', + '1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php', + '95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php', + 'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php', + '5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php', + '684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php', + 'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php', + '75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php', + '6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'Z' => + array ( + 'ZipStream\\' => 10, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Mbstring\\' => 26, + ), + 'P' => + array ( + 'Psr\\SimpleCache\\' => 16, + 'Psr\\Http\\Message\\' => 17, + 'Psr\\Http\\Client\\' => 16, + 'PhpOffice\\PhpSpreadsheet\\' => 25, + ), + 'M' => + array ( + 'MyCLabs\\Enum\\' => 13, + 'Matrix\\' => 7, + ), + 'C' => + array ( + 'Complex\\' => 8, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'ZipStream\\' => + array ( + 0 => __DIR__ . '/..' . '/maennchen/zipstream-php/src', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'Psr\\Http\\Client\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-client/src', + ), + 'PhpOffice\\PhpSpreadsheet\\' => + array ( + 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', + ), + 'MyCLabs\\Enum\\' => + array ( + 0 => __DIR__ . '/..' . '/myclabs/php-enum/src', + ), + 'Matrix\\' => + array ( + 0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src', + ), + 'Complex\\' => + array ( + 0 => __DIR__ . '/..' . '/markbaker/complex/classes/src', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit5703a41519d94f81d9a2a045a99c45ea::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit5703a41519d94f81d9a2a045a99c45ea::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/installed.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/installed.json new file mode 100755 index 0000000..c024d47 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/composer/installed.json @@ -0,0 +1,651 @@ +[ + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "version_normalized": "2.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "time": "2020-05-30T13:11:16+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ] + }, + { + "name": "markbaker/complex", + "version": "1.4.8", + "version_normalized": "1.4.8.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/8eaa40cceec7bf0518187530b2e63871be661b72", + "reference": "8eaa40cceec7bf0518187530b2e63871be661b72", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.4.0" + }, + "time": "2020-03-11T20:15:49+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ] + }, + { + "name": "markbaker/matrix", + "version": "1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "reference": "5348c5a67e3b75cd209d70103f916a93b1f1ed21", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "dev-master", + "phploc/phploc": "^4", + "phpmd/phpmd": "dev-master", + "phpunit/phpunit": "^5.7", + "sebastian/phpcpd": "^3.0", + "squizlabs/php_codesniffer": "^3.0@dev" + }, + "time": "2019-10-06T11:29:25+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ] + }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "version_normalized": "1.7.6.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "time": "2020-02-14T08:15:52+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ] + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.14.1", + "version_normalized": "1.14.1.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "2383aad5689778470491581442aab38cec41bf1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2383aad5689778470491581442aab38cec41bf1d", + "reference": "2383aad5689778470491581442aab38cec41bf1d", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.2", + "php": "^7.2", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "time": "2020-07-19T09:51:35+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ] + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "time": "2020-06-29T06:28:15+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ] + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "time": "2019-04-30T12:38:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ] + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ] + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ] + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.0", + "version_normalized": "1.18.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2020-07-14T12:35:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ] + } +] diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/FUNDING.yml b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/FUNDING.yml new file mode 100755 index 0000000..d807a3f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: zipstream diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/ISSUE_TEMPLATE.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/ISSUE_TEMPLATE.md new file mode 100755 index 0000000..3c2e66d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,12 @@ +# Description of the problem + +Please be very descriptive and include as much details as possible. + +# Example code + +# Informations + +* ZipStream-PHP version: +* PHP version: + +Please include any supplemental information you deem relevant to this issue. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.gitignore b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.gitignore new file mode 100755 index 0000000..5210738 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.gitignore @@ -0,0 +1,6 @@ +clover.xml +composer.lock +coverage.clover +.idea +phpunit.xml +vendor diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.travis.yml b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.travis.yml new file mode 100755 index 0000000..12c8a64 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/.travis.yml @@ -0,0 +1,12 @@ +language: php +dist: trusty +sudo: false +php: + - 7.1 + - 7.2 + - 7.3 +install: composer install +script: ./vendor/bin/phpunit --coverage-clover=coverage.clover +after_script: + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover coverage.clover diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CHANGELOG.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CHANGELOG.md new file mode 100755 index 0000000..b1979ab --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CHANGELOG.md @@ -0,0 +1,51 @@ +# CHANGELOG for ZipStream-PHP + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [2.1.0] - 2020-06-01 +### Changed +- Don't execute ob_flush() when output buffering is not enabled (#152) +- Fix inconsistent return type on 32-bit systems (#149) Fix #144 +- Use mbstring polyfill (#151) +- Promote 7zip usage over unzip to avoid UTF-8 issues (#147) + +## [2.0.0] - 2020-02-22 +### Breaking change +- Only the self opened streams will be closed (#139) +If you were relying on ZipStream to close streams that the library didn't open, +you'll need to close them yourself now. + +### Changed +- Minor change to data descriptor (#136) + +## [1.2.0] - 2019-07-11 + +### Added +- Option to flush output buffer after every write (#122) + +## [1.1.0] - 2019-04-30 + +### Fixed +- Honor last-modified timestamps set via `ZipStream\Option\File::setTime()` (#106) +- Documentation regarding output of HTTP headers +- Test warnings with PHPUnit (#109) + +### Added +- Test for FileNotReadableException (#114) +- Size attribute to File options (#113) +- Tests on PHP 7.3 (#108) + +## [1.0.0] - 2019-04-17 + +### Breaking changes +- Mininum PHP version is now 7.1 +- Options are now passed to the ZipStream object via the Option\Archive object. See the wiki for available options and code examples + +### Added +- Add large file support with Zip64 headers + +### Changed +- Major refactoring and code cleanup diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CONTRIBUTING.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CONTRIBUTING.md new file mode 100755 index 0000000..f8ef5a5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# ZipStream Readme for Contributors +## Code styling +### Indention +For spaces are used to indent code. The convention is [K&R](http://en.wikipedia.org/wiki/Indent_style#K&R) + +### Comments +Double Slashes are used for an one line comment. + +Classes, Variables, Methods etc: + +```php +/** + * My comment + * + * @myanotation like @param etc. + */ +``` + +## Pull requests +Feel free to submit pull requests. + +## Testing +For every new feature please write a new PHPUnit test. + +Before every commit execute `./vendor/bin/phpunit` to check if your changes wrecked something: diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/LICENSE b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/LICENSE new file mode 100755 index 0000000..ebe7fe2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (C) 2007-2009 Paul Duncan +Copyright (C) 2014 Jonatan Männchen +Copyright (C) 2014 Jesse G. Donat +Copyright (C) 2018 Nicolas CARPi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/README.md new file mode 100755 index 0000000..c2e832b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/README.md @@ -0,0 +1,123 @@ +# ZipStream-PHP + +[![Build Status](https://travis-ci.org/maennchen/ZipStream-PHP.svg?branch=master)](https://travis-ci.org/maennchen/ZipStream-PHP) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/maennchen/ZipStream-PHP/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/maennchen/ZipStream-PHP/) +[![Code Coverage](https://scrutinizer-ci.com/g/maennchen/ZipStream-PHP/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/maennchen/ZipStream-PHP/) +[![Latest Stable Version](https://poser.pugx.org/maennchen/zipstream-php/v/stable)](https://packagist.org/packages/maennchen/zipstream-php) +[![Total Downloads](https://poser.pugx.org/maennchen/zipstream-php/downloads)](https://packagist.org/packages/maennchen/zipstream-php) +[![Financial Contributors on Open Collective](https://opencollective.com/zipstream/all/badge.svg?label=financial+contributors)](https://opencollective.com/zipstream) [![License](https://img.shields.io/github/license/maennchen/zipstream-php.svg)](LICENSE) + +## Overview + +A fast and simple streaming zip file downloader for PHP. Using this library will save you from having to write the Zip to disk. You can directly send it to the user, which is much faster. It can work with S3 buckets or any PSR7 Stream. + +Please see the [LICENSE](LICENSE) file for licensing and warranty information. + +## Installation + +Simply add a dependency on maennchen/zipstream-php to your project's composer.json file if you use Composer to manage the dependencies of your project. Use following command to add the package to your project's dependencies: + +```bash +composer require maennchen/zipstream-php +``` + +## Usage and options + +Here's a simple example: + +```php +// Autoload the dependencies +require 'vendor/autoload.php'; + +// enable output of HTTP headers +$options = new ZipStream\Option\Archive(); +$options->setSendHttpHeaders(true); + +// create a new zipstream object +$zip = new ZipStream\ZipStream('example.zip', $options); + +// create a file named 'hello.txt' +$zip->addFile('hello.txt', 'This is the contents of hello.txt'); + +// add a file named 'some_image.jpg' from a local file 'path/to/image.jpg' +$zip->addFileFromPath('some_image.jpg', 'path/to/image.jpg'); + +// add a file named 'goodbye.txt' from an open stream resource +$fp = tmpfile(); +fwrite($fp, 'The quick brown fox jumped over the lazy dog.'); +rewind($fp); +$zip->addFileFromStream('goodbye.txt', $fp); +fclose($fp); + +// finish the zip stream +$zip->finish(); +``` + +You can also add comments, modify file timestamps, and customize (or +disable) the HTTP headers. It is also possible to specify the storage method when adding files, +the current default storage method is 'deflate' i.e files are stored with Compression mode 0x08. + +See the [Wiki](https://github.com/maennchen/ZipStream-PHP/wiki) for details. + +## Known issue + +The native Mac OS archive extraction tool might not open archives in some conditions. A workaround is to disable the Zip64 feature with the option `$opt->setEnableZip64(false)`. This limits the archive to 4 Gb and 64k files but will allow Mac OS users to open them without issue. See #116. + +The linux `unzip` utility might not handle properly unicode characters. It is recommended to extract with another tool like [7-zip](https://www.7-zip.org/). See #146. + +## Upgrade to version 2.0.0 + +* Only the self opened streams will be closed (#139) +If you were relying on ZipStream to close streams that the library didn't open, +you'll need to close them yourself now. + +## Upgrade to version 1.0.0 + +* All options parameters to all function have been moved from an `array` to structured option objects. See [the wiki](https://github.com/maennchen/ZipStream-PHP/wiki/Available-options) for examples. +* The whole library has been refactored. The minimal PHP requirement has been raised to PHP 7.1. + +## Usage with Symfony and S3 + +You can find example code on [the wiki](https://github.com/maennchen/ZipStream-PHP/wiki/Symfony-example). + +## Contributing + +ZipStream-PHP is a collaborative project. Please take a look at the [CONTRIBUTING.md](CONTRIBUTING.md) file. + +## About the Authors + +* Paul Duncan - https://pablotron.org/ +* Jonatan Männchen - https://maennchen.dev +* Jesse G. Donat - https://donatstudios.com +* Nicolas CARPi - https://www.deltablot.com +* Nik Barham - https://www.brokencube.co.uk + +## Contributors + +### Code Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + +### Financial Contributors + +Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/zipstream/contribute)] + +#### Individuals + + + +#### Organizations + +Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/zipstream/contribute)] + + + + + + + + + + + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/composer.json new file mode 100755 index 0000000..103c78c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/composer.json @@ -0,0 +1,41 @@ +{ + "name": "maennchen/zipstream-php", + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": ["zip", "stream"], + "type": "library", + "license": "MIT", + "authors": [{ + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "require": { + "php": ">= 7.1", + "symfony/polyfill-mbstring": "^1.0", + "psr/http-message": "^1.0", + "myclabs/php-enum": "^1.5" + }, + "require-dev": { + "phpunit/phpunit": ">= 7.5", + "guzzlehttp/guzzle": ">= 6.3", + "ext-zip": "*", + "mikey179/vfsstream": "^1.6" + }, + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/phpunit.xml.dist b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/phpunit.xml.dist new file mode 100755 index 0000000..f6e7227 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/phpunit.xml.dist @@ -0,0 +1,17 @@ + + + + test + + + + + + + + + + src + + + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/psalm.xml b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/psalm.xml new file mode 100755 index 0000000..42f355b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/psalm.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Bigint.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Bigint.php new file mode 100755 index 0000000..52ccfd2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Bigint.php @@ -0,0 +1,172 @@ +fillBytes($value, 0, 8); + } + + /** + * Fill the bytes field with int + * + * @param int $value + * @param int $start + * @param int $count + * @return void + */ + protected function fillBytes(int $value, int $start, int $count): void + { + for ($i = 0; $i < $count; $i++) { + $this->bytes[$start + $i] = $i >= PHP_INT_SIZE ? 0 : $value & 0xFF; + $value >>= 8; + } + } + + /** + * Get an instance + * + * @param int $value + * @return Bigint + */ + public static function init(int $value = 0): self + { + return new self($value); + } + + /** + * Fill bytes from low to high + * + * @param int $low + * @param int $high + * @return Bigint + */ + public static function fromLowHigh(int $low, int $high): self + { + $bigint = new Bigint(); + $bigint->fillBytes($low, 0, 4); + $bigint->fillBytes($high, 4, 4); + return $bigint; + } + + /** + * Get high 32 + * + * @return int + */ + public function getHigh32(): int + { + return $this->getValue(4, 4); + } + + /** + * Get value from bytes array + * + * @param int $end + * @param int $length + * @return int + */ + public function getValue(int $end = 0, int $length = 8): int + { + $result = 0; + for ($i = $end + $length - 1; $i >= $end; $i--) { + $result <<= 8; + $result |= $this->bytes[$i]; + } + return $result; + } + + /** + * Get low FF + * + * @param bool $force + * @return float + */ + public function getLowFF(bool $force = false): float + { + if ($force || $this->isOver32()) { + return (float)0xFFFFFFFF; + } + return (float)$this->getLow32(); + } + + /** + * Check if is over 32 + * + * @param bool $force + * @return bool + */ + public function isOver32(bool $force = false): bool + { + // value 0xFFFFFFFF already needs a Zip64 header + return $force || + max(array_slice($this->bytes, 4, 4)) > 0 || + min(array_slice($this->bytes, 0, 4)) === 0xFF; + } + + /** + * Get low 32 + * + * @return int + */ + public function getLow32(): int + { + return $this->getValue(0, 4); + } + + /** + * Get hexadecimal + * + * @return string + */ + public function getHex64(): string + { + $result = '0x'; + for ($i = 7; $i >= 0; $i--) { + $result .= sprintf('%02X', $this->bytes[$i]); + } + return $result; + } + + /** + * Add + * + * @param Bigint $other + * @return Bigint + */ + public function add(Bigint $other): Bigint + { + $result = clone $this; + $overflow = false; + for ($i = 0; $i < 8; $i++) { + $result->bytes[$i] += $other->bytes[$i]; + if ($overflow) { + $result->bytes[$i]++; + $overflow = false; + } + if ($result->bytes[$i] & 0x100) { + $overflow = true; + $result->bytes[$i] &= 0xFF; + } + } + if ($overflow) { + throw new OverflowException; + } + return $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/DeflateStream.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/DeflateStream.php new file mode 100755 index 0000000..d6c2728 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/DeflateStream.php @@ -0,0 +1,70 @@ +filter) { + $this->removeDeflateFilter(); + $this->seek(0); + $this->addDeflateFilter($this->options); + } else { + rewind($this->stream); + } + } + + /** + * Remove the deflate filter + * + * @return void + */ + public function removeDeflateFilter(): void + { + if (!$this->filter) { + return; + } + stream_filter_remove($this->filter); + $this->filter = null; + } + + /** + * Add a deflate filter + * + * @param Option\File $options + * @return void + */ + public function addDeflateFilter(Option\File $options): void + { + $this->options = $options; + // parameter 4 for stream_filter_append expects array + // so we convert the option object in an array + $optionsArr = [ + 'comment' => $options->getComment(), + 'method' => $options->getMethod(), + 'deflateLevel' => $options->getDeflateLevel(), + 'time' => $options->getTime() + ]; + $this->filter = stream_filter_append( + $this->stream, + 'zlib.deflate', + STREAM_FILTER_READ, + $optionsArr + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Exception.php new file mode 100755 index 0000000..18ccfbb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Exception.php @@ -0,0 +1,11 @@ +zip = $zip; + + $this->name = $name; + $this->opt = $opt ?: new FileOptions(); + $this->method = $this->opt->getMethod(); + $this->version = Version::STORE(); + $this->ofs = new Bigint(); + } + + public function processPath(string $path): void + { + if (!is_readable($path)) { + if (!file_exists($path)) { + throw new FileNotFoundException($path); + } + throw new FileNotReadableException($path); + } + if ($this->zip->isLargeFile($path) === false) { + $data = file_get_contents($path); + $this->processData($data); + } else { + $this->method = $this->zip->opt->getLargeFileMethod(); + + $stream = new DeflateStream(fopen($path, 'rb')); + $this->processStream($stream); + $stream->close(); + } + } + + public function processData(string $data): void + { + $this->len = new Bigint(strlen($data)); + $this->crc = crc32($data); + + // compress data if needed + if ($this->method->equals(Method::DEFLATE())) { + $data = gzdeflate($data); + } + + $this->zlen = new Bigint(strlen($data)); + $this->addFileHeader(); + $this->zip->send($data); + $this->addFileFooter(); + } + + /** + * Create and send zip header for this file. + * + * @return void + * @throws \ZipStream\Exception\EncodingException + */ + public function addFileHeader(): void + { + $name = static::filterFilename($this->name); + + // calculate name length + $nameLength = strlen($name); + + // create dos timestamp + $time = static::dosTime($this->opt->getTime()->getTimestamp()); + + $comment = $this->opt->getComment(); + + if (!mb_check_encoding($name, 'ASCII') || + !mb_check_encoding($comment, 'ASCII')) { + // Sets Bit 11: Language encoding flag (EFS). If this bit is set, + // the filename and comment fields for this file + // MUST be encoded using UTF-8. (see APPENDIX D) + if (!mb_check_encoding($name, 'UTF-8') || + !mb_check_encoding($comment, 'UTF-8')) { + throw new EncodingException( + 'File name and comment should use UTF-8 ' . + 'if one of them does not fit into ASCII range.' + ); + } + $this->bits |= self::BIT_EFS_UTF8; + } + + if ($this->method->equals(Method::DEFLATE())) { + $this->version = Version::DEFLATE(); + } + + $force = (boolean)($this->bits & self::BIT_ZERO_HEADER) && + $this->zip->opt->isEnableZip64(); + + $footer = $this->buildZip64ExtraBlock($force); + + // If this file will start over 4GB limit in ZIP file, + // CDR record will have to use Zip64 extension to describe offset + // to keep consistency we use the same value here + if ($this->zip->ofs->isOver32()) { + $this->version = Version::ZIP64(); + } + + $fields = [ + ['V', ZipStream::FILE_HEADER_SIGNATURE], + ['v', $this->version->getValue()], // Version needed to Extract + ['v', $this->bits], // General purpose bit flags - data descriptor flag set + ['v', $this->method->getValue()], // Compression method + ['V', $time], // Timestamp (DOS Format) + ['V', $this->crc], // CRC32 of data (0 -> moved to data descriptor footer) + ['V', $this->zlen->getLowFF($force)], // Length of compressed data (forced to 0xFFFFFFFF for zero header) + ['V', $this->len->getLowFF($force)], // Length of original data (forced to 0xFFFFFFFF for zero header) + ['v', $nameLength], // Length of filename + ['v', strlen($footer)], // Extra data (see above) + ]; + + // pack fields and calculate "total" length + $header = ZipStream::packFields($fields); + + // print header and filename + $data = $header . $name . $footer; + $this->zip->send($data); + + // save header length + $this->hlen = Bigint::init(strlen($data)); + } + + /** + * Strip characters that are not legal in Windows filenames + * to prevent compatibility issues + * + * @param string $filename Unprocessed filename + * @return string + */ + public static function filterFilename(string $filename): string + { + // strip leading slashes from file name + // (fixes bug in windows archive viewer) + $filename = preg_replace('/^\\/+/', '', $filename); + + return str_replace(['\\', ':', '*', '?', '"', '<', '>', '|'], '_', $filename); + } + + /** + * Convert a UNIX timestamp to a DOS timestamp. + * + * @param int $when + * @return int DOS Timestamp + */ + final protected static function dosTime(int $when): int + { + // get date array for timestamp + $d = getdate($when); + + // set lower-bound on dates + if ($d['year'] < 1980) { + $d = array( + 'year' => 1980, + 'mon' => 1, + 'mday' => 1, + 'hours' => 0, + 'minutes' => 0, + 'seconds' => 0 + ); + } + + // remove extra years from 1980 + $d['year'] -= 1980; + + // return date string + return + ($d['year'] << 25) | + ($d['mon'] << 21) | + ($d['mday'] << 16) | + ($d['hours'] << 11) | + ($d['minutes'] << 5) | + ($d['seconds'] >> 1); + } + + protected function buildZip64ExtraBlock(bool $force = false): string + { + + $fields = []; + if ($this->len->isOver32($force)) { + $fields[] = ['P', $this->len]; // Length of original data + } + + if ($this->len->isOver32($force)) { + $fields[] = ['P', $this->zlen]; // Length of compressed data + } + + if ($this->ofs->isOver32()) { + $fields[] = ['P', $this->ofs]; // Offset of local header record + } + + if (!empty($fields)) { + if (!$this->zip->opt->isEnableZip64()) { + throw new OverflowException(); + } + + array_unshift( + $fields, + ['v', 0x0001], // 64 bit extension + ['v', count($fields) * 8] // Length of data block + ); + $this->version = Version::ZIP64(); + } + + return ZipStream::packFields($fields); + } + + /** + * Create and send data descriptor footer for this file. + * + * @return void + */ + + public function addFileFooter(): void + { + + if ($this->bits & self::BIT_ZERO_HEADER) { + // compressed and uncompressed size + $sizeFormat = 'V'; + if ($this->zip->opt->isEnableZip64()) { + $sizeFormat = 'P'; + } + $fields = [ + ['V', ZipStream::DATA_DESCRIPTOR_SIGNATURE], + ['V', $this->crc], // CRC32 + [$sizeFormat, $this->zlen], // Length of compressed data + [$sizeFormat, $this->len], // Length of original data + ]; + + $footer = ZipStream::packFields($fields); + $this->zip->send($footer); + } else { + $footer = ''; + } + $this->totalLength = $this->hlen->add($this->zlen)->add(Bigint::init(strlen($footer))); + $this->zip->addToCdr($this); + } + + public function processStream(StreamInterface $stream): void + { + $this->zlen = new Bigint(); + $this->len = new Bigint(); + + if ($this->zip->opt->isZeroHeader()) { + $this->processStreamWithZeroHeader($stream); + } else { + $this->processStreamWithComputedHeader($stream); + } + } + + protected function processStreamWithZeroHeader(StreamInterface $stream): void + { + $this->bits |= self::BIT_ZERO_HEADER; + $this->addFileHeader(); + $this->readStream($stream, self::COMPUTE | self::SEND); + $this->addFileFooter(); + } + + protected function readStream(StreamInterface $stream, ?int $options = null): void + { + $this->deflateInit(); + $total = 0; + $size = $this->opt->getSize(); + while (!$stream->eof() && ($size === 0 || $total < $size)) { + $data = $stream->read(self::CHUNKED_READ_BLOCK_SIZE); + $total += strlen($data); + if ($size > 0 && $total > $size) { + $data = substr($data, 0 , strlen($data)-($total - $size)); + } + $this->deflateData($stream, $data, $options); + if ($options & self::SEND) { + $this->zip->send($data); + } + } + $this->deflateFinish($options); + } + + protected function deflateInit(): void + { + $this->hash = hash_init(self::HASH_ALGORITHM); + if ($this->method->equals(Method::DEFLATE())) { + $this->deflate = deflate_init( + ZLIB_ENCODING_RAW, + ['level' => $this->opt->getDeflateLevel()] + ); + } + } + + protected function deflateData(StreamInterface $stream, string &$data, ?int $options = null): void + { + if ($options & self::COMPUTE) { + $this->len = $this->len->add(Bigint::init(strlen($data))); + hash_update($this->hash, $data); + } + if ($this->deflate) { + $data = deflate_add( + $this->deflate, + $data, + $stream->eof() + ? ZLIB_FINISH + : ZLIB_NO_FLUSH + ); + } + if ($options & self::COMPUTE) { + $this->zlen = $this->zlen->add(Bigint::init(strlen($data))); + } + } + + protected function deflateFinish(?int $options = null): void + { + if ($options & self::COMPUTE) { + $this->crc = hexdec(hash_final($this->hash)); + } + } + + protected function processStreamWithComputedHeader(StreamInterface $stream): void + { + $this->readStream($stream, self::COMPUTE); + $stream->rewind(); + + // incremental compression with deflate_add + // makes this second read unnecessary + // but it is only available from PHP 7.0 + if (!$this->deflate && $stream instanceof DeflateStream && $this->method->equals(Method::DEFLATE())) { + $stream->addDeflateFilter($this->opt); + $this->zlen = new Bigint(); + while (!$stream->eof()) { + $data = $stream->read(self::CHUNKED_READ_BLOCK_SIZE); + $this->zlen = $this->zlen->add(Bigint::init(strlen($data))); + } + $stream->rewind(); + } + + $this->addFileHeader(); + $this->readStream($stream, self::SEND); + $this->addFileFooter(); + } + + /** + * Send CDR record for specified file. + * + * @return string + */ + public function getCdrFile(): string + { + $name = static::filterFilename($this->name); + + // get attributes + $comment = $this->opt->getComment(); + + // get dos timestamp + $time = static::dosTime($this->opt->getTime()->getTimestamp()); + + $footer = $this->buildZip64ExtraBlock(); + + $fields = [ + ['V', ZipStream::CDR_FILE_SIGNATURE], // Central file header signature + ['v', ZipStream::ZIP_VERSION_MADE_BY], // Made by version + ['v', $this->version->getValue()], // Extract by version + ['v', $this->bits], // General purpose bit flags - data descriptor flag set + ['v', $this->method->getValue()], // Compression method + ['V', $time], // Timestamp (DOS Format) + ['V', $this->crc], // CRC32 + ['V', $this->zlen->getLowFF()], // Compressed Data Length + ['V', $this->len->getLowFF()], // Original Data Length + ['v', strlen($name)], // Length of filename + ['v', strlen($footer)], // Extra data len (see above) + ['v', strlen($comment)], // Length of comment + ['v', 0], // Disk number + ['v', 0], // Internal File Attributes + ['V', 32], // External File Attributes + ['V', $this->ofs->getLowFF()] // Relative offset of local header + ]; + + // pack fields, then append name and comment + $header = ZipStream::packFields($fields); + + return $header . $name . $footer . $comment; + } + + /** + * @return Bigint + */ + public function getTotalLength(): Bigint + { + return $this->totalLength; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Archive.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Archive.php new file mode 100755 index 0000000..b6b95cc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Archive.php @@ -0,0 +1,261 @@ + 4 GB or file count > 64k) + * + * @var bool + */ + private $enableZip64 = true; + /** + * Enable streaming files with single read where + * general purpose bit 3 indicates local file header + * contain zero values in crc and size fields, + * these appear only after file contents + * in data descriptor block. + * + * @var bool + */ + private $zeroHeader = false; + /** + * Enable reading file stat for determining file size. + * When a 32-bit system reads file size that is + * over 2 GB, invalid value appears in file size + * due to integer overflow. Should be disabled on + * 32-bit systems with method addFileFromPath + * if any file may exceed 2 GB. In this case file + * will be read in blocks and correct size will be + * determined from content. + * + * @var bool + */ + private $statFiles = true; + /** + * Enable flush after every write to output stream. + * @var bool + */ + private $flushOutput = false; + /** + * HTTP Content-Disposition. Defaults to + * 'attachment', where + * FILENAME is the specified filename. + * + * Note that this does nothing if you are + * not sending HTTP headers. + * + * @var string + */ + private $contentDisposition = 'attachment'; + /** + * Note that this does nothing if you are + * not sending HTTP headers. + * + * @var string + */ + private $contentType = 'application/x-zip'; + /** + * @var int + */ + private $deflateLevel = 6; + + /** + * @var resource + */ + private $outputStream; + + /** + * Options constructor. + */ + public function __construct() + { + $this->largeFileMethod = Method::STORE(); + $this->outputStream = fopen('php://output', 'wb'); + } + + public function getComment(): string + { + return $this->comment; + } + + public function setComment(string $comment): void + { + $this->comment = $comment; + } + + public function getLargeFileSize(): int + { + return $this->largeFileSize; + } + + public function setLargeFileSize(int $largeFileSize): void + { + $this->largeFileSize = $largeFileSize; + } + + public function getLargeFileMethod(): Method + { + return $this->largeFileMethod; + } + + public function setLargeFileMethod(Method $largeFileMethod): void + { + $this->largeFileMethod = $largeFileMethod; + } + + public function isSendHttpHeaders(): bool + { + return $this->sendHttpHeaders; + } + + public function setSendHttpHeaders(bool $sendHttpHeaders): void + { + $this->sendHttpHeaders = $sendHttpHeaders; + } + + public function getHttpHeaderCallback(): Callable + { + return $this->httpHeaderCallback; + } + + public function setHttpHeaderCallback(Callable $httpHeaderCallback): void + { + $this->httpHeaderCallback = $httpHeaderCallback; + } + + public function isEnableZip64(): bool + { + return $this->enableZip64; + } + + public function setEnableZip64(bool $enableZip64): void + { + $this->enableZip64 = $enableZip64; + } + + public function isZeroHeader(): bool + { + return $this->zeroHeader; + } + + public function setZeroHeader(bool $zeroHeader): void + { + $this->zeroHeader = $zeroHeader; + } + + public function isFlushOutput(): bool + { + return $this->flushOutput; + } + + public function setFlushOutput(bool $flushOutput): void + { + $this->flushOutput = $flushOutput; + } + + public function isStatFiles(): bool + { + return $this->statFiles; + } + + public function setStatFiles(bool $statFiles): void + { + $this->statFiles = $statFiles; + } + + public function getContentDisposition(): string + { + return $this->contentDisposition; + } + + public function setContentDisposition(string $contentDisposition): void + { + $this->contentDisposition = $contentDisposition; + } + + public function getContentType(): string + { + return $this->contentType; + } + + public function setContentType(string $contentType): void + { + $this->contentType = $contentType; + } + + /** + * @return resource + */ + public function getOutputStream() + { + return $this->outputStream; + } + + /** + * @param resource $outputStream + */ + public function setOutputStream($outputStream): void + { + $this->outputStream = $outputStream; + } + + /** + * @return int + */ + public function getDeflateLevel(): int + { + return $this->deflateLevel; + } + + /** + * @param int $deflateLevel + */ + public function setDeflateLevel(int $deflateLevel): void + { + $this->deflateLevel = $deflateLevel; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/File.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/File.php new file mode 100755 index 0000000..7fd29ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/File.php @@ -0,0 +1,116 @@ +deflateLevel = $this->deflateLevel ?: $archiveOptions->getDeflateLevel(); + $this->time = $this->time ?: new DateTime(); + } + + /** + * @return string + */ + public function getComment(): string + { + return $this->comment; + } + + /** + * @param string $comment + */ + public function setComment(string $comment): void + { + $this->comment = $comment; + } + + /** + * @return Method + */ + public function getMethod(): Method + { + return $this->method ?: Method::DEFLATE(); + } + + /** + * @param Method $method + */ + public function setMethod(Method $method): void + { + $this->method = $method; + } + + /** + * @return int + */ + public function getDeflateLevel(): int + { + return $this->deflateLevel ?: Archive::DEFAULT_DEFLATE_LEVEL; + } + + /** + * @param int $deflateLevel + */ + public function setDeflateLevel(int $deflateLevel): void + { + $this->deflateLevel = $deflateLevel; + } + + /** + * @return DateTime + */ + public function getTime(): DateTime + { + return $this->time; + } + + /** + * @param DateTime $time + */ + public function setTime(DateTime $time): void + { + $this->time = $time; + } + + /** + * @return int + */ + public function getSize(): int + { + return $this->size; + } + + /** + * @param int $size + */ + public function setSize(int $size): void + { + $this->size = $size; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Method.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Method.php new file mode 100755 index 0000000..bbec84c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/Option/Method.php @@ -0,0 +1,19 @@ +stream = $stream; + } + + /** + * Closes the stream and any underlying resources. + * + * @return void + */ + public function close(): void + { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + + /** + * Separates any underlying resources from the stream. + * + * After the stream has been detached, the stream is in an unusable state. + * + * @return resource|null Underlying PHP stream, if any + */ + public function detach() + { + $result = $this->stream; + $this->stream = null; + return $result; + } + + /** + * Reads all data from the stream into a string, from the beginning to end. + * + * This method MUST attempt to seek to the beginning of the stream before + * reading data and read the stream until the end is reached. + * + * Warning: This could attempt to load a large amount of data into memory. + * + * This method MUST NOT raise an exception in order to conform with PHP's + * string casting operations. + * + * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring + * @return string + */ + public function __toString(): string + { + try { + $this->seek(0); + } catch (\RuntimeException $e) {} + return (string) stream_get_contents($this->stream); + } + + /** + * Seek to a position in the stream. + * + * @link http://www.php.net/manual/en/function.fseek.php + * @param int $offset Stream offset + * @param int $whence Specifies how the cursor position will be calculated + * based on the seek offset. Valid values are identical to the built-in + * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to + * offset bytes SEEK_CUR: Set position to current location plus offset + * SEEK_END: Set position to end-of-stream plus offset. + * @throws \RuntimeException on failure. + */ + public function seek($offset, $whence = SEEK_SET): void + { + if (!$this->isSeekable()) { + throw new RuntimeException; + } + if (fseek($this->stream, $offset, $whence) !== 0) { + throw new RuntimeException; + } + } + + /** + * Returns whether or not the stream is seekable. + * + * @return bool + */ + public function isSeekable(): bool + { + return (bool)$this->getMetadata('seekable'); + } + + /** + * Get stream metadata as an associative array or retrieve a specific key. + * + * The keys returned are identical to the keys returned from PHP's + * stream_get_meta_data() function. + * + * @link http://php.net/manual/en/function.stream-get-meta-data.php + * @param string $key Specific metadata to retrieve. + * @return array|mixed|null Returns an associative array if no key is + * provided. Returns a specific key value if a key is provided and the + * value is found, or null if the key is not found. + */ + public function getMetadata($key = null) + { + $metadata = stream_get_meta_data($this->stream); + return $key !== null ? @$metadata[$key] : $metadata; + } + + /** + * Get the size of the stream if known. + * + * @return int|null Returns the size in bytes if known, or null if unknown. + */ + public function getSize(): ?int + { + $stats = fstat($this->stream); + return $stats['size']; + } + + /** + * Returns the current position of the file read/write pointer + * + * @return int Position of the file pointer + * @throws \RuntimeException on error. + */ + public function tell(): int + { + $position = ftell($this->stream); + if ($position === false) { + throw new RuntimeException; + } + return $position; + } + + /** + * Returns true if the stream is at the end of the stream. + * + * @return bool + */ + public function eof(): bool + { + return feof($this->stream); + } + + /** + * Seek to the beginning of the stream. + * + * If the stream is not seekable, this method will raise an exception; + * otherwise, it will perform a seek(0). + * + * @see seek() + * @link http://www.php.net/manual/en/function.fseek.php + * @throws \RuntimeException on failure. + */ + public function rewind(): void + { + $this->seek(0); + } + + /** + * Write data to the stream. + * + * @param string $string The string that is to be written. + * @return int Returns the number of bytes written to the stream. + * @throws \RuntimeException on failure. + */ + public function write($string): int + { + if (!$this->isWritable()) { + throw new RuntimeException; + } + if (fwrite($this->stream, $string) === false) { + throw new RuntimeException; + } + return \mb_strlen($string); + } + + /** + * Returns whether or not the stream is writable. + * + * @return bool + */ + public function isWritable(): bool + { + return preg_match('/[waxc+]/', $this->getMetadata('mode')) === 1; + } + + /** + * Read data from the stream. + * + * @param int $length Read up to $length bytes from the object and return + * them. Fewer than $length bytes may be returned if underlying stream + * call returns fewer bytes. + * @return string Returns the data read from the stream, or an empty string + * if no bytes are available. + * @throws \RuntimeException if an error occurs. + */ + public function read($length): string + { + if (!$this->isReadable()) { + throw new RuntimeException; + } + $result = fread($this->stream, $length); + if ($result === false) { + throw new RuntimeException; + } + return $result; + } + + /** + * Returns whether or not the stream is readable. + * + * @return bool + */ + public function isReadable(): bool + { + return preg_match('/[r+]/', $this->getMetadata('mode')) === 1; + } + + /** + * Returns the remaining contents in a string + * + * @return string + * @throws \RuntimeException if unable to read or an error occurs while + * reading. + */ + public function getContents(): string + { + if (!$this->isReadable()) { + throw new RuntimeException; + } + $result = stream_get_contents($this->stream); + if ($result === false) { + throw new RuntimeException; + } + return $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/ZipStream.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/ZipStream.php new file mode 100755 index 0000000..e83038c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/src/ZipStream.php @@ -0,0 +1,599 @@ +addFile('some_file.gif', $data); + * + * * add second file + * $data = file_get_contents('some_file.gif'); + * $zip->addFile('another_file.png', $data); + * + * 3. Finish the zip stream: + * + * $zip->finish(); + * + * You can also add an archive comment, add comments to individual files, + * and adjust the timestamp of files. See the API documentation for each + * method below for additional information. + * + * Example: + * + * // create a new zip stream object + * $zip = new ZipStream('some_files.zip'); + * + * // list of local files + * $files = array('foo.txt', 'bar.jpg'); + * + * // read and add each file to the archive + * foreach ($files as $path) + * $zip->addFile($path, file_get_contents($path)); + * + * // write archive footer to stream + * $zip->finish(); + */ +class ZipStream +{ + /** + * This number corresponds to the ZIP version/OS used (2 bytes) + * From: https://www.iana.org/assignments/media-types/application/zip + * The upper byte (leftmost one) indicates the host system (OS) for the + * file. Software can use this information to determine + * the line record format for text files etc. The current + * mappings are: + * + * 0 - MS-DOS and OS/2 (F.A.T. file systems) + * 1 - Amiga 2 - VAX/VMS + * 3 - *nix 4 - VM/CMS + * 5 - Atari ST 6 - OS/2 H.P.F.S. + * 7 - Macintosh 8 - Z-System + * 9 - CP/M 10 thru 255 - unused + * + * The lower byte (rightmost one) indicates the version number of the + * software used to encode the file. The value/10 + * indicates the major version number, and the value + * mod 10 is the minor version number. + * Here we are using 6 for the OS, indicating OS/2 H.P.F.S. + * to prevent file permissions issues upon extract (see #84) + * 0x603 is 00000110 00000011 in binary, so 6 and 3 + */ + const ZIP_VERSION_MADE_BY = 0x603; + + /** + * The following signatures end with 0x4b50, which in ASCII is PK, + * the initials of the inventor Phil Katz. + * See https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers + */ + const FILE_HEADER_SIGNATURE = 0x04034b50; + const CDR_FILE_SIGNATURE = 0x02014b50; + const CDR_EOF_SIGNATURE = 0x06054b50; + const DATA_DESCRIPTOR_SIGNATURE = 0x08074b50; + const ZIP64_CDR_EOF_SIGNATURE = 0x06064b50; + const ZIP64_CDR_LOCATOR_SIGNATURE = 0x07064b50; + + /** + * Global Options + * + * @var ArchiveOptions + */ + public $opt; + + /** + * @var array + */ + public $files = []; + + /** + * @var Bigint + */ + public $cdr_ofs; + + /** + * @var Bigint + */ + public $ofs; + + /** + * @var bool + */ + protected $need_headers; + + /** + * @var null|String + */ + protected $output_name; + + /** + * Create a new ZipStream object. + * + * Parameters: + * + * @param String $name - Name of output file (optional). + * @param ArchiveOptions $opt - Archive Options + * + * Large File Support: + * + * By default, the method addFileFromPath() will send send files + * larger than 20 megabytes along raw rather than attempting to + * compress them. You can change both the maximum size and the + * compression behavior using the largeFile* options above, with the + * following caveats: + * + * * For "small" files (e.g. files smaller than largeFileSize), the + * memory use can be up to twice that of the actual file. In other + * words, adding a 10 megabyte file to the archive could potentially + * occupy 20 megabytes of memory. + * + * * Enabling compression on large files (e.g. files larger than + * large_file_size) is extremely slow, because ZipStream has to pass + * over the large file once to calculate header information, and then + * again to compress and send the actual data. + * + * Examples: + * + * // create a new zip file named 'foo.zip' + * $zip = new ZipStream('foo.zip'); + * + * // create a new zip file named 'bar.zip' with a comment + * $opt->setComment = 'this is a comment for the zip file.'; + * $zip = new ZipStream('bar.zip', $opt); + * + * Notes: + * + * In order to let this library send HTTP headers, a filename must be given + * _and_ the option `sendHttpHeaders` must be `true`. This behavior is to + * allow software to send its own headers (including the filename), and + * still use this library. + */ + public function __construct(?string $name = null, ?ArchiveOptions $opt = null) + { + $this->opt = $opt ?: new ArchiveOptions(); + + $this->output_name = $name; + $this->need_headers = $name && $this->opt->isSendHttpHeaders(); + + $this->cdr_ofs = new Bigint(); + $this->ofs = new Bigint(); + } + + /** + * addFile + * + * Add a file to the archive. + * + * @param String $name - path of file in archive (including directory). + * @param String $data - contents of file + * @param FileOptions $options + * + * File Options: + * time - Last-modified timestamp (seconds since the epoch) of + * this file. Defaults to the current time. + * comment - Comment related to this file. + * method - Storage method for file ("store" or "deflate") + * + * Examples: + * + * // add a file named 'foo.txt' + * $data = file_get_contents('foo.txt'); + * $zip->addFile('foo.txt', $data); + * + * // add a file named 'bar.jpg' with a comment and a last-modified + * // time of two hours ago + * $data = file_get_contents('bar.jpg'); + * $opt->setTime = time() - 2 * 3600; + * $opt->setComment = 'this is a comment about bar.jpg'; + * $zip->addFile('bar.jpg', $data, $opt); + */ + public function addFile(string $name, string $data, ?FileOptions $options = null): void + { + $options = $options ?: new FileOptions(); + $options->defaultTo($this->opt); + + $file = new File($this, $name, $options); + $file->processData($data); + } + + /** + * addFileFromPath + * + * Add a file at path to the archive. + * + * Note that large files may be compressed differently than smaller + * files; see the "Large File Support" section above for more + * information. + * + * @param String $name - name of file in archive (including directory path). + * @param String $path - path to file on disk (note: paths should be encoded using + * UNIX-style forward slashes -- e.g '/path/to/some/file'). + * @param FileOptions $options + * + * File Options: + * time - Last-modified timestamp (seconds since the epoch) of + * this file. Defaults to the current time. + * comment - Comment related to this file. + * method - Storage method for file ("store" or "deflate") + * + * Examples: + * + * // add a file named 'foo.txt' from the local file '/tmp/foo.txt' + * $zip->addFileFromPath('foo.txt', '/tmp/foo.txt'); + * + * // add a file named 'bigfile.rar' from the local file + * // '/usr/share/bigfile.rar' with a comment and a last-modified + * // time of two hours ago + * $path = '/usr/share/bigfile.rar'; + * $opt->setTime = time() - 2 * 3600; + * $opt->setComment = 'this is a comment about bar.jpg'; + * $zip->addFileFromPath('bigfile.rar', $path, $opt); + * + * @return void + * @throws \ZipStream\Exception\FileNotFoundException + * @throws \ZipStream\Exception\FileNotReadableException + */ + public function addFileFromPath(string $name, string $path, ?FileOptions $options = null): void + { + $options = $options ?: new FileOptions(); + $options->defaultTo($this->opt); + + $file = new File($this, $name, $options); + $file->processPath($path); + } + + /** + * addFileFromStream + * + * Add an open stream to the archive. + * + * @param String $name - path of file in archive (including directory). + * @param resource $stream - contents of file as a stream resource + * @param FileOptions $options + * + * File Options: + * time - Last-modified timestamp (seconds since the epoch) of + * this file. Defaults to the current time. + * comment - Comment related to this file. + * + * Examples: + * + * // create a temporary file stream and write text to it + * $fp = tmpfile(); + * fwrite($fp, 'The quick brown fox jumped over the lazy dog.'); + * + * // add a file named 'streamfile.txt' from the content of the stream + * $x->addFileFromStream('streamfile.txt', $fp); + * + * @return void + */ + public function addFileFromStream(string $name, $stream, ?FileOptions $options = null): void + { + $options = $options ?: new FileOptions(); + $options->defaultTo($this->opt); + + $file = new File($this, $name, $options); + $file->processStream(new DeflateStream($stream)); + } + + /** + * addFileFromPsr7Stream + * + * Add an open stream to the archive. + * + * @param String $name - path of file in archive (including directory). + * @param StreamInterface $stream - contents of file as a stream resource + * @param FileOptions $options + * + * File Options: + * time - Last-modified timestamp (seconds since the epoch) of + * this file. Defaults to the current time. + * comment - Comment related to this file. + * + * Examples: + * + * // create a temporary file stream and write text to it + * $fp = tmpfile(); + * fwrite($fp, 'The quick brown fox jumped over the lazy dog.'); + * + * // add a file named 'streamfile.txt' from the content of the stream + * $x->addFileFromPsr7Stream('streamfile.txt', $fp); + * + * @return void + */ + public function addFileFromPsr7Stream( + string $name, + StreamInterface $stream, + ?FileOptions $options = null + ): void { + $options = $options ?: new FileOptions(); + $options->defaultTo($this->opt); + + $file = new File($this, $name, $options); + $file->processStream($stream); + } + + /** + * finish + * + * Write zip footer to stream. + * + * Example: + * + * // add a list of files to the archive + * $files = array('foo.txt', 'bar.jpg'); + * foreach ($files as $path) + * $zip->addFile($path, file_get_contents($path)); + * + * // write footer to stream + * $zip->finish(); + * @return void + * + * @throws OverflowException + */ + public function finish(): void + { + // add trailing cdr file records + foreach ($this->files as $cdrFile) { + $this->send($cdrFile); + $this->cdr_ofs = $this->cdr_ofs->add(Bigint::init(strlen($cdrFile))); + } + + // Add 64bit headers (if applicable) + if (count($this->files) >= 0xFFFF || + $this->cdr_ofs->isOver32() || + $this->ofs->isOver32()) { + if (!$this->opt->isEnableZip64()) { + throw new OverflowException(); + } + + $this->addCdr64Eof(); + $this->addCdr64Locator(); + } + + // add trailing cdr eof record + $this->addCdrEof(); + + // The End + $this->clear(); + } + + /** + * Send ZIP64 CDR EOF (Central Directory Record End-of-File) record. + * + * @return void + */ + protected function addCdr64Eof(): void + { + $num_files = count($this->files); + $cdr_length = $this->cdr_ofs; + $cdr_offset = $this->ofs; + + $fields = [ + ['V', static::ZIP64_CDR_EOF_SIGNATURE], // ZIP64 end of central file header signature + ['P', 44], // Length of data below this header (length of block - 12) = 44 + ['v', static::ZIP_VERSION_MADE_BY], // Made by version + ['v', Version::ZIP64], // Extract by version + ['V', 0x00], // disk number + ['V', 0x00], // no of disks + ['P', $num_files], // no of entries on disk + ['P', $num_files], // no of entries in cdr + ['P', $cdr_length], // CDR size + ['P', $cdr_offset], // CDR offset + ]; + + $ret = static::packFields($fields); + $this->send($ret); + } + + /** + * Create a format string and argument list for pack(), then call + * pack() and return the result. + * + * @param array $fields + * @return string + */ + public static function packFields(array $fields): string + { + $fmt = ''; + $args = []; + + // populate format string and argument list + foreach ($fields as [$format, $value]) { + if ($format === 'P') { + $fmt .= 'VV'; + if ($value instanceof Bigint) { + $args[] = $value->getLow32(); + $args[] = $value->getHigh32(); + } else { + $args[] = $value; + $args[] = 0; + } + } else { + if ($value instanceof Bigint) { + $value = $value->getLow32(); + } + $fmt .= $format; + $args[] = $value; + } + } + + // prepend format string to argument list + array_unshift($args, $fmt); + + // build output string from header and compressed data + return pack(...$args); + } + + /** + * Send string, sending HTTP headers if necessary. + * Flush output after write if configure option is set. + * + * @param String $str + * @return void + */ + public function send(string $str): void + { + if ($this->need_headers) { + $this->sendHttpHeaders(); + } + $this->need_headers = false; + + fwrite($this->opt->getOutputStream(), $str); + + if ($this->opt->isFlushOutput()) { + // flush output buffer if it is on and flushable + $status = ob_get_status(); + if (isset($status['flags']) && ($status['flags'] & PHP_OUTPUT_HANDLER_FLUSHABLE)) { + ob_flush(); + } + + // Flush system buffers after flushing userspace output buffer + flush(); + } + } + + /** + * Send HTTP headers for this stream. + * + * @return void + */ + protected function sendHttpHeaders(): void + { + // grab content disposition + $disposition = $this->opt->getContentDisposition(); + + if ($this->output_name) { + // Various different browsers dislike various characters here. Strip them all for safety. + $safe_output = trim(str_replace(['"', "'", '\\', ';', "\n", "\r"], '', $this->output_name)); + + // Check if we need to UTF-8 encode the filename + $urlencoded = rawurlencode($safe_output); + $disposition .= "; filename*=UTF-8''{$urlencoded}"; + } + + $headers = array( + 'Content-Type' => $this->opt->getContentType(), + 'Content-Disposition' => $disposition, + 'Pragma' => 'public', + 'Cache-Control' => 'public, must-revalidate', + 'Content-Transfer-Encoding' => 'binary' + ); + + $call = $this->opt->getHttpHeaderCallback(); + foreach ($headers as $key => $val) { + $call("$key: $val"); + } + } + + /** + * Send ZIP64 CDR Locator (Central Directory Record Locator) record. + * + * @return void + */ + protected function addCdr64Locator(): void + { + $cdr_offset = $this->ofs->add($this->cdr_ofs); + + $fields = [ + ['V', static::ZIP64_CDR_LOCATOR_SIGNATURE], // ZIP64 end of central file header signature + ['V', 0x00], // Disc number containing CDR64EOF + ['P', $cdr_offset], // CDR offset + ['V', 1], // Total number of disks + ]; + + $ret = static::packFields($fields); + $this->send($ret); + } + + /** + * Send CDR EOF (Central Directory Record End-of-File) record. + * + * @return void + */ + protected function addCdrEof(): void + { + $num_files = count($this->files); + $cdr_length = $this->cdr_ofs; + $cdr_offset = $this->ofs; + + // grab comment (if specified) + $comment = $this->opt->getComment(); + + $fields = [ + ['V', static::CDR_EOF_SIGNATURE], // end of central file header signature + ['v', 0x00], // disk number + ['v', 0x00], // no of disks + ['v', min($num_files, 0xFFFF)], // no of entries on disk + ['v', min($num_files, 0xFFFF)], // no of entries in cdr + ['V', $cdr_length->getLowFF()], // CDR size + ['V', $cdr_offset->getLowFF()], // CDR offset + ['v', strlen($comment)], // Zip Comment size + ]; + + $ret = static::packFields($fields) . $comment; + $this->send($ret); + } + + /** + * Clear all internal variables. Note that the stream object is not + * usable after this. + * + * @return void + */ + protected function clear(): void + { + $this->files = []; + $this->ofs = new Bigint(); + $this->cdr_ofs = new Bigint(); + $this->opt = new ArchiveOptions(); + } + + /** + * Is this file larger than large_file_size? + * + * @param string $path + * @return bool + */ + public function isLargeFile(string $path): bool + { + if (!$this->opt->isStatFiles()) { + return false; + } + $stat = stat($path); + return $stat['size'] > $this->opt->getLargeFileSize(); + } + + /** + * Save file attributes for trailing CDR record. + * + * @param File $file + * @return void + */ + public function addToCdr(File $file): void + { + $file->ofs = $this->ofs; + $this->ofs = $this->ofs->add($file->getTotalLength()); + $this->files[] = $file->getCdrFile(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/BigintTest.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/BigintTest.php new file mode 100755 index 0000000..ac9c7c2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/BigintTest.php @@ -0,0 +1,65 @@ +assertSame('0x0000000012345678', $bigint->getHex64()); + $this->assertSame(0x12345678, $bigint->getLow32()); + $this->assertSame(0, $bigint->getHigh32()); + } + + public function testConstructLarge(): void + { + $bigint = new Bigint(0x87654321); + $this->assertSame('0x0000000087654321', $bigint->getHex64()); + $this->assertSame('87654321', bin2hex(pack('N', $bigint->getLow32()))); + $this->assertSame(0, $bigint->getHigh32()); + } + + public function testAddSmallValue(): void + { + $bigint = new Bigint(1); + $bigint = $bigint->add(Bigint::init(2)); + $this->assertSame(3, $bigint->getLow32()); + $this->assertFalse($bigint->isOver32()); + $this->assertTrue($bigint->isOver32(true)); + $this->assertSame($bigint->getLowFF(), (float)$bigint->getLow32()); + $this->assertSame($bigint->getLowFF(true), (float)0xFFFFFFFF); + } + + public function testAddWithOverflowAtLowestByte(): void + { + $bigint = new Bigint(0xFF); + $bigint = $bigint->add(Bigint::init(0x01)); + $this->assertSame(0x100, $bigint->getLow32()); + } + + public function testAddWithOverflowAtInteger32(): void + { + $bigint = new Bigint(0xFFFFFFFE); + $this->assertFalse($bigint->isOver32()); + $bigint = $bigint->add(Bigint::init(0x01)); + $this->assertTrue($bigint->isOver32()); + $bigint = $bigint->add(Bigint::init(0x01)); + $this->assertSame('0x0000000100000000', $bigint->getHex64()); + $this->assertTrue($bigint->isOver32()); + $this->assertSame((float)0xFFFFFFFF, $bigint->getLowFF()); + } + + public function testAddWithOverflowAtInteger64(): void + { + $bigint = Bigint::fromLowHigh(0xFFFFFFFF, 0xFFFFFFFF); + $this->assertSame('0xFFFFFFFFFFFFFFFF', $bigint->getHex64()); + $this->expectException(OverflowException::class); + $bigint->add(Bigint::init(1)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/ZipStreamTest.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/ZipStreamTest.php new file mode 100755 index 0000000..6549b0b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/ZipStreamTest.php @@ -0,0 +1,586 @@ +expectException(\ZipStream\Exception\FileNotFoundException::class); + // Get ZipStream Object + $zip = new ZipStream(); + + // Trigger error by adding a file which doesn't exist + $zip->addFileFromPath('foobar.php', '/foo/bar/foobar.php'); + } + + public function testFileNotReadableException(): void + { + // create new virtual filesystem + $root = vfsStream::setup('vfs'); + // create a virtual file with no permissions + $file = vfsStream::newFile('foo.txt', 0000)->at($root)->setContent('bar'); + $zip = new ZipStream(); + $this->expectException(\ZipStream\Exception\FileNotReadableException::class); + $zip->addFileFromPath('foo.txt', $file->url()); + } + + public function testDostime(): void + { + // Allows testing of protected method + $class = new \ReflectionClass(File::class); + $method = $class->getMethod('dostime'); + $method->setAccessible(true); + + $this->assertSame($method->invoke(null, 1416246368), 1165069764); + + // January 1 1980 - DOS Epoch. + $this->assertSame($method->invoke(null, 315532800), 2162688); + + // January 1 1970 -> January 1 1980 due to minimum DOS Epoch. @todo Throw Exception? + $this->assertSame($method->invoke(null, 0), 2162688); + } + + public function testAddFile(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $zip->addFile('sample.txt', 'Sample String Data'); + $zip->addFile('test/sample.txt', 'More Simple Sample Data'); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(['sample.txt', 'test/sample.txt'], $files); + + $this->assertStringEqualsFile($tmpDir . '/sample.txt', 'Sample String Data'); + $this->assertStringEqualsFile($tmpDir . '/test/sample.txt', 'More Simple Sample Data'); + } + + /** + * @return array + */ + protected function getTmpFileStream(): array + { + $tmp = tempnam(sys_get_temp_dir(), 'zipstreamtest'); + $stream = fopen($tmp, 'wb+'); + + return array($tmp, $stream); + } + + /** + * @param string $tmp + * @return string + */ + protected function validateAndExtractZip($tmp): string + { + $tmpDir = $this->getTmpDir(); + + $zipArch = new \ZipArchive; + $res = $zipArch->open($tmp); + + if ($res !== true) { + $this->fail("Failed to open {$tmp}. Code: $res"); + + return $tmpDir; + } + + $this->assertEquals(0, $zipArch->status); + $this->assertEquals(0, $zipArch->statusSys); + + $zipArch->extractTo($tmpDir); + $zipArch->close(); + + return $tmpDir; + } + + protected function getTmpDir(): string + { + $tmp = tempnam(sys_get_temp_dir(), 'zipstreamtest'); + unlink($tmp); + mkdir($tmp) or $this->fail('Failed to make directory'); + + return $tmp; + } + + /** + * @param string $path + * @return string[] + */ + protected function getRecursiveFileList(string $path): array + { + $data = array(); + $path = (string)realpath($path); + $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); + + $pathLen = strlen($path); + foreach ($files as $file) { + $filePath = $file->getRealPath(); + if (!is_dir($filePath)) { + $data[] = substr($filePath, $pathLen + 1); + } + } + + sort($data); + + return $data; + } + + public function testAddFileUtf8NameComment(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $name = 'árvíztűrő tükörfúrógép.txt'; + $content = 'Sample String Data'; + $comment = + 'Filename has every special characters ' . + 'from Hungarian language in lowercase. ' . + 'In uppercase: ÁÍŰŐÜÖÚÓÉ'; + + $fileOptions = new FileOptions(); + $fileOptions->setComment($comment); + + $zip->addFile($name, $content, $fileOptions); + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array($name), $files); + $this->assertStringEqualsFile($tmpDir . '/' . $name, $content); + + $zipArch = new \ZipArchive(); + $zipArch->open($tmp); + $this->assertEquals($comment, $zipArch->getCommentName($name)); + } + + public function testAddFileUtf8NameNonUtfComment(): void + { + $this->expectException(\ZipStream\Exception\EncodingException::class); + + $stream = $this->getTmpFileStream()[1]; + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $name = 'á.txt'; + $content = 'any'; + $comment = 'á'; + + $fileOptions = new FileOptions(); + $fileOptions->setComment(mb_convert_encoding($comment, 'ISO-8859-2', 'UTF-8')); + + $zip->addFile($name, $content, $fileOptions); + } + + public function testAddFileNonUtf8NameUtfComment(): void + { + $this->expectException(\ZipStream\Exception\EncodingException::class); + + $stream = $this->getTmpFileStream()[1]; + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $name = 'á.txt'; + $content = 'any'; + $comment = 'á'; + + $fileOptions = new FileOptions(); + $fileOptions->setComment($comment); + + $zip->addFile(mb_convert_encoding($name, 'ISO-8859-2', 'UTF-8'), $content, $fileOptions); + } + + public function testAddFileWithStorageMethod(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + + $zip->addFile('sample.txt', 'Sample String Data', $fileOptions); + $zip->addFile('test/sample.txt', 'More Simple Sample Data'); + $zip->finish(); + fclose($stream); + + $zipArch = new \ZipArchive(); + $zipArch->open($tmp); + + $sample1 = $zipArch->statName('sample.txt'); + $sample12 = $zipArch->statName('test/sample.txt'); + $this->assertEquals($sample1['comp_method'], Method::STORE); + $this->assertEquals($sample12['comp_method'], Method::DEFLATE); + + $zipArch->close(); + } + + public function testDecompressFileWithMacUnarchiver(): void + { + if (!file_exists(self::OSX_ARCHIVE_UTILITY)) { + $this->markTestSkipped('The Mac OSX Archive Utility is not available.'); + } + + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $folder = uniqid('', true); + + $zip->addFile($folder . '/sample.txt', 'Sample Data'); + $zip->finish(); + fclose($stream); + + exec(escapeshellarg(self::OSX_ARCHIVE_UTILITY) . ' ' . escapeshellarg($tmp), $output, $returnStatus); + + $this->assertEquals(0, $returnStatus); + $this->assertCount(0, $output); + + $this->assertFileExists(dirname($tmp) . '/' . $folder . '/sample.txt'); + $this->assertStringEqualsFile(dirname($tmp) . '/' . $folder . '/sample.txt', 'Sample Data'); + } + + public function testAddFileFromPath(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + [$tmpExample, $streamExample] = $this->getTmpFileStream(); + fwrite($streamExample, 'Sample String Data'); + fclose($streamExample); + $zip->addFileFromPath('sample.txt', $tmpExample); + + [$tmpExample, $streamExample] = $this->getTmpFileStream(); + fwrite($streamExample, 'More Simple Sample Data'); + fclose($streamExample); + $zip->addFileFromPath('test/sample.txt', $tmpExample); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array('sample.txt', 'test/sample.txt'), $files); + + $this->assertStringEqualsFile($tmpDir . '/sample.txt', 'Sample String Data'); + $this->assertStringEqualsFile($tmpDir . '/test/sample.txt', 'More Simple Sample Data'); + } + + public function testAddFileFromPathWithStorageMethod(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + + [$tmpExample, $streamExample] = $this->getTmpFileStream(); + fwrite($streamExample, 'Sample String Data'); + fclose($streamExample); + $zip->addFileFromPath('sample.txt', $tmpExample, $fileOptions); + + [$tmpExample, $streamExample] = $this->getTmpFileStream(); + fwrite($streamExample, 'More Simple Sample Data'); + fclose($streamExample); + $zip->addFileFromPath('test/sample.txt', $tmpExample); + + $zip->finish(); + fclose($stream); + + $zipArch = new \ZipArchive(); + $zipArch->open($tmp); + + $sample1 = $zipArch->statName('sample.txt'); + $this->assertEquals(Method::STORE, $sample1['comp_method']); + + $sample2 = $zipArch->statName('test/sample.txt'); + $this->assertEquals(Method::DEFLATE, $sample2['comp_method']); + + $zipArch->close(); + } + + public function testAddLargeFileFromPath(): void + { + $methods = [Method::DEFLATE(), Method::STORE()]; + $falseTrue = [false, true]; + foreach ($methods as $method) { + foreach ($falseTrue as $zeroHeader) { + foreach ($falseTrue as $zip64) { + if ($zeroHeader && $method->equals(Method::DEFLATE())) { + continue; + } + $this->addLargeFileFileFromPath($method, $zeroHeader, $zip64); + } + } + } + } + + protected function addLargeFileFileFromPath($method, $zeroHeader, $zip64): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + $options->setLargeFileMethod($method); + $options->setLargeFileSize(5); + $options->setZeroHeader($zeroHeader); + $options->setEnableZip64($zip64); + + $zip = new ZipStream(null, $options); + + [$tmpExample, $streamExample] = $this->getTmpFileStream(); + for ($i = 0; $i <= 10000; $i++) { + fwrite($streamExample, sha1((string)$i)); + if ($i % 100 === 0) { + fwrite($streamExample, "\n"); + } + } + fclose($streamExample); + $shaExample = sha1_file($tmpExample); + $zip->addFileFromPath('sample.txt', $tmpExample); + unlink($tmpExample); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array('sample.txt'), $files); + + $this->assertEquals(sha1_file($tmpDir . '/sample.txt'), $shaExample, "SHA-1 Mismatch Method: {$method}"); + } + + public function testAddFileFromStream(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + // In this test we can't use temporary stream to feed data + // because zlib.deflate filter gives empty string before PHP 7 + // it works fine with file stream + $streamExample = fopen(__FILE__, 'rb'); + $zip->addFileFromStream('sample.txt', $streamExample); +// fclose($streamExample); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + + $streamExample2 = fopen('php://temp', 'wb+'); + fwrite($streamExample2, 'More Simple Sample Data'); + rewind($streamExample2); // move the pointer back to the beginning of file. + $zip->addFileFromStream('test/sample.txt', $streamExample2, $fileOptions); +// fclose($streamExample2); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array('sample.txt', 'test/sample.txt'), $files); + + $this->assertStringEqualsFile(__FILE__, file_get_contents($tmpDir . '/sample.txt')); + $this->assertStringEqualsFile($tmpDir . '/test/sample.txt', 'More Simple Sample Data'); + } + + public function testAddFileFromStreamWithStorageMethod(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + + $streamExample = fopen('php://temp', 'wb+'); + fwrite($streamExample, 'Sample String Data'); + rewind($streamExample); // move the pointer back to the beginning of file. + $zip->addFileFromStream('sample.txt', $streamExample, $fileOptions); +// fclose($streamExample); + + $streamExample2 = fopen('php://temp', 'bw+'); + fwrite($streamExample2, 'More Simple Sample Data'); + rewind($streamExample2); // move the pointer back to the beginning of file. + $zip->addFileFromStream('test/sample.txt', $streamExample2); +// fclose($streamExample2); + + $zip->finish(); + fclose($stream); + + $zipArch = new \ZipArchive(); + $zipArch->open($tmp); + + $sample1 = $zipArch->statName('sample.txt'); + $this->assertEquals(Method::STORE, $sample1['comp_method']); + + $sample2 = $zipArch->statName('test/sample.txt'); + $this->assertEquals(Method::DEFLATE, $sample2['comp_method']); + + $zipArch->close(); + } + + public function testAddFileFromPsr7Stream(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $body = 'Sample String Data'; + $response = new Response(200, [], $body); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + + $zip->addFileFromPsr7Stream('sample.json', $response->getBody(), $fileOptions); + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array('sample.json'), $files); + $this->assertStringEqualsFile($tmpDir . '/sample.json', $body); + } + + public function testAddFileFromPsr7StreamWithFileSizeSet(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + + $zip = new ZipStream(null, $options); + + $body = 'Sample String Data'; + $fileSize = strlen($body); + // Add fake padding + $fakePadding = "\0\0\0\0\0\0"; + $response = new Response(200, [], $body . $fakePadding); + + $fileOptions = new FileOptions(); + $fileOptions->setMethod(Method::STORE()); + $fileOptions->setSize($fileSize); + $zip->addFileFromPsr7Stream('sample.json', $response->getBody(), $fileOptions); + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(array('sample.json'), $files); + $this->assertStringEqualsFile($tmpDir . '/sample.json', $body); + } + + public function testCreateArchiveWithFlushOptionSet(): void + { + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + $options->setFlushOutput(true); + + $zip = new ZipStream(null, $options); + + $zip->addFile('sample.txt', 'Sample String Data'); + $zip->addFile('test/sample.txt', 'More Simple Sample Data'); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + + $files = $this->getRecursiveFileList($tmpDir); + $this->assertEquals(['sample.txt', 'test/sample.txt'], $files); + + $this->assertStringEqualsFile($tmpDir . '/sample.txt', 'Sample String Data'); + $this->assertStringEqualsFile($tmpDir . '/test/sample.txt', 'More Simple Sample Data'); + } + + public function testCreateArchiveWithOutputBufferingOffAndFlushOptionSet(): void + { + // WORKAROUND (1/2): remove phpunit's output buffer in order to run test without any buffering + ob_end_flush(); + $this->assertEquals(0, ob_get_level()); + + [$tmp, $stream] = $this->getTmpFileStream(); + + $options = new ArchiveOptions(); + $options->setOutputStream($stream); + $options->setFlushOutput(true); + + $zip = new ZipStream(null, $options); + + $zip->addFile('sample.txt', 'Sample String Data'); + + $zip->finish(); + fclose($stream); + + $tmpDir = $this->validateAndExtractZip($tmp); + $this->assertStringEqualsFile($tmpDir . '/sample.txt', 'Sample String Data'); + + // WORKAROUND (2/2): add back output buffering so that PHPUnit doesn't complain that it is missing + ob_start(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/bootstrap.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/bootstrap.php new file mode 100755 index 0000000..b43c9bd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/maennchen/zipstream-php/test/bootstrap.php @@ -0,0 +1,6 @@ +setOutputStream(fopen('php://memory', 'wb')); + $fileOpt->setTime(clone $expectedTime); + + $zip = new ZipStream(null, $archiveOpt); + + $zip->addFile('sample.txt', 'Sample', $fileOpt); + + $zip->finish(); + + $this->assertEquals($expectedTime, $fileOpt->getTime()); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/README.md new file mode 100755 index 0000000..c306394 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/README.md @@ -0,0 +1,156 @@ +PHPComplex +========== + +--- + +PHP Class for handling Complex numbers + +Master: [![Build Status](https://travis-ci.org/MarkBaker/PHPComplex.png?branch=master)](http://travis-ci.org/MarkBaker/PHPComplex) + +Develop: [![Build Status](https://travis-ci.org/MarkBaker/PHPComplex.png?branch=develop)](http://travis-ci.org/MarkBaker/PHPComplex) + +[![Complex Numbers](https://imgs.xkcd.com/comics/complex_numbers_2x.png)](https://xkcd.com/2028/) + +--- + +The library currently provides the following operations: + + - addition + - subtraction + - multiplication + - division + - division by + - division into + +together with functions for + + - theta (polar theta angle) + - rho (polar distance/radius) + - conjugate + * negative + - inverse (1 / complex) + - cos (cosine) + - acos (inverse cosine) + - cosh (hyperbolic cosine) + - acosh (inverse hyperbolic cosine) + - sin (sine) + - asin (inverse sine) + - sinh (hyperbolic sine) + - asinh (inverse hyperbolic sine) + - sec (secant) + - asec (inverse secant) + - sech (hyperbolic secant) + - asech (inverse hyperbolic secant) + - csc (cosecant) + - acsc (inverse cosecant) + - csch (hyperbolic secant) + - acsch (inverse hyperbolic secant) + - tan (tangent) + - atan (inverse tangent) + - tanh (hyperbolic tangent) + - atanh (inverse hyperbolic tangent) + - cot (cotangent) + - acot (inverse cotangent) + - coth (hyperbolic cotangent) + - acoth (inverse hyperbolic cotangent) + - sqrt (square root) + - exp (exponential) + - ln (natural log) + - log10 (base-10 log) + - log2 (base-2 log) + - pow (raised to the power of a real number) + + +--- + +# Usage + +To create a new complex object, you can provide either the real, imaginary and suffix parts as individual values, or as an array of values passed passed to the constructor; or a string representing the value. e.g + +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$complexObject = new Complex\Complex($real, $imaginary, $suffix); +``` +or +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$arguments = [$real, $imaginary, $suffix]; + +$complexObject = new Complex\Complex($arguments); +``` +or +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +``` + +Complex objects are immutable: whenever you call a method or pass a complex value to a function that returns a complex value, a new Complex object will be returned, and the original will remain unchanged. +This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Complex result). + +## Performing Mathematical Operations + +To perform mathematical operations with Complex values, you can call the appropriate method against a complex value, passing other values as arguments + +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +$complexObject = new Complex\Complex($complexString1); +echo $complexObject->add($complexString2); +``` +or pass all values to the appropriate function +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +echo Complex\add($complexString1, $complexString2); +``` +If you want to perform the same operation against multiple values (e.g. to add three or more complex numbers), then you can pass multiple arguments to any of the operations. + +You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object. + +## Using functions + +When calling any of the available functions for a complex value, you can either call the relevant method for the Complex object +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->sinh(); +``` +or you can call the function as you would in procedural code, passing the Complex object as an argument +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\sinh($complexObject); +``` +When called procedurally using the function, you can pass in the argument as a Complex object, or as an array or string that will parse to a complex object. +``` +$complexString = '1.23-4.56i'; + +echo Complex\sinh($complexString); +``` + +In the case of the `pow()` function (the only implemented function that requires an additional argument) you need to pass both arguments when calling the function procedurally + +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\pow($complexObject, 2); +``` +or pass the additional argument when calling the method +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->pow(2); +``` diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/Autoloader.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/Autoloader.php new file mode 100755 index 0000000..792ecef --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/Autoloader.php @@ -0,0 +1,53 @@ +regex = $regex; + parent::__construct($it, $regex); + } +} + +class FilenameFilter extends FilesystemRegexFilter +{ + // Filter files against the regex + public function accept() + { + return (!$this->isFile() || preg_match($this->regex, $this->getFilename())); + } +} + + +$srcFolder = __DIR__ . DIRECTORY_SEPARATOR . 'src'; +$srcDirectory = new RecursiveDirectoryIterator($srcFolder); + +$filteredFileList = new FilenameFilter($srcDirectory, '/(?:php)$/i'); +$filteredFileList = new FilenameFilter($filteredFileList, '/^(?!.*(Complex|Exception)\.php).*$/i'); + +foreach (new RecursiveIteratorIterator($filteredFileList) as $file) { + if ($file->isFile()) { + include_once $file; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Complex.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Complex.php new file mode 100755 index 0000000..4f873af --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Complex.php @@ -0,0 +1,390 @@ +realPart = (float) $realPart; + $this->imaginaryPart = (float) $imaginaryPart; + $this->suffix = strtolower($suffix); + } + + /** + * Gets the real part of this complex number + * + * @return Float + */ + public function getReal() + { + return $this->realPart; + } + + /** + * Gets the imaginary part of this complex number + * + * @return Float + */ + public function getImaginary() + { + return $this->imaginaryPart; + } + + /** + * Gets the suffix of this complex number + * + * @return String + */ + public function getSuffix() + { + return $this->suffix; + } + + /** + * Returns true if this is a real value, false if a complex value + * + * @return Bool + */ + public function isReal() + { + return $this->imaginaryPart == 0.0; + } + + /** + * Returns true if this is a complex value, false if a real value + * + * @return Bool + */ + public function isComplex() + { + return !$this->isReal(); + } + + public function format() + { + $str = ""; + if ($this->imaginaryPart != 0.0) { + if (\abs($this->imaginaryPart) != 1.0) { + $str .= $this->imaginaryPart . $this->suffix; + } else { + $str .= (($this->imaginaryPart < 0.0) ? '-' : '') . $this->suffix; + } + } + if ($this->realPart != 0.0) { + if (($str) && ($this->imaginaryPart > 0.0)) { + $str = "+" . $str; + } + $str = $this->realPart . $str; + } + if (!$str) { + $str = "0.0"; + } + + return $str; + } + + public function __toString() + { + return $this->format(); + } + + /** + * Validates whether the argument is a valid complex number, converting scalar or array values if possible + * + * @param mixed $complex The value to validate + * @return Complex + * @throws Exception If the argument isn't a Complex number or cannot be converted to one + */ + public static function validateComplexArgument($complex) + { + if (is_scalar($complex) || is_array($complex)) { + $complex = new Complex($complex); + } elseif (!is_object($complex) || !($complex instanceof Complex)) { + throw new Exception('Value is not a valid complex number'); + } + + return $complex; + } + + /** + * Returns the reverse of this complex number + * + * @return Complex + */ + public function reverse() + { + return new Complex( + $this->imaginaryPart, + $this->realPart, + ($this->realPart == 0.0) ? null : $this->suffix + ); + } + + public function invertImaginary() + { + return new Complex( + $this->realPart, + $this->imaginaryPart * -1, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + public function invertReal() + { + return new Complex( + $this->realPart * -1, + $this->imaginaryPart, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + protected static $functions = [ + 'abs', + 'acos', + 'acosh', + 'acot', + 'acoth', + 'acsc', + 'acsch', + 'argument', + 'asec', + 'asech', + 'asin', + 'asinh', + 'atan', + 'atanh', + 'conjugate', + 'cos', + 'cosh', + 'cot', + 'coth', + 'csc', + 'csch', + 'exp', + 'inverse', + 'ln', + 'log2', + 'log10', + 'negative', + 'pow', + 'rho', + 'sec', + 'sech', + 'sin', + 'sinh', + 'sqrt', + 'tan', + 'tanh', + 'theta', + ]; + + protected static $operations = [ + 'add', + 'subtract', + 'multiply', + 'divideby', + 'divideinto', + ]; + + /** + * Returns the result of the function call or operation + * + * @return Complex|float + * @throws Exception|\InvalidArgumentException + */ + public function __call($functionName, $arguments) + { + $functionName = strtolower(str_replace('_', '', $functionName)); + + // Test for function calls + if (in_array($functionName, self::$functions)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + // Test for operation calls + if (in_array($functionName, self::$operations)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + throw new Exception('Function or Operation does not exist'); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Exception.php new file mode 100755 index 0000000..a2beb73 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/Exception.php @@ -0,0 +1,13 @@ +getReal() - $invsqrt->getImaginary(), + $complex->getImaginary() + $invsqrt->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acosh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acosh.php new file mode 100755 index 0000000..18a992e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acosh.php @@ -0,0 +1,34 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\acosh($complex->getReal())); + } + + $acosh = acos($complex) + ->reverse(); + if ($acosh->getReal() < 0.0) { + $acosh = $acosh->invertReal(); + } + + return $acosh; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acot.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acot.php new file mode 100755 index 0000000..11bee46 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acot.php @@ -0,0 +1,25 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asin(inverse($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acsch.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acsch.php new file mode 100755 index 0000000..bb45d34 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/acsch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asinh(inverse($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/argument.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/argument.php new file mode 100755 index 0000000..d7209cc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/argument.php @@ -0,0 +1,28 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acos(inverse($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asech.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asech.php new file mode 100755 index 0000000..b36c40e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asech.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acosh(inverse($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asin.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asin.php new file mode 100755 index 0000000..9c982ac --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asin.php @@ -0,0 +1,37 @@ +getReal() - $complex->getImaginary(), + $invsqrt->getImaginary() + $complex->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asinh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asinh.php new file mode 100755 index 0000000..c1243fd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/asinh.php @@ -0,0 +1,33 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\asinh($complex->getReal())); + } + + $asinh = clone $complex; + $asinh = $asinh->reverse() + ->invertReal(); + $asinh = asin($asinh); + return $asinh->reverse() + ->invertImaginary(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atan.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atan.php new file mode 100755 index 0000000..2c75dcf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atan.php @@ -0,0 +1,45 @@ +isReal()) { + return new Complex(\atan($complex->getReal())); + } + + $t1Value = new Complex(-1 * $complex->getImaginary(), $complex->getReal()); + $uValue = new Complex(1, 0); + + $d1Value = clone $uValue; + $d1Value = subtract($d1Value, $t1Value); + $d2Value = add($t1Value, $uValue); + $uResult = $d1Value->divideBy($d2Value); + $uResult = ln($uResult); + + return new Complex( + (($uResult->getImaginary() == M_PI) ? -M_PI : $uResult->getImaginary()) * -0.5, + $uResult->getReal() * 0.5, + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atanh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atanh.php new file mode 100755 index 0000000..c53f2a9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/atanh.php @@ -0,0 +1,38 @@ +isReal()) { + $real = $complex->getReal(); + if ($real >= -1.0 && $real <= 1.0) { + return new Complex(\atanh($real)); + } else { + return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2)); + } + } + + $iComplex = clone $complex; + $iComplex = $iComplex->invertImaginary() + ->reverse(); + return atan($iComplex) + ->invertReal() + ->reverse(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/conjugate.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/conjugate.php new file mode 100755 index 0000000..bd1984b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/conjugate.php @@ -0,0 +1,28 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cos.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cos.php new file mode 100755 index 0000000..80a4683 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cos.php @@ -0,0 +1,34 @@ +isReal()) { + return new Complex(\cos($complex->getReal())); + } + + return conjugate( + new Complex( + \cos($complex->getReal()) * \cosh($complex->getImaginary()), + \sin($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ) + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cosh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cosh.php new file mode 100755 index 0000000..a4bea65 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cosh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\cosh($complex->getReal())); + } + + return new Complex( + \cosh($complex->getReal()) * \cos($complex->getImaginary()), + \sinh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cot.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cot.php new file mode 100755 index 0000000..339101e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/cot.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return new Complex(INF); + } + + return inverse(tan($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/coth.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/coth.php new file mode 100755 index 0000000..7fe705a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/coth.php @@ -0,0 +1,24 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sin($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/csch.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/csch.php new file mode 100755 index 0000000..f450098 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/csch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sinh($complex)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/exp.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/exp.php new file mode 100755 index 0000000..4cac696 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/exp.php @@ -0,0 +1,34 @@ +getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) { + return new Complex(-1.0, 0.0); + } + + $rho = \exp($complex->getReal()); + + return new Complex( + $rho * \cos($complex->getImaginary()), + $rho * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/inverse.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/inverse.php new file mode 100755 index 0000000..7d3182a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/inverse.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return $complex->divideInto(1.0); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/ln.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/ln.php new file mode 100755 index 0000000..39071cf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/ln.php @@ -0,0 +1,33 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } + + return new Complex( + \log(rho($complex)), + theta($complex), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log10.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log10.php new file mode 100755 index 0000000..694d3d0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log10.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log10($complex->getReal()), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log10(Complex::EULER)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log2.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log2.php new file mode 100755 index 0000000..081f2c4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/log2.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log($complex->getReal(), 2), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log(Complex::EULER, 2)); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/negative.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/negative.php new file mode 100755 index 0000000..dbd1192 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/negative.php @@ -0,0 +1,31 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/pow.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/pow.php new file mode 100755 index 0000000..18ee269 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/pow.php @@ -0,0 +1,40 @@ +getImaginary() == 0.0 && $complex->getReal() >= 0.0) { + return new Complex(\pow($complex->getReal(), $power)); + } + + $rValue = \sqrt(($complex->getReal() * $complex->getReal()) + ($complex->getImaginary() * $complex->getImaginary())); + $rPower = \pow($rValue, $power); + $theta = $complex->argument() * $power; + if ($theta == 0) { + return new Complex(1); + } + + return new Complex($rPower * \cos($theta), $rPower * \sin($theta), $complex->getSuffix()); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/rho.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/rho.php new file mode 100755 index 0000000..750f3f9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/rho.php @@ -0,0 +1,28 @@ +getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()) + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sec.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sec.php new file mode 100755 index 0000000..7dd43ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sec.php @@ -0,0 +1,25 @@ +isReal()) { + return new Complex(\sin($complex->getReal())); + } + + return new Complex( + \sin($complex->getReal()) * \cosh($complex->getImaginary()), + \cos($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sinh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sinh.php new file mode 100755 index 0000000..4c0f650 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sinh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\sinh($complex->getReal())); + } + + return new Complex( + \sinh($complex->getReal()) * \cos($complex->getImaginary()), + \cosh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sqrt.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sqrt.php new file mode 100755 index 0000000..9c171b8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/sqrt.php @@ -0,0 +1,29 @@ +getSuffix()); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tan.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tan.php new file mode 100755 index 0000000..014d798 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tan.php @@ -0,0 +1,40 @@ +isReal()) { + return new Complex(\tan($complex->getReal())); + } + + $real = $complex->getReal(); + $imaginary = $complex->getImaginary(); + $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor, + \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tanh.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tanh.php new file mode 100755 index 0000000..028741d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/tanh.php @@ -0,0 +1,35 @@ +getReal(); + $imaginary = $complex->getImaginary(); + $divisor = \cos($imaginary) * \cos($imaginary) + \sinh($real) * \sinh($real); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \sinh($real) * \cosh($real) / $divisor, + 0.5 * \sin(2 * $imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/theta.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/theta.php new file mode 100755 index 0000000..d12866c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/functions/theta.php @@ -0,0 +1,38 @@ +getReal() == 0.0) { + if ($complex->isReal()) { + return 0.0; + } elseif ($complex->getImaginary() < 0.0) { + return M_PI / -2; + } + return M_PI / 2; + } elseif ($complex->getReal() > 0.0) { + return \atan($complex->getImaginary() / $complex->getReal()); + } elseif ($complex->getImaginary() < 0.0) { + return -(M_PI - \atan(\abs($complex->getImaginary()) / \abs($complex->getReal()))); + } + + return M_PI - \atan($complex->getImaginary() / \abs($complex->getReal())); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/add.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/add.php new file mode 100755 index 0000000..10bd42f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/add.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() + $complex->getReal(); + $imaginary = $result->getImaginary() + $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideby.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideby.php new file mode 100755 index 0000000..089e0ef --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideby.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($result->getReal() * $complex->getReal()) + + ($result->getImaginary() * $complex->getImaginary()); + $delta2 = ($result->getImaginary() * $complex->getReal()) - + ($result->getReal() * $complex->getImaginary()); + $delta3 = ($complex->getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideinto.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideinto.php new file mode 100755 index 0000000..3dfe085 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/divideinto.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($result->getReal() == 0.0 && $result->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($complex->getReal() * $result->getReal()) + + ($complex->getImaginary() * $result->getImaginary()); + $delta2 = ($complex->getImaginary() * $result->getReal()) - + ($complex->getReal() * $result->getImaginary()); + $delta3 = ($result->getReal() * $result->getReal()) + + ($result->getImaginary() * $result->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/multiply.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/multiply.php new file mode 100755 index 0000000..bf2473e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/multiply.php @@ -0,0 +1,48 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = ($result->getReal() * $complex->getReal()) - + ($result->getImaginary() * $complex->getImaginary()); + $imaginary = ($result->getReal() * $complex->getImaginary()) + + ($result->getImaginary() * $complex->getReal()); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/subtract.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/subtract.php new file mode 100755 index 0000000..075ef44 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/classes/src/operations/subtract.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() - $complex->getReal(); + $imaginary = $result->getImaginary() - $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/composer.json new file mode 100755 index 0000000..fdf9a08 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/composer.json @@ -0,0 +1,94 @@ +{ + "name": "markbaker/complex", + "type": "library", + "description": "PHP Class for working with complex numbers", + "keywords": ["complex", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPComplex", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpdocumentor/phpdocumentor":"2.*", + "phpmd/phpmd": "2.*", + "sebastian/phpcpd": "2.*", + "phploc/phploc": "2.*", + "squizlabs/php_codesniffer": "^3.4.0", + "phpcompatibility/php-compatibility": "^9.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0" + }, + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "scripts": { + "style": [ + "phpcs --report-width=200 --report=summary,full -n" + ], + "mess": [ + "phpmd classes/src/ xml codesize,unusedcode,design,naming -n" + ], + "lines": [ + "phploc classes/src/ -n" + ], + "cpd": [ + "phpcpd classes/src/ -n" + ], + "versions": [ + "phpcs --report-width=200 --report=summary,full classes/src/ --standard=PHPCompatibility --runtime-set testVersion 5.6- -n" + ] + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/complexTest.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/complexTest.php new file mode 100755 index 0000000..7dafd8a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/complexTest.php @@ -0,0 +1,154 @@ +add(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->add(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Subtract', PHP_EOL; + +$x = new Complex(123); +$x->subtract(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->subtract(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Multiply', PHP_EOL; + +$x = new Complex(123); +$x->multiply(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->multiply(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide By', PHP_EOL; + +$x = new Complex(123); +$x->divideBy(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideBy(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide Into', PHP_EOL; + +$x = new Complex(123); +$x->divideInto(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideInto(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, -1)); +echo $x, PHP_EOL; diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testFunctions.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testFunctions.php new file mode 100755 index 0000000..4d5ed73 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testFunctions.php @@ -0,0 +1,52 @@ +getMessage(), PHP_EOL; + } + } + echo PHP_EOL; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testOperations.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testOperations.php new file mode 100755 index 0000000..f791263 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/examples/testOperations.php @@ -0,0 +1,34 @@ + ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Subtraction', PHP_EOL; + +$result = \Complex\subtract(...$values); +echo '=> ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Multiplication', PHP_EOL; + +$result = \Complex\multiply(...$values); +echo '=> ', $result, PHP_EOL; diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/license.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/license.md new file mode 100755 index 0000000..5b4b156 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/complex/license.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `2017` `Mark Baker` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/README.md new file mode 100755 index 0000000..66a1de4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/README.md @@ -0,0 +1,165 @@ +PHPMatrix +========== + +--- + +PHP Class for handling Matrices + +Master: [![Build Status](https://travis-ci.org/MarkBaker/PHPMatrix.png?branch=master)](http://travis-ci.org/MarkBaker/PHPMatrix) + +Develop: [![Build Status](https://travis-ci.org/MarkBaker/PHPMatrix.png?branch=develop)](http://travis-ci.org/MarkBaker/PHPMatrix) + +[![Matrix Transform](https://imgs.xkcd.com/comics/matrix_transform.png)](https://xkcd.com/184/) + +Matrix Transform + +--- + +This library currently provides the following operations: + + - addition + - direct sum + - subtraction + - multiplication + - division (using [A].[B]-1) + - division by + - division into + +together with functions for + + - adjoint + - antidiagonal + - cofactors + - determinant + - diagonal + - identity + - inverse + - minors + - trace + - transpose + + +## TO DO + + - power() + - EigenValues + - EigenVectors + - Decomposition + +--- + +# Usage + +To create a new Matrix object, provide an array as the constructor argument + +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +``` +The `Builder` class provides helper methods for creating specific matrices, specifically an identity matrix of a specified size; or a matrix of a specified dimensions, with every cell containing a set value. +``` +$matrix = new Matrix\Builder::createFilledMatrix(1, 5, 3); +``` +Will create a matrix of 5 rows and 3 columns, filled with a `1` in every cell; while +``` +$matrix = new Matrix\Builder::createIdentityMatrix(3); +``` +will create a 3x3 identity matrix. + + +Matrix objects are immutable: whenever you call a method or pass a grid to a function that returns a matrix value, a new Matrix object will be returned, and the original will remain unchanged. This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Matrix result). + +## Performing Mathematical Operations + +To perform mathematical operations with Matrices, you can call the appropriate method against a matrix value, passing other values as arguments + +``` +$matrix1 = new Matrix([ + [2, 7, 6], + [9, 5, 1], + [4, 3, 8], +]); +$matrix2 = new Matrix([ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], +]); + +echo $matrix1->multiply($matrix2); +``` +or pass all values to the appropriate function +``` +$matrix1 = new Matrix([ + [2, 7, 6], + [9, 5, 1], + [4, 3, 8], +]); +$matrix2 = new Matrix([ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], +]); + +echo Matrix\multiply($matrix1, $matrix2); +``` +You can pass in the arguments as Matrix objects, or as arrays. + +If you want to perform the same operation against multiple values (e.g. to add three or more matrices), then you can pass multiple arguments to any of the operations. + +## Using functions + +When calling any of the available functions for a matrix value, you can either call the relevant method for the Matrix object +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); + +echo $matrix->trace(); +``` +or you can call the function as you would in procedural code, passing the Matrix object as an argument +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +echo Matrix\trace($matrix); +``` +When called procedurally using the function, you can pass in the argument as a Matrix object, or as an array. +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +echo Matrix\trace($grid); +``` +As an alternative, it is also possible to call the method directly from the `Functions` class. +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +echo Matrix\Functions::trace($matrix); +``` +Used this way, methods must be called statically, and the argument must be the Matrix object, and cannot be an array. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/buildPhar.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/buildPhar.php new file mode 100755 index 0000000..e1b8f96 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/buildPhar.php @@ -0,0 +1,62 @@ + 'Mark Baker ', + 'Description' => 'PHP Class for working with Matrix numbers', + 'Copyright' => 'Mark Baker (c) 2013-' . date('Y'), + 'Timestamp' => time(), + 'Version' => '0.1.0', + 'Date' => date('Y-m-d') +); + +// cleanup +if (file_exists($pharName)) { + echo "Removed: {$pharName}\n"; + unlink($pharName); +} + +echo "Building phar file...\n"; + +// the phar object +$phar = new Phar($pharName, null, 'Matrix'); +$phar->buildFromDirectory($sourceDir); +$phar->setStub( +<<<'EOT' +getMessage()); + exit(1); + } + + include 'phar://functions/sqrt.php'; + + __HALT_COMPILER(); +EOT +); +$phar->setMetadata($metaData); +$phar->compressFiles(Phar::GZ); + +echo "Complete.\n"; + +exit(); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/Autoloader.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/Autoloader.php new file mode 100755 index 0000000..279d176 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/Autoloader.php @@ -0,0 +1,53 @@ +regex = $regex; + parent::__construct($it, $regex); + } +} + +class FilenameFilter extends FilesystemRegexFilter +{ + // Filter files against the regex + public function accept() + { + return (!$this->isFile() || preg_match($this->regex, $this->getFilename())); + } +} + + +$srcFolder = __DIR__ . DIRECTORY_SEPARATOR . 'src'; +$srcDirectory = new RecursiveDirectoryIterator($srcFolder); + +$filteredFileList = new FilenameFilter($srcDirectory, '/(?:php)$/i'); +$filteredFileList = new FilenameFilter($filteredFileList, '/^(?!.*(Matrix|Exception)\.php).*$/i'); + +foreach (new RecursiveIteratorIterator($filteredFileList) as $file) { + if ($file->isFile()) { + include_once $file; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Builder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Builder.php new file mode 100755 index 0000000..6bc334a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Builder.php @@ -0,0 +1,70 @@ +toArray(); + + for ($x = 0; $x < $dimensions; ++$x) { + $grid[$x][$x] = 1; + } + + return new Matrix($grid); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Exception.php new file mode 100755 index 0000000..55a428c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Exception.php @@ -0,0 +1,13 @@ +isSquare()) { + throw new Exception('Adjoint can only be calculated for a square matrix'); + } + + return self::getAdjoint($matrix); + } + + /** + * Calculate the cofactors of the matrix + * + * @param Matrix $matrix The matrix whose cofactors we wish to calculate + * @return Matrix + * + * @throws Exception + */ + private static function getCofactors(Matrix $matrix) + { + $cofactors = self::getMinors($matrix); + $dimensions = $matrix->rows; + + $cof = 1; + for ($i = 0; $i < $dimensions; ++$i) { + $cofs = $cof; + for ($j = 0; $j < $dimensions; ++$j) { + $cofactors[$i][$j] *= $cofs; + $cofs = -$cofs; + } + $cof = -$cof; + } + + return new Matrix($cofactors); + } + + /** + * Return the cofactors of this matrix + * + * @param Matrix $matrix The matrix whose cofactors we wish to calculate + * @return Matrix + * + * @throws Exception + */ + public static function cofactors(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Cofactors can only be calculated for a square matrix'); + } + + return self::getCofactors($matrix); + } + + /** + * @param Matrix $matrix + * @param int $row + * @param int $column + * @return float + * @throws Exception + */ + private static function getDeterminantSegment(Matrix $matrix, $row, $column) + { + $tmpMatrix = $matrix->toArray(); + unset($tmpMatrix[$row]); + array_walk( + $tmpMatrix, + function (&$row) use ($column) { + unset($row[$column]); + } + ); + + return self::getDeterminant(new Matrix($tmpMatrix)); + } + + /** + * Calculate the determinant of the matrix + * + * @param Matrix $matrix The matrix whose determinant we wish to calculate + * @return float + * + * @throws Exception + */ + private static function getDeterminant(Matrix $matrix) + { + $dimensions = $matrix->rows; + $determinant = 0; + + switch ($dimensions) { + case 1: + $determinant = $matrix->getValue(1, 1); + break; + case 2: + $determinant = $matrix->getValue(1, 1) * $matrix->getValue(2, 2) - + $matrix->getValue(1, 2) * $matrix->getValue(2, 1); + break; + default: + for ($i = 1; $i <= $dimensions; ++$i) { + $det = $matrix->getValue(1, $i) * self::getDeterminantSegment($matrix, 0, $i - 1); + if (($i % 2) == 0) { + $determinant -= $det; + } else { + $determinant += $det; + } + } + break; + } + + return $determinant; + } + + /** + * Return the determinant of this matrix + * + * @param Matrix $matrix The matrix whose determinant we wish to calculate + * @return float + * @throws Exception + **/ + public static function determinant(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Determinant can only be calculated for a square matrix'); + } + + return self::getDeterminant($matrix); + } + + /** + * Return the diagonal of this matrix + * + * @param Matrix $matrix The matrix whose diagonal we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function diagonal(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Diagonal can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $grid = Builder::createFilledMatrix(0, $dimensions, $dimensions) + ->toArray(); + + for ($i = 0; $i < $dimensions; ++$i) { + $grid[$i][$i] = $matrix->getValue($i + 1, $i + 1); + } + + return new Matrix($grid); + } + + /** + * Return the antidiagonal of this matrix + * + * @param Matrix $matrix The matrix whose antidiagonal we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function antidiagonal(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Anti-Diagonal can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $grid = Builder::createFilledMatrix(0, $dimensions, $dimensions) + ->toArray(); + + for ($i = 0; $i < $dimensions; ++$i) { + $grid[$i][$dimensions - $i - 1] = $matrix->getValue($i + 1, $dimensions - $i); + } + + return new Matrix($grid); + } + + /** + * Return the identity matrix + * The identity matrix, or sometimes ambiguously called a unit matrix, of size n is the n × n square matrix + * with ones on the main diagonal and zeros elsewhere + * + * @param Matrix $matrix The matrix whose identity we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function identity(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Identity can only be created for a square matrix'); + } + + $dimensions = $matrix->rows; + + return Builder::createIdentityMatrix($dimensions); + } + + /** + * Return the inverse of this matrix + * + * @param Matrix $matrix The matrix whose inverse we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function inverse(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Inverse can only be calculated for a square matrix'); + } + + $determinant = self::getDeterminant($matrix); + if ($determinant == 0.0) { + throw new Exception('Inverse can only be calculated for a matrix with a non-zero determinant'); + } + + if ($matrix->rows == 1) { + return new Matrix([[1 / $matrix->getValue(1, 1)]]); + } + + return self::getAdjoint($matrix) + ->multiply(1 / $determinant); + } + + /** + * Calculate the minors of the matrix + * + * @param Matrix $matrix The matrix whose minors we wish to calculate + * @return array[] + * + * @throws Exception + */ + protected static function getMinors(Matrix $matrix) + { + $minors = $matrix->toArray(); + $dimensions = $matrix->rows; + if ($dimensions == 1) { + return $minors; + } + + for ($i = 0; $i < $dimensions; ++$i) { + for ($j = 0; $j < $dimensions; ++$j) { + $minors[$i][$j] = self::getDeterminantSegment($matrix, $i, $j); + } + } + + return $minors; + } + + /** + * Return the minors of the matrix + * The minor of a matrix A is the determinant of some smaller square matrix, cut down from A by removing one or + * more of its rows or columns. + * Minors obtained by removing just one row and one column from square matrices (first minors) are required for + * calculating matrix cofactors, which in turn are useful for computing both the determinant and inverse of + * square matrices. + * + * @param Matrix $matrix The matrix whose minors we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function minors(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Minors can only be calculated for a square matrix'); + } + + return new Matrix(self::getMinors($matrix)); + } + + /** + * Return the trace of this matrix + * The trace is defined as the sum of the elements on the main diagonal (the diagonal from the upper left to the lower right) + * of the matrix + * + * @param Matrix $matrix The matrix whose trace we wish to calculate + * @return float + * @throws Exception + **/ + public static function trace(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Trace can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $result = 0; + for ($i = 1; $i <= $dimensions; ++$i) { + $result += $matrix->getValue($i, $i); + } + + return $result; + } + + /** + * Return the transpose of this matrix + * + * @param Matrix $matrix The matrix whose transpose we wish to calculate + * @return Matrix + **/ + public static function transpose(Matrix $matrix) + { + $array = array_values(array_merge([null], $matrix->toArray())); + $grid = call_user_func_array( + 'array_map', + $array + ); + + return new Matrix($grid); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Matrix.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Matrix.php new file mode 100755 index 0000000..a4f0495 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Matrix.php @@ -0,0 +1,400 @@ +buildFromArray(array_values($grid)); + } + + /* + * Create a new Matrix object from an array of values + * + * @param array $grid + */ + protected function buildFromArray(array $grid) + { + $this->rows = count($grid); + $columns = array_reduce( + $grid, + function ($carry, $value) { + return max($carry, is_array($value) ? count($value) : 1); + } + ); + $this->columns = $columns; + + array_walk( + $grid, + function (&$value) use ($columns) { + if (!is_array($value)) { + $value = [$value]; + } + $value = array_pad(array_values($value), $columns, null); + } + ); + + $this->grid = $grid; + } + + /** + * Validate that a row number is a positive integer + * + * @param int $row + * @return int + * @throws Exception + */ + public static function validateRow($row) + { + if ((!is_numeric($row)) || (intval($row) < 1)) { + throw new Exception('Invalid Row'); + } + + return (int)$row; + } + + /** + * Validate that a column number is a positive integer + * + * @param int $column + * @return int + * @throws Exception + */ + public static function validateColumn($column) + { + if ((!is_numeric($column)) || (intval($column) < 1)) { + throw new Exception('Invalid Column'); + } + + return (int)$column; + } + + /** + * Validate that a row number falls within the set of rows for this matrix + * + * @param int $row + * @return int + * @throws Exception + */ + protected function validateRowInRange($row) + { + $row = static::validateRow($row); + if ($row > $this->rows) { + throw new Exception('Requested Row exceeds matrix size'); + } + + return $row; + } + + /** + * Validate that a column number falls within the set of columns for this matrix + * + * @param int $column + * @return int + * @throws Exception + */ + protected function validateColumnInRange($column) + { + $column = static::validateColumn($column); + if ($column > $this->columns) { + throw new Exception('Requested Column exceeds matrix size'); + } + + return $column; + } + + /** + * Return a new matrix as a subset of rows from this matrix, starting at row number $row, and $rowCount rows + * A $rowCount value of 0 will return all rows of the matrix from $row + * A negative $rowCount value will return rows until that many rows from the end of the matrix + * + * Note that row numbers start from 1, not from 0 + * + * @param int $row + * @param int $rowCount + * @return static + * @throws Exception + */ + public function getRows($row, $rowCount = 1) + { + $row = $this->validateRowInRange($row); + if ($rowCount === 0) { + $rowCount = $this->rows - $row + 1; + } + + return new static(array_slice($this->grid, $row - 1, (int)$rowCount)); + } + + /** + * Return a new matrix as a subset of columns from this matrix, starting at column number $column, and $columnCount columns + * A $columnCount value of 0 will return all columns of the matrix from $column + * A negative $columnCount value will return columns until that many columns from the end of the matrix + * + * Note that column numbers start from 1, not from 0 + * + * @param int $column + * @param int $columnCount + * @return Matrix + * @throws Exception + */ + public function getColumns($column, $columnCount = 1) + { + $column = $this->validateColumnInRange($column); + if ($columnCount < 1) { + $columnCount = $this->columns + $columnCount - $column + 1; + } + + $grid = []; + for ($i = $column - 1; $i < $column + $columnCount - 1; ++$i) { + $grid[] = array_column($this->grid, $i); + } + + return (new static($grid))->transpose(); + } + + /** + * Return a new matrix as a subset of rows from this matrix, dropping rows starting at row number $row, + * and $rowCount rows + * A negative $rowCount value will drop rows until that many rows from the end of the matrix + * A $rowCount value of 0 will remove all rows of the matrix from $row + * + * Note that row numbers start from 1, not from 0 + * + * @param int $row + * @param int $rowCount + * @return static + * @throws Exception + */ + public function dropRows($row, $rowCount = 1) + { + $this->validateRowInRange($row); + if ($rowCount === 0) { + $rowCount = $this->rows - $row + 1; + } + + $grid = $this->grid; + array_splice($grid, $row - 1, (int)$rowCount); + + return new static($grid); + } + + /** + * Return a new matrix as a subset of columns from this matrix, dropping columns starting at column number $column, + * and $columnCount columns + * A negative $columnCount value will drop columns until that many columns from the end of the matrix + * A $columnCount value of 0 will remove all columns of the matrix from $column + * + * Note that column numbers start from 1, not from 0 + * + * @param int $column + * @param int $columnCount + * @return static + * @throws Exception + */ + public function dropColumns($column, $columnCount = 1) + { + $this->validateColumnInRange($column); + if ($columnCount < 1) { + $columnCount = $this->columns + $columnCount - $column + 1; + } + + $grid = $this->grid; + array_walk( + $grid, + function (&$row) use ($column, $columnCount) { + array_splice($row, $column - 1, (int)$columnCount); + } + ); + + return new static($grid); + } + + /** + * Return a value from this matrix, from the "cell" identified by the row and column numbers + * Note that row and column numbers start from 1, not from 0 + * + * @param int $row + * @param int $column + * @return mixed + * @throws Exception + */ + public function getValue($row, $column) + { + $row = $this->validateRowInRange($row); + $column = $this->validateColumnInRange($column); + + return $this->grid[$row - 1][$column - 1]; + } + + /** + * Returns a Generator that will yield each row of the matrix in turn as a vector matrix + * or the value of each cell if the matrix is a vector + * + * @return \Generator|Matrix[]|mixed[] + */ + public function rows() + { + foreach ($this->grid as $i => $row) { + yield $i + 1 => ($this->columns == 1) + ? $row[0] + : new static([$row]); + } + } + + /** + * Returns a Generator that will yield each column of the matrix in turn as a vector matrix + * or the value of each cell if the matrix is a vector + * + * @return \Generator|Matrix[]|mixed[] + */ + public function columns() + { + for ($i = 0; $i < $this->columns; ++$i) { + yield $i + 1 => ($this->rows == 1) + ? $this->grid[0][$i] + : new static(array_column($this->grid, $i)); + } + } + + /** + * Identify if the row and column dimensions of this matrix are equal, + * i.e. if it is a "square" matrix + * + * @return bool + */ + public function isSquare() + { + return $this->rows == $this->columns; + } + + /** + * Identify if this matrix is a vector + * i.e. if it comprises only a single row or a single column + * + * @return bool + */ + public function isVector() + { + return $this->rows == 1 || $this->columns == 1; + } + + /** + * Return the matrix as a 2-dimensional array + * + * @return array + */ + public function toArray() + { + return $this->grid; + } + + protected static $getters = [ + 'rows', + 'columns', + ]; + + /** + * Access specific properties as read-only (no setters) + * + * @param string $propertyName + * @return mixed + * @throws Exception + */ + public function __get($propertyName) + { + $propertyName = strtolower($propertyName); + + // Test for function calls + if (in_array($propertyName, self::$getters)) { + return $this->$propertyName; + } + + throw new Exception('Property does not exist'); + } + + protected static $functions = [ + 'antidiagonal', + 'adjoint', + 'cofactors', + 'determinant', + 'diagonal', + 'identity', + 'inverse', + 'minors', + 'trace', + 'transpose', + ]; + + protected static $operations = [ + 'add', + 'subtract', + 'multiply', + 'divideby', + 'divideinto', + 'directsum', + ]; + + /** + * Returns the result of the function call or operation + * + * @param string $functionName + * @param mixed[] $arguments + * @return Matrix|float + * @throws Exception + */ + public function __call($functionName, $arguments) + { + $functionName = strtolower(str_replace('_', '', $functionName)); + + if (in_array($functionName, self::$functions) || in_array($functionName, self::$operations)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + if (is_callable($functionName)) { + $arguments = array_values(array_merge([$this], $arguments)); + return call_user_func_array($functionName, $arguments); + } + } + throw new Exception('Function or Operation does not exist'); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Addition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Addition.php new file mode 100755 index 0000000..e78c6d7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Addition.php @@ -0,0 +1,68 @@ +addMatrix($value); + } elseif (is_numeric($value)) { + return $this->addScalar($value); + } + + throw new Exception('Invalid argument for addition'); + } + + /** + * Execute the addition for a scalar + * + * @param mixed $value The numeric value to add to the current base value + * @return $this The operation object, allowing multiple additions to be chained + **/ + protected function addScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] += $value; + } + } + + return $this; + } + + /** + * Execute the addition for a matrix + * + * @param Matrix $value The numeric value to add to the current base value + * @return $this The operation object, allowing multiple additions to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function addMatrix(Matrix $value) + { + $this->validateMatchingDimensions($value); + + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] += $value->getValue($row + 1, $column + 1); + } + } + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php new file mode 100755 index 0000000..6db0853 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php @@ -0,0 +1,64 @@ +directSumMatrix($value); + } + + throw new Exception('Invalid argument for addition'); + } + + /** + * Execute the direct sum for a matrix + * + * @param Matrix $value The numeric value to concatenate/direct sum with the current base value + * @return $this The operation object, allowing multiple additions to be chained + **/ + private function directSumMatrix($value) + { + $originalColumnCount = count($this->matrix[0]); + $originalRowCount = count($this->matrix); + $valColumnCount = $value->columns; + $valRowCount = $value->rows; + $value = $value->toArray(); + + for ($row = 0; $row < $this->rows; ++$row) { + $this->matrix[$row] = array_merge($this->matrix[$row], array_fill(0, $valColumnCount, 0)); + } + + $this->matrix = array_merge( + $this->matrix, + array_fill(0, $valRowCount, array_fill(0, $originalColumnCount, 0)) + ); + + for ($row = $originalRowCount; $row < $originalRowCount + $valRowCount; ++$row) { + array_splice( + $this->matrix[$row], + $originalColumnCount, + $valColumnCount, + $value[$row - $originalRowCount] + ); + } + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Division.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Division.php new file mode 100755 index 0000000..2a573f5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Division.php @@ -0,0 +1,38 @@ +multiplyMatrix($value); + } elseif (is_numeric($value)) { + return $this->multiplyScalar(1 / $value); + } + + throw new Exception('Invalid argument for division'); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php new file mode 100755 index 0000000..63df162 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php @@ -0,0 +1,77 @@ +multiplyMatrix($value); + } elseif (is_numeric($value)) { + return $this->multiplyScalar($value); + } + + throw new Exception('Invalid argument for multiplication'); + } + + /** + * Execute the multiplication for a scalar + * + * @param mixed $value The numeric value to multiply with the current base value + * @return $this The operation object, allowing multiple mutiplications to be chained + **/ + protected function multiplyScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] *= $value; + } + } + + return $this; + } + + /** + * Execute the multiplication for a matrix + * + * @param Matrix $value The numeric value to multiply with the current base value + * @return $this The operation object, allowing multiple mutiplications to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function multiplyMatrix(Matrix $value) + { + $this->validateReflectingDimensions($value); + + $newRows = $this->rows; + $newColumns = $value->columns; + $matrix = Builder::createFilledMatrix(0, $newRows, $newColumns) + ->toArray(); + for ($row = 0; $row < $newRows; ++$row) { + for ($column = 0; $column < $newColumns; ++$column) { + $columnData = $value->getColumns($column + 1)->toArray(); + foreach ($this->matrix[$row] as $key => $valueData) { + $matrix[$row][$column] += $valueData * $columnData[$key][0]; + } + } + } + $this->matrix = $matrix; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Operator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Operator.php new file mode 100755 index 0000000..87d3f3b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Operator.php @@ -0,0 +1,78 @@ +rows = $matrix->rows; + $this->columns = $matrix->columns; + $this->matrix = $matrix->toArray(); + } + + /** + * Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction + * + * @param Matrix $matrix The second Matrix object on which the operation will be performed + * @throws Exception + */ + protected function validateMatchingDimensions(Matrix $matrix) + { + if (($this->rows != $matrix->rows) || ($this->columns != $matrix->columns)) { + throw new Exception('Matrices have mismatched dimensions'); + } + } + + /** + * Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division + * + * @param Matrix $matrix The second Matrix object on which the operation will be performed + * @throws Exception + */ + protected function validateReflectingDimensions(Matrix $matrix) + { + if ($this->columns != $matrix->rows) { + throw new Exception('Matrices have mismatched dimensions'); + } + } + + /** + * Return the result of the operation + * + * @return Matrix + */ + public function result() + { + return new Matrix($this->matrix); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php new file mode 100755 index 0000000..57c0b14 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php @@ -0,0 +1,68 @@ +subtractMatrix($value); + } elseif (is_numeric($value)) { + return $this->subtractScalar($value); + } + + throw new Exception('Invalid argument for subtraction'); + } + + /** + * Execute the subtraction for a scalar + * + * @param mixed $value The numeric value to subtracted from the current base value + * @return $this The operation object, allowing multiple additions to be chained + **/ + protected function subtractScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] -= $value; + } + } + + return $this; + } + + /** + * Execute the subtraction for a matrix + * + * @param Matrix $value The numeric value to subtract from the current base value + * @return $this The operation object, allowing multiple subtractions to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function subtractMatrix(Matrix $value) + { + $this->validateMatchingDimensions($value); + + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] -= $value->getValue($row + 1, $column + 1); + } + } + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/functions/adjoint.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/functions/adjoint.php new file mode 100755 index 0000000..fc1e169 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/functions/adjoint.php @@ -0,0 +1,30 @@ + $matrixValues The matrices to add + * @return Matrix + * @throws Exception + */ +function add(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('Addition operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('Addition arguments must be Matrix or array'); + } + + $result = new Addition($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/directsum.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/directsum.php new file mode 100755 index 0000000..9d15b89 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/directsum.php @@ -0,0 +1,44 @@ + $matrixValues The matrices to add + * @return Matrix + * @throws Exception + */ +function directsum(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('DirectSum operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('DirectSum arguments must be Matrix or array'); + } + + $result = new DirectSum($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideby.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideby.php new file mode 100755 index 0000000..767d03a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideby.php @@ -0,0 +1,44 @@ + $matrixValues The matrices to divide + * @return Matrix + * @throws Exception + */ +function divideby(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('Division operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('Division arguments must be Matrix or array'); + } + + $result = new Division($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideinto.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideinto.php new file mode 100755 index 0000000..f5cb8dc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/divideinto.php @@ -0,0 +1,44 @@ + $matrixValues The numbers to divide + * @return Matrix + * @throws Exception + */ +function divideinto(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('Division operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('Division arguments must be Matrix or array'); + } + + $result = new Division($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/multiply.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/multiply.php new file mode 100755 index 0000000..1428f09 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/multiply.php @@ -0,0 +1,44 @@ + $matrixValues The matrices to multiply + * @return Matrix + * @throws Exception + */ +function multiply(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('Multiplication operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('Multiplication arguments must be Matrix or array'); + } + + $result = new Multiplication($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/subtract.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/subtract.php new file mode 100755 index 0000000..3123b61 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/classes/src/operations/subtract.php @@ -0,0 +1,44 @@ + $matrixValues The matrices to subtract + * @return Matrix + * @throws Exception + */ +function subtract(...$matrixValues) +{ + if (count($matrixValues) < 2) { + throw new Exception('Subtraction operation requires at least 2 arguments'); + } + + $matrix = array_shift($matrixValues); + + if (is_array($matrix)) { + $matrix = new Matrix($matrix); + } + if (!$matrix instanceof Matrix) { + throw new Exception('Subtraction arguments must be Matrix or array'); + } + + $result = new Subtraction($matrix); + + foreach ($matrixValues as $matrix) { + $result->execute($matrix); + } + + return $result->result(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.7.2.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.7.2.json new file mode 100755 index 0000000..6ff324d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.7.2.json @@ -0,0 +1,86 @@ +{ + "name": "markbaker/matrix", + "type": "library", + "description": "PHP Class for working with matrices", + "keywords": ["matrix", "vector", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.4@dev", + "squizlabs/php_codesniffer": "^3.0@dev", + "phpmd/phpmd": "dev-master", + "infection/infection": "0.13.x-dev", + "phpstan/phpstan": "^0.12.0@dev", + "sebastian/phpcpd": "^4.1", + "phploc/phploc": "^5.0@dev", + "phpcompatibility/php-compatibility": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-master" + }, + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Matrix\\Test\\": "unitTests/classes/src/" + }, + "files": [ + "unitTests/classes/src/functions/adjointTest.php", + "unitTests/classes/src/functions/antidiagonalTest.php", + "unitTests/classes/src/functions/cofactorsTest.php", + "unitTests/classes/src/functions/determinantTest.php", + "unitTests/classes/src/functions/diagonalTest.php", + "unitTests/classes/src/functions/identityTest.php", + "unitTests/classes/src/functions/inverseTest.php", + "unitTests/classes/src/functions/minorsTest.php", + "unitTests/classes/src/functions/traceTest.php", + "unitTests/classes/src/functions/transposeTest.php", + "unitTests/classes/src/operations/addTest.php", + "unitTests/classes/src/operations/directsumTest.php", + "unitTests/classes/src/operations/subtractTest.php", + "unitTests/classes/src/operations/multiplyTest.php", + "unitTests/classes/src/operations/dividebyTest.php", + "unitTests/classes/src/operations/divideintoTest.php" + ] + }, + "scripts": { + "style": "phpcs --report-width=200 --report=summary,full -n", + "test": "phpunit -c phpunit.xml.dist", + "mess": "phpmd classes/src/ xml codesize,unusedcode,design,naming -n", + "lines": "phploc classes/src/ -n", + "cpd": "phpcpd classes/src/ -n", + "versions": "phpcs --report-width=200 --report=summary,full classes/src/ --standard=PHPCompatibility --runtime-set testVersion 5.6- -n", + "infection": "infection --min-msi=70 --min-covered-msi=70 --log-verbosity=all", + "phpstan": "phpstan analyse classes/src/ -c phpstan.neon --level=7 --no-progress -vvv --memory-limit=1024M", + "coverage": "phpunit -c phpunit.xml.dist --coverage-text --coverage-html ./build/coverage" + }, + "minimum-stability": "dev" +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.json new file mode 100755 index 0000000..dae5c98 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/composer.json @@ -0,0 +1,81 @@ +{ + "name": "markbaker/matrix", + "type": "library", + "description": "PHP Class for working with matrices", + "keywords": ["matrix", "vector", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "phpmd/phpmd": "dev-master", + "sebastian/phpcpd": "^3.0", + "phploc/phploc": "^4", + "squizlabs/php_codesniffer": "^3.0@dev", + "phpcompatibility/php-compatibility": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-master" + }, + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Matrix\\Test\\": "unitTests/classes/src/" + }, + "files": [ + "unitTests/classes/src/functions/adjointTest.php", + "unitTests/classes/src/functions/antidiagonalTest.php", + "unitTests/classes/src/functions/cofactorsTest.php", + "unitTests/classes/src/functions/determinantTest.php", + "unitTests/classes/src/functions/diagonalTest.php", + "unitTests/classes/src/functions/identityTest.php", + "unitTests/classes/src/functions/inverseTest.php", + "unitTests/classes/src/functions/minorsTest.php", + "unitTests/classes/src/functions/traceTest.php", + "unitTests/classes/src/functions/transposeTest.php", + "unitTests/classes/src/operations/addTest.php", + "unitTests/classes/src/operations/directsumTest.php", + "unitTests/classes/src/operations/subtractTest.php", + "unitTests/classes/src/operations/multiplyTest.php", + "unitTests/classes/src/operations/dividebyTest.php", + "unitTests/classes/src/operations/divideintoTest.php" + ] + }, + "scripts": { + "style": "phpcs --report-width=200 --report=summary,full -n", + "test": "phpunit -c phpunit.xml.dist", + "mess": "phpmd classes/src/ xml codesize,unusedcode,design,naming -n", + "lines": "phploc classes/src/ -n", + "cpd": "phpcpd classes/src/ -n", + "versions": "phpcs --report-width=200 --report=summary,full classes/src/ --standard=PHPCompatibility --runtime-set testVersion 5.6- -n" + }, + "minimum-stability": "dev" +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/examples/test.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/examples/test.php new file mode 100755 index 0000000..d8b56dc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/examples/test.php @@ -0,0 +1,19 @@ +directsum(new Matrix\Matrix($grid2)); + +var_dump($new); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/infection.json.dist b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/infection.json.dist new file mode 100755 index 0000000..eddaa70 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/infection.json.dist @@ -0,0 +1,17 @@ +{ + "timeout": 1, + "source": { + "directories": [ + "classes\/src" + ] + }, + "logs": { + "text": "build/infection/text.log", + "summary": "build/infection/summary.log", + "debug": "build/infection/debug.log", + "perMutator": "build/infection/perMutator.md" + }, + "mutators": { + "@default": true + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/license.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/license.md new file mode 100755 index 0000000..7329058 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/license.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `2018` `Mark Baker` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/phpstan.neon b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/phpstan.neon new file mode 100755 index 0000000..cda5fe8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/markbaker/matrix/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + ignoreErrors: + - '#Property [A-Za-z\\]+::\$[A-Za-z]+ has no typehint specified#' + - '#Method [A-Za-z\\]+::[A-Za-z]+\(\) has no return typehint specified#' diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/LICENSE b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/LICENSE new file mode 100755 index 0000000..2a8cf22 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/LICENSE @@ -0,0 +1,18 @@ +The MIT License (MIT) + +Copyright (c) 2015 My C-Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/README.md new file mode 100755 index 0000000..6065f49 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/README.md @@ -0,0 +1,132 @@ +# PHP Enum implementation inspired from SplEnum + +[![Build Status](https://travis-ci.org/myclabs/php-enum.png?branch=master)](https://travis-ci.org/myclabs/php-enum) +[![Latest Stable Version](https://poser.pugx.org/myclabs/php-enum/version.png)](https://packagist.org/packages/myclabs/php-enum) +[![Total Downloads](https://poser.pugx.org/myclabs/php-enum/downloads.png)](https://packagist.org/packages/myclabs/php-enum) +[![psalm](https://shepherd.dev/github/myclabs/php-enum/coverage.svg)](https://shepherd.dev/github/myclabs/php-enum) + +Maintenance for this project is [supported via Tidelift](https://tidelift.com/subscription/pkg/packagist-myclabs-php-enum?utm_source=packagist-myclabs-php-enum&utm_medium=referral&utm_campaign=readme). + +## Why? + +First, and mainly, `SplEnum` is not integrated to PHP, you have to install the extension separately. + +Using an enum instead of class constants provides the following advantages: + +- You can type-hint: `function setAction(Action $action) {` +- You can enrich the enum with methods (e.g. `format`, `parse`, …) +- You can extend the enum to add new values (make your enum `final` to prevent it) +- You can get a list of all the possible values (see below) + +This Enum class is not intended to replace class constants, but only to be used when it makes sense. + +## Installation + +``` +composer require myclabs/php-enum +``` + +## Declaration + +```php +use MyCLabs\Enum\Enum; + +/** + * Action enum + */ +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} +``` + +## Usage + +```php +$action = Action::VIEW(); + +// or with a dynamic key: +$action = Action::$key(); +// or with a dynamic value: +$action = new Action($value); +``` + +As you can see, static methods are automatically implemented to provide quick access to an enum value. + +One advantage over using class constants is to be able to type-hint enum values: + +```php +function setAction(Action $action) { + // ... +} +``` + +## Documentation + +- `__construct()` The constructor checks that the value exist in the enum +- `__toString()` You can `echo $myValue`, it will display the enum value (value of the constant) +- `getValue()` Returns the current value of the enum +- `getKey()` Returns the key of the current value on Enum +- `equals()` Tests whether enum instances are equal (returns `true` if enum values are equal, `false` otherwise) + +Static methods: + +- `toArray()` method Returns all possible values as an array (constant name in key, constant value in value) +- `keys()` Returns the names (keys) of all constants in the Enum class +- `values()` Returns instances of the Enum class of all Enum constants (constant name in key, Enum instance in value) +- `isValid()` Check if tested value is valid on enum set +- `isValidKey()` Check if tested key is valid on enum set +- `search()` Return key for searched value + +### Static methods + +```php +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} + +// Static method: +$action = Action::VIEW(); +$action = Action::EDIT(); +``` + +Static method helpers are implemented using [`__callStatic()`](http://www.php.net/manual/en/language.oop5.overloading.php#object.callstatic). + +If you care about IDE autocompletion, you can either implement the static methods yourself: + +```php +class Action extends Enum +{ + private const VIEW = 'view'; + + /** + * @return Action + */ + public static function VIEW() { + return new Action(self::VIEW); + } +} +``` + +or you can use phpdoc (this is supported in PhpStorm for example): + +```php +/** + * @method static Action VIEW() + * @method static Action EDIT() + */ +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} +``` + +## Related projects + +- [Doctrine enum mapping](https://github.com/acelaya/doctrine-enum-type) +- [Symfony ParamConverter integration](https://github.com/Ex3v/MyCLabsEnumParamConverter) +- [PHPStan integration](https://github.com/timeweb/phpstan-enum) diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/SECURITY.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/SECURITY.md new file mode 100755 index 0000000..84fd4e3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +Only the latest stable release is supported. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). + +Tidelift will coordinate the fix and disclosure. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/composer.json new file mode 100755 index 0000000..6861a5c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/composer.json @@ -0,0 +1,33 @@ +{ + "name": "myclabs/php-enum", + "type": "library", + "description": "PHP Enum implementation", + "keywords": ["enum"], + "homepage": "http://github.com/myclabs/php-enum", + "license": "MIT", + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "MyCLabs\\Tests\\Enum\\": "tests/" + } + }, + "require": { + "php": ">=7.1", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/psalm.xml b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/psalm.xml new file mode 100755 index 0000000..b07e929 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/psalm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/Enum.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/Enum.php new file mode 100755 index 0000000..f5a5940 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/Enum.php @@ -0,0 +1,239 @@ + + * @author Daniel Costa + * @author Mirosław Filip + * + * @psalm-template T + * @psalm-immutable + */ +abstract class Enum implements \JsonSerializable +{ + /** + * Enum value + * + * @var mixed + * @psalm-var T + */ + protected $value; + + /** + * Store existing constants in a static cache per object. + * + * + * @var array + * @psalm-var array> + */ + protected static $cache = []; + + /** + * Creates a new value of some type + * + * @psalm-pure + * @param mixed $value + * + * @psalm-param static|T $value + * @throws \UnexpectedValueException if incompatible type is given. + */ + public function __construct($value) + { + if ($value instanceof static) { + /** @psalm-var T */ + $value = $value->getValue(); + } + + if (!$this->isValid($value)) { + /** @psalm-suppress InvalidCast */ + throw new \UnexpectedValueException("Value '$value' is not part of the enum " . static::class); + } + + /** @psalm-var T */ + $this->value = $value; + } + + /** + * @psalm-pure + * @return mixed + * @psalm-return T + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns the enum key (i.e. the constant name). + * + * @psalm-pure + * @return mixed + */ + public function getKey() + { + return static::search($this->value); + } + + /** + * @psalm-pure + * @psalm-suppress InvalidCast + * @return string + */ + public function __toString() + { + return (string)$this->value; + } + + /** + * Determines if Enum should be considered equal with the variable passed as a parameter. + * Returns false if an argument is an object of different class or not an object. + * + * This method is final, for more information read https://github.com/myclabs/php-enum/issues/4 + * + * @psalm-pure + * @psalm-param mixed $variable + * @return bool + */ + final public function equals($variable = null): bool + { + return $variable instanceof self + && $this->getValue() === $variable->getValue() + && static::class === \get_class($variable); + } + + /** + * Returns the names (keys) of all constants in the Enum class + * + * @psalm-pure + * @psalm-return list + * @return array + */ + public static function keys() + { + return \array_keys(static::toArray()); + } + + /** + * Returns instances of the Enum class of all Enum constants + * + * @psalm-pure + * @psalm-return array + * @return static[] Constant name in key, Enum instance in value + */ + public static function values() + { + $values = array(); + + /** @psalm-var T $value */ + foreach (static::toArray() as $key => $value) { + $values[$key] = new static($value); + } + + return $values; + } + + /** + * Returns all possible values as an array + * + * @psalm-pure + * @psalm-suppress ImpureStaticProperty + * + * @psalm-return array + * @return array Constant name in key, constant value in value + */ + public static function toArray() + { + $class = static::class; + + if (!isset(static::$cache[$class])) { + $reflection = new \ReflectionClass($class); + static::$cache[$class] = $reflection->getConstants(); + } + + return static::$cache[$class]; + } + + /** + * Check if is valid enum value + * + * @param $value + * @psalm-param mixed $value + * @psalm-pure + * @return bool + */ + public static function isValid($value) + { + return \in_array($value, static::toArray(), true); + } + + /** + * Check if is valid enum key + * + * @param $key + * @psalm-param string $key + * @psalm-pure + * @return bool + */ + public static function isValidKey($key) + { + $array = static::toArray(); + + return isset($array[$key]) || \array_key_exists($key, $array); + } + + /** + * Return key for value + * + * @param $value + * + * @psalm-param mixed $value + * @psalm-pure + * @return mixed + */ + public static function search($value) + { + return \array_search($value, static::toArray(), true); + } + + /** + * Returns a value when called statically like so: MyEnum::SOME_VALUE() given SOME_VALUE is a class constant + * + * @param string $name + * @param array $arguments + * + * @return static + * @psalm-pure + * @throws \BadMethodCallException + */ + public static function __callStatic($name, $arguments) + { + $array = static::toArray(); + if (isset($array[$name]) || \array_key_exists($name, $array)) { + return new static($array[$name]); + } + + throw new \BadMethodCallException("No static method or enum constant '$name' in class " . static::class); + } + + /** + * Specify data which should be serialized to JSON. This method returns data that can be serialized by json_encode() + * natively. + * + * @return mixed + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + * @psalm-pure + */ + public function jsonSerialize() + { + return $this->getValue(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php new file mode 100755 index 0000000..302bf80 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php @@ -0,0 +1,54 @@ +register(new \MyCLabs\Enum\PHPUnit\Comparator()); + */ +final class Comparator extends \SebastianBergmann\Comparator\Comparator +{ + public function accepts($expected, $actual) + { + return $expected instanceof Enum && ( + $actual instanceof Enum || $actual === null + ); + } + + /** + * @param Enum $expected + * @param Enum|null $actual + * + * @return void + */ + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + { + if ($expected->equals($actual)) { + return; + } + + throw new ComparisonFailure( + $expected, + $actual, + $this->formatEnum($expected), + $this->formatEnum($actual), + false, + 'Failed asserting that two Enums are equal.' + ); + } + + private function formatEnum(Enum $enum = null) + { + if ($enum === null) { + return "null"; + } + + return get_class($enum)."::{$enum->getKey()}()"; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CHANGELOG.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CHANGELOG.md new file mode 100755 index 0000000..31584ac --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CHANGELOG.md @@ -0,0 +1,536 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com) +and this project adheres to [Semantic Versioning](https://semver.org). + +## 1.14.1 - 2020-07-19 + +### Added + +- nothing + +### Fixed + +- WEBSERVICE is HTTP client agnostic and must be configured via `Settings::setHttpClient()` [#1562](https://github.com/PHPOffice/PhpSpreadsheet/issues/1562) +- Borders were not complete on rowspanned columns using HTML reader [#1473](https://github.com/PHPOffice/PhpSpreadsheet/pull/1473) + +### Changed + +- nothing + +## [1.14.0] - 2020-06-29 + +### Added + +- Add support for IFS() logical function [#1442](https://github.com/PHPOffice/PhpSpreadsheet/pull/1442) +- Add Cell Address Helper to provide conversions between the R1C1 and A1 address formats [#1558](https://github.com/PHPOffice/PhpSpreadsheet/pull/1558) +- Add ability to edit Html/Pdf before saving [#1499](https://github.com/PHPOffice/PhpSpreadsheet/pull/1499) +- Add ability to set codepage explicitly for BIFF5 [#1018](https://github.com/PHPOffice/PhpSpreadsheet/issues/1018) +- Added support for the WEBSERVICE function [#1409](https://github.com/PHPOffice/PhpSpreadsheet/pull/1409) + +### Fixed + +- Resolve evaluation of utf-8 named ranges in calculation engine [#1522](https://github.com/PHPOffice/PhpSpreadsheet/pull/1522) +- Fix HLOOKUP on single row [#1512](https://github.com/PHPOffice/PhpSpreadsheet/pull/1512) +- Fix MATCH when comparing different numeric types [#1521](https://github.com/PHPOffice/PhpSpreadsheet/pull/1521) +- Fix exact MATCH on ranges with empty cells [#1520](https://github.com/PHPOffice/PhpSpreadsheet/pull/1520) +- Fix for Issue [#1516](https://github.com/PHPOffice/PhpSpreadsheet/issues/1516) (Cloning worksheet makes corrupted Xlsx) [#1530](https://github.com/PHPOffice/PhpSpreadsheet/pull/1530) +- Fix For Issue [#1509](https://github.com/PHPOffice/PhpSpreadsheet/issues/1509) (Can not set empty enclosure for CSV) [#1518](https://github.com/PHPOffice/PhpSpreadsheet/pull/1518) +- Fix for Issue [#1505](https://github.com/PHPOffice/PhpSpreadsheet/issues/1505) (TypeError : Argument 4 passed to PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet::writeAttributeIf() must be of the type string) [#1525](https://github.com/PHPOffice/PhpSpreadsheet/pull/1525) +- Fix for Issue [#1495](https://github.com/PHPOffice/PhpSpreadsheet/issues/1495) (Sheet index being changed when multiple sheets are used in formula) [#1500]((https://github.com/PHPOffice/PhpSpreadsheet/pull/1500)) +- Fix for Issue [#1533](https://github.com/PHPOffice/PhpSpreadsheet/issues/1533) (A reference to a cell containing a string starting with "#" leads to errors in the generated xlsx.) [#1534](https://github.com/PHPOffice/PhpSpreadsheet/pull/1534) +- Xls Writer - Correct Timestamp Bug [#1493](https://github.com/PHPOffice/PhpSpreadsheet/pull/1493) +- Don't ouput row and columns without any cells in HTML writer [#1235](https://github.com/PHPOffice/PhpSpreadsheet/issues/1235) + +## [1.13.0] - 2020-05-31 + +### Added + +- Support writing to streams in all writers [#1292](https://github.com/PHPOffice/PhpSpreadsheet/issues/1292) +- Support CSV files with data wrapping a lot of lines [#1468](https://github.com/PHPOffice/PhpSpreadsheet/pull/1468) +- Support protection of worksheet by a specific hash algorithm [#1485](https://github.com/PHPOffice/PhpSpreadsheet/pull/1485) + +### Fixed + +- Fix Chart samples by updating chart parameter from 0 to DataSeries::EMPTY_AS_GAP [#1448](https://github.com/PHPOffice/PhpSpreadsheet/pull/1448) +- Fix return type in docblock for the Cells::get() [#1398](https://github.com/PHPOffice/PhpSpreadsheet/pull/1398) +- Fix RATE, PRICE, XIRR, and XNPV Functions [#1456](https://github.com/PHPOffice/PhpSpreadsheet/pull/1456) +- Save Excel 2010+ functions properly in XLSX [#1461](https://github.com/PHPOffice/PhpSpreadsheet/pull/1461) +- Several improvements in HTML writer [#1464](https://github.com/PHPOffice/PhpSpreadsheet/pull/1464) +- Fix incorrect behaviour when saving XLSX file with drawings [#1462](https://github.com/PHPOffice/PhpSpreadsheet/pull/1462), +- Fix Crash while trying setting a cell the value "123456\n" [#1476](https://github.com/PHPOffice/PhpSpreadsheet/pull/1481) +- Improved DATEDIF() function and reduced errors for Y and YM units [#1466](https://github.com/PHPOffice/PhpSpreadsheet/pull/1466) +- Stricter typing for mergeCells [#1494](https://github.com/PHPOffice/PhpSpreadsheet/pull/1494) + +### Changed + +- Drop support for PHP 7.1, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support +- Drop partial migration tool in favor of complete migration via RectorPHP [#1445](https://github.com/PHPOffice/PhpSpreadsheet/issues/1445) +- Limit composer package to `src/` [#1424](https://github.com/PHPOffice/PhpSpreadsheet/pull/1424) + +## [1.12.0] - 2020-04-27 + +### Added + +- Improved the ARABIC function to also handle short-hand roman numerals +- Added support for the FLOOR.MATH and FLOOR.PRECISE functions [#1351](https://github.com/PHPOffice/PhpSpreadsheet/pull/1351) + +### Fixed + +- Fix ROUNDUP and ROUNDDOWN for floating-point rounding error [#1404](https://github.com/PHPOffice/PhpSpreadsheet/pull/1404) +- Fix ROUNDUP and ROUNDDOWN for negative number [#1417](https://github.com/PHPOffice/PhpSpreadsheet/pull/1417) +- Fix loading styles from vmlDrawings when containing whitespace [#1347](https://github.com/PHPOffice/PhpSpreadsheet/issues/1347) +- Fix incorrect behavior when removing last row [#1365](https://github.com/PHPOffice/PhpSpreadsheet/pull/1365) +- MATCH with a static array should return the position of the found value based on the values submitted [#1332](https://github.com/PHPOffice/PhpSpreadsheet/pull/1332) +- Fix Xlsx Reader's handling of undefined fill color [#1353](https://github.com/PHPOffice/PhpSpreadsheet/pull/1353) + +## [1.11.0] - 2020-03-02 + +### Added + +- Added support for the BASE function +- Added support for the ARABIC function +- Conditionals - Extend Support for (NOT)CONTAINSBLANKS [#1278](https://github.com/PHPOffice/PhpSpreadsheet/pull/1278) + +### Fixed + +- Handle Error in Formula Processing Better for Xls [#1267](https://github.com/PHPOffice/PhpSpreadsheet/pull/1267) +- Handle ConditionalStyle NumberFormat When Reading Xlsx File [#1296](https://github.com/PHPOffice/PhpSpreadsheet/pull/1296) +- Fix Xlsx Writer's handling of decimal commas [#1282](https://github.com/PHPOffice/PhpSpreadsheet/pull/1282) +- Fix for issue by removing test code mistakenly left in [#1328](https://github.com/PHPOffice/PhpSpreadsheet/pull/1328) +- Fix for Xls writer wrong selected cells and active sheet [#1256](https://github.com/PHPOffice/PhpSpreadsheet/pull/1256) +- Fix active cell when freeze pane is used [#1323](https://github.com/PHPOffice/PhpSpreadsheet/pull/1323) +- Fix XLSX file loading with autofilter containing '$' [#1326](https://github.com/PHPOffice/PhpSpreadsheet/pull/1326) +- PHPDoc - Use `@return $this` for fluent methods [#1362](https://github.com/PHPOffice/PhpSpreadsheet/pull/1362) + +## [1.10.1] - 2019-12-02 + +### Changed + +- PHP 7.4 compatibility + +### Fixed + +- FLOOR() function accept negative number and negative significance [#1245](https://github.com/PHPOffice/PhpSpreadsheet/pull/1245) +- Correct column style even when using rowspan [#1249](https://github.com/PHPOffice/PhpSpreadsheet/pull/1249) +- Do not confuse defined names and cell refs [#1263](https://github.com/PHPOffice/PhpSpreadsheet/pull/1263) +- XLSX reader/writer keep decimal for floats with a zero decimal part [#1262](https://github.com/PHPOffice/PhpSpreadsheet/pull/1262) +- ODS writer prevent invalid numeric value if locale decimal separator is comma [#1268](https://github.com/PHPOffice/PhpSpreadsheet/pull/1268) +- Xlsx writer actually writes plotVisOnly and dispBlanksAs from chart properties [#1266](https://github.com/PHPOffice/PhpSpreadsheet/pull/1266) + +## [1.10.0] - 2019-11-18 + +### Changed + +- Change license from LGPL 2.1 to MIT [#140](https://github.com/PHPOffice/PhpSpreadsheet/issues/140) + +### Added + +- Implementation of IFNA() logical function +- Support "showZeros" worksheet option to change how Excel shows and handles "null" values returned from a calculation +- Allow HTML Reader to accept HTML as a string into an existing spreadsheet [#1212](https://github.com/PHPOffice/PhpSpreadsheet/pull/1212) + +### Fixed + +- IF implementation properly handles the value `#N/A` [#1165](https://github.com/PHPOffice/PhpSpreadsheet/pull/1165) +- Formula Parser: Wrong line count for stuff like "MyOtherSheet!A:D" [#1215](https://github.com/PHPOffice/PhpSpreadsheet/issues/1215) +- Call garbage collector after removing a column to prevent stale cached values +- Trying to remove a column that doesn't exist deletes the latest column +- Keep big integer as integer instead of lossely casting to float [#874](https://github.com/PHPOffice/PhpSpreadsheet/pull/874) +- Fix branch pruning handling of non boolean conditions [#1167](https://github.com/PHPOffice/PhpSpreadsheet/pull/1167) +- Fix ODS Reader when no DC namespace are defined [#1182](https://github.com/PHPOffice/PhpSpreadsheet/pull/1182) +- Fixed Functions->ifCondition for allowing <> and empty condition [#1206](https://github.com/PHPOffice/PhpSpreadsheet/pull/1206) +- Validate XIRR inputs and return correct error values [#1120](https://github.com/PHPOffice/PhpSpreadsheet/issues/1120) +- Allow to read xlsx files with exotic workbook names like "workbook2.xml" [#1183](https://github.com/PHPOffice/PhpSpreadsheet/pull/1183) + +## [1.9.0] - 2019-08-17 + +### Changed + +- Drop support for PHP 5.6 and 7.0, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support + +### Added + +- When <br> appears in a table cell, set the cell to wrap [#1071](https://github.com/PHPOffice/PhpSpreadsheet/issues/1071) and [#1070](https://github.com/PHPOffice/PhpSpreadsheet/pull/1070) +- Add MAXIFS, MINIFS, COUNTIFS and Remove MINIF, MAXIF [#1056](https://github.com/PHPOffice/PhpSpreadsheet/issues/1056) +- HLookup needs an ordered list even if range_lookup is set to false [#1055](https://github.com/PHPOffice/PhpSpreadsheet/issues/1055) and [#1076](https://github.com/PHPOffice/PhpSpreadsheet/pull/1076) +- Improve performance of IF function calls via ranch pruning to avoid resolution of every branches [#844](https://github.com/PHPOffice/PhpSpreadsheet/pull/844) +- MATCH function supports `*?~` Excel functionality, when match_type=0 [#1116](https://github.com/PHPOffice/PhpSpreadsheet/issues/1116) +- Allow HTML Reader to accept HTML as a string [#1136](https://github.com/PHPOffice/PhpSpreadsheet/pull/1136) + +### Fixed + +- Fix to AVERAGEIF() function when called with a third argument +- Eliminate duplicate fill none style entries [#1066](https://github.com/PHPOffice/PhpSpreadsheet/issues/1066) +- Fix number format masks containing literal (non-decimal point) dots [#1079](https://github.com/PHPOffice/PhpSpreadsheet/issues/1079) +- Fix number format masks containing named colours that were being misinterpreted as date formats; and add support for masks that fully replace the value with a full text string [#1009](https://github.com/PHPOffice/PhpSpreadsheet/issues/1009) +- Stricter-typed comparison testing in COUNTIF() and COUNTIFS() evaluation [#1046](https://github.com/PHPOffice/PhpSpreadsheet/issues/1046) +- COUPNUM should not return zero when settlement is in the last period [#1020](https://github.com/PHPOffice/PhpSpreadsheet/issues/1020) and [#1021](https://github.com/PHPOffice/PhpSpreadsheet/pull/1021) +- Fix handling of named ranges referencing sheets with spaces or "!" in their title +- Cover `getSheetByName()` with tests for name with quote and spaces [#739](https://github.com/PHPOffice/PhpSpreadsheet/issues/739) +- Best effort to support invalid colspan values in HTML reader - [#878](https://github.com/PHPOffice/PhpSpreadsheet/pull/878) +- Fixes incorrect rows deletion [#868](https://github.com/PHPOffice/PhpSpreadsheet/issues/868) +- MATCH function fix (value search by type, stop search when match_type=-1 and unordered element encountered) [#1116](https://github.com/PHPOffice/PhpSpreadsheet/issues/1116) +- Fix `getCalculatedValue()` error with more than two INDIRECT [#1115](https://github.com/PHPOffice/PhpSpreadsheet/pull/1115) +- Writer\Html did not hide columns [#985](https://github.com/PHPOffice/PhpSpreadsheet/pull/985) + +## [1.8.2] - 2019-07-08 + +### Fixed + +- Uncaught error when opening ods file and properties aren't defined [#1047](https://github.com/PHPOffice/PhpSpreadsheet/issues/1047) +- Xlsx Reader Cell datavalidations bug [#1052](https://github.com/PHPOffice/PhpSpreadsheet/pull/1052) + +## [1.8.1] - 2019-07-02 + +### Fixed + +- Allow nullable theme for Xlsx Style Reader class [#1043](https://github.com/PHPOffice/PhpSpreadsheet/issues/1043) + +## [1.8.0] - 2019-07-01 + +### Security Fix (CVE-2019-12331) + +- Detect double-encoded xml in the Security scanner, and reject as suspicious. +- This change also broadens the scope of the `libxml_disable_entity_loader` setting when reading XML-based formats, so that it is enabled while the xml is being parsed and not simply while it is loaded. + On some versions of PHP, this can cause problems because it is not thread-safe, and can affect other PHP scripts running on the same server. This flag is set to true when instantiating a loader, and back to its original setting when the Reader is no longer in scope, or manually unset. +- Provide a check to identify whether libxml_disable_entity_loader is thread-safe or not. + + `XmlScanner::threadSafeLibxmlDisableEntityLoaderAvailability()` +- Provide an option to disable the libxml_disable_entity_loader call through settings. This is not recommended as it reduces the security of the XML-based readers, and should only be used if you understand the consequences and have no other choice. + +### Added + +- Added support for the SWITCH function [#963](https://github.com/PHPOffice/PhpSpreadsheet/issues/963) and [#983](https://github.com/PHPOffice/PhpSpreadsheet/pull/983) +- Add accounting number format style [#974](https://github.com/PHPOffice/PhpSpreadsheet/pull/974) + +### Fixed + +- Whitelist `tsv` extension when opening CSV files [#429](https://github.com/PHPOffice/PhpSpreadsheet/issues/429) +- Fix a SUMIF warning with some versions of PHP when having different length of arrays provided as input [#873](https://github.com/PHPOffice/PhpSpreadsheet/pull/873) +- Fix incorrectly handled backslash-escaped space characters in number format + +## [1.7.0] - 2019-05-26 + +- Added support for inline styles in Html reader (borders, alignment, width, height) +- QuotedText cells no longer treated as formulae if the content begins with a `=` +- Clean handling for DDE in formulae + +### Fixed + +- Fix handling for escaped enclosures and new lines in CSV Separator Inference +- Fix MATCH an error was appearing when comparing strings against 0 (always true) +- Fix wrong calculation of highest column with specified row [#700](https://github.com/PHPOffice/PhpSpreadsheet/issues/700) +- Fix VLOOKUP +- Fix return type hint + +## [1.6.0] - 2019-01-02 + +### Added + +- Refactored Matrix Functions to use external Matrix library +- Possibility to specify custom colors of values for pie and donut charts [#768](https://github.com/PHPOffice/PhpSpreadsheet/pull/768) + +### Fixed + +- Improve XLSX parsing speed if no readFilter is applied [#772](https://github.com/PHPOffice/PhpSpreadsheet/issues/772) +- Fix column names if read filter calls in XLSX reader skip columns [#777](https://github.com/PHPOffice/PhpSpreadsheet/pull/777) +- XLSX reader can now ignore blank cells, using the setReadEmptyCells(false) method. [#810](https://github.com/PHPOffice/PhpSpreadsheet/issues/810) +- Fix LOOKUP function which was breaking on edge cases [#796](https://github.com/PHPOffice/PhpSpreadsheet/issues/796) +- Fix VLOOKUP with exact matches [#809](https://github.com/PHPOffice/PhpSpreadsheet/pull/809) +- Support COUNTIFS multiple arguments [#830](https://github.com/PHPOffice/PhpSpreadsheet/pull/830) +- Change `libxml_disable_entity_loader()` as shortly as possible [#819](https://github.com/PHPOffice/PhpSpreadsheet/pull/819) +- Improved memory usage and performance when loading large spreadsheets [#822](https://github.com/PHPOffice/PhpSpreadsheet/pull/822) +- Improved performance when loading large spreadsheets [#825](https://github.com/PHPOffice/PhpSpreadsheet/pull/825) +- Improved performance when loading large spreadsheets [#824](https://github.com/PHPOffice/PhpSpreadsheet/pull/824) +- Fix color from CSS when reading from HTML [#831](https://github.com/PHPOffice/PhpSpreadsheet/pull/831) +- Fix infinite loop when reading invalid ODS files [#832](https://github.com/PHPOffice/PhpSpreadsheet/pull/832) +- Fix time format for duration is incorrect [#666](https://github.com/PHPOffice/PhpSpreadsheet/pull/666) +- Fix iconv unsupported `//IGNORE//TRANSLIT` on IBM i [#791](https://github.com/PHPOffice/PhpSpreadsheet/issues/791) + +### Changed + +- `master` is the new default branch, `develop` does not exist anymore + +## [1.5.2] - 2018-11-25 + +### Security + +- Improvements to the design of the XML Security Scanner [#771](https://github.com/PHPOffice/PhpSpreadsheet/issues/771) + +## [1.5.1] - 2018-11-20 + +### Security + +- Fix and improve XXE security scanning for XML-based and HTML Readers [#771](https://github.com/PHPOffice/PhpSpreadsheet/issues/771) + +### Added + +- Support page margin in mPDF [#750](https://github.com/PHPOffice/PhpSpreadsheet/issues/750) + +### Fixed + +- Support numeric condition in SUMIF, SUMIFS, AVERAGEIF, COUNTIF, MAXIF and MINIF [#683](https://github.com/PHPOffice/PhpSpreadsheet/issues/683) +- SUMIFS containing multiple conditions [#704](https://github.com/PHPOffice/PhpSpreadsheet/issues/704) +- Csv reader avoid notice when the file is empty [#743](https://github.com/PHPOffice/PhpSpreadsheet/pull/743) +- Fix print area parser for XLSX reader [#734](https://github.com/PHPOffice/PhpSpreadsheet/pull/734) +- Support overriding `DefaultValueBinder::dataTypeForValue()` without overriding `DefaultValueBinder::bindValue()` [#735](https://github.com/PHPOffice/PhpSpreadsheet/pull/735) +- Mpdf export can exceed pcre.backtrack_limit [#637](https://github.com/PHPOffice/PhpSpreadsheet/issues/637) +- Fix index overflow on data values array [#748](https://github.com/PHPOffice/PhpSpreadsheet/pull/748) + +## [1.5.0] - 2018-10-21 + +### Added + +- PHP 7.3 support +- Add the DAYS() function [#594](https://github.com/PHPOffice/PhpSpreadsheet/pull/594) + +### Fixed + +- Sheet title can contain exclamation mark [#325](https://github.com/PHPOffice/PhpSpreadsheet/issues/325) +- Xls file cause the exception during open by Xls reader [#402](https://github.com/PHPOffice/PhpSpreadsheet/issues/402) +- Skip non numeric value in SUMIF [#618](https://github.com/PHPOffice/PhpSpreadsheet/pull/618) +- OFFSET should allow omitted height and width [#561](https://github.com/PHPOffice/PhpSpreadsheet/issues/561) +- Correctly determine delimiter when CSV contains line breaks inside enclosures [#716](https://github.com/PHPOffice/PhpSpreadsheet/issues/716) + +## [1.4.1] - 2018-09-30 + +### Fixed + +- Remove locale from formatting string [#644](https://github.com/PHPOffice/PhpSpreadsheet/pull/644) +- Allow iterators to go out of bounds with prev [#587](https://github.com/PHPOffice/PhpSpreadsheet/issues/587) +- Fix warning when reading xlsx without styles [#631](https://github.com/PHPOffice/PhpSpreadsheet/pull/631) +- Fix broken sample links on windows due to $baseDir having backslash [#653](https://github.com/PHPOffice/PhpSpreadsheet/pull/653) + +## [1.4.0] - 2018-08-06 + +### Added + +- Add excel function EXACT(value1, value2) support [#595](https://github.com/PHPOffice/PhpSpreadsheet/pull/595) +- Support workbook view attributes for Xlsx format [#523](https://github.com/PHPOffice/PhpSpreadsheet/issues/523) +- Read and write hyperlink for drawing image [#490](https://github.com/PHPOffice/PhpSpreadsheet/pull/490) +- Added calculation engine support for the new bitwise functions that were added in MS Excel 2013 + - BITAND() Returns a Bitwise 'And' of two numbers + - BITOR() Returns a Bitwise 'Or' of two number + - BITXOR() Returns a Bitwise 'Exclusive Or' of two numbers + - BITLSHIFT() Returns a number shifted left by a specified number of bits + - BITRSHIFT() Returns a number shifted right by a specified number of bits +- Added calculation engine support for other new functions that were added in MS Excel 2013 and MS Excel 2016 + - Text Functions + - CONCAT() Synonym for CONCATENATE() + - NUMBERVALUE() Converts text to a number, in a locale-independent way + - UNICHAR() Synonym for CHAR() in PHPSpreadsheet, which has always used UTF-8 internally + - UNIORD() Synonym for ORD() in PHPSpreadsheet, which has always used UTF-8 internally + - TEXTJOIN() Joins together two or more text strings, separated by a delimiter + - Logical Functions + - XOR() Returns a logical Exclusive Or of all arguments + - Date/Time Functions + - ISOWEEKNUM() Returns the ISO 8601 week number of the year for a given date + - Lookup and Reference Functions + - FORMULATEXT() Returns a formula as a string + - Financial Functions + - PDURATION() Calculates the number of periods required for an investment to reach a specified value + - RRI() Calculates the interest rate required for an investment to grow to a specified future value + - Engineering Functions + - ERF.PRECISE() Returns the error function integrated between 0 and a supplied limit + - ERFC.PRECISE() Synonym for ERFC + - Math and Trig Functions + - SEC() Returns the secant of an angle + - SECH() Returns the hyperbolic secant of an angle + - CSC() Returns the cosecant of an angle + - CSCH() Returns the hyperbolic cosecant of an angle + - COT() Returns the cotangent of an angle + - COTH() Returns the hyperbolic cotangent of an angle + - ACOT() Returns the cotangent of an angle + - ACOTH() Returns the hyperbolic cotangent of an angle +- Refactored Complex Engineering Functions to use external complex number library +- Added calculation engine support for the new complex number functions that were added in MS Excel 2013 + - IMCOSH() Returns the hyperbolic cosine of a complex number + - IMCOT() Returns the cotangent of a complex number + - IMCSC() Returns the cosecant of a complex number + - IMCSCH() Returns the hyperbolic cosecant of a complex number + - IMSEC() Returns the secant of a complex number + - IMSECH() Returns the hyperbolic secant of a complex number + - IMSINH() Returns the hyperbolic sine of a complex number + - IMTAN() Returns the tangent of a complex number + +### Fixed + +- Fix ISFORMULA() function to work with a cell reference to another worksheet +- Xlsx reader crashed when reading a file with workbook protection [#553](https://github.com/PHPOffice/PhpSpreadsheet/pull/553) +- Cell formats with escaped spaces were causing incorrect date formatting [#557](https://github.com/PHPOffice/PhpSpreadsheet/issues/557) +- Could not open CSV file containing HTML fragment [#564](https://github.com/PHPOffice/PhpSpreadsheet/issues/564) +- Exclude the vendor folder in migration [#481](https://github.com/PHPOffice/PhpSpreadsheet/issues/481) +- Chained operations on cell ranges involving borders operated on last cell only [#428](https://github.com/PHPOffice/PhpSpreadsheet/issues/428) +- Avoid memory exhaustion when cloning worksheet with a drawing [#437](https://github.com/PHPOffice/PhpSpreadsheet/issues/437) +- Migration tool keep variables containing $PHPExcel untouched [#598](https://github.com/PHPOffice/PhpSpreadsheet/issues/598) +- Rowspans/colspans were incorrect when adding worksheet using loadIntoExisting [#619](https://github.com/PHPOffice/PhpSpreadsheet/issues/619) + +## [1.3.1] - 2018-06-12 + +### Fixed + +- Ranges across Z and AA columns incorrectly threw an exception [#545](https://github.com/PHPOffice/PhpSpreadsheet/issues/545) + +## [1.3.0] - 2018-06-10 + +### Added + +- Support to read Xlsm templates with form elements, macros, printer settings, protected elements and back compatibility drawing, and save result without losing important elements of document [#435](https://github.com/PHPOffice/PhpSpreadsheet/issues/435) +- Expose sheet title maximum length as `Worksheet::SHEET_TITLE_MAXIMUM_LENGTH` [#482](https://github.com/PHPOffice/PhpSpreadsheet/issues/482) +- Allow escape character to be set in CSV reader [#492](https://github.com/PHPOffice/PhpSpreadsheet/issues/492) + +### Fixed + +- Subtotal 9 in a group that has other subtotals 9 exclude the totals of the other subtotals in the range [#332](https://github.com/PHPOffice/PhpSpreadsheet/issues/332) +- `Helper\Html` support UTF-8 HTML input [#444](https://github.com/PHPOffice/PhpSpreadsheet/issues/444) +- Xlsx loaded an extra empty comment for each real comment [#375](https://github.com/PHPOffice/PhpSpreadsheet/issues/375) +- Xlsx reader do not read rows and columns filtered out in readFilter at all [#370](https://github.com/PHPOffice/PhpSpreadsheet/issues/370) +- Make newer Excel versions properly recalculate formulas on document open [#456](https://github.com/PHPOffice/PhpSpreadsheet/issues/456) +- `Coordinate::extractAllCellReferencesInRange()` throws an exception for an invalid range [#519](https://github.com/PHPOffice/PhpSpreadsheet/issues/519) +- Fixed parsing of conditionals in COUNTIF functions [#526](https://github.com/PHPOffice/PhpSpreadsheet/issues/526) +- Corruption errors for saved Xlsx docs with frozen panes [#532](https://github.com/PHPOffice/PhpSpreadsheet/issues/532) + +## [1.2.1] - 2018-04-10 + +### Fixed + +- Plain text and richtext mixed in same cell can be read [#442](https://github.com/PHPOffice/PhpSpreadsheet/issues/442) + +## [1.2.0] - 2018-03-04 + +### Added + +- HTML writer creates a generator meta tag [#312](https://github.com/PHPOffice/PhpSpreadsheet/issues/312) +- Support invalid zoom value in XLSX format [#350](https://github.com/PHPOffice/PhpSpreadsheet/pull/350) +- Support for `_xlfn.` prefixed functions and `ISFORMULA`, `MODE.SNGL`, `STDEV.S`, `STDEV.P` [#390](https://github.com/PHPOffice/PhpSpreadsheet/pull/390) + +### Fixed + +- Avoid potentially unsupported PSR-16 cache keys [#354](https://github.com/PHPOffice/PhpSpreadsheet/issues/354) +- Check for MIME type to know if CSV reader can read a file [#167](https://github.com/PHPOffice/PhpSpreadsheet/issues/167) +- Use proper € symbol for currency format [#379](https://github.com/PHPOffice/PhpSpreadsheet/pull/379) +- Read printing area correctly when skipping some sheets [#371](https://github.com/PHPOffice/PhpSpreadsheet/issues/371) +- Avoid incorrectly overwriting calculated value type [#394](https://github.com/PHPOffice/PhpSpreadsheet/issues/394) +- Select correct cell when calling freezePane [#389](https://github.com/PHPOffice/PhpSpreadsheet/issues/389) +- `setStrikethrough()` did not set the font [#403](https://github.com/PHPOffice/PhpSpreadsheet/issues/403) + +## [1.1.0] - 2018-01-28 + +### Added + +- Support for PHP 7.2 +- Support cell comments in HTML writer and reader [#308](https://github.com/PHPOffice/PhpSpreadsheet/issues/308) +- Option to stop at a conditional styling, if it matches (only XLSX format) [#292](https://github.com/PHPOffice/PhpSpreadsheet/pull/292) +- Support for line width for data series when rendering Xlsx [#329](https://github.com/PHPOffice/PhpSpreadsheet/pull/329) + +### Fixed + +- Better auto-detection of CSV separators [#305](https://github.com/PHPOffice/PhpSpreadsheet/issues/305) +- Support for shape style ending with `;` [#304](https://github.com/PHPOffice/PhpSpreadsheet/issues/304) +- Freeze Panes takes wrong coordinates for XLSX [#322](https://github.com/PHPOffice/PhpSpreadsheet/issues/322) +- `COLUMNS` and `ROWS` functions crashed in some cases [#336](https://github.com/PHPOffice/PhpSpreadsheet/issues/336) +- Support XML file without styles [#331](https://github.com/PHPOffice/PhpSpreadsheet/pull/331) +- Cell coordinates which are already a range cause an exception [#319](https://github.com/PHPOffice/PhpSpreadsheet/issues/319) + +## [1.0.0] - 2017-12-25 + +### Added + +- Support to write merged cells in ODS format [#287](https://github.com/PHPOffice/PhpSpreadsheet/issues/287) +- Able to set the `topLeftCell` in freeze panes [#261](https://github.com/PHPOffice/PhpSpreadsheet/pull/261) +- Support `DateTimeImmutable` as cell value +- Support migration of prefixed classes + +### Fixed + +- Can read very small HTML files [#194](https://github.com/PHPOffice/PhpSpreadsheet/issues/194) +- Written DataValidation was corrupted [#290](https://github.com/PHPOffice/PhpSpreadsheet/issues/290) +- Date format compatible with both LibreOffice and Excel [#298](https://github.com/PHPOffice/PhpSpreadsheet/issues/298) + +### BREAKING CHANGE + +- Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART`. + +## [1.0.0-beta2] - 2017-11-26 + +### Added + +- Support for chart fill color - @CrazyBite [#158](https://github.com/PHPOffice/PhpSpreadsheet/pull/158) +- Support for read Hyperlink for xml - @GreatHumorist [#223](https://github.com/PHPOffice/PhpSpreadsheet/pull/223) +- Support for cell value validation according to data validation rules - @SailorMax [#257](https://github.com/PHPOffice/PhpSpreadsheet/pull/257) +- Support for custom implementation, or configuration, of PDF libraries - @SailorMax [#266](https://github.com/PHPOffice/PhpSpreadsheet/pull/266) + +### Changed + +- Merge data-validations to reduce written worksheet size - @billblume [#131](https://github.com/PHPOffice/PhpSpreadSheet/issues/131) +- Throws exception if a XML file is invalid - @GreatHumorist [#222](https://github.com/PHPOffice/PhpSpreadsheet/pull/222) +- Upgrade to mPDF 7.0+ [#144](https://github.com/PHPOffice/PhpSpreadsheet/issues/144) + +### Fixed + +- Control characters in cell values are automatically escaped [#212](https://github.com/PHPOffice/PhpSpreadsheet/issues/212) +- Prevent color changing when copy/pasting xls files written by PhpSpreadsheet to another file - @al-lala [#218](https://github.com/PHPOffice/PhpSpreadsheet/issues/218) +- Add cell reference automatic when there is no cell reference('r' attribute) in Xlsx file. - @GreatHumorist [#225](https://github.com/PHPOffice/PhpSpreadsheet/pull/225) Refer to [#201](https://github.com/PHPOffice/PhpSpreadsheet/issues/201) +- `Reader\Xlsx::getFromZipArchive()` function return false if the zip entry could not be located. - @anton-harvey [#268](https://github.com/PHPOffice/PhpSpreadsheet/pull/268) + +### BREAKING CHANGE + +- Extracted coordinate method to dedicate class [migration guide](./docs/topics/migration-from-PHPExcel.md). +- Column indexes are based on 1, see the [migration guide](./docs/topics/migration-from-PHPExcel.md). +- Standardization of array keys used for style, see the [migration guide](./docs/topics/migration-from-PHPExcel.md). +- Easier usage of PDF writers, and other custom readers and writers, see the [migration guide](./docs/topics/migration-from-PHPExcel.md). +- Easier usage of chart renderers, see the [migration guide](./docs/topics/migration-from-PHPExcel.md). +- Rename a few more classes to keep them in their related namespaces: + - `CalcEngine` => `Calculation\Engine` + - `PhpSpreadsheet\Calculation` => `PhpSpreadsheet\Calculation\Calculation` + - `PhpSpreadsheet\Cell` => `PhpSpreadsheet\Cell\Cell` + - `PhpSpreadsheet\Chart` => `PhpSpreadsheet\Chart\Chart` + - `PhpSpreadsheet\RichText` => `PhpSpreadsheet\RichText\RichText` + - `PhpSpreadsheet\Style` => `PhpSpreadsheet\Style\Style` + - `PhpSpreadsheet\Worksheet` => `PhpSpreadsheet\Worksheet\Worksheet` + +## [1.0.0-beta] - 2017-08-17 + +### Added + +- Initial implementation of SUMIFS() function +- Additional codepages +- MemoryDrawing not working in HTML writer [#808](https://github.com/PHPOffice/PHPExcel/issues/808) +- CSV Reader can auto-detect the separator used in file [#141](https://github.com/PHPOffice/PhpSpreadsheet/pull/141) +- HTML Reader supports some basic inline styles [#180](https://github.com/PHPOffice/PhpSpreadsheet/pull/180) + +### Changed + +- Start following [SemVer](https://semver.org) properly. + +### Fixed + +- Fix to getCell() method when cell reference includes a worksheet reference - @MarkBaker +- Ignore inlineStr type if formula element exists - @ncrypthic [#570](https://github.com/PHPOffice/PHPExcel/issues/570) +- Excel 2007 Reader freezes because of conditional formatting - @rentalhost [#575](https://github.com/PHPOffice/PHPExcel/issues/575) +- Readers will now parse files containing worksheet titles over 31 characters [#176](https://github.com/PHPOffice/PhpSpreadsheet/pull/176) + +### General + +- Whitespace after toRichTextObject() - @MarkBaker [#554](https://github.com/PHPOffice/PHPExcel/issues/554) +- Optimize vlookup() sort - @umpirsky [#548](https://github.com/PHPOffice/PHPExcel/issues/548) +- c:max and c:min elements shall NOT be inside c:orientation elements - @vitalyrepin [#869](https://github.com/PHPOffice/PHPExcel/pull/869) +- Implement actual timezone adjustment into PHPExcel_Shared_Date::PHPToExcel - @sim642 [#489](https://github.com/PHPOffice/PHPExcel/pull/489) + +### BREAKING CHANGE + +- Introduction of namespaces for all classes, eg: `PHPExcel_Calculation_Functions` becomes `PhpOffice\PhpSpreadsheet\Calculation\Functions` +- Some classes were renamed for clarity and/or consistency: + +For a comprehensive list of all class changes, and a semi-automated migration path, read the [migration guide](./docs/topics/migration-from-PHPExcel.md). + +- Dropped `PHPExcel_Calculation_Functions::VERSION()`. Composer or git should be used to know the version. +- Dropped `PHPExcel_Settings::setPdfRenderer()` and `PHPExcel_Settings::setPdfRenderer()`. Composer should be used to autoload PDF libs. +- Dropped support for HHVM + +## Previous versions of PHPExcel + +The changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md). diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md new file mode 100755 index 0000000..aed13fe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Want to contribute? + +If you would like to contribute, here are some notes and guidelines: + + - All new development happens on feature/fix branches, and are then merged to the `master` branch once stable; so the `master` branch is always the most up-to-date, working code + - Tagged releases are made from the `master` branch + - If you are going to be submitting a pull request, please fork from `master`, and submit your pull request back as a fix/feature branch referencing the GitHub issue number + - Code style might be automatically fixed by `composer fix` + - All code changes must be validated by `composer check` + - [Helpful article about forking](https://help.github.com/articles/fork-a-repo/ "Forking a GitHub repository") + - [Helpful article about pull requests](https://help.github.com/articles/using-pull-requests/ "Pull Requests") diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/LICENSE b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/LICENSE new file mode 100755 index 0000000..3ec5723 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 PhpSpreadsheet Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/README.md new file mode 100755 index 0000000..893b378 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/README.md @@ -0,0 +1,29 @@ +# PhpSpreadsheet + +[![Build Status](https://travis-ci.org/PHPOffice/PhpSpreadsheet.svg?branch=master)](https://travis-ci.org/PHPOffice/PhpSpreadsheet) +[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master) +[![Total Downloads](https://poser.pugx.org/phpoffice/phpspreadsheet/downloads.png)](https://packagist.org/packages/phpoffice/phpspreadsheet) +[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpspreadsheet/v/stable.png)](https://packagist.org/packages/phpoffice/phpspreadsheet) +[![License](https://poser.pugx.org/phpoffice/phpspreadsheet/license.png)](https://packagist.org/packages/phpoffice/phpspreadsheet) +[![Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PhpSpreadsheet) + +PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc. + +## Documentation + +Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet). + +Please ask your support questions on [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet), or have a quick chat on [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet). + +## PHPExcel vs PhpSpreadsheet ? + +PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.). + +Because all efforts have shifted to PhpSpreadsheet, PHPExcel will no longer be maintained. All contributions for PHPExcel, patches and new features, should target PhpSpreadsheet `master` branch. + +Do you need to migrate? There is [an automated tool](/docs/topics/migration-from-PHPExcel.md) for that. + +## License + +PhpSpreadsheet is licensed under [MIT](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/LICENSE). diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/composer.json new file mode 100755 index 0000000..d037994 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/composer.json @@ -0,0 +1,89 @@ +{ + "name": "phpoffice/phpspreadsheet", + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "keywords": ["PHP", "OpenXML", "Excel", "xlsx", "xls", "ods", "gnumeric", "spreadsheet"], + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "scripts": { + "check": [ + "php-cs-fixer fix --ansi --dry-run --diff", + "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n", + "phpunit --color=always" + ], + "fix": [ + "php-cs-fixer fix --ansi" + ], + "versions": [ + "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.2- -n" + ] + }, + "require": { + "php": "^7.2", + "ext-ctype": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-fileinfo": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-SimpleXML": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.2", + "psr/simple-cache": "^1.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers" + }, + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "autoload-dev": { + "psr-4": { + "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Calculation.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Calculation.php new file mode 100755 index 0000000..a8f93a8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Calculation.php @@ -0,0 +1,4844 @@ +=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?\b([a-z]{1,3})\$?(\d{1,7})(?![\w.])'; + // Named Range of cells + const CALCULATION_REGEXP_NAMEDRANGE = '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_\p{L}][_\p{L}\p{N}\.]*)'; + // Error + const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; + + /** constants */ + const RETURN_ARRAY_AS_ERROR = 'error'; + const RETURN_ARRAY_AS_VALUE = 'value'; + const RETURN_ARRAY_AS_ARRAY = 'array'; + + const FORMULA_OPEN_FUNCTION_BRACE = '{'; + const FORMULA_CLOSE_FUNCTION_BRACE = '}'; + const FORMULA_STRING_QUOTE = '"'; + + private static $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE; + + /** + * Instance of this class. + * + * @var Calculation + */ + private static $instance; + + /** + * Instance of the spreadsheet this Calculation Engine is using. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Calculation cache. + * + * @var array + */ + private $calculationCache = []; + + /** + * Calculation cache enabled. + * + * @var bool + */ + private $calculationCacheEnabled = true; + + /** + * Used to generate unique store keys. + * + * @var int + */ + private $branchStoreKeyCounter = 0; + + private $branchPruningEnabled = true; + + /** + * List of operators that can be used within formulae + * The true/false value indicates whether it is a binary operator or a unary operator. + * + * @var array + */ + private static $operators = [ + '+' => true, '-' => true, '*' => true, '/' => true, + '^' => true, '&' => true, '%' => false, '~' => false, + '>' => true, '<' => true, '=' => true, '>=' => true, + '<=' => true, '<>' => true, '|' => true, ':' => true, + ]; + + /** + * List of binary operators (those that expect two operands). + * + * @var array + */ + private static $binaryOperators = [ + '+' => true, '-' => true, '*' => true, '/' => true, + '^' => true, '&' => true, '>' => true, '<' => true, + '=' => true, '>=' => true, '<=' => true, '<>' => true, + '|' => true, ':' => true, + ]; + + /** + * The debug log generated by the calculation engine. + * + * @var Logger + */ + private $debugLog; + + /** + * Flag to determine how formula errors should be handled + * If true, then a user error will be triggered + * If false, then an exception will be thrown. + * + * @var bool + */ + public $suppressFormulaErrors = false; + + /** + * Error message for any error that was raised/thrown by the calculation engine. + * + * @var string + */ + public $formulaError; + + /** + * An array of the nested cell references accessed by the calculation engine, used for the debug log. + * + * @var CyclicReferenceStack + */ + private $cyclicReferenceStack; + + private $cellStack = []; + + /** + * Current iteration counter for cyclic formulae + * If the value is 0 (or less) then cyclic formulae will throw an exception, + * otherwise they will iterate to the limit defined here before returning a result. + * + * @var int + */ + private $cyclicFormulaCounter = 1; + + private $cyclicFormulaCell = ''; + + /** + * Number of iterations for cyclic formulae. + * + * @var int + */ + public $cyclicFormulaCount = 1; + + /** + * Epsilon Precision used for comparisons in calculations. + * + * @var float + */ + private $delta = 0.1e-12; + + /** + * The current locale setting. + * + * @var string + */ + private static $localeLanguage = 'en_us'; // US English (default locale) + + /** + * List of available locale settings + * Note that this is read for the locale subdirectory only when requested. + * + * @var string[] + */ + private static $validLocaleLanguages = [ + 'en', // English (default language) + ]; + + /** + * Locale-specific argument separator for function arguments. + * + * @var string + */ + private static $localeArgumentSeparator = ','; + + private static $localeFunctions = []; + + /** + * Locale-specific translations for Excel constants (True, False and Null). + * + * @var string[] + */ + public static $localeBoolean = [ + 'TRUE' => 'TRUE', + 'FALSE' => 'FALSE', + 'NULL' => 'NULL', + ]; + + /** + * Excel constant string translations to their PHP equivalents + * Constant conversion from text name/value to actual (datatyped) value. + * + * @var string[] + */ + private static $excelConstants = [ + 'TRUE' => true, + 'FALSE' => false, + 'NULL' => null, + ]; + + // PhpSpreadsheet functions + private static $phpSpreadsheetFunctions = [ + 'ABS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'abs', + 'argumentCount' => '1', + ], + 'ACCRINT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ACCRINT'], + 'argumentCount' => '4-7', + ], + 'ACCRINTM' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ACCRINTM'], + 'argumentCount' => '3-5', + ], + 'ACOS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'acos', + 'argumentCount' => '1', + ], + 'ACOSH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'acosh', + 'argumentCount' => '1', + ], + 'ACOT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ACOT'], + 'argumentCount' => '1', + ], + 'ACOTH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ACOTH'], + 'argumentCount' => '1', + ], + 'ADDRESS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'cellAddress'], + 'argumentCount' => '2-5', + ], + 'AMORDEGRC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'AMORDEGRC'], + 'argumentCount' => '6,7', + ], + 'AMORLINC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'AMORLINC'], + 'argumentCount' => '6,7', + ], + 'AND' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalAnd'], + 'argumentCount' => '1+', + ], + 'ARABIC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ARABIC'], + 'argumentCount' => '1', + ], + 'AREAS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ASC' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ASIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'asin', + 'argumentCount' => '1', + ], + 'ASINH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'asinh', + 'argumentCount' => '1', + ], + 'ATAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'atan', + 'argumentCount' => '1', + ], + 'ATAN2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ATAN2'], + 'argumentCount' => '2', + ], + 'ATANH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'atanh', + 'argumentCount' => '1', + ], + 'AVEDEV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVEDEV'], + 'argumentCount' => '1+', + ], + 'AVERAGE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGE'], + 'argumentCount' => '1+', + ], + 'AVERAGEA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGEA'], + 'argumentCount' => '1+', + ], + 'AVERAGEIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGEIF'], + 'argumentCount' => '2,3', + ], + 'AVERAGEIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3+', + ], + 'BAHTTEXT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'BASE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'BASE'], + 'argumentCount' => '2,3', + ], + 'BESSELI' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELI'], + 'argumentCount' => '2', + ], + 'BESSELJ' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELJ'], + 'argumentCount' => '2', + ], + 'BESSELK' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELK'], + 'argumentCount' => '2', + ], + 'BESSELY' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELY'], + 'argumentCount' => '2', + ], + 'BETADIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BETADIST'], + 'argumentCount' => '3-5', + ], + 'BETAINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BETAINV'], + 'argumentCount' => '3-5', + ], + 'BIN2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTODEC'], + 'argumentCount' => '1', + ], + 'BIN2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTOHEX'], + 'argumentCount' => '1,2', + ], + 'BIN2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTOOCT'], + 'argumentCount' => '1,2', + ], + 'BINOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BINOMDIST'], + 'argumentCount' => '4', + ], + 'BITAND' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITAND'], + 'argumentCount' => '2', + ], + 'BITOR' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITOR'], + 'argumentCount' => '2', + ], + 'BITXOR' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITOR'], + 'argumentCount' => '2', + ], + 'BITLSHIFT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITLSHIFT'], + 'argumentCount' => '2', + ], + 'BITRSHIFT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITRSHIFT'], + 'argumentCount' => '2', + ], + 'CEILING' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CEILING'], + 'argumentCount' => '2', + ], + 'CELL' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1,2', + ], + 'CHAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CHARACTER'], + 'argumentCount' => '1', + ], + 'CHIDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CHIDIST'], + 'argumentCount' => '2', + ], + 'CHIINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CHIINV'], + 'argumentCount' => '2', + ], + 'CHITEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'CHOOSE' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'CHOOSE'], + 'argumentCount' => '2+', + ], + 'CLEAN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TRIMNONPRINTABLE'], + 'argumentCount' => '1', + ], + 'CODE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'ASCIICODE'], + 'argumentCount' => '1', + ], + 'COLUMN' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'COLUMN'], + 'argumentCount' => '-1', + 'passByReference' => [true], + ], + 'COLUMNS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'COLUMNS'], + 'argumentCount' => '1', + ], + 'COMBIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COMBIN'], + 'argumentCount' => '2', + ], + 'COMPLEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'COMPLEX'], + 'argumentCount' => '2,3', + ], + 'CONCAT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CONCATENATE'], + 'argumentCount' => '1+', + ], + 'CONCATENATE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CONCATENATE'], + 'argumentCount' => '1+', + ], + 'CONFIDENCE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CONFIDENCE'], + 'argumentCount' => '3', + ], + 'CONVERT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'CONVERTUOM'], + 'argumentCount' => '3', + ], + 'CORREL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CORREL'], + 'argumentCount' => '2', + ], + 'COS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'cos', + 'argumentCount' => '1', + ], + 'COSH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'cosh', + 'argumentCount' => '1', + ], + 'COT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COT'], + 'argumentCount' => '1', + ], + 'COTH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COTH'], + 'argumentCount' => '1', + ], + 'COUNT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNT'], + 'argumentCount' => '1+', + ], + 'COUNTA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTA'], + 'argumentCount' => '1+', + ], + 'COUNTBLANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTBLANK'], + 'argumentCount' => '1', + ], + 'COUNTIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTIF'], + 'argumentCount' => '2', + ], + 'COUNTIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTIFS'], + 'argumentCount' => '2+', + ], + 'COUPDAYBS' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYBS'], + 'argumentCount' => '3,4', + ], + 'COUPDAYS' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYS'], + 'argumentCount' => '3,4', + ], + 'COUPDAYSNC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYSNC'], + 'argumentCount' => '3,4', + ], + 'COUPNCD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPNCD'], + 'argumentCount' => '3,4', + ], + 'COUPNUM' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPNUM'], + 'argumentCount' => '3,4', + ], + 'COUPPCD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPPCD'], + 'argumentCount' => '3,4', + ], + 'COVAR' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COVAR'], + 'argumentCount' => '2', + ], + 'CRITBINOM' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CRITBINOM'], + 'argumentCount' => '3', + ], + 'CSC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CSC'], + 'argumentCount' => '1', + ], + 'CSCH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CSCH'], + 'argumentCount' => '1', + ], + 'CUBEKPIMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEMEMBERPROPERTY' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBERANKEDMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBESET' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBESETCOUNT' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEVALUE' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUMIPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'CUMIPMT'], + 'argumentCount' => '6', + ], + 'CUMPRINC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'CUMPRINC'], + 'argumentCount' => '6', + ], + 'DATE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATE'], + 'argumentCount' => '3', + ], + 'DATEDIF' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATEDIF'], + 'argumentCount' => '2,3', + ], + 'DATEVALUE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATEVALUE'], + 'argumentCount' => '1', + ], + 'DAVERAGE' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DAVERAGE'], + 'argumentCount' => '3', + ], + 'DAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYOFMONTH'], + 'argumentCount' => '1', + ], + 'DAYS' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYS'], + 'argumentCount' => '2', + ], + 'DAYS360' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYS360'], + 'argumentCount' => '2,3', + ], + 'DB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DB'], + 'argumentCount' => '4,5', + ], + 'DCOUNT' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DCOUNT'], + 'argumentCount' => '3', + ], + 'DCOUNTA' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DCOUNTA'], + 'argumentCount' => '3', + ], + 'DDB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DDB'], + 'argumentCount' => '4,5', + ], + 'DEC2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOBIN'], + 'argumentCount' => '1,2', + ], + 'DEC2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOHEX'], + 'argumentCount' => '1,2', + ], + 'DEC2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOOCT'], + 'argumentCount' => '1,2', + ], + 'DEGREES' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'rad2deg', + 'argumentCount' => '1', + ], + 'DELTA' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DELTA'], + 'argumentCount' => '1,2', + ], + 'DEVSQ' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'DEVSQ'], + 'argumentCount' => '1+', + ], + 'DGET' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DGET'], + 'argumentCount' => '3', + ], + 'DISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DISC'], + 'argumentCount' => '4,5', + ], + 'DMAX' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DMAX'], + 'argumentCount' => '3', + ], + 'DMIN' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DMIN'], + 'argumentCount' => '3', + ], + 'DOLLAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'DOLLAR'], + 'argumentCount' => '1,2', + ], + 'DOLLARDE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DOLLARDE'], + 'argumentCount' => '2', + ], + 'DOLLARFR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DOLLARFR'], + 'argumentCount' => '2', + ], + 'DPRODUCT' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DPRODUCT'], + 'argumentCount' => '3', + ], + 'DSTDEV' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSTDEV'], + 'argumentCount' => '3', + ], + 'DSTDEVP' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSTDEVP'], + 'argumentCount' => '3', + ], + 'DSUM' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSUM'], + 'argumentCount' => '3', + ], + 'DURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5,6', + ], + 'DVAR' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DVAR'], + 'argumentCount' => '3', + ], + 'DVARP' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DVARP'], + 'argumentCount' => '3', + ], + 'EDATE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'EDATE'], + 'argumentCount' => '2', + ], + 'EFFECT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'EFFECT'], + 'argumentCount' => '2', + ], + 'EOMONTH' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'EOMONTH'], + 'argumentCount' => '2', + ], + 'ERF' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERF'], + 'argumentCount' => '1,2', + ], + 'ERF.PRECISE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFPRECISE'], + 'argumentCount' => '1', + ], + 'ERFC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFC'], + 'argumentCount' => '1', + ], + 'ERFC.PRECISE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFC'], + 'argumentCount' => '1', + ], + 'ERROR.TYPE' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'errorType'], + 'argumentCount' => '1', + ], + 'EVEN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'EVEN'], + 'argumentCount' => '1', + ], + 'EXACT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'EXACT'], + 'argumentCount' => '2', + ], + 'EXP' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'exp', + 'argumentCount' => '1', + ], + 'EXPONDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'EXPONDIST'], + 'argumentCount' => '3', + ], + 'FACT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FACT'], + 'argumentCount' => '1', + ], + 'FACTDOUBLE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FACTDOUBLE'], + 'argumentCount' => '1', + ], + 'FALSE' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'FALSE'], + 'argumentCount' => '0', + ], + 'FDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3', + ], + 'FIND' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'FINDB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'FINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3', + ], + 'FISHER' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FISHER'], + 'argumentCount' => '1', + ], + 'FISHERINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FISHERINV'], + 'argumentCount' => '1', + ], + 'FIXED' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'FIXEDFORMAT'], + 'argumentCount' => '1-3', + ], + 'FLOOR' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FLOOR'], + 'argumentCount' => '2', + ], + 'FLOOR.MATH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FLOORMATH'], + 'argumentCount' => '3', + ], + 'FLOOR.PRECISE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FLOORPRECISE'], + 'argumentCount' => '2', + ], + 'FORECAST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FORECAST'], + 'argumentCount' => '3', + ], + 'FORMULATEXT' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'FORMULATEXT'], + 'argumentCount' => '1', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'FREQUENCY' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'FTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'FV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'FV'], + 'argumentCount' => '3-5', + ], + 'FVSCHEDULE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'FVSCHEDULE'], + 'argumentCount' => '2', + ], + 'GAMMADIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMADIST'], + 'argumentCount' => '4', + ], + 'GAMMAINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMAINV'], + 'argumentCount' => '3', + ], + 'GAMMALN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMALN'], + 'argumentCount' => '1', + ], + 'GCD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'GCD'], + 'argumentCount' => '1+', + ], + 'GEOMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GEOMEAN'], + 'argumentCount' => '1+', + ], + 'GESTEP' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'GESTEP'], + 'argumentCount' => '1,2', + ], + 'GETPIVOTDATA' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2+', + ], + 'GROWTH' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GROWTH'], + 'argumentCount' => '1-4', + ], + 'HARMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'HARMEAN'], + 'argumentCount' => '1+', + ], + 'HEX2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTOBIN'], + 'argumentCount' => '1,2', + ], + 'HEX2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTODEC'], + 'argumentCount' => '1', + ], + 'HEX2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTOOCT'], + 'argumentCount' => '1,2', + ], + 'HLOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'HLOOKUP'], + 'argumentCount' => '3,4', + ], + 'HOUR' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'HOUROFDAY'], + 'argumentCount' => '1', + ], + 'HYPERLINK' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'HYPERLINK'], + 'argumentCount' => '1,2', + 'passCellReference' => true, + ], + 'HYPGEOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'HYPGEOMDIST'], + 'argumentCount' => '4', + ], + 'IF' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'statementIf'], + 'argumentCount' => '1-3', + ], + 'IFERROR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'IFERROR'], + 'argumentCount' => '2', + ], + 'IFNA' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'IFNA'], + 'argumentCount' => '2', + ], + 'IFS' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'IFS'], + 'argumentCount' => '2+', + ], + 'IMABS' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMABS'], + 'argumentCount' => '1', + ], + 'IMAGINARY' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMAGINARY'], + 'argumentCount' => '1', + ], + 'IMARGUMENT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMARGUMENT'], + 'argumentCount' => '1', + ], + 'IMCONJUGATE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCONJUGATE'], + 'argumentCount' => '1', + ], + 'IMCOS' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOS'], + 'argumentCount' => '1', + ], + 'IMCOSH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOSH'], + 'argumentCount' => '1', + ], + 'IMCOT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOT'], + 'argumentCount' => '1', + ], + 'IMCSC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCSC'], + 'argumentCount' => '1', + ], + 'IMCSCH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCSCH'], + 'argumentCount' => '1', + ], + 'IMDIV' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMDIV'], + 'argumentCount' => '2', + ], + 'IMEXP' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMEXP'], + 'argumentCount' => '1', + ], + 'IMLN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLN'], + 'argumentCount' => '1', + ], + 'IMLOG10' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLOG10'], + 'argumentCount' => '1', + ], + 'IMLOG2' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLOG2'], + 'argumentCount' => '1', + ], + 'IMPOWER' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMPOWER'], + 'argumentCount' => '2', + ], + 'IMPRODUCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMPRODUCT'], + 'argumentCount' => '1+', + ], + 'IMREAL' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMREAL'], + 'argumentCount' => '1', + ], + 'IMSEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSEC'], + 'argumentCount' => '1', + ], + 'IMSECH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSECH'], + 'argumentCount' => '1', + ], + 'IMSIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSIN'], + 'argumentCount' => '1', + ], + 'IMSINH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSINH'], + 'argumentCount' => '1', + ], + 'IMSQRT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSQRT'], + 'argumentCount' => '1', + ], + 'IMSUB' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSUB'], + 'argumentCount' => '2', + ], + 'IMSUM' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSUM'], + 'argumentCount' => '1+', + ], + 'IMTAN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMTAN'], + 'argumentCount' => '1', + ], + 'INDEX' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'INDEX'], + 'argumentCount' => '1-4', + ], + 'INDIRECT' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'INDIRECT'], + 'argumentCount' => '1,2', + 'passCellReference' => true, + ], + 'INFO' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'INT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'INT'], + 'argumentCount' => '1', + ], + 'INTERCEPT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'INTERCEPT'], + 'argumentCount' => '2', + ], + 'INTRATE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'INTRATE'], + 'argumentCount' => '4,5', + ], + 'IPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'IPMT'], + 'argumentCount' => '4-6', + ], + 'IRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'IRR'], + 'argumentCount' => '1,2', + ], + 'ISBLANK' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isBlank'], + 'argumentCount' => '1', + ], + 'ISERR' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isErr'], + 'argumentCount' => '1', + ], + 'ISERROR' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isError'], + 'argumentCount' => '1', + ], + 'ISEVEN' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isEven'], + 'argumentCount' => '1', + ], + 'ISFORMULA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isFormula'], + 'argumentCount' => '1', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'ISLOGICAL' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isLogical'], + 'argumentCount' => '1', + ], + 'ISNA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNa'], + 'argumentCount' => '1', + ], + 'ISNONTEXT' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNonText'], + 'argumentCount' => '1', + ], + 'ISNUMBER' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNumber'], + 'argumentCount' => '1', + ], + 'ISODD' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isOdd'], + 'argumentCount' => '1', + ], + 'ISOWEEKNUM' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'ISOWEEKNUM'], + 'argumentCount' => '1', + ], + 'ISPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ISPMT'], + 'argumentCount' => '4', + ], + 'ISREF' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ISTEXT' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isText'], + 'argumentCount' => '1', + ], + 'JIS' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'KURT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'KURT'], + 'argumentCount' => '1+', + ], + 'LARGE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LARGE'], + 'argumentCount' => '2', + ], + 'LCM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'LCM'], + 'argumentCount' => '1+', + ], + 'LEFT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LEFT'], + 'argumentCount' => '1,2', + ], + 'LEFTB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LEFT'], + 'argumentCount' => '1,2', + ], + 'LEN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'STRINGLENGTH'], + 'argumentCount' => '1', + ], + 'LENB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'STRINGLENGTH'], + 'argumentCount' => '1', + ], + 'LINEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LINEST'], + 'argumentCount' => '1-4', + ], + 'LN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'log', + 'argumentCount' => '1', + ], + 'LOG' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'logBase'], + 'argumentCount' => '1,2', + ], + 'LOG10' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'log10', + 'argumentCount' => '1', + ], + 'LOGEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGEST'], + 'argumentCount' => '1-4', + ], + 'LOGINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGINV'], + 'argumentCount' => '3', + ], + 'LOGNORMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGNORMDIST'], + 'argumentCount' => '3', + ], + 'LOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'LOOKUP'], + 'argumentCount' => '2,3', + ], + 'LOWER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LOWERCASE'], + 'argumentCount' => '1', + ], + 'MATCH' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'MATCH'], + 'argumentCount' => '2,3', + ], + 'MAX' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAX'], + 'argumentCount' => '1+', + ], + 'MAXA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAXA'], + 'argumentCount' => '1+', + ], + 'MAXIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAXIFS'], + 'argumentCount' => '3+', + ], + 'MDETERM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MDETERM'], + 'argumentCount' => '1', + ], + 'MDURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5,6', + ], + 'MEDIAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MEDIAN'], + 'argumentCount' => '1+', + ], + 'MEDIANIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2+', + ], + 'MID' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'MID'], + 'argumentCount' => '3', + ], + 'MIDB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'MID'], + 'argumentCount' => '3', + ], + 'MIN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MIN'], + 'argumentCount' => '1+', + ], + 'MINA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MINA'], + 'argumentCount' => '1+', + ], + 'MINIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MINIFS'], + 'argumentCount' => '3+', + ], + 'MINUTE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'MINUTE'], + 'argumentCount' => '1', + ], + 'MINVERSE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MINVERSE'], + 'argumentCount' => '1', + ], + 'MIRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'MIRR'], + 'argumentCount' => '3', + ], + 'MMULT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MMULT'], + 'argumentCount' => '2', + ], + 'MOD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MOD'], + 'argumentCount' => '2', + ], + 'MODE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MODE'], + 'argumentCount' => '1+', + ], + 'MODE.SNGL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MODE'], + 'argumentCount' => '1+', + ], + 'MONTH' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'MONTHOFYEAR'], + 'argumentCount' => '1', + ], + 'MROUND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MROUND'], + 'argumentCount' => '2', + ], + 'MULTINOMIAL' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MULTINOMIAL'], + 'argumentCount' => '1+', + ], + 'N' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'n'], + 'argumentCount' => '1', + ], + 'NA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'NA'], + 'argumentCount' => '0', + ], + 'NEGBINOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NEGBINOMDIST'], + 'argumentCount' => '3', + ], + 'NETWORKDAYS' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'NETWORKDAYS'], + 'argumentCount' => '2-3', + ], + 'NETWORKDAYS.INTL' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2-4', + ], + 'NOMINAL' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NOMINAL'], + 'argumentCount' => '2', + ], + 'NORMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMDIST'], + 'argumentCount' => '4', + ], + 'NORMINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMINV'], + 'argumentCount' => '3', + ], + 'NORMSDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMSDIST'], + 'argumentCount' => '1', + ], + 'NORMSINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMSINV'], + 'argumentCount' => '1', + ], + 'NOT' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'NOT'], + 'argumentCount' => '1', + ], + 'NOW' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATETIMENOW'], + 'argumentCount' => '0', + ], + 'NPER' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NPER'], + 'argumentCount' => '3-5', + ], + 'NPV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NPV'], + 'argumentCount' => '2+', + ], + 'NUMBERVALUE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'NUMBERVALUE'], + 'argumentCount' => '1+', + ], + 'OCT2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTOBIN'], + 'argumentCount' => '1,2', + ], + 'OCT2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTODEC'], + 'argumentCount' => '1', + ], + 'OCT2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTOHEX'], + 'argumentCount' => '1,2', + ], + 'ODD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ODD'], + 'argumentCount' => '1', + ], + 'ODDFPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '8,9', + ], + 'ODDFYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '8,9', + ], + 'ODDLPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '7,8', + ], + 'ODDLYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '7,8', + ], + 'OFFSET' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'OFFSET'], + 'argumentCount' => '3-5', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'OR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalOr'], + 'argumentCount' => '1+', + ], + 'PDURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PDURATION'], + 'argumentCount' => '3', + ], + 'PEARSON' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CORREL'], + 'argumentCount' => '2', + ], + 'PERCENTILE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERCENTILE'], + 'argumentCount' => '2', + ], + 'PERCENTRANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERCENTRANK'], + 'argumentCount' => '2,3', + ], + 'PERMUT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERMUT'], + 'argumentCount' => '2', + ], + 'PHONETIC' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'PI' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'pi', + 'argumentCount' => '0', + ], + 'PMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PMT'], + 'argumentCount' => '3-5', + ], + 'POISSON' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'POISSON'], + 'argumentCount' => '3', + ], + 'POWER' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'POWER'], + 'argumentCount' => '2', + ], + 'PPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PPMT'], + 'argumentCount' => '4-6', + ], + 'PRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICE'], + 'argumentCount' => '6,7', + ], + 'PRICEDISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICEDISC'], + 'argumentCount' => '4,5', + ], + 'PRICEMAT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICEMAT'], + 'argumentCount' => '5,6', + ], + 'PROB' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3,4', + ], + 'PRODUCT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'PRODUCT'], + 'argumentCount' => '1+', + ], + 'PROPER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'PROPERCASE'], + 'argumentCount' => '1', + ], + 'PV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PV'], + 'argumentCount' => '3-5', + ], + 'QUARTILE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'QUARTILE'], + 'argumentCount' => '2', + ], + 'QUOTIENT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'QUOTIENT'], + 'argumentCount' => '2', + ], + 'RADIANS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'deg2rad', + 'argumentCount' => '1', + ], + 'RAND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'RAND'], + 'argumentCount' => '0', + ], + 'RANDBETWEEN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'RAND'], + 'argumentCount' => '2', + ], + 'RANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'RANK'], + 'argumentCount' => '2,3', + ], + 'RATE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RATE'], + 'argumentCount' => '3-6', + ], + 'RECEIVED' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RECEIVED'], + 'argumentCount' => '4-5', + ], + 'REPLACE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'REPLACE'], + 'argumentCount' => '4', + ], + 'REPLACEB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'REPLACE'], + 'argumentCount' => '4', + ], + 'REPT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => 'str_repeat', + 'argumentCount' => '2', + ], + 'RIGHT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RIGHT'], + 'argumentCount' => '1,2', + ], + 'RIGHTB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RIGHT'], + 'argumentCount' => '1,2', + ], + 'ROMAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROMAN'], + 'argumentCount' => '1,2', + ], + 'ROUND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'round', + 'argumentCount' => '2', + ], + 'ROUNDDOWN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROUNDDOWN'], + 'argumentCount' => '2', + ], + 'ROUNDUP' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROUNDUP'], + 'argumentCount' => '2', + ], + 'ROW' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'ROW'], + 'argumentCount' => '-1', + 'passByReference' => [true], + ], + 'ROWS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'ROWS'], + 'argumentCount' => '1', + ], + 'RRI' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RRI'], + 'argumentCount' => '3', + ], + 'RSQ' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'RSQ'], + 'argumentCount' => '2', + ], + 'RTD' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1+', + ], + 'SEARCH' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'SEARCHB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'SEC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SEC'], + 'argumentCount' => '1', + ], + 'SECH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SECH'], + 'argumentCount' => '1', + ], + 'SECOND' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'SECOND'], + 'argumentCount' => '1', + ], + 'SERIESSUM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SERIESSUM'], + 'argumentCount' => '4', + ], + 'SHEET' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '0,1', + ], + 'SHEETS' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '0,1', + ], + 'SIGN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SIGN'], + 'argumentCount' => '1', + ], + 'SIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sin', + 'argumentCount' => '1', + ], + 'SINH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sinh', + 'argumentCount' => '1', + ], + 'SKEW' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SKEW'], + 'argumentCount' => '1+', + ], + 'SLN' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'SLN'], + 'argumentCount' => '3', + ], + 'SLOPE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SLOPE'], + 'argumentCount' => '2', + ], + 'SMALL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SMALL'], + 'argumentCount' => '2', + ], + 'SQRT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sqrt', + 'argumentCount' => '1', + ], + 'SQRTPI' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SQRTPI'], + 'argumentCount' => '1', + ], + 'STANDARDIZE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STANDARDIZE'], + 'argumentCount' => '3', + ], + 'STDEV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEV'], + 'argumentCount' => '1+', + ], + 'STDEV.S' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEV'], + 'argumentCount' => '1+', + ], + 'STDEV.P' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVP'], + 'argumentCount' => '1+', + ], + 'STDEVA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVA'], + 'argumentCount' => '1+', + ], + 'STDEVP' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVP'], + 'argumentCount' => '1+', + ], + 'STDEVPA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVPA'], + 'argumentCount' => '1+', + ], + 'STEYX' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STEYX'], + 'argumentCount' => '2', + ], + 'SUBSTITUTE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SUBSTITUTE'], + 'argumentCount' => '3,4', + ], + 'SUBTOTAL' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUBTOTAL'], + 'argumentCount' => '2+', + 'passCellReference' => true, + ], + 'SUM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUM'], + 'argumentCount' => '1+', + ], + 'SUMIF' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMIF'], + 'argumentCount' => '2,3', + ], + 'SUMIFS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMIFS'], + 'argumentCount' => '3+', + ], + 'SUMPRODUCT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMPRODUCT'], + 'argumentCount' => '1+', + ], + 'SUMSQ' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMSQ'], + 'argumentCount' => '1+', + ], + 'SUMX2MY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMX2MY2'], + 'argumentCount' => '2', + ], + 'SUMX2PY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMX2PY2'], + 'argumentCount' => '2', + ], + 'SUMXMY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMXMY2'], + 'argumentCount' => '2', + ], + 'SWITCH' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'statementSwitch'], + 'argumentCount' => '3+', + ], + 'SYD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'SYD'], + 'argumentCount' => '4', + ], + 'T' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RETURNSTRING'], + 'argumentCount' => '1', + ], + 'TAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'tan', + 'argumentCount' => '1', + ], + 'TANH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'tanh', + 'argumentCount' => '1', + ], + 'TBILLEQ' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLEQ'], + 'argumentCount' => '3', + ], + 'TBILLPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLPRICE'], + 'argumentCount' => '3', + ], + 'TBILLYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLYIELD'], + 'argumentCount' => '3', + ], + 'TDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TDIST'], + 'argumentCount' => '3', + ], + 'TEXT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TEXTFORMAT'], + 'argumentCount' => '2', + ], + 'TEXTJOIN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TEXTJOIN'], + 'argumentCount' => '3+', + ], + 'TIME' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'TIME'], + 'argumentCount' => '3', + ], + 'TIMEVALUE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'TIMEVALUE'], + 'argumentCount' => '1', + ], + 'TINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TINV'], + 'argumentCount' => '2', + ], + 'TODAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATENOW'], + 'argumentCount' => '0', + ], + 'TRANSPOSE' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'TRANSPOSE'], + 'argumentCount' => '1', + ], + 'TREND' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TREND'], + 'argumentCount' => '1-4', + ], + 'TRIM' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TRIMSPACES'], + 'argumentCount' => '1', + ], + 'TRIMMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TRIMMEAN'], + 'argumentCount' => '2', + ], + 'TRUE' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'TRUE'], + 'argumentCount' => '0', + ], + 'TRUNC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'TRUNC'], + 'argumentCount' => '1,2', + ], + 'TTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '4', + ], + 'TYPE' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'TYPE'], + 'argumentCount' => '1', + ], + 'UNICHAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CHARACTER'], + 'argumentCount' => '1', + ], + 'UNICODE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'ASCIICODE'], + 'argumentCount' => '1', + ], + 'UPPER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'UPPERCASE'], + 'argumentCount' => '1', + ], + 'USDOLLAR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'VALUE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'VALUE'], + 'argumentCount' => '1', + ], + 'VAR' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARFunc'], + 'argumentCount' => '1+', + ], + 'VAR.P' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARP'], + 'argumentCount' => '1+', + ], + 'VAR.S' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARFunc'], + 'argumentCount' => '1+', + ], + 'VARA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARA'], + 'argumentCount' => '1+', + ], + 'VARP' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARP'], + 'argumentCount' => '1+', + ], + 'VARPA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARPA'], + 'argumentCount' => '1+', + ], + 'VDB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5-7', + ], + 'VLOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'VLOOKUP'], + 'argumentCount' => '3,4', + ], + 'WEBSERVICE' => [ + 'category' => Category::CATEGORY_WEB, + 'functionCall' => [Web::class, 'WEBSERVICE'], + 'argumentCount' => '1', + ], + 'WEEKDAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WEEKDAY'], + 'argumentCount' => '1,2', + ], + 'WEEKNUM' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WEEKNUM'], + 'argumentCount' => '1,2', + ], + 'WEIBULL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'WEIBULL'], + 'argumentCount' => '4', + ], + 'WORKDAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WORKDAY'], + 'argumentCount' => '2-3', + ], + 'WORKDAY.INTL' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2-4', + ], + 'XIRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'XIRR'], + 'argumentCount' => '2,3', + ], + 'XNPV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'XNPV'], + 'argumentCount' => '3', + ], + 'XOR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalXor'], + 'argumentCount' => '1+', + ], + 'YEAR' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'YEAR'], + 'argumentCount' => '1', + ], + 'YEARFRAC' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'YEARFRAC'], + 'argumentCount' => '2,3', + ], + 'YIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '6,7', + ], + 'YIELDDISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'YIELDDISC'], + 'argumentCount' => '4,5', + ], + 'YIELDMAT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'YIELDMAT'], + 'argumentCount' => '5,6', + ], + 'ZTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'ZTEST'], + 'argumentCount' => '2-3', + ], + ]; + + // Internal functions used for special control purposes + private static $controlFunctions = [ + 'MKMATRIX' => [ + 'argumentCount' => '*', + 'functionCall' => [__CLASS__, 'mkMatrix'], + ], + 'NAME.ERROR' => [ + 'argumentCount' => '*', + 'functionCall' => [Functions::class, 'NAME'], + ], + ]; + + public function __construct(?Spreadsheet $spreadsheet = null) + { + $this->delta = 1 * 10 ** (0 - ini_get('precision')); + + $this->spreadsheet = $spreadsheet; + $this->cyclicReferenceStack = new CyclicReferenceStack(); + $this->debugLog = new Logger($this->cyclicReferenceStack); + } + + private static function loadLocales(): void + { + $localeFileDirectory = __DIR__ . '/locale/'; + foreach (glob($localeFileDirectory . '*', GLOB_ONLYDIR) as $filename) { + $filename = substr($filename, strlen($localeFileDirectory)); + if ($filename != 'en') { + self::$validLocaleLanguages[] = $filename; + } + } + } + + /** + * Get an instance of this class. + * + * @param Spreadsheet $spreadsheet Injected spreadsheet for working with a PhpSpreadsheet Spreadsheet object, + * or NULL to create a standalone claculation engine + * + * @return Calculation + */ + public static function getInstance(?Spreadsheet $spreadsheet = null) + { + if ($spreadsheet !== null) { + $instance = $spreadsheet->getCalculationEngine(); + if (isset($instance)) { + return $instance; + } + } + + if (!isset(self::$instance) || (self::$instance === null)) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Flush the calculation cache for any existing instance of this class + * but only if a Calculation instance exists. + */ + public function flushInstance(): void + { + $this->clearCalculationCache(); + $this->clearBranchStore(); + } + + /** + * Get the Logger for this calculation engine instance. + * + * @return Logger + */ + public function getDebugLog() + { + return $this->debugLog; + } + + /** + * __clone implementation. Cloning should not be allowed in a Singleton! + */ + final public function __clone() + { + throw new Exception('Cloning the calculation engine is not allowed!'); + } + + /** + * Return the locale-specific translation of TRUE. + * + * @return string locale-specific translation of TRUE + */ + public static function getTRUE() + { + return self::$localeBoolean['TRUE']; + } + + /** + * Return the locale-specific translation of FALSE. + * + * @return string locale-specific translation of FALSE + */ + public static function getFALSE() + { + return self::$localeBoolean['FALSE']; + } + + /** + * Set the Array Return Type (Array or Value of first element in the array). + * + * @param string $returnType Array return type + * + * @return bool Success or failure + */ + public static function setArrayReturnType($returnType) + { + if (($returnType == self::RETURN_ARRAY_AS_VALUE) || + ($returnType == self::RETURN_ARRAY_AS_ERROR) || + ($returnType == self::RETURN_ARRAY_AS_ARRAY)) { + self::$returnArrayAsType = $returnType; + + return true; + } + + return false; + } + + /** + * Return the Array Return Type (Array or Value of first element in the array). + * + * @return string $returnType Array return type + */ + public static function getArrayReturnType() + { + return self::$returnArrayAsType; + } + + /** + * Is calculation caching enabled? + * + * @return bool + */ + public function getCalculationCacheEnabled() + { + return $this->calculationCacheEnabled; + } + + /** + * Enable/disable calculation cache. + * + * @param bool $pValue + */ + public function setCalculationCacheEnabled($pValue): void + { + $this->calculationCacheEnabled = $pValue; + $this->clearCalculationCache(); + } + + /** + * Enable calculation cache. + */ + public function enableCalculationCache(): void + { + $this->setCalculationCacheEnabled(true); + } + + /** + * Disable calculation cache. + */ + public function disableCalculationCache(): void + { + $this->setCalculationCacheEnabled(false); + } + + /** + * Clear calculation cache. + */ + public function clearCalculationCache(): void + { + $this->calculationCache = []; + } + + /** + * Clear calculation cache for a specified worksheet. + * + * @param string $worksheetName + */ + public function clearCalculationCacheForWorksheet($worksheetName): void + { + if (isset($this->calculationCache[$worksheetName])) { + unset($this->calculationCache[$worksheetName]); + } + } + + /** + * Rename calculation cache for a specified worksheet. + * + * @param string $fromWorksheetName + * @param string $toWorksheetName + */ + public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksheetName): void + { + if (isset($this->calculationCache[$fromWorksheetName])) { + $this->calculationCache[$toWorksheetName] = &$this->calculationCache[$fromWorksheetName]; + unset($this->calculationCache[$fromWorksheetName]); + } + } + + /** + * Enable/disable calculation cache. + * + * @param mixed $enabled + */ + public function setBranchPruningEnabled($enabled): void + { + $this->branchPruningEnabled = $enabled; + } + + public function enableBranchPruning(): void + { + $this->setBranchPruningEnabled(true); + } + + public function disableBranchPruning(): void + { + $this->setBranchPruningEnabled(false); + } + + public function clearBranchStore(): void + { + $this->branchStoreKeyCounter = 0; + } + + /** + * Get the currently defined locale code. + * + * @return string + */ + public function getLocale() + { + return self::$localeLanguage; + } + + /** + * Set the locale code. + * + * @param string $locale The locale to use for formula translation, eg: 'en_us' + * + * @return bool + */ + public function setLocale($locale) + { + // Identify our locale and language + $language = $locale = strtolower($locale); + if (strpos($locale, '_') !== false) { + [$language] = explode('_', $locale); + } + if (count(self::$validLocaleLanguages) == 1) { + self::loadLocales(); + } + // Test whether we have any language data for this language (any locale) + if (in_array($language, self::$validLocaleLanguages)) { + // initialise language/locale settings + self::$localeFunctions = []; + self::$localeArgumentSeparator = ','; + self::$localeBoolean = ['TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL']; + // Default is English, if user isn't requesting english, then read the necessary data from the locale files + if ($locale != 'en_us') { + // Search for a file with a list of function names for locale + $functionNamesFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions'; + if (!file_exists($functionNamesFile)) { + // If there isn't a locale specific function file, look for a language specific function file + $functionNamesFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'functions'; + if (!file_exists($functionNamesFile)) { + return false; + } + } + // Retrieve the list of locale or language specific function names + $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($localeFunctions as $localeFunction) { + [$localeFunction] = explode('##', $localeFunction); // Strip out comments + if (strpos($localeFunction, '=') !== false) { + [$fName, $lfName] = explode('=', $localeFunction); + $fName = trim($fName); + $lfName = trim($lfName); + if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) { + self::$localeFunctions[$fName] = $lfName; + } + } + } + // Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions + if (isset(self::$localeFunctions['TRUE'])) { + self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE']; + } + if (isset(self::$localeFunctions['FALSE'])) { + self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE']; + } + + $configFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config'; + if (!file_exists($configFile)) { + $configFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'config'; + } + if (file_exists($configFile)) { + $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($localeSettings as $localeSetting) { + [$localeSetting] = explode('##', $localeSetting); // Strip out comments + if (strpos($localeSetting, '=') !== false) { + [$settingName, $settingValue] = explode('=', $localeSetting); + $settingName = strtoupper(trim($settingName)); + switch ($settingName) { + case 'ARGUMENTSEPARATOR': + self::$localeArgumentSeparator = trim($settingValue); + + break; + } + } + } + } + } + + self::$functionReplaceFromExcel = self::$functionReplaceToExcel = + self::$functionReplaceFromLocale = self::$functionReplaceToLocale = null; + self::$localeLanguage = $locale; + + return true; + } + + return false; + } + + /** + * @param string $fromSeparator + * @param string $toSeparator + * @param string $formula + * @param bool $inBraces + * + * @return string + */ + public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces) + { + $strlen = mb_strlen($formula); + for ($i = 0; $i < $strlen; ++$i) { + $chr = mb_substr($formula, $i, 1); + switch ($chr) { + case self::FORMULA_OPEN_FUNCTION_BRACE: + $inBraces = true; + + break; + case self::FORMULA_CLOSE_FUNCTION_BRACE: + $inBraces = false; + + break; + case $fromSeparator: + if (!$inBraces) { + $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1); + } + } + } + + return $formula; + } + + /** + * @param string[] $from + * @param string[] $to + * @param string $formula + * @param string $fromSeparator + * @param string $toSeparator + * + * @return string + */ + private static function translateFormula(array $from, array $to, $formula, $fromSeparator, $toSeparator) + { + // Convert any Excel function names to the required language + if (self::$localeLanguage !== 'en_us') { + $inBraces = false; + // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators + if (strpos($formula, self::FORMULA_STRING_QUOTE) !== false) { + // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded + // the formula + $temp = explode(self::FORMULA_STRING_QUOTE, $formula); + $i = false; + foreach ($temp as &$value) { + // Only count/replace in alternating array entries + if ($i = !$i) { + $value = preg_replace($from, $to, $value); + $value = self::translateSeparator($fromSeparator, $toSeparator, $value, $inBraces); + } + } + unset($value); + // Then rebuild the formula string + $formula = implode(self::FORMULA_STRING_QUOTE, $temp); + } else { + // If there's no quoted strings, then we do a simple count/replace + $formula = preg_replace($from, $to, $formula); + $formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces); + } + } + + return $formula; + } + + private static $functionReplaceFromExcel = null; + + private static $functionReplaceToLocale = null; + + public function _translateFormulaToLocale($formula) + { + if (self::$functionReplaceFromExcel === null) { + self::$functionReplaceFromExcel = []; + foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelFunctionName, '/') . '([\s]*\()/Ui'; + } + foreach (array_keys(self::$localeBoolean) as $excelBoolean) { + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui'; + } + } + + if (self::$functionReplaceToLocale === null) { + self::$functionReplaceToLocale = []; + foreach (self::$localeFunctions as $localeFunctionName) { + self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2'; + } + foreach (self::$localeBoolean as $localeBoolean) { + self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2'; + } + } + + return self::translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator); + } + + private static $functionReplaceFromLocale = null; + + private static $functionReplaceToExcel = null; + + public function _translateFormulaToEnglish($formula) + { + if (self::$functionReplaceFromLocale === null) { + self::$functionReplaceFromLocale = []; + foreach (self::$localeFunctions as $localeFunctionName) { + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($localeFunctionName, '/') . '([\s]*\()/Ui'; + } + foreach (self::$localeBoolean as $excelBoolean) { + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui'; + } + } + + if (self::$functionReplaceToExcel === null) { + self::$functionReplaceToExcel = []; + foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { + self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2'; + } + foreach (array_keys(self::$localeBoolean) as $excelBoolean) { + self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2'; + } + } + + return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ','); + } + + public static function localeFunc($function) + { + if (self::$localeLanguage !== 'en_us') { + $functionName = trim($function, '('); + if (isset(self::$localeFunctions[$functionName])) { + $brace = ($functionName != $function); + $function = self::$localeFunctions[$functionName]; + if ($brace) { + $function .= '('; + } + } + } + + return $function; + } + + /** + * Wrap string values in quotes. + * + * @param mixed $value + * + * @return mixed + */ + public static function wrapResult($value) + { + if (is_string($value)) { + // Error values cannot be "wrapped" + if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) { + // Return Excel errors "as is" + return $value; + } + // Return strings wrapped in quotes + return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE; + // Convert numeric errors to NaN error + } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { + return Functions::NAN(); + } + + return $value; + } + + /** + * Remove quotes used as a wrapper to identify string values. + * + * @param mixed $value + * + * @return mixed + */ + public static function unwrapResult($value) + { + if (is_string($value)) { + if ((isset($value[0])) && ($value[0] == self::FORMULA_STRING_QUOTE) && (substr($value, -1) == self::FORMULA_STRING_QUOTE)) { + return substr($value, 1, -1); + } + // Convert numeric errors to NAN error + } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { + return Functions::NAN(); + } + + return $value; + } + + /** + * Calculate cell value (using formula from a cell ID) + * Retained for backward compatibility. + * + * @param Cell $pCell Cell to calculate + * + * @return mixed + */ + public function calculate(?Cell $pCell = null) + { + try { + return $this->calculateCellValue($pCell); + } catch (\Exception $e) { + throw new Exception($e->getMessage()); + } + } + + /** + * Calculate the value of a cell formula. + * + * @param Cell $pCell Cell to calculate + * @param bool $resetLog Flag indicating whether the debug log should be reset or not + * + * @return mixed + */ + public function calculateCellValue(?Cell $pCell = null, $resetLog = true) + { + if ($pCell === null) { + return null; + } + + $returnArrayAsType = self::$returnArrayAsType; + if ($resetLog) { + // Initialise the logging settings if requested + $this->formulaError = null; + $this->debugLog->clearLog(); + $this->cyclicReferenceStack->clear(); + $this->cyclicFormulaCounter = 1; + + self::$returnArrayAsType = self::RETURN_ARRAY_AS_ARRAY; + } + + // Execute the calculation for the cell formula + $this->cellStack[] = [ + 'sheet' => $pCell->getWorksheet()->getTitle(), + 'cell' => $pCell->getCoordinate(), + ]; + + try { + $result = self::unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell)); + $cellAddress = array_pop($this->cellStack); + $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); + } catch (\Exception $e) { + $cellAddress = array_pop($this->cellStack); + $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); + + throw new Exception($e->getMessage()); + } + + if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { + self::$returnArrayAsType = $returnArrayAsType; + $testResult = Functions::flattenArray($result); + if (self::$returnArrayAsType == self::RETURN_ARRAY_AS_ERROR) { + return Functions::VALUE(); + } + // If there's only a single cell in the array, then we allow it + if (count($testResult) != 1) { + // If keys are numeric, then it's a matrix result rather than a cell range result, so we permit it + $r = array_keys($result); + $r = array_shift($r); + if (!is_numeric($r)) { + return Functions::VALUE(); + } + if (is_array($result[$r])) { + $c = array_keys($result[$r]); + $c = array_shift($c); + if (!is_numeric($c)) { + return Functions::VALUE(); + } + } + } + $result = array_shift($testResult); + } + self::$returnArrayAsType = $returnArrayAsType; + + if ($result === null && $pCell->getWorksheet()->getSheetView()->getShowZeros()) { + return 0; + } elseif ((is_float($result)) && ((is_nan($result)) || (is_infinite($result)))) { + return Functions::NAN(); + } + + return $result; + } + + /** + * Validate and parse a formula string. + * + * @param string $formula Formula to parse + * + * @return array|bool + */ + public function parseFormula($formula) + { + // Basic validation that this is indeed a formula + // We return an empty array if not + $formula = trim($formula); + if ((!isset($formula[0])) || ($formula[0] != '=')) { + return []; + } + $formula = ltrim(substr($formula, 1)); + if (!isset($formula[0])) { + return []; + } + + // Parse the formula and return the token stack + return $this->_parseFormula($formula); + } + + /** + * Calculate the value of a formula. + * + * @param string $formula Formula to parse + * @param string $cellID Address of the cell to calculate + * @param Cell $pCell Cell to calculate + * + * @return mixed + */ + public function calculateFormula($formula, $cellID = null, ?Cell $pCell = null) + { + // Initialise the logging settings + $this->formulaError = null; + $this->debugLog->clearLog(); + $this->cyclicReferenceStack->clear(); + + $resetCache = $this->getCalculationCacheEnabled(); + if ($this->spreadsheet !== null && $cellID === null && $pCell === null) { + $cellID = 'A1'; + $pCell = $this->spreadsheet->getActiveSheet()->getCell($cellID); + } else { + // Disable calculation cacheing because it only applies to cell calculations, not straight formulae + // But don't actually flush any cache + $this->calculationCacheEnabled = false; + } + + // Execute the calculation + try { + $result = self::unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell)); + } catch (\Exception $e) { + throw new Exception($e->getMessage()); + } + + if ($this->spreadsheet === null) { + // Reset calculation cacheing to its previous state + $this->calculationCacheEnabled = $resetCache; + } + + return $result; + } + + /** + * @param string $cellReference + * @param mixed $cellValue + * + * @return bool + */ + public function getValueFromCache($cellReference, &$cellValue) + { + // Is calculation cacheing enabled? + // Is the value present in calculation cache? + $this->debugLog->writeDebugLog('Testing cache value for cell ', $cellReference); + if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) { + $this->debugLog->writeDebugLog('Retrieving value for cell ', $cellReference, ' from cache'); + // Return the cached result + + $cellValue = $this->calculationCache[$cellReference]; + + return true; + } + + return false; + } + + /** + * @param string $cellReference + * @param mixed $cellValue + */ + public function saveValueToCache($cellReference, $cellValue): void + { + if ($this->calculationCacheEnabled) { + $this->calculationCache[$cellReference] = $cellValue; + } + } + + /** + * Parse a cell formula and calculate its value. + * + * @param string $formula The formula to parse and calculate + * @param string $cellID The ID (e.g. A3) of the cell that we are calculating + * @param Cell $pCell Cell to calculate + * + * @return mixed + */ + public function _calculateFormulaValue($formula, $cellID = null, ?Cell $pCell = null) + { + $cellValue = null; + + // Quote-Prefixed cell values cannot be formulae, but are treated as strings + if ($pCell !== null && $pCell->getStyle()->getQuotePrefix() === true) { + return self::wrapResult((string) $formula); + } + + if (preg_match('/^=\s*cmd\s*\|/miu', $formula) !== 0) { + return self::wrapResult($formula); + } + + // Basic validation that this is indeed a formula + // We simply return the cell value if not + $formula = trim($formula); + if ($formula[0] != '=') { + return self::wrapResult($formula); + } + $formula = ltrim(substr($formula, 1)); + if (!isset($formula[0])) { + return self::wrapResult($formula); + } + + $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; + $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : "\x00Wrk"; + $wsCellReference = $wsTitle . '!' . $cellID; + + if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) { + return $cellValue; + } + + if (($wsTitle[0] !== "\x00") && ($this->cyclicReferenceStack->onStack($wsCellReference))) { + if ($this->cyclicFormulaCount <= 0) { + $this->cyclicFormulaCell = ''; + + return $this->raiseFormulaError('Cyclic Reference in Formula'); + } elseif ($this->cyclicFormulaCell === $wsCellReference) { + ++$this->cyclicFormulaCounter; + if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { + $this->cyclicFormulaCell = ''; + + return $cellValue; + } + } elseif ($this->cyclicFormulaCell == '') { + if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { + return $cellValue; + } + $this->cyclicFormulaCell = $wsCellReference; + } + } + + // Parse the formula onto the token stack and calculate the value + $this->cyclicReferenceStack->push($wsCellReference); + $cellValue = $this->processTokenStack($this->_parseFormula($formula, $pCell), $cellID, $pCell); + $this->cyclicReferenceStack->pop(); + + // Save to calculation cache + if ($cellID !== null) { + $this->saveValueToCache($wsCellReference, $cellValue); + } + + // Return the calculated value + return $cellValue; + } + + /** + * Ensure that paired matrix operands are both matrices and of the same size. + * + * @param mixed &$operand1 First matrix operand + * @param mixed &$operand2 Second matrix operand + * @param int $resize Flag indicating whether the matrices should be resized to match + * and (if so), whether the smaller dimension should grow or the + * larger should shrink. + * 0 = no resize + * 1 = shrink to fit + * 2 = extend to fit + * + * @return array + */ + private static function checkMatrixOperands(&$operand1, &$operand2, $resize = 1) + { + // Examine each of the two operands, and turn them into an array if they aren't one already + // Note that this function should only be called if one or both of the operand is already an array + if (!is_array($operand1)) { + [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand2); + $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1)); + $resize = 0; + } elseif (!is_array($operand2)) { + [$matrixRows, $matrixColumns] = self::getMatrixDimensions($operand1); + $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2)); + $resize = 0; + } + + [$matrix1Rows, $matrix1Columns] = self::getMatrixDimensions($operand1); + [$matrix2Rows, $matrix2Columns] = self::getMatrixDimensions($operand2); + if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) { + $resize = 1; + } + + if ($resize == 2) { + // Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger + self::resizeMatricesExtend($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); + } elseif ($resize == 1) { + // Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller + self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); + } + + return [$matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns]; + } + + /** + * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0. + * + * @param array &$matrix matrix operand + * + * @return int[] An array comprising the number of rows, and number of columns + */ + public static function getMatrixDimensions(array &$matrix) + { + $matrixRows = count($matrix); + $matrixColumns = 0; + foreach ($matrix as $rowKey => $rowValue) { + if (!is_array($rowValue)) { + $matrix[$rowKey] = [$rowValue]; + $matrixColumns = max(1, $matrixColumns); + } else { + $matrix[$rowKey] = array_values($rowValue); + $matrixColumns = max(count($rowValue), $matrixColumns); + } + } + $matrix = array_values($matrix); + + return [$matrixRows, $matrixColumns]; + } + + /** + * Ensure that paired matrix operands are both matrices of the same size. + * + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand + * @param int $matrix1Rows Row size of first matrix operand + * @param int $matrix1Columns Column size of first matrix operand + * @param int $matrix2Rows Row size of second matrix operand + * @param int $matrix2Columns Column size of second matrix operand + */ + private static function resizeMatricesShrink(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns): void + { + if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { + if ($matrix2Rows < $matrix1Rows) { + for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) { + unset($matrix1[$i]); + } + } + if ($matrix2Columns < $matrix1Columns) { + for ($i = 0; $i < $matrix1Rows; ++$i) { + for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { + unset($matrix1[$i][$j]); + } + } + } + } + + if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { + if ($matrix1Rows < $matrix2Rows) { + for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) { + unset($matrix2[$i]); + } + } + if ($matrix1Columns < $matrix2Columns) { + for ($i = 0; $i < $matrix2Rows; ++$i) { + for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { + unset($matrix2[$i][$j]); + } + } + } + } + } + + /** + * Ensure that paired matrix operands are both matrices of the same size. + * + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand + * @param int $matrix1Rows Row size of first matrix operand + * @param int $matrix1Columns Column size of first matrix operand + * @param int $matrix2Rows Row size of second matrix operand + * @param int $matrix2Columns Column size of second matrix operand + */ + private static function resizeMatricesExtend(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns): void + { + if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { + if ($matrix2Columns < $matrix1Columns) { + for ($i = 0; $i < $matrix2Rows; ++$i) { + $x = $matrix2[$i][$matrix2Columns - 1]; + for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { + $matrix2[$i][$j] = $x; + } + } + } + if ($matrix2Rows < $matrix1Rows) { + $x = $matrix2[$matrix2Rows - 1]; + for ($i = 0; $i < $matrix1Rows; ++$i) { + $matrix2[$i] = $x; + } + } + } + + if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { + if ($matrix1Columns < $matrix2Columns) { + for ($i = 0; $i < $matrix1Rows; ++$i) { + $x = $matrix1[$i][$matrix1Columns - 1]; + for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { + $matrix1[$i][$j] = $x; + } + } + } + if ($matrix1Rows < $matrix2Rows) { + $x = $matrix1[$matrix1Rows - 1]; + for ($i = 0; $i < $matrix2Rows; ++$i) { + $matrix1[$i] = $x; + } + } + } + } + + /** + * Format details of an operand for display in the log (based on operand type). + * + * @param mixed $value First matrix operand + * + * @return mixed + */ + private function showValue($value) + { + if ($this->debugLog->getWriteDebugLog()) { + $testArray = Functions::flattenArray($value); + if (count($testArray) == 1) { + $value = array_pop($testArray); + } + + if (is_array($value)) { + $returnMatrix = []; + $pad = $rpad = ', '; + foreach ($value as $row) { + if (is_array($row)) { + $returnMatrix[] = implode($pad, array_map([$this, 'showValue'], $row)); + $rpad = '; '; + } else { + $returnMatrix[] = $this->showValue($row); + } + } + + return '{ ' . implode($rpad, $returnMatrix) . ' }'; + } elseif (is_string($value) && (trim($value, self::FORMULA_STRING_QUOTE) == $value)) { + return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE; + } elseif (is_bool($value)) { + return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + } + + return Functions::flattenSingleValue($value); + } + + /** + * Format type and details of an operand for display in the log (based on operand type). + * + * @param mixed $value First matrix operand + * + * @return null|string + */ + private function showTypeDetails($value) + { + if ($this->debugLog->getWriteDebugLog()) { + $testArray = Functions::flattenArray($value); + if (count($testArray) == 1) { + $value = array_pop($testArray); + } + + if ($value === null) { + return 'a NULL value'; + } elseif (is_float($value)) { + $typeString = 'a floating point number'; + } elseif (is_int($value)) { + $typeString = 'an integer number'; + } elseif (is_bool($value)) { + $typeString = 'a boolean'; + } elseif (is_array($value)) { + $typeString = 'a matrix'; + } else { + if ($value == '') { + return 'an empty string'; + } elseif ($value[0] == '#') { + return 'a ' . $value . ' error'; + } + $typeString = 'a string'; + } + + return $typeString . ' with a value of ' . $this->showValue($value); + } + } + + /** + * @param string $formula + * + * @return false|string False indicates an error + */ + private function convertMatrixReferences($formula) + { + static $matrixReplaceFrom = [self::FORMULA_OPEN_FUNCTION_BRACE, ';', self::FORMULA_CLOSE_FUNCTION_BRACE]; + static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; + + // Convert any Excel matrix references to the MKMATRIX() function + if (strpos($formula, self::FORMULA_OPEN_FUNCTION_BRACE) !== false) { + // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators + if (strpos($formula, self::FORMULA_STRING_QUOTE) !== false) { + // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded + // the formula + $temp = explode(self::FORMULA_STRING_QUOTE, $formula); + // Open and Closed counts used for trapping mismatched braces in the formula + $openCount = $closeCount = 0; + $i = false; + foreach ($temp as &$value) { + // Only count/replace in alternating array entries + if ($i = !$i) { + $openCount += substr_count($value, self::FORMULA_OPEN_FUNCTION_BRACE); + $closeCount += substr_count($value, self::FORMULA_CLOSE_FUNCTION_BRACE); + $value = str_replace($matrixReplaceFrom, $matrixReplaceTo, $value); + } + } + unset($value); + // Then rebuild the formula string + $formula = implode(self::FORMULA_STRING_QUOTE, $temp); + } else { + // If there's no quoted strings, then we do a simple count/replace + $openCount = substr_count($formula, self::FORMULA_OPEN_FUNCTION_BRACE); + $closeCount = substr_count($formula, self::FORMULA_CLOSE_FUNCTION_BRACE); + $formula = str_replace($matrixReplaceFrom, $matrixReplaceTo, $formula); + } + // Trap for mismatched braces and trigger an appropriate error + if ($openCount < $closeCount) { + if ($openCount > 0) { + return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '}'"); + } + + return $this->raiseFormulaError("Formula Error: Unexpected '}' encountered"); + } elseif ($openCount > $closeCount) { + if ($closeCount > 0) { + return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '{'"); + } + + return $this->raiseFormulaError("Formula Error: Unexpected '{' encountered"); + } + } + + return $formula; + } + + private static function mkMatrix(...$args) + { + return $args; + } + + // Binary Operators + // These operators always work on two values + // Array key is the operator, the value indicates whether this is a left or right associative operator + private static $operatorAssociativity = [ + '^' => 0, // Exponentiation + '*' => 0, '/' => 0, // Multiplication and Division + '+' => 0, '-' => 0, // Addition and Subtraction + '&' => 0, // Concatenation + '|' => 0, ':' => 0, // Intersect and Range + '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison + ]; + + // Comparison (Boolean) Operators + // These operators work on two values, but always return a boolean result + private static $comparisonOperators = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true]; + + // Operator Precedence + // This list includes all valid operators, whether binary (including boolean) or unary (such as %) + // Array key is the operator, the value is its precedence + private static $operatorPrecedence = [ + ':' => 8, // Range + '|' => 7, // Intersect + '~' => 6, // Negation + '%' => 5, // Percentage + '^' => 4, // Exponentiation + '*' => 3, '/' => 3, // Multiplication and Division + '+' => 2, '-' => 2, // Addition and Subtraction + '&' => 1, // Concatenation + '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison + ]; + + // Convert infix to postfix notation + + /** + * @param string $formula + * + * @return bool + */ + private function _parseFormula($formula, ?Cell $pCell = null) + { + if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { + return false; + } + + // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet), + // so we store the parent worksheet so that we can re-attach it when necessary + $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; + + $regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION . + '|' . self::CALCULATION_REGEXP_CELLREF . + '|' . self::CALCULATION_REGEXP_NUMBER . + '|' . self::CALCULATION_REGEXP_STRING . + '|' . self::CALCULATION_REGEXP_OPENBRACE . + '|' . self::CALCULATION_REGEXP_NAMEDRANGE . + '|' . self::CALCULATION_REGEXP_ERROR . + ')/sui'; + + // Start with initialisation + $index = 0; + $stack = new Stack(); + $output = []; + $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a + // - is a negation or + is a positive operator rather than an operation + $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand + // should be null in a function call + + // IF branch pruning + // currently pending storeKey (last item of the storeKeysStack + $pendingStoreKey = null; + // stores a list of storeKeys (string[]) + $pendingStoreKeysStack = []; + $expectingConditionMap = []; // ['storeKey' => true, ...] + $expectingThenMap = []; // ['storeKey' => true, ...] + $expectingElseMap = []; // ['storeKey' => true, ...] + $parenthesisDepthMap = []; // ['storeKey' => 4, ...] + + // The guts of the lexical parser + // Loop through the formula extracting each operator and operand in turn + while (true) { + // Branch pruning: we adapt the output item to the context (it will + // be used to limit its computation) + $currentCondition = null; + $currentOnlyIf = null; + $currentOnlyIfNot = null; + $previousStoreKey = null; + $pendingStoreKey = end($pendingStoreKeysStack); + + if ($this->branchPruningEnabled) { + // this is a condition ? + if (isset($expectingConditionMap[$pendingStoreKey]) && $expectingConditionMap[$pendingStoreKey]) { + $currentCondition = $pendingStoreKey; + $stackDepth = count($pendingStoreKeysStack); + if ($stackDepth > 1) { // nested if + $previousStoreKey = $pendingStoreKeysStack[$stackDepth - 2]; + } + } + if (isset($expectingThenMap[$pendingStoreKey]) && $expectingThenMap[$pendingStoreKey]) { + $currentOnlyIf = $pendingStoreKey; + } elseif (isset($previousStoreKey)) { + if (isset($expectingThenMap[$previousStoreKey]) && $expectingThenMap[$previousStoreKey]) { + $currentOnlyIf = $previousStoreKey; + } + } + if (isset($expectingElseMap[$pendingStoreKey]) && $expectingElseMap[$pendingStoreKey]) { + $currentOnlyIfNot = $pendingStoreKey; + } elseif (isset($previousStoreKey)) { + if (isset($expectingElseMap[$previousStoreKey]) && $expectingElseMap[$previousStoreKey]) { + $currentOnlyIfNot = $previousStoreKey; + } + } + } + + $opCharacter = $formula[$index]; // Get the first character of the value at the current index position + if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula[$index + 1]]))) { + $opCharacter .= $formula[++$index]; + } + // Find out if we're currently at the beginning of a number, variable, cell reference, function, parenthesis or operand + $isOperandOrFunction = preg_match($regexpMatchString, substr($formula, $index), $match); + if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus? + // Put a negation on the stack + $stack->push('Unary Operator', '~', null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + ++$index; // and drop the negation symbol + } elseif ($opCharacter == '%' && $expectingOperator) { + // Put a percentage on the stack + $stack->push('Unary Operator', '%', null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + ++$index; + } elseif ($opCharacter == '+' && !$expectingOperator) { // Positive (unary plus rather than binary operator plus) can be discarded? + ++$index; // Drop the redundant plus symbol + } elseif ((($opCharacter == '~') || ($opCharacter == '|')) && (!$isOperandOrFunction)) { // We have to explicitly deny a tilde or pipe, because they are legal + return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression + } elseif ((isset(self::$operators[$opCharacter]) || $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack? + while ($stack->count() > 0 && + ($o2 = $stack->last()) && + isset(self::$operators[$o2['value']]) && + @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output + } + + // Finally put our current operator onto the stack + $stack->push('Binary Operator', $opCharacter, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + + ++$index; + $expectingOperator = false; + } elseif ($opCharacter == ')' && $expectingOperator) { // Are we expecting to close a parenthesis? + $expectingOperand = false; + while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( + if ($o2 === null) { + return $this->raiseFormulaError('Formula Error: Unexpected closing brace ")"'); + } + $output[] = $o2; + } + $d = $stack->last(2); + + // Branch pruning we decrease the depth whether is it a function + // call or a parenthesis + if (!empty($pendingStoreKey)) { + --$parenthesisDepthMap[$pendingStoreKey]; + } + + if (is_array($d) && preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $d['value'], $matches)) { // Did this parenthesis just close a function? + if (!empty($pendingStoreKey) && $parenthesisDepthMap[$pendingStoreKey] == -1) { + // we are closing an IF( + if ($d['value'] != 'IF(') { + return $this->raiseFormulaError('Parser bug we should be in an "IF("'); + } + if ($expectingConditionMap[$pendingStoreKey]) { + return $this->raiseFormulaError('We should not be expecting a condition'); + } + $expectingThenMap[$pendingStoreKey] = false; + $expectingElseMap[$pendingStoreKey] = false; + --$parenthesisDepthMap[$pendingStoreKey]; + array_pop($pendingStoreKeysStack); + unset($pendingStoreKey); + } + + $functionName = $matches[1]; // Get the function name + $d = $stack->pop(); + $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack) + $output[] = $d; // Dump the argument count on the output + $output[] = $stack->pop(); // Pop the function and push onto the output + if (isset(self::$controlFunctions[$functionName])) { + $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount']; + $functionCall = self::$controlFunctions[$functionName]['functionCall']; + } elseif (isset(self::$phpSpreadsheetFunctions[$functionName])) { + $expectedArgumentCount = self::$phpSpreadsheetFunctions[$functionName]['argumentCount']; + $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall']; + } else { // did we somehow push a non-function on the stack? this should never happen + return $this->raiseFormulaError('Formula Error: Internal error, non-function on stack'); + } + // Check the argument count + $argumentCountError = false; + if (is_numeric($expectedArgumentCount)) { + if ($expectedArgumentCount < 0) { + if ($argumentCount > abs($expectedArgumentCount)) { + $argumentCountError = true; + $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount); + } + } else { + if ($argumentCount != $expectedArgumentCount) { + $argumentCountError = true; + $expectedArgumentCountString = $expectedArgumentCount; + } + } + } elseif ($expectedArgumentCount != '*') { + $isOperandOrFunction = preg_match('/(\d*)([-+,])(\d*)/', $expectedArgumentCount, $argMatch); + switch ($argMatch[2]) { + case '+': + if ($argumentCount < $argMatch[1]) { + $argumentCountError = true; + $expectedArgumentCountString = $argMatch[1] . ' or more '; + } + + break; + case '-': + if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) { + $argumentCountError = true; + $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3]; + } + + break; + case ',': + if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) { + $argumentCountError = true; + $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3]; + } + + break; + } + } + if ($argumentCountError) { + return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, " . $expectedArgumentCountString . ' expected'); + } + } + ++$index; + } elseif ($opCharacter == ',') { // Is this the separator for function arguments? + if (!empty($pendingStoreKey) && + $parenthesisDepthMap[$pendingStoreKey] == 0 + ) { + // We must go to the IF next argument + if ($expectingConditionMap[$pendingStoreKey]) { + $expectingConditionMap[$pendingStoreKey] = false; + $expectingThenMap[$pendingStoreKey] = true; + } elseif ($expectingThenMap[$pendingStoreKey]) { + $expectingThenMap[$pendingStoreKey] = false; + $expectingElseMap[$pendingStoreKey] = true; + } elseif ($expectingElseMap[$pendingStoreKey]) { + return $this->raiseFormulaError('Reaching fourth argument of an IF'); + } + } + while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( + if ($o2 === null) { + return $this->raiseFormulaError('Formula Error: Unexpected ,'); + } + $output[] = $o2; // pop the argument expression stuff and push onto the output + } + // If we've a comma when we're expecting an operand, then what we actually have is a null operand; + // so push a null onto the stack + if (($expectingOperand) || (!$expectingOperator)) { + $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null]; + } + // make sure there was a function + $d = $stack->last(2); + if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $d['value'], $matches)) { + return $this->raiseFormulaError('Formula Error: Unexpected ,'); + } + $d = $stack->pop(); + $itemStoreKey = $d['storeKey'] ?? null; + $itemOnlyIf = $d['onlyIf'] ?? null; + $itemOnlyIfNot = $d['onlyIfNot'] ?? null; + $stack->push($d['type'], ++$d['value'], $d['reference'], $itemStoreKey, $itemOnlyIf, $itemOnlyIfNot); // increment the argument count + $stack->push('Brace', '(', null, $itemStoreKey, $itemOnlyIf, $itemOnlyIfNot); // put the ( back on, we'll need to pop back to it again + $expectingOperator = false; + $expectingOperand = true; + ++$index; + } elseif ($opCharacter == '(' && !$expectingOperator) { + if (!empty($pendingStoreKey)) { // Branch pruning: we go deeper + ++$parenthesisDepthMap[$pendingStoreKey]; + } + $stack->push('Brace', '(', null, $currentCondition, $currentOnlyIf, $currentOnlyIf); + ++$index; + } elseif ($isOperandOrFunction && !$expectingOperator) { // do we now have a function/variable/number? + $expectingOperator = true; + $expectingOperand = false; + $val = $match[1]; + $length = strlen($val); + if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $val, $matches)) { + $val = preg_replace('/\s/u', '', $val); + if (isset(self::$phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function + $valToUpper = strtoupper($val); + } else { + $valToUpper = 'NAME.ERROR('; + } + // here $matches[1] will contain values like "IF" + // and $val "IF(" + if ($this->branchPruningEnabled && ($valToUpper == 'IF(')) { // we handle a new if + $pendingStoreKey = $this->getUnusedBranchStoreKey(); + $pendingStoreKeysStack[] = $pendingStoreKey; + $expectingConditionMap[$pendingStoreKey] = true; + $parenthesisDepthMap[$pendingStoreKey] = 0; + } else { // this is not an if but we go deeper + if (!empty($pendingStoreKey) && array_key_exists($pendingStoreKey, $parenthesisDepthMap)) { + ++$parenthesisDepthMap[$pendingStoreKey]; + } + } + + $stack->push('Function', $valToUpper, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + // tests if the function is closed right after opening + $ax = preg_match('/^\s*\)/u', substr($formula, $index + $length)); + if ($ax) { + $stack->push('Operand Count for Function ' . $valToUpper . ')', 0, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + $expectingOperator = true; + } else { + $stack->push('Operand Count for Function ' . $valToUpper . ')', 1, null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + $expectingOperator = false; + } + $stack->push('Brace', '('); + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $val, $matches)) { + // Watch for this case-change when modifying to allow cell references in different worksheets... + // Should only be applied to the actual cell column, not the worksheet name + // If the last entry on the stack was a : operator, then we have a cell range reference + $testPrevOp = $stack->last(1); + if ($testPrevOp !== null && $testPrevOp['value'] == ':') { + // If we have a worksheet reference, then we're playing with a 3D reference + if ($matches[2] == '') { + // Otherwise, we 'inherit' the worksheet reference from the start cell reference + // The start of the cell range reference should be the last entry in $output + $rangeStartCellRef = $output[count($output) - 1]['value']; + preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $rangeStartCellRef, $rangeStartMatches); + if ($rangeStartMatches[2] > '') { + $val = $rangeStartMatches[2] . '!' . $val; + } + } else { + $rangeStartCellRef = $output[count($output) - 1]['value']; + preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $rangeStartCellRef, $rangeStartMatches); + if ($rangeStartMatches[2] !== $matches[2]) { + return $this->raiseFormulaError('3D Range references are not yet supported'); + } + } + } + + $outputItem = $stack->getStackItem('Cell Reference', $val, $val, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + + $output[] = $outputItem; + } else { // it's a variable, constant, string, number or boolean + // If the last entry on the stack was a : operator, then we may have a row or column range reference + $testPrevOp = $stack->last(1); + if ($testPrevOp !== null && $testPrevOp['value'] === ':') { + $startRowColRef = $output[count($output) - 1]['value']; + [$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true); + $rangeSheetRef = $rangeWS1; + if ($rangeWS1 != '') { + $rangeWS1 .= '!'; + } + [$rangeWS2, $val] = Worksheet::extractSheetTitle($val, true); + if ($rangeWS2 != '') { + $rangeWS2 .= '!'; + } else { + $rangeWS2 = $rangeWS1; + } + $refSheet = $pCellParent; + if ($pCellParent !== null && $rangeSheetRef !== $pCellParent->getTitle()) { + $refSheet = $pCellParent->getParent()->getSheetByName($rangeSheetRef); + } + if ((is_int($startRowColRef)) && (ctype_digit($val)) && + ($startRowColRef <= 1048576) && ($val <= 1048576)) { + // Row range + $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007 + $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef; + $val = $rangeWS2 . $endRowColRef . $val; + } elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) && + (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) { + // Column range + $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007 + $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1'; + $val = $rangeWS2 . $val . $endRowColRef; + } + } + + $localeConstant = false; + $stackItemType = 'Value'; + $stackItemReference = null; + if ($opCharacter == self::FORMULA_STRING_QUOTE) { + // UnEscape any quotes within the string + $val = self::wrapResult(str_replace('""', self::FORMULA_STRING_QUOTE, self::unwrapResult($val))); + } elseif (is_numeric($val)) { + if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) { + $val = (float) $val; + } else { + $val = (int) $val; + } + } elseif (isset(self::$excelConstants[trim(strtoupper($val))])) { + $stackItemType = 'Constant'; + $excelConstant = trim(strtoupper($val)); + $val = self::$excelConstants[$excelConstant]; + } elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) { + $stackItemType = 'Constant'; + $val = self::$excelConstants[$localeConstant]; + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '.*/miu', $val, $match)) { + $stackItemType = 'Named Range'; + $stackItemReference = $val; + } + $details = $stack->getStackItem($stackItemType, $val, $stackItemReference, $currentCondition, $currentOnlyIf, $currentOnlyIfNot); + if ($localeConstant) { + $details['localeValue'] = $localeConstant; + } + $output[] = $details; + } + $index += $length; + } elseif ($opCharacter == '$') { // absolute row or column range + ++$index; + } elseif ($opCharacter == ')') { // miscellaneous error checking + if ($expectingOperand) { + $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null]; + $expectingOperand = false; + $expectingOperator = true; + } else { + return $this->raiseFormulaError("Formula Error: Unexpected ')'"); + } + } elseif (isset(self::$operators[$opCharacter]) && !$expectingOperator) { + return $this->raiseFormulaError("Formula Error: Unexpected operator '$opCharacter'"); + } else { // I don't even want to know what you did to get here + return $this->raiseFormulaError('Formula Error: An unexpected error occurred'); + } + // Test for end of formula string + if ($index == strlen($formula)) { + // Did we end with an operator?. + // Only valid for the % unary operator + if ((isset(self::$operators[$opCharacter])) && ($opCharacter != '%')) { + return $this->raiseFormulaError("Formula Error: Operator '$opCharacter' has no operands"); + } + + break; + } + // Ignore white space + while (($formula[$index] == "\n") || ($formula[$index] == "\r")) { + ++$index; + } + if ($formula[$index] == ' ') { + while ($formula[$index] == ' ') { + ++$index; + } + // If we're expecting an operator, but only have a space between the previous and next operands (and both are + // Cell References) then we have an INTERSECTION operator + if (($expectingOperator) && + ((preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) && + ($output[count($output) - 1]['type'] == 'Cell Reference') || + (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '.*/miu', substr($formula, $index), $match)) && + ($output[count($output) - 1]['type'] == 'Named Range' || $output[count($output) - 1]['type'] == 'Value') + )) { + while ($stack->count() > 0 && + ($o2 = $stack->last()) && + isset(self::$operators[$o2['value']]) && + @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output + } + $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack + $expectingOperator = false; + } + } + } + + while (($op = $stack->pop()) !== null) { // pop everything off the stack and push onto output + if ((is_array($op) && $op['value'] == '(') || ($op === '(')) { + return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced + } + $output[] = $op; + } + + return $output; + } + + private static function dataTestReference(&$operandData) + { + $operand = $operandData['value']; + if (($operandData['reference'] === null) && (is_array($operand))) { + $rKeys = array_keys($operand); + $rowKey = array_shift($rKeys); + $cKeys = array_keys(array_keys($operand[$rowKey])); + $colKey = array_shift($cKeys); + if (ctype_upper($colKey)) { + $operandData['reference'] = $colKey . $rowKey; + } + } + + return $operand; + } + + // evaluate postfix notation + + /** + * @param mixed $tokens + * @param null|string $cellID + * + * @return bool + */ + private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null) + { + if ($tokens == false) { + return false; + } + + // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent cell collection), + // so we store the parent cell collection so that we can re-attach it when necessary + $pCellWorksheet = ($pCell !== null) ? $pCell->getWorksheet() : null; + $pCellParent = ($pCell !== null) ? $pCell->getParent() : null; + $stack = new Stack(); + + // Stores branches that have been pruned + $fakedForBranchPruning = []; + // help us to know when pruning ['branchTestId' => true/false] + $branchStore = []; + // Loop through each token in turn + foreach ($tokens as $tokenData) { + $token = $tokenData['value']; + + // Branch pruning: skip useless resolutions + $storeKey = $tokenData['storeKey'] ?? null; + if ($this->branchPruningEnabled && isset($tokenData['onlyIf'])) { + $onlyIfStoreKey = $tokenData['onlyIf']; + $storeValue = $branchStore[$onlyIfStoreKey] ?? null; + $storeValueAsBool = ($storeValue === null) ? + true : (bool) Functions::flattenSingleValue($storeValue); + if (is_array($storeValue)) { + $wrappedItem = end($storeValue); + $storeValue = end($wrappedItem); + } + + if (isset($storeValue) + && ( + !$storeValueAsBool + || Functions::isError($storeValue) + || ($storeValue === 'Pruned branch') + ) + ) { + // If branching value is not true, we don't need to compute + if (!isset($fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey])) { + $stack->push('Value', 'Pruned branch (only if ' . $onlyIfStoreKey . ') ' . $token); + $fakedForBranchPruning['onlyIf-' . $onlyIfStoreKey] = true; + } + + if (isset($storeKey)) { + // We are processing an if condition + // We cascade the pruning to the depending branches + $branchStore[$storeKey] = 'Pruned branch'; + $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true; + $fakedForBranchPruning['onlyIf-' . $storeKey] = true; + } + + continue; + } + } + + if ($this->branchPruningEnabled && isset($tokenData['onlyIfNot'])) { + $onlyIfNotStoreKey = $tokenData['onlyIfNot']; + $storeValue = $branchStore[$onlyIfNotStoreKey] ?? null; + $storeValueAsBool = ($storeValue === null) ? + true : (bool) Functions::flattenSingleValue($storeValue); + if (is_array($storeValue)) { + $wrappedItem = end($storeValue); + $storeValue = end($wrappedItem); + } + if (isset($storeValue) + && ( + $storeValueAsBool + || Functions::isError($storeValue) + || ($storeValue === 'Pruned branch')) + ) { + // If branching value is true, we don't need to compute + if (!isset($fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey])) { + $stack->push('Value', 'Pruned branch (only if not ' . $onlyIfNotStoreKey . ') ' . $token); + $fakedForBranchPruning['onlyIfNot-' . $onlyIfNotStoreKey] = true; + } + + if (isset($storeKey)) { + // We are processing an if condition + // We cascade the pruning to the depending branches + $branchStore[$storeKey] = 'Pruned branch'; + $fakedForBranchPruning['onlyIfNot-' . $storeKey] = true; + $fakedForBranchPruning['onlyIf-' . $storeKey] = true; + } + + continue; + } + } + + // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack + if (isset(self::$binaryOperators[$token])) { + // We must have two operands, error if we don't + if (($operand2Data = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + if (($operand1Data = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + + $operand1 = self::dataTestReference($operand1Data); + $operand2 = self::dataTestReference($operand2Data); + + // Log what we're doing + if ($token == ':') { + $this->debugLog->writeDebugLog('Evaluating Range ', $this->showValue($operand1Data['reference']), ' ', $token, ' ', $this->showValue($operand2Data['reference'])); + } else { + $this->debugLog->writeDebugLog('Evaluating ', $this->showValue($operand1), ' ', $token, ' ', $this->showValue($operand2)); + } + + // Process the operation in the appropriate manner + switch ($token) { + // Comparison (Boolean) Operators + case '>': // Greater than + case '<': // Less than + case '>=': // Greater than or Equal to + case '<=': // Less than or Equal to + case '=': // Equality + case '<>': // Inequality + $result = $this->executeBinaryComparisonOperation($cellID, $operand1, $operand2, $token, $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + // Binary Operators + case ':': // Range + if (strpos($operand1Data['reference'], '!') !== false) { + [$sheet1, $operand1Data['reference']] = Worksheet::extractSheetTitle($operand1Data['reference'], true); + } else { + $sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : ''; + } + + [$sheet2, $operand2Data['reference']] = Worksheet::extractSheetTitle($operand2Data['reference'], true); + if (empty($sheet2)) { + $sheet2 = $sheet1; + } + + if ($sheet1 == $sheet2) { + if ($operand1Data['reference'] === null) { + if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) { + $operand1Data['reference'] = $pCell->getColumn() . $operand1Data['value']; + } elseif (trim($operand1Data['reference']) == '') { + $operand1Data['reference'] = $pCell->getCoordinate(); + } else { + $operand1Data['reference'] = $operand1Data['value'] . $pCell->getRow(); + } + } + if ($operand2Data['reference'] === null) { + if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) { + $operand2Data['reference'] = $pCell->getColumn() . $operand2Data['value']; + } elseif (trim($operand2Data['reference']) == '') { + $operand2Data['reference'] = $pCell->getCoordinate(); + } else { + $operand2Data['reference'] = $operand2Data['value'] . $pCell->getRow(); + } + } + + $oData = array_merge(explode(':', $operand1Data['reference']), explode(':', $operand2Data['reference'])); + $oCol = $oRow = []; + foreach ($oData as $oDatum) { + $oCR = Coordinate::coordinateFromString($oDatum); + $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1; + $oRow[] = $oCR[1]; + } + $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $stack->push('Cell Reference', $cellValue, $cellRef); + } else { + $stack->push('Error', Functions::REF(), null); + } + + break; + case '+': // Addition + $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'plusEquals', $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '-': // Subtraction + $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'minusEquals', $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '*': // Multiplication + $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayTimesEquals', $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '/': // Division + $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayRightDivide', $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '^': // Exponential + $result = $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'power', $stack); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '&': // Concatenation + // If either of the operands is a matrix, we need to treat them both as matrices + // (converting the other operand to a matrix if need be); then perform the required + // matrix operation + if (is_bool($operand1)) { + $operand1 = ($operand1) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + if (is_bool($operand2)) { + $operand2 = ($operand2) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + if ((is_array($operand1)) || (is_array($operand2))) { + // Ensure that both operands are arrays/matrices + self::checkMatrixOperands($operand1, $operand2, 2); + + try { + // Convert operand 1 from a PHP array to a matrix + $matrix = new Shared\JAMA\Matrix($operand1); + // Perform the required operation against the operand 1 matrix, passing in operand 2 + $matrixResult = $matrix->concat($operand2); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + } else { + $result = self::FORMULA_STRING_QUOTE . str_replace('""', self::FORMULA_STRING_QUOTE, self::unwrapResult($operand1) . self::unwrapResult($operand2)) . self::FORMULA_STRING_QUOTE; + } + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + $stack->push('Value', $result); + + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + + break; + case '|': // Intersect + $rowIntersect = array_intersect_key($operand1, $operand2); + $cellIntersect = $oCol = $oRow = []; + foreach (array_keys($rowIntersect) as $row) { + $oRow[] = $row; + foreach ($rowIntersect[$row] as $col => $data) { + $oCol[] = Coordinate::columnIndexFromString($col) - 1; + $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]); + } + } + if (count(Functions::flattenArray($cellIntersect)) === 0) { + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect)); + $stack->push('Error', Functions::null(), null); + } else { + $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . + Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect)); + $stack->push('Value', $cellIntersect, $cellRef); + } + + break; + } + + // if the token is a unary operator, pop one value off the stack, do the operation, and push it back on + } elseif (($token === '~') || ($token === '%')) { + if (($arg = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + $arg = $arg['value']; + if ($token === '~') { + $this->debugLog->writeDebugLog('Evaluating Negation of ', $this->showValue($arg)); + $multiplier = -1; + } else { + $this->debugLog->writeDebugLog('Evaluating Percentile of ', $this->showValue($arg)); + $multiplier = 0.01; + } + if (is_array($arg)) { + self::checkMatrixOperands($arg, $multiplier, 2); + + try { + $matrix1 = new Shared\JAMA\Matrix($arg); + $matrixResult = $matrix1->arrayTimesEquals($multiplier); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + $stack->push('Value', $result); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + } else { + $this->executeNumericBinaryOperation($multiplier, $arg, '*', 'arrayTimesEquals', $stack); + } + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) { + $cellRef = null; + if (isset($matches[8])) { + if ($pCell === null) { + // We can't access the range, so return a REF error + $cellValue = Functions::REF(); + } else { + $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10]; + if ($matches[2] > '') { + $matches[2] = trim($matches[2], "\"'"); + if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { + // It's a Reference to an external spreadsheet (not currently supported) + return $this->raiseFormulaError('Unable to access External Workbook'); + } + $matches[2] = trim($matches[2], "\"'"); + $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); + } else { + $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in current worksheet'); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); + } + } + } else { + if ($pCell === null) { + // We can't access the cell, so return a REF error + $cellValue = Functions::REF(); + } else { + $cellRef = $matches[6] . $matches[7]; + if ($matches[2] > '') { + $matches[2] = trim($matches[2], "\"'"); + if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { + // It's a Reference to an external spreadsheet (not currently supported) + return $this->raiseFormulaError('Unable to access External Workbook'); + } + $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]); + if ($pCellParent !== null) { + $cellSheet = $this->spreadsheet->getSheetByName($matches[2]); + if ($cellSheet && $cellSheet->cellExists($cellRef)) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false); + $pCell->attach($pCellParent); + } else { + $cellValue = null; + } + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); + } else { + $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in current worksheet'); + if ($pCellParent->has($cellRef)) { + $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); + $pCell->attach($pCellParent); + } else { + $cellValue = null; + } + $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); + } + } + } + $stack->push('Value', $cellValue, $cellRef); + if (isset($storeKey)) { + $branchStore[$storeKey] = $cellValue; + } + + // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token, $matches)) { + if ($pCellParent) { + $pCell->attach($pCellParent); + } + + $functionName = $matches[1]; + $argCount = $stack->pop(); + $argCount = $argCount['value']; + if ($functionName != 'MKMATRIX') { + $this->debugLog->writeDebugLog('Evaluating Function ', self::localeFunc($functionName), '() with ', (($argCount == 0) ? 'no' : $argCount), ' argument', (($argCount == 1) ? '' : 's')); + } + if ((isset(self::$phpSpreadsheetFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) { // function + if (isset(self::$phpSpreadsheetFunctions[$functionName])) { + $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall']; + $passByReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference']); + $passCellReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passCellReference']); + } elseif (isset(self::$controlFunctions[$functionName])) { + $functionCall = self::$controlFunctions[$functionName]['functionCall']; + $passByReference = isset(self::$controlFunctions[$functionName]['passByReference']); + $passCellReference = isset(self::$controlFunctions[$functionName]['passCellReference']); + } + // get the arguments for this function + $args = $argArrayVals = []; + for ($i = 0; $i < $argCount; ++$i) { + $arg = $stack->pop(); + $a = $argCount - $i - 1; + if (($passByReference) && + (isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) && + (self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) { + if ($arg['reference'] === null) { + $args[] = $cellID; + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($cellID); + } + } else { + $args[] = $arg['reference']; + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($arg['reference']); + } + } + } else { + $args[] = self::unwrapResult($arg['value']); + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($arg['value']); + } + } + } + + // Reverse the order of the arguments + krsort($args); + + if (($passByReference) && ($argCount == 0)) { + $args[] = $cellID; + $argArrayVals[] = $this->showValue($cellID); + } + + if ($functionName != 'MKMATRIX') { + if ($this->debugLog->getWriteDebugLog()) { + krsort($argArrayVals); + $this->debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator . ' ', Functions::flattenArray($argArrayVals)), ' )'); + } + } + + // Process the argument with the appropriate function call + $args = $this->addCellReference($args, $passCellReference, $functionCall, $pCell); + + if (!is_array($functionCall)) { + foreach ($args as &$arg) { + $arg = Functions::flattenSingleValue($arg); + } + unset($arg); + } + + $result = call_user_func_array($functionCall, $args); + + if ($functionName != 'MKMATRIX') { + $this->debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($result)); + } + $stack->push('Value', self::wrapResult($result)); + if (isset($storeKey)) { + $branchStore[$storeKey] = $result; + } + } + } else { + // if the token is a number, boolean, string or an Excel error, push it onto the stack + if (isset(self::$excelConstants[strtoupper($token)])) { + $excelConstant = strtoupper($token); + $stack->push('Constant Value', self::$excelConstants[$excelConstant]); + if (isset($storeKey)) { + $branchStore[$storeKey] = self::$excelConstants[$excelConstant]; + } + $this->debugLog->writeDebugLog('Evaluating Constant ', $excelConstant, ' as ', $this->showTypeDetails(self::$excelConstants[$excelConstant])); + } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token[0] == self::FORMULA_STRING_QUOTE) || ($token[0] == '#')) { + $stack->push('Value', $token); + if (isset($storeKey)) { + $branchStore[$storeKey] = $token; + } + // if the token is a named range, push the named range name onto the stack + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/miu', $token, $matches)) { + $namedRange = $matches[6]; + $this->debugLog->writeDebugLog('Evaluating Named Range ', $namedRange); + + $cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false); + $pCell->attach($pCellParent); + $this->debugLog->writeDebugLog('Evaluation Result for named range ', $namedRange, ' is ', $this->showTypeDetails($cellValue)); + $stack->push('Named Range', $cellValue, $namedRange); + if (isset($storeKey)) { + $branchStore[$storeKey] = $cellValue; + } + } else { + return $this->raiseFormulaError("undefined variable '$token'"); + } + } + } + // when we're out of tokens, the stack should have a single element, the final result + if ($stack->count() != 1) { + return $this->raiseFormulaError('internal error'); + } + $output = $stack->pop(); + $output = $output['value']; + + return $output; + } + + private function validateBinaryOperand(&$operand, &$stack) + { + if (is_array($operand)) { + if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) { + do { + $operand = array_pop($operand); + } while (is_array($operand)); + } + } + // Numbers, matrices and booleans can pass straight through, as they're already valid + if (is_string($operand)) { + // We only need special validations for the operand if it is a string + // Start by stripping off the quotation marks we use to identify true excel string values internally + if ($operand > '' && $operand[0] == self::FORMULA_STRING_QUOTE) { + $operand = self::unwrapResult($operand); + } + // If the string is a numeric value, we treat it as a numeric, so no further testing + if (!is_numeric($operand)) { + // If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations + if ($operand > '' && $operand[0] == '#') { + $stack->push('Value', $operand); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($operand)); + + return false; + } elseif (!Shared\StringHelper::convertToNumberIfFraction($operand)) { + // If not a numeric or a fraction, then it's a text string, and so can't be used in mathematical binary operations + $stack->push('Error', '#VALUE!'); + $this->debugLog->writeDebugLog('Evaluation Result is a ', $this->showTypeDetails('#VALUE!')); + + return false; + } + } + } + + // return a true if the value of the operand is one that we can use in normal binary operations + return true; + } + + /** + * @param null|string $cellID + * @param mixed $operand1 + * @param mixed $operand2 + * @param string $operation + * @param bool $recursingArrays + * + * @return mixed + */ + private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false) + { + // If we're dealing with matrix operations, we want a matrix result + if ((is_array($operand1)) || (is_array($operand2))) { + $result = []; + if ((is_array($operand1)) && (!is_array($operand2))) { + foreach ($operand1 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2)); + $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } elseif ((!is_array($operand1)) && (is_array($operand2))) { + foreach ($operand2 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData)); + $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } else { + if (!$recursingArrays) { + self::checkMatrixOperands($operand1, $operand2, 2); + } + foreach ($operand1 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x])); + $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } + // Log the result details + $this->debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Array', $result); + + return $result; + } + + // Simple validate the two operands if they are string values + if (is_string($operand1) && $operand1 > '' && $operand1[0] == self::FORMULA_STRING_QUOTE) { + $operand1 = self::unwrapResult($operand1); + } + if (is_string($operand2) && $operand2 > '' && $operand2[0] == self::FORMULA_STRING_QUOTE) { + $operand2 = self::unwrapResult($operand2); + } + + // Use case insensitive comparaison if not OpenOffice mode + if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) { + if (is_string($operand1)) { + $operand1 = strtoupper($operand1); + } + if (is_string($operand2)) { + $operand2 = strtoupper($operand2); + } + } + + $useLowercaseFirstComparison = is_string($operand1) && is_string($operand2) && Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE; + + // execute the necessary operation + switch ($operation) { + // Greater than + case '>': + if ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) > 0; + } else { + $result = ($operand1 > $operand2); + } + + break; + // Less than + case '<': + if ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) < 0; + } else { + $result = ($operand1 < $operand2); + } + + break; + // Equality + case '=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = (abs($operand1 - $operand2) < $this->delta); + } else { + $result = strcmp($operand1, $operand2) == 0; + } + + break; + // Greater than or equal + case '>=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 > $operand2)); + } elseif ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) >= 0; + } else { + $result = strcmp($operand1, $operand2) >= 0; + } + + break; + // Less than or equal + case '<=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 < $operand2)); + } elseif ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) <= 0; + } else { + $result = strcmp($operand1, $operand2) <= 0; + } + + break; + // Inequality + case '<>': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = (abs($operand1 - $operand2) > 1E-14); + } else { + $result = strcmp($operand1, $operand2) != 0; + } + + break; + } + + // Log the result details + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Value', $result); + + return $result; + } + + /** + * Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters. + * + * @param string $str1 First string value for the comparison + * @param string $str2 Second string value for the comparison + * + * @return int + */ + private function strcmpLowercaseFirst($str1, $str2) + { + $inversedStr1 = Shared\StringHelper::strCaseReverse($str1); + $inversedStr2 = Shared\StringHelper::strCaseReverse($str2); + + return strcmp($inversedStr1, $inversedStr2); + } + + /** + * @param mixed $operand1 + * @param mixed $operand2 + * @param mixed $operation + * @param string $matrixFunction + * @param mixed $stack + * + * @return bool|mixed + */ + private function executeNumericBinaryOperation($operand1, $operand2, $operation, $matrixFunction, &$stack) + { + // Validate the two operands + if (!$this->validateBinaryOperand($operand1, $stack)) { + return false; + } + if (!$this->validateBinaryOperand($operand2, $stack)) { + return false; + } + + // If either of the operands is a matrix, we need to treat them both as matrices + // (converting the other operand to a matrix if need be); then perform the required + // matrix operation + if ((is_array($operand1)) || (is_array($operand2))) { + // Ensure that both operands are arrays/matrices of the same size + self::checkMatrixOperands($operand1, $operand2, 2); + + try { + // Convert operand 1 from a PHP array to a matrix + $matrix = new Shared\JAMA\Matrix($operand1); + // Perform the required operation against the operand 1 matrix, passing in operand 2 + $matrixResult = $matrix->$matrixFunction($operand2); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + } else { + if ((Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) && + ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1) > 0) || + (is_string($operand2) && !is_numeric($operand2) && strlen($operand2) > 0))) { + $result = Functions::VALUE(); + } else { + // If we're dealing with non-matrix operations, execute the necessary operation + switch ($operation) { + // Addition + case '+': + $result = $operand1 + $operand2; + + break; + // Subtraction + case '-': + $result = $operand1 - $operand2; + + break; + // Multiplication + case '*': + $result = $operand1 * $operand2; + + break; + // Division + case '/': + if ($operand2 == 0) { + // Trap for Divide by Zero error + $stack->push('Error', '#DIV/0!'); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails('#DIV/0!')); + + return false; + } + $result = $operand1 / $operand2; + + break; + // Power + case '^': + $result = $operand1 ** $operand2; + + break; + } + } + } + + // Log the result details + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Value', $result); + + return $result; + } + + // trigger an error, but nicely, if need be + protected function raiseFormulaError($errorMessage) + { + $this->formulaError = $errorMessage; + $this->cyclicReferenceStack->clear(); + if (!$this->suppressFormulaErrors) { + throw new Exception($errorMessage); + } + trigger_error($errorMessage, E_USER_ERROR); + + return false; + } + + /** + * Extract range values. + * + * @param string &$pRange String based range representation + * @param Worksheet $pSheet Worksheet + * @param bool $resetLog Flag indicating whether calculation log should be reset or not + * + * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. + */ + public function extractCellRange(&$pRange = 'A1', ?Worksheet $pSheet = null, $resetLog = true) + { + // Return value + $returnValue = []; + + if ($pSheet !== null) { + $pSheetName = $pSheet->getTitle(); + if (strpos($pRange, '!') !== false) { + [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true); + $pSheet = $this->spreadsheet->getSheetByName($pSheetName); + } + + // Extract range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + $pRange = $pSheetName . '!' . $pRange; + if (!isset($aReferences[1])) { + $currentCol = ''; + $currentRow = 0; + // Single cell in range + sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow); + if ($pSheet->cellExists($aReferences[0])) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } else { + // Extract cell data for all cells in the range + foreach ($aReferences as $reference) { + $currentCol = ''; + $currentRow = 0; + // Extract range + sscanf($reference, '%[A-Z]%d', $currentCol, $currentRow); + if ($pSheet->cellExists($reference)) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } + } + } + + return $returnValue; + } + + /** + * Extract range values. + * + * @param string &$pRange String based range representation + * @param Worksheet $pSheet Worksheet + * @param bool $resetLog Flag indicating whether calculation log should be reset or not + * + * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. + */ + public function extractNamedRange(&$pRange = 'A1', ?Worksheet $pSheet = null, $resetLog = true) + { + // Return value + $returnValue = []; + + if ($pSheet !== null) { + $pSheetName = $pSheet->getTitle(); + if (strpos($pRange, '!') !== false) { + [$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true); + $pSheet = $this->spreadsheet->getSheetByName($pSheetName); + } + + // Named range? + $namedRange = NamedRange::resolveRange($pRange, $pSheet); + if ($namedRange !== null) { + $pSheet = $namedRange->getWorksheet(); + $pRange = $namedRange->getRange(); + $splitRange = Coordinate::splitRange($pRange); + // Convert row and column references + if (ctype_alpha($splitRange[0][0])) { + $pRange = $splitRange[0][0] . '1:' . $splitRange[0][1] . $namedRange->getWorksheet()->getHighestRow(); + } elseif (ctype_digit($splitRange[0][0])) { + $pRange = 'A' . $splitRange[0][0] . ':' . $namedRange->getWorksheet()->getHighestColumn() . $splitRange[0][1]; + } + } else { + return Functions::REF(); + } + + // Extract range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + if (!isset($aReferences[1])) { + // Single cell (or single column or row) in range + [$currentCol, $currentRow] = Coordinate::coordinateFromString($aReferences[0]); + if ($pSheet->cellExists($aReferences[0])) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } else { + // Extract cell data for all cells in the range + foreach ($aReferences as $reference) { + // Extract range + [$currentCol, $currentRow] = Coordinate::coordinateFromString($reference); + if ($pSheet->cellExists($reference)) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } + } + } + + return $returnValue; + } + + /** + * Is a specific function implemented? + * + * @param string $pFunction Function Name + * + * @return bool + */ + public function isImplemented($pFunction) + { + $pFunction = strtoupper($pFunction); + $notImplemented = !isset(self::$phpSpreadsheetFunctions[$pFunction]) || (is_array(self::$phpSpreadsheetFunctions[$pFunction]['functionCall']) && self::$phpSpreadsheetFunctions[$pFunction]['functionCall'][1] === 'DUMMY'); + + return !$notImplemented; + } + + /** + * Get a list of all implemented functions as an array of function objects. + * + * @return array of Category + */ + public function getFunctions() + { + return self::$phpSpreadsheetFunctions; + } + + /** + * Get a list of implemented Excel function names. + * + * @return array + */ + public function getImplementedFunctionNames() + { + $returnValue = []; + foreach (self::$phpSpreadsheetFunctions as $functionName => $function) { + if ($this->isImplemented($functionName)) { + $returnValue[] = $functionName; + } + } + + return $returnValue; + } + + /** + * Add cell reference if needed while making sure that it is the last argument. + * + * @param bool $passCellReference + * @param array|string $functionCall + * + * @return array + */ + private function addCellReference(array $args, $passCellReference, $functionCall, ?Cell $pCell = null) + { + if ($passCellReference) { + if (is_array($functionCall)) { + $className = $functionCall[0]; + $methodName = $functionCall[1]; + + $reflectionMethod = new ReflectionMethod($className, $methodName); + $argumentCount = count($reflectionMethod->getParameters()); + while (count($args) < $argumentCount - 1) { + $args[] = null; + } + } + + $args[] = $pCell; + } + + return $args; + } + + private function getUnusedBranchStoreKey() + { + $storeKeyValue = 'storeKey-' . $this->branchStoreKeyCounter; + ++$this->branchStoreKeyCounter; + + return $storeKeyValue; + } + + private function getTokensAsString($tokens) + { + $tokensStr = array_map(function ($token) { + $value = $token['value'] ?? 'no value'; + while (is_array($value)) { + $value = array_pop($value); + } + + return $value; + }, $tokens); + + return '[ ' . implode(' | ', $tokensStr) . ' ]'; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Category.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Category.php new file mode 100755 index 0000000..96bb72a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Category.php @@ -0,0 +1,20 @@ + $criteriaName) { + $testCondition = []; + $testConditionCount = 0; + foreach ($criteria as $row => $criterion) { + if ($criterion[$key] > '') { + $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]); + ++$testConditionCount; + } + } + if ($testConditionCount > 1) { + $testConditions[] = 'OR(' . implode(',', $testCondition) . ')'; + ++$testConditionsCount; + } elseif ($testConditionCount == 1) { + $testConditions[] = $testCondition[0]; + ++$testConditionsCount; + } + } + + if ($testConditionsCount > 1) { + $testConditionSet = 'AND(' . implode(',', $testConditions) . ')'; + } elseif ($testConditionsCount == 1) { + $testConditionSet = $testConditions[0]; + } + + // Loop through each row of the database + foreach ($database as $dataRow => $dataValues) { + // Substitute actual values from the database row for our [:placeholders] + $testConditionList = $testConditionSet; + foreach ($criteriaNames as $key => $criteriaName) { + $k = array_search($criteriaName, $fieldNames); + if (isset($dataValues[$k])) { + $dataValue = $dataValues[$k]; + $dataValue = (is_string($dataValue)) ? Calculation::wrapResult(strtoupper($dataValue)) : $dataValue; + $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList); + } + } + // evaluate the criteria against the row data + $result = Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList); + // If the row failed to meet the criteria, remove it from the database + if (!$result) { + unset($database[$dataRow]); + } + } + + return $database; + } + + private static function getFilteredColumn($database, $field, $criteria) + { + // reduce the database to a set of rows that match all the criteria + $database = self::filter($database, $criteria); + // extract an array of values for the requested column + $colData = []; + foreach ($database as $row) { + $colData[] = $row[$field]; + } + + return $colData; + } + + /** + * DAVERAGE. + * + * Averages the values in a column of a list or database that match conditions you specify. + * + * Excel Function: + * DAVERAGE(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float|string + */ + public static function DAVERAGE($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::AVERAGE( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DCOUNT. + * + * Counts the cells that contain numbers in a column of a list or database that match conditions + * that you specify. + * + * Excel Function: + * DCOUNT(database,[field],criteria) + * + * Excel Function: + * DAVERAGE(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return int + * + * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the + * database that match the criteria. + */ + public static function DCOUNT($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::COUNT( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DCOUNTA. + * + * Counts the nonblank cells in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DCOUNTA(database,[field],criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return int + * + * @TODO The field argument is optional. If field is omitted, DCOUNTA counts all records in the + * database that match the criteria. + */ + public static function DCOUNTA($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // reduce the database to a set of rows that match all the criteria + $database = self::filter($database, $criteria); + // extract an array of values for the requested column + $colData = []; + foreach ($database as $row) { + $colData[] = $row[$field]; + } + + // Return + return Statistical::COUNTA( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DGET. + * + * Extracts a single value from a column of a list or database that matches conditions that you + * specify. + * + * Excel Function: + * DGET(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return mixed + */ + public static function DGET($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + $colData = self::getFilteredColumn($database, $field, $criteria); + if (count($colData) > 1) { + return Functions::NAN(); + } + + return $colData[0]; + } + + /** + * DMAX. + * + * Returns the largest number in a column of a list or database that matches conditions you that + * specify. + * + * Excel Function: + * DMAX(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DMAX($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::MAX( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DMIN. + * + * Returns the smallest number in a column of a list or database that matches conditions you that + * specify. + * + * Excel Function: + * DMIN(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DMIN($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::MIN( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DPRODUCT. + * + * Multiplies the values in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DPRODUCT(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DPRODUCT($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return MathTrig::PRODUCT( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSTDEV. + * + * Estimates the standard deviation of a population based on a sample by using the numbers in a + * column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSTDEV(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float|string + */ + public static function DSTDEV($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::STDEV( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSTDEVP. + * + * Calculates the standard deviation of a population based on the entire population by using the + * numbers in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSTDEVP(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float|string + */ + public static function DSTDEVP($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::STDEVP( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSUM. + * + * Adds the numbers in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSUM(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DSUM($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return MathTrig::SUM( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DVAR. + * + * Estimates the variance of a population based on a sample by using the numbers in a column + * of a list or database that match conditions that you specify. + * + * Excel Function: + * DVAR(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DVAR($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::VARFunc( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DVARP. + * + * Calculates the variance of a population based on the entire population by using the numbers + * in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DVARP(database,field,criteria) + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DVARP($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::VARP( + self::getFilteredColumn($database, $field, $criteria) + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/DateTime.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/DateTime.php new file mode 100755 index 0000000..1986079 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/DateTime.php @@ -0,0 +1,1649 @@ +format('m'); + $oYear = (int) $PHPDateObject->format('Y'); + + $adjustmentMonthsString = (string) $adjustmentMonths; + if ($adjustmentMonths > 0) { + $adjustmentMonthsString = '+' . $adjustmentMonths; + } + if ($adjustmentMonths != 0) { + $PHPDateObject->modify($adjustmentMonthsString . ' months'); + } + $nMonth = (int) $PHPDateObject->format('m'); + $nYear = (int) $PHPDateObject->format('Y'); + + $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12); + if ($monthDiff != $adjustmentMonths) { + $adjustDays = (int) $PHPDateObject->format('d'); + $adjustDaysString = '-' . $adjustDays . ' days'; + $PHPDateObject->modify($adjustDaysString); + } + + return $PHPDateObject; + } + + /** + * DATETIMENOW. + * + * Returns the current date and time. + * The NOW function is useful when you need to display the current date and time on a worksheet or + * calculate a value based on the current date and time, and have that value updated each time you + * open the worksheet. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * NOW() + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATETIMENOW() + { + $saveTimeZone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + $retValue = false; + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $retValue = (float) Date::PHPToExcel(time()); + + break; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + $retValue = (int) time(); + + break; + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + $retValue = new \DateTime(); + + break; + } + date_default_timezone_set($saveTimeZone); + + return $retValue; + } + + /** + * DATENOW. + * + * Returns the current date. + * The NOW function is useful when you need to display the current date and time on a worksheet or + * calculate a value based on the current date and time, and have that value updated each time you + * open the worksheet. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TODAY() + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATENOW() + { + $saveTimeZone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + $retValue = false; + $excelDateTime = floor(Date::PHPToExcel(time())); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $retValue = (float) $excelDateTime; + + break; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + $retValue = (int) Date::excelToTimestamp($excelDateTime); + + break; + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + $retValue = Date::excelToDateTimeObject($excelDateTime); + + break; + } + date_default_timezone_set($saveTimeZone); + + return $retValue; + } + + /** + * DATE. + * + * The DATE function returns a value that represents a particular date. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * DATE(year,month,day) + * + * PhpSpreadsheet is a lot more forgiving than MS Excel when passing non numeric values to this function. + * A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted, + * as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language. + * + * @param int $year The value of the year argument can include one to four digits. + * Excel interprets the year argument according to the configured + * date system: 1900 or 1904. + * If year is between 0 (zero) and 1899 (inclusive), Excel adds that + * value to 1900 to calculate the year. For example, DATE(108,1,2) + * returns January 2, 2008 (1900+108). + * If year is between 1900 and 9999 (inclusive), Excel uses that + * value as the year. For example, DATE(2008,1,2) returns January 2, + * 2008. + * If year is less than 0 or is 10000 or greater, Excel returns the + * #NUM! error value. + * @param int $month A positive or negative integer representing the month of the year + * from 1 to 12 (January to December). + * If month is greater than 12, month adds that number of months to + * the first month in the year specified. For example, DATE(2008,14,2) + * returns the serial number representing February 2, 2009. + * If month is less than 1, month subtracts the magnitude of that + * number of months, plus 1, from the first month in the year + * specified. For example, DATE(2008,-3,2) returns the serial number + * representing September 2, 2007. + * @param int $day A positive or negative integer representing the day of the month + * from 1 to 31. + * If day is greater than the number of days in the month specified, + * day adds that number of days to the first day in the month. For + * example, DATE(2008,1,35) returns the serial number representing + * February 4, 2008. + * If day is less than 1, day subtracts the magnitude that number of + * days, plus one, from the first day of the month specified. For + * example, DATE(2008,1,-15) returns the serial number representing + * December 16, 2007. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATE($year = 0, $month = 1, $day = 1) + { + $year = Functions::flattenSingleValue($year); + $month = Functions::flattenSingleValue($month); + $day = Functions::flattenSingleValue($day); + + if (($month !== null) && (!is_numeric($month))) { + $month = Date::monthStringToNumber($month); + } + + if (($day !== null) && (!is_numeric($day))) { + $day = Date::dayStringToNumber($day); + } + + $year = ($year !== null) ? StringHelper::testStringAsNumeric($year) : 0; + $month = ($month !== null) ? StringHelper::testStringAsNumeric($month) : 0; + $day = ($day !== null) ? StringHelper::testStringAsNumeric($day) : 0; + if ((!is_numeric($year)) || + (!is_numeric($month)) || + (!is_numeric($day))) { + return Functions::VALUE(); + } + $year = (int) $year; + $month = (int) $month; + $day = (int) $day; + + $baseYear = Date::getExcelCalendar(); + // Validate parameters + if ($year < ($baseYear - 1900)) { + return Functions::NAN(); + } + if ((($baseYear - 1900) != 0) && ($year < $baseYear) && ($year >= 1900)) { + return Functions::NAN(); + } + + if (($year < $baseYear) && ($year >= ($baseYear - 1900))) { + $year += 1900; + } + + if ($month < 1) { + // Handle year/month adjustment if month < 1 + --$month; + $year += ceil($month / 12) - 1; + $month = 13 - abs($month % 12); + } elseif ($month > 12) { + // Handle year/month adjustment if month > 12 + $year += floor($month / 12); + $month = ($month % 12); + } + + // Re-validate the year parameter after adjustments + if (($year < $baseYear) || ($year >= 10000)) { + return Functions::NAN(); + } + + // Execute function + $excelDateValue = Date::formattedPHPToExcel($year, $month, $day); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp($excelDateValue); + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return Date::excelToDateTimeObject($excelDateValue); + } + } + + /** + * TIME. + * + * The TIME function returns a value that represents a particular time. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TIME(hour,minute,second) + * + * @param int $hour A number from 0 (zero) to 32767 representing the hour. + * Any value greater than 23 will be divided by 24 and the remainder + * will be treated as the hour value. For example, TIME(27,0,0) = + * TIME(3,0,0) = .125 or 3:00 AM. + * @param int $minute A number from 0 to 32767 representing the minute. + * Any value greater than 59 will be converted to hours and minutes. + * For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM. + * @param int $second A number from 0 to 32767 representing the second. + * Any value greater than 59 will be converted to hours, minutes, + * and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 + * or 12:33:20 AM + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function TIME($hour = 0, $minute = 0, $second = 0) + { + $hour = Functions::flattenSingleValue($hour); + $minute = Functions::flattenSingleValue($minute); + $second = Functions::flattenSingleValue($second); + + if ($hour == '') { + $hour = 0; + } + if ($minute == '') { + $minute = 0; + } + if ($second == '') { + $second = 0; + } + + if ((!is_numeric($hour)) || (!is_numeric($minute)) || (!is_numeric($second))) { + return Functions::VALUE(); + } + $hour = (int) $hour; + $minute = (int) $minute; + $second = (int) $second; + + if ($second < 0) { + $minute += floor($second / 60); + $second = 60 - abs($second % 60); + if ($second == 60) { + $second = 0; + } + } elseif ($second >= 60) { + $minute += floor($second / 60); + $second = $second % 60; + } + if ($minute < 0) { + $hour += floor($minute / 60); + $minute = 60 - abs($minute % 60); + if ($minute == 60) { + $minute = 0; + } + } elseif ($minute >= 60) { + $hour += floor($minute / 60); + $minute = $minute % 60; + } + + if ($hour > 23) { + $hour = $hour % 24; + } elseif ($hour < 0) { + return Functions::NAN(); + } + + // Execute function + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $date = 0; + $calendar = Date::getExcelCalendar(); + if ($calendar != Date::CALENDAR_WINDOWS_1900) { + $date = 1; + } + + return (float) Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second); + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp(Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600 + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + $dayAdjust = 0; + if ($hour < 0) { + $dayAdjust = floor($hour / 24); + $hour = 24 - abs($hour % 24); + if ($hour == 24) { + $hour = 0; + } + } elseif ($hour >= 24) { + $dayAdjust = floor($hour / 24); + $hour = $hour % 24; + } + $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second); + if ($dayAdjust != 0) { + $phpDateObject->modify($dayAdjust . ' days'); + } + + return $phpDateObject; + } + } + + /** + * DATEVALUE. + * + * Returns a value that represents a particular date. + * Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp + * value. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * DATEVALUE(dateValue) + * + * @param string $dateValue Text that represents a date in a Microsoft Excel date format. + * For example, "1/30/2008" or "30-Jan-2008" are text strings within + * quotation marks that represent dates. Using the default date + * system in Excel for Windows, date_text must represent a date from + * January 1, 1900, to December 31, 9999. Using the default date + * system in Excel for the Macintosh, date_text must represent a date + * from January 1, 1904, to December 31, 9999. DATEVALUE returns the + * #VALUE! error value if date_text is out of this range. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATEVALUE($dateValue = 1) + { + $dateValue = trim(Functions::flattenSingleValue($dateValue), '"'); + // Strip any ordinals because they're allowed in Excel (English only) + $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue); + // Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany) + $dateValue = str_replace(['/', '.', '-', ' '], ' ', $dateValue); + + $yearFound = false; + $t1 = explode(' ', $dateValue); + foreach ($t1 as &$t) { + if ((is_numeric($t)) && ($t > 31)) { + if ($yearFound) { + return Functions::VALUE(); + } + if ($t < 100) { + $t += 1900; + } + $yearFound = true; + } + } + if ((count($t1) == 1) && (strpos($t, ':') !== false)) { + // We've been fed a time value without any date + return 0.0; + } elseif (count($t1) == 2) { + // We only have two parts of the date: either day/month or month/year + if ($yearFound) { + array_unshift($t1, 1); + } else { + if ($t1[1] > 29) { + $t1[1] += 1900; + array_unshift($t1, 1); + } else { + $t1[] = date('Y'); + } + } + } + unset($t); + $dateValue = implode(' ', $t1); + + $PHPDateArray = date_parse($dateValue); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + $testVal1 = strtok($dateValue, '- '); + if ($testVal1 !== false) { + $testVal2 = strtok('- '); + if ($testVal2 !== false) { + $testVal3 = strtok('- '); + if ($testVal3 === false) { + $testVal3 = strftime('%Y'); + } + } else { + return Functions::VALUE(); + } + } else { + return Functions::VALUE(); + } + if ($testVal1 < 31 && $testVal2 < 12 && $testVal3 < 12 && strlen($testVal3) == 2) { + $testVal3 += 2000; + } + $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + return Functions::VALUE(); + } + } + } + + if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { + // Execute function + if ($PHPDateArray['year'] == '') { + $PHPDateArray['year'] = strftime('%Y'); + } + if ($PHPDateArray['year'] < 1900) { + return Functions::VALUE(); + } + if ($PHPDateArray['month'] == '') { + $PHPDateArray['month'] = strftime('%m'); + } + if ($PHPDateArray['day'] == '') { + $PHPDateArray['day'] = strftime('%d'); + } + if (!checkdate($PHPDateArray['month'], $PHPDateArray['day'], $PHPDateArray['year'])) { + return Functions::VALUE(); + } + $excelDateValue = floor( + Date::formattedPHPToExcel( + $PHPDateArray['year'], + $PHPDateArray['month'], + $PHPDateArray['day'], + $PHPDateArray['hour'], + $PHPDateArray['minute'], + $PHPDateArray['second'] + ) + ); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp($excelDateValue); + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00'); + } + } + + return Functions::VALUE(); + } + + /** + * TIMEVALUE. + * + * Returns a value that represents a particular time. + * Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp + * value. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TIMEVALUE(timeValue) + * + * @param string $timeValue A text string that represents a time in any one of the Microsoft + * Excel time formats; for example, "6:45 PM" and "18:45" text strings + * within quotation marks that represent time. + * Date information in time_text is ignored. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function TIMEVALUE($timeValue) + { + $timeValue = trim(Functions::flattenSingleValue($timeValue), '"'); + $timeValue = str_replace(['/', '.'], '-', $timeValue); + + $arraySplit = preg_split('/[\/:\-\s]/', $timeValue); + if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) { + $arraySplit[0] = ($arraySplit[0] % 24); + $timeValue = implode(':', $arraySplit); + } + + $PHPDateArray = date_parse($timeValue); + if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $excelDateValue = Date::formattedPHPToExcel( + $PHPDateArray['year'], + $PHPDateArray['month'], + $PHPDateArray['day'], + $PHPDateArray['hour'], + $PHPDateArray['minute'], + $PHPDateArray['second'] + ); + } else { + $excelDateValue = Date::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1; + } + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) $phpDateValue = Date::excelToTimestamp($excelDateValue + 25569) - 3600; + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']); + } + } + + return Functions::VALUE(); + } + + /** + * DATEDIF. + * + * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object + * or a standard date string + * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object + * or a standard date string + * @param string $unit + * + * @return int|string Interval between the dates + */ + public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 'D') + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + $unit = strtoupper(Functions::flattenSingleValue($unit)); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + + // Validate parameters + if ($startDate > $endDate) { + return Functions::NAN(); + } + + // Execute function + $difference = $endDate - $startDate; + + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $startDays = $PHPStartDateObject->format('j'); + $startMonths = $PHPStartDateObject->format('n'); + $startYears = $PHPStartDateObject->format('Y'); + + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + $endDays = $PHPEndDateObject->format('j'); + $endMonths = $PHPEndDateObject->format('n'); + $endYears = $PHPEndDateObject->format('Y'); + + $PHPDiffDateObject = $PHPEndDateObject->diff($PHPStartDateObject); + + switch ($unit) { + case 'D': + $retVal = (int) $difference; + + break; + case 'M': + $retVal = (int) 12 * $PHPDiffDateObject->format('%y') + $PHPDiffDateObject->format('%m'); + + break; + case 'Y': + $retVal = (int) $PHPDiffDateObject->format('%y'); + + break; + case 'MD': + if ($endDays < $startDays) { + $retVal = $endDays; + $PHPEndDateObject->modify('-' . $endDays . ' days'); + $adjustDays = $PHPEndDateObject->format('j'); + $retVal += ($adjustDays - $startDays); + } else { + $retVal = (int) $PHPDiffDateObject->format('%d'); + } + + break; + case 'YM': + $retVal = (int) $PHPDiffDateObject->format('%m'); + + break; + case 'YD': + $retVal = (int) $difference; + if ($endYears > $startYears) { + $isLeapStartYear = $PHPStartDateObject->format('L'); + $wasLeapEndYear = $PHPEndDateObject->format('L'); + + // Adjust end year to be as close as possible as start year + while ($PHPEndDateObject >= $PHPStartDateObject) { + $PHPEndDateObject->modify('-1 year'); + $endYears = $PHPEndDateObject->format('Y'); + } + $PHPEndDateObject->modify('+1 year'); + + // Get the result + $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days; + + // Adjust for leap years cases + $isLeapEndYear = $PHPEndDateObject->format('L'); + $limit = new \DateTime($PHPEndDateObject->format('Y-02-29')); + if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) { + --$retVal; + } + } + + break; + default: + $retVal = Functions::VALUE(); + } + + return $retVal; + } + + /** + * DAYS. + * + * Returns the number of days between two dates + * + * Excel Function: + * DAYS(endDate, startDate) + * + * @param DateTimeImmutable|float|int|string $endDate Excel date serial value (float), + * PHP date timestamp (integer), PHP DateTime object, or a standard date string + * @param DateTimeImmutable|float|int|string $startDate Excel date serial value (float), + * PHP date timestamp (integer), PHP DateTime object, or a standard date string + * + * @return int|string Number of days between start date and end date or an error + */ + public static function DAYS($endDate = 0, $startDate = 0) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + + $startDate = self::getDateValue($startDate); + if (is_string($startDate)) { + return Functions::VALUE(); + } + + $endDate = self::getDateValue($endDate); + if (is_string($endDate)) { + return Functions::VALUE(); + } + + // Execute function + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + + $diff = $PHPStartDateObject->diff($PHPEndDateObject); + $days = $diff->days; + + if ($diff->invert) { + $days = -$days; + } + + return $days; + } + + /** + * DAYS360. + * + * Returns the number of days between two dates based on a 360-day year (twelve 30-day months), + * which is used in some accounting calculations. Use this function to help compute payments if + * your accounting system is based on twelve 30-day months. + * + * Excel Function: + * DAYS360(startDate,endDate[,method]) + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param bool $method US or European Method + * FALSE or omitted: U.S. (NASD) method. If the starting date is + * the last day of a month, it becomes equal to the 30th of the + * same month. If the ending date is the last day of a month and + * the starting date is earlier than the 30th of a month, the + * ending date becomes equal to the 1st of the next month; + * otherwise the ending date becomes equal to the 30th of the + * same month. + * TRUE: European method. Starting dates and ending dates that + * occur on the 31st of a month become equal to the 30th of the + * same month. + * + * @return int|string Number of days between start date and end date + */ + public static function DAYS360($startDate = 0, $endDate = 0, $method = false) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + + if (!is_bool($method)) { + return Functions::VALUE(); + } + + // Execute function + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $startDay = $PHPStartDateObject->format('j'); + $startMonth = $PHPStartDateObject->format('n'); + $startYear = $PHPStartDateObject->format('Y'); + + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + $endDay = $PHPEndDateObject->format('j'); + $endMonth = $PHPEndDateObject->format('n'); + $endYear = $PHPEndDateObject->format('Y'); + + return self::dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, !$method); + } + + /** + * YEARFRAC. + * + * Calculates the fraction of the year represented by the number of whole days between two dates + * (the start_date and the end_date). + * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or + * obligations to assign to a specific term. + * + * Excel Function: + * YEARFRAC(startDate,endDate[,method]) + * See https://lists.oasis-open.org/archives/office-formula/200806/msg00039.html + * for description of algorithm used in Excel + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $method Method used for the calculation + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string fraction of the year, or a string containing an error + */ + public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + $method = Functions::flattenSingleValue($method); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + if ($startDate > $endDate) { + $temp = $startDate; + $startDate = $endDate; + $endDate = $temp; + } + + if (((is_numeric($method)) && (!is_string($method))) || ($method == '')) { + switch ($method) { + case 0: + return self::DAYS360($startDate, $endDate) / 360; + case 1: + $days = self::DATEDIF($startDate, $endDate); + $startYear = self::YEAR($startDate); + $endYear = self::YEAR($endDate); + $years = $endYear - $startYear + 1; + $startMonth = self::MONTHOFYEAR($startDate); + $startDay = self::DAYOFMONTH($startDate); + $endMonth = self::MONTHOFYEAR($endDate); + $endDay = self::DAYOFMONTH($endDate); + $startMonthDay = 100 * $startMonth + $startDay; + $endMonthDay = 100 * $endMonth + $endDay; + if ($years == 1) { + if (self::isLeapYear($endYear)) { + $tmpCalcAnnualBasis = 366; + } else { + $tmpCalcAnnualBasis = 365; + } + } elseif ($years == 2 && $startMonthDay >= $endMonthDay) { + if (self::isLeapYear($startYear)) { + if ($startMonthDay <= 229) { + $tmpCalcAnnualBasis = 366; + } else { + $tmpCalcAnnualBasis = 365; + } + } elseif (self::isLeapYear($endYear)) { + if ($endMonthDay >= 229) { + $tmpCalcAnnualBasis = 366; + } else { + $tmpCalcAnnualBasis = 365; + } + } else { + $tmpCalcAnnualBasis = 365; + } + } else { + $tmpCalcAnnualBasis = 0; + for ($year = $startYear; $year <= $endYear; ++$year) { + $tmpCalcAnnualBasis += self::isLeapYear($year) ? 366 : 365; + } + $tmpCalcAnnualBasis /= $years; + } + + return $days / $tmpCalcAnnualBasis; + case 2: + return self::DATEDIF($startDate, $endDate) / 360; + case 3: + return self::DATEDIF($startDate, $endDate) / 365; + case 4: + return self::DAYS360($startDate, $endDate, true) / 360; + } + } + + return Functions::VALUE(); + } + + /** + * NETWORKDAYS. + * + * Returns the number of whole working days between start_date and end_date. Working days + * exclude weekends and any dates identified in holidays. + * Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days + * worked during a specific term. + * + * Excel Function: + * NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]]) + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Interval between the dates + */ + public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs) + { + // Retrieve the mandatory start and end date that are referenced in the function definition + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); + + // Validate the start and end dates + if (is_string($startDate = $sDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + $startDate = (float) floor($startDate); + if (is_string($endDate = $eDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + $endDate = (float) floor($endDate); + + if ($sDate > $eDate) { + $startDate = $eDate; + $endDate = $sDate; + } + + // Execute function + $startDoW = 6 - self::WEEKDAY($startDate, 2); + if ($startDoW < 0) { + $startDoW = 0; + } + $endDoW = self::WEEKDAY($endDate, 2); + if ($endDoW >= 6) { + $endDoW = 0; + } + + $wholeWeekDays = floor(($endDate - $startDate) / 7) * 5; + $partWeekDays = $endDoW + $startDoW; + if ($partWeekDays > 5) { + $partWeekDays -= 5; + } + + // Test any extra holiday parameters + $holidayCountedArray = []; + foreach ($dateArgs as $holidayDate) { + if (is_string($holidayDate = self::getDateValue($holidayDate))) { + return Functions::VALUE(); + } + if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { + if ((self::WEEKDAY($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) { + --$partWeekDays; + $holidayCountedArray[] = $holidayDate; + } + } + } + + if ($sDate > $eDate) { + return 0 - ($wholeWeekDays + $partWeekDays); + } + + return $wholeWeekDays + $partWeekDays; + } + + /** + * WORKDAY. + * + * Returns the date that is the indicated number of working days before or after a date (the + * starting date). Working days exclude weekends and any dates identified as holidays. + * Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected + * delivery times, or the number of days of work performed. + * + * Excel Function: + * WORKDAY(startDate,endDays[,holidays[,holiday[,...]]]) + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $endDays The number of nonweekend and nonholiday days before or after + * startDate. A positive value for days yields a future date; a + * negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function WORKDAY($startDate, $endDays, ...$dateArgs) + { + // Retrieve the mandatory start date and days that are referenced in the function definition + $startDate = Functions::flattenSingleValue($startDate); + $endDays = Functions::flattenSingleValue($endDays); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); + + if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) { + return Functions::VALUE(); + } + $startDate = (float) floor($startDate); + $endDays = (int) floor($endDays); + // If endDays is 0, we always return startDate + if ($endDays == 0) { + return $startDate; + } + + $decrementing = $endDays < 0; + + // Adjust the start date if it falls over a weekend + + $startDoW = self::WEEKDAY($startDate, 3); + if (self::WEEKDAY($startDate, 3) >= 5) { + $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW; + ($decrementing) ? $endDays++ : $endDays--; + } + + // Add endDays + $endDate = (float) $startDate + ((int) ($endDays / 5) * 7) + ($endDays % 5); + + // Adjust the calculated end date if it falls over a weekend + $endDoW = self::WEEKDAY($endDate, 3); + if ($endDoW >= 5) { + $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW; + } + + // Test any extra holiday parameters + if (!empty($dateArgs)) { + $holidayCountedArray = $holidayDates = []; + foreach ($dateArgs as $holidayDate) { + if (($holidayDate !== null) && (trim($holidayDate) > '')) { + if (is_string($holidayDate = self::getDateValue($holidayDate))) { + return Functions::VALUE(); + } + if (self::WEEKDAY($holidayDate, 3) < 5) { + $holidayDates[] = $holidayDate; + } + } + } + if ($decrementing) { + rsort($holidayDates, SORT_NUMERIC); + } else { + sort($holidayDates, SORT_NUMERIC); + } + foreach ($holidayDates as $holidayDate) { + if ($decrementing) { + if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) { + if (!in_array($holidayDate, $holidayCountedArray)) { + --$endDate; + $holidayCountedArray[] = $holidayDate; + } + } + } else { + if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { + if (!in_array($holidayDate, $holidayCountedArray)) { + ++$endDate; + $holidayCountedArray[] = $holidayDate; + } + } + } + // Adjust the calculated end date if it falls over a weekend + $endDoW = self::WEEKDAY($endDate, 3); + if ($endDoW >= 5) { + $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW; + } + } + } + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $endDate; + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp($endDate); + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return Date::excelToDateTimeObject($endDate); + } + } + + /** + * DAYOFMONTH. + * + * Returns the day of the month, for a specified date. The day is given as an integer + * ranging from 1 to 31. + * + * Excel Function: + * DAY(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Day of the month + */ + public static function DAYOFMONTH($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + if ($dateValue < 0.0) { + return Functions::NAN(); + } elseif ($dateValue < 1.0) { + return 0; + } + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('j'); + } + + /** + * WEEKDAY. + * + * Returns the day of the week for a specified date. The day is given as an integer + * ranging from 0 to 7 (dependent on the requested style). + * + * Excel Function: + * WEEKDAY(dateValue[,style]) + * + * @param int $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $style A number that determines the type of return value + * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). + * 2 Numbers 1 (Monday) through 7 (Sunday). + * 3 Numbers 0 (Monday) through 6 (Sunday). + * + * @return int|string Day of the week value + */ + public static function WEEKDAY($dateValue = 1, $style = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $style = Functions::flattenSingleValue($style); + + if (!is_numeric($style)) { + return Functions::VALUE(); + } elseif (($style < 1) || ($style > 3)) { + return Functions::NAN(); + } + $style = floor($style); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + $DoW = (int) $PHPDateObject->format('w'); + + $firstDay = 1; + switch ($style) { + case 1: + ++$DoW; + + break; + case 2: + if ($DoW === 0) { + $DoW = 7; + } + + break; + case 3: + if ($DoW === 0) { + $DoW = 7; + } + $firstDay = 0; + --$DoW; + + break; + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + // Test for Excel's 1900 leap year, and introduce the error as required + if (($PHPDateObject->format('Y') == 1900) && ($PHPDateObject->format('n') <= 2)) { + --$DoW; + if ($DoW < $firstDay) { + $DoW += 7; + } + } + } + + return $DoW; + } + + const STARTWEEK_SUNDAY = 1; + const STARTWEEK_MONDAY = 2; + const STARTWEEK_MONDAY_ALT = 11; + const STARTWEEK_TUESDAY = 12; + const STARTWEEK_WEDNESDAY = 13; + const STARTWEEK_THURSDAY = 14; + const STARTWEEK_FRIDAY = 15; + const STARTWEEK_SATURDAY = 16; + const STARTWEEK_SUNDAY_ALT = 17; + const DOW_SUNDAY = 1; + const DOW_MONDAY = 2; + const DOW_TUESDAY = 3; + const DOW_WEDNESDAY = 4; + const DOW_THURSDAY = 5; + const DOW_FRIDAY = 6; + const DOW_SATURDAY = 7; + const STARTWEEK_MONDAY_ISO = 21; + const METHODARR = [ + self::STARTWEEK_SUNDAY => self::DOW_SUNDAY, + self::DOW_MONDAY, + self::STARTWEEK_MONDAY_ALT => self::DOW_MONDAY, + self::DOW_TUESDAY, + self::DOW_WEDNESDAY, + self::DOW_THURSDAY, + self::DOW_FRIDAY, + self::DOW_SATURDAY, + self::DOW_SUNDAY, + self::STARTWEEK_MONDAY_ISO => self::STARTWEEK_MONDAY_ISO, + ]; + + /** + * WEEKNUM. + * + * Returns the week of the year for a specified date. + * The WEEKNUM function considers the week containing January 1 to be the first week of the year. + * However, there is a European standard that defines the first week as the one with the majority + * of days (four or more) falling in the new year. This means that for years in which there are + * three days or less in the first week of January, the WEEKNUM function returns week numbers + * that are incorrect according to the European standard. + * + * Excel Function: + * WEEKNUM(dateValue[,style]) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $method Week begins on Sunday or Monday + * 1 or omitted Week begins on Sunday. + * 2 Week begins on Monday. + * 11 Week begins on Monday. + * 12 Week begins on Tuesday. + * 13 Week begins on Wednesday. + * 14 Week begins on Thursday. + * 15 Week begins on Friday. + * 16 Week begins on Saturday. + * 17 Week begins on Sunday. + * 21 ISO (Jan. 4 is week 1, begins on Monday). + * + * @return int|string Week Number + */ + public static function WEEKNUM($dateValue = 1, $method = self::STARTWEEK_SUNDAY) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $method = Functions::flattenSingleValue($method); + + if (!is_numeric($method)) { + return Functions::VALUE(); + } + $method = (int) $method; + if (!array_key_exists($method, self::METHODARR)) { + return Functions::NaN(); + } + $method = self::METHODARR[$method]; + + $dateValue = self::getDateValue($dateValue); + if (is_string($dateValue)) { + return Functions::VALUE(); + } + if ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + if ($method == self::STARTWEEK_MONDAY_ISO) { + return (int) $PHPDateObject->format('W'); + } + $dayOfYear = $PHPDateObject->format('z'); + $PHPDateObject->modify('-' . $dayOfYear . ' days'); + $firstDayOfFirstWeek = $PHPDateObject->format('w'); + $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7; + $daysInFirstWeek += 7 * !$daysInFirstWeek; + $endFirstWeek = $daysInFirstWeek - 1; + $weekOfYear = floor(($dayOfYear - $endFirstWeek + 13) / 7); + + return (int) $weekOfYear; + } + + /** + * ISOWEEKNUM. + * + * Returns the ISO 8601 week number of the year for a specified date. + * + * Excel Function: + * ISOWEEKNUM(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Week Number + */ + public static function ISOWEEKNUM($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('W'); + } + + /** + * MONTHOFYEAR. + * + * Returns the month of a date represented by a serial number. + * The month is given as an integer, ranging from 1 (January) to 12 (December). + * + * Excel Function: + * MONTH(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Month of the year + */ + public static function MONTHOFYEAR($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if (empty($dateValue)) { + $dateValue = 1; + } + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('n'); + } + + /** + * YEAR. + * + * Returns the year corresponding to a date. + * The year is returned as an integer in the range 1900-9999. + * + * Excel Function: + * YEAR(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Year + */ + public static function YEAR($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('Y'); + } + + /** + * HOUROFDAY. + * + * Returns the hour of a time value. + * The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). + * + * Excel Function: + * HOUR(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Hour + */ + public static function HOUROFDAY($timeValue = 0) + { + $timeValue = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('G', $timeValue); + } + + /** + * MINUTE. + * + * Returns the minutes of a time value. + * The minute is given as an integer, ranging from 0 to 59. + * + * Excel Function: + * MINUTE(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Minute + */ + public static function MINUTE($timeValue = 0) + { + $timeValue = $timeTester = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('i', $timeValue); + } + + /** + * SECOND. + * + * Returns the seconds of a time value. + * The second is given as an integer in the range 0 (zero) to 59. + * + * Excel Function: + * SECOND(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Second + */ + public static function SECOND($timeValue = 0) + { + $timeValue = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('s', $timeValue); + } + + /** + * EDATE. + * + * Returns the serial number that represents the date that is the indicated number of months + * before or after a specified date (the start_date). + * Use EDATE to calculate maturity dates or due dates that fall on the same day of the month + * as the date of issue. + * + * Excel Function: + * EDATE(dateValue,adjustmentMonths) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $adjustmentMonths The number of months before or after start_date. + * A positive value for months yields a future date; + * a negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function EDATE($dateValue = 1, $adjustmentMonths = 0) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths); + + if (!is_numeric($adjustmentMonths)) { + return Functions::VALUE(); + } + $adjustmentMonths = floor($adjustmentMonths); + + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + // Execute function + $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) Date::PHPToExcel($PHPDateObject); + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject)); + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return $PHPDateObject; + } + } + + /** + * EOMONTH. + * + * Returns the date value for the last day of the month that is the indicated number of months + * before or after start_date. + * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. + * + * Excel Function: + * EOMONTH(dateValue,adjustmentMonths) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $adjustmentMonths The number of months before or after start_date. + * A positive value for months yields a future date; + * a negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths); + + if (!is_numeric($adjustmentMonths)) { + return Functions::VALUE(); + } + $adjustmentMonths = floor($adjustmentMonths); + + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + // Execute function + $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1); + $adjustDays = (int) $PHPDateObject->format('d'); + $adjustDaysString = '-' . $adjustDays . ' days'; + $PHPDateObject->modify($adjustDaysString); + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) Date::PHPToExcel($PHPDateObject); + case Functions::RETURNDATE_UNIX_TIMESTAMP: + return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject)); + case Functions::RETURNDATE_PHP_DATETIME_OBJECT: + return $PHPDateObject; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php new file mode 100755 index 0000000..b688e05 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php @@ -0,0 +1,73 @@ +stack); + } + + /** + * Push a new entry onto the stack. + * + * @param mixed $value + */ + public function push($value): void + { + $this->stack[$value] = $value; + } + + /** + * Pop the last entry from the stack. + * + * @return mixed + */ + public function pop() + { + return array_pop($this->stack); + } + + /** + * Test to see if a specified entry exists on the stack. + * + * @param mixed $value The value to test + * + * @return bool + */ + public function onStack($value) + { + return isset($this->stack[$value]); + } + + /** + * Clear the stack. + */ + public function clear(): void + { + $this->stack = []; + } + + /** + * Return an array of all entries on the stack. + * + * @return mixed[] + */ + public function showStack() + { + return $this->stack; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/Logger.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/Logger.php new file mode 100755 index 0000000..d69ea56 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engine/Logger.php @@ -0,0 +1,126 @@ +cellStack = $stack; + } + + /** + * Enable/Disable Calculation engine logging. + * + * @param bool $pValue + */ + public function setWriteDebugLog($pValue): void + { + $this->writeDebugLog = $pValue; + } + + /** + * Return whether calculation engine logging is enabled or disabled. + * + * @return bool + */ + public function getWriteDebugLog() + { + return $this->writeDebugLog; + } + + /** + * Enable/Disable echoing of debug log information. + * + * @param bool $pValue + */ + public function setEchoDebugLog($pValue): void + { + $this->echoDebugLog = $pValue; + } + + /** + * Return whether echoing of debug log information is enabled or disabled. + * + * @return bool + */ + public function getEchoDebugLog() + { + return $this->echoDebugLog; + } + + /** + * Write an entry to the calculation engine debug log. + */ + public function writeDebugLog(...$args): void + { + // Only write the debug log if logging is enabled + if ($this->writeDebugLog) { + $message = implode('', $args); + $cellReference = implode(' -> ', $this->cellStack->showStack()); + if ($this->echoDebugLog) { + echo $cellReference, + ($this->cellStack->count() > 0 ? ' => ' : ''), + $message, + PHP_EOL; + } + $this->debugLog[] = $cellReference . + ($this->cellStack->count() > 0 ? ' => ' : '') . + $message; + } + } + + /** + * Clear the calculation engine debug log. + */ + public function clearLog(): void + { + $this->debugLog = []; + } + + /** + * Return the calculation engine debug log. + * + * @return string[] + */ + public function getLog() + { + return $this->debugLog; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engineering.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engineering.php new file mode 100755 index 0000000..dcbd539 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Engineering.php @@ -0,0 +1,2757 @@ + ['Group' => 'Mass', 'Unit Name' => 'Gram', 'AllowPrefix' => true], + 'sg' => ['Group' => 'Mass', 'Unit Name' => 'Slug', 'AllowPrefix' => false], + 'lbm' => ['Group' => 'Mass', 'Unit Name' => 'Pound mass (avoirdupois)', 'AllowPrefix' => false], + 'u' => ['Group' => 'Mass', 'Unit Name' => 'U (atomic mass unit)', 'AllowPrefix' => true], + 'ozm' => ['Group' => 'Mass', 'Unit Name' => 'Ounce mass (avoirdupois)', 'AllowPrefix' => false], + 'm' => ['Group' => 'Distance', 'Unit Name' => 'Meter', 'AllowPrefix' => true], + 'mi' => ['Group' => 'Distance', 'Unit Name' => 'Statute mile', 'AllowPrefix' => false], + 'Nmi' => ['Group' => 'Distance', 'Unit Name' => 'Nautical mile', 'AllowPrefix' => false], + 'in' => ['Group' => 'Distance', 'Unit Name' => 'Inch', 'AllowPrefix' => false], + 'ft' => ['Group' => 'Distance', 'Unit Name' => 'Foot', 'AllowPrefix' => false], + 'yd' => ['Group' => 'Distance', 'Unit Name' => 'Yard', 'AllowPrefix' => false], + 'ang' => ['Group' => 'Distance', 'Unit Name' => 'Angstrom', 'AllowPrefix' => true], + 'Pica' => ['Group' => 'Distance', 'Unit Name' => 'Pica (1/72 in)', 'AllowPrefix' => false], + 'yr' => ['Group' => 'Time', 'Unit Name' => 'Year', 'AllowPrefix' => false], + 'day' => ['Group' => 'Time', 'Unit Name' => 'Day', 'AllowPrefix' => false], + 'hr' => ['Group' => 'Time', 'Unit Name' => 'Hour', 'AllowPrefix' => false], + 'mn' => ['Group' => 'Time', 'Unit Name' => 'Minute', 'AllowPrefix' => false], + 'sec' => ['Group' => 'Time', 'Unit Name' => 'Second', 'AllowPrefix' => true], + 'Pa' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true], + 'p' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true], + 'atm' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true], + 'at' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true], + 'mmHg' => ['Group' => 'Pressure', 'Unit Name' => 'mm of Mercury', 'AllowPrefix' => true], + 'N' => ['Group' => 'Force', 'Unit Name' => 'Newton', 'AllowPrefix' => true], + 'dyn' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true], + 'dy' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true], + 'lbf' => ['Group' => 'Force', 'Unit Name' => 'Pound force', 'AllowPrefix' => false], + 'J' => ['Group' => 'Energy', 'Unit Name' => 'Joule', 'AllowPrefix' => true], + 'e' => ['Group' => 'Energy', 'Unit Name' => 'Erg', 'AllowPrefix' => true], + 'c' => ['Group' => 'Energy', 'Unit Name' => 'Thermodynamic calorie', 'AllowPrefix' => true], + 'cal' => ['Group' => 'Energy', 'Unit Name' => 'IT calorie', 'AllowPrefix' => true], + 'eV' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true], + 'ev' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true], + 'HPh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false], + 'hh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false], + 'Wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true], + 'wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true], + 'flb' => ['Group' => 'Energy', 'Unit Name' => 'Foot-pound', 'AllowPrefix' => false], + 'BTU' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false], + 'btu' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false], + 'HP' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false], + 'h' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false], + 'W' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true], + 'w' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true], + 'T' => ['Group' => 'Magnetism', 'Unit Name' => 'Tesla', 'AllowPrefix' => true], + 'ga' => ['Group' => 'Magnetism', 'Unit Name' => 'Gauss', 'AllowPrefix' => true], + 'C' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false], + 'cel' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false], + 'F' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false], + 'fah' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false], + 'K' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false], + 'kel' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false], + 'tsp' => ['Group' => 'Liquid', 'Unit Name' => 'Teaspoon', 'AllowPrefix' => false], + 'tbs' => ['Group' => 'Liquid', 'Unit Name' => 'Tablespoon', 'AllowPrefix' => false], + 'oz' => ['Group' => 'Liquid', 'Unit Name' => 'Fluid Ounce', 'AllowPrefix' => false], + 'cup' => ['Group' => 'Liquid', 'Unit Name' => 'Cup', 'AllowPrefix' => false], + 'pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false], + 'us_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false], + 'uk_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.K. Pint', 'AllowPrefix' => false], + 'qt' => ['Group' => 'Liquid', 'Unit Name' => 'Quart', 'AllowPrefix' => false], + 'gal' => ['Group' => 'Liquid', 'Unit Name' => 'Gallon', 'AllowPrefix' => false], + 'l' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true], + 'lt' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true], + ]; + + /** + * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM(). + * + * @var mixed[] + */ + private static $conversionMultipliers = [ + 'Y' => ['multiplier' => 1E24, 'name' => 'yotta'], + 'Z' => ['multiplier' => 1E21, 'name' => 'zetta'], + 'E' => ['multiplier' => 1E18, 'name' => 'exa'], + 'P' => ['multiplier' => 1E15, 'name' => 'peta'], + 'T' => ['multiplier' => 1E12, 'name' => 'tera'], + 'G' => ['multiplier' => 1E9, 'name' => 'giga'], + 'M' => ['multiplier' => 1E6, 'name' => 'mega'], + 'k' => ['multiplier' => 1E3, 'name' => 'kilo'], + 'h' => ['multiplier' => 1E2, 'name' => 'hecto'], + 'e' => ['multiplier' => 1E1, 'name' => 'deka'], + 'd' => ['multiplier' => 1E-1, 'name' => 'deci'], + 'c' => ['multiplier' => 1E-2, 'name' => 'centi'], + 'm' => ['multiplier' => 1E-3, 'name' => 'milli'], + 'u' => ['multiplier' => 1E-6, 'name' => 'micro'], + 'n' => ['multiplier' => 1E-9, 'name' => 'nano'], + 'p' => ['multiplier' => 1E-12, 'name' => 'pico'], + 'f' => ['multiplier' => 1E-15, 'name' => 'femto'], + 'a' => ['multiplier' => 1E-18, 'name' => 'atto'], + 'z' => ['multiplier' => 1E-21, 'name' => 'zepto'], + 'y' => ['multiplier' => 1E-24, 'name' => 'yocto'], + ]; + + /** + * Details of the Units of measure conversion factors, organised by group. + * + * @var mixed[] + */ + private static $unitConversions = [ + 'Mass' => [ + 'g' => [ + 'g' => 1.0, + 'sg' => 6.85220500053478E-05, + 'lbm' => 2.20462291469134E-03, + 'u' => 6.02217000000000E+23, + 'ozm' => 3.52739718003627E-02, + ], + 'sg' => [ + 'g' => 1.45938424189287E+04, + 'sg' => 1.0, + 'lbm' => 3.21739194101647E+01, + 'u' => 8.78866000000000E+27, + 'ozm' => 5.14782785944229E+02, + ], + 'lbm' => [ + 'g' => 4.5359230974881148E+02, + 'sg' => 3.10810749306493E-02, + 'lbm' => 1.0, + 'u' => 2.73161000000000E+26, + 'ozm' => 1.60000023429410E+01, + ], + 'u' => [ + 'g' => 1.66053100460465E-24, + 'sg' => 1.13782988532950E-28, + 'lbm' => 3.66084470330684E-27, + 'u' => 1.0, + 'ozm' => 5.85735238300524E-26, + ], + 'ozm' => [ + 'g' => 2.83495152079732E+01, + 'sg' => 1.94256689870811E-03, + 'lbm' => 6.24999908478882E-02, + 'u' => 1.70725600000000E+25, + 'ozm' => 1.0, + ], + ], + 'Distance' => [ + 'm' => [ + 'm' => 1.0, + 'mi' => 6.21371192237334E-04, + 'Nmi' => 5.39956803455724E-04, + 'in' => 3.93700787401575E+01, + 'ft' => 3.28083989501312E+00, + 'yd' => 1.09361329797891E+00, + 'ang' => 1.00000000000000E+10, + 'Pica' => 2.83464566929116E+03, + ], + 'mi' => [ + 'm' => 1.60934400000000E+03, + 'mi' => 1.0, + 'Nmi' => 8.68976241900648E-01, + 'in' => 6.33600000000000E+04, + 'ft' => 5.28000000000000E+03, + 'yd' => 1.76000000000000E+03, + 'ang' => 1.60934400000000E+13, + 'Pica' => 4.56191999999971E+06, + ], + 'Nmi' => [ + 'm' => 1.85200000000000E+03, + 'mi' => 1.15077944802354E+00, + 'Nmi' => 1.0, + 'in' => 7.29133858267717E+04, + 'ft' => 6.07611548556430E+03, + 'yd' => 2.02537182785694E+03, + 'ang' => 1.85200000000000E+13, + 'Pica' => 5.24976377952723E+06, + ], + 'in' => [ + 'm' => 2.54000000000000E-02, + 'mi' => 1.57828282828283E-05, + 'Nmi' => 1.37149028077754E-05, + 'in' => 1.0, + 'ft' => 8.33333333333333E-02, + 'yd' => 2.77777777686643E-02, + 'ang' => 2.54000000000000E+08, + 'Pica' => 7.19999999999955E+01, + ], + 'ft' => [ + 'm' => 3.04800000000000E-01, + 'mi' => 1.89393939393939E-04, + 'Nmi' => 1.64578833693305E-04, + 'in' => 1.20000000000000E+01, + 'ft' => 1.0, + 'yd' => 3.33333333223972E-01, + 'ang' => 3.04800000000000E+09, + 'Pica' => 8.63999999999946E+02, + ], + 'yd' => [ + 'm' => 9.14400000300000E-01, + 'mi' => 5.68181818368230E-04, + 'Nmi' => 4.93736501241901E-04, + 'in' => 3.60000000118110E+01, + 'ft' => 3.00000000000000E+00, + 'yd' => 1.0, + 'ang' => 9.14400000300000E+09, + 'Pica' => 2.59200000085023E+03, + ], + 'ang' => [ + 'm' => 1.00000000000000E-10, + 'mi' => 6.21371192237334E-14, + 'Nmi' => 5.39956803455724E-14, + 'in' => 3.93700787401575E-09, + 'ft' => 3.28083989501312E-10, + 'yd' => 1.09361329797891E-10, + 'ang' => 1.0, + 'Pica' => 2.83464566929116E-07, + ], + 'Pica' => [ + 'm' => 3.52777777777800E-04, + 'mi' => 2.19205948372629E-07, + 'Nmi' => 1.90484761219114E-07, + 'in' => 1.38888888888898E-02, + 'ft' => 1.15740740740748E-03, + 'yd' => 3.85802469009251E-04, + 'ang' => 3.52777777777800E+06, + 'Pica' => 1.0, + ], + ], + 'Time' => [ + 'yr' => [ + 'yr' => 1.0, + 'day' => 365.25, + 'hr' => 8766.0, + 'mn' => 525960.0, + 'sec' => 31557600.0, + ], + 'day' => [ + 'yr' => 2.73785078713210E-03, + 'day' => 1.0, + 'hr' => 24.0, + 'mn' => 1440.0, + 'sec' => 86400.0, + ], + 'hr' => [ + 'yr' => 1.14077116130504E-04, + 'day' => 4.16666666666667E-02, + 'hr' => 1.0, + 'mn' => 60.0, + 'sec' => 3600.0, + ], + 'mn' => [ + 'yr' => 1.90128526884174E-06, + 'day' => 6.94444444444444E-04, + 'hr' => 1.66666666666667E-02, + 'mn' => 1.0, + 'sec' => 60.0, + ], + 'sec' => [ + 'yr' => 3.16880878140289E-08, + 'day' => 1.15740740740741E-05, + 'hr' => 2.77777777777778E-04, + 'mn' => 1.66666666666667E-02, + 'sec' => 1.0, + ], + ], + 'Pressure' => [ + 'Pa' => [ + 'Pa' => 1.0, + 'p' => 1.0, + 'atm' => 9.86923299998193E-06, + 'at' => 9.86923299998193E-06, + 'mmHg' => 7.50061707998627E-03, + ], + 'p' => [ + 'Pa' => 1.0, + 'p' => 1.0, + 'atm' => 9.86923299998193E-06, + 'at' => 9.86923299998193E-06, + 'mmHg' => 7.50061707998627E-03, + ], + 'atm' => [ + 'Pa' => 1.01324996583000E+05, + 'p' => 1.01324996583000E+05, + 'atm' => 1.0, + 'at' => 1.0, + 'mmHg' => 760.0, + ], + 'at' => [ + 'Pa' => 1.01324996583000E+05, + 'p' => 1.01324996583000E+05, + 'atm' => 1.0, + 'at' => 1.0, + 'mmHg' => 760.0, + ], + 'mmHg' => [ + 'Pa' => 1.33322363925000E+02, + 'p' => 1.33322363925000E+02, + 'atm' => 1.31578947368421E-03, + 'at' => 1.31578947368421E-03, + 'mmHg' => 1.0, + ], + ], + 'Force' => [ + 'N' => [ + 'N' => 1.0, + 'dyn' => 1.0E+5, + 'dy' => 1.0E+5, + 'lbf' => 2.24808923655339E-01, + ], + 'dyn' => [ + 'N' => 1.0E-5, + 'dyn' => 1.0, + 'dy' => 1.0, + 'lbf' => 2.24808923655339E-06, + ], + 'dy' => [ + 'N' => 1.0E-5, + 'dyn' => 1.0, + 'dy' => 1.0, + 'lbf' => 2.24808923655339E-06, + ], + 'lbf' => [ + 'N' => 4.448222, + 'dyn' => 4.448222E+5, + 'dy' => 4.448222E+5, + 'lbf' => 1.0, + ], + ], + 'Energy' => [ + 'J' => [ + 'J' => 1.0, + 'e' => 9.99999519343231E+06, + 'c' => 2.39006249473467E-01, + 'cal' => 2.38846190642017E-01, + 'eV' => 6.24145700000000E+18, + 'ev' => 6.24145700000000E+18, + 'HPh' => 3.72506430801000E-07, + 'hh' => 3.72506430801000E-07, + 'Wh' => 2.77777916238711E-04, + 'wh' => 2.77777916238711E-04, + 'flb' => 2.37304222192651E+01, + 'BTU' => 9.47815067349015E-04, + 'btu' => 9.47815067349015E-04, + ], + 'e' => [ + 'J' => 1.00000048065700E-07, + 'e' => 1.0, + 'c' => 2.39006364353494E-08, + 'cal' => 2.38846305445111E-08, + 'eV' => 6.24146000000000E+11, + 'ev' => 6.24146000000000E+11, + 'HPh' => 3.72506609848824E-14, + 'hh' => 3.72506609848824E-14, + 'Wh' => 2.77778049754611E-11, + 'wh' => 2.77778049754611E-11, + 'flb' => 2.37304336254586E-06, + 'BTU' => 9.47815522922962E-11, + 'btu' => 9.47815522922962E-11, + ], + 'c' => [ + 'J' => 4.18399101363672E+00, + 'e' => 4.18398900257312E+07, + 'c' => 1.0, + 'cal' => 9.99330315287563E-01, + 'eV' => 2.61142000000000E+19, + 'ev' => 2.61142000000000E+19, + 'HPh' => 1.55856355899327E-06, + 'hh' => 1.55856355899327E-06, + 'Wh' => 1.16222030532950E-03, + 'wh' => 1.16222030532950E-03, + 'flb' => 9.92878733152102E+01, + 'BTU' => 3.96564972437776E-03, + 'btu' => 3.96564972437776E-03, + ], + 'cal' => [ + 'J' => 4.18679484613929E+00, + 'e' => 4.18679283372801E+07, + 'c' => 1.00067013349059E+00, + 'cal' => 1.0, + 'eV' => 2.61317000000000E+19, + 'ev' => 2.61317000000000E+19, + 'HPh' => 1.55960800463137E-06, + 'hh' => 1.55960800463137E-06, + 'Wh' => 1.16299914807955E-03, + 'wh' => 1.16299914807955E-03, + 'flb' => 9.93544094443283E+01, + 'BTU' => 3.96830723907002E-03, + 'btu' => 3.96830723907002E-03, + ], + 'eV' => [ + 'J' => 1.60219000146921E-19, + 'e' => 1.60218923136574E-12, + 'c' => 3.82933423195043E-20, + 'cal' => 3.82676978535648E-20, + 'eV' => 1.0, + 'ev' => 1.0, + 'HPh' => 5.96826078912344E-26, + 'hh' => 5.96826078912344E-26, + 'Wh' => 4.45053000026614E-23, + 'wh' => 4.45053000026614E-23, + 'flb' => 3.80206452103492E-18, + 'BTU' => 1.51857982414846E-22, + 'btu' => 1.51857982414846E-22, + ], + 'ev' => [ + 'J' => 1.60219000146921E-19, + 'e' => 1.60218923136574E-12, + 'c' => 3.82933423195043E-20, + 'cal' => 3.82676978535648E-20, + 'eV' => 1.0, + 'ev' => 1.0, + 'HPh' => 5.96826078912344E-26, + 'hh' => 5.96826078912344E-26, + 'Wh' => 4.45053000026614E-23, + 'wh' => 4.45053000026614E-23, + 'flb' => 3.80206452103492E-18, + 'BTU' => 1.51857982414846E-22, + 'btu' => 1.51857982414846E-22, + ], + 'HPh' => [ + 'J' => 2.68451741316170E+06, + 'e' => 2.68451612283024E+13, + 'c' => 6.41616438565991E+05, + 'cal' => 6.41186757845835E+05, + 'eV' => 1.67553000000000E+25, + 'ev' => 1.67553000000000E+25, + 'HPh' => 1.0, + 'hh' => 1.0, + 'Wh' => 7.45699653134593E+02, + 'wh' => 7.45699653134593E+02, + 'flb' => 6.37047316692964E+07, + 'BTU' => 2.54442605275546E+03, + 'btu' => 2.54442605275546E+03, + ], + 'hh' => [ + 'J' => 2.68451741316170E+06, + 'e' => 2.68451612283024E+13, + 'c' => 6.41616438565991E+05, + 'cal' => 6.41186757845835E+05, + 'eV' => 1.67553000000000E+25, + 'ev' => 1.67553000000000E+25, + 'HPh' => 1.0, + 'hh' => 1.0, + 'Wh' => 7.45699653134593E+02, + 'wh' => 7.45699653134593E+02, + 'flb' => 6.37047316692964E+07, + 'BTU' => 2.54442605275546E+03, + 'btu' => 2.54442605275546E+03, + ], + 'Wh' => [ + 'J' => 3.59999820554720E+03, + 'e' => 3.59999647518369E+10, + 'c' => 8.60422069219046E+02, + 'cal' => 8.59845857713046E+02, + 'eV' => 2.24692340000000E+22, + 'ev' => 2.24692340000000E+22, + 'HPh' => 1.34102248243839E-03, + 'hh' => 1.34102248243839E-03, + 'Wh' => 1.0, + 'wh' => 1.0, + 'flb' => 8.54294774062316E+04, + 'BTU' => 3.41213254164705E+00, + 'btu' => 3.41213254164705E+00, + ], + 'wh' => [ + 'J' => 3.59999820554720E+03, + 'e' => 3.59999647518369E+10, + 'c' => 8.60422069219046E+02, + 'cal' => 8.59845857713046E+02, + 'eV' => 2.24692340000000E+22, + 'ev' => 2.24692340000000E+22, + 'HPh' => 1.34102248243839E-03, + 'hh' => 1.34102248243839E-03, + 'Wh' => 1.0, + 'wh' => 1.0, + 'flb' => 8.54294774062316E+04, + 'BTU' => 3.41213254164705E+00, + 'btu' => 3.41213254164705E+00, + ], + 'flb' => [ + 'J' => 4.21400003236424E-02, + 'e' => 4.21399800687660E+05, + 'c' => 1.00717234301644E-02, + 'cal' => 1.00649785509554E-02, + 'eV' => 2.63015000000000E+17, + 'ev' => 2.63015000000000E+17, + 'HPh' => 1.56974211145130E-08, + 'hh' => 1.56974211145130E-08, + 'Wh' => 1.17055614802000E-05, + 'wh' => 1.17055614802000E-05, + 'flb' => 1.0, + 'BTU' => 3.99409272448406E-05, + 'btu' => 3.99409272448406E-05, + ], + 'BTU' => [ + 'J' => 1.05505813786749E+03, + 'e' => 1.05505763074665E+10, + 'c' => 2.52165488508168E+02, + 'cal' => 2.51996617135510E+02, + 'eV' => 6.58510000000000E+21, + 'ev' => 6.58510000000000E+21, + 'HPh' => 3.93015941224568E-04, + 'hh' => 3.93015941224568E-04, + 'Wh' => 2.93071851047526E-01, + 'wh' => 2.93071851047526E-01, + 'flb' => 2.50369750774671E+04, + 'BTU' => 1.0, + 'btu' => 1.0, + ], + 'btu' => [ + 'J' => 1.05505813786749E+03, + 'e' => 1.05505763074665E+10, + 'c' => 2.52165488508168E+02, + 'cal' => 2.51996617135510E+02, + 'eV' => 6.58510000000000E+21, + 'ev' => 6.58510000000000E+21, + 'HPh' => 3.93015941224568E-04, + 'hh' => 3.93015941224568E-04, + 'Wh' => 2.93071851047526E-01, + 'wh' => 2.93071851047526E-01, + 'flb' => 2.50369750774671E+04, + 'BTU' => 1.0, + 'btu' => 1.0, + ], + ], + 'Power' => [ + 'HP' => [ + 'HP' => 1.0, + 'h' => 1.0, + 'W' => 7.45701000000000E+02, + 'w' => 7.45701000000000E+02, + ], + 'h' => [ + 'HP' => 1.0, + 'h' => 1.0, + 'W' => 7.45701000000000E+02, + 'w' => 7.45701000000000E+02, + ], + 'W' => [ + 'HP' => 1.34102006031908E-03, + 'h' => 1.34102006031908E-03, + 'W' => 1.0, + 'w' => 1.0, + ], + 'w' => [ + 'HP' => 1.34102006031908E-03, + 'h' => 1.34102006031908E-03, + 'W' => 1.0, + 'w' => 1.0, + ], + ], + 'Magnetism' => [ + 'T' => [ + 'T' => 1.0, + 'ga' => 10000.0, + ], + 'ga' => [ + 'T' => 0.0001, + 'ga' => 1.0, + ], + ], + 'Liquid' => [ + 'tsp' => [ + 'tsp' => 1.0, + 'tbs' => 3.33333333333333E-01, + 'oz' => 1.66666666666667E-01, + 'cup' => 2.08333333333333E-02, + 'pt' => 1.04166666666667E-02, + 'us_pt' => 1.04166666666667E-02, + 'uk_pt' => 8.67558516821960E-03, + 'qt' => 5.20833333333333E-03, + 'gal' => 1.30208333333333E-03, + 'l' => 4.92999408400710E-03, + 'lt' => 4.92999408400710E-03, + ], + 'tbs' => [ + 'tsp' => 3.00000000000000E+00, + 'tbs' => 1.0, + 'oz' => 5.00000000000000E-01, + 'cup' => 6.25000000000000E-02, + 'pt' => 3.12500000000000E-02, + 'us_pt' => 3.12500000000000E-02, + 'uk_pt' => 2.60267555046588E-02, + 'qt' => 1.56250000000000E-02, + 'gal' => 3.90625000000000E-03, + 'l' => 1.47899822520213E-02, + 'lt' => 1.47899822520213E-02, + ], + 'oz' => [ + 'tsp' => 6.00000000000000E+00, + 'tbs' => 2.00000000000000E+00, + 'oz' => 1.0, + 'cup' => 1.25000000000000E-01, + 'pt' => 6.25000000000000E-02, + 'us_pt' => 6.25000000000000E-02, + 'uk_pt' => 5.20535110093176E-02, + 'qt' => 3.12500000000000E-02, + 'gal' => 7.81250000000000E-03, + 'l' => 2.95799645040426E-02, + 'lt' => 2.95799645040426E-02, + ], + 'cup' => [ + 'tsp' => 4.80000000000000E+01, + 'tbs' => 1.60000000000000E+01, + 'oz' => 8.00000000000000E+00, + 'cup' => 1.0, + 'pt' => 5.00000000000000E-01, + 'us_pt' => 5.00000000000000E-01, + 'uk_pt' => 4.16428088074541E-01, + 'qt' => 2.50000000000000E-01, + 'gal' => 6.25000000000000E-02, + 'l' => 2.36639716032341E-01, + 'lt' => 2.36639716032341E-01, + ], + 'pt' => [ + 'tsp' => 9.60000000000000E+01, + 'tbs' => 3.20000000000000E+01, + 'oz' => 1.60000000000000E+01, + 'cup' => 2.00000000000000E+00, + 'pt' => 1.0, + 'us_pt' => 1.0, + 'uk_pt' => 8.32856176149081E-01, + 'qt' => 5.00000000000000E-01, + 'gal' => 1.25000000000000E-01, + 'l' => 4.73279432064682E-01, + 'lt' => 4.73279432064682E-01, + ], + 'us_pt' => [ + 'tsp' => 9.60000000000000E+01, + 'tbs' => 3.20000000000000E+01, + 'oz' => 1.60000000000000E+01, + 'cup' => 2.00000000000000E+00, + 'pt' => 1.0, + 'us_pt' => 1.0, + 'uk_pt' => 8.32856176149081E-01, + 'qt' => 5.00000000000000E-01, + 'gal' => 1.25000000000000E-01, + 'l' => 4.73279432064682E-01, + 'lt' => 4.73279432064682E-01, + ], + 'uk_pt' => [ + 'tsp' => 1.15266000000000E+02, + 'tbs' => 3.84220000000000E+01, + 'oz' => 1.92110000000000E+01, + 'cup' => 2.40137500000000E+00, + 'pt' => 1.20068750000000E+00, + 'us_pt' => 1.20068750000000E+00, + 'uk_pt' => 1.0, + 'qt' => 6.00343750000000E-01, + 'gal' => 1.50085937500000E-01, + 'l' => 5.68260698087162E-01, + 'lt' => 5.68260698087162E-01, + ], + 'qt' => [ + 'tsp' => 1.92000000000000E+02, + 'tbs' => 6.40000000000000E+01, + 'oz' => 3.20000000000000E+01, + 'cup' => 4.00000000000000E+00, + 'pt' => 2.00000000000000E+00, + 'us_pt' => 2.00000000000000E+00, + 'uk_pt' => 1.66571235229816E+00, + 'qt' => 1.0, + 'gal' => 2.50000000000000E-01, + 'l' => 9.46558864129363E-01, + 'lt' => 9.46558864129363E-01, + ], + 'gal' => [ + 'tsp' => 7.68000000000000E+02, + 'tbs' => 2.56000000000000E+02, + 'oz' => 1.28000000000000E+02, + 'cup' => 1.60000000000000E+01, + 'pt' => 8.00000000000000E+00, + 'us_pt' => 8.00000000000000E+00, + 'uk_pt' => 6.66284940919265E+00, + 'qt' => 4.00000000000000E+00, + 'gal' => 1.0, + 'l' => 3.78623545651745E+00, + 'lt' => 3.78623545651745E+00, + ], + 'l' => [ + 'tsp' => 2.02840000000000E+02, + 'tbs' => 6.76133333333333E+01, + 'oz' => 3.38066666666667E+01, + 'cup' => 4.22583333333333E+00, + 'pt' => 2.11291666666667E+00, + 'us_pt' => 2.11291666666667E+00, + 'uk_pt' => 1.75975569552166E+00, + 'qt' => 1.05645833333333E+00, + 'gal' => 2.64114583333333E-01, + 'l' => 1.0, + 'lt' => 1.0, + ], + 'lt' => [ + 'tsp' => 2.02840000000000E+02, + 'tbs' => 6.76133333333333E+01, + 'oz' => 3.38066666666667E+01, + 'cup' => 4.22583333333333E+00, + 'pt' => 2.11291666666667E+00, + 'us_pt' => 2.11291666666667E+00, + 'uk_pt' => 1.75975569552166E+00, + 'qt' => 1.05645833333333E+00, + 'gal' => 2.64114583333333E-01, + 'l' => 1.0, + 'lt' => 1.0, + ], + ], + ]; + + /** + * parseComplex. + * + * Parses a complex number into its real and imaginary parts, and an I or J suffix + * + * @deprecated 2.0.0 No longer used by internal code. Please use the Complex\Complex class instead + * + * @param string $complexNumber The complex number + * + * @return mixed[] Indexed on "real", "imaginary" and "suffix" + */ + public static function parseComplex($complexNumber) + { + $complex = new Complex($complexNumber); + + return [ + 'real' => $complex->getReal(), + 'imaginary' => $complex->getImaginary(), + 'suffix' => $complex->getSuffix(), + ]; + } + + /** + * Formats a number base string value with leading zeroes. + * + * @param string $xVal The "number" to pad + * @param int $places The length that we want to pad this value + * + * @return string The padded "number" + */ + private static function nbrConversionFormat($xVal, $places) + { + if ($places !== null) { + if (is_numeric($places)) { + $places = (int) $places; + } else { + return Functions::VALUE(); + } + if ($places < 0) { + return Functions::NAN(); + } + if (strlen($xVal) <= $places) { + return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10); + } + + return Functions::NAN(); + } + + return substr($xVal, -10); + } + + /** + * BESSELI. + * + * Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated + * for purely imaginary arguments + * + * Excel Function: + * BESSELI(x,ord) + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELI returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. + * If ord is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELI returns the #VALUE! error value. + * If $ord < 0, BESSELI returns the #NUM! error value. + * + * @return float|string Result, or a string containing an error + */ + public static function BESSELI($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + $ord = floor($ord); + if ($ord < 0) { + return Functions::NAN(); + } + + if (abs($x) <= 30) { + $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord); + $ordK = 1; + $fSqrX = ($x * $x) / 4; + do { + $fTerm *= $fSqrX; + $fTerm /= ($ordK * ($ordK + $ord)); + $fResult += $fTerm; + } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); + } else { + $f_2_PI = 2 * M_PI; + + $fXAbs = abs($x); + $fResult = exp($fXAbs) / sqrt($f_2_PI * $fXAbs); + if (($ord & 1) && ($x < 0)) { + $fResult = -$fResult; + } + } + + return (is_nan($fResult)) ? Functions::NAN() : $fResult; + } + + return Functions::VALUE(); + } + + /** + * BESSELJ. + * + * Returns the Bessel function + * + * Excel Function: + * BESSELJ(x,ord) + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELJ returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELJ returns the #VALUE! error value. + * If $ord < 0, BESSELJ returns the #NUM! error value. + * + * @return float|string Result, or a string containing an error + */ + public static function BESSELJ($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + $ord = floor($ord); + if ($ord < 0) { + return Functions::NAN(); + } + + $fResult = 0; + if (abs($x) <= 30) { + $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord); + $ordK = 1; + $fSqrX = ($x * $x) / -4; + do { + $fTerm *= $fSqrX; + $fTerm /= ($ordK * ($ordK + $ord)); + $fResult += $fTerm; + } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); + } else { + $f_PI_DIV_2 = M_PI / 2; + $f_PI_DIV_4 = M_PI / 4; + + $fXAbs = abs($x); + $fResult = sqrt(Functions::M_2DIVPI / $fXAbs) * cos($fXAbs - $ord * $f_PI_DIV_2 - $f_PI_DIV_4); + if (($ord & 1) && ($x < 0)) { + $fResult = -$fResult; + } + } + + return (is_nan($fResult)) ? Functions::NAN() : $fResult; + } + + return Functions::VALUE(); + } + + private static function besselK0($fNum) + { + if ($fNum <= 2) { + $fNum2 = $fNum * 0.5; + $y = ($fNum2 * $fNum2); + $fRet = -log($fNum2) * self::BESSELI($fNum, 0) + + (-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y * + (0.10750e-3 + $y * 0.74e-5)))))); + } else { + $y = 2 / $fNum; + $fRet = exp(-$fNum) / sqrt($fNum) * + (1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y * + (0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3)))))); + } + + return $fRet; + } + + private static function besselK1($fNum) + { + if ($fNum <= 2) { + $fNum2 = $fNum * 0.5; + $y = ($fNum2 * $fNum2); + $fRet = log($fNum2) * self::BESSELI($fNum, 1) + + (1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y * + (-0.110404e-2 + $y * (-0.4686e-4))))))) / $fNum; + } else { + $y = 2 / $fNum; + $fRet = exp(-$fNum) / sqrt($fNum) * + (1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y * + (0.325614e-2 + $y * (-0.68245e-3))))))); + } + + return $fRet; + } + + /** + * BESSELK. + * + * Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated + * for purely imaginary arguments. + * + * Excel Function: + * BESSELK(x,ord) + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELK returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. + * If $ord < 0, BESSELK returns the #NUM! error value. + * + * @return float|string Result, or a string containing an error + */ + public static function BESSELK($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + if (($ord < 0) || ($x == 0.0)) { + return Functions::NAN(); + } + + switch (floor($ord)) { + case 0: + $fBk = self::besselK0($x); + + break; + case 1: + $fBk = self::besselK1($x); + + break; + default: + $fTox = 2 / $x; + $fBkm = self::besselK0($x); + $fBk = self::besselK1($x); + for ($n = 1; $n < $ord; ++$n) { + $fBkp = $fBkm + $n * $fTox * $fBk; + $fBkm = $fBk; + $fBk = $fBkp; + } + } + + return (is_nan($fBk)) ? Functions::NAN() : $fBk; + } + + return Functions::VALUE(); + } + + private static function besselY0($fNum) + { + if ($fNum < 8.0) { + $y = ($fNum * $fNum); + $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y * (-86327.92757 + $y * 228.4622733)))); + $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y * (47447.26470 + $y * (226.1030244 + $y)))); + $fRet = $f1 / $f2 + 0.636619772 * self::BESSELJ($fNum, 0) * log($fNum); + } else { + $z = 8.0 / $fNum; + $y = ($z * $z); + $xx = $fNum - 0.785398164; + $f1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6))); + $f2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y * (-0.934945152e-7)))); + $fRet = sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2); + } + + return $fRet; + } + + private static function besselY1($fNum) + { + if ($fNum < 8.0) { + $y = ($fNum * $fNum); + $f1 = $fNum * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y * (0.7349264551e9 + $y * + (-0.4237922726e7 + $y * 0.8511937935e4))))); + $f2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y * + (0.1020426050e6 + $y * (0.3549632885e3 + $y))))); + $fRet = $f1 / $f2 + 0.636619772 * (self::BESSELJ($fNum, 1) * log($fNum) - 1 / $fNum); + } else { + $fRet = sqrt(0.636619772 / $fNum) * sin($fNum - 2.356194491); + } + + return $fRet; + } + + /** + * BESSELY. + * + * Returns the Bessel function, which is also called the Weber function or the Neumann function. + * + * Excel Function: + * BESSELY(x,ord) + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELK returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. + * If $ord < 0, BESSELK returns the #NUM! error value. + * + * @return float|string Result, or a string containing an error + */ + public static function BESSELY($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + if (($ord < 0) || ($x == 0.0)) { + return Functions::NAN(); + } + + switch (floor($ord)) { + case 0: + $fBy = self::besselY0($x); + + break; + case 1: + $fBy = self::besselY1($x); + + break; + default: + $fTox = 2 / $x; + $fBym = self::besselY0($x); + $fBy = self::besselY1($x); + for ($n = 1; $n < $ord; ++$n) { + $fByp = $n * $fTox * $fBy - $fBym; + $fBym = $fBy; + $fBy = $fByp; + } + } + + return (is_nan($fBy)) ? Functions::NAN() : $fBy; + } + + return Functions::VALUE(); + } + + /** + * BINTODEC. + * + * Return a binary value as decimal. + * + * Excel Function: + * BIN2DEC(x) + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2DEC returns the #NUM! error value. + * + * @return string + */ + public static function BINTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + $x = substr($x, -9); + + return '-' . (512 - bindec($x)); + } + + return bindec($x); + } + + /** + * BINTOHEX. + * + * Return a binary value as hex. + * + * Excel Function: + * BIN2HEX(x[,places]) + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2HEX returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, BIN2HEX uses the + * minimum number of characters necessary. Places is useful for padding the + * return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, BIN2HEX returns the #VALUE! error value. + * If places is negative, BIN2HEX returns the #NUM! error value. + * + * @return string + */ + public static function BINTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + // Argument X + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + return str_repeat('F', 8) . substr(strtoupper(dechex(bindec(substr($x, -9)))), -2); + } + $hexVal = (string) strtoupper(dechex(bindec($x))); + + return self::nbrConversionFormat($hexVal, $places); + } + + /** + * BINTOOCT. + * + * Return a binary value as octal. + * + * Excel Function: + * BIN2OCT(x[,places]) + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2OCT returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, BIN2OCT uses the + * minimum number of characters necessary. Places is useful for padding the + * return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, BIN2OCT returns the #VALUE! error value. + * If places is negative, BIN2OCT returns the #NUM! error value. + * + * @return string + */ + public static function BINTOOCT($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + return str_repeat('7', 7) . substr(strtoupper(decoct(bindec(substr($x, -9)))), -3); + } + $octVal = (string) decoct(bindec($x)); + + return self::nbrConversionFormat($octVal, $places); + } + + /** + * DECTOBIN. + * + * Return a decimal value as binary. + * + * Excel Function: + * DEC2BIN(x[,places]) + * + * @param string $x The decimal integer you want to convert. If number is negative, + * valid place values are ignored and DEC2BIN returns a 10-character + * (10-bit) binary number in which the most significant bit is the sign + * bit. The remaining 9 bits are magnitude bits. Negative numbers are + * represented using two's-complement notation. + * If number < -512 or if number > 511, DEC2BIN returns the #NUM! error + * value. + * If number is nonnumeric, DEC2BIN returns the #VALUE! error value. + * If DEC2BIN requires more than places characters, it returns the #NUM! + * error value. + * @param int $places The number of characters to use. If places is omitted, DEC2BIN uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2BIN returns the #VALUE! error value. + * If places is zero or negative, DEC2BIN returns the #NUM! error value. + * + * @return string + */ + public static function DECTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + + $x = (string) floor($x); + if ($x < -512 || $x > 511) { + return Functions::NAN(); + } + + $r = decbin($x); + // Two's Complement + $r = substr($r, -10); + if (strlen($r) >= 11) { + return Functions::NAN(); + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * DECTOHEX. + * + * Return a decimal value as hex. + * + * Excel Function: + * DEC2HEX(x[,places]) + * + * @param string $x The decimal integer you want to convert. If number is negative, + * places is ignored and DEC2HEX returns a 10-character (40-bit) + * hexadecimal number in which the most significant bit is the sign + * bit. The remaining 39 bits are magnitude bits. Negative numbers + * are represented using two's-complement notation. + * If number < -549,755,813,888 or if number > 549,755,813,887, + * DEC2HEX returns the #NUM! error value. + * If number is nonnumeric, DEC2HEX returns the #VALUE! error value. + * If DEC2HEX requires more than places characters, it returns the + * #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, DEC2HEX uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2HEX returns the #VALUE! error value. + * If places is zero or negative, DEC2HEX returns the #NUM! error value. + * + * @return string + */ + public static function DECTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + $x = (string) floor($x); + $r = strtoupper(dechex($x)); + if (strlen($r) == 8) { + // Two's Complement + $r = 'FF' . $r; + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * DECTOOCT. + * + * Return an decimal value as octal. + * + * Excel Function: + * DEC2OCT(x[,places]) + * + * @param string $x The decimal integer you want to convert. If number is negative, + * places is ignored and DEC2OCT returns a 10-character (30-bit) + * octal number in which the most significant bit is the sign bit. + * The remaining 29 bits are magnitude bits. Negative numbers are + * represented using two's-complement notation. + * If number < -536,870,912 or if number > 536,870,911, DEC2OCT + * returns the #NUM! error value. + * If number is nonnumeric, DEC2OCT returns the #VALUE! error value. + * If DEC2OCT requires more than places characters, it returns the + * #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, DEC2OCT uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2OCT returns the #VALUE! error value. + * If places is zero or negative, DEC2OCT returns the #NUM! error value. + * + * @return string + */ + public static function DECTOOCT($x, $places = null) + { + $xorig = $x; + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + $x = (string) floor($x); + $r = decoct($x); + if (strlen($r) == 11) { + // Two's Complement + $r = substr($r, -10); + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * HEXTOBIN. + * + * Return a hex value as binary. + * + * Excel Function: + * HEX2BIN(x[,places]) + * + * @param string $x the hexadecimal number you want to convert. + * Number cannot contain more than 10 characters. + * The most significant bit of number is the sign bit (40th bit from the right). + * The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is negative, HEX2BIN ignores places and returns a 10-character binary number. + * If number is negative, it cannot be less than FFFFFFFE00, + * and if number is positive, it cannot be greater than 1FF. + * If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value. + * If HEX2BIN requires more than places characters, it returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, + * HEX2BIN uses the minimum number of characters necessary. Places + * is useful for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, HEX2BIN returns the #VALUE! error value. + * If places is negative, HEX2BIN returns the #NUM! error value. + * + * @return string + */ + public static function HEXTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + return self::DECTOBIN(self::HEXTODEC($x), $places); + } + + /** + * HEXTODEC. + * + * Return a hex value as decimal. + * + * Excel Function: + * HEX2DEC(x) + * + * @param string $x The hexadecimal number you want to convert. This number cannot + * contain more than 10 characters (40 bits). The most significant + * bit of number is the sign bit. The remaining 39 bits are magnitude + * bits. Negative numbers are represented using two's-complement + * notation. + * If number is not a valid hexadecimal number, HEX2DEC returns the + * #NUM! error value. + * + * @return string + */ + public static function HEXTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + if (strlen($x) > 10) { + return Functions::NAN(); + } + + $binX = ''; + foreach (str_split($x) as $char) { + $binX .= str_pad(base_convert($char, 16, 2), 4, '0', STR_PAD_LEFT); + } + if (strlen($binX) == 40 && $binX[0] == '1') { + for ($i = 0; $i < 40; ++$i) { + $binX[$i] = ($binX[$i] == '1' ? '0' : '1'); + } + + return (bindec($binX) + 1) * -1; + } + + return bindec($binX); + } + + /** + * HEXTOOCT. + * + * Return a hex value as octal. + * + * Excel Function: + * HEX2OCT(x[,places]) + * + * @param string $x The hexadecimal number you want to convert. Number cannot + * contain more than 10 characters. The most significant bit of + * number is the sign bit. The remaining 39 bits are magnitude + * bits. Negative numbers are represented using two's-complement + * notation. + * If number is negative, HEX2OCT ignores places and returns a + * 10-character octal number. + * If number is negative, it cannot be less than FFE0000000, and + * if number is positive, it cannot be greater than 1FFFFFFF. + * If number is not a valid hexadecimal number, HEX2OCT returns + * the #NUM! error value. + * If HEX2OCT requires more than places characters, it returns + * the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, HEX2OCT + * uses the minimum number of characters necessary. Places is + * useful for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, HEX2OCT returns the #VALUE! error + * value. + * If places is negative, HEX2OCT returns the #NUM! error value. + * + * @return string + */ + public static function HEXTOOCT($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + $decimal = self::HEXTODEC($x); + if ($decimal < -536870912 || $decimal > 536870911) { + return Functions::NAN(); + } + + return self::DECTOOCT($decimal, $places); + } + + /** + * OCTTOBIN. + * + * Return an octal value as binary. + * + * Excel Function: + * OCT2BIN(x[,places]) + * + * @param string $x The octal number you want to convert. Number may not + * contain more than 10 characters. The most significant + * bit of number is the sign bit. The remaining 29 bits + * are magnitude bits. Negative numbers are represented + * using two's-complement notation. + * If number is negative, OCT2BIN ignores places and returns + * a 10-character binary number. + * If number is negative, it cannot be less than 7777777000, + * and if number is positive, it cannot be greater than 777. + * If number is not a valid octal number, OCT2BIN returns + * the #NUM! error value. + * If OCT2BIN requires more than places characters, it + * returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, + * OCT2BIN uses the minimum number of characters necessary. + * Places is useful for padding the return value with + * leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, OCT2BIN returns the #VALUE! + * error value. + * If places is negative, OCT2BIN returns the #NUM! error + * value. + * + * @return string + */ + public static function OCTTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + + return self::DECTOBIN(self::OCTTODEC($x), $places); + } + + /** + * OCTTODEC. + * + * Return an octal value as decimal. + * + * Excel Function: + * OCT2DEC(x) + * + * @param string $x The octal number you want to convert. Number may not contain + * more than 10 octal characters (30 bits). The most significant + * bit of number is the sign bit. The remaining 29 bits are + * magnitude bits. Negative numbers are represented using + * two's-complement notation. + * If number is not a valid octal number, OCT2DEC returns the + * #NUM! error value. + * + * @return string + */ + public static function OCTTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + $binX = ''; + foreach (str_split($x) as $char) { + $binX .= str_pad(decbin((int) $char), 3, '0', STR_PAD_LEFT); + } + if (strlen($binX) == 30 && $binX[0] == '1') { + for ($i = 0; $i < 30; ++$i) { + $binX[$i] = ($binX[$i] == '1' ? '0' : '1'); + } + + return (bindec($binX) + 1) * -1; + } + + return bindec($binX); + } + + /** + * OCTTOHEX. + * + * Return an octal value as hex. + * + * Excel Function: + * OCT2HEX(x[,places]) + * + * @param string $x The octal number you want to convert. Number may not contain + * more than 10 octal characters (30 bits). The most significant + * bit of number is the sign bit. The remaining 29 bits are + * magnitude bits. Negative numbers are represented using + * two's-complement notation. + * If number is negative, OCT2HEX ignores places and returns a + * 10-character hexadecimal number. + * If number is not a valid octal number, OCT2HEX returns the + * #NUM! error value. + * If OCT2HEX requires more than places characters, it returns + * the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, OCT2HEX + * uses the minimum number of characters necessary. Places is useful + * for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, OCT2HEX returns the #VALUE! error value. + * If places is negative, OCT2HEX returns the #NUM! error value. + * + * @return string + */ + public static function OCTTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + $hexVal = strtoupper(dechex(self::OCTTODEC($x))); + + return self::nbrConversionFormat($hexVal, $places); + } + + /** + * COMPLEX. + * + * Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj. + * + * Excel Function: + * COMPLEX(realNumber,imaginary[,suffix]) + * + * @param float $realNumber the real coefficient of the complex number + * @param float $imaginary the imaginary coefficient of the complex number + * @param string $suffix The suffix for the imaginary component of the complex number. + * If omitted, the suffix is assumed to be "i". + * + * @return string + */ + public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i') + { + $realNumber = ($realNumber === null) ? 0.0 : Functions::flattenSingleValue($realNumber); + $imaginary = ($imaginary === null) ? 0.0 : Functions::flattenSingleValue($imaginary); + $suffix = ($suffix === null) ? 'i' : Functions::flattenSingleValue($suffix); + + if (((is_numeric($realNumber)) && (is_numeric($imaginary))) && + (($suffix == 'i') || ($suffix == 'j') || ($suffix == '')) + ) { + $complex = new Complex($realNumber, $imaginary, $suffix); + + return (string) $complex; + } + + return Functions::VALUE(); + } + + /** + * IMAGINARY. + * + * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMAGINARY(complexNumber) + * + * @param string $complexNumber the complex number for which you want the imaginary + * coefficient + * + * @return float + */ + public static function IMAGINARY($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->getImaginary(); + } + + /** + * IMREAL. + * + * Returns the real coefficient of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMREAL(complexNumber) + * + * @param string $complexNumber the complex number for which you want the real coefficient + * + * @return float + */ + public static function IMREAL($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->getReal(); + } + + /** + * IMABS. + * + * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMABS(complexNumber) + * + * @param string $complexNumber the complex number for which you want the absolute value + * + * @return float + */ + public static function IMABS($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->abs(); + } + + /** + * IMARGUMENT. + * + * Returns the argument theta of a complex number, i.e. the angle in radians from the real + * axis to the representation of the number in polar coordinates. + * + * Excel Function: + * IMARGUMENT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the argument theta + * + * @return float|string + */ + public static function IMARGUMENT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::DIV0(); + } + + return $complex->argument(); + } + + /** + * IMCONJUGATE. + * + * Returns the complex conjugate of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCONJUGATE(complexNumber) + * + * @param string $complexNumber the complex number for which you want the conjugate + * + * @return string + */ + public static function IMCONJUGATE($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->conjugate(); + } + + /** + * IMCOS. + * + * Returns the cosine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOS(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cosine + * + * @return float|string + */ + public static function IMCOS($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cos(); + } + + /** + * IMCOSH. + * + * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOSH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic cosine + * + * @return float|string + */ + public static function IMCOSH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cosh(); + } + + /** + * IMCOT. + * + * Returns the cotangent of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cotangent + * + * @return float|string + */ + public static function IMCOT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cot(); + } + + /** + * IMCSC. + * + * Returns the cosecant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCSC(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cosecant + * + * @return float|string + */ + public static function IMCSC($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->csc(); + } + + /** + * IMCSCH. + * + * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCSCH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic cosecant + * + * @return float|string + */ + public static function IMCSCH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->csch(); + } + + /** + * IMSIN. + * + * Returns the sine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSIN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the sine + * + * @return float|string + */ + public static function IMSIN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sin(); + } + + /** + * IMSINH. + * + * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSINH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic sine + * + * @return float|string + */ + public static function IMSINH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sinh(); + } + + /** + * IMSEC. + * + * Returns the secant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSEC(complexNumber) + * + * @param string $complexNumber the complex number for which you want the secant + * + * @return float|string + */ + public static function IMSEC($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sec(); + } + + /** + * IMSECH. + * + * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSECH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic secant + * + * @return float|string + */ + public static function IMSECH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sech(); + } + + /** + * IMTAN. + * + * Returns the tangent of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMTAN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the tangent + * + * @return float|string + */ + public static function IMTAN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->tan(); + } + + /** + * IMSQRT. + * + * Returns the square root of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSQRT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the square root + * + * @return string + */ + public static function IMSQRT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $theta = self::IMARGUMENT($complexNumber); + if ($theta === Functions::DIV0()) { + return '0'; + } + + return (string) (new Complex($complexNumber))->sqrt(); + } + + /** + * IMLN. + * + * Returns the natural logarithm of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the natural logarithm + * + * @return string + */ + public static function IMLN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->ln(); + } + + /** + * IMLOG10. + * + * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLOG10(complexNumber) + * + * @param string $complexNumber the complex number for which you want the common logarithm + * + * @return string + */ + public static function IMLOG10($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->log10(); + } + + /** + * IMLOG2. + * + * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLOG2(complexNumber) + * + * @param string $complexNumber the complex number for which you want the base-2 logarithm + * + * @return string + */ + public static function IMLOG2($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->log2(); + } + + /** + * IMEXP. + * + * Returns the exponential of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMEXP(complexNumber) + * + * @param string $complexNumber the complex number for which you want the exponential + * + * @return string + */ + public static function IMEXP($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->exp(); + } + + /** + * IMPOWER. + * + * Returns a complex number in x + yi or x + yj text format raised to a power. + * + * Excel Function: + * IMPOWER(complexNumber,realNumber) + * + * @param string $complexNumber the complex number you want to raise to a power + * @param float $realNumber the power to which you want to raise the complex number + * + * @return string + */ + public static function IMPOWER($complexNumber, $realNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + $realNumber = Functions::flattenSingleValue($realNumber); + + if (!is_numeric($realNumber)) { + return Functions::VALUE(); + } + + return (string) (new Complex($complexNumber))->pow($realNumber); + } + + /** + * IMDIV. + * + * Returns the quotient of two complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMDIV(complexDividend,complexDivisor) + * + * @param string $complexDividend the complex numerator or dividend + * @param string $complexDivisor the complex denominator or divisor + * + * @return string + */ + public static function IMDIV($complexDividend, $complexDivisor) + { + $complexDividend = Functions::flattenSingleValue($complexDividend); + $complexDivisor = Functions::flattenSingleValue($complexDivisor); + + try { + return (string) (new Complex($complexDividend))->divideby(new Complex($complexDivisor)); + } catch (ComplexException $e) { + return Functions::NAN(); + } + } + + /** + * IMSUB. + * + * Returns the difference of two complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMSUB(complexNumber1,complexNumber2) + * + * @param string $complexNumber1 the complex number from which to subtract complexNumber2 + * @param string $complexNumber2 the complex number to subtract from complexNumber1 + * + * @return string + */ + public static function IMSUB($complexNumber1, $complexNumber2) + { + $complexNumber1 = Functions::flattenSingleValue($complexNumber1); + $complexNumber2 = Functions::flattenSingleValue($complexNumber2); + + try { + return (string) (new Complex($complexNumber1))->subtract(new Complex($complexNumber2)); + } catch (ComplexException $e) { + return Functions::NAN(); + } + } + + /** + * IMSUM. + * + * Returns the sum of two or more complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMSUM(complexNumber[,complexNumber[,...]]) + * + * @param string ...$complexNumbers Series of complex numbers to add + * + * @return string + */ + public static function IMSUM(...$complexNumbers) + { + // Return value + $returnValue = new Complex(0.0); + $aArgs = Functions::flattenArray($complexNumbers); + + try { + // Loop through the arguments + foreach ($aArgs as $complex) { + $returnValue = $returnValue->add(new Complex($complex)); + } + } catch (ComplexException $e) { + return Functions::NAN(); + } + + return (string) $returnValue; + } + + /** + * IMPRODUCT. + * + * Returns the product of two or more complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMPRODUCT(complexNumber[,complexNumber[,...]]) + * + * @param string ...$complexNumbers Series of complex numbers to multiply + * + * @return string + */ + public static function IMPRODUCT(...$complexNumbers) + { + // Return value + $returnValue = new Complex(1.0); + $aArgs = Functions::flattenArray($complexNumbers); + + try { + // Loop through the arguments + foreach ($aArgs as $complex) { + $returnValue = $returnValue->multiply(new Complex($complex)); + } + } catch (ComplexException $e) { + return Functions::NAN(); + } + + return (string) $returnValue; + } + + /** + * DELTA. + * + * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. + * Use this function to filter a set of values. For example, by summing several DELTA + * functions you calculate the count of equal pairs. This function is also known as the + * Kronecker Delta function. + * + * Excel Function: + * DELTA(a[,b]) + * + * @param float $a the first number + * @param float $b The second number. If omitted, b is assumed to be zero. + * + * @return int + */ + public static function DELTA($a, $b = 0) + { + $a = Functions::flattenSingleValue($a); + $b = Functions::flattenSingleValue($b); + + return (int) ($a == $b); + } + + /** + * GESTEP. + * + * Excel Function: + * GESTEP(number[,step]) + * + * Returns 1 if number >= step; returns 0 (zero) otherwise + * Use this function to filter a set of values. For example, by summing several GESTEP + * functions you calculate the count of values that exceed a threshold. + * + * @param float $number the value to test against step + * @param float $step The threshold value. + * If you omit a value for step, GESTEP uses zero. + * + * @return int + */ + public static function GESTEP($number, $step = 0) + { + $number = Functions::flattenSingleValue($number); + $step = Functions::flattenSingleValue($step); + + return (int) ($number >= $step); + } + + // + // Private method to calculate the erf value + // + private static $twoSqrtPi = 1.128379167095512574; + + public static function erfVal($x) + { + if (abs($x) > 2.2) { + return 1 - self::erfcVal($x); + } + $sum = $term = $x; + $xsqr = ($x * $x); + $j = 1; + do { + $term *= $xsqr / $j; + $sum -= $term / (2 * $j + 1); + ++$j; + $term *= $xsqr / $j; + $sum += $term / (2 * $j + 1); + ++$j; + if ($sum == 0.0) { + break; + } + } while (abs($term / $sum) > Functions::PRECISION); + + return self::$twoSqrtPi * $sum; + } + + /** + * Validate arguments passed to the bitwise functions. + * + * @param mixed $value + * + * @return int + */ + private static function validateBitwiseArgument($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_int($value)) { + return $value; + } elseif (is_numeric($value)) { + if ($value == (int) ($value)) { + $value = (int) ($value); + if (($value > 2 ** 48 - 1) || ($value < 0)) { + throw new Exception(Functions::NAN()); + } + + return $value; + } + + throw new Exception(Functions::NAN()); + } + + throw new Exception(Functions::VALUE()); + } + + /** + * BITAND. + * + * Returns the bitwise AND of two integer values. + * + * Excel Function: + * BITAND(number1, number2) + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITAND($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 & $number2; + } + + /** + * BITOR. + * + * Returns the bitwise OR of two integer values. + * + * Excel Function: + * BITOR(number1, number2) + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITOR($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 | $number2; + } + + /** + * BITXOR. + * + * Returns the bitwise XOR of two integer values. + * + * Excel Function: + * BITXOR(number1, number2) + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITXOR($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 ^ $number2; + } + + /** + * BITLSHIFT. + * + * Returns the number value shifted left by shift_amount bits. + * + * Excel Function: + * BITLSHIFT(number, shift_amount) + * + * @param int $number + * @param int $shiftAmount + * + * @return int|string + */ + public static function BITLSHIFT($number, $shiftAmount) + { + try { + $number = self::validateBitwiseArgument($number); + } catch (Exception $e) { + return $e->getMessage(); + } + + $shiftAmount = Functions::flattenSingleValue($shiftAmount); + + $result = $number << $shiftAmount; + if ($result > 2 ** 48 - 1) { + return Functions::NAN(); + } + + return $result; + } + + /** + * BITRSHIFT. + * + * Returns the number value shifted right by shift_amount bits. + * + * Excel Function: + * BITRSHIFT(number, shift_amount) + * + * @param int $number + * @param int $shiftAmount + * + * @return int|string + */ + public static function BITRSHIFT($number, $shiftAmount) + { + try { + $number = self::validateBitwiseArgument($number); + } catch (Exception $e) { + return $e->getMessage(); + } + + $shiftAmount = Functions::flattenSingleValue($shiftAmount); + + return $number >> $shiftAmount; + } + + /** + * ERF. + * + * Returns the error function integrated between the lower and upper bound arguments. + * + * Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments, + * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was + * improved, so that it can now calculate the function for both positive and negative ranges. + * PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments. + * + * Excel Function: + * ERF(lower[,upper]) + * + * @param float $lower lower bound for integrating ERF + * @param float $upper upper bound for integrating ERF. + * If omitted, ERF integrates between zero and lower_limit + * + * @return float|string + */ + public static function ERF($lower, $upper = null) + { + $lower = Functions::flattenSingleValue($lower); + $upper = Functions::flattenSingleValue($upper); + + if (is_numeric($lower)) { + if ($upper === null) { + return self::erfVal($lower); + } + if (is_numeric($upper)) { + return self::erfVal($upper) - self::erfVal($lower); + } + } + + return Functions::VALUE(); + } + + /** + * ERFPRECISE. + * + * Returns the error function integrated between the lower and upper bound arguments. + * + * Excel Function: + * ERF.PRECISE(limit) + * + * @param float $limit bound for integrating ERF + * + * @return float|string + */ + public static function ERFPRECISE($limit) + { + $limit = Functions::flattenSingleValue($limit); + + return self::ERF($limit); + } + + // + // Private method to calculate the erfc value + // + private static $oneSqrtPi = 0.564189583547756287; + + private static function erfcVal($x) + { + if (abs($x) < 2.2) { + return 1 - self::erfVal($x); + } + if ($x < 0) { + return 2 - self::ERFC(-$x); + } + $a = $n = 1; + $b = $c = $x; + $d = ($x * $x) + 0.5; + $q1 = $q2 = $b / $d; + $t = 0; + do { + $t = $a * $n + $b * $x; + $a = $b; + $b = $t; + $t = $c * $n + $d * $x; + $c = $d; + $d = $t; + $n += 0.5; + $q1 = $q2; + $q2 = $b / $d; + } while ((abs($q1 - $q2) / $q2) > Functions::PRECISION); + + return self::$oneSqrtPi * exp(-$x * $x) * $q2; + } + + /** + * ERFC. + * + * Returns the complementary ERF function integrated between x and infinity + * + * Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument, + * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was + * improved, so that it can now calculate the function for both positive and negative x values. + * PhpSpreadsheet follows Excel 2010 behaviour, and accepts nagative arguments. + * + * Excel Function: + * ERFC(x) + * + * @param float $x The lower bound for integrating ERFC + * + * @return float|string + */ + public static function ERFC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_numeric($x)) { + return self::erfcVal($x); + } + + return Functions::VALUE(); + } + + /** + * getConversionGroups + * Returns a list of the different conversion groups for UOM conversions. + * + * @return array + */ + public static function getConversionGroups() + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit) { + $conversionGroups[] = $conversionUnit['Group']; + } + + return array_merge(array_unique($conversionGroups)); + } + + /** + * getConversionGroupUnits + * Returns an array of units of measure, for a specified conversion group, or for all groups. + * + * @param string $group The group whose units of measure you want to retrieve + * + * @return array + */ + public static function getConversionGroupUnits($group = null) + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { + if (($group === null) || ($conversionGroup['Group'] == $group)) { + $conversionGroups[$conversionGroup['Group']][] = $conversionUnit; + } + } + + return $conversionGroups; + } + + /** + * getConversionGroupUnitDetails. + * + * @param string $group The group whose units of measure you want to retrieve + * + * @return array + */ + public static function getConversionGroupUnitDetails($group = null) + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { + if (($group === null) || ($conversionGroup['Group'] == $group)) { + $conversionGroups[$conversionGroup['Group']][] = [ + 'unit' => $conversionUnit, + 'description' => $conversionGroup['Unit Name'], + ]; + } + } + + return $conversionGroups; + } + + /** + * getConversionMultipliers + * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM(). + * + * @return array of mixed + */ + public static function getConversionMultipliers() + { + return self::$conversionMultipliers; + } + + /** + * CONVERTUOM. + * + * Converts a number from one measurement system to another. + * For example, CONVERT can translate a table of distances in miles to a table of distances + * in kilometers. + * + * Excel Function: + * CONVERT(value,fromUOM,toUOM) + * + * @param float $value the value in fromUOM to convert + * @param string $fromUOM the units for value + * @param string $toUOM the units for the result + * + * @return float|string + */ + public static function CONVERTUOM($value, $fromUOM, $toUOM) + { + $value = Functions::flattenSingleValue($value); + $fromUOM = Functions::flattenSingleValue($fromUOM); + $toUOM = Functions::flattenSingleValue($toUOM); + + if (!is_numeric($value)) { + return Functions::VALUE(); + } + $fromMultiplier = 1.0; + if (isset(self::$conversionUnits[$fromUOM])) { + $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; + } else { + $fromMultiplier = substr($fromUOM, 0, 1); + $fromUOM = substr($fromUOM, 1); + if (isset(self::$conversionMultipliers[$fromMultiplier])) { + $fromMultiplier = self::$conversionMultipliers[$fromMultiplier]['multiplier']; + } else { + return Functions::NA(); + } + if ((isset(self::$conversionUnits[$fromUOM])) && (self::$conversionUnits[$fromUOM]['AllowPrefix'])) { + $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; + } else { + return Functions::NA(); + } + } + $value *= $fromMultiplier; + + $toMultiplier = 1.0; + if (isset(self::$conversionUnits[$toUOM])) { + $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; + } else { + $toMultiplier = substr($toUOM, 0, 1); + $toUOM = substr($toUOM, 1); + if (isset(self::$conversionMultipliers[$toMultiplier])) { + $toMultiplier = self::$conversionMultipliers[$toMultiplier]['multiplier']; + } else { + return Functions::NA(); + } + if ((isset(self::$conversionUnits[$toUOM])) && (self::$conversionUnits[$toUOM]['AllowPrefix'])) { + $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; + } else { + return Functions::NA(); + } + } + if ($unitGroup1 != $unitGroup2) { + return Functions::NA(); + } + + if (($fromUOM == $toUOM) && ($fromMultiplier == $toMultiplier)) { + // We've already factored $fromMultiplier into the value, so we need + // to reverse it again + return $value / $fromMultiplier; + } elseif ($unitGroup1 == 'Temperature') { + if (($fromUOM == 'F') || ($fromUOM == 'fah')) { + if (($toUOM == 'F') || ($toUOM == 'fah')) { + return $value; + } + $value = (($value - 32) / 1.8); + if (($toUOM == 'K') || ($toUOM == 'kel')) { + $value += 273.15; + } + + return $value; + } elseif ((($fromUOM == 'K') || ($fromUOM == 'kel')) && + (($toUOM == 'K') || ($toUOM == 'kel')) + ) { + return $value; + } elseif ((($fromUOM == 'C') || ($fromUOM == 'cel')) && + (($toUOM == 'C') || ($toUOM == 'cel')) + ) { + return $value; + } + if (($toUOM == 'F') || ($toUOM == 'fah')) { + if (($fromUOM == 'K') || ($fromUOM == 'kel')) { + $value -= 273.15; + } + + return ($value * 1.8) + 32; + } + if (($toUOM == 'C') || ($toUOM == 'cel')) { + return $value - 273.15; + } + + return $value + 273.15; + } + + return ($value * self::$unitConversions[$unitGroup1][$fromUOM][$toUOM]) / $toMultiplier; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Exception.php new file mode 100755 index 0000000..87c7d22 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Exception.php @@ -0,0 +1,26 @@ +line = $line; + $e->file = $file; + + throw $e; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/ExceptionHandler.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/ExceptionHandler.php new file mode 100755 index 0000000..41e51d4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/ExceptionHandler.php @@ -0,0 +1,22 @@ +format('d') == $testDate->format('t'); + } + + private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next) + { + $months = 12 / $frequency; + + $result = Date::excelToDateTimeObject($maturity); + $eom = self::isLastDayOfMonth($result); + + while ($settlement < Date::PHPToExcel($result)) { + $result->modify('-' . $months . ' months'); + } + if ($next) { + $result->modify('+' . $months . ' months'); + } + + if ($eom) { + $result->modify('-1 day'); + } + + return Date::PHPToExcel($result); + } + + private static function isValidFrequency($frequency) + { + if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) { + return true; + } + + return false; + } + + /** + * daysPerYear. + * + * Returns the number of days in a specified year, as defined by the "basis" value + * + * @param int|string $year The year against which we're testing + * @param int|string $basis The type of day count: + * 0 or omitted US (NASD) 360 + * 1 Actual (365 or 366 in a leap year) + * 2 360 + * 3 365 + * 4 European 360 + * + * @return int|string Result, or a string containing an error + */ + private static function daysPerYear($year, $basis = 0) + { + switch ($basis) { + case 0: + case 2: + case 4: + $daysPerYear = 360; + + break; + case 3: + $daysPerYear = 365; + + break; + case 1: + $daysPerYear = (DateTime::isLeapYear($year)) ? 366 : 365; + + break; + default: + return Functions::NAN(); + } + + return $daysPerYear; + } + + private static function interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) + { + $pmt = self::PMT($rate, $nper, $pv, $fv, $type); + $capital = $pv; + for ($i = 1; $i <= $per; ++$i) { + $interest = ($type && $i == 1) ? 0 : -$capital * $rate; + $principal = $pmt - $interest; + $capital += $principal; + } + + return [$interest, $principal]; + } + + /** + * ACCRINT. + * + * Returns the accrued interest for a security that pays periodic interest. + * + * Excel Function: + * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis]) + * + * @param mixed $issue the security's issue date + * @param mixed $firstinterest the security's first interest date + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date + * when the security is traded to the buyer. + * @param float $rate the security's annual coupon rate + * @param float $par The security's par value. + * If you omit par, ACCRINT uses $1,000. + * @param int $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0) + { + $issue = Functions::flattenSingleValue($issue); + $firstinterest = Functions::flattenSingleValue($firstinterest); + $settlement = Functions::flattenSingleValue($settlement); + $rate = Functions::flattenSingleValue($rate); + $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par); + $frequency = ($frequency === null) ? 1 : Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($rate)) && (is_numeric($par))) { + $rate = (float) $rate; + $par = (float) $par; + if (($rate <= 0) || ($par <= 0)) { + return Functions::NAN(); + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + + return $par * $rate * $daysBetweenIssueAndSettlement; + } + + return Functions::VALUE(); + } + + /** + * ACCRINTM. + * + * Returns the accrued interest for a security that pays interest at maturity. + * + * Excel Function: + * ACCRINTM(issue,settlement,rate[,par[,basis]]) + * + * @param mixed $issue The security's issue date + * @param mixed $settlement The security's settlement (or maturity) date + * @param float $rate The security's annual coupon rate + * @param float $par The security's par value. + * If you omit par, ACCRINT uses $1,000. + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0) + { + $issue = Functions::flattenSingleValue($issue); + $settlement = Functions::flattenSingleValue($settlement); + $rate = Functions::flattenSingleValue($rate); + $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par); + $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($rate)) && (is_numeric($par))) { + $rate = (float) $rate; + $par = (float) $par; + if (($rate <= 0) || ($par <= 0)) { + return Functions::NAN(); + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + + return $par * $rate * $daysBetweenIssueAndSettlement; + } + + return Functions::VALUE(); + } + + /** + * AMORDEGRC. + * + * Returns the depreciation for each accounting period. + * This function is provided for the French accounting system. If an asset is purchased in + * the middle of the accounting period, the prorated depreciation is taken into account. + * The function is similar to AMORLINC, except that a depreciation coefficient is applied in + * the calculation depending on the life of the assets. + * This function will return the depreciation until the last period of the life of the assets + * or until the cumulated value of depreciation is greater than the cost of the assets minus + * the salvage value. + * + * Excel Function: + * AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) + * + * @param float $cost The cost of the asset + * @param mixed $purchased Date of the purchase of the asset + * @param mixed $firstPeriod Date of the end of the first period + * @param mixed $salvage The salvage value at the end of the life of the asset + * @param float $period The period + * @param float $rate Rate of depreciation + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) + { + $cost = Functions::flattenSingleValue($cost); + $purchased = Functions::flattenSingleValue($purchased); + $firstPeriod = Functions::flattenSingleValue($firstPeriod); + $salvage = Functions::flattenSingleValue($salvage); + $period = floor(Functions::flattenSingleValue($period)); + $rate = Functions::flattenSingleValue($rate); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + // The depreciation coefficients are: + // Life of assets (1/rate) Depreciation coefficient + // Less than 3 years 1 + // Between 3 and 4 years 1.5 + // Between 5 and 6 years 2 + // More than 6 years 2.5 + $fUsePer = 1.0 / $rate; + if ($fUsePer < 3.0) { + $amortiseCoeff = 1.0; + } elseif ($fUsePer < 5.0) { + $amortiseCoeff = 1.5; + } elseif ($fUsePer <= 6.0) { + $amortiseCoeff = 2.0; + } else { + $amortiseCoeff = 2.5; + } + + $rate *= $amortiseCoeff; + $fNRate = round(DateTime::YEARFRAC($purchased, $firstPeriod, $basis) * $rate * $cost, 0); + $cost -= $fNRate; + $fRest = $cost - $salvage; + + for ($n = 0; $n < $period; ++$n) { + $fNRate = round($rate * $cost, 0); + $fRest -= $fNRate; + + if ($fRest < 0.0) { + switch ($period - $n) { + case 0: + case 1: + return round($cost * 0.5, 0); + default: + return 0.0; + } + } + $cost -= $fNRate; + } + + return $fNRate; + } + + /** + * AMORLINC. + * + * Returns the depreciation for each accounting period. + * This function is provided for the French accounting system. If an asset is purchased in + * the middle of the accounting period, the prorated depreciation is taken into account. + * + * Excel Function: + * AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) + * + * @param float $cost The cost of the asset + * @param mixed $purchased Date of the purchase of the asset + * @param mixed $firstPeriod Date of the end of the first period + * @param mixed $salvage The salvage value at the end of the life of the asset + * @param float $period The period + * @param float $rate Rate of depreciation + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) + { + $cost = Functions::flattenSingleValue($cost); + $purchased = Functions::flattenSingleValue($purchased); + $firstPeriod = Functions::flattenSingleValue($firstPeriod); + $salvage = Functions::flattenSingleValue($salvage); + $period = Functions::flattenSingleValue($period); + $rate = Functions::flattenSingleValue($rate); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + $fOneRate = $cost * $rate; + $fCostDelta = $cost - $salvage; + // Note, quirky variation for leap years on the YEARFRAC for this function + $purchasedYear = DateTime::YEAR($purchased); + $yearFrac = DateTime::YEARFRAC($purchased, $firstPeriod, $basis); + + if (($basis == 1) && ($yearFrac < 1) && (DateTime::isLeapYear($purchasedYear))) { + $yearFrac *= 365 / 366; + } + + $f0Rate = $yearFrac * $rate * $cost; + $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate); + + if ($period == 0) { + return $f0Rate; + } elseif ($period <= $nNumOfFullPeriods) { + return $fOneRate; + } elseif ($period == ($nNumOfFullPeriods + 1)) { + return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate; + } + + return 0.0; + } + + /** + * COUPDAYBS. + * + * Returns the number of days from the beginning of the coupon period to the settlement date. + * + * Excel Function: + * COUPDAYBS(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + + if ($basis == 1) { + return abs(DateTime::DAYS($prev, $settlement)); + } + + return DateTime::YEARFRAC($prev, $settlement, $basis) * $daysPerYear; + } + + /** + * COUPDAYS. + * + * Returns the number of days in the coupon period that contains the settlement date. + * + * Excel Function: + * COUPDAYS(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + switch ($basis) { + case 3: + // Actual/365 + return 365 / $frequency; + case 1: + // Actual/actual + if ($frequency == 1) { + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + + return $daysPerYear / $frequency; + } + $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + + return $next - $prev; + default: + // US (NASD) 30/360, Actual/360 or European 30/360 + return 360 / $frequency; + } + } + + /** + * COUPDAYSNC. + * + * Returns the number of days from the settlement date to the next coupon date. + * + * Excel Function: + * COUPDAYSNC(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + + return DateTime::YEARFRAC($settlement, $next, $basis) * $daysPerYear; + } + + /** + * COUPNCD. + * + * Returns the next coupon date after the settlement date. + * + * Excel Function: + * COUPNCD(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + } + + /** + * COUPNUM. + * + * Returns the number of coupons payable between the settlement date and maturity date, + * rounded up to the nearest whole coupon. + * + * Excel Function: + * COUPNUM(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return int|string + */ + public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $yearsBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, 0); + + return ceil($yearsBetweenSettlementAndMaturity * $frequency); + } + + /** + * COUPPCD. + * + * Returns the previous coupon date before the settlement date. + * + * Excel Function: + * COUPPCD(settlement,maturity,frequency[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement >= $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + return self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + } + + /** + * CUMIPMT. + * + * Returns the cumulative interest paid on a loan between the start and end periods. + * + * Excel Function: + * CUMIPMT(rate,nper,pv,start,end[,type]) + * + * @param float $rate The Interest rate + * @param int $nper The total number of payment periods + * @param float $pv Present Value + * @param int $start The first period in the calculation. + * Payment periods are numbered beginning with 1. + * @param int $end the last period in the calculation + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $start = (int) Functions::flattenSingleValue($start); + $end = (int) Functions::flattenSingleValue($end); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($start < 1 || $start > $end) { + return Functions::VALUE(); + } + + // Calculate + $interest = 0; + for ($per = $start; $per <= $end; ++$per) { + $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type); + } + + return $interest; + } + + /** + * CUMPRINC. + * + * Returns the cumulative principal paid on a loan between the start and end periods. + * + * Excel Function: + * CUMPRINC(rate,nper,pv,start,end[,type]) + * + * @param float $rate The Interest rate + * @param int $nper The total number of payment periods + * @param float $pv Present Value + * @param int $start The first period in the calculation. + * Payment periods are numbered beginning with 1. + * @param int $end the last period in the calculation + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $start = (int) Functions::flattenSingleValue($start); + $end = (int) Functions::flattenSingleValue($end); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($start < 1 || $start > $end) { + return Functions::VALUE(); + } + + // Calculate + $principal = 0; + for ($per = $start; $per <= $end; ++$per) { + $principal += self::PPMT($rate, $per, $nper, $pv, 0, $type); + } + + return $principal; + } + + /** + * DB. + * + * Returns the depreciation of an asset for a specified period using the + * fixed-declining balance method. + * This form of depreciation is used if you want to get a higher depreciation value + * at the beginning of the depreciation (as opposed to linear depreciation). The + * depreciation value is reduced with every depreciation period by the depreciation + * already deducted from the initial cost. + * + * Excel Function: + * DB(cost,salvage,life,period[,month]) + * + * @param float $cost Initial cost of the asset + * @param float $salvage Value at the end of the depreciation. + * (Sometimes called the salvage value of the asset) + * @param int $life Number of periods over which the asset is depreciated. + * (Sometimes called the useful life of the asset) + * @param int $period The period for which you want to calculate the + * depreciation. Period must use the same units as life. + * @param int $month Number of months in the first year. If month is omitted, + * it defaults to 12. + * + * @return float|string + */ + public static function DB($cost, $salvage, $life, $period, $month = 12) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + $month = Functions::flattenSingleValue($month); + + // Validate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($month))) { + $cost = (float) $cost; + $salvage = (float) $salvage; + $life = (int) $life; + $period = (int) $period; + $month = (int) $month; + if ($cost == 0) { + return 0.0; + } elseif (($cost < 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($month < 1)) { + return Functions::NAN(); + } + // Set Fixed Depreciation Rate + $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life); + $fixedDepreciationRate = round($fixedDepreciationRate, 3); + + // Loop through each period calculating the depreciation + $previousDepreciation = 0; + $depreciation = 0; + for ($per = 1; $per <= $period; ++$per) { + if ($per == 1) { + $depreciation = $cost * $fixedDepreciationRate * $month / 12; + } elseif ($per == ($life + 1)) { + $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12; + } else { + $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate; + } + $previousDepreciation += $depreciation; + } + + return $depreciation; + } + + return Functions::VALUE(); + } + + /** + * DDB. + * + * Returns the depreciation of an asset for a specified period using the + * double-declining balance method or some other method you specify. + * + * Excel Function: + * DDB(cost,salvage,life,period[,factor]) + * + * @param float $cost Initial cost of the asset + * @param float $salvage Value at the end of the depreciation. + * (Sometimes called the salvage value of the asset) + * @param int $life Number of periods over which the asset is depreciated. + * (Sometimes called the useful life of the asset) + * @param int $period The period for which you want to calculate the + * depreciation. Period must use the same units as life. + * @param float $factor The rate at which the balance declines. + * If factor is omitted, it is assumed to be 2 (the + * double-declining balance method). + * + * @return float|string + */ + public static function DDB($cost, $salvage, $life, $period, $factor = 2.0) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + $factor = Functions::flattenSingleValue($factor); + + // Validate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($factor))) { + $cost = (float) $cost; + $salvage = (float) $salvage; + $life = (int) $life; + $period = (int) $period; + $factor = (float) $factor; + if (($cost <= 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($factor <= 0.0) || ($period > $life)) { + return Functions::NAN(); + } + // Set Fixed Depreciation Rate + $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life); + $fixedDepreciationRate = round($fixedDepreciationRate, 3); + + // Loop through each period calculating the depreciation + $previousDepreciation = 0; + $depreciation = 0; + for ($per = 1; $per <= $period; ++$per) { + $depreciation = min(($cost - $previousDepreciation) * ($factor / $life), ($cost - $salvage - $previousDepreciation)); + $previousDepreciation += $depreciation; + } + + return $depreciation; + } + + return Functions::VALUE(); + } + + /** + * DISC. + * + * Returns the discount rate for a security. + * + * Excel Function: + * DISC(settlement,maturity,price,redemption[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $price The security's price per $100 face value + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function DISC($settlement, $maturity, $price, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + $redemption = Functions::flattenSingleValue($redemption); + $basis = Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($price)) && (is_numeric($redemption)) && (is_numeric($basis))) { + $price = (float) $price; + $redemption = (float) $redemption; + $basis = (int) $basis; + if (($price <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity; + } + + return Functions::VALUE(); + } + + /** + * DOLLARDE. + * + * Converts a dollar price expressed as an integer part and a fraction + * part into a dollar price expressed as a decimal number. + * Fractional dollar numbers are sometimes used for security prices. + * + * Excel Function: + * DOLLARDE(fractional_dollar,fraction) + * + * @param float $fractional_dollar Fractional Dollar + * @param int $fraction Fraction + * + * @return float|string + */ + public static function DOLLARDE($fractional_dollar = null, $fraction = 0) + { + $fractional_dollar = Functions::flattenSingleValue($fractional_dollar); + $fraction = (int) Functions::flattenSingleValue($fraction); + + // Validate parameters + if ($fractional_dollar === null || $fraction < 0) { + return Functions::NAN(); + } + if ($fraction == 0) { + return Functions::DIV0(); + } + + $dollars = floor($fractional_dollar); + $cents = fmod($fractional_dollar, 1); + $cents /= $fraction; + $cents *= 10 ** ceil(log10($fraction)); + + return $dollars + $cents; + } + + /** + * DOLLARFR. + * + * Converts a dollar price expressed as a decimal number into a dollar price + * expressed as a fraction. + * Fractional dollar numbers are sometimes used for security prices. + * + * Excel Function: + * DOLLARFR(decimal_dollar,fraction) + * + * @param float $decimal_dollar Decimal Dollar + * @param int $fraction Fraction + * + * @return float|string + */ + public static function DOLLARFR($decimal_dollar = null, $fraction = 0) + { + $decimal_dollar = Functions::flattenSingleValue($decimal_dollar); + $fraction = (int) Functions::flattenSingleValue($fraction); + + // Validate parameters + if ($decimal_dollar === null || $fraction < 0) { + return Functions::NAN(); + } + if ($fraction == 0) { + return Functions::DIV0(); + } + + $dollars = floor($decimal_dollar); + $cents = fmod($decimal_dollar, 1); + $cents *= $fraction; + $cents *= 10 ** (-ceil(log10($fraction))); + + return $dollars + $cents; + } + + /** + * EFFECT. + * + * Returns the effective interest rate given the nominal rate and the number of + * compounding payments per year. + * + * Excel Function: + * EFFECT(nominal_rate,npery) + * + * @param float $nominal_rate Nominal interest rate + * @param int $npery Number of compounding payments per year + * + * @return float|string + */ + public static function EFFECT($nominal_rate = 0, $npery = 0) + { + $nominal_rate = Functions::flattenSingleValue($nominal_rate); + $npery = (int) Functions::flattenSingleValue($npery); + + // Validate parameters + if ($nominal_rate <= 0 || $npery < 1) { + return Functions::NAN(); + } + + return (1 + $nominal_rate / $npery) ** $npery - 1; + } + + /** + * FV. + * + * Returns the Future Value of a cash flow with constant payments and interest rate (annuities). + * + * Excel Function: + * FV(rate,nper,pmt[,pv[,type]]) + * + * @param float $rate The interest rate per period + * @param int $nper Total number of payment periods in an annuity + * @param float $pmt The payment made each period: it cannot change over the + * life of the annuity. Typically, pmt contains principal + * and interest but no other fees or taxes. + * @param float $pv present Value, or the lump-sum amount that a series of + * future payments is worth right now + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return -$pv * (1 + $rate) ** $nper - $pmt * (1 + $rate * $type) * ((1 + $rate) ** $nper - 1) / $rate; + } + + return -$pv - $pmt * $nper; + } + + /** + * FVSCHEDULE. + * + * Returns the future value of an initial principal after applying a series of compound interest rates. + * Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate. + * + * Excel Function: + * FVSCHEDULE(principal,schedule) + * + * @param float $principal the present value + * @param float[] $schedule an array of interest rates to apply + * + * @return float + */ + public static function FVSCHEDULE($principal, $schedule) + { + $principal = Functions::flattenSingleValue($principal); + $schedule = Functions::flattenArray($schedule); + + foreach ($schedule as $rate) { + $principal *= 1 + $rate; + } + + return $principal; + } + + /** + * INTRATE. + * + * Returns the interest rate for a fully invested security. + * + * Excel Function: + * INTRATE(settlement,maturity,investment,redemption[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $investment the amount invested in the security + * @param int $redemption the amount to be received at maturity + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $investment = Functions::flattenSingleValue($investment); + $redemption = Functions::flattenSingleValue($redemption); + $basis = Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($investment)) && (is_numeric($redemption)) && (is_numeric($basis))) { + $investment = (float) $investment; + $redemption = (float) $redemption; + $basis = (int) $basis; + if (($investment <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * IPMT. + * + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * + * Excel Function: + * IPMT(rate,per,nper,pv[,fv][,type]) + * + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string + */ + public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $per = (int) Functions::flattenSingleValue($per); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($per <= 0 || $per > $nper) { + return Functions::VALUE(); + } + + // Calculate + $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); + + return $interestAndPrincipal[0]; + } + + /** + * IRR. + * + * Returns the internal rate of return for a series of cash flows represented by the numbers in values. + * These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur + * at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received + * for an investment consisting of payments (negative values) and income (positive values) that occur at regular + * periods. + * + * Excel Function: + * IRR(values[,guess]) + * + * @param float[] $values An array or a reference to cells that contain numbers for which you want + * to calculate the internal rate of return. + * Values must contain at least one positive value and one negative value to + * calculate the internal rate of return. + * @param float $guess A number that you guess is close to the result of IRR + * + * @return float|string + */ + public static function IRR($values, $guess = 0.1) + { + if (!is_array($values)) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $guess = Functions::flattenSingleValue($guess); + + // create an initial range, with a root somewhere between 0 and guess + $x1 = 0.0; + $x2 = $guess; + $f1 = self::NPV($x1, $values); + $f2 = self::NPV($x2, $values); + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + if (($f1 * $f2) < 0.0) { + break; + } + if (abs($f1) < abs($f2)) { + $f1 = self::NPV($x1 += 1.6 * ($x1 - $x2), $values); + } else { + $f2 = self::NPV($x2 += 1.6 * ($x2 - $x1), $values); + } + } + if (($f1 * $f2) > 0.0) { + return Functions::VALUE(); + } + + $f = self::NPV($x1, $values); + if ($f < 0.0) { + $rtb = $x1; + $dx = $x2 - $x1; + } else { + $rtb = $x2; + $dx = $x1 - $x2; + } + + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + $dx *= 0.5; + $x_mid = $rtb + $dx; + $f_mid = self::NPV($x_mid, $values); + if ($f_mid <= 0.0) { + $rtb = $x_mid; + } + if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) { + return $x_mid; + } + } + + return Functions::VALUE(); + } + + /** + * ISPMT. + * + * Returns the interest payment for an investment based on an interest rate and a constant payment schedule. + * + * Excel Function: + * =ISPMT(interest_rate, period, number_payments, PV) + * + * interest_rate is the interest rate for the investment + * + * period is the period to calculate the interest rate. It must be betweeen 1 and number_payments. + * + * number_payments is the number of payments for the annuity + * + * PV is the loan amount or present value of the payments + */ + public static function ISPMT(...$args) + { + // Return value + $returnValue = 0; + + // Get the parameters + $aArgs = Functions::flattenArray($args); + $interestRate = array_shift($aArgs); + $period = array_shift($aArgs); + $numberPeriods = array_shift($aArgs); + $principleRemaining = array_shift($aArgs); + + // Calculate + $principlePayment = ($principleRemaining * 1.0) / ($numberPeriods * 1.0); + for ($i = 0; $i <= $period; ++$i) { + $returnValue = $interestRate * $principleRemaining * -1; + $principleRemaining -= $principlePayment; + // principle needs to be 0 after the last payment, don't let floating point screw it up + if ($i == $numberPeriods) { + $returnValue = 0; + } + } + + return $returnValue; + } + + /** + * MIRR. + * + * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both + * the cost of the investment and the interest received on reinvestment of cash. + * + * Excel Function: + * MIRR(values,finance_rate, reinvestment_rate) + * + * @param float[] $values An array or a reference to cells that contain a series of payments and + * income occurring at regular intervals. + * Payments are negative value, income is positive values. + * @param float $finance_rate The interest rate you pay on the money used in the cash flows + * @param float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them + * + * @return float|string Result, or a string containing an error + */ + public static function MIRR($values, $finance_rate, $reinvestment_rate) + { + if (!is_array($values)) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $finance_rate = Functions::flattenSingleValue($finance_rate); + $reinvestment_rate = Functions::flattenSingleValue($reinvestment_rate); + $n = count($values); + + $rr = 1.0 + $reinvestment_rate; + $fr = 1.0 + $finance_rate; + + $npv_pos = $npv_neg = 0.0; + foreach ($values as $i => $v) { + if ($v >= 0) { + $npv_pos += $v / $rr ** $i; + } else { + $npv_neg += $v / $fr ** $i; + } + } + + if (($npv_neg == 0) || ($npv_pos == 0) || ($reinvestment_rate <= -1)) { + return Functions::VALUE(); + } + + $mirr = ((-$npv_pos * $rr ** $n) + / ($npv_neg * ($rr))) ** (1.0 / ($n - 1)) - 1.0; + + return is_finite($mirr) ? $mirr : Functions::VALUE(); + } + + /** + * NOMINAL. + * + * Returns the nominal interest rate given the effective rate and the number of compounding payments per year. + * + * @param float $effect_rate Effective interest rate + * @param int $npery Number of compounding payments per year + * + * @return float|string Result, or a string containing an error + */ + public static function NOMINAL($effect_rate = 0, $npery = 0) + { + $effect_rate = Functions::flattenSingleValue($effect_rate); + $npery = (int) Functions::flattenSingleValue($npery); + + // Validate parameters + if ($effect_rate <= 0 || $npery < 1) { + return Functions::NAN(); + } + + // Calculate + return $npery * (($effect_rate + 1) ** (1 / $npery) - 1); + } + + /** + * NPER. + * + * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate. + * + * @param float $rate Interest rate per period + * @param int $pmt Periodic payment (annuity) + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string Result, or a string containing an error + */ + public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + if ($pmt == 0 && $pv == 0) { + return Functions::NAN(); + } + + return log(($pmt * (1 + $rate * $type) / $rate - $fv) / ($pv + $pmt * (1 + $rate * $type) / $rate)) / log(1 + $rate); + } + if ($pmt == 0) { + return Functions::NAN(); + } + + return (-$pv - $fv) / $pmt; + } + + /** + * NPV. + * + * Returns the Net Present Value of a cash flow series given a discount rate. + * + * @return float + */ + public static function NPV(...$args) + { + // Return value + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + // Calculate + $rate = array_shift($aArgs); + $countArgs = count($aArgs); + for ($i = 1; $i <= $countArgs; ++$i) { + // Is it a numeric value? + if (is_numeric($aArgs[$i - 1])) { + $returnValue += $aArgs[$i - 1] / (1 + $rate) ** $i; + } + } + + // Return + return $returnValue; + } + + /** + * PDURATION. + * + * Calculates the number of periods required for an investment to reach a specified value. + * + * @param float $rate Interest rate per period + * @param float $pv Present Value + * @param float $fv Future Value + * + * @return float|string Result, or a string containing an error + */ + public static function PDURATION($rate = 0, $pv = 0, $fv = 0) + { + $rate = Functions::flattenSingleValue($rate); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + + // Validate parameters + if (!is_numeric($rate) || !is_numeric($pv) || !is_numeric($fv)) { + return Functions::VALUE(); + } elseif ($rate <= 0.0 || $pv <= 0.0 || $fv <= 0.0) { + return Functions::NAN(); + } + + return (log($fv) - log($pv)) / log(1 + $rate); + } + + /** + * PMT. + * + * Returns the constant payment (annuity) for a cash flow with a constant interest rate. + * + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string Result, or a string containing an error + */ + public static function PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return (-$fv - $pv * (1 + $rate) ** $nper) / (1 + $rate * $type) / (((1 + $rate) ** $nper - 1) / $rate); + } + + return (-$pv - $fv) / $nper; + } + + /** + * PPMT. + * + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string Result, or a string containing an error + */ + public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $per = (int) Functions::flattenSingleValue($per); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($per <= 0 || $per > $nper) { + return Functions::VALUE(); + } + + // Calculate + $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); + + return $interestAndPrincipal[1]; + } + + private static function validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis) + { + if (is_string($settlement)) { + return Functions::VALUE(); + } + if (is_string($maturity)) { + return Functions::VALUE(); + } + if (!is_numeric($rate)) { + return Functions::VALUE(); + } + if (!is_numeric($yield)) { + return Functions::VALUE(); + } + if (!is_numeric($redemption)) { + return Functions::VALUE(); + } + if (!is_numeric($frequency)) { + return Functions::VALUE(); + } + if (!is_numeric($basis)) { + return Functions::VALUE(); + } + + return ''; + } + + public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $rate = Functions::flattenSingleValue($rate); + $yield = Functions::flattenSingleValue($yield); + $redemption = Functions::flattenSingleValue($redemption); + $frequency = Functions::flattenSingleValue($frequency); + $basis = Functions::flattenSingleValue($basis); + + $settlement = DateTime::getDateValue($settlement); + $maturity = DateTime::getDateValue($maturity); + $rslt = self::validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis); + if ($rslt) { + return $rslt; + } + $rate = (float) $rate; + $yield = (float) $yield; + $redemption = (float) $redemption; + $frequency = (int) $frequency; + $basis = (int) $basis; + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $dsc = self::COUPDAYSNC($settlement, $maturity, $frequency, $basis); + $e = self::COUPDAYS($settlement, $maturity, $frequency, $basis); + $n = self::COUPNUM($settlement, $maturity, $frequency, $basis); + $a = self::COUPDAYBS($settlement, $maturity, $frequency, $basis); + + $baseYF = 1.0 + ($yield / $frequency); + $rfp = 100 * ($rate / $frequency); + $de = $dsc / $e; + + $result = $redemption / $baseYF ** (--$n + $de); + for ($k = 0; $k <= $n; ++$k) { + $result += $rfp / ($baseYF ** ($k + $de)); + } + $result -= $rfp * ($a / $e); + + return $result; + } + + /** + * PRICEDISC. + * + * Returns the price per $100 face value of a discounted security. + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $discount The security's discount rate + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = (float) Functions::flattenSingleValue($discount); + $redemption = (float) Functions::flattenSingleValue($redemption); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($discount)) && (is_numeric($redemption)) && (is_numeric($basis))) { + if (($discount <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * PRICEMAT. + * + * Returns the price per $100 face value of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $issue The security's issue date + * @param int $rate The security's interest rate at date of issue + * @param int $yield The security's annual yield + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $issue = Functions::flattenSingleValue($issue); + $rate = Functions::flattenSingleValue($rate); + $yield = Functions::flattenSingleValue($yield); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($rate) && is_numeric($yield)) { + if (($rate <= 0) || ($yield <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + $daysBetweenIssueAndSettlement *= $daysPerYear; + $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis); + if (!is_numeric($daysBetweenIssueAndMaturity)) { + // return date error + return $daysBetweenIssueAndMaturity; + } + $daysBetweenIssueAndMaturity *= $daysPerYear; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) / + (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) - + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100); + } + + return Functions::VALUE(); + } + + /** + * PV. + * + * Returns the Present Value of a cash flow with constant payments and interest rate (annuities). + * + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pmt Periodic payment (annuity) + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string Result, or a string containing an error + */ + public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return (-$pmt * (1 + $rate * $type) * (((1 + $rate) ** $nper - 1) / $rate) - $fv) / (1 + $rate) ** $nper; + } + + return -$fv - $pmt * $nper; + } + + /** + * RATE. + * + * Returns the interest rate per period of an annuity. + * RATE is calculated by iteration and can have zero or more solutions. + * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, + * RATE returns the #NUM! error value. + * + * Excel Function: + * RATE(nper,pmt,pv[,fv[,type[,guess]]]) + * + * @param float $nper The total number of payment periods in an annuity + * @param float $pmt The payment made each period and cannot change over the life + * of the annuity. + * Typically, pmt includes principal and interest but no other + * fees or taxes. + * @param float $pv The present value - the total amount that a series of future + * payments is worth now + * @param float $fv The future value, or a cash balance you want to attain after + * the last payment is made. If fv is omitted, it is assumed + * to be 0 (the future value of a loan, for example, is 0). + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * @param float $guess Your guess for what the rate will be. + * If you omit guess, it is assumed to be 10 percent. + * + * @return float|string + */ + public static function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1) + { + $nper = (int) Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $fv = ($fv === null) ? 0.0 : Functions::flattenSingleValue($fv); + $type = ($type === null) ? 0 : (int) Functions::flattenSingleValue($type); + $guess = ($guess === null) ? 0.1 : Functions::flattenSingleValue($guess); + + $rate = $guess; + // rest of code adapted from python/numpy + $close = false; + $iter = 0; + while (!$close && $iter < self::FINANCIAL_MAX_ITERATIONS) { + $nextdiff = self::rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type); + if (!is_numeric($nextdiff)) { + break; + } + $rate1 = $rate - $nextdiff; + $close = abs($rate1 - $rate) < self::FINANCIAL_PRECISION; + ++$iter; + $rate = $rate1; + } + + return $close ? $rate : Functions::NAN(); + } + + private static function rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type) + { + if ($rate == 0) { + return Functions::NAN(); + } + $tt1 = ($rate + 1) ** $nper; + $tt2 = ($rate + 1) ** ($nper - 1); + $numerator = $fv + $tt1 * $pv + $pmt * ($tt1 - 1) * ($rate * $type + 1) / $rate; + $denominator = $nper * $tt2 * $pv - $pmt * ($tt1 - 1) * ($rate * $type + 1) / ($rate * $rate) + + $nper * $pmt * $tt2 * ($rate * $type + 1) / $rate + + $pmt * ($tt1 - 1) * $type / $rate; + if ($denominator == 0) { + return Functions::NAN(); + } + + return $numerator / $denominator; + } + + /** + * RECEIVED. + * + * Returns the price per $100 face value of a discounted security. + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $investment The amount invested in the security + * @param int $discount The security's discount rate + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $investment = (float) Functions::flattenSingleValue($investment); + $discount = (float) Functions::flattenSingleValue($discount); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($investment)) && (is_numeric($discount)) && (is_numeric($basis))) { + if (($investment <= 0) || ($discount <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity)); + } + + return Functions::VALUE(); + } + + /** + * RRI. + * + * Calculates the interest rate required for an investment to grow to a specified future value . + * + * @param float $nper The number of periods over which the investment is made + * @param float $pv Present Value + * @param float $fv Future Value + * + * @return float|string Result, or a string containing an error + */ + public static function RRI($nper = 0, $pv = 0, $fv = 0) + { + $nper = Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + + // Validate parameters + if (!is_numeric($nper) || !is_numeric($pv) || !is_numeric($fv)) { + return Functions::VALUE(); + } elseif ($nper <= 0.0 || $pv <= 0.0 || $fv < 0.0) { + return Functions::NAN(); + } + + return ($fv / $pv) ** (1 / $nper) - 1; + } + + /** + * SLN. + * + * Returns the straight-line depreciation of an asset for one period + * + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated + * + * @return float|string Result, or a string containing an error + */ + public static function SLN($cost, $salvage, $life) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + + // Calculate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) { + if ($life < 0) { + return Functions::NAN(); + } + + return ($cost - $salvage) / $life; + } + + return Functions::VALUE(); + } + + /** + * SYD. + * + * Returns the sum-of-years' digits depreciation of an asset for a specified period. + * + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated + * @param mixed $period Period + * + * @return float|string Result, or a string containing an error + */ + public static function SYD($cost, $salvage, $life, $period) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + + // Calculate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period))) { + if (($life < 1) || ($period > $life)) { + return Functions::NAN(); + } + + return (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1)); + } + + return Functions::VALUE(); + } + + /** + * TBILLEQ. + * + * Returns the bond-equivalent yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $discount The Treasury bill's discount rate + * + * @return float|string Result, or a string containing an error + */ + public static function TBILLEQ($settlement, $maturity, $discount) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = Functions::flattenSingleValue($discount); + + // Use TBILLPRICE for validation + $testValue = self::TBILLPRICE($settlement, $maturity, $discount); + if (is_string($testValue)) { + return $testValue; + } + + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity); + } + + /** + * TBILLPRICE. + * + * Returns the yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $discount The Treasury bill's discount rate + * + * @return float|string Result, or a string containing an error + */ + public static function TBILLPRICE($settlement, $maturity, $discount) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = Functions::flattenSingleValue($discount); + + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + // Validate + if (is_numeric($discount)) { + if ($discount <= 0) { + return Functions::NAN(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + if ($daysBetweenSettlementAndMaturity > 360) { + return Functions::NAN(); + } + + $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360)); + if ($price <= 0) { + return Functions::NAN(); + } + + return $price; + } + + return Functions::VALUE(); + } + + /** + * TBILLYIELD. + * + * Returns the yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $price The Treasury bill's price per $100 face value + * + * @return float|mixed|string + */ + public static function TBILLYIELD($settlement, $maturity, $price) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + + // Validate + if (is_numeric($price)) { + if ($price <= 0) { + return Functions::NAN(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + if ($daysBetweenSettlementAndMaturity > 360) { + return Functions::NAN(); + } + + return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + private static function bothNegAndPos($neg, $pos) + { + return $neg && $pos; + } + + private static function xirrPart2(&$values) + { + $valCount = count($values); + $foundpos = false; + $foundneg = false; + for ($i = 0; $i < $valCount; ++$i) { + $fld = $values[$i]; + if (!is_numeric($fld)) { + return Functions::VALUE(); + } elseif ($fld > 0) { + $foundpos = true; + } elseif ($fld < 0) { + $foundneg = true; + } + } + if (!self::bothNegAndPos($foundneg, $foundpos)) { + return Functions::NAN(); + } + + return ''; + } + + private static function xirrPart1(&$values, &$dates) + { + if ((!is_array($values)) && (!is_array($dates))) { + return Functions::NA(); + } + $values = Functions::flattenArray($values); + $dates = Functions::flattenArray($dates); + if (count($values) != count($dates)) { + return Functions::NAN(); + } + + $datesCount = count($dates); + for ($i = 0; $i < $datesCount; ++$i) { + $dates[$i] = DateTime::getDateValue($dates[$i]); + if (!is_numeric($dates[$i])) { + return Functions::VALUE(); + } + } + + return self::xirrPart2($values); + } + + private static function xirrPart3($values, $dates, $x1, $x2) + { + $f = self::xnpvOrdered($x1, $values, $dates, false); + if ($f < 0.0) { + $rtb = $x1; + $dx = $x2 - $x1; + } else { + $rtb = $x2; + $dx = $x1 - $x2; + } + + $rslt = Functions::VALUE(); + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + $dx *= 0.5; + $x_mid = $rtb + $dx; + $f_mid = self::xnpvOrdered($x_mid, $values, $dates, false); + if ($f_mid <= 0.0) { + $rtb = $x_mid; + } + if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) { + $rslt = $x_mid; + + break; + } + } + + return $rslt; + } + + /** + * XIRR. + * + * Returns the internal rate of return for a schedule of cash flows that is not necessarily periodic. + * + * Excel Function: + * =XIRR(values,dates,guess) + * + * @param float[] $values A series of cash flow payments + * The series of values must contain at least one positive value & one negative value + * @param mixed[] $dates A series of payment dates + * The first payment date indicates the beginning of the schedule of payments + * All other dates must be later than this date, but they may occur in any order + * @param float $guess An optional guess at the expected answer + * + * @return float|mixed|string + */ + public static function XIRR($values, $dates, $guess = 0.1) + { + $rslt = self::xirrPart1($values, $dates); + if ($rslt) { + return $rslt; + } + + // create an initial range, with a root somewhere between 0 and guess + $guess = Functions::flattenSingleValue($guess); + $x1 = 0.0; + $x2 = $guess ? $guess : 0.1; + $f1 = self::xnpvOrdered($x1, $values, $dates, false); + $f2 = self::xnpvOrdered($x2, $values, $dates, false); + $found = false; + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + if (!is_numeric($f1) || !is_numeric($f2)) { + break; + } + if (($f1 * $f2) < 0.0) { + $found = true; + + break; + } elseif (abs($f1) < abs($f2)) { + $f1 = self::xnpvOrdered($x1 += 1.6 * ($x1 - $x2), $values, $dates, false); + } else { + $f2 = self::xnpvOrdered($x2 += 1.6 * ($x2 - $x1), $values, $dates, false); + } + } + if (!$found) { + return Functions::NAN(); + } + + return self::xirrPart3($values, $dates, $x1, $x2); + } + + /** + * XNPV. + * + * Returns the net present value for a schedule of cash flows that is not necessarily periodic. + * To calculate the net present value for a series of cash flows that is periodic, use the NPV function. + * + * Excel Function: + * =XNPV(rate,values,dates) + * + * @param float $rate the discount rate to apply to the cash flows + * @param float[] $values A series of cash flows that corresponds to a schedule of payments in dates. + * The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. + * If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. + * The series of values must contain at least one positive value and one negative value. + * @param mixed[] $dates A schedule of payment dates that corresponds to the cash flow payments. + * The first payment date indicates the beginning of the schedule of payments. + * All other dates must be later than this date, but they may occur in any order. + * + * @return float|mixed|string + */ + public static function XNPV($rate, $values, $dates) + { + return self::xnpvOrdered($rate, $values, $dates, true); + } + + private static function validateXnpv($rate, $values, $dates) + { + if (!is_numeric($rate)) { + return Functions::VALUE(); + } + $valCount = count($values); + if ($valCount != count($dates)) { + return Functions::NAN(); + } + if ($valCount > 1 && ((min($values) > 0) || (max($values) < 0))) { + return Functions::NAN(); + } + $date0 = DateTime::getDateValue($dates[0]); + if (is_string($date0)) { + return Functions::VALUE(); + } + + return ''; + } + + private static function xnpvOrdered($rate, $values, $dates, $ordered = true) + { + $rate = Functions::flattenSingleValue($rate); + $values = Functions::flattenArray($values); + $dates = Functions::flattenArray($dates); + $valCount = count($values); + $date0 = DateTime::getDateValue($dates[0]); + $rslt = self::validateXnpv($rate, $values, $dates); + if ($rslt) { + return $rslt; + } + $xnpv = 0.0; + for ($i = 0; $i < $valCount; ++$i) { + if (!is_numeric($values[$i])) { + return Functions::VALUE(); + } + $datei = DateTime::getDateValue($dates[$i]); + if (is_string($datei)) { + return Functions::VALUE(); + } + if ($date0 > $datei) { + $dif = $ordered ? Functions::NAN() : -DateTime::DATEDIF($datei, $date0, 'd'); + } else { + $dif = DateTime::DATEDIF($date0, $datei, 'd'); + } + if (!is_numeric($dif)) { + return $dif; + } + $xnpv += $values[$i] / (1 + $rate) ** ($dif / 365); + } + + return is_finite($xnpv) ? $xnpv : Functions::VALUE(); + } + + /** + * YIELDDISC. + * + * Returns the annual yield of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $price The security's price per $100 face value + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + $redemption = Functions::flattenSingleValue($redemption); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($price) && is_numeric($redemption)) { + if (($price <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * YIELDMAT. + * + * Returns the annual yield of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $issue The security's issue date + * @param int $rate The security's interest rate at date of issue + * @param int $price The security's price per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string Result, or a string containing an error + */ + public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $issue = Functions::flattenSingleValue($issue); + $rate = Functions::flattenSingleValue($rate); + $price = Functions::flattenSingleValue($price); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($rate) && is_numeric($price)) { + if (($rate <= 0) || ($price <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + $daysBetweenIssueAndSettlement *= $daysPerYear; + $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis); + if (!is_numeric($daysBetweenIssueAndMaturity)) { + // return date error + return $daysBetweenIssueAndMaturity; + } + $daysBetweenIssueAndMaturity *= $daysPerYear; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) / + (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) * + ($daysPerYear / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaParser.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaParser.php new file mode 100755 index 0000000..f6c88b2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaParser.php @@ -0,0 +1,619 @@ +<'; + const OPERATORS_POSTFIX = '%'; + + /** + * Formula. + * + * @var string + */ + private $formula; + + /** + * Tokens. + * + * @var FormulaToken[] + */ + private $tokens = []; + + /** + * Create a new FormulaParser. + * + * @param string $pFormula Formula to parse + */ + public function __construct($pFormula = '') + { + // Check parameters + if ($pFormula === null) { + throw new Exception('Invalid parameter passed: formula'); + } + + // Initialise values + $this->formula = trim($pFormula); + // Parse! + $this->parseToTokens(); + } + + /** + * Get Formula. + * + * @return string + */ + public function getFormula() + { + return $this->formula; + } + + /** + * Get Token. + * + * @param int $pId Token id + * + * @return string + */ + public function getToken($pId = 0) + { + if (isset($this->tokens[$pId])) { + return $this->tokens[$pId]; + } + + throw new Exception("Token with id $pId does not exist."); + } + + /** + * Get Token count. + * + * @return int + */ + public function getTokenCount() + { + return count($this->tokens); + } + + /** + * Get Tokens. + * + * @return FormulaToken[] + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Parse to tokens. + */ + private function parseToTokens(): void + { + // No attempt is made to verify formulas; assumes formulas are derived from Excel, where + // they can only exist if valid; stack overflows/underflows sunk as nulls without exceptions. + + // Check if the formula has a valid starting = + $formulaLength = strlen($this->formula); + if ($formulaLength < 2 || $this->formula[0] != '=') { + return; + } + + // Helper variables + $tokens1 = $tokens2 = $stack = []; + $inString = $inPath = $inRange = $inError = false; + $token = $previousToken = $nextToken = null; + + $index = 1; + $value = ''; + + $ERRORS = ['#NULL!', '#DIV/0!', '#VALUE!', '#REF!', '#NAME?', '#NUM!', '#N/A']; + $COMPARATORS_MULTI = ['>=', '<=', '<>']; + + while ($index < $formulaLength) { + // state-dependent character evaluation (order is important) + + // double-quoted strings + // embeds are doubled + // end marks token + if ($inString) { + if ($this->formula[$index] == self::QUOTE_DOUBLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_DOUBLE)) { + $value .= self::QUOTE_DOUBLE; + ++$index; + } else { + $inString = false; + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_TEXT); + $value = ''; + } + } else { + $value .= $this->formula[$index]; + } + ++$index; + + continue; + } + + // single-quoted strings (links) + // embeds are double + // end does not mark a token + if ($inPath) { + if ($this->formula[$index] == self::QUOTE_SINGLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_SINGLE)) { + $value .= self::QUOTE_SINGLE; + ++$index; + } else { + $inPath = false; + } + } else { + $value .= $this->formula[$index]; + } + ++$index; + + continue; + } + + // bracked strings (R1C1 range index or linked workbook name) + // no embeds (changed to "()" by Excel) + // end does not mark a token + if ($inRange) { + if ($this->formula[$index] == self::BRACKET_CLOSE) { + $inRange = false; + } + $value .= $this->formula[$index]; + ++$index; + + continue; + } + + // error values + // end marks a token, determined from absolute list of values + if ($inError) { + $value .= $this->formula[$index]; + ++$index; + if (in_array($value, $ERRORS)) { + $inError = false; + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_ERROR); + $value = ''; + } + + continue; + } + + // scientific notation check + if (strpos(self::OPERATORS_SN, $this->formula[$index]) !== false) { + if (strlen($value) > 1) { + if (preg_match('/^[1-9]{1}(\\.\\d+)?E{1}$/', $this->formula[$index]) != 0) { + $value .= $this->formula[$index]; + ++$index; + + continue; + } + } + } + + // independent character evaluation (order not important) + + // establish state-dependent character evaluations + if ($this->formula[$index] == self::QUOTE_DOUBLE) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inString = true; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::QUOTE_SINGLE) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inPath = true; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::BRACKET_OPEN) { + $inRange = true; + $value .= self::BRACKET_OPEN; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::ERROR_START) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inError = true; + $value .= self::ERROR_START; + ++$index; + + continue; + } + + // mark start and end of arrays and array rows + if ($this->formula[$index] == self::BRACE_OPEN) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + + $tmp = new FormulaToken('ARRAY', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + ++$index; + + continue; + } + + if ($this->formula[$index] == self::SEMICOLON) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + $tmp = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT); + $tokens1[] = $tmp; + + $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + ++$index; + + continue; + } + + if ($this->formula[$index] == self::BRACE_CLOSE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + ++$index; + + continue; + } + + // trim white-space + if ($this->formula[$index] == self::WHITESPACE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken('', FormulaToken::TOKEN_TYPE_WHITESPACE); + ++$index; + while (($this->formula[$index] == self::WHITESPACE) && ($index < $formulaLength)) { + ++$index; + } + + continue; + } + + // multi-character comparators + if (($index + 2) <= $formulaLength) { + if (in_array(substr($this->formula, $index, 2), $COMPARATORS_MULTI)) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken(substr($this->formula, $index, 2), FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_LOGICAL); + $index += 2; + + continue; + } + } + + // standard infix operators + if (strpos(self::OPERATORS_INFIX, $this->formula[$index]) !== false) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORINFIX); + ++$index; + + continue; + } + + // standard postfix operators (only one) + if (strpos(self::OPERATORS_POSTFIX, $this->formula[$index]) !== false) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); + ++$index; + + continue; + } + + // start subexpression or function + if ($this->formula[$index] == self::PAREN_OPEN) { + if (strlen($value) > 0) { + $tmp = new FormulaToken($value, FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + $value = ''; + } else { + $tmp = new FormulaToken('', FormulaToken::TOKEN_TYPE_SUBEXPRESSION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + } + ++$index; + + continue; + } + + // function, subexpression, or array parameters, or operand unions + if ($this->formula[$index] == self::COMMA) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $stack[] = $tmp; + + if ($tmp->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) { + $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_UNION); + } else { + $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT); + } + ++$index; + + continue; + } + + // stop subexpression + if ($this->formula[$index] == self::PAREN_CLOSE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + ++$index; + + continue; + } + + // token accumulation + $value .= $this->formula[$index]; + ++$index; + } + + // dump remaining accumulation + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + } + + // move tokenList to new set, excluding unnecessary white-space tokens and converting necessary ones to intersections + $tokenCount = count($tokens1); + for ($i = 0; $i < $tokenCount; ++$i) { + $token = $tokens1[$i]; + if (isset($tokens1[$i - 1])) { + $previousToken = $tokens1[$i - 1]; + } else { + $previousToken = null; + } + if (isset($tokens1[$i + 1])) { + $nextToken = $tokens1[$i + 1]; + } else { + $nextToken = null; + } + + if ($token === null) { + continue; + } + + if ($token->getTokenType() != FormulaToken::TOKEN_TYPE_WHITESPACE) { + $tokens2[] = $token; + + continue; + } + + if ($previousToken === null) { + continue; + } + + if (!( + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND) + )) { + continue; + } + + if ($nextToken === null) { + continue; + } + + if (!( + (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) || + (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) || + ($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND) + )) { + continue; + } + + $tokens2[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_INTERSECTION); + } + + // move tokens to final list, switching infix "-" operators to prefix when appropriate, switching infix "+" operators + // to noop when appropriate, identifying operand and infix-operator subtypes, and pulling "@" from function names + $this->tokens = []; + + $tokenCount = count($tokens2); + for ($i = 0; $i < $tokenCount; ++$i) { + $token = $tokens2[$i]; + if (isset($tokens2[$i - 1])) { + $previousToken = $tokens2[$i - 1]; + } else { + $previousToken = null; + } + if (isset($tokens2[$i + 1])) { + $nextToken = $tokens2[$i + 1]; + } else { + $nextToken = null; + } + + if ($token === null) { + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '-') { + if ($i == 0) { + $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX); + } elseif ((($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } else { + $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '+') { + if ($i == 0) { + continue; + } elseif ((($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } else { + continue; + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && + $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING) { + if (strpos('<>=', substr($token->getValue(), 0, 1)) !== false) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL); + } elseif ($token->getValue() == '&') { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_CONCATENATION); + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND && + $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING) { + if (!is_numeric($token->getValue())) { + if (strtoupper($token->getValue()) == 'TRUE' || strtoupper($token->getValue()) == 'FALSE') { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL); + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_RANGE); + } + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_NUMBER); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) { + if (strlen($token->getValue()) > 0) { + if (substr($token->getValue(), 0, 1) == '@') { + $token->setValue(substr($token->getValue(), 1)); + } + } + } + + $this->tokens[] = $token; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaToken.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaToken.php new file mode 100755 index 0000000..4d225de --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/FormulaToken.php @@ -0,0 +1,150 @@ +value = $pValue; + $this->tokenType = $pTokenType; + $this->tokenSubType = $pTokenSubType; + } + + /** + * Get Value. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set Value. + * + * @param string $value + */ + public function setValue($value): void + { + $this->value = $value; + } + + /** + * Get Token Type (represented by TOKEN_TYPE_*). + * + * @return string + */ + public function getTokenType() + { + return $this->tokenType; + } + + /** + * Set Token Type (represented by TOKEN_TYPE_*). + * + * @param string $value + */ + public function setTokenType($value): void + { + $this->tokenType = $value; + } + + /** + * Get Token SubType (represented by TOKEN_SUBTYPE_*). + * + * @return string + */ + public function getTokenSubType() + { + return $this->tokenSubType; + } + + /** + * Set Token SubType (represented by TOKEN_SUBTYPE_*). + * + * @param string $value + */ + public function setTokenSubType($value): void + { + $this->tokenSubType = $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Functions.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Functions.php new file mode 100755 index 0000000..148d75b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Functions.php @@ -0,0 +1,656 @@ + '#NULL!', + 'divisionbyzero' => '#DIV/0!', + 'value' => '#VALUE!', + 'reference' => '#REF!', + 'name' => '#NAME?', + 'num' => '#NUM!', + 'na' => '#N/A', + 'gettingdata' => '#GETTING_DATA', + ]; + + /** + * Set the Compatibility Mode. + * + * @param string $compatibilityMode Compatibility Mode + * Permitted values are: + * Functions::COMPATIBILITY_EXCEL 'Excel' + * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' + * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' + * + * @return bool (Success or Failure) + */ + public static function setCompatibilityMode($compatibilityMode) + { + if (($compatibilityMode == self::COMPATIBILITY_EXCEL) || + ($compatibilityMode == self::COMPATIBILITY_GNUMERIC) || + ($compatibilityMode == self::COMPATIBILITY_OPENOFFICE) + ) { + self::$compatibilityMode = $compatibilityMode; + + return true; + } + + return false; + } + + /** + * Return the current Compatibility Mode. + * + * @return string Compatibility Mode + * Possible Return values are: + * Functions::COMPATIBILITY_EXCEL 'Excel' + * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' + * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' + */ + public static function getCompatibilityMode() + { + return self::$compatibilityMode; + } + + /** + * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object). + * + * @param string $returnDateType Return Date Format + * Permitted values are: + * Functions::RETURNDATE_UNIX_TIMESTAMP 'P' + * Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O' + * Functions::RETURNDATE_EXCEL 'E' + * + * @return bool Success or failure + */ + public static function setReturnDateType($returnDateType) + { + if (($returnDateType == self::RETURNDATE_UNIX_TIMESTAMP) || + ($returnDateType == self::RETURNDATE_PHP_DATETIME_OBJECT) || + ($returnDateType == self::RETURNDATE_EXCEL) + ) { + self::$returnDateType = $returnDateType; + + return true; + } + + return false; + } + + /** + * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object). + * + * @return string Return Date Format + * Possible Return values are: + * Functions::RETURNDATE_UNIX_TIMESTAMP 'P' + * Functions::RETURNDATE_PHP_DATETIME_OBJECT 'O' + * Functions::RETURNDATE_EXCEL 'E' + */ + public static function getReturnDateType() + { + return self::$returnDateType; + } + + /** + * DUMMY. + * + * @return string #Not Yet Implemented + */ + public static function DUMMY() + { + return '#Not Yet Implemented'; + } + + /** + * DIV0. + * + * @return string #Not Yet Implemented + */ + public static function DIV0() + { + return self::$errorCodes['divisionbyzero']; + } + + /** + * NA. + * + * Excel Function: + * =NA() + * + * Returns the error value #N/A + * #N/A is the error value that means "no value is available." + * + * @return string #N/A! + */ + public static function NA() + { + return self::$errorCodes['na']; + } + + /** + * NaN. + * + * Returns the error value #NUM! + * + * @return string #NUM! + */ + public static function NAN() + { + return self::$errorCodes['num']; + } + + /** + * NAME. + * + * Returns the error value #NAME? + * + * @return string #NAME? + */ + public static function NAME() + { + return self::$errorCodes['name']; + } + + /** + * REF. + * + * Returns the error value #REF! + * + * @return string #REF! + */ + public static function REF() + { + return self::$errorCodes['reference']; + } + + /** + * NULL. + * + * Returns the error value #NULL! + * + * @return string #NULL! + */ + public static function null() + { + return self::$errorCodes['null']; + } + + /** + * VALUE. + * + * Returns the error value #VALUE! + * + * @return string #VALUE! + */ + public static function VALUE() + { + return self::$errorCodes['value']; + } + + public static function isMatrixValue($idx) + { + return (substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0); + } + + public static function isValue($idx) + { + return substr_count($idx, '.') == 0; + } + + public static function isCellValue($idx) + { + return substr_count($idx, '.') > 1; + } + + public static function ifCondition($condition) + { + $condition = self::flattenSingleValue($condition); + + if ($condition === '') { + $condition = '=""'; + } + + if (!is_string($condition) || !in_array($condition[0], ['>', '<', '='])) { + if (!is_numeric($condition)) { + $condition = Calculation::wrapResult(strtoupper($condition)); + } + + return str_replace('""""', '""', '=' . $condition); + } + preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches); + [, $operator, $operand] = $matches; + + if (is_numeric(trim($operand, '"'))) { + $operand = trim($operand, '"'); + } elseif (!is_numeric($operand)) { + $operand = str_replace('"', '""', $operand); + $operand = Calculation::wrapResult(strtoupper($operand)); + } + + return str_replace('""""', '""', $operator . $operand); + } + + /** + * ERROR_TYPE. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function errorType($value = '') + { + $value = self::flattenSingleValue($value); + + $i = 1; + foreach (self::$errorCodes as $errorCode) { + if ($value === $errorCode) { + return $i; + } + ++$i; + } + + return self::NA(); + } + + /** + * IS_BLANK. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isBlank($value = null) + { + if ($value !== null) { + $value = self::flattenSingleValue($value); + } + + return $value === null; + } + + /** + * IS_ERR. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isErr($value = '') + { + $value = self::flattenSingleValue($value); + + return self::isError($value) && (!self::isNa(($value))); + } + + /** + * IS_ERROR. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isError($value = '') + { + $value = self::flattenSingleValue($value); + + if (!is_string($value)) { + return false; + } + + return in_array($value, self::$errorCodes); + } + + /** + * IS_NA. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNa($value = '') + { + $value = self::flattenSingleValue($value); + + return $value === self::NA(); + } + + /** + * IS_EVEN. + * + * @param mixed $value Value to check + * + * @return bool|string + */ + public static function isEven($value = null) + { + $value = self::flattenSingleValue($value); + + if ($value === null) { + return self::NAME(); + } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { + return self::VALUE(); + } + + return $value % 2 == 0; + } + + /** + * IS_ODD. + * + * @param mixed $value Value to check + * + * @return bool|string + */ + public static function isOdd($value = null) + { + $value = self::flattenSingleValue($value); + + if ($value === null) { + return self::NAME(); + } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { + return self::VALUE(); + } + + return abs($value) % 2 == 1; + } + + /** + * IS_NUMBER. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNumber($value = null) + { + $value = self::flattenSingleValue($value); + + if (is_string($value)) { + return false; + } + + return is_numeric($value); + } + + /** + * IS_LOGICAL. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isLogical($value = null) + { + $value = self::flattenSingleValue($value); + + return is_bool($value); + } + + /** + * IS_TEXT. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isText($value = null) + { + $value = self::flattenSingleValue($value); + + return is_string($value) && !self::isError($value); + } + + /** + * IS_NONTEXT. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNonText($value = null) + { + return !self::isText($value); + } + + /** + * N. + * + * Returns a value converted to a number + * + * @param null|mixed $value The value you want converted + * + * @return number N converts values listed in the following table + * If value is or refers to N returns + * A number That number + * A date The serial number of that date + * TRUE 1 + * FALSE 0 + * An error value The error value + * Anything else 0 + */ + public static function n($value = null) + { + while (is_array($value)) { + $value = array_shift($value); + } + + switch (gettype($value)) { + case 'double': + case 'float': + case 'integer': + return $value; + case 'boolean': + return (int) $value; + case 'string': + // Errors + if ((strlen($value) > 0) && ($value[0] == '#')) { + return $value; + } + + break; + } + + return 0; + } + + /** + * TYPE. + * + * Returns a number that identifies the type of a value + * + * @param null|mixed $value The value you want tested + * + * @return number N converts values listed in the following table + * If value is or refers to N returns + * A number 1 + * Text 2 + * Logical Value 4 + * An error value 16 + * Array or Matrix 64 + */ + public static function TYPE($value = null) + { + $value = self::flattenArrayIndexed($value); + if (is_array($value) && (count($value) > 1)) { + end($value); + $a = key($value); + // Range of cells is an error + if (self::isCellValue($a)) { + return 16; + // Test for Matrix + } elseif (self::isMatrixValue($a)) { + return 64; + } + } elseif (empty($value)) { + // Empty Cell + return 1; + } + $value = self::flattenSingleValue($value); + + if (($value === null) || (is_float($value)) || (is_int($value))) { + return 1; + } elseif (is_bool($value)) { + return 4; + } elseif (is_array($value)) { + return 64; + } elseif (is_string($value)) { + // Errors + if ((strlen($value) > 0) && ($value[0] == '#')) { + return 16; + } + + return 2; + } + + return 0; + } + + /** + * Convert a multi-dimensional array to a simple 1-dimensional array. + * + * @param array $array Array to be flattened + * + * @return array Flattened array + */ + public static function flattenArray($array) + { + if (!is_array($array)) { + return (array) $array; + } + + $arrayValues = []; + foreach ($array as $value) { + if (is_array($value)) { + foreach ($value as $val) { + if (is_array($val)) { + foreach ($val as $v) { + $arrayValues[] = $v; + } + } else { + $arrayValues[] = $val; + } + } + } else { + $arrayValues[] = $value; + } + } + + return $arrayValues; + } + + /** + * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing. + * + * @param array $array Array to be flattened + * + * @return array Flattened array + */ + public static function flattenArrayIndexed($array) + { + if (!is_array($array)) { + return (array) $array; + } + + $arrayValues = []; + foreach ($array as $k1 => $value) { + if (is_array($value)) { + foreach ($value as $k2 => $val) { + if (is_array($val)) { + foreach ($val as $k3 => $v) { + $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v; + } + } else { + $arrayValues[$k1 . '.' . $k2] = $val; + } + } + } else { + $arrayValues[$k1] = $value; + } + } + + return $arrayValues; + } + + /** + * Convert an array to a single scalar value by extracting the first element. + * + * @param mixed $value Array or scalar value + * + * @return mixed + */ + public static function flattenSingleValue($value = '') + { + while (is_array($value)) { + $value = array_shift($value); + } + + return $value; + } + + /** + * ISFORMULA. + * + * @param mixed $cellReference The cell to check + * @param Cell $pCell The current cell (containing this formula) + * + * @return bool|string + */ + public static function isFormula($cellReference = '', ?Cell $pCell = null) + { + if ($pCell === null) { + return self::REF(); + } + + preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches); + + $cellReference = $matches[6] . $matches[7]; + $worksheetName = trim($matches[3], "'"); + + $worksheet = (!empty($worksheetName)) + ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName) + : $pCell->getWorksheet(); + + return $worksheet->getCell($cellReference)->isFormula(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Logical.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Logical.php new file mode 100755 index 0000000..69c543c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Logical.php @@ -0,0 +1,390 @@ + 0) && ($returnValue == $argCount); + } + + /** + * LOGICAL_OR. + * + * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE. + * + * Excel Function: + * =OR(logical1[,logical2[, ...]]) + * + * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays + * or references that contain logical values. + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @param mixed $args Data values + * + * @return bool|string the logical OR of the arguments + */ + public static function logicalOr(...$args) + { + $args = Functions::flattenArray($args); + + if (count($args) == 0) { + return Functions::VALUE(); + } + + $args = array_filter($args, function ($value) { + return $value !== null || (is_string($value) && trim($value) == ''); + }); + + $returnValue = self::countTrueValues($args); + if (is_string($returnValue)) { + return $returnValue; + } + + return $returnValue > 0; + } + + /** + * LOGICAL_XOR. + * + * Returns the Exclusive Or logical operation for one or more supplied conditions. + * i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE, and FALSE otherwise. + * + * Excel Function: + * =XOR(logical1[,logical2[, ...]]) + * + * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays + * or references that contain logical values. + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @param mixed $args Data values + * + * @return bool|string the logical XOR of the arguments + */ + public static function logicalXor(...$args) + { + $args = Functions::flattenArray($args); + + if (count($args) == 0) { + return Functions::VALUE(); + } + + $args = array_filter($args, function ($value) { + return $value !== null || (is_string($value) && trim($value) == ''); + }); + + $returnValue = self::countTrueValues($args); + if (is_string($returnValue)) { + return $returnValue; + } + + return $returnValue % 2 == 1; + } + + /** + * NOT. + * + * Returns the boolean inverse of the argument. + * + * Excel Function: + * =NOT(logical) + * + * The argument must evaluate to a logical value such as TRUE or FALSE + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE + * + * @return bool|string the boolean inverse of the argument + */ + public static function NOT($logical = false) + { + $logical = Functions::flattenSingleValue($logical); + + if (is_string($logical)) { + $logical = strtoupper($logical); + if (($logical == 'TRUE') || ($logical == Calculation::getTRUE())) { + return false; + } elseif (($logical == 'FALSE') || ($logical == Calculation::getFALSE())) { + return true; + } + + return Functions::VALUE(); + } + + return !$logical; + } + + /** + * STATEMENT_IF. + * + * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. + * + * Excel Function: + * =IF(condition[,returnIfTrue[,returnIfFalse]]) + * + * Condition is any value or expression that can be evaluated to TRUE or FALSE. + * For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, + * the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. + * This argument can use any comparison calculation operator. + * ReturnIfTrue is the value that is returned if condition evaluates to TRUE. + * For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE, + * then the IF function returns the text "Within budget" + * If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use + * the logical value TRUE for this argument. + * ReturnIfTrue can be another formula. + * ReturnIfFalse is the value that is returned if condition evaluates to FALSE. + * For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE, + * then the IF function returns the text "Over budget". + * If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned. + * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. + * ReturnIfFalse can be another formula. + * + * @param mixed $condition Condition to evaluate + * @param mixed $returnIfTrue Value to return when condition is true + * @param mixed $returnIfFalse Optional value to return when condition is false + * + * @return mixed The value of returnIfTrue or returnIfFalse determined by condition + */ + public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false) + { + if (Functions::isError($condition)) { + return $condition; + } + + $condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition); + $returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue); + $returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse); + + return ($condition) ? $returnIfTrue : $returnIfFalse; + } + + /** + * STATEMENT_SWITCH. + * + * Returns corresponding with first match (any data type such as a string, numeric, date, etc). + * + * Excel Function: + * =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default]) + * + * Expression + * The expression to compare to a list of values. + * value1, value2, ... value_n + * A list of values that are compared to expression. The SWITCH function is looking for the first value that matches the expression. + * result1, result2, ... result_n + * A list of results. The SWITCH function returns the corresponding result when a value matches expression. + * default + * Optional. It is the default to return if expression does not match any of the values (value1, value2, ... value_n). + * + * @param mixed $arguments Statement arguments + * + * @return mixed The value of matched expression + */ + public static function statementSwitch(...$arguments) + { + $result = Functions::VALUE(); + + if (count($arguments) > 0) { + $targetValue = Functions::flattenSingleValue($arguments[0]); + $argc = count($arguments) - 1; + $switchCount = floor($argc / 2); + $switchSatisfied = false; + $hasDefaultClause = $argc % 2 !== 0; + $defaultClause = $argc % 2 === 0 ? null : $arguments[count($arguments) - 1]; + + if ($switchCount) { + for ($index = 0; $index < $switchCount; ++$index) { + if ($targetValue == $arguments[$index * 2 + 1]) { + $result = $arguments[$index * 2 + 2]; + $switchSatisfied = true; + + break; + } + } + } + + if (!$switchSatisfied) { + $result = $hasDefaultClause ? $defaultClause : Functions::NA(); + } + } + + return $result; + } + + /** + * IFERROR. + * + * Excel Function: + * =IFERROR(testValue,errorpart) + * + * @param mixed $testValue Value to check, is also the value returned when no error + * @param mixed $errorpart Value to return when testValue is an error condition + * + * @return mixed The value of errorpart or testValue determined by error condition + */ + public static function IFERROR($testValue = '', $errorpart = '') + { + $testValue = ($testValue === null) ? '' : Functions::flattenSingleValue($testValue); + $errorpart = ($errorpart === null) ? '' : Functions::flattenSingleValue($errorpart); + + return self::statementIf(Functions::isError($testValue), $errorpart, $testValue); + } + + /** + * IFNA. + * + * Excel Function: + * =IFNA(testValue,napart) + * + * @param mixed $testValue Value to check, is also the value returned when not an NA + * @param mixed $napart Value to return when testValue is an NA condition + * + * @return mixed The value of errorpart or testValue determined by error condition + */ + public static function IFNA($testValue = '', $napart = '') + { + $testValue = ($testValue === null) ? '' : Functions::flattenSingleValue($testValue); + $napart = ($napart === null) ? '' : Functions::flattenSingleValue($napart); + + return self::statementIf(Functions::isNa($testValue), $napart, $testValue); + } + + /** + * IFS. + * + * Excel Function: + * =IFS(testValue1;returnIfTrue1;testValue2;returnIfTrue2;...;testValue_n;returnIfTrue_n) + * + * testValue1 ... testValue_n + * Conditions to Evaluate + * returnIfTrue1 ... returnIfTrue_n + * Value returned if corresponding testValue (nth) was true + * + * @param mixed ...$arguments Statement arguments + * + * @return mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true + */ + public static function IFS(...$arguments) + { + if (count($arguments) % 2 != 0) { + return Functions::NA(); + } + // We use instance of Exception as a falseValue in order to prevent string collision with value in cell + $falseValueException = new Exception(); + for ($i = 0; $i < count($arguments); $i += 2) { + $testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]); + $returnIfTrue = ($arguments[$i + 1] === null) ? '' : Functions::flattenSingleValue($arguments[$i + 1]); + $result = self::statementIf($testValue, $returnIfTrue, $falseValueException); + + if ($result !== $falseValueException) { + return $result; + } + } + + return Functions::NA(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/LookupRef.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/LookupRef.php new file mode 100755 index 0000000..6e81700 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/LookupRef.php @@ -0,0 +1,957 @@ + '') { + if (strpos($sheetText, ' ') !== false) { + $sheetText = "'" . $sheetText . "'"; + } + $sheetText .= '!'; + } + if ((!is_bool($referenceStyle)) || $referenceStyle) { + $rowRelative = $columnRelative = '$'; + $column = Coordinate::stringFromColumnIndex($column); + if (($relativity == 2) || ($relativity == 4)) { + $columnRelative = ''; + } + if (($relativity == 3) || ($relativity == 4)) { + $rowRelative = ''; + } + + return $sheetText . $columnRelative . $column . $rowRelative . $row; + } + if (($relativity == 2) || ($relativity == 4)) { + $column = '[' . $column . ']'; + } + if (($relativity == 3) || ($relativity == 4)) { + $row = '[' . $row . ']'; + } + + return $sheetText . 'R' . $row . 'C' . $column; + } + + /** + * COLUMN. + * + * Returns the column number of the given cell reference + * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * reference of the cell in which the COLUMN function appears; otherwise this function returns 0. + * + * Excel Function: + * =COLUMN([cellAddress]) + * + * @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers + * + * @return int|int[] + */ + public static function COLUMN($cellAddress = null) + { + if ($cellAddress === null || trim($cellAddress) === '') { + return 0; + } + + if (is_array($cellAddress)) { + foreach ($cellAddress as $columnKey => $value) { + $columnKey = preg_replace('/[^a-z]/i', '', $columnKey); + + return (int) Coordinate::columnIndexFromString($columnKey); + } + } else { + [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); + if (strpos($cellAddress, ':') !== false) { + [$startAddress, $endAddress] = explode(':', $cellAddress); + $startAddress = preg_replace('/[^a-z]/i', '', $startAddress); + $endAddress = preg_replace('/[^a-z]/i', '', $endAddress); + $returnValue = []; + do { + $returnValue[] = (int) Coordinate::columnIndexFromString($startAddress); + } while ($startAddress++ != $endAddress); + + return $returnValue; + } + $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress); + + return (int) Coordinate::columnIndexFromString($cellAddress); + } + } + + /** + * COLUMNS. + * + * Returns the number of columns in an array or reference. + * + * Excel Function: + * =COLUMNS(cellAddress) + * + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns + * + * @return int The number of columns in cellAddress + */ + public static function COLUMNS($cellAddress = null) + { + if ($cellAddress === null || $cellAddress === '') { + return 1; + } elseif (!is_array($cellAddress)) { + return Functions::VALUE(); + } + + reset($cellAddress); + $isMatrix = (is_numeric(key($cellAddress))); + [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress); + + if ($isMatrix) { + return $rows; + } + + return $columns; + } + + /** + * ROW. + * + * Returns the row number of the given cell reference + * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * reference of the cell in which the ROW function appears; otherwise this function returns 0. + * + * Excel Function: + * =ROW([cellAddress]) + * + * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers + * + * @return int or array of integer + */ + public static function ROW($cellAddress = null) + { + if ($cellAddress === null || trim($cellAddress) === '') { + return 0; + } + + if (is_array($cellAddress)) { + foreach ($cellAddress as $columnKey => $rowValue) { + foreach ($rowValue as $rowKey => $cellValue) { + return (int) preg_replace('/\D/', '', $rowKey); + } + } + } else { + [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); + if (strpos($cellAddress, ':') !== false) { + [$startAddress, $endAddress] = explode(':', $cellAddress); + $startAddress = preg_replace('/\D/', '', $startAddress); + $endAddress = preg_replace('/\D/', '', $endAddress); + $returnValue = []; + do { + $returnValue[][] = (int) $startAddress; + } while ($startAddress++ != $endAddress); + + return $returnValue; + } + [$cellAddress] = explode(':', $cellAddress); + + return (int) preg_replace('/\D/', '', $cellAddress); + } + } + + /** + * ROWS. + * + * Returns the number of rows in an array or reference. + * + * Excel Function: + * =ROWS(cellAddress) + * + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows + * + * @return int The number of rows in cellAddress + */ + public static function ROWS($cellAddress = null) + { + if ($cellAddress === null || $cellAddress === '') { + return 1; + } elseif (!is_array($cellAddress)) { + return Functions::VALUE(); + } + + reset($cellAddress); + $isMatrix = (is_numeric(key($cellAddress))); + [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress); + + if ($isMatrix) { + return $columns; + } + + return $rows; + } + + /** + * HYPERLINK. + * + * Excel Function: + * =HYPERLINK(linkURL,displayName) + * + * @param string $linkURL Value to check, is also the value returned when no error + * @param string $displayName Value to return when testValue is an error condition + * @param Cell $pCell The cell to set the hyperlink in + * + * @return mixed The value of $displayName (or $linkURL if $displayName was blank) + */ + public static function HYPERLINK($linkURL = '', $displayName = null, ?Cell $pCell = null) + { + $linkURL = ($linkURL === null) ? '' : Functions::flattenSingleValue($linkURL); + $displayName = ($displayName === null) ? '' : Functions::flattenSingleValue($displayName); + + if ((!is_object($pCell)) || (trim($linkURL) == '')) { + return Functions::REF(); + } + + if ((is_object($displayName)) || trim($displayName) == '') { + $displayName = $linkURL; + } + + $pCell->getHyperlink()->setUrl($linkURL); + $pCell->getHyperlink()->setTooltip($displayName); + + return $displayName; + } + + /** + * INDIRECT. + * + * Returns the reference specified by a text string. + * References are immediately evaluated to display their contents. + * + * Excel Function: + * =INDIRECT(cellAddress) + * + * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 + * + * @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula) + * @param Cell $pCell The current cell (containing this formula) + * + * @return mixed The cells referenced by cellAddress + * + * @TODO Support for the optional a1 parameter introduced in Excel 2010 + */ + public static function INDIRECT($cellAddress = null, ?Cell $pCell = null) + { + $cellAddress = Functions::flattenSingleValue($cellAddress); + if ($cellAddress === null || $cellAddress === '') { + return Functions::REF(); + } + + $cellAddress1 = $cellAddress; + $cellAddress2 = null; + if (strpos($cellAddress, ':') !== false) { + [$cellAddress1, $cellAddress2] = explode(':', $cellAddress); + } + + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) || + (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))) { + if (!preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $cellAddress1, $matches)) { + return Functions::REF(); + } + + if (strpos($cellAddress, '!') !== false) { + [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, false); + } + + if (strpos($cellAddress, '!') !== false) { + [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); + } + + /** + * OFFSET. + * + * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. + * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and + * the number of columns to be returned. + * + * Excel Function: + * =OFFSET(cellAddress, rows, cols, [height], [width]) + * + * @param null|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or + * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. + * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to. + * Using 5 as the rows argument specifies that the upper-left cell in the reference is + * five rows below reference. Rows can be positive (which means below the starting reference) + * or negative (which means above the starting reference). + * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result + * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the + * reference is five columns to the right of reference. Cols can be positive (which means + * to the right of the starting reference) or negative (which means to the left of the + * starting reference). + * @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. + * @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. + * + * @return string A reference to a cell or range of cells + */ + public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $pCell = null) + { + $rows = Functions::flattenSingleValue($rows); + $columns = Functions::flattenSingleValue($columns); + $height = Functions::flattenSingleValue($height); + $width = Functions::flattenSingleValue($width); + if ($cellAddress === null) { + return 0; + } + + if (!is_object($pCell)) { + return Functions::REF(); + } + + $sheetName = null; + if (strpos($cellAddress, '!')) { + [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + } + if (strpos($cellAddress, ':')) { + [$startCell, $endCell] = explode(':', $cellAddress); + } else { + $startCell = $endCell = $cellAddress; + } + [$startCellColumn, $startCellRow] = Coordinate::coordinateFromString($startCell); + [$endCellColumn, $endCellRow] = Coordinate::coordinateFromString($endCell); + + $startCellRow += $rows; + $startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1; + $startCellColumn += $columns; + + if (($startCellRow <= 0) || ($startCellColumn < 0)) { + return Functions::REF(); + } + $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1; + if (($width != null) && (!is_object($width))) { + $endCellColumn = $startCellColumn + $width - 1; + } else { + $endCellColumn += $columns; + } + $startCellColumn = Coordinate::stringFromColumnIndex($startCellColumn + 1); + + if (($height != null) && (!is_object($height))) { + $endCellRow = $startCellRow + $height - 1; + } else { + $endCellRow += $rows; + } + + if (($endCellRow <= 0) || ($endCellColumn < 0)) { + return Functions::REF(); + } + $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1); + + $cellAddress = $startCellColumn . $startCellRow; + if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) { + $cellAddress .= ':' . $endCellColumn . $endCellRow; + } + + if ($sheetName !== null) { + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); + } + + /** + * CHOOSE. + * + * Uses lookup_value to return a value from the list of value arguments. + * Use CHOOSE to select one of up to 254 values based on the lookup_value. + * + * Excel Function: + * =CHOOSE(index_num, value1, [value2], ...) + * + * @return mixed The selected value + */ + public static function CHOOSE(...$chooseArgs) + { + $chosenEntry = Functions::flattenArray(array_shift($chooseArgs)); + $entryCount = count($chooseArgs) - 1; + + if (is_array($chosenEntry)) { + $chosenEntry = array_shift($chosenEntry); + } + if ((is_numeric($chosenEntry)) && (!is_bool($chosenEntry))) { + --$chosenEntry; + } else { + return Functions::VALUE(); + } + $chosenEntry = floor($chosenEntry); + if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) { + return Functions::VALUE(); + } + + if (is_array($chooseArgs[$chosenEntry])) { + return Functions::flattenArray($chooseArgs[$chosenEntry]); + } + + return $chooseArgs[$chosenEntry]; + } + + /** + * MATCH. + * + * The MATCH function searches for a specified item in a range of cells + * + * Excel Function: + * =MATCH(lookup_value, lookup_array, [match_type]) + * + * @param mixed $lookupValue The value that you want to match in lookup_array + * @param mixed $lookupArray The range of cells being searched + * @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. + * If match_type is 1 or -1, the list has to be ordered. + * + * @return int|string The relative position of the found item + */ + public static function MATCH($lookupValue, $lookupArray, $matchType = 1) + { + $lookupArray = Functions::flattenArray($lookupArray); + $lookupValue = Functions::flattenSingleValue($lookupValue); + $matchType = ($matchType === null) ? 1 : (int) Functions::flattenSingleValue($matchType); + + // MATCH is not case sensitive, so we convert lookup value to be lower cased in case it's string type. + if (is_string($lookupValue)) { + $lookupValue = StringHelper::strToLower($lookupValue); + } + + // Lookup_value type has to be number, text, or logical values + if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) { + return Functions::NA(); + } + + // Match_type is 0, 1 or -1 + if (($matchType !== 0) && ($matchType !== -1) && ($matchType !== 1)) { + return Functions::NA(); + } + + // Lookup_array should not be empty + $lookupArraySize = count($lookupArray); + if ($lookupArraySize <= 0) { + return Functions::NA(); + } + + if ($matchType == 1) { + // If match_type is 1 the list has to be processed from last to first + + $lookupArray = array_reverse($lookupArray); + $keySet = array_reverse(array_keys($lookupArray)); + } + + // Lookup_array should contain only number, text, or logical values, or empty (null) cells + foreach ($lookupArray as $i => $lookupArrayValue) { + // check the type of the value + if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) && + (!is_bool($lookupArrayValue)) && ($lookupArrayValue !== null) + ) { + return Functions::NA(); + } + // Convert strings to lowercase for case-insensitive testing + if (is_string($lookupArrayValue)) { + $lookupArray[$i] = StringHelper::strToLower($lookupArrayValue); + } + if (($lookupArrayValue === null) && (($matchType == 1) || ($matchType == -1))) { + unset($lookupArray[$i]); + } + } + + // ** + // find the match + // ** + + if ($matchType === 0 || $matchType === 1) { + foreach ($lookupArray as $i => $lookupArrayValue) { + $typeMatch = ((gettype($lookupValue) === gettype($lookupArrayValue)) || (is_numeric($lookupValue) && is_numeric($lookupArrayValue))); + $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue; + $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue; + $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch; + + if ($matchType === 0) { + if ($typeMatch && is_string($lookupValue) && (bool) preg_match('/([\?\*])/', $lookupValue)) { + $splitString = $lookupValue; + $chars = array_map(function ($i) use ($splitString) { + return mb_substr($splitString, $i, 1); + }, range(0, mb_strlen($splitString) - 1)); + + $length = count($chars); + $pattern = '/^'; + for ($j = 0; $j < $length; ++$j) { + if ($chars[$j] === '~') { + if (isset($chars[$j + 1])) { + if ($chars[$j + 1] === '*') { + $pattern .= preg_quote($chars[$j + 1], '/'); + ++$j; + } elseif ($chars[$j + 1] === '?') { + $pattern .= preg_quote($chars[$j + 1], '/'); + ++$j; + } + } else { + $pattern .= preg_quote($chars[$j], '/'); + } + } elseif ($chars[$j] === '*') { + $pattern .= '.*'; + } elseif ($chars[$j] === '?') { + $pattern .= '.{1}'; + } else { + $pattern .= preg_quote($chars[$j], '/'); + } + } + + $pattern .= '$/'; + if ((bool) preg_match($pattern, $lookupArrayValue)) { + // exact match + return $i + 1; + } + } elseif ($exactMatch) { + // exact match + return $i + 1; + } + } elseif (($matchType === 1) && $typeMatch && ($lookupArrayValue <= $lookupValue)) { + $i = array_search($i, $keySet); + + // The current value is the (first) match + return $i + 1; + } + } + } else { + $maxValueKey = null; + + // The basic algorithm is: + // Iterate and keep the highest match until the next element is smaller than the searched value. + // Return immediately if perfect match is found + foreach ($lookupArray as $i => $lookupArrayValue) { + $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue); + $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue; + $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue; + $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch; + + if ($exactMatch) { + // Another "special" case. If a perfect match is found, + // the algorithm gives up immediately + return $i + 1; + } elseif ($typeMatch & $lookupArrayValue >= $lookupValue) { + $maxValueKey = $i + 1; + } elseif ($typeMatch & $lookupArrayValue < $lookupValue) { + //Excel algorithm gives up immediately if the first element is smaller than the searched value + break; + } + } + + if ($maxValueKey !== null) { + return $maxValueKey; + } + } + + // Unsuccessful in finding a match, return #N/A error value + return Functions::NA(); + } + + /** + * INDEX. + * + * Uses an index to choose a value from a reference or array + * + * Excel Function: + * =INDEX(range_array, row_num, [column_num]) + * + * @param mixed $arrayValues A range of cells or an array constant + * @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required. + * @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required. + * + * @return mixed the value of a specified cell or array of cells + */ + public static function INDEX($arrayValues, $rowNum = 0, $columnNum = 0) + { + $rowNum = Functions::flattenSingleValue($rowNum); + $columnNum = Functions::flattenSingleValue($columnNum); + + if (($rowNum < 0) || ($columnNum < 0)) { + return Functions::VALUE(); + } + + if (!is_array($arrayValues) || ($rowNum > count($arrayValues))) { + return Functions::REF(); + } + + $rowKeys = array_keys($arrayValues); + $columnKeys = @array_keys($arrayValues[$rowKeys[0]]); + + if ($columnNum > count($columnKeys)) { + return Functions::VALUE(); + } elseif ($columnNum == 0) { + if ($rowNum == 0) { + return $arrayValues; + } + $rowNum = $rowKeys[--$rowNum]; + $returnArray = []; + foreach ($arrayValues as $arrayColumn) { + if (is_array($arrayColumn)) { + if (isset($arrayColumn[$rowNum])) { + $returnArray[] = $arrayColumn[$rowNum]; + } else { + return [$rowNum => $arrayValues[$rowNum]]; + } + } else { + return $arrayValues[$rowNum]; + } + } + + return $returnArray; + } + $columnNum = $columnKeys[--$columnNum]; + if ($rowNum > count($rowKeys)) { + return Functions::VALUE(); + } elseif ($rowNum == 0) { + return $arrayValues[$columnNum]; + } + $rowNum = $rowKeys[--$rowNum]; + + return $arrayValues[$rowNum][$columnNum]; + } + + /** + * TRANSPOSE. + * + * @param array $matrixData A matrix of values + * + * @return array + * + * Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix + */ + public static function TRANSPOSE($matrixData) + { + $returnMatrix = []; + if (!is_array($matrixData)) { + $matrixData = [[$matrixData]]; + } + + $column = 0; + foreach ($matrixData as $matrixRow) { + $row = 0; + foreach ($matrixRow as $matrixCell) { + $returnMatrix[$row][$column] = $matrixCell; + ++$row; + } + ++$column; + } + + return $returnMatrix; + } + + private static function vlookupSort($a, $b) + { + reset($a); + $firstColumn = key($a); + $aLower = StringHelper::strToLower($a[$firstColumn]); + $bLower = StringHelper::strToLower($b[$firstColumn]); + if ($aLower == $bLower) { + return 0; + } + + return ($aLower < $bLower) ? -1 : 1; + } + + /** + * VLOOKUP + * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value + * + * @return mixed The value of the found cell + */ + public static function VLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + $index_number = Functions::flattenSingleValue($index_number); + $not_exact_match = Functions::flattenSingleValue($not_exact_match); + + // index_number must be greater than or equal to 1 + if ($index_number < 1) { + return Functions::VALUE(); + } + + // index_number must be less than or equal to the number of columns in lookup_array + if ((!is_array($lookup_array)) || (empty($lookup_array))) { + return Functions::REF(); + } + $f = array_keys($lookup_array); + $firstRow = array_pop($f); + if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) { + return Functions::REF(); + } + $columnKeys = array_keys($lookup_array[$firstRow]); + $returnColumn = $columnKeys[--$index_number]; + $firstColumn = array_shift($columnKeys); + + if (!$not_exact_match) { + uasort($lookup_array, ['self', 'vlookupSort']); + } + + $lookupLower = StringHelper::strToLower($lookup_value); + $rowNumber = $rowValue = false; + foreach ($lookup_array as $rowKey => $rowData) { + $firstLower = StringHelper::strToLower($rowData[$firstColumn]); + + // break if we have passed possible keys + if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) || + (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && ($firstLower > $lookupLower))) { + break; + } + // remember the last key, but only if datatypes match + if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn])) || + (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]))) { + if ($not_exact_match) { + $rowNumber = $rowKey; + + continue; + } elseif (($firstLower == $lookupLower) + // Spreadsheets software returns first exact match, + // we have sorted and we might have broken key orders + // we want the first one (by its initial index) + && (($rowNumber == false) || ($rowKey < $rowNumber)) + ) { + $rowNumber = $rowKey; + } + } + } + + if ($rowNumber !== false) { + // return the appropriate value + return $lookup_array[$rowNumber][$returnColumn]; + } + + return Functions::NA(); + } + + /** + * HLOOKUP + * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value + * + * @return mixed The value of the found cell + */ + public static function HLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + $index_number = Functions::flattenSingleValue($index_number); + $not_exact_match = Functions::flattenSingleValue($not_exact_match); + + // index_number must be greater than or equal to 1 + if ($index_number < 1) { + return Functions::VALUE(); + } + + // index_number must be less than or equal to the number of columns in lookup_array + if ((!is_array($lookup_array)) || (empty($lookup_array))) { + return Functions::REF(); + } + $f = array_keys($lookup_array); + $firstRow = reset($f); + if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array))) { + return Functions::REF(); + } + + $firstkey = $f[0] - 1; + $returnColumn = $firstkey + $index_number; + $firstColumn = array_shift($f); + $rowNumber = null; + foreach ($lookup_array[$firstColumn] as $rowKey => $rowData) { + // break if we have passed possible keys + $bothNumeric = is_numeric($lookup_value) && is_numeric($rowData); + $bothNotNumeric = !is_numeric($lookup_value) && !is_numeric($rowData); + $lookupLower = StringHelper::strToLower($lookup_value); + $rowDataLower = StringHelper::strToLower($rowData); + + if ($not_exact_match && ( + ($bothNumeric && $rowData > $lookup_value) || + ($bothNotNumeric && $rowDataLower > $lookupLower) + )) { + break; + } + + // Remember the last key, but only if datatypes match (as in VLOOKUP) + if ($bothNumeric || $bothNotNumeric) { + if ($not_exact_match) { + $rowNumber = $rowKey; + + continue; + } elseif ($rowDataLower === $lookupLower + && ($rowNumber === null || $rowKey < $rowNumber) + ) { + $rowNumber = $rowKey; + } + } + } + + if ($rowNumber !== null) { + // otherwise return the appropriate value + return $lookup_array[$returnColumn][$rowNumber]; + } + + return Functions::NA(); + } + + /** + * LOOKUP + * The LOOKUP function searches for value either from a one-row or one-column range or from an array. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_vector The range of cells being searched + * @param null|mixed $result_vector The column from which the matching value must be returned + * + * @return mixed The value of the found cell + */ + public static function LOOKUP($lookup_value, $lookup_vector, $result_vector = null) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + + if (!is_array($lookup_vector)) { + return Functions::NA(); + } + $hasResultVector = isset($result_vector); + $lookupRows = count($lookup_vector); + $l = array_keys($lookup_vector); + $l = array_shift($l); + $lookupColumns = count($lookup_vector[$l]); + // we correctly orient our results + if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) { + $lookup_vector = self::TRANSPOSE($lookup_vector); + $lookupRows = count($lookup_vector); + $l = array_keys($lookup_vector); + $lookupColumns = count($lookup_vector[array_shift($l)]); + } + + if ($result_vector === null) { + $result_vector = $lookup_vector; + } + $resultRows = count($result_vector); + $l = array_keys($result_vector); + $l = array_shift($l); + $resultColumns = count($result_vector[$l]); + // we correctly orient our results + if ($resultRows === 1 && $resultColumns > 1) { + $result_vector = self::TRANSPOSE($result_vector); + $resultRows = count($result_vector); + $r = array_keys($result_vector); + $resultColumns = count($result_vector[array_shift($r)]); + } + + if ($lookupRows === 2 && !$hasResultVector) { + $result_vector = array_pop($lookup_vector); + $lookup_vector = array_shift($lookup_vector); + } + + if ($lookupColumns !== 2) { + foreach ($lookup_vector as &$value) { + if (is_array($value)) { + $k = array_keys($value); + $key1 = $key2 = array_shift($k); + ++$key2; + $dataValue1 = $value[$key1]; + } else { + $key1 = 0; + $key2 = 1; + $dataValue1 = $value; + } + $dataValue2 = array_shift($result_vector); + if (is_array($dataValue2)) { + $dataValue2 = array_shift($dataValue2); + } + $value = [$key1 => $dataValue1, $key2 => $dataValue2]; + } + unset($value); + } + + return self::VLOOKUP($lookup_value, $lookup_vector, 2); + } + + /** + * FORMULATEXT. + * + * @param mixed $cellReference The cell to check + * @param Cell $pCell The current cell (containing this formula) + * + * @return string + */ + public static function FORMULATEXT($cellReference = '', ?Cell $pCell = null) + { + if ($pCell === null) { + return Functions::REF(); + } + + preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches); + + $cellReference = $matches[6] . $matches[7]; + $worksheetName = trim($matches[3], "'"); + $worksheet = (!empty($worksheetName)) + ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName) + : $pCell->getWorksheet(); + + if (!$worksheet->getCell($cellReference)->isFormula()) { + return Functions::NA(); + } + + return $worksheet->getCell($cellReference)->getValue(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/MathTrig.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/MathTrig.php new file mode 100755 index 0000000..85f94cc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/MathTrig.php @@ -0,0 +1,1798 @@ + 1; --$i) { + if (($value % $i) == 0) { + $factorArray = array_merge($factorArray, self::factors($value / $i)); + $factorArray = array_merge($factorArray, self::factors($i)); + if ($i <= sqrt($value)) { + break; + } + } + } + if (!empty($factorArray)) { + rsort($factorArray); + + return $factorArray; + } + + return [(int) $value]; + } + + private static function romanCut($num, $n) + { + return ($num - ($num % $n)) / $n; + } + + /** + * ARABIC. + * + * Converts a Roman numeral to an Arabic numeral. + * + * Excel Function: + * ARABIC(text) + * + * @param string $roman + * + * @return int|string the arabic numberal contrived from the roman numeral + */ + public static function ARABIC($roman) + { + // An empty string should return 0 + $roman = substr(trim(strtoupper((string) Functions::flattenSingleValue($roman))), 0, 255); + if ($roman === '') { + return 0; + } + + // Convert the roman numeral to an arabic number + $negativeNumber = $roman[0] === '-'; + if ($negativeNumber) { + $roman = substr($roman, 1); + } + + try { + $arabic = self::calculateArabic(str_split($roman)); + } catch (Exception $e) { + return Functions::VALUE(); // Invalid character detected + } + + if ($negativeNumber) { + $arabic *= -1; // The number should be negative + } + + return $arabic; + } + + /** + * Recursively calculate the arabic value of a roman numeral. + * + * @param int $sum + * @param int $subtract + * + * @return int + */ + protected static function calculateArabic(array $roman, &$sum = 0, $subtract = 0) + { + $lookup = [ + 'M' => 1000, + 'D' => 500, + 'C' => 100, + 'L' => 50, + 'X' => 10, + 'V' => 5, + 'I' => 1, + ]; + + $numeral = array_shift($roman); + if (!isset($lookup[$numeral])) { + throw new Exception('Invalid character detected'); + } + + $arabic = $lookup[$numeral]; + if (count($roman) > 0 && isset($lookup[$roman[0]]) && $arabic < $lookup[$roman[0]]) { + $subtract += $arabic; + } else { + $sum += ($arabic - $subtract); + $subtract = 0; + } + + if (count($roman) > 0) { + self::calculateArabic($roman, $sum, $subtract); + } + + return $sum; + } + + /** + * ATAN2. + * + * This function calculates the arc tangent of the two variables x and y. It is similar to + * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used + * to determine the quadrant of the result. + * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a + * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between + * -pi and pi, excluding -pi. + * + * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard + * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function. + * + * Excel Function: + * ATAN2(xCoordinate,yCoordinate) + * + * @param float $xCoordinate the x-coordinate of the point + * @param float $yCoordinate the y-coordinate of the point + * + * @return float|string the inverse tangent of the specified x- and y-coordinates, or a string containing an error + */ + public static function ATAN2($xCoordinate = null, $yCoordinate = null) + { + $xCoordinate = Functions::flattenSingleValue($xCoordinate); + $yCoordinate = Functions::flattenSingleValue($yCoordinate); + + $xCoordinate = ($xCoordinate !== null) ? $xCoordinate : 0.0; + $yCoordinate = ($yCoordinate !== null) ? $yCoordinate : 0.0; + + if (((is_numeric($xCoordinate)) || (is_bool($xCoordinate))) && + ((is_numeric($yCoordinate))) || (is_bool($yCoordinate))) { + $xCoordinate = (float) $xCoordinate; + $yCoordinate = (float) $yCoordinate; + + if (($xCoordinate == 0) && ($yCoordinate == 0)) { + return Functions::DIV0(); + } + + return atan2($yCoordinate, $xCoordinate); + } + + return Functions::VALUE(); + } + + /** + * BASE. + * + * Converts a number into a text representation with the given radix (base). + * + * Excel Function: + * BASE(Number, Radix [Min_length]) + * + * @param float $number + * @param float $radix + * @param int $minLength + * + * @return string the text representation with the given radix (base) + */ + public static function BASE($number, $radix, $minLength = null) + { + $number = Functions::flattenSingleValue($number); + $radix = Functions::flattenSingleValue($radix); + $minLength = Functions::flattenSingleValue($minLength); + + if (is_numeric($number) && is_numeric($radix) && ($minLength === null || is_numeric($minLength))) { + // Truncate to an integer + $number = (int) $number; + $radix = (int) $radix; + $minLength = (int) $minLength; + + if ($number < 0 || $number >= 2 ** 53 || $radix < 2 || $radix > 36) { + return Functions::NAN(); // Numeric range constraints + } + + $outcome = strtoupper((string) base_convert($number, 10, $radix)); + if ($minLength !== null) { + $outcome = str_pad($outcome, $minLength, '0', STR_PAD_LEFT); // String padding + } + + return $outcome; + } + + return Functions::VALUE(); + } + + /** + * CEILING. + * + * Returns number rounded up, away from zero, to the nearest multiple of significance. + * For example, if you want to avoid using pennies in your prices and your product is + * priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the + * nearest nickel. + * + * Excel Function: + * CEILING(number[,significance]) + * + * @param float $number the number you want to round + * @param float $significance the multiple to which you want to round + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function CEILING($number, $significance = null) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + + if (($significance === null) && + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)) { + $significance = $number / abs($number); + } + + if ((is_numeric($number)) && (is_numeric($significance))) { + if (($number == 0.0) || ($significance == 0.0)) { + return 0.0; + } elseif (self::SIGN($number) == self::SIGN($significance)) { + return ceil($number / $significance) * $significance; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + /** + * COMBIN. + * + * Returns the number of combinations for a given number of items. Use COMBIN to + * determine the total possible number of groups for a given number of items. + * + * Excel Function: + * COMBIN(numObjs,numInSet) + * + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each combination + * + * @return int|string Number of combinations, or a string containing an error + */ + public static function COMBIN($numObjs, $numInSet) + { + $numObjs = Functions::flattenSingleValue($numObjs); + $numInSet = Functions::flattenSingleValue($numInSet); + + if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { + if ($numObjs < $numInSet) { + return Functions::NAN(); + } elseif ($numInSet < 0) { + return Functions::NAN(); + } + + return round(self::FACT($numObjs) / self::FACT($numObjs - $numInSet)) / self::FACT($numInSet); + } + + return Functions::VALUE(); + } + + /** + * EVEN. + * + * Returns number rounded up to the nearest even integer. + * You can use this function for processing items that come in twos. For example, + * a packing crate accepts rows of one or two items. The crate is full when + * the number of items, rounded up to the nearest two, matches the crate's + * capacity. + * + * Excel Function: + * EVEN(number) + * + * @param float $number Number to round + * + * @return int|string Rounded Number, or a string containing an error + */ + public static function EVEN($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 0; + } elseif (is_bool($number)) { + $number = (int) $number; + } + + if (is_numeric($number)) { + $significance = 2 * self::SIGN($number); + + return (int) self::CEILING($number, $significance); + } + + return Functions::VALUE(); + } + + /** + * FACT. + * + * Returns the factorial of a number. + * The factorial of a number is equal to 1*2*3*...* number. + * + * Excel Function: + * FACT(factVal) + * + * @param float $factVal Factorial Value + * + * @return int|string Factorial, or a string containing an error + */ + public static function FACT($factVal) + { + $factVal = Functions::flattenSingleValue($factVal); + + if (is_numeric($factVal)) { + if ($factVal < 0) { + return Functions::NAN(); + } + $factLoop = floor($factVal); + if ((Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) && + ($factVal > $factLoop)) { + return Functions::NAN(); + } + + $factorial = 1; + while ($factLoop > 1) { + $factorial *= $factLoop--; + } + + return $factorial; + } + + return Functions::VALUE(); + } + + /** + * FACTDOUBLE. + * + * Returns the double factorial of a number. + * + * Excel Function: + * FACTDOUBLE(factVal) + * + * @param float $factVal Factorial Value + * + * @return int|string Double Factorial, or a string containing an error + */ + public static function FACTDOUBLE($factVal) + { + $factLoop = Functions::flattenSingleValue($factVal); + + if (is_numeric($factLoop)) { + $factLoop = floor($factLoop); + if ($factVal < 0) { + return Functions::NAN(); + } + $factorial = 1; + while ($factLoop > 1) { + $factorial *= $factLoop--; + --$factLoop; + } + + return $factorial; + } + + return Functions::VALUE(); + } + + /** + * FLOOR. + * + * Rounds number down, toward zero, to the nearest multiple of significance. + * + * Excel Function: + * FLOOR(number[,significance]) + * + * @param float $number Number to round + * @param float $significance Significance + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function FLOOR($number, $significance = null) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + + if (($significance === null) && + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)) { + $significance = $number / abs($number); + } + + if ((is_numeric($number)) && (is_numeric($significance))) { + if ($significance == 0.0) { + return Functions::DIV0(); + } elseif ($number == 0.0) { + return 0.0; + } elseif (self::SIGN($significance) == 1) { + return floor($number / $significance) * $significance; + } elseif (self::SIGN($number) == -1 && self::SIGN($significance) == -1) { + return floor($number / $significance) * $significance; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + /** + * FLOOR.MATH. + * + * Round a number down to the nearest integer or to the nearest multiple of significance. + * + * Excel Function: + * FLOOR.MATH(number[,significance[,mode]]) + * + * @param float $number Number to round + * @param float $significance Significance + * @param int $mode direction to round negative numbers + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function FLOORMATH($number, $significance = null, $mode = 0) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + $mode = Functions::flattenSingleValue($mode); + + if (is_numeric($number) && $significance === null) { + $significance = $number / abs($number); + } + + if (is_numeric($number) && is_numeric($significance) && is_numeric($mode)) { + if ($significance == 0.0) { + return Functions::DIV0(); + } elseif ($number == 0.0) { + return 0.0; + } elseif (self::SIGN($significance) == -1 || (self::SIGN($number) == -1 && !empty($mode))) { + return ceil($number / $significance) * $significance; + } + + return floor($number / $significance) * $significance; + } + + return Functions::VALUE(); + } + + /** + * FLOOR.PRECISE. + * + * Rounds number down, toward zero, to the nearest multiple of significance. + * + * Excel Function: + * FLOOR.PRECISE(number[,significance]) + * + * @param float $number Number to round + * @param float $significance Significance + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function FLOORPRECISE($number, $significance = 1) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + + if ((is_numeric($number)) && (is_numeric($significance))) { + if ($significance == 0.0) { + return Functions::DIV0(); + } elseif ($number == 0.0) { + return 0.0; + } + + return floor($number / abs($significance)) * abs($significance); + } + + return Functions::VALUE(); + } + + private static function evaluateGCD($a, $b) + { + return $b ? self::evaluateGCD($b, $a % $b) : $a; + } + + /** + * GCD. + * + * Returns the greatest common divisor of a series of numbers. + * The greatest common divisor is the largest integer that divides both + * number1 and number2 without a remainder. + * + * Excel Function: + * GCD(number1[,number2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return int|mixed|string Greatest Common Divisor, or a string containing an error + */ + public static function GCD(...$args) + { + $args = Functions::flattenArray($args); + // Loop through arguments + foreach (Functions::flattenArray($args) as $value) { + if (!is_numeric($value)) { + return Functions::VALUE(); + } elseif ($value < 0) { + return Functions::NAN(); + } + } + + $gcd = (int) array_pop($args); + do { + $gcd = self::evaluateGCD($gcd, (int) array_pop($args)); + } while (!empty($args)); + + return $gcd; + } + + /** + * INT. + * + * Casts a floating point value to an integer + * + * Excel Function: + * INT(number) + * + * @param float $number Number to cast to an integer + * + * @return int|string Integer value, or a string containing an error + */ + public static function INT($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 0; + } elseif (is_bool($number)) { + return (int) $number; + } + if (is_numeric($number)) { + return (int) floor($number); + } + + return Functions::VALUE(); + } + + /** + * LCM. + * + * Returns the lowest common multiplier of a series of numbers + * The least common multiple is the smallest positive integer that is a multiple + * of all integer arguments number1, number2, and so on. Use LCM to add fractions + * with different denominators. + * + * Excel Function: + * LCM(number1[,number2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return int|string Lowest Common Multiplier, or a string containing an error + */ + public static function LCM(...$args) + { + $returnValue = 1; + $allPoweredFactors = []; + // Loop through arguments + foreach (Functions::flattenArray($args) as $value) { + if (!is_numeric($value)) { + return Functions::VALUE(); + } + if ($value == 0) { + return 0; + } elseif ($value < 0) { + return Functions::NAN(); + } + $myFactors = self::factors(floor($value)); + $myCountedFactors = array_count_values($myFactors); + $myPoweredFactors = []; + foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) { + $myPoweredFactors[$myCountedFactor] = $myCountedFactor ** $myCountedPower; + } + foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) { + if (isset($allPoweredFactors[$myPoweredValue])) { + if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) { + $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; + } + } else { + $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; + } + } + } + foreach ($allPoweredFactors as $allPoweredFactor) { + $returnValue *= (int) $allPoweredFactor; + } + + return $returnValue; + } + + /** + * LOG_BASE. + * + * Returns the logarithm of a number to a specified base. The default base is 10. + * + * Excel Function: + * LOG(number[,base]) + * + * @param float $number The positive real number for which you want the logarithm + * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. + * + * @return float|string The result, or a string containing an error + */ + public static function logBase($number = null, $base = 10) + { + $number = Functions::flattenSingleValue($number); + $base = ($base === null) ? 10 : (float) Functions::flattenSingleValue($base); + + if ((!is_numeric($base)) || (!is_numeric($number))) { + return Functions::VALUE(); + } + if (($base <= 0) || ($number <= 0)) { + return Functions::NAN(); + } + + return log($number, $base); + } + + /** + * MDETERM. + * + * Returns the matrix determinant of an array. + * + * Excel Function: + * MDETERM(array) + * + * @param array $matrixValues A matrix of values + * + * @return float|string The result, or a string containing an error + */ + public static function MDETERM($matrixValues) + { + $matrixData = []; + if (!is_array($matrixValues)) { + $matrixValues = [[$matrixValues]]; + } + + $row = $maxColumn = 0; + foreach ($matrixValues as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $column = 0; + foreach ($matrixRow as $matrixCell) { + if ((is_string($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixData[$row][$column] = $matrixCell; + ++$column; + } + if ($column > $maxColumn) { + $maxColumn = $column; + } + ++$row; + } + + $matrix = new Matrix($matrixData); + if (!$matrix->isSquare()) { + return Functions::VALUE(); + } + + try { + return $matrix->determinant(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MINVERSE. + * + * Returns the inverse matrix for the matrix stored in an array. + * + * Excel Function: + * MINVERSE(array) + * + * @param array $matrixValues A matrix of values + * + * @return array|string The result, or a string containing an error + */ + public static function MINVERSE($matrixValues) + { + $matrixData = []; + if (!is_array($matrixValues)) { + $matrixValues = [[$matrixValues]]; + } + + $row = $maxColumn = 0; + foreach ($matrixValues as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $column = 0; + foreach ($matrixRow as $matrixCell) { + if ((is_string($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixData[$row][$column] = $matrixCell; + ++$column; + } + if ($column > $maxColumn) { + $maxColumn = $column; + } + ++$row; + } + + $matrix = new Matrix($matrixData); + if (!$matrix->isSquare()) { + return Functions::VALUE(); + } + + if ($matrix->determinant() == 0.0) { + return Functions::NAN(); + } + + try { + return $matrix->inverse()->toArray(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MMULT. + * + * @param array $matrixData1 A matrix of values + * @param array $matrixData2 A matrix of values + * + * @return array|string The result, or a string containing an error + */ + public static function MMULT($matrixData1, $matrixData2) + { + $matrixAData = $matrixBData = []; + if (!is_array($matrixData1)) { + $matrixData1 = [[$matrixData1]]; + } + if (!is_array($matrixData2)) { + $matrixData2 = [[$matrixData2]]; + } + + try { + $rowA = 0; + foreach ($matrixData1 as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $columnA = 0; + foreach ($matrixRow as $matrixCell) { + if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixAData[$rowA][$columnA] = $matrixCell; + ++$columnA; + } + ++$rowA; + } + $matrixA = new Matrix($matrixAData); + $rowB = 0; + foreach ($matrixData2 as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $columnB = 0; + foreach ($matrixRow as $matrixCell) { + if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixBData[$rowB][$columnB] = $matrixCell; + ++$columnB; + } + ++$rowB; + } + $matrixB = new Matrix($matrixBData); + + if ($columnA != $rowB) { + return Functions::VALUE(); + } + + return $matrixA->multiply($matrixB)->toArray(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MOD. + * + * @param int $a Dividend + * @param int $b Divisor + * + * @return int|string Remainder, or a string containing an error + */ + public static function MOD($a = 1, $b = 1) + { + $a = (float) Functions::flattenSingleValue($a); + $b = (float) Functions::flattenSingleValue($b); + + if ($b == 0.0) { + return Functions::DIV0(); + } elseif (($a < 0.0) && ($b > 0.0)) { + return $b - fmod(abs($a), $b); + } elseif (($a > 0.0) && ($b < 0.0)) { + return $b + fmod($a, abs($b)); + } + + return fmod($a, $b); + } + + /** + * MROUND. + * + * Rounds a number to the nearest multiple of a specified value + * + * @param float $number Number to round + * @param int $multiple Multiple to which you want to round $number + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function MROUND($number, $multiple) + { + $number = Functions::flattenSingleValue($number); + $multiple = Functions::flattenSingleValue($multiple); + + if ((is_numeric($number)) && (is_numeric($multiple))) { + if ($multiple == 0) { + return 0; + } + if ((self::SIGN($number)) == (self::SIGN($multiple))) { + $multiplier = 1 / $multiple; + + return round($number * $multiplier) / $multiplier; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + /** + * MULTINOMIAL. + * + * Returns the ratio of the factorial of a sum of values to the product of factorials. + * + * @param array of mixed Data Series + * + * @return float|string The result, or a string containing an error + */ + public static function MULTINOMIAL(...$args) + { + $summer = 0; + $divisor = 1; + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if (is_numeric($arg)) { + if ($arg < 1) { + return Functions::NAN(); + } + $summer += floor($arg); + $divisor *= self::FACT($arg); + } else { + return Functions::VALUE(); + } + } + + // Return + if ($summer > 0) { + $summer = self::FACT($summer); + + return $summer / $divisor; + } + + return 0; + } + + /** + * ODD. + * + * Returns number rounded up to the nearest odd integer. + * + * @param float $number Number to round + * + * @return int|string Rounded Number, or a string containing an error + */ + public static function ODD($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 1; + } elseif (is_bool($number)) { + return 1; + } elseif (is_numeric($number)) { + $significance = self::SIGN($number); + if ($significance == 0) { + return 1; + } + + $result = self::CEILING($number, $significance); + if ($result == self::EVEN($result)) { + $result += $significance; + } + + return (int) $result; + } + + return Functions::VALUE(); + } + + /** + * POWER. + * + * Computes x raised to the power y. + * + * @param float $x + * @param float $y + * + * @return float|string The result, or a string containing an error + */ + public static function POWER($x = 0, $y = 2) + { + $x = Functions::flattenSingleValue($x); + $y = Functions::flattenSingleValue($y); + + // Validate parameters + if ($x == 0.0 && $y == 0.0) { + return Functions::NAN(); + } elseif ($x == 0.0 && $y < 0.0) { + return Functions::DIV0(); + } + + // Return + $result = $x ** $y; + + return (!is_nan($result) && !is_infinite($result)) ? $result : Functions::NAN(); + } + + /** + * PRODUCT. + * + * PRODUCT returns the product of all the values and cells referenced in the argument list. + * + * Excel Function: + * PRODUCT(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function PRODUCT(...$args) + { + // Return value + $returnValue = null; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = $arg; + } else { + $returnValue *= $arg; + } + } + } + + // Return + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * QUOTIENT. + * + * QUOTIENT function returns the integer portion of a division. Numerator is the divided number + * and denominator is the divisor. + * + * Excel Function: + * QUOTIENT(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function QUOTIENT(...$args) + { + // Return value + $returnValue = null; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = ($arg == 0) ? 0 : $arg; + } else { + if (($returnValue == 0) || ($arg == 0)) { + $returnValue = 0; + } else { + $returnValue /= $arg; + } + } + } + } + + // Return + return (int) $returnValue; + } + + /** + * RAND. + * + * @param int $min Minimal value + * @param int $max Maximal value + * + * @return int Random number + */ + public static function RAND($min = 0, $max = 0) + { + $min = Functions::flattenSingleValue($min); + $max = Functions::flattenSingleValue($max); + + if ($min == 0 && $max == 0) { + return (mt_rand(0, 10000000)) / 10000000; + } + + return mt_rand($min, $max); + } + + public static function ROMAN($aValue, $style = 0) + { + $aValue = Functions::flattenSingleValue($aValue); + $style = ($style === null) ? 0 : (int) Functions::flattenSingleValue($style); + if ((!is_numeric($aValue)) || ($aValue < 0) || ($aValue >= 4000)) { + return Functions::VALUE(); + } + $aValue = (int) $aValue; + if ($aValue == 0) { + return ''; + } + + $mill = ['', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM']; + $cent = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM']; + $tens = ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC']; + $ones = ['', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; + + $roman = ''; + while ($aValue > 5999) { + $roman .= 'M'; + $aValue -= 1000; + } + $m = self::romanCut($aValue, 1000); + $aValue %= 1000; + $c = self::romanCut($aValue, 100); + $aValue %= 100; + $t = self::romanCut($aValue, 10); + $aValue %= 10; + + return $roman . $mill[$m] . $cent[$c] . $tens[$t] . $ones[$aValue]; + } + + /** + * ROUNDUP. + * + * Rounds a number up to a specified number of decimal places + * + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function ROUNDUP($number, $digits) + { + $number = Functions::flattenSingleValue($number); + $digits = Functions::flattenSingleValue($digits); + + if ((is_numeric($number)) && (is_numeric($digits))) { + if ($number < 0.0) { + return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN); + } + + return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN); + } + + return Functions::VALUE(); + } + + /** + * ROUNDDOWN. + * + * Rounds a number down to a specified number of decimal places + * + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * + * @return float|string Rounded Number, or a string containing an error + */ + public static function ROUNDDOWN($number, $digits) + { + $number = Functions::flattenSingleValue($number); + $digits = Functions::flattenSingleValue($digits); + + if ((is_numeric($number)) && (is_numeric($digits))) { + if ($number < 0.0) { + return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP); + } + + return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP); + } + + return Functions::VALUE(); + } + + /** + * SERIESSUM. + * + * Returns the sum of a power series + * + * @param array of mixed Data Series + * + * @return float|string The result, or a string containing an error + */ + public static function SERIESSUM(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + $x = array_shift($aArgs); + $n = array_shift($aArgs); + $m = array_shift($aArgs); + + if ((is_numeric($x)) && (is_numeric($n)) && (is_numeric($m))) { + // Calculate + $i = 0; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += $arg * $x ** ($n + ($m * $i++)); + } else { + return Functions::VALUE(); + } + } + + return $returnValue; + } + + return Functions::VALUE(); + } + + /** + * SIGN. + * + * Determines the sign of a number. Returns 1 if the number is positive, zero (0) + * if the number is 0, and -1 if the number is negative. + * + * @param float $number Number to round + * + * @return int|string sign value, or a string containing an error + */ + public static function SIGN($number) + { + $number = Functions::flattenSingleValue($number); + + if (is_bool($number)) { + return (int) $number; + } + if (is_numeric($number)) { + if ($number == 0.0) { + return 0; + } + + return $number / abs($number); + } + + return Functions::VALUE(); + } + + /** + * SQRTPI. + * + * Returns the square root of (number * pi). + * + * @param float $number Number + * + * @return float|string Square Root of Number * Pi, or a string containing an error + */ + public static function SQRTPI($number) + { + $number = Functions::flattenSingleValue($number); + + if (is_numeric($number)) { + if ($number < 0) { + return Functions::NAN(); + } + + return sqrt($number * M_PI); + } + + return Functions::VALUE(); + } + + protected static function filterHiddenArgs($cellReference, $args) + { + return array_filter( + $args, + function ($index) use ($cellReference) { + [, $row, $column] = explode('.', $index); + + return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() && + $cellReference->getWorksheet()->getColumnDimension($column)->getVisible(); + }, + ARRAY_FILTER_USE_KEY + ); + } + + protected static function filterFormulaArgs($cellReference, $args) + { + return array_filter( + $args, + function ($index) use ($cellReference) { + [, $row, $column] = explode('.', $index); + if ($cellReference->getWorksheet()->cellExists($column . $row)) { + //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula + $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula(); + $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue()); + + return !$isFormula || $cellFormula; + } + + return true; + }, + ARRAY_FILTER_USE_KEY + ); + } + + /** + * SUBTOTAL. + * + * Returns a subtotal in a list or database. + * + * @param int the number 1 to 11 that specifies which function to + * use in calculating subtotals within a range + * list + * Numbers 101 to 111 shadow the functions of 1 to 11 + * but ignore any values in the range that are + * in hidden rows or columns + * @param array of mixed Data Series + * + * @return float|string + */ + public static function SUBTOTAL(...$args) + { + $cellReference = array_pop($args); + $aArgs = Functions::flattenArrayIndexed($args); + $subtotal = array_shift($aArgs); + + // Calculate + if ((is_numeric($subtotal)) && (!is_string($subtotal))) { + if ($subtotal > 100) { + $aArgs = self::filterHiddenArgs($cellReference, $aArgs); + $subtotal -= 100; + } + + $aArgs = self::filterFormulaArgs($cellReference, $aArgs); + switch ($subtotal) { + case 1: + return Statistical::AVERAGE($aArgs); + case 2: + return Statistical::COUNT($aArgs); + case 3: + return Statistical::COUNTA($aArgs); + case 4: + return Statistical::MAX($aArgs); + case 5: + return Statistical::MIN($aArgs); + case 6: + return self::PRODUCT($aArgs); + case 7: + return Statistical::STDEV($aArgs); + case 8: + return Statistical::STDEVP($aArgs); + case 9: + return self::SUM($aArgs); + case 10: + return Statistical::VARFunc($aArgs); + case 11: + return Statistical::VARP($aArgs); + } + } + + return Functions::VALUE(); + } + + /** + * SUM. + * + * SUM computes the sum of all the values and cells referenced in the argument list. + * + * Excel Function: + * SUM(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function SUM(...$args) + { + $returnValue = 0; + + // Loop through the arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += $arg; + } elseif (Functions::isError($arg)) { + return $arg; + } + } + + return $returnValue; + } + + /** + * SUMIF. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * SUMIF(value1[,value2[, ...]],condition) + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be summed + * @param mixed $sumArgs + * + * @return float + */ + public static function SUMIF($aArgs, $condition, $sumArgs = []) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $sumArgs = Functions::flattenArray($sumArgs); + if (empty($sumArgs)) { + $sumArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + // Loop through arguments + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + $arg = str_replace('"', '""', $arg); + $arg = Calculation::wrapResult(strtoupper($arg)); + } + + $testCondition = '=' . $arg . $condition; + $sumValue = array_key_exists($key, $sumArgs) ? $sumArgs[$key] : 0; + + if (is_numeric($sumValue) && + Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is it a value within our criteria and only numeric can be added to the result + $returnValue += $sumValue; + } + } + + return $returnValue; + } + + /** + * SUMIFS. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * SUMIFS(value1[,value2[, ...]],condition) + * + * @param mixed $args Data values + * + * @return float + */ + public static function SUMIFS(...$args) + { + $arrayList = $args; + + // Return value + $returnValue = 0; + + $sumArgs = Functions::flattenArray(array_shift($arrayList)); + $aArgsArray = []; + $conditions = []; + + while (count($arrayList) > 0) { + $aArgsArray[] = Functions::flattenArray(array_shift($arrayList)); + $conditions[] = Functions::ifCondition(array_shift($arrayList)); + } + + // Loop through each sum and see if arguments and conditions are true + foreach ($sumArgs as $index => $value) { + $valid = true; + + foreach ($conditions as $cidx => $condition) { + $arg = $aArgsArray[$cidx][$index]; + + // Loop through arguments + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is not a value within our criteria + $valid = false; + + break; // if false found, don't need to check other conditions + } + } + + if ($valid) { + $returnValue += $value; + } + } + + // Return + return $returnValue; + } + + /** + * SUMPRODUCT. + * + * Excel Function: + * SUMPRODUCT(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function SUMPRODUCT(...$args) + { + $arrayList = $args; + + $wrkArray = Functions::flattenArray(array_shift($arrayList)); + $wrkCellCount = count($wrkArray); + + for ($i = 0; $i < $wrkCellCount; ++$i) { + if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) { + $wrkArray[$i] = 0; + } + } + + foreach ($arrayList as $matrixData) { + $array2 = Functions::flattenArray($matrixData); + $count = count($array2); + if ($wrkCellCount != $count) { + return Functions::VALUE(); + } + + foreach ($array2 as $i => $val) { + if ((!is_numeric($val)) || (is_string($val))) { + $val = 0; + } + $wrkArray[$i] *= $val; + } + } + + return array_sum($wrkArray); + } + + /** + * SUMSQ. + * + * SUMSQ returns the sum of the squares of the arguments + * + * Excel Function: + * SUMSQ(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function SUMSQ(...$args) + { + $returnValue = 0; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += ($arg * $arg); + } + } + + return $returnValue; + } + + /** + * SUMX2MY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMX2MY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]); + } + } + + return $result; + } + + /** + * SUMX2PY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMX2PY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]); + } + } + + return $result; + } + + /** + * SUMXMY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMXMY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]); + } + } + + return $result; + } + + /** + * TRUNC. + * + * Truncates value to the number of fractional digits by number_digits. + * + * @param float $value + * @param int $digits + * + * @return float|string Truncated value, or a string containing an error + */ + public static function TRUNC($value = 0, $digits = 0) + { + $value = Functions::flattenSingleValue($value); + $digits = Functions::flattenSingleValue($digits); + + // Validate parameters + if ((!is_numeric($value)) || (!is_numeric($digits))) { + return Functions::VALUE(); + } + $digits = floor($digits); + + // Truncate + $adjust = 10 ** $digits; + + if (($digits > 0) && (rtrim((int) ((abs($value) - abs((int) $value)) * $adjust), '0') < $adjust / 10)) { + return $value; + } + + return ((int) ($value * $adjust)) / $adjust; + } + + /** + * SEC. + * + * Returns the secant of an angle. + * + * @param float $angle Number + * + * @return float|string The secant of the angle + */ + public static function SEC($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = cos($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * SECH. + * + * Returns the hyperbolic secant of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic secant of the angle + */ + public static function SECH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = cosh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * CSC. + * + * Returns the cosecant of an angle. + * + * @param float $angle Number + * + * @return float|string The cosecant of the angle + */ + public static function CSC($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = sin($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * CSCH. + * + * Returns the hyperbolic cosecant of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic cosecant of the angle + */ + public static function CSCH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = sinh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * COT. + * + * Returns the cotangent of an angle. + * + * @param float $angle Number + * + * @return float|string The cotangent of the angle + */ + public static function COT($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = tan($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * COTH. + * + * Returns the hyperbolic cotangent of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic cotangent of the angle + */ + public static function COTH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = tanh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * ACOT. + * + * Returns the arccotangent of a number. + * + * @param float $number Number + * + * @return float|string The arccotangent of the number + */ + public static function ACOT($number) + { + $number = Functions::flattenSingleValue($number); + + if (!is_numeric($number)) { + return Functions::VALUE(); + } + + return (M_PI / 2) - atan($number); + } + + /** + * ACOTH. + * + * Returns the hyperbolic arccotangent of a number. + * + * @param float $number Number + * + * @return float|string The hyperbolic arccotangent of the number + */ + public static function ACOTH($number) + { + $number = Functions::flattenSingleValue($number); + + if (!is_numeric($number)) { + return Functions::VALUE(); + } + + $result = log(($number + 1) / ($number - 1)) / 2; + + return is_nan($result) ? Functions::NAN() : $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Statistical.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Statistical.php new file mode 100755 index 0000000..100eb2f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Statistical.php @@ -0,0 +1,3713 @@ + $value) { + if ((is_bool($value)) || (is_string($value)) || ($value === null)) { + unset($array1[$key], $array2[$key]); + } + } + foreach ($array2 as $key => $value) { + if ((is_bool($value)) || (is_string($value)) || ($value === null)) { + unset($array1[$key], $array2[$key]); + } + } + $array1 = array_merge($array1); + $array2 = array_merge($array2); + + return true; + } + + /** + * Incomplete beta function. + * + * @author Jaco van Kooten + * @author Paul Meagher + * + * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992). + * + * @param mixed $x require 0<=x<=1 + * @param mixed $p require p>0 + * @param mixed $q require q>0 + * + * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow + */ + private static function incompleteBeta($x, $p, $q) + { + if ($x <= 0.0) { + return 0.0; + } elseif ($x >= 1.0) { + return 1.0; + } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) { + return 0.0; + } + $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x)); + if ($x < ($p + 1.0) / ($p + $q + 2.0)) { + return $beta_gam * self::betaFraction($x, $p, $q) / $p; + } + + return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q); + } + + // Function cache for logBeta function + private static $logBetaCacheP = 0.0; + + private static $logBetaCacheQ = 0.0; + + private static $logBetaCacheResult = 0.0; + + /** + * The natural logarithm of the beta function. + * + * @param mixed $p require p>0 + * @param mixed $q require q>0 + * + * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow + * + * @author Jaco van Kooten + */ + private static function logBeta($p, $q) + { + if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) { + self::$logBetaCacheP = $p; + self::$logBetaCacheQ = $q; + if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) { + self::$logBetaCacheResult = 0.0; + } else { + self::$logBetaCacheResult = self::logGamma($p) + self::logGamma($q) - self::logGamma($p + $q); + } + } + + return self::$logBetaCacheResult; + } + + /** + * Evaluates of continued fraction part of incomplete beta function. + * Based on an idea from Numerical Recipes (W.H. Press et al, 1992). + * + * @author Jaco van Kooten + * + * @param mixed $x + * @param mixed $p + * @param mixed $q + * + * @return float + */ + private static function betaFraction($x, $p, $q) + { + $c = 1.0; + $sum_pq = $p + $q; + $p_plus = $p + 1.0; + $p_minus = $p - 1.0; + $h = 1.0 - $sum_pq * $x / $p_plus; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $frac = $h; + $m = 1; + $delta = 0.0; + while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) { + $m2 = 2 * $m; + // even index for d + $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2)); + $h = 1.0 + $d * $h; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $c = 1.0 + $d / $c; + if (abs($c) < self::XMININ) { + $c = self::XMININ; + } + $frac *= $h * $c; + // odd index for d + $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2)); + $h = 1.0 + $d * $h; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $c = 1.0 + $d / $c; + if (abs($c) < self::XMININ) { + $c = self::XMININ; + } + $delta = $h * $c; + $frac *= $delta; + ++$m; + } + + return $frac; + } + + /** + * logGamma function. + * + * @version 1.1 + * + * @author Jaco van Kooten + * + * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher. + * + * The natural logarithm of the gamma function.
+ * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz
+ * Applied Mathematics Division
+ * Argonne National Laboratory
+ * Argonne, IL 60439
+ *

+ * References: + *

    + *
  1. W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural + * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.
  2. + *
  3. K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.
  4. + *
  5. Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.
  6. + *
+ *

+ *

+ * From the original documentation: + *

+ *

+ * This routine calculates the LOG(GAMMA) function for a positive real argument X. + * Computation is based on an algorithm outlined in references 1 and 2. + * The program uses rational functions that theoretically approximate LOG(GAMMA) + * to at least 18 significant decimal digits. The approximation for X > 12 is from + * reference 3, while approximations for X < 12.0 are similar to those in reference + * 1, but are unpublished. The accuracy achieved depends on the arithmetic system, + * the compiler, the intrinsic functions, and proper selection of the + * machine-dependent constants. + *

+ *

+ * Error returns:
+ * The program returns the value XINF for X .LE. 0.0 or when overflow would occur. + * The computation is believed to be free of underflow and overflow. + *

+ * + * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305 + */ + + // Function cache for logGamma + private static $logGammaCacheResult = 0.0; + + private static $logGammaCacheX = 0.0; + + private static function logGamma($x) + { + // Log Gamma related constants + static $lg_d1 = -0.5772156649015328605195174; + static $lg_d2 = 0.4227843350984671393993777; + static $lg_d4 = 1.791759469228055000094023; + + static $lg_p1 = [ + 4.945235359296727046734888, + 201.8112620856775083915565, + 2290.838373831346393026739, + 11319.67205903380828685045, + 28557.24635671635335736389, + 38484.96228443793359990269, + 26377.48787624195437963534, + 7225.813979700288197698961, + ]; + static $lg_p2 = [ + 4.974607845568932035012064, + 542.4138599891070494101986, + 15506.93864978364947665077, + 184793.2904445632425417223, + 1088204.76946882876749847, + 3338152.967987029735917223, + 5106661.678927352456275255, + 3074109.054850539556250927, + ]; + static $lg_p4 = [ + 14745.02166059939948905062, + 2426813.369486704502836312, + 121475557.4045093227939592, + 2663432449.630976949898078, + 29403789566.34553899906876, + 170266573776.5398868392998, + 492612579337.743088758812, + 560625185622.3951465078242, + ]; + static $lg_q1 = [ + 67.48212550303777196073036, + 1113.332393857199323513008, + 7738.757056935398733233834, + 27639.87074403340708898585, + 54993.10206226157329794414, + 61611.22180066002127833352, + 36351.27591501940507276287, + 8785.536302431013170870835, + ]; + static $lg_q2 = [ + 183.0328399370592604055942, + 7765.049321445005871323047, + 133190.3827966074194402448, + 1136705.821321969608938755, + 5267964.117437946917577538, + 13467014.54311101692290052, + 17827365.30353274213975932, + 9533095.591844353613395747, + ]; + static $lg_q4 = [ + 2690.530175870899333379843, + 639388.5654300092398984238, + 41355999.30241388052042842, + 1120872109.61614794137657, + 14886137286.78813811542398, + 101680358627.2438228077304, + 341747634550.7377132798597, + 446315818741.9713286462081, + ]; + static $lg_c = [ + -0.001910444077728, + 8.4171387781295e-4, + -5.952379913043012e-4, + 7.93650793500350248e-4, + -0.002777777777777681622553, + 0.08333333333333333331554247, + 0.0057083835261, + ]; + + // Rough estimate of the fourth root of logGamma_xBig + static $lg_frtbig = 2.25e76; + static $pnt68 = 0.6796875; + + if ($x == self::$logGammaCacheX) { + return self::$logGammaCacheResult; + } + $y = $x; + if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) { + if ($y <= self::EPS) { + $res = -log($y); + } elseif ($y <= 1.5) { + // --------------------- + // EPS .LT. X .LE. 1.5 + // --------------------- + if ($y < $pnt68) { + $corr = -log($y); + $xm1 = $y; + } else { + $corr = 0.0; + $xm1 = $y - 1.0; + } + if ($y <= 0.5 || $y >= $pnt68) { + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm1 + $lg_p1[$i]; + $xden = $xden * $xm1 + $lg_q1[$i]; + } + $res = $corr + $xm1 * ($lg_d1 + $xm1 * ($xnum / $xden)); + } else { + $xm2 = $y - 1.0; + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm2 + $lg_p2[$i]; + $xden = $xden * $xm2 + $lg_q2[$i]; + } + $res = $corr + $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); + } + } elseif ($y <= 4.0) { + // --------------------- + // 1.5 .LT. X .LE. 4.0 + // --------------------- + $xm2 = $y - 2.0; + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm2 + $lg_p2[$i]; + $xden = $xden * $xm2 + $lg_q2[$i]; + } + $res = $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); + } elseif ($y <= 12.0) { + // ---------------------- + // 4.0 .LT. X .LE. 12.0 + // ---------------------- + $xm4 = $y - 4.0; + $xden = -1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm4 + $lg_p4[$i]; + $xden = $xden * $xm4 + $lg_q4[$i]; + } + $res = $lg_d4 + $xm4 * ($xnum / $xden); + } else { + // --------------------------------- + // Evaluate for argument .GE. 12.0 + // --------------------------------- + $res = 0.0; + if ($y <= $lg_frtbig) { + $res = $lg_c[6]; + $ysq = $y * $y; + for ($i = 0; $i < 6; ++$i) { + $res = $res / $ysq + $lg_c[$i]; + } + $res /= $y; + $corr = log($y); + $res = $res + log(self::SQRT2PI) - 0.5 * $corr; + $res += $y * ($corr - 1.0); + } + } + } else { + // -------------------------- + // Return for bad arguments + // -------------------------- + $res = self::MAX_VALUE; + } + // ------------------------------ + // Final adjustments and return + // ------------------------------ + self::$logGammaCacheX = $x; + self::$logGammaCacheResult = $res; + + return $res; + } + + // + // Private implementation of the incomplete Gamma function + // + private static function incompleteGamma($a, $x) + { + static $max = 32; + $summer = 0; + for ($n = 0; $n <= $max; ++$n) { + $divisor = $a; + for ($i = 1; $i <= $n; ++$i) { + $divisor *= ($a + $i); + } + $summer += ($x ** $n / $divisor); + } + + return $x ** $a * exp(0 - $x) * $summer; + } + + // + // Private implementation of the Gamma function + // + private static function gamma($data) + { + if ($data == 0.0) { + return 0; + } + + static $p0 = 1.000000000190015; + static $p = [ + 1 => 76.18009172947146, + 2 => -86.50532032941677, + 3 => 24.01409824083091, + 4 => -1.231739572450155, + 5 => 1.208650973866179e-3, + 6 => -5.395239384953e-6, + ]; + + $y = $x = $data; + $tmp = $x + 5.5; + $tmp -= ($x + 0.5) * log($tmp); + + $summer = $p0; + for ($j = 1; $j <= 6; ++$j) { + $summer += ($p[$j] / ++$y); + } + + return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x)); + } + + /* + * inverse_ncdf.php + * ------------------- + * begin : Friday, January 16, 2004 + * copyright : (C) 2004 Michael Nickerson + * email : nickersonm@yahoo.com + * + */ + private static function inverseNcdf($p) + { + // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to + // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as + // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html + // I have not checked the accuracy of this implementation. Be aware that PHP + // will truncate the coeficcients to 14 digits. + + // You have permission to use and distribute this function freely for + // whatever purpose you want, but please show common courtesy and give credit + // where credit is due. + + // Input paramater is $p - probability - where 0 < p < 1. + + // Coefficients in rational approximations + static $a = [ + 1 => -3.969683028665376e+01, + 2 => 2.209460984245205e+02, + 3 => -2.759285104469687e+02, + 4 => 1.383577518672690e+02, + 5 => -3.066479806614716e+01, + 6 => 2.506628277459239e+00, + ]; + + static $b = [ + 1 => -5.447609879822406e+01, + 2 => 1.615858368580409e+02, + 3 => -1.556989798598866e+02, + 4 => 6.680131188771972e+01, + 5 => -1.328068155288572e+01, + ]; + + static $c = [ + 1 => -7.784894002430293e-03, + 2 => -3.223964580411365e-01, + 3 => -2.400758277161838e+00, + 4 => -2.549732539343734e+00, + 5 => 4.374664141464968e+00, + 6 => 2.938163982698783e+00, + ]; + + static $d = [ + 1 => 7.784695709041462e-03, + 2 => 3.224671290700398e-01, + 3 => 2.445134137142996e+00, + 4 => 3.754408661907416e+00, + ]; + + // Define lower and upper region break-points. + $p_low = 0.02425; //Use lower region approx. below this + $p_high = 1 - $p_low; //Use upper region approx. above this + + if (0 < $p && $p < $p_low) { + // Rational approximation for lower region. + $q = sqrt(-2 * log($p)); + + return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / + (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); + } elseif ($p_low <= $p && $p <= $p_high) { + // Rational approximation for central region. + $q = $p - 0.5; + $r = $q * $q; + + return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q / + ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1); + } elseif ($p_high < $p && $p < 1) { + // Rational approximation for upper region. + $q = sqrt(-2 * log(1 - $p)); + + return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / + (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); + } + // If 0 < p < 1, return a null value + return Functions::NULL(); + } + + /** + * MS Excel does not count Booleans if passed as cell values, but they are counted if passed as literals. + * OpenOffice Calc always counts Booleans. + * Gnumeric never counts Booleans. + * + * @param mixed $arg + * @param mixed $k + * + * @return int|mixed + */ + private static function testAcceptedBoolean($arg, $k) + { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k) && (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_EXCEL)) || + (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + + return $arg; + } + + /** + * @param mixed $arg + * @param mixed $k + * + * @return bool + */ + private static function isAcceptedCountable($arg, $k) + { + if (((is_numeric($arg)) && (!is_string($arg))) || + ((is_numeric($arg)) && (!Functions::isCellValue($k)) && + (Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_GNUMERIC))) { + return true; + } + + return false; + } + + /** + * AVEDEV. + * + * Returns the average of the absolute deviations of data points from their mean. + * AVEDEV is a measure of the variability in a data set. + * + * Excel Function: + * AVEDEV(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function AVEDEV(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = 0; + + $aMean = self::AVERAGE(...$args); + if ($aMean === Functions::DIV0()) { + return Functions::NAN(); + } elseif ($aMean === Functions::VALUE()) { + return Functions::VALUE(); + } + + $aCount = 0; + foreach ($aArgs as $k => $arg) { + $arg = self::testAcceptedBoolean($arg, $k); + // Is it a numeric value? + // Strings containing numeric values are only counted if they are string literals (not cell values) + // and then only in MS Excel and in Open Office, not in Gnumeric + if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) { + return Functions::VALUE(); + } + if (self::isAcceptedCountable($arg, $k)) { + $returnValue += abs($arg - $aMean); + ++$aCount; + } + } + + // Return + if ($aCount === 0) { + return Functions::DIV0(); + } + + return $returnValue / $aCount; + } + + /** + * AVERAGE. + * + * Returns the average (arithmetic mean) of the arguments + * + * Excel Function: + * AVERAGE(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function AVERAGE(...$args) + { + $returnValue = $aCount = 0; + + // Loop through arguments + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { + $arg = self::testAcceptedBoolean($arg, $k); + // Is it a numeric value? + // Strings containing numeric values are only counted if they are string literals (not cell values) + // and then only in MS Excel and in Open Office, not in Gnumeric + if ((is_string($arg)) && (!is_numeric($arg)) && (!Functions::isCellValue($k))) { + return Functions::VALUE(); + } + if (self::isAcceptedCountable($arg, $k)) { + $returnValue += $arg; + ++$aCount; + } + } + + // Return + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * AVERAGEA. + * + * Returns the average of its arguments, including numbers, text, and logical values + * + * Excel Function: + * AVERAGEA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function AVERAGEA(...$args) + { + $returnValue = null; + + $aCount = 0; + // Loop through arguments + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + $returnValue += $arg; + ++$aCount; + } + } + } + + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * AVERAGEIF. + * + * Returns the average value from a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * AVERAGEIF(value1[,value2[, ...]],condition) + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be checked + * @param mixed[] $averageArgs Data values + * + * @return float|string + */ + public static function AVERAGEIF($aArgs, $condition, $averageArgs = []) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $averageArgs = Functions::flattenArray($averageArgs); + if (empty($averageArgs)) { + $averageArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + $conditionIsNumeric = strpos($condition, '"') === false; + + // Loop through arguments + $aCount = 0; + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + if ($conditionIsNumeric) { + continue; + } + $arg = Calculation::wrapResult(strtoupper($arg)); + } elseif (!$conditionIsNumeric) { + continue; + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + $returnValue += $averageArgs[$key]; + ++$aCount; + } + } + + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * BETADIST. + * + * Returns the beta distribution. + * + * @param float $value Value at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * @param mixed $rMin + * @param mixed $rMax + * + * @return float|string + */ + public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) + { + $value = Functions::flattenSingleValue($value); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + $rMin = Functions::flattenSingleValue($rMin); + $rMax = Functions::flattenSingleValue($rMax); + + if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { + if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) { + return Functions::NAN(); + } + if ($rMin > $rMax) { + $tmp = $rMin; + $rMin = $rMax; + $rMax = $tmp; + } + $value -= $rMin; + $value /= ($rMax - $rMin); + + return self::incompleteBeta($value, $alpha, $beta); + } + + return Functions::VALUE(); + } + + /** + * BETAINV. + * + * Returns the inverse of the beta distribution. + * + * @param float $probability Probability at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * @param float $rMin Minimum value + * @param float $rMax Maximum value + * + * @return float|string + */ + public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) + { + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + $rMin = Functions::flattenSingleValue($rMin); + $rMax = Functions::flattenSingleValue($rMax); + + if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { + if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ($rMin > $rMax) { + $tmp = $rMin; + $rMin = $rMax; + $rMax = $tmp; + } + $a = 0; + $b = 2; + + $i = 0; + while ((($b - $a) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + $guess = ($a + $b) / 2; + $result = self::BETADIST($guess, $alpha, $beta); + if (($result == $probability) || ($result == 0)) { + $b = $a; + } elseif ($result > $probability) { + $b = $guess; + } else { + $a = $guess; + } + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($rMin + $guess * ($rMax - $rMin), 12); + } + + return Functions::VALUE(); + } + + /** + * BINOMDIST. + * + * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with + * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, + * when trials are independent, and when the probability of success is constant throughout the + * experiment. For example, BINOMDIST can calculate the probability that two of the next three + * babies born are male. + * + * @param float $value Number of successes in trials + * @param float $trials Number of trials + * @param float $probability Probability of success on each trial + * @param bool $cumulative + * + * @return float|string + */ + public static function BINOMDIST($value, $trials, $probability, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $trials = Functions::flattenSingleValue($trials); + $probability = Functions::flattenSingleValue($probability); + + if ((is_numeric($value)) && (is_numeric($trials)) && (is_numeric($probability))) { + $value = floor($value); + $trials = floor($trials); + if (($value < 0) || ($value > $trials)) { + return Functions::NAN(); + } + if (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + $summer = 0; + for ($i = 0; $i <= $value; ++$i) { + $summer += MathTrig::COMBIN($trials, $i) * $probability ** $i * (1 - $probability) ** ($trials - $i); + } + + return $summer; + } + + return MathTrig::COMBIN($trials, $value) * $probability ** $value * (1 - $probability) ** ($trials - $value); + } + } + + return Functions::VALUE(); + } + + /** + * CHIDIST. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $value Value for the function + * @param float $degrees degrees of freedom + * + * @return float|string + */ + public static function CHIDIST($value, $degrees) + { + $value = Functions::flattenSingleValue($value); + $degrees = Functions::flattenSingleValue($degrees); + + if ((is_numeric($value)) && (is_numeric($degrees))) { + $degrees = floor($degrees); + if ($degrees < 1) { + return Functions::NAN(); + } + if ($value < 0) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + return 1; + } + + return Functions::NAN(); + } + + return 1 - (self::incompleteGamma($degrees / 2, $value / 2) / self::gamma($degrees / 2)); + } + + return Functions::VALUE(); + } + + /** + * CHIINV. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $probability Probability for the function + * @param float $degrees degrees of freedom + * + * @return float|string + */ + public static function CHIINV($probability, $degrees) + { + $probability = Functions::flattenSingleValue($probability); + $degrees = Functions::flattenSingleValue($degrees); + + if ((is_numeric($probability)) && (is_numeric($degrees))) { + $degrees = floor($degrees); + + $xLo = 100; + $xHi = 0; + + $x = $xNew = 1; + $dx = 1; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $result = 1 - (self::incompleteGamma($degrees / 2, $x / 2) / self::gamma($degrees / 2)); + $error = $result - $probability; + if ($error == 0.0) { + $dx = 0; + } elseif ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + // Avoid division by zero + if ($result != 0.0) { + $dx = $error / $result; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($x, 12); + } + + return Functions::VALUE(); + } + + /** + * CONFIDENCE. + * + * Returns the confidence interval for a population mean + * + * @param float $alpha + * @param float $stdDev Standard Deviation + * @param float $size + * + * @return float|string + */ + public static function CONFIDENCE($alpha, $stdDev, $size) + { + $alpha = Functions::flattenSingleValue($alpha); + $stdDev = Functions::flattenSingleValue($stdDev); + $size = Functions::flattenSingleValue($size); + + if ((is_numeric($alpha)) && (is_numeric($stdDev)) && (is_numeric($size))) { + $size = floor($size); + if (($alpha <= 0) || ($alpha >= 1)) { + return Functions::NAN(); + } + if (($stdDev <= 0) || ($size < 1)) { + return Functions::NAN(); + } + + return self::NORMSINV(1 - $alpha / 2) * $stdDev / sqrt($size); + } + + return Functions::VALUE(); + } + + /** + * CORREL. + * + * Returns covariance, the average of the products of deviations for each data point pair. + * + * @param mixed $yValues array of mixed Data Series Y + * @param null|mixed $xValues array of mixed Data Series X + * + * @return float|string + */ + public static function CORREL($yValues, $xValues = null) + { + if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) { + return Functions::VALUE(); + } + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getCorrelation(); + } + + /** + * COUNT. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * COUNT(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNT(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + foreach ($aArgs as $k => $arg) { + $arg = self::testAcceptedBoolean($arg, $k); + // Is it a numeric value? + // Strings containing numeric values are only counted if they are string literals (not cell values) + // and then only in MS Excel and in Open Office, not in Gnumeric + if (self::isAcceptedCountable($arg, $k)) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTA. + * + * Counts the number of cells that are not empty within the list of arguments + * + * Excel Function: + * COUNTA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNTA(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + foreach ($aArgs as $k => $arg) { + // Nulls are counted if literals, but not if cell values + if ($arg !== null || (!Functions::isCellValue($k))) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTBLANK. + * + * Counts the number of empty cells within the list of arguments + * + * Excel Function: + * COUNTBLANK(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNTBLANK(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a blank cell? + if (($arg === null) || ((is_string($arg)) && ($arg == ''))) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTIF. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * COUNTIF(value1[,value2[, ...]],condition) + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be counted + * + * @return int + */ + public static function COUNTIF($aArgs, $condition) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $condition = Functions::ifCondition($condition); + $conditionIsNumeric = strpos($condition, '"') === false; + // Loop through arguments + foreach ($aArgs as $arg) { + if (!is_numeric($arg)) { + if ($conditionIsNumeric) { + continue; + } + $arg = Calculation::wrapResult(strtoupper($arg)); + } elseif (!$conditionIsNumeric) { + continue; + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is it a value within our criteria + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTIFS. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) + * + * @param mixed $args Criterias + * + * @return int + */ + public static function COUNTIFS(...$args) + { + $arrayList = $args; + + // Return value + $returnValue = 0; + + if (empty($arrayList)) { + return $returnValue; + } + + $aArgsArray = []; + $conditions = []; + + while (count($arrayList) > 0) { + $aArgsArray[] = Functions::flattenArray(array_shift($arrayList)); + $conditions[] = Functions::ifCondition(array_shift($arrayList)); + } + + // Loop through each arg and see if arguments and conditions are true + foreach (array_keys($aArgsArray[0]) as $index) { + $valid = true; + + foreach ($conditions as $cidx => $condition) { + $conditionIsNumeric = strpos($condition, '"') === false; + $arg = $aArgsArray[$cidx][$index]; + + // Loop through arguments + if (!is_numeric($arg)) { + if ($conditionIsNumeric) { + $valid = false; + + break; // if false found, don't need to check other conditions + } + $arg = Calculation::wrapResult(strtoupper($arg)); + } elseif (!$conditionIsNumeric) { + $valid = false; + + break; // if false found, don't need to check other conditions + } + $testCondition = '=' . $arg . $condition; + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is not a value within our criteria + $valid = false; + + break; // if false found, don't need to check other conditions + } + } + + if ($valid) { + ++$returnValue; + } + } + + // Return + return $returnValue; + } + + /** + * COVAR. + * + * Returns covariance, the average of the products of deviations for each data point pair. + * + * @param mixed $yValues array of mixed Data Series Y + * @param mixed $xValues array of mixed Data Series X + * + * @return float|string + */ + public static function COVAR($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getCovariance(); + } + + /** + * CRITBINOM. + * + * Returns the smallest value for which the cumulative binomial distribution is greater + * than or equal to a criterion value + * + * See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used + * + * @param float $trials number of Bernoulli trials + * @param float $probability probability of a success on each trial + * @param float $alpha criterion value + * + * @return int|string + * + * @TODO Warning. This implementation differs from the algorithm detailed on the MS + * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess + * This eliminates a potential endless loop error, but may have an adverse affect on the + * accuracy of the function (although all my tests have so far returned correct results). + */ + public static function CRITBINOM($trials, $probability, $alpha) + { + $trials = floor(Functions::flattenSingleValue($trials)); + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + + if ((is_numeric($trials)) && (is_numeric($probability)) && (is_numeric($alpha))) { + $trials = (int) $trials; + if ($trials < 0) { + return Functions::NAN(); + } elseif (($probability < 0.0) || ($probability > 1.0)) { + return Functions::NAN(); + } elseif (($alpha < 0.0) || ($alpha > 1.0)) { + return Functions::NAN(); + } + + if ($alpha <= 0.5) { + $t = sqrt(log(1 / ($alpha * $alpha))); + $trialsApprox = 0 - ($t + (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t)); + } else { + $t = sqrt(log(1 / (1 - $alpha) ** 2)); + $trialsApprox = $t - (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t); + } + + $Guess = floor($trials * $probability + $trialsApprox * sqrt($trials * $probability * (1 - $probability))); + if ($Guess < 0) { + $Guess = 0; + } elseif ($Guess > $trials) { + $Guess = $trials; + } + + $TotalUnscaledProbability = $UnscaledPGuess = $UnscaledCumPGuess = 0.0; + $EssentiallyZero = 10e-12; + + $m = floor($trials * $probability); + ++$TotalUnscaledProbability; + if ($m == $Guess) { + ++$UnscaledPGuess; + } + if ($m <= $Guess) { + ++$UnscaledCumPGuess; + } + + $PreviousValue = 1; + $Done = false; + $k = $m + 1; + while ((!$Done) && ($k <= $trials)) { + $CurrentValue = $PreviousValue * ($trials - $k + 1) * $probability / ($k * (1 - $probability)); + $TotalUnscaledProbability += $CurrentValue; + if ($k == $Guess) { + $UnscaledPGuess += $CurrentValue; + } + if ($k <= $Guess) { + $UnscaledCumPGuess += $CurrentValue; + } + if ($CurrentValue <= $EssentiallyZero) { + $Done = true; + } + $PreviousValue = $CurrentValue; + ++$k; + } + + $PreviousValue = 1; + $Done = false; + $k = $m - 1; + while ((!$Done) && ($k >= 0)) { + $CurrentValue = $PreviousValue * $k + 1 * (1 - $probability) / (($trials - $k) * $probability); + $TotalUnscaledProbability += $CurrentValue; + if ($k == $Guess) { + $UnscaledPGuess += $CurrentValue; + } + if ($k <= $Guess) { + $UnscaledCumPGuess += $CurrentValue; + } + if ($CurrentValue <= $EssentiallyZero) { + $Done = true; + } + $PreviousValue = $CurrentValue; + --$k; + } + + $PGuess = $UnscaledPGuess / $TotalUnscaledProbability; + $CumPGuess = $UnscaledCumPGuess / $TotalUnscaledProbability; + + $CumPGuessMinus1 = $CumPGuess - 1; + + while (true) { + if (($CumPGuessMinus1 < $alpha) && ($CumPGuess >= $alpha)) { + return $Guess; + } elseif (($CumPGuessMinus1 < $alpha) && ($CumPGuess < $alpha)) { + $PGuessPlus1 = $PGuess * ($trials - $Guess) * $probability / $Guess / (1 - $probability); + $CumPGuessMinus1 = $CumPGuess; + $CumPGuess = $CumPGuess + $PGuessPlus1; + $PGuess = $PGuessPlus1; + ++$Guess; + } elseif (($CumPGuessMinus1 >= $alpha) && ($CumPGuess >= $alpha)) { + $PGuessMinus1 = $PGuess * $Guess * (1 - $probability) / ($trials - $Guess + 1) / $probability; + $CumPGuess = $CumPGuessMinus1; + $CumPGuessMinus1 = $CumPGuessMinus1 - $PGuess; + $PGuess = $PGuessMinus1; + --$Guess; + } + } + } + + return Functions::VALUE(); + } + + /** + * DEVSQ. + * + * Returns the sum of squares of deviations of data points from their sample mean. + * + * Excel Function: + * DEVSQ(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function DEVSQ(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean != Functions::DIV0()) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + // Is it a numeric value? + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = ($arg - $aMean) ** 2; + } else { + $returnValue += ($arg - $aMean) ** 2; + } + ++$aCount; + } + } + + // Return + if ($returnValue === null) { + return Functions::NAN(); + } + + return $returnValue; + } + + return self::NA(); + } + + /** + * EXPONDIST. + * + * Returns the exponential distribution. Use EXPONDIST to model the time between events, + * such as how long an automated bank teller takes to deliver cash. For example, you can + * use EXPONDIST to determine the probability that the process takes at most 1 minute. + * + * @param float $value Value of the function + * @param float $lambda The parameter value + * @param bool $cumulative + * + * @return float|string + */ + public static function EXPONDIST($value, $lambda, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $lambda = Functions::flattenSingleValue($lambda); + $cumulative = Functions::flattenSingleValue($cumulative); + + if ((is_numeric($value)) && (is_numeric($lambda))) { + if (($value < 0) || ($lambda < 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 1 - exp(0 - $value * $lambda); + } + + return $lambda * exp(0 - $value * $lambda); + } + } + + return Functions::VALUE(); + } + + /** + * FISHER. + * + * Returns the Fisher transformation at x. This transformation produces a function that + * is normally distributed rather than skewed. Use this function to perform hypothesis + * testing on the correlation coefficient. + * + * @param float $value + * + * @return float|string + */ + public static function FISHER($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + if (($value <= -1) || ($value >= 1)) { + return Functions::NAN(); + } + + return 0.5 * log((1 + $value) / (1 - $value)); + } + + return Functions::VALUE(); + } + + /** + * FISHERINV. + * + * Returns the inverse of the Fisher transformation. Use this transformation when + * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then + * FISHERINV(y) = x. + * + * @param float $value + * + * @return float|string + */ + public static function FISHERINV($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + return (exp(2 * $value) - 1) / (exp(2 * $value) + 1); + } + + return Functions::VALUE(); + } + + /** + * FORECAST. + * + * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. + * + * @param float $xValue Value of X for which we want to find Y + * @param mixed $yValues array of mixed Data Series Y + * @param mixed $xValues of mixed Data Series X + * + * @return bool|float|string + */ + public static function FORECAST($xValue, $yValues, $xValues) + { + $xValue = Functions::flattenSingleValue($xValue); + if (!is_numeric($xValue)) { + return Functions::VALUE(); + } elseif (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getValueOfYForX($xValue); + } + + /** + * GAMMADIST. + * + * Returns the gamma distribution. + * + * @param float $value Value at which you want to evaluate the distribution + * @param float $a Parameter to the distribution + * @param float $b Parameter to the distribution + * @param bool $cumulative + * + * @return float|string + */ + public static function GAMMADIST($value, $a, $b, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $a = Functions::flattenSingleValue($a); + $b = Functions::flattenSingleValue($b); + + if ((is_numeric($value)) && (is_numeric($a)) && (is_numeric($b))) { + if (($value < 0) || ($a <= 0) || ($b <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return self::incompleteGamma($a, $value / $b) / self::gamma($a); + } + + return (1 / ($b ** $a * self::gamma($a))) * $value ** ($a - 1) * exp(0 - ($value / $b)); + } + } + + return Functions::VALUE(); + } + + /** + * GAMMAINV. + * + * Returns the inverse of the beta distribution. + * + * @param float $probability Probability at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * + * @return float|string + */ + public static function GAMMAINV($probability, $alpha, $beta) + { + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + + if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta))) { + if (($alpha <= 0) || ($beta <= 0) || ($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + + $xLo = 0; + $xHi = $alpha * $beta * 5; + + $x = $xNew = 1; + $error = $pdf = 0; + $dx = 1024; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $error = self::GAMMADIST($x, $alpha, $beta, true) - $probability; + if ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + $pdf = self::GAMMADIST($x, $alpha, $beta, false); + // Avoid division by zero + if ($pdf != 0.0) { + $dx = $error / $pdf; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return $x; + } + + return Functions::VALUE(); + } + + /** + * GAMMALN. + * + * Returns the natural logarithm of the gamma function. + * + * @param float $value + * + * @return float|string + */ + public static function GAMMALN($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + if ($value <= 0) { + return Functions::NAN(); + } + + return log(self::gamma($value)); + } + + return Functions::VALUE(); + } + + /** + * GEOMEAN. + * + * Returns the geometric mean of an array or range of positive data. For example, you + * can use GEOMEAN to calculate average growth rate given compound interest with + * variable rates. + * + * Excel Function: + * GEOMEAN(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function GEOMEAN(...$args) + { + $aArgs = Functions::flattenArray($args); + + $aMean = MathTrig::PRODUCT($aArgs); + if (is_numeric($aMean) && ($aMean > 0)) { + $aCount = self::COUNT($aArgs); + if (self::MIN($aArgs) > 0) { + return $aMean ** (1 / $aCount); + } + } + + return Functions::NAN(); + } + + /** + * GROWTH. + * + * Returns values along a predicted exponential Trend + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * @param mixed[] $newValues Values of X for which we want to find Y + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * + * @return array of float + */ + public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true) + { + $yValues = Functions::flattenArray($yValues); + $xValues = Functions::flattenArray($xValues); + $newValues = Functions::flattenArray($newValues); + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + + $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const); + if (empty($newValues)) { + $newValues = $bestFitExponential->getXValues(); + } + + $returnArray = []; + foreach ($newValues as $xValue) { + $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue); + } + + return $returnArray; + } + + /** + * HARMEAN. + * + * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the + * arithmetic mean of reciprocals. + * + * Excel Function: + * HARMEAN(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function HARMEAN(...$args) + { + // Return value + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + if (self::MIN($aArgs) < 0) { + return Functions::NAN(); + } + $aCount = 0; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($arg <= 0) { + return Functions::NAN(); + } + $returnValue += (1 / $arg); + ++$aCount; + } + } + + // Return + if ($aCount > 0) { + return 1 / ($returnValue / $aCount); + } + + return Functions::NA(); + } + + /** + * HYPGEOMDIST. + * + * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of + * sample successes, given the sample size, population successes, and population size. + * + * @param float $sampleSuccesses Number of successes in the sample + * @param float $sampleNumber Size of the sample + * @param float $populationSuccesses Number of successes in the population + * @param float $populationNumber Population size + * + * @return float|string + */ + public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber) + { + $sampleSuccesses = floor(Functions::flattenSingleValue($sampleSuccesses)); + $sampleNumber = floor(Functions::flattenSingleValue($sampleNumber)); + $populationSuccesses = floor(Functions::flattenSingleValue($populationSuccesses)); + $populationNumber = floor(Functions::flattenSingleValue($populationNumber)); + + if ((is_numeric($sampleSuccesses)) && (is_numeric($sampleNumber)) && (is_numeric($populationSuccesses)) && (is_numeric($populationNumber))) { + if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) { + return Functions::NAN(); + } + if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) { + return Functions::NAN(); + } + if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) { + return Functions::NAN(); + } + + return MathTrig::COMBIN($populationSuccesses, $sampleSuccesses) * + MathTrig::COMBIN($populationNumber - $populationSuccesses, $sampleNumber - $sampleSuccesses) / + MathTrig::COMBIN($populationNumber, $sampleNumber); + } + + return Functions::VALUE(); + } + + /** + * INTERCEPT. + * + * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float|string + */ + public static function INTERCEPT($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getIntersect(); + } + + /** + * KURT. + * + * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness + * or flatness of a distribution compared with the normal distribution. Positive + * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a + * relatively flat distribution. + * + * @param array ...$args Data Series + * + * @return float|string + */ + public static function KURT(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + $mean = self::AVERAGE($aArgs); + $stdDev = self::STDEV($aArgs); + + if ($stdDev > 0) { + $count = $summer = 0; + // Loop through arguments + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summer += (($arg - $mean) / $stdDev) ** 4; + ++$count; + } + } + } + + // Return + if ($count > 3) { + return $summer * ($count * ($count + 1) / (($count - 1) * ($count - 2) * ($count - 3))) - (3 * ($count - 1) ** 2 / (($count - 2) * ($count - 3))); + } + } + + return Functions::DIV0(); + } + + /** + * LARGE. + * + * Returns the nth largest value in a data set. You can use this function to + * select a value based on its relative standing. + * + * Excel Function: + * LARGE(value1[,value2[, ...]],entry) + * + * @param mixed $args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function LARGE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = floor(array_pop($aArgs)); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $count = self::COUNT($mArgs); + $entry = floor(--$entry); + if (($entry < 0) || ($entry >= $count) || ($count == 0)) { + return Functions::NAN(); + } + rsort($mArgs); + + return $mArgs[$entry]; + } + + return Functions::VALUE(); + } + + /** + * LINEST. + * + * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, + * and then returns an array that describes the line. + * + * @param mixed[] $yValues Data Series Y + * @param null|mixed[] $xValues Data Series X + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * @param bool $stats a logical value specifying whether to return additional regression statistics + * + * @return array|int|string The result, or a string containing an error + */ + public static function LINEST($yValues, $xValues = null, $const = true, $stats = false) + { + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); + if ($xValues === null) { + $xValues = range(1, count(Functions::flattenArray($yValues))); + } + + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return 0; + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const); + if ($stats) { + return [ + [ + $bestFitLinear->getSlope(), + $bestFitLinear->getSlopeSE(), + $bestFitLinear->getGoodnessOfFit(), + $bestFitLinear->getF(), + $bestFitLinear->getSSRegression(), + ], + [ + $bestFitLinear->getIntersect(), + $bestFitLinear->getIntersectSE(), + $bestFitLinear->getStdevOfResiduals(), + $bestFitLinear->getDFResiduals(), + $bestFitLinear->getSSResiduals(), + ], + ]; + } + + return [ + $bestFitLinear->getSlope(), + $bestFitLinear->getIntersect(), + ]; + } + + /** + * LOGEST. + * + * Calculates an exponential curve that best fits the X and Y data series, + * and then returns an array that describes the line. + * + * @param mixed[] $yValues Data Series Y + * @param null|mixed[] $xValues Data Series X + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * @param bool $stats a logical value specifying whether to return additional regression statistics + * + * @return array|int|string The result, or a string containing an error + */ + public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false) + { + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); + if ($xValues === null) { + $xValues = range(1, count(Functions::flattenArray($yValues))); + } + + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + foreach ($yValues as $value) { + if ($value <= 0.0) { + return Functions::NAN(); + } + } + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return 1; + } + + $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const); + if ($stats) { + return [ + [ + $bestFitExponential->getSlope(), + $bestFitExponential->getSlopeSE(), + $bestFitExponential->getGoodnessOfFit(), + $bestFitExponential->getF(), + $bestFitExponential->getSSRegression(), + ], + [ + $bestFitExponential->getIntersect(), + $bestFitExponential->getIntersectSE(), + $bestFitExponential->getStdevOfResiduals(), + $bestFitExponential->getDFResiduals(), + $bestFitExponential->getSSResiduals(), + ], + ]; + } + + return [ + $bestFitExponential->getSlope(), + $bestFitExponential->getIntersect(), + ]; + } + + /** + * LOGINV. + * + * Returns the inverse of the normal cumulative distribution + * + * @param float $probability + * @param float $mean + * @param float $stdDev + * + * @return float|string The result, or a string containing an error + * + * @TODO Try implementing P J Acklam's refinement algorithm for greater + * accuracy if I can get my head round the mathematics + * (as described at) http://home.online.no/~pjacklam/notes/invnorm/ + */ + public static function LOGINV($probability, $mean, $stdDev) + { + $probability = Functions::flattenSingleValue($probability); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($probability < 0) || ($probability > 1) || ($stdDev <= 0)) { + return Functions::NAN(); + } + + return exp($mean + $stdDev * self::NORMSINV($probability)); + } + + return Functions::VALUE(); + } + + /** + * LOGNORMDIST. + * + * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed + * with parameters mean and standard_dev. + * + * @param float $value + * @param float $mean + * @param float $stdDev + * + * @return float|string The result, or a string containing an error + */ + public static function LOGNORMDIST($value, $mean, $stdDev) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($value <= 0) || ($stdDev <= 0)) { + return Functions::NAN(); + } + + return self::NORMSDIST((log($value) - $mean) / $stdDev); + } + + return Functions::VALUE(); + } + + /** + * MAX. + * + * MAX returns the value of the element of the values passed that has the highest value, + * with negative numbers considered smaller than positive numbers. + * + * Excel Function: + * MAX(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MAX(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MAXA. + * + * Returns the greatest value in a list of arguments, including numbers, text, and logical values + * + * Excel Function: + * MAXA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MAXA(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MAXIFS. + * + * Counts the maximum value within a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) + * + * @param mixed $args Data range and criterias + * + * @return float + */ + public static function MAXIFS(...$args) + { + $arrayList = $args; + + // Return value + $returnValue = null; + + $maxArgs = Functions::flattenArray(array_shift($arrayList)); + $aArgsArray = []; + $conditions = []; + + while (count($arrayList) > 0) { + $aArgsArray[] = Functions::flattenArray(array_shift($arrayList)); + $conditions[] = Functions::ifCondition(array_shift($arrayList)); + } + + // Loop through each arg and see if arguments and conditions are true + foreach ($maxArgs as $index => $value) { + $valid = true; + + foreach ($conditions as $cidx => $condition) { + $arg = $aArgsArray[$cidx][$index]; + + // Loop through arguments + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is not a value within our criteria + $valid = false; + + break; // if false found, don't need to check other conditions + } + } + + if ($valid) { + $returnValue = $returnValue === null ? $value : max($value, $returnValue); + } + } + + // Return + return $returnValue; + } + + /** + * MEDIAN. + * + * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. + * + * Excel Function: + * MEDIAN(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function MEDIAN(...$args) + { + $returnValue = Functions::NAN(); + + $mArgs = []; + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + + $mValueCount = count($mArgs); + if ($mValueCount > 0) { + sort($mArgs, SORT_NUMERIC); + $mValueCount = $mValueCount / 2; + if ($mValueCount == floor($mValueCount)) { + $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2; + } else { + $mValueCount = floor($mValueCount); + $returnValue = $mArgs[$mValueCount]; + } + } + + return $returnValue; + } + + /** + * MIN. + * + * MIN returns the value of the element of the values passed that has the smallest value, + * with negative numbers considered smaller than positive numbers. + * + * Excel Function: + * MIN(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MIN(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if (($returnValue === null) || ($arg < $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MINA. + * + * Returns the smallest value in a list of arguments, including numbers, text, and logical values + * + * Excel Function: + * MINA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MINA(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if (($returnValue === null) || ($arg < $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MINIFS. + * + * Returns the minimum value within a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) + * + * @param mixed $args Data range and criterias + * + * @return float + */ + public static function MINIFS(...$args) + { + $arrayList = $args; + + // Return value + $returnValue = null; + + $minArgs = Functions::flattenArray(array_shift($arrayList)); + $aArgsArray = []; + $conditions = []; + + while (count($arrayList) > 0) { + $aArgsArray[] = Functions::flattenArray(array_shift($arrayList)); + $conditions[] = Functions::ifCondition(array_shift($arrayList)); + } + + // Loop through each arg and see if arguments and conditions are true + foreach ($minArgs as $index => $value) { + $valid = true; + + foreach ($conditions as $cidx => $condition) { + $arg = $aArgsArray[$cidx][$index]; + + // Loop through arguments + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is not a value within our criteria + $valid = false; + + break; // if false found, don't need to check other conditions + } + } + + if ($valid) { + $returnValue = $returnValue === null ? $value : min($value, $returnValue); + } + } + + // Return + return $returnValue; + } + + // + // Special variant of array_count_values that isn't limited to strings and integers, + // but can work with floating point numbers as values + // + private static function modeCalc($data) + { + $frequencyArray = []; + $index = 0; + $maxfreq = 0; + $maxfreqkey = ''; + $maxfreqdatum = ''; + foreach ($data as $datum) { + $found = false; + ++$index; + foreach ($frequencyArray as $key => $value) { + if ((string) $value['value'] == (string) $datum) { + ++$frequencyArray[$key]['frequency']; + $freq = $frequencyArray[$key]['frequency']; + if ($freq > $maxfreq) { + $maxfreq = $freq; + $maxfreqkey = $key; + $maxfreqdatum = $datum; + } elseif ($freq == $maxfreq) { + if ($frequencyArray[$key]['index'] < $frequencyArray[$maxfreqkey]['index']) { + $maxfreqkey = $key; + $maxfreqdatum = $datum; + } + } + $found = true; + + break; + } + } + if (!$found) { + $frequencyArray[] = [ + 'value' => $datum, + 'frequency' => 1, + 'index' => $index, + ]; + } + } + + if ($maxfreq <= 1) { + return Functions::NA(); + } + + return $maxfreqdatum; + } + + /** + * MODE. + * + * Returns the most frequently occurring, or repetitive, value in an array or range of data + * + * Excel Function: + * MODE(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function MODE(...$args) + { + $returnValue = Functions::NA(); + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + + if (!empty($mArgs)) { + return self::modeCalc($mArgs); + } + + return $returnValue; + } + + /** + * NEGBINOMDIST. + * + * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that + * there will be number_f failures before the number_s-th success, when the constant + * probability of a success is probability_s. This function is similar to the binomial + * distribution, except that the number of successes is fixed, and the number of trials is + * variable. Like the binomial, trials are assumed to be independent. + * + * @param float $failures Number of Failures + * @param float $successes Threshold number of Successes + * @param float $probability Probability of success on each trial + * + * @return float|string The result, or a string containing an error + */ + public static function NEGBINOMDIST($failures, $successes, $probability) + { + $failures = floor(Functions::flattenSingleValue($failures)); + $successes = floor(Functions::flattenSingleValue($successes)); + $probability = Functions::flattenSingleValue($probability); + + if ((is_numeric($failures)) && (is_numeric($successes)) && (is_numeric($probability))) { + if (($failures < 0) || ($successes < 1)) { + return Functions::NAN(); + } elseif (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + if (($failures + $successes - 1) <= 0) { + return Functions::NAN(); + } + } + + return (MathTrig::COMBIN($failures + $successes - 1, $successes - 1)) * ($probability ** $successes) * ((1 - $probability) ** $failures); + } + + return Functions::VALUE(); + } + + /** + * NORMDIST. + * + * Returns the normal distribution for the specified mean and standard deviation. This + * function has a very wide range of applications in statistics, including hypothesis + * testing. + * + * @param float $value + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * @param bool $cumulative + * + * @return float|string The result, or a string containing an error + */ + public static function NORMDIST($value, $mean, $stdDev, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if ($stdDev < 0) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 0.5 * (1 + Engineering::erfVal(($value - $mean) / ($stdDev * sqrt(2)))); + } + + return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (($value - $mean) ** 2 / (2 * ($stdDev * $stdDev)))); + } + } + + return Functions::VALUE(); + } + + /** + * NORMINV. + * + * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. + * + * @param float $probability + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * + * @return float|string The result, or a string containing an error + */ + public static function NORMINV($probability, $mean, $stdDev) + { + $probability = Functions::flattenSingleValue($probability); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ($stdDev < 0) { + return Functions::NAN(); + } + + return (self::inverseNcdf($probability) * $stdDev) + $mean; + } + + return Functions::VALUE(); + } + + /** + * NORMSDIST. + * + * Returns the standard normal cumulative distribution function. The distribution has + * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a + * table of standard normal curve areas. + * + * @param float $value + * + * @return float|string The result, or a string containing an error + */ + public static function NORMSDIST($value) + { + $value = Functions::flattenSingleValue($value); + + return self::NORMDIST($value, 0, 1, true); + } + + /** + * NORMSINV. + * + * Returns the inverse of the standard normal cumulative distribution + * + * @param float $value + * + * @return float|string The result, or a string containing an error + */ + public static function NORMSINV($value) + { + return self::NORMINV($value, 0, 1); + } + + /** + * PERCENTILE. + * + * Returns the nth percentile of values in a range.. + * + * Excel Function: + * PERCENTILE(value1[,value2[, ...]],entry) + * + * @param mixed $args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function PERCENTILE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = array_pop($aArgs); + + if ((is_numeric($entry)) && (!is_string($entry))) { + if (($entry < 0) || ($entry > 1)) { + return Functions::NAN(); + } + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $mValueCount = count($mArgs); + if ($mValueCount > 0) { + sort($mArgs); + $count = self::COUNT($mArgs); + $index = $entry * ($count - 1); + $iBase = floor($index); + if ($index == $iBase) { + return $mArgs[$index]; + } + $iNext = $iBase + 1; + $iProportion = $index - $iBase; + + return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion); + } + } + + return Functions::VALUE(); + } + + /** + * PERCENTRANK. + * + * Returns the rank of a value in a data set as a percentage of the data set. + * + * @param float[] $valueSet An array of, or a reference to, a list of numbers + * @param int $value the number whose rank you want to find + * @param int $significance the number of significant digits for the returned percentage value + * + * @return float + */ + public static function PERCENTRANK($valueSet, $value, $significance = 3) + { + $valueSet = Functions::flattenArray($valueSet); + $value = Functions::flattenSingleValue($value); + $significance = ($significance === null) ? 3 : (int) Functions::flattenSingleValue($significance); + + foreach ($valueSet as $key => $valueEntry) { + if (!is_numeric($valueEntry)) { + unset($valueSet[$key]); + } + } + sort($valueSet, SORT_NUMERIC); + $valueCount = count($valueSet); + if ($valueCount == 0) { + return Functions::NAN(); + } + + $valueAdjustor = $valueCount - 1; + if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) { + return Functions::NA(); + } + + $pos = array_search($value, $valueSet); + if ($pos === false) { + $pos = 0; + $testValue = $valueSet[0]; + while ($testValue < $value) { + $testValue = $valueSet[++$pos]; + } + --$pos; + $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos])); + } + + return round($pos / $valueAdjustor, $significance); + } + + /** + * PERMUT. + * + * Returns the number of permutations for a given number of objects that can be + * selected from number objects. A permutation is any set or subset of objects or + * events where internal order is significant. Permutations are different from + * combinations, for which the internal order is not significant. Use this function + * for lottery-style probability calculations. + * + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each permutation + * + * @return int|string Number of permutations, or a string containing an error + */ + public static function PERMUT($numObjs, $numInSet) + { + $numObjs = Functions::flattenSingleValue($numObjs); + $numInSet = Functions::flattenSingleValue($numInSet); + + if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { + $numInSet = floor($numInSet); + if ($numObjs < $numInSet) { + return Functions::NAN(); + } + + return round(MathTrig::FACT($numObjs) / MathTrig::FACT($numObjs - $numInSet)); + } + + return Functions::VALUE(); + } + + /** + * POISSON. + * + * Returns the Poisson distribution. A common application of the Poisson distribution + * is predicting the number of events over a specific time, such as the number of + * cars arriving at a toll plaza in 1 minute. + * + * @param float $value + * @param float $mean Mean Value + * @param bool $cumulative + * + * @return float|string The result, or a string containing an error + */ + public static function POISSON($value, $mean, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + + if ((is_numeric($value)) && (is_numeric($mean))) { + if (($value < 0) || ($mean <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + $summer = 0; + $floor = floor($value); + for ($i = 0; $i <= $floor; ++$i) { + $summer += $mean ** $i / MathTrig::FACT($i); + } + + return exp(0 - $mean) * $summer; + } + + return (exp(0 - $mean) * $mean ** $value) / MathTrig::FACT($value); + } + } + + return Functions::VALUE(); + } + + /** + * QUARTILE. + * + * Returns the quartile of a data set. + * + * Excel Function: + * QUARTILE(value1[,value2[, ...]],entry) + * + * @param mixed $args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function QUARTILE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = floor(array_pop($aArgs)); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $entry /= 4; + if (($entry < 0) || ($entry > 1)) { + return Functions::NAN(); + } + + return self::PERCENTILE($aArgs, $entry); + } + + return Functions::VALUE(); + } + + /** + * RANK. + * + * Returns the rank of a number in a list of numbers. + * + * @param int $value the number whose rank you want to find + * @param float[] $valueSet An array of, or a reference to, a list of numbers + * @param int $order Order to sort the values in the value set + * + * @return float|string The result, or a string containing an error + */ + public static function RANK($value, $valueSet, $order = 0) + { + $value = Functions::flattenSingleValue($value); + $valueSet = Functions::flattenArray($valueSet); + $order = ($order === null) ? 0 : (int) Functions::flattenSingleValue($order); + + foreach ($valueSet as $key => $valueEntry) { + if (!is_numeric($valueEntry)) { + unset($valueSet[$key]); + } + } + + if ($order == 0) { + rsort($valueSet, SORT_NUMERIC); + } else { + sort($valueSet, SORT_NUMERIC); + } + $pos = array_search($value, $valueSet); + if ($pos === false) { + return Functions::NA(); + } + + return ++$pos; + } + + /** + * RSQ. + * + * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float|string The result, or a string containing an error + */ + public static function RSQ($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getGoodnessOfFit(); + } + + /** + * SKEW. + * + * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry + * of a distribution around its mean. Positive skewness indicates a distribution with an + * asymmetric tail extending toward more positive values. Negative skewness indicates a + * distribution with an asymmetric tail extending toward more negative values. + * + * @param array ...$args Data Series + * + * @return float|string The result, or a string containing an error + */ + public static function SKEW(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + $mean = self::AVERAGE($aArgs); + $stdDev = self::STDEV($aArgs); + + $count = $summer = 0; + // Loop through arguments + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summer += (($arg - $mean) / $stdDev) ** 3; + ++$count; + } + } + } + + if ($count > 2) { + return $summer * ($count / (($count - 1) * ($count - 2))); + } + + return Functions::DIV0(); + } + + /** + * SLOPE. + * + * Returns the slope of the linear regression line through data points in known_y's and known_x's. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float|string The result, or a string containing an error + */ + public static function SLOPE($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getSlope(); + } + + /** + * SMALL. + * + * Returns the nth smallest value in a data set. You can use this function to + * select a value based on its relative standing. + * + * Excel Function: + * SMALL(value1[,value2[, ...]],entry) + * + * @param mixed $args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function SMALL(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = array_pop($aArgs); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $count = self::COUNT($mArgs); + $entry = floor(--$entry); + if (($entry < 0) || ($entry >= $count) || ($count == 0)) { + return Functions::NAN(); + } + sort($mArgs); + + return $mArgs[$entry]; + } + + return Functions::VALUE(); + } + + /** + * STANDARDIZE. + * + * Returns a normalized value from a distribution characterized by mean and standard_dev. + * + * @param float $value Value to normalize + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * + * @return float|string Standardized value, or a string containing an error + */ + public static function STANDARDIZE($value, $mean, $stdDev) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if ($stdDev <= 0) { + return Functions::NAN(); + } + + return ($value - $mean) / $stdDev; + } + + return Functions::VALUE(); + } + + /** + * STDEV. + * + * Estimates standard deviation based on a sample. The standard deviation is a measure of how + * widely values are dispersed from the average value (the mean). + * + * Excel Function: + * STDEV(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string The result, or a string containing an error + */ + public static function STDEV(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean !== null) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = ($arg - $aMean) ** 2; + } else { + $returnValue += ($arg - $aMean) ** 2; + } + ++$aCount; + } + } + + // Return + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVA. + * + * Estimates standard deviation based on a sample, including numbers, text, and logical values + * + * Excel Function: + * STDEVA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function STDEVA(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGEA($aArgs); + if ($aMean !== null) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if ($returnValue === null) { + $returnValue = ($arg - $aMean) ** 2; + } else { + $returnValue += ($arg - $aMean) ** 2; + } + ++$aCount; + } + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVP. + * + * Calculates standard deviation based on the entire population + * + * Excel Function: + * STDEVP(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function STDEVP(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean !== null) { + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = ($arg - $aMean) ** 2; + } else { + $returnValue += ($arg - $aMean) ** 2; + } + ++$aCount; + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVPA. + * + * Calculates standard deviation based on the entire population, including numbers, text, and logical values + * + * Excel Function: + * STDEVPA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float|string + */ + public static function STDEVPA(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGEA($aArgs); + if ($aMean !== null) { + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if ($returnValue === null) { + $returnValue = ($arg - $aMean) ** 2; + } else { + $returnValue += ($arg - $aMean) ** 2; + } + ++$aCount; + } + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STEYX. + * + * Returns the standard error of the predicted y-value for each x in the regression. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float|string + */ + public static function STEYX($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getStdevOfResiduals(); + } + + /** + * TDIST. + * + * Returns the probability of Student's T distribution. + * + * @param float $value Value for the function + * @param float $degrees degrees of freedom + * @param float $tails number of tails (1 or 2) + * + * @return float|string The result, or a string containing an error + */ + public static function TDIST($value, $degrees, $tails) + { + $value = Functions::flattenSingleValue($value); + $degrees = floor(Functions::flattenSingleValue($degrees)); + $tails = floor(Functions::flattenSingleValue($tails)); + + if ((is_numeric($value)) && (is_numeric($degrees)) && (is_numeric($tails))) { + if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) { + return Functions::NAN(); + } + // tdist, which finds the probability that corresponds to a given value + // of t with k degrees of freedom. This algorithm is translated from a + // pascal function on p81 of "Statistical Computing in Pascal" by D + // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd: + // London). The above Pascal algorithm is itself a translation of the + // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer + // Laboratory as reported in (among other places) "Applied Statistics + // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis + // Horwood Ltd.; W. Sussex, England). + $tterm = $degrees; + $ttheta = atan2($value, sqrt($tterm)); + $tc = cos($ttheta); + $ts = sin($ttheta); + $tsum = 0; + + if (($degrees % 2) == 1) { + $ti = 3; + $tterm = $tc; + } else { + $ti = 2; + $tterm = 1; + } + + $tsum = $tterm; + while ($ti < $degrees) { + $tterm *= $tc * $tc * ($ti - 1) / $ti; + $tsum += $tterm; + $ti += 2; + } + $tsum *= $ts; + if (($degrees % 2) == 1) { + $tsum = Functions::M_2DIVPI * ($tsum + $ttheta); + } + $tValue = 0.5 * (1 + $tsum); + if ($tails == 1) { + return 1 - abs($tValue); + } + + return 1 - abs((1 - $tValue) - $tValue); + } + + return Functions::VALUE(); + } + + /** + * TINV. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $probability Probability for the function + * @param float $degrees degrees of freedom + * + * @return float|string The result, or a string containing an error + */ + public static function TINV($probability, $degrees) + { + $probability = Functions::flattenSingleValue($probability); + $degrees = floor(Functions::flattenSingleValue($degrees)); + + if ((is_numeric($probability)) && (is_numeric($degrees))) { + $xLo = 100; + $xHi = 0; + + $x = $xNew = 1; + $dx = 1; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $result = self::TDIST($x, $degrees, 2); + $error = $result - $probability; + if ($error == 0.0) { + $dx = 0; + } elseif ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + // Avoid division by zero + if ($result != 0.0) { + $dx = $error / $result; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($x, 12); + } + + return Functions::VALUE(); + } + + /** + * TREND. + * + * Returns values along a linear Trend + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * @param mixed[] $newValues Values of X for which we want to find Y + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * + * @return array of float + */ + public static function TREND($yValues, $xValues = [], $newValues = [], $const = true) + { + $yValues = Functions::flattenArray($yValues); + $xValues = Functions::flattenArray($xValues); + $newValues = Functions::flattenArray($newValues); + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const); + if (empty($newValues)) { + $newValues = $bestFitLinear->getXValues(); + } + + $returnArray = []; + foreach ($newValues as $xValue) { + $returnArray[0][] = $bestFitLinear->getValueOfYForX($xValue); + } + + return $returnArray; + } + + /** + * TRIMMEAN. + * + * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean + * taken by excluding a percentage of data points from the top and bottom tails + * of a data set. + * + * Excel Function: + * TRIMEAN(value1[,value2[, ...]], $discard) + * + * @param mixed $args Data values + * + * @return float|string + */ + public static function TRIMMEAN(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $percent = array_pop($aArgs); + + if ((is_numeric($percent)) && (!is_string($percent))) { + if (($percent < 0) || ($percent > 1)) { + return Functions::NAN(); + } + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $discard = floor(self::COUNT($mArgs) * $percent / 2); + sort($mArgs); + for ($i = 0; $i < $discard; ++$i) { + array_pop($mArgs); + array_shift($mArgs); + } + + return self::AVERAGE($mArgs); + } + + return Functions::VALUE(); + } + + /** + * VARFunc. + * + * Estimates variance based on a sample. + * + * Excel Function: + * VAR(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARFunc(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + $aCount = 0; + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + + if ($aCount > 1) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); + } + + return $returnValue; + } + + /** + * VARA. + * + * Estimates variance based on a sample, including numbers, text, and logical values + * + * Excel Function: + * VARA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARA(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_string($arg)) && + (Functions::isValue($k))) { + return Functions::VALUE(); + } elseif ((is_string($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + } + + if ($aCount > 1) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); + } + + return $returnValue; + } + + /** + * VARP. + * + * Calculates variance based on the entire population + * + * Excel Function: + * VARP(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARP(...$args) + { + // Return value + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + $aCount = 0; + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + + if ($aCount > 0) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * $aCount); + } + + return $returnValue; + } + + /** + * VARPA. + * + * Calculates variance based on the entire population, including numbers, text, and logical values + * + * Excel Function: + * VARPA(value1[,value2[, ...]]) + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARPA(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_string($arg)) && + (Functions::isValue($k))) { + return Functions::VALUE(); + } elseif ((is_string($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + } + + if ($aCount > 0) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * $aCount); + } + + return $returnValue; + } + + /** + * WEIBULL. + * + * Returns the Weibull distribution. Use this distribution in reliability + * analysis, such as calculating a device's mean time to failure. + * + * @param float $value + * @param float $alpha Alpha Parameter + * @param float $beta Beta Parameter + * @param bool $cumulative + * + * @return float + */ + public static function WEIBULL($value, $alpha, $beta, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + + if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta))) { + if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 1 - exp(0 - ($value / $beta) ** $alpha); + } + + return ($alpha / $beta ** $alpha) * $value ** ($alpha - 1) * exp(0 - ($value / $beta) ** $alpha); + } + } + + return Functions::VALUE(); + } + + /** + * ZTEST. + * + * Returns the Weibull distribution. Use this distribution in reliability + * analysis, such as calculating a device's mean time to failure. + * + * @param float $dataSet + * @param float $m0 Alpha Parameter + * @param float $sigma Beta Parameter + * + * @return float|string + */ + public static function ZTEST($dataSet, $m0, $sigma = null) + { + $dataSet = Functions::flattenArrayIndexed($dataSet); + $m0 = Functions::flattenSingleValue($m0); + $sigma = Functions::flattenSingleValue($sigma); + + if ($sigma === null) { + $sigma = self::STDEV($dataSet); + } + $n = count($dataSet); + + return 1 - self::NORMSDIST((self::AVERAGE($dataSet) - $m0) / ($sigma / sqrt($n))); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/TextData.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/TextData.php new file mode 100755 index 0000000..8f4b7d8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/TextData.php @@ -0,0 +1,674 @@ + 1) { + $character = mb_substr($characters, 0, 1, 'UTF-8'); + } + + return self::unicodeToOrd($character); + } + + /** + * CONCATENATE. + * + * @return string + */ + public static function CONCATENATE(...$args) + { + $returnValue = ''; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + $arg = self::convertBooleanValue($arg); + } + $returnValue .= $arg; + } + + return $returnValue; + } + + /** + * DOLLAR. + * + * This function converts a number to text using currency format, with the decimals rounded to the specified place. + * The format used is $#,##0.00_);($#,##0.00).. + * + * @param float $value The value to format + * @param int $decimals The number of digits to display to the right of the decimal point. + * If decimals is negative, number is rounded to the left of the decimal point. + * If you omit decimals, it is assumed to be 2 + * + * @return string + */ + public static function DOLLAR($value = 0, $decimals = 2) + { + $value = Functions::flattenSingleValue($value); + $decimals = $decimals === null ? 0 : Functions::flattenSingleValue($decimals); + + // Validate parameters + if (!is_numeric($value) || !is_numeric($decimals)) { + return Functions::NAN(); + } + $decimals = floor($decimals); + + $mask = '$#,##0'; + if ($decimals > 0) { + $mask .= '.' . str_repeat('0', $decimals); + } else { + $round = 10 ** abs($decimals); + if ($value < 0) { + $round = 0 - $round; + } + $value = MathTrig::MROUND($value, $round); + } + + return NumberFormat::toFormattedString($value, $mask); + } + + /** + * SEARCHSENSITIVE. + * + * @param string $needle The string to look for + * @param string $haystack The string in which to look + * @param int $offset Offset within $haystack + * + * @return string + */ + public static function SEARCHSENSITIVE($needle, $haystack, $offset = 1) + { + $needle = Functions::flattenSingleValue($needle); + $haystack = Functions::flattenSingleValue($haystack); + $offset = Functions::flattenSingleValue($offset); + + if (!is_bool($needle)) { + if (is_bool($haystack)) { + $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) { + if (StringHelper::countCharacters($needle) === 0) { + return $offset; + } + + $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8'); + if ($pos !== false) { + return ++$pos; + } + } + } + + return Functions::VALUE(); + } + + /** + * SEARCHINSENSITIVE. + * + * @param string $needle The string to look for + * @param string $haystack The string in which to look + * @param int $offset Offset within $haystack + * + * @return string + */ + public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1) + { + $needle = Functions::flattenSingleValue($needle); + $haystack = Functions::flattenSingleValue($haystack); + $offset = Functions::flattenSingleValue($offset); + + if (!is_bool($needle)) { + if (is_bool($haystack)) { + $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) { + if (StringHelper::countCharacters($needle) === 0) { + return $offset; + } + + $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8'); + if ($pos !== false) { + return ++$pos; + } + } + } + + return Functions::VALUE(); + } + + /** + * FIXEDFORMAT. + * + * @param mixed $value Value to check + * @param int $decimals + * @param bool $no_commas + * + * @return string + */ + public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false) + { + $value = Functions::flattenSingleValue($value); + $decimals = Functions::flattenSingleValue($decimals); + $no_commas = Functions::flattenSingleValue($no_commas); + + // Validate parameters + if (!is_numeric($value) || !is_numeric($decimals)) { + return Functions::NAN(); + } + $decimals = (int) floor($decimals); + + $valueResult = round($value, $decimals); + if ($decimals < 0) { + $decimals = 0; + } + if (!$no_commas) { + $valueResult = number_format( + $valueResult, + $decimals, + StringHelper::getDecimalSeparator(), + StringHelper::getThousandsSeparator() + ); + } + + return (string) $valueResult; + } + + /** + * LEFT. + * + * @param string $value Value + * @param int $chars Number of characters + * + * @return string + */ + public static function LEFT($value = '', $chars = 1) + { + $value = Functions::flattenSingleValue($value); + $chars = Functions::flattenSingleValue($chars); + + if ($chars < 0) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_substr($value, 0, $chars, 'UTF-8'); + } + + /** + * MID. + * + * @param string $value Value + * @param int $start Start character + * @param int $chars Number of characters + * + * @return string + */ + public static function MID($value = '', $start = 1, $chars = null) + { + $value = Functions::flattenSingleValue($value); + $start = Functions::flattenSingleValue($start); + $chars = Functions::flattenSingleValue($chars); + + if (($start < 1) || ($chars < 0)) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (empty($chars)) { + return ''; + } + + return mb_substr($value, --$start, $chars, 'UTF-8'); + } + + /** + * RIGHT. + * + * @param string $value Value + * @param int $chars Number of characters + * + * @return string + */ + public static function RIGHT($value = '', $chars = 1) + { + $value = Functions::flattenSingleValue($value); + $chars = Functions::flattenSingleValue($chars); + + if ($chars < 0) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8'); + } + + /** + * STRINGLENGTH. + * + * @param string $value Value + * + * @return int + */ + public static function STRINGLENGTH($value = '') + { + $value = Functions::flattenSingleValue($value); + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_strlen($value, 'UTF-8'); + } + + /** + * LOWERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function LOWERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToLower($mixedCaseString); + } + + /** + * UPPERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function UPPERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToUpper($mixedCaseString); + } + + /** + * PROPERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function PROPERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToTitle($mixedCaseString); + } + + /** + * REPLACE. + * + * @param string $oldText String to modify + * @param int $start Start character + * @param int $chars Number of characters + * @param string $newText String to replace in defined position + * + * @return string + */ + public static function REPLACE($oldText, $start, $chars, $newText) + { + $oldText = Functions::flattenSingleValue($oldText); + $start = Functions::flattenSingleValue($start); + $chars = Functions::flattenSingleValue($chars); + $newText = Functions::flattenSingleValue($newText); + + $left = self::LEFT($oldText, $start - 1); + $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1); + + return $left . $newText . $right; + } + + /** + * SUBSTITUTE. + * + * @param string $text Value + * @param string $fromText From Value + * @param string $toText To Value + * @param int $instance Instance Number + * + * @return string + */ + public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) + { + $text = Functions::flattenSingleValue($text); + $fromText = Functions::flattenSingleValue($fromText); + $toText = Functions::flattenSingleValue($toText); + $instance = floor(Functions::flattenSingleValue($instance)); + + if ($instance == 0) { + return str_replace($fromText, $toText, $text); + } + + $pos = -1; + while ($instance > 0) { + $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8'); + if ($pos === false) { + break; + } + --$instance; + } + + if ($pos !== false) { + return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText); + } + + return $text; + } + + /** + * RETURNSTRING. + * + * @param mixed $testValue Value to check + * + * @return null|string + */ + public static function RETURNSTRING($testValue = '') + { + $testValue = Functions::flattenSingleValue($testValue); + + if (is_string($testValue)) { + return $testValue; + } + + return null; + } + + /** + * TEXTFORMAT. + * + * @param mixed $value Value to check + * @param string $format Format mask to use + * + * @return string + */ + public static function TEXTFORMAT($value, $format) + { + $value = Functions::flattenSingleValue($value); + $format = Functions::flattenSingleValue($format); + + if ((is_string($value)) && (!is_numeric($value)) && Date::isDateTimeFormatCode($format)) { + $value = DateTime::DATEVALUE($value); + } + + return (string) NumberFormat::toFormattedString($value, $format); + } + + /** + * VALUE. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function VALUE($value = '') + { + $value = Functions::flattenSingleValue($value); + + if (!is_numeric($value)) { + $numberValue = str_replace( + StringHelper::getThousandsSeparator(), + '', + trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode()) + ); + if (is_numeric($numberValue)) { + return (float) $numberValue; + } + + $dateSetting = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + if (strpos($value, ':') !== false) { + $timeValue = DateTime::TIMEVALUE($value); + if ($timeValue !== Functions::VALUE()) { + Functions::setReturnDateType($dateSetting); + + return $timeValue; + } + } + $dateValue = DateTime::DATEVALUE($value); + if ($dateValue !== Functions::VALUE()) { + Functions::setReturnDateType($dateSetting); + + return $dateValue; + } + Functions::setReturnDateType($dateSetting); + + return Functions::VALUE(); + } + + return (float) $value; + } + + /** + * NUMBERVALUE. + * + * @param mixed $value Value to check + * @param string $decimalSeparator decimal separator, defaults to locale defined value + * @param string $groupSeparator group/thosands separator, defaults to locale defined value + * + * @return float|string + */ + public static function NUMBERVALUE($value = '', $decimalSeparator = null, $groupSeparator = null) + { + $value = Functions::flattenSingleValue($value); + $decimalSeparator = Functions::flattenSingleValue($decimalSeparator); + $groupSeparator = Functions::flattenSingleValue($groupSeparator); + + if (!is_numeric($value)) { + $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator; + $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator; + + $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE); + if ($decimalPositions > 1) { + return Functions::VALUE(); + } + $decimalOffset = array_pop($matches[0])[1]; + if (strpos($value, $groupSeparator, $decimalOffset) !== false) { + return Functions::VALUE(); + } + + $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value); + + // Handle the special case of trailing % signs + $percentageString = rtrim($value, '%'); + if (!is_numeric($percentageString)) { + return Functions::VALUE(); + } + + $percentageAdjustment = strlen($value) - strlen($percentageString); + if ($percentageAdjustment) { + $value = (float) $percentageString; + $value /= 10 ** ($percentageAdjustment * 2); + } + } + + return (float) $value; + } + + /** + * Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. + * EXACT is case-sensitive but ignores formatting differences. + * Use EXACT to test text being entered into a document. + * + * @param $value1 + * @param $value2 + * + * @return bool + */ + public static function EXACT($value1, $value2) + { + $value1 = Functions::flattenSingleValue($value1); + $value2 = Functions::flattenSingleValue($value2); + + return (string) $value2 === (string) $value1; + } + + /** + * TEXTJOIN. + * + * @param mixed $delimiter + * @param mixed $ignoreEmpty + * @param mixed $args + * + * @return string + */ + public static function TEXTJOIN($delimiter, $ignoreEmpty, ...$args) + { + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $key => &$arg) { + if ($ignoreEmpty && trim($arg) == '') { + unset($aArgs[$key]); + } elseif (is_bool($arg)) { + $arg = self::convertBooleanValue($arg); + } + } + + return implode($delimiter, $aArgs); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Token/Stack.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Token/Stack.php new file mode 100755 index 0000000..941e1ad --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Token/Stack.php @@ -0,0 +1,149 @@ +count; + } + + /** + * Push a new entry onto the stack. + * + * @param mixed $type + * @param mixed $value + * @param mixed $reference + * @param null|string $storeKey will store the result under this alias + * @param null|string $onlyIf will only run computation if the matching + * store key is true + * @param null|string $onlyIfNot will only run computation if the matching + * store key is false + */ + public function push( + $type, + $value, + $reference = null, + $storeKey = null, + $onlyIf = null, + $onlyIfNot = null + ): void { + $stackItem = $this->getStackItem($type, $value, $reference, $storeKey, $onlyIf, $onlyIfNot); + + $this->stack[$this->count++] = $stackItem; + + if ($type == 'Function') { + $localeFunction = Calculation::localeFunc($value); + if ($localeFunction != $value) { + $this->stack[($this->count - 1)]['localeValue'] = $localeFunction; + } + } + } + + public function getStackItem( + $type, + $value, + $reference = null, + $storeKey = null, + $onlyIf = null, + $onlyIfNot = null + ) { + $stackItem = [ + 'type' => $type, + 'value' => $value, + 'reference' => $reference, + ]; + + if (isset($storeKey)) { + $stackItem['storeKey'] = $storeKey; + } + + if (isset($onlyIf)) { + $stackItem['onlyIf'] = $onlyIf; + } + + if (isset($onlyIfNot)) { + $stackItem['onlyIfNot'] = $onlyIfNot; + } + + return $stackItem; + } + + /** + * Pop the last entry from the stack. + * + * @return mixed + */ + public function pop() + { + if ($this->count > 0) { + return $this->stack[--$this->count]; + } + + return null; + } + + /** + * Return an entry from the stack without removing it. + * + * @param int $n number indicating how far back in the stack we want to look + * + * @return mixed + */ + public function last($n = 1) + { + if ($this->count - $n < 0) { + return null; + } + + return $this->stack[$this->count - $n]; + } + + /** + * Clear the stack. + */ + public function clear(): void + { + $this->stack = []; + $this->count = 0; + } + + public function __toString() + { + $str = 'Stack: '; + foreach ($this->stack as $index => $item) { + if ($index > $this->count - 1) { + break; + } + $value = $item['value'] ?? 'no value'; + while (is_array($value)) { + $value = array_pop($value); + } + $str .= $value . ' |> '; + } + + return $str; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Web.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Web.php new file mode 100755 index 0000000..5cfd2ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/Web.php @@ -0,0 +1,53 @@ + 2048) { + return Functions::VALUE(); // Invalid URL length + } + + if (!preg_match('/^http[s]?:\/\//', $url)) { + return Functions::VALUE(); // Invalid protocol + } + + // Get results from the the webservice + $client = Settings::getHttpClient(); + $requestFactory = Settings::getRequestFactory(); + $request = $requestFactory->createRequest('GET', $url); + + try { + $response = $client->sendRequest($request); + } catch (ClientExceptionInterface $e) { + return Functions::VALUE(); // cURL error + } + + if ($response->getStatusCode() != 200) { + return Functions::VALUE(); // cURL error + } + + $output = $response->getBody()->getContents(); + if (strlen($output) > 32767) { + return Functions::VALUE(); // Output not a string or too long + } + + return $output; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/functionlist.txt b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/functionlist.txt new file mode 100755 index 0000000..e71d18f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/functionlist.txt @@ -0,0 +1,395 @@ +ABS +ACCRINT +ACCRINTM +ACOS +ACOSH +ACOT +ACOTH +ADDRESS +AMORDEGRC +AMORLINC +AND +ARABIC +AREAS +ASC +ASIN +ASINH +ATAN +ATAN2 +ATANH +AVEDEV +AVERAGE +AVERAGEA +AVERAGEIF +AVERAGEIFS +BAHTTEXT +BASE +BESSELI +BESSELJ +BESSELK +BESSELY +BETADIST +BETAINV +BIN2DEC +BIN2HEX +BIN2OCT +BINOMDIST +BITAND +BITLSHIFT +BITOR +BITRSHIFT +BITXOR +CEILING +CELL +CHAR +CHIDIST +CHIINV +CHITEST +CHOOSE +CLEAN +CODE +COLUMN +COLUMNS +COMBIN +COMPLEX +CONCAT +CONCATENATE +CONFIDENCE +CONVERT +CORREL +COS +COSH +COT +COTH +COUNT +COUNTA +COUNTBLANK +COUNTIF +COUNTIFS +COUPDAYBS +COUPDAYBS +COUPDAYSNC +COUPNCD +COUPNUM +COUPPCD +COVAR +CRITBINOM +CSC +CSCH +CUBEKPIMEMBER +CUBEMEMBER +CUBEMEMBERPROPERTY +CUBERANKEDMEMBER +CUBESET +CUBESETCOUNT +CUBEVALUE +CUMIPMT +CUMPRINC +DATE +DATEDIF +DATEVALUE +DAVERAGE +DAY +DAYS +DAYS360 +DB +DCOUNT +DCOUNTA +DDB +DEC2BIN +DEC2HEX +DEC2OCT +DEGREES +DELTA +DEVSQ +DGET +DISC +DMAX +DMIN +DOLLAR +DOLLARDE +DOLLARFR +DPRODUCT +DSTDEV +DSTDEVP +DSUM +DURATION +DVAR +DVARP +EDATE +EFFECT +EOMONTH +ERF +ERF.PRECISE +ERFC +ERFC.PRECISE +ERROR.TYPE +EVEN +EXACT +EXP +EXPONDIST +FACT +FACTDOUBLE +FALSE +FDIST +FIND +FINDB +FINV +FISHER +FISHERINV +FIXED +FLOOR +FLOOR.MATH +FLOOR.PRECISE +FORECAST +FREQUENCY +FTEST +FV +FVSCHEDULE +GAMAMDIST +GAMMAINV +GAMMALN +GCD +GEOMEAN +GESTEP +GETPIVOTDATA +GROWTH +HARMEAN +HEX2BIN +HEX2OCT +HLOOKUP +HOUR +HYPERLINK +HYPGEOMDIST +IF +IFERROR +IFS +IMABS +IMAGINARY +IMARGUMENT +IMCONJUGATE +IMCOS +IMCOSH +IMCOT +IMCSC +IMCSCH +IMEXP +IMLN +IMLOG10 +IMLOG2 +IMPOWER +IMPRODUCT +IMREAL +IMSEC +IMSECH +IMSIN +IMSINH +IMSQRT +IMSUB +IMSUM +IMTAN +INDEX +INDIRECT +INFO +INT +INTERCEPT +INTRATE +IPMT +IRR +ISBLANK +ISERR +ISERROR +ISEVEN +ISLOGICAL +ISNA +ISNONTEXT +ISNUMBER +ISODD +ISOWEEKNUM +ISPMT +ISREF +ISTEXT +JIS +KURT +LARGE +LCM +LEFT +LEFTB +LEN +LENB +LINEST +LN +LOG +LOG10 +LOGEST +LOGINV +LOGNORMDIST +LOOKUP +LOWER +MATCH +MAX +MAXA +MAXIFS +MDETERM +MDURATION +MEDIAN +MID +MIDB +MIN +MINA +MINIFS +MINUTE +MINVERSE +MIRR +MMULT +MOD +MODE +MONTH +MROUND +MULTINOMIAL +N +NA +NEGBINOMDIST +NETWORKDAYS +NOMINAL +NORMDIST +NORMINV +NORMSDIST +NORMSINV +NOT +NOW +NPER +NPV +NUMBERVALUE +OCT2BIN +OCT2DEC +OCT2HEX +ODD +ODDFPRICE +ODDFYIELD +ODDLPRICE +ODDLYIELD +OFFSET +OR +PDURATION +PEARSON +PERCENTILE +PERCENTRANK +PERMUT +PHONETIC +PI +PMT +POISSON +POWER +PPMT +PRICE +PRICEDISC +PRICEMAT +PROB +PRODUCT +PROPER +PV +QUARTILE +QUOTIENT +RADIANS +RAND +RANDBETWEEN +RANK +RATE +RECEIVED +REPLACE +REPLACEB +REPT +RIGHT +RIGHTB +ROMAN +ROUND +ROUNDDOWN +ROUNDUP +ROW +ROWS +RRI +RSQ +RTD +SEARCH +SEARCHB +SEC +SECH +SECOND +SERIESSUM +SHEET +SHEETS +SIGN +SIN +SINH +SKEW +SLN +SLOPE +SMALL +SQRT +SQRTPI +STANDARDIZE +STDEV +STDEV.A +STDEV.P +STDEVA +STDEVP +STDEVPA +STEYX +SUBSTITUTE +SUBTOTAL +SUM +SUMIF +SUMIFS +SUMPRODUCT +SUMSQ +SUMX2MY2 +SUMX2PY2 +SUMXMY2 +SWITCH +SYD +T +TAN +TANH +TBILLEQ +TBILLPRICE +TBILLYIELD +TDIST +TEXT +TEXTJOIN +TIME +TIMEVALUE +TINV +TODAY +TRANSPOSE +TREND +TRIM +TRIMMEAN +TRUE +TRUNC +TTEST +TYPE +UNICHAR +UNIORD +UPPER +USDOLLAR +VALUE +VAR +VARA +VARP +VARPA +VDB +VLOOKUP +WEEKDAY +WEEKNUM +WEIBULL +WORKDAY +XIRR +XNPV +XOR +YEAR +YEARFRAC +YIELD +YIELDDISC +YIELDMAT +ZTEST diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/config new file mode 100755 index 0000000..86f94d3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/config @@ -0,0 +1,27 @@ +## +## PhpSpreadsheet +## +## +## + + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = лв + + +## +## Excel Error Codes (For future use) + +## +NULL = #ПРАЗНО! +DIV0 = #ДЕЛ/0! +VALUE = #СТОЙНОСТ! +REF = #РЕФ! +NAME = #ИМЕ? +NUM = #ЧИСЛО! +NA = #Н/Д diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/functions new file mode 100755 index 0000000..4bc1574 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/bg/functions @@ -0,0 +1,417 @@ +## +## PhpSpreadsheet +## +## +## Data in this file derived from information provided by web-junior (http://www.web-junior.net/) +## +## + + +## +## Add-in and Automation functions Функции надстроек и автоматизации +## +GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы. + + +## +## Cube functions Функции Куб +## +CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации. +CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе. +CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента. +CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов. +CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel. +CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества. +CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба. + + +## +## Database functions Функции для работы с базами данных +## +DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных. +DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных. +DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных. +DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию. +DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных. +DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных. +DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию. +DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных. +DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных +DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию. +DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных +DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных + + +## +## Date and time functions Функции даты и времени +## +DATE = ДАТА ## Возвращает заданную дату в числовом формате. +DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат. +DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца. +DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года. +EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты. +EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев. +HOUR = ЧАС ## Преобразует дату в числовом формате в часы. +MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты. +MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы. +NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами. +NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате. +SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды. +TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате. +TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат. +TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате. +WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели. +WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата. +WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней. +YEAR = ГОД ## Преобразует дату в числовом формате в год. +YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами. + + +## +## Engineering functions Инженерные функции +## +BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x). +BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x). +BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x). +BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x). +BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное. +BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное. +BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное. +COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число. +CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую. +DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное. +DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное. +DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное. +DELTA = ДЕЛЬТА ## Проверяет равенство двух значений. +ERF = ФОШ ## Возвращает функцию ошибки. +ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки. +GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения. +HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное. +HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное. +HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное. +IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа. +IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа. +IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах. +IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число. +IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа. +IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел. +IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа. +IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа. +IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа. +IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа. +IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень. +IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел. +IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа. +IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа. +IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа. +IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел. +IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел. +OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное. +OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное. +OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное. + + +## +## Financial functions Финансовые функции +## +ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов. +ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения. +AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации. +AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода. +COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения. +COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения. +COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона. +COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения. +COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу. +COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения. +CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами. +CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами. +DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка. +DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод. +DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг. +DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом. +DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби. +DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам. +EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки. +FV = БС ## Возвращает будущую стоимость инвестиции. +FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов. +INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг. +IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период. +IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств. +ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции. +MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей. +MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки. +NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку. +NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада. +NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования. +ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом. +ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом. +ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом. +ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом. +PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета. +PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период. +PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов. +PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка. +PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения. +PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции. +RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период. +RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг. +SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период. +SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел. +TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку. +TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека. +TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку. +VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса. +XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер. +XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими. +YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов. +YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки). +YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения. + + +## +## Information functions Информационные функции +## +CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки. +ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки. +INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде. +ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку. +ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д. +ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки. +ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом. +ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение. +ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д. +ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом. +ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число. +ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом. +ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой. +ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом. +N = Ч ## Возвращает значение, преобразованное в число. +NA = НД ## Возвращает значение ошибки #Н/Д. +TYPE = ТИП ## Возвращает число, обозначающее тип данных значения. + + +## +## Logical functions Логические функции +## +AND = И ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ. +IF = ЕСЛИ ## Выполняет проверку условия. +IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления. +NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное. +OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА. +TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА. + + +## +## Lookup and reference functions Функции ссылки и поиска +## +ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста. +AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке. +CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу. +COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка. +COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке. +HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки +HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете. +INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива. +INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением. +LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве. +MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве. +OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки. +ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой. +ROWS = ЧСТРОК ## Возвращает количество строк в ссылке. +RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).). +TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив. +VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце. + + +## +## Math and trigonometry functions Математические и тригонометрические функции +## +ABS = ABS ## Возвращает модуль (абсолютную величину) числа. +ACOS = ACOS ## Возвращает арккосинус числа. +ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа. +ASIN = ASIN ## Возвращает арксинус числа. +ASINH = ASINH ## Возвращает гиперболический арксинус числа. +ATAN = ATAN ## Возвращает арктангенс числа. +ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y. +ATANH = ATANH ## Возвращает гиперболический арктангенс числа. +CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению. +COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов. +COS = COS ## Возвращает косинус числа. +COSH = COSH ## Возвращает гиперболический косинус числа. +DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы. +EVEN = ЧЁТН ## Округляет число до ближайшего четного целого. +EXP = EXP ## Возвращает число e, возведенное в указанную степень. +FACT = ФАКТР ## Возвращает факториал числа. +FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа. +FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +GCD = НОД ## Возвращает наибольший общий делитель. +INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого. +LCM = НОК ## Возвращает наименьшее общее кратное. +LN = LN ## Возвращает натуральный логарифм числа. +LOG = LOG ## Возвращает логарифм числа по заданному основанию. +LOG10 = LOG10 ## Возвращает десятичный логарифм числа. +MDETERM = МОПРЕД ## Возвращает определитель матрицы массива. +MINVERSE = МОБР ## Возвращает обратную матрицу массива. +MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов. +MOD = ОСТАТ ## Возвращает остаток от деления. +MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью. +MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел. +ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого. +PI = ПИ ## Возвращает число пи. +POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень. +PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов. +QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении. +RADIANS = РАДИАНЫ ## Преобразует градусы в радианы. +RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1. +RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами. +ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста. +ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов. +ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения. +SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле. +SIGN = ЗНАК ## Возвращает знак числа. +SIN = SIN ## Возвращает синус заданного угла. +SINH = SINH ## Возвращает гиперболический синус числа. +SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня. +SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ). +SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных. +SUM = СУММ ## Суммирует аргументы. +SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию. +SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям. +SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов. +SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов. +SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах. +SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов. +SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах. +TAN = TAN ## Возвращает тангенс числа. +TANH = TANH ## Возвращает гиперболический тангенс числа. +TRUNC = ОТБР ## Отбрасывает дробную часть числа. + + +## +## Statistical functions Статистические функции +## +AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего. +AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов. +AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения. +AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию. +AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям. +BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения. +BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения. +BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения. +CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат. +CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат. +CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость. +CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности. +CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных. +COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов. +COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов. +COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне +COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию +COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям. +COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений +CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию. +DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений. +EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение. +FDIST = FРАСП ## Возвращает F-распределение вероятности. +FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности. +FISHER = ФИШЕР ## Возвращает преобразование Фишера. +FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера. +FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда. +FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива. +FTEST = ФТЕСТ ## Возвращает результат F-теста. +GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение. +GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение. +GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x). +GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое. +GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом. +HARMEAN = СРГАРМ ## Возвращает среднее гармоническое. +HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение. +INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии. +KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных. +LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных. +LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда. +LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда. +LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение. +LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение. +MAX = МАКС ## Возвращает наибольшее значение в списке аргументов. +MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения. +MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел. +MIN = МИН ## Возвращает наименьшее значение в списке аргументов. +MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения. +MODE = МОДА ## Возвращает значение моды множества данных. +NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение. +NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения. +NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение. +NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение. +NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения. +PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона. +PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона. +PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных. +PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов. +POISSON = ПУАССОН ## Возвращает распределение Пуассона. +PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов. +QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных. +RANK = РАНГ ## Возвращает ранг числа в списке чисел. +RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона. +SKEW = СКОС ## Возвращает асимметрию распределения. +SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии. +SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных. +STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение. +STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке. +STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения. +STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности. +STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения. +STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии. +TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента. +TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента. +TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом. +TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных. +TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента. +VAR = ДИСП ## Оценивает дисперсию по выборке. +VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения. +VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности. +VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения. +WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла. +ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста. + + +## +## Text functions Текстовые функции +## +ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые). +BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ). +CHAR = СИМВОЛ ## Возвращает знак с заданным кодом. +CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста. +CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке. +CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один. +DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат. +EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений. +FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков. +JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые). +LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения. +LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения. +LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке. +LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке. +LOWER = СТРОЧН ## Преобразует все буквы текста в строчные. +MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки. +PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную. +REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте. +REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте. +REPT = ПОВТОР ## Повторяет текст заданное число раз. +RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки. +RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки. +SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым. +T = Т ## Преобразует аргументы в текст. +TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст. +TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы. +UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные. +VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/config new file mode 100755 index 0000000..df51373 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/config @@ -0,0 +1,23 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = Kč + + +## +## Excel Error Codes (For future use) +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #HODNOTA! +REF = #REF! +NAME = #NÁZEV? +NUM = #NUM! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/functions new file mode 100755 index 0000000..733d406 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/cs/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funkce doplňků a automatizace +## +GETPIVOTDATA = ZÍSKATKONTDATA ## Vrátí data uložená v kontingenční tabulce. Pomocí funkce ZÍSKATKONTDATA můžete načíst souhrnná data z kontingenční tabulky, pokud jsou tato data v kontingenční sestavě zobrazena. + + +## +## Cube functions Funkce pro práci s krychlemi +## +CUBEKPIMEMBER = CUBEKPIMEMBER ## Vrátí název, vlastnost a velikost klíčového ukazatele výkonu (KUV) a zobrazí v buňce název a vlastnost. Klíčový ukazatel výkonu je kvantifikovatelná veličina, například hrubý měsíční zisk nebo čtvrtletní obrat na zaměstnance, která se používá pro sledování výkonnosti organizace. +CUBEMEMBER = CUBEMEMBER ## Vrátí člen nebo n-tici v hierarchii krychle. Slouží k ověření, zda v krychli existuje člen nebo n-tice. +CUBEMEMBERPROPERTY = CUBEMEMBERPROPERTY ## Vrátí hodnotu vlastnosti člena v krychli. Slouží k ověření, zda v krychli existuje člen s daným názvem, a k vrácení konkrétní vlastnosti tohoto člena. +CUBERANKEDMEMBER = CUBERANKEDMEMBER ## Vrátí n-tý nebo pořadový člen sady. Použijte ji pro vrácení jednoho nebo více prvků sady, například obchodníka s nejvyšším obratem nebo deseti nejlepších studentů. +CUBESET = CUBESET ## Definuje vypočtenou sadu členů nebo n-tic odesláním výrazu sady do krychle na serveru, který vytvoří sadu a potom ji vrátí do aplikace Microsoft Office Excel. +CUBESETCOUNT = CUBESETCOUNT ## Vrátí počet položek v množině +CUBEVALUE = CUBEVALUE ## Vrátí úhrnnou hodnotu z krychle. + + +## +## Database functions Funkce databáze +## +DAVERAGE = DPRŮMĚR ## Vrátí průměr vybraných položek databáze. +DCOUNT = DPOČET ## Spočítá buňky databáze obsahující čísla. +DCOUNTA = DPOČET2 ## Spočítá buňky databáze, které nejsou prázdné. +DGET = DZÍSKAT ## Extrahuje z databáze jeden záznam splňující zadaná kritéria. +DMAX = DMAX ## Vrátí maximální hodnotu z vybraných položek databáze. +DMIN = DMIN ## Vrátí minimální hodnotu z vybraných položek databáze. +DPRODUCT = DSOUČIN ## Vynásobí hodnoty určitého pole záznamů v databázi, které splňují daná kritéria. +DSTDEV = DSMODCH.VÝBĚR ## Odhadne směrodatnou odchylku výběru vybraných položek databáze. +DSTDEVP = DSMODCH ## Vypočte směrodatnou odchylku základního souboru vybraných položek databáze. +DSUM = DSUMA ## Sečte čísla ve sloupcovém poli záznamů databáze, která splňují daná kritéria. +DVAR = DVAR.VÝBĚR ## Odhadne rozptyl výběru vybraných položek databáze. +DVARP = DVAR ## Vypočte rozptyl základního souboru vybraných položek databáze. + + +## +## Date and time functions Funkce data a času +## +DATE = DATUM ## Vrátí pořadové číslo určitého data. +DATEVALUE = DATUMHODN ## Převede datum ve formě textu na pořadové číslo. +DAY = DEN ## Převede pořadové číslo na den v měsíci. +DAYS360 = ROK360 ## Vrátí počet dní mezi dvěma daty na základě roku s 360 dny. +EDATE = EDATE ## Vrátí pořadové číslo data, které označuje určený počet měsíců před nebo po počátečním datu. +EOMONTH = EOMONTH ## Vrátí pořadové číslo posledního dne měsíce před nebo po zadaném počtu měsíců. +HOUR = HODINA ## Převede pořadové číslo na hodinu. +MINUTE = MINUTA ## Převede pořadové číslo na minutu. +MONTH = MĚSÍC ## Převede pořadové číslo na měsíc. +NETWORKDAYS = NETWORKDAYS ## Vrátí počet celých pracovních dní mezi dvěma daty. +NOW = NYNÍ ## Vrátí pořadové číslo aktuálního data a času. +SECOND = SEKUNDA ## Převede pořadové číslo na sekundu. +TIME = ČAS ## Vrátí pořadové číslo určitého času. +TIMEVALUE = ČASHODN ## Převede čas ve formě textu na pořadové číslo. +TODAY = DNES ## Vrátí pořadové číslo dnešního data. +WEEKDAY = DENTÝDNE ## Převede pořadové číslo na den v týdnu. +WEEKNUM = WEEKNUM ## Převede pořadové číslo na číslo představující číselnou pozici týdne v roce. +WORKDAY = WORKDAY ## Vrátí pořadové číslo data před nebo po zadaném počtu pracovních dní. +YEAR = ROK ## Převede pořadové číslo na rok. +YEARFRAC = YEARFRAC ## Vrátí část roku vyjádřenou zlomkem a představující počet celých dní mezi počátečním a koncovým datem. + + +## +## Engineering functions Inženýrské funkce (Technické funkce) +## +BESSELI = BESSELI ## Vrátí modifikovanou Besselovu funkci In(x). +BESSELJ = BESSELJ ## Vrátí modifikovanou Besselovu funkci Jn(x). +BESSELK = BESSELK ## Vrátí modifikovanou Besselovu funkci Kn(x). +BESSELY = BESSELY ## Vrátí Besselovu funkci Yn(x). +BIN2DEC = BIN2DEC ## Převede binární číslo na desítkové. +BIN2HEX = BIN2HEX ## Převede binární číslo na šestnáctkové. +BIN2OCT = BIN2OCT ## Převede binární číslo na osmičkové. +COMPLEX = COMPLEX ## Převede reálnou a imaginární část na komplexní číslo. +CONVERT = CONVERT ## Převede číslo do jiného jednotkového měrného systému. +DEC2BIN = DEC2BIN ## Převede desítkového čísla na dvojkové +DEC2HEX = DEC2HEX ## Převede desítkové číslo na šestnáctkové. +DEC2OCT = DEC2OCT ## Převede desítkové číslo na osmičkové. +DELTA = DELTA ## Testuje rovnost dvou hodnot. +ERF = ERF ## Vrátí chybovou funkci. +ERFC = ERFC ## Vrátí doplňkovou chybovou funkci. +GESTEP = GESTEP ## Testuje, zda je číslo větší než mezní hodnota. +HEX2BIN = HEX2BIN ## Převede šestnáctkové číslo na binární. +HEX2DEC = HEX2DEC ## Převede šestnáctkové číslo na desítkové. +HEX2OCT = HEX2OCT ## Převede šestnáctkové číslo na osmičkové. +IMABS = IMABS ## Vrátí absolutní hodnotu (modul) komplexního čísla. +IMAGINARY = IMAGINARY ## Vrátí imaginární část komplexního čísla. +IMARGUMENT = IMARGUMENT ## Vrátí argument théta, úhel vyjádřený v radiánech. +IMCONJUGATE = IMCONJUGATE ## Vrátí komplexně sdružené číslo ke komplexnímu číslu. +IMCOS = IMCOS ## Vrátí kosinus komplexního čísla. +IMDIV = IMDIV ## Vrátí podíl dvou komplexních čísel. +IMEXP = IMEXP ## Vrátí exponenciální tvar komplexního čísla. +IMLN = IMLN ## Vrátí přirozený logaritmus komplexního čísla. +IMLOG10 = IMLOG10 ## Vrátí dekadický logaritmus komplexního čísla. +IMLOG2 = IMLOG2 ## Vrátí logaritmus komplexního čísla při základu 2. +IMPOWER = IMPOWER ## Vrátí komplexní číslo umocněné na celé číslo. +IMPRODUCT = IMPRODUCT ## Vrátí součin komplexních čísel. +IMREAL = IMREAL ## Vrátí reálnou část komplexního čísla. +IMSIN = IMSIN ## Vrátí sinus komplexního čísla. +IMSQRT = IMSQRT ## Vrátí druhou odmocninu komplexního čísla. +IMSUB = IMSUB ## Vrátí rozdíl mezi dvěma komplexními čísly. +IMSUM = IMSUM ## Vrátí součet dvou komplexních čísel. +OCT2BIN = OCT2BIN ## Převede osmičkové číslo na binární. +OCT2DEC = OCT2DEC ## Převede osmičkové číslo na desítkové. +OCT2HEX = OCT2HEX ## Převede osmičkové číslo na šestnáctkové. + + +## +## Financial functions Finanční funkce +## +ACCRINT = ACCRINT ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen v pravidelných termínech. +ACCRINTM = ACCRINTM ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen k datu splatnosti. +AMORDEGRC = AMORDEGRC ## Vrátí lineární amortizaci v každém účetním období pomocí koeficientu amortizace. +AMORLINC = AMORLINC ## Vrátí lineární amortizaci v každém účetním období. +COUPDAYBS = COUPDAYBS ## Vrátí počet dnů od začátku období placení kupónů do data splatnosti. +COUPDAYS = COUPDAYS ## Vrátí počet dnů v období placení kupónů, které obsahuje den zúčtování. +COUPDAYSNC = COUPDAYSNC ## Vrátí počet dnů od data zúčtování do následujícího data placení kupónu. +COUPNCD = COUPNCD ## Vrátí následující datum placení kupónu po datu zúčtování. +COUPNUM = COUPNUM ## Vrátí počet kupónů splatných mezi datem zúčtování a datem splatnosti. +COUPPCD = COUPPCD ## Vrátí předchozí datum placení kupónu před datem zúčtování. +CUMIPMT = CUMIPMT ## Vrátí kumulativní úrok splacený mezi dvěma obdobími. +CUMPRINC = CUMPRINC ## Vrátí kumulativní jistinu splacenou mezi dvěma obdobími půjčky. +DB = ODPIS.ZRYCH ## Vrátí odpis aktiva za určité období pomocí degresivní metody odpisu s pevným zůstatkem. +DDB = ODPIS.ZRYCH2 ## Vrátí odpis aktiva za určité období pomocí dvojité degresivní metody odpisu nebo jiné metody, kterou zadáte. +DISC = DISC ## Vrátí diskontní sazbu cenného papíru. +DOLLARDE = DOLLARDE ## Převede částku v korunách vyjádřenou zlomkem na částku v korunách vyjádřenou desetinným číslem. +DOLLARFR = DOLLARFR ## Převede částku v korunách vyjádřenou desetinným číslem na částku v korunách vyjádřenou zlomkem. +DURATION = DURATION ## Vrátí roční dobu cenného papíru s pravidelnými úrokovými sazbami. +EFFECT = EFFECT ## Vrátí efektivní roční úrokovou sazbu. +FV = BUDHODNOTA ## Vrátí budoucí hodnotu investice. +FVSCHEDULE = FVSCHEDULE ## Vrátí budoucí hodnotu počáteční jistiny po použití série sazeb složitého úroku. +INTRATE = INTRATE ## Vrátí úrokovou sazbu plně investovaného cenného papíru. +IPMT = PLATBA.ÚROK ## Vrátí výšku úroku investice za dané období. +IRR = MÍRA.VÝNOSNOSTI ## Vrátí vnitřní výnosové procento série peněžních toků. +ISPMT = ISPMT ## Vypočte výši úroku z investice zaplaceného během určitého období. +MDURATION = MDURATION ## Vrátí Macauleyho modifikovanou dobu cenného papíru o nominální hodnotě 100 Kč. +MIRR = MOD.MÍRA.VÝNOSNOSTI ## Vrátí vnitřní sazbu výnosu, přičemž kladné a záporné hodnoty peněžních prostředků jsou financovány podle různých sazeb. +NOMINAL = NOMINAL ## Vrátí nominální roční úrokovou sazbu. +NPER = POČET.OBDOBÍ ## Vrátí počet období pro investici. +NPV = ČISTÁ.SOUČHODNOTA ## Vrátí čistou současnou hodnotu investice vypočítanou na základě série pravidelných peněžních toků a diskontní sazby. +ODDFPRICE = ODDFPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným prvním obdobím. +ODDFYIELD = ODDFYIELD ## Vrátí výnos cenného papíru s odlišným prvním obdobím. +ODDLPRICE = ODDLPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným posledním obdobím. +ODDLYIELD = ODDLYIELD ## Vrátí výnos cenného papíru s odlišným posledním obdobím. +PMT = PLATBA ## Vrátí hodnotu pravidelné splátky anuity. +PPMT = PLATBA.ZÁKLAD ## Vrátí hodnotu splátky jistiny pro zadanou investici za dané období. +PRICE = PRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen v pravidelných termínech. +PRICEDISC = PRICEDISC ## Vrátí cenu diskontního cenného papíru o nominální hodnotě 100 Kč. +PRICEMAT = PRICEMAT ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen k datu splatnosti. +PV = SOUČHODNOTA ## Vrátí současnou hodnotu investice. +RATE = ÚROKOVÁ.MÍRA ## Vrátí úrokovou sazbu vztaženou na období anuity. +RECEIVED = RECEIVED ## Vrátí částku obdrženou k datu splatnosti plně investovaného cenného papíru. +SLN = ODPIS.LIN ## Vrátí přímé odpisy aktiva pro jedno období. +SYD = ODPIS.NELIN ## Vrátí směrné číslo ročních odpisů aktiva pro zadané období. +TBILLEQ = TBILLEQ ## Vrátí výnos směnky státní pokladny ekvivalentní výnosu obligace. +TBILLPRICE = TBILLPRICE ## Vrátí cenu směnky státní pokladny o nominální hodnotě 100 Kč. +TBILLYIELD = TBILLYIELD ## Vrátí výnos směnky státní pokladny. +VDB = ODPIS.ZA.INT ## Vrátí odpis aktiva pro určité období nebo část období pomocí degresivní metody odpisu. +XIRR = XIRR ## Vrátí vnitřní výnosnost pro harmonogram peněžních toků, který nemusí být nutně periodický. +XNPV = XNPV ## Vrátí čistou současnou hodnotu pro harmonogram peněžních toků, který nemusí být nutně periodický. +YIELD = YIELD ## Vrátí výnos cenného papíru, ze kterého je úrok placen v pravidelných termínech. +YIELDDISC = YIELDDISC ## Vrátí roční výnos diskontního cenného papíru, například směnky státní pokladny. +YIELDMAT = YIELDMAT ## Vrátí roční výnos cenného papíru, ze kterého je úrok placen k datu splatnosti. + + +## +## Information functions Informační funkce +## +CELL = POLÍČKO ## Vrátí informace o formátování, umístění nebo obsahu buňky. +ERROR.TYPE = CHYBA.TYP ## Vrátí číslo odpovídající typu chyby. +INFO = O.PROSTŘEDÍ ## Vrátí informace o aktuálním pracovním prostředí. +ISBLANK = JE.PRÁZDNÉ ## Vrátí hodnotu PRAVDA, pokud se argument hodnota odkazuje na prázdnou buňku. +ISERR = JE.CHYBA ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota (kromě #N/A). +ISERROR = JE.CHYBHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota. +ISEVEN = ISEVEN ## Vrátí hodnotu PRAVDA, pokud je číslo sudé. +ISLOGICAL = JE.LOGHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota logická hodnota. +ISNA = JE.NEDEF ## Vrátí hodnotu PRAVDA, pokud je argument hodnota chybová hodnota #N/A. +ISNONTEXT = JE.NETEXT ## Vrátí hodnotu PRAVDA, pokud argument hodnota není text. +ISNUMBER = JE.ČÍSLO ## Vrátí hodnotu PRAVDA, pokud je argument hodnota číslo. +ISODD = ISODD ## Vrátí hodnotu PRAVDA, pokud je číslo liché. +ISREF = JE.ODKAZ ## Vrátí hodnotu PRAVDA, pokud je argument hodnota odkaz. +ISTEXT = JE.TEXT ## Vrátí hodnotu PRAVDA, pokud je argument hodnota text. +N = N ## Vrátí hodnotu převedenou na číslo. +NA = NEDEF ## Vrátí chybovou hodnotu #N/A. +TYPE = TYP ## Vrátí číslo označující datový typ hodnoty. + + +## +## Logical functions Logické funkce +## +AND = A ## Vrátí hodnotu PRAVDA, mají-li všechny argumenty hodnotu PRAVDA. +FALSE = NEPRAVDA ## Vrátí logickou hodnotu NEPRAVDA. +IF = KDYŽ ## Určí, který logický test má proběhnout. +IFERROR = IFERROR ## Pokud je vzorec vyhodnocen jako chyba, vrátí zadanou hodnotu. V opačném případě vrátí výsledek vzorce. +NOT = NE ## Provede logickou negaci argumentu funkce. +OR = NEBO ## Vrátí hodnotu PRAVDA, je-li alespoň jeden argument roven hodnotě PRAVDA. +TRUE = PRAVDA ## Vrátí logickou hodnotu PRAVDA. + + +## +## Lookup and reference functions Vyhledávací funkce +## +ADDRESS = ODKAZ ## Vrátí textový odkaz na jednu buňku listu. +AREAS = POČET.BLOKŮ ## Vrátí počet oblastí v odkazu. +CHOOSE = ZVOLIT ## Zvolí hodnotu ze seznamu hodnot. +COLUMN = SLOUPEC ## Vrátí číslo sloupce odkazu. +COLUMNS = SLOUPCE ## Vrátí počet sloupců v odkazu. +HLOOKUP = VVYHLEDAT ## Prohledá horní řádek matice a vrátí hodnotu určené buňky. +HYPERLINK = HYPERTEXTOVÝ.ODKAZ ## Vytvoří zástupce nebo odkaz, který otevře dokument uložený na síťovém serveru, v síti intranet nebo Internet. +INDEX = INDEX ## Pomocí rejstříku zvolí hodnotu z odkazu nebo matice. +INDIRECT = NEPŘÍMÝ.ODKAZ ## Vrátí odkaz určený textovou hodnotou. +LOOKUP = VYHLEDAT ## Vyhledá hodnoty ve vektoru nebo matici. +MATCH = POZVYHLEDAT ## Vyhledá hodnoty v odkazu nebo matici. +OFFSET = POSUN ## Vrátí posun odkazu od zadaného odkazu. +ROW = ŘÁDEK ## Vrátí číslo řádku odkazu. +ROWS = ŘÁDKY ## Vrátí počet řádků v odkazu. +RTD = RTD ## Načte data reálného času z programu, který podporuje automatizaci modelu COM (Automatizace: Způsob práce s objekty určité aplikace z jiné aplikace nebo nástroje pro vývoj. Automatizace (dříve nazývaná automatizace OLE) je počítačovým standardem a je funkcí modelu COM (Component Object Model).). +TRANSPOSE = TRANSPOZICE ## Vrátí transponovanou matici. +VLOOKUP = SVYHLEDAT ## Prohledá první sloupec matice, přesune kurzor v řádku a vrátí hodnotu buňky. + + +## +## Math and trigonometry functions Matematické a trigonometrické funkce +## +ABS = ABS ## Vrátí absolutní hodnotu čísla. +ACOS = ARCCOS ## Vrátí arkuskosinus čísla. +ACOSH = ARCCOSH ## Vrátí hyperbolický arkuskosinus čísla. +ASIN = ARCSIN ## Vrátí arkussinus čísla. +ASINH = ARCSINH ## Vrátí hyperbolický arkussinus čísla. +ATAN = ARCTG ## Vrátí arkustangens čísla. +ATAN2 = ARCTG2 ## Vrátí arkustangens x-ové a y-ové souřadnice. +ATANH = ARCTGH ## Vrátí hyperbolický arkustangens čísla. +CEILING = ZAOKR.NAHORU ## Zaokrouhlí číslo na nejbližší celé číslo nebo na nejbližší násobek zadané hodnoty. +COMBIN = KOMBINACE ## Vrátí počet kombinací pro daný počet položek. +COS = COS ## Vrátí kosinus čísla. +COSH = COSH ## Vrátí hyperbolický kosinus čísla. +DEGREES = DEGREES ## Převede radiány na stupně. +EVEN = ZAOKROUHLIT.NA.SUDÉ ## Zaokrouhlí číslo nahoru na nejbližší celé sudé číslo. +EXP = EXP ## Vrátí základ přirozeného logaritmu e umocněný na zadané číslo. +FACT = FAKTORIÁL ## Vrátí faktoriál čísla. +FACTDOUBLE = FACTDOUBLE ## Vrátí dvojitý faktoriál čísla. +FLOOR = ZAOKR.DOLŮ ## Zaokrouhlí číslo dolů, směrem k nule. +GCD = GCD ## Vrátí největší společný dělitel. +INT = CELÁ.ČÁST ## Zaokrouhlí číslo dolů na nejbližší celé číslo. +LCM = LCM ## Vrátí nejmenší společný násobek. +LN = LN ## Vrátí přirozený logaritmus čísla. +LOG = LOGZ ## Vrátí logaritmus čísla při zadaném základu. +LOG10 = LOG ## Vrátí dekadický logaritmus čísla. +MDETERM = DETERMINANT ## Vrátí determinant matice. +MINVERSE = INVERZE ## Vrátí inverzní matici. +MMULT = SOUČIN.MATIC ## Vrátí součin dvou matic. +MOD = MOD ## Vrátí zbytek po dělení. +MROUND = MROUND ## Vrátí číslo zaokrouhlené na požadovaný násobek. +MULTINOMIAL = MULTINOMIAL ## Vrátí mnohočlen z množiny čísel. +ODD = ZAOKROUHLIT.NA.LICHÉ ## Zaokrouhlí číslo nahoru na nejbližší celé liché číslo. +PI = PI ## Vrátí hodnotu čísla pí. +POWER = POWER ## Umocní číslo na zadanou mocninu. +PRODUCT = SOUČIN ## Vynásobí argumenty funkce. +QUOTIENT = QUOTIENT ## Vrátí celou část dělení. +RADIANS = RADIANS ## Převede stupně na radiány. +RAND = NÁHČÍSLO ## Vrátí náhodné číslo mezi 0 a 1. +RANDBETWEEN = RANDBETWEEN ## Vrátí náhodné číslo mezi zadanými čísly. +ROMAN = ROMAN ## Převede arabskou číslici na římskou ve formátu textu. +ROUND = ZAOKROUHLIT ## Zaokrouhlí číslo na zadaný počet číslic. +ROUNDDOWN = ROUNDDOWN ## Zaokrouhlí číslo dolů, směrem k nule. +ROUNDUP = ROUNDUP ## Zaokrouhlí číslo nahoru, směrem od nuly. +SERIESSUM = SERIESSUM ## Vrátí součet mocninné řady určené podle vzorce. +SIGN = SIGN ## Vrátí znaménko čísla. +SIN = SIN ## Vrátí sinus daného úhlu. +SINH = SINH ## Vrátí hyperbolický sinus čísla. +SQRT = ODMOCNINA ## Vrátí kladnou druhou odmocninu. +SQRTPI = SQRTPI ## Vrátí druhou odmocninu výrazu (číslo * pí). +SUBTOTAL = SUBTOTAL ## Vrátí souhrn v seznamu nebo databázi. +SUM = SUMA ## Sečte argumenty funkce. +SUMIF = SUMIF ## Sečte buňky vybrané podle zadaných kritérií. +SUMIFS = SUMIFS ## Sečte buňky určené více zadanými podmínkami. +SUMPRODUCT = SOUČIN.SKALÁRNÍ ## Vrátí součet součinů odpovídajících prvků matic. +SUMSQ = SUMA.ČTVERCŮ ## Vrátí součet čtverců argumentů. +SUMX2MY2 = SUMX2MY2 ## Vrátí součet rozdílu čtverců odpovídajících hodnot ve dvou maticích. +SUMX2PY2 = SUMX2PY2 ## Vrátí součet součtu čtverců odpovídajících hodnot ve dvou maticích. +SUMXMY2 = SUMXMY2 ## Vrátí součet čtverců rozdílů odpovídajících hodnot ve dvou maticích. +TAN = TGTG ## Vrátí tangens čísla. +TANH = TGH ## Vrátí hyperbolický tangens čísla. +TRUNC = USEKNOUT ## Zkrátí číslo na celé číslo. + + +## +## Statistical functions Statistické funkce +## +AVEDEV = PRŮMODCHYLKA ## Vrátí průměrnou hodnotu absolutních odchylek datových bodů od jejich střední hodnoty. +AVERAGE = PRŮMĚR ## Vrátí průměrnou hodnotu argumentů. +AVERAGEA = AVERAGEA ## Vrátí průměrnou hodnotu argumentů včetně čísel, textu a logických hodnot. +AVERAGEIF = AVERAGEIF ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk v oblasti, které vyhovují příslušné podmínce. +AVERAGEIFS = AVERAGEIFS ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk vyhovujících několika podmínkám. +BETADIST = BETADIST ## Vrátí hodnotu součtového rozdělení beta. +BETAINV = BETAINV ## Vrátí inverzní hodnotu součtového rozdělení pro zadané rozdělení beta. +BINOMDIST = BINOMDIST ## Vrátí hodnotu binomického rozdělení pravděpodobnosti jednotlivých veličin. +CHIDIST = CHIDIST ## Vrátí jednostrannou pravděpodobnost rozdělení chí-kvadrát. +CHIINV = CHIINV ## Vrátí hodnotu funkce inverzní k distribuční funkci jednostranné pravděpodobnosti rozdělení chí-kvadrát. +CHITEST = CHITEST ## Vrátí test nezávislosti. +CONFIDENCE = CONFIDENCE ## Vrátí interval spolehlivosti pro střední hodnotu základního souboru. +CORREL = CORREL ## Vrátí korelační koeficient mezi dvěma množinami dat. +COUNT = POČET ## Vrátí počet čísel v seznamu argumentů. +COUNTA = POČET2 ## Vrátí počet hodnot v seznamu argumentů. +COUNTBLANK = COUNTBLANK ## Spočítá počet prázdných buněk v oblasti. +COUNTIF = COUNTIF ## Spočítá buňky v oblasti, které odpovídají zadaným kritériím. +COUNTIFS = COUNTIFS ## Spočítá buňky v oblasti, které odpovídají více kritériím. +COVAR = COVAR ## Vrátí hodnotu kovariance, průměrnou hodnotu součinů párových odchylek +CRITBINOM = CRITBINOM ## Vrátí nejmenší hodnotu, pro kterou má součtové binomické rozdělení hodnotu větší nebo rovnu hodnotě kritéria. +DEVSQ = DEVSQ ## Vrátí součet čtverců odchylek. +EXPONDIST = EXPONDIST ## Vrátí hodnotu exponenciálního rozdělení. +FDIST = FDIST ## Vrátí hodnotu rozdělení pravděpodobnosti F. +FINV = FINV ## Vrátí hodnotu inverzní funkce k distribuční funkci rozdělení F. +FISHER = FISHER ## Vrátí hodnotu Fisherovy transformace. +FISHERINV = FISHERINV ## Vrátí hodnotu inverzní funkce k Fisherově transformaci. +FORECAST = FORECAST ## Vrátí hodnotu lineárního trendu. +FREQUENCY = ČETNOSTI ## Vrátí četnost rozdělení jako svislou matici. +FTEST = FTEST ## Vrátí výsledek F-testu. +GAMMADIST = GAMMADIST ## Vrátí hodnotu rozdělení gama. +GAMMAINV = GAMMAINV ## Vrátí hodnotu inverzní funkce k distribuční funkci součtového rozdělení gama. +GAMMALN = GAMMALN ## Vrátí přirozený logaritmus funkce gama, Γ(x). +GEOMEAN = GEOMEAN ## Vrátí geometrický průměr. +GROWTH = LOGLINTREND ## Vrátí hodnoty exponenciálního trendu. +HARMEAN = HARMEAN ## Vrátí harmonický průměr. +HYPGEOMDIST = HYPGEOMDIST ## Vrátí hodnotu hypergeometrického rozdělení. +INTERCEPT = INTERCEPT ## Vrátí úsek lineární regresní čáry. +KURT = KURT ## Vrátí hodnotu excesu množiny dat. +LARGE = LARGE ## Vrátí k-tou největší hodnotu množiny dat. +LINEST = LINREGRESE ## Vrátí parametry lineárního trendu. +LOGEST = LOGLINREGRESE ## Vrátí parametry exponenciálního trendu. +LOGINV = LOGINV ## Vrátí inverzní funkci k distribuční funkci logaritmicko-normálního rozdělení. +LOGNORMDIST = LOGNORMDIST ## Vrátí hodnotu součtového logaritmicko-normálního rozdělení. +MAX = MAX ## Vrátí maximální hodnotu seznamu argumentů. +MAXA = MAXA ## Vrátí maximální hodnotu seznamu argumentů včetně čísel, textu a logických hodnot. +MEDIAN = MEDIAN ## Vrátí střední hodnotu zadaných čísel. +MIN = MIN ## Vrátí minimální hodnotu seznamu argumentů. +MINA = MINA ## Vrátí nejmenší hodnotu v seznamu argumentů včetně čísel, textu a logických hodnot. +MODE = MODE ## Vrátí hodnotu, která se v množině dat vyskytuje nejčastěji. +NEGBINOMDIST = NEGBINOMDIST ## Vrátí hodnotu negativního binomického rozdělení. +NORMDIST = NORMDIST ## Vrátí hodnotu normálního součtového rozdělení. +NORMINV = NORMINV ## Vrátí inverzní funkci k funkci normálního součtového rozdělení. +NORMSDIST = NORMSDIST ## Vrátí hodnotu standardního normálního součtového rozdělení. +NORMSINV = NORMSINV ## Vrátí inverzní funkci k funkci standardního normálního součtového rozdělení. +PEARSON = PEARSON ## Vrátí Pearsonův výsledný momentový korelační koeficient. +PERCENTILE = PERCENTIL ## Vrátí hodnotu k-tého percentilu hodnot v oblasti. +PERCENTRANK = PERCENTRANK ## Vrátí pořadí hodnoty v množině dat vyjádřené procentuální částí množiny dat. +PERMUT = PERMUTACE ## Vrátí počet permutací pro zadaný počet objektů. +POISSON = POISSON ## Vrátí hodnotu distribuční funkce Poissonova rozdělení. +PROB = PROB ## Vrátí pravděpodobnost výskytu hodnot v oblasti mezi dvěma mezními hodnotami. +QUARTILE = QUARTIL ## Vrátí hodnotu kvartilu množiny dat. +RANK = RANK ## Vrátí pořadí čísla v seznamu čísel. +RSQ = RKQ ## Vrátí druhou mocninu Pearsonova výsledného momentového korelačního koeficientu. +SKEW = SKEW ## Vrátí zešikmení rozdělení. +SLOPE = SLOPE ## Vrátí směrnici lineární regresní čáry. +SMALL = SMALL ## Vrátí k-tou nejmenší hodnotu množiny dat. +STANDARDIZE = STANDARDIZE ## Vrátí normalizovanou hodnotu. +STDEV = SMODCH.VÝBĚR ## Vypočte směrodatnou odchylku výběru. +STDEVA = STDEVA ## Vypočte směrodatnou odchylku výběru včetně čísel, textu a logických hodnot. +STDEVP = SMODCH ## Vypočte směrodatnou odchylku základního souboru. +STDEVPA = STDEVPA ## Vypočte směrodatnou odchylku základního souboru včetně čísel, textu a logických hodnot. +STEYX = STEYX ## Vrátí standardní chybu předpovězené hodnoty y pro každou hodnotu x v regresi. +TDIST = TDIST ## Vrátí hodnotu Studentova t-rozdělení. +TINV = TINV ## Vrátí inverzní funkci k distribuční funkci Studentova t-rozdělení. +TREND = LINTREND ## Vrátí hodnoty lineárního trendu. +TRIMMEAN = TRIMMEAN ## Vrátí střední hodnotu vnitřní části množiny dat. +TTEST = TTEST ## Vrátí pravděpodobnost spojenou se Studentovým t-testem. +VAR = VAR.VÝBĚR ## Vypočte rozptyl výběru. +VARA = VARA ## Vypočte rozptyl výběru včetně čísel, textu a logických hodnot. +VARP = VAR ## Vypočte rozptyl základního souboru. +VARPA = VARPA ## Vypočte rozptyl základního souboru včetně čísel, textu a logických hodnot. +WEIBULL = WEIBULL ## Vrátí hodnotu Weibullova rozdělení. +ZTEST = ZTEST ## Vrátí jednostrannou P-hodnotu z-testu. + + +## +## Text functions Textové funkce +## +ASC = ASC ## Změní znaky s plnou šířkou (dvoubajtové)v řetězci znaků na znaky s poloviční šířkou (jednobajtové). +BAHTTEXT = BAHTTEXT ## Převede číslo na text ve formátu, měny ß (baht). +CHAR = ZNAK ## Vrátí znak určený číslem kódu. +CLEAN = VYČISTIT ## Odebere z textu všechny netisknutelné znaky. +CODE = KÓD ## Vrátí číselný kód prvního znaku zadaného textového řetězce. +CONCATENATE = CONCATENATE ## Spojí několik textových položek do jedné. +DOLLAR = KČ ## Převede číslo na text ve formátu měny Kč (česká koruna). +EXACT = STEJNÉ ## Zkontroluje, zda jsou dvě textové hodnoty shodné. +FIND = NAJÍT ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). +FINDB = FINDB ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). +FIXED = ZAOKROUHLIT.NA.TEXT ## Zformátuje číslo jako text s pevným počtem desetinných míst. +JIS = JIS ## Změní znaky s poloviční šířkou (jednobajtové) v řetězci znaků na znaky s plnou šířkou (dvoubajtové). +LEFT = ZLEVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. +LEFTB = LEFTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. +LEN = DÉLKA ## Vrátí počet znaků textového řetězce. +LENB = LENB ## Vrátí počet znaků textového řetězce. +LOWER = MALÁ ## Převede text na malá písmena. +MID = ČÁST ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. +MIDB = MIDB ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. +PHONETIC = ZVUKOVÉ ## Extrahuje fonetické znaky (furigana) z textového řetězce. +PROPER = VELKÁ2 ## Převede první písmeno každého slova textové hodnoty na velké. +REPLACE = NAHRADIT ## Nahradí znaky uvnitř textu. +REPLACEB = NAHRADITB ## Nahradí znaky uvnitř textu. +REPT = OPAKOVAT ## Zopakuje text podle zadaného počtu opakování. +RIGHT = ZPRAVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. +RIGHTB = RIGHTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. +SEARCH = HLEDAT ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). +SEARCHB = SEARCHB ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). +SUBSTITUTE = DOSADIT ## V textovém řetězci nahradí starý text novým. +T = T ## Převede argumenty na text. +TEXT = HODNOTA.NA.TEXT ## Zformátuje číslo a převede ho na text. +TRIM = PROČISTIT ## Odstraní z textu mezery. +UPPER = VELKÁ ## Převede text na velká písmena. +VALUE = HODNOTA ## Převede textový argument na číslo. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/config new file mode 100755 index 0000000..a7aa8fe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/config @@ -0,0 +1,25 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + + +## +## Excel Error Codes (For future use) + +## +NULL = #NUL! +DIV0 = #DIVISION/0! +VALUE = #VÆRDI! +REF = #REFERENCE! +NAME = #NAVN? +NUM = #NUM! +NA = #I/T diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/functions new file mode 100755 index 0000000..d02aa2e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/da/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Tilføjelsesprogram- og automatiseringsfunktioner +## +GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data, der er lagret i en pivottabelrapport + + +## +## Cube functions Kubefunktioner +## +CUBEKPIMEMBER = KUBE.KPI.MEDLEM ## Returnerer navn, egenskab og mål for en KPI-indikator og viser navnet og egenskaben i cellen. En KPI-indikator er en målbar størrelse, f.eks. bruttooverskud pr. måned eller personaleudskiftning pr. kvartal, der bruges til at overvåge en organisations præstationer. +CUBEMEMBER = KUBE.MEDLEM ## Returnerer et medlem eller en tupel fra kubehierarkiet. Bruges til at validere, om et medlem eller en tupel findes i kuben. +CUBEMEMBERPROPERTY = KUBEMEDLEM.EGENSKAB ## Returnerer værdien af en egenskab for et medlem i kuben. Bruges til at validere, om et medlemsnavn findes i kuben, og returnere den angivne egenskab for medlemmet. +CUBERANKEDMEMBER = KUBEMEDLEM.RANG ## Returnerer det n'te eller rangordnede medlem i et sæt. Bruges til at returnere et eller flere elementer i et sæt, f.eks. topsælgere eller de 10 bedste elever. +CUBESET = KUBESÆT ## Definerer et beregnet sæt medlemmer eller tupler ved at sende et sætudtryk til kuben på serveren, som opretter sættet og returnerer det til Microsoft Office Excel. +CUBESETCOUNT = KUBESÆT.TÆL ## Returnerer antallet af elementer i et sæt. +CUBEVALUE = KUBEVÆRDI ## Returnerer en sammenlagt (aggregeret) værdi fra en kube. + + +## +## Database functions Databasefunktioner +## +DAVERAGE = DMIDDEL ## Returnerer gennemsnittet af markerede databaseposter +DCOUNT = DTÆL ## Tæller de celler, der indeholder tal, i en database +DCOUNTA = DTÆLV ## Tæller udfyldte celler i en database +DGET = DHENT ## Uddrager en enkelt post, der opfylder de angivne kriterier, fra en database +DMAX = DMAKS ## Returnerer den største værdi blandt markerede databaseposter +DMIN = DMIN ## Returnerer den mindste værdi blandt markerede databaseposter +DPRODUCT = DPRODUKT ## Ganger værdierne i et bestemt felt med poster, der opfylder kriterierne i en database +DSTDEV = DSTDAFV ## Beregner et skøn over standardafvigelsen baseret på en stikprøve af markerede databaseposter +DSTDEVP = DSTDAFVP ## Beregner standardafvigelsen baseret på hele populationen af markerede databaseposter +DSUM = DSUM ## Sammenlægger de tal i feltkolonnen i databasen, der opfylder kriterierne +DVAR = DVARIANS ## Beregner varians baseret på en stikprøve af markerede databaseposter +DVARP = DVARIANSP ## Beregner varians baseret på hele populationen af markerede databaseposter + + +## +## Date and time functions Dato- og klokkeslætsfunktioner +## +DATE = DATO ## Returnerer serienummeret for en bestemt dato +DATEVALUE = DATOVÆRDI ## Konverterer en dato i form af tekst til et serienummer +DAY = DAG ## Konverterer et serienummer til en dag i måneden +DAYS360 = DAGE360 ## Beregner antallet af dage mellem to datoer på grundlag af et år med 360 dage +EDATE = EDATO ## Returnerer serienummeret for den dato, der ligger det angivne antal måneder før eller efter startdatoen +EOMONTH = SLUT.PÅ.MÅNED ## Returnerer serienummeret på den sidste dag i måneden før eller efter et angivet antal måneder +HOUR = TIME ## Konverterer et serienummer til en time +MINUTE = MINUT ## Konverterer et serienummer til et minut +MONTH = MÅNED ## Konverterer et serienummer til en måned +NETWORKDAYS = ANTAL.ARBEJDSDAGE ## Returnerer antallet af hele arbejdsdage mellem to datoer +NOW = NU ## Returnerer serienummeret for den aktuelle dato eller det aktuelle klokkeslæt +SECOND = SEKUND ## Konverterer et serienummer til et sekund +TIME = KLOKKESLÆT ## Returnerer serienummeret for et bestemt klokkeslæt +TIMEVALUE = TIDSVÆRDI ## Konverterer et klokkeslæt i form af tekst til et serienummer +TODAY = IDAG ## Returnerer serienummeret for dags dato +WEEKDAY = UGEDAG ## Konverterer et serienummer til en ugedag +WEEKNUM = UGE.NR ## Konverterer et serienummer til et tal, der angiver ugenummeret i året +WORKDAY = ARBEJDSDAG ## Returnerer serienummeret for dagen før eller efter det angivne antal arbejdsdage +YEAR = ÅR ## Konverterer et serienummer til et år +YEARFRAC = ÅR.BRØK ## Returnerer årsbrøken, der repræsenterer antallet af hele dage mellem startdato og slutdato + + +## +## Engineering functions Tekniske funktioner +## +BESSELI = BESSELI ## Returnerer den modificerede Bessel-funktion In(x) +BESSELJ = BESSELJ ## Returnerer Bessel-funktionen Jn(x) +BESSELK = BESSELK ## Returnerer den modificerede Bessel-funktion Kn(x) +BESSELY = BESSELY ## Returnerer Bessel-funktionen Yn(x) +BIN2DEC = BIN.TIL.DEC ## Konverterer et binært tal til et decimaltal +BIN2HEX = BIN.TIL.HEX ## Konverterer et binært tal til et heksadecimalt tal +BIN2OCT = BIN.TIL.OKT ## Konverterer et binært tal til et oktaltal. +COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koefficienter til et komplekst tal +CONVERT = KONVERTER ## Konverterer et tal fra én måleenhed til en anden +DEC2BIN = DEC.TIL.BIN ## Konverterer et decimaltal til et binært tal +DEC2HEX = DEC.TIL.HEX ## Konverterer et decimaltal til et heksadecimalt tal +DEC2OCT = DEC.TIL.OKT ## Konverterer et decimaltal til et oktaltal +DELTA = DELTA ## Tester, om to værdier er ens +ERF = FEJLFUNK ## Returner fejlfunktionen +ERFC = FEJLFUNK.KOMP ## Returnerer den komplementære fejlfunktion +GESTEP = GETRIN ## Tester, om et tal er større end en grænseværdi +HEX2BIN = HEX.TIL.BIN ## Konverterer et heksadecimalt tal til et binært tal +HEX2DEC = HEX.TIL.DEC ## Konverterer et decimaltal til et heksadecimalt tal +HEX2OCT = HEX.TIL.OKT ## Konverterer et heksadecimalt tal til et oktaltal +IMABS = IMAGABS ## Returnerer den absolutte værdi (modulus) for et komplekst tal +IMAGINARY = IMAGINÆR ## Returnerer den imaginære koefficient for et komplekst tal +IMARGUMENT = IMAGARGUMENT ## Returnerer argumentet theta, en vinkel udtrykt i radianer +IMCONJUGATE = IMAGKONJUGERE ## Returnerer den komplekse konjugation af et komplekst tal +IMCOS = IMAGCOS ## Returnerer et komplekst tals cosinus +IMDIV = IMAGDIV ## Returnerer kvotienten for to komplekse tal +IMEXP = IMAGEKSP ## Returnerer et komplekst tals eksponentialfunktion +IMLN = IMAGLN ## Returnerer et komplekst tals naturlige logaritme +IMLOG10 = IMAGLOG10 ## Returnerer et komplekst tals sædvanlige logaritme (titalslogaritme) +IMLOG2 = IMAGLOG2 ## Returnerer et komplekst tals sædvanlige logaritme (totalslogaritme) +IMPOWER = IMAGPOTENS ## Returnerer et komplekst tal opløftet i en heltalspotens +IMPRODUCT = IMAGPRODUKT ## Returnerer produktet af komplekse tal +IMREAL = IMAGREELT ## Returnerer den reelle koefficient for et komplekst tal +IMSIN = IMAGSIN ## Returnerer et komplekst tals sinus +IMSQRT = IMAGKVROD ## Returnerer et komplekst tals kvadratrod +IMSUB = IMAGSUB ## Returnerer forskellen mellem to komplekse tal +IMSUM = IMAGSUM ## Returnerer summen af komplekse tal +OCT2BIN = OKT.TIL.BIN ## Konverterer et oktaltal til et binært tal +OCT2DEC = OKT.TIL.DEC ## Konverterer et oktaltal til et decimaltal +OCT2HEX = OKT.TIL.HEX ## Konverterer et oktaltal til et heksadecimalt tal + + +## +## Financial functions Finansielle funktioner +## +ACCRINT = PÅLØBRENTE ## Returnerer den påløbne rente for et værdipapir med periodiske renteudbetalinger +ACCRINTM = PÅLØBRENTE.UDLØB ## Returnerer den påløbne rente for et værdipapir, hvor renteudbetalingen finder sted ved papirets udløb +AMORDEGRC = AMORDEGRC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode ved hjælp af en afskrivningskoefficient +AMORLINC = AMORLINC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode +COUPDAYBS = KUPONDAGE.SA ## Returnerer antallet af dage fra starten af kuponperioden til afregningsdatoen +COUPDAYS = KUPONDAGE.A ## Returnerer antallet af dage fra begyndelsen af kuponperioden til afregningsdatoen +COUPDAYSNC = KUPONDAGE.ANK ## Returnerer antallet af dage i den kuponperiode, der indeholder afregningsdatoen +COUPNCD = KUPONDAG.NÆSTE ## Returnerer den næste kupondato efter afregningsdatoen +COUPNUM = KUPONBETALINGER ## Returnerer antallet af kuponudbetalinger mellem afregnings- og udløbsdatoen +COUPPCD = KUPONDAG.FORRIGE ## Returnerer den forrige kupondato før afregningsdatoen +CUMIPMT = AKKUM.RENTE ## Returnerer den akkumulerede rente, der betales på et lån mellem to perioder +CUMPRINC = AKKUM.HOVEDSTOL ## Returnerer den akkumulerede nedbringelse af hovedstol mellem to perioder +DB = DB ## Returnerer afskrivningen på et aktiv i en angivet periode ved anvendelse af saldometoden +DDB = DSA ## Returnerer afskrivningsbeløbet for et aktiv over en bestemt periode ved anvendelse af dobbeltsaldometoden eller en anden afskrivningsmetode, som du angiver +DISC = DISKONTO ## Returnerer et værdipapirs diskonto +DOLLARDE = KR.DECIMAL ## Konverterer en kronepris udtrykt som brøk til en kronepris udtrykt som decimaltal +DOLLARFR = KR.BRØK ## Konverterer en kronepris udtrykt som decimaltal til en kronepris udtrykt som brøk +DURATION = VARIGHED ## Returnerer den årlige løbetid for et værdipapir med periodiske renteudbetalinger +EFFECT = EFFEKTIV.RENTE ## Returnerer den årlige effektive rente +FV = FV ## Returnerer fremtidsværdien af en investering +FVSCHEDULE = FVTABEL ## Returnerer den fremtidige værdi af en hovedstol, når der er tilskrevet rente og rentes rente efter forskellige rentesatser +INTRATE = RENTEFOD ## Returnerer renten på et fuldt ud investeret værdipapir +IPMT = R.YDELSE ## Returnerer renten fra en investering for en given periode +IRR = IA ## Returnerer den interne rente for en række pengestrømme +ISPMT = ISPMT ## Beregner den betalte rente i løbet af en bestemt investeringsperiode +MDURATION = MVARIGHED ## Returnerer Macauleys modificerede løbetid for et værdipapir med en formodet pari på kr. 100 +MIRR = MIA ## Returnerer den interne forrentning, hvor positive og negative pengestrømme finansieres til forskellig rente +NOMINAL = NOMINEL ## Returnerer den årlige nominelle rente +NPER = NPER ## Returnerer antallet af perioder for en investering +NPV = NUTIDSVÆRDI ## Returnerer nettonutidsværdien for en investering baseret på en række periodiske pengestrømme og en diskonteringssats +ODDFPRICE = ULIGE.KURS.PÅLYDENDE ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med en ulige (kort eller lang) første periode +ODDFYIELD = ULIGE.FØRSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige første periode +ODDLPRICE = ULIGE.SIDSTE.KURS ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med ulige sidste periode +ODDLYIELD = ULIGE.SIDSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige sidste periode +PMT = YDELSE ## Returnerer renten fra en investering for en given periode +PPMT = H.YDELSE ## Returnerer ydelsen på hovedstolen for en investering i en given periode +PRICE = KURS ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir med periodiske renteudbetalinger +PRICEDISC = KURS.DISKONTO ## Returnerer kursen pr. kr 100 nominel værdi for et diskonteret værdipapir +PRICEMAT = KURS.UDLØB ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir, hvor renten udbetales ved papirets udløb +PV = NV ## Returnerer den nuværende værdi af en investering +RATE = RENTE ## Returnerer renten i hver periode for en annuitet +RECEIVED = MODTAGET.VED.UDLØB ## Returnerer det beløb, der modtages ved udløbet af et fuldt ud investeret værdipapir +SLN = LA ## Returnerer den lineære afskrivning for et aktiv i en enkelt periode +SYD = ÅRSAFSKRIVNING ## Returnerer den årlige afskrivning på et aktiv i en bestemt periode +TBILLEQ = STATSOBLIGATION ## Returnerer det obligationsækvivalente afkast for en statsobligation +TBILLPRICE = STATSOBLIGATION.KURS ## Returnerer kursen pr. kr 100 nominel værdi for en statsobligation +TBILLYIELD = STATSOBLIGATION.AFKAST ## Returnerer en afkastet på en statsobligation +VDB = VSA ## Returnerer afskrivningen på et aktiv i en angivet periode, herunder delperioder, ved brug af dobbeltsaldometoden +XIRR = INTERN.RENTE ## Returnerer den interne rente for en plan over pengestrømme, der ikke behøver at være periodiske +XNPV = NETTO.NUTIDSVÆRDI ## Returnerer nutidsværdien for en plan over pengestrømme, der ikke behøver at være periodiske +YIELD = AFKAST ## Returnerer afkastet for et værdipapir med periodiske renteudbetalinger +YIELDDISC = AFKAST.DISKONTO ## Returnerer det årlige afkast for et diskonteret værdipapir, f.eks. en statsobligation +YIELDMAT = AFKAST.UDLØBSDATO ## Returnerer det årlige afkast for et værdipapir, hvor renten udbetales ved papirets udløb + + +## +## Information functions Informationsfunktioner +## +CELL = CELLE ## Returnerer oplysninger om formatering, placering eller indhold af en celle +ERROR.TYPE = FEJLTYPE ## Returnerer et tal, der svarer til en fejltype +INFO = INFO ## Returnerer oplysninger om det aktuelle operativmiljø +ISBLANK = ER.TOM ## Returnerer SAND, hvis værdien er tom +ISERR = ER.FJL ## Returnerer SAND, hvis værdien er en fejlværdi undtagen #I/T +ISERROR = ER.FEJL ## Returnerer SAND, hvis værdien er en fejlværdi +ISEVEN = ER.LIGE ## Returnerer SAND, hvis tallet er lige +ISLOGICAL = ER.LOGISK ## Returnerer SAND, hvis værdien er en logisk værdi +ISNA = ER.IKKE.TILGÆNGELIG ## Returnerer SAND, hvis værdien er fejlværdien #I/T +ISNONTEXT = ER.IKKE.TEKST ## Returnerer SAND, hvis værdien ikke er tekst +ISNUMBER = ER.TAL ## Returnerer SAND, hvis værdien er et tal +ISODD = ER.ULIGE ## Returnerer SAND, hvis tallet er ulige +ISREF = ER.REFERENCE ## Returnerer SAND, hvis værdien er en reference +ISTEXT = ER.TEKST ## Returnerer SAND, hvis værdien er tekst +N = TAL ## Returnerer en værdi konverteret til et tal +NA = IKKE.TILGÆNGELIG ## Returnerer fejlværdien #I/T +TYPE = VÆRDITYPE ## Returnerer et tal, der angiver datatypen for en værdi + + +## +## Logical functions Logiske funktioner +## +AND = OG ## Returnerer SAND, hvis alle argumenterne er sande +FALSE = FALSK ## Returnerer den logiske værdi FALSK +IF = HVIS ## Angiver en logisk test, der skal udføres +IFERROR = HVIS.FEJL ## Returnerer en værdi, du angiver, hvis en formel evauleres som en fejl. Returnerer i modsat fald resultatet af formlen +NOT = IKKE ## Vender argumentets logik om +OR = ELLER ## Returneret værdien SAND, hvis mindst ét argument er sandt +TRUE = SAND ## Returnerer den logiske værdi SAND + + +## +## Lookup and reference functions Opslags- og referencefunktioner +## +ADDRESS = ADRESSE ## Returnerer en reference som tekst til en enkelt celle i et regneark +AREAS = OMRÅDER ## Returnerer antallet af områder i en reference +CHOOSE = VÆLG ## Vælger en værdi på en liste med værdier +COLUMN = KOLONNE ## Returnerer kolonnenummeret i en reference +COLUMNS = KOLONNER ## Returnerer antallet af kolonner i en reference +HLOOKUP = VOPSLAG ## Søger i den øverste række af en matrix og returnerer værdien af den angivne celle +HYPERLINK = HYPERLINK ## Opretter en genvej kaldet et hyperlink, der åbner et dokument, som er lagret på en netværksserver, på et intranet eller på internettet +INDEX = INDEKS ## Anvender et indeks til at vælge en værdi fra en reference eller en matrix +INDIRECT = INDIREKTE ## Returnerer en reference, der er angivet af en tekstværdi +LOOKUP = SLÅ.OP ## Søger værdier i en vektor eller en matrix +MATCH = SAMMENLIGN ## Søger værdier i en reference eller en matrix +OFFSET = FORSKYDNING ## Returnerer en reference forskudt i forhold til en given reference +ROW = RÆKKE ## Returnerer rækkenummeret for en reference +ROWS = RÆKKER ## Returnerer antallet af rækker i en reference +RTD = RTD ## Henter realtidsdata fra et program, der understøtter COM-automatisering (Automation: En metode til at arbejde med objekter fra et andet program eller udviklingsværktøj. Automation, som tidligere blev kaldt OLE Automation, er en industristandard og en funktion i COM (Component Object Model).) +TRANSPOSE = TRANSPONER ## Returnerer en transponeret matrix +VLOOKUP = LOPSLAG ## Søger i øverste række af en matrix og flytter på tværs af rækken for at returnere en celleværdi + + +## +## Math and trigonometry functions Matematiske og trigonometriske funktioner +## +ABS = ABS ## Returnerer den absolutte værdi af et tal +ACOS = ARCCOS ## Returnerer et tals arcus cosinus +ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus af tal +ASIN = ARCSIN ## Returnerer et tals arcus sinus +ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus for tal +ATAN = ARCTAN ## Returnerer et tals arcus tangens +ATAN2 = ARCTAN2 ## Returnerer de angivne x- og y-koordinaters arcus tangens +ATANH = ARCTANH ## Returnerer et tals inverse hyperbolske tangens +CEILING = AFRUND.LOFT ## Afrunder et tal til nærmeste heltal eller til nærmeste multiplum af betydning +COMBIN = KOMBIN ## Returnerer antallet af kombinationer for et givet antal objekter +COS = COS ## Returnerer et tals cosinus +COSH = COSH ## Returnerer den inverse hyperbolske cosinus af et tal +DEGREES = GRADER ## Konverterer radianer til grader +EVEN = LIGE ## Runder et tal op til nærmeste lige heltal +EXP = EKSP ## Returnerer e opløftet til en potens af et angivet tal +FACT = FAKULTET ## Returnerer et tals fakultet +FACTDOUBLE = DOBBELT.FAKULTET ## Returnerer et tals dobbelte fakultet +FLOOR = AFRUND.GULV ## Runder et tal ned mod nul +GCD = STØRSTE.FÆLLES.DIVISOR ## Returnerer den største fælles divisor +INT = HELTAL ## Nedrunder et tal til det nærmeste heltal +LCM = MINDSTE.FÆLLES.MULTIPLUM ## Returnerer det mindste fælles multiplum +LN = LN ## Returnerer et tals naturlige logaritme +LOG = LOG ## Returnerer logaritmen for et tal på grundlag af et angivet grundtal +LOG10 = LOG10 ## Returnerer titalslogaritmen af et tal +MDETERM = MDETERM ## Returnerer determinanten for en matrix +MINVERSE = MINVERT ## Returnerer den inverse matrix for en matrix +MMULT = MPRODUKT ## Returnerer matrixproduktet af to matrixer +MOD = REST ## Returnerer restværdien fra division +MROUND = MAFRUND ## Returnerer et tal afrundet til det ønskede multiplum +MULTINOMIAL = MULTINOMIAL ## Returnerer et multinomialt talsæt +ODD = ULIGE ## Runder et tal op til nærmeste ulige heltal +PI = PI ## Returnerer værdien af pi +POWER = POTENS ## Returnerer resultatet af et tal opløftet til en potens +PRODUCT = PRODUKT ## Multiplicerer argumenterne +QUOTIENT = KVOTIENT ## Returnerer heltalsdelen ved division +RADIANS = RADIANER ## Konverterer grader til radianer +RAND = SLUMP ## Returnerer et tilfældigt tal mellem 0 og 1 +RANDBETWEEN = SLUMP.MELLEM ## Returnerer et tilfældigt tal mellem de tal, der angives +ROMAN = ROMERTAL ## Konverterer et arabertal til romertal som tekst +ROUND = AFRUND ## Afrunder et tal til et angivet antal decimaler +ROUNDDOWN = RUND.NED ## Runder et tal ned mod nul +ROUNDUP = RUND.OP ## Runder et tal op, væk fra 0 (nul) +SERIESSUM = SERIESUM ## Returnerer summen af en potensserie baseret på en formel +SIGN = FORTEGN ## Returnerer et tals fortegn +SIN = SIN ## Returnerer en given vinkels sinusværdi +SINH = SINH ## Returnerer den hyperbolske sinus af et tal +SQRT = KVROD ## Returnerer en positiv kvadratrod +SQRTPI = KVRODPI ## Returnerer kvadratroden af (tal * pi;) +SUBTOTAL = SUBTOTAL ## Returnerer en subtotal på en liste eller i en database +SUM = SUM ## Lægger argumenterne sammen +SUMIF = SUM.HVIS ## Lægger de celler sammen, der er specificeret af et givet kriterium. +SUMIFS = SUM.HVISER ## Lægger de celler i et område sammen, der opfylder flere kriterier. +SUMPRODUCT = SUMPRODUKT ## Returnerer summen af produkter af ens matrixkomponenter +SUMSQ = SUMKV ## Returnerer summen af argumenternes kvadrater +SUMX2MY2 = SUMX2MY2 ## Returnerer summen af differensen mellem kvadrater af ens værdier i to matrixer +SUMX2PY2 = SUMX2PY2 ## Returnerer summen af summen af kvadrater af tilsvarende værdier i to matrixer +SUMXMY2 = SUMXMY2 ## Returnerer summen af kvadrater af differenser mellem ens værdier i to matrixer +TAN = TAN ## Returnerer et tals tangens +TANH = TANH ## Returnerer et tals hyperbolske tangens +TRUNC = AFKORT ## Afkorter et tal til et heltal + + +## +## Statistical functions Statistiske funktioner +## +AVEDEV = MAD ## Returnerer den gennemsnitlige numeriske afvigelse fra stikprøvens middelværdi +AVERAGE = MIDDEL ## Returnerer middelværdien af argumenterne +AVERAGEA = MIDDELV ## Returnerer middelværdien af argumenterne og medtager tal, tekst og logiske værdier +AVERAGEIF = MIDDEL.HVIS ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder et givet kriterium, i et område +AVERAGEIFS = MIDDEL.HVISER ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder flere kriterier. +BETADIST = BETAFORDELING ## Returnerer den kumulative betafordelingsfunktion +BETAINV = BETAINV ## Returnerer den inverse kumulative fordelingsfunktion for en angivet betafordeling +BINOMDIST = BINOMIALFORDELING ## Returnerer punktsandsynligheden for binomialfordelingen +CHIDIST = CHIFORDELING ## Returnerer fraktilsandsynligheden for en chi2-fordeling +CHIINV = CHIINV ## Returnerer den inverse fraktilsandsynlighed for en chi2-fordeling +CHITEST = CHITEST ## Foretager en test for uafhængighed +CONFIDENCE = KONFIDENSINTERVAL ## Returnerer et konfidensinterval for en population +CORREL = KORRELATION ## Returnerer korrelationskoefficienten mellem to datasæt +COUNT = TÆL ## Tæller antallet af tal på en liste med argumenter +COUNTA = TÆLV ## Tæller antallet af værdier på en liste med argumenter +COUNTBLANK = ANTAL.BLANKE ## Tæller antallet af tomme celler i et område +COUNTIF = TÆLHVIS ## Tæller antallet af celler, som opfylder de givne kriterier, i et område +COUNTIFS = TÆL.HVISER ## Tæller antallet af de celler, som opfylder flere kriterier, i et område +COVAR = KOVARIANS ## Beregner kovariansen mellem to stokastiske variabler +CRITBINOM = KRITBINOM ## Returnerer den mindste værdi for x, for hvilken det gælder, at fordelingsfunktionen er mindre end eller lig med kriterieværdien. +DEVSQ = SAK ## Returnerer summen af de kvadrerede afvigelser fra middelværdien +EXPONDIST = EKSPFORDELING ## Returnerer eksponentialfordelingen +FDIST = FFORDELING ## Returnerer fraktilsandsynligheden for F-fordelingen +FINV = FINV ## Returnerer den inverse fraktilsandsynlighed for F-fordelingen +FISHER = FISHER ## Returnerer Fisher-transformationen +FISHERINV = FISHERINV ## Returnerer den inverse Fisher-transformation +FORECAST = PROGNOSE ## Returnerer en prognoseværdi baseret på lineær tendens +FREQUENCY = FREKVENS ## Returnerer en frekvensfordeling i en søjlevektor +FTEST = FTEST ## Returnerer resultatet af en F-test til sammenligning af varians +GAMMADIST = GAMMAFORDELING ## Returnerer fordelingsfunktionen for gammafordelingen +GAMMAINV = GAMMAINV ## Returnerer den inverse fordelingsfunktion for gammafordelingen +GAMMALN = GAMMALN ## Returnerer den naturlige logaritme til gammafordelingen, G(x) +GEOMEAN = GEOMIDDELVÆRDI ## Returnerer det geometriske gennemsnit +GROWTH = FORØGELSE ## Returnerer værdier langs en eksponentiel tendens +HARMEAN = HARMIDDELVÆRDI ## Returnerer det harmoniske gennemsnit +HYPGEOMDIST = HYPGEOFORDELING ## Returnerer punktsandsynligheden i en hypergeometrisk fordeling +INTERCEPT = SKÆRING ## Returnerer afskæringsværdien på y-aksen i en lineær regression +KURT = TOPSTEJL ## Returnerer kurtosisværdien for en stokastisk variabel +LARGE = STOR ## Returnerer den k'te største værdi i et datasæt +LINEST = LINREGR ## Returnerer parameterestimaterne for en lineær tendens +LOGEST = LOGREGR ## Returnerer parameterestimaterne for en eksponentiel tendens +LOGINV = LOGINV ## Returnerer den inverse fordelingsfunktion for lognormalfordelingen +LOGNORMDIST = LOGNORMFORDELING ## Returnerer fordelingsfunktionen for lognormalfordelingen +MAX = MAKS ## Returnerer den maksimale værdi på en liste med argumenter. +MAXA = MAKSV ## Returnerer den maksimale værdi på en liste med argumenter og medtager tal, tekst og logiske værdier +MEDIAN = MEDIAN ## Returnerer medianen for de angivne tal +MIN = MIN ## Returnerer den mindste værdi på en liste med argumenter. +MINA = MINV ## Returnerer den mindste værdi på en liste med argumenter og medtager tal, tekst og logiske værdier +MODE = HYPPIGST ## Returnerer den hyppigste værdi i et datasæt +NEGBINOMDIST = NEGBINOMFORDELING ## Returnerer den negative binomialfordeling +NORMDIST = NORMFORDELING ## Returnerer fordelingsfunktionen for normalfordelingen +NORMINV = NORMINV ## Returnerer den inverse fordelingsfunktion for normalfordelingen +NORMSDIST = STANDARDNORMFORDELING ## Returnerer fordelingsfunktionen for standardnormalfordelingen +NORMSINV = STANDARDNORMINV ## Returnerer den inverse fordelingsfunktion for standardnormalfordelingen +PEARSON = PEARSON ## Returnerer Pearsons korrelationskoefficient +PERCENTILE = FRAKTIL ## Returnerer den k'te fraktil for datasættet +PERCENTRANK = PROCENTPLADS ## Returnerer den procentuelle rang for en given værdi i et datasæt +PERMUT = PERMUT ## Returnerer antallet af permutationer for et givet sæt objekter +POISSON = POISSON ## Returnerer fordelingsfunktionen for en Poisson-fordeling +PROB = SANDSYNLIGHED ## Returnerer intervalsandsynligheden +QUARTILE = KVARTIL ## Returnerer kvartilen i et givet datasæt +RANK = PLADS ## Returnerer rangen for et tal på en liste med tal +RSQ = FORKLARINGSGRAD ## Returnerer R2-værdien fra en simpel lineær regression +SKEW = SKÆVHED ## Returnerer skævheden for en stokastisk variabel +SLOPE = HÆLDNING ## Returnerer estimatet på hældningen fra en simpel lineær regression +SMALL = MINDSTE ## Returnerer den k'te mindste værdi i datasættet +STANDARDIZE = STANDARDISER ## Returnerer en standardiseret værdi +STDEV = STDAFV ## Estimerer standardafvigelsen på basis af en stikprøve +STDEVA = STDAFVV ## Beregner standardafvigelsen på basis af en prøve og medtager tal, tekst og logiske værdier +STDEVP = STDAFVP ## Beregner standardafvigelsen på basis af en hel population +STDEVPA = STDAFVPV ## Beregner standardafvigelsen på basis af en hel population og medtager tal, tekst og logiske værdier +STEYX = STFYX ## Returnerer standardafvigelsen for de estimerede y-værdier i den simple lineære regression +TDIST = TFORDELING ## Returnerer fordelingsfunktionen for Student's t-fordeling +TINV = TINV ## Returnerer den inverse fordelingsfunktion for Student's t-fordeling +TREND = TENDENS ## Returnerer værdi under antagelse af en lineær tendens +TRIMMEAN = TRIMMIDDELVÆRDI ## Returnerer den trimmede middelværdi for datasættet +TTEST = TTEST ## Returnerer den sandsynlighed, der er forbundet med Student's t-test +VAR = VARIANS ## Beregner variansen på basis af en prøve +VARA = VARIANSV ## Beregner variansen på basis af en prøve og medtager tal, tekst og logiske værdier +VARP = VARIANSP ## Beregner variansen på basis af hele populationen +VARPA = VARIANSPV ## Beregner variansen på basis af hele populationen og medtager tal, tekst og logiske værdier +WEIBULL = WEIBULL ## Returnerer fordelingsfunktionen for Weibull-fordelingen +ZTEST = ZTEST ## Returnerer sandsynlighedsværdien ved en en-sidet z-test + + +## +## Text functions Tekstfunktioner +## +ASC = ASC ## Ændrer engelske tegn i fuld bredde (dobbelt-byte) eller katakana i en tegnstreng til tegn i halv bredde (enkelt-byte) +BAHTTEXT = BAHTTEKST ## Konverterer et tal til tekst ved hjælp af valutaformatet ß (baht) +CHAR = TEGN ## Returnerer det tegn, der svarer til kodenummeret +CLEAN = RENS ## Fjerner alle tegn, der ikke kan udskrives, fra tekst +CODE = KODE ## Returnerer en numerisk kode for det første tegn i en tekststreng +CONCATENATE = SAMMENKÆDNING ## Sammenkæder adskillige tekstelementer til ét tekstelement +DOLLAR = KR ## Konverterer et tal til tekst ved hjælp af valutaformatet kr. (kroner) +EXACT = EKSAKT ## Kontrollerer, om to tekstværdier er identiske +FIND = FIND ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) +FINDB = FINDB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) +FIXED = FAST ## Formaterer et tal som tekst med et fast antal decimaler +JIS = JIS ## Ændrer engelske tegn i halv bredde (enkelt-byte) eller katakana i en tegnstreng til tegn i fuld bredde (dobbelt-byte) +LEFT = VENSTRE ## Returnerer tegnet længst til venstre i en tekstværdi +LEFTB = VENSTREB ## Returnerer tegnet længst til venstre i en tekstværdi +LEN = LÆNGDE ## Returnerer antallet af tegn i en tekststreng +LENB = LÆNGDEB ## Returnerer antallet af tegn i en tekststreng +LOWER = SMÅ.BOGSTAVER ## Konverterer tekst til små bogstaver +MID = MIDT ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition +MIDB = MIDTB ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition +PHONETIC = FONETISK ## Uddrager de fonetiske (furigana) tegn fra en tekststreng +PROPER = STORT.FORBOGSTAV ## Konverterer første bogstav i hvert ord i teksten til stort bogstav +REPLACE = ERSTAT ## Erstatter tegn i tekst +REPLACEB = ERSTATB ## Erstatter tegn i tekst +REPT = GENTAG ## Gentager tekst et givet antal gange +RIGHT = HØJRE ## Returnerer tegnet længste til højre i en tekstværdi +RIGHTB = HØJREB ## Returnerer tegnet længste til højre i en tekstværdi +SEARCH = SØG ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) +SEARCHB = SØGB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) +SUBSTITUTE = UDSKIFT ## Udskifter gammel tekst med ny tekst i en tekststreng +T = T ## Konverterer argumenterne til tekst +TEXT = TEKST ## Formaterer et tal og konverterer det til tekst +TRIM = FJERN.OVERFLØDIGE.BLANKE ## Fjerner mellemrum fra tekst +UPPER = STORE.BOGSTAVER ## Konverterer tekst til store bogstaver +VALUE = VÆRDI ## Konverterer et tekstargument til et tal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/config new file mode 100755 index 0000000..9751c4b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #WERT! +REF = #BEZUG! +NAME = #NAME? +NUM = #ZAHL! +NA = #NV diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/functions new file mode 100755 index 0000000..01df42f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/de/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Add-In- und Automatisierungsfunktionen +## +GETPIVOTDATA = PIVOTDATENZUORDNEN ## In einem PivotTable-Bericht gespeicherte Daten werden zurückgegeben. + + +## +## Cube functions Cubefunktionen +## +CUBEKPIMEMBER = CUBEKPIELEMENT ## Gibt Name, Eigenschaft und Measure eines Key Performance Indicators (KPI) zurück und zeigt den Namen und die Eigenschaft in der Zelle an. Ein KPI ist ein quantifizierbares Maß, wie z. B. der monatliche Bruttogewinn oder die vierteljährliche Mitarbeiterfluktuation, mit dessen Hilfe das Leistungsverhalten eines Unternehmens überwacht werden kann. +CUBEMEMBER = CUBEELEMENT ## Gibt ein Element oder ein Tuple in einer Cubehierarchie zurück. Wird verwendet, um zu überprüfen, ob das Element oder Tuple im Cube vorhanden ist. +CUBEMEMBERPROPERTY = CUBEELEMENTEIGENSCHAFT ## Gibt den Wert einer Elementeigenschaft im Cube zurück. Wird verwendet, um zu überprüfen, ob ein Elementname im Cube vorhanden ist, und um die für dieses Element angegebene Eigenschaft zurückzugeben. +CUBERANKEDMEMBER = CUBERANGELEMENT ## Gibt das n-te oder n-rangige Element in einer Menge zurück. Wird verwendet, um mindestens ein Element in einer Menge zurückzugeben, wie z. B. bester Vertriebsmitarbeiter oder 10 beste Kursteilnehmer. +CUBESET = CUBEMENGE ## Definiert eine berechnete Menge Elemente oder Tuples durch Senden eines Mengenausdrucks an den Cube auf dem Server, der die Menge erstellt und an Microsoft Office Excel zurückgibt. +CUBESETCOUNT = CUBEMENGENANZAHL ## Gibt die Anzahl der Elemente in einer Menge zurück. +CUBEVALUE = CUBEWERT ## Gibt einen Aggregatwert aus einem Cube zurück. + + +## +## Database functions Datenbankfunktionen +## +DAVERAGE = DBMITTELWERT ## Gibt den Mittelwert der ausgewählten Datenbankeinträge zurück +DCOUNT = DBANZAHL ## Zählt die Zellen mit Zahlen in einer Datenbank +DCOUNTA = DBANZAHL2 ## Zählt nicht leere Zellen in einer Datenbank +DGET = DBAUSZUG ## Extrahiert aus einer Datenbank einen einzelnen Datensatz, der den angegebenen Kriterien entspricht +DMAX = DBMAX ## Gibt den größten Wert aus ausgewählten Datenbankeinträgen zurück +DMIN = DBMIN ## Gibt den kleinsten Wert aus ausgewählten Datenbankeinträgen zurück +DPRODUCT = DBPRODUKT ## Multipliziert die Werte in einem bestimmten Feld mit Datensätzen, die den Kriterien in einer Datenbank entsprechen +DSTDEV = DBSTDABW ## Schätzt die Standardabweichung auf der Grundlage einer Stichprobe aus ausgewählten Datenbankeinträgen +DSTDEVP = DBSTDABWN ## Berechnet die Standardabweichung auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge +DSUM = DBSUMME ## Addiert die Zahlen in der Feldspalte mit Datensätzen in der Datenbank, die den Kriterien entsprechen +DVAR = DBVARIANZ ## Schätzt die Varianz auf der Grundlage ausgewählter Datenbankeinträge +DVARP = DBVARIANZEN ## Berechnet die Varianz auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge + + +## +## Date and time functions Datums- und Zeitfunktionen +## +DATE = DATUM ## Gibt die fortlaufende Zahl eines bestimmten Datums zurück +DATEVALUE = DATWERT ## Wandelt ein Datum in Form von Text in eine fortlaufende Zahl um +DAY = TAG ## Wandelt eine fortlaufende Zahl in den Tag des Monats um +DAYS360 = TAGE360 ## Berechnet die Anzahl der Tage zwischen zwei Datumsangaben ausgehend von einem Jahr, das 360 Tage hat +EDATE = EDATUM ## Gibt die fortlaufende Zahl des Datums zurück, bei dem es sich um die angegebene Anzahl von Monaten vor oder nach dem Anfangstermin handelt +EOMONTH = MONATSENDE ## Gibt die fortlaufende Zahl des letzten Tags des Monats vor oder nach einer festgelegten Anzahl von Monaten zurück +HOUR = STUNDE ## Wandelt eine fortlaufende Zahl in eine Stunde um +MINUTE = MINUTE ## Wandelt eine fortlaufende Zahl in eine Minute um +MONTH = MONAT ## Wandelt eine fortlaufende Zahl in einen Monat um +NETWORKDAYS = NETTOARBEITSTAGE ## Gibt die Anzahl von ganzen Arbeitstagen zwischen zwei Datumswerten zurück +NOW = JETZT ## Gibt die fortlaufende Zahl des aktuellen Datums und der aktuellen Uhrzeit zurück +SECOND = SEKUNDE ## Wandelt eine fortlaufende Zahl in eine Sekunde um +TIME = ZEIT ## Gibt die fortlaufende Zahl einer bestimmten Uhrzeit zurück +TIMEVALUE = ZEITWERT ## Wandelt eine Uhrzeit in Form von Text in eine fortlaufende Zahl um +TODAY = HEUTE ## Gibt die fortlaufende Zahl des heutigen Datums zurück +WEEKDAY = WOCHENTAG ## Wandelt eine fortlaufende Zahl in den Wochentag um +WEEKNUM = KALENDERWOCHE ## Wandelt eine fortlaufende Zahl in eine Zahl um, die angibt, in welche Woche eines Jahres das angegebene Datum fällt +WORKDAY = ARBEITSTAG ## Gibt die fortlaufende Zahl des Datums vor oder nach einer bestimmten Anzahl von Arbeitstagen zurück +YEAR = JAHR ## Wandelt eine fortlaufende Zahl in ein Jahr um +YEARFRAC = BRTEILJAHRE ## Gibt die Anzahl der ganzen Tage zwischen Ausgangsdatum und Enddatum in Bruchteilen von Jahren zurück + + +## +## Engineering functions Konstruktionsfunktionen +## +BESSELI = BESSELI ## Gibt die geänderte Besselfunktion In(x) zurück +BESSELJ = BESSELJ ## Gibt die Besselfunktion Jn(x) zurück +BESSELK = BESSELK ## Gibt die geänderte Besselfunktion Kn(x) zurück +BESSELY = BESSELY ## Gibt die Besselfunktion Yn(x) zurück +BIN2DEC = BININDEZ ## Wandelt eine binäre Zahl (Dualzahl) in eine dezimale Zahl um +BIN2HEX = BININHEX ## Wandelt eine binäre Zahl (Dualzahl) in eine hexadezimale Zahl um +BIN2OCT = BININOKT ## Wandelt eine binäre Zahl (Dualzahl) in eine oktale Zahl um +COMPLEX = KOMPLEXE ## Wandelt den Real- und Imaginärteil in eine komplexe Zahl um +CONVERT = UMWANDELN ## Wandelt eine Zahl von einem Maßsystem in ein anderes um +DEC2BIN = DEZINBIN ## Wandelt eine dezimale Zahl in eine binäre Zahl (Dualzahl) um +DEC2HEX = DEZINHEX ## Wandelt eine dezimale Zahl in eine hexadezimale Zahl um +DEC2OCT = DEZINOKT ## Wandelt eine dezimale Zahl in eine oktale Zahl um +DELTA = DELTA ## Überprüft, ob zwei Werte gleich sind +ERF = GAUSSFEHLER ## Gibt die Gauss'sche Fehlerfunktion zurück +ERFC = GAUSSFKOMPL ## Gibt das Komplement zur Gauss'schen Fehlerfunktion zurück +GESTEP = GGANZZAHL ## Überprüft, ob eine Zahl größer als ein gegebener Schwellenwert ist +HEX2BIN = HEXINBIN ## Wandelt eine hexadezimale Zahl in eine Binärzahl um +HEX2DEC = HEXINDEZ ## Wandelt eine hexadezimale Zahl in eine dezimale Zahl um +HEX2OCT = HEXINOKT ## Wandelt eine hexadezimale Zahl in eine Oktalzahl um +IMABS = IMABS ## Gibt den Absolutbetrag (Modulo) einer komplexen Zahl zurück +IMAGINARY = IMAGINÄRTEIL ## Gibt den Imaginärteil einer komplexen Zahl zurück +IMARGUMENT = IMARGUMENT ## Gibt das Argument Theta zurück, einen Winkel, der als Bogenmaß ausgedrückt wird +IMCONJUGATE = IMKONJUGIERTE ## Gibt die konjugierte komplexe Zahl zu einer komplexen Zahl zurück +IMCOS = IMCOS ## Gibt den Kosinus einer komplexen Zahl zurück +IMDIV = IMDIV ## Gibt den Quotienten zweier komplexer Zahlen zurück +IMEXP = IMEXP ## Gibt die algebraische Form einer in exponentieller Schreibweise vorliegenden komplexen Zahl zurück +IMLN = IMLN ## Gibt den natürlichen Logarithmus einer komplexen Zahl zurück +IMLOG10 = IMLOG10 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 10 zurück +IMLOG2 = IMLOG2 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 2 zurück +IMPOWER = IMAPOTENZ ## Potenziert eine komplexe Zahl mit einer ganzen Zahl +IMPRODUCT = IMPRODUKT ## Gibt das Produkt von komplexen Zahlen zurück +IMREAL = IMREALTEIL ## Gibt den Realteil einer komplexen Zahl zurück +IMSIN = IMSIN ## Gibt den Sinus einer komplexen Zahl zurück +IMSQRT = IMWURZEL ## Gibt die Quadratwurzel einer komplexen Zahl zurück +IMSUB = IMSUB ## Gibt die Differenz zwischen zwei komplexen Zahlen zurück +IMSUM = IMSUMME ## Gibt die Summe von komplexen Zahlen zurück +OCT2BIN = OKTINBIN ## Wandelt eine oktale Zahl in eine binäre Zahl (Dualzahl) um +OCT2DEC = OKTINDEZ ## Wandelt eine oktale Zahl in eine dezimale Zahl um +OCT2HEX = OKTINHEX ## Wandelt eine oktale Zahl in eine hexadezimale Zahl um + + +## +## Financial functions Finanzmathematische Funktionen +## +ACCRINT = AUFGELZINS ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers mit periodischen Zinszahlungen zurück +ACCRINTM = AUFGELZINSF ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers zurück, die bei Fälligkeit ausgezahlt werden +AMORDEGRC = AMORDEGRK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume mithilfe eines Abschreibungskoeffizienten zurück +AMORLINC = AMORLINEARK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume zurück +COUPDAYBS = ZINSTERMTAGVA ## Gibt die Anzahl der Tage vom Anfang des Zinstermins bis zum Abrechnungstermin zurück +COUPDAYS = ZINSTERMTAGE ## Gibt die Anzahl der Tage der Zinsperiode zurück, die den Abrechnungstermin einschließt +COUPDAYSNC = ZINSTERMTAGNZ ## Gibt die Anzahl der Tage vom Abrechnungstermin bis zum nächsten Zinstermin zurück +COUPNCD = ZINSTERMNZ ## Gibt das Datum des ersten Zinstermins nach dem Abrechnungstermin zurück +COUPNUM = ZINSTERMZAHL ## Gibt die Anzahl der Zinstermine zwischen Abrechnungs- und Fälligkeitsdatum zurück +COUPPCD = ZINSTERMVZ ## Gibt das Datum des letzten Zinstermins vor dem Abrechnungstermin zurück +CUMIPMT = KUMZINSZ ## Berechnet die kumulierten Zinsen, die zwischen zwei Perioden zu zahlen sind +CUMPRINC = KUMKAPITAL ## Berechnet die aufgelaufene Tilgung eines Darlehens, die zwischen zwei Perioden zu zahlen ist +DB = GDA2 ## Gibt die geometrisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück +DDB = GDA ## Gibt die Abschreibung eines Anlageguts für einen angegebenen Zeitraum unter Verwendung der degressiven Doppelraten-Abschreibung oder eines anderen von Ihnen angegebenen Abschreibungsverfahrens zurück +DISC = DISAGIO ## Gibt den in Prozent ausgedrückten Abzinsungssatz eines Wertpapiers zurück +DOLLARDE = NOTIERUNGDEZ ## Wandelt eine Notierung, die als Dezimalbruch ausgedrückt wurde, in eine Dezimalzahl um +DOLLARFR = NOTIERUNGBRU ## Wandelt eine Notierung, die als Dezimalzahl ausgedrückt wurde, in einen Dezimalbruch um +DURATION = DURATION ## Gibt die jährliche Duration eines Wertpapiers mit periodischen Zinszahlungen zurück +EFFECT = EFFEKTIV ## Gibt die jährliche Effektivverzinsung zurück +FV = ZW ## Gibt den zukünftigen Wert (Endwert) einer Investition zurück +FVSCHEDULE = ZW2 ## Gibt den aufgezinsten Wert des Anfangskapitals für eine Reihe periodisch unterschiedlicher Zinssätze zurück +INTRATE = ZINSSATZ ## Gibt den Zinssatz eines voll investierten Wertpapiers zurück +IPMT = ZINSZ ## Gibt die Zinszahlung einer Investition für die angegebene Periode zurück +IRR = IKV ## Gibt den internen Zinsfuß einer Investition ohne Finanzierungskosten oder Reinvestitionsgewinne zurück +ISPMT = ISPMT ## Berechnet die während eines bestimmten Zeitraums für eine Investition gezahlten Zinsen +MDURATION = MDURATION ## Gibt die geänderte Dauer für ein Wertpapier mit einem angenommenen Nennwert von 100 € zurück +MIRR = QIKV ## Gibt den internen Zinsfuß zurück, wobei positive und negative Zahlungen zu unterschiedlichen Sätzen finanziert werden +NOMINAL = NOMINAL ## Gibt die jährliche Nominalverzinsung zurück +NPER = ZZR ## Gibt die Anzahl der Zahlungsperioden einer Investition zurück +NPV = NBW ## Gibt den Nettobarwert einer Investition auf Basis periodisch anfallender Zahlungen und eines Abzinsungsfaktors zurück +ODDFPRICE = UNREGER.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück +ODDFYIELD = UNREGER.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück +ODDLPRICE = UNREGLE.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück +ODDLYIELD = UNREGLE.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück +PMT = RMZ ## Gibt die periodische Zahlung für eine Annuität zurück +PPMT = KAPZ ## Gibt die Kapitalrückzahlung einer Investition für eine angegebene Periode zurück +PRICE = KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das periodisch Zinsen auszahlt +PRICEDISC = KURSDISAGIO ## Gibt den Kurs pro 100 € Nennwert eines unverzinslichen Wertpapiers zurück +PRICEMAT = KURSFÄLLIG ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt +PV = BW ## Gibt den Barwert einer Investition zurück +RATE = ZINS ## Gibt den Zinssatz pro Zeitraum einer Annuität zurück +RECEIVED = AUSZAHLUNG ## Gibt den Auszahlungsbetrag eines voll investierten Wertpapiers am Fälligkeitstermin zurück +SLN = LIA ## Gibt die lineare Abschreibung eines Wirtschaftsguts pro Periode zurück +SYD = DIA ## Gibt die arithmetisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück +TBILLEQ = TBILLÄQUIV ## Gibt die Rendite für ein Wertpapier zurück +TBILLPRICE = TBILLKURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück +TBILLYIELD = TBILLRENDITE ## Gibt die Rendite für ein Wertpapier zurück +VDB = VDB ## Gibt die degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode oder Teilperiode zurück +XIRR = XINTZINSFUSS ## Gibt den internen Zinsfuß einer Reihe nicht periodisch anfallender Zahlungen zurück +XNPV = XKAPITALWERT ## Gibt den Nettobarwert (Kapitalwert) einer Reihe nicht periodisch anfallender Zahlungen zurück +YIELD = RENDITE ## Gibt die Rendite eines Wertpapiers zurück, das periodisch Zinsen auszahlt +YIELDDISC = RENDITEDIS ## Gibt die jährliche Rendite eines unverzinslichen Wertpapiers zurück +YIELDMAT = RENDITEFÄLL ## Gibt die jährliche Rendite eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt + + +## +## Information functions Informationsfunktionen +## +CELL = ZELLE ## Gibt Informationen zu Formatierung, Position oder Inhalt einer Zelle zurück +ERROR.TYPE = FEHLER.TYP ## Gibt eine Zahl zurück, die einem Fehlertyp entspricht +INFO = INFO ## Gibt Informationen zur aktuellen Betriebssystemumgebung zurück +ISBLANK = ISTLEER ## Gibt WAHR zurück, wenn der Wert leer ist +ISERR = ISTFEHL ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert außer #N/V ist +ISERROR = ISTFEHLER ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert ist +ISEVEN = ISTGERADE ## Gibt WAHR zurück, wenn es sich um eine gerade Zahl handelt +ISLOGICAL = ISTLOG ## Gibt WAHR zurück, wenn der Wert ein Wahrheitswert ist +ISNA = ISTNV ## Gibt WAHR zurück, wenn der Wert der Fehlerwert #N/V ist +ISNONTEXT = ISTKTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das keinen Text enthält +ISNUMBER = ISTZAHL ## Gibt WAHR zurück, wenn der Wert eine Zahl ist +ISODD = ISTUNGERADE ## Gibt WAHR zurück, wenn es sich um eine ungerade Zahl handelt +ISREF = ISTBEZUG ## Gibt WAHR zurück, wenn der Wert ein Bezug ist +ISTEXT = ISTTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das Text enthält +N = N ## Gibt den in eine Zahl umgewandelten Wert zurück +NA = NV ## Gibt den Fehlerwert #NV zurück +TYPE = TYP ## Gibt eine Zahl zurück, die den Datentyp des angegebenen Werts anzeigt + + +## +## Logical functions Logische Funktionen +## +AND = UND ## Gibt WAHR zurück, wenn alle zugehörigen Argumente WAHR sind +FALSE = FALSCH ## Gibt den Wahrheitswert FALSCH zurück +IF = WENN ## Gibt einen logischen Test zum Ausführen an +IFERROR = WENNFEHLER ## Gibt einen von Ihnen festgelegten Wert zurück, wenn die Auswertung der Formel zu einem Fehler führt; andernfalls wird das Ergebnis der Formel zurückgegeben +NOT = NICHT ## Kehrt den Wahrheitswert der zugehörigen Argumente um +OR = ODER ## Gibt WAHR zurück, wenn ein Argument WAHR ist +TRUE = WAHR ## Gibt den Wahrheitswert WAHR zurück + + +## +## Lookup and reference functions Nachschlage- und Verweisfunktionen +## +ADDRESS = ADRESSE ## Gibt einen Bezug auf eine einzelne Zelle in einem Tabellenblatt als Text zurück +AREAS = BEREICHE ## Gibt die Anzahl der innerhalb eines Bezugs aufgeführten Bereiche zurück +CHOOSE = WAHL ## Wählt einen Wert aus eine Liste mit Werten aus +COLUMN = SPALTE ## Gibt die Spaltennummer eines Bezugs zurück +COLUMNS = SPALTEN ## Gibt die Anzahl der Spalten in einem Bezug zurück +HLOOKUP = HVERWEIS ## Sucht in der obersten Zeile einer Matrix und gibt den Wert der angegebenen Zelle zurück +HYPERLINK = HYPERLINK ## Erstellt eine Verknüpfung, über die ein auf einem Netzwerkserver, in einem Intranet oder im Internet gespeichertes Dokument geöffnet wird +INDEX = INDEX ## Verwendet einen Index, um einen Wert aus einem Bezug oder einer Matrix auszuwählen +INDIRECT = INDIREKT ## Gibt einen Bezug zurück, der von einem Textwert angegeben wird +LOOKUP = LOOKUP ## Sucht Werte in einem Vektor oder einer Matrix +MATCH = VERGLEICH ## Sucht Werte in einem Bezug oder einer Matrix +OFFSET = BEREICH.VERSCHIEBEN ## Gibt einen Bezugoffset aus einem gegebenen Bezug zurück +ROW = ZEILE ## Gibt die Zeilennummer eines Bezugs zurück +ROWS = ZEILEN ## Gibt die Anzahl der Zeilen in einem Bezug zurück +RTD = RTD ## Ruft Echtzeitdaten von einem Programm ab, das die COM-Automatisierung (Automatisierung: Ein Verfahren, bei dem aus einer Anwendung oder einem Entwicklungstool heraus mit den Objekten einer anderen Anwendung gearbeitet wird. Die früher als OLE-Automatisierung bezeichnete Automatisierung ist ein Industriestandard und eine Funktion von COM (Component Object Model).) unterstützt +TRANSPOSE = MTRANS ## Gibt die transponierte Matrix einer Matrix zurück +VLOOKUP = SVERWEIS ## Sucht in der ersten Spalte einer Matrix und arbeitet sich durch die Zeile, um den Wert einer Zelle zurückzugeben + + +## +## Math and trigonometry functions Mathematische und trigonometrische Funktionen +## +ABS = ABS ## Gibt den Absolutwert einer Zahl zurück +ACOS = ARCCOS ## Gibt den Arkuskosinus einer Zahl zurück +ACOSH = ARCCOSHYP ## Gibt den umgekehrten hyperbolischen Kosinus einer Zahl zurück +ASIN = ARCSIN ## Gibt den Arkussinus einer Zahl zurück +ASINH = ARCSINHYP ## Gibt den umgekehrten hyperbolischen Sinus einer Zahl zurück +ATAN = ARCTAN ## Gibt den Arkustangens einer Zahl zurück +ATAN2 = ARCTAN2 ## Gibt den Arkustangens einer x- und einer y-Koordinate zurück +ATANH = ARCTANHYP ## Gibt den umgekehrten hyperbolischen Tangens einer Zahl zurück +CEILING = OBERGRENZE ## Rundet eine Zahl auf die nächste ganze Zahl oder das nächste Vielfache von Schritt +COMBIN = KOMBINATIONEN ## Gibt die Anzahl der Kombinationen für eine bestimmte Anzahl von Objekten zurück +COS = COS ## Gibt den Kosinus einer Zahl zurück +COSH = COSHYP ## Gibt den hyperbolischen Kosinus einer Zahl zurück +DEGREES = GRAD ## Wandelt Bogenmaß (Radiant) in Grad um +EVEN = GERADE ## Rundet eine Zahl auf die nächste gerade ganze Zahl auf +EXP = EXP ## Potenziert die Basis e mit der als Argument angegebenen Zahl +FACT = FAKULTÄT ## Gibt die Fakultät einer Zahl zurück +FACTDOUBLE = ZWEIFAKULTÄT ## Gibt die Fakultät zu Zahl mit Schrittlänge 2 zurück +FLOOR = UNTERGRENZE ## Rundet die Zahl auf Anzahl_Stellen ab +GCD = GGT ## Gibt den größten gemeinsamen Teiler zurück +INT = GANZZAHL ## Rundet eine Zahl auf die nächstkleinere ganze Zahl ab +LCM = KGV ## Gibt das kleinste gemeinsame Vielfache zurück +LN = LN ## Gibt den natürlichen Logarithmus einer Zahl zurück +LOG = LOG ## Gibt den Logarithmus einer Zahl zu der angegebenen Basis zurück +LOG10 = LOG10 ## Gibt den Logarithmus einer Zahl zur Basis 10 zurück +MDETERM = MDET ## Gibt die Determinante einer Matrix zurück +MINVERSE = MINV ## Gibt die inverse Matrix einer Matrix zurück +MMULT = MMULT ## Gibt das Produkt zweier Matrizen zurück +MOD = REST ## Gibt den Rest einer Division zurück +MROUND = VRUNDEN ## Gibt eine auf das gewünschte Vielfache gerundete Zahl zurück +MULTINOMIAL = POLYNOMIAL ## Gibt den Polynomialkoeffizienten einer Gruppe von Zahlen zurück +ODD = UNGERADE ## Rundet eine Zahl auf die nächste ungerade ganze Zahl auf +PI = PI ## Gibt den Wert Pi zurück +POWER = POTENZ ## Gibt als Ergebnis eine potenzierte Zahl zurück +PRODUCT = PRODUKT ## Multipliziert die zugehörigen Argumente +QUOTIENT = QUOTIENT ## Gibt den ganzzahligen Anteil einer Division zurück +RADIANS = BOGENMASS ## Wandelt Grad in Bogenmaß (Radiant) um +RAND = ZUFALLSZAHL ## Gibt eine Zufallszahl zwischen 0 und 1 zurück +RANDBETWEEN = ZUFALLSBEREICH ## Gibt eine Zufallszahl aus dem festgelegten Bereich zurück +ROMAN = RÖMISCH ## Wandelt eine arabische Zahl in eine römische Zahl als Text um +ROUND = RUNDEN ## Rundet eine Zahl auf eine bestimmte Anzahl von Dezimalstellen +ROUNDDOWN = ABRUNDEN ## Rundet die Zahl auf Anzahl_Stellen ab +ROUNDUP = AUFRUNDEN ## Rundet die Zahl auf Anzahl_Stellen auf +SERIESSUM = POTENZREIHE ## Gibt die Summe von Potenzen (zur Berechnung von Potenzreihen und dichotomen Wahrscheinlichkeiten) zurück +SIGN = VORZEICHEN ## Gibt das Vorzeichen einer Zahl zurück +SIN = SIN ## Gibt den Sinus einer Zahl zurück +SINH = SINHYP ## Gibt den hyperbolischen Sinus einer Zahl zurück +SQRT = WURZEL ## Gibt die Quadratwurzel einer Zahl zurück +SQRTPI = WURZELPI ## Gibt die Wurzel aus der mit Pi (pi) multiplizierten Zahl zurück +SUBTOTAL = TEILERGEBNIS ## Gibt ein Teilergebnis in einer Liste oder Datenbank zurück +SUM = SUMME ## Addiert die zugehörigen Argumente +SUMIF = SUMMEWENN ## Addiert Zahlen, die mit den Suchkriterien übereinstimmen +SUMIFS = SUMMEWENNS ## Die Zellen, die mehrere Kriterien erfüllen, werden in einem Bereich hinzugefügt +SUMPRODUCT = SUMMENPRODUKT ## Gibt die Summe der Produkte zusammengehöriger Matrixkomponenten zurück +SUMSQ = QUADRATESUMME ## Gibt die Summe der quadrierten Argumente zurück +SUMX2MY2 = SUMMEX2MY2 ## Gibt die Summe der Differenzen der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück +SUMX2PY2 = SUMMEX2PY2 ## Gibt die Summe der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück +SUMXMY2 = SUMMEXMY2 ## Gibt die Summe der quadrierten Differenzen für zusammengehörige Komponenten zweier Matrizen zurück +TAN = TAN ## Gibt den Tangens einer Zahl zurück +TANH = TANHYP ## Gibt den hyperbolischen Tangens einer Zahl zurück +TRUNC = KÜRZEN ## Schneidet die Kommastellen einer Zahl ab und gibt als Ergebnis eine ganze Zahl zurück + + +## +## Statistical functions Statistische Funktionen +## +AVEDEV = MITTELABW ## Gibt die durchschnittliche absolute Abweichung einer Reihe von Merkmalsausprägungen und ihrem Mittelwert zurück +AVERAGE = MITTELWERT ## Gibt den Mittelwert der zugehörigen Argumente zurück +AVERAGEA = MITTELWERTA ## Gibt den Mittelwert der zugehörigen Argumente, die Zahlen, Text und Wahrheitswerte enthalten, zurück +AVERAGEIF = MITTELWERTWENN ## Der Durchschnittswert (arithmetisches Mittel) für alle Zellen in einem Bereich, die einem angegebenen Kriterium entsprechen, wird zurückgegeben +AVERAGEIFS = MITTELWERTWENNS ## Gibt den Durchschnittswert (arithmetisches Mittel) aller Zellen zurück, die mehreren Kriterien entsprechen +BETADIST = BETAVERT ## Gibt die Werte der kumulierten Betaverteilungsfunktion zurück +BETAINV = BETAINV ## Gibt das Quantil der angegebenen Betaverteilung zurück +BINOMDIST = BINOMVERT ## Gibt Wahrscheinlichkeiten einer binomialverteilten Zufallsvariablen zurück +CHIDIST = CHIVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer Chi-Quadrat-verteilten Zufallsgröße zurück +CHIINV = CHIINV ## Gibt Quantile der Verteilungsfunktion (1-Alpha) der Chi-Quadrat-Verteilung zurück +CHITEST = CHITEST ## Gibt die Teststatistik eines Unabhängigkeitstests zurück +CONFIDENCE = KONFIDENZ ## Ermöglicht die Berechnung des 1-Alpha Konfidenzintervalls für den Erwartungswert einer Zufallsvariablen +CORREL = KORREL ## Gibt den Korrelationskoeffizienten zweier Reihen von Merkmalsausprägungen zurück +COUNT = ANZAHL ## Gibt die Anzahl der Zahlen in der Liste mit Argumenten an +COUNTA = ANZAHL2 ## Gibt die Anzahl der Werte in der Liste mit Argumenten an +COUNTBLANK = ANZAHLLEEREZELLEN ## Gibt die Anzahl der leeren Zellen in einem Bereich an +COUNTIF = ZÄHLENWENN ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit den Suchkriterien übereinstimmen +COUNTIFS = ZÄHLENWENNS ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit mehreren Suchkriterien übereinstimmen +COVAR = KOVAR ## Gibt die Kovarianz zurück, den Mittelwert der für alle Datenpunktpaare gebildeten Produkte der Abweichungen +CRITBINOM = KRITBINOM ## Gibt den kleinsten Wert zurück, für den die kumulierten Wahrscheinlichkeiten der Binomialverteilung kleiner oder gleich einer Grenzwahrscheinlichkeit sind +DEVSQ = SUMQUADABW ## Gibt die Summe der quadrierten Abweichungen der Datenpunkte von ihrem Stichprobenmittelwert zurück +EXPONDIST = EXPONVERT ## Gibt Wahrscheinlichkeiten einer exponential verteilten Zufallsvariablen zurück +FDIST = FVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer F-verteilten Zufallsvariablen zurück +FINV = FINV ## Gibt Quantile der F-Verteilung zurück +FISHER = FISHER ## Gibt die Fisher-Transformation zurück +FISHERINV = FISHERINV ## Gibt die Umkehrung der Fisher-Transformation zurück +FORECAST = PROGNOSE ## Gibt einen Wert zurück, der sich aus einem linearen Trend ergibt +FREQUENCY = HÄUFIGKEIT ## Gibt eine Häufigkeitsverteilung als vertikale Matrix zurück +FTEST = FTEST ## Gibt die Teststatistik eines F-Tests zurück +GAMMADIST = GAMMAVERT ## Gibt Wahrscheinlichkeiten einer gammaverteilten Zufallsvariablen zurück +GAMMAINV = GAMMAINV ## Gibt Quantile der Gammaverteilung zurück +GAMMALN = GAMMALN ## Gibt den natürlichen Logarithmus der Gammafunktion zurück, Γ(x) +GEOMEAN = GEOMITTEL ## Gibt das geometrische Mittel zurück +GROWTH = VARIATION ## Gibt Werte zurück, die sich aus einem exponentiellen Trend ergeben +HARMEAN = HARMITTEL ## Gibt das harmonische Mittel zurück +HYPGEOMDIST = HYPGEOMVERT ## Gibt Wahrscheinlichkeiten einer hypergeometrisch-verteilten Zufallsvariablen zurück +INTERCEPT = ACHSENABSCHNITT ## Gibt den Schnittpunkt der Regressionsgeraden zurück +KURT = KURT ## Gibt die Kurtosis (Exzess) einer Datengruppe zurück +LARGE = KGRÖSSTE ## Gibt den k-größten Wert einer Datengruppe zurück +LINEST = RGP ## Gibt die Parameter eines linearen Trends zurück +LOGEST = RKP ## Gibt die Parameter eines exponentiellen Trends zurück +LOGINV = LOGINV ## Gibt Quantile der Lognormalverteilung zurück +LOGNORMDIST = LOGNORMVERT ## Gibt Werte der Verteilungsfunktion einer lognormalverteilten Zufallsvariablen zurück +MAX = MAX ## Gibt den Maximalwert einer Liste mit Argumenten zurück +MAXA = MAXA ## Gibt den Maximalwert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten +MEDIAN = MEDIAN ## Gibt den Median der angegebenen Zahlen zurück +MIN = MIN ## Gibt den Minimalwert einer Liste mit Argumenten zurück +MINA = MINA ## Gibt den kleinsten Wert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten +MODE = MODALWERT ## Gibt den am häufigsten vorkommenden Wert in einer Datengruppe zurück +NEGBINOMDIST = NEGBINOMVERT ## Gibt Wahrscheinlichkeiten einer negativen, binominal verteilten Zufallsvariablen zurück +NORMDIST = NORMVERT ## Gibt Wahrscheinlichkeiten einer normal verteilten Zufallsvariablen zurück +NORMINV = NORMINV ## Gibt Quantile der Normalverteilung zurück +NORMSDIST = STANDNORMVERT ## Gibt Werte der Verteilungsfunktion einer standardnormalverteilten Zufallsvariablen zurück +NORMSINV = STANDNORMINV ## Gibt Quantile der Standardnormalverteilung zurück +PEARSON = PEARSON ## Gibt den Pearsonschen Korrelationskoeffizienten zurück +PERCENTILE = QUANTIL ## Gibt das Alpha-Quantil einer Gruppe von Daten zurück +PERCENTRANK = QUANTILSRANG ## Gibt den prozentualen Rang (Alpha) eines Werts in einer Datengruppe zurück +PERMUT = VARIATIONEN ## Gibt die Anzahl der Möglichkeiten zurück, um k Elemente aus einer Menge von n Elementen ohne Zurücklegen zu ziehen +POISSON = POISSON ## Gibt Wahrscheinlichkeiten einer poissonverteilten Zufallsvariablen zurück +PROB = WAHRSCHBEREICH ## Gibt die Wahrscheinlichkeit für ein von zwei Werten eingeschlossenes Intervall zurück +QUARTILE = QUARTILE ## Gibt die Quartile der Datengruppe zurück +RANK = RANG ## Gibt den Rang zurück, den eine Zahl innerhalb einer Liste von Zahlen einnimmt +RSQ = BESTIMMTHEITSMASS ## Gibt das Quadrat des Pearsonschen Korrelationskoeffizienten zurück +SKEW = SCHIEFE ## Gibt die Schiefe einer Verteilung zurück +SLOPE = STEIGUNG ## Gibt die Steigung der Regressionsgeraden zurück +SMALL = KKLEINSTE ## Gibt den k-kleinsten Wert einer Datengruppe zurück +STANDARDIZE = STANDARDISIERUNG ## Gibt den standardisierten Wert zurück +STDEV = STABW ## Schätzt die Standardabweichung ausgehend von einer Stichprobe +STDEVA = STABWA ## Schätzt die Standardabweichung ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält +STDEVP = STABWN ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit +STDEVPA = STABWNA ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält +STEYX = STFEHLERYX ## Gibt den Standardfehler der geschätzten y-Werte für alle x-Werte der Regression zurück +TDIST = TVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer (Student) t-verteilten Zufallsvariablen zurück +TINV = TINV ## Gibt Quantile der t-Verteilung zurück +TREND = TREND ## Gibt Werte zurück, die sich aus einem linearen Trend ergeben +TRIMMEAN = GESTUTZTMITTEL ## Gibt den Mittelwert einer Datengruppe zurück, ohne die Randwerte zu berücksichtigen +TTEST = TTEST ## Gibt die Teststatistik eines Student'schen t-Tests zurück +VAR = VARIANZ ## Schätzt die Varianz ausgehend von einer Stichprobe +VARA = VARIANZA ## Schätzt die Varianz ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält +VARP = VARIANZEN ## Berechnet die Varianz ausgehend von der Grundgesamtheit +VARPA = VARIANZENA ## Berechnet die Varianz ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält +WEIBULL = WEIBULL ## Gibt Wahrscheinlichkeiten einer weibullverteilten Zufallsvariablen zurück +ZTEST = GTEST ## Gibt den einseitigen Wahrscheinlichkeitswert für einen Gausstest (Normalverteilung) zurück + + +## +## Text functions Textfunktionen +## +ASC = ASC ## Konvertiert DB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in SB-Text +BAHTTEXT = BAHTTEXT ## Wandelt eine Zahl in Text im Währungsformat ß (Baht) um +CHAR = ZEICHEN ## Gibt das der Codezahl entsprechende Zeichen zurück +CLEAN = SÄUBERN ## Löscht alle nicht druckbaren Zeichen aus einem Text +CODE = CODE ## Gibt die Codezahl des ersten Zeichens in einem Text zurück +CONCATENATE = VERKETTEN ## Verknüpft mehrere Textelemente zu einem Textelement +DOLLAR = DM ## Wandelt eine Zahl in Text im Währungsformat € (Euro) um +EXACT = IDENTISCH ## Prüft, ob zwei Textwerte identisch sind +FIND = FINDEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) +FINDB = FINDENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) +FIXED = FEST ## Formatiert eine Zahl als Text mit einer festen Anzahl von Dezimalstellen +JIS = JIS ## Konvertiert SB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in DB-Text +LEFT = LINKS ## Gibt die Zeichen ganz links in einem Textwert zurück +LEFTB = LINKSB ## Gibt die Zeichen ganz links in einem Textwert zurück +LEN = LÄNGE ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück +LENB = LÄNGEB ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück +LOWER = KLEIN ## Wandelt Text in Kleinbuchstaben um +MID = TEIL ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück +MIDB = TEILB ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück +PHONETIC = PHONETIC ## Extrahiert die phonetischen (Furigana-)Zeichen aus einer Textzeichenfolge +PROPER = GROSS2 ## Wandelt den ersten Buchstaben aller Wörter eines Textwerts in Großbuchstaben um +REPLACE = ERSETZEN ## Ersetzt Zeichen in Text +REPLACEB = ERSETZENB ## Ersetzt Zeichen in Text +REPT = WIEDERHOLEN ## Wiederholt einen Text so oft wie angegeben +RIGHT = RECHTS ## Gibt die Zeichen ganz rechts in einem Textwert zurück +RIGHTB = RECHTSB ## Gibt die Zeichen ganz rechts in einem Textwert zurück +SEARCH = SUCHEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) +SEARCHB = SUCHENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) +SUBSTITUTE = WECHSELN ## Ersetzt in einer Zeichenfolge neuen Text gegen alten +T = T ## Wandelt die zugehörigen Argumente in Text um +TEXT = TEXT ## Formatiert eine Zahl und wandelt sie in Text um +TRIM = GLÄTTEN ## Entfernt Leerzeichen aus Text +UPPER = GROSS ## Wandelt Text in Großbuchstaben um +VALUE = WERT ## Wandelt ein Textargument in eine Zahl um diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/en/uk/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/en/uk/config new file mode 100755 index 0000000..859e4be --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/en/uk/config @@ -0,0 +1,8 @@ +## +## PhpSpreadsheet +## + +## +## (For future use) +## +currencySymbol = £ diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/config new file mode 100755 index 0000000..5b9b948 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € + + +## +## Excel Error Codes (For future use) + +## +NULL = #¡NULO! +DIV0 = #¡DIV/0! +VALUE = #¡VALOR! +REF = #¡REF! +NAME = #¿NOMBRE? +NUM = #¡NÚM! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/functions new file mode 100755 index 0000000..ac1ac86 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/es/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funciones de complementos y automatización +## +GETPIVOTDATA = IMPORTARDATOSDINAMICOS ## Devuelve los datos almacenados en un informe de tabla dinámica. + + +## +## Cube functions Funciones de cubo +## +CUBEKPIMEMBER = MIEMBROKPICUBO ## Devuelve un nombre, propiedad y medida de indicador de rendimiento clave (KPI) y muestra el nombre y la propiedad en la celda. Un KPI es una medida cuantificable, como los beneficios brutos mensuales o la facturación trimestral por empleado, que se usa para supervisar el rendimiento de una organización. +CUBEMEMBER = MIEMBROCUBO ## Devuelve un miembro o tupla en una jerarquía de cubo. Se usa para validar la existencia del miembro o la tupla en el cubo. +CUBEMEMBERPROPERTY = PROPIEDADMIEMBROCUBO ## Devuelve el valor de una propiedad de miembro del cubo Se usa para validar la existencia de un nombre de miembro en el cubo y para devolver la propiedad especificada para este miembro. +CUBERANKEDMEMBER = MIEMBRORANGOCUBO ## Devuelve el miembro n, o clasificado, de un conjunto. Se usa para devolver uno o más elementos de un conjunto, por ejemplo, el representante con mejores ventas o los diez mejores alumnos. +CUBESET = CONJUNTOCUBO ## Define un conjunto calculado de miembros o tuplas mediante el envío de una expresión de conjunto al cubo en el servidor, lo que crea el conjunto y, después, devuelve dicho conjunto a Microsoft Office Excel. +CUBESETCOUNT = RECUENTOCONJUNTOCUBO ## Devuelve el número de elementos de un conjunto. +CUBEVALUE = VALORCUBO ## Devuelve un valor agregado de un cubo. + + +## +## Database functions Funciones de base de datos +## +DAVERAGE = BDPROMEDIO ## Devuelve el promedio de las entradas seleccionadas en la base de datos. +DCOUNT = BDCONTAR ## Cuenta el número de celdas que contienen números en una base de datos. +DCOUNTA = BDCONTARA ## Cuenta el número de celdas no vacías en una base de datos. +DGET = BDEXTRAER ## Extrae de una base de datos un único registro que cumple los criterios especificados. +DMAX = BDMAX ## Devuelve el valor máximo de las entradas seleccionadas de la base de datos. +DMIN = BDMIN ## Devuelve el valor mínimo de las entradas seleccionadas de la base de datos. +DPRODUCT = BDPRODUCTO ## Multiplica los valores de un campo concreto de registros de una base de datos que cumplen los criterios especificados. +DSTDEV = BDDESVEST ## Calcula la desviación estándar a partir de una muestra de entradas seleccionadas en la base de datos. +DSTDEVP = BDDESVESTP ## Calcula la desviación estándar en función de la población total de las entradas seleccionadas de la base de datos. +DSUM = BDSUMA ## Suma los números de la columna de campo de los registros de la base de datos que cumplen los criterios. +DVAR = BDVAR ## Calcula la varianza a partir de una muestra de entradas seleccionadas de la base de datos. +DVARP = BDVARP ## Calcula la varianza a partir de la población total de entradas seleccionadas de la base de datos. + + +## +## Date and time functions Funciones de fecha y hora +## +DATE = FECHA ## Devuelve el número de serie correspondiente a una fecha determinada. +DATEVALUE = FECHANUMERO ## Convierte una fecha con formato de texto en un valor de número de serie. +DAY = DIA ## Convierte un número de serie en un valor de día del mes. +DAYS360 = DIAS360 ## Calcula el número de días entre dos fechas a partir de un año de 360 días. +EDATE = FECHA.MES ## Devuelve el número de serie de la fecha equivalente al número indicado de meses anteriores o posteriores a la fecha inicial. +EOMONTH = FIN.MES ## Devuelve el número de serie correspondiente al último día del mes anterior o posterior a un número de meses especificado. +HOUR = HORA ## Convierte un número de serie en un valor de hora. +MINUTE = MINUTO ## Convierte un número de serie en un valor de minuto. +MONTH = MES ## Convierte un número de serie en un valor de mes. +NETWORKDAYS = DIAS.LAB ## Devuelve el número de todos los días laborables existentes entre dos fechas. +NOW = AHORA ## Devuelve el número de serie correspondiente a la fecha y hora actuales. +SECOND = SEGUNDO ## Convierte un número de serie en un valor de segundo. +TIME = HORA ## Devuelve el número de serie correspondiente a una hora determinada. +TIMEVALUE = HORANUMERO ## Convierte una hora con formato de texto en un valor de número de serie. +TODAY = HOY ## Devuelve el número de serie correspondiente al día actual. +WEEKDAY = DIASEM ## Convierte un número de serie en un valor de día de la semana. +WEEKNUM = NUM.DE.SEMANA ## Convierte un número de serie en un número que representa el lugar numérico correspondiente a una semana de un año. +WORKDAY = DIA.LAB ## Devuelve el número de serie de la fecha que tiene lugar antes o después de un número determinado de días laborables. +YEAR = AÑO ## Convierte un número de serie en un valor de año. +YEARFRAC = FRAC.AÑO ## Devuelve la fracción de año que representa el número total de días existentes entre el valor de fecha_inicial y el de fecha_final. + + +## +## Engineering functions Funciones de ingeniería +## +BESSELI = BESSELI ## Devuelve la función Bessel In(x) modificada. +BESSELJ = BESSELJ ## Devuelve la función Bessel Jn(x). +BESSELK = BESSELK ## Devuelve la función Bessel Kn(x) modificada. +BESSELY = BESSELY ## Devuelve la función Bessel Yn(x). +BIN2DEC = BIN.A.DEC ## Convierte un número binario en decimal. +BIN2HEX = BIN.A.HEX ## Convierte un número binario en hexadecimal. +BIN2OCT = BIN.A.OCT ## Convierte un número binario en octal. +COMPLEX = COMPLEJO ## Convierte coeficientes reales e imaginarios en un número complejo. +CONVERT = CONVERTIR ## Convierte un número de un sistema de medida a otro. +DEC2BIN = DEC.A.BIN ## Convierte un número decimal en binario. +DEC2HEX = DEC.A.HEX ## Convierte un número decimal en hexadecimal. +DEC2OCT = DEC.A.OCT ## Convierte un número decimal en octal. +DELTA = DELTA ## Comprueba si dos valores son iguales. +ERF = FUN.ERROR ## Devuelve la función de error. +ERFC = FUN.ERROR.COMPL ## Devuelve la función de error complementario. +GESTEP = MAYOR.O.IGUAL ## Comprueba si un número es mayor que un valor de umbral. +HEX2BIN = HEX.A.BIN ## Convierte un número hexadecimal en binario. +HEX2DEC = HEX.A.DEC ## Convierte un número hexadecimal en decimal. +HEX2OCT = HEX.A.OCT ## Convierte un número hexadecimal en octal. +IMABS = IM.ABS ## Devuelve el valor absoluto (módulo) de un número complejo. +IMAGINARY = IMAGINARIO ## Devuelve el coeficiente imaginario de un número complejo. +IMARGUMENT = IM.ANGULO ## Devuelve el argumento theta, un ángulo expresado en radianes. +IMCONJUGATE = IM.CONJUGADA ## Devuelve la conjugada compleja de un número complejo. +IMCOS = IM.COS ## Devuelve el coseno de un número complejo. +IMDIV = IM.DIV ## Devuelve el cociente de dos números complejos. +IMEXP = IM.EXP ## Devuelve el valor exponencial de un número complejo. +IMLN = IM.LN ## Devuelve el logaritmo natural (neperiano) de un número complejo. +IMLOG10 = IM.LOG10 ## Devuelve el logaritmo en base 10 de un número complejo. +IMLOG2 = IM.LOG2 ## Devuelve el logaritmo en base 2 de un número complejo. +IMPOWER = IM.POT ## Devuelve un número complejo elevado a una potencia entera. +IMPRODUCT = IM.PRODUCT ## Devuelve el producto de números complejos. +IMREAL = IM.REAL ## Devuelve el coeficiente real de un número complejo. +IMSIN = IM.SENO ## Devuelve el seno de un número complejo. +IMSQRT = IM.RAIZ2 ## Devuelve la raíz cuadrada de un número complejo. +IMSUB = IM.SUSTR ## Devuelve la diferencia entre dos números complejos. +IMSUM = IM.SUM ## Devuelve la suma de números complejos. +OCT2BIN = OCT.A.BIN ## Convierte un número octal en binario. +OCT2DEC = OCT.A.DEC ## Convierte un número octal en decimal. +OCT2HEX = OCT.A.HEX ## Convierte un número octal en hexadecimal. + + +## +## Financial functions Funciones financieras +## +ACCRINT = INT.ACUM ## Devuelve el interés acumulado de un valor bursátil con pagos de interés periódicos. +ACCRINTM = INT.ACUM.V ## Devuelve el interés acumulado de un valor bursátil con pagos de interés al vencimiento. +AMORDEGRC = AMORTIZ.PROGRE ## Devuelve la amortización de cada período contable mediante el uso de un coeficiente de amortización. +AMORLINC = AMORTIZ.LIN ## Devuelve la amortización de cada uno de los períodos contables. +COUPDAYBS = CUPON.DIAS.L1 ## Devuelve el número de días desde el principio del período de un cupón hasta la fecha de liquidación. +COUPDAYS = CUPON.DIAS ## Devuelve el número de días del período (entre dos cupones) donde se encuentra la fecha de liquidación. +COUPDAYSNC = CUPON.DIAS.L2 ## Devuelve el número de días desde la fecha de liquidación hasta la fecha del próximo cupón. +COUPNCD = CUPON.FECHA.L2 ## Devuelve la fecha del próximo cupón después de la fecha de liquidación. +COUPNUM = CUPON.NUM ## Devuelve el número de pagos de cupón entre la fecha de liquidación y la fecha de vencimiento. +COUPPCD = CUPON.FECHA.L1 ## Devuelve la fecha de cupón anterior a la fecha de liquidación. +CUMIPMT = PAGO.INT.ENTRE ## Devuelve el interés acumulado pagado entre dos períodos. +CUMPRINC = PAGO.PRINC.ENTRE ## Devuelve el capital acumulado pagado de un préstamo entre dos períodos. +DB = DB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización de saldo fijo. +DDB = DDB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización por doble disminución de saldo u otro método que se especifique. +DISC = TASA.DESC ## Devuelve la tasa de descuento de un valor bursátil. +DOLLARDE = MONEDA.DEC ## Convierte una cotización de un valor bursátil expresada en forma fraccionaria en una cotización de un valor bursátil expresada en forma decimal. +DOLLARFR = MONEDA.FRAC ## Convierte una cotización de un valor bursátil expresada en forma decimal en una cotización de un valor bursátil expresada en forma fraccionaria. +DURATION = DURACION ## Devuelve la duración anual de un valor bursátil con pagos de interés periódico. +EFFECT = INT.EFECTIVO ## Devuelve la tasa de interés anual efectiva. +FV = VF ## Devuelve el valor futuro de una inversión. +FVSCHEDULE = VF.PLAN ## Devuelve el valor futuro de un capital inicial después de aplicar una serie de tasas de interés compuesto. +INTRATE = TASA.INT ## Devuelve la tasa de interés para la inversión total de un valor bursátil. +IPMT = PAGOINT ## Devuelve el pago de intereses de una inversión durante un período determinado. +IRR = TIR ## Devuelve la tasa interna de retorno para una serie de flujos de efectivo periódicos. +ISPMT = INT.PAGO.DIR ## Calcula el interés pagado durante un período específico de una inversión. +MDURATION = DURACION.MODIF ## Devuelve la duración de Macauley modificada de un valor bursátil con un valor nominal supuesto de 100 $. +MIRR = TIRM ## Devuelve la tasa interna de retorno donde se financian flujos de efectivo positivos y negativos a tasas diferentes. +NOMINAL = TASA.NOMINAL ## Devuelve la tasa nominal de interés anual. +NPER = NPER ## Devuelve el número de períodos de una inversión. +NPV = VNA ## Devuelve el valor neto actual de una inversión en función de una serie de flujos periódicos de efectivo y una tasa de descuento. +ODDFPRICE = PRECIO.PER.IRREGULAR.1 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un primer período impar. +ODDFYIELD = RENDTO.PER.IRREGULAR.1 ## Devuelve el rendimiento de un valor bursátil con un primer período impar. +ODDLPRICE = PRECIO.PER.IRREGULAR.2 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un último período impar. +ODDLYIELD = RENDTO.PER.IRREGULAR.2 ## Devuelve el rendimiento de un valor bursátil con un último período impar. +PMT = PAGO ## Devuelve el pago periódico de una anualidad. +PPMT = PAGOPRIN ## Devuelve el pago de capital de una inversión durante un período determinado. +PRICE = PRECIO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga una tasa de interés periódico. +PRICEDISC = PRECIO.DESCUENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con descuento. +PRICEMAT = PRECIO.VENCIMIENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga interés a su vencimiento. +PV = VALACT ## Devuelve el valor actual de una inversión. +RATE = TASA ## Devuelve la tasa de interés por período de una anualidad. +RECEIVED = CANTIDAD.RECIBIDA ## Devuelve la cantidad recibida al vencimiento de un valor bursátil completamente invertido. +SLN = SLN ## Devuelve la amortización por método directo de un bien en un período dado. +SYD = SYD ## Devuelve la amortización por suma de dígitos de los años de un bien durante un período especificado. +TBILLEQ = LETRA.DE.TES.EQV.A.BONO ## Devuelve el rendimiento de un bono equivalente a una letra del Tesoro (de EE.UU.) +TBILLPRICE = LETRA.DE.TES.PRECIO ## Devuelve el precio por un valor nominal de 100 $ de una letra del Tesoro (de EE.UU.) +TBILLYIELD = LETRA.DE.TES.RENDTO ## Devuelve el rendimiento de una letra del Tesoro (de EE.UU.) +VDB = DVS ## Devuelve la amortización de un bien durante un período específico o parcial a través del método de cálculo del saldo en disminución. +XIRR = TIR.NO.PER ## Devuelve la tasa interna de retorno para un flujo de efectivo que no es necesariamente periódico. +XNPV = VNA.NO.PER ## Devuelve el valor neto actual para un flujo de efectivo que no es necesariamente periódico. +YIELD = RENDTO ## Devuelve el rendimiento de un valor bursátil que paga intereses periódicos. +YIELDDISC = RENDTO.DESC ## Devuelve el rendimiento anual de un valor bursátil con descuento; por ejemplo, una letra del Tesoro (de EE.UU.) +YIELDMAT = RENDTO.VENCTO ## Devuelve el rendimiento anual de un valor bursátil que paga intereses al vencimiento. + + +## +## Information functions Funciones de información +## +CELL = CELDA ## Devuelve información acerca del formato, la ubicación o el contenido de una celda. +ERROR.TYPE = TIPO.DE.ERROR ## Devuelve un número que corresponde a un tipo de error. +INFO = INFO ## Devuelve información acerca del entorno operativo en uso. +ISBLANK = ESBLANCO ## Devuelve VERDADERO si el valor está en blanco. +ISERR = ESERR ## Devuelve VERDADERO si el valor es cualquier valor de error excepto #N/A. +ISERROR = ESERROR ## Devuelve VERDADERO si el valor es cualquier valor de error. +ISEVEN = ES.PAR ## Devuelve VERDADERO si el número es par. +ISLOGICAL = ESLOGICO ## Devuelve VERDADERO si el valor es un valor lógico. +ISNA = ESNOD ## Devuelve VERDADERO si el valor es el valor de error #N/A. +ISNONTEXT = ESNOTEXTO ## Devuelve VERDADERO si el valor no es texto. +ISNUMBER = ESNUMERO ## Devuelve VERDADERO si el valor es un número. +ISODD = ES.IMPAR ## Devuelve VERDADERO si el número es impar. +ISREF = ESREF ## Devuelve VERDADERO si el valor es una referencia. +ISTEXT = ESTEXTO ## Devuelve VERDADERO si el valor es texto. +N = N ## Devuelve un valor convertido en un número. +NA = ND ## Devuelve el valor de error #N/A. +TYPE = TIPO ## Devuelve un número que indica el tipo de datos de un valor. + + +## +## Logical functions Funciones lógicas +## +AND = Y ## Devuelve VERDADERO si todos sus argumentos son VERDADERO. +FALSE = FALSO ## Devuelve el valor lógico FALSO. +IF = SI ## Especifica una prueba lógica que realizar. +IFERROR = SI.ERROR ## Devuelve un valor que se especifica si una fórmula lo evalúa como un error; de lo contrario, devuelve el resultado de la fórmula. +NOT = NO ## Invierte el valor lógico del argumento. +OR = O ## Devuelve VERDADERO si cualquier argumento es VERDADERO. +TRUE = VERDADERO ## Devuelve el valor lógico VERDADERO. + + +## +## Lookup and reference functions Funciones de búsqueda y referencia +## +ADDRESS = DIRECCION ## Devuelve una referencia como texto a una sola celda de una hoja de cálculo. +AREAS = AREAS ## Devuelve el número de áreas de una referencia. +CHOOSE = ELEGIR ## Elige un valor de una lista de valores. +COLUMN = COLUMNA ## Devuelve el número de columna de una referencia. +COLUMNS = COLUMNAS ## Devuelve el número de columnas de una referencia. +HLOOKUP = BUSCARH ## Busca en la fila superior de una matriz y devuelve el valor de la celda indicada. +HYPERLINK = HIPERVINCULO ## Crea un acceso directo o un salto que abre un documento almacenado en un servidor de red, en una intranet o en Internet. +INDEX = INDICE ## Usa un índice para elegir un valor de una referencia o matriz. +INDIRECT = INDIRECTO ## Devuelve una referencia indicada por un valor de texto. +LOOKUP = BUSCAR ## Busca valores de un vector o una matriz. +MATCH = COINCIDIR ## Busca valores de una referencia o matriz. +OFFSET = DESREF ## Devuelve un desplazamiento de referencia respecto a una referencia dada. +ROW = FILA ## Devuelve el número de fila de una referencia. +ROWS = FILAS ## Devuelve el número de filas de una referencia. +RTD = RDTR ## Recupera datos en tiempo real desde un programa compatible con la automatización COM (automatización: modo de trabajar con los objetos de una aplicación desde otra aplicación o herramienta de entorno. La automatización, antes denominada automatización OLE, es un estándar de la industria y una función del Modelo de objetos componentes (COM).). +TRANSPOSE = TRANSPONER ## Devuelve la transposición de una matriz. +VLOOKUP = BUSCARV ## Busca en la primera columna de una matriz y se mueve en horizontal por la fila para devolver el valor de una celda. + + +## +## Math and trigonometry functions Funciones matemáticas y trigonométricas +## +ABS = ABS ## Devuelve el valor absoluto de un número. +ACOS = ACOS ## Devuelve el arcocoseno de un número. +ACOSH = ACOSH ## Devuelve el coseno hiperbólico inverso de un número. +ASIN = ASENO ## Devuelve el arcoseno de un número. +ASINH = ASENOH ## Devuelve el seno hiperbólico inverso de un número. +ATAN = ATAN ## Devuelve la arcotangente de un número. +ATAN2 = ATAN2 ## Devuelve la arcotangente de las coordenadas "x" e "y". +ATANH = ATANH ## Devuelve la tangente hiperbólica inversa de un número. +CEILING = MULTIPLO.SUPERIOR ## Redondea un número al entero más próximo o al múltiplo significativo más cercano. +COMBIN = COMBINAT ## Devuelve el número de combinaciones para un número determinado de objetos. +COS = COS ## Devuelve el coseno de un número. +COSH = COSH ## Devuelve el coseno hiperbólico de un número. +DEGREES = GRADOS ## Convierte radianes en grados. +EVEN = REDONDEA.PAR ## Redondea un número hasta el entero par más próximo. +EXP = EXP ## Devuelve e elevado a la potencia de un número dado. +FACT = FACT ## Devuelve el factorial de un número. +FACTDOUBLE = FACT.DOBLE ## Devuelve el factorial doble de un número. +FLOOR = MULTIPLO.INFERIOR ## Redondea un número hacia abajo, en dirección hacia cero. +GCD = M.C.D ## Devuelve el máximo común divisor. +INT = ENTERO ## Redondea un número hacia abajo hasta el entero más próximo. +LCM = M.C.M ## Devuelve el mínimo común múltiplo. +LN = LN ## Devuelve el logaritmo natural (neperiano) de un número. +LOG = LOG ## Devuelve el logaritmo de un número en una base especificada. +LOG10 = LOG10 ## Devuelve el logaritmo en base 10 de un número. +MDETERM = MDETERM ## Devuelve la determinante matricial de una matriz. +MINVERSE = MINVERSA ## Devuelve la matriz inversa de una matriz. +MMULT = MMULT ## Devuelve el producto de matriz de dos matrices. +MOD = RESIDUO ## Devuelve el resto de la división. +MROUND = REDOND.MULT ## Devuelve un número redondeado al múltiplo deseado. +MULTINOMIAL = MULTINOMIAL ## Devuelve el polinomio de un conjunto de números. +ODD = REDONDEA.IMPAR ## Redondea un número hacia arriba hasta el entero impar más próximo. +PI = PI ## Devuelve el valor de pi. +POWER = POTENCIA ## Devuelve el resultado de elevar un número a una potencia. +PRODUCT = PRODUCTO ## Multiplica sus argumentos. +QUOTIENT = COCIENTE ## Devuelve la parte entera de una división. +RADIANS = RADIANES ## Convierte grados en radianes. +RAND = ALEATORIO ## Devuelve un número aleatorio entre 0 y 1. +RANDBETWEEN = ALEATORIO.ENTRE ## Devuelve un número aleatorio entre los números que especifique. +ROMAN = NUMERO.ROMANO ## Convierte un número arábigo en número romano, con formato de texto. +ROUND = REDONDEAR ## Redondea un número al número de decimales especificado. +ROUNDDOWN = REDONDEAR.MENOS ## Redondea un número hacia abajo, en dirección hacia cero. +ROUNDUP = REDONDEAR.MAS ## Redondea un número hacia arriba, en dirección contraria a cero. +SERIESSUM = SUMA.SERIES ## Devuelve la suma de una serie de potencias en función de la fórmula. +SIGN = SIGNO ## Devuelve el signo de un número. +SIN = SENO ## Devuelve el seno de un ángulo determinado. +SINH = SENOH ## Devuelve el seno hiperbólico de un número. +SQRT = RAIZ ## Devuelve la raíz cuadrada positiva de un número. +SQRTPI = RAIZ2PI ## Devuelve la raíz cuadrada de un número multiplicado por PI (número * pi). +SUBTOTAL = SUBTOTALES ## Devuelve un subtotal en una lista o base de datos. +SUM = SUMA ## Suma sus argumentos. +SUMIF = SUMAR.SI ## Suma las celdas especificadas que cumplen unos criterios determinados. +SUMIFS = SUMAR.SI.CONJUNTO ## Suma las celdas de un rango que cumplen varios criterios. +SUMPRODUCT = SUMAPRODUCTO ## Devuelve la suma de los productos de los correspondientes componentes de matriz. +SUMSQ = SUMA.CUADRADOS ## Devuelve la suma de los cuadrados de los argumentos. +SUMX2MY2 = SUMAX2MENOSY2 ## Devuelve la suma de la diferencia de los cuadrados de los valores correspondientes de dos matrices. +SUMX2PY2 = SUMAX2MASY2 ## Devuelve la suma de la suma de los cuadrados de los valores correspondientes de dos matrices. +SUMXMY2 = SUMAXMENOSY2 ## Devuelve la suma de los cuadrados de las diferencias de los valores correspondientes de dos matrices. +TAN = TAN ## Devuelve la tangente de un número. +TANH = TANH ## Devuelve la tangente hiperbólica de un número. +TRUNC = TRUNCAR ## Trunca un número a un entero. + + +## +## Statistical functions Funciones estadísticas +## +AVEDEV = DESVPROM ## Devuelve el promedio de las desviaciones absolutas de la media de los puntos de datos. +AVERAGE = PROMEDIO ## Devuelve el promedio de sus argumentos. +AVERAGEA = PROMEDIOA ## Devuelve el promedio de sus argumentos, incluidos números, texto y valores lógicos. +AVERAGEIF = PROMEDIO.SI ## Devuelve el promedio (media aritmética) de todas las celdas de un rango que cumplen unos criterios determinados. +AVERAGEIFS = PROMEDIO.SI.CONJUNTO ## Devuelve el promedio (media aritmética) de todas las celdas que cumplen múltiples criterios. +BETADIST = DISTR.BETA ## Devuelve la función de distribución beta acumulativa. +BETAINV = DISTR.BETA.INV ## Devuelve la función inversa de la función de distribución acumulativa de una distribución beta especificada. +BINOMDIST = DISTR.BINOM ## Devuelve la probabilidad de una variable aleatoria discreta siguiendo una distribución binomial. +CHIDIST = DISTR.CHI ## Devuelve la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. +CHIINV = PRUEBA.CHI.INV ## Devuelve la función inversa de la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. +CHITEST = PRUEBA.CHI ## Devuelve la prueba de independencia. +CONFIDENCE = INTERVALO.CONFIANZA ## Devuelve el intervalo de confianza de la media de una población. +CORREL = COEF.DE.CORREL ## Devuelve el coeficiente de correlación entre dos conjuntos de datos. +COUNT = CONTAR ## Cuenta cuántos números hay en la lista de argumentos. +COUNTA = CONTARA ## Cuenta cuántos valores hay en la lista de argumentos. +COUNTBLANK = CONTAR.BLANCO ## Cuenta el número de celdas en blanco de un rango. +COUNTIF = CONTAR.SI ## Cuenta el número de celdas, dentro del rango, que cumplen el criterio especificado. +COUNTIFS = CONTAR.SI.CONJUNTO ## Cuenta el número de celdas, dentro del rango, que cumplen varios criterios. +COVAR = COVAR ## Devuelve la covarianza, que es el promedio de los productos de las desviaciones para cada pareja de puntos de datos. +CRITBINOM = BINOM.CRIT ## Devuelve el menor valor cuya distribución binomial acumulativa es menor o igual a un valor de criterio. +DEVSQ = DESVIA2 ## Devuelve la suma de los cuadrados de las desviaciones. +EXPONDIST = DISTR.EXP ## Devuelve la distribución exponencial. +FDIST = DISTR.F ## Devuelve la distribución de probabilidad F. +FINV = DISTR.F.INV ## Devuelve la función inversa de la distribución de probabilidad F. +FISHER = FISHER ## Devuelve la transformación Fisher. +FISHERINV = PRUEBA.FISHER.INV ## Devuelve la función inversa de la transformación Fisher. +FORECAST = PRONOSTICO ## Devuelve un valor en una tendencia lineal. +FREQUENCY = FRECUENCIA ## Devuelve una distribución de frecuencia como una matriz vertical. +FTEST = PRUEBA.F ## Devuelve el resultado de una prueba F. +GAMMADIST = DISTR.GAMMA ## Devuelve la distribución gamma. +GAMMAINV = DISTR.GAMMA.INV ## Devuelve la función inversa de la distribución gamma acumulativa. +GAMMALN = GAMMA.LN ## Devuelve el logaritmo natural de la función gamma, G(x). +GEOMEAN = MEDIA.GEOM ## Devuelve la media geométrica. +GROWTH = CRECIMIENTO ## Devuelve valores en una tendencia exponencial. +HARMEAN = MEDIA.ARMO ## Devuelve la media armónica. +HYPGEOMDIST = DISTR.HIPERGEOM ## Devuelve la distribución hipergeométrica. +INTERCEPT = INTERSECCION.EJE ## Devuelve la intersección de la línea de regresión lineal. +KURT = CURTOSIS ## Devuelve la curtosis de un conjunto de datos. +LARGE = K.ESIMO.MAYOR ## Devuelve el k-ésimo mayor valor de un conjunto de datos. +LINEST = ESTIMACION.LINEAL ## Devuelve los parámetros de una tendencia lineal. +LOGEST = ESTIMACION.LOGARITMICA ## Devuelve los parámetros de una tendencia exponencial. +LOGINV = DISTR.LOG.INV ## Devuelve la función inversa de la distribución logarítmico-normal. +LOGNORMDIST = DISTR.LOG.NORM ## Devuelve la distribución logarítmico-normal acumulativa. +MAX = MAX ## Devuelve el valor máximo de una lista de argumentos. +MAXA = MAXA ## Devuelve el valor máximo de una lista de argumentos, incluidos números, texto y valores lógicos. +MEDIAN = MEDIANA ## Devuelve la mediana de los números dados. +MIN = MIN ## Devuelve el valor mínimo de una lista de argumentos. +MINA = MINA ## Devuelve el valor mínimo de una lista de argumentos, incluidos números, texto y valores lógicos. +MODE = MODA ## Devuelve el valor más común de un conjunto de datos. +NEGBINOMDIST = NEGBINOMDIST ## Devuelve la distribución binomial negativa. +NORMDIST = DISTR.NORM ## Devuelve la distribución normal acumulativa. +NORMINV = DISTR.NORM.INV ## Devuelve la función inversa de la distribución normal acumulativa. +NORMSDIST = DISTR.NORM.ESTAND ## Devuelve la distribución normal estándar acumulativa. +NORMSINV = DISTR.NORM.ESTAND.INV ## Devuelve la función inversa de la distribución normal estándar acumulativa. +PEARSON = PEARSON ## Devuelve el coeficiente de momento de correlación de producto Pearson. +PERCENTILE = PERCENTIL ## Devuelve el k-ésimo percentil de los valores de un rango. +PERCENTRANK = RANGO.PERCENTIL ## Devuelve el rango porcentual de un valor de un conjunto de datos. +PERMUT = PERMUTACIONES ## Devuelve el número de permutaciones de un número determinado de objetos. +POISSON = POISSON ## Devuelve la distribución de Poisson. +PROB = PROBABILIDAD ## Devuelve la probabilidad de que los valores de un rango se encuentren entre dos límites. +QUARTILE = CUARTIL ## Devuelve el cuartil de un conjunto de datos. +RANK = JERARQUIA ## Devuelve la jerarquía de un número en una lista de números. +RSQ = COEFICIENTE.R2 ## Devuelve el cuadrado del coeficiente de momento de correlación de producto Pearson. +SKEW = COEFICIENTE.ASIMETRIA ## Devuelve la asimetría de una distribución. +SLOPE = PENDIENTE ## Devuelve la pendiente de la línea de regresión lineal. +SMALL = K.ESIMO.MENOR ## Devuelve el k-ésimo menor valor de un conjunto de datos. +STANDARDIZE = NORMALIZACION ## Devuelve un valor normalizado. +STDEV = DESVEST ## Calcula la desviación estándar a partir de una muestra. +STDEVA = DESVESTA ## Calcula la desviación estándar a partir de una muestra, incluidos números, texto y valores lógicos. +STDEVP = DESVESTP ## Calcula la desviación estándar en función de toda la población. +STDEVPA = DESVESTPA ## Calcula la desviación estándar en función de toda la población, incluidos números, texto y valores lógicos. +STEYX = ERROR.TIPICO.XY ## Devuelve el error estándar del valor de "y" previsto para cada "x" de la regresión. +TDIST = DISTR.T ## Devuelve la distribución de t de Student. +TINV = DISTR.T.INV ## Devuelve la función inversa de la distribución de t de Student. +TREND = TENDENCIA ## Devuelve valores en una tendencia lineal. +TRIMMEAN = MEDIA.ACOTADA ## Devuelve la media del interior de un conjunto de datos. +TTEST = PRUEBA.T ## Devuelve la probabilidad asociada a una prueba t de Student. +VAR = VAR ## Calcula la varianza en función de una muestra. +VARA = VARA ## Calcula la varianza en función de una muestra, incluidos números, texto y valores lógicos. +VARP = VARP ## Calcula la varianza en función de toda la población. +VARPA = VARPA ## Calcula la varianza en función de toda la población, incluidos números, texto y valores lógicos. +WEIBULL = DIST.WEIBULL ## Devuelve la distribución de Weibull. +ZTEST = PRUEBA.Z ## Devuelve el valor de una probabilidad de una cola de una prueba z. + + +## +## Text functions Funciones de texto +## +ASC = ASC ## Convierte las letras inglesas o katakana de ancho completo (de dos bytes) dentro de una cadena de caracteres en caracteres de ancho medio (de un byte). +BAHTTEXT = TEXTOBAHT ## Convierte un número en texto, con el formato de moneda ß (Baht). +CHAR = CARACTER ## Devuelve el carácter especificado por el número de código. +CLEAN = LIMPIAR ## Quita del texto todos los caracteres no imprimibles. +CODE = CODIGO ## Devuelve un código numérico del primer carácter de una cadena de texto. +CONCATENATE = CONCATENAR ## Concatena varios elementos de texto en uno solo. +DOLLAR = MONEDA ## Convierte un número en texto, con el formato de moneda $ (dólar). +EXACT = IGUAL ## Comprueba si dos valores de texto son idénticos. +FIND = ENCONTRAR ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). +FINDB = ENCONTRARB ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). +FIXED = DECIMAL ## Da formato a un número como texto con un número fijo de decimales. +JIS = JIS ## Convierte las letras inglesas o katakana de ancho medio (de un byte) dentro de una cadena de caracteres en caracteres de ancho completo (de dos bytes). +LEFT = IZQUIERDA ## Devuelve los caracteres del lado izquierdo de un valor de texto. +LEFTB = IZQUIERDAB ## Devuelve los caracteres del lado izquierdo de un valor de texto. +LEN = LARGO ## Devuelve el número de caracteres de una cadena de texto. +LENB = LARGOB ## Devuelve el número de caracteres de una cadena de texto. +LOWER = MINUSC ## Pone el texto en minúsculas. +MID = EXTRAE ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. +MIDB = EXTRAEB ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. +PHONETIC = FONETICO ## Extrae los caracteres fonéticos (furigana) de una cadena de texto. +PROPER = NOMPROPIO ## Pone en mayúscula la primera letra de cada palabra de un valor de texto. +REPLACE = REEMPLAZAR ## Reemplaza caracteres de texto. +REPLACEB = REEMPLAZARB ## Reemplaza caracteres de texto. +REPT = REPETIR ## Repite el texto un número determinado de veces. +RIGHT = DERECHA ## Devuelve los caracteres del lado derecho de un valor de texto. +RIGHTB = DERECHAB ## Devuelve los caracteres del lado derecho de un valor de texto. +SEARCH = HALLAR ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). +SEARCHB = HALLARB ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). +SUBSTITUTE = SUSTITUIR ## Sustituye texto nuevo por texto antiguo en una cadena de texto. +T = T ## Convierte sus argumentos a texto. +TEXT = TEXTO ## Da formato a un número y lo convierte en texto. +TRIM = ESPACIOS ## Quita los espacios del texto. +UPPER = MAYUSC ## Pone el texto en mayúsculas. +VALUE = VALOR ## Convierte un argumento de texto en un número. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/config new file mode 100755 index 0000000..22aaf58 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = $ # Symbol not known, should it be a € (Euro)? + + +## +## Excel Error Codes (For future use) + +## +NULL = #TYHJÄ! +DIV0 = #JAKO/0! +VALUE = #ARVO! +REF = #VIITTAUS! +NAME = #NIMI? +NUM = #LUKU! +NA = #PUUTTUU diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/functions new file mode 100755 index 0000000..289e0ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fi/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Apuohjelma- ja automaatiofunktiot +## +GETPIVOTDATA = NOUDA.PIVOT.TIEDOT ## Palauttaa pivot-taulukkoraporttiin tallennettuja tietoja. + + +## +## Cube functions Kuutiofunktiot +## +CUBEKPIMEMBER = KUUTIOKPIJÄSEN ## Palauttaa suorituskykyilmaisimen (KPI) nimen, ominaisuuden sekä mitan ja näyttää nimen sekä ominaisuuden solussa. KPI on mitattavissa oleva suure, kuten kuukauden bruttotuotto tai vuosineljänneksen työntekijäkohtainen liikevaihto, joiden avulla tarkkaillaan organisaation suorituskykyä. +CUBEMEMBER = KUUTIONJÄSEN ## Palauttaa kuutiohierarkian jäsenen tai monikon. Tällä funktiolla voit tarkistaa, että jäsen tai monikko on olemassa kuutiossa. +CUBEMEMBERPROPERTY = KUUTIONJÄSENENOMINAISUUS ## Palauttaa kuution jäsenominaisuuden arvon. Tällä funktiolla voit tarkistaa, että nimi on olemassa kuutiossa, ja palauttaa tämän jäsenen määritetyn ominaisuuden. +CUBERANKEDMEMBER = KUUTIONLUOKITELTUJÄSEN ## Palauttaa joukon n:nnen jäsenen. Tällä funktiolla voit palauttaa joukosta elementtejä, kuten parhaan myyjän tai 10 parasta opiskelijaa. +CUBESET = KUUTIOJOUKKO ## Määrittää lasketun jäsen- tai monikkojoukon lähettämällä joukon lausekkeita palvelimessa olevalle kuutiolle. Palvelin luo joukon ja palauttaa sen Microsoft Office Excelille. +CUBESETCOUNT = KUUTIOJOUKKOJENMÄÄRÄ ## Palauttaa joukon kohteiden määrän. +CUBEVALUE = KUUTIONARVO ## Palauttaa koostetun arvon kuutiosta. + + +## +## Database functions Tietokantafunktiot +## +DAVERAGE = TKESKIARVO ## Palauttaa valittujen tietokantamerkintöjen keskiarvon. +DCOUNT = TLASKE ## Laskee tietokannan lukuja sisältävien solujen määrän. +DCOUNTA = TLASKEA ## Laskee tietokannan tietoja sisältävien solujen määrän. +DGET = TNOUDA ## Hakee määritettyjä ehtoja vastaavan tietueen tietokannasta. +DMAX = TMAKS ## Palauttaa suurimman arvon tietokannasta valittujen arvojen joukosta. +DMIN = TMIN ## Palauttaa pienimmän arvon tietokannasta valittujen arvojen joukosta. +DPRODUCT = TTULO ## Kertoo määritetyn ehdon täyttävien tietokannan tietueiden tietyssä kentässä olevat arvot. +DSTDEV = TKESKIHAJONTA ## Laskee keskihajonnan tietokannasta valituista arvoista muodostuvan otoksen perusteella. +DSTDEVP = TKESKIHAJONTAP ## Laskee keskihajonnan tietokannasta valittujen arvojen koko populaation perusteella. +DSUM = TSUMMA ## Lisää luvut määritetyn ehdon täyttävien tietokannan tietueiden kenttäsarakkeeseen. +DVAR = TVARIANSSI ## Laskee varianssin tietokannasta valittujen arvojen otoksen perusteella. +DVARP = TVARIANSSIP ## Laskee varianssin tietokannasta valittujen arvojen koko populaation perusteella. + + +## +## Date and time functions Päivämäärä- ja aikafunktiot +## +DATE = PÄIVÄYS ## Palauttaa annetun päivämäärän järjestysluvun. +DATEVALUE = PÄIVÄYSARVO ## Muuntaa tekstimuodossa olevan päivämäärän järjestysluvuksi. +DAY = PÄIVÄ ## Muuntaa järjestysluvun kuukauden päiväksi. +DAYS360 = PÄIVÄT360 ## Laskee kahden päivämäärän välisten päivien määrän käyttäen perustana 360-päiväistä vuotta. +EDATE = PÄIVÄ.KUUKAUSI ## Palauttaa järjestyslukuna päivämäärän, joka poikkeaa aloituspäivän päivämäärästä annetun kuukausimäärän verran joko eteen- tai taaksepäin. +EOMONTH = KUUKAUSI.LOPPU ## Palauttaa järjestyslukuna sen kuukauden viimeisen päivämäärän, joka poikkeaa annetun kuukausimäärän verran eteen- tai taaksepäin. +HOUR = TUNNIT ## Muuntaa järjestysluvun tunneiksi. +MINUTE = MINUUTIT ## Muuntaa järjestysluvun minuuteiksi. +MONTH = KUUKAUSI ## Muuntaa järjestysluvun kuukausiksi. +NETWORKDAYS = TYÖPÄIVÄT ## Palauttaa kahden päivämäärän välissä olevien täysien työpäivien määrän. +NOW = NYT ## Palauttaa kuluvan päivämäärän ja ajan järjestysnumeron. +SECOND = SEKUNNIT ## Muuntaa järjestysluvun sekunneiksi. +TIME = AIKA ## Palauttaa annetun kellonajan järjestysluvun. +TIMEVALUE = AIKA_ARVO ## Muuntaa tekstimuodossa olevan kellonajan järjestysluvuksi. +TODAY = TÄMÄ.PÄIVÄ ## Palauttaa kuluvan päivän päivämäärän järjestysluvun. +WEEKDAY = VIIKONPÄIVÄ ## Muuntaa järjestysluvun viikonpäiväksi. +WEEKNUM = VIIKKO.NRO ## Muuntaa järjestysluvun luvuksi, joka ilmaisee viikon järjestysluvun vuoden alusta laskettuna. +WORKDAY = TYÖPÄIVÄ ## Palauttaa järjestysluvun päivämäärälle, joka sijaitsee annettujen työpäivien verran eteen tai taaksepäin. +YEAR = VUOSI ## Muuntaa järjestysluvun vuosiksi. +YEARFRAC = VUOSI.OSA ## Palauttaa määritettyjen päivämäärien (aloituspäivä ja lopetuspäivä) välisen osan vuodesta. + + +## +## Engineering functions Tekniset funktiot +## +BESSELI = BESSELI ## Palauttaa muunnetun Bessel-funktion In(x). +BESSELJ = BESSELJ ## Palauttaa Bessel-funktion Jn(x). +BESSELK = BESSELK ## Palauttaa muunnetun Bessel-funktion Kn(x). +BESSELY = BESSELY ## Palauttaa Bessel-funktion Yn(x). +BIN2DEC = BINDES ## Muuntaa binaariluvun desimaaliluvuksi. +BIN2HEX = BINHEKSA ## Muuntaa binaariluvun heksadesimaaliluvuksi. +BIN2OCT = BINOKT ## Muuntaa binaariluvun oktaaliluvuksi. +COMPLEX = KOMPLEKSI ## Muuntaa reaali- ja imaginaariosien kertoimet kompleksiluvuksi. +CONVERT = MUUNNA ## Muuntaa luvun toisen mittajärjestelmän mukaiseksi. +DEC2BIN = DESBIN ## Muuntaa desimaaliluvun binaariluvuksi. +DEC2HEX = DESHEKSA ## Muuntaa kymmenjärjestelmän luvun heksadesimaaliluvuksi. +DEC2OCT = DESOKT ## Muuntaa kymmenjärjestelmän luvun oktaaliluvuksi. +DELTA = SAMA.ARVO ## Tarkistaa, ovatko kaksi arvoa yhtä suuria. +ERF = VIRHEFUNKTIO ## Palauttaa virhefunktion. +ERFC = VIRHEFUNKTIO.KOMPLEMENTTI ## Palauttaa komplementtivirhefunktion. +GESTEP = RAJA ## Testaa, onko luku suurempi kuin kynnysarvo. +HEX2BIN = HEKSABIN ## Muuntaa heksadesimaaliluvun binaariluvuksi. +HEX2DEC = HEKSADES ## Muuntaa heksadesimaaliluvun desimaaliluvuksi. +HEX2OCT = HEKSAOKT ## Muuntaa heksadesimaaliluvun oktaaliluvuksi. +IMABS = KOMPLEKSI.ITSEISARVO ## Palauttaa kompleksiluvun itseisarvon (moduluksen). +IMAGINARY = KOMPLEKSI.IMAG ## Palauttaa kompleksiluvun imaginaariosan kertoimen. +IMARGUMENT = KOMPLEKSI.ARG ## Palauttaa theeta-argumentin, joka on radiaaneina annettu kulma. +IMCONJUGATE = KOMPLEKSI.KONJ ## Palauttaa kompleksiluvun konjugaattiluvun. +IMCOS = KOMPLEKSI.COS ## Palauttaa kompleksiluvun kosinin. +IMDIV = KOMPLEKSI.OSAM ## Palauttaa kahden kompleksiluvun osamäärän. +IMEXP = KOMPLEKSI.EKSP ## Palauttaa kompleksiluvun eksponentin. +IMLN = KOMPLEKSI.LN ## Palauttaa kompleksiluvun luonnollisen logaritmin. +IMLOG10 = KOMPLEKSI.LOG10 ## Palauttaa kompleksiluvun kymmenkantaisen logaritmin. +IMLOG2 = KOMPLEKSI.LOG2 ## Palauttaa kompleksiluvun kaksikantaisen logaritmin. +IMPOWER = KOMPLEKSI.POT ## Palauttaa kokonaislukupotenssiin korotetun kompleksiluvun. +IMPRODUCT = KOMPLEKSI.TULO ## Palauttaa kompleksilukujen tulon. +IMREAL = KOMPLEKSI.REAALI ## Palauttaa kompleksiluvun reaaliosan kertoimen. +IMSIN = KOMPLEKSI.SIN ## Palauttaa kompleksiluvun sinin. +IMSQRT = KOMPLEKSI.NELIÖJ ## Palauttaa kompleksiluvun neliöjuuren. +IMSUB = KOMPLEKSI.EROTUS ## Palauttaa kahden kompleksiluvun erotuksen. +IMSUM = KOMPLEKSI.SUM ## Palauttaa kompleksilukujen summan. +OCT2BIN = OKTBIN ## Muuntaa oktaaliluvun binaariluvuksi. +OCT2DEC = OKTDES ## Muuntaa oktaaliluvun desimaaliluvuksi. +OCT2HEX = OKTHEKSA ## Muuntaa oktaaliluvun heksadesimaaliluvuksi. + + +## +## Financial functions Rahoitusfunktiot +## +ACCRINT = KERTYNYT.KORKO ## Laskee arvopaperille kertyneen koron, kun korko kertyy säännöllisin väliajoin. +ACCRINTM = KERTYNYT.KORKO.LOPUSSA ## Laskee arvopaperille kertyneen koron, kun korko maksetaan eräpäivänä. +AMORDEGRC = AMORDEGRC ## Laskee kunkin laskentakauden poiston poistokerrointa käyttämällä. +AMORLINC = AMORLINC ## Palauttaa kunkin laskentakauden poiston. +COUPDAYBS = KORKOPÄIVÄT.ALUSTA ## Palauttaa koronmaksukauden aloituspäivän ja tilityspäivän välisen ajanjakson päivien määrän. +COUPDAYS = KORKOPÄIVÄT ## Palauttaa päivien määrän koronmaksukaudelta, johon tilityspäivä kuuluu. +COUPDAYSNC = KORKOPÄIVÄT.SEURAAVA ## Palauttaa tilityspäivän ja seuraavan koronmaksupäivän välisen ajanjakson päivien määrän. +COUPNCD = KORKOMAKSU.SEURAAVA ## Palauttaa tilityspäivän jälkeisen seuraavan koronmaksupäivän. +COUPNUM = KORKOPÄIVÄJAKSOT ## Palauttaa arvopaperin ostopäivän ja erääntymispäivän välisten koronmaksupäivien määrän. +COUPPCD = KORKOPÄIVÄ.EDELLINEN ## Palauttaa tilityspäivää edeltävän koronmaksupäivän. +CUMIPMT = MAKSETTU.KORKO ## Palauttaa kahden jakson välisenä aikana kertyneen koron. +CUMPRINC = MAKSETTU.LYHENNYS ## Palauttaa lainalle kahden jakson välisenä aikana kertyneen lyhennyksen. +DB = DB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. +DDB = DDB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DDB-menetelmän (Double-Declining Balance) tai jonkin muun määrittämäsi menetelmän mukaan. +DISC = DISKONTTOKORKO ## Palauttaa arvopaperin diskonttokoron. +DOLLARDE = VALUUTTA.DES ## Muuntaa murtolukuna ilmoitetun valuuttamäärän desimaaliluvuksi. +DOLLARFR = VALUUTTA.MURTO ## Muuntaa desimaalilukuna ilmaistun valuuttamäärän murtoluvuksi. +DURATION = KESTO ## Palauttaa keston arvopaperille, jonka koronmaksu tapahtuu säännöllisesti. +EFFECT = KORKO.EFEKT ## Palauttaa todellisen vuosikoron. +FV = TULEVA.ARVO ## Palauttaa sijoituksen tulevan arvon. +FVSCHEDULE = TULEVA.ARVO.ERIKORKO ## Palauttaa pääoman tulevan arvon, kun pääomalle on kertynyt korkoa vaihtelevasti. +INTRATE = KORKO.ARVOPAPERI ## Palauttaa arvopaperin korkokannan täysin sijoitetulle arvopaperille. +IPMT = IPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona kertyvän koron. +IRR = SISÄINEN.KORKO ## Laskee sisäisen korkokannan kassavirrasta muodostuvalle sarjalle. +ISPMT = ONMAKSU ## Laskee sijoituksen maksetun koron tietyllä jaksolla. +MDURATION = KESTO.MUUNN ## Palauttaa muunnetun Macauley-keston arvopaperille, jonka oletettu nimellisarvo on 100 euroa. +MIRR = MSISÄINEN ## Palauttaa sisäisen korkokannan, kun positiivisten ja negatiivisten kassavirtojen rahoituskorko on erilainen. +NOMINAL = KORKO.VUOSI ## Palauttaa vuosittaisen nimelliskoron. +NPER = NJAKSO ## Palauttaa sijoituksen jaksojen määrän. +NPV = NNA ## Palauttaa sijoituksen nykyarvon toistuvista kassavirroista muodostuvan sarjan ja diskonttokoron perusteella. +ODDFPRICE = PARITON.ENS.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa ensimmäinen jakso on pariton. +ODDFYIELD = PARITON.ENS.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa ensimmäinen jakso on pariton. +ODDLPRICE = PARITON.VIIM.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa viimeinen jakso on pariton. +ODDLYIELD = PARITON.VIIM.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa viimeinen jakso on pariton. +PMT = MAKSU ## Palauttaa annuiteetin kausittaisen maksuerän. +PPMT = PPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona maksettavan lyhennyksen. +PRICE = HINTA ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan säännöllisin väliajoin. +PRICEDISC = HINTA.DISK ## Palauttaa diskontatun arvopaperin hinnan 100 euron nimellisarvoa kohden. +PRICEMAT = HINTA.LUNASTUS ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan erääntymispäivänä. +PV = NA ## Palauttaa sijoituksen nykyarvon. +RATE = KORKO ## Palauttaa annuiteetin kausittaisen korkokannan. +RECEIVED = SAATU.HINTA ## Palauttaa arvopaperin tuoton erääntymispäivänä kokonaan maksetulle sijoitukselle. +SLN = STP ## Palauttaa sijoituksen tasapoiston yhdeltä jaksolta. +SYD = VUOSIPOISTO ## Palauttaa sijoituksen vuosipoiston annettuna kautena amerikkalaisen SYD-menetelmän (Sum-of-Year's Digits) avulla. +TBILLEQ = OBLIG.TUOTTOPROS ## Palauttaa valtion obligaation tuoton vastaavana joukkovelkakirjan tuottona. +TBILLPRICE = OBLIG.HINTA ## Palauttaa obligaation hinnan 100 euron nimellisarvoa kohden. +TBILLYIELD = OBLIG.TUOTTO ## Palauttaa obligaation tuoton. +VDB = VDB ## Palauttaa annetun kauden tai kauden osan kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. +XIRR = SISÄINEN.KORKO.JAKSOTON ## Palauttaa sisäisen korkokannan kassavirtojen sarjoille, jotka eivät välttämättä ole säännöllisiä. +XNPV = NNA.JAKSOTON ## Palauttaa nettonykyarvon kassavirtasarjalle, joka ei välttämättä ole kausittainen. +YIELD = TUOTTO ## Palauttaa tuoton arvopaperille, jonka korko maksetaan säännöllisin väliajoin. +YIELDDISC = TUOTTO.DISK ## Palauttaa diskontatun arvopaperin, kuten obligaation, vuosittaisen tuoton. +YIELDMAT = TUOTTO.ERÄP ## Palauttaa erääntymispäivänään korkoa tuottavan arvopaperin vuosittaisen tuoton. + + +## +## Information functions Erikoisfunktiot +## +CELL = SOLU ## Palauttaa tietoja solun muotoilusta, sijainnista ja sisällöstä. +ERROR.TYPE = VIRHEEN.LAJI ## Palauttaa virhetyyppiä vastaavan luvun. +INFO = KUVAUS ## Palauttaa tietoja nykyisestä käyttöympäristöstä. +ISBLANK = ONTYHJÄ ## Palauttaa arvon TOSI, jos arvo on tyhjä. +ISERR = ONVIRH ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo paitsi arvo #PUUTTUU!. +ISERROR = ONVIRHE ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo. +ISEVEN = ONPARILLINEN ## Palauttaa arvon TOSI, jos arvo on parillinen. +ISLOGICAL = ONTOTUUS ## Palauttaa arvon TOSI, jos arvo on mikä tahansa looginen arvo. +ISNA = ONPUUTTUU ## Palauttaa arvon TOSI, jos virhearvo on #PUUTTUU!. +ISNONTEXT = ONEI_TEKSTI ## Palauttaa arvon TOSI, jos arvo ei ole teksti. +ISNUMBER = ONLUKU ## Palauttaa arvon TOSI, jos arvo on luku. +ISODD = ONPARITON ## Palauttaa arvon TOSI, jos arvo on pariton. +ISREF = ONVIITT ## Palauttaa arvon TOSI, jos arvo on viittaus. +ISTEXT = ONTEKSTI ## Palauttaa arvon TOSI, jos arvo on teksti. +N = N ## Palauttaa arvon luvuksi muunnettuna. +NA = PUUTTUU ## Palauttaa virhearvon #PUUTTUU!. +TYPE = TYYPPI ## Palauttaa luvun, joka ilmaisee arvon tietotyypin. + + +## +## Logical functions Loogiset funktiot +## +AND = JA ## Palauttaa arvon TOSI, jos kaikkien argumenttien arvo on TOSI. +FALSE = EPÄTOSI ## Palauttaa totuusarvon EPÄTOSI. +IF = JOS ## Määrittää suoritettavan loogisen testin. +IFERROR = JOSVIRHE ## Palauttaa määrittämäsi arvon, jos kaavan tulos on virhe; muussa tapauksessa palauttaa kaavan tuloksen. +NOT = EI ## Kääntää argumentin loogisen arvon. +OR = TAI ## Palauttaa arvon TOSI, jos minkä tahansa argumentin arvo on TOSI. +TRUE = TOSI ## Palauttaa totuusarvon TOSI. + + +## +## Lookup and reference functions Haku- ja viitefunktiot +## +ADDRESS = OSOITE ## Palauttaa laskentataulukon soluun osoittavan viittauksen tekstinä. +AREAS = ALUEET ## Palauttaa viittauksessa olevien alueiden määrän. +CHOOSE = VALITSE.INDEKSI ## Valitsee arvon arvoluettelosta. +COLUMN = SARAKE ## Palauttaa viittauksen sarakenumeron. +COLUMNS = SARAKKEET ## Palauttaa viittauksessa olevien sarakkeiden määrän. +HLOOKUP = VHAKU ## Suorittaa haun matriisin ylimmältä riviltä ja palauttaa määritetyn solun arvon. +HYPERLINK = HYPERLINKKI ## Luo pikakuvakkeen tai tekstin, joka avaa verkkopalvelimeen, intranetiin tai Internetiin tallennetun tiedoston. +INDEX = INDEKSI ## Valitsee arvon viittauksesta tai matriisista indeksin mukaan. +INDIRECT = EPÄSUORA ## Palauttaa tekstiarvona ilmaistun viittauksen. +LOOKUP = HAKU ## Etsii arvoja vektorista tai matriisista. +MATCH = VASTINE ## Etsii arvoja viittauksesta tai matriisista. +OFFSET = SIIRTYMÄ ## Palauttaa annetun viittauksen siirtymän. +ROW = RIVI ## Palauttaa viittauksen rivinumeron. +ROWS = RIVIT ## Palauttaa viittauksessa olevien rivien määrän. +RTD = RTD ## Noutaa COM-automaatiota (automaatio: Tapa käsitellä sovelluksen objekteja toisesta sovelluksesta tai kehitystyökalusta. Automaatio, jota aiemmin kutsuttiin OLE-automaatioksi, on teollisuusstandardi ja COM-mallin (Component Object Model) ominaisuus.) tukevasta ohjelmasta reaaliaikaisia tietoja. +TRANSPOSE = TRANSPONOI ## Palauttaa matriisin käänteismatriisin. +VLOOKUP = PHAKU ## Suorittaa haun matriisin ensimmäisestä sarakkeesta ja palauttaa rivillä olevan solun arvon. + + +## +## Math and trigonometry functions Matemaattiset ja trigonometriset funktiot +## +ABS = ITSEISARVO ## Palauttaa luvun itseisarvon. +ACOS = ACOS ## Palauttaa luvun arkuskosinin. +ACOSH = ACOSH ## Palauttaa luvun käänteisen hyperbolisen kosinin. +ASIN = ASIN ## Palauttaa luvun arkussinin. +ASINH = ASINH ## Palauttaa luvun käänteisen hyperbolisen sinin. +ATAN = ATAN ## Palauttaa luvun arkustangentin. +ATAN2 = ATAN2 ## Palauttaa arkustangentin x- ja y-koordinaatin perusteella. +ATANH = ATANH ## Palauttaa luvun käänteisen hyperbolisen tangentin. +CEILING = PYÖRISTÄ.KERR.YLÖS ## Pyöristää luvun lähimpään kokonaislukuun tai tarkkuusargumentin lähimpään kerrannaiseen. +COMBIN = KOMBINAATIO ## Palauttaa mahdollisten kombinaatioiden määrän annetulle objektien määrälle. +COS = COS ## Palauttaa luvun kosinin. +COSH = COSH ## Palauttaa luvun hyperbolisen kosinin. +DEGREES = ASTEET ## Muuntaa radiaanit asteiksi. +EVEN = PARILLINEN ## Pyöristää luvun ylöspäin lähimpään parilliseen kokonaislukuun. +EXP = EKSPONENTTI ## Palauttaa e:n korotettuna annetun luvun osoittamaan potenssiin. +FACT = KERTOMA ## Palauttaa luvun kertoman. +FACTDOUBLE = KERTOMA.OSA ## Palauttaa luvun osakertoman. +FLOOR = PYÖRISTÄ.KERR.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). +GCD = SUURIN.YHT.TEKIJÄ ## Palauttaa suurimman yhteisen tekijän. +INT = KOKONAISLUKU ## Pyöristää luvun alaspäin lähimpään kokonaislukuun. +LCM = PIENIN.YHT.JAETTAVA ## Palauttaa pienimmän yhteisen tekijän. +LN = LUONNLOG ## Palauttaa luvun luonnollisen logaritmin. +LOG = LOG ## Laskee luvun logaritmin käyttämällä annettua kantalukua. +LOG10 = LOG10 ## Palauttaa luvun kymmenkantaisen logaritmin. +MDETERM = MDETERM ## Palauttaa matriisin matriisideterminantin. +MINVERSE = MKÄÄNTEINEN ## Palauttaa matriisin käänteismatriisin. +MMULT = MKERRO ## Palauttaa kahden matriisin tulon. +MOD = JAKOJ ## Palauttaa jakolaskun jäännöksen. +MROUND = PYÖRISTÄ.KERR ## Palauttaa luvun pyöristettynä annetun luvun kerrannaiseen. +MULTINOMIAL = MULTINOMI ## Palauttaa lukujoukon multinomin. +ODD = PARITON ## Pyöristää luvun ylöspäin lähimpään parittomaan kokonaislukuun. +PI = PII ## Palauttaa piin arvon. +POWER = POTENSSI ## Palauttaa luvun korotettuna haluttuun potenssiin. +PRODUCT = TULO ## Kertoo annetut argumentit. +QUOTIENT = OSAMÄÄRÄ ## Palauttaa osamäärän kokonaislukuosan. +RADIANS = RADIAANIT ## Muuntaa asteet radiaaneiksi. +RAND = SATUNNAISLUKU ## Palauttaa satunnaisluvun väliltä 0–1. +RANDBETWEEN = SATUNNAISLUKU.VÄLILTÄ ## Palauttaa satunnaisluvun määritettyjen lukujen väliltä. +ROMAN = ROMAN ## Muuntaa arabialaisen numeron tekstimuotoiseksi roomalaiseksi numeroksi. +ROUND = PYÖRISTÄ ## Pyöristää luvun annettuun määrään desimaaleja. +ROUNDDOWN = PYÖRISTÄ.DES.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). +ROUNDUP = PYÖRISTÄ.DES.YLÖS ## Pyöristää luvun ylöspäin (poispäin nollasta). +SERIESSUM = SARJA.SUMMA ## Palauttaa kaavaan perustuvan potenssisarjan arvon. +SIGN = ETUMERKKI ## Palauttaa luvun etumerkin. +SIN = SIN ## Palauttaa annetun kulman sinin. +SINH = SINH ## Palauttaa luvun hyperbolisen sinin. +SQRT = NELIÖJUURI ## Palauttaa positiivisen neliöjuuren. +SQRTPI = NELIÖJUURI.PII ## Palauttaa tulon (luku * pii) neliöjuuren. +SUBTOTAL = VÄLISUMMA ## Palauttaa luettelon tai tietokannan välisumman. +SUM = SUMMA ## Laskee yhteen annetut argumentit. +SUMIF = SUMMA.JOS ## Laskee ehdot täyttävien solujen summan. +SUMIFS = SUMMA.JOS.JOUKKO ## Laskee yhteen solualueen useita ehtoja vastaavat solut. +SUMPRODUCT = TULOJEN.SUMMA ## Palauttaa matriisin toisiaan vastaavien osien tulojen summan. +SUMSQ = NELIÖSUMMA ## Palauttaa argumenttien neliöiden summan. +SUMX2MY2 = NELIÖSUMMIEN.EROTUS ## Palauttaa kahden matriisin toisiaan vastaavien arvojen laskettujen neliösummien erotuksen. +SUMX2PY2 = NELIÖSUMMIEN.SUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen neliösummien summan. +SUMXMY2 = EROTUSTEN.NELIÖSUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen erotusten neliösumman. +TAN = TAN ## Palauttaa luvun tangentin. +TANH = TANH ## Palauttaa luvun hyperbolisen tangentin. +TRUNC = KATKAISE ## Katkaisee luvun kokonaisluvuksi. + + +## +## Statistical functions Tilastolliset funktiot +## +AVEDEV = KESKIPOIKKEAMA ## Palauttaa hajontojen itseisarvojen keskiarvon. +AVERAGE = KESKIARVO ## Palauttaa argumenttien keskiarvon. +AVERAGEA = KESKIARVOA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, keskiarvon. +AVERAGEIF = KESKIARVO.JOS ## Palauttaa alueen niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka täyttävät annetut ehdot. +AVERAGEIFS = KESKIARVO.JOS.JOUKKO ## Palauttaa niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka vastaavat useita ehtoja. +BETADIST = BEETAJAKAUMA ## Palauttaa kumulatiivisen beetajakaumafunktion arvon. +BETAINV = BEETAJAKAUMA.KÄÄNT ## Palauttaa määritetyn beetajakauman käänteisen kumulatiivisen jakaumafunktion arvon. +BINOMDIST = BINOMIJAKAUMA ## Palauttaa yksittäisen termin binomijakaumatodennäköisyyden. +CHIDIST = CHIJAKAUMA ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden. +CHIINV = CHIJAKAUMA.KÄÄNT ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden käänteisarvon. +CHITEST = CHITESTI ## Palauttaa riippumattomuustestin tuloksen. +CONFIDENCE = LUOTTAMUSVÄLI ## Palauttaa luottamusvälin populaation keskiarvolle. +CORREL = KORRELAATIO ## Palauttaa kahden arvojoukon korrelaatiokertoimen. +COUNT = LASKE ## Laskee argumenttiluettelossa olevien lukujen määrän. +COUNTA = LASKE.A ## Laskee argumenttiluettelossa olevien arvojen määrän. +COUNTBLANK = LASKE.TYHJÄT ## Laskee alueella olevien tyhjien solujen määrän. +COUNTIF = LASKE.JOS ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa annettuja ehtoja. +COUNTIFS = LASKE.JOS.JOUKKO ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa useita ehtoja. +COVAR = KOVARIANSSI ## Palauttaa kovarianssin, joka on keskiarvo havaintoaineiston kunkin pisteparin poikkeamien tuloista. +CRITBINOM = BINOMIJAKAUMA.KRIT ## Palauttaa pienimmän arvon, jossa binomijakauman kertymäfunktion arvo on pienempi tai yhtä suuri kuin vertailuarvo. +DEVSQ = OIKAISTU.NELIÖSUMMA ## Palauttaa keskipoikkeamien neliösumman. +EXPONDIST = EKSPONENTIAALIJAKAUMA ## Palauttaa eksponentiaalijakauman. +FDIST = FJAKAUMA ## Palauttaa F-todennäköisyysjakauman. +FINV = FJAKAUMA.KÄÄNT ## Palauttaa F-todennäköisyysjakauman käänteisfunktion. +FISHER = FISHER ## Palauttaa Fisher-muunnoksen. +FISHERINV = FISHER.KÄÄNT ## Palauttaa käänteisen Fisher-muunnoksen. +FORECAST = ENNUSTE ## Palauttaa lineaarisen trendin arvon. +FREQUENCY = TAAJUUS ## Palauttaa frekvenssijakautuman pystysuuntaisena matriisina. +FTEST = FTESTI ## Palauttaa F-testin tuloksen. +GAMMADIST = GAMMAJAKAUMA ## Palauttaa gammajakauman. +GAMMAINV = GAMMAJAKAUMA.KÄÄNT ## Palauttaa käänteisen gammajakauman kertymäfunktion. +GAMMALN = GAMMALN ## Palauttaa gammafunktion luonnollisen logaritmin G(x). +GEOMEAN = KESKIARVO.GEOM ## Palauttaa geometrisen keskiarvon. +GROWTH = KASVU ## Palauttaa eksponentiaalisen trendin arvon. +HARMEAN = KESKIARVO.HARM ## Palauttaa harmonisen keskiarvon. +HYPGEOMDIST = HYPERGEOM.JAKAUMA ## Palauttaa hypergeometrisen jakauman. +INTERCEPT = LEIKKAUSPISTE ## Palauttaa lineaarisen regressiosuoran leikkauspisteen. +KURT = KURT ## Palauttaa tietoalueen vinous-arvon eli huipukkuuden. +LARGE = SUURI ## Palauttaa tietojoukon k:nneksi suurimman arvon. +LINEST = LINREGR ## Palauttaa lineaarisen trendin parametrit. +LOGEST = LOGREGR ## Palauttaa eksponentiaalisen trendin parametrit. +LOGINV = LOGNORM.JAKAUMA.KÄÄNT ## Palauttaa lognormeeratun jakauman käänteisfunktion. +LOGNORMDIST = LOGNORM.JAKAUMA ## Palauttaa lognormaalisen jakauman kertymäfunktion. +MAX = MAKS ## Palauttaa suurimman arvon argumenttiluettelosta. +MAXA = MAKSA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, suurimman arvon. +MEDIAN = MEDIAANI ## Palauttaa annettujen lukujen mediaanin. +MIN = MIN ## Palauttaa pienimmän arvon argumenttiluettelosta. +MINA = MINA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, pienimmän arvon. +MODE = MOODI ## Palauttaa tietojoukossa useimmin esiintyvän arvon. +NEGBINOMDIST = BINOMIJAKAUMA.NEG ## Palauttaa negatiivisen binomijakauman. +NORMDIST = NORM.JAKAUMA ## Palauttaa normaalijakauman kertymäfunktion. +NORMINV = NORM.JAKAUMA.KÄÄNT ## Palauttaa käänteisen normaalijakauman kertymäfunktion. +NORMSDIST = NORM.JAKAUMA.NORMIT ## Palauttaa normitetun normaalijakauman kertymäfunktion. +NORMSINV = NORM.JAKAUMA.NORMIT.KÄÄNT ## Palauttaa normitetun normaalijakauman kertymäfunktion käänteisarvon. +PEARSON = PEARSON ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen. +PERCENTILE = PROSENTTIPISTE ## Palauttaa alueen arvojen k:nnen prosenttipisteen. +PERCENTRANK = PROSENTTIJÄRJESTYS ## Palauttaa tietojoukon arvon prosentuaalisen järjestysluvun. +PERMUT = PERMUTAATIO ## Palauttaa mahdollisten permutaatioiden määrän annetulle objektien määrälle. +POISSON = POISSON ## Palauttaa Poissonin todennäköisyysjakauman. +PROB = TODENNÄKÖISYYS ## Palauttaa todennäköisyyden sille, että arvot ovat tietyltä väliltä. +QUARTILE = NELJÄNNES ## Palauttaa tietoalueen neljänneksen. +RANK = ARVON.MUKAAN ## Palauttaa luvun paikan lukuarvoluettelossa. +RSQ = PEARSON.NELIÖ ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen neliön. +SKEW = JAKAUMAN.VINOUS ## Palauttaa jakauman vinouden. +SLOPE = KULMAKERROIN ## Palauttaa lineaarisen regressiosuoran kulmakertoimen. +SMALL = PIENI ## Palauttaa tietojoukon k:nneksi pienimmän arvon. +STANDARDIZE = NORMITA ## Palauttaa normitetun arvon. +STDEV = KESKIHAJONTA ## Laskee populaation keskihajonnan otoksen perusteella. +STDEVA = KESKIHAJONTAA ## Laskee populaation keskihajonnan otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. +STDEVP = KESKIHAJONTAP ## Laskee normaalijakautuman koko populaation perusteella. +STDEVPA = KESKIHAJONTAPA ## Laskee populaation keskihajonnan koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. +STEYX = KESKIVIRHE ## Palauttaa regression kutakin x-arvoa vastaavan ennustetun y-arvon keskivirheen. +TDIST = TJAKAUMA ## Palauttaa t-jakautuman. +TINV = TJAKAUMA.KÄÄNT ## Palauttaa käänteisen t-jakauman. +TREND = SUUNTAUS ## Palauttaa lineaarisen trendin arvoja. +TRIMMEAN = KESKIARVO.TASATTU ## Palauttaa tietojoukon tasatun keskiarvon. +TTEST = TTESTI ## Palauttaa t-testiin liittyvän todennäköisyyden. +VAR = VAR ## Arvioi populaation varianssia otoksen perusteella. +VARA = VARA ## Laskee populaation varianssin otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. +VARP = VARP ## Laskee varianssin koko populaation perusteella. +VARPA = VARPA ## Laskee populaation varianssin koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. +WEIBULL = WEIBULL ## Palauttaa Weibullin jakauman. +ZTEST = ZTESTI ## Palauttaa z-testin yksisuuntaisen todennäköisyysarvon. + + +## +## Text functions Tekstifunktiot +## +ASC = ASC ## Muuntaa merkkijonossa olevat englanninkieliset DBCS- tai katakana-merkit SBCS-merkeiksi. +BAHTTEXT = BAHTTEKSTI ## Muuntaa luvun tekstiksi ß (baht) -valuuttamuotoa käyttämällä. +CHAR = MERKKI ## Palauttaa koodin lukua vastaavan merkin. +CLEAN = SIIVOA ## Poistaa tekstistä kaikki tulostumattomat merkit. +CODE = KOODI ## Palauttaa tekstimerkkijonon ensimmäisen merkin numerokoodin. +CONCATENATE = KETJUTA ## Yhdistää useat merkkijonot yhdeksi merkkijonoksi. +DOLLAR = VALUUTTA ## Muuntaa luvun tekstiksi $ (dollari) -valuuttamuotoa käyttämällä. +EXACT = VERTAA ## Tarkistaa, ovatko kaksi tekstiarvoa samanlaiset. +FIND = ETSI ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). +FINDB = ETSIB ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). +FIXED = KIINTEÄ ## Muotoilee luvun tekstiksi, jossa on kiinteä määrä desimaaleja. +JIS = JIS ## Muuntaa merkkijonossa olevat englanninkieliset SBCS- tai katakana-merkit DBCS-merkeiksi. +LEFT = VASEN ## Palauttaa tekstiarvon vasemmanpuoliset merkit. +LEFTB = VASENB ## Palauttaa tekstiarvon vasemmanpuoliset merkit. +LEN = PITUUS ## Palauttaa tekstimerkkijonon merkkien määrän. +LENB = PITUUSB ## Palauttaa tekstimerkkijonon merkkien määrän. +LOWER = PIENET ## Muuntaa tekstin pieniksi kirjaimiksi. +MID = POIMI.TEKSTI ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. +MIDB = POIMI.TEKSTIB ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. +PHONETIC = FONEETTINEN ## Hakee foneettiset (furigana) merkit merkkijonosta. +PROPER = ERISNIMI ## Muuttaa merkkijonon kunkin sanan ensimmäisen kirjaimen isoksi. +REPLACE = KORVAA ## Korvaa tekstissä olevat merkit. +REPLACEB = KORVAAB ## Korvaa tekstissä olevat merkit. +REPT = TOISTA ## Toistaa tekstin annetun määrän kertoja. +RIGHT = OIKEA ## Palauttaa tekstiarvon oikeanpuoliset merkit. +RIGHTB = OIKEAB ## Palauttaa tekstiarvon oikeanpuoliset merkit. +SEARCH = KÄY.LÄPI ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). +SEARCHB = KÄY.LÄPIB ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). +SUBSTITUTE = VAIHDA ## Korvaa merkkijonossa olevan tekstin toisella. +T = T ## Muuntaa argumentit tekstiksi. +TEXT = TEKSTI ## Muotoilee luvun ja muuntaa sen tekstiksi. +TRIM = POISTA.VÄLIT ## Poistaa välilyönnit tekstistä. +UPPER = ISOT ## Muuntaa tekstin isoiksi kirjaimiksi. +VALUE = ARVO ## Muuntaa tekstiargumentin luvuksi. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/config new file mode 100755 index 0000000..8189598 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NUL! +DIV0 = #DIV/0! +VALUE = #VALEUR! +REF = #REF! +NAME = #NOM? +NUM = #NOMBRE! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/functions new file mode 100755 index 0000000..7f40d5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/fr/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Fonctions de complément et d’automatisation +## +GETPIVOTDATA = LIREDONNEESTABCROISDYNAMIQUE ## Renvoie les données stockées dans un rapport de tableau croisé dynamique. + + +## +## Cube functions Fonctions Cube +## +CUBEKPIMEMBER = MEMBREKPICUBE ## Renvoie un nom, une propriété et une mesure d’indicateur de performance clé et affiche le nom et la propriété dans la cellule. Un indicateur de performance clé est une mesure quantifiable, telle que la marge bénéficiaire brute mensuelle ou la rotation trimestrielle du personnel, utilisée pour évaluer les performances d’une entreprise. +CUBEMEMBER = MEMBRECUBE ## Renvoie un membre ou un uplet dans une hiérarchie de cubes. Utilisez cette fonction pour valider l’existence du membre ou de l’uplet dans le cube. +CUBEMEMBERPROPERTY = PROPRIETEMEMBRECUBE ## Renvoie la valeur d’une propriété de membre du cube. Utilisez cette fonction pour valider l’existence d’un nom de membre dans le cube et pour renvoyer la propriété spécifiée pour ce membre. +CUBERANKEDMEMBER = RANGMEMBRECUBE ## Renvoie le nième membre ou le membre placé à un certain rang dans un ensemble. Utilisez cette fonction pour renvoyer un ou plusieurs éléments d’un ensemble, tels que les meilleurs vendeurs ou les 10 meilleurs étudiants. +CUBESET = JEUCUBE ## Définit un ensemble calculé de membres ou d’uplets en envoyant une expression définie au cube sur le serveur qui crée l’ensemble et le renvoie à Microsoft Office Excel. +CUBESETCOUNT = NBJEUCUBE ## Renvoie le nombre d’éléments dans un jeu. +CUBEVALUE = VALEURCUBE ## Renvoie une valeur d’agrégation issue d’un cube. + + +## +## Database functions Fonctions de base de données +## +DAVERAGE = BDMOYENNE ## Renvoie la moyenne des entrées de base de données sélectionnées. +DCOUNT = BCOMPTE ## Compte le nombre de cellules d’une base de données qui contiennent des nombres. +DCOUNTA = BDNBVAL ## Compte les cellules non vides d’une base de données. +DGET = BDLIRE ## Extrait d’une base de données un enregistrement unique répondant aux critères spécifiés. +DMAX = BDMAX ## Renvoie la valeur maximale des entrées de base de données sélectionnées. +DMIN = BDMIN ## Renvoie la valeur minimale des entrées de base de données sélectionnées. +DPRODUCT = BDPRODUIT ## Multiplie les valeurs d’un champ particulier des enregistrements d’une base de données, qui répondent aux critères spécifiés. +DSTDEV = BDECARTYPE ## Calcule l’écart type pour un échantillon d’entrées de base de données sélectionnées. +DSTDEVP = BDECARTYPEP ## Calcule l’écart type pour l’ensemble d’une population d’entrées de base de données sélectionnées. +DSUM = BDSOMME ## Ajoute les nombres dans la colonne de champ des enregistrements de la base de données, qui répondent aux critères. +DVAR = BDVAR ## Calcule la variance pour un échantillon d’entrées de base de données sélectionnées. +DVARP = BDVARP ## Calcule la variance pour l’ensemble d’une population d’entrées de base de données sélectionnées. + + +## +## Date and time functions Fonctions de date et d’heure +## +DATE = DATE ## Renvoie le numéro de série d’une date précise. +DATEVALUE = DATEVAL ## Convertit une date représentée sous forme de texte en numéro de série. +DAY = JOUR ## Convertit un numéro de série en jour du mois. +DAYS360 = JOURS360 ## Calcule le nombre de jours qui séparent deux dates sur la base d’une année de 360 jours. +EDATE = MOIS.DECALER ## Renvoie le numéro séquentiel de la date qui représente une date spécifiée (l’argument date_départ), corrigée en plus ou en moins du nombre de mois indiqué. +EOMONTH = FIN.MOIS ## Renvoie le numéro séquentiel de la date du dernier jour du mois précédant ou suivant la date_départ du nombre de mois indiqué. +HOUR = HEURE ## Convertit un numéro de série en heure. +MINUTE = MINUTE ## Convertit un numéro de série en minute. +MONTH = MOIS ## Convertit un numéro de série en mois. +NETWORKDAYS = NB.JOURS.OUVRES ## Renvoie le nombre de jours ouvrés entiers compris entre deux dates. +NOW = MAINTENANT ## Renvoie le numéro de série de la date et de l’heure du jour. +SECOND = SECONDE ## Convertit un numéro de série en seconde. +TIME = TEMPS ## Renvoie le numéro de série d’une heure précise. +TIMEVALUE = TEMPSVAL ## Convertit une date représentée sous forme de texte en numéro de série. +TODAY = AUJOURDHUI ## Renvoie le numéro de série de la date du jour. +WEEKDAY = JOURSEM ## Convertit un numéro de série en jour de la semaine. +WEEKNUM = NO.SEMAINE ## Convertit un numéro de série en un numéro représentant l’ordre de la semaine dans l’année. +WORKDAY = SERIE.JOUR.OUVRE ## Renvoie le numéro de série de la date avant ou après le nombre de jours ouvrés spécifiés. +YEAR = ANNEE ## Convertit un numéro de série en année. +YEARFRAC = FRACTION.ANNEE ## Renvoie la fraction de l’année représentant le nombre de jours entre la date de début et la date de fin. + + +## +## Engineering functions Fonctions d’ingénierie +## +BESSELI = BESSELI ## Renvoie la fonction Bessel modifiée In(x). +BESSELJ = BESSELJ ## Renvoie la fonction Bessel Jn(x). +BESSELK = BESSELK ## Renvoie la fonction Bessel modifiée Kn(x). +BESSELY = BESSELY ## Renvoie la fonction Bessel Yn(x). +BIN2DEC = BINDEC ## Convertit un nombre binaire en nombre décimal. +BIN2HEX = BINHEX ## Convertit un nombre binaire en nombre hexadécimal. +BIN2OCT = BINOCT ## Convertit un nombre binaire en nombre octal. +COMPLEX = COMPLEXE ## Convertit des coefficients réel et imaginaire en un nombre complexe. +CONVERT = CONVERT ## Convertit un nombre d’une unité de mesure à une autre. +DEC2BIN = DECBIN ## Convertit un nombre décimal en nombre binaire. +DEC2HEX = DECHEX ## Convertit un nombre décimal en nombre hexadécimal. +DEC2OCT = DECOCT ## Convertit un nombre décimal en nombre octal. +DELTA = DELTA ## Teste l’égalité de deux nombres. +ERF = ERF ## Renvoie la valeur de la fonction d’erreur. +ERFC = ERFC ## Renvoie la valeur de la fonction d’erreur complémentaire. +GESTEP = SUP.SEUIL ## Teste si un nombre est supérieur à une valeur de seuil. +HEX2BIN = HEXBIN ## Convertit un nombre hexadécimal en nombre binaire. +HEX2DEC = HEXDEC ## Convertit un nombre hexadécimal en nombre décimal. +HEX2OCT = HEXOCT ## Convertit un nombre hexadécimal en nombre octal. +IMABS = COMPLEXE.MODULE ## Renvoie la valeur absolue (module) d’un nombre complexe. +IMAGINARY = COMPLEXE.IMAGINAIRE ## Renvoie le coefficient imaginaire d’un nombre complexe. +IMARGUMENT = COMPLEXE.ARGUMENT ## Renvoie l’argument thêta, un angle exprimé en radians. +IMCONJUGATE = COMPLEXE.CONJUGUE ## Renvoie le nombre complexe conjugué d’un nombre complexe. +IMCOS = IMCOS ## Renvoie le cosinus d’un nombre complexe. +IMDIV = COMPLEXE.DIV ## Renvoie le quotient de deux nombres complexes. +IMEXP = COMPLEXE.EXP ## Renvoie la fonction exponentielle d’un nombre complexe. +IMLN = COMPLEXE.LN ## Renvoie le logarithme népérien d’un nombre complexe. +IMLOG10 = COMPLEXE.LOG10 ## Calcule le logarithme en base 10 d’un nombre complexe. +IMLOG2 = COMPLEXE.LOG2 ## Calcule le logarithme en base 2 d’un nombre complexe. +IMPOWER = COMPLEXE.PUISSANCE ## Renvoie un nombre complexe élevé à une puissance entière. +IMPRODUCT = COMPLEXE.PRODUIT ## Renvoie le produit de plusieurs nombres complexes. +IMREAL = COMPLEXE.REEL ## Renvoie le coefficient réel d’un nombre complexe. +IMSIN = COMPLEXE.SIN ## Renvoie le sinus d’un nombre complexe. +IMSQRT = COMPLEXE.RACINE ## Renvoie la racine carrée d’un nombre complexe. +IMSUB = COMPLEXE.DIFFERENCE ## Renvoie la différence entre deux nombres complexes. +IMSUM = COMPLEXE.SOMME ## Renvoie la somme de plusieurs nombres complexes. +OCT2BIN = OCTBIN ## Convertit un nombre octal en nombre binaire. +OCT2DEC = OCTDEC ## Convertit un nombre octal en nombre décimal. +OCT2HEX = OCTHEX ## Convertit un nombre octal en nombre hexadécimal. + + +## +## Financial functions Fonctions financières +## +ACCRINT = INTERET.ACC ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu périodiquement. +ACCRINTM = INTERET.ACC.MAT ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu à l’échéance. +AMORDEGRC = AMORDEGRC ## Renvoie l’amortissement correspondant à chaque période comptable en utilisant un coefficient d’amortissement. +AMORLINC = AMORLINC ## Renvoie l’amortissement d’un bien à la fin d’une période fiscale donnée. +COUPDAYBS = NB.JOURS.COUPON.PREC ## Renvoie le nombre de jours entre le début de la période de coupon et la date de liquidation. +COUPDAYS = NB.JOURS.COUPONS ## Renvoie le nombre de jours pour la période du coupon contenant la date de liquidation. +COUPDAYSNC = NB.JOURS.COUPON.SUIV ## Renvoie le nombre de jours entre la date de liquidation et la date du coupon suivant la date de liquidation. +COUPNCD = DATE.COUPON.SUIV ## Renvoie la première date de coupon ultérieure à la date de règlement. +COUPNUM = NB.COUPONS ## Renvoie le nombre de coupons dus entre la date de règlement et la date d’échéance. +COUPPCD = DATE.COUPON.PREC ## Renvoie la date de coupon précédant la date de règlement. +CUMIPMT = CUMUL.INTER ## Renvoie l’intérêt cumulé payé sur un emprunt entre deux périodes. +CUMPRINC = CUMUL.PRINCPER ## Renvoie le montant cumulé des remboursements du capital d’un emprunt effectués entre deux périodes. +DB = DB ## Renvoie l’amortissement d’un bien pour une période spécifiée en utilisant la méthode de l’amortissement dégressif à taux fixe. +DDB = DDB ## Renvoie l’amortissement d’un bien pour toute période spécifiée, en utilisant la méthode de l’amortissement dégressif à taux double ou selon un coefficient à spécifier. +DISC = TAUX.ESCOMPTE ## Calcule le taux d’escompte d’une transaction. +DOLLARDE = PRIX.DEC ## Convertit un prix en euros, exprimé sous forme de fraction, en un prix en euros exprimé sous forme de nombre décimal. +DOLLARFR = PRIX.FRAC ## Convertit un prix en euros, exprimé sous forme de nombre décimal, en un prix en euros exprimé sous forme de fraction. +DURATION = DUREE ## Renvoie la durée, en années, d’un titre dont l’intérêt est perçu périodiquement. +EFFECT = TAUX.EFFECTIF ## Renvoie le taux d’intérêt annuel effectif. +FV = VC ## Renvoie la valeur future d’un investissement. +FVSCHEDULE = VC.PAIEMENTS ## Calcule la valeur future d’un investissement en appliquant une série de taux d’intérêt composites. +INTRATE = TAUX.INTERET ## Affiche le taux d’intérêt d’un titre totalement investi. +IPMT = INTPER ## Calcule le montant des intérêts d’un investissement pour une période donnée. +IRR = TRI ## Calcule le taux de rentabilité interne d’un investissement pour une succession de trésoreries. +ISPMT = ISPMT ## Calcule le montant des intérêts d’un investissement pour une période donnée. +MDURATION = DUREE.MODIFIEE ## Renvoie la durée de Macauley modifiée pour un titre ayant une valeur nominale hypothétique de 100_euros. +MIRR = TRIM ## Calcule le taux de rentabilité interne lorsque les paiements positifs et négatifs sont financés à des taux différents. +NOMINAL = TAUX.NOMINAL ## Calcule le taux d’intérêt nominal annuel. +NPER = NPM ## Renvoie le nombre de versements nécessaires pour rembourser un emprunt. +NPV = VAN ## Calcule la valeur actuelle nette d’un investissement basé sur une série de décaissements et un taux d’escompte. +ODDFPRICE = PRIX.PCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. +ODDFYIELD = REND.PCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la première période de coupon est irrégulière. +ODDLPRICE = PRIX.DCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. +ODDLYIELD = REND.DCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la dernière période de coupon est irrégulière. +PMT = VPM ## Calcule le paiement périodique d’un investissement donné. +PPMT = PRINCPER ## Calcule, pour une période donnée, la part de remboursement du principal d’un investissement. +PRICE = PRIX.TITRE ## Renvoie le prix d’un titre rapportant des intérêts périodiques, pour une valeur nominale de 100 euros. +PRICEDISC = VALEUR.ENCAISSEMENT ## Renvoie la valeur d’encaissement d’un escompte commercial, pour une valeur nominale de 100 euros. +PRICEMAT = PRIX.TITRE.ECHEANCE ## Renvoie le prix d’un titre dont la valeur nominale est 100 euros et qui rapporte des intérêts à l’échéance. +PV = PV ## Calcule la valeur actuelle d’un investissement. +RATE = TAUX ## Calcule le taux d’intérêt par période pour une annuité. +RECEIVED = VALEUR.NOMINALE ## Renvoie la valeur nominale à échéance d’un effet de commerce. +SLN = AMORLIN ## Calcule l’amortissement linéaire d’un bien pour une période donnée. +SYD = SYD ## Calcule l’amortissement d’un bien pour une période donnée sur la base de la méthode américaine Sum-of-Years Digits (amortissement dégressif à taux décroissant appliqué à une valeur constante). +TBILLEQ = TAUX.ESCOMPTE.R ## Renvoie le taux d’escompte rationnel d’un bon du Trésor. +TBILLPRICE = PRIX.BON.TRESOR ## Renvoie le prix d’un bon du Trésor d’une valeur nominale de 100 euros. +TBILLYIELD = RENDEMENT.BON.TRESOR ## Calcule le taux de rendement d’un bon du Trésor. +VDB = VDB ## Renvoie l’amortissement d’un bien pour une période spécifiée ou partielle en utilisant une méthode de l’amortissement dégressif à taux fixe. +XIRR = TRI.PAIEMENTS ## Calcule le taux de rentabilité interne d’un ensemble de paiements non périodiques. +XNPV = VAN.PAIEMENTS ## Renvoie la valeur actuelle nette d’un ensemble de paiements non périodiques. +YIELD = RENDEMENT.TITRE ## Calcule le rendement d’un titre rapportant des intérêts périodiquement. +YIELDDISC = RENDEMENT.SIMPLE ## Calcule le taux de rendement d’un emprunt à intérêt simple (par exemple, un bon du Trésor). +YIELDMAT = RENDEMENT.TITRE.ECHEANCE ## Renvoie le rendement annuel d’un titre qui rapporte des intérêts à l’échéance. + + +## +## Information functions Fonctions d’information +## +CELL = CELLULE ## Renvoie des informations sur la mise en forme, l’emplacement et le contenu d’une cellule. +ERROR.TYPE = TYPE.ERREUR ## Renvoie un nombre correspondant à un type d’erreur. +INFO = INFORMATIONS ## Renvoie des informations sur l’environnement d’exploitation actuel. +ISBLANK = ESTVIDE ## Renvoie VRAI si l’argument valeur est vide. +ISERR = ESTERR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur, sauf #N/A. +ISERROR = ESTERREUR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur. +ISEVEN = EST.PAIR ## Renvoie VRAI si le chiffre est pair. +ISLOGICAL = ESTLOGIQUE ## Renvoie VRAI si l’argument valeur fait référence à une valeur logique. +ISNA = ESTNA ## Renvoie VRAI si l’argument valeur fait référence à la valeur d’erreur #N/A. +ISNONTEXT = ESTNONTEXTE ## Renvoie VRAI si l’argument valeur ne se présente pas sous forme de texte. +ISNUMBER = ESTNUM ## Renvoie VRAI si l’argument valeur représente un nombre. +ISODD = EST.IMPAIR ## Renvoie VRAI si le chiffre est impair. +ISREF = ESTREF ## Renvoie VRAI si l’argument valeur est une référence. +ISTEXT = ESTTEXTE ## Renvoie VRAI si l’argument valeur se présente sous forme de texte. +N = N ## Renvoie une valeur convertie en nombre. +NA = NA ## Renvoie la valeur d’erreur #N/A. +TYPE = TYPE ## Renvoie un nombre indiquant le type de données d’une valeur. + + +## +## Logical functions Fonctions logiques +## +AND = ET ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = FAUX ## Renvoie la valeur logique FAUX. +IF = SI ## Spécifie un test logique à effectuer. +IFERROR = SIERREUR ## Renvoie une valeur que vous spécifiez si une formule génère une erreur ; sinon, elle renvoie le résultat de la formule. +NOT = NON ## Inverse la logique de cet argument. +OR = OU ## Renvoie VRAI si un des arguments est VRAI. +TRUE = VRAI ## Renvoie la valeur logique VRAI. + + +## +## Lookup and reference functions Fonctions de recherche et de référence +## +ADDRESS = ADRESSE ## Renvoie une référence sous forme de texte à une seule cellule d’une feuille de calcul. +AREAS = ZONES ## Renvoie le nombre de zones dans une référence. +CHOOSE = CHOISIR ## Choisit une valeur dans une liste. +COLUMN = COLONNE ## Renvoie le numéro de colonne d’une référence. +COLUMNS = COLONNES ## Renvoie le nombre de colonnes dans une référence. +HLOOKUP = RECHERCHEH ## Effectue une recherche dans la première ligne d’une matrice et renvoie la valeur de la cellule indiquée. +HYPERLINK = LIEN_HYPERTEXTE ## Crée un raccourci ou un renvoi qui ouvre un document stocké sur un serveur réseau, sur un réseau Intranet ou sur Internet. +INDEX = INDEX ## Utilise un index pour choisir une valeur provenant d’une référence ou d’une matrice. +INDIRECT = INDIRECT ## Renvoie une référence indiquée par une valeur de texte. +LOOKUP = RECHERCHE ## Recherche des valeurs dans un vecteur ou une matrice. +MATCH = EQUIV ## Recherche des valeurs dans une référence ou une matrice. +OFFSET = DECALER ## Renvoie une référence décalée par rapport à une référence donnée. +ROW = LIGNE ## Renvoie le numéro de ligne d’une référence. +ROWS = LIGNES ## Renvoie le nombre de lignes dans une référence. +RTD = RTD ## Extrait les données en temps réel à partir d’un programme prenant en charge l’automation COM (Automation : utilisation des objets d'une application à partir d'une autre application ou d'un autre outil de développement. Autrefois appelée OLE Automation, Automation est une norme industrielle et une fonctionnalité du modèle d'objet COM (Component Object Model).). +TRANSPOSE = TRANSPOSE ## Renvoie la transposition d’une matrice. +VLOOKUP = RECHERCHEV ## Effectue une recherche dans la première colonne d’une matrice et se déplace sur la ligne pour renvoyer la valeur d’une cellule. + + +## +## Math and trigonometry functions Fonctions mathématiques et trigonométriques +## +ABS = ABS ## Renvoie la valeur absolue d’un nombre. +ACOS = ACOS ## Renvoie l’arccosinus d’un nombre. +ACOSH = ACOSH ## Renvoie le cosinus hyperbolique inverse d’un nombre. +ASIN = ASIN ## Renvoie l’arcsinus d’un nombre. +ASINH = ASINH ## Renvoie le sinus hyperbolique inverse d’un nombre. +ATAN = ATAN ## Renvoie l’arctangente d’un nombre. +ATAN2 = ATAN2 ## Renvoie l’arctangente des coordonnées x et y. +ATANH = ATANH ## Renvoie la tangente hyperbolique inverse d’un nombre. +CEILING = PLAFOND ## Arrondit un nombre au nombre entier le plus proche ou au multiple le plus proche de l’argument précision en s’éloignant de zéro. +COMBIN = COMBIN ## Renvoie le nombre de combinaisons que l’on peut former avec un nombre donné d’objets. +COS = COS ## Renvoie le cosinus d’un nombre. +COSH = COSH ## Renvoie le cosinus hyperbolique d’un nombre. +DEGREES = DEGRES ## Convertit des radians en degrés. +EVEN = PAIR ## Arrondit un nombre au nombre entier pair le plus proche en s’éloignant de zéro. +EXP = EXP ## Renvoie e élevé à la puissance d’un nombre donné. +FACT = FACT ## Renvoie la factorielle d’un nombre. +FACTDOUBLE = FACTDOUBLE ## Renvoie la factorielle double d’un nombre. +FLOOR = PLANCHER ## Arrondit un nombre en tendant vers 0 (zéro). +GCD = PGCD ## Renvoie le plus grand commun diviseur. +INT = ENT ## Arrondit un nombre à l’entier immédiatement inférieur. +LCM = PPCM ## Renvoie le plus petit commun multiple. +LN = LN ## Renvoie le logarithme népérien d’un nombre. +LOG = LOG ## Renvoie le logarithme d’un nombre dans la base spécifiée. +LOG10 = LOG10 ## Calcule le logarithme en base 10 d’un nombre. +MDETERM = DETERMAT ## Renvoie le déterminant d’une matrice. +MINVERSE = INVERSEMAT ## Renvoie la matrice inverse d’une matrice. +MMULT = PRODUITMAT ## Renvoie le produit de deux matrices. +MOD = MOD ## Renvoie le reste d’une division. +MROUND = ARRONDI.AU.MULTIPLE ## Donne l’arrondi d’un nombre au multiple spécifié. +MULTINOMIAL = MULTINOMIALE ## Calcule la multinomiale d’un ensemble de nombres. +ODD = IMPAIR ## Renvoie le nombre, arrondi à la valeur du nombre entier impair le plus proche en s’éloignant de zéro. +PI = PI ## Renvoie la valeur de pi. +POWER = PUISSANCE ## Renvoie la valeur du nombre élevé à une puissance. +PRODUCT = PRODUIT ## Multiplie ses arguments. +QUOTIENT = QUOTIENT ## Renvoie la partie entière du résultat d’une division. +RADIANS = RADIANS ## Convertit des degrés en radians. +RAND = ALEA ## Renvoie un nombre aléatoire compris entre 0 et 1. +RANDBETWEEN = ALEA.ENTRE.BORNES ## Renvoie un nombre aléatoire entre les nombres que vous spécifiez. +ROMAN = ROMAIN ## Convertit des chiffres arabes en chiffres romains, sous forme de texte. +ROUND = ARRONDI ## Arrondit un nombre au nombre de chiffres indiqué. +ROUNDDOWN = ARRONDI.INF ## Arrondit un nombre en tendant vers 0 (zéro). +ROUNDUP = ARRONDI.SUP ## Arrondit un nombre à l’entier supérieur, en s’éloignant de zéro. +SERIESSUM = SOMME.SERIES ## Renvoie la somme d’une série géométrique en s’appuyant sur la formule suivante : +SIGN = SIGNE ## Renvoie le signe d’un nombre. +SIN = SIN ## Renvoie le sinus d’un angle donné. +SINH = SINH ## Renvoie le sinus hyperbolique d’un nombre. +SQRT = RACINE ## Renvoie la racine carrée d’un nombre. +SQRTPI = RACINE.PI ## Renvoie la racine carrée de (nombre * pi). +SUBTOTAL = SOUS.TOTAL ## Renvoie un sous-total dans une liste ou une base de données. +SUM = SOMME ## Calcule la somme de ses arguments. +SUMIF = SOMME.SI ## Additionne les cellules spécifiées si elles répondent à un critère donné. +SUMIFS = SOMME.SI.ENS ## Ajoute les cellules d’une plage qui répondent à plusieurs critères. +SUMPRODUCT = SOMMEPROD ## Multiplie les valeurs correspondantes des matrices spécifiées et calcule la somme de ces produits. +SUMSQ = SOMME.CARRES ## Renvoie la somme des carrés des arguments. +SUMX2MY2 = SOMME.X2MY2 ## Renvoie la somme de la différence des carrés des valeurs correspondantes de deux matrices. +SUMX2PY2 = SOMME.X2PY2 ## Renvoie la somme de la somme des carrés des valeurs correspondantes de deux matrices. +SUMXMY2 = SOMME.XMY2 ## Renvoie la somme des carrés des différences entre les valeurs correspondantes de deux matrices. +TAN = TAN ## Renvoie la tangente d’un nombre. +TANH = TANH ## Renvoie la tangente hyperbolique d’un nombre. +TRUNC = TRONQUE ## Renvoie la partie entière d’un nombre. + + +## +## Statistical functions Fonctions statistiques +## +AVEDEV = ECART.MOYEN ## Renvoie la moyenne des écarts absolus observés dans la moyenne des points de données. +AVERAGE = MOYENNE ## Renvoie la moyenne de ses arguments. +AVERAGEA = AVERAGEA ## Renvoie la moyenne de ses arguments, nombres, texte et valeurs logiques inclus. +AVERAGEIF = MOYENNE.SI ## Renvoie la moyenne (arithmétique) de toutes les cellules d’une plage qui répondent à des critères donnés. +AVERAGEIFS = MOYENNE.SI.ENS ## Renvoie la moyenne (arithmétique) de toutes les cellules qui répondent à plusieurs critères. +BETADIST = LOI.BETA ## Renvoie la fonction de distribution cumulée. +BETAINV = BETA.INVERSE ## Renvoie l’inverse de la fonction de distribution cumulée pour une distribution bêta spécifiée. +BINOMDIST = LOI.BINOMIALE ## Renvoie la probabilité d’une variable aléatoire discrète suivant la loi binomiale. +CHIDIST = LOI.KHIDEUX ## Renvoie la probabilité unilatérale de la distribution khi-deux. +CHIINV = KHIDEUX.INVERSE ## Renvoie l’inverse de la probabilité unilatérale de la distribution khi-deux. +CHITEST = TEST.KHIDEUX ## Renvoie le test d’indépendance. +CONFIDENCE = INTERVALLE.CONFIANCE ## Renvoie l’intervalle de confiance pour une moyenne de population. +CORREL = COEFFICIENT.CORRELATION ## Renvoie le coefficient de corrélation entre deux séries de données. +COUNT = NB ## Détermine les nombres compris dans la liste des arguments. +COUNTA = NBVAL ## Détermine le nombre de valeurs comprises dans la liste des arguments. +COUNTBLANK = NB.VIDE ## Compte le nombre de cellules vides dans une plage. +COUNTIF = NB.SI ## Compte le nombre de cellules qui répondent à un critère donné dans une plage. +COUNTIFS = NB.SI.ENS ## Compte le nombre de cellules à l’intérieur d’une plage qui répondent à plusieurs critères. +COVAR = COVARIANCE ## Renvoie la covariance, moyenne des produits des écarts pour chaque série d’observations. +CRITBINOM = CRITERE.LOI.BINOMIALE ## Renvoie la plus petite valeur pour laquelle la distribution binomiale cumulée est inférieure ou égale à une valeur de critère. +DEVSQ = SOMME.CARRES.ECARTS ## Renvoie la somme des carrés des écarts. +EXPONDIST = LOI.EXPONENTIELLE ## Renvoie la distribution exponentielle. +FDIST = LOI.F ## Renvoie la distribution de probabilité F. +FINV = INVERSE.LOI.F ## Renvoie l’inverse de la distribution de probabilité F. +FISHER = FISHER ## Renvoie la transformation de Fisher. +FISHERINV = FISHER.INVERSE ## Renvoie l’inverse de la transformation de Fisher. +FORECAST = PREVISION ## Calcule une valeur par rapport à une tendance linéaire. +FREQUENCY = FREQUENCE ## Calcule la fréquence d’apparition des valeurs dans une plage de valeurs, puis renvoie des nombres sous forme de matrice verticale. +FTEST = TEST.F ## Renvoie le résultat d’un test F. +GAMMADIST = LOI.GAMMA ## Renvoie la probabilité d’une variable aléatoire suivant une loi Gamma. +GAMMAINV = LOI.GAMMA.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi Gamma. +GAMMALN = LNGAMMA ## Renvoie le logarithme népérien de la fonction Gamma, G(x) +GEOMEAN = MOYENNE.GEOMETRIQUE ## Renvoie la moyenne géométrique. +GROWTH = CROISSANCE ## Calcule des valeurs par rapport à une tendance exponentielle. +HARMEAN = MOYENNE.HARMONIQUE ## Renvoie la moyenne harmonique. +HYPGEOMDIST = LOI.HYPERGEOMETRIQUE ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi hypergéométrique. +INTERCEPT = ORDONNEE.ORIGINE ## Renvoie l’ordonnée à l’origine d’une droite de régression linéaire. +KURT = KURTOSIS ## Renvoie le kurtosis d’une série de données. +LARGE = GRANDE.VALEUR ## Renvoie la k-ième plus grande valeur d’une série de données. +LINEST = DROITEREG ## Renvoie les paramètres d’une tendance linéaire. +LOGEST = LOGREG ## Renvoie les paramètres d’une tendance exponentielle. +LOGINV = LOI.LOGNORMALE.INVERSE ## Renvoie l’inverse de la probabilité pour une variable aléatoire suivant la loi lognormale. +LOGNORMDIST = LOI.LOGNORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi lognormale. +MAX = MAX ## Renvoie la valeur maximale contenue dans une liste d’arguments. +MAXA = MAXA ## Renvoie la valeur maximale d’une liste d’arguments, nombres, texte et valeurs logiques inclus. +MEDIAN = MEDIANE ## Renvoie la valeur médiane des nombres donnés. +MIN = MIN ## Renvoie la valeur minimale contenue dans une liste d’arguments. +MINA = MINA ## Renvoie la plus petite valeur d’une liste d’arguments, nombres, texte et valeurs logiques inclus. +MODE = MODE ## Renvoie la valeur la plus courante d’une série de données. +NEGBINOMDIST = LOI.BINOMIALE.NEG ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi binomiale négative. +NORMDIST = LOI.NORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale. +NORMINV = LOI.NORMALE.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi normale standard. +NORMSDIST = LOI.NORMALE.STANDARD ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale standard. +NORMSINV = LOI.NORMALE.STANDARD.INVERSE ## Renvoie l’inverse de la distribution cumulée normale standard. +PEARSON = PEARSON ## Renvoie le coefficient de corrélation d’échantillonnage de Pearson. +PERCENTILE = CENTILE ## Renvoie le k-ième centile des valeurs d’une plage. +PERCENTRANK = RANG.POURCENTAGE ## Renvoie le rang en pourcentage d’une valeur d’une série de données. +PERMUT = PERMUTATION ## Renvoie le nombre de permutations pour un nombre donné d’objets. +POISSON = LOI.POISSON ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Poisson. +PROB = PROBABILITE ## Renvoie la probabilité que des valeurs d’une plage soient comprises entre deux limites. +QUARTILE = QUARTILE ## Renvoie le quartile d’une série de données. +RANK = RANG ## Renvoie le rang d’un nombre contenu dans une liste. +RSQ = COEFFICIENT.DETERMINATION ## Renvoie la valeur du coefficient de détermination R^2 d’une régression linéaire. +SKEW = COEFFICIENT.ASYMETRIE ## Renvoie l’asymétrie d’une distribution. +SLOPE = PENTE ## Renvoie la pente d’une droite de régression linéaire. +SMALL = PETITE.VALEUR ## Renvoie la k-ième plus petite valeur d’une série de données. +STANDARDIZE = CENTREE.REDUITE ## Renvoie une valeur centrée réduite. +STDEV = ECARTYPE ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population. +STDEVA = STDEVA ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques inclus. +STDEVP = ECARTYPEP ## Calcule l’écart type d’une population à partir de la population entière. +STDEVPA = STDEVPA ## Calcule l’écart type d’une population à partir de l’ensemble de la population, nombres, texte et valeurs logiques inclus. +STEYX = ERREUR.TYPE.XY ## Renvoie l’erreur type de la valeur y prévue pour chaque x de la régression. +TDIST = LOI.STUDENT ## Renvoie la probabilité d’une variable aléatoire suivant une loi T de Student. +TINV = LOI.STUDENT.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi T de Student. +TREND = TENDANCE ## Renvoie des valeurs par rapport à une tendance linéaire. +TRIMMEAN = MOYENNE.REDUITE ## Renvoie la moyenne de l’intérieur d’une série de données. +TTEST = TEST.STUDENT ## Renvoie la probabilité associée à un test T de Student. +VAR = VAR ## Calcule la variance sur la base d’un échantillon. +VARA = VARA ## Estime la variance d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques incluses. +VARP = VAR.P ## Calcule la variance sur la base de l’ensemble de la population. +VARPA = VARPA ## Calcule la variance d’une population en se basant sur la population entière, nombres, texte et valeurs logiques inclus. +WEIBULL = LOI.WEIBULL ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Weibull. +ZTEST = TEST.Z ## Renvoie la valeur de probabilité unilatérale d’un test z. + + +## +## Text functions Fonctions de texte +## +ASC = ASC ## Change les caractères anglais ou katakana à pleine chasse (codés sur deux octets) à l’intérieur d’une chaîne de caractères en caractères à demi-chasse (codés sur un octet). +BAHTTEXT = BAHTTEXT ## Convertit un nombre en texte en utilisant le format monétaire ß (baht). +CHAR = CAR ## Renvoie le caractère spécifié par le code numérique. +CLEAN = EPURAGE ## Supprime tous les caractères de contrôle du texte. +CODE = CODE ## Renvoie le numéro de code du premier caractère du texte. +CONCATENATE = CONCATENER ## Assemble plusieurs éléments textuels de façon à n’en former qu’un seul. +DOLLAR = EURO ## Convertit un nombre en texte en utilisant le format monétaire € (euro). +EXACT = EXACT ## Vérifie si deux valeurs de texte sont identiques. +FIND = TROUVE ## Trouve un valeur textuelle dans une autre, en respectant la casse. +FINDB = TROUVERB ## Trouve un valeur textuelle dans une autre, en respectant la casse. +FIXED = CTXT ## Convertit un nombre au format texte avec un nombre de décimales spécifié. +JIS = JIS ## Change les caractères anglais ou katakana à demi-chasse (codés sur un octet) à l’intérieur d’une chaîne de caractères en caractères à à pleine chasse (codés sur deux octets). +LEFT = GAUCHE ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. +LEFTB = GAUCHEB ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. +LEN = NBCAR ## Renvoie le nombre de caractères contenus dans une chaîne de texte. +LENB = LENB ## Renvoie le nombre de caractères contenus dans une chaîne de texte. +LOWER = MINUSCULE ## Convertit le texte en minuscules. +MID = STXT ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. +MIDB = STXTB ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. +PHONETIC = PHONETIQUE ## Extrait les caractères phonétiques (furigana) d’une chaîne de texte. +PROPER = NOMPROPRE ## Met en majuscules la première lettre de chaque mot dans une chaîne textuelle. +REPLACE = REMPLACER ## Remplace des caractères dans un texte. +REPLACEB = REMPLACERB ## Remplace des caractères dans un texte. +REPT = REPT ## Répète un texte un certain nombre de fois. +RIGHT = DROITE ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. +RIGHTB = DROITEB ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. +SEARCH = CHERCHE ## Trouve un texte dans un autre texte (sans respecter la casse). +SEARCHB = CHERCHERB ## Trouve un texte dans un autre texte (sans respecter la casse). +SUBSTITUTE = SUBSTITUE ## Remplace l’ancien texte d’une chaîne de caractères par un nouveau. +T = T ## Convertit ses arguments en texte. +TEXT = TEXTE ## Convertit un nombre au format texte. +TRIM = SUPPRESPACE ## Supprime les espaces du texte. +UPPER = MAJUSCULE ## Convertit le texte en majuscules. +VALUE = CNUM ## Convertit un argument textuel en nombre diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/config new file mode 100755 index 0000000..db61436 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/config @@ -0,0 +1,23 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = Ft + + +## +## Excel Error Codes (For future use) +## +NULL = #NULLA! +DIV0 = #ZÉRÓOSZTÓ! +VALUE = #ÉRTÉK! +REF = #HIV! +NAME = #NÉV? +NUM = #SZÁM! +NA = #HIÁNYZIK diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/functions new file mode 100755 index 0000000..3adffeb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/hu/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Bővítmények és automatizálási függvények +## +GETPIVOTDATA = KIMUTATÁSADATOT.VESZ ## A kimutatásokban tárolt adatok visszaadására használható. + + +## +## Cube functions Kockafüggvények +## +CUBEKPIMEMBER = KOCKA.FŐTELJMUT ## Egy fő teljesítménymutató (KPI) nevét, tulajdonságát és mértékegységét adja eredményül, a nevet és a tulajdonságot megjeleníti a cellában. A KPI-k számszerűsíthető mérési lehetőséget jelentenek – ilyen mutató például a havi bruttó nyereség vagy az egy alkalmazottra jutó negyedéves forgalom –, egy szervezet teljesítményének nyomonkövetésére használhatók. +CUBEMEMBER = KOCKA.TAG ## Kockahierachia tagját vagy rekordját adja eredményül. Ellenőrizhető vele, hogy szerepel-e a kockában az adott tag vagy rekord. +CUBEMEMBERPROPERTY = KOCKA.TAG.TUL ## A kocka egyik tagtulajdonságának értékét adja eredményül. Használatával ellenőrizhető, hogy szerepel-e egy tagnév a kockában, eredménye pedig az erre a tagra vonatkozó, megadott tulajdonság. +CUBERANKEDMEMBER = KOCKA.HALM.ELEM ## Egy halmaz rangsor szerinti n-edik tagját adja eredményül. Használatával egy halmaz egy vagy több elemét kaphatja meg, például a legnagyobb teljesítményű üzletkötőt vagy a 10 legjobb tanulót. +CUBESET = KOCKA.HALM ## Számított tagok vagy rekordok halmazát adja eredményül, ehhez egy beállított kifejezést elküld a kiszolgálón található kockának, majd ezt a halmazt adja vissza a Microsoft Office Excel alkalmazásnak. +CUBESETCOUNT = KOCKA.HALM.DB ## Egy halmaz elemszámát adja eredményül. +CUBEVALUE = KOCKA.ÉRTÉK ## Kockából összesített értéket ad eredményül. + + +## +## Database functions Adatbázis-kezelő függvények +## +DAVERAGE = AB.ÁTLAG ## A kijelölt adatbáziselemek átlagát számítja ki. +DCOUNT = AB.DARAB ## Megszámolja, hogy az adatbázisban hány cella tartalmaz számokat. +DCOUNTA = AB.DARAB2 ## Megszámolja az adatbázisban lévő nem üres cellákat. +DGET = AB.MEZŐ ## Egy adatbázisból egyetlen olyan rekordot ad vissza, amely megfelel a megadott feltételeknek. +DMAX = AB.MAX ## A kiválasztott adatbáziselemek közül a legnagyobb értéket adja eredményül. +DMIN = AB.MIN ## A kijelölt adatbáziselemek közül a legkisebb értéket adja eredményül. +DPRODUCT = AB.SZORZAT ## Az adatbázis megadott feltételeknek eleget tevő rekordjaira összeszorozza a megadott mezőben található számértékeket, és eredményül ezt a szorzatot adja. +DSTDEV = AB.SZÓRÁS ## A kijelölt adatbáziselemek egy mintája alapján megbecsüli a szórást. +DSTDEVP = AB.SZÓRÁS2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórást. +DSUM = AB.SZUM ## Összeadja a feltételnek megfelelő adatbázisrekordok mezőoszlopában a számokat. +DVAR = AB.VAR ## A kijelölt adatbáziselemek mintája alapján becslést ad a szórásnégyzetre. +DVARP = AB.VAR2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórásnégyzetet. + + +## +## Date and time functions Dátumfüggvények +## +DATE = DÁTUM ## Adott dátum dátumértékét adja eredményül. +DATEVALUE = DÁTUMÉRTÉK ## Szövegként megadott dátumot dátumértékké alakít át. +DAY = NAP ## Dátumértéket a hónap egy napjává (0-31) alakít. +DAYS360 = NAP360 ## Két dátum közé eső napok számát számítja ki a 360 napos év alapján. +EDATE = EDATE ## Adott dátumnál adott számú hónappal korábbi vagy későbbi dátum dátumértékét adja eredményül. +EOMONTH = EOMONTH ## Adott dátumnál adott számú hónappal korábbi vagy későbbi hónap utolsó napjának dátumértékét adja eredményül. +HOUR = ÓRA ## Időértéket órákká alakít. +MINUTE = PERC ## Időértéket percekké alakít. +MONTH = HÓNAP ## Időértéket hónapokká alakít. +NETWORKDAYS = NETWORKDAYS ## Két dátum között a teljes munkanapok számát adja meg. +NOW = MOST ## A napi dátum dátumértékét és a pontos idő időértékét adja eredményül. +SECOND = MPERC ## Időértéket másodpercekké alakít át. +TIME = IDŐ ## Adott időpont időértékét adja meg. +TIMEVALUE = IDŐÉRTÉK ## Szövegként megadott időpontot időértékké alakít át. +TODAY = MA ## A napi dátum dátumértékét adja eredményül. +WEEKDAY = HÉT.NAPJA ## Dátumértéket a hét napjává alakítja át. +WEEKNUM = WEEKNUM ## Visszatérési értéke egy szám, amely azt mutatja meg, hogy a megadott dátum az év hányadik hetére esik. +WORKDAY = WORKDAY ## Adott dátumnál adott munkanappal korábbi vagy későbbi dátum dátumértékét adja eredményül. +YEAR = ÉV ## Sorszámot évvé alakít át. +YEARFRAC = YEARFRAC ## Az adott dátumok közötti teljes napok számát törtévként adja meg. + + +## +## Engineering functions Mérnöki függvények +## +BESSELI = BESSELI ## Az In(x) módosított Bessel-függvény értékét adja eredményül. +BESSELJ = BESSELJ ## A Jn(x) Bessel-függvény értékét adja eredményül. +BESSELK = BESSELK ## A Kn(x) módosított Bessel-függvény értékét adja eredményül. +BESSELY = BESSELY ## Az Yn(x) módosított Bessel-függvény értékét adja eredményül. +BIN2DEC = BIN2DEC ## Bináris számot decimálissá alakít át. +BIN2HEX = BIN2HEX ## Bináris számot hexadecimálissá alakít át. +BIN2OCT = BIN2OCT ## Bináris számot oktálissá alakít át. +COMPLEX = COMPLEX ## Valós és képzetes részből komplex számot képez. +CONVERT = CONVERT ## Mértékegységeket vált át. +DEC2BIN = DEC2BIN ## Decimális számot binárissá alakít át. +DEC2HEX = DEC2HEX ## Decimális számot hexadecimálissá alakít át. +DEC2OCT = DEC2OCT ## Decimális számot oktálissá alakít át. +DELTA = DELTA ## Azt vizsgálja, hogy két érték egyenlő-e. +ERF = ERF ## A hibafüggvény értékét adja eredményül. +ERFC = ERFC ## A kiegészített hibafüggvény értékét adja eredményül. +GESTEP = GESTEP ## Azt vizsgálja, hogy egy szám nagyobb-e adott küszöbértéknél. +HEX2BIN = HEX2BIN ## Hexadecimális számot binárissá alakít át. +HEX2DEC = HEX2DEC ## Hexadecimális számot decimálissá alakít át. +HEX2OCT = HEX2OCT ## Hexadecimális számot oktálissá alakít át. +IMABS = IMABS ## Komplex szám abszolút értékét (modulusát) adja eredményül. +IMAGINARY = IMAGINARY ## Komplex szám képzetes részét adja eredményül. +IMARGUMENT = IMARGUMENT ## A komplex szám radiánban kifejezett théta argumentumát adja eredményül. +IMCONJUGATE = IMCONJUGATE ## Komplex szám komplex konjugáltját adja eredményül. +IMCOS = IMCOS ## Komplex szám koszinuszát adja eredményül. +IMDIV = IMDIV ## Két komplex szám hányadosát adja eredményül. +IMEXP = IMEXP ## Az e szám komplex kitevőjű hatványát adja eredményül. +IMLN = IMLN ## Komplex szám természetes logaritmusát adja eredményül. +IMLOG10 = IMLOG10 ## Komplex szám tízes alapú logaritmusát adja eredményül. +IMLOG2 = IMLOG2 ## Komplex szám kettes alapú logaritmusát adja eredményül. +IMPOWER = IMPOWER ## Komplex szám hatványát adja eredményül. +IMPRODUCT = IMPRODUCT ## Komplex számok szorzatát adja eredményül. +IMREAL = IMREAL ## Komplex szám valós részét adja eredményül. +IMSIN = IMSIN ## Komplex szám szinuszát adja eredményül. +IMSQRT = IMSQRT ## Komplex szám négyzetgyökét adja eredményül. +IMSUB = IMSUB ## Két komplex szám különbségét adja eredményül. +IMSUM = IMSUM ## Komplex számok összegét adja eredményül. +OCT2BIN = OCT2BIN ## Oktális számot binárissá alakít át. +OCT2DEC = OCT2DEC ## Oktális számot decimálissá alakít át. +OCT2HEX = OCT2HEX ## Oktális számot hexadecimálissá alakít át. + + +## +## Financial functions Pénzügyi függvények +## +ACCRINT = ACCRINT ## Periodikusan kamatozó értékpapír felszaporodott kamatát adja eredményül. +ACCRINTM = ACCRINTM ## Lejáratkor kamatozó értékpapír felszaporodott kamatát adja eredményül. +AMORDEGRC = AMORDEGRC ## Állóeszköz lineáris értékcsökkenését adja meg az egyes könyvelési időszakokra vonatkozóan. +AMORLINC = AMORLINC ## Az egyes könyvelési időszakokban az értékcsökkenést adja meg. +COUPDAYBS = COUPDAYBS ## A szelvényidőszak kezdetétől a kifizetés időpontjáig eltelt napokat adja vissza. +COUPDAYS = COUPDAYS ## A kifizetés időpontját magában foglaló szelvényperiódus hosszát adja meg napokban. +COUPDAYSNC = COUPDAYSNC ## A kifizetés időpontja és a legközelebbi szelvénydátum közötti napok számát adja meg. +COUPNCD = COUPNCD ## A kifizetést követő legelső szelvénydátumot adja eredményül. +COUPNUM = COUPNUM ## A kifizetés és a lejárat időpontja között kifizetendő szelvények számát adja eredményül. +COUPPCD = COUPPCD ## A kifizetés előtti utolsó szelvénydátumot adja eredményül. +CUMIPMT = CUMIPMT ## Két fizetési időszak között kifizetett kamat halmozott értékét adja eredményül. +CUMPRINC = CUMPRINC ## Két fizetési időszak között kifizetett részletek halmozott (kamatot nem tartalmazó) értékét adja eredményül. +DB = KCS2 ## Eszköz adott időszak alatti értékcsökkenését számítja ki a lineáris leírási modell alkalmazásával. +DDB = KCSA ## Eszköz értékcsökkenését számítja ki adott időszakra vonatkozóan a progresszív vagy egyéb megadott leírási modell alkalmazásával. +DISC = DISC ## Értékpapír leszámítolási kamatlábát adja eredményül. +DOLLARDE = DOLLARDE ## Egy közönséges törtként megadott számot tizedes törtté alakít át. +DOLLARFR = DOLLARFR ## Tizedes törtként megadott számot közönséges törtté alakít át. +DURATION = DURATION ## Periodikus kamatfizetésű értékpapír éves kamatérzékenységét adja eredményül. +EFFECT = EFFECT ## Az éves tényleges kamatláb értékét adja eredményül. +FV = JBÉ ## Befektetés jövőbeli értékét számítja ki. +FVSCHEDULE = FVSCHEDULE ## A kezdőtőke adott kamatlábak szerint megnövelt jövőbeli értékét adja eredményül. +INTRATE = INTRATE ## A lejáratig teljesen lekötött értékpapír kamatrátáját adja eredményül. +IPMT = RRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. +IRR = BMR ## A befektetés belső megtérülési rátáját számítja ki pénzáramláshoz. +ISPMT = LRÉSZLETKAMAT ## A befektetés adott időszakára fizetett kamatot számítja ki. +MDURATION = MDURATION ## Egy 100 Ft névértékű értékpapír Macauley-féle módosított kamatérzékenységét adja eredményül. +MIRR = MEGTÉRÜLÉS ## A befektetés belső megtérülési rátáját számítja ki a költségek és a bevételek különböző kamatlába mellett. +NOMINAL = NOMINAL ## Az éves névleges kamatláb értékét adja eredményül. +NPER = PER.SZÁM ## A törlesztési időszakok számát adja meg. +NPV = NMÉ ## Befektetéshez kapcsolódó pénzáramlás nettó jelenértékét számítja ki ismert pénzáramlás és kamatláb mellett. +ODDFPRICE = ODDFPRICE ## Egy 100 Ft névértékű, a futamidő elején töredék-időszakos értékpapír árát adja eredményül. +ODDFYIELD = ODDFYIELD ## A futamidő elején töredék-időszakos értékpapír hozamát adja eredményül. +ODDLPRICE = ODDLPRICE ## Egy 100 Ft névértékű, a futamidő végén töredék-időszakos értékpapír árát adja eredményül. +ODDLYIELD = ODDLYIELD ## A futamidő végén töredék-időszakos értékpapír hozamát adja eredményül. +PMT = RÉSZLET ## A törlesztési időszakra vonatkozó törlesztési összeget számítja ki. +PPMT = PRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. +PRICE = PRICE ## Egy 100 Ft névértékű, periodikusan kamatozó értékpapír árát adja eredményül. +PRICEDISC = PRICEDISC ## Egy 100 Ft névértékű leszámítolt értékpapír árát adja eredményül. +PRICEMAT = PRICEMAT ## Egy 100 Ft névértékű, a lejáratkor kamatozó értékpapír árát adja eredményül. +PV = MÉ ## Befektetés jelenlegi értékét számítja ki. +RATE = RÁTA ## Egy törlesztési időszakban az egy időszakra eső kamatláb nagyságát számítja ki. +RECEIVED = RECEIVED ## A lejáratig teljesen lekötött értékpapír lejáratakor kapott összegét adja eredményül. +SLN = LCSA ## Tárgyi eszköz egy időszakra eső amortizációját adja meg bruttó érték szerinti lineáris leírási kulcsot alkalmazva. +SYD = SYD ## Tárgyi eszköz értékcsökkenését számítja ki adott időszakra az évek számjegyösszegével dolgozó módszer alapján. +TBILLEQ = TBILLEQ ## Kincstárjegy kötvény-egyenértékű hozamát adja eredményül. +TBILLPRICE = TBILLPRICE ## Egy 100 Ft névértékű kincstárjegy árát adja eredményül. +TBILLYIELD = TBILLYIELD ## Kincstárjegy hozamát adja eredményül. +VDB = ÉCSRI ## Tárgyi eszköz amortizációját számítja ki megadott vagy részidőszakra a csökkenő egyenleg módszerének alkalmazásával. +XIRR = XIRR ## Ütemezett készpénzforgalom (cash flow) belső megtérülési kamatrátáját adja eredményül. +XNPV = XNPV ## Ütemezett készpénzforgalom (cash flow) nettó jelenlegi értékét adja eredményül. +YIELD = YIELD ## Periodikusan kamatozó értékpapír hozamát adja eredményül. +YIELDDISC = YIELDDISC ## Leszámítolt értékpapír (például kincstárjegy) éves hozamát adja eredményül. +YIELDMAT = YIELDMAT ## Lejáratkor kamatozó értékpapír éves hozamát adja eredményül. + + +## +## Information functions Információs függvények +## +CELL = CELLA ## Egy cella formátumára, elhelyezkedésére vagy tartalmára vonatkozó adatokat ad eredményül. +ERROR.TYPE = HIBA.TÍPUS ## Egy hibatípushoz tartozó számot ad eredményül. +INFO = INFÓ ## A rendszer- és munkakörnyezet pillanatnyi állapotáról ad felvilágosítást. +ISBLANK = ÜRES ## Eredménye IGAZ, ha az érték üres. +ISERR = HIBA ## Eredménye IGAZ, ha az érték valamelyik hibaérték a #HIÁNYZIK kivételével. +ISERROR = HIBÁS ## Eredménye IGAZ, ha az érték valamelyik hibaérték. +ISEVEN = ISEVEN ## Eredménye IGAZ, ha argumentuma páros szám. +ISLOGICAL = LOGIKAI ## Eredménye IGAZ, ha az érték logikai érték. +ISNA = NINCS ## Eredménye IGAZ, ha az érték a #HIÁNYZIK hibaérték. +ISNONTEXT = NEM.SZÖVEG ## Eredménye IGAZ, ha az érték nem szöveg. +ISNUMBER = SZÁM ## Eredménye IGAZ, ha az érték szám. +ISODD = ISODD ## Eredménye IGAZ, ha argumentuma páratlan szám. +ISREF = HIVATKOZÁS ## Eredménye IGAZ, ha az érték hivatkozás. +ISTEXT = SZÖVEG.E ## Eredménye IGAZ, ha az érték szöveg. +N = N ## Argumentumának értékét számmá alakítja. +NA = HIÁNYZIK ## Eredménye a #HIÁNYZIK hibaérték. +TYPE = TÍPUS ## Érték adattípusának azonosítószámát adja eredményül. + + +## +## Logical functions Logikai függvények +## +AND = ÉS ## Eredménye IGAZ, ha minden argumentuma IGAZ. +FALSE = HAMIS ## A HAMIS logikai értéket adja eredményül. +IF = HA ## Logikai vizsgálatot hajt végre. +IFERROR = HAHIBA ## A megadott értéket adja vissza, ha egy képlet hibához vezet; más esetben a képlet értékét adja eredményül. +NOT = NEM ## Argumentuma értékének ellentettjét adja eredményül. +OR = VAGY ## Eredménye IGAZ, ha bármely argumentuma IGAZ. +TRUE = IGAZ ## Az IGAZ logikai értéket adja eredményül. + + +## +## Lookup and reference functions Keresési és hivatkozási függvények +## +ADDRESS = CÍM ## A munkalap egy cellájára való hivatkozást adja szövegként eredményül. +AREAS = TERÜLET ## Hivatkozásban a területek számát adja eredményül. +CHOOSE = VÁLASZT ## Értékek listájából választ ki egy elemet. +COLUMN = OSZLOP ## Egy hivatkozás oszlopszámát adja eredményül. +COLUMNS = OSZLOPOK ## A hivatkozásban található oszlopok számát adja eredményül. +HLOOKUP = VKERES ## A megadott tömb felső sorában adott értékű elemet keres, és a megtalált elem oszlopából adott sorban elhelyezkedő értékkel tér vissza. +HYPERLINK = HIPERHIVATKOZÁS ## Hálózati kiszolgálón, intraneten vagy az interneten tárolt dokumentumot megnyitó parancsikont vagy hivatkozást hoz létre. +INDEX = INDEX ## Tömb- vagy hivatkozás indexszel megadott értékét adja vissza. +INDIRECT = INDIREKT ## Szöveg megadott hivatkozást ad eredményül. +LOOKUP = KERES ## Vektorban vagy tömbben keres meg értékeket. +MATCH = HOL.VAN ## Hivatkozásban vagy tömbben értékeket keres. +OFFSET = OFSZET ## Hivatkozás egy másik hivatkozástól számított távolságát adja meg. +ROW = SOR ## Egy hivatkozás sorának számát adja meg. +ROWS = SOROK ## Egy hivatkozás sorainak számát adja meg. +RTD = RTD ## Valós idejű adatokat keres vissza a COM automatizmust (automatizálás: Egy alkalmazás objektumaival való munka másik alkalmazásból vagy fejlesztőeszközből. A korábban OLE automatizmusnak nevezett automatizálás iparági szabvány, a Component Object Model (COM) szolgáltatása.) támogató programból. +TRANSPOSE = TRANSZPONÁLÁS ## Egy tömb transzponáltját adja eredményül. +VLOOKUP = FKERES ## A megadott tömb bal szélső oszlopában megkeres egy értéket, majd annak sora és a megadott oszlop metszéspontjában levő értéked adja eredményül. + + +## +## Math and trigonometry functions Matematikai és trigonometrikus függvények +## +ABS = ABS ## Egy szám abszolút értékét adja eredményül. +ACOS = ARCCOS ## Egy szám arkusz koszinuszát számítja ki. +ACOSH = ACOSH ## Egy szám inverz koszinusz hiperbolikuszát számítja ki. +ASIN = ARCSIN ## Egy szám arkusz szinuszát számítja ki. +ASINH = ASINH ## Egy szám inverz szinusz hiperbolikuszát számítja ki. +ATAN = ARCTAN ## Egy szám arkusz tangensét számítja ki. +ATAN2 = ARCTAN2 ## X és y koordináták alapján számítja ki az arkusz tangens értéket. +ATANH = ATANH ## A szám inverz tangens hiperbolikuszát számítja ki. +CEILING = PLAFON ## Egy számot a legközelebbi egészre vagy a pontosságként megadott érték legközelebb eső többszörösére kerekít. +COMBIN = KOMBINÁCIÓK ## Adott számú objektum összes lehetséges kombinációinak számát számítja ki. +COS = COS ## Egy szám koszinuszát számítja ki. +COSH = COSH ## Egy szám koszinusz hiperbolikuszát számítja ki. +DEGREES = FOK ## Radiánt fokká alakít át. +EVEN = PÁROS ## Egy számot a legközelebbi páros egész számra kerekít. +EXP = KITEVŐ ## Az e adott kitevőjű hatványát adja eredményül. +FACT = FAKT ## Egy szám faktoriálisát számítja ki. +FACTDOUBLE = FACTDOUBLE ## Egy szám dupla faktoriálisát adja eredményül. +FLOOR = PADLÓ ## Egy számot lefelé, a nulla felé kerekít. +GCD = GCD ## A legnagyobb közös osztót adja eredményül. +INT = INT ## Egy számot lefelé kerekít a legközelebbi egészre. +LCM = LCM ## A legkisebb közös többszöröst adja eredményül. +LN = LN ## Egy szám természetes logaritmusát számítja ki. +LOG = LOG ## Egy szám adott alapú logaritmusát számítja ki. +LOG10 = LOG10 ## Egy szám 10-es alapú logaritmusát számítja ki. +MDETERM = MDETERM ## Egy tömb mátrix-determinánsát számítja ki. +MINVERSE = INVERZ.MÁTRIX ## Egy tömb mátrix inverzét adja eredményül. +MMULT = MSZORZAT ## Két tömb mátrix-szorzatát adja meg. +MOD = MARADÉK ## Egy szám osztási maradékát adja eredményül. +MROUND = MROUND ## A kívánt többszörösére kerekített értéket ad eredményül. +MULTINOMIAL = MULTINOMIAL ## Számhalmaz multinomiálisát adja eredményül. +ODD = PÁRATLAN ## Egy számot a legközelebbi páratlan számra kerekít. +PI = PI ## A pi matematikai állandót adja vissza. +POWER = HATVÁNY ## Egy szám adott kitevőjű hatványát számítja ki. +PRODUCT = SZORZAT ## Argumentumai szorzatát számítja ki. +QUOTIENT = QUOTIENT ## Egy hányados egész részét adja eredményül. +RADIANS = RADIÁN ## Fokot radiánná alakít át. +RAND = VÉL ## Egy 0 és 1 közötti véletlen számot ad eredményül. +RANDBETWEEN = RANDBETWEEN ## Megadott számok közé eső véletlen számot állít elő. +ROMAN = RÓMAI ## Egy számot római számokkal kifejezve szövegként ad eredményül. +ROUND = KEREKÍTÉS ## Egy számot adott számú számjegyre kerekít. +ROUNDDOWN = KEREKÍTÉS.LE ## Egy számot lefelé, a nulla felé kerekít. +ROUNDUP = KEREKÍTÉS.FEL ## Egy számot felfelé, a nullától távolabbra kerekít. +SERIESSUM = SERIESSUM ## Hatványsor összegét adja eredményül. +SIGN = ELŐJEL ## Egy szám előjelét adja meg. +SIN = SIN ## Egy szög szinuszát számítja ki. +SINH = SINH ## Egy szám szinusz hiperbolikuszát számítja ki. +SQRT = GYÖK ## Egy szám pozitív négyzetgyökét számítja ki. +SQRTPI = SQRTPI ## A (szám*pi) négyzetgyökét adja eredményül. +SUBTOTAL = RÉSZÖSSZEG ## Lista vagy adatbázis részösszegét adja eredményül. +SUM = SZUM ## Összeadja az argumentumlistájában lévő számokat. +SUMIF = SZUMHA ## A megadott feltételeknek eleget tevő cellákban található értékeket adja össze. +SUMIFS = SZUMHATÖBB ## Több megadott feltételnek eleget tévő tartománycellák összegét adja eredményül. +SUMPRODUCT = SZORZATÖSSZEG ## A megfelelő tömbelemek szorzatának összegét számítja ki. +SUMSQ = NÉGYZETÖSSZEG ## Argumentumai négyzetének összegét számítja ki. +SUMX2MY2 = SZUMX2BŐLY2 ## Két tömb megfelelő elemei négyzetének különbségét összegzi. +SUMX2PY2 = SZUMX2MEGY2 ## Két tömb megfelelő elemei négyzetének összegét összegzi. +SUMXMY2 = SZUMXBŐLY2 ## Két tömb megfelelő elemei különbségének négyzetösszegét számítja ki. +TAN = TAN ## Egy szám tangensét számítja ki. +TANH = TANH ## Egy szám tangens hiperbolikuszát számítja ki. +TRUNC = CSONK ## Egy számot egésszé csonkít. + + +## +## Statistical functions Statisztikai függvények +## +AVEDEV = ÁTL.ELTÉRÉS ## Az adatpontoknak átlaguktól való átlagos abszolút eltérését számítja ki. +AVERAGE = ÁTLAG ## Argumentumai átlagát számítja ki. +AVERAGEA = ÁTLAGA ## Argumentumai átlagát számítja ki (beleértve a számokat, szöveget és logikai értékeket). +AVERAGEIF = ÁTLAGHA ## A megadott feltételnek eleget tévő tartomány celláinak átlagát (számtani közepét) adja eredményül. +AVERAGEIFS = ÁTLAGHATÖBB ## A megadott feltételeknek eleget tévő cellák átlagát (számtani közepét) adja eredményül. +BETADIST = BÉTA.ELOSZLÁS ## A béta-eloszlás függvényt számítja ki. +BETAINV = INVERZ.BÉTA ## Adott béta-eloszláshoz kiszámítja a béta eloszlásfüggvény inverzét. +BINOMDIST = BINOM.ELOSZLÁS ## A diszkrét binomiális eloszlás valószínűségértékét számítja ki. +CHIDIST = KHI.ELOSZLÁS ## A khi-négyzet-eloszlás egyszélű valószínűségértékét számítja ki. +CHIINV = INVERZ.KHI ## A khi-négyzet-eloszlás egyszélű valószínűségértékének inverzét számítja ki. +CHITEST = KHI.PRÓBA ## Függetlenségvizsgálatot hajt végre. +CONFIDENCE = MEGBÍZHATÓSÁG ## Egy statisztikai sokaság várható értékének megbízhatósági intervallumát adja eredményül. +CORREL = KORREL ## Két adathalmaz korrelációs együtthatóját számítja ki. +COUNT = DARAB ## Megszámolja, hogy argumentumlistájában hány szám található. +COUNTA = DARAB2 ## Megszámolja, hogy argumentumlistájában hány érték található. +COUNTBLANK = DARABÜRES ## Egy tartományban összeszámolja az üres cellákat. +COUNTIF = DARABTELI ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek a megadott feltételnek. +COUNTIFS = DARABHATÖBB ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek több feltételnek. +COVAR = KOVAR ## A kovarianciát, azaz a páronkénti eltérések szorzatának átlagát számítja ki. +CRITBINOM = KRITBINOM ## Azt a legkisebb számot adja eredményül, amelyre a binomiális eloszlásfüggvény értéke nem kisebb egy adott határértéknél. +DEVSQ = SQ ## Az átlagtól való eltérések négyzetének összegét számítja ki. +EXPONDIST = EXP.ELOSZLÁS ## Az exponenciális eloszlás értékét számítja ki. +FDIST = F.ELOSZLÁS ## Az F-eloszlás értékét számítja ki. +FINV = INVERZ.F ## Az F-eloszlás inverzének értékét számítja ki. +FISHER = FISHER ## Fisher-transzformációt hajt végre. +FISHERINV = INVERZ.FISHER ## A Fisher-transzformáció inverzét hajtja végre. +FORECAST = ELŐREJELZÉS ## Az ismert értékek alapján lineáris regresszióval becsült értéket ad eredményül. +FREQUENCY = GYAKORISÁG ## A gyakorisági vagy empirikus eloszlás értékét függőleges tömbként adja eredményül. +FTEST = F.PRÓBA ## Az F-próba értékét adja eredményül. +GAMMADIST = GAMMA.ELOSZLÁS ## A gamma-eloszlás értékét számítja ki. +GAMMAINV = INVERZ.GAMMA ## A gamma-eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +GAMMALN = GAMMALN ## A gamma-függvény természetes logaritmusát számítja ki. +GEOMEAN = MÉRTANI.KÖZÉP ## Argumentumai mértani középértékét számítja ki. +GROWTH = NÖV ## Exponenciális regresszió alapján ad becslést. +HARMEAN = HARM.KÖZÉP ## Argumentumai harmonikus átlagát számítja ki. +HYPGEOMDIST = HIPERGEOM.ELOSZLÁS ## A hipergeometriai eloszlás értékét számítja ki. +INTERCEPT = METSZ ## A regressziós egyenes y tengellyel való metszéspontját határozza meg. +KURT = CSÚCSOSSÁG ## Egy adathalmaz csúcsosságát számítja ki. +LARGE = NAGY ## Egy adathalmaz k-adik legnagyobb elemét adja eredményül. +LINEST = LIN.ILL ## A legkisebb négyzetek módszerével az adatokra illesztett egyenes paramétereit határozza meg. +LOGEST = LOG.ILL ## Az adatokra illesztett exponenciális görbe paramétereit határozza meg. +LOGINV = INVERZ.LOG.ELOSZLÁS ## A lognormális eloszlás inverzét számítja ki. +LOGNORMDIST = LOG.ELOSZLÁS ## A lognormális eloszlásfüggvény értékét számítja ki. +MAX = MAX ## Az argumentumai között szereplő legnagyobb számot adja meg. +MAXA = MAX2 ## Az argumentumai között szereplő legnagyobb számot adja meg (beleértve a számokat, szöveget és logikai értékeket). +MEDIAN = MEDIÁN ## Adott számhalmaz mediánját számítja ki. +MIN = MIN ## Az argumentumai között szereplő legkisebb számot adja meg. +MINA = MIN2 ## Az argumentumai között szereplő legkisebb számot adja meg, beleértve a számokat, szöveget és logikai értékeket. +MODE = MÓDUSZ ## Egy adathalmazból kiválasztja a leggyakrabban előforduló számot. +NEGBINOMDIST = NEGBINOM.ELOSZL ## A negatív binomiális eloszlás értékét számítja ki. +NORMDIST = NORM.ELOSZL ## A normális eloszlás értékét számítja ki. +NORMINV = INVERZ.NORM ## A normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +NORMSDIST = STNORMELOSZL ## A standard normális eloszlás eloszlásfüggvényének értékét számítja ki. +NORMSINV = INVERZ.STNORM ## A standard normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +PEARSON = PEARSON ## A Pearson-féle korrelációs együtthatót számítja ki. +PERCENTILE = PERCENTILIS ## Egy tartományban található értékek k-adik percentilisét, azaz százalékosztályát adja eredményül. +PERCENTRANK = SZÁZALÉKRANG ## Egy értéknek egy adathalmazon belül vett százalékos rangját (elhelyezkedését) számítja ki. +PERMUT = VARIÁCIÓK ## Adott számú objektum k-ad osztályú ismétlés nélküli variációinak számát számítja ki. +POISSON = POISSON ## A Poisson-eloszlás értékét számítja ki. +PROB = VALÓSZÍNŰSÉG ## Annak valószínűségét számítja ki, hogy adott értékek két határérték közé esnek. +QUARTILE = KVARTILIS ## Egy adathalmaz kvartilisét (negyedszintjét) számítja ki. +RANK = SORSZÁM ## Kiszámítja, hogy egy szám hányadik egy számsorozatban. +RSQ = RNÉGYZET ## Kiszámítja a Pearson-féle szorzatmomentum korrelációs együtthatójának négyzetét. +SKEW = FERDESÉG ## Egy eloszlás ferdeségét határozza meg. +SLOPE = MEREDEKSÉG ## Egy lineáris regressziós egyenes meredekségét számítja ki. +SMALL = KICSI ## Egy adathalmaz k-adik legkisebb elemét adja meg. +STANDARDIZE = NORMALIZÁLÁS ## Normalizált értéket ad eredményül. +STDEV = SZÓRÁS ## Egy statisztikai sokaság mintájából kiszámítja annak szórását. +STDEVA = SZÓRÁSA ## Egy statisztikai sokaság mintájából kiszámítja annak szórását (beleértve a számokat, szöveget és logikai értékeket). +STDEVP = SZÓRÁSP ## Egy statisztikai sokaság egészéből kiszámítja annak szórását. +STDEVPA = SZÓRÁSPA ## Egy statisztikai sokaság egészéből kiszámítja annak szórását (beleértve számokat, szöveget és logikai értékeket). +STEYX = STHIBAYX ## Egy regresszió esetén az egyes x-értékek alapján meghatározott y-értékek standard hibáját számítja ki. +TDIST = T.ELOSZLÁS ## A Student-féle t-eloszlás értékét számítja ki. +TINV = INVERZ.T ## A Student-féle t-eloszlás inverzét számítja ki. +TREND = TREND ## Lineáris trend értékeit számítja ki. +TRIMMEAN = RÉSZÁTLAG ## Egy adathalmaz középső részének átlagát számítja ki. +TTEST = T.PRÓBA ## A Student-féle t-próbához tartozó valószínűséget számítja ki. +VAR = VAR ## Minta alapján becslést ad a varianciára. +VARA = VARA ## Minta alapján becslést ad a varianciára (beleértve számokat, szöveget és logikai értékeket). +VARP = VARP ## Egy statisztikai sokaság varianciáját számítja ki. +VARPA = VARPA ## Egy statisztikai sokaság varianciáját számítja ki (beleértve számokat, szöveget és logikai értékeket). +WEIBULL = WEIBULL ## A Weibull-féle eloszlás értékét számítja ki. +ZTEST = Z.PRÓBA ## Az egyszélű z-próbával kapott valószínűségértéket számítja ki. + + +## +## Text functions Szövegműveletekhez használható függvények +## +ASC = ASC ## Szöveg teljes szélességű (kétbájtos) latin és katakana karaktereit félszélességű (egybájtos) karakterekké alakítja. +BAHTTEXT = BAHTSZÖVEG ## Számot szöveggé alakít a ß (baht) pénznemformátum használatával. +CHAR = KARAKTER ## A kódszámmal meghatározott karaktert adja eredményül. +CLEAN = TISZTÍT ## A szövegből eltávolítja az összes nem nyomtatható karaktert. +CODE = KÓD ## Karaktersorozat első karakterének numerikus kódját adja eredményül. +CONCATENATE = ÖSSZEFŰZ ## Több szövegelemet egyetlen szöveges elemmé fűz össze. +DOLLAR = FORINT ## Számot pénznem formátumú szöveggé alakít át. +EXACT = AZONOS ## Megvizsgálja, hogy két érték azonos-e. +FIND = SZÖVEG.TALÁL ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). +FINDB = SZÖVEG.TALÁL2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). +FIXED = FIX ## Számot szöveges formátumúra alakít adott számú tizedesjegyre kerekítve. +JIS = JIS ## A félszélességű (egybájtos) latin és a katakana karaktereket teljes szélességű (kétbájtos) karakterekké alakítja. +LEFT = BAL ## Szöveg bal szélső karaktereit adja eredményül. +LEFTB = BAL2 ## Szöveg bal szélső karaktereit adja eredményül. +LEN = HOSSZ ## Szöveg karakterekben mért hosszát adja eredményül. +LENB = HOSSZ2 ## Szöveg karakterekben mért hosszát adja eredményül. +LOWER = KISBETŰ ## Szöveget kisbetűssé alakít át. +MID = KÖZÉP ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. +MIDB = KÖZÉP2 ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. +PHONETIC = PHONETIC ## Szöveg furigana (fonetikus) karaktereit adja vissza. +PROPER = TNÉV ## Szöveg minden szavának kezdőbetűjét nagybetűsre cseréli. +REPLACE = CSERE ## A szövegen belül karaktereket cserél. +REPLACEB = CSERE2 ## A szövegen belül karaktereket cserél. +REPT = SOKSZOR ## Megadott számú alkalommal megismétel egy szövegrészt. +RIGHT = JOBB ## Szövegrész jobb szélső karaktereit adja eredményül. +RIGHTB = JOBB2 ## Szövegrész jobb szélső karaktereit adja eredményül. +SEARCH = SZÖVEG.KERES ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). +SEARCHB = SZÖVEG.KERES2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). +SUBSTITUTE = HELYETTE ## Szövegben adott karaktereket másikra cserél. +T = T ## Argumentumát szöveggé alakítja át. +TEXT = SZÖVEG ## Számértéket alakít át adott számformátumú szöveggé. +TRIM = TRIM ## A szövegből eltávolítja a szóközöket. +UPPER = NAGYBETŰS ## Szöveget nagybetűssé alakít át. +VALUE = ÉRTÉK ## Szöveget számmá alakít át. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/config new file mode 100755 index 0000000..6cc013a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULLO! +DIV0 = #DIV/0! +VALUE = #VALORE! +REF = #RIF! +NAME = #NOME? +NUM = #NUM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/functions new file mode 100755 index 0000000..1901baf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/it/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funzioni di automazione e dei componenti aggiuntivi +## +GETPIVOTDATA = INFO.DATI.TAB.PIVOT ## Restituisce i dati memorizzati in un rapporto di tabella pivot + + +## +## Cube functions Funzioni cubo +## +CUBEKPIMEMBER = MEMBRO.KPI.CUBO ## Restituisce il nome, la proprietà e la misura di un indicatore di prestazioni chiave (KPI) e visualizza il nome e la proprietà nella cella. Un KPI è una misura quantificabile, ad esempio l'utile lordo mensile o il fatturato trimestrale dei dipendenti, utilizzata per il monitoraggio delle prestazioni di un'organizzazione. +CUBEMEMBER = MEMBRO.CUBO ## Restituisce un membro o una tupla in una gerarchia di cubi. Consente di verificare l'esistenza del membro o della tupla nel cubo. +CUBEMEMBERPROPERTY = PROPRIETÀ.MEMBRO.CUBO ## Restituisce il valore di una proprietà di un membro del cubo. Consente di verificare l'esistenza di un nome di membro all'interno del cubo e di restituire la proprietà specificata per tale membro. +CUBERANKEDMEMBER = MEMBRO.CUBO.CON.RANGO ## Restituisce l'n-esimo membro o il membro ordinato di un insieme. Consente di restituire uno o più elementi in un insieme, ad esempio l'agente di vendita migliore o i primi 10 studenti. +CUBESET = SET.CUBO ## Definisce un insieme di tuple o membri calcolati mediante l'invio di un'espressione di insieme al cubo sul server. In questo modo l'insieme viene creato e restituito a Microsoft Office Excel. +CUBESETCOUNT = CONTA.SET.CUBO ## Restituisce il numero di elementi di un insieme. +CUBEVALUE = VALORE.CUBO ## Restituisce un valore aggregato da un cubo. + + +## +## Database functions Funzioni di database +## +DAVERAGE = DB.MEDIA ## Restituisce la media di voci del database selezionate +DCOUNT = DB.CONTA.NUMERI ## Conta le celle di un database contenenti numeri +DCOUNTA = DB.CONTA.VALORI ## Conta le celle non vuote in un database +DGET = DB.VALORI ## Estrae da un database un singolo record che soddisfa i criteri specificati +DMAX = DB.MAX ## Restituisce il valore massimo dalle voci selezionate in un database +DMIN = DB.MIN ## Restituisce il valore minimo dalle voci di un database selezionate +DPRODUCT = DB.PRODOTTO ## Moltiplica i valori in un determinato campo di record che soddisfano i criteri del database +DSTDEV = DB.DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione di voci di un database selezionate +DSTDEVP = DB.DEV.ST.POP ## Calcola la deviazione standard sulla base di tutte le voci di un database selezionate +DSUM = DB.SOMMA ## Aggiunge i numeri nel campo colonna di record del database che soddisfa determinati criteri +DVAR = DB.VAR ## Restituisce una stima della varianza sulla base di un campione da voci di un database selezionate +DVARP = DB.VAR.POP ## Calcola la varianza sulla base di tutte le voci di un database selezionate + + +## +## Date and time functions Funzioni data e ora +## +DATE = DATA ## Restituisce il numero seriale di una determinata data +DATEVALUE = DATA.VALORE ## Converte una data sotto forma di testo in un numero seriale +DAY = GIORNO ## Converte un numero seriale in un giorno del mese +DAYS360 = GIORNO360 ## Calcola il numero di giorni compreso tra due date basandosi su un anno di 360 giorni +EDATE = DATA.MESE ## Restituisce il numero seriale della data che rappresenta il numero di mesi prima o dopo la data di inizio +EOMONTH = FINE.MESE ## Restituisce il numero seriale dell'ultimo giorno del mese, prima o dopo un determinato numero di mesi +HOUR = ORA ## Converte un numero seriale in un'ora +MINUTE = MINUTO ## Converte un numero seriale in un minuto +MONTH = MESE ## Converte un numero seriale in un mese +NETWORKDAYS = GIORNI.LAVORATIVI.TOT ## Restituisce il numero di tutti i giorni lavorativi compresi fra due date +NOW = ADESSO ## Restituisce il numero seriale della data e dell'ora corrente +SECOND = SECONDO ## Converte un numero seriale in un secondo +TIME = ORARIO ## Restituisce il numero seriale di una determinata ora +TIMEVALUE = ORARIO.VALORE ## Converte un orario in forma di testo in un numero seriale +TODAY = OGGI ## Restituisce il numero seriale relativo alla data odierna +WEEKDAY = GIORNO.SETTIMANA ## Converte un numero seriale in un giorno della settimana +WEEKNUM = NUM.SETTIMANA ## Converte un numero seriale in un numero che rappresenta la posizione numerica di una settimana nell'anno +WORKDAY = GIORNO.LAVORATIVO ## Restituisce il numero della data prima o dopo un determinato numero di giorni lavorativi +YEAR = ANNO ## Converte un numero seriale in un anno +YEARFRAC = FRAZIONE.ANNO ## Restituisce la frazione dell'anno che rappresenta il numero dei giorni compresi tra una data_ iniziale e una data_finale + + +## +## Engineering functions Funzioni ingegneristiche +## +BESSELI = BESSEL.I ## Restituisce la funzione di Bessel modificata In(x) +BESSELJ = BESSEL.J ## Restituisce la funzione di Bessel Jn(x) +BESSELK = BESSEL.K ## Restituisce la funzione di Bessel modificata Kn(x) +BESSELY = BESSEL.Y ## Restituisce la funzione di Bessel Yn(x) +BIN2DEC = BINARIO.DECIMALE ## Converte un numero binario in decimale +BIN2HEX = BINARIO.HEX ## Converte un numero binario in esadecimale +BIN2OCT = BINARIO.OCT ## Converte un numero binario in ottale +COMPLEX = COMPLESSO ## Converte i coefficienti reali e immaginari in numeri complessi +CONVERT = CONVERTI ## Converte un numero da un sistema di misura in un altro +DEC2BIN = DECIMALE.BINARIO ## Converte un numero decimale in binario +DEC2HEX = DECIMALE.HEX ## Converte un numero decimale in esadecimale +DEC2OCT = DECIMALE.OCT ## Converte un numero decimale in ottale +DELTA = DELTA ## Verifica se due valori sono uguali +ERF = FUNZ.ERRORE ## Restituisce la funzione di errore +ERFC = FUNZ.ERRORE.COMP ## Restituisce la funzione di errore complementare +GESTEP = SOGLIA ## Verifica se un numero è maggiore del valore di soglia +HEX2BIN = HEX.BINARIO ## Converte un numero esadecimale in binario +HEX2DEC = HEX.DECIMALE ## Converte un numero esadecimale in decimale +HEX2OCT = HEX.OCT ## Converte un numero esadecimale in ottale +IMABS = COMP.MODULO ## Restituisce il valore assoluto (modulo) di un numero complesso +IMAGINARY = COMP.IMMAGINARIO ## Restituisce il coefficiente immaginario di un numero complesso +IMARGUMENT = COMP.ARGOMENTO ## Restituisce l'argomento theta, un angolo espresso in radianti +IMCONJUGATE = COMP.CONIUGATO ## Restituisce il complesso coniugato del numero complesso +IMCOS = COMP.COS ## Restituisce il coseno di un numero complesso +IMDIV = COMP.DIV ## Restituisce il quoziente di due numeri complessi +IMEXP = COMP.EXP ## Restituisce il valore esponenziale di un numero complesso +IMLN = COMP.LN ## Restituisce il logaritmo naturale di un numero complesso +IMLOG10 = COMP.LOG10 ## Restituisce il logaritmo in base 10 di un numero complesso +IMLOG2 = COMP.LOG2 ## Restituisce un logaritmo in base 2 di un numero complesso +IMPOWER = COMP.POTENZA ## Restituisce il numero complesso elevato a una potenza intera +IMPRODUCT = COMP.PRODOTTO ## Restituisce il prodotto di numeri complessi compresi tra 2 e 29 +IMREAL = COMP.PARTE.REALE ## Restituisce il coefficiente reale di un numero complesso +IMSIN = COMP.SEN ## Restituisce il seno di un numero complesso +IMSQRT = COMP.RADQ ## Restituisce la radice quadrata di un numero complesso +IMSUB = COMP.DIFF ## Restituisce la differenza fra due numeri complessi +IMSUM = COMP.SOMMA ## Restituisce la somma di numeri complessi +OCT2BIN = OCT.BINARIO ## Converte un numero ottale in binario +OCT2DEC = OCT.DECIMALE ## Converte un numero ottale in decimale +OCT2HEX = OCT.HEX ## Converte un numero ottale in esadecimale + + +## +## Financial functions Funzioni finanziarie +## +ACCRINT = INT.MATURATO.PER ## Restituisce l'interesse maturato di un titolo che paga interessi periodici +ACCRINTM = INT.MATURATO.SCAD ## Restituisce l'interesse maturato di un titolo che paga interessi alla scadenza +AMORDEGRC = AMMORT.DEGR ## Restituisce l'ammortamento per ogni periodo contabile utilizzando un coefficiente di ammortamento +AMORLINC = AMMORT.PER ## Restituisce l'ammortamento per ogni periodo contabile +COUPDAYBS = GIORNI.CED.INIZ.LIQ ## Restituisce il numero dei giorni che vanno dall'inizio del periodo di durata della cedola alla data di liquidazione +COUPDAYS = GIORNI.CED ## Restituisce il numero dei giorni relativi al periodo della cedola che contiene la data di liquidazione +COUPDAYSNC = GIORNI.CED.NUOVA ## Restituisce il numero di giorni che vanno dalla data di liquidazione alla data della cedola successiva +COUPNCD = DATA.CED.SUCC ## Restituisce un numero che rappresenta la data della cedola successiva alla data di liquidazione +COUPNUM = NUM.CED ## Restituisce il numero di cedole pagabili fra la data di liquidazione e la data di scadenza +COUPPCD = DATA.CED.PREC ## Restituisce un numero che rappresenta la data della cedola precedente alla data di liquidazione +CUMIPMT = INT.CUMUL ## Restituisce l'interesse cumulativo pagato fra due periodi +CUMPRINC = CAP.CUM ## Restituisce il capitale cumulativo pagato per estinguere un debito fra due periodi +DB = DB ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a quote fisse decrescenti +DDB = AMMORT ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a doppie quote decrescenti o altri metodi specificati +DISC = TASSO.SCONTO ## Restituisce il tasso di sconto per un titolo +DOLLARDE = VALUTA.DEC ## Converte un prezzo valuta, espresso come frazione, in prezzo valuta, espresso come numero decimale +DOLLARFR = VALUTA.FRAZ ## Converte un prezzo valuta, espresso come numero decimale, in prezzo valuta, espresso come frazione +DURATION = DURATA ## Restituisce la durata annuale di un titolo con i pagamenti di interesse periodico +EFFECT = EFFETTIVO ## Restituisce l'effettivo tasso di interesse annuo +FV = VAL.FUT ## Restituisce il valore futuro di un investimento +FVSCHEDULE = VAL.FUT.CAPITALE ## Restituisce il valore futuro di un capitale iniziale dopo aver applicato una serie di tassi di interesse composti +INTRATE = TASSO.INT ## Restituisce il tasso di interesse per un titolo interamente investito +IPMT = INTERESSI ## Restituisce il valore degli interessi per un investimento relativo a un periodo specifico +IRR = TIR.COST ## Restituisce il tasso di rendimento interno per una serie di flussi di cassa +ISPMT = INTERESSE.RATA ## Calcola l'interesse di un investimento pagato durante un periodo specifico +MDURATION = DURATA.M ## Restituisce la durata Macauley modificata per un titolo con un valore presunto di € 100 +MIRR = TIR.VAR ## Restituisce il tasso di rendimento interno in cui i flussi di cassa positivi e negativi sono finanziati a tassi differenti +NOMINAL = NOMINALE ## Restituisce il tasso di interesse nominale annuale +NPER = NUM.RATE ## Restituisce un numero di periodi relativi a un investimento +NPV = VAN ## Restituisce il valore attuale netto di un investimento basato su una serie di flussi di cassa periodici e sul tasso di sconto +ODDFPRICE = PREZZO.PRIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente il primo periodo di durata irregolare +ODDFYIELD = REND.PRIMO.IRR ## Restituisce il rendimento di un titolo avente il primo periodo di durata irregolare +ODDLPRICE = PREZZO.ULTIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente l'ultimo periodo di durata irregolare +ODDLYIELD = REND.ULTIMO.IRR ## Restituisce il rendimento di un titolo avente l'ultimo periodo di durata irregolare +PMT = RATA ## Restituisce il pagamento periodico di una rendita annua +PPMT = P.RATA ## Restituisce il pagamento sul capitale di un investimento per un dato periodo +PRICE = PREZZO ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga interessi periodici +PRICEDISC = PREZZO.SCONT ## Restituisce il prezzo di un titolo scontato dal valore nominale di € 100 +PRICEMAT = PREZZO.SCAD ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga gli interessi alla scadenza +PV = VA ## Restituisce il valore attuale di un investimento +RATE = TASSO ## Restituisce il tasso di interesse per un periodo di un'annualità +RECEIVED = RICEV.SCAD ## Restituisce l'ammontare ricevuto alla scadenza di un titolo interamente investito +SLN = AMMORT.COST ## Restituisce l'ammortamento a quote costanti di un bene per un singolo periodo +SYD = AMMORT.ANNUO ## Restituisce l'ammortamento a somma degli anni di un bene per un periodo specificato +TBILLEQ = BOT.EQUIV ## Restituisce il rendimento equivalente ad un'obbligazione per un Buono ordinario del Tesoro +TBILLPRICE = BOT.PREZZO ## Restituisce il prezzo di un Buono del Tesoro dal valore nominale di € 100 +TBILLYIELD = BOT.REND ## Restituisce il rendimento di un Buono del Tesoro +VDB = AMMORT.VAR ## Restituisce l'ammortamento di un bene per un periodo specificato o parziale utilizzando il metodo a doppie quote proporzionali ai valori residui +XIRR = TIR.X ## Restituisce il tasso di rendimento interno di un impiego di flussi di cassa +XNPV = VAN.X ## Restituisce il valore attuale netto di un impiego di flussi di cassa non necessariamente periodici +YIELD = REND ## Restituisce il rendimento di un titolo che frutta interessi periodici +YIELDDISC = REND.TITOLI.SCONT ## Restituisce il rendimento annuale di un titolo scontato, ad esempio un Buono del Tesoro +YIELDMAT = REND.SCAD ## Restituisce il rendimento annuo di un titolo che paga interessi alla scadenza + + +## +## Information functions Funzioni relative alle informazioni +## +CELL = CELLA ## Restituisce le informazioni sulla formattazione, la posizione o i contenuti di una cella +ERROR.TYPE = ERRORE.TIPO ## Restituisce un numero che corrisponde a un tipo di errore +INFO = INFO ## Restituisce le informazioni sull'ambiente operativo corrente +ISBLANK = VAL.VUOTO ## Restituisce VERO se il valore è vuoto +ISERR = VAL.ERR ## Restituisce VERO se il valore è un valore di errore qualsiasi tranne #N/D +ISERROR = VAL.ERRORE ## Restituisce VERO se il valore è un valore di errore qualsiasi +ISEVEN = VAL.PARI ## Restituisce VERO se il numero è pari +ISLOGICAL = VAL.LOGICO ## Restituisce VERO se il valore è un valore logico +ISNA = VAL.NON.DISP ## Restituisce VERO se il valore è un valore di errore #N/D +ISNONTEXT = VAL.NON.TESTO ## Restituisce VERO se il valore non è in formato testo +ISNUMBER = VAL.NUMERO ## Restituisce VERO se il valore è un numero +ISODD = VAL.DISPARI ## Restituisce VERO se il numero è dispari +ISREF = VAL.RIF ## Restituisce VERO se il valore è un riferimento +ISTEXT = VAL.TESTO ## Restituisce VERO se il valore è in formato testo +N = NUM ## Restituisce un valore convertito in numero +NA = NON.DISP ## Restituisce il valore di errore #N/D +TYPE = TIPO ## Restituisce un numero che indica il tipo di dati relativi a un valore + + +## +## Logical functions Funzioni logiche +## +AND = E ## Restituisce VERO se tutti gli argomenti sono VERO +FALSE = FALSO ## Restituisce il valore logico FALSO +IF = SE ## Specifica un test logico da eseguire +IFERROR = SE.ERRORE ## Restituisce un valore specificato se una formula fornisce un errore come risultato; in caso contrario, restituisce il risultato della formula +NOT = NON ## Inverte la logica degli argomenti +OR = O ## Restituisce VERO se un argomento qualsiasi è VERO +TRUE = VERO ## Restituisce il valore logico VERO + + +## +## Lookup and reference functions Funzioni di ricerca e di riferimento +## +ADDRESS = INDIRIZZO ## Restituisce un riferimento come testo in una singola cella di un foglio di lavoro +AREAS = AREE ## Restituisce il numero di aree in un riferimento +CHOOSE = SCEGLI ## Sceglie un valore da un elenco di valori +COLUMN = RIF.COLONNA ## Restituisce il numero di colonna di un riferimento +COLUMNS = COLONNE ## Restituisce il numero di colonne in un riferimento +HLOOKUP = CERCA.ORIZZ ## Effettua una ricerca nella riga superiore di una matrice e restituisce il valore della cella specificata +HYPERLINK = COLLEG.IPERTESTUALE ## Crea un collegamento che apre un documento memorizzato in un server di rete, una rete Intranet o Internet +INDEX = INDICE ## Utilizza un indice per scegliere un valore da un riferimento o da una matrice +INDIRECT = INDIRETTO ## Restituisce un riferimento specificato da un valore testo +LOOKUP = CERCA ## Ricerca i valori in un vettore o in una matrice +MATCH = CONFRONTA ## Ricerca i valori in un riferimento o in una matrice +OFFSET = SCARTO ## Restituisce uno scarto di riferimento da un riferimento dato +ROW = RIF.RIGA ## Restituisce il numero di riga di un riferimento +ROWS = RIGHE ## Restituisce il numero delle righe in un riferimento +RTD = DATITEMPOREALE ## Recupera dati in tempo reale da un programma che supporta l'automazione COM (automazione: Metodo per utilizzare gli oggetti di un'applicazione da un'altra applicazione o da un altro strumento di sviluppo. Precedentemente nota come automazione OLE, l'automazione è uno standard del settore e una caratteristica del modello COM (Component Object Model).) +TRANSPOSE = MATR.TRASPOSTA ## Restituisce la trasposizione di una matrice +VLOOKUP = CERCA.VERT ## Effettua una ricerca nella prima colonna di una matrice e si sposta attraverso la riga per restituire il valore di una cella + + +## +## Math and trigonometry functions Funzioni matematiche e trigonometriche +## +ABS = ASS ## Restituisce il valore assoluto di un numero. +ACOS = ARCCOS ## Restituisce l'arcocoseno di un numero +ACOSH = ARCCOSH ## Restituisce l'inverso del coseno iperbolico di un numero +ASIN = ARCSEN ## Restituisce l'arcoseno di un numero +ASINH = ARCSENH ## Restituisce l'inverso del seno iperbolico di un numero +ATAN = ARCTAN ## Restituisce l'arcotangente di un numero +ATAN2 = ARCTAN.2 ## Restituisce l'arcotangente delle coordinate x e y specificate +ATANH = ARCTANH ## Restituisce l'inverso della tangente iperbolica di un numero +CEILING = ARROTONDA.ECCESSO ## Arrotonda un numero per eccesso all'intero più vicino o al multiplo più vicino a peso +COMBIN = COMBINAZIONE ## Restituisce il numero di combinazioni possibili per un numero assegnato di elementi +COS = COS ## Restituisce il coseno dell'angolo specificato +COSH = COSH ## Restituisce il coseno iperbolico di un numero +DEGREES = GRADI ## Converte i radianti in gradi +EVEN = PARI ## Arrotonda il valore assoluto di un numero per eccesso al più vicino intero pari +EXP = ESP ## Restituisce il numero e elevato alla potenza di num +FACT = FATTORIALE ## Restituisce il fattoriale di un numero +FACTDOUBLE = FATT.DOPPIO ## Restituisce il fattoriale doppio di un numero +FLOOR = ARROTONDA.DIFETTO ## Arrotonda un numero per difetto al multiplo più vicino a zero +GCD = MCD ## Restituisce il massimo comune divisore +INT = INT ## Arrotonda un numero per difetto al numero intero più vicino +LCM = MCM ## Restituisce il minimo comune multiplo +LN = LN ## Restituisce il logaritmo naturale di un numero +LOG = LOG ## Restituisce il logaritmo di un numero in una specificata base +LOG10 = LOG10 ## Restituisce il logaritmo in base 10 di un numero +MDETERM = MATR.DETERM ## Restituisce il determinante di una matrice +MINVERSE = MATR.INVERSA ## Restituisce l'inverso di una matrice +MMULT = MATR.PRODOTTO ## Restituisce il prodotto di due matrici +MOD = RESTO ## Restituisce il resto della divisione +MROUND = ARROTONDA.MULTIPLO ## Restituisce un numero arrotondato al multiplo desiderato +MULTINOMIAL = MULTINOMIALE ## Restituisce il multinomiale di un insieme di numeri +ODD = DISPARI ## Arrotonda un numero per eccesso al più vicino intero dispari +PI = PI.GRECO ## Restituisce il valore di pi greco +POWER = POTENZA ## Restituisce il risultato di un numero elevato a potenza +PRODUCT = PRODOTTO ## Moltiplica i suoi argomenti +QUOTIENT = QUOZIENTE ## Restituisce la parte intera di una divisione +RADIANS = RADIANTI ## Converte i gradi in radianti +RAND = CASUALE ## Restituisce un numero casuale compreso tra 0 e 1 +RANDBETWEEN = CASUALE.TRA ## Restituisce un numero casuale compreso tra i numeri specificati +ROMAN = ROMANO ## Restituisce il numero come numero romano sotto forma di testo +ROUND = ARROTONDA ## Arrotonda il numero al numero di cifre specificato +ROUNDDOWN = ARROTONDA.PER.DIF ## Arrotonda il valore assoluto di un numero per difetto +ROUNDUP = ARROTONDA.PER.ECC ## Arrotonda il valore assoluto di un numero per eccesso +SERIESSUM = SOMMA.SERIE ## Restituisce la somma di una serie di potenze in base alla formula +SIGN = SEGNO ## Restituisce il segno di un numero +SIN = SEN ## Restituisce il seno di un dato angolo +SINH = SENH ## Restituisce il seno iperbolico di un numero +SQRT = RADQ ## Restituisce una radice quadrata +SQRTPI = RADQ.PI.GRECO ## Restituisce la radice quadrata di un numero (numero * pi greco) +SUBTOTAL = SUBTOTALE ## Restituisce un subtotale in un elenco o in un database +SUM = SOMMA ## Somma i suoi argomenti +SUMIF = SOMMA.SE ## Somma le celle specificate da un dato criterio +SUMIFS = SOMMA.PIÙ.SE ## Somma le celle in un intervallo che soddisfano più criteri +SUMPRODUCT = MATR.SOMMA.PRODOTTO ## Restituisce la somma dei prodotti dei componenti corrispondenti della matrice +SUMSQ = SOMMA.Q ## Restituisce la somma dei quadrati degli argomenti +SUMX2MY2 = SOMMA.DIFF.Q ## Restituisce la somma della differenza dei quadrati dei corrispondenti elementi in due matrici +SUMX2PY2 = SOMMA.SOMMA.Q ## Restituisce la somma della somma dei quadrati dei corrispondenti elementi in due matrici +SUMXMY2 = SOMMA.Q.DIFF ## Restituisce la somma dei quadrati delle differenze dei corrispondenti elementi in due matrici +TAN = TAN ## Restituisce la tangente di un numero +TANH = TANH ## Restituisce la tangente iperbolica di un numero +TRUNC = TRONCA ## Tronca la parte decimale di un numero + + +## +## Statistical functions Funzioni statistiche +## +AVEDEV = MEDIA.DEV ## Restituisce la media delle deviazioni assolute delle coordinate rispetto alla loro media +AVERAGE = MEDIA ## Restituisce la media degli argomenti +AVERAGEA = MEDIA.VALORI ## Restituisce la media degli argomenti, inclusi i numeri, il testo e i valori logici +AVERAGEIF = MEDIA.SE ## Restituisce la media aritmetica di tutte le celle in un intervallo che soddisfano un determinato criterio +AVERAGEIFS = MEDIA.PIÙ.SE ## Restituisce la media aritmetica di tutte le celle che soddisfano più criteri +BETADIST = DISTRIB.BETA ## Restituisce la funzione di distribuzione cumulativa beta +BETAINV = INV.BETA ## Restituisce l'inverso della funzione di distribuzione cumulativa per una distribuzione beta specificata +BINOMDIST = DISTRIB.BINOM ## Restituisce la distribuzione binomiale per il termine individuale +CHIDIST = DISTRIB.CHI ## Restituisce la probabilità a una coda per la distribuzione del chi quadrato +CHIINV = INV.CHI ## Restituisce l'inverso della probabilità ad una coda per la distribuzione del chi quadrato +CHITEST = TEST.CHI ## Restituisce il test per l'indipendenza +CONFIDENCE = CONFIDENZA ## Restituisce l'intervallo di confidenza per una popolazione +CORREL = CORRELAZIONE ## Restituisce il coefficiente di correlazione tra due insiemi di dati +COUNT = CONTA.NUMERI ## Conta la quantità di numeri nell'elenco di argomenti +COUNTA = CONTA.VALORI ## Conta il numero di valori nell'elenco di argomenti +COUNTBLANK = CONTA.VUOTE ## Conta il numero di celle vuote all'interno di un intervallo +COUNTIF = CONTA.SE ## Conta il numero di celle all'interno di un intervallo che soddisfa i criteri specificati +COUNTIFS = CONTA.PIÙ.SE ## Conta il numero di celle in un intervallo che soddisfano più criteri. +COVAR = COVARIANZA ## Calcola la covarianza, la media dei prodotti delle deviazioni accoppiate +CRITBINOM = CRIT.BINOM ## Restituisce il più piccolo valore per il quale la distribuzione cumulativa binomiale risulta maggiore o uguale ad un valore di criterio +DEVSQ = DEV.Q ## Restituisce la somma dei quadrati delle deviazioni +EXPONDIST = DISTRIB.EXP ## Restituisce la distribuzione esponenziale +FDIST = DISTRIB.F ## Restituisce la distribuzione di probabilità F +FINV = INV.F ## Restituisce l'inverso della distribuzione della probabilità F +FISHER = FISHER ## Restituisce la trasformazione di Fisher +FISHERINV = INV.FISHER ## Restituisce l'inverso della trasformazione di Fisher +FORECAST = PREVISIONE ## Restituisce i valori lungo una tendenza lineare +FREQUENCY = FREQUENZA ## Restituisce la distribuzione di frequenza come matrice verticale +FTEST = TEST.F ## Restituisce il risultato di un test F +GAMMADIST = DISTRIB.GAMMA ## Restituisce la distribuzione gamma +GAMMAINV = INV.GAMMA ## Restituisce l'inverso della distribuzione cumulativa gamma +GAMMALN = LN.GAMMA ## Restituisce il logaritmo naturale della funzione gamma, G(x) +GEOMEAN = MEDIA.GEOMETRICA ## Restituisce la media geometrica +GROWTH = CRESCITA ## Restituisce i valori lungo una linea di tendenza esponenziale +HARMEAN = MEDIA.ARMONICA ## Restituisce la media armonica +HYPGEOMDIST = DISTRIB.IPERGEOM ## Restituisce la distribuzione ipergeometrica +INTERCEPT = INTERCETTA ## Restituisce l'intercetta della retta di regressione lineare +KURT = CURTOSI ## Restituisce la curtosi di un insieme di dati +LARGE = GRANDE ## Restituisce il k-esimo valore più grande in un insieme di dati +LINEST = REGR.LIN ## Restituisce i parametri di una tendenza lineare +LOGEST = REGR.LOG ## Restituisce i parametri di una linea di tendenza esponenziale +LOGINV = INV.LOGNORM ## Restituisce l'inverso di una distribuzione lognormale +LOGNORMDIST = DISTRIB.LOGNORM ## Restituisce la distribuzione lognormale cumulativa +MAX = MAX ## Restituisce il valore massimo in un elenco di argomenti +MAXA = MAX.VALORI ## Restituisce il valore massimo in un elenco di argomenti, inclusi i numeri, il testo e i valori logici +MEDIAN = MEDIANA ## Restituisce la mediana dei numeri specificati +MIN = MIN ## Restituisce il valore minimo in un elenco di argomenti +MINA = MIN.VALORI ## Restituisce il più piccolo valore in un elenco di argomenti, inclusi i numeri, il testo e i valori logici +MODE = MODA ## Restituisce il valore più comune in un insieme di dati +NEGBINOMDIST = DISTRIB.BINOM.NEG ## Restituisce la distribuzione binomiale negativa +NORMDIST = DISTRIB.NORM ## Restituisce la distribuzione cumulativa normale +NORMINV = INV.NORM ## Restituisce l'inverso della distribuzione cumulativa normale standard +NORMSDIST = DISTRIB.NORM.ST ## Restituisce la distribuzione cumulativa normale standard +NORMSINV = INV.NORM.ST ## Restituisce l'inverso della distribuzione cumulativa normale +PEARSON = PEARSON ## Restituisce il coefficiente del momento di correlazione di Pearson +PERCENTILE = PERCENTILE ## Restituisce il k-esimo dato percentile di valori in un intervallo +PERCENTRANK = PERCENT.RANGO ## Restituisce il rango di un valore in un insieme di dati come percentuale +PERMUT = PERMUTAZIONE ## Restituisce il numero delle permutazioni per un determinato numero di oggetti +POISSON = POISSON ## Restituisce la distribuzione di Poisson +PROB = PROBABILITÀ ## Calcola la probabilità che dei valori in un intervallo siano compresi tra due limiti +QUARTILE = QUARTILE ## Restituisce il quartile di un insieme di dati +RANK = RANGO ## Restituisce il rango di un numero in un elenco di numeri +RSQ = RQ ## Restituisce la radice quadrata del coefficiente di momento di correlazione di Pearson +SKEW = ASIMMETRIA ## Restituisce il grado di asimmetria di una distribuzione +SLOPE = PENDENZA ## Restituisce la pendenza di una retta di regressione lineare +SMALL = PICCOLO ## Restituisce il k-esimo valore più piccolo in un insieme di dati +STANDARDIZE = NORMALIZZA ## Restituisce un valore normalizzato +STDEV = DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione +STDEVA = DEV.ST.VALORI ## Restituisce una stima della deviazione standard sulla base di un campione, inclusi i numeri, il testo e i valori logici +STDEVP = DEV.ST.POP ## Calcola la deviazione standard sulla base di un'intera popolazione +STDEVPA = DEV.ST.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici +STEYX = ERR.STD.YX ## Restituisce l'errore standard del valore previsto per y per ogni valore x nella regressione +TDIST = DISTRIB.T ## Restituisce la distribuzione t di Student +TINV = INV.T ## Restituisce l'inversa della distribuzione t di Student +TREND = TENDENZA ## Restituisce i valori lungo una linea di tendenza lineare +TRIMMEAN = MEDIA.TRONCATA ## Restituisce la media della parte interna di un insieme di dati +TTEST = TEST.T ## Restituisce la probabilità associata ad un test t di Student +VAR = VAR ## Stima la varianza sulla base di un campione +VARA = VAR.VALORI ## Stima la varianza sulla base di un campione, inclusi i numeri, il testo e i valori logici +VARP = VAR.POP ## Calcola la varianza sulla base dell'intera popolazione +VARPA = VAR.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici +WEIBULL = WEIBULL ## Restituisce la distribuzione di Weibull +ZTEST = TEST.Z ## Restituisce il valore di probabilità a una coda per un test z + + +## +## Text functions Funzioni di testo +## +ASC = ASC ## Modifica le lettere inglesi o il katakana a doppio byte all'interno di una stringa di caratteri in caratteri a singolo byte +BAHTTEXT = BAHTTESTO ## Converte un numero in testo, utilizzando il formato valuta ß (baht) +CHAR = CODICE.CARATT ## Restituisce il carattere specificato dal numero di codice +CLEAN = LIBERA ## Elimina dal testo tutti i caratteri che non è possibile stampare +CODE = CODICE ## Restituisce il codice numerico del primo carattere di una stringa di testo +CONCATENATE = CONCATENA ## Unisce diversi elementi di testo in un unico elemento di testo +DOLLAR = VALUTA ## Converte un numero in testo, utilizzando il formato valuta € (euro) +EXACT = IDENTICO ## Verifica se due valori di testo sono uguali +FIND = TROVA ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) +FINDB = TROVA.B ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) +FIXED = FISSO ## Formatta un numero come testo con un numero fisso di decimali +JIS = ORDINAMENTO.JIS ## Modifica le lettere inglesi o i caratteri katakana a byte singolo all'interno di una stringa di caratteri in caratteri a byte doppio. +LEFT = SINISTRA ## Restituisce il carattere più a sinistra di un valore di testo +LEFTB = SINISTRA.B ## Restituisce il carattere più a sinistra di un valore di testo +LEN = LUNGHEZZA ## Restituisce il numero di caratteri di una stringa di testo +LENB = LUNB ## Restituisce il numero di caratteri di una stringa di testo +LOWER = MINUSC ## Converte il testo in lettere minuscole +MID = MEDIA ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata +MIDB = MEDIA.B ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata +PHONETIC = FURIGANA ## Estrae i caratteri fonetici (furigana) da una stringa di testo. +PROPER = MAIUSC.INIZ ## Converte in maiuscolo la prima lettera di ogni parola di un valore di testo +REPLACE = RIMPIAZZA ## Sostituisce i caratteri all'interno di un testo +REPLACEB = SOSTITUISCI.B ## Sostituisce i caratteri all'interno di un testo +REPT = RIPETI ## Ripete un testo per un dato numero di volte +RIGHT = DESTRA ## Restituisce il carattere più a destra di un valore di testo +RIGHTB = DESTRA.B ## Restituisce il carattere più a destra di un valore di testo +SEARCH = RICERCA ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) +SEARCHB = CERCA.B ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) +SUBSTITUTE = SOSTITUISCI ## Sostituisce il nuovo testo al testo contenuto in una stringa +T = T ## Converte gli argomenti in testo +TEXT = TESTO ## Formatta un numero e lo converte in testo +TRIM = ANNULLA.SPAZI ## Elimina gli spazi dal testo +UPPER = MAIUSC ## Converte il testo in lettere maiuscole +VALUE = VALORE ## Converte un argomento di testo in numero diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/config new file mode 100755 index 0000000..8376022 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #LEEG! +DIV0 = #DEEL/0! +VALUE = #WAARDE! +REF = #VERW! +NAME = #NAAM? +NUM = #GETAL! +NA = #N/B diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/functions new file mode 100755 index 0000000..2518f42 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/nl/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Automatiseringsfuncties en functies in invoegtoepassingen +## +GETPIVOTDATA = DRAAITABEL.OPHALEN ## Geeft gegevens uit een draaitabelrapport als resultaat + + +## +## Cube functions Kubusfuncties +## +CUBEKPIMEMBER = KUBUSKPILID ## Retourneert de naam, eigenschap en waarde van een KPI (prestatie-indicator) en geeft de naam en de eigenschap in de cel weer. Een KPI is een meetbare waarde, zoals de maandelijkse brutowinst of de omzet per kwartaal per werknemer, die wordt gebruikt om de prestaties van een organisatie te bewaken +CUBEMEMBER = KUBUSLID ## Retourneert een lid of tupel in een kubushiërarchie. Wordt gebruikt om te controleren of het lid of de tupel in de kubus aanwezig is +CUBEMEMBERPROPERTY = KUBUSLIDEIGENSCHAP ## Retourneert de waarde van een lideigenschap in de kubus. Wordt gebruikt om te controleren of de lidnaam in de kubus bestaat en retourneert de opgegeven eigenschap voor dit lid +CUBERANKEDMEMBER = KUBUSGERANGCHIKTLID ## Retourneert het zoveelste, gerangschikte lid in een set. Wordt gebruikt om een of meer elementen in een set te retourneren, zoals de tien beste verkopers of de tien beste studenten +CUBESET = KUBUSSET ## Definieert een berekende set leden of tupels door een ingestelde expressie naar de kubus op de server te sturen, alwaar de set wordt gemaakt en vervolgens wordt geretourneerd naar Microsoft Office Excel +CUBESETCOUNT = KUBUSSETAANTAL ## Retourneert het aantal onderdelen in een set +CUBEVALUE = KUBUSWAARDE ## Retourneert een samengestelde waarde van een kubus + + +## +## Database functions Databasefuncties +## +DAVERAGE = DBGEMIDDELDE ## Berekent de gemiddelde waarde in geselecteerde databasegegevens +DCOUNT = DBAANTAL ## Telt de cellen met getallen in een database +DCOUNTA = DBAANTALC ## Telt de niet-lege cellen in een database +DGET = DBLEZEN ## Retourneert één record dat voldoet aan de opgegeven criteria uit een database +DMAX = DBMAX ## Retourneert de maximumwaarde in de geselecteerde databasegegevens +DMIN = DBMIN ## Retourneert de minimumwaarde in de geselecteerde databasegegevens +DPRODUCT = DBPRODUCT ## Vermenigvuldigt de waarden in een bepaald veld van de records die voldoen aan de criteria in een database +DSTDEV = DBSTDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef uit geselecteerde databasegegevens +DSTDEVP = DBSTDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie van geselecteerde databasegegevens +DSUM = DBSOM ## Telt de getallen uit een kolom records in de database op die voldoen aan de criteria +DVAR = DBVAR ## Maakt een schatting van de variantie op basis van een steekproef uit geselecteerde databasegegevens +DVARP = DBVARP ## Berekent de variantie op basis van de volledige populatie van geselecteerde databasegegevens + + +## +## Date and time functions Datum- en tijdfuncties +## +DATE = DATUM ## Geeft als resultaat het seriële getal van een opgegeven datum +DATEVALUE = DATUMWAARDE ## Converteert een datum in de vorm van tekst naar een serieel getal +DAY = DAG ## Converteert een serieel getal naar een dag van de maand +DAYS360 = DAGEN360 ## Berekent het aantal dagen tussen twee datums op basis van een jaar met 360 dagen +EDATE = ZELFDE.DAG ## Geeft als resultaat het seriële getal van een datum die het opgegeven aantal maanden voor of na de begindatum ligt +EOMONTH = LAATSTE.DAG ## Geeft als resultaat het seriële getal van de laatste dag van de maand voor of na het opgegeven aantal maanden +HOUR = UUR ## Converteert een serieel getal naar uren +MINUTE = MINUUT ## Converteert een serieel naar getal minuten +MONTH = MAAND ## Converteert een serieel getal naar een maand +NETWORKDAYS = NETTO.WERKDAGEN ## Geeft als resultaat het aantal hele werkdagen tussen twee datums +NOW = NU ## Geeft als resultaat het seriële getal van de huidige datum en tijd +SECOND = SECONDE ## Converteert een serieel getal naar seconden +TIME = TIJD ## Geeft als resultaat het seriële getal van een bepaald tijdstip +TIMEVALUE = TIJDWAARDE ## Converteert de tijd in de vorm van tekst naar een serieel getal +TODAY = VANDAAG ## Geeft als resultaat het seriële getal van de huidige datum +WEEKDAY = WEEKDAG ## Converteert een serieel getal naar een weekdag +WEEKNUM = WEEKNUMMER ## Converteert een serieel getal naar een weeknummer +WORKDAY = WERKDAG ## Geeft als resultaat het seriële getal van de datum voor of na een bepaald aantal werkdagen +YEAR = JAAR ## Converteert een serieel getal naar een jaar +YEARFRAC = JAAR.DEEL ## Geeft als resultaat het gedeelte van het jaar, uitgedrukt in het aantal hele dagen tussen begindatum en einddatum + + +## +## Engineering functions Technische functies +## +BESSELI = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie In(x) +BESSELJ = BESSEL.J ## Geeft als resultaat de Bessel-functie Jn(x) +BESSELK = BESSEL.K ## Geeft als resultaat de gewijzigde Bessel-functie Kn(x) +BESSELY = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie Yn(x) +BIN2DEC = BIN.N.DEC ## Converteert een binair getal naar een decimaal getal +BIN2HEX = BIN.N.HEX ## Converteert een binair getal naar een hexadecimaal getal +BIN2OCT = BIN.N.OCT ## Converteert een binair getal naar een octaal getal +COMPLEX = COMPLEX ## Converteert reële en imaginaire coëfficiënten naar een complex getal +CONVERT = CONVERTEREN ## Converteert een getal in de ene maateenheid naar een getal in een andere maateenheid +DEC2BIN = DEC.N.BIN ## Converteert een decimaal getal naar een binair getal +DEC2HEX = DEC.N.HEX ## Converteert een decimaal getal naar een hexadecimaal getal +DEC2OCT = DEC.N.OCT ## Converteert een decimaal getal naar een octaal getal +DELTA = DELTA ## Test of twee waarden gelijk zijn +ERF = FOUTFUNCTIE ## Geeft als resultaat de foutfunctie +ERFC = FOUT.COMPLEMENT ## Geeft als resultaat de complementaire foutfunctie +GESTEP = GROTER.DAN ## Test of een getal groter is dan de drempelwaarde +HEX2BIN = HEX.N.BIN ## Converteert een hexadecimaal getal naar een binair getal +HEX2DEC = HEX.N.DEC ## Converteert een hexadecimaal getal naar een decimaal getal +HEX2OCT = HEX.N.OCT ## Converteert een hexadecimaal getal naar een octaal getal +IMABS = C.ABS ## Geeft als resultaat de absolute waarde (modulus) van een complex getal +IMAGINARY = C.IM.DEEL ## Geeft als resultaat de imaginaire coëfficiënt van een complex getal +IMARGUMENT = C.ARGUMENT ## Geeft als resultaat het argument thèta, een hoek uitgedrukt in radialen +IMCONJUGATE = C.TOEGEVOEGD ## Geeft als resultaat het complexe toegevoegde getal van een complex getal +IMCOS = C.COS ## Geeft als resultaat de cosinus van een complex getal +IMDIV = C.QUOTIENT ## Geeft als resultaat het quotiënt van twee complexe getallen +IMEXP = C.EXP ## Geeft als resultaat de exponent van een complex getal +IMLN = C.LN ## Geeft als resultaat de natuurlijke logaritme van een complex getal +IMLOG10 = C.LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een complex getal +IMLOG2 = C.LOG2 ## Geeft als resultaat de logaritme met grondtal 2 van een complex getal +IMPOWER = C.MACHT ## Geeft als resultaat een complex getal dat is verheven tot de macht van een geheel getal +IMPRODUCT = C.PRODUCT ## Geeft als resultaat het product van complexe getallen +IMREAL = C.REEEL.DEEL ## Geeft als resultaat de reële coëfficiënt van een complex getal +IMSIN = C.SIN ## Geeft als resultaat de sinus van een complex getal +IMSQRT = C.WORTEL ## Geeft als resultaat de vierkantswortel van een complex getal +IMSUB = C.VERSCHIL ## Geeft als resultaat het verschil tussen twee complexe getallen +IMSUM = C.SOM ## Geeft als resultaat de som van complexe getallen +OCT2BIN = OCT.N.BIN ## Converteert een octaal getal naar een binair getal +OCT2DEC = OCT.N.DEC ## Converteert een octaal getal naar een decimaal getal +OCT2HEX = OCT.N.HEX ## Converteert een octaal getal naar een hexadecimaal getal + + +## +## Financial functions Financiële functies +## +ACCRINT = SAMENG.RENTE ## Berekent de opgelopen rente voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +ACCRINTM = SAMENG.RENTE.V ## Berekent de opgelopen rente voor een waardepapier waarvan de rente op de vervaldatum wordt uitgekeerd +AMORDEGRC = AMORDEGRC ## Geeft als resultaat de afschrijving voor elke boekingsperiode door een afschrijvingscoëfficiënt toe te passen +AMORLINC = AMORLINC ## Berekent de afschrijving voor elke boekingsperiode +COUPDAYBS = COUP.DAGEN.BB ## Berekent het aantal dagen vanaf het begin van de coupontermijn tot de stortingsdatum +COUPDAYS = COUP.DAGEN ## Geeft als resultaat het aantal dagen in de coupontermijn waarin de stortingsdatum valt +COUPDAYSNC = COUP.DAGEN.VV ## Geeft als resultaat het aantal dagen vanaf de stortingsdatum tot de volgende couponvervaldatum +COUPNCD = COUP.DATUM.NB ## Geeft als resultaat de volgende coupondatum na de stortingsdatum +COUPNUM = COUP.AANTAL ## Geeft als resultaat het aantal coupons dat nog moet worden uitbetaald tussen de stortingsdatum en de vervaldatum +COUPPCD = COUP.DATUM.VB ## Geeft als resultaat de vorige couponvervaldatum vóór de stortingsdatum +CUMIPMT = CUM.RENTE ## Geeft als resultaat de cumulatieve rente die tussen twee termijnen is uitgekeerd +CUMPRINC = CUM.HOOFDSOM ## Geeft als resultaat de cumulatieve hoofdsom van een lening die tussen twee termijnen is terugbetaald +DB = DB ## Geeft als resultaat de afschrijving van activa voor een bepaalde periode met behulp van de 'fixed declining balance'-methode +DDB = DDB ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'double declining balance'-methode of een andere methode die u opgeeft +DISC = DISCONTO ## Geeft als resultaat het discontopercentage voor een waardepapier +DOLLARDE = EURO.DE ## Converteert een prijs in euro's, uitgedrukt in een breuk, naar een prijs in euro's, uitgedrukt in een decimaal getal +DOLLARFR = EURO.BR ## Converteert een prijs in euro's, uitgedrukt in een decimaal getal, naar een prijs in euro's, uitgedrukt in een breuk +DURATION = DUUR ## Geeft als resultaat de gewogen gemiddelde looptijd voor een waardepapier met periodieke rentebetalingen +EFFECT = EFFECT.RENTE ## Geeft als resultaat het effectieve jaarlijkse rentepercentage +FV = TW ## Geeft als resultaat de toekomstige waarde van een investering +FVSCHEDULE = TOEK.WAARDE2 ## Geeft als resultaat de toekomstige waarde van een bepaalde hoofdsom na het toepassen van een reeks samengestelde rentepercentages +INTRATE = RENTEPERCENTAGE ## Geeft als resultaat het rentepercentage voor een volgestort waardepapier +IPMT = IBET ## Geeft als resultaat de te betalen rente voor een investering over een bepaalde termijn +IRR = IR ## Geeft als resultaat de interne rentabiliteit voor een reeks cashflows +ISPMT = ISBET ## Geeft als resultaat de rente die is betaald tijdens een bepaalde termijn van een investering +MDURATION = AANG.DUUR ## Geeft als resultaat de aangepaste Macauley-looptijd voor een waardepapier, aangenomen dat de nominale waarde € 100 bedraagt +MIRR = GIR ## Geeft als resultaat de interne rentabiliteit voor een serie cashflows, waarbij voor betalingen een ander rentepercentage geldt dan voor inkomsten +NOMINAL = NOMINALE.RENTE ## Geeft als resultaat het nominale jaarlijkse rentepercentage +NPER = NPER ## Geeft als resultaat het aantal termijnen van een investering +NPV = NHW ## Geeft als resultaat de netto huidige waarde van een investering op basis van een reeks periodieke cashflows en een discontopercentage +ODDFPRICE = AFW.ET.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende eerste termijn +ODDFYIELD = AFW.ET.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende eerste termijn +ODDLPRICE = AFW.LT.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende laatste termijn +ODDLYIELD = AFW.LT.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende laatste termijn +PMT = BET ## Geeft als resultaat de periodieke betaling voor een annuïteit +PPMT = PBET ## Geeft als resultaat de afbetaling op de hoofdsom voor een bepaalde termijn +PRICE = PRIJS.NOM ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +PRICEDISC = PRIJS.DISCONTO ## Geeft als resultaat de prijs per € 100 nominale waarde voor een verdisconteerd waardepapier +PRICEMAT = PRIJS.VERVALDAG ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum +PV = HW ## Geeft als resultaat de huidige waarde van een investering +RATE = RENTE ## Geeft als resultaat het periodieke rentepercentage voor een annuïteit +RECEIVED = OPBRENGST ## Geeft als resultaat het bedrag dat op de vervaldatum wordt uitgekeerd voor een volgestort waardepapier +SLN = LIN.AFSCHR ## Geeft als resultaat de lineaire afschrijving van activa over één termijn +SYD = SYD ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'Sum-Of-Years-Digits'-methode +TBILLEQ = SCHATK.OBL ## Geeft als resultaat het rendement op schatkistpapier, dat op dezelfde manier wordt berekend als het rendement op obligaties +TBILLPRICE = SCHATK.PRIJS ## Bepaalt de prijs per € 100 nominale waarde voor schatkistpapier +TBILLYIELD = SCHATK.REND ## Berekent het rendement voor schatkistpapier +VDB = VDB ## Geeft als resultaat de afschrijving van activa over een gehele of gedeeltelijke termijn met behulp van de 'declining balance'-methode +XIRR = IR.SCHEMA ## Berekent de interne rentabiliteit voor een betalingsschema van cashflows +XNPV = NHW2 ## Berekent de huidige nettowaarde voor een betalingsschema van cashflows +YIELD = RENDEMENT ## Geeft als resultaat het rendement voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +YIELDDISC = REND.DISCONTO ## Geeft als resultaat het jaarlijkse rendement voor een verdisconteerd waardepapier, bijvoorbeeld schatkistpapier +YIELDMAT = REND.VERVAL ## Geeft als resultaat het jaarlijkse rendement voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum + + +## +## Information functions Informatiefuncties +## +CELL = CEL ## Geeft als resultaat informatie over de opmaak, locatie of inhoud van een cel +ERROR.TYPE = TYPE.FOUT ## Geeft als resultaat een getal dat overeenkomt met een van de foutwaarden van Microsoft Excel +INFO = INFO ## Geeft als resultaat informatie over de huidige besturingsomgeving +ISBLANK = ISLEEG ## Geeft als resultaat WAAR als de waarde leeg is +ISERR = ISFOUT2 ## Geeft als resultaat WAAR als de waarde een foutwaarde is, met uitzondering van #N/B +ISERROR = ISFOUT ## Geeft als resultaat WAAR als de waarde een foutwaarde is +ISEVEN = IS.EVEN ## Geeft als resultaat WAAR als het getal even is +ISLOGICAL = ISLOGISCH ## Geeft als resultaat WAAR als de waarde een logische waarde is +ISNA = ISNB ## Geeft als resultaat WAAR als de waarde de foutwaarde #N/B is +ISNONTEXT = ISGEENTEKST ## Geeft als resultaat WAAR als de waarde geen tekst is +ISNUMBER = ISGETAL ## Geeft als resultaat WAAR als de waarde een getal is +ISODD = IS.ONEVEN ## Geeft als resultaat WAAR als het getal oneven is +ISREF = ISVERWIJZING ## Geeft als resultaat WAAR als de waarde een verwijzing is +ISTEXT = ISTEKST ## Geeft als resultaat WAAR als de waarde tekst is +N = N ## Geeft als resultaat een waarde die is geconverteerd naar een getal +NA = NB ## Geeft als resultaat de foutwaarde #N/B +TYPE = TYPE ## Geeft als resultaat een getal dat het gegevenstype van een waarde aangeeft + + +## +## Logical functions Logische functies +## +AND = EN ## Geeft als resultaat WAAR als alle argumenten WAAR zijn +FALSE = ONWAAR ## Geeft als resultaat de logische waarde ONWAAR +IF = ALS ## Geeft een logische test aan +IFERROR = ALS.FOUT ## Retourneert een waarde die u opgeeft als een formule een fout oplevert, anders wordt het resultaat van de formule geretourneerd +NOT = NIET ## Keert de logische waarde van het argument om +OR = OF ## Geeft als resultaat WAAR als minimaal een van de argumenten WAAR is +TRUE = WAAR ## Geeft als resultaat de logische waarde WAAR + + +## +## Lookup and reference functions Zoek- en verwijzingsfuncties +## +ADDRESS = ADRES ## Geeft als resultaat een verwijzing, in de vorm van tekst, naar één bepaalde cel in een werkblad +AREAS = BEREIKEN ## Geeft als resultaat het aantal bereiken in een verwijzing +CHOOSE = KIEZEN ## Kiest een waarde uit een lijst met waarden +COLUMN = KOLOM ## Geeft als resultaat het kolomnummer van een verwijzing +COLUMNS = KOLOMMEN ## Geeft als resultaat het aantal kolommen in een verwijzing +HLOOKUP = HORIZ.ZOEKEN ## Zoekt in de bovenste rij van een matrix naar een bepaalde waarde en geeft als resultaat de gevonden waarde in de opgegeven cel +HYPERLINK = HYPERLINK ## Maakt een snelkoppeling of een sprong waarmee een document wordt geopend dat is opgeslagen op een netwerkserver, een intranet of op internet +INDEX = INDEX ## Kiest met een index een waarde uit een verwijzing of een matrix +INDIRECT = INDIRECT ## Geeft als resultaat een verwijzing die wordt aangegeven met een tekstwaarde +LOOKUP = ZOEKEN ## Zoekt naar bepaalde waarden in een vector of een matrix +MATCH = VERGELIJKEN ## Zoekt naar bepaalde waarden in een verwijzing of een matrix +OFFSET = VERSCHUIVING ## Geeft als resultaat een nieuwe verwijzing die is verschoven ten opzichte van een bepaalde verwijzing +ROW = RIJ ## Geeft als resultaat het rijnummer van een verwijzing +ROWS = RIJEN ## Geeft als resultaat het aantal rijen in een verwijzing +RTD = RTG ## Haalt realtimegegevens op uit een programma dat COM-automatisering (automatisering: een methode waarmee de ene toepassing objecten van een andere toepassing of ontwikkelprogramma kan besturen. Automatisering werd vroeger OLE-automatisering genoemd. Automatisering is een industrienorm die deel uitmaakt van het Component Object Model (COM).) ondersteunt +TRANSPOSE = TRANSPONEREN ## Geeft als resultaat de getransponeerde van een matrix +VLOOKUP = VERT.ZOEKEN ## Zoekt in de meest linkse kolom van een matrix naar een bepaalde waarde en geeft als resultaat de waarde in de opgegeven cel + + +## +## Math and trigonometry functions Wiskundige en trigonometrische functies +## +ABS = ABS ## Geeft als resultaat de absolute waarde van een getal +ACOS = BOOGCOS ## Geeft als resultaat de boogcosinus van een getal +ACOSH = BOOGCOSH ## Geeft als resultaat de inverse cosinus hyperbolicus van een getal +ASIN = BOOGSIN ## Geeft als resultaat de boogsinus van een getal +ASINH = BOOGSINH ## Geeft als resultaat de inverse sinus hyperbolicus van een getal +ATAN = BOOGTAN ## Geeft als resultaat de boogtangens van een getal +ATAN2 = BOOGTAN2 ## Geeft als resultaat de boogtangens van de x- en y-coördinaten +ATANH = BOOGTANH ## Geeft als resultaat de inverse tangens hyperbolicus van een getal +CEILING = AFRONDEN.BOVEN ## Rondt de absolute waarde van een getal naar boven af op het dichtstbijzijnde gehele getal of het dichtstbijzijnde significante veelvoud +COMBIN = COMBINATIES ## Geeft als resultaat het aantal combinaties voor een bepaald aantal objecten +COS = COS ## Geeft als resultaat de cosinus van een getal +COSH = COSH ## Geeft als resultaat de cosinus hyperbolicus van een getal +DEGREES = GRADEN ## Converteert radialen naar graden +EVEN = EVEN ## Rondt het getal af op het dichtstbijzijnde gehele even getal +EXP = EXP ## Verheft e tot de macht van een bepaald getal +FACT = FACULTEIT ## Geeft als resultaat de faculteit van een getal +FACTDOUBLE = DUBBELE.FACULTEIT ## Geeft als resultaat de dubbele faculteit van een getal +FLOOR = AFRONDEN.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af +GCD = GGD ## Geeft als resultaat de grootste gemene deler +INT = INTEGER ## Rondt een getal naar beneden af op het dichtstbijzijnde gehele getal +LCM = KGV ## Geeft als resultaat het kleinste gemene veelvoud +LN = LN ## Geeft als resultaat de natuurlijke logaritme van een getal +LOG = LOG ## Geeft als resultaat de logaritme met het opgegeven grondtal van een getal +LOG10 = LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een getal +MDETERM = DETERMINANTMAT ## Geeft als resultaat de determinant van een matrix +MINVERSE = INVERSEMAT ## Geeft als resultaat de inverse van een matrix +MMULT = PRODUCTMAT ## Geeft als resultaat het product van twee matrices +MOD = REST ## Geeft als resultaat het restgetal van een deling +MROUND = AFRONDEN.N.VEELVOUD ## Geeft als resultaat een getal afgerond op het gewenste veelvoud +MULTINOMIAL = MULTINOMIAAL ## Geeft als resultaat de multinomiaalcoëfficiënt van een reeks getallen +ODD = ONEVEN ## Rondt de absolute waarde van het getal naar boven af op het dichtstbijzijnde gehele oneven getal +PI = PI ## Geeft als resultaat de waarde van pi +POWER = MACHT ## Verheft een getal tot een macht +PRODUCT = PRODUCT ## Vermenigvuldigt de argumenten met elkaar +QUOTIENT = QUOTIENT ## Geeft als resultaat de uitkomst van een deling als geheel getal +RADIANS = RADIALEN ## Converteert graden naar radialen +RAND = ASELECT ## Geeft als resultaat een willekeurig getal tussen 0 en 1 +RANDBETWEEN = ASELECTTUSSEN ## Geeft een willekeurig getal tussen de getallen die u hebt opgegeven +ROMAN = ROMEINS ## Converteert een Arabisch getal naar een Romeins getal en geeft het resultaat weer in de vorm van tekst +ROUND = AFRONDEN ## Rondt een getal af op het opgegeven aantal decimalen +ROUNDDOWN = AFRONDEN.NAAR.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af +ROUNDUP = AFRONDEN.NAAR.BOVEN ## Rondt de absolute waarde van een getal naar boven af +SERIESSUM = SOM.MACHTREEKS ## Geeft als resultaat de som van een machtreeks die is gebaseerd op de formule +SIGN = POS.NEG ## Geeft als resultaat het teken van een getal +SIN = SIN ## Geeft als resultaat de sinus van de opgegeven hoek +SINH = SINH ## Geeft als resultaat de sinus hyperbolicus van een getal +SQRT = WORTEL ## Geeft als resultaat de positieve vierkantswortel van een getal +SQRTPI = WORTEL.PI ## Geeft als resultaat de vierkantswortel van (getal * pi) +SUBTOTAL = SUBTOTAAL ## Geeft als resultaat een subtotaal voor een bereik +SUM = SOM ## Telt de argumenten op +SUMIF = SOM.ALS ## Telt de getallen bij elkaar op die voldoen aan een bepaald criterium +SUMIFS = SOMMEN.ALS ## Telt de cellen in een bereik op die aan meerdere criteria voldoen +SUMPRODUCT = SOMPRODUCT ## Geeft als resultaat de som van de producten van de corresponderende matrixelementen +SUMSQ = KWADRATENSOM ## Geeft als resultaat de som van de kwadraten van de argumenten +SUMX2MY2 = SOM.X2MINY2 ## Geeft als resultaat de som van het verschil tussen de kwadraten van corresponderende waarden in twee matrices +SUMX2PY2 = SOM.X2PLUSY2 ## Geeft als resultaat de som van de kwadratensom van corresponderende waarden in twee matrices +SUMXMY2 = SOM.XMINY.2 ## Geeft als resultaat de som van de kwadraten van de verschillen tussen de corresponderende waarden in twee matrices +TAN = TAN ## Geeft als resultaat de tangens van een getal +TANH = TANH ## Geeft als resultaat de tangens hyperbolicus van een getal +TRUNC = GEHEEL ## Kapt een getal af tot een geheel getal + + +## +## Statistical functions Statistische functies +## +AVEDEV = GEM.DEVIATIE ## Geeft als resultaat het gemiddelde van de absolute deviaties van gegevenspunten ten opzichte van hun gemiddelde waarde +AVERAGE = GEMIDDELDE ## Geeft als resultaat het gemiddelde van de argumenten +AVERAGEA = GEMIDDELDEA ## Geeft als resultaat het gemiddelde van de argumenten, inclusief getallen, tekst en logische waarden +AVERAGEIF = GEMIDDELDE.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen in een bereik die voldoen aan de opgegeven criteria +AVERAGEIFS = GEMIDDELDEN.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen die aan meerdere criteria voldoen +BETADIST = BETA.VERD ## Geeft als resultaat de cumulatieve bèta-verdelingsfunctie +BETAINV = BETA.INV ## Geeft als resultaat de inverse van de cumulatieve verdelingsfunctie voor een gegeven bèta-verdeling +BINOMDIST = BINOMIALE.VERD ## Geeft als resultaat de binomiale verdeling +CHIDIST = CHI.KWADRAAT ## Geeft als resultaat de eenzijdige kans van de chi-kwadraatverdeling +CHIINV = CHI.KWADRAAT.INV ## Geeft als resultaat de inverse van een eenzijdige kans van de chi-kwadraatverdeling +CHITEST = CHI.TOETS ## Geeft als resultaat de onafhankelijkheidstoets +CONFIDENCE = BETROUWBAARHEID ## Geeft als resultaat het betrouwbaarheidsinterval van een gemiddelde waarde voor de elementen van een populatie +CORREL = CORRELATIE ## Geeft als resultaat de correlatiecoëfficiënt van twee gegevensverzamelingen +COUNT = AANTAL ## Telt het aantal getallen in de argumentenlijst +COUNTA = AANTALARG ## Telt het aantal waarden in de argumentenlijst +COUNTBLANK = AANTAL.LEGE.CELLEN ## Telt het aantal lege cellen in een bereik +COUNTIF = AANTAL.ALS ## Telt in een bereik het aantal cellen die voldoen aan een bepaald criterium +COUNTIFS = AANTALLEN.ALS ## Telt in een bereik het aantal cellen die voldoen aan meerdere criteria +COVAR = COVARIANTIE ## Geeft als resultaat de covariantie, het gemiddelde van de producten van de gepaarde deviaties +CRITBINOM = CRIT.BINOM ## Geeft als resultaat de kleinste waarde waarvoor de binomiale verdeling kleiner is dan of gelijk is aan het criterium +DEVSQ = DEV.KWAD ## Geeft als resultaat de som van de deviaties in het kwadraat +EXPONDIST = EXPON.VERD ## Geeft als resultaat de exponentiële verdeling +FDIST = F.VERDELING ## Geeft als resultaat de F-verdeling +FINV = F.INVERSE ## Geeft als resultaat de inverse van de F-verdeling +FISHER = FISHER ## Geeft als resultaat de Fisher-transformatie +FISHERINV = FISHER.INV ## Geeft als resultaat de inverse van de Fisher-transformatie +FORECAST = VOORSPELLEN ## Geeft als resultaat een waarde op basis van een lineaire trend +FREQUENCY = FREQUENTIE ## Geeft als resultaat een frequentieverdeling in de vorm van een verticale matrix +FTEST = F.TOETS ## Geeft als resultaat een F-toets +GAMMADIST = GAMMA.VERD ## Geeft als resultaat de gamma-verdeling +GAMMAINV = GAMMA.INV ## Geeft als resultaat de inverse van de cumulatieve gamma-verdeling +GAMMALN = GAMMA.LN ## Geeft als resultaat de natuurlijke logaritme van de gamma-functie, G(x) +GEOMEAN = MEETK.GEM ## Geeft als resultaat het meetkundige gemiddelde +GROWTH = GROEI ## Geeft als resultaat de waarden voor een exponentiële trend +HARMEAN = HARM.GEM ## Geeft als resultaat het harmonische gemiddelde +HYPGEOMDIST = HYPERGEO.VERD ## Geeft als resultaat de hypergeometrische verdeling +INTERCEPT = SNIJPUNT ## Geeft als resultaat het snijpunt van de lineaire regressielijn met de y-as +KURT = KURTOSIS ## Geeft als resultaat de kurtosis van een gegevensverzameling +LARGE = GROOTSTE ## Geeft als resultaat de op k-1 na grootste waarde in een gegevensverzameling +LINEST = LIJNSCH ## Geeft als resultaat de parameters van een lineaire trend +LOGEST = LOGSCH ## Geeft als resultaat de parameters van een exponentiële trend +LOGINV = LOG.NORM.INV ## Geeft als resultaat de inverse van de logaritmische normale verdeling +LOGNORMDIST = LOG.NORM.VERD ## Geeft als resultaat de cumulatieve logaritmische normale verdeling +MAX = MAX ## Geeft als resultaat de maximumwaarde in een lijst met argumenten +MAXA = MAXA ## Geeft als resultaat de maximumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden +MEDIAN = MEDIAAN ## Geeft als resultaat de mediaan van de opgegeven getallen +MIN = MIN ## Geeft als resultaat de minimumwaarde in een lijst met argumenten +MINA = MINA ## Geeft als resultaat de minimumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden +MODE = MODUS ## Geeft als resultaat de meest voorkomende waarde in een gegevensverzameling +NEGBINOMDIST = NEG.BINOM.VERD ## Geeft als resultaat de negatieve binomiaalverdeling +NORMDIST = NORM.VERD ## Geeft als resultaat de cumulatieve normale verdeling +NORMINV = NORM.INV ## Geeft als resultaat de inverse van de cumulatieve standaardnormale verdeling +NORMSDIST = STAND.NORM.VERD ## Geeft als resultaat de cumulatieve standaardnormale verdeling +NORMSINV = STAND.NORM.INV ## Geeft als resultaat de inverse van de cumulatieve normale verdeling +PEARSON = PEARSON ## Geeft als resultaat de correlatiecoëfficiënt van Pearson +PERCENTILE = PERCENTIEL ## Geeft als resultaat het k-de percentiel van waarden in een bereik +PERCENTRANK = PERCENT.RANG ## Geeft als resultaat de positie, in procenten uitgedrukt, van een waarde in de rangorde van een gegevensverzameling +PERMUT = PERMUTATIES ## Geeft als resultaat het aantal permutaties voor een gegeven aantal objecten +POISSON = POISSON ## Geeft als resultaat de Poisson-verdeling +PROB = KANS ## Geeft als resultaat de kans dat waarden zich tussen twee grenzen bevinden +QUARTILE = KWARTIEL ## Geeft als resultaat het kwartiel van een gegevensverzameling +RANK = RANG ## Geeft als resultaat het rangnummer van een getal in een lijst getallen +RSQ = R.KWADRAAT ## Geeft als resultaat het kwadraat van de Pearson-correlatiecoëfficiënt +SKEW = SCHEEFHEID ## Geeft als resultaat de mate van asymmetrie van een verdeling +SLOPE = RICHTING ## Geeft als resultaat de richtingscoëfficiënt van een lineaire regressielijn +SMALL = KLEINSTE ## Geeft als resultaat de op k-1 na kleinste waarde in een gegevensverzameling +STANDARDIZE = NORMALISEREN ## Geeft als resultaat een genormaliseerde waarde +STDEV = STDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef +STDEVA = STDEVA ## Maakt een schatting van de standaarddeviatie op basis van een steekproef, inclusief getallen, tekst en logische waarden +STDEVP = STDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie +STDEVPA = STDEVPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden +STEYX = STAND.FOUT.YX ## Geeft als resultaat de standaardfout in de voorspelde y-waarde voor elke x in een regressie +TDIST = T.VERD ## Geeft als resultaat de Student T-verdeling +TINV = T.INV ## Geeft als resultaat de inverse van de Student T-verdeling +TREND = TREND ## Geeft als resultaat de waarden voor een lineaire trend +TRIMMEAN = GETRIMD.GEM ## Geeft als resultaat het gemiddelde van waarden in een gegevensverzameling +TTEST = T.TOETS ## Geeft als resultaat de kans met behulp van de Student T-toets +VAR = VAR ## Maakt een schatting van de variantie op basis van een steekproef +VARA = VARA ## Maakt een schatting van de variantie op basis van een steekproef, inclusief getallen, tekst en logische waarden +VARP = VARP ## Berekent de variantie op basis van de volledige populatie +VARPA = VARPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden +WEIBULL = WEIBULL ## Geeft als resultaat de Weibull-verdeling +ZTEST = Z.TOETS ## Geeft als resultaat de eenzijdige kanswaarde van een Z-toets + + +## +## Text functions Tekstfuncties +## +ASC = ASC ## Wijzigt Nederlandse letters of katakanatekens over de volle breedte (dubbel-bytetekens) binnen een tekenreeks in tekens over de halve breedte (enkel-bytetekens) +BAHTTEXT = BAHT.TEKST ## Converteert een getal naar tekst met de valutanotatie ß (baht) +CHAR = TEKEN ## Geeft als resultaat het teken dat hoort bij de opgegeven code +CLEAN = WISSEN.CONTROL ## Verwijdert alle niet-afdrukbare tekens uit een tekst +CODE = CODE ## Geeft als resultaat de numerieke code voor het eerste teken in een tekenreeks +CONCATENATE = TEKST.SAMENVOEGEN ## Voegt verschillende tekstfragmenten samen tot één tekstfragment +DOLLAR = EURO ## Converteert een getal naar tekst met de valutanotatie € (euro) +EXACT = GELIJK ## Controleert of twee tekenreeksen identiek zijn +FIND = VIND.ALLES ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +FINDB = VIND.ALLES.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +FIXED = VAST ## Maakt een getal als tekst met een vast aantal decimalen op +JIS = JIS ## Wijzigt Nederlandse letters of katakanatekens over de halve breedte (enkel-bytetekens) binnen een tekenreeks in tekens over de volle breedte (dubbel-bytetekens) +LEFT = LINKS ## Geeft als resultaat de meest linkse tekens in een tekenreeks +LEFTB = LINKSB ## Geeft als resultaat de meest linkse tekens in een tekenreeks +LEN = LENGTE ## Geeft als resultaat het aantal tekens in een tekenreeks +LENB = LENGTEB ## Geeft als resultaat het aantal tekens in een tekenreeks +LOWER = KLEINE.LETTERS ## Zet tekst om in kleine letters +MID = MIDDEN ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft +MIDB = DEELB ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft +PHONETIC = FONETISCH ## Haalt de fonetische tekens (furigana) uit een tekenreeks op +PROPER = BEGINLETTERS ## Zet de eerste letter van elk woord in een tekst om in een hoofdletter +REPLACE = VERVANG ## Vervangt tekens binnen een tekst +REPLACEB = VERVANGENB ## Vervangt tekens binnen een tekst +REPT = HERHALING ## Herhaalt een tekst een aantal malen +RIGHT = RECHTS ## Geeft als resultaat de meest rechtse tekens in een tekenreeks +RIGHTB = RECHTSB ## Geeft als resultaat de meest rechtse tekens in een tekenreeks +SEARCH = VIND.SPEC ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +SEARCHB = VIND.SPEC.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +SUBSTITUTE = SUBSTITUEREN ## Vervangt oude tekst door nieuwe tekst in een tekenreeks +T = T ## Converteert de argumenten naar tekst +TEXT = TEKST ## Maakt een getal op en converteert het getal naar tekst +TRIM = SPATIES.WISSEN ## Verwijdert de spaties uit een tekst +UPPER = HOOFDLETTERS ## Zet tekst om in hoofdletters +VALUE = WAARDE ## Converteert tekst naar een getal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/config new file mode 100755 index 0000000..c7f4152 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #VERDI! +REF = #REF! +NAME = #NAVN? +NUM = #NUM! +NA = #I/T diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/functions new file mode 100755 index 0000000..ab2a379 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/no/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funksjonene Tillegg og Automatisering +## +GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data som er lagret i en pivottabellrapport + + +## +## Cube functions Kubefunksjoner +## +CUBEKPIMEMBER = KUBEKPIMEDLEM ## Returnerer navnet, egenskapen og målet for en viktig ytelsesindikator (KPI), og viser navnet og egenskapen i cellen. En KPI er en målbar enhet, for eksempel månedlig bruttoinntjening eller kvartalsvis inntjening per ansatt, og brukes til å overvåke ytelsen i en organisasjon. +CUBEMEMBER = KUBEMEDLEM ## Returnerer et medlem eller en tuppel i et kubehierarki. Brukes til å validere at medlemmet eller tuppelen finnes i kuben. +CUBEMEMBERPROPERTY = KUBEMEDLEMEGENSKAP ## Returnerer verdien til en medlemsegenskap i kuben. Brukes til å validere at et medlemsnavn finnes i kuben, og til å returnere den angitte egenskapen for dette medlemmet. +CUBERANKEDMEMBER = KUBERANGERTMEDLEM ## Returnerer det n-te, eller rangerte, medlemmet i et sett. Brukes til å returnere ett eller flere elementer i et sett, for eksempel de 10 beste studentene. +CUBESET = KUBESETT ## Definerer et beregnet sett av medlemmer eller tuppeler ved å sende et settuttrykk til kuben på serveren, noe som oppretter settet og deretter returnerer dette settet til Microsoft Office Excel. +CUBESETCOUNT = KUBESETTANTALL ## Returnerer antallet elementer i et sett. +CUBEVALUE = KUBEVERDI ## Returnerer en aggregert verdi fra en kube. + + +## +## Database functions Databasefunksjoner +## +DAVERAGE = DGJENNOMSNITT ## Returnerer gjennomsnittet av merkede databaseposter +DCOUNT = DANTALL ## Teller celler som inneholder tall i en database +DCOUNTA = DANTALLA ## Teller celler som ikke er tomme i en database +DGET = DHENT ## Trekker ut fra en database en post som oppfyller angitte vilkår +DMAX = DMAKS ## Returnerer maksimumsverdien fra merkede databaseposter +DMIN = DMIN ## Returnerer minimumsverdien fra merkede databaseposter +DPRODUCT = DPRODUKT ## Multipliserer verdiene i et bestemt felt med poster som oppfyller vilkårene i en database +DSTDEV = DSTDAV ## Estimerer standardavviket basert på et utvalg av merkede databaseposter +DSTDEVP = DSTAVP ## Beregner standardavviket basert på at merkede databaseposter utgjør hele populasjonen +DSUM = DSUMMER ## Legger til tallene i feltkolonnen med poster, i databasen som oppfyller vilkårene +DVAR = DVARIANS ## Estimerer variansen basert på et utvalg av merkede databaseposter +DVARP = DVARIANSP ## Beregner variansen basert på at merkede databaseposter utgjør hele populasjonen + + +## +## Date and time functions Dato- og tidsfunksjoner +## +DATE = DATO ## Returnerer serienummeret som svarer til en bestemt dato +DATEVALUE = DATOVERDI ## Konverterer en dato med tekstformat til et serienummer +DAY = DAG ## Konverterer et serienummer til en dag i måneden +DAYS360 = DAGER360 ## Beregner antall dager mellom to datoer basert på et år med 360 dager +EDATE = DAG.ETTER ## Returnerer serienummeret som svarer til datoen som er det indikerte antall måneder før eller etter startdatoen +EOMONTH = MÅNEDSSLUTT ## Returnerer serienummeret som svarer til siste dag i måneden, før eller etter et angitt antall måneder +HOUR = TIME ## Konverterer et serienummer til en time +MINUTE = MINUTT ## Konverterer et serienummer til et minutt +MONTH = MÅNED ## Konverterer et serienummer til en måned +NETWORKDAYS = NETT.ARBEIDSDAGER ## Returnerer antall hele arbeidsdager mellom to datoer +NOW = NÅ ## Returnerer serienummeret som svarer til gjeldende dato og klokkeslett +SECOND = SEKUND ## Konverterer et serienummer til et sekund +TIME = TID ## Returnerer serienummeret som svarer til et bestemt klokkeslett +TIMEVALUE = TIDSVERDI ## Konverterer et klokkeslett i tekstformat til et serienummer +TODAY = IDAG ## Returnerer serienummeret som svarer til dagens dato +WEEKDAY = UKEDAG ## Konverterer et serienummer til en ukedag +WEEKNUM = UKENR ## Konverterer et serienummer til et tall som representerer hvilket nummer uken har i et år +WORKDAY = ARBEIDSDAG ## Returnerer serienummeret som svarer til datoen før eller etter et angitt antall arbeidsdager +YEAR = ÅR ## Konverterer et serienummer til et år +YEARFRAC = ÅRDEL ## Returnerer brøkdelen for året, som svarer til antall hele dager mellom startdato og sluttdato + + +## +## Engineering functions Tekniske funksjoner +## +BESSELI = BESSELI ## Returnerer den endrede Bessel-funksjonen In(x) +BESSELJ = BESSELJ ## Returnerer Bessel-funksjonen Jn(x) +BESSELK = BESSELK ## Returnerer den endrede Bessel-funksjonen Kn(x) +BESSELY = BESSELY ## Returnerer Bessel-funksjonen Yn(x) +BIN2DEC = BINTILDES ## Konverterer et binært tall til et desimaltall +BIN2HEX = BINTILHEKS ## Konverterer et binært tall til et heksadesimaltall +BIN2OCT = BINTILOKT ## Konverterer et binært tall til et oktaltall +COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koeffisienter til et komplekst tall +CONVERT = KONVERTER ## Konverterer et tall fra ett målsystem til et annet +DEC2BIN = DESTILBIN ## Konverterer et desimaltall til et binærtall +DEC2HEX = DESTILHEKS ## Konverterer et heltall i 10-tallsystemet til et heksadesimalt tall +DEC2OCT = DESTILOKT ## Konverterer et heltall i 10-tallsystemet til et oktaltall +DELTA = DELTA ## Undersøker om to verdier er like +ERF = FEILF ## Returnerer feilfunksjonen +ERFC = FEILFK ## Returnerer den komplementære feilfunksjonen +GESTEP = GRENSEVERDI ## Tester om et tall er større enn en terskelverdi +HEX2BIN = HEKSTILBIN ## Konverterer et heksadesimaltall til et binært tall +HEX2DEC = HEKSTILDES ## Konverterer et heksadesimalt tall til et heltall i 10-tallsystemet +HEX2OCT = HEKSTILOKT ## Konverterer et heksadesimalt tall til et oktaltall +IMABS = IMABS ## Returnerer absoluttverdien (koeffisienten) til et komplekst tall +IMAGINARY = IMAGINÆR ## Returnerer den imaginære koeffisienten til et komplekst tall +IMARGUMENT = IMARGUMENT ## Returnerer argumentet theta, som er en vinkel uttrykt i radianer +IMCONJUGATE = IMKONJUGERT ## Returnerer den komplekse konjugaten til et komplekst tall +IMCOS = IMCOS ## Returnerer cosinus til et komplekst tall +IMDIV = IMDIV ## Returnerer kvotienten til to komplekse tall +IMEXP = IMEKSP ## Returnerer eksponenten til et komplekst tall +IMLN = IMLN ## Returnerer den naturlige logaritmen for et komplekst tall +IMLOG10 = IMLOG10 ## Returnerer logaritmen med grunntall 10 for et komplekst tall +IMLOG2 = IMLOG2 ## Returnerer logaritmen med grunntall 2 for et komplekst tall +IMPOWER = IMOPPHØY ## Returnerer et komplekst tall opphøyd til en heltallspotens +IMPRODUCT = IMPRODUKT ## Returnerer produktet av komplekse tall +IMREAL = IMREELL ## Returnerer den reelle koeffisienten til et komplekst tall +IMSIN = IMSIN ## Returnerer sinus til et komplekst tall +IMSQRT = IMROT ## Returnerer kvadratroten av et komplekst tall +IMSUB = IMSUB ## Returnerer differansen mellom to komplekse tall +IMSUM = IMSUMMER ## Returnerer summen av komplekse tall +OCT2BIN = OKTTILBIN ## Konverterer et oktaltall til et binært tall +OCT2DEC = OKTTILDES ## Konverterer et oktaltall til et desimaltall +OCT2HEX = OKTTILHEKS ## Konverterer et oktaltall til et heksadesimaltall + + +## +## Financial functions Økonomiske funksjoner +## +ACCRINT = PÅLØPT.PERIODISK.RENTE ## Returnerer påløpte renter for et verdipapir som betaler periodisk rente +ACCRINTM = PÅLØPT.FORFALLSRENTE ## Returnerer den påløpte renten for et verdipapir som betaler rente ved forfall +AMORDEGRC = AMORDEGRC ## Returnerer avskrivningen for hver regnskapsperiode ved hjelp av en avskrivingskoeffisient +AMORLINC = AMORLINC ## Returnerer avskrivingen for hver regnskapsperiode +COUPDAYBS = OBLIG.DAGER.FF ## Returnerer antall dager fra begynnelsen av den rentebærende perioden til innløsningsdatoen +COUPDAYS = OBLIG.DAGER ## Returnerer antall dager i den rentebærende perioden som inneholder innløsningsdatoen +COUPDAYSNC = OBLIG.DAGER.NF ## Returnerer antall dager fra betalingsdato til neste renteinnbetalingsdato +COUPNCD = OBLIG.DAGER.EF ## Returnerer obligasjonsdatoen som kommer etter oppgjørsdatoen +COUPNUM = OBLIG.ANTALL ## Returnerer antall obligasjoner som skal betales mellom oppgjørsdatoen og forfallsdatoen +COUPPCD = OBLIG.DAG.FORRIGE ## Returnerer obligasjonsdatoen som kommer før oppgjørsdatoen +CUMIPMT = SAMLET.RENTE ## Returnerer den kumulative renten som er betalt mellom to perioder +CUMPRINC = SAMLET.HOVEDSTOL ## Returnerer den kumulative hovedstolen som er betalt for et lån mellom to perioder +DB = DAVSKR ## Returnerer avskrivningen for et aktivum i en angitt periode, foretatt med fast degressiv avskrivning +DDB = DEGRAVS ## Returnerer avskrivningen for et aktivum for en gitt periode, ved hjelp av dobbel degressiv avskrivning eller en metode som du selv angir +DISC = DISKONTERT ## Returnerer diskonteringsraten for et verdipapir +DOLLARDE = DOLLARDE ## Konverterer en valutapris uttrykt som en brøk, til en valutapris uttrykt som et desimaltall +DOLLARFR = DOLLARBR ## Konverterer en valutapris uttrykt som et desimaltall, til en valutapris uttrykt som en brøk +DURATION = VARIGHET ## Returnerer årlig varighet for et verdipapir med renter som betales periodisk +EFFECT = EFFEKTIV.RENTE ## Returnerer den effektive årlige rentesatsen +FV = SLUTTVERDI ## Returnerer fremtidig verdi for en investering +FVSCHEDULE = SVPLAN ## Returnerer den fremtidige verdien av en inngående hovedstol etter å ha anvendt en serie med sammensatte rentesatser +INTRATE = RENTESATS ## Returnerer rentefoten av et fullfinansiert verdipapir +IPMT = RAVDRAG ## Returnerer betalte renter på en investering for en gitt periode +IRR = IR ## Returnerer internrenten for en serie kontantstrømmer +ISPMT = ER.AVDRAG ## Beregner renten som er betalt for en investering i løpet av en bestemt periode +MDURATION = MVARIGHET ## Returnerer Macauleys modifiserte varighet for et verdipapir med en antatt pålydende verdi på kr 100,00 +MIRR = MODIR ## Returnerer internrenten der positive og negative kontantstrømmer finansieres med forskjellige satser +NOMINAL = NOMINELL ## Returnerer årlig nominell rentesats +NPER = PERIODER ## Returnerer antall perioder for en investering +NPV = NNV ## Returnerer netto nåverdi for en investering, basert på en serie periodiske kontantstrømmer og en rentesats +ODDFPRICE = AVVIKFP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde første periode +ODDFYIELD = AVVIKFP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde første periode +ODDLPRICE = AVVIKSP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde siste periode +ODDLYIELD = AVVIKSP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde siste periode +PMT = AVDRAG ## Returnerer periodisk betaling for en annuitet +PPMT = AMORT ## Returnerer betalingen på hovedstolen for en investering i en gitt periode +PRICE = PRIS ## Returnerer prisen per pålydende kr 100 for et verdipapir som gir periodisk avkastning +PRICEDISC = PRIS.DISKONTERT ## Returnerer prisen per pålydende kr 100 for et diskontert verdipapir +PRICEMAT = PRIS.FORFALL ## Returnerer prisen per pålydende kr 100 av et verdipapir som betaler rente ved forfall +PV = NÅVERDI ## Returnerer nåverdien av en investering +RATE = RENTE ## Returnerer rentesatsen per periode for en annuitet +RECEIVED = MOTTATT.AVKAST ## Returnerer summen som mottas ved forfallsdato for et fullinvestert verdipapir +SLN = LINAVS ## Returnerer den lineære avskrivningen for et aktivum i én periode +SYD = ÅRSAVS ## Returnerer årsavskrivningen for et aktivum i en angitt periode +TBILLEQ = TBILLEKV ## Returnerer den obligasjonsekvivalente avkastningen for en statsobligasjon +TBILLPRICE = TBILLPRIS ## Returnerer prisen per pålydende kr 100 for en statsobligasjon +TBILLYIELD = TBILLAVKASTNING ## Returnerer avkastningen til en statsobligasjon +VDB = VERDIAVS ## Returnerer avskrivningen for et aktivum i en angitt periode eller delperiode, ved hjelp av degressiv avskrivning +XIRR = XIR ## Returnerer internrenten for en serie kontantstrømmer som ikke nødvendigvis er periodiske +XNPV = XNNV ## Returnerer netto nåverdi for en serie kontantstrømmer som ikke nødvendigvis er periodiske +YIELD = AVKAST ## Returnerer avkastningen på et verdipapir som betaler periodisk rente +YIELDDISC = AVKAST.DISKONTERT ## Returnerer årlig avkastning for et diskontert verdipapir, for eksempel en statskasseveksel +YIELDMAT = AVKAST.FORFALL ## Returnerer den årlige avkastningen for et verdipapir som betaler rente ved forfallsdato + + +## +## Information functions Informasjonsfunksjoner +## +CELL = CELLE ## Returnerer informasjon om formatering, plassering eller innholdet til en celle +ERROR.TYPE = FEIL.TYPE ## Returnerer et tall som svarer til en feiltype +INFO = INFO ## Returnerer informasjon om gjeldende operativmiljø +ISBLANK = ERTOM ## Returnerer SANN hvis verdien er tom +ISERR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst annen feilverdi enn #I/T +ISERROR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst feilverdi +ISEVEN = ERPARTALL ## Returnerer SANN hvis tallet er et partall +ISLOGICAL = ERLOGISK ## Returnerer SANN hvis verdien er en logisk verdi +ISNA = ERIT ## Returnerer SANN hvis verdien er feilverdien #I/T +ISNONTEXT = ERIKKETEKST ## Returnerer SANN hvis verdien ikke er tekst +ISNUMBER = ERTALL ## Returnerer SANN hvis verdien er et tall +ISODD = ERODDETALL ## Returnerer SANN hvis tallet er et oddetall +ISREF = ERREF ## Returnerer SANN hvis verdien er en referanse +ISTEXT = ERTEKST ## Returnerer SANN hvis verdien er tekst +N = N ## Returnerer en verdi som er konvertert til et tall +NA = IT ## Returnerer feilverdien #I/T +TYPE = VERDITYPE ## Returnerer et tall som indikerer datatypen til en verdi + + +## +## Logical functions Logiske funksjoner +## +AND = OG ## Returnerer SANN hvis alle argumentene er lik SANN +FALSE = USANN ## Returnerer den logiske verdien USANN +IF = HVIS ## Angir en logisk test som skal utføres +IFERROR = HVISFEIL ## Returnerer en verdi du angir hvis en formel evaluerer til en feil. Ellers returnerer den resultatet av formelen. +NOT = IKKE ## Reverserer logikken til argumentet +OR = ELLER ## Returnerer SANN hvis ett eller flere argumenter er lik SANN +TRUE = SANN ## Returnerer den logiske verdien SANN + + +## +## Lookup and reference functions Oppslag- og referansefunksjoner +## +ADDRESS = ADRESSE ## Returnerer en referanse som tekst til en enkelt celle i et regneark +AREAS = OMRÅDER ## Returnerer antall områder i en referanse +CHOOSE = VELG ## Velger en verdi fra en liste med verdier +COLUMN = KOLONNE ## Returnerer kolonnenummeret for en referanse +COLUMNS = KOLONNER ## Returnerer antall kolonner i en referanse +HLOOKUP = FINN.KOLONNE ## Leter i den øverste raden i en matrise og returnerer verdien for den angitte cellen +HYPERLINK = HYPERKOBLING ## Oppretter en snarvei eller et hopp som åpner et dokument som er lagret på en nettverksserver, et intranett eller Internett +INDEX = INDEKS ## Bruker en indeks til å velge en verdi fra en referanse eller matrise +INDIRECT = INDIREKTE ## Returnerer en referanse angitt av en tekstverdi +LOOKUP = SLÅ.OPP ## Slår opp verdier i en vektor eller matrise +MATCH = SAMMENLIGNE ## Slår opp verdier i en referanse eller matrise +OFFSET = FORSKYVNING ## Returnerer en referanseforskyvning fra en gitt referanse +ROW = RAD ## Returnerer radnummeret for en referanse +ROWS = RADER ## Returnerer antall rader i en referanse +RTD = RTD ## Henter sanntidsdata fra et program som støtter COM-automatisering (automatisering: En måte å arbeide på med programobjekter fra et annet program- eller utviklingsverktøy. Tidligere kalt OLE-automatisering. Automatisering er en bransjestandard og en funksjon i Component Object Model (COM).) +TRANSPOSE = TRANSPONER ## Returnerer transponeringen av en matrise +VLOOKUP = FINN.RAD ## Leter i den første kolonnen i en matrise og flytter bortover raden for å returnere verdien til en celle + + +## +## Math and trigonometry functions Matematikk- og trigonometrifunksjoner +## +ABS = ABS ## Returnerer absoluttverdien til et tall +ACOS = ARCCOS ## Returnerer arcus cosinus til et tall +ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus til et tall +ASIN = ARCSIN ## Returnerer arcus sinus til et tall +ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus til et tall +ATAN = ARCTAN ## Returnerer arcus tangens til et tall +ATAN2 = ARCTAN2 ## Returnerer arcus tangens fra x- og y-koordinater +ATANH = ARCTANH ## Returnerer den inverse hyperbolske tangens til et tall +CEILING = AVRUND.GJELDENDE.MULTIPLUM ## Runder av et tall til nærmeste heltall eller til nærmeste signifikante multiplum +COMBIN = KOMBINASJON ## Returnerer antall kombinasjoner for ett gitt antall objekter +COS = COS ## Returnerer cosinus til et tall +COSH = COSH ## Returnerer den hyperbolske cosinus til et tall +DEGREES = GRADER ## Konverterer radianer til grader +EVEN = AVRUND.TIL.PARTALL ## Runder av et tall oppover til nærmeste heltall som er et partall +EXP = EKSP ## Returnerer e opphøyd i en angitt potens +FACT = FAKULTET ## Returnerer fakultet til et tall +FACTDOUBLE = DOBBELFAKT ## Returnerer et talls doble fakultet +FLOOR = AVRUND.GJELDENDE.MULTIPLUM.NED ## Avrunder et tall nedover, mot null +GCD = SFF ## Returnerer høyeste felles divisor +INT = HELTALL ## Avrunder et tall nedover til nærmeste heltall +LCM = MFM ## Returnerer minste felles multiplum +LN = LN ## Returnerer den naturlige logaritmen til et tall +LOG = LOG ## Returnerer logaritmen for et tall til et angitt grunntall +LOG10 = LOG10 ## Returnerer logaritmen med grunntall 10 for et tall +MDETERM = MDETERM ## Returnerer matrisedeterminanten til en matrise +MINVERSE = MINVERS ## Returnerer den inverse matrisen til en matrise +MMULT = MMULT ## Returnerer matriseproduktet av to matriser +MOD = REST ## Returnerer resten fra en divisjon +MROUND = MRUND ## Returnerer et tall avrundet til det ønskede multiplum +MULTINOMIAL = MULTINOMINELL ## Returnerer det multinominelle for et sett med tall +ODD = AVRUND.TIL.ODDETALL ## Runder av et tall oppover til nærmeste heltall som er et oddetall +PI = PI ## Returnerer verdien av pi +POWER = OPPHØYD.I ## Returnerer resultatet av et tall opphøyd i en potens +PRODUCT = PRODUKT ## Multipliserer argumentene +QUOTIENT = KVOTIENT ## Returnerer heltallsdelen av en divisjon +RADIANS = RADIANER ## Konverterer grader til radianer +RAND = TILFELDIG ## Returnerer et tilfeldig tall mellom 0 og 1 +RANDBETWEEN = TILFELDIGMELLOM ## Returnerer et tilfeldig tall innenfor et angitt område +ROMAN = ROMERTALL ## Konverterer vanlige tall til romertall, som tekst +ROUND = AVRUND ## Avrunder et tall til et angitt antall sifre +ROUNDDOWN = AVRUND.NED ## Avrunder et tall nedover, mot null +ROUNDUP = AVRUND.OPP ## Runder av et tall oppover, bort fra null +SERIESSUM = SUMMER.REKKE ## Returnerer summen av en geometrisk rekke, basert på formelen +SIGN = FORTEGN ## Returnerer fortegnet for et tall +SIN = SIN ## Returnerer sinus til en gitt vinkel +SINH = SINH ## Returnerer den hyperbolske sinus til et tall +SQRT = ROT ## Returnerer en positiv kvadratrot +SQRTPI = ROTPI ## Returnerer kvadratroten av (tall * pi) +SUBTOTAL = DELSUM ## Returnerer en delsum i en liste eller database +SUM = SUMMER ## Legger sammen argumentene +SUMIF = SUMMERHVIS ## Legger sammen cellene angitt ved et gitt vilkår +SUMIFS = SUMMER.HVIS.SETT ## Legger sammen cellene i et område som oppfyller flere vilkår +SUMPRODUCT = SUMMERPRODUKT ## Returnerer summen av produktene av tilsvarende matrisekomponenter +SUMSQ = SUMMERKVADRAT ## Returnerer kvadratsummen av argumentene +SUMX2MY2 = SUMMERX2MY2 ## Returnerer summen av differansen av kvadratene for tilsvarende verdier i to matriser +SUMX2PY2 = SUMMERX2PY2 ## Returnerer summen av kvadratsummene for tilsvarende verdier i to matriser +SUMXMY2 = SUMMERXMY2 ## Returnerer summen av kvadratene av differansen for tilsvarende verdier i to matriser +TAN = TAN ## Returnerer tangens for et tall +TANH = TANH ## Returnerer den hyperbolske tangens for et tall +TRUNC = AVKORT ## Korter av et tall til et heltall + + +## +## Statistical functions Statistiske funksjoner +## +AVEDEV = GJENNOMSNITTSAVVIK ## Returnerer datapunktenes gjennomsnittlige absoluttavvik fra middelverdien +AVERAGE = GJENNOMSNITT ## Returnerer gjennomsnittet for argumentene +AVERAGEA = GJENNOMSNITTA ## Returnerer gjennomsnittet for argumentene, inkludert tall, tekst og logiske verdier +AVERAGEIF = GJENNOMSNITTHVIS ## Returnerer gjennomsnittet (aritmetisk gjennomsnitt) av alle cellene i et område som oppfyller et bestemt vilkår +AVERAGEIFS = GJENNOMSNITT.HVIS.SETT ## Returnerer gjennomsnittet (aritmetisk middelverdi) av alle celler som oppfyller flere vilkår. +BETADIST = BETA.FORDELING ## Returnerer den kumulative betafordelingsfunksjonen +BETAINV = INVERS.BETA.FORDELING ## Returnerer den inverse verdien til fordelingsfunksjonen for en angitt betafordeling +BINOMDIST = BINOM.FORDELING ## Returnerer den individuelle binomiske sannsynlighetsfordelingen +CHIDIST = KJI.FORDELING ## Returnerer den ensidige sannsynligheten for en kjikvadrert fordeling +CHIINV = INVERS.KJI.FORDELING ## Returnerer den inverse av den ensidige sannsynligheten for den kjikvadrerte fordelingen +CHITEST = KJI.TEST ## Utfører testen for uavhengighet +CONFIDENCE = KONFIDENS ## Returnerer konfidensintervallet til gjennomsnittet for en populasjon +CORREL = KORRELASJON ## Returnerer korrelasjonskoeffisienten mellom to datasett +COUNT = ANTALL ## Teller hvor mange tall som er i argumentlisten +COUNTA = ANTALLA ## Teller hvor mange verdier som er i argumentlisten +COUNTBLANK = TELLBLANKE ## Teller antall tomme celler i et område. +COUNTIF = ANTALL.HVIS ## Teller antall celler i et område som oppfyller gitte vilkår +COUNTIFS = ANTALL.HVIS.SETT ## Teller antallet ikke-tomme celler i et område som oppfyller flere vilkår +COVAR = KOVARIANS ## Returnerer kovariansen, gjennomsnittet av produktene av parvise avvik +CRITBINOM = GRENSE.BINOM ## Returnerer den minste verdien der den kumulative binomiske fordelingen er mindre enn eller lik en vilkårsverdi +DEVSQ = AVVIK.KVADRERT ## Returnerer summen av kvadrerte avvik +EXPONDIST = EKSP.FORDELING ## Returnerer eksponentialfordelingen +FDIST = FFORDELING ## Returnerer F-sannsynlighetsfordelingen +FINV = FFORDELING.INVERS ## Returnerer den inverse av den sannsynlige F-fordelingen +FISHER = FISHER ## Returnerer Fisher-transformasjonen +FISHERINV = FISHERINV ## Returnerer den inverse av Fisher-transformasjonen +FORECAST = PROGNOSE ## Returnerer en verdi langs en lineær trend +FREQUENCY = FREKVENS ## Returnerer en frekvensdistribusjon som en loddrett matrise +FTEST = FTEST ## Returnerer resultatet av en F-test +GAMMADIST = GAMMAFORDELING ## Returnerer gammafordelingen +GAMMAINV = GAMMAINV ## Returnerer den inverse av den gammakumulative fordelingen +GAMMALN = GAMMALN ## Returnerer den naturlige logaritmen til gammafunksjonen G(x) +GEOMEAN = GJENNOMSNITT.GEOMETRISK ## Returnerer den geometriske middelverdien +GROWTH = VEKST ## Returnerer verdier langs en eksponentiell trend +HARMEAN = GJENNOMSNITT.HARMONISK ## Returnerer den harmoniske middelverdien +HYPGEOMDIST = HYPGEOM.FORDELING ## Returnerer den hypergeometriske fordelingen +INTERCEPT = SKJÆRINGSPUNKT ## Returnerer skjæringspunktet til den lineære regresjonslinjen +KURT = KURT ## Returnerer kurtosen til et datasett +LARGE = N.STØRST ## Returnerer den n-te største verdien i et datasett +LINEST = RETTLINJE ## Returnerer parameterne til en lineær trend +LOGEST = KURVE ## Returnerer parameterne til en eksponentiell trend +LOGINV = LOGINV ## Returnerer den inverse lognormale fordelingen +LOGNORMDIST = LOGNORMFORD ## Returnerer den kumulative lognormale fordelingen +MAX = STØRST ## Returnerer maksimumsverdien i en argumentliste +MAXA = MAKSA ## Returnerer maksimumsverdien i en argumentliste, inkludert tall, tekst og logiske verdier +MEDIAN = MEDIAN ## Returnerer medianen til tallene som er gitt +MIN = MIN ## Returnerer minimumsverdien i en argumentliste +MINA = MINA ## Returnerer den minste verdien i en argumentliste, inkludert tall, tekst og logiske verdier +MODE = MODUS ## Returnerer den vanligste verdien i et datasett +NEGBINOMDIST = NEGBINOM.FORDELING ## Returnerer den negative binomiske fordelingen +NORMDIST = NORMALFORDELING ## Returnerer den kumulative normalfordelingen +NORMINV = NORMINV ## Returnerer den inverse kumulative normalfordelingen +NORMSDIST = NORMSFORDELING ## Returnerer standard kumulativ normalfordeling +NORMSINV = NORMSINV ## Returnerer den inverse av den den kumulative standard normalfordelingen +PEARSON = PEARSON ## Returnerer produktmomentkorrelasjonskoeffisienten, Pearson +PERCENTILE = PERSENTIL ## Returnerer den n-te persentil av verdiene i et område +PERCENTRANK = PROSENTDEL ## Returnerer prosentrangeringen av en verdi i et datasett +PERMUT = PERMUTER ## Returnerer antall permutasjoner for et gitt antall objekter +POISSON = POISSON ## Returnerer Poissons sannsynlighetsfordeling +PROB = SANNSYNLIG ## Returnerer sannsynligheten for at verdier i et område ligger mellom to grenser +QUARTILE = KVARTIL ## Returnerer kvartilen til et datasett +RANK = RANG ## Returnerer rangeringen av et tall, eller plassen tallet har i en rekke +RSQ = RKVADRAT ## Returnerer kvadratet av produktmomentkorrelasjonskoeffisienten (Pearsons r) +SKEW = SKJEVFORDELING ## Returnerer skjevheten i en fordeling +SLOPE = STIGNINGSTALL ## Returnerer stigningtallet for den lineære regresjonslinjen +SMALL = N.MINST ## Returnerer den n-te minste verdien i et datasett +STANDARDIZE = NORMALISER ## Returnerer en normalisert verdi +STDEV = STDAV ## Estimere standardavvik på grunnlag av et utvalg +STDEVA = STDAVVIKA ## Estimerer standardavvik basert på et utvalg, inkludert tall, tekst og logiske verdier +STDEVP = STDAVP ## Beregner standardavvik basert på hele populasjonen +STDEVPA = STDAVVIKPA ## Beregner standardavvik basert på hele populasjonen, inkludert tall, tekst og logiske verdier +STEYX = STANDARDFEIL ## Returnerer standardfeilen for den predikerte y-verdien for hver x i regresjonen +TDIST = TFORDELING ## Returnerer en Student t-fordeling +TINV = TINV ## Returnerer den inverse Student t-fordelingen +TREND = TREND ## Returnerer verdier langs en lineær trend +TRIMMEAN = TRIMMET.GJENNOMSNITT ## Returnerer den interne middelverdien til et datasett +TTEST = TTEST ## Returnerer sannsynligheten assosiert med en Student t-test +VAR = VARIANS ## Estimerer varians basert på et utvalg +VARA = VARIANSA ## Estimerer varians basert på et utvalg, inkludert tall, tekst og logiske verdier +VARP = VARIANSP ## Beregner varians basert på hele populasjonen +VARPA = VARIANSPA ## Beregner varians basert på hele populasjonen, inkludert tall, tekst og logiske verdier +WEIBULL = WEIBULL.FORDELING ## Returnerer Weibull-fordelingen +ZTEST = ZTEST ## Returnerer den ensidige sannsynlighetsverdien for en z-test + + +## +## Text functions Tekstfunksjoner +## +ASC = STIGENDE ## Endrer fullbreddes (dobbeltbyte) engelske bokstaver eller katakana i en tegnstreng, til halvbreddes (enkeltbyte) tegn +BAHTTEXT = BAHTTEKST ## Konverterer et tall til tekst, og bruker valutaformatet ß (baht) +CHAR = TEGNKODE ## Returnerer tegnet som svarer til kodenummeret +CLEAN = RENSK ## Fjerner alle tegn som ikke kan skrives ut, fra teksten +CODE = KODE ## Returnerer en numerisk kode for det første tegnet i en tekststreng +CONCATENATE = KJEDE.SAMMEN ## Slår sammen flere tekstelementer til ett tekstelement +DOLLAR = VALUTA ## Konverterer et tall til tekst, og bruker valutaformatet $ (dollar) +EXACT = EKSAKT ## Kontrollerer om to tekstverdier er like +FIND = FINN ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) +FINDB = FINNB ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) +FIXED = FASTSATT ## Formaterer et tall som tekst med et bestemt antall desimaler +JIS = JIS ## Endrer halvbreddes (enkeltbyte) engelske bokstaver eller katakana i en tegnstreng, til fullbreddes (dobbeltbyte) tegn +LEFT = VENSTRE ## Returnerer tegnene lengst til venstre i en tekstverdi +LEFTB = VENSTREB ## Returnerer tegnene lengst til venstre i en tekstverdi +LEN = LENGDE ## Returnerer antall tegn i en tekststreng +LENB = LENGDEB ## Returnerer antall tegn i en tekststreng +LOWER = SMÅ ## Konverterer tekst til små bokstaver +MID = DELTEKST ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir +MIDB = DELTEKSTB ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir +PHONETIC = FURIGANA ## Trekker ut fonetiske tegn (furigana) fra en tekststreng +PROPER = STOR.FORBOKSTAV ## Gir den første bokstaven i hvert ord i en tekstverdi stor forbokstav +REPLACE = ERSTATT ## Erstatter tegn i en tekst +REPLACEB = ERSTATTB ## Erstatter tegn i en tekst +REPT = GJENTA ## Gjentar tekst et gitt antall ganger +RIGHT = HØYRE ## Returnerer tegnene lengst til høyre i en tekstverdi +RIGHTB = HØYREB ## Returnerer tegnene lengst til høyre i en tekstverdi +SEARCH = SØK ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) +SEARCHB = SØKB ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) +SUBSTITUTE = BYTT.UT ## Bytter ut gammel tekst med ny tekst i en tekststreng +T = T ## Konverterer argumentene til tekst +TEXT = TEKST ## Formaterer et tall og konverterer det til tekst +TRIM = TRIMME ## Fjerner mellomrom fra tekst +UPPER = STORE ## Konverterer tekst til store bokstaver +VALUE = VERDI ## Konverterer et tekstargument til et tall diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/config new file mode 100755 index 0000000..00f8b9a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = zł + + +## +## Excel Error Codes (For future use) + +## +NULL = #ZERO! +DIV0 = #DZIEL/0! +VALUE = #ARG! +REF = #ADR! +NAME = #NAZWA? +NUM = #LICZBA! +NA = #N/D! diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/functions new file mode 100755 index 0000000..907a4ff --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pl/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funkcje dodatków i automatyzacji +## +GETPIVOTDATA = WEŹDANETABELI ## Zwraca dane przechowywane w raporcie tabeli przestawnej. + + +## +## Cube functions Funkcje modułów +## +CUBEKPIMEMBER = ELEMENT.KPI.MODUŁU ## Zwraca nazwę, właściwość i miarę kluczowego wskaźnika wydajności (KPI) oraz wyświetla nazwę i właściwość w komórce. Wskaźnik KPI jest miarą ilościową, taką jak miesięczny zysk brutto lub kwartalna fluktuacja pracowników, używaną do monitorowania wydajności organizacji. +CUBEMEMBER = ELEMENT.MODUŁU ## Zwraca element lub krotkę z hierarchii modułu. Służy do sprawdzania, czy element lub krotka istnieje w module. +CUBEMEMBERPROPERTY = WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU ## Zwraca wartość właściwości elementu w module. Służy do sprawdzania, czy nazwa elementu istnieje w module, i zwracania określonej właściwości dla tego elementu. +CUBERANKEDMEMBER = USZEREGOWANY.ELEMENT.MODUŁU ## Zwraca n-ty (albo uszeregowany) element zestawu. Służy do zwracania elementu lub elementów zestawu, na przykład najlepszego sprzedawcy lub 10 najlepszych studentów. +CUBESET = ZESTAW.MODUŁÓW ## Definiuje obliczony zestaw elementów lub krotek, wysyłając wyrażenie zestawu do serwera modułu, który tworzy zestaw i zwraca go do programu Microsoft Office Excel. +CUBESETCOUNT = LICZNIK.MODUŁÓW.ZESTAWU ## Zwraca liczbę elementów zestawu. +CUBEVALUE = WARTOŚĆ.MODUŁU ## Zwraca zagregowaną wartość z modułu. + + +## +## Database functions Funkcje baz danych +## +DAVERAGE = BD.ŚREDNIA ## Zwraca wartość średniej wybranych wpisów bazy danych. +DCOUNT = BD.ILE.REKORDÓW ## Zlicza komórki zawierające liczby w bazie danych. +DCOUNTA = BD.ILE.REKORDÓW.A ## Zlicza niepuste komórki w bazie danych. +DGET = BD.POLE ## Wyodrębnia z bazy danych jeden rekord spełniający określone kryteria. +DMAX = BD.MAX ## Zwraca wartość maksymalną z wybranych wpisów bazy danych. +DMIN = BD.MIN ## Zwraca wartość minimalną z wybranych wpisów bazy danych. +DPRODUCT = BD.ILOCZYN ## Mnoży wartości w konkretnym, spełniającym kryteria polu rekordów bazy danych. +DSTDEV = BD.ODCH.STANDARD ## Szacuje odchylenie standardowe na podstawie próbki z wybranych wpisów bazy danych. +DSTDEVP = BD.ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji wybranych wpisów bazy danych. +DSUM = BD.SUMA ## Dodaje liczby w kolumnie pól rekordów bazy danych, które spełniają kryteria. +DVAR = BD.WARIANCJA ## Szacuje wariancję na podstawie próbki z wybranych wpisów bazy danych. +DVARP = BD.WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji wybranych wpisów bazy danych. + + +## +## Date and time functions Funkcje dat, godzin i czasu +## +DATE = DATA ## Zwraca liczbę seryjną dla wybranej daty. +DATEVALUE = DATA.WARTOŚĆ ## Konwertuje datę w formie tekstu na liczbę seryjną. +DAY = DZIEŃ ## Konwertuje liczbę seryjną na dzień miesiąca. +DAYS360 = DNI.360 ## Oblicza liczbę dni między dwiema datami na podstawie roku 360-dniowego. +EDATE = UPŁDNI ## Zwraca liczbę seryjną daty jako wskazaną liczbę miesięcy przed określoną datą początkową lub po niej. +EOMONTH = EOMONTH ## Zwraca liczbę seryjną ostatniego dnia miesiąca przed określoną liczbą miesięcy lub po niej. +HOUR = GODZINA ## Konwertuje liczbę seryjną na godzinę. +MINUTE = MINUTA ## Konwertuje liczbę seryjną na minutę. +MONTH = MIESIĄC ## Konwertuje liczbę seryjną na miesiąc. +NETWORKDAYS = NETWORKDAYS ## Zwraca liczbę pełnych dni roboczych między dwiema datami. +NOW = TERAZ ## Zwraca liczbę seryjną bieżącej daty i godziny. +SECOND = SEKUNDA ## Konwertuje liczbę seryjną na sekundę. +TIME = CZAS ## Zwraca liczbę seryjną określonego czasu. +TIMEVALUE = CZAS.WARTOŚĆ ## Konwertuje czas w formie tekstu na liczbę seryjną. +TODAY = DZIŚ ## Zwraca liczbę seryjną dla daty bieżącej. +WEEKDAY = DZIEŃ.TYG ## Konwertuje liczbę seryjną na dzień tygodnia. +WEEKNUM = WEEKNUM ## Konwertuje liczbę seryjną na liczbę reprezentującą numer tygodnia w roku. +WORKDAY = WORKDAY ## Zwraca liczbę seryjną dla daty przed określoną liczbą dni roboczych lub po niej. +YEAR = ROK ## Konwertuje liczbę seryjną na rok. +YEARFRAC = YEARFRAC ## Zwraca część roku reprezentowaną przez pełną liczbę dni między datą początkową a datą końcową. + + +## +## Engineering functions Funkcje inżynierskie +## +BESSELI = BESSELI ## Zwraca wartość zmodyfikowanej funkcji Bessela In(x). +BESSELJ = BESSELJ ## Zwraca wartość funkcji Bessela Jn(x). +BESSELK = BESSELK ## Zwraca wartość zmodyfikowanej funkcji Bessela Kn(x). +BESSELY = BESSELY ## Zwraca wartość funkcji Bessela Yn(x). +BIN2DEC = BIN2DEC ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci dziesiętnej. +BIN2HEX = BIN2HEX ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci szesnastkowej. +BIN2OCT = BIN2OCT ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci ósemkowej. +COMPLEX = COMPLEX ## Konwertuje część rzeczywistą i urojoną na liczbę zespoloną. +CONVERT = CONVERT ## Konwertuje liczbę z jednego systemu miar na inny. +DEC2BIN = DEC2BIN ## Konwertuje liczbę w postaci dziesiętnej na postać dwójkową. +DEC2HEX = DEC2HEX ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci szesnastkowej. +DEC2OCT = DEC2OCT ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci ósemkowej. +DELTA = DELTA ## Sprawdza, czy dwie wartości są równe. +ERF = ERF ## Zwraca wartość funkcji błędu. +ERFC = ERFC ## Zwraca wartość komplementarnej funkcji błędu. +GESTEP = GESTEP ## Sprawdza, czy liczba jest większa niż wartość progowa. +HEX2BIN = HEX2BIN ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dwójkowej. +HEX2DEC = HEX2DEC ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dziesiętnej. +HEX2OCT = HEX2OCT ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci ósemkowej. +IMABS = IMABS ## Zwraca wartość bezwzględną (moduł) liczby zespolonej. +IMAGINARY = IMAGINARY ## Zwraca wartość części urojonej liczby zespolonej. +IMARGUMENT = IMARGUMENT ## Zwraca wartość argumentu liczby zespolonej, przy czym kąt wyrażony jest w radianach. +IMCONJUGATE = IMCONJUGATE ## Zwraca wartość liczby sprzężonej danej liczby zespolonej. +IMCOS = IMCOS ## Zwraca wartość cosinusa liczby zespolonej. +IMDIV = IMDIV ## Zwraca wartość ilorazu dwóch liczb zespolonych. +IMEXP = IMEXP ## Zwraca postać wykładniczą liczby zespolonej. +IMLN = IMLN ## Zwraca wartość logarytmu naturalnego liczby zespolonej. +IMLOG10 = IMLOG10 ## Zwraca wartość logarytmu dziesiętnego liczby zespolonej. +IMLOG2 = IMLOG2 ## Zwraca wartość logarytmu liczby zespolonej przy podstawie 2. +IMPOWER = IMPOWER ## Zwraca wartość liczby zespolonej podniesionej do potęgi całkowitej. +IMPRODUCT = IMPRODUCT ## Zwraca wartość iloczynu liczb zespolonych. +IMREAL = IMREAL ## Zwraca wartość części rzeczywistej liczby zespolonej. +IMSIN = IMSIN ## Zwraca wartość sinusa liczby zespolonej. +IMSQRT = IMSQRT ## Zwraca wartość pierwiastka kwadratowego z liczby zespolonej. +IMSUB = IMSUB ## Zwraca wartość różnicy dwóch liczb zespolonych. +IMSUM = IMSUM ## Zwraca wartość sumy liczb zespolonych. +OCT2BIN = OCT2BIN ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dwójkowej. +OCT2DEC = OCT2DEC ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dziesiętnej. +OCT2HEX = OCT2HEX ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci szesnastkowej. + + +## +## Financial functions Funkcje finansowe +## +ACCRINT = ACCRINT ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem okresowym. +ACCRINTM = ACCRINTM ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem w terminie wykupu. +AMORDEGRC = AMORDEGRC ## Zwraca amortyzację dla każdego okresu rozliczeniowego z wykorzystaniem współczynnika amortyzacji. +AMORLINC = AMORLINC ## Zwraca amortyzację dla każdego okresu rozliczeniowego. +COUPDAYBS = COUPDAYBS ## Zwraca liczbę dni od początku okresu dywidendy do dnia rozliczeniowego. +COUPDAYS = COUPDAYS ## Zwraca liczbę dni w okresie dywidendy, z uwzględnieniem dnia rozliczeniowego. +COUPDAYSNC = COUPDAYSNC ## Zwraca liczbę dni od dnia rozliczeniowego do daty następnego dnia dywidendy. +COUPNCD = COUPNCD ## Zwraca dzień następnej dywidendy po dniu rozliczeniowym. +COUPNUM = COUPNUM ## Zwraca liczbę dywidend płatnych między dniem rozliczeniowym a dniem wykupu. +COUPPCD = COUPPCD ## Zwraca dzień poprzedniej dywidendy przed dniem rozliczeniowym. +CUMIPMT = CUMIPMT ## Zwraca wartość procentu składanego płatnego między dwoma okresami. +CUMPRINC = CUMPRINC ## Zwraca wartość kapitału skumulowanego spłaty pożyczki między dwoma okresami. +DB = DB ## Zwraca amortyzację środka trwałego w danym okresie metodą degresywną z zastosowaniem stałej bazowej. +DDB = DDB ## Zwraca amortyzację środka trwałego za podany okres metodą degresywną z zastosowaniem podwójnej bazowej lub metodą określoną przez użytkownika. +DISC = DISC ## Zwraca wartość stopy dyskontowej papieru wartościowego. +DOLLARDE = DOLLARDE ## Konwertuje cenę w postaci ułamkowej na cenę wyrażoną w postaci dziesiętnej. +DOLLARFR = DOLLARFR ## Konwertuje cenę wyrażoną w postaci dziesiętnej na cenę wyrażoną w postaci ułamkowej. +DURATION = DURATION ## Zwraca wartość rocznego przychodu z papieru wartościowego o okresowych wypłatach oprocentowania. +EFFECT = EFFECT ## Zwraca wartość efektywnej rocznej stopy procentowej. +FV = FV ## Zwraca przyszłą wartość lokaty. +FVSCHEDULE = FVSCHEDULE ## Zwraca przyszłą wartość kapitału początkowego wraz z szeregiem procentów składanych. +INTRATE = INTRATE ## Zwraca wartość stopy procentowej papieru wartościowego całkowicie ulokowanego. +IPMT = IPMT ## Zwraca wysokość spłaty oprocentowania lokaty za dany okres. +IRR = IRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii przepływów gotówkowych. +ISPMT = ISPMT ## Oblicza wysokość spłaty oprocentowania za dany okres lokaty. +MDURATION = MDURATION ## Zwraca wartość zmodyfikowanego okresu Macauleya dla papieru wartościowego o założonej wartości nominalnej 100 zł. +MIRR = MIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla przypadku, gdy dodatnie i ujemne przepływy gotówkowe mają różne stopy. +NOMINAL = NOMINAL ## Zwraca wysokość nominalnej rocznej stopy procentowej. +NPER = NPER ## Zwraca liczbę okresów dla lokaty. +NPV = NPV ## Zwraca wartość bieżącą netto lokaty na podstawie szeregu okresowych przepływów gotówkowych i stopy dyskontowej. +ODDFPRICE = ODDFPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym pierwszym okresem. +ODDFYIELD = ODDFYIELD ## Zwraca rentowność papieru wartościowego z nietypowym pierwszym okresem. +ODDLPRICE = ODDLPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym ostatnim okresem. +ODDLYIELD = ODDLYIELD ## Zwraca rentowność papieru wartościowego z nietypowym ostatnim okresem. +PMT = PMT ## Zwraca wartość okresowej płatności raty rocznej. +PPMT = PPMT ## Zwraca wysokość spłaty kapitału w przypadku lokaty dla danego okresu. +PRICE = PRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem okresowym. +PRICEDISC = PRICEDISC ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego zdyskontowanego. +PRICEMAT = PRICEMAT ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem w terminie wykupu. +PV = PV ## Zwraca wartość bieżącą lokaty. +RATE = RATE ## Zwraca wysokość stopy procentowej w okresie raty rocznej. +RECEIVED = RECEIVED ## Zwraca wartość kapitału otrzymanego przy wykupie papieru wartościowego całkowicie ulokowanego. +SLN = SLN ## Zwraca amortyzację środka trwałego za jeden okres metodą liniową. +SYD = SYD ## Zwraca amortyzację środka trwałego za dany okres metodą sumy cyfr lat amortyzacji. +TBILLEQ = TBILLEQ ## Zwraca rentowność ekwiwalentu obligacji dla bonu skarbowego. +TBILLPRICE = TBILLPRICE ## Zwraca cenę za 100 zł wartości nominalnej bonu skarbowego. +TBILLYIELD = TBILLYIELD ## Zwraca rentowność bonu skarbowego. +VDB = VDB ## Oblicza amortyzację środka trwałego w danym okresie lub jego części metodą degresywną. +XIRR = XIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. +XNPV = XNPV ## Zwraca wartość bieżącą netto dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. +YIELD = YIELD ## Zwraca rentowność papieru wartościowego z oprocentowaniem okresowym. +YIELDDISC = YIELDDISC ## Zwraca roczną rentowność zdyskontowanego papieru wartościowego, na przykład bonu skarbowego. +YIELDMAT = YIELDMAT ## Zwraca roczną rentowność papieru wartościowego oprocentowanego przy wykupie. + + +## +## Information functions Funkcje informacyjne +## +CELL = KOMÓRKA ## Zwraca informacje o formacie, położeniu lub zawartości komórki. +ERROR.TYPE = NR.BŁĘDU ## Zwraca liczbę odpowiadającą typowi błędu. +INFO = INFO ## Zwraca informację o aktualnym środowisku pracy. +ISBLANK = CZY.PUSTA ## Zwraca wartość PRAWDA, jeśli wartość jest pusta. +ISERR = CZY.BŁ ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu, z wyjątkiem #N/D!. +ISERROR = CZY.BŁĄD ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu. +ISEVEN = ISEVEN ## Zwraca wartość PRAWDA, jeśli liczba jest parzysta. +ISLOGICAL = CZY.LOGICZNA ## Zwraca wartość PRAWDA, jeśli wartość jest wartością logiczną. +ISNA = CZY.BRAK ## Zwraca wartość PRAWDA, jeśli wartość jest wartością błędu #N/D!. +ISNONTEXT = CZY.NIE.TEKST ## Zwraca wartość PRAWDA, jeśli wartość nie jest tekstem. +ISNUMBER = CZY.LICZBA ## Zwraca wartość PRAWDA, jeśli wartość jest liczbą. +ISODD = ISODD ## Zwraca wartość PRAWDA, jeśli liczba jest nieparzysta. +ISREF = CZY.ADR ## Zwraca wartość PRAWDA, jeśli wartość jest odwołaniem. +ISTEXT = CZY.TEKST ## Zwraca wartość PRAWDA, jeśli wartość jest tekstem. +N = L ## Zwraca wartość przekonwertowaną na postać liczbową. +NA = BRAK ## Zwraca wartość błędu #N/D!. +TYPE = TYP ## Zwraca liczbę wskazującą typ danych wartości. + + +## +## Logical functions Funkcje logiczne +## +AND = ORAZ ## Zwraca wartość PRAWDA, jeśli wszystkie argumenty mają wartość PRAWDA. +FALSE = FAŁSZ ## Zwraca wartość logiczną FAŁSZ. +IF = JEŻELI ## Określa warunek logiczny do sprawdzenia. +IFERROR = JEŻELI.BŁĄD ## Zwraca określoną wartość, jeśli wynikiem obliczenia formuły jest błąd; w przeciwnym przypadku zwraca wynik formuły. +NOT = NIE ## Odwraca wartość logiczną argumentu. +OR = LUB ## Zwraca wartość PRAWDA, jeśli co najmniej jeden z argumentów ma wartość PRAWDA. +TRUE = PRAWDA ## Zwraca wartość logiczną PRAWDA. + + +## +## Lookup and reference functions Funkcje wyszukiwania i odwołań +## +ADDRESS = ADRES ## Zwraca odwołanie do jednej komórki w arkuszu jako wartość tekstową. +AREAS = OBSZARY ## Zwraca liczbę obszarów występujących w odwołaniu. +CHOOSE = WYBIERZ ## Wybiera wartość z listy wartości. +COLUMN = NR.KOLUMNY ## Zwraca numer kolumny z odwołania. +COLUMNS = LICZBA.KOLUMN ## Zwraca liczbę kolumn dla danego odwołania. +HLOOKUP = WYSZUKAJ.POZIOMO ## Przegląda górny wiersz tablicy i zwraca wartość wskazanej komórki. +HYPERLINK = HIPERŁĄCZE ## Tworzy skrót lub skok, który pozwala otwierać dokument przechowywany na serwerze sieciowym, w sieci intranet lub w Internecie. +INDEX = INDEKS ## Używa indeksu do wybierania wartości z odwołania lub tablicy. +INDIRECT = ADR.POŚR ## Zwraca odwołanie określone przez wartość tekstową. +LOOKUP = WYSZUKAJ ## Wyszukuje wartości w wektorze lub tablicy. +MATCH = PODAJ.POZYCJĘ ## Wyszukuje wartości w odwołaniu lub w tablicy. +OFFSET = PRZESUNIĘCIE ## Zwraca adres przesunięty od danego odwołania. +ROW = WIERSZ ## Zwraca numer wiersza odwołania. +ROWS = ILE.WIERSZY ## Zwraca liczbę wierszy dla danego odwołania. +RTD = RTD ## Pobiera dane w czasie rzeczywistym z programu obsługującego automatyzację COM (Automatyzacja: Sposób pracy z obiektami aplikacji pochodzącymi z innej aplikacji lub narzędzia projektowania. Nazywana wcześniej Automatyzacją OLE, Automatyzacja jest standardem przemysłowym i funkcją obiektowego modelu składników (COM, Component Object Model).). +TRANSPOSE = TRANSPONUJ ## Zwraca transponowaną tablicę. +VLOOKUP = WYSZUKAJ.PIONOWO ## Przeszukuje pierwszą kolumnę tablicy i przechodzi wzdłuż wiersza, aby zwrócić wartość komórki. + + +## +## Math and trigonometry functions Funkcje matematyczne i trygonometryczne +## +ABS = MODUŁ.LICZBY ## Zwraca wartość absolutną liczby. +ACOS = ACOS ## Zwraca arcus cosinus liczby. +ACOSH = ACOSH ## Zwraca arcus cosinus hiperboliczny liczby. +ASIN = ASIN ## Zwraca arcus sinus liczby. +ASINH = ASINH ## Zwraca arcus sinus hiperboliczny liczby. +ATAN = ATAN ## Zwraca arcus tangens liczby. +ATAN2 = ATAN2 ## Zwraca arcus tangens liczby na podstawie współrzędnych x i y. +ATANH = ATANH ## Zwraca arcus tangens hiperboliczny liczby. +CEILING = ZAOKR.W.GÓRĘ ## Zaokrągla liczbę do najbliższej liczby całkowitej lub do najbliższej wielokrotności dokładności. +COMBIN = KOMBINACJE ## Zwraca liczbę kombinacji dla danej liczby obiektów. +COS = COS ## Zwraca cosinus liczby. +COSH = COSH ## Zwraca cosinus hiperboliczny liczby. +DEGREES = STOPNIE ## Konwertuje radiany na stopnie. +EVEN = ZAOKR.DO.PARZ ## Zaokrągla liczbę w górę do najbliższej liczby parzystej. +EXP = EXP ## Zwraca wartość liczby e podniesionej do potęgi określonej przez podaną liczbę. +FACT = SILNIA ## Zwraca silnię liczby. +FACTDOUBLE = FACTDOUBLE ## Zwraca podwójną silnię liczby. +FLOOR = ZAOKR.W.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. +GCD = GCD ## Zwraca największy wspólny dzielnik. +INT = ZAOKR.DO.CAŁK ## Zaokrągla liczbę w dół do najbliższej liczby całkowitej. +LCM = LCM ## Zwraca najmniejszą wspólną wielokrotność. +LN = LN ## Zwraca logarytm naturalny podanej liczby. +LOG = LOG ## Zwraca logarytm danej liczby przy zadanej podstawie. +LOG10 = LOG10 ## Zwraca logarytm dziesiętny liczby. +MDETERM = WYZNACZNIK.MACIERZY ## Zwraca wyznacznik macierzy tablicy. +MINVERSE = MACIERZ.ODW ## Zwraca odwrotność macierzy tablicy. +MMULT = MACIERZ.ILOCZYN ## Zwraca iloczyn macierzy dwóch tablic. +MOD = MOD ## Zwraca resztę z dzielenia. +MROUND = MROUND ## Zwraca liczbę zaokrągloną do żądanej wielokrotności. +MULTINOMIAL = MULTINOMIAL ## Zwraca wielomian dla zbioru liczb. +ODD = ZAOKR.DO.NPARZ ## Zaokrągla liczbę w górę do najbliższej liczby nieparzystej. +PI = PI ## Zwraca wartość liczby Pi. +POWER = POTĘGA ## Zwraca liczbę podniesioną do potęgi. +PRODUCT = ILOCZYN ## Mnoży argumenty. +QUOTIENT = QUOTIENT ## Zwraca iloraz (całkowity). +RADIANS = RADIANY ## Konwertuje stopnie na radiany. +RAND = LOS ## Zwraca liczbę pseudolosową z zakresu od 0 do 1. +RANDBETWEEN = RANDBETWEEN ## Zwraca liczbę pseudolosową z zakresu określonego przez podane argumenty. +ROMAN = RZYMSKIE ## Konwertuje liczbę arabską na rzymską jako tekst. +ROUND = ZAOKR ## Zaokrągla liczbę do określonej liczby cyfr. +ROUNDDOWN = ZAOKR.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. +ROUNDUP = ZAOKR.GÓRA ## Zaokrągla liczbę w górę, w kierunku od zera. +SERIESSUM = SERIESSUM ## Zwraca sumę szeregu potęgowego na podstawie wzoru. +SIGN = ZNAK.LICZBY ## Zwraca znak liczby. +SIN = SIN ## Zwraca sinus danego kąta. +SINH = SINH ## Zwraca sinus hiperboliczny liczby. +SQRT = PIERWIASTEK ## Zwraca dodatni pierwiastek kwadratowy. +SQRTPI = SQRTPI ## Zwraca pierwiastek kwadratowy iloczynu (liczba * Pi). +SUBTOTAL = SUMY.POŚREDNIE ## Zwraca sumę częściową listy lub bazy danych. +SUM = SUMA ## Dodaje argumenty. +SUMIF = SUMA.JEŻELI ## Dodaje komórki określone przez podane kryterium. +SUMIFS = SUMA.WARUNKÓW ## Dodaje komórki w zakresie, które spełniają wiele kryteriów. +SUMPRODUCT = SUMA.ILOCZYNÓW ## Zwraca sumę iloczynów odpowiednich elementów tablicy. +SUMSQ = SUMA.KWADRATÓW ## Zwraca sumę kwadratów argumentów. +SUMX2MY2 = SUMA.X2.M.Y2 ## Zwraca sumę różnic kwadratów odpowiednich wartości w dwóch tablicach. +SUMX2PY2 = SUMA.X2.P.Y2 ## Zwraca sumę sum kwadratów odpowiednich wartości w dwóch tablicach. +SUMXMY2 = SUMA.XMY.2 ## Zwraca sumę kwadratów różnic odpowiednich wartości w dwóch tablicach. +TAN = TAN ## Zwraca tangens liczby. +TANH = TANH ## Zwraca tangens hiperboliczny liczby. +TRUNC = LICZBA.CAŁK ## Przycina liczbę do wartości całkowitej. + + +## +## Statistical functions Funkcje statystyczne +## +AVEDEV = ODCH.ŚREDNIE ## Zwraca średnią wartość odchyleń absolutnych punktów danych od ich wartości średniej. +AVERAGE = ŚREDNIA ## Zwraca wartość średnią argumentów. +AVERAGEA = ŚREDNIA.A ## Zwraca wartość średnią argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +AVERAGEIF = ŚREDNIA.JEŻELI ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek w zakresie, które spełniają podane kryteria. +AVERAGEIFS = ŚREDNIA.WARUNKÓW ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek, które spełniają jedno lub więcej kryteriów. +BETADIST = ROZKŁAD.BETA ## Zwraca skumulowaną funkcję gęstości prawdopodobieństwa beta. +BETAINV = ROZKŁAD.BETA.ODW ## Zwraca odwrotność skumulowanej funkcji gęstości prawdopodobieństwa beta. +BINOMDIST = ROZKŁAD.DWUM ## Zwraca pojedynczy składnik dwumianowego rozkładu prawdopodobieństwa. +CHIDIST = ROZKŁAD.CHI ## Zwraca wartość jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. +CHIINV = ROZKŁAD.CHI.ODW ## Zwraca odwrotność wartości jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. +CHITEST = TEST.CHI ## Zwraca test niezależności. +CONFIDENCE = UFNOŚĆ ## Zwraca interwał ufności dla średniej populacji. +CORREL = WSP.KORELACJI ## Zwraca współczynnik korelacji dwóch zbiorów danych. +COUNT = ILE.LICZB ## Zlicza liczby znajdujące się na liście argumentów. +COUNTA = ILE.NIEPUSTYCH ## Zlicza wartości znajdujące się na liście argumentów. +COUNTBLANK = LICZ.PUSTE ## Zwraca liczbę pustych komórek w pewnym zakresie. +COUNTIF = LICZ.JEŻELI ## Zlicza komórki wewnątrz zakresu, które spełniają podane kryteria. +COUNTIFS = LICZ.WARUNKI ## Zlicza komórki wewnątrz zakresu, które spełniają wiele kryteriów. +COVAR = KOWARIANCJA ## Zwraca kowariancję, czyli średnią wartość iloczynów odpowiednich odchyleń. +CRITBINOM = PRÓG.ROZKŁAD.DWUM ## Zwraca najmniejszą wartość, dla której skumulowany rozkład dwumianowy jest mniejszy niż wartość kryterium lub równy jej. +DEVSQ = ODCH.KWADRATOWE ## Zwraca sumę kwadratów odchyleń. +EXPONDIST = ROZKŁAD.EXP ## Zwraca rozkład wykładniczy. +FDIST = ROZKŁAD.F ## Zwraca rozkład prawdopodobieństwa F. +FINV = ROZKŁAD.F.ODW ## Zwraca odwrotność rozkładu prawdopodobieństwa F. +FISHER = ROZKŁAD.FISHER ## Zwraca transformację Fishera. +FISHERINV = ROZKŁAD.FISHER.ODW ## Zwraca odwrotność transformacji Fishera. +FORECAST = REGLINX ## Zwraca wartość trendu liniowego. +FREQUENCY = CZĘSTOŚĆ ## Zwraca rozkład częstotliwości jako tablicę pionową. +FTEST = TEST.F ## Zwraca wynik testu F. +GAMMADIST = ROZKŁAD.GAMMA ## Zwraca rozkład gamma. +GAMMAINV = ROZKŁAD.GAMMA.ODW ## Zwraca odwrotność skumulowanego rozkładu gamma. +GAMMALN = ROZKŁAD.LIN.GAMMA ## Zwraca logarytm naturalny funkcji gamma, Γ(x). +GEOMEAN = ŚREDNIA.GEOMETRYCZNA ## Zwraca średnią geometryczną. +GROWTH = REGEXPW ## Zwraca wartości trendu wykładniczego. +HARMEAN = ŚREDNIA.HARMONICZNA ## Zwraca średnią harmoniczną. +HYPGEOMDIST = ROZKŁAD.HIPERGEOM ## Zwraca rozkład hipergeometryczny. +INTERCEPT = ODCIĘTA ## Zwraca punkt przecięcia osi pionowej z linią regresji liniowej. +KURT = KURTOZA ## Zwraca kurtozę zbioru danych. +LARGE = MAX.K ## Zwraca k-tą największą wartość ze zbioru danych. +LINEST = REGLINP ## Zwraca parametry trendu liniowego. +LOGEST = REGEXPP ## Zwraca parametry trendu wykładniczego. +LOGINV = ROZKŁAD.LOG.ODW ## Zwraca odwrotność rozkładu logarytmu naturalnego. +LOGNORMDIST = ROZKŁAD.LOG ## Zwraca skumulowany rozkład logarytmu naturalnego. +MAX = MAX ## Zwraca maksymalną wartość listy argumentów. +MAXA = MAX.A ## Zwraca maksymalną wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +MEDIAN = MEDIANA ## Zwraca medianę podanych liczb. +MIN = MIN ## Zwraca minimalną wartość listy argumentów. +MINA = MIN.A ## Zwraca najmniejszą wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +MODE = WYST.NAJCZĘŚCIEJ ## Zwraca wartość najczęściej występującą w zbiorze danych. +NEGBINOMDIST = ROZKŁAD.DWUM.PRZEC ## Zwraca ujemny rozkład dwumianowy. +NORMDIST = ROZKŁAD.NORMALNY ## Zwraca rozkład normalny skumulowany. +NORMINV = ROZKŁAD.NORMALNY.ODW ## Zwraca odwrotność rozkładu normalnego skumulowanego. +NORMSDIST = ROZKŁAD.NORMALNY.S ## Zwraca standardowy rozkład normalny skumulowany. +NORMSINV = ROZKŁAD.NORMALNY.S.ODW ## Zwraca odwrotność standardowego rozkładu normalnego skumulowanego. +PEARSON = PEARSON ## Zwraca współczynnik korelacji momentu iloczynu Pearsona. +PERCENTILE = PERCENTYL ## Wyznacza k-ty percentyl wartości w zakresie. +PERCENTRANK = PROCENT.POZYCJA ## Zwraca procentową pozycję wartości w zbiorze danych. +PERMUT = PERMUTACJE ## Zwraca liczbę permutacji dla danej liczby obiektów. +POISSON = ROZKŁAD.POISSON ## Zwraca rozkład Poissona. +PROB = PRAWDPD ## Zwraca prawdopodobieństwo, że wartości w zakresie leżą pomiędzy dwiema granicami. +QUARTILE = KWARTYL ## Wyznacza kwartyl zbioru danych. +RANK = POZYCJA ## Zwraca pozycję liczby na liście liczb. +RSQ = R.KWADRAT ## Zwraca kwadrat współczynnika korelacji momentu iloczynu Pearsona. +SKEW = SKOŚNOŚĆ ## Zwraca skośność rozkładu. +SLOPE = NACHYLENIE ## Zwraca nachylenie linii regresji liniowej. +SMALL = MIN.K ## Zwraca k-tą najmniejszą wartość ze zbioru danych. +STANDARDIZE = NORMALIZUJ ## Zwraca wartość znormalizowaną. +STDEV = ODCH.STANDARDOWE ## Szacuje odchylenie standardowe na podstawie próbki. +STDEVA = ODCH.STANDARDOWE.A ## Szacuje odchylenie standardowe na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. +STDEVP = ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji. +STDEVPA = ODCH.STANDARD.POPUL.A ## Oblicza odchylenie standardowe na podstawie całej populacji, z uwzględnieniem liczb, teksów i wartości logicznych. +STEYX = REGBŁSTD ## Zwraca błąd standardowy przewidzianej wartości y dla każdej wartości x w regresji. +TDIST = ROZKŁAD.T ## Zwraca rozkład t-Studenta. +TINV = ROZKŁAD.T.ODW ## Zwraca odwrotność rozkładu t-Studenta. +TREND = REGLINW ## Zwraca wartości trendu liniowego. +TRIMMEAN = ŚREDNIA.WEWN ## Zwraca średnią wartość dla wnętrza zbioru danych. +TTEST = TEST.T ## Zwraca prawdopodobieństwo związane z testem t-Studenta. +VAR = WARIANCJA ## Szacuje wariancję na podstawie próbki. +VARA = WARIANCJA.A ## Szacuje wariancję na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. +VARP = WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji. +VARPA = WARIANCJA.POPUL.A ## Oblicza wariancję na podstawie całej populacji, z uwzględnieniem liczb, tekstów i wartości logicznych. +WEIBULL = ROZKŁAD.WEIBULL ## Zwraca rozkład Weibulla. +ZTEST = TEST.Z ## Zwraca wartość jednostronnego prawdopodobieństwa testu z. + + +## +## Text functions Funkcje tekstowe +## +ASC = ASC ## Zamienia litery angielskie lub katakana o pełnej szerokości (dwubajtowe) w ciągu znaków na znaki o szerokości połówkowej (jednobajtowe). +BAHTTEXT = BAHTTEXT ## Konwertuje liczbę na tekst, stosując format walutowy ß (baht). +CHAR = ZNAK ## Zwraca znak o podanym numerze kodu. +CLEAN = OCZYŚĆ ## Usuwa z tekstu wszystkie znaki, które nie mogą być drukowane. +CODE = KOD ## Zwraca kod numeryczny pierwszego znaku w ciągu tekstowym. +CONCATENATE = ZŁĄCZ.TEKSTY ## Łączy kilka oddzielnych tekstów w jeden tekst. +DOLLAR = KWOTA ## Konwertuje liczbę na tekst, stosując format walutowy $ (dolar). +EXACT = PORÓWNAJ ## Sprawdza identyczność dwóch wartości tekstowych. +FIND = ZNAJDŹ ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). +FINDB = ZNAJDŹB ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). +FIXED = ZAOKR.DO.TEKST ## Formatuje liczbę jako tekst przy stałej liczbie miejsc dziesiętnych. +JIS = JIS ## Zmienia litery angielskie lub katakana o szerokości połówkowej (jednobajtowe) w ciągu znaków na znaki o pełnej szerokości (dwubajtowe). +LEFT = LEWY ## Zwraca skrajne lewe znaki z wartości tekstowej. +LEFTB = LEWYB ## Zwraca skrajne lewe znaki z wartości tekstowej. +LEN = DŁ ## Zwraca liczbę znaków ciągu tekstowego. +LENB = DŁ.B ## Zwraca liczbę znaków ciągu tekstowego. +LOWER = LITERY.MAŁE ## Konwertuje wielkie litery tekstu na małe litery. +MID = FRAGMENT.TEKSTU ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. +MIDB = FRAGMENT.TEKSTU.B ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. +PHONETIC = PHONETIC ## Wybiera znaki fonetyczne (furigana) z ciągu tekstowego. +PROPER = Z.WIELKIEJ.LITERY ## Zastępuje pierwszą literę każdego wyrazu tekstu wielką literą. +REPLACE = ZASTĄP ## Zastępuje znaki w tekście. +REPLACEB = ZASTĄP.B ## Zastępuje znaki w tekście. +REPT = POWT ## Powiela tekst daną liczbę razy. +RIGHT = PRAWY ## Zwraca skrajne prawe znaki z wartości tekstowej. +RIGHTB = PRAWYB ## Zwraca skrajne prawe znaki z wartości tekstowej. +SEARCH = SZUKAJ.TEKST ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). +SEARCHB = SZUKAJ.TEKST.B ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). +SUBSTITUTE = PODSTAW ## Podstawia nowy tekst w miejsce poprzedniego tekstu w ciągu tekstowym. +T = T ## Konwertuje argumenty na tekst. +TEXT = TEKST ## Formatuje liczbę i konwertuje ją na tekst. +TRIM = USUŃ.ZBĘDNE.ODSTĘPY ## Usuwa spacje z tekstu. +UPPER = LITERY.WIELKIE ## Konwertuje znaki tekstu na wielkie litery. +VALUE = WARTOŚĆ ## Konwertuje argument tekstowy na liczbę. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/config new file mode 100755 index 0000000..904f99f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = R$ + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULO! +DIV0 = #DIV/0! +VALUE = #VALOR! +REF = #REF! +NAME = #NOME? +NUM = #NÚM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/functions new file mode 100755 index 0000000..a062a7f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/br/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Funções Suplemento e Automação +## +GETPIVOTDATA = INFODADOSTABELADINÂMICA ## Retorna os dados armazenados em um relatório de tabela dinâmica + + +## +## Cube functions Funções de Cubo +## +CUBEKPIMEMBER = MEMBROKPICUBO ## Retorna o nome de um KPI (indicador de desempenho-chave), uma propriedade e uma medida e exibe o nome e a propriedade na célula. Um KPI é uma medida quantificável, como o lucro bruto mensal ou a rotatividade trimestral dos funcionários, usada para monitorar o desempenho de uma organização. +CUBEMEMBER = MEMBROCUBO ## Retorna um membro ou tupla em uma hierarquia de cubo. Use para validar se o membro ou tupla existe no cubo. +CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Retorna o valor da propriedade de um membro no cubo. Usada para validar a existência do nome do membro no cubo e para retornar a propriedade especificada para esse membro. +CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Retorna o enésimo membro, ou o membro ordenado, em um conjunto. Use para retornar um ou mais elementos em um conjunto, assim como o melhor vendedor ou os dez melhores alunos. +CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou tuplas enviando uma expressão do conjunto para o cubo no servidor, que cria o conjunto e o retorna para o Microsoft Office Excel. +CUBESETCOUNT = CONTAGEMCONJUNTOCUBO ## Retorna o número de itens em um conjunto. +CUBEVALUE = VALORCUBO ## Retorna um valor agregado de um cubo. + + +## +## Database functions Funções de banco de dados +## +DAVERAGE = BDMÉDIA ## Retorna a média das entradas selecionadas de um banco de dados +DCOUNT = BDCONTAR ## Conta as células que contêm números em um banco de dados +DCOUNTA = BDCONTARA ## Conta células não vazias em um banco de dados +DGET = BDEXTRAIR ## Extrai de um banco de dados um único registro que corresponde a um critério específico +DMAX = BDMÁX ## Retorna o valor máximo de entradas selecionadas de um banco de dados +DMIN = BDMÍN ## Retorna o valor mínimo de entradas selecionadas de um banco de dados +DPRODUCT = BDMULTIPL ## Multiplica os valores em um campo específico de registros que correspondem ao critério em um banco de dados +DSTDEV = BDEST ## Estima o desvio padrão com base em uma amostra de entradas selecionadas de um banco de dados +DSTDEVP = BDDESVPA ## Calcula o desvio padrão com base na população inteira de entradas selecionadas de um banco de dados +DSUM = BDSOMA ## Adiciona os números à coluna de campos de registros do banco de dados que correspondem ao critério +DVAR = BDVAREST ## Estima a variância com base em uma amostra de entradas selecionadas de um banco de dados +DVARP = BDVARP ## Calcula a variância com base na população inteira de entradas selecionadas de um banco de dados + + +## +## Date and time functions Funções de data e hora +## +DATE = DATA ## Retorna o número de série de uma data específica +DATEVALUE = DATA.VALOR ## Converte uma data na forma de texto para um número de série +DAY = DIA ## Converte um número de série em um dia do mês +DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base em um ano de 360 dias +EDATE = DATAM ## Retorna o número de série da data que é o número indicado de meses antes ou depois da data inicial +EOMONTH = FIMMÊS ## Retorna o número de série do último dia do mês antes ou depois de um número especificado de meses +HOUR = HORA ## Converte um número de série em uma hora +MINUTE = MINUTO ## Converte um número de série em um minuto +MONTH = MÊS ## Converte um número de série em um mês +NETWORKDAYS = DIATRABALHOTOTAL ## Retorna o número de dias úteis inteiros entre duas datas +NOW = AGORA ## Retorna o número de série seqüencial da data e hora atuais +SECOND = SEGUNDO ## Converte um número de série em um segundo +TIME = HORA ## Retorna o número de série de uma hora específica +TIMEVALUE = VALOR.TEMPO ## Converte um horário na forma de texto para um número de série +TODAY = HOJE ## Retorna o número de série da data de hoje +WEEKDAY = DIA.DA.SEMANA ## Converte um número de série em um dia da semana +WEEKNUM = NÚMSEMANA ## Converte um número de série em um número que representa onde a semana cai numericamente em um ano +WORKDAY = DIATRABALHO ## Retorna o número de série da data antes ou depois de um número específico de dias úteis +YEAR = ANO ## Converte um número de série em um ano +YEARFRAC = FRAÇÃOANO ## Retorna a fração do ano que representa o número de dias entre data_inicial e data_final + + +## +## Engineering functions Funções de engenharia +## +BESSELI = BESSELI ## Retorna a função de Bessel In(x) modificada +BESSELJ = BESSELJ ## Retorna a função de Bessel Jn(x) +BESSELK = BESSELK ## Retorna a função de Bessel Kn(x) modificada +BESSELY = BESSELY ## Retorna a função de Bessel Yn(x) +BIN2DEC = BIN2DEC ## Converte um número binário em decimal +BIN2HEX = BIN2HEX ## Converte um número binário em hexadecimal +BIN2OCT = BIN2OCT ## Converte um número binário em octal +COMPLEX = COMPLEX ## Converte coeficientes reais e imaginários e um número complexo +CONVERT = CONVERTER ## Converte um número de um sistema de medida para outro +DEC2BIN = DECABIN ## Converte um número decimal em binário +DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal +DEC2OCT = DECAOCT ## Converte um número decimal em octal +DELTA = DELTA ## Testa se dois valores são iguais +ERF = FUNERRO ## Retorna a função de erro +ERFC = FUNERROCOMPL ## Retorna a função de erro complementar +GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite +HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário +HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal +HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal +IMABS = IMABS ## Retorna o valor absoluto (módulo) de um número complexo +IMAGINARY = IMAGINÁRIO ## Retorna o coeficiente imaginário de um número complexo +IMARGUMENT = IMARG ## Retorna o argumento teta, um ângulo expresso em radianos +IMCONJUGATE = IMCONJ ## Retorna o conjugado complexo de um número complexo +IMCOS = IMCOS ## Retorna o cosseno de um número complexo +IMDIV = IMDIV ## Retorna o quociente de dois números complexos +IMEXP = IMEXP ## Retorna o exponencial de um número complexo +IMLN = IMLN ## Retorna o logaritmo natural de um número complexo +IMLOG10 = IMLOG10 ## Retorna o logaritmo de base 10 de um número complexo +IMLOG2 = IMLOG2 ## Retorna o logaritmo de base 2 de um número complexo +IMPOWER = IMPOT ## Retorna um número complexo elevado a uma potência inteira +IMPRODUCT = IMPROD ## Retorna o produto de números complexos +IMREAL = IMREAL ## Retorna o coeficiente real de um número complexo +IMSIN = IMSENO ## Retorna o seno de um número complexo +IMSQRT = IMRAIZ ## Retorna a raiz quadrada de um número complexo +IMSUB = IMSUBTR ## Retorna a diferença entre dois números complexos +IMSUM = IMSOMA ## Retorna a soma de números complexos +OCT2BIN = OCTABIN ## Converte um número octal em binário +OCT2DEC = OCTADEC ## Converte um número octal em decimal +OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal + + +## +## Financial functions Funções financeiras +## +ACCRINT = JUROSACUM ## Retorna a taxa de juros acumulados de um título que paga uma taxa periódica de juros +ACCRINTM = JUROSACUMV ## Retorna os juros acumulados de um título que paga juros no vencimento +AMORDEGRC = AMORDEGRC ## Retorna a depreciação para cada período contábil usando o coeficiente de depreciação +AMORLINC = AMORLINC ## Retorna a depreciação para cada período contábil +COUPDAYBS = CUPDIASINLIQ ## Retorna o número de dias do início do período de cupom até a data de liquidação +COUPDAYS = CUPDIAS ## Retorna o número de dias no período de cupom que contém a data de quitação +COUPDAYSNC = CUPDIASPRÓX ## Retorna o número de dias da data de liquidação até a data do próximo cupom +COUPNCD = CUPDATAPRÓX ## Retorna a próxima data de cupom após a data de quitação +COUPNUM = CUPNÚM ## Retorna o número de cupons pagáveis entre as datas de quitação e vencimento +COUPPCD = CUPDATAANT ## Retorna a data de cupom anterior à data de quitação +CUMIPMT = PGTOJURACUM ## Retorna os juros acumulados pagos entre dois períodos +CUMPRINC = PGTOCAPACUM ## Retorna o capital acumulado pago sobre um empréstimo entre dois períodos +DB = BD ## Retorna a depreciação de um ativo para um período especificado, usando o método de balanço de declínio fixo +DDB = BDD ## Retorna a depreciação de um ativo com relação a um período especificado usando o método de saldos decrescentes duplos ou qualquer outro método especificado por você +DISC = DESC ## Retorna a taxa de desconto de um título +DOLLARDE = MOEDADEC ## Converte um preço em formato de moeda, na forma fracionária, em um preço na forma decimal +DOLLARFR = MOEDAFRA ## Converte um preço, apresentado na forma decimal, em um preço apresentado na forma fracionária +DURATION = DURAÇÃO ## Retorna a duração anual de um título com pagamentos de juros periódicos +EFFECT = EFETIVA ## Retorna a taxa de juros anual efetiva +FV = VF ## Retorna o valor futuro de um investimento +FVSCHEDULE = VFPLANO ## Retorna o valor futuro de um capital inicial após a aplicação de uma série de taxas de juros compostas +INTRATE = TAXAJUROS ## Retorna a taxa de juros de um título totalmente investido +IPMT = IPGTO ## Retorna o pagamento de juros para um investimento em um determinado período +IRR = TIR ## Retorna a taxa interna de retorno de uma série de fluxos de caixa +ISPMT = ÉPGTO ## Calcula os juros pagos durante um período específico de um investimento +MDURATION = MDURAÇÃO ## Retorna a duração de Macauley modificada para um título com um valor de paridade equivalente a R$ 100 +MIRR = MTIR ## Calcula a taxa interna de retorno em que fluxos de caixa positivos e negativos são financiados com diferentes taxas +NOMINAL = NOMINAL ## Retorna a taxa de juros nominal anual +NPER = NPER ## Retorna o número de períodos de um investimento +NPV = VPL ## Retorna o valor líquido atual de um investimento com base em uma série de fluxos de caixa periódicos e em uma taxa de desconto +ODDFPRICE = PREÇOPRIMINC ## Retorna o preço por R$ 100 de valor nominal de um título com um primeiro período indefinido +ODDFYIELD = LUCROPRIMINC ## Retorna o rendimento de um título com um primeiro período indefinido +ODDLPRICE = PREÇOÚLTINC ## Retorna o preço por R$ 100 de valor nominal de um título com um último período de cupom indefinido +ODDLYIELD = LUCROÚLTINC ## Retorna o rendimento de um título com um último período indefinido +PMT = PGTO ## Retorna o pagamento periódico de uma anuidade +PPMT = PPGTO ## Retorna o pagamento de capital para determinado período de investimento +PRICE = PREÇO ## Retorna a preço por R$ 100,00 de valor nominal de um título que paga juros periódicos +PRICEDISC = PREÇODESC ## Retorna o preço por R$ 100,00 de valor nominal de um título descontado +PRICEMAT = PREÇOVENC ## Retorna o preço por R$ 100,00 de valor nominal de um título que paga juros no vencimento +PV = VP ## Retorna o valor presente de um investimento +RATE = TAXA ## Retorna a taxa de juros por período de uma anuidade +RECEIVED = RECEBER ## Retorna a quantia recebida no vencimento de um título totalmente investido +SLN = DPD ## Retorna a depreciação em linha reta de um ativo durante um período +SYD = SDA ## Retorna a depreciação dos dígitos da soma dos anos de um ativo para um período especificado +TBILLEQ = OTN ## Retorna o rendimento de um título equivalente a uma obrigação do Tesouro +TBILLPRICE = OTNVALOR ## Retorna o preço por R$ 100,00 de valor nominal de uma obrigação do Tesouro +TBILLYIELD = OTNLUCRO ## Retorna o rendimento de uma obrigação do Tesouro +VDB = BDV ## Retorna a depreciação de um ativo para um período especificado ou parcial usando um método de balanço declinante +XIRR = XTIR ## Fornece a taxa interna de retorno para um programa de fluxos de caixa que não é necessariamente periódico +XNPV = XVPL ## Retorna o valor presente líquido de um programa de fluxos de caixa que não é necessariamente periódico +YIELD = LUCRO ## Retorna o lucro de um título que paga juros periódicos +YIELDDISC = LUCRODESC ## Retorna o rendimento anual de um título descontado. Por exemplo, uma obrigação do Tesouro +YIELDMAT = LUCROVENC ## Retorna o lucro anual de um título que paga juros no vencimento + + +## +## Information functions Funções de informação +## +CELL = CÉL ## Retorna informações sobre formatação, localização ou conteúdo de uma célula +ERROR.TYPE = TIPO.ERRO ## Retorna um número correspondente a um tipo de erro +INFO = INFORMAÇÃO ## Retorna informações sobre o ambiente operacional atual +ISBLANK = ÉCÉL.VAZIA ## Retorna VERDADEIRO se o valor for vazio +ISERR = ÉERRO ## Retorna VERDADEIRO se o valor for um valor de erro diferente de #N/D +ISERROR = ÉERROS ## Retorna VERDADEIRO se o valor for um valor de erro +ISEVEN = ÉPAR ## Retorna VERDADEIRO se o número for par +ISLOGICAL = ÉLÓGICO ## Retorna VERDADEIRO se o valor for um valor lógico +ISNA = É.NÃO.DISP ## Retorna VERDADEIRO se o valor for o valor de erro #N/D +ISNONTEXT = É.NÃO.TEXTO ## Retorna VERDADEIRO se o valor for diferente de texto +ISNUMBER = ÉNÚM ## Retorna VERDADEIRO se o valor for um número +ISODD = ÉIMPAR ## Retorna VERDADEIRO se o número for ímpar +ISREF = ÉREF ## Retorna VERDADEIRO se o valor for uma referência +ISTEXT = ÉTEXTO ## Retorna VERDADEIRO se o valor for texto +N = N ## Retorna um valor convertido em um número +NA = NÃO.DISP ## Retorna o valor de erro #N/D +TYPE = TIPO ## Retorna um número indicando o tipo de dados de um valor + + +## +## Logical functions Funções lógicas +## +AND = E ## Retorna VERDADEIRO se todos os seus argumentos forem VERDADEIROS +FALSE = FALSO ## Retorna o valor lógico FALSO +IF = SE ## Especifica um teste lógico a ser executado +IFERROR = SEERRO ## Retornará um valor que você especifica se uma fórmula for avaliada para um erro; do contrário, retornará o resultado da fórmula +NOT = NÃO ## Inverte o valor lógico do argumento +OR = OU ## Retorna VERDADEIRO se um dos argumentos for VERDADEIRO +TRUE = VERDADEIRO ## Retorna o valor lógico VERDADEIRO + + +## +## Lookup and reference functions Funções de pesquisa e referência +## +ADDRESS = ENDEREÇO ## Retorna uma referência como texto para uma única célula em uma planilha +AREAS = ÁREAS ## Retorna o número de áreas em uma referência +CHOOSE = ESCOLHER ## Escolhe um valor a partir de uma lista de valores +COLUMN = COL ## Retorna o número da coluna de uma referência +COLUMNS = COLS ## Retorna o número de colunas em uma referência +HLOOKUP = PROCH ## Procura na linha superior de uma matriz e retorna o valor da célula especificada +HYPERLINK = HYPERLINK ## Cria um atalho ou salto que abre um documento armazenado em um servidor de rede, uma intranet ou na Internet +INDEX = ÍNDICE ## Usa um índice para escolher um valor de uma referência ou matriz +INDIRECT = INDIRETO ## Retorna uma referência indicada por um valor de texto +LOOKUP = PROC ## Procura valores em um vetor ou em uma matriz +MATCH = CORRESP ## Procura valores em uma referência ou em uma matriz +OFFSET = DESLOC ## Retorna um deslocamento de referência com base em uma determinada referência +ROW = LIN ## Retorna o número da linha de uma referência +ROWS = LINS ## Retorna o número de linhas em uma referência +RTD = RTD ## Recupera dados em tempo real de um programa que ofereça suporte a automação COM (automação: uma forma de trabalhar com objetos de um aplicativo a partir de outro aplicativo ou ferramenta de desenvolvimento. Chamada inicialmente de automação OLE, a automação é um padrão industrial e um recurso do modelo de objeto componente (COM).) +TRANSPOSE = TRANSPOR ## Retorna a transposição de uma matriz +VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e move ao longo da linha para retornar o valor de uma célula + + +## +## Math and trigonometry functions Funções matemáticas e trigonométricas +## +ABS = ABS ## Retorna o valor absoluto de um número +ACOS = ACOS ## Retorna o arco cosseno de um número +ACOSH = ACOSH ## Retorna o cosseno hiperbólico inverso de um número +ASIN = ASEN ## Retorna o arco seno de um número +ASINH = ASENH ## Retorna o seno hiperbólico inverso de um número +ATAN = ATAN ## Retorna o arco tangente de um número +ATAN2 = ATAN2 ## Retorna o arco tangente das coordenadas x e y especificadas +ATANH = ATANH ## Retorna a tangente hiperbólica inversa de um número +CEILING = TETO ## Arredonda um número para o inteiro mais próximo ou para o múltiplo mais próximo de significância +COMBIN = COMBIN ## Retorna o número de combinações de um determinado número de objetos +COS = COS ## Retorna o cosseno de um número +COSH = COSH ## Retorna o cosseno hiperbólico de um número +DEGREES = GRAUS ## Converte radianos em graus +EVEN = PAR ## Arredonda um número para cima até o inteiro par mais próximo +EXP = EXP ## Retorna e elevado à potência de um número especificado +FACT = FATORIAL ## Retorna o fatorial de um número +FACTDOUBLE = FATDUPLO ## Retorna o fatorial duplo de um número +FLOOR = ARREDMULTB ## Arredonda um número para baixo até zero +GCD = MDC ## Retorna o máximo divisor comum +INT = INT ## Arredonda um número para baixo até o número inteiro mais próximo +LCM = MMC ## Retorna o mínimo múltiplo comum +LN = LN ## Retorna o logaritmo natural de um número +LOG = LOG ## Retorna o logaritmo de um número de uma base especificada +LOG10 = LOG10 ## Retorna o logaritmo de base 10 de um número +MDETERM = MATRIZ.DETERM ## Retorna o determinante de uma matriz de uma variável do tipo matriz +MINVERSE = MATRIZ.INVERSO ## Retorna a matriz inversa de uma matriz +MMULT = MATRIZ.MULT ## Retorna o produto de duas matrizes +MOD = RESTO ## Retorna o resto da divisão +MROUND = MARRED ## Retorna um número arredondado ao múltiplo desejado +MULTINOMIAL = MULTINOMIAL ## Retorna o multinomial de um conjunto de números +ODD = ÍMPAR ## Arredonda um número para cima até o inteiro ímpar mais próximo +PI = PI ## Retorna o valor de Pi +POWER = POTÊNCIA ## Fornece o resultado de um número elevado a uma potência +PRODUCT = MULT ## Multiplica seus argumentos +QUOTIENT = QUOCIENTE ## Retorna a parte inteira de uma divisão +RADIANS = RADIANOS ## Converte graus em radianos +RAND = ALEATÓRIO ## Retorna um número aleatório entre 0 e 1 +RANDBETWEEN = ALEATÓRIOENTRE ## Retorna um número aleatório entre os números especificados +ROMAN = ROMANO ## Converte um algarismo arábico em romano, como texto +ROUND = ARRED ## Arredonda um número até uma quantidade especificada de dígitos +ROUNDDOWN = ARREDONDAR.PARA.BAIXO ## Arredonda um número para baixo até zero +ROUNDUP = ARREDONDAR.PARA.CIMA ## Arredonda um número para cima, afastando-o de zero +SERIESSUM = SOMASEQÜÊNCIA ## Retorna a soma de uma série polinomial baseada na fórmula +SIGN = SINAL ## Retorna o sinal de um número +SIN = SEN ## Retorna o seno de um ângulo dado +SINH = SENH ## Retorna o seno hiperbólico de um número +SQRT = RAIZ ## Retorna uma raiz quadrada positiva +SQRTPI = RAIZPI ## Retorna a raiz quadrada de (núm* pi) +SUBTOTAL = SUBTOTAL ## Retorna um subtotal em uma lista ou em um banco de dados +SUM = SOMA ## Soma seus argumentos +SUMIF = SOMASE ## Adiciona as células especificadas por um determinado critério +SUMIFS = SOMASE ## Adiciona as células em um intervalo que atende a vários critérios +SUMPRODUCT = SOMARPRODUTO ## Retorna a soma dos produtos de componentes correspondentes de matrizes +SUMSQ = SOMAQUAD ## Retorna a soma dos quadrados dos argumentos +SUMX2MY2 = SOMAX2DY2 ## Retorna a soma da diferença dos quadrados dos valores correspondentes em duas matrizes +SUMX2PY2 = SOMAX2SY2 ## Retorna a soma da soma dos quadrados dos valores correspondentes em duas matrizes +SUMXMY2 = SOMAXMY2 ## Retorna a soma dos quadrados das diferenças dos valores correspondentes em duas matrizes +TAN = TAN ## Retorna a tangente de um número +TANH = TANH ## Retorna a tangente hiperbólica de um número +TRUNC = TRUNCAR ## Trunca um número para um inteiro + + +## +## Statistical functions Funções estatísticas +## +AVEDEV = DESV.MÉDIO ## Retorna a média aritmética dos desvios médios dos pontos de dados a partir de sua média +AVERAGE = MÉDIA ## Retorna a média dos argumentos +AVERAGEA = MÉDIAA ## Retorna a média dos argumentos, inclusive números, texto e valores lógicos +AVERAGEIF = MÉDIASE ## Retorna a média (média aritmética) de todas as células em um intervalo que atendem a um determinado critério +AVERAGEIFS = MÉDIASES ## Retorna a média (média aritmética) de todas as células que atendem a múltiplos critérios. +BETADIST = DISTBETA ## Retorna a função de distribuição cumulativa beta +BETAINV = BETA.ACUM.INV ## Retorna o inverso da função de distribuição cumulativa para uma distribuição beta especificada +BINOMDIST = DISTRBINOM ## Retorna a probabilidade de distribuição binomial do termo individual +CHIDIST = DIST.QUI ## Retorna a probabilidade unicaudal da distribuição qui-quadrada +CHIINV = INV.QUI ## Retorna o inverso da probabilidade uni-caudal da distribuição qui-quadrada +CHITEST = TESTE.QUI ## Retorna o teste para independência +CONFIDENCE = INT.CONFIANÇA ## Retorna o intervalo de confiança para uma média da população +CORREL = CORREL ## Retorna o coeficiente de correlação entre dois conjuntos de dados +COUNT = CONT.NÚM ## Calcula quantos números há na lista de argumentos +COUNTA = CONT.VALORES ## Calcula quantos valores há na lista de argumentos +COUNTBLANK = CONTAR.VAZIO ## Conta o número de células vazias no intervalo especificado +COUNTIF = CONT.SE ## Calcula o número de células não vazias em um intervalo que corresponde a determinados critérios +COUNTIFS = CONT.SES ## Conta o número de células dentro de um intervalo que atende a múltiplos critérios +COVAR = COVAR ## Retorna a covariância, a média dos produtos dos desvios pares +CRITBINOM = CRIT.BINOM ## Retorna o menor valor para o qual a distribuição binomial cumulativa é menor ou igual ao valor padrão +DEVSQ = DESVQ ## Retorna a soma dos quadrados dos desvios +EXPONDIST = DISTEXPON ## Retorna a distribuição exponencial +FDIST = DISTF ## Retorna a distribuição de probabilidade F +FINV = INVF ## Retorna o inverso da distribuição de probabilidades F +FISHER = FISHER ## Retorna a transformação Fisher +FISHERINV = FISHERINV ## Retorna o inverso da transformação Fisher +FORECAST = PREVISÃO ## Retorna um valor ao longo de uma linha reta +FREQUENCY = FREQÜÊNCIA ## Retorna uma distribuição de freqüência como uma matriz vertical +FTEST = TESTEF ## Retorna o resultado de um teste F +GAMMADIST = DISTGAMA ## Retorna a distribuição gama +GAMMAINV = INVGAMA ## Retorna o inverso da distribuição cumulativa gama +GAMMALN = LNGAMA ## Retorna o logaritmo natural da função gama, G(x) +GEOMEAN = MÉDIA.GEOMÉTRICA ## Retorna a média geométrica +GROWTH = CRESCIMENTO ## Retorna valores ao longo de uma tendência exponencial +HARMEAN = MÉDIA.HARMÔNICA ## Retorna a média harmônica +HYPGEOMDIST = DIST.HIPERGEOM ## Retorna a distribuição hipergeométrica +INTERCEPT = INTERCEPÇÃO ## Retorna a intercepção da linha de regressão linear +KURT = CURT ## Retorna a curtose de um conjunto de dados +LARGE = MAIOR ## Retorna o maior valor k-ésimo de um conjunto de dados +LINEST = PROJ.LIN ## Retorna os parâmetros de uma tendência linear +LOGEST = PROJ.LOG ## Retorna os parâmetros de uma tendência exponencial +LOGINV = INVLOG ## Retorna o inverso da distribuição lognormal +LOGNORMDIST = DIST.LOGNORMAL ## Retorna a distribuição lognormal cumulativa +MAX = MÁXIMO ## Retorna o valor máximo em uma lista de argumentos +MAXA = MÁXIMOA ## Retorna o maior valor em uma lista de argumentos, inclusive números, texto e valores lógicos +MEDIAN = MED ## Retorna a mediana dos números indicados +MIN = MÍNIMO ## Retorna o valor mínimo em uma lista de argumentos +MINA = MÍNIMOA ## Retorna o menor valor em uma lista de argumentos, inclusive números, texto e valores lógicos +MODE = MODO ## Retorna o valor mais comum em um conjunto de dados +NEGBINOMDIST = DIST.BIN.NEG ## Retorna a distribuição binomial negativa +NORMDIST = DIST.NORM ## Retorna a distribuição cumulativa normal +NORMINV = INV.NORM ## Retorna o inverso da distribuição cumulativa normal +NORMSDIST = DIST.NORMP ## Retorna a distribuição cumulativa normal padrão +NORMSINV = INV.NORMP ## Retorna o inverso da distribuição cumulativa normal padrão +PEARSON = PEARSON ## Retorna o coeficiente de correlação do momento do produto Pearson +PERCENTILE = PERCENTIL ## Retorna o k-ésimo percentil de valores em um intervalo +PERCENTRANK = ORDEM.PORCENTUAL ## Retorna a ordem percentual de um valor em um conjunto de dados +PERMUT = PERMUT ## Retorna o número de permutações de um determinado número de objetos +POISSON = POISSON ## Retorna a distribuição Poisson +PROB = PROB ## Retorna a probabilidade de valores em um intervalo estarem entre dois limites +QUARTILE = QUARTIL ## Retorna o quartil do conjunto de dados +RANK = ORDEM ## Retorna a posição de um número em uma lista de números +RSQ = RQUAD ## Retorna o quadrado do coeficiente de correlação do momento do produto de Pearson +SKEW = DISTORÇÃO ## Retorna a distorção de uma distribuição +SLOPE = INCLINAÇÃO ## Retorna a inclinação da linha de regressão linear +SMALL = MENOR ## Retorna o menor valor k-ésimo do conjunto de dados +STANDARDIZE = PADRONIZAR ## Retorna um valor normalizado +STDEV = DESVPAD ## Estima o desvio padrão com base em uma amostra +STDEVA = DESVPADA ## Estima o desvio padrão com base em uma amostra, inclusive números, texto e valores lógicos +STDEVP = DESVPADP ## Calcula o desvio padrão com base na população total +STDEVPA = DESVPADPA ## Calcula o desvio padrão com base na população total, inclusive números, texto e valores lógicos +STEYX = EPADYX ## Retorna o erro padrão do valor-y previsto para cada x da regressão +TDIST = DISTT ## Retorna a distribuição t de Student +TINV = INVT ## Retorna o inverso da distribuição t de Student +TREND = TENDÊNCIA ## Retorna valores ao longo de uma tendência linear +TRIMMEAN = MÉDIA.INTERNA ## Retorna a média do interior de um conjunto de dados +TTEST = TESTET ## Retorna a probabilidade associada ao teste t de Student +VAR = VAR ## Estima a variância com base em uma amostra +VARA = VARA ## Estima a variância com base em uma amostra, inclusive números, texto e valores lógicos +VARP = VARP ## Calcula a variância com base na população inteira +VARPA = VARPA ## Calcula a variância com base na população total, inclusive números, texto e valores lógicos +WEIBULL = WEIBULL ## Retorna a distribuição Weibull +ZTEST = TESTEZ ## Retorna o valor de probabilidade uni-caudal de um teste-z + + +## +## Text functions Funções de texto +## +ASC = ASC ## Altera letras do inglês ou katakana de largura total (bytes duplos) dentro de uma seqüência de caracteres para caracteres de meia largura (byte único) +BAHTTEXT = BAHTTEXT ## Converte um número em um texto, usando o formato de moeda ß (baht) +CHAR = CARACT ## Retorna o caractere especificado pelo número de código +CLEAN = TIRAR ## Remove todos os caracteres do texto que não podem ser impressos +CODE = CÓDIGO ## Retorna um código numérico para o primeiro caractere de uma seqüência de caracteres de texto +CONCATENATE = CONCATENAR ## Agrupa vários itens de texto em um único item de texto +DOLLAR = MOEDA ## Converte um número em texto, usando o formato de moeda $ (dólar) +EXACT = EXATO ## Verifica se dois valores de texto são idênticos +FIND = PROCURAR ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) +FINDB = PROCURARB ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) +FIXED = DEF.NÚM.DEC ## Formata um número como texto com um número fixo de decimais +JIS = JIS ## Altera letras do inglês ou katakana de meia largura (byte único) dentro de uma seqüência de caracteres para caracteres de largura total (bytes duplos) +LEFT = ESQUERDA ## Retorna os caracteres mais à esquerda de um valor de texto +LEFTB = ESQUERDAB ## Retorna os caracteres mais à esquerda de um valor de texto +LEN = NÚM.CARACT ## Retorna o número de caracteres em uma seqüência de texto +LENB = NÚM.CARACTB ## Retorna o número de caracteres em uma seqüência de texto +LOWER = MINÚSCULA ## Converte texto para minúsculas +MID = EXT.TEXTO ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada +MIDB = EXT.TEXTOB ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada +PHONETIC = FONÉTICA ## Extrai os caracteres fonéticos (furigana) de uma seqüência de caracteres de texto +PROPER = PRI.MAIÚSCULA ## Coloca a primeira letra de cada palavra em maiúscula em um valor de texto +REPLACE = MUDAR ## Muda os caracteres dentro do texto +REPLACEB = MUDARB ## Muda os caracteres dentro do texto +REPT = REPT ## Repete o texto um determinado número de vezes +RIGHT = DIREITA ## Retorna os caracteres mais à direita de um valor de texto +RIGHTB = DIREITAB ## Retorna os caracteres mais à direita de um valor de texto +SEARCH = LOCALIZAR ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) +SEARCHB = LOCALIZARB ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) +SUBSTITUTE = SUBSTITUIR ## Substitui um novo texto por um texto antigo em uma seqüência de texto +T = T ## Converte os argumentos em texto +TEXT = TEXTO ## Formata um número e o converte em texto +TRIM = ARRUMAR ## Remove espaços do texto +UPPER = MAIÚSCULA ## Converte o texto em maiúsculas +VALUE = VALOR ## Converte um argumento de texto em um número diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/config new file mode 100755 index 0000000..cd85c17 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULO! +DIV0 = #DIV/0! +VALUE = #VALOR! +REF = #REF! +NAME = #NOME? +NUM = #NÚM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/functions new file mode 100755 index 0000000..ba4eb47 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/pt/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Funções de Suplemento e Automatização +## +GETPIVOTDATA = OBTERDADOSDIN ## Devolve dados armazenados num relatório de Tabela Dinâmica + + +## +## Cube functions Funções de cubo +## +CUBEKPIMEMBER = MEMBROKPICUBO ## Devolve o nome, propriedade e medição de um KPI (key performance indicator) e apresenta o nome e a propriedade na célula. Um KPI é uma medida quantificável, como, por exemplo, o lucro mensal bruto ou a rotatividade trimestral de pessoal, utilizada para monitorizar o desempenho de uma organização. +CUBEMEMBER = MEMBROCUBO ## Devolve um membro ou cadeia de identificação numa hierarquia de cubo. Utilizada para validar a existência do membro ou cadeia de identificação no cubo. +CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Devolve o valor de uma propriedade de membro no cubo. Utilizada para validar a existência de um nome de membro no cubo e para devolver a propriedade especificada para esse membro. +CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Devolve o enésimo ou a classificação mais alta num conjunto. Utilizada para devolver um ou mais elementos num conjunto, tal como o melhor vendedor ou os 10 melhores alunos. +CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou cadeias de identificação enviando uma expressão de conjunto para o cubo no servidor, que cria o conjunto e, em seguida, devolve o conjunto ao Microsoft Office Excel. +CUBESETCOUNT = CONTARCONJUNTOCUBO ## Devolve o número de itens num conjunto. +CUBEVALUE = VALORCUBO ## Devolve um valor agregado do cubo. + + +## +## Database functions Funções de base de dados +## +DAVERAGE = BDMÉDIA ## Devolve a média das entradas da base de dados seleccionadas +DCOUNT = BDCONTAR ## Conta as células que contêm números numa base de dados +DCOUNTA = BDCONTAR.VAL ## Conta as células que não estejam em branco numa base de dados +DGET = BDOBTER ## Extrai de uma base de dados um único registo que corresponde aos critérios especificados +DMAX = BDMÁX ## Devolve o valor máximo das entradas da base de dados seleccionadas +DMIN = BDMÍN ## Devolve o valor mínimo das entradas da base de dados seleccionadas +DPRODUCT = BDMULTIPL ## Multiplica os valores de um determinado campo de registos que correspondem aos critérios numa base de dados +DSTDEV = BDDESVPAD ## Calcula o desvio-padrão com base numa amostra de entradas da base de dados seleccionadas +DSTDEVP = BDDESVPADP ## Calcula o desvio-padrão com base na população total das entradas da base de dados seleccionadas +DSUM = BDSOMA ## Adiciona os números na coluna de campo dos registos de base de dados que correspondem aos critérios +DVAR = BDVAR ## Calcula a variância com base numa amostra das entradas de base de dados seleccionadas +DVARP = BDVARP ## Calcula a variância com base na população total das entradas de base de dados seleccionadas + + +## +## Date and time functions Funções de data e hora +## +DATE = DATA ## Devolve o número de série de uma determinada data +DATEVALUE = DATA.VALOR ## Converte uma data em forma de texto num número de série +DAY = DIA ## Converte um número de série num dia do mês +DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base num ano com 360 dias +EDATE = DATAM ## Devolve um número de série de data que corresponde ao número de meses indicado antes ou depois da data de início +EOMONTH = FIMMÊS ## Devolve o número de série do último dia do mês antes ou depois de um número de meses especificado +HOUR = HORA ## Converte um número de série numa hora +MINUTE = MINUTO ## Converte um número de série num minuto +MONTH = MÊS ## Converte um número de série num mês +NETWORKDAYS = DIATRABALHOTOTAL ## Devolve o número total de dias úteis entre duas datas +NOW = AGORA ## Devolve o número de série da data e hora actuais +SECOND = SEGUNDO ## Converte um número de série num segundo +TIME = TEMPO ## Devolve o número de série de um determinado tempo +TIMEVALUE = VALOR.TEMPO ## Converte um tempo em forma de texto num número de série +TODAY = HOJE ## Devolve o número de série da data actual +WEEKDAY = DIA.SEMANA ## Converte um número de série num dia da semana +WEEKNUM = NÚMSEMANA ## Converte um número de série num número que representa o número da semana num determinado ano +WORKDAY = DIA.TRABALHO ## Devolve o número de série da data antes ou depois de um número de dias úteis especificado +YEAR = ANO ## Converte um número de série num ano +YEARFRAC = FRACÇÃOANO ## Devolve a fracção de ano que representa o número de dias inteiros entre a data_de_início e a data_de_fim + + +## +## Engineering functions Funções de engenharia +## +BESSELI = BESSELI ## Devolve a função de Bessel modificada In(x) +BESSELJ = BESSELJ ## Devolve a função de Bessel Jn(x) +BESSELK = BESSELK ## Devolve a função de Bessel modificada Kn(x) +BESSELY = BESSELY ## Devolve a função de Bessel Yn(x) +BIN2DEC = BINADEC ## Converte um número binário em decimal +BIN2HEX = BINAHEX ## Converte um número binário em hexadecimal +BIN2OCT = BINAOCT ## Converte um número binário em octal +COMPLEX = COMPLEXO ## Converte coeficientes reais e imaginários num número complexo +CONVERT = CONVERTER ## Converte um número de um sistema de medida noutro +DEC2BIN = DECABIN ## Converte um número decimal em binário +DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal +DEC2OCT = DECAOCT ## Converte um número decimal em octal +DELTA = DELTA ## Testa se dois valores são iguais +ERF = FUNCERRO ## Devolve a função de erro +ERFC = FUNCERROCOMPL ## Devolve a função de erro complementar +GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite +HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário +HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal +HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal +IMABS = IMABS ## Devolve o valor absoluto (módulo) de um número complexo +IMAGINARY = IMAGINÁRIO ## Devolve o coeficiente imaginário de um número complexo +IMARGUMENT = IMARG ## Devolve o argumento Teta, um ângulo expresso em radianos +IMCONJUGATE = IMCONJ ## Devolve o conjugado complexo de um número complexo +IMCOS = IMCOS ## Devolve o co-seno de um número complexo +IMDIV = IMDIV ## Devolve o quociente de dois números complexos +IMEXP = IMEXP ## Devolve o exponencial de um número complexo +IMLN = IMLN ## Devolve o logaritmo natural de um número complexo +IMLOG10 = IMLOG10 ## Devolve o logaritmo de base 10 de um número complexo +IMLOG2 = IMLOG2 ## Devolve o logaritmo de base 2 de um número complexo +IMPOWER = IMPOT ## Devolve um número complexo elevado a uma potência inteira +IMPRODUCT = IMPROD ## Devolve o produto de números complexos +IMREAL = IMREAL ## Devolve o coeficiente real de um número complexo +IMSIN = IMSENO ## Devolve o seno de um número complexo +IMSQRT = IMRAIZ ## Devolve a raiz quadrada de um número complexo +IMSUB = IMSUBTR ## Devolve a diferença entre dois números complexos +IMSUM = IMSOMA ## Devolve a soma de números complexos +OCT2BIN = OCTABIN ## Converte um número octal em binário +OCT2DEC = OCTADEC ## Converte um número octal em decimal +OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal + + +## +## Financial functions Funções financeiras +## +ACCRINT = JUROSACUM ## Devolve os juros acumulados de um título que paga juros periódicos +ACCRINTM = JUROSACUMV ## Devolve os juros acumulados de um título que paga juros no vencimento +AMORDEGRC = AMORDEGRC ## Devolve a depreciação correspondente a cada período contabilístico utilizando um coeficiente de depreciação +AMORLINC = AMORLINC ## Devolve a depreciação correspondente a cada período contabilístico +COUPDAYBS = CUPDIASINLIQ ## Devolve o número de dias entre o início do período do cupão e a data de regularização +COUPDAYS = CUPDIAS ## Devolve o número de dias no período do cupão que contém a data de regularização +COUPDAYSNC = CUPDIASPRÓX ## Devolve o número de dias entre a data de regularização e a data do cupão seguinte +COUPNCD = CUPDATAPRÓX ## Devolve a data do cupão seguinte após a data de regularização +COUPNUM = CUPNÚM ## Devolve o número de cupões a serem pagos entre a data de regularização e a data de vencimento +COUPPCD = CUPDATAANT ## Devolve a data do cupão anterior antes da data de regularização +CUMIPMT = PGTOJURACUM ## Devolve os juros cumulativos pagos entre dois períodos +CUMPRINC = PGTOCAPACUM ## Devolve o capital cumulativo pago a título de empréstimo entre dois períodos +DB = BD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas fixas +DDB = BDD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas duplas ou qualquer outro método especificado +DISC = DESC ## Devolve a taxa de desconto de um título +DOLLARDE = MOEDADEC ## Converte um preço em unidade monetária, expresso como uma fracção, num preço em unidade monetária, expresso como um número decimal +DOLLARFR = MOEDAFRA ## Converte um preço em unidade monetária, expresso como um número decimal, num preço em unidade monetária, expresso como uma fracção +DURATION = DURAÇÃO ## Devolve a duração anual de um título com pagamentos de juros periódicos +EFFECT = EFECTIVA ## Devolve a taxa de juros anual efectiva +FV = VF ## Devolve o valor futuro de um investimento +FVSCHEDULE = VFPLANO ## Devolve o valor futuro de um capital inicial após a aplicação de uma série de taxas de juro compostas +INTRATE = TAXAJUROS ## Devolve a taxa de juros de um título investido na totalidade +IPMT = IPGTO ## Devolve o pagamento dos juros de um investimento durante um determinado período +IRR = TIR ## Devolve a taxa de rentabilidade interna para uma série de fluxos monetários +ISPMT = É.PGTO ## Calcula os juros pagos durante um período específico de um investimento +MDURATION = MDURAÇÃO ## Devolve a duração modificada de Macauley de um título com um valor de paridade equivalente a € 100 +MIRR = MTIR ## Devolve a taxa interna de rentabilidade em que os fluxos monetários positivos e negativos são financiados com taxas diferentes +NOMINAL = NOMINAL ## Devolve a taxa de juros nominal anual +NPER = NPER ## Devolve o número de períodos de um investimento +NPV = VAL ## Devolve o valor actual líquido de um investimento com base numa série de fluxos monetários periódicos e numa taxa de desconto +ODDFPRICE = PREÇOPRIMINC ## Devolve o preço por € 100 do valor nominal de um título com um período inicial incompleto +ODDFYIELD = LUCROPRIMINC ## Devolve o lucro de um título com um período inicial incompleto +ODDLPRICE = PREÇOÚLTINC ## Devolve o preço por € 100 do valor nominal de um título com um período final incompleto +ODDLYIELD = LUCROÚLTINC ## Devolve o lucro de um título com um período final incompleto +PMT = PGTO ## Devolve o pagamento periódico de uma anuidade +PPMT = PPGTO ## Devolve o pagamento sobre o capital de um investimento num determinado período +PRICE = PREÇO ## Devolve o preço por € 100 do valor nominal de um título que paga juros periódicos +PRICEDISC = PREÇODESC ## Devolve o preço por € 100 do valor nominal de um título descontado +PRICEMAT = PREÇOVENC ## Devolve o preço por € 100 do valor nominal de um título que paga juros no vencimento +PV = VA ## Devolve o valor actual de um investimento +RATE = TAXA ## Devolve a taxa de juros por período de uma anuidade +RECEIVED = RECEBER ## Devolve o montante recebido no vencimento de um título investido na totalidade +SLN = AMORT ## Devolve uma depreciação linear de um activo durante um período +SYD = AMORTD ## Devolve a depreciação por algarismos da soma dos anos de um activo durante um período especificado +TBILLEQ = OTN ## Devolve o lucro de um título equivalente a uma Obrigação do Tesouro +TBILLPRICE = OTNVALOR ## Devolve o preço por € 100 de valor nominal de uma Obrigação do Tesouro +TBILLYIELD = OTNLUCRO ## Devolve o lucro de uma Obrigação do Tesouro +VDB = BDV ## Devolve a depreciação de um activo relativo a um período específico ou parcial utilizando um método de quotas degressivas +XIRR = XTIR ## Devolve a taxa interna de rentabilidade de um plano de fluxos monetários que não seja necessariamente periódica +XNPV = XVAL ## Devolve o valor actual líquido de um plano de fluxos monetários que não seja necessariamente periódico +YIELD = LUCRO ## Devolve o lucro de um título que paga juros periódicos +YIELDDISC = LUCRODESC ## Devolve o lucro anual de um título emitido abaixo do valor nominal, por exemplo, uma Obrigação do Tesouro +YIELDMAT = LUCROVENC ## Devolve o lucro anual de um título que paga juros na data de vencimento + + +## +## Information functions Funções de informação +## +CELL = CÉL ## Devolve informações sobre a formatação, localização ou conteúdo de uma célula +ERROR.TYPE = TIPO.ERRO ## Devolve um número correspondente a um tipo de erro +INFO = INFORMAÇÃO ## Devolve informações sobre o ambiente de funcionamento actual +ISBLANK = É.CÉL.VAZIA ## Devolve VERDADEIRO se o valor estiver em branco +ISERR = É.ERROS ## Devolve VERDADEIRO se o valor for um valor de erro diferente de #N/D +ISERROR = É.ERRO ## Devolve VERDADEIRO se o valor for um valor de erro +ISEVEN = ÉPAR ## Devolve VERDADEIRO se o número for par +ISLOGICAL = É.LÓGICO ## Devolve VERDADEIRO se o valor for lógico +ISNA = É.NÃO.DISP ## Devolve VERDADEIRO se o valor for o valor de erro #N/D +ISNONTEXT = É.NÃO.TEXTO ## Devolve VERDADEIRO se o valor não for texto +ISNUMBER = É.NÚM ## Devolve VERDADEIRO se o valor for um número +ISODD = ÉÍMPAR ## Devolve VERDADEIRO se o número for ímpar +ISREF = É.REF ## Devolve VERDADEIRO se o valor for uma referência +ISTEXT = É.TEXTO ## Devolve VERDADEIRO se o valor for texto +N = N ## Devolve um valor convertido num número +NA = NÃO.DISP ## Devolve o valor de erro #N/D +TYPE = TIPO ## Devolve um número que indica o tipo de dados de um valor + + +## +## Logical functions Funções lógicas +## +AND = E ## Devolve VERDADEIRO se todos os respectivos argumentos corresponderem a VERDADEIRO +FALSE = FALSO ## Devolve o valor lógico FALSO +IF = SE ## Especifica um teste lógico a ser executado +IFERROR = SE.ERRO ## Devolve um valor definido pelo utilizador se ocorrer um erro na fórmula, e devolve o resultado da fórmula se não ocorrer nenhum erro +NOT = NÃO ## Inverte a lógica do respectivo argumento +OR = OU ## Devolve VERDADEIRO se qualquer argumento for VERDADEIRO +TRUE = VERDADEIRO ## Devolve o valor lógico VERDADEIRO + + +## +## Lookup and reference functions Funções de pesquisa e referência +## +ADDRESS = ENDEREÇO ## Devolve uma referência a uma única célula numa folha de cálculo como texto +AREAS = ÁREAS ## Devolve o número de áreas numa referência +CHOOSE = SELECCIONAR ## Selecciona um valor a partir de uma lista de valores +COLUMN = COL ## Devolve o número da coluna de uma referência +COLUMNS = COLS ## Devolve o número de colunas numa referência +HLOOKUP = PROCH ## Procura na linha superior de uma matriz e devolve o valor da célula indicada +HYPERLINK = HIPERLIGAÇÃO ## Cria um atalho ou hiperligação que abre um documento armazenado num servidor de rede, numa intranet ou na Internet +INDEX = ÍNDICE ## Utiliza um índice para escolher um valor de uma referência ou de uma matriz +INDIRECT = INDIRECTO ## Devolve uma referência indicada por um valor de texto +LOOKUP = PROC ## Procura valores num vector ou numa matriz +MATCH = CORRESP ## Procura valores numa referência ou numa matriz +OFFSET = DESLOCAMENTO ## Devolve o deslocamento de referência de uma determinada referência +ROW = LIN ## Devolve o número da linha de uma referência +ROWS = LINS ## Devolve o número de linhas numa referência +RTD = RTD ## Obtém dados em tempo real a partir de um programa que suporte automatização COM (automatização: modo de trabalhar com objectos de uma aplicação a partir de outra aplicação ou ferramenta de desenvolvimento. Anteriormente conhecida como automatização OLE, a automatização é uma norma da indústria de software e uma funcionalidade COM (Component Object Model).) +TRANSPOSE = TRANSPOR ## Devolve a transposição de uma matriz +VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e percorre a linha para devolver o valor de uma célula + + +## +## Math and trigonometry functions Funções matemáticas e trigonométricas +## +ABS = ABS ## Devolve o valor absoluto de um número +ACOS = ACOS ## Devolve o arco de co-seno de um número +ACOSH = ACOSH ## Devolve o co-seno hiperbólico inverso de um número +ASIN = ASEN ## Devolve o arco de seno de um número +ASINH = ASENH ## Devolve o seno hiperbólico inverso de um número +ATAN = ATAN ## Devolve o arco de tangente de um número +ATAN2 = ATAN2 ## Devolve o arco de tangente das coordenadas x e y +ATANH = ATANH ## Devolve a tangente hiperbólica inversa de um número +CEILING = ARRED.EXCESSO ## Arredonda um número para o número inteiro mais próximo ou para o múltiplo de significância mais próximo +COMBIN = COMBIN ## Devolve o número de combinações de um determinado número de objectos +COS = COS ## Devolve o co-seno de um número +COSH = COSH ## Devolve o co-seno hiperbólico de um número +DEGREES = GRAUS ## Converte radianos em graus +EVEN = PAR ## Arredonda um número por excesso para o número inteiro mais próximo +EXP = EXP ## Devolve e elevado à potência de um determinado número +FACT = FACTORIAL ## Devolve o factorial de um número +FACTDOUBLE = FACTDUPLO ## Devolve o factorial duplo de um número +FLOOR = ARRED.DEFEITO ## Arredonda um número por defeito até zero +GCD = MDC ## Devolve o maior divisor comum +INT = INT ## Arredonda um número por defeito para o número inteiro mais próximo +LCM = MMC ## Devolve o mínimo múltiplo comum +LN = LN ## Devolve o logaritmo natural de um número +LOG = LOG ## Devolve o logaritmo de um número com uma base especificada +LOG10 = LOG10 ## Devolve o logaritmo de base 10 de um número +MDETERM = MATRIZ.DETERM ## Devolve o determinante matricial de uma matriz +MINVERSE = MATRIZ.INVERSA ## Devolve o inverso matricial de uma matriz +MMULT = MATRIZ.MULT ## Devolve o produto matricial de duas matrizes +MOD = RESTO ## Devolve o resto da divisão +MROUND = MARRED ## Devolve um número arredondado para o múltiplo pretendido +MULTINOMIAL = POLINOMIAL ## Devolve o polinomial de um conjunto de números +ODD = ÍMPAR ## Arredonda por excesso um número para o número inteiro ímpar mais próximo +PI = PI ## Devolve o valor de pi +POWER = POTÊNCIA ## Devolve o resultado de um número elevado a uma potência +PRODUCT = PRODUTO ## Multiplica os respectivos argumentos +QUOTIENT = QUOCIENTE ## Devolve a parte inteira de uma divisão +RADIANS = RADIANOS ## Converte graus em radianos +RAND = ALEATÓRIO ## Devolve um número aleatório entre 0 e 1 +RANDBETWEEN = ALEATÓRIOENTRE ## Devolve um número aleatório entre os números especificados +ROMAN = ROMANO ## Converte um número árabe em romano, como texto +ROUND = ARRED ## Arredonda um número para um número de dígitos especificado +ROUNDDOWN = ARRED.PARA.BAIXO ## Arredonda um número por defeito até zero +ROUNDUP = ARRED.PARA.CIMA ## Arredonda um número por excesso, afastando-o de zero +SERIESSUM = SOMASÉRIE ## Devolve a soma de uma série de potências baseada na fórmula +SIGN = SINAL ## Devolve o sinal de um número +SIN = SEN ## Devolve o seno de um determinado ângulo +SINH = SENH ## Devolve o seno hiperbólico de um número +SQRT = RAIZQ ## Devolve uma raiz quadrada positiva +SQRTPI = RAIZPI ## Devolve a raiz quadrada de (núm * pi) +SUBTOTAL = SUBTOTAL ## Devolve um subtotal numa lista ou base de dados +SUM = SOMA ## Adiciona os respectivos argumentos +SUMIF = SOMA.SE ## Adiciona as células especificadas por um determinado critério +SUMIFS = SOMA.SE.S ## Adiciona as células num intervalo que cumpre vários critérios +SUMPRODUCT = SOMARPRODUTO ## Devolve a soma dos produtos de componentes de matrizes correspondentes +SUMSQ = SOMARQUAD ## Devolve a soma dos quadrados dos argumentos +SUMX2MY2 = SOMAX2DY2 ## Devolve a soma da diferença dos quadrados dos valores correspondentes em duas matrizes +SUMX2PY2 = SOMAX2SY2 ## Devolve a soma da soma dos quadrados dos valores correspondentes em duas matrizes +SUMXMY2 = SOMAXMY2 ## Devolve a soma dos quadrados da diferença dos valores correspondentes em duas matrizes +TAN = TAN ## Devolve a tangente de um número +TANH = TANH ## Devolve a tangente hiperbólica de um número +TRUNC = TRUNCAR ## Trunca um número para um número inteiro + + +## +## Statistical functions Funções estatísticas +## +AVEDEV = DESV.MÉDIO ## Devolve a média aritmética dos desvios absolutos à média dos pontos de dados +AVERAGE = MÉDIA ## Devolve a média dos respectivos argumentos +AVERAGEA = MÉDIAA ## Devolve uma média dos respectivos argumentos, incluindo números, texto e valores lógicos +AVERAGEIF = MÉDIA.SE ## Devolve a média aritmética de todas as células num intervalo que cumprem determinado critério +AVERAGEIFS = MÉDIA.SE.S ## Devolve a média aritmética de todas as células que cumprem múltiplos critérios +BETADIST = DISTBETA ## Devolve a função de distribuição cumulativa beta +BETAINV = BETA.ACUM.INV ## Devolve o inverso da função de distribuição cumulativa relativamente a uma distribuição beta específica +BINOMDIST = DISTRBINOM ## Devolve a probabilidade de distribuição binomial de termo individual +CHIDIST = DIST.CHI ## Devolve a probabilidade unicaudal da distribuição qui-quadrada +CHIINV = INV.CHI ## Devolve o inverso da probabilidade unicaudal da distribuição qui-quadrada +CHITEST = TESTE.CHI ## Devolve o teste para independência +CONFIDENCE = INT.CONFIANÇA ## Devolve o intervalo de confiança correspondente a uma média de população +CORREL = CORREL ## Devolve o coeficiente de correlação entre dois conjuntos de dados +COUNT = CONTAR ## Conta os números que existem na lista de argumentos +COUNTA = CONTAR.VAL ## Conta os valores que existem na lista de argumentos +COUNTBLANK = CONTAR.VAZIO ## Conta o número de células em branco num intervalo +COUNTIF = CONTAR.SE ## Calcula o número de células num intervalo que corresponde aos critérios determinados +COUNTIFS = CONTAR.SE.S ## Conta o número de células num intervalo que cumprem múltiplos critérios +COVAR = COVAR ## Devolve a covariância, que é a média dos produtos de desvios de pares +CRITBINOM = CRIT.BINOM ## Devolve o menor valor em que a distribuição binomial cumulativa é inferior ou igual a um valor de critério +DEVSQ = DESVQ ## Devolve a soma dos quadrados dos desvios +EXPONDIST = DISTEXPON ## Devolve a distribuição exponencial +FDIST = DISTF ## Devolve a distribuição da probabilidade F +FINV = INVF ## Devolve o inverso da distribuição da probabilidade F +FISHER = FISHER ## Devolve a transformação Fisher +FISHERINV = FISHERINV ## Devolve o inverso da transformação Fisher +FORECAST = PREVISÃO ## Devolve um valor ao longo de uma tendência linear +FREQUENCY = FREQUÊNCIA ## Devolve uma distribuição de frequência como uma matriz vertical +FTEST = TESTEF ## Devolve o resultado de um teste F +GAMMADIST = DISTGAMA ## Devolve a distribuição gama +GAMMAINV = INVGAMA ## Devolve o inverso da distribuição gama cumulativa +GAMMALN = LNGAMA ## Devolve o logaritmo natural da função gama, Γ(x) +GEOMEAN = MÉDIA.GEOMÉTRICA ## Devolve a média geométrica +GROWTH = CRESCIMENTO ## Devolve valores ao longo de uma tendência exponencial +HARMEAN = MÉDIA.HARMÓNICA ## Devolve a média harmónica +HYPGEOMDIST = DIST.HIPERGEOM ## Devolve a distribuição hipergeométrica +INTERCEPT = INTERCEPTAR ## Devolve a intercepção da linha de regressão linear +KURT = CURT ## Devolve a curtose de um conjunto de dados +LARGE = MAIOR ## Devolve o maior valor k-ésimo de um conjunto de dados +LINEST = PROJ.LIN ## Devolve os parâmetros de uma tendência linear +LOGEST = PROJ.LOG ## Devolve os parâmetros de uma tendência exponencial +LOGINV = INVLOG ## Devolve o inverso da distribuição normal logarítmica +LOGNORMDIST = DIST.NORMALLOG ## Devolve a distribuição normal logarítmica cumulativa +MAX = MÁXIMO ## Devolve o valor máximo numa lista de argumentos +MAXA = MÁXIMOA ## Devolve o valor máximo numa lista de argumentos, incluindo números, texto e valores lógicos +MEDIAN = MED ## Devolve a mediana dos números indicados +MIN = MÍNIMO ## Devolve o valor mínimo numa lista de argumentos +MINA = MÍNIMOA ## Devolve o valor mínimo numa lista de argumentos, incluindo números, texto e valores lógicos +MODE = MODA ## Devolve o valor mais comum num conjunto de dados +NEGBINOMDIST = DIST.BIN.NEG ## Devolve a distribuição binominal negativa +NORMDIST = DIST.NORM ## Devolve a distribuição cumulativa normal +NORMINV = INV.NORM ## Devolve o inverso da distribuição cumulativa normal +NORMSDIST = DIST.NORMP ## Devolve a distribuição cumulativa normal padrão +NORMSINV = INV.NORMP ## Devolve o inverso da distribuição cumulativa normal padrão +PEARSON = PEARSON ## Devolve o coeficiente de correlação momento/produto de Pearson +PERCENTILE = PERCENTIL ## Devolve o k-ésimo percentil de valores num intervalo +PERCENTRANK = ORDEM.PERCENTUAL ## Devolve a ordem percentual de um valor num conjunto de dados +PERMUT = PERMUTAR ## Devolve o número de permutações de um determinado número de objectos +POISSON = POISSON ## Devolve a distribuição de Poisson +PROB = PROB ## Devolve a probabilidade dos valores num intervalo se encontrarem entre dois limites +QUARTILE = QUARTIL ## Devolve o quartil de um conjunto de dados +RANK = ORDEM ## Devolve a ordem de um número numa lista numérica +RSQ = RQUAD ## Devolve o quadrado do coeficiente de correlação momento/produto de Pearson +SKEW = DISTORÇÃO ## Devolve a distorção de uma distribuição +SLOPE = DECLIVE ## Devolve o declive da linha de regressão linear +SMALL = MENOR ## Devolve o menor valor de k-ésimo de um conjunto de dados +STANDARDIZE = NORMALIZAR ## Devolve um valor normalizado +STDEV = DESVPAD ## Calcula o desvio-padrão com base numa amostra +STDEVA = DESVPADA ## Calcula o desvio-padrão com base numa amostra, incluindo números, texto e valores lógicos +STDEVP = DESVPADP ## Calcula o desvio-padrão com base na população total +STDEVPA = DESVPADPA ## Calcula o desvio-padrão com base na população total, incluindo números, texto e valores lógicos +STEYX = EPADYX ## Devolve o erro-padrão do valor de y previsto para cada x na regressão +TDIST = DISTT ## Devolve a distribuição t de Student +TINV = INVT ## Devolve o inverso da distribuição t de Student +TREND = TENDÊNCIA ## Devolve valores ao longo de uma tendência linear +TRIMMEAN = MÉDIA.INTERNA ## Devolve a média do interior de um conjunto de dados +TTEST = TESTET ## Devolve a probabilidade associada ao teste t de Student +VAR = VAR ## Calcula a variância com base numa amostra +VARA = VARA ## Calcula a variância com base numa amostra, incluindo números, texto e valores lógicos +VARP = VARP ## Calcula a variância com base na população total +VARPA = VARPA ## Calcula a variância com base na população total, incluindo números, texto e valores lógicos +WEIBULL = WEIBULL ## Devolve a distribuição Weibull +ZTEST = TESTEZ ## Devolve o valor de probabilidade unicaudal de um teste-z + + +## +## Text functions Funções de texto +## +ASC = ASC ## Altera letras ou katakana de largura total (byte duplo) numa cadeia de caracteres para caracteres de largura média (byte único) +BAHTTEXT = TEXTO.BAHT ## Converte um número em texto, utilizando o formato monetário ß (baht) +CHAR = CARÁCT ## Devolve o carácter especificado pelo número de código +CLEAN = LIMPAR ## Remove do texto todos os caracteres não imprimíveis +CODE = CÓDIGO ## Devolve um código numérico correspondente ao primeiro carácter numa cadeia de texto +CONCATENATE = CONCATENAR ## Agrupa vários itens de texto num único item de texto +DOLLAR = MOEDA ## Converte um número em texto, utilizando o formato monetário € (Euro) +EXACT = EXACTO ## Verifica se dois valores de texto são idênticos +FIND = LOCALIZAR ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) +FINDB = LOCALIZARB ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) +FIXED = FIXA ## Formata um número como texto com um número fixo de decimais +JIS = JIS ## Altera letras ou katakana de largura média (byte único) numa cadeia de caracteres para caracteres de largura total (byte duplo) +LEFT = ESQUERDA ## Devolve os caracteres mais à esquerda de um valor de texto +LEFTB = ESQUERDAB ## Devolve os caracteres mais à esquerda de um valor de texto +LEN = NÚM.CARACT ## Devolve o número de caracteres de uma cadeia de texto +LENB = NÚM.CARACTB ## Devolve o número de caracteres de uma cadeia de texto +LOWER = MINÚSCULAS ## Converte o texto em minúsculas +MID = SEG.TEXTO ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada +MIDB = SEG.TEXTOB ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada +PHONETIC = FONÉTICA ## Retira os caracteres fonéticos (furigana) de uma cadeia de texto +PROPER = INICIAL.MAIÚSCULA ## Coloca em maiúsculas a primeira letra de cada palavra de um valor de texto +REPLACE = SUBSTITUIR ## Substitui caracteres no texto +REPLACEB = SUBSTITUIRB ## Substitui caracteres no texto +REPT = REPETIR ## Repete texto um determinado número de vezes +RIGHT = DIREITA ## Devolve os caracteres mais à direita de um valor de texto +RIGHTB = DIREITAB ## Devolve os caracteres mais à direita de um valor de texto +SEARCH = PROCURAR ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) +SEARCHB = PROCURARB ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) +SUBSTITUTE = SUBST ## Substitui texto novo por texto antigo numa cadeia de texto +T = T ## Converte os respectivos argumentos em texto +TEXT = TEXTO ## Formata um número e converte-o em texto +TRIM = COMPACTAR ## Remove espaços do texto +UPPER = MAIÚSCULAS ## Converte texto em maiúsculas +VALUE = VALOR ## Converte um argumento de texto num número diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/config new file mode 100755 index 0000000..9ee9e6c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = р + + +## +## Excel Error Codes (For future use) + +## +NULL = #ПУСТО! +DIV0 = #ДЕЛ/0! +VALUE = #ЗНАЧ! +REF = #ССЫЛ! +NAME = #ИМЯ? +NUM = #ЧИСЛО! +NA = #Н/Д diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/functions new file mode 100755 index 0000000..3597dbf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/ru/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from information provided by web-junior (http://www.web-junior.net/) +## +## + + +## +## Add-in and Automation functions Функции надстроек и автоматизации +## +GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы. + + +## +## Cube functions Функции Куб +## +CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации. +CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе. +CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента. +CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов. +CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel. +CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества. +CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба. + + +## +## Database functions Функции для работы с базами данных +## +DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных. +DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных. +DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных. +DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию. +DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных. +DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных. +DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию. +DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных. +DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных +DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию. +DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных +DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных + + +## +## Date and time functions Функции даты и времени +## +DATE = ДАТА ## Возвращает заданную дату в числовом формате. +DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат. +DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца. +DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года. +EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты. +EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев. +HOUR = ЧАС ## Преобразует дату в числовом формате в часы. +MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты. +MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы. +NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами. +NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате. +SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды. +TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате. +TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат. +TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате. +WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели. +WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата. +WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней. +YEAR = ГОД ## Преобразует дату в числовом формате в год. +YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами. + + +## +## Engineering functions Инженерные функции +## +BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x). +BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x). +BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x). +BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x). +BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное. +BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное. +BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное. +COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число. +CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую. +DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное. +DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное. +DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное. +DELTA = ДЕЛЬТА ## Проверяет равенство двух значений. +ERF = ФОШ ## Возвращает функцию ошибки. +ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки. +GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения. +HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное. +HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное. +HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное. +IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа. +IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа. +IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах. +IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число. +IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа. +IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел. +IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа. +IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа. +IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа. +IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа. +IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень. +IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел. +IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа. +IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа. +IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа. +IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел. +IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел. +OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное. +OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное. +OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное. + + +## +## Financial functions Финансовые функции +## +ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов. +ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения. +AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации. +AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода. +COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения. +COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения. +COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона. +COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения. +COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу. +COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения. +CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами. +CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами. +DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка. +DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод. +DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг. +DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом. +DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби. +DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам. +EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки. +FV = БС ## Возвращает будущую стоимость инвестиции. +FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов. +INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг. +IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период. +IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств. +ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции. +MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей. +MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки. +NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку. +NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада. +NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования. +ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом. +ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом. +ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом. +ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом. +PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета. +PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период. +PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов. +PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка. +PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения. +PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции. +RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период. +RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг. +SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период. +SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел. +TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку. +TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека. +TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку. +VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса. +XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер. +XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими. +YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов. +YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки). +YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения. + + +## +## Information functions Информационные функции +## +CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки. +ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки. +INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде. +ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку. +ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д. +ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки. +ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом. +ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение. +ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д. +ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом. +ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число. +ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом. +ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой. +ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом. +N = Ч ## Возвращает значение, преобразованное в число. +NA = НД ## Возвращает значение ошибки #Н/Д. +TYPE = ТИП ## Возвращает число, обозначающее тип данных значения. + + +## +## Logical functions Логические функции +## +AND = И ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ. +IF = ЕСЛИ ## Выполняет проверку условия. +IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления. +NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное. +OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА. +TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА. + + +## +## Lookup and reference functions Функции ссылки и поиска +## +ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста. +AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке. +CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу. +COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка. +COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке. +HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки +HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете. +INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива. +INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением. +LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве. +MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве. +OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки. +ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой. +ROWS = ЧСТРОК ## Возвращает количество строк в ссылке. +RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).). +TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив. +VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце. + + +## +## Math and trigonometry functions Математические и тригонометрические функции +## +ABS = ABS ## Возвращает модуль (абсолютную величину) числа. +ACOS = ACOS ## Возвращает арккосинус числа. +ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа. +ASIN = ASIN ## Возвращает арксинус числа. +ASINH = ASINH ## Возвращает гиперболический арксинус числа. +ATAN = ATAN ## Возвращает арктангенс числа. +ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y. +ATANH = ATANH ## Возвращает гиперболический арктангенс числа. +CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению. +COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов. +COS = COS ## Возвращает косинус числа. +COSH = COSH ## Возвращает гиперболический косинус числа. +DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы. +EVEN = ЧЁТН ## Округляет число до ближайшего четного целого. +EXP = EXP ## Возвращает число e, возведенное в указанную степень. +FACT = ФАКТР ## Возвращает факториал числа. +FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа. +FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +GCD = НОД ## Возвращает наибольший общий делитель. +INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого. +LCM = НОК ## Возвращает наименьшее общее кратное. +LN = LN ## Возвращает натуральный логарифм числа. +LOG = LOG ## Возвращает логарифм числа по заданному основанию. +LOG10 = LOG10 ## Возвращает десятичный логарифм числа. +MDETERM = МОПРЕД ## Возвращает определитель матрицы массива. +MINVERSE = МОБР ## Возвращает обратную матрицу массива. +MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов. +MOD = ОСТАТ ## Возвращает остаток от деления. +MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью. +MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел. +ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого. +PI = ПИ ## Возвращает число пи. +POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень. +PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов. +QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении. +RADIANS = РАДИАНЫ ## Преобразует градусы в радианы. +RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1. +RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами. +ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста. +ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов. +ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения. +SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле. +SIGN = ЗНАК ## Возвращает знак числа. +SIN = SIN ## Возвращает синус заданного угла. +SINH = SINH ## Возвращает гиперболический синус числа. +SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня. +SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ). +SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных. +SUM = СУММ ## Суммирует аргументы. +SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию. +SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям. +SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов. +SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов. +SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах. +SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов. +SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах. +TAN = TAN ## Возвращает тангенс числа. +TANH = TANH ## Возвращает гиперболический тангенс числа. +TRUNC = ОТБР ## Отбрасывает дробную часть числа. + + +## +## Statistical functions Статистические функции +## +AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего. +AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов. +AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения. +AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию. +AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям. +BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения. +BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения. +BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения. +CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат. +CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат. +CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость. +CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности. +CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных. +COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов. +COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов. +COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне +COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию +COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям. +COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений +CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию. +DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений. +EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение. +FDIST = FРАСП ## Возвращает F-распределение вероятности. +FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности. +FISHER = ФИШЕР ## Возвращает преобразование Фишера. +FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера. +FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда. +FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива. +FTEST = ФТЕСТ ## Возвращает результат F-теста. +GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение. +GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение. +GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x). +GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое. +GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом. +HARMEAN = СРГАРМ ## Возвращает среднее гармоническое. +HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение. +INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии. +KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных. +LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных. +LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда. +LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда. +LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение. +LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение. +MAX = МАКС ## Возвращает наибольшее значение в списке аргументов. +MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения. +MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел. +MIN = МИН ## Возвращает наименьшее значение в списке аргументов. +MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения. +MODE = МОДА ## Возвращает значение моды множества данных. +NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение. +NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения. +NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение. +NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение. +NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения. +PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона. +PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона. +PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных. +PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов. +POISSON = ПУАССОН ## Возвращает распределение Пуассона. +PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов. +QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных. +RANK = РАНГ ## Возвращает ранг числа в списке чисел. +RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона. +SKEW = СКОС ## Возвращает асимметрию распределения. +SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии. +SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных. +STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение. +STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке. +STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения. +STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности. +STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения. +STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии. +TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента. +TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента. +TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом. +TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных. +TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента. +VAR = ДИСП ## Оценивает дисперсию по выборке. +VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения. +VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности. +VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения. +WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла. +ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста. + + +## +## Text functions Текстовые функции +## +ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые). +BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ). +CHAR = СИМВОЛ ## Возвращает знак с заданным кодом. +CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста. +CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке. +CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один. +DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат. +EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений. +FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков. +JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые). +LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения. +LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения. +LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке. +LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке. +LOWER = СТРОЧН ## Преобразует все буквы текста в строчные. +MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки. +PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную. +REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте. +REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте. +REPT = ПОВТОР ## Повторяет текст заданное число раз. +RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки. +RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки. +SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым. +T = Т ## Преобразует аргументы в текст. +TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст. +TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы. +UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные. +VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/config new file mode 100755 index 0000000..bf72cc4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + +## +## Excel Error Codes (For future use) + +## +NULL = #Skärning! +DIV0 = #Division/0! +VALUE = #Värdefel! +REF = #Referens! +NAME = #Namn? +NUM = #Ogiltigt! +NA = #Saknas! diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/functions new file mode 100755 index 0000000..73b2deb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/sv/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Tilläggs- och automatiseringsfunktioner +## +GETPIVOTDATA = HÄMTA.PIVOTDATA ## Returnerar data som lagrats i en pivottabellrapport + + +## +## Cube functions Kubfunktioner +## +CUBEKPIMEMBER = KUBKPIMEDLEM ## Returnerar namn, egenskap och mått för en KPI och visar namnet och egenskapen i cellen. En KPI, eller prestandaindikator, är ett kvantifierbart mått, t.ex. månatlig bruttovinst eller personalomsättning per kvartal, som används för att analysera ett företags resultat. +CUBEMEMBER = KUBMEDLEM ## Returnerar en medlem eller ett par i en kubhierarki. Används för att verifiera att medlemmen eller paret finns i kuben. +CUBEMEMBERPROPERTY = KUBMEDLEMSEGENSKAP ## Returnerar värdet för en medlemsegenskap i kuben. Används för att verifiera att ett medlemsnamn finns i kuben, samt för att returnera den angivna egenskapen för medlemmen. +CUBERANKEDMEMBER = KUBRANGORDNADMEDLEM ## Returnerar den n:te, eller rangordnade, medlemmen i en uppsättning. Används för att returnera ett eller flera element i en uppsättning, till exempelvis den bästa försäljaren eller de tio bästa eleverna. +CUBESET = KUBINSTÄLLNING ## Definierar en beräknad uppsättning medlemmar eller par genom att skicka ett bestämt uttryck till kuben på servern, som skapar uppsättningen och sedan returnerar den till Microsoft Office Excel. +CUBESETCOUNT = KUBINSTÄLLNINGANTAL ## Returnerar antalet objekt i en uppsättning. +CUBEVALUE = KUBVÄRDE ## Returnerar ett mängdvärde från en kub. + + +## +## Database functions Databasfunktioner +## +DAVERAGE = DMEDEL ## Returnerar medelvärdet av databasposterna +DCOUNT = DANTAL ## Räknar antalet celler som innehåller tal i en databas +DCOUNTA = DANTALV ## Räknar ifyllda celler i en databas +DGET = DHÄMTA ## Hämtar en enstaka post från en databas som uppfyller de angivna villkoren +DMAX = DMAX ## Returnerar det största värdet från databasposterna +DMIN = DMIN ## Returnerar det minsta värdet från databasposterna +DPRODUCT = DPRODUKT ## Multiplicerar värdena i ett visst fält i poster som uppfyller villkoret +DSTDEV = DSTDAV ## Uppskattar standardavvikelsen baserat på ett urval av databasposterna +DSTDEVP = DSTDAVP ## Beräknar standardavvikelsen utifrån hela populationen av valda databasposter +DSUM = DSUMMA ## Summerar talen i kolumnfält i databasposter som uppfyller villkoret +DVAR = DVARIANS ## Uppskattar variansen baserat på ett urval av databasposterna +DVARP = DVARIANSP ## Beräknar variansen utifrån hela populationen av valda databasposter + + +## +## Date and time functions Tid- och datumfunktioner +## +DATE = DATUM ## Returnerar ett serienummer för ett visst datum +DATEVALUE = DATUMVÄRDE ## Konverterar ett datum i textformat till ett serienummer +DAY = DAG ## Konverterar ett serienummer till dag i månaden +DAYS360 = DAGAR360 ## Beräknar antalet dagar mellan två datum baserat på ett 360-dagarsår +EDATE = EDATUM ## Returnerar serienumret för ett datum som infaller ett visst antal månader före eller efter startdatumet +EOMONTH = SLUTMÅNAD ## Returnerar serienumret för sista dagen i månaden ett visst antal månader tidigare eller senare +HOUR = TIMME ## Konverterar ett serienummer till en timme +MINUTE = MINUT ## Konverterar ett serienummer till en minut +MONTH = MÅNAD ## Konverterar ett serienummer till en månad +NETWORKDAYS = NETTOARBETSDAGAR ## Returnerar antalet hela arbetsdagar mellan två datum +NOW = NU ## Returnerar serienumret för dagens datum och aktuell tid +SECOND = SEKUND ## Konverterar ett serienummer till en sekund +TIME = KLOCKSLAG ## Returnerar serienumret för en viss tid +TIMEVALUE = TIDVÄRDE ## Konverterar en tid i textformat till ett serienummer +TODAY = IDAG ## Returnerar serienumret för dagens datum +WEEKDAY = VECKODAG ## Konverterar ett serienummer till en dag i veckan +WEEKNUM = VECKONR ## Konverterar ett serienummer till ett veckonummer +WORKDAY = ARBETSDAGAR ## Returnerar serienumret för ett datum ett visst antal arbetsdagar tidigare eller senare +YEAR = ÅR ## Konverterar ett serienummer till ett år +YEARFRAC = ÅRDEL ## Returnerar en del av ett år som representerar antalet hela dagar mellan start- och slutdatum + + +## +## Engineering functions Tekniska funktioner +## +BESSELI = BESSELI ## Returnerar den modifierade Bessel-funktionen In(x) +BESSELJ = BESSELJ ## Returnerar Bessel-funktionen Jn(x) +BESSELK = BESSELK ## Returnerar den modifierade Bessel-funktionen Kn(x) +BESSELY = BESSELY ## Returnerar Bessel-funktionen Yn(x) +BIN2DEC = BIN.TILL.DEC ## Omvandlar ett binärt tal till decimalt +BIN2HEX = BIN.TILL.HEX ## Omvandlar ett binärt tal till hexadecimalt +BIN2OCT = BIN.TILL.OKT ## Omvandlar ett binärt tal till oktalt +COMPLEX = KOMPLEX ## Omvandlar reella och imaginära koefficienter till ett komplext tal +CONVERT = KONVERTERA ## Omvandlar ett tal från ett måttsystem till ett annat +DEC2BIN = DEC.TILL.BIN ## Omvandlar ett decimalt tal till binärt +DEC2HEX = DEC.TILL.HEX ## Omvandlar ett decimalt tal till hexadecimalt +DEC2OCT = DEC.TILL.OKT ## Omvandlar ett decimalt tal till oktalt +DELTA = DELTA ## Testar om två värden är lika +ERF = FELF ## Returnerar felfunktionen +ERFC = FELFK ## Returnerar den komplementära felfunktionen +GESTEP = SLSTEG ## Testar om ett tal är större än ett tröskelvärde +HEX2BIN = HEX.TILL.BIN ## Omvandlar ett hexadecimalt tal till binärt +HEX2DEC = HEX.TILL.DEC ## Omvandlar ett hexadecimalt tal till decimalt +HEX2OCT = HEX.TILL.OKT ## Omvandlar ett hexadecimalt tal till oktalt +IMABS = IMABS ## Returnerar absolutvärdet (modulus) för ett komplext tal +IMAGINARY = IMAGINÄR ## Returnerar den imaginära koefficienten för ett komplext tal +IMARGUMENT = IMARGUMENT ## Returnerar det komplexa talets argument, en vinkel uttryckt i radianer +IMCONJUGATE = IMKONJUGAT ## Returnerar det komplexa talets konjugat +IMCOS = IMCOS ## Returnerar cosinus för ett komplext tal +IMDIV = IMDIV ## Returnerar kvoten för två komplexa tal +IMEXP = IMEUPPHÖJT ## Returnerar exponenten för ett komplext tal +IMLN = IMLN ## Returnerar den naturliga logaritmen för ett komplext tal +IMLOG10 = IMLOG10 ## Returnerar 10-logaritmen för ett komplext tal +IMLOG2 = IMLOG2 ## Returnerar 2-logaritmen för ett komplext tal +IMPOWER = IMUPPHÖJT ## Returnerar ett komplext tal upphöjt till en exponent +IMPRODUCT = IMPRODUKT ## Returnerar produkten av komplexa tal +IMREAL = IMREAL ## Returnerar den reella koefficienten för ett komplext tal +IMSIN = IMSIN ## Returnerar sinus för ett komplext tal +IMSQRT = IMROT ## Returnerar kvadratroten av ett komplext tal +IMSUB = IMDIFF ## Returnerar differensen mellan två komplexa tal +IMSUM = IMSUM ## Returnerar summan av komplexa tal +OCT2BIN = OKT.TILL.BIN ## Omvandlar ett oktalt tal till binärt +OCT2DEC = OKT.TILL.DEC ## Omvandlar ett oktalt tal till decimalt +OCT2HEX = OKT.TILL.HEX ## Omvandlar ett oktalt tal till hexadecimalt + + +## +## Financial functions Finansiella funktioner +## +ACCRINT = UPPLRÄNTA ## Returnerar den upplupna räntan för värdepapper med periodisk ränta +ACCRINTM = UPPLOBLRÄNTA ## Returnerar den upplupna räntan för ett värdepapper som ger avkastning på förfallodagen +AMORDEGRC = AMORDEGRC ## Returnerar avskrivningen för varje redovisningsperiod med hjälp av en avskrivningskoefficient +AMORLINC = AMORLINC ## Returnerar avskrivningen för varje redovisningsperiod +COUPDAYBS = KUPDAGBB ## Returnerar antal dagar från början av kupongperioden till likviddagen +COUPDAYS = KUPDAGARS ## Returnerar antalet dagar i kupongperioden som innehåller betalningsdatumet +COUPDAYSNC = KUPDAGNK ## Returnerar antalet dagar från betalningsdatumet till nästa kupongdatum +COUPNCD = KUPNKD ## Returnerar nästa kupongdatum efter likviddagen +COUPNUM = KUPANT ## Returnerar kuponger som förfaller till betalning mellan likviddagen och förfallodagen +COUPPCD = KUPFKD ## Returnerar föregående kupongdatum före likviddagen +CUMIPMT = KUMRÄNTA ## Returnerar den ackumulerade räntan som betalats mellan två perioder +CUMPRINC = KUMPRIS ## Returnerar det ackumulerade kapitalbeloppet som betalats på ett lån mellan två perioder +DB = DB ## Returnerar avskrivningen för en tillgång under en angiven tid enligt metoden för fast degressiv avskrivning +DDB = DEGAVSKR ## Returnerar en tillgångs värdeminskning under en viss period med hjälp av dubbel degressiv avskrivning eller någon annan metod som du anger +DISC = DISK ## Returnerar diskonteringsräntan för ett värdepapper +DOLLARDE = DECTAL ## Omvandlar ett pris uttryckt som ett bråk till ett decimaltal +DOLLARFR = BRÅK ## Omvandlar ett pris i kronor uttryckt som ett decimaltal till ett bråk +DURATION = LÖPTID ## Returnerar den årliga löptiden för en säkerhet med periodiska räntebetalningar +EFFECT = EFFRÄNTA ## Returnerar den årliga effektiva räntesatsen +FV = SLUTVÄRDE ## Returnerar det framtida värdet på en investering +FVSCHEDULE = FÖRRÄNTNING ## Returnerar det framtida värdet av ett begynnelsekapital beräknat på olika räntenivåer +INTRATE = ÅRSRÄNTA ## Returnerar räntesatsen för ett betalt värdepapper +IPMT = RBETALNING ## Returnerar räntedelen av en betalning för en given period +IRR = IR ## Returnerar internräntan för en serie betalningar +ISPMT = RALÅN ## Beräknar räntan som har betalats under en specifik betalningsperiod +MDURATION = MLÖPTID ## Returnerar den modifierade Macauley-löptiden för ett värdepapper med det antagna nominella värdet 100 kr +MIRR = MODIR ## Returnerar internräntan där positiva och negativa betalningar finansieras med olika räntor +NOMINAL = NOMRÄNTA ## Returnerar den årliga nominella räntesatsen +NPER = PERIODER ## Returnerar antalet perioder för en investering +NPV = NETNUVÄRDE ## Returnerar nuvärdet av en serie periodiska betalningar vid en given diskonteringsränta +ODDFPRICE = UDDAFPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda första period +ODDFYIELD = UDDAFAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda första period +ODDLPRICE = UDDASPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda sista period +ODDLYIELD = UDDASAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda sista period +PMT = BETALNING ## Returnerar den periodiska betalningen för en annuitet +PPMT = AMORT ## Returnerar amorteringsdelen av en annuitetsbetalning för en given period +PRICE = PRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger periodisk ränta +PRICEDISC = PRISDISK ## Returnerar priset per 100 kr nominellt värde för ett diskonterat värdepapper +PRICEMAT = PRISFÖRF ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger ränta på förfallodagen +PV = PV ## Returnerar nuvärdet av en serie lika stora periodiska betalningar +RATE = RÄNTA ## Returnerar räntesatsen per period i en annuitet +RECEIVED = BELOPP ## Returnerar beloppet som utdelas på förfallodagen för ett betalat värdepapper +SLN = LINAVSKR ## Returnerar den linjära avskrivningen för en tillgång under en period +SYD = ÅRSAVSKR ## Returnerar den årliga avskrivningssumman för en tillgång under en angiven period +TBILLEQ = SSVXEKV ## Returnerar avkastningen motsvarande en obligation för en statsskuldväxel +TBILLPRICE = SSVXPRIS ## Returnerar priset per 100 kr nominellt värde för en statsskuldväxel +TBILLYIELD = SSVXRÄNTA ## Returnerar avkastningen för en statsskuldväxel +VDB = VDEGRAVSKR ## Returnerar avskrivningen för en tillgång under en angiven period (med degressiv avskrivning) +XIRR = XIRR ## Returnerar internräntan för en serie betalningar som inte nödvändigtvis är periodiska +XNPV = XNUVÄRDE ## Returnerar det nuvarande nettovärdet för en serie betalningar som inte nödvändigtvis är periodiska +YIELD = NOMAVK ## Returnerar avkastningen för ett värdepapper som ger periodisk ränta +YIELDDISC = NOMAVKDISK ## Returnerar den årliga avkastningen för diskonterade värdepapper, exempelvis en statsskuldväxel +YIELDMAT = NOMAVKFÖRF ## Returnerar den årliga avkastningen för ett värdepapper som ger ränta på förfallodagen + + +## +## Information functions Informationsfunktioner +## +CELL = CELL ## Returnerar information om formatering, plats och innehåll i en cell +ERROR.TYPE = FEL.TYP ## Returnerar ett tal som motsvarar ett felvärde +INFO = INFO ## Returnerar information om operativsystemet +ISBLANK = ÄRREF ## Returnerar SANT om värdet är tomt +ISERR = Ä ## Returnerar SANT om värdet är ett felvärde annat än #SAKNAS! +ISERROR = ÄRFEL ## Returnerar SANT om värdet är ett felvärde +ISEVEN = ÄRJÄMN ## Returnerar SANT om talet är jämnt +ISLOGICAL = ÄREJTEXT ## Returnerar SANT om värdet är ett logiskt värde +ISNA = ÄRLOGISK ## Returnerar SANT om värdet är felvärdet #SAKNAS! +ISNONTEXT = ÄRSAKNAD ## Returnerar SANT om värdet inte är text +ISNUMBER = ÄRTAL ## Returnerar SANT om värdet är ett tal +ISODD = ÄRUDDA ## Returnerar SANT om talet är udda +ISREF = ÄRTOM ## Returnerar SANT om värdet är en referens +ISTEXT = ÄRTEXT ## Returnerar SANT om värdet är text +N = N ## Returnerar ett värde omvandlat till ett tal +NA = SAKNAS ## Returnerar felvärdet #SAKNAS! +TYPE = VÄRDETYP ## Returnerar ett tal som anger värdets datatyp + + +## +## Logical functions Logiska funktioner +## +AND = OCH ## Returnerar SANT om alla argument är sanna +FALSE = FALSKT ## Returnerar det logiska värdet FALSKT +IF = OM ## Anger vilket logiskt test som ska utföras +IFERROR = OMFEL ## Returnerar ett värde som du anger om en formel utvärderar till ett fel; annars returneras resultatet av formeln +NOT = ICKE ## Inverterar logiken för argumenten +OR = ELLER ## Returnerar SANT om något argument är SANT +TRUE = SANT ## Returnerar det logiska värdet SANT + + +## +## Lookup and reference functions Sök- och referensfunktioner +## +ADDRESS = ADRESS ## Returnerar en referens som text till en enstaka cell i ett kalkylblad +AREAS = OMRÅDEN ## Returnerar antalet områden i en referens +CHOOSE = VÄLJ ## Väljer ett värde i en lista över värden +COLUMN = KOLUMN ## Returnerar kolumnnumret för en referens +COLUMNS = KOLUMNER ## Returnerar antalet kolumner i en referens +HLOOKUP = LETAKOLUMN ## Söker i den översta raden i en matris och returnerar värdet för angiven cell +HYPERLINK = HYPERLÄNK ## Skapar en genväg eller ett hopp till ett dokument i nätverket, i ett intranät eller på Internet +INDEX = INDEX ## Använder ett index för ett välja ett värde i en referens eller matris +INDIRECT = INDIREKT ## Returnerar en referens som anges av ett textvärde +LOOKUP = LETAUPP ## Letar upp värden i en vektor eller matris +MATCH = PASSA ## Letar upp värden i en referens eller matris +OFFSET = FÖRSKJUTNING ## Returnerar en referens förskjuten i förhållande till en given referens +ROW = RAD ## Returnerar radnumret för en referens +ROWS = RADER ## Returnerar antalet rader i en referens +RTD = RTD ## Hämtar realtidsdata från ett program som stöder COM-automation (Automation: Ett sätt att arbeta med ett programs objekt från ett annat program eller utvecklingsverktyg. Detta kallades tidigare för OLE Automation, och är en branschstandard och ingår i Component Object Model (COM).) +TRANSPOSE = TRANSPONERA ## Transponerar en matris +VLOOKUP = LETARAD ## Letar i den första kolumnen i en matris och flyttar över raden för att returnera värdet för en cell + + +## +## Math and trigonometry functions Matematiska och trigonometriska funktioner +## +ABS = ABS ## Returnerar absolutvärdet av ett tal +ACOS = ARCCOS ## Returnerar arcus cosinus för ett tal +ACOSH = ARCCOSH ## Returnerar inverterad hyperbolisk cosinus för ett tal +ASIN = ARCSIN ## Returnerar arcus cosinus för ett tal +ASINH = ARCSINH ## Returnerar hyperbolisk arcus sinus för ett tal +ATAN = ARCTAN ## Returnerar arcus tangens för ett tal +ATAN2 = ARCTAN2 ## Returnerar arcus tangens för en x- och en y- koordinat +ATANH = ARCTANH ## Returnerar hyperbolisk arcus tangens för ett tal +CEILING = RUNDA.UPP ## Avrundar ett tal till närmaste heltal eller närmaste signifikanta multipel +COMBIN = KOMBIN ## Returnerar antalet kombinationer för ett givet antal objekt +COS = COS ## Returnerar cosinus för ett tal +COSH = COSH ## Returnerar hyperboliskt cosinus för ett tal +DEGREES = GRADER ## Omvandlar radianer till grader +EVEN = JÄMN ## Avrundar ett tal uppåt till närmaste heltal +EXP = EXP ## Returnerar e upphöjt till ett givet tal +FACT = FAKULTET ## Returnerar fakulteten för ett tal +FACTDOUBLE = DUBBELFAKULTET ## Returnerar dubbelfakulteten för ett tal +FLOOR = RUNDA.NED ## Avrundar ett tal nedåt mot noll +GCD = SGD ## Returnerar den största gemensamma nämnaren +INT = HELTAL ## Avrundar ett tal nedåt till närmaste heltal +LCM = MGM ## Returnerar den minsta gemensamma multipeln +LN = LN ## Returnerar den naturliga logaritmen för ett tal +LOG = LOG ## Returnerar logaritmen för ett tal för en given bas +LOG10 = LOG10 ## Returnerar 10-logaritmen för ett tal +MDETERM = MDETERM ## Returnerar matrisen som är avgörandet av en matris +MINVERSE = MINVERT ## Returnerar matrisinversen av en matris +MMULT = MMULT ## Returnerar matrisprodukten av två matriser +MOD = REST ## Returnerar resten vid en division +MROUND = MAVRUNDA ## Returnerar ett tal avrundat till en given multipel +MULTINOMIAL = MULTINOMIAL ## Returnerar multinomialen för en uppsättning tal +ODD = UDDA ## Avrundar ett tal uppåt till närmaste udda heltal +PI = PI ## Returnerar värdet pi +POWER = UPPHÖJT.TILL ## Returnerar resultatet av ett tal upphöjt till en exponent +PRODUCT = PRODUKT ## Multiplicerar argumenten +QUOTIENT = KVOT ## Returnerar heltalsdelen av en division +RADIANS = RADIANER ## Omvandlar grader till radianer +RAND = SLUMP ## Returnerar ett slumptal mellan 0 och 1 +RANDBETWEEN = SLUMP.MELLAN ## Returnerar ett slumptal mellan de tal som du anger +ROMAN = ROMERSK ## Omvandlar vanliga (arabiska) siffror till romerska som text +ROUND = AVRUNDA ## Avrundar ett tal till ett angivet antal siffror +ROUNDDOWN = AVRUNDA.NEDÅT ## Avrundar ett tal nedåt mot noll +ROUNDUP = AVRUNDA.UPPÅT ## Avrundar ett tal uppåt, från noll +SERIESSUM = SERIESUMMA ## Returnerar summan av en potensserie baserat på formeln +SIGN = TECKEN ## Returnerar tecknet för ett tal +SIN = SIN ## Returnerar sinus för en given vinkel +SINH = SINH ## Returnerar hyperbolisk sinus för ett tal +SQRT = ROT ## Returnerar den positiva kvadratroten +SQRTPI = ROTPI ## Returnerar kvadratroten för (tal * pi) +SUBTOTAL = DELSUMMA ## Returnerar en delsumma i en lista eller databas +SUM = SUMMA ## Summerar argumenten +SUMIF = SUMMA.OM ## Summerar celler enligt ett angivet villkor +SUMIFS = SUMMA.OMF ## Lägger till cellerna i ett område som uppfyller flera kriterier +SUMPRODUCT = PRODUKTSUMMA ## Returnerar summan av produkterna i motsvarande matriskomponenter +SUMSQ = KVADRATSUMMA ## Returnerar summan av argumentens kvadrater +SUMX2MY2 = SUMMAX2MY2 ## Returnerar summan av differensen mellan kvadraterna för motsvarande värden i två matriser +SUMX2PY2 = SUMMAX2PY2 ## Returnerar summan av summan av kvadraterna av motsvarande värden i två matriser +SUMXMY2 = SUMMAXMY2 ## Returnerar summan av kvadraten av skillnaden mellan motsvarande värden i två matriser +TAN = TAN ## Returnerar tangens för ett tal +TANH = TANH ## Returnerar hyperbolisk tangens för ett tal +TRUNC = AVKORTA ## Avkortar ett tal till ett heltal + + +## +## Statistical functions Statistiska funktioner +## +AVEDEV = MEDELAVV ## Returnerar medelvärdet för datapunkters absoluta avvikelse från deras medelvärde +AVERAGE = MEDEL ## Returnerar medelvärdet av argumenten +AVERAGEA = AVERAGEA ## Returnerar medelvärdet av argumenten, inklusive tal, text och logiska värden +AVERAGEIF = MEDELOM ## Returnerar medelvärdet (aritmetiskt medelvärde) för alla celler i ett område som uppfyller ett givet kriterium +AVERAGEIFS = MEDELOMF ## Returnerar medelvärdet (det aritmetiska medelvärdet) för alla celler som uppfyller flera villkor. +BETADIST = BETAFÖRD ## Returnerar den kumulativa betafördelningsfunktionen +BETAINV = BETAINV ## Returnerar inversen till den kumulativa fördelningsfunktionen för en viss betafördelning +BINOMDIST = BINOMFÖRD ## Returnerar den individuella binomialfördelningen +CHIDIST = CHI2FÖRD ## Returnerar den ensidiga sannolikheten av c2-fördelningen +CHIINV = CHI2INV ## Returnerar inversen av chi2-fördelningen +CHITEST = CHI2TEST ## Returnerar oberoendetesten +CONFIDENCE = KONFIDENS ## Returnerar konfidensintervallet för en populations medelvärde +CORREL = KORREL ## Returnerar korrelationskoefficienten mellan två datamängder +COUNT = ANTAL ## Räknar hur många tal som finns bland argumenten +COUNTA = ANTALV ## Räknar hur många värden som finns bland argumenten +COUNTBLANK = ANTAL.TOMMA ## Räknar antalet tomma celler i ett område +COUNTIF = ANTAL.OM ## Räknar antalet celler i ett område som uppfyller angivna villkor. +COUNTIFS = ANTAL.OMF ## Räknar antalet celler i ett område som uppfyller flera villkor. +COVAR = KOVAR ## Returnerar kovariansen, d.v.s. medelvärdet av produkterna för parade avvikelser +CRITBINOM = KRITBINOM ## Returnerar det minsta värdet för vilket den kumulativa binomialfördelningen är mindre än eller lika med ett villkorsvärde +DEVSQ = KVADAVV ## Returnerar summan av kvadrater på avvikelser +EXPONDIST = EXPONFÖRD ## Returnerar exponentialfördelningen +FDIST = FFÖRD ## Returnerar F-sannolikhetsfördelningen +FINV = FINV ## Returnerar inversen till F-sannolikhetsfördelningen +FISHER = FISHER ## Returnerar Fisher-transformationen +FISHERINV = FISHERINV ## Returnerar inversen till Fisher-transformationen +FORECAST = PREDIKTION ## Returnerar ett värde längs en linjär trendlinje +FREQUENCY = FREKVENS ## Returnerar en frekvensfördelning som en lodrät matris +FTEST = FTEST ## Returnerar resultatet av en F-test +GAMMADIST = GAMMAFÖRD ## Returnerar gammafördelningen +GAMMAINV = GAMMAINV ## Returnerar inversen till den kumulativa gammafördelningen +GAMMALN = GAMMALN ## Returnerar den naturliga logaritmen för gammafunktionen, G(x) +GEOMEAN = GEOMEDEL ## Returnerar det geometriska medelvärdet +GROWTH = EXPTREND ## Returnerar värden längs en exponentiell trend +HARMEAN = HARMMEDEL ## Returnerar det harmoniska medelvärdet +HYPGEOMDIST = HYPGEOMFÖRD ## Returnerar den hypergeometriska fördelningen +INTERCEPT = SKÄRNINGSPUNKT ## Returnerar skärningspunkten för en linjär regressionslinje +KURT = TOPPIGHET ## Returnerar toppigheten av en mängd data +LARGE = STÖRSTA ## Returnerar det n:te största värdet i en mängd data +LINEST = REGR ## Returnerar parametrar till en linjär trendlinje +LOGEST = EXPREGR ## Returnerar parametrarna i en exponentiell trend +LOGINV = LOGINV ## Returnerar inversen till den lognormala fördelningen +LOGNORMDIST = LOGNORMFÖRD ## Returnerar den kumulativa lognormala fördelningen +MAX = MAX ## Returnerar det största värdet i en lista av argument +MAXA = MAXA ## Returnerar det största värdet i en lista av argument, inklusive tal, text och logiska värden +MEDIAN = MEDIAN ## Returnerar medianen för angivna tal +MIN = MIN ## Returnerar det minsta värdet i en lista med argument +MINA = MINA ## Returnerar det minsta värdet i en lista över argument, inklusive tal, text och logiska värden +MODE = TYPVÄRDE ## Returnerar det vanligaste värdet i en datamängd +NEGBINOMDIST = NEGBINOMFÖRD ## Returnerar den negativa binomialfördelningen +NORMDIST = NORMFÖRD ## Returnerar den kumulativa normalfördelningen +NORMINV = NORMINV ## Returnerar inversen till den kumulativa normalfördelningen +NORMSDIST = NORMSFÖRD ## Returnerar den kumulativa standardnormalfördelningen +NORMSINV = NORMSINV ## Returnerar inversen till den kumulativa standardnormalfördelningen +PEARSON = PEARSON ## Returnerar korrelationskoefficienten till Pearsons momentprodukt +PERCENTILE = PERCENTIL ## Returnerar den n:te percentilen av värden i ett område +PERCENTRANK = PROCENTRANG ## Returnerar procentrangen för ett värde i en datamängd +PERMUT = PERMUT ## Returnerar antal permutationer för ett givet antal objekt +POISSON = POISSON ## Returnerar Poisson-fördelningen +PROB = SANNOLIKHET ## Returnerar sannolikheten att värden i ett område ligger mellan två gränser +QUARTILE = KVARTIL ## Returnerar kvartilen av en mängd data +RANK = RANG ## Returnerar rangordningen för ett tal i en lista med tal +RSQ = RKV ## Returnerar kvadraten av Pearsons produktmomentkorrelationskoefficient +SKEW = SNEDHET ## Returnerar snedheten för en fördelning +SLOPE = LUTNING ## Returnerar lutningen på en linjär regressionslinje +SMALL = MINSTA ## Returnerar det n:te minsta värdet i en mängd data +STANDARDIZE = STANDARDISERA ## Returnerar ett normaliserat värde +STDEV = STDAV ## Uppskattar standardavvikelsen baserat på ett urval +STDEVA = STDEVA ## Uppskattar standardavvikelsen baserat på ett urval, inklusive tal, text och logiska värden +STDEVP = STDAVP ## Beräknar standardavvikelsen baserat på hela populationen +STDEVPA = STDEVPA ## Beräknar standardavvikelsen baserat på hela populationen, inklusive tal, text och logiska värden +STEYX = STDFELYX ## Returnerar standardfelet för ett förutspått y-värde för varje x-värde i regressionen +TDIST = TFÖRD ## Returnerar Students t-fördelning +TINV = TINV ## Returnerar inversen till Students t-fördelning +TREND = TREND ## Returnerar värden längs en linjär trend +TRIMMEAN = TRIMMEDEL ## Returnerar medelvärdet av mittpunkterna i en datamängd +TTEST = TTEST ## Returnerar sannolikheten beräknad ur Students t-test +VAR = VARIANS ## Uppskattar variansen baserat på ett urval +VARA = VARA ## Uppskattar variansen baserat på ett urval, inklusive tal, text och logiska värden +VARP = VARIANSP ## Beräknar variansen baserat på hela populationen +VARPA = VARPA ## Beräknar variansen baserat på hela populationen, inklusive tal, text och logiska värden +WEIBULL = WEIBULL ## Returnerar Weibull-fördelningen +ZTEST = ZTEST ## Returnerar det ensidiga sannolikhetsvärdet av ett z-test + + +## +## Text functions Textfunktioner +## +ASC = ASC ## Ändrar helbredds (dubbel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med halvt breddsteg (enkel byte) +BAHTTEXT = BAHTTEXT ## Omvandlar ett tal till text med valutaformatet ß (baht) +CHAR = TECKENKOD ## Returnerar tecknet som anges av kod +CLEAN = STÄDA ## Tar bort alla icke utskrivbara tecken i en text +CODE = KOD ## Returnerar en numerisk kod för det första tecknet i en textsträng +CONCATENATE = SAMMANFOGA ## Sammanfogar flera textdelar till en textsträng +DOLLAR = VALUTA ## Omvandlar ett tal till text med valutaformat +EXACT = EXAKT ## Kontrollerar om två textvärden är identiska +FIND = HITTA ## Hittar en text i en annan (skiljer på gemener och versaler) +FINDB = HITTAB ## Hittar en text i en annan (skiljer på gemener och versaler) +FIXED = FASTTAL ## Formaterar ett tal som text med ett fast antal decimaler +JIS = JIS ## Ändrar halvbredds (enkel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med helt breddsteg (dubbel byte) +LEFT = VÄNSTER ## Returnerar tecken längst till vänster i en sträng +LEFTB = VÄNSTERB ## Returnerar tecken längst till vänster i en sträng +LEN = LÄNGD ## Returnerar antalet tecken i en textsträng +LENB = LÄNGDB ## Returnerar antalet tecken i en textsträng +LOWER = GEMENER ## Omvandlar text till gemener +MID = EXTEXT ## Returnerar angivet antal tecken från en text med början vid den position som du anger +MIDB = EXTEXTB ## Returnerar angivet antal tecken från en text med början vid den position som du anger +PHONETIC = PHONETIC ## Returnerar de fonetiska (furigana) tecknen i en textsträng +PROPER = INITIAL ## Ändrar första bokstaven i varje ord i ett textvärde till versal +REPLACE = ERSÄTT ## Ersätter tecken i text +REPLACEB = ERSÄTTB ## Ersätter tecken i text +REPT = REP ## Upprepar en text ett bestämt antal gånger +RIGHT = HÖGER ## Returnerar tecken längst till höger i en sträng +RIGHTB = HÖGERB ## Returnerar tecken längst till höger i en sträng +SEARCH = SÖK ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) +SEARCHB = SÖKB ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) +SUBSTITUTE = BYT.UT ## Ersätter gammal text med ny text i en textsträng +T = T ## Omvandlar argumenten till text +TEXT = TEXT ## Formaterar ett tal och omvandlar det till text +TRIM = RENSA ## Tar bort blanksteg från text +UPPER = VERSALER ## Omvandlar text till versaler +VALUE = TEXTNUM ## Omvandlar ett textargument till ett tal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/config new file mode 100755 index 0000000..266e000 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = YTL + + +## +## Excel Error Codes (For future use) + +## +NULL = #BOŞ! +DIV0 = #SAYI/0! +VALUE = #DEĞER! +REF = #BAŞV! +NAME = #AD? +NUM = #SAYI! +NA = #YOK diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/functions new file mode 100755 index 0000000..f03563a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Calculation/locale/tr/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Eklenti ve Otomasyon fonksiyonları +## +GETPIVOTDATA = ÖZETVERİAL ## Bir Özet Tablo raporunda saklanan verileri verir. + + +## +## Cube functions Küp işlevleri +## +CUBEKPIMEMBER = KÜPKPIÜYE ## Kilit performans göstergesi (KPI-Key Performance Indicator) adını, özelliğini ve ölçüsünü verir ve hücredeki ad ve özelliği gösterir. KPI, bir kurumun performansını izlemek için kullanılan aylık brüt kâr ya da üç aylık çalışan giriş çıkışları gibi ölçülebilen bir birimdir. +CUBEMEMBER = KÜPÜYE ## Bir küp hiyerarşisinde bir üyeyi veya kaydı verir. Üye veya kaydın küpte varolduğunu doğrulamak için kullanılır. +CUBEMEMBERPROPERTY = KÜPÜYEÖZELLİĞİ ## Bir küpte bir üyenin özelliğinin değerini verir. Küp içinde üye adının varlığını doğrulamak ve bu üyenin belli özelliklerini getirmek için kullanılır. +CUBERANKEDMEMBER = KÜPÜYESIRASI ## Bir küme içindeki üyenin derecesini veya kaçıncı olduğunu verir. En iyi satış elemanı, veya en iyi on öğrenci gibi bir kümedeki bir veya daha fazla öğeyi getirmek için kullanılır. +CUBESET = KÜPKÜME ## Kümeyi oluşturan ve ardından bu kümeyi Microsoft Office Excel'e getiren sunucudaki küpe küme ifadelerini göndererek hesaplanan üye veya kayıt kümesini tanımlar. +CUBESETCOUNT = KÜPKÜMESAY ## Bir kümedeki öğelerin sayısını getirir. +CUBEVALUE = KÜPDEĞER ## Bir küpten toplam değeri getirir. + + +## +## Database functions Veritabanı işlevleri +## +DAVERAGE = VSEÇORT ## Seçili veritabanı girdilerinin ortalamasını verir. +DCOUNT = VSEÇSAY ## Veritabanında sayı içeren hücre sayısını hesaplar. +DCOUNTA = VSEÇSAYDOLU ## Veritabanındaki boş olmayan hücreleri sayar. +DGET = VAL ## Veritabanından, belirtilen ölçütlerle eşleşen tek bir rapor çıkarır. +DMAX = VSEÇMAK ## Seçili veritabanı girişlerinin en yüksek değerini verir. +DMIN = VSEÇMİN ## Seçili veritabanı girişlerinin en düşük değerini verir. +DPRODUCT = VSEÇÇARP ## Kayıtların belli bir alanında bulunan, bir veritabanındaki ölçütlerle eşleşen değerleri çarpar. +DSTDEV = VSEÇSTDSAPMA ## Seçili veritabanı girişlerinden oluşan bir örneğe dayanarak, standart sapmayı tahmin eder. +DSTDEVP = VSEÇSTDSAPMAS ## Standart sapmayı, seçili veritabanı girişlerinin tüm popülasyonunu esas alarak hesaplar. +DSUM = VSEÇTOPLA ## Kayıtların alan sütununda bulunan, ölçütle eşleşen sayıları toplar. +DVAR = VSEÇVAR ## Seçili veritabanı girişlerinden oluşan bir örneği esas alarak farkı tahmin eder. +DVARP = VSEÇVARS ## Seçili veritabanı girişlerinin tüm popülasyonunu esas alarak farkı hesaplar. + + +## +## Date and time functions Tarih ve saat işlevleri +## +DATE = TARİH ## Belirli bir tarihin seri numarasını verir. +DATEVALUE = TARİHSAYISI ## Metin biçimindeki bir tarihi seri numarasına dönüştürür. +DAY = GÜN ## Seri numarasını, ayın bir gününe dönüştürür. +DAYS360 = GÜN360 ## İki tarih arasındaki gün sayısını, 360 günlük yılı esas alarak hesaplar. +EDATE = SERİTARİH ## Başlangıç tarihinden itibaren, belirtilen ay sayısından önce veya sonraki tarihin seri numarasını verir. +EOMONTH = SERİAY ## Belirtilen sayıda ay önce veya sonraki ayın son gününün seri numarasını verir. +HOUR = SAAT ## Bir seri numarasını saate dönüştürür. +MINUTE = DAKİKA ## Bir seri numarasını dakikaya dönüştürür. +MONTH = AY ## Bir seri numarasını aya dönüştürür. +NETWORKDAYS = TAMİŞGÜNÜ ## İki tarih arasındaki tam çalışma günlerinin sayısını verir. +NOW = ŞİMDİ ## Geçerli tarihin ve saatin seri numarasını verir. +SECOND = SANİYE ## Bir seri numarasını saniyeye dönüştürür. +TIME = ZAMAN ## Belirli bir zamanın seri numarasını verir. +TIMEVALUE = ZAMANSAYISI ## Metin biçimindeki zamanı seri numarasına dönüştürür. +TODAY = BUGÜN ## Bugünün tarihini seri numarasına dönüştürür. +WEEKDAY = HAFTANINGÜNÜ ## Bir seri numarasını, haftanın gününe dönüştürür. +WEEKNUM = HAFTASAY ## Dizisel değerini, haftanın yıl içinde bulunduğu konumu sayısal olarak gösteren sayıya dönüştürür. +WORKDAY = İŞGÜNÜ ## Belirtilen sayıda çalışma günü öncesinin ya da sonrasının tarihinin seri numarasını verir. +YEAR = YIL ## Bir seri numarasını yıla dönüştürür. +YEARFRAC = YILORAN ## Başlangıç_tarihi ve bitiş_tarihi arasındaki tam günleri gösteren yıl kesrini verir. + + +## +## Engineering functions Mühendislik işlevleri +## +BESSELI = BESSELI ## Değiştirilmiş Bessel fonksiyonu In(x)'i verir. +BESSELJ = BESSELJ ## Bessel fonksiyonu Jn(x)'i verir. +BESSELK = BESSELK ## Değiştirilmiş Bessel fonksiyonu Kn(x)'i verir. +BESSELY = BESSELY ## Bessel fonksiyonu Yn(x)'i verir. +BIN2DEC = BIN2DEC ## İkili bir sayıyı, ondalık sayıya dönüştürür. +BIN2HEX = BIN2HEX ## İkili bir sayıyı, onaltılıya dönüştürür. +BIN2OCT = BIN2OCT ## İkili bir sayıyı, sekizliye dönüştürür. +COMPLEX = KARMAŞIK ## Gerçek ve sanal katsayıları, karmaşık sayıya dönüştürür. +CONVERT = ÇEVİR ## Bir sayıyı, bir ölçüm sisteminden bir başka ölçüm sistemine dönüştürür. +DEC2BIN = DEC2BIN ## Ondalık bir sayıyı, ikiliye dönüştürür. +DEC2HEX = DEC2HEX ## Ondalık bir sayıyı, onaltılıya dönüştürür. +DEC2OCT = DEC2OCT ## Ondalık bir sayıyı sekizliğe dönüştürür. +DELTA = DELTA ## İki değerin eşit olup olmadığını sınar. +ERF = HATAİŞLEV ## Hata işlevini verir. +ERFC = TÜMHATAİŞLEV ## Tümleyici hata işlevini verir. +GESTEP = BESINIR ## Bir sayının eşik değerinden büyük olup olmadığını sınar. +HEX2BIN = HEX2BIN ## Onaltılı bir sayıyı ikiliye dönüştürür. +HEX2DEC = HEX2DEC ## Onaltılı bir sayıyı ondalığa dönüştürür. +HEX2OCT = HEX2OCT ## Onaltılı bir sayıyı sekizliğe dönüştürür. +IMABS = SANMUTLAK ## Karmaşık bir sayının mutlak değerini (modül) verir. +IMAGINARY = SANAL ## Karmaşık bir sayının sanal katsayısını verir. +IMARGUMENT = SANBAĞ_DEĞİŞKEN ## Radyanlarla belirtilen bir açı olan teta bağımsız değişkenini verir. +IMCONJUGATE = SANEŞLENEK ## Karmaşık bir sayının karmaşık eşleniğini verir. +IMCOS = SANCOS ## Karmaşık bir sayının kosinüsünü verir. +IMDIV = SANBÖL ## İki karmaşık sayının bölümünü verir. +IMEXP = SANÜS ## Karmaşık bir sayının üssünü verir. +IMLN = SANLN ## Karmaşık bir sayının doğal logaritmasını verir. +IMLOG10 = SANLOG10 ## Karmaşık bir sayının, 10 tabanında logaritmasını verir. +IMLOG2 = SANLOG2 ## Karmaşık bir sayının 2 tabanında logaritmasını verir. +IMPOWER = SANÜSSÜ ## Karmaşık bir sayıyı, bir tamsayı üssüne yükseltilmiş olarak verir. +IMPRODUCT = SANÇARP ## Karmaşık sayıların çarpımını verir. +IMREAL = SANGERÇEK ## Karmaşık bir sayının, gerçek katsayısını verir. +IMSIN = SANSIN ## Karmaşık bir sayının sinüsünü verir. +IMSQRT = SANKAREKÖK ## Karmaşık bir sayının karekökünü verir. +IMSUB = SANÇIKAR ## İki karmaşık sayının farkını verir. +IMSUM = SANTOPLA ## Karmaşık sayıların toplamını verir. +OCT2BIN = OCT2BIN ## Sekizli bir sayıyı ikiliye dönüştürür. +OCT2DEC = OCT2DEC ## Sekizli bir sayıyı ondalığa dönüştürür. +OCT2HEX = OCT2HEX ## Sekizli bir sayıyı onaltılıya dönüştürür. + + +## +## Financial functions Finansal fonksiyonlar +## +ACCRINT = GERÇEKFAİZ ## Dönemsel faiz ödeyen hisse senedine ilişkin tahakkuk eden faizi getirir. +ACCRINTM = GERÇEKFAİZV ## Vadesinde ödeme yapan bir tahvilin tahakkuk etmiş faizini verir. +AMORDEGRC = AMORDEGRC ## Yıpranma katsayısı kullanarak her hesap döneminin değer kaybını verir. +AMORLINC = AMORLINC ## Her hesap dönemi içindeki yıpranmayı verir. +COUPDAYBS = KUPONGÜNBD ## Kupon süresinin başlangıcından alış tarihine kadar olan süredeki gün sayısını verir. +COUPDAYS = KUPONGÜN ## Kupon süresindeki, gün sayısını, alış tarihini de içermek üzere, verir. +COUPDAYSNC = KUPONGÜNDSK ## Alış tarihinden bir sonraki kupon tarihine kadar olan gün sayısını verir. +COUPNCD = KUPONGÜNSKT ## Alış tarihinden bir sonraki kupon tarihini verir. +COUPNUM = KUPONSAYI ## Alış tarihiyle vade tarihi arasında ödenecek kuponların sayısını verir. +COUPPCD = KUPONGÜNÖKT ## Alış tarihinden bir önceki kupon tarihini verir. +CUMIPMT = AİÇVERİMORANI ## İki dönem arasında ödenen kümülatif faizi verir. +CUMPRINC = ANA_PARA_ÖDEMESİ ## İki dönem arasında bir borç üzerine ödenen birikimli temeli verir. +DB = AZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, sabit azalan bakiye yöntemini kullanarak verir. +DDB = ÇİFTAZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, çift azalan bakiye yöntemi ya da sizin belirttiğiniz başka bir yöntemi kullanarak verir. +DISC = İNDİRİM ## Bir tahvilin indirim oranını verir. +DOLLARDE = LİRAON ## Kesir olarak tanımlanmış lira fiyatını, ondalık sayı olarak tanımlanmış lira fiyatına dönüştürür. +DOLLARFR = LİRAKES ## Ondalık sayı olarak tanımlanmış lira fiyatını, kesir olarak tanımlanmış lira fiyatına dönüştürür. +DURATION = SÜRE ## Belli aralıklarla faiz ödemesi yapan bir tahvilin yıllık süresini verir. +EFFECT = ETKİN ## Efektif yıllık faiz oranını verir. +FV = ANBD ## Bir yatırımın gelecekteki değerini verir. +FVSCHEDULE = GDPROGRAM ## Bir seri birleşik faiz oranı uyguladıktan sonra, bir başlangıçtaki anaparanın gelecekteki değerini verir. +INTRATE = FAİZORANI ## Tam olarak yatırım yapılmış bir tahvilin faiz oranını verir. +IPMT = FAİZTUTARI ## Bir yatırımın verilen bir süre için faiz ödemesini verir. +IRR = İÇ_VERİM_ORANI ## Bir para akışı serisi için, iç verim oranını verir. +ISPMT = ISPMT ## Yatırımın belirli bir dönemi boyunca ödenen faizi hesaplar. +MDURATION = MSÜRE ## Varsayılan par değeri 10.000.000 lira olan bir tahvil için Macauley değiştirilmiş süreyi verir. +MIRR = D_İÇ_VERİM_ORANI ## Pozitif ve negatif para akışlarının farklı oranlarda finanse edildiği durumlarda, iç verim oranını verir. +NOMINAL = NOMİNAL ## Yıllık nominal faiz oranını verir. +NPER = DÖNEM_SAYISI ## Bir yatırımın dönem sayısını verir. +NPV = NBD ## Bir yatırımın bugünkü net değerini, bir dönemsel para akışları serisine ve bir indirim oranına bağlı olarak verir. +ODDFPRICE = TEKYDEĞER ## Tek bir ilk dönemi olan bir tahvilin değerini, her 100.000.000 lirada bir verir. +ODDFYIELD = TEKYÖDEME ## Tek bir ilk dönemi olan bir tahvilin ödemesini verir. +ODDLPRICE = TEKSDEĞER ## Tek bir son dönemi olan bir tahvilin fiyatını her 10.000.000 lirada bir verir. +ODDLYIELD = TEKSÖDEME ## Tek bir son dönemi olan bir tahvilin ödemesini verir. +PMT = DEVRESEL_ÖDEME ## Bir yıllık dönemsel ödemeyi verir. +PPMT = ANA_PARA_ÖDEMESİ ## Verilen bir süre için, bir yatırımın anaparasına dayanan ödemeyi verir. +PRICE = DEĞER ## Dönemsel faiz ödeyen bir tahvilin fiyatını 10.000.00 liralık değer başına verir. +PRICEDISC = DEĞERİND ## İndirimli bir tahvilin fiyatını 10.000.000 liralık nominal değer başına verir. +PRICEMAT = DEĞERVADE ## Faizini vade sonunda ödeyen bir tahvilin fiyatını 10.000.000 nominal değer başına verir. +PV = BD ## Bir yatırımın bugünkü değerini verir. +RATE = FAİZ_ORANI ## Bir yıllık dönem başına düşen faiz oranını verir. +RECEIVED = GETİRİ ## Tam olarak yatırılmış bir tahvilin vadesinin bitiminde alınan miktarı verir. +SLN = DA ## Bir malın bir dönem içindeki doğrusal yıpranmasını verir. +SYD = YAT ## Bir malın belirli bir dönem için olan amortismanını verir. +TBILLEQ = HTAHEŞ ## Bir Hazine bonosunun bono eşdeğeri ödemesini verir. +TBILLPRICE = HTAHDEĞER ## Bir Hazine bonosunun değerini, 10.000.000 liralık nominal değer başına verir. +TBILLYIELD = HTAHÖDEME ## Bir Hazine bonosunun ödemesini verir. +VDB = DAB ## Bir malın amortismanını, belirlenmiş ya da kısmi bir dönem için, bir azalan bakiye yöntemi kullanarak verir. +XIRR = AİÇVERİMORANI ## Dönemsel olması gerekmeyen bir para akışları programı için, iç verim oranını verir. +XNPV = ANBD ## Dönemsel olması gerekmeyen bir para akışları programı için, bugünkü net değeri verir. +YIELD = ÖDEME ## Belirli aralıklarla faiz ödeyen bir tahvilin ödemesini verir. +YIELDDISC = ÖDEMEİND ## İndirimli bir tahvilin yıllık ödemesini verir; örneğin, bir Hazine bonosunun. +YIELDMAT = ÖDEMEVADE ## Vadesinin bitiminde faiz ödeyen bir tahvilin yıllık ödemesini verir. + + +## +## Information functions Bilgi fonksiyonları +## +CELL = HÜCRE ## Bir hücrenin biçimlendirmesi, konumu ya da içeriği hakkında bilgi verir. +ERROR.TYPE = HATA.TİPİ ## Bir hata türüne ilişkin sayıları verir. +INFO = BİLGİ ## Geçerli işletim ortamı hakkında bilgi verir. +ISBLANK = EBOŞSA ## Değer boşsa, DOĞRU verir. +ISERR = EHATA ## Değer, #YOK dışındaki bir hata değeriyse, DOĞRU verir. +ISERROR = EHATALIYSA ## Değer, herhangi bir hata değeriyse, DOĞRU verir. +ISEVEN = ÇİFTTİR ## Sayı çiftse, DOĞRU verir. +ISLOGICAL = EMANTIKSALSA ## Değer, mantıksal bir değerse, DOĞRU verir. +ISNA = EYOKSA ## Değer, #YOK hata değeriyse, DOĞRU verir. +ISNONTEXT = EMETİNDEĞİLSE ## Değer, metin değilse, DOĞRU verir. +ISNUMBER = ESAYIYSA ## Değer, bir sayıysa, DOĞRU verir. +ISODD = TEKTİR ## Sayı tekse, DOĞRU verir. +ISREF = EREFSE ## Değer bir başvuruysa, DOĞRU verir. +ISTEXT = EMETİNSE ## Değer bir metinse DOĞRU verir. +N = N ## Sayıya dönüştürülmüş bir değer verir. +NA = YOKSAY ## #YOK hata değerini verir. +TYPE = TİP ## Bir değerin veri türünü belirten bir sayı verir. + + +## +## Logical functions Mantıksal fonksiyonlar +## +AND = VE ## Bütün bağımsız değişkenleri DOĞRU ise, DOĞRU verir. +FALSE = YANLIŞ ## YANLIŞ mantıksal değerini verir. +IF = EĞER ## Gerçekleştirilecek bir mantıksal sınama belirtir. +IFERROR = EĞERHATA ## Formül hatalıysa belirttiğiniz değeri verir; bunun dışındaki durumlarda formülün sonucunu verir. +NOT = DEĞİL ## Bağımsız değişkeninin mantığını tersine çevirir. +OR = YADA ## Bağımsız değişkenlerden herhangi birisi DOĞRU ise, DOĞRU verir. +TRUE = DOĞRU ## DOĞRU mantıksal değerini verir. + + +## +## Lookup and reference functions Arama ve Başvuru fonksiyonları +## +ADDRESS = ADRES ## Bir başvuruyu, çalışma sayfasındaki tek bir hücreye metin olarak verir. +AREAS = ALANSAY ## Renvoie le nombre de zones dans une référence. +CHOOSE = ELEMAN ## Değerler listesinden bir değer seçer. +COLUMN = SÜTUN ## Bir başvurunun sütun sayısını verir. +COLUMNS = SÜTUNSAY ## Bir başvurudaki sütunların sayısını verir. +HLOOKUP = YATAYARA ## Bir dizinin en üst satırına bakar ve belirtilen hücrenin değerini verir. +HYPERLINK = KÖPRÜ ## Bir ağ sunucusunda, bir intranette ya da Internet'te depolanan bir belgeyi açan bir kısayol ya da atlama oluşturur. +INDEX = İNDİS ## Başvurudan veya diziden bir değer seçmek için, bir dizin kullanır. +INDIRECT = DOLAYLI ## Metin değeriyle belirtilen bir başvuru verir. +LOOKUP = ARA ## Bir vektördeki veya dizideki değerleri arar. +MATCH = KAÇINCI ## Bir başvurudaki veya dizideki değerleri arar. +OFFSET = KAYDIR ## Verilen bir başvurudan, bir başvuru kaydırmayı verir. +ROW = SATIR ## Bir başvurunun satır sayısını verir. +ROWS = SATIRSAY ## Bir başvurudaki satırların sayısını verir. +RTD = RTD ## COM otomasyonunu destekleyen programdan gerçek zaman verileri alır. +TRANSPOSE = DEVRİK_DÖNÜŞÜM ## Bir dizinin devrik dönüşümünü verir. +VLOOKUP = DÜŞEYARA ## Bir dizinin ilk sütununa bakar ve bir hücrenin değerini vermek için satır boyunca hareket eder. + + +## +## Math and trigonometry functions Matematik ve trigonometri fonksiyonları +## +ABS = MUTLAK ## Bir sayının mutlak değerini verir. +ACOS = ACOS ## Bir sayının ark kosinüsünü verir. +ACOSH = ACOSH ## Bir sayının ters hiperbolik kosinüsünü verir. +ASIN = ASİN ## Bir sayının ark sinüsünü verir. +ASINH = ASİNH ## Bir sayının ters hiperbolik sinüsünü verir. +ATAN = ATAN ## Bir sayının ark tanjantını verir. +ATAN2 = ATAN2 ## Ark tanjantı, x- ve y- koordinatlarından verir. +ATANH = ATANH ## Bir sayının ters hiperbolik tanjantını verir. +CEILING = TAVANAYUVARLA ## Bir sayıyı, en yakın tamsayıya ya da en yakın katına yuvarlar. +COMBIN = KOMBİNASYON ## Verilen sayıda öğenin kombinasyon sayısını verir. +COS = COS ## Bir sayının kosinüsünü verir. +COSH = COSH ## Bir sayının hiperbolik kosinüsünü verir. +DEGREES = DERECE ## Radyanları dereceye dönüştürür. +EVEN = ÇİFT ## Bir sayıyı, en yakın daha büyük çift tamsayıya yuvarlar. +EXP = ÜS ## e'yi, verilen bir sayının üssüne yükseltilmiş olarak verir. +FACT = ÇARPINIM ## Bir sayının faktörünü verir. +FACTDOUBLE = ÇİFTFAKTÖR ## Bir sayının çift çarpınımını verir. +FLOOR = TABANAYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. +GCD = OBEB ## En büyük ortak böleni verir. +INT = TAMSAYI ## Bir sayıyı aşağıya doğru en yakın tamsayıya yuvarlar. +LCM = OKEK ## En küçük ortak katı verir. +LN = LN ## Bir sayının doğal logaritmasını verir. +LOG = LOG ## Bir sayının, belirtilen bir tabandaki logaritmasını verir. +LOG10 = LOG10 ## Bir sayının 10 tabanında logaritmasını verir. +MDETERM = DETERMİNANT ## Bir dizinin dizey determinantını verir. +MINVERSE = DİZEY_TERS ## Bir dizinin dizey tersini verir. +MMULT = DÇARP ## İki dizinin dizey çarpımını verir. +MOD = MODÜLO ## Bölmeden kalanı verir. +MROUND = KYUVARLA ## İstenen kata yuvarlanmış bir sayı verir. +MULTINOMIAL = ÇOKTERİMLİ ## Bir sayılar kümesinin çok terimlisini verir. +ODD = TEK ## Bir sayıyı en yakın daha büyük tek sayıya yuvarlar. +PI = Pİ ## Pi değerini verir. +POWER = KUVVET ## Bir üsse yükseltilmiş sayının sonucunu verir. +PRODUCT = ÇARPIM ## Bağımsız değişkenlerini çarpar. +QUOTIENT = BÖLÜM ## Bir bölme işleminin tamsayı kısmını verir. +RADIANS = RADYAN ## Dereceleri radyanlara dönüştürür. +RAND = S_SAYI_ÜRET ## 0 ile 1 arasında rastgele bir sayı verir. +RANDBETWEEN = RASTGELEARALIK ## Belirttiğiniz sayılar arasında rastgele bir sayı verir. +ROMAN = ROMEN ## Bir normal rakamı, metin olarak, romen rakamına çevirir. +ROUND = YUVARLA ## Bir sayıyı, belirtilen basamak sayısına yuvarlar. +ROUNDDOWN = AŞAĞIYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. +ROUNDUP = YUKARIYUVARLA ## Bir sayıyı daha büyük sayıya, sıfırdan ıraksayarak yuvarlar. +SERIESSUM = SERİTOPLA ## Bir üs serisinin toplamını, formüle bağlı olarak verir. +SIGN = İŞARET ## Bir sayının işaretini verir. +SIN = SİN ## Verilen bir açının sinüsünü verir. +SINH = SİNH ## Bir sayının hiperbolik sinüsünü verir. +SQRT = KAREKÖK ## Pozitif bir karekök verir. +SQRTPI = KAREKÖKPİ ## (* Pi sayısının) kare kökünü verir. +SUBTOTAL = ALTTOPLAM ## Bir listedeki ya da veritabanındaki bir alt toplamı verir. +SUM = TOPLA ## Bağımsız değişkenlerini toplar. +SUMIF = ETOPLA ## Verilen ölçütle belirlenen hücreleri toplar. +SUMIFS = SUMIFS ## Bir aralıktaki, birden fazla ölçüte uyan hücreleri ekler. +SUMPRODUCT = TOPLA.ÇARPIM ## İlişkili dizi bileşenlerinin çarpımlarının toplamını verir. +SUMSQ = TOPKARE ## Bağımsız değişkenlerin karelerinin toplamını verir. +SUMX2MY2 = TOPX2EY2 ## İki dizideki ilişkili değerlerin farkının toplamını verir. +SUMX2PY2 = TOPX2AY2 ## İki dizideki ilişkili değerlerin karelerinin toplamının toplamını verir. +SUMXMY2 = TOPXEY2 ## İki dizideki ilişkili değerlerin farklarının karelerinin toplamını verir. +TAN = TAN ## Bir sayının tanjantını verir. +TANH = TANH ## Bir sayının hiperbolik tanjantını verir. +TRUNC = NSAT ## Bir sayının, tamsayı durumuna gelecek şekilde, fazlalıklarını atar. + + +## +## Statistical functions İstatistiksel fonksiyonlar +## +AVEDEV = ORTSAP ## Veri noktalarının ortalamalarından mutlak sapmalarının ortalamasını verir. +AVERAGE = ORTALAMA ## Bağımsız değişkenlerinin ortalamasını verir. +AVERAGEA = ORTALAMAA ## Bağımsız değişkenlerinin, sayılar, metin ve mantıksal değerleri içermek üzere ortalamasını verir. +AVERAGEIF = EĞERORTALAMA ## Verili ölçütü karşılayan bir aralıktaki bütün hücrelerin ortalamasını (aritmetik ortalama) hesaplar. +AVERAGEIFS = EĞERLERORTALAMA ## Birden çok ölçüte uyan tüm hücrelerin ortalamasını (aritmetik ortalama) hesaplar. +BETADIST = BETADAĞ ## Beta birikimli dağılım fonksiyonunu verir. +BETAINV = BETATERS ## Belirli bir beta dağılımı için birikimli dağılım fonksiyonunun tersini verir. +BINOMDIST = BİNOMDAĞ ## Tek terimli binom dağılımı olasılığını verir. +CHIDIST = KİKAREDAĞ ## Kikare dağılımın tek kuyruklu olasılığını verir. +CHIINV = KİKARETERS ## Kikare dağılımın kuyruklu olasılığının tersini verir. +CHITEST = KİKARETEST ## Bağımsızlık sınamalarını verir. +CONFIDENCE = GÜVENİRLİK ## Bir popülasyon ortalaması için güvenirlik aralığını verir. +CORREL = KORELASYON ## İki veri kümesi arasındaki bağlantı katsayısını verir. +COUNT = BAĞ_DEĞ_SAY ## Bağımsız değişkenler listesinde kaç tane sayı bulunduğunu sayar. +COUNTA = BAĞ_DEĞ_DOLU_SAY ## Bağımsız değişkenler listesinde kaç tane değer bulunduğunu sayar. +COUNTBLANK = BOŞLUKSAY ## Aralıktaki boş hücre sayısını hesaplar. +COUNTIF = EĞERSAY ## Verilen ölçütlere uyan bir aralık içindeki hücreleri sayar. +COUNTIFS = ÇOKEĞERSAY ## Birden çok ölçüte uyan bir aralık içindeki hücreleri sayar. +COVAR = KOVARYANS ## Eşleştirilmiş sapmaların ortalaması olan kovaryansı verir. +CRITBINOM = KRİTİKBİNOM ## Birikimli binom dağılımının bir ölçüt değerinden küçük veya ölçüt değerine eşit olduğu en küçük değeri verir. +DEVSQ = SAPKARE ## Sapmaların karelerinin toplamını verir. +EXPONDIST = ÜSTELDAĞ ## Üstel dağılımı verir. +FDIST = FDAĞ ## F olasılık dağılımını verir. +FINV = FTERS ## F olasılık dağılımının tersini verir. +FISHER = FISHER ## Fisher dönüşümünü verir. +FISHERINV = FISHERTERS ## Fisher dönüşümünün tersini verir. +FORECAST = TAHMİN ## Bir doğrusal eğilim boyunca bir değer verir. +FREQUENCY = SIKLIK ## Bir sıklık dağılımını, dikey bir dizi olarak verir. +FTEST = FTEST ## Bir F-test'in sonucunu verir. +GAMMADIST = GAMADAĞ ## Gama dağılımını verir. +GAMMAINV = GAMATERS ## Gama kümülatif dağılımının tersini verir. +GAMMALN = GAMALN ## Gama fonksiyonunun (?(x)) doğal logaritmasını verir. +GEOMEAN = GEOORT ## Geometrik ortayı verir. +GROWTH = BÜYÜME ## Üstel bir eğilim boyunca değerler verir. +HARMEAN = HARORT ## Harmonik ortayı verir. +HYPGEOMDIST = HİPERGEOMDAĞ ## Hipergeometrik dağılımı verir. +INTERCEPT = KESMENOKTASI ## Doğrusal çakıştırma çizgisinin kesişme noktasını verir. +KURT = BASIKLIK ## Bir veri kümesinin basıklığını verir. +LARGE = BÜYÜK ## Bir veri kümesinde k. en büyük değeri verir. +LINEST = DOT ## Doğrusal bir eğilimin parametrelerini verir. +LOGEST = LOT ## Üstel bir eğilimin parametrelerini verir. +LOGINV = LOGTERS ## Bir lognormal dağılımının tersini verir. +LOGNORMDIST = LOGNORMDAĞ ## Birikimli lognormal dağılımını verir. +MAX = MAK ## Bir bağımsız değişkenler listesindeki en büyük değeri verir. +MAXA = MAKA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri içermek üzere, en büyük değeri verir. +MEDIAN = ORTANCA ## Belirtilen sayıların orta değerini verir. +MIN = MİN ## Bir bağımsız değişkenler listesindeki en küçük değeri verir. +MINA = MİNA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri de içermek üzere, en küçük değeri verir. +MODE = ENÇOK_OLAN ## Bir veri kümesindeki en sık rastlanan değeri verir. +NEGBINOMDIST = NEGBİNOMDAĞ ## Negatif binom dağılımını verir. +NORMDIST = NORMDAĞ ## Normal birikimli dağılımı verir. +NORMINV = NORMTERS ## Normal kümülatif dağılımın tersini verir. +NORMSDIST = NORMSDAĞ ## Standart normal birikimli dağılımı verir. +NORMSINV = NORMSTERS ## Standart normal birikimli dağılımın tersini verir. +PEARSON = PEARSON ## Pearson çarpım moment korelasyon katsayısını verir. +PERCENTILE = YÜZDEBİRLİK ## Bir aralık içerisinde bulunan değerlerin k. frekans toplamını verir. +PERCENTRANK = YÜZDERANK ## Bir veri kümesindeki bir değerin yüzde mertebesini verir. +PERMUT = PERMÜTASYON ## Verilen sayıda nesne için permütasyon sayısını verir. +POISSON = POISSON ## Poisson dağılımını verir. +PROB = OLASILIK ## Bir aralıktaki değerlerin iki sınır arasında olması olasılığını verir. +QUARTILE = DÖRTTEBİRLİK ## Bir veri kümesinin dörtte birliğini verir. +RANK = RANK ## Bir sayılar listesinde bir sayının mertebesini verir. +RSQ = RKARE ## Pearson çarpım moment korelasyon katsayısının karesini verir. +SKEW = ÇARPIKLIK ## Bir dağılımın çarpıklığını verir. +SLOPE = EĞİM ## Doğrusal çakışma çizgisinin eğimini verir. +SMALL = KÜÇÜK ## Bir veri kümesinde k. en küçük değeri verir. +STANDARDIZE = STANDARTLAŞTIRMA ## Normalleştirilmiş bir değer verir. +STDEV = STDSAPMA ## Bir örneğe dayanarak standart sapmayı tahmin eder. +STDEVA = STDSAPMAA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. +STDEVP = STDSAPMAS ## Standart sapmayı, tüm popülasyona bağlı olarak hesaplar. +STDEVPA = STDSAPMASA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. +STEYX = STHYX ## Regresyondaki her x için tahmini y değerinin standart hatasını verir. +TDIST = TDAĞ ## T-dağılımını verir. +TINV = TTERS ## T-dağılımının tersini verir. +TREND = EĞİLİM ## Doğrusal bir eğilim boyunca değerler verir. +TRIMMEAN = KIRPORTALAMA ## Bir veri kümesinin içinin ortalamasını verir. +TTEST = TTEST ## T-test'le ilişkilendirilmiş olasılığı verir. +VAR = VAR ## Varyansı, bir örneğe bağlı olarak tahmin eder. +VARA = VARA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. +VARP = VARS ## Varyansı, tüm popülasyona dayanarak hesaplar. +VARPA = VARSA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. +WEIBULL = WEIBULL ## Weibull dağılımını hesaplar. +ZTEST = ZTEST ## Z-testinin tek kuyruklu olasılık değerini hesaplar. + + +## +## Text functions Metin fonksiyonları +## +ASC = ASC ## Bir karakter dizesindeki çift enli (iki bayt) İngilizce harfleri veya katakanayı yarım enli (tek bayt) karakterlerle değiştirir. +BAHTTEXT = BAHTTEXT ## Sayıyı, ß (baht) para birimi biçimini kullanarak metne dönüştürür. +CHAR = DAMGA ## Kod sayısıyla belirtilen karakteri verir. +CLEAN = TEMİZ ## Metindeki bütün yazdırılamaz karakterleri kaldırır. +CODE = KOD ## Bir metin dizesindeki ilk karakter için sayısal bir kod verir. +CONCATENATE = BİRLEŞTİR ## Pek çok metin öğesini bir metin öğesi olarak birleştirir. +DOLLAR = LİRA ## Bir sayıyı YTL (yeni Türk lirası) para birimi biçimini kullanarak metne dönüştürür. +EXACT = ÖZDEŞ ## İki metin değerinin özdeş olup olmadığını anlamak için, değerleri denetler. +FIND = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). +FINDB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). +FIXED = SAYIDÜZENLE ## Bir sayıyı, sabit sayıda ondalıkla, metin olarak biçimlendirir. +JIS = JIS ## Bir karakter dizesindeki tek enli (tek bayt) İngilizce harfleri veya katakanayı çift enli (iki bayt) karakterlerle değiştirir. +LEFT = SOL ## Bir metin değerinden en soldaki karakterleri verir. +LEFTB = SOLB ## Bir metin değerinden en soldaki karakterleri verir. +LEN = UZUNLUK ## Bir metin dizesindeki karakter sayısını verir. +LENB = UZUNLUKB ## Bir metin dizesindeki karakter sayısını verir. +LOWER = KÜÇÜKHARF ## Metni küçük harfe çevirir. +MID = ORTA ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. +MIDB = ORTAB ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. +PHONETIC = SES ## Metin dizesinden ses (furigana) karakterlerini ayıklar. +PROPER = YAZIM.DÜZENİ ## Bir metin değerinin her bir sözcüğünün ilk harfini büyük harfe çevirir. +REPLACE = DEĞİŞTİR ## Metnin içindeki karakterleri değiştirir. +REPLACEB = DEĞİŞTİRB ## Metnin içindeki karakterleri değiştirir. +REPT = YİNELE ## Metni belirtilen sayıda yineler. +RIGHT = SAĞ ## Bir metin değerinden en sağdaki karakterleri verir. +RIGHTB = SAĞB ## Bir metin değerinden en sağdaki karakterleri verir. +SEARCH = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). +SEARCHB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). +SUBSTITUTE = YERİNEKOY ## Bir metin dizesinde, eski metnin yerine yeni metin koyar. +T = M ## Bağımsız değerlerini metne dönüştürür. +TEXT = METNEÇEVİR ## Bir sayıyı biçimlendirir ve metne dönüştürür. +TRIM = KIRP ## Metindeki boşlukları kaldırır. +UPPER = BÜYÜKHARF ## Metni büyük harfe çevirir. +VALUE = SAYIYAÇEVİR ## Bir metin bağımsız değişkenini sayıya dönüştürür. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/AddressHelper.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/AddressHelper.php new file mode 100755 index 0000000..77a521b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/AddressHelper.php @@ -0,0 +1,88 @@ +setValueExplicit(true, DataType::TYPE_BOOL); + + return true; + } elseif ($value == Calculation::getFALSE()) { + $cell->setValueExplicit(false, DataType::TYPE_BOOL); + + return true; + } + + // Check for number in scientific format + if (preg_match('/^' . Calculation::CALCULATION_REGEXP_NUMBER . '$/', $value)) { + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + + return true; + } + + // Check for fraction + if (preg_match('/^([+-]?)\s*(\d+)\s?\/\s*(\d+)$/', $value, $matches)) { + // Convert value to number + $value = $matches[2] / $matches[3]; + if ($matches[1] == '-') { + $value = 0 - $value; + } + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode('??/??'); + + return true; + } elseif (preg_match('/^([+-]?)(\d*) +(\d*)\s?\/\s*(\d*)$/', $value, $matches)) { + // Convert value to number + $value = $matches[2] + ($matches[3] / $matches[4]); + if ($matches[1] == '-') { + $value = 0 - $value; + } + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode('# ??/??'); + + return true; + } + + // Check for percentage + if (preg_match('/^\-?\d*\.?\d*\s?\%$/', $value)) { + // Convert value to number + $value = (float) str_replace('%', '', $value) / 100; + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_PERCENTAGE_00); + + return true; + } + + // Check for currency + $currencyCode = StringHelper::getCurrencyCode(); + $decimalSeparator = StringHelper::getDecimalSeparator(); + $thousandsSeparator = StringHelper::getThousandsSeparator(); + if (preg_match('/^' . preg_quote($currencyCode, '/') . ' *(\d{1,3}(' . preg_quote($thousandsSeparator, '/') . '\d{3})*|(\d+))(' . preg_quote($decimalSeparator, '/') . '\d{2})?$/', $value)) { + // Convert value to number + $value = (float) trim(str_replace([$currencyCode, $thousandsSeparator, $decimalSeparator], ['', '', '.'], $value)); + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode( + str_replace('$', $currencyCode, NumberFormat::FORMAT_CURRENCY_USD_SIMPLE) + ); + + return true; + } elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) { + // Convert value to number + $value = (float) trim(str_replace(['$', ','], '', $value)); + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); + + return true; + } + + // Check for time without seconds e.g. '9:45', '09:45' + if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) { + // Convert value to number + [$h, $m] = explode(':', $value); + $days = $h / 24 + $m / 1440; + $cell->setValueExplicit($days, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME3); + + return true; + } + + // Check for time with seconds '9:45:59', '09:45:59' + if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$/', $value)) { + // Convert value to number + [$h, $m, $s] = explode(':', $value); + $days = $h / 24 + $m / 1440 + $s / 86400; + // Convert value to number + $cell->setValueExplicit($days, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME4); + + return true; + } + + // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10' + if (($d = Date::stringToExcel($value)) !== false) { + // Convert value to number + $cell->setValueExplicit($d, DataType::TYPE_NUMERIC); + // Determine style. Either there is a time part or not. Look for ':' + if (strpos($value, ':') !== false) { + $formatCode = 'yyyy-mm-dd h:mm'; + } else { + $formatCode = 'yyyy-mm-dd'; + } + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode($formatCode); + + return true; + } + + // Check for newline character "\n" + if (strpos($value, "\n") !== false) { + $value = StringHelper::sanitizeUTF8($value); + $cell->setValueExplicit($value, DataType::TYPE_STRING); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getAlignment()->setWrapText(true); + + return true; + } + } + + // Not bound yet? Use parent... + return parent::bindValue($cell, $value); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Cell.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Cell.php new file mode 100755 index 0000000..74ed926 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Cell.php @@ -0,0 +1,678 @@ +parent->update($this); + + return $this; + } + + public function detach(): void + { + $this->parent = null; + } + + public function attach(Cells $parent): void + { + $this->parent = $parent; + } + + /** + * Create a new Cell. + * + * @param mixed $pValue + * @param string $pDataType + */ + public function __construct($pValue, $pDataType, Worksheet $pSheet) + { + // Initialise cell value + $this->value = $pValue; + + // Set worksheet cache + $this->parent = $pSheet->getCellCollection(); + + // Set datatype? + if ($pDataType !== null) { + if ($pDataType == DataType::TYPE_STRING2) { + $pDataType = DataType::TYPE_STRING; + } + $this->dataType = $pDataType; + } elseif (!self::getValueBinder()->bindValue($this, $pValue)) { + throw new Exception('Value could not be bound to cell.'); + } + } + + /** + * Get cell coordinate column. + * + * @return string + */ + public function getColumn() + { + return $this->parent->getCurrentColumn(); + } + + /** + * Get cell coordinate row. + * + * @return int + */ + public function getRow() + { + return $this->parent->getCurrentRow(); + } + + /** + * Get cell coordinate. + * + * @return string + */ + public function getCoordinate() + { + return $this->parent->getCurrentCoordinate(); + } + + /** + * Get cell value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Get cell value with formatting. + * + * @return string + */ + public function getFormattedValue() + { + return (string) NumberFormat::toFormattedString( + $this->getCalculatedValue(), + $this->getStyle() + ->getNumberFormat()->getFormatCode() + ); + } + + /** + * Set cell value. + * + * Sets the value for a cell, automatically determining the datatype using the value binder + * + * @param mixed $pValue Value + * + * @return $this + */ + public function setValue($pValue) + { + if (!self::getValueBinder()->bindValue($this, $pValue)) { + throw new Exception('Value could not be bound to cell.'); + } + + return $this; + } + + /** + * Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder). + * + * @param mixed $pValue Value + * @param string $pDataType Explicit data type, see DataType::TYPE_* + * + * @return Cell + */ + public function setValueExplicit($pValue, $pDataType) + { + // set the value according to data type + switch ($pDataType) { + case DataType::TYPE_NULL: + $this->value = $pValue; + + break; + case DataType::TYPE_STRING2: + $pDataType = DataType::TYPE_STRING; + // no break + case DataType::TYPE_STRING: + // Synonym for string + case DataType::TYPE_INLINE: + // Rich text + $this->value = DataType::checkString($pValue); + + break; + case DataType::TYPE_NUMERIC: + if (is_string($pValue) && !is_numeric($pValue)) { + throw new Exception('Invalid numeric value for datatype Numeric'); + } + $this->value = 0 + $pValue; + + break; + case DataType::TYPE_FORMULA: + $this->value = (string) $pValue; + + break; + case DataType::TYPE_BOOL: + $this->value = (bool) $pValue; + + break; + case DataType::TYPE_ERROR: + $this->value = DataType::checkErrorCode($pValue); + + break; + default: + throw new Exception('Invalid datatype: ' . $pDataType); + + break; + } + + // set the datatype + $this->dataType = $pDataType; + + return $this->updateInCollection(); + } + + /** + * Get calculated cell value. + * + * @param bool $resetLog Whether the calculation engine logger should be reset or not + * + * @return mixed + */ + public function getCalculatedValue($resetLog = true) + { + if ($this->dataType == DataType::TYPE_FORMULA) { + try { + $index = $this->getWorksheet()->getParent()->getActiveSheetIndex(); + $result = Calculation::getInstance( + $this->getWorksheet()->getParent() + )->calculateCellValue($this, $resetLog); + $this->getWorksheet()->getParent()->setActiveSheetIndex($index); + // We don't yet handle array returns + if (is_array($result)) { + while (is_array($result)) { + $result = array_shift($result); + } + } + } catch (Exception $ex) { + if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) { + return $this->calculatedValue; // Fallback for calculations referencing external files. + } + + throw new \PhpOffice\PhpSpreadsheet\Calculation\Exception( + $this->getWorksheet()->getTitle() . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage() + ); + } + + if ($result === '#Not Yet Implemented') { + return $this->calculatedValue; // Fallback if calculation engine does not support the formula. + } + + return $result; + } elseif ($this->value instanceof RichText) { + return $this->value->getPlainText(); + } + + return $this->value; + } + + /** + * Set old calculated value (cached). + * + * @param mixed $pValue Value + * + * @return Cell + */ + public function setCalculatedValue($pValue) + { + if ($pValue !== null) { + $this->calculatedValue = (is_numeric($pValue)) ? (float) $pValue : $pValue; + } + + return $this->updateInCollection(); + } + + /** + * Get old calculated value (cached) + * This returns the value last calculated by MS Excel or whichever spreadsheet program was used to + * create the original spreadsheet file. + * Note that this value is not guaranteed to reflect the actual calculated value because it is + * possible that auto-calculation was disabled in the original spreadsheet, and underlying data + * values used by the formula have changed since it was last calculated. + * + * @return mixed + */ + public function getOldCalculatedValue() + { + return $this->calculatedValue; + } + + /** + * Get cell data type. + * + * @return string + */ + public function getDataType() + { + return $this->dataType; + } + + /** + * Set cell data type. + * + * @param string $pDataType see DataType::TYPE_* + * + * @return Cell + */ + public function setDataType($pDataType) + { + if ($pDataType == DataType::TYPE_STRING2) { + $pDataType = DataType::TYPE_STRING; + } + $this->dataType = $pDataType; + + return $this->updateInCollection(); + } + + /** + * Identify if the cell contains a formula. + * + * @return bool + */ + public function isFormula() + { + return $this->dataType == DataType::TYPE_FORMULA; + } + + /** + * Does this cell contain Data validation rules? + * + * @return bool + */ + public function hasDataValidation() + { + if (!isset($this->parent)) { + throw new Exception('Cannot check for data validation when cell is not bound to a worksheet'); + } + + return $this->getWorksheet()->dataValidationExists($this->getCoordinate()); + } + + /** + * Get Data validation rules. + * + * @return DataValidation + */ + public function getDataValidation() + { + if (!isset($this->parent)) { + throw new Exception('Cannot get data validation for cell that is not bound to a worksheet'); + } + + return $this->getWorksheet()->getDataValidation($this->getCoordinate()); + } + + /** + * Set Data validation rules. + * + * @param DataValidation $pDataValidation + * + * @return Cell + */ + public function setDataValidation(?DataValidation $pDataValidation = null) + { + if (!isset($this->parent)) { + throw new Exception('Cannot set data validation for cell that is not bound to a worksheet'); + } + + $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation); + + return $this->updateInCollection(); + } + + /** + * Does this cell contain valid value? + * + * @return bool + */ + public function hasValidValue() + { + $validator = new DataValidator(); + + return $validator->isValid($this); + } + + /** + * Does this cell contain a Hyperlink? + * + * @return bool + */ + public function hasHyperlink() + { + if (!isset($this->parent)) { + throw new Exception('Cannot check for hyperlink when cell is not bound to a worksheet'); + } + + return $this->getWorksheet()->hyperlinkExists($this->getCoordinate()); + } + + /** + * Get Hyperlink. + * + * @return Hyperlink + */ + public function getHyperlink() + { + if (!isset($this->parent)) { + throw new Exception('Cannot get hyperlink for cell that is not bound to a worksheet'); + } + + return $this->getWorksheet()->getHyperlink($this->getCoordinate()); + } + + /** + * Set Hyperlink. + * + * @param Hyperlink $pHyperlink + * + * @return Cell + */ + public function setHyperlink(?Hyperlink $pHyperlink = null) + { + if (!isset($this->parent)) { + throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet'); + } + + $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink); + + return $this->updateInCollection(); + } + + /** + * Get cell collection. + * + * @return Cells + */ + public function getParent() + { + return $this->parent; + } + + /** + * Get parent worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->parent->getParent(); + } + + /** + * Is this cell in a merge range. + * + * @return bool + */ + public function isInMergeRange() + { + return (bool) $this->getMergeRange(); + } + + /** + * Is this cell the master (top left cell) in a merge range (that holds the actual data value). + * + * @return bool + */ + public function isMergeRangeValueCell() + { + if ($mergeRange = $this->getMergeRange()) { + $mergeRange = Coordinate::splitRange($mergeRange); + [$startCell] = $mergeRange[0]; + if ($this->getCoordinate() === $startCell) { + return true; + } + } + + return false; + } + + /** + * If this cell is in a merge range, then return the range. + * + * @return false|string + */ + public function getMergeRange() + { + foreach ($this->getWorksheet()->getMergeCells() as $mergeRange) { + if ($this->isInRange($mergeRange)) { + return $mergeRange; + } + } + + return false; + } + + /** + * Get cell style. + * + * @return Style + */ + public function getStyle() + { + return $this->getWorksheet()->getStyle($this->getCoordinate()); + } + + /** + * Re-bind parent. + * + * @return Cell + */ + public function rebindParent(Worksheet $parent) + { + $this->parent = $parent->getCellCollection(); + + return $this->updateInCollection(); + } + + /** + * Is cell in a specific range? + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return bool + */ + public function isInRange($pRange) + { + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange); + + // Translate properties + $myColumn = Coordinate::columnIndexFromString($this->getColumn()); + $myRow = $this->getRow(); + + // Verify if cell is in range + return ($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn) && + ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow); + } + + /** + * Compare 2 cells. + * + * @param Cell $a Cell a + * @param Cell $b Cell b + * + * @return int Result of comparison (always -1 or 1, never zero!) + */ + public static function compareCells(self $a, self $b) + { + if ($a->getRow() < $b->getRow()) { + return -1; + } elseif ($a->getRow() > $b->getRow()) { + return 1; + } elseif (Coordinate::columnIndexFromString($a->getColumn()) < Coordinate::columnIndexFromString($b->getColumn())) { + return -1; + } + + return 1; + } + + /** + * Get value binder to use. + * + * @return IValueBinder + */ + public static function getValueBinder() + { + if (self::$valueBinder === null) { + self::$valueBinder = new DefaultValueBinder(); + } + + return self::$valueBinder; + } + + /** + * Set value binder to use. + */ + public static function setValueBinder(IValueBinder $binder): void + { + self::$valueBinder = $binder; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != 'parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + /** + * Get index to cellXf. + * + * @return int + */ + public function getXfIndex() + { + return $this->xfIndex; + } + + /** + * Set index to cellXf. + * + * @param int $pValue + * + * @return Cell + */ + public function setXfIndex($pValue) + { + $this->xfIndex = $pValue; + + return $this->updateInCollection(); + } + + /** + * Set the formula attributes. + * + * @param mixed $pAttributes + * + * @return $this + */ + public function setFormulaAttributes($pAttributes) + { + $this->formulaAttributes = $pAttributes; + + return $this; + } + + /** + * Get the formula attributes. + */ + public function getFormulaAttributes() + { + return $this->formulaAttributes; + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return (string) $this->getValue(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Coordinate.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Coordinate.php new file mode 100755 index 0000000..2afeebe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Coordinate.php @@ -0,0 +1,549 @@ + '') { + $worksheet .= '!'; + } + + // Create absolute coordinate + if (ctype_digit($pCoordinateString)) { + return $worksheet . '$' . $pCoordinateString; + } elseif (ctype_alpha($pCoordinateString)) { + return $worksheet . '$' . strtoupper($pCoordinateString); + } + + return $worksheet . self::absoluteCoordinate($pCoordinateString); + } + + /** + * Make string coordinate absolute. + * + * @param string $pCoordinateString e.g. 'A1' + * + * @return string Absolute coordinate e.g. '$A$1' + */ + public static function absoluteCoordinate($pCoordinateString) + { + if (self::coordinateIsRange($pCoordinateString)) { + throw new Exception('Cell coordinate string can not be a range of cells'); + } + + // Split out any worksheet name from the coordinate + [$worksheet, $pCoordinateString] = Worksheet::extractSheetTitle($pCoordinateString, true); + if ($worksheet > '') { + $worksheet .= '!'; + } + + // Create absolute coordinate + [$column, $row] = self::coordinateFromString($pCoordinateString); + $column = ltrim($column, '$'); + $row = ltrim($row, '$'); + + return $worksheet . '$' . $column . '$' . $row; + } + + /** + * Split range into coordinate strings. + * + * @param string $pRange e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4' + * + * @return array Array containing one or more arrays containing one or two coordinate strings + * e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']] + * or ['B4'] + */ + public static function splitRange($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + $exploded = explode(',', $pRange); + $counter = count($exploded); + for ($i = 0; $i < $counter; ++$i) { + $exploded[$i] = explode(':', $exploded[$i]); + } + + return $exploded; + } + + /** + * Build range from coordinate strings. + * + * @param array $pRange Array containg one or more arrays containing one or two coordinate strings + * + * @return string String representation of $pRange + */ + public static function buildRange(array $pRange) + { + // Verify range + if (empty($pRange) || !is_array($pRange[0])) { + throw new Exception('Range does not contain any information'); + } + + // Build range + $counter = count($pRange); + for ($i = 0; $i < $counter; ++$i) { + $pRange[$i] = implode(':', $pRange[$i]); + } + + return implode(',', $pRange); + } + + /** + * Calculate range boundaries. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range coordinates [Start Cell, End Cell] + * where Start Cell and End Cell are arrays (Column Number, Row Number) + */ + public static function rangeBoundaries($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Extract range + if (strpos($pRange, ':') === false) { + $rangeA = $rangeB = $pRange; + } else { + [$rangeA, $rangeB] = explode(':', $pRange); + } + + // Calculate range outer borders + $rangeStart = self::coordinateFromString($rangeA); + $rangeEnd = self::coordinateFromString($rangeB); + + // Translate column into index + $rangeStart[0] = self::columnIndexFromString($rangeStart[0]); + $rangeEnd[0] = self::columnIndexFromString($rangeEnd[0]); + + return [$rangeStart, $rangeEnd]; + } + + /** + * Calculate range dimension. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range dimension (width, height) + */ + public static function rangeDimension($pRange) + { + // Calculate range outer borders + [$rangeStart, $rangeEnd] = self::rangeBoundaries($pRange); + + return [($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1)]; + } + + /** + * Calculate range boundaries. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range coordinates [Start Cell, End Cell] + * where Start Cell and End Cell are arrays [Column ID, Row Number] + */ + public static function getRangeBoundaries($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Extract range + if (strpos($pRange, ':') === false) { + $rangeA = $rangeB = $pRange; + } else { + [$rangeA, $rangeB] = explode(':', $pRange); + } + + return [self::coordinateFromString($rangeA), self::coordinateFromString($rangeB)]; + } + + /** + * Column index from string. + * + * @param string $pString eg 'A' + * + * @return int Column index (A = 1) + */ + public static function columnIndexFromString($pString) + { + // Using a lookup cache adds a slight memory overhead, but boosts speed + // caching using a static within the method is faster than a class static, + // though it's additional memory overhead + static $indexCache = []; + + if (isset($indexCache[$pString])) { + return $indexCache[$pString]; + } + // It's surprising how costly the strtoupper() and ord() calls actually are, so we use a lookup array rather than use ord() + // and make it case insensitive to get rid of the strtoupper() as well. Because it's a static, there's no significant + // memory overhead either + static $columnLookup = [ + 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8, 'I' => 9, 'J' => 10, 'K' => 11, 'L' => 12, 'M' => 13, + 'N' => 14, 'O' => 15, 'P' => 16, 'Q' => 17, 'R' => 18, 'S' => 19, 'T' => 20, 'U' => 21, 'V' => 22, 'W' => 23, 'X' => 24, 'Y' => 25, 'Z' => 26, + 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, 'g' => 7, 'h' => 8, 'i' => 9, 'j' => 10, 'k' => 11, 'l' => 12, 'm' => 13, + 'n' => 14, 'o' => 15, 'p' => 16, 'q' => 17, 'r' => 18, 's' => 19, 't' => 20, 'u' => 21, 'v' => 22, 'w' => 23, 'x' => 24, 'y' => 25, 'z' => 26, + ]; + + // We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString + // for improved performance + if (isset($pString[0])) { + if (!isset($pString[1])) { + $indexCache[$pString] = $columnLookup[$pString]; + + return $indexCache[$pString]; + } elseif (!isset($pString[2])) { + $indexCache[$pString] = $columnLookup[$pString[0]] * 26 + $columnLookup[$pString[1]]; + + return $indexCache[$pString]; + } elseif (!isset($pString[3])) { + $indexCache[$pString] = $columnLookup[$pString[0]] * 676 + $columnLookup[$pString[1]] * 26 + $columnLookup[$pString[2]]; + + return $indexCache[$pString]; + } + } + + throw new Exception('Column string index can not be ' . ((isset($pString[0])) ? 'longer than 3 characters' : 'empty')); + } + + /** + * String from column index. + * + * @param int $columnIndex Column index (A = 1) + * + * @return string + */ + public static function stringFromColumnIndex($columnIndex) + { + static $indexCache = []; + + if (!isset($indexCache[$columnIndex])) { + $indexValue = $columnIndex; + $base26 = null; + do { + $characterValue = ($indexValue % 26) ?: 26; + $indexValue = ($indexValue - $characterValue) / 26; + $base26 = chr($characterValue + 64) . ($base26 ?: ''); + } while ($indexValue > 0); + $indexCache[$columnIndex] = $base26; + } + + return $indexCache[$columnIndex]; + } + + /** + * Extract all cell references in range, which may be comprised of multiple cell ranges. + * + * @param string $cellRange Range: e.g. 'A1' or 'A1:C10' or 'A1:E10,A20:E25' or 'A1:E5 C3:G7' or 'A1:C1,A3:C3 B1:C3' + * + * @return array Array containing single cell references + */ + public static function extractAllCellReferencesInRange($cellRange): array + { + [$ranges, $operators] = self::getCellBlocksFromRangeString($cellRange); + + $cells = []; + foreach ($ranges as $range) { + $cells[] = self::getReferencesForCellBlock($range); + } + + $cells = self::processRangeSetOperators($operators, $cells); + + if (empty($cells)) { + return []; + } + + $cellList = array_merge(...$cells); + $cellList = self::sortCellReferenceArray($cellList); + + return $cellList; + } + + private static function processRangeSetOperators(array $operators, array $cells): array + { + for ($offset = 0; $offset < count($operators); ++$offset) { + $operator = $operators[$offset]; + if ($operator !== ' ') { + continue; + } + + $cells[$offset] = array_intersect($cells[$offset], $cells[$offset + 1]); + unset($operators[$offset], $cells[$offset + 1]); + $operators = array_values($operators); + $cells = array_values($cells); + --$offset; + } + + return $cells; + } + + private static function sortCellReferenceArray(array $cellList): array + { + // Sort the result by column and row + $sortKeys = []; + foreach ($cellList as $coord) { + [$column, $row] = sscanf($coord, '%[A-Z]%d'); + $sortKeys[sprintf('%3s%09d', $column, $row)] = $coord; + } + ksort($sortKeys); + + return array_values($sortKeys); + } + + /** + * Get all cell references for an individual cell block. + * + * @param string $cellBlock A cell range e.g. A4:B5 + * + * @return array All individual cells in that range + */ + private static function getReferencesForCellBlock($cellBlock) + { + $returnValue = []; + + // Single cell? + if (!self::coordinateIsRange($cellBlock)) { + return (array) $cellBlock; + } + + // Range... + $ranges = self::splitRange($cellBlock); + foreach ($ranges as $range) { + // Single cell? + if (!isset($range[1])) { + $returnValue[] = $range[0]; + + continue; + } + + // Range... + [$rangeStart, $rangeEnd] = $range; + [$startColumn, $startRow] = self::coordinateFromString($rangeStart); + [$endColumn, $endRow] = self::coordinateFromString($rangeEnd); + $startColumnIndex = self::columnIndexFromString($startColumn); + $endColumnIndex = self::columnIndexFromString($endColumn); + ++$endColumnIndex; + + // Current data + $currentColumnIndex = $startColumnIndex; + $currentRow = $startRow; + + self::validateRange($cellBlock, $startColumnIndex, $endColumnIndex, $currentRow, $endRow); + + // Loop cells + while ($currentColumnIndex < $endColumnIndex) { + while ($currentRow <= $endRow) { + $returnValue[] = self::stringFromColumnIndex($currentColumnIndex) . $currentRow; + ++$currentRow; + } + ++$currentColumnIndex; + $currentRow = $startRow; + } + } + + return $returnValue; + } + + /** + * Convert an associative array of single cell coordinates to values to an associative array + * of cell ranges to values. Only adjacent cell coordinates with the same + * value will be merged. If the value is an object, it must implement the method getHashCode(). + * + * For example, this function converts: + * + * [ 'A1' => 'x', 'A2' => 'x', 'A3' => 'x', 'A4' => 'y' ] + * + * to: + * + * [ 'A1:A3' => 'x', 'A4' => 'y' ] + * + * @param array $pCoordCollection associative array mapping coordinates to values + * + * @return array associative array mapping coordinate ranges to valuea + */ + public static function mergeRangesInCollection(array $pCoordCollection) + { + $hashedValues = []; + $mergedCoordCollection = []; + + foreach ($pCoordCollection as $coord => $value) { + if (self::coordinateIsRange($coord)) { + $mergedCoordCollection[$coord] = $value; + + continue; + } + + [$column, $row] = self::coordinateFromString($coord); + $row = (int) (ltrim($row, '$')); + $hashCode = $column . '-' . (is_object($value) ? $value->getHashCode() : $value); + + if (!isset($hashedValues[$hashCode])) { + $hashedValues[$hashCode] = (object) [ + 'value' => $value, + 'col' => $column, + 'rows' => [$row], + ]; + } else { + $hashedValues[$hashCode]->rows[] = $row; + } + } + + ksort($hashedValues); + + foreach ($hashedValues as $hashedValue) { + sort($hashedValue->rows); + $rowStart = null; + $rowEnd = null; + $ranges = []; + + foreach ($hashedValue->rows as $row) { + if ($rowStart === null) { + $rowStart = $row; + $rowEnd = $row; + } elseif ($rowEnd === $row - 1) { + $rowEnd = $row; + } else { + if ($rowStart == $rowEnd) { + $ranges[] = $hashedValue->col . $rowStart; + } else { + $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; + } + + $rowStart = $row; + $rowEnd = $row; + } + } + + if ($rowStart !== null) { + if ($rowStart == $rowEnd) { + $ranges[] = $hashedValue->col . $rowStart; + } else { + $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; + } + } + + foreach ($ranges as $range) { + $mergedCoordCollection[$range] = $hashedValue->value; + } + } + + return $mergedCoordCollection; + } + + /** + * Get the individual cell blocks from a range string, removing any $ characters. + * then splitting by operators and returning an array with ranges and operators. + * + * @param string $rangeString + * + * @return array[] + */ + private static function getCellBlocksFromRangeString($rangeString) + { + $rangeString = str_replace('$', '', strtoupper($rangeString)); + + // split range sets on intersection (space) or union (,) operators + $tokens = preg_split('/([ ,])/', $rangeString, -1, PREG_SPLIT_DELIM_CAPTURE); + // separate the range sets and the operators into arrays + $split = array_chunk($tokens, 2); + $ranges = array_column($split, 0); + $operators = array_column($split, 1); + + return [$ranges, $operators]; + } + + /** + * Check that the given range is valid, i.e. that the start column and row are not greater than the end column and + * row. + * + * @param string $cellBlock The original range, for displaying a meaningful error message + * @param int $startColumnIndex + * @param int $endColumnIndex + * @param int $currentRow + * @param int $endRow + */ + private static function validateRange($cellBlock, $startColumnIndex, $endColumnIndex, $currentRow, $endRow): void + { + if ($startColumnIndex >= $endColumnIndex || $currentRow > $endRow) { + throw new Exception('Invalid range: "' . $cellBlock . '"'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataType.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataType.php new file mode 100755 index 0000000..ba03579 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataType.php @@ -0,0 +1,85 @@ + 0, + '#DIV/0!' => 1, + '#VALUE!' => 2, + '#REF!' => 3, + '#NAME?' => 4, + '#NUM!' => 5, + '#N/A' => 6, + ]; + + /** + * Get list of error codes. + * + * @return array + */ + public static function getErrorCodes() + { + return self::$errorCodes; + } + + /** + * Check a string that it satisfies Excel requirements. + * + * @param null|RichText|string $pValue Value to sanitize to an Excel string + * + * @return null|RichText|string Sanitized value + */ + public static function checkString($pValue) + { + if ($pValue instanceof RichText) { + // TODO: Sanitize Rich-Text string (max. character count is 32,767) + return $pValue; + } + + // string must never be longer than 32,767 characters, truncate if necessary + $pValue = StringHelper::substring($pValue, 0, 32767); + + // we require that newline is represented as "\n" in core, not as "\r\n" or "\r" + $pValue = str_replace(["\r\n", "\r"], "\n", $pValue); + + return $pValue; + } + + /** + * Check a value that it is a valid error code. + * + * @param mixed $pValue Value to sanitize to an Excel error code + * + * @return string Sanitized value + */ + public static function checkErrorCode($pValue) + { + $pValue = (string) $pValue; + + if (!isset(self::$errorCodes[$pValue])) { + $pValue = '#NULL!'; + } + + return $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidation.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidation.php new file mode 100755 index 0000000..dfeb024 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidation.php @@ -0,0 +1,481 @@ +formula1; + } + + /** + * Set Formula 1. + * + * @param string $value + * + * @return $this + */ + public function setFormula1($value) + { + $this->formula1 = $value; + + return $this; + } + + /** + * Get Formula 2. + * + * @return string + */ + public function getFormula2() + { + return $this->formula2; + } + + /** + * Set Formula 2. + * + * @param string $value + * + * @return $this + */ + public function setFormula2($value) + { + $this->formula2 = $value; + + return $this; + } + + /** + * Get Type. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Set Type. + * + * @param string $value + * + * @return $this + */ + public function setType($value) + { + $this->type = $value; + + return $this; + } + + /** + * Get Error style. + * + * @return string + */ + public function getErrorStyle() + { + return $this->errorStyle; + } + + /** + * Set Error style. + * + * @param string $value see self::STYLE_* + * + * @return $this + */ + public function setErrorStyle($value) + { + $this->errorStyle = $value; + + return $this; + } + + /** + * Get Operator. + * + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Set Operator. + * + * @param string $value + * + * @return $this + */ + public function setOperator($value) + { + $this->operator = $value; + + return $this; + } + + /** + * Get Allow Blank. + * + * @return bool + */ + public function getAllowBlank() + { + return $this->allowBlank; + } + + /** + * Set Allow Blank. + * + * @param bool $value + * + * @return $this + */ + public function setAllowBlank($value) + { + $this->allowBlank = $value; + + return $this; + } + + /** + * Get Show DropDown. + * + * @return bool + */ + public function getShowDropDown() + { + return $this->showDropDown; + } + + /** + * Set Show DropDown. + * + * @param bool $value + * + * @return $this + */ + public function setShowDropDown($value) + { + $this->showDropDown = $value; + + return $this; + } + + /** + * Get Show InputMessage. + * + * @return bool + */ + public function getShowInputMessage() + { + return $this->showInputMessage; + } + + /** + * Set Show InputMessage. + * + * @param bool $value + * + * @return $this + */ + public function setShowInputMessage($value) + { + $this->showInputMessage = $value; + + return $this; + } + + /** + * Get Show ErrorMessage. + * + * @return bool + */ + public function getShowErrorMessage() + { + return $this->showErrorMessage; + } + + /** + * Set Show ErrorMessage. + * + * @param bool $value + * + * @return $this + */ + public function setShowErrorMessage($value) + { + $this->showErrorMessage = $value; + + return $this; + } + + /** + * Get Error title. + * + * @return string + */ + public function getErrorTitle() + { + return $this->errorTitle; + } + + /** + * Set Error title. + * + * @param string $value + * + * @return $this + */ + public function setErrorTitle($value) + { + $this->errorTitle = $value; + + return $this; + } + + /** + * Get Error. + * + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Set Error. + * + * @param string $value + * + * @return $this + */ + public function setError($value) + { + $this->error = $value; + + return $this; + } + + /** + * Get Prompt title. + * + * @return string + */ + public function getPromptTitle() + { + return $this->promptTitle; + } + + /** + * Set Prompt title. + * + * @param string $value + * + * @return $this + */ + public function setPromptTitle($value) + { + $this->promptTitle = $value; + + return $this; + } + + /** + * Get Prompt. + * + * @return string + */ + public function getPrompt() + { + return $this->prompt; + } + + /** + * Set Prompt. + * + * @param string $value + * + * @return $this + */ + public function setPrompt($value) + { + $this->prompt = $value; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->formula1 . + $this->formula2 . + $this->type . + $this->errorStyle . + $this->operator . + ($this->allowBlank ? 't' : 'f') . + ($this->showDropDown ? 't' : 'f') . + ($this->showInputMessage ? 't' : 'f') . + ($this->showErrorMessage ? 't' : 'f') . + $this->errorTitle . + $this->error . + $this->promptTitle . + $this->prompt . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidator.php new file mode 100755 index 0000000..430d81b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DataValidator.php @@ -0,0 +1,77 @@ +hasDataValidation()) { + return true; + } + + $cellValue = $cell->getValue(); + $dataValidation = $cell->getDataValidation(); + + if (!$dataValidation->getAllowBlank() && ($cellValue === null || $cellValue === '')) { + return false; + } + + // TODO: write check on all cases + switch ($dataValidation->getType()) { + case DataValidation::TYPE_LIST: + return $this->isValueInList($cell); + } + + return false; + } + + /** + * Does this cell contain valid value, based on list? + * + * @param Cell $cell Cell to check the value + * + * @return bool + */ + private function isValueInList(Cell $cell) + { + $cellValue = $cell->getValue(); + $dataValidation = $cell->getDataValidation(); + + $formula1 = $dataValidation->getFormula1(); + if (!empty($formula1)) { + // inline values list + if ($formula1[0] === '"') { + return in_array(strtolower($cellValue), explode(',', strtolower(trim($formula1, '"'))), true); + } elseif (strpos($formula1, ':') > 0) { + // values list cells + $matchFormula = '=MATCH(' . $cell->getCoordinate() . ', ' . $formula1 . ', 0)'; + $calculation = Calculation::getInstance($cell->getWorksheet()->getParent()); + + try { + $result = $calculation->calculateFormula($matchFormula, $cell->getCoordinate(), $cell); + + return $result !== Functions::NA(); + } catch (Exception $ex) { + return false; + } + } + } + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DefaultValueBinder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DefaultValueBinder.php new file mode 100755 index 0000000..693446e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/DefaultValueBinder.php @@ -0,0 +1,82 @@ +format('Y-m-d H:i:s'); + } elseif (!($value instanceof RichText)) { + $value = (string) $value; + } + } + + // Set value explicit + $cell->setValueExplicit($value, static::dataTypeForValue($value)); + + // Done! + return true; + } + + /** + * DataType for value. + * + * @param mixed $pValue + * + * @return string + */ + public static function dataTypeForValue($pValue) + { + // Match the value against a few data types + if ($pValue === null) { + return DataType::TYPE_NULL; + } elseif (is_float($pValue) || is_int($pValue)) { + return DataType::TYPE_NUMERIC; + } elseif (is_bool($pValue)) { + return DataType::TYPE_BOOL; + } elseif ($pValue === '') { + return DataType::TYPE_STRING; + } elseif ($pValue instanceof RichText) { + return DataType::TYPE_INLINE; + } elseif (is_string($pValue) && $pValue[0] === '=' && strlen($pValue) > 1) { + return DataType::TYPE_FORMULA; + } elseif (preg_match('/^[\+\-]?(\d+\\.?\d*|\d*\\.?\d+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) { + $tValue = ltrim($pValue, '+-'); + if (is_string($pValue) && $tValue[0] === '0' && strlen($tValue) > 1 && $tValue[1] !== '.') { + return DataType::TYPE_STRING; + } elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) { + return DataType::TYPE_STRING; + } elseif (!is_numeric($pValue)) { + return DataType::TYPE_STRING; + } + + return DataType::TYPE_NUMERIC; + } elseif (is_string($pValue)) { + $errorCodes = DataType::getErrorCodes(); + if (isset($errorCodes[$pValue])) { + return DataType::TYPE_ERROR; + } + } + + return DataType::TYPE_STRING; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Hyperlink.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Hyperlink.php new file mode 100755 index 0000000..003d510 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/Hyperlink.php @@ -0,0 +1,113 @@ +url = $pUrl; + $this->tooltip = $pTooltip; + } + + /** + * Get URL. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set URL. + * + * @param string $value + * + * @return $this + */ + public function setUrl($value) + { + $this->url = $value; + + return $this; + } + + /** + * Get tooltip. + * + * @return string + */ + public function getTooltip() + { + return $this->tooltip; + } + + /** + * Set tooltip. + * + * @param string $value + * + * @return $this + */ + public function setTooltip($value) + { + $this->tooltip = $value; + + return $this; + } + + /** + * Is this hyperlink internal? (to another worksheet). + * + * @return bool + */ + public function isInternal() + { + return strpos($this->url, 'sheet://') !== false; + } + + /** + * @return string + */ + public function getTypeHyperlink() + { + return $this->isInternal() ? '' : 'External'; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->url . + $this->tooltip . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/IValueBinder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/IValueBinder.php new file mode 100755 index 0000000..5af9f5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Cell/IValueBinder.php @@ -0,0 +1,16 @@ +setValueExplicit((string) $value, DataType::TYPE_STRING); + + // Done! + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Axis.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Axis.php new file mode 100755 index 0000000..7995c3b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Axis.php @@ -0,0 +1,556 @@ + self::FORMAT_CODE_GENERAL, + 'source_linked' => 1, + ]; + + /** + * Axis Options. + * + * @var array of mixed + */ + private $axisOptions = [ + 'minimum' => null, + 'maximum' => null, + 'major_unit' => null, + 'minor_unit' => null, + 'orientation' => self::ORIENTATION_NORMAL, + 'minor_tick_mark' => self::TICK_MARK_NONE, + 'major_tick_mark' => self::TICK_MARK_NONE, + 'axis_labels' => self::AXIS_LABELS_NEXT_TO, + 'horizontal_crosses' => self::HORIZONTAL_CROSSES_AUTOZERO, + 'horizontal_crosses_value' => null, + ]; + + /** + * Fill Properties. + * + * @var array of mixed + */ + private $fillProperties = [ + 'type' => self::EXCEL_COLOR_TYPE_ARGB, + 'value' => null, + 'alpha' => 0, + ]; + + /** + * Line Properties. + * + * @var array of mixed + */ + private $lineProperties = [ + 'type' => self::EXCEL_COLOR_TYPE_ARGB, + 'value' => null, + 'alpha' => 0, + ]; + + /** + * Line Style Properties. + * + * @var array of mixed + */ + private $lineStyleProperties = [ + 'width' => '9525', + 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, + 'dash' => self::LINE_STYLE_DASH_SOLID, + 'cap' => self::LINE_STYLE_CAP_FLAT, + 'join' => self::LINE_STYLE_JOIN_BEVEL, + 'arrow' => [ + 'head' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_5, + ], + 'end' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_8, + ], + ], + ]; + + /** + * Shadow Properties. + * + * @var array of mixed + */ + private $shadowProperties = [ + 'presets' => self::SHADOW_PRESETS_NOSHADOW, + 'effect' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + 'size' => [ + 'sx' => null, + 'sy' => null, + 'kx' => null, + ], + 'blur' => null, + 'direction' => null, + 'distance' => null, + 'algn' => null, + 'rotWithShape' => null, + ]; + + /** + * Glow Properties. + * + * @var array of mixed + */ + private $glowProperties = [ + 'size' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + ]; + + /** + * Soft Edge Properties. + * + * @var array of mixed + */ + private $softEdges = [ + 'size' => null, + ]; + + /** + * Get Series Data Type. + * + * @param mixed $format_code + * + * @return string + */ + public function setAxisNumberProperties($format_code) + { + $this->axisNumber['format'] = (string) $format_code; + $this->axisNumber['source_linked'] = 0; + } + + /** + * Get Axis Number Format Data Type. + * + * @return string + */ + public function getAxisNumberFormat() + { + return $this->axisNumber['format']; + } + + /** + * Get Axis Number Source Linked. + * + * @return string + */ + public function getAxisNumberSourceLinked() + { + return (string) $this->axisNumber['source_linked']; + } + + /** + * Set Axis Options Properties. + * + * @param string $axis_labels + * @param string $horizontal_crosses_value + * @param string $horizontal_crosses + * @param string $axis_orientation + * @param string $major_tmt + * @param string $minor_tmt + * @param string $minimum + * @param string $maximum + * @param string $major_unit + * @param string $minor_unit + */ + public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null, $axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null, $minor_unit = null): void + { + $this->axisOptions['axis_labels'] = (string) $axis_labels; + ($horizontal_crosses_value !== null) ? $this->axisOptions['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null; + ($horizontal_crosses !== null) ? $this->axisOptions['horizontal_crosses'] = (string) $horizontal_crosses : null; + ($axis_orientation !== null) ? $this->axisOptions['orientation'] = (string) $axis_orientation : null; + ($major_tmt !== null) ? $this->axisOptions['major_tick_mark'] = (string) $major_tmt : null; + ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; + ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; + ($minimum !== null) ? $this->axisOptions['minimum'] = (string) $minimum : null; + ($maximum !== null) ? $this->axisOptions['maximum'] = (string) $maximum : null; + ($major_unit !== null) ? $this->axisOptions['major_unit'] = (string) $major_unit : null; + ($minor_unit !== null) ? $this->axisOptions['minor_unit'] = (string) $minor_unit : null; + } + + /** + * Get Axis Options Property. + * + * @param string $property + * + * @return string + */ + public function getAxisOptionsProperty($property) + { + return $this->axisOptions[$property]; + } + + /** + * Set Axis Orientation Property. + * + * @param string $orientation + */ + public function setAxisOrientation($orientation): void + { + $this->axisOptions['orientation'] = (string) $orientation; + } + + /** + * Set Fill Property. + * + * @param string $color + * @param int $alpha + * @param string $type + */ + public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB): void + { + $this->fillProperties = $this->setColorProperties($color, $alpha, $type); + } + + /** + * Set Line Property. + * + * @param string $color + * @param int $alpha + * @param string $type + */ + public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB): void + { + $this->lineProperties = $this->setColorProperties($color, $alpha, $type); + } + + /** + * Get Fill Property. + * + * @param string $property + * + * @return string + */ + public function getFillProperty($property) + { + return $this->fillProperties[$property]; + } + + /** + * Get Line Property. + * + * @param string $property + * + * @return string + */ + public function getLineProperty($property) + { + return $this->lineProperties[$property]; + } + + /** + * Set Line Style Properties. + * + * @param float $line_width + * @param string $compound_type + * @param string $dash_type + * @param string $cap_type + * @param string $join_type + * @param string $head_arrow_type + * @param string $head_arrow_size + * @param string $end_arrow_type + * @param string $end_arrow_size + */ + public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null): void + { + ($line_width !== null) ? $this->lineStyleProperties['width'] = $this->getExcelPointsWidth((float) $line_width) : null; + ($compound_type !== null) ? $this->lineStyleProperties['compound'] = (string) $compound_type : null; + ($dash_type !== null) ? $this->lineStyleProperties['dash'] = (string) $dash_type : null; + ($cap_type !== null) ? $this->lineStyleProperties['cap'] = (string) $cap_type : null; + ($join_type !== null) ? $this->lineStyleProperties['join'] = (string) $join_type : null; + ($head_arrow_type !== null) ? $this->lineStyleProperties['arrow']['head']['type'] = (string) $head_arrow_type : null; + ($head_arrow_size !== null) ? $this->lineStyleProperties['arrow']['head']['size'] = (string) $head_arrow_size : null; + ($end_arrow_type !== null) ? $this->lineStyleProperties['arrow']['end']['type'] = (string) $end_arrow_type : null; + ($end_arrow_size !== null) ? $this->lineStyleProperties['arrow']['end']['size'] = (string) $end_arrow_size : null; + } + + /** + * Get Line Style Property. + * + * @param array|string $elements + * + * @return string + */ + public function getLineStyleProperty($elements) + { + return $this->getArrayElementsValue($this->lineStyleProperties, $elements); + } + + /** + * Get Line Style Arrow Excel Width. + * + * @param string $arrow + * + * @return string + */ + public function getLineStyleArrowWidth($arrow) + { + return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'w'); + } + + /** + * Get Line Style Arrow Excel Length. + * + * @param string $arrow + * + * @return string + */ + public function getLineStyleArrowLength($arrow) + { + return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'len'); + } + + /** + * Set Shadow Properties. + * + * @param int $sh_presets + * @param string $sh_color_value + * @param string $sh_color_type + * @param string $sh_color_alpha + * @param float $sh_blur + * @param int $sh_angle + * @param float $sh_distance + */ + public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null): void + { + $this->setShadowPresetsProperties((int) $sh_presets) + ->setShadowColor( + $sh_color_value === null ? $this->shadowProperties['color']['value'] : $sh_color_value, + $sh_color_alpha === null ? (int) $this->shadowProperties['color']['alpha'] : $sh_color_alpha, + $sh_color_type === null ? $this->shadowProperties['color']['type'] : $sh_color_type + ) + ->setShadowBlur($sh_blur) + ->setShadowAngle($sh_angle) + ->setShadowDistance($sh_distance); + } + + /** + * Set Shadow Color. + * + * @param int $shadow_presets + * + * @return $this + */ + private function setShadowPresetsProperties($shadow_presets) + { + $this->shadowProperties['presets'] = $shadow_presets; + $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); + + return $this; + } + + /** + * Set Shadow Properties from Mapped Values. + * + * @param mixed &$reference + * + * @return $this + */ + private function setShadowProperiesMapValues(array $properties_map, &$reference = null) + { + $base_reference = $reference; + foreach ($properties_map as $property_key => $property_val) { + if (is_array($property_val)) { + if ($reference === null) { + $reference = &$this->shadowProperties[$property_key]; + } else { + $reference = &$reference[$property_key]; + } + $this->setShadowProperiesMapValues($property_val, $reference); + } else { + if ($base_reference === null) { + $this->shadowProperties[$property_key] = $property_val; + } else { + $reference[$property_key] = $property_val; + } + } + } + + return $this; + } + + /** + * Set Shadow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return $this + */ + private function setShadowColor($color, $alpha, $type) + { + $this->shadowProperties['color'] = $this->setColorProperties($color, $alpha, $type); + + return $this; + } + + /** + * Set Shadow Blur. + * + * @param float $blur + * + * @return $this + */ + private function setShadowBlur($blur) + { + if ($blur !== null) { + $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); + } + + return $this; + } + + /** + * Set Shadow Angle. + * + * @param int $angle + * + * @return $this + */ + private function setShadowAngle($angle) + { + if ($angle !== null) { + $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); + } + + return $this; + } + + /** + * Set Shadow Distance. + * + * @param float $distance + * + * @return $this + */ + private function setShadowDistance($distance) + { + if ($distance !== null) { + $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); + } + + return $this; + } + + /** + * Get Shadow Property. + * + * @param string|string[] $elements + * + * @return null|array|int|string + */ + public function getShadowProperty($elements) + { + return $this->getArrayElementsValue($this->shadowProperties, $elements); + } + + /** + * Set Glow Properties. + * + * @param float $size + * @param string $color_value + * @param int $color_alpha + * @param string $color_type + */ + public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null): void + { + $this->setGlowSize($size) + ->setGlowColor( + $color_value === null ? $this->glowProperties['color']['value'] : $color_value, + $color_alpha === null ? (int) $this->glowProperties['color']['alpha'] : $color_alpha, + $color_type === null ? $this->glowProperties['color']['type'] : $color_type + ); + } + + /** + * Get Glow Property. + * + * @param array|string $property + * + * @return string + */ + public function getGlowProperty($property) + { + return $this->getArrayElementsValue($this->glowProperties, $property); + } + + /** + * Set Glow Color. + * + * @param float $size + * + * @return $this + */ + private function setGlowSize($size) + { + if ($size !== null) { + $this->glowProperties['size'] = $this->getExcelPointsWidth($size); + } + + return $this; + } + + /** + * Set Glow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return $this + */ + private function setGlowColor($color, $alpha, $type) + { + $this->glowProperties['color'] = $this->setColorProperties($color, $alpha, $type); + + return $this; + } + + /** + * Set Soft Edges Size. + * + * @param float $size + */ + public function setSoftEdges($size): void + { + if ($size !== null) { + $softEdges['size'] = (string) $this->getExcelPointsWidth($size); + } + } + + /** + * Get Soft Edges Size. + * + * @return string + */ + public function getSoftEdgesSize() + { + return $this->softEdges['size']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Chart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Chart.php new file mode 100755 index 0000000..20eb2ae --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Chart.php @@ -0,0 +1,663 @@ +name = $name; + $this->title = $title; + $this->legend = $legend; + $this->xAxisLabel = $xAxisLabel; + $this->yAxisLabel = $yAxisLabel; + $this->plotArea = $plotArea; + $this->plotVisibleOnly = $plotVisibleOnly; + $this->displayBlanksAs = $displayBlanksAs; + $this->xAxis = $xAxis; + $this->yAxis = $yAxis; + $this->majorGridlines = $majorGridlines; + $this->minorGridlines = $minorGridlines; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Get Worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set Worksheet. + * + * @param Worksheet $pValue + * + * @return $this + */ + public function setWorksheet(?Worksheet $pValue = null) + { + $this->worksheet = $pValue; + + return $this; + } + + /** + * Get Title. + * + * @return Title + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set Title. + * + * @return $this + */ + public function setTitle(Title $title) + { + $this->title = $title; + + return $this; + } + + /** + * Get Legend. + * + * @return Legend + */ + public function getLegend() + { + return $this->legend; + } + + /** + * Set Legend. + * + * @return $this + */ + public function setLegend(Legend $legend) + { + $this->legend = $legend; + + return $this; + } + + /** + * Get X-Axis Label. + * + * @return Title + */ + public function getXAxisLabel() + { + return $this->xAxisLabel; + } + + /** + * Set X-Axis Label. + * + * @return $this + */ + public function setXAxisLabel(Title $label) + { + $this->xAxisLabel = $label; + + return $this; + } + + /** + * Get Y-Axis Label. + * + * @return Title + */ + public function getYAxisLabel() + { + return $this->yAxisLabel; + } + + /** + * Set Y-Axis Label. + * + * @return $this + */ + public function setYAxisLabel(Title $label) + { + $this->yAxisLabel = $label; + + return $this; + } + + /** + * Get Plot Area. + * + * @return PlotArea + */ + public function getPlotArea() + { + return $this->plotArea; + } + + /** + * Get Plot Visible Only. + * + * @return bool + */ + public function getPlotVisibleOnly() + { + return $this->plotVisibleOnly; + } + + /** + * Set Plot Visible Only. + * + * @param bool $plotVisibleOnly + * + * @return $this + */ + public function setPlotVisibleOnly($plotVisibleOnly) + { + $this->plotVisibleOnly = $plotVisibleOnly; + + return $this; + } + + /** + * Get Display Blanks as. + * + * @return string + */ + public function getDisplayBlanksAs() + { + return $this->displayBlanksAs; + } + + /** + * Set Display Blanks as. + * + * @param string $displayBlanksAs + * + * @return $this + */ + public function setDisplayBlanksAs($displayBlanksAs) + { + $this->displayBlanksAs = $displayBlanksAs; + + return $this; + } + + /** + * Get yAxis. + * + * @return Axis + */ + public function getChartAxisY() + { + if ($this->yAxis !== null) { + return $this->yAxis; + } + + return new Axis(); + } + + /** + * Get xAxis. + * + * @return Axis + */ + public function getChartAxisX() + { + if ($this->xAxis !== null) { + return $this->xAxis; + } + + return new Axis(); + } + + /** + * Get Major Gridlines. + * + * @return GridLines + */ + public function getMajorGridlines() + { + if ($this->majorGridlines !== null) { + return $this->majorGridlines; + } + + return new GridLines(); + } + + /** + * Get Minor Gridlines. + * + * @return GridLines + */ + public function getMinorGridlines() + { + if ($this->minorGridlines !== null) { + return $this->minorGridlines; + } + + return new GridLines(); + } + + /** + * Set the Top Left position for the chart. + * + * @param string $cell + * @param int $xOffset + * @param int $yOffset + * + * @return $this + */ + public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null) + { + $this->topLeftCellRef = $cell; + if ($xOffset !== null) { + $this->setTopLeftXOffset($xOffset); + } + if ($yOffset !== null) { + $this->setTopLeftYOffset($yOffset); + } + + return $this; + } + + /** + * Get the top left position of the chart. + * + * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell + */ + public function getTopLeftPosition() + { + return [ + 'cell' => $this->topLeftCellRef, + 'xOffset' => $this->topLeftXOffset, + 'yOffset' => $this->topLeftYOffset, + ]; + } + + /** + * Get the cell address where the top left of the chart is fixed. + * + * @return string + */ + public function getTopLeftCell() + { + return $this->topLeftCellRef; + } + + /** + * Set the Top Left cell position for the chart. + * + * @param string $cell + * + * @return $this + */ + public function setTopLeftCell($cell) + { + $this->topLeftCellRef = $cell; + + return $this; + } + + /** + * Set the offset position within the Top Left cell for the chart. + * + * @param int $xOffset + * @param int $yOffset + * + * @return $this + */ + public function setTopLeftOffset($xOffset, $yOffset) + { + if ($xOffset !== null) { + $this->setTopLeftXOffset($xOffset); + } + + if ($yOffset !== null) { + $this->setTopLeftYOffset($yOffset); + } + + return $this; + } + + /** + * Get the offset position within the Top Left cell for the chart. + * + * @return int[] + */ + public function getTopLeftOffset() + { + return [ + 'X' => $this->topLeftXOffset, + 'Y' => $this->topLeftYOffset, + ]; + } + + public function setTopLeftXOffset($xOffset) + { + $this->topLeftXOffset = $xOffset; + + return $this; + } + + public function getTopLeftXOffset() + { + return $this->topLeftXOffset; + } + + public function setTopLeftYOffset($yOffset) + { + $this->topLeftYOffset = $yOffset; + + return $this; + } + + public function getTopLeftYOffset() + { + return $this->topLeftYOffset; + } + + /** + * Set the Bottom Right position of the chart. + * + * @param string $cell + * @param int $xOffset + * @param int $yOffset + * + * @return $this + */ + public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null) + { + $this->bottomRightCellRef = $cell; + if ($xOffset !== null) { + $this->setBottomRightXOffset($xOffset); + } + if ($yOffset !== null) { + $this->setBottomRightYOffset($yOffset); + } + + return $this; + } + + /** + * Get the bottom right position of the chart. + * + * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell + */ + public function getBottomRightPosition() + { + return [ + 'cell' => $this->bottomRightCellRef, + 'xOffset' => $this->bottomRightXOffset, + 'yOffset' => $this->bottomRightYOffset, + ]; + } + + public function setBottomRightCell($cell) + { + $this->bottomRightCellRef = $cell; + + return $this; + } + + /** + * Get the cell address where the bottom right of the chart is fixed. + * + * @return string + */ + public function getBottomRightCell() + { + return $this->bottomRightCellRef; + } + + /** + * Set the offset position within the Bottom Right cell for the chart. + * + * @param int $xOffset + * @param int $yOffset + * + * @return $this + */ + public function setBottomRightOffset($xOffset, $yOffset) + { + if ($xOffset !== null) { + $this->setBottomRightXOffset($xOffset); + } + + if ($yOffset !== null) { + $this->setBottomRightYOffset($yOffset); + } + + return $this; + } + + /** + * Get the offset position within the Bottom Right cell for the chart. + * + * @return int[] + */ + public function getBottomRightOffset() + { + return [ + 'X' => $this->bottomRightXOffset, + 'Y' => $this->bottomRightYOffset, + ]; + } + + public function setBottomRightXOffset($xOffset) + { + $this->bottomRightXOffset = $xOffset; + + return $this; + } + + public function getBottomRightXOffset() + { + return $this->bottomRightXOffset; + } + + public function setBottomRightYOffset($yOffset) + { + $this->bottomRightYOffset = $yOffset; + + return $this; + } + + public function getBottomRightYOffset() + { + return $this->bottomRightYOffset; + } + + public function refresh(): void + { + if ($this->worksheet !== null) { + $this->plotArea->refresh($this->worksheet); + } + } + + /** + * Render the chart to given file (or stream). + * + * @param string $outputDestination Name of the file render to + * + * @return bool true on success + */ + public function render($outputDestination = null) + { + if ($outputDestination == 'php://output') { + $outputDestination = null; + } + + $libraryName = Settings::getChartRenderer(); + if ($libraryName === null) { + return false; + } + + // Ensure that data series values are up-to-date before we render + $this->refresh(); + + $renderer = new $libraryName($this); + + return $renderer->render($outputDestination); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeries.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeries.php new file mode 100755 index 0000000..3a44b33 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeries.php @@ -0,0 +1,394 @@ +plotType = $plotType; + $this->plotGrouping = $plotGrouping; + $this->plotOrder = $plotOrder; + $keys = array_keys($plotValues); + $this->plotValues = $plotValues; + if ((count($plotLabel) == 0) || ($plotLabel[$keys[0]] === null)) { + $plotLabel[$keys[0]] = new DataSeriesValues(); + } + $this->plotLabel = $plotLabel; + + if ((count($plotCategory) == 0) || ($plotCategory[$keys[0]] === null)) { + $plotCategory[$keys[0]] = new DataSeriesValues(); + } + $this->plotCategory = $plotCategory; + + $this->smoothLine = $smoothLine; + $this->plotStyle = $plotStyle; + + if ($plotDirection === null) { + $plotDirection = self::DIRECTION_COL; + } + $this->plotDirection = $plotDirection; + } + + /** + * Get Plot Type. + * + * @return string + */ + public function getPlotType() + { + return $this->plotType; + } + + /** + * Set Plot Type. + * + * @param string $plotType + * + * @return $this + */ + public function setPlotType($plotType) + { + $this->plotType = $plotType; + + return $this; + } + + /** + * Get Plot Grouping Type. + * + * @return string + */ + public function getPlotGrouping() + { + return $this->plotGrouping; + } + + /** + * Set Plot Grouping Type. + * + * @param string $groupingType + * + * @return $this + */ + public function setPlotGrouping($groupingType) + { + $this->plotGrouping = $groupingType; + + return $this; + } + + /** + * Get Plot Direction. + * + * @return string + */ + public function getPlotDirection() + { + return $this->plotDirection; + } + + /** + * Set Plot Direction. + * + * @param string $plotDirection + * + * @return $this + */ + public function setPlotDirection($plotDirection) + { + $this->plotDirection = $plotDirection; + + return $this; + } + + /** + * Get Plot Order. + * + * @return int[] + */ + public function getPlotOrder() + { + return $this->plotOrder; + } + + /** + * Get Plot Labels. + * + * @return array of DataSeriesValues + */ + public function getPlotLabels() + { + return $this->plotLabel; + } + + /** + * Get Plot Label by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotLabelByIndex($index) + { + $keys = array_keys($this->plotLabel); + if (in_array($index, $keys)) { + return $this->plotLabel[$index]; + } elseif (isset($keys[$index])) { + return $this->plotLabel[$keys[$index]]; + } + + return false; + } + + /** + * Get Plot Categories. + * + * @return array of DataSeriesValues + */ + public function getPlotCategories() + { + return $this->plotCategory; + } + + /** + * Get Plot Category by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotCategoryByIndex($index) + { + $keys = array_keys($this->plotCategory); + if (in_array($index, $keys)) { + return $this->plotCategory[$index]; + } elseif (isset($keys[$index])) { + return $this->plotCategory[$keys[$index]]; + } + + return false; + } + + /** + * Get Plot Style. + * + * @return null|string + */ + public function getPlotStyle() + { + return $this->plotStyle; + } + + /** + * Set Plot Style. + * + * @param null|string $plotStyle + * + * @return $this + */ + public function setPlotStyle($plotStyle) + { + $this->plotStyle = $plotStyle; + + return $this; + } + + /** + * Get Plot Values. + * + * @return array of DataSeriesValues + */ + public function getPlotValues() + { + return $this->plotValues; + } + + /** + * Get Plot Values by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotValuesByIndex($index) + { + $keys = array_keys($this->plotValues); + if (in_array($index, $keys)) { + return $this->plotValues[$index]; + } elseif (isset($keys[$index])) { + return $this->plotValues[$keys[$index]]; + } + + return false; + } + + /** + * Get Number of Plot Series. + * + * @return int + */ + public function getPlotSeriesCount() + { + return count($this->plotValues); + } + + /** + * Get Smooth Line. + * + * @return bool + */ + public function getSmoothLine() + { + return $this->smoothLine; + } + + /** + * Set Smooth Line. + * + * @param bool $smoothLine + * + * @return $this + */ + public function setSmoothLine($smoothLine) + { + $this->smoothLine = $smoothLine; + + return $this; + } + + public function refresh(Worksheet $worksheet): void + { + foreach ($this->plotValues as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, true); + } + } + foreach ($this->plotLabel as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, true); + } + } + foreach ($this->plotCategory as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, false); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeriesValues.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeriesValues.php new file mode 100755 index 0000000..c1bd973 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/DataSeriesValues.php @@ -0,0 +1,397 @@ +setDataType($dataType); + $this->dataSource = $dataSource; + $this->formatCode = $formatCode; + $this->pointCount = $pointCount; + $this->dataValues = $dataValues; + $this->pointMarker = $marker; + $this->fillColor = $fillColor; + } + + /** + * Get Series Data Type. + * + * @return string + */ + public function getDataType() + { + return $this->dataType; + } + + /** + * Set Series Data Type. + * + * @param string $dataType Datatype of this data series + * Typical values are: + * DataSeriesValues::DATASERIES_TYPE_STRING + * Normally used for axis point values + * DataSeriesValues::DATASERIES_TYPE_NUMBER + * Normally used for chart data values + * + * @return $this + */ + public function setDataType($dataType) + { + if (!in_array($dataType, self::$dataTypeValues)) { + throw new Exception('Invalid datatype for chart data series values'); + } + $this->dataType = $dataType; + + return $this; + } + + /** + * Get Series Data Source (formula). + * + * @return string + */ + public function getDataSource() + { + return $this->dataSource; + } + + /** + * Set Series Data Source (formula). + * + * @param string $dataSource + * + * @return $this + */ + public function setDataSource($dataSource) + { + $this->dataSource = $dataSource; + + return $this; + } + + /** + * Get Point Marker. + * + * @return string + */ + public function getPointMarker() + { + return $this->pointMarker; + } + + /** + * Set Point Marker. + * + * @param string $marker + * + * @return $this + */ + public function setPointMarker($marker) + { + $this->pointMarker = $marker; + + return $this; + } + + /** + * Get Series Format Code. + * + * @return string + */ + public function getFormatCode() + { + return $this->formatCode; + } + + /** + * Set Series Format Code. + * + * @param string $formatCode + * + * @return $this + */ + public function setFormatCode($formatCode) + { + $this->formatCode = $formatCode; + + return $this; + } + + /** + * Get Series Point Count. + * + * @return int + */ + public function getPointCount() + { + return $this->pointCount; + } + + /** + * Get fill color. + * + * @return string|string[] HEX color or array with HEX colors + */ + public function getFillColor() + { + return $this->fillColor; + } + + /** + * Set fill color for series. + * + * @param string|string[] $color HEX color or array with HEX colors + * + * @return DataSeriesValues + */ + public function setFillColor($color) + { + if (is_array($color)) { + foreach ($color as $colorValue) { + $this->validateColor($colorValue); + } + } else { + $this->validateColor($color); + } + $this->fillColor = $color; + + return $this; + } + + /** + * Method for validating hex color. + * + * @param string $color value for color + * + * @return bool true if validation was successful + */ + private function validateColor($color) + { + if (!preg_match('/^[a-f0-9]{6}$/i', $color)) { + throw new Exception(sprintf('Invalid hex color for chart series (color: "%s")', $color)); + } + + return true; + } + + /** + * Get line width for series. + * + * @return int + */ + public function getLineWidth() + { + return $this->lineWidth; + } + + /** + * Set line width for the series. + * + * @param int $width + * + * @return $this + */ + public function setLineWidth($width) + { + $minWidth = 12700; + $this->lineWidth = max($minWidth, $width); + + return $this; + } + + /** + * Identify if the Data Series is a multi-level or a simple series. + * + * @return null|bool + */ + public function isMultiLevelSeries() + { + if (count($this->dataValues) > 0) { + return is_array(array_values($this->dataValues)[0]); + } + + return null; + } + + /** + * Return the level count of a multi-level Data Series. + * + * @return int + */ + public function multiLevelCount() + { + $levelCount = 0; + foreach ($this->dataValues as $dataValueSet) { + $levelCount = max($levelCount, count($dataValueSet)); + } + + return $levelCount; + } + + /** + * Get Series Data Values. + * + * @return array of mixed + */ + public function getDataValues() + { + return $this->dataValues; + } + + /** + * Get the first Series Data value. + * + * @return mixed + */ + public function getDataValue() + { + $count = count($this->dataValues); + if ($count == 0) { + return null; + } elseif ($count == 1) { + return $this->dataValues[0]; + } + + return $this->dataValues; + } + + /** + * Set Series Data Values. + * + * @param array $dataValues + * + * @return $this + */ + public function setDataValues($dataValues) + { + $this->dataValues = Functions::flattenArray($dataValues); + $this->pointCount = count($dataValues); + + return $this; + } + + public function refresh(Worksheet $worksheet, $flatten = true): void + { + if ($this->dataSource !== null) { + $calcEngine = Calculation::getInstance($worksheet->getParent()); + $newDataValues = Calculation::unwrapResult( + $calcEngine->_calculateFormulaValue( + '=' . $this->dataSource, + null, + $worksheet->getCell('A1') + ) + ); + if ($flatten) { + $this->dataValues = Functions::flattenArray($newDataValues); + foreach ($this->dataValues as &$dataValue) { + if (is_string($dataValue) && !empty($dataValue) && $dataValue[0] == '#') { + $dataValue = 0.0; + } + } + unset($dataValue); + } else { + [$worksheet, $cellRange] = Worksheet::extractSheetTitle($this->dataSource, true); + $dimensions = Coordinate::rangeDimension(str_replace('$', '', $cellRange)); + if (($dimensions[0] == 1) || ($dimensions[1] == 1)) { + $this->dataValues = Functions::flattenArray($newDataValues); + } else { + $newArray = array_values(array_shift($newDataValues)); + foreach ($newArray as $i => $newDataSet) { + $newArray[$i] = [$newDataSet]; + } + + foreach ($newDataValues as $newDataSet) { + $i = 0; + foreach ($newDataSet as $newDataVal) { + array_unshift($newArray[$i++], $newDataVal); + } + } + $this->dataValues = $newArray; + } + } + $this->pointCount = count($this->dataValues); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Exception.php new file mode 100755 index 0000000..3f95b59 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Exception.php @@ -0,0 +1,9 @@ + [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => null, + 'alpha' => 0, + ], + 'style' => [ + 'width' => '9525', + 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, + 'dash' => self::LINE_STYLE_DASH_SOLID, + 'cap' => self::LINE_STYLE_CAP_FLAT, + 'join' => self::LINE_STYLE_JOIN_BEVEL, + 'arrow' => [ + 'head' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_5, + ], + 'end' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_8, + ], + ], + ], + ]; + + private $shadowProperties = [ + 'presets' => self::SHADOW_PRESETS_NOSHADOW, + 'effect' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 85, + ], + 'size' => [ + 'sx' => null, + 'sy' => null, + 'kx' => null, + ], + 'blur' => null, + 'direction' => null, + 'distance' => null, + 'algn' => null, + 'rotWithShape' => null, + ]; + + private $glowProperties = [ + 'size' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + ]; + + private $softEdges = [ + 'size' => null, + ]; + + /** + * Get Object State. + * + * @return bool + */ + public function getObjectState() + { + return $this->objectState; + } + + /** + * Change Object State to True. + * + * @return $this + */ + private function activateObject() + { + $this->objectState = true; + + return $this; + } + + /** + * Set Line Color Properties. + * + * @param string $value + * @param int $alpha + * @param string $type + */ + public function setLineColorProperties($value, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_STANDARD): void + { + $this->activateObject() + ->lineProperties['color'] = $this->setColorProperties( + $value, + $alpha, + $type + ); + } + + /** + * Set Line Color Properties. + * + * @param float $line_width + * @param string $compound_type + * @param string $dash_type + * @param string $cap_type + * @param string $join_type + * @param string $head_arrow_type + * @param string $head_arrow_size + * @param string $end_arrow_type + * @param string $end_arrow_size + */ + public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null): void + { + $this->activateObject(); + ($line_width !== null) + ? $this->lineProperties['style']['width'] = $this->getExcelPointsWidth((float) $line_width) + : null; + ($compound_type !== null) + ? $this->lineProperties['style']['compound'] = (string) $compound_type + : null; + ($dash_type !== null) + ? $this->lineProperties['style']['dash'] = (string) $dash_type + : null; + ($cap_type !== null) + ? $this->lineProperties['style']['cap'] = (string) $cap_type + : null; + ($join_type !== null) + ? $this->lineProperties['style']['join'] = (string) $join_type + : null; + ($head_arrow_type !== null) + ? $this->lineProperties['style']['arrow']['head']['type'] = (string) $head_arrow_type + : null; + ($head_arrow_size !== null) + ? $this->lineProperties['style']['arrow']['head']['size'] = (string) $head_arrow_size + : null; + ($end_arrow_type !== null) + ? $this->lineProperties['style']['arrow']['end']['type'] = (string) $end_arrow_type + : null; + ($end_arrow_size !== null) + ? $this->lineProperties['style']['arrow']['end']['size'] = (string) $end_arrow_size + : null; + } + + /** + * Get Line Color Property. + * + * @param string $parameter + * + * @return string + */ + public function getLineColorProperty($parameter) + { + return $this->lineProperties['color'][$parameter]; + } + + /** + * Get Line Style Property. + * + * @param array|string $elements + * + * @return string + */ + public function getLineStyleProperty($elements) + { + return $this->getArrayElementsValue($this->lineProperties['style'], $elements); + } + + /** + * Set Glow Properties. + * + * @param float $size + * @param string $color_value + * @param int $color_alpha + * @param string $color_type + */ + public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null): void + { + $this + ->activateObject() + ->setGlowSize($size) + ->setGlowColor($color_value, $color_alpha, $color_type); + } + + /** + * Get Glow Color Property. + * + * @param string $property + * + * @return string + */ + public function getGlowColor($property) + { + return $this->glowProperties['color'][$property]; + } + + /** + * Get Glow Size. + * + * @return string + */ + public function getGlowSize() + { + return $this->glowProperties['size']; + } + + /** + * Set Glow Size. + * + * @param float $size + * + * @return $this + */ + private function setGlowSize($size) + { + $this->glowProperties['size'] = $this->getExcelPointsWidth((float) $size); + + return $this; + } + + /** + * Set Glow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return $this + */ + private function setGlowColor($color, $alpha, $type) + { + if ($color !== null) { + $this->glowProperties['color']['value'] = (string) $color; + } + if ($alpha !== null) { + $this->glowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); + } + if ($type !== null) { + $this->glowProperties['color']['type'] = (string) $type; + } + + return $this; + } + + /** + * Get Line Style Arrow Parameters. + * + * @param string $arrow_selector + * @param string $property_selector + * + * @return string + */ + public function getLineStyleArrowParameters($arrow_selector, $property_selector) + { + return $this->getLineStyleArrowSize($this->lineProperties['style']['arrow'][$arrow_selector]['size'], $property_selector); + } + + /** + * Set Shadow Properties. + * + * @param int $sh_presets + * @param string $sh_color_value + * @param string $sh_color_type + * @param int $sh_color_alpha + * @param string $sh_blur + * @param int $sh_angle + * @param float $sh_distance + */ + public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null): void + { + $this->activateObject() + ->setShadowPresetsProperties((int) $sh_presets) + ->setShadowColor( + $sh_color_value === null ? $this->shadowProperties['color']['value'] : $sh_color_value, + $sh_color_alpha === null ? (int) $this->shadowProperties['color']['alpha'] : $this->getTrueAlpha($sh_color_alpha), + $sh_color_type === null ? $this->shadowProperties['color']['type'] : $sh_color_type + ) + ->setShadowBlur($sh_blur) + ->setShadowAngle($sh_angle) + ->setShadowDistance($sh_distance); + } + + /** + * Set Shadow Presets Properties. + * + * @param int $shadow_presets + * + * @return $this + */ + private function setShadowPresetsProperties($shadow_presets) + { + $this->shadowProperties['presets'] = $shadow_presets; + $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); + + return $this; + } + + /** + * Set Shadow Properties Values. + * + * @param mixed &$reference + * + * @return $this + */ + private function setShadowProperiesMapValues(array $properties_map, &$reference = null) + { + $base_reference = $reference; + foreach ($properties_map as $property_key => $property_val) { + if (is_array($property_val)) { + if ($reference === null) { + $reference = &$this->shadowProperties[$property_key]; + } else { + $reference = &$reference[$property_key]; + } + $this->setShadowProperiesMapValues($property_val, $reference); + } else { + if ($base_reference === null) { + $this->shadowProperties[$property_key] = $property_val; + } else { + $reference[$property_key] = $property_val; + } + } + } + + return $this; + } + + /** + * Set Shadow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return $this + */ + private function setShadowColor($color, $alpha, $type) + { + if ($color !== null) { + $this->shadowProperties['color']['value'] = (string) $color; + } + if ($alpha !== null) { + $this->shadowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); + } + if ($type !== null) { + $this->shadowProperties['color']['type'] = (string) $type; + } + + return $this; + } + + /** + * Set Shadow Blur. + * + * @param float $blur + * + * @return $this + */ + private function setShadowBlur($blur) + { + if ($blur !== null) { + $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); + } + + return $this; + } + + /** + * Set Shadow Angle. + * + * @param int $angle + * + * @return $this + */ + private function setShadowAngle($angle) + { + if ($angle !== null) { + $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); + } + + return $this; + } + + /** + * Set Shadow Distance. + * + * @param float $distance + * + * @return $this + */ + private function setShadowDistance($distance) + { + if ($distance !== null) { + $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); + } + + return $this; + } + + /** + * Get Shadow Property. + * + * @param string|string[] $elements + * + * @return string + */ + public function getShadowProperty($elements) + { + return $this->getArrayElementsValue($this->shadowProperties, $elements); + } + + /** + * Set Soft Edges Size. + * + * @param float $size + */ + public function setSoftEdgesSize($size): void + { + if ($size !== null) { + $this->activateObject(); + $this->softEdges['size'] = (string) $this->getExcelPointsWidth($size); + } + } + + /** + * Get Soft Edges Size. + * + * @return string + */ + public function getSoftEdgesSize() + { + return $this->softEdges['size']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Layout.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Layout.php new file mode 100755 index 0000000..51c8995 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Layout.php @@ -0,0 +1,481 @@ +layoutTarget = $layout['layoutTarget']; + } + if (isset($layout['xMode'])) { + $this->xMode = $layout['xMode']; + } + if (isset($layout['yMode'])) { + $this->yMode = $layout['yMode']; + } + if (isset($layout['x'])) { + $this->xPos = (float) $layout['x']; + } + if (isset($layout['y'])) { + $this->yPos = (float) $layout['y']; + } + if (isset($layout['w'])) { + $this->width = (float) $layout['w']; + } + if (isset($layout['h'])) { + $this->height = (float) $layout['h']; + } + } + + /** + * Get Layout Target. + * + * @return string + */ + public function getLayoutTarget() + { + return $this->layoutTarget; + } + + /** + * Set Layout Target. + * + * @param string $value + * + * @return $this + */ + public function setLayoutTarget($value) + { + $this->layoutTarget = $value; + + return $this; + } + + /** + * Get X-Mode. + * + * @return string + */ + public function getXMode() + { + return $this->xMode; + } + + /** + * Set X-Mode. + * + * @param string $value + * + * @return $this + */ + public function setXMode($value) + { + $this->xMode = (string) $value; + + return $this; + } + + /** + * Get Y-Mode. + * + * @return string + */ + public function getYMode() + { + return $this->yMode; + } + + /** + * Set Y-Mode. + * + * @param string $value + * + * @return $this + */ + public function setYMode($value) + { + $this->yMode = (string) $value; + + return $this; + } + + /** + * Get X-Position. + * + * @return number + */ + public function getXPosition() + { + return $this->xPos; + } + + /** + * Set X-Position. + * + * @param float $value + * + * @return $this + */ + public function setXPosition($value) + { + $this->xPos = (float) $value; + + return $this; + } + + /** + * Get Y-Position. + * + * @return number + */ + public function getYPosition() + { + return $this->yPos; + } + + /** + * Set Y-Position. + * + * @param float $value + * + * @return $this + */ + public function setYPosition($value) + { + $this->yPos = (float) $value; + + return $this; + } + + /** + * Get Width. + * + * @return number + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param float $value + * + * @return $this + */ + public function setWidth($value) + { + $this->width = $value; + + return $this; + } + + /** + * Get Height. + * + * @return number + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set Height. + * + * @param float $value + * + * @return $this + */ + public function setHeight($value) + { + $this->height = $value; + + return $this; + } + + /** + * Get show legend key. + * + * @return bool + */ + public function getShowLegendKey() + { + return $this->showLegendKey; + } + + /** + * Set show legend key + * Specifies that legend keys should be shown in data labels. + * + * @param bool $value Show legend key + * + * @return $this + */ + public function setShowLegendKey($value) + { + $this->showLegendKey = $value; + + return $this; + } + + /** + * Get show value. + * + * @return bool + */ + public function getShowVal() + { + return $this->showVal; + } + + /** + * Set show val + * Specifies that the value should be shown in data labels. + * + * @param bool $value Show val + * + * @return $this + */ + public function setShowVal($value) + { + $this->showVal = $value; + + return $this; + } + + /** + * Get show category name. + * + * @return bool + */ + public function getShowCatName() + { + return $this->showCatName; + } + + /** + * Set show cat name + * Specifies that the category name should be shown in data labels. + * + * @param bool $value Show cat name + * + * @return $this + */ + public function setShowCatName($value) + { + $this->showCatName = $value; + + return $this; + } + + /** + * Get show data series name. + * + * @return bool + */ + public function getShowSerName() + { + return $this->showSerName; + } + + /** + * Set show ser name + * Specifies that the series name should be shown in data labels. + * + * @param bool $value Show series name + * + * @return $this + */ + public function setShowSerName($value) + { + $this->showSerName = $value; + + return $this; + } + + /** + * Get show percentage. + * + * @return bool + */ + public function getShowPercent() + { + return $this->showPercent; + } + + /** + * Set show percentage + * Specifies that the percentage should be shown in data labels. + * + * @param bool $value Show percentage + * + * @return $this + */ + public function setShowPercent($value) + { + $this->showPercent = $value; + + return $this; + } + + /** + * Get show bubble size. + * + * @return bool + */ + public function getShowBubbleSize() + { + return $this->showBubbleSize; + } + + /** + * Set show bubble size + * Specifies that the bubble size should be shown in data labels. + * + * @param bool $value Show bubble size + * + * @return $this + */ + public function setShowBubbleSize($value) + { + $this->showBubbleSize = $value; + + return $this; + } + + /** + * Get show leader lines. + * + * @return bool + */ + public function getShowLeaderLines() + { + return $this->showLeaderLines; + } + + /** + * Set show leader lines + * Specifies that leader lines should be shown in data labels. + * + * @param bool $value Show leader lines + * + * @return $this + */ + public function setShowLeaderLines($value) + { + $this->showLeaderLines = $value; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Legend.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Legend.php new file mode 100755 index 0000000..fc0ed14 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Legend.php @@ -0,0 +1,157 @@ + self::POSITION_BOTTOM, + self::XL_LEGEND_POSITION_CORNER => self::POSITION_TOPRIGHT, + self::XL_LEGEND_POSITION_CUSTOM => '??', + self::XL_LEGEND_POSITION_LEFT => self::POSITION_LEFT, + self::XL_LEGEND_POSITION_RIGHT => self::POSITION_RIGHT, + self::XL_LEGEND_POSITION_TOP => self::POSITION_TOP, + ]; + + /** + * Legend position. + * + * @var string + */ + private $position = self::POSITION_RIGHT; + + /** + * Allow overlay of other elements? + * + * @var bool + */ + private $overlay = true; + + /** + * Legend Layout. + * + * @var Layout + */ + private $layout; + + /** + * Create a new Legend. + * + * @param string $position + * @param bool $overlay + */ + public function __construct($position = self::POSITION_RIGHT, ?Layout $layout = null, $overlay = false) + { + $this->setPosition($position); + $this->layout = $layout; + $this->setOverlay($overlay); + } + + /** + * Get legend position as an excel string value. + * + * @return string + */ + public function getPosition() + { + return $this->position; + } + + /** + * Get legend position using an excel string value. + * + * @param string $position see self::POSITION_* + * + * @return bool + */ + public function setPosition($position) + { + if (!in_array($position, self::$positionXLref)) { + return false; + } + + $this->position = $position; + + return true; + } + + /** + * Get legend position as an Excel internal numeric value. + * + * @return int + */ + public function getPositionXL() + { + return array_search($this->position, self::$positionXLref); + } + + /** + * Set legend position using an Excel internal numeric value. + * + * @param int $positionXL see self::XL_LEGEND_POSITION_* + * + * @return bool + */ + public function setPositionXL($positionXL) + { + if (!isset(self::$positionXLref[$positionXL])) { + return false; + } + + $this->position = self::$positionXLref[$positionXL]; + + return true; + } + + /** + * Get allow overlay of other elements? + * + * @return bool + */ + public function getOverlay() + { + return $this->overlay; + } + + /** + * Set allow overlay of other elements? + * + * @param bool $overlay + * + * @return bool + */ + public function setOverlay($overlay) + { + if (!is_bool($overlay)) { + return false; + } + + $this->overlay = $overlay; + + return true; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/PlotArea.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/PlotArea.php new file mode 100755 index 0000000..954777c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/PlotArea.php @@ -0,0 +1,111 @@ +layout = $layout; + $this->plotSeries = $plotSeries; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } + + /** + * Get Number of Plot Groups. + * + * @return array of DataSeries + */ + public function getPlotGroupCount() + { + return count($this->plotSeries); + } + + /** + * Get Number of Plot Series. + * + * @return int + */ + public function getPlotSeriesCount() + { + $seriesCount = 0; + foreach ($this->plotSeries as $plot) { + $seriesCount += $plot->getPlotSeriesCount(); + } + + return $seriesCount; + } + + /** + * Get Plot Series. + * + * @return array of DataSeries + */ + public function getPlotGroup() + { + return $this->plotSeries; + } + + /** + * Get Plot Series by Index. + * + * @param mixed $index + * + * @return DataSeries + */ + public function getPlotGroupByIndex($index) + { + return $this->plotSeries[$index]; + } + + /** + * Set Plot Series. + * + * @param DataSeries[] $plotSeries + * + * @return $this + */ + public function setPlotSeries(array $plotSeries) + { + $this->plotSeries = $plotSeries; + + return $this; + } + + public function refresh(Worksheet $worksheet): void + { + foreach ($this->plotSeries as $plotSeries) { + $plotSeries->refresh($worksheet); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Properties.php new file mode 100755 index 0000000..98095f0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Properties.php @@ -0,0 +1,369 @@ + (string) $type, + 'value' => (string) $color, + 'alpha' => (string) $this->getTrueAlpha($alpha), + ]; + } + + protected function getLineStyleArrowSize($array_selector, $array_kay_selector) + { + $sizes = [ + 1 => ['w' => 'sm', 'len' => 'sm'], + 2 => ['w' => 'sm', 'len' => 'med'], + 3 => ['w' => 'sm', 'len' => 'lg'], + 4 => ['w' => 'med', 'len' => 'sm'], + 5 => ['w' => 'med', 'len' => 'med'], + 6 => ['w' => 'med', 'len' => 'lg'], + 7 => ['w' => 'lg', 'len' => 'sm'], + 8 => ['w' => 'lg', 'len' => 'med'], + 9 => ['w' => 'lg', 'len' => 'lg'], + ]; + + return $sizes[$array_selector][$array_kay_selector]; + } + + protected function getShadowPresetsMap($shadow_presets_option) + { + $presets_options = [ + //OUTER + 1 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '2700000', + 'algn' => 'tl', + 'rotWithShape' => '0', + ], + 2 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '5400000', + 'algn' => 't', + 'rotWithShape' => '0', + ], + 3 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '8100000', + 'algn' => 'tr', + 'rotWithShape' => '0', + ], + 4 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'algn' => 'l', + 'rotWithShape' => '0', + ], + 5 => [ + 'effect' => 'outerShdw', + 'size' => [ + 'sx' => '102000', + 'sy' => '102000', + ], + 'blur' => '63500', + 'distance' => '38100', + 'algn' => 'ctr', + 'rotWithShape' => '0', + ], + 6 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '10800000', + 'algn' => 'r', + 'rotWithShape' => '0', + ], + 7 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '18900000', + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 8 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '16200000', + 'rotWithShape' => '0', + ], + 9 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '13500000', + 'algn' => 'br', + 'rotWithShape' => '0', + ], + //INNER + 10 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '2700000', + ], + 11 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '5400000', + ], + 12 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '8100000', + ], + 13 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + ], + 14 => [ + 'effect' => 'innerShdw', + 'blur' => '114300', + ], + 15 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '10800000', + ], + 16 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '18900000', + ], + 17 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '16200000', + ], + 18 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '13500000', + ], + //perspective + 19 => [ + 'effect' => 'outerShdw', + 'blur' => '152400', + 'distance' => '317500', + 'size' => [ + 'sx' => '90000', + 'sy' => '-19000', + ], + 'direction' => '5400000', + 'rotWithShape' => '0', + ], + 20 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'direction' => '18900000', + 'size' => [ + 'sy' => '23000', + 'kx' => '-1200000', + ], + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 21 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'direction' => '13500000', + 'size' => [ + 'sy' => '23000', + 'kx' => '1200000', + ], + 'algn' => 'br', + 'rotWithShape' => '0', + ], + 22 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'distance' => '12700', + 'direction' => '2700000', + 'size' => [ + 'sy' => '-23000', + 'kx' => '-800400', + ], + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 23 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'distance' => '12700', + 'direction' => '8100000', + 'size' => [ + 'sy' => '-23000', + 'kx' => '800400', + ], + 'algn' => 'br', + 'rotWithShape' => '0', + ], + ]; + + return $presets_options[$shadow_presets_option]; + } + + protected function getArrayElementsValue($properties, $elements) + { + $reference = &$properties; + if (!is_array($elements)) { + return $reference[$elements]; + } + + foreach ($elements as $keys) { + $reference = &$reference[$keys]; + } + + return $reference; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/IRenderer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/IRenderer.php new file mode 100755 index 0000000..3032f6b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/IRenderer.php @@ -0,0 +1,22 @@ +graph = null; + $this->chart = $chart; + } + + private static function init(): void + { + static $loaded = false; + if ($loaded) { + return; + } + + \JpGraph\JpGraph::load(); + \JpGraph\JpGraph::module('bar'); + \JpGraph\JpGraph::module('contour'); + \JpGraph\JpGraph::module('line'); + \JpGraph\JpGraph::module('pie'); + \JpGraph\JpGraph::module('pie3d'); + \JpGraph\JpGraph::module('radar'); + \JpGraph\JpGraph::module('regstat'); + \JpGraph\JpGraph::module('scatter'); + \JpGraph\JpGraph::module('stock'); + + self::$markSet = [ + 'diamond' => MARK_DIAMOND, + 'square' => MARK_SQUARE, + 'triangle' => MARK_UTRIANGLE, + 'x' => MARK_X, + 'star' => MARK_STAR, + 'dot' => MARK_FILLEDCIRCLE, + 'dash' => MARK_DTRIANGLE, + 'circle' => MARK_CIRCLE, + 'plus' => MARK_CROSS, + ]; + + $loaded = true; + } + + private function formatPointMarker($seriesPlot, $markerID) + { + $plotMarkKeys = array_keys(self::$markSet); + if ($markerID === null) { + // Use default plot marker (next marker in the series) + self::$plotMark %= count(self::$markSet); + $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); + } elseif ($markerID !== 'none') { + // Use specified plot marker (if it exists) + if (isset(self::$markSet[$markerID])) { + $seriesPlot->mark->SetType(self::$markSet[$markerID]); + } else { + // If the specified plot marker doesn't exist, use default plot marker (next marker in the series) + self::$plotMark %= count(self::$markSet); + $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); + } + } else { + // Hide plot marker + $seriesPlot->mark->Hide(); + } + $seriesPlot->mark->SetColor(self::$colourSet[self::$plotColour]); + $seriesPlot->mark->SetFillColor(self::$colourSet[self::$plotColour]); + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + + return $seriesPlot; + } + + private function formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation = '') + { + $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode(); + if ($datasetLabelFormatCode !== null) { + // Retrieve any label formatting code + $datasetLabelFormatCode = stripslashes($datasetLabelFormatCode); + } + + $testCurrentIndex = 0; + foreach ($datasetLabels as $i => $datasetLabel) { + if (is_array($datasetLabel)) { + if ($rotation == 'bar') { + $datasetLabels[$i] = implode(' ', $datasetLabel); + } else { + $datasetLabel = array_reverse($datasetLabel); + $datasetLabels[$i] = implode("\n", $datasetLabel); + } + } else { + // Format labels according to any formatting code + if ($datasetLabelFormatCode !== null) { + $datasetLabels[$i] = NumberFormat::toFormattedString($datasetLabel, $datasetLabelFormatCode); + } + } + ++$testCurrentIndex; + } + + return $datasetLabels; + } + + private function percentageSumCalculation($groupID, $seriesCount) + { + $sumValues = []; + // Adjust our values to a percentage value across all series in the group + for ($i = 0; $i < $seriesCount; ++$i) { + if ($i == 0) { + $sumValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + } else { + $nextValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + foreach ($nextValues as $k => $value) { + if (isset($sumValues[$k])) { + $sumValues[$k] += $value; + } else { + $sumValues[$k] = $value; + } + } + } + } + + return $sumValues; + } + + private function percentageAdjustValues($dataValues, $sumValues) + { + foreach ($dataValues as $k => $dataValue) { + $dataValues[$k] = $dataValue / $sumValues[$k] * 100; + } + + return $dataValues; + } + + private function getCaption($captionElement) + { + // Read any caption + $caption = ($captionElement !== null) ? $captionElement->getCaption() : null; + // Test if we have a title caption to display + if ($caption !== null) { + // If we do, it could be a plain string or an array + if (is_array($caption)) { + // Implode an array to a plain string + $caption = implode('', $caption); + } + } + + return $caption; + } + + private function renderTitle(): void + { + $title = $this->getCaption($this->chart->getTitle()); + if ($title !== null) { + $this->graph->title->Set($title); + } + } + + private function renderLegend(): void + { + $legend = $this->chart->getLegend(); + if ($legend !== null) { + $legendPosition = $legend->getPosition(); + switch ($legendPosition) { + case 'r': + $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right + $this->graph->legend->SetColumns(1); + + break; + case 'l': + $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left + $this->graph->legend->SetColumns(1); + + break; + case 't': + $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top + + break; + case 'b': + $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom + + break; + default: + $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right + $this->graph->legend->SetColumns(1); + + break; + } + } else { + $this->graph->legend->Hide(); + } + } + + private function renderCartesianPlotArea($type = 'textlin'): void + { + $this->graph = new Graph(self::$width, self::$height); + $this->graph->SetScale($type); + + $this->renderTitle(); + + // Rotate for bar rather than column chart + $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotDirection(); + $reverse = $rotation == 'bar'; + + $xAxisLabel = $this->chart->getXAxisLabel(); + if ($xAxisLabel !== null) { + $title = $this->getCaption($xAxisLabel); + if ($title !== null) { + $this->graph->xaxis->SetTitle($title, 'center'); + $this->graph->xaxis->title->SetMargin(35); + if ($reverse) { + $this->graph->xaxis->title->SetAngle(90); + $this->graph->xaxis->title->SetMargin(90); + } + } + } + + $yAxisLabel = $this->chart->getYAxisLabel(); + if ($yAxisLabel !== null) { + $title = $this->getCaption($yAxisLabel); + if ($title !== null) { + $this->graph->yaxis->SetTitle($title, 'center'); + if ($reverse) { + $this->graph->yaxis->title->SetAngle(0); + $this->graph->yaxis->title->SetMargin(-55); + } + } + } + } + + private function renderPiePlotArea(): void + { + $this->graph = new PieGraph(self::$width, self::$height); + + $this->renderTitle(); + } + + private function renderRadarPlotArea(): void + { + $this->graph = new RadarGraph(self::$width, self::$height); + $this->graph->SetScale('lin'); + + $this->renderTitle(); + } + + private function renderPlotLine($groupID, $filled = false, $combination = false, $dimensions = '2d'): void + { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + if ($grouping == 'percentStacked') { + $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); + } + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + + if ($grouping == 'percentStacked') { + $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); + } + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + $seriesPlot = new LinePlot($dataValues); + if ($combination) { + $seriesPlot->SetBarCenter(); + } + + if ($filled) { + $seriesPlot->SetFilled(true); + $seriesPlot->SetColor('black'); + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); + } else { + // Set the appropriate plot marker + $this->formatPointMarker($seriesPlot, $marker); + } + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetLegend($dataLabel); + + $seriesPlots[] = $seriesPlot; + } + + if ($grouping == 'standard') { + $groupPlot = $seriesPlots; + } else { + $groupPlot = new AccLinePlot($seriesPlots); + } + $this->graph->Add($groupPlot); + } + + private function renderPlotBar($groupID, $dimensions = '2d'): void + { + $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection(); + // Rotate for bar rather than column chart + if (($groupID == 0) && ($rotation == 'bar')) { + $this->graph->Set90AndMargin(); + } + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation); + // Rotate for bar rather than column chart + if ($rotation == 'bar') { + $datasetLabels = array_reverse($datasetLabels); + $this->graph->yaxis->SetPos('max'); + $this->graph->yaxis->SetLabelAlign('center', 'top'); + $this->graph->yaxis->SetLabelSide(SIDE_RIGHT); + } + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + if ($grouping == 'percentStacked') { + $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); + } + + // Loop through each data series in turn + for ($j = 0; $j < $seriesCount; ++$j) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); + if ($grouping == 'percentStacked') { + $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); + } + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + // Reverse the $dataValues order for bar rather than column chart + if ($rotation == 'bar') { + $dataValues = array_reverse($dataValues); + } + $seriesPlot = new BarPlot($dataValues); + $seriesPlot->SetColor('black'); + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); + if ($dimensions == '3d') { + $seriesPlot->SetShadow(); + } + if (!$this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)) { + $dataLabel = ''; + } else { + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)->getDataValue(); + } + $seriesPlot->SetLegend($dataLabel); + + $seriesPlots[] = $seriesPlot; + } + // Reverse the plot order for bar rather than column chart + if (($rotation == 'bar') && ($grouping != 'percentStacked')) { + $seriesPlots = array_reverse($seriesPlots); + } + + if ($grouping == 'clustered') { + $groupPlot = new GroupBarPlot($seriesPlots); + } elseif ($grouping == 'standard') { + $groupPlot = new GroupBarPlot($seriesPlots); + } else { + $groupPlot = new AccBarPlot($seriesPlots); + if ($dimensions == '3d') { + $groupPlot->SetShadow(); + } + } + + $this->graph->Add($groupPlot); + } + + private function renderPlotScatter($groupID, $bubble): void + { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + $scatterStyle = $bubbleSize = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + + foreach ($dataValuesY as $k => $dataValueY) { + $dataValuesY[$k] = $k; + } + + $seriesPlot = new ScatterPlot($dataValuesX, $dataValuesY); + if ($scatterStyle == 'lineMarker') { + $seriesPlot->SetLinkPoints(); + $seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]); + } elseif ($scatterStyle == 'smoothMarker') { + $spline = new Spline($dataValuesY, $dataValuesX); + [$splineDataY, $splineDataX] = $spline->Get(count($dataValuesX) * self::$width / 20); + $lplot = new LinePlot($splineDataX, $splineDataY); + $lplot->SetColor(self::$colourSet[self::$plotColour]); + + $this->graph->Add($lplot); + } + + if ($bubble) { + $this->formatPointMarker($seriesPlot, 'dot'); + $seriesPlot->mark->SetColor('black'); + $seriesPlot->mark->SetSize($bubbleSize); + } else { + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + $this->formatPointMarker($seriesPlot, $marker); + } + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetLegend($dataLabel); + + $this->graph->Add($seriesPlot); + } + } + + private function renderPlotRadar($groupID): void + { + $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + + $dataValues = []; + foreach ($dataValuesY as $k => $dataValueY) { + $dataValues[$k] = implode(' ', array_reverse($dataValueY)); + } + $tmp = array_shift($dataValues); + $dataValues[] = $tmp; + $tmp = array_shift($dataValuesX); + $dataValuesX[] = $tmp; + + $this->graph->SetTitles(array_reverse($dataValues)); + + $seriesPlot = new RadarPlot(array_reverse($dataValuesX)); + + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + if ($radarStyle == 'filled') { + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour]); + } + $this->formatPointMarker($seriesPlot, $marker); + $seriesPlot->SetLegend($dataLabel); + + $this->graph->Add($seriesPlot); + } + } + + private function renderPlotContour($groupID): void + { + $contourStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + $dataValues = []; + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + + $dataValues[$i] = $dataValuesX; + } + $seriesPlot = new ContourPlot($dataValues); + + $this->graph->Add($seriesPlot); + } + + private function renderPlotStock($groupID): void + { + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $plotOrder = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder(); + + $dataValues = []; + // Loop through each data series in turn and build the plot arrays + foreach ($plotOrder as $i => $v) { + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v)->getDataValues(); + foreach ($dataValuesX as $j => $dataValueX) { + $dataValues[$plotOrder[$i]][$j] = $dataValueX; + } + } + if (empty($dataValues)) { + return; + } + + $dataValuesPlot = []; + // Flatten the plot arrays to a single dimensional array to work with jpgraph + $jMax = count($dataValues[0]); + for ($j = 0; $j < $jMax; ++$j) { + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesPlot[] = $dataValues[$i][$j]; + } + } + + // Set the x-axis labels + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesPlot = new StockPlot($dataValuesPlot); + $seriesPlot->SetWidth(20); + + $this->graph->Add($seriesPlot); + } + + private function renderAreaChart($groupCount, $dimensions = '2d'): void + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotLine($i, true, false, $dimensions); + } + } + + private function renderLineChart($groupCount, $dimensions = '2d'): void + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotLine($i, false, false, $dimensions); + } + } + + private function renderBarChart($groupCount, $dimensions = '2d'): void + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotBar($i, $dimensions); + } + } + + private function renderScatterChart($groupCount): void + { + $this->renderCartesianPlotArea('linlin'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotScatter($i, false); + } + } + + private function renderBubbleChart($groupCount): void + { + $this->renderCartesianPlotArea('linlin'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotScatter($i, true); + } + } + + private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false): void + { + $this->renderPiePlotArea(); + + $iLimit = ($multiplePlots) ? $groupCount : 1; + for ($groupID = 0; $groupID < $iLimit; ++$groupID) { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + $exploded = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + $datasetLabels = []; + if ($groupID == 0) { + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + } + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + // For pie charts, we only display the first series: doughnut charts generally display all series + $jLimit = ($multiplePlots) ? $seriesCount : 1; + // Loop through each data series in turn + for ($j = 0; $j < $jLimit; ++$j) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + if ($dimensions == '3d') { + $seriesPlot = new PiePlot3D($dataValues); + } else { + if ($doughnut) { + $seriesPlot = new PiePlotC($dataValues); + } else { + $seriesPlot = new PiePlot($dataValues); + } + } + + if ($multiplePlots) { + $seriesPlot->SetSize(($jLimit - $j) / ($jLimit * 4)); + } + + if ($doughnut) { + $seriesPlot->SetMidColor('white'); + } + + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + if (count($datasetLabels) > 0) { + $seriesPlot->SetLabels(array_fill(0, count($datasetLabels), '')); + } + if ($dimensions != '3d') { + $seriesPlot->SetGuideLines(false); + } + if ($j == 0) { + if ($exploded) { + $seriesPlot->ExplodeAll(); + } + $seriesPlot->SetLegends($datasetLabels); + } + + $this->graph->Add($seriesPlot); + } + } + } + + private function renderRadarChart($groupCount): void + { + $this->renderRadarPlotArea(); + + for ($groupID = 0; $groupID < $groupCount; ++$groupID) { + $this->renderPlotRadar($groupID); + } + } + + private function renderStockChart($groupCount): void + { + $this->renderCartesianPlotArea('intint'); + + for ($groupID = 0; $groupID < $groupCount; ++$groupID) { + $this->renderPlotStock($groupID); + } + } + + private function renderContourChart($groupCount, $dimensions): void + { + $this->renderCartesianPlotArea('intint'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotContour($i); + } + } + + private function renderCombinationChart($groupCount, $dimensions, $outputDestination) + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $dimensions = null; + $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); + switch ($chartType) { + case 'area3DChart': + $dimensions = '3d'; + // no break + case 'areaChart': + $this->renderPlotLine($i, true, true, $dimensions); + + break; + case 'bar3DChart': + $dimensions = '3d'; + // no break + case 'barChart': + $this->renderPlotBar($i, $dimensions); + + break; + case 'line3DChart': + $dimensions = '3d'; + // no break + case 'lineChart': + $this->renderPlotLine($i, false, true, $dimensions); + + break; + case 'scatterChart': + $this->renderPlotScatter($i, false); + + break; + case 'bubbleChart': + $this->renderPlotScatter($i, true); + + break; + default: + $this->graph = null; + + return false; + } + } + + $this->renderLegend(); + + $this->graph->Stroke($outputDestination); + + return true; + } + + public function render($outputDestination) + { + self::$plotColour = 0; + + $groupCount = $this->chart->getPlotArea()->getPlotGroupCount(); + + $dimensions = null; + if ($groupCount == 1) { + $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); + } else { + $chartTypes = []; + for ($i = 0; $i < $groupCount; ++$i) { + $chartTypes[] = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); + } + $chartTypes = array_unique($chartTypes); + if (count($chartTypes) == 1) { + $chartType = array_pop($chartTypes); + } elseif (count($chartTypes) == 0) { + echo 'Chart is not yet implemented
'; + + return false; + } else { + return $this->renderCombinationChart($groupCount, $dimensions, $outputDestination); + } + } + + switch ($chartType) { + case 'area3DChart': + $dimensions = '3d'; + // no break + case 'areaChart': + $this->renderAreaChart($groupCount, $dimensions); + + break; + case 'bar3DChart': + $dimensions = '3d'; + // no break + case 'barChart': + $this->renderBarChart($groupCount, $dimensions); + + break; + case 'line3DChart': + $dimensions = '3d'; + // no break + case 'lineChart': + $this->renderLineChart($groupCount, $dimensions); + + break; + case 'pie3DChart': + $dimensions = '3d'; + // no break + case 'pieChart': + $this->renderPieChart($groupCount, $dimensions, false, false); + + break; + case 'doughnut3DChart': + $dimensions = '3d'; + // no break + case 'doughnutChart': + $this->renderPieChart($groupCount, $dimensions, true, true); + + break; + case 'scatterChart': + $this->renderScatterChart($groupCount); + + break; + case 'bubbleChart': + $this->renderBubbleChart($groupCount); + + break; + case 'radarChart': + $this->renderRadarChart($groupCount); + + break; + case 'surface3DChart': + $dimensions = '3d'; + // no break + case 'surfaceChart': + $this->renderContourChart($groupCount, $dimensions); + + break; + case 'stockChart': + $this->renderStockChart($groupCount); + + break; + default: + echo $chartType . ' is not yet implemented
'; + + return false; + } + $this->renderLegend(); + + $this->graph->Stroke($outputDestination); + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt new file mode 100755 index 0000000..4abab7a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt @@ -0,0 +1,20 @@ +ChartDirector + https://www.advsofteng.com/cdphp.html + +GraPHPite + http://graphpite.sourceforge.net/ + +JpGraph + http://www.aditus.nu/jpgraph/ + +LibChart + https://naku.dohcrew.com/libchart/pages/introduction/ + +pChart + http://pchart.sourceforge.net/ + +TeeChart + https://www.steema.com/ + +PHPGraphLib + http://www.ebrueggeman.com/phpgraphlib \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Title.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Title.php new file mode 100755 index 0000000..af9fa08 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Chart/Title.php @@ -0,0 +1,65 @@ +caption = $caption; + $this->layout = $layout; + } + + /** + * Get caption. + * + * @return string + */ + public function getCaption() + { + return $this->caption; + } + + /** + * Set caption. + * + * @param string $caption + * + * @return $this + */ + public function setCaption($caption) + { + $this->caption = $caption; + + return $this; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/Cells.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/Cells.php new file mode 100755 index 0000000..48f34f4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/Cells.php @@ -0,0 +1,498 @@ +parent = $parent; + $this->cache = $cache; + $this->cachePrefix = $this->getUniqueID(); + } + + /** + * Return the parent worksheet for this cell collection. + * + * @return Worksheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Whether the collection holds a cell for the given coordinate. + * + * @param string $pCoord Coordinate of the cell to check + * + * @return bool + */ + public function has($pCoord) + { + if ($pCoord === $this->currentCoordinate) { + return true; + } + + // Check if the requested entry exists in the index + return isset($this->index[$pCoord]); + } + + /** + * Add or update a cell in the collection. + * + * @param Cell $cell Cell to update + * + * @return Cell + */ + public function update(Cell $cell) + { + return $this->add($cell->getCoordinate(), $cell); + } + + /** + * Delete a cell in cache identified by coordinate. + * + * @param string $pCoord Coordinate of the cell to delete + */ + public function delete($pCoord): void + { + if ($pCoord === $this->currentCoordinate && $this->currentCell !== null) { + $this->currentCell->detach(); + $this->currentCoordinate = null; + $this->currentCell = null; + $this->currentCellIsDirty = false; + } + + unset($this->index[$pCoord]); + + // Delete the entry from cache + $this->cache->delete($this->cachePrefix . $pCoord); + } + + /** + * Get a list of all cell coordinates currently held in the collection. + * + * @return string[] + */ + public function getCoordinates() + { + return array_keys($this->index); + } + + /** + * Get a sorted list of all cell coordinates currently held in the collection by row and column. + * + * @return string[] + */ + public function getSortedCoordinates() + { + $sortKeys = []; + foreach ($this->getCoordinates() as $coord) { + $column = ''; + $row = 0; + sscanf($coord, '%[A-Z]%d', $column, $row); + $sortKeys[sprintf('%09d%3s', $row, $column)] = $coord; + } + ksort($sortKeys); + + return array_values($sortKeys); + } + + /** + * Get highest worksheet column and highest row that have cell records. + * + * @return array Highest column name and highest row number + */ + public function getHighestRowAndColumn() + { + // Lookup highest column and highest row + $col = ['A' => '1A']; + $row = [1]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + sscanf($coord, '%[A-Z]%d', $c, $r); + $row[$r] = $r; + $col[$c] = strlen($c) . $c; + } + + // Determine highest column and row + $highestRow = max($row); + $highestColumn = substr(max($col), 1); + + return [ + 'row' => $highestRow, + 'column' => $highestColumn, + ]; + } + + /** + * Return the cell coordinate of the currently active cell object. + * + * @return string + */ + public function getCurrentCoordinate() + { + return $this->currentCoordinate; + } + + /** + * Return the column coordinate of the currently active cell object. + * + * @return string + */ + public function getCurrentColumn() + { + $column = ''; + $row = 0; + + sscanf($this->currentCoordinate, '%[A-Z]%d', $column, $row); + + return $column; + } + + /** + * Return the row coordinate of the currently active cell object. + * + * @return int + */ + public function getCurrentRow() + { + $column = ''; + $row = 0; + + sscanf($this->currentCoordinate, '%[A-Z]%d', $column, $row); + + return (int) $row; + } + + /** + * Get highest worksheet column. + * + * @param string $row Return the highest column for the specified row, + * or the highest column of any row if no row number is passed + * + * @return string Highest column name + */ + public function getHighestColumn($row = null) + { + if ($row === null) { + $colRow = $this->getHighestRowAndColumn(); + + return $colRow['column']; + } + + $columnList = [1]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($r != $row) { + continue; + } + $columnList[] = Coordinate::columnIndexFromString($c); + } + + return Coordinate::stringFromColumnIndex(max($columnList)); + } + + /** + * Get highest worksheet row. + * + * @param string $column Return the highest row for the specified column, + * or the highest row of any column if no column letter is passed + * + * @return int Highest row number + */ + public function getHighestRow($column = null) + { + if ($column === null) { + $colRow = $this->getHighestRowAndColumn(); + + return $colRow['row']; + } + + $rowList = [0]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($c != $column) { + continue; + } + $rowList[] = $r; + } + + return max($rowList); + } + + /** + * Generate a unique ID for cache referencing. + * + * @return string Unique Reference + */ + private function getUniqueID() + { + return uniqid('phpspreadsheet.', true) . '.'; + } + + /** + * Clone the cell collection. + * + * @param Worksheet $parent The new worksheet that we're copying to + * + * @return self + */ + public function cloneCellCollection(Worksheet $parent) + { + $this->storeCurrentCell(); + $newCollection = clone $this; + + $newCollection->parent = $parent; + if (($newCollection->currentCell !== null) && (is_object($newCollection->currentCell))) { + $newCollection->currentCell->attach($this); + } + + // Get old values + $oldKeys = $newCollection->getAllCacheKeys(); + $oldValues = $newCollection->cache->getMultiple($oldKeys); + $newValues = []; + $oldCachePrefix = $newCollection->cachePrefix; + + // Change prefix + $newCollection->cachePrefix = $newCollection->getUniqueID(); + foreach ($oldValues as $oldKey => $value) { + $newValues[str_replace($oldCachePrefix, $newCollection->cachePrefix, $oldKey)] = clone $value; + } + + // Store new values + $stored = $newCollection->cache->setMultiple($newValues); + if (!$stored) { + $newCollection->__destruct(); + + throw new PhpSpreadsheetException('Failed to copy cells in cache'); + } + + return $newCollection; + } + + /** + * Remove a row, deleting all cells in that row. + * + * @param string $row Row number to remove + */ + public function removeRow($row): void + { + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($r == $row) { + $this->delete($coord); + } + } + } + + /** + * Remove a column, deleting all cells in that column. + * + * @param string $column Column ID to remove + */ + public function removeColumn($column): void + { + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($c == $column) { + $this->delete($coord); + } + } + } + + /** + * Store cell data in cache for the current cell object if it's "dirty", + * and the 'nullify' the current cell object. + */ + private function storeCurrentCell(): void + { + if ($this->currentCellIsDirty && !empty($this->currentCoordinate)) { + $this->currentCell->detach(); + + $stored = $this->cache->set($this->cachePrefix . $this->currentCoordinate, $this->currentCell); + if (!$stored) { + $this->__destruct(); + + throw new PhpSpreadsheetException("Failed to store cell {$this->currentCoordinate} in cache"); + } + $this->currentCellIsDirty = false; + } + + $this->currentCoordinate = null; + $this->currentCell = null; + } + + /** + * Add or update a cell identified by its coordinate into the collection. + * + * @param string $pCoord Coordinate of the cell to update + * @param Cell $cell Cell to update + * + * @return \PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function add($pCoord, Cell $cell) + { + if ($pCoord !== $this->currentCoordinate) { + $this->storeCurrentCell(); + } + $this->index[$pCoord] = true; + + $this->currentCoordinate = $pCoord; + $this->currentCell = $cell; + $this->currentCellIsDirty = true; + + return $cell; + } + + /** + * Get cell at a specific coordinate. + * + * @param string $pCoord Coordinate of the cell + * + * @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell Cell that was found, or null if not found + */ + public function get($pCoord) + { + if ($pCoord === $this->currentCoordinate) { + return $this->currentCell; + } + $this->storeCurrentCell(); + + // Return null if requested entry doesn't exist in collection + if (!$this->has($pCoord)) { + return null; + } + + // Check if the entry that has been requested actually exists + $cell = $this->cache->get($this->cachePrefix . $pCoord); + if ($cell === null) { + throw new PhpSpreadsheetException("Cell entry {$pCoord} no longer exists in cache. This probably means that the cache was cleared by someone else."); + } + + // Set current entry to the requested entry + $this->currentCoordinate = $pCoord; + $this->currentCell = $cell; + // Re-attach this as the cell's parent + $this->currentCell->attach($this); + + // Return requested entry + return $this->currentCell; + } + + /** + * Clear the cell collection and disconnect from our parent. + */ + public function unsetWorksheetCells(): void + { + if ($this->currentCell !== null) { + $this->currentCell->detach(); + $this->currentCell = null; + $this->currentCoordinate = null; + } + + // Flush the cache + $this->__destruct(); + + $this->index = []; + + // detach ourself from the worksheet, so that it can then delete this object successfully + $this->parent = null; + } + + /** + * Destroy this cell collection. + */ + public function __destruct() + { + $this->cache->deleteMultiple($this->getAllCacheKeys()); + } + + /** + * Returns all known cache keys. + * + * @return Generator|string[] + */ + private function getAllCacheKeys() + { + foreach ($this->getCoordinates() as $coordinate) { + yield $this->cachePrefix . $coordinate; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/CellsFactory.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/CellsFactory.php new file mode 100755 index 0000000..7f34c23 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Collection/CellsFactory.php @@ -0,0 +1,21 @@ +cache = []; + + return true; + } + + public function delete($key) + { + unset($this->cache[$key]); + + return true; + } + + public function deleteMultiple($keys) + { + foreach ($keys as $key) { + $this->delete($key); + } + + return true; + } + + public function get($key, $default = null) + { + if ($this->has($key)) { + return $this->cache[$key]; + } + + return $default; + } + + public function getMultiple($keys, $default = null) + { + $results = []; + foreach ($keys as $key) { + $results[$key] = $this->get($key, $default); + } + + return $results; + } + + public function has($key) + { + return array_key_exists($key, $this->cache); + } + + public function set($key, $value, $ttl = null) + { + $this->cache[$key] = $value; + + return true; + } + + public function setMultiple($values, $ttl = null) + { + foreach ($values as $key => $value) { + $this->set($key, $value); + } + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Comment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Comment.php new file mode 100755 index 0000000..31f7664 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Comment.php @@ -0,0 +1,329 @@ +author = 'Author'; + $this->text = new RichText(); + $this->fillColor = new Style\Color('FFFFFFE1'); + $this->alignment = Style\Alignment::HORIZONTAL_GENERAL; + } + + /** + * Get Author. + * + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Set Author. + * + * @param string $author + * + * @return $this + */ + public function setAuthor($author) + { + $this->author = $author; + + return $this; + } + + /** + * Get Rich text comment. + * + * @return RichText + */ + public function getText() + { + return $this->text; + } + + /** + * Set Rich text comment. + * + * @return $this + */ + public function setText(RichText $pValue) + { + $this->text = $pValue; + + return $this; + } + + /** + * Get comment width (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set comment width (CSS style, i.e. XXpx or YYpt). + * + * @param string $width + * + * @return $this + */ + public function setWidth($width) + { + $this->width = $width; + + return $this; + } + + /** + * Get comment height (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set comment height (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return $this + */ + public function setHeight($value) + { + $this->height = $value; + + return $this; + } + + /** + * Get left margin (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getMarginLeft() + { + return $this->marginLeft; + } + + /** + * Set left margin (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return $this + */ + public function setMarginLeft($value) + { + $this->marginLeft = $value; + + return $this; + } + + /** + * Get top margin (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getMarginTop() + { + return $this->marginTop; + } + + /** + * Set top margin (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return $this + */ + public function setMarginTop($value) + { + $this->marginTop = $value; + + return $this; + } + + /** + * Is the comment visible by default? + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set comment default visibility. + * + * @param bool $value + * + * @return $this + */ + public function setVisible($value) + { + $this->visible = $value; + + return $this; + } + + /** + * Get fill color. + * + * @return Style\Color + */ + public function getFillColor() + { + return $this->fillColor; + } + + /** + * Set Alignment. + * + * @param string $alignment see Style\Alignment::HORIZONTAL_* + * + * @return $this + */ + public function setAlignment($alignment) + { + $this->alignment = $alignment; + + return $this; + } + + /** + * Get Alignment. + * + * @return string + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->author . + $this->text->getHashCode() . + $this->width . + $this->height . + $this->marginLeft . + $this->marginTop . + ($this->visible ? 1 : 0) . + $this->fillColor->getHashCode() . + $this->alignment . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return $this->text->getPlainText(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Properties.php new file mode 100755 index 0000000..cbaae2d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Properties.php @@ -0,0 +1,629 @@ +lastModifiedBy = $this->creator; + $this->created = time(); + $this->modified = time(); + } + + /** + * Get Creator. + * + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Set Creator. + * + * @param string $creator + * + * @return $this + */ + public function setCreator($creator) + { + $this->creator = $creator; + + return $this; + } + + /** + * Get Last Modified By. + * + * @return string + */ + public function getLastModifiedBy() + { + return $this->lastModifiedBy; + } + + /** + * Set Last Modified By. + * + * @param string $pValue + * + * @return $this + */ + public function setLastModifiedBy($pValue) + { + $this->lastModifiedBy = $pValue; + + return $this; + } + + /** + * Get Created. + * + * @return int + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set Created. + * + * @param int|string $time + * + * @return $this + */ + public function setCreated($time) + { + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; + } else { + $time = strtotime($time); + } + } + + $this->created = $time; + + return $this; + } + + /** + * Get Modified. + * + * @return int + */ + public function getModified() + { + return $this->modified; + } + + /** + * Set Modified. + * + * @param int|string $time + * + * @return $this + */ + public function setModified($time) + { + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; + } else { + $time = strtotime($time); + } + } + + $this->modified = $time; + + return $this; + } + + /** + * Get Title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set Title. + * + * @param string $title + * + * @return $this + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get Description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set Description. + * + * @param string $description + * + * @return $this + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get Subject. + * + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Set Subject. + * + * @param string $subject + * + * @return $this + */ + public function setSubject($subject) + { + $this->subject = $subject; + + return $this; + } + + /** + * Get Keywords. + * + * @return string + */ + public function getKeywords() + { + return $this->keywords; + } + + /** + * Set Keywords. + * + * @param string $keywords + * + * @return $this + */ + public function setKeywords($keywords) + { + $this->keywords = $keywords; + + return $this; + } + + /** + * Get Category. + * + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * Set Category. + * + * @param string $category + * + * @return $this + */ + public function setCategory($category) + { + $this->category = $category; + + return $this; + } + + /** + * Get Company. + * + * @return string + */ + public function getCompany() + { + return $this->company; + } + + /** + * Set Company. + * + * @param string $company + * + * @return $this + */ + public function setCompany($company) + { + $this->company = $company; + + return $this; + } + + /** + * Get Manager. + * + * @return string + */ + public function getManager() + { + return $this->manager; + } + + /** + * Set Manager. + * + * @param string $manager + * + * @return $this + */ + public function setManager($manager) + { + $this->manager = $manager; + + return $this; + } + + /** + * Get a List of Custom Property Names. + * + * @return array of string + */ + public function getCustomProperties() + { + return array_keys($this->customProperties); + } + + /** + * Check if a Custom Property is defined. + * + * @param string $propertyName + * + * @return bool + */ + public function isCustomPropertySet($propertyName) + { + return isset($this->customProperties[$propertyName]); + } + + /** + * Get a Custom Property Value. + * + * @param string $propertyName + * + * @return mixed + */ + public function getCustomPropertyValue($propertyName) + { + if (isset($this->customProperties[$propertyName])) { + return $this->customProperties[$propertyName]['value']; + } + } + + /** + * Get a Custom Property Type. + * + * @param string $propertyName + * + * @return string + */ + public function getCustomPropertyType($propertyName) + { + if (isset($this->customProperties[$propertyName])) { + return $this->customProperties[$propertyName]['type']; + } + } + + /** + * Set a Custom Property. + * + * @param string $propertyName + * @param mixed $propertyValue + * @param string $propertyType + * 'i' : Integer + * 'f' : Floating Point + * 's' : String + * 'd' : Date/Time + * 'b' : Boolean + * + * @return $this + */ + public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null) + { + if (($propertyType === null) || (!in_array($propertyType, [self::PROPERTY_TYPE_INTEGER, + self::PROPERTY_TYPE_FLOAT, + self::PROPERTY_TYPE_STRING, + self::PROPERTY_TYPE_DATE, + self::PROPERTY_TYPE_BOOLEAN, ]))) { + if ($propertyValue === null) { + $propertyType = self::PROPERTY_TYPE_STRING; + } elseif (is_float($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_FLOAT; + } elseif (is_int($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_INTEGER; + } elseif (is_bool($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_BOOLEAN; + } else { + $propertyType = self::PROPERTY_TYPE_STRING; + } + } + + $this->customProperties[$propertyName] = [ + 'value' => $propertyValue, + 'type' => $propertyType, + ]; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + public static function convertProperty($propertyValue, $propertyType) + { + switch ($propertyType) { + case 'empty': // Empty + return ''; + + break; + case 'null': // Null + return null; + + break; + case 'i1': // 1-Byte Signed Integer + case 'i2': // 2-Byte Signed Integer + case 'i4': // 4-Byte Signed Integer + case 'i8': // 8-Byte Signed Integer + case 'int': // Integer + return (int) $propertyValue; + + break; + case 'ui1': // 1-Byte Unsigned Integer + case 'ui2': // 2-Byte Unsigned Integer + case 'ui4': // 4-Byte Unsigned Integer + case 'ui8': // 8-Byte Unsigned Integer + case 'uint': // Unsigned Integer + return abs((int) $propertyValue); + + break; + case 'r4': // 4-Byte Real Number + case 'r8': // 8-Byte Real Number + case 'decimal': // Decimal + return (float) $propertyValue; + + break; + case 'lpstr': // LPSTR + case 'lpwstr': // LPWSTR + case 'bstr': // Basic String + return $propertyValue; + + break; + case 'date': // Date and Time + case 'filetime': // File Time + return strtotime($propertyValue); + + break; + case 'bool': // Boolean + return $propertyValue == 'true'; + + break; + case 'cy': // Currency + case 'error': // Error Status Code + case 'vector': // Vector + case 'array': // Array + case 'blob': // Binary Blob + case 'oblob': // Binary Blob Object + case 'stream': // Binary Stream + case 'ostream': // Binary Stream Object + case 'storage': // Binary Storage + case 'ostorage': // Binary Storage Object + case 'vstream': // Binary Versioned Stream + case 'clsid': // Class ID + case 'cf': // Clipboard Data + return $propertyValue; + + break; + } + + return $propertyValue; + } + + public static function convertPropertyType($propertyType) + { + switch ($propertyType) { + case 'i1': // 1-Byte Signed Integer + case 'i2': // 2-Byte Signed Integer + case 'i4': // 4-Byte Signed Integer + case 'i8': // 8-Byte Signed Integer + case 'int': // Integer + case 'ui1': // 1-Byte Unsigned Integer + case 'ui2': // 2-Byte Unsigned Integer + case 'ui4': // 4-Byte Unsigned Integer + case 'ui8': // 8-Byte Unsigned Integer + case 'uint': // Unsigned Integer + return self::PROPERTY_TYPE_INTEGER; + + break; + case 'r4': // 4-Byte Real Number + case 'r8': // 8-Byte Real Number + case 'decimal': // Decimal + return self::PROPERTY_TYPE_FLOAT; + + break; + case 'empty': // Empty + case 'null': // Null + case 'lpstr': // LPSTR + case 'lpwstr': // LPWSTR + case 'bstr': // Basic String + return self::PROPERTY_TYPE_STRING; + + break; + case 'date': // Date and Time + case 'filetime': // File Time + return self::PROPERTY_TYPE_DATE; + + break; + case 'bool': // Boolean + return self::PROPERTY_TYPE_BOOLEAN; + + break; + case 'cy': // Currency + case 'error': // Error Status Code + case 'vector': // Vector + case 'array': // Array + case 'blob': // Binary Blob + case 'oblob': // Binary Blob Object + case 'stream': // Binary Stream + case 'ostream': // Binary Stream Object + case 'storage': // Binary Storage + case 'ostorage': // Binary Storage Object + case 'vstream': // Binary Versioned Stream + case 'clsid': // Class ID + case 'cf': // Clipboard Data + return self::PROPERTY_TYPE_UNKNOWN; + + break; + } + + return self::PROPERTY_TYPE_UNKNOWN; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Security.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Security.php new file mode 100755 index 0000000..cef3db8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Document/Security.php @@ -0,0 +1,205 @@ +lockRevision || + $this->lockStructure || + $this->lockWindows; + } + + /** + * Get LockRevision. + * + * @return bool + */ + public function getLockRevision() + { + return $this->lockRevision; + } + + /** + * Set LockRevision. + * + * @param bool $pValue + * + * @return $this + */ + public function setLockRevision($pValue) + { + $this->lockRevision = $pValue; + + return $this; + } + + /** + * Get LockStructure. + * + * @return bool + */ + public function getLockStructure() + { + return $this->lockStructure; + } + + /** + * Set LockStructure. + * + * @param bool $pValue + * + * @return $this + */ + public function setLockStructure($pValue) + { + $this->lockStructure = $pValue; + + return $this; + } + + /** + * Get LockWindows. + * + * @return bool + */ + public function getLockWindows() + { + return $this->lockWindows; + } + + /** + * Set LockWindows. + * + * @param bool $pValue + * + * @return $this + */ + public function setLockWindows($pValue) + { + $this->lockWindows = $pValue; + + return $this; + } + + /** + * Get RevisionsPassword (hashed). + * + * @return string + */ + public function getRevisionsPassword() + { + return $this->revisionsPassword; + } + + /** + * Set RevisionsPassword. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return $this + */ + public function setRevisionsPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $pValue = PasswordHasher::hashPassword($pValue); + } + $this->revisionsPassword = $pValue; + + return $this; + } + + /** + * Get WorkbookPassword (hashed). + * + * @return string + */ + public function getWorkbookPassword() + { + return $this->workbookPassword; + } + + /** + * Set WorkbookPassword. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return $this + */ + public function setWorkbookPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $pValue = PasswordHasher::hashPassword($pValue); + } + $this->workbookPassword = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/DocumentGenerator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/DocumentGenerator.php new file mode 100755 index 0000000..5e06af9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/DocumentGenerator.php @@ -0,0 +1,97 @@ + $category) { + $result .= "\n"; + $result .= "## {$categoryConstant}\n"; + $result .= "\n"; + $lengths = [20, 42]; + $result .= self::tableRow($lengths, ['Excel Function', 'PhpSpreadsheet Function']) . "\n"; + $result .= self::tableRow($lengths, null) . "\n"; + foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) { + if ($category === $functionInfo['category']) { + $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']); + $result .= self::tableRow($lengths, [$excelFunction, $phpFunction]) . "\n"; + } + } + } + + return $result; + } + + private static function getCategories(): array + { + return (new ReflectionClass(Category::class))->getConstants(); + } + + private static function tableRow(array $lengths, ?array $values = null): string + { + $result = ''; + foreach (array_map(null, $lengths, $values ?? []) as $i => [$length, $value]) { + $pad = $value === null ? '-' : ' '; + if ($i > 0) { + $result .= '|' . $pad; + } + $result .= str_pad($value ?? '', $length, $pad); + } + + return rtrim($result, ' '); + } + + private static function getPhpSpreadsheetFunctionText($functionCall): string + { + if (is_string($functionCall)) { + return $functionCall; + } + if ($functionCall === [Functions::class, 'DUMMY']) { + return '**Not yet Implemented**'; + } + if (is_array($functionCall)) { + return "\\{$functionCall[0]}::{$functionCall[1]}"; + } + + throw new UnexpectedValueException( + '$functionCall is of type ' . gettype($functionCall) . '. string or array expected' + ); + } + + /** + * @param array[] $phpSpreadsheetFunctions + */ + public static function generateFunctionListByName(array $phpSpreadsheetFunctions): string + { + $categoryConstants = array_flip(self::getCategories()); + $result = "# Function list by name\n"; + $lastAlphabet = null; + foreach ($phpSpreadsheetFunctions as $excelFunction => $functionInfo) { + $lengths = [20, 31, 42]; + if ($lastAlphabet !== $excelFunction[0]) { + $lastAlphabet = $excelFunction[0]; + $result .= "\n"; + $result .= "## {$lastAlphabet}\n"; + $result .= "\n"; + $result .= self::tableRow($lengths, ['Excel Function', 'Category', 'PhpSpreadsheet Function']) . "\n"; + $result .= self::tableRow($lengths, null) . "\n"; + } + $category = $categoryConstants[$functionInfo['category']]; + $phpFunction = self::getPhpSpreadsheetFunctionText($functionInfo['functionCall']); + $result .= self::tableRow($lengths, [$excelFunction, $category, $phpFunction]) . "\n"; + } + + return $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Exception.php new file mode 100755 index 0000000..9c5ab30 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Exception.php @@ -0,0 +1,7 @@ +addFromSource($pSource); + } + } + + /** + * Add HashTable items from source. + * + * @param IComparable[] $pSource Source array to create HashTable from + */ + public function addFromSource(?array $pSource = null): void + { + // Check if an array was passed + if ($pSource == null) { + return; + } + + foreach ($pSource as $item) { + $this->add($item); + } + } + + /** + * Add HashTable item. + * + * @param IComparable $pSource Item to add + */ + public function add(IComparable $pSource): void + { + $hash = $pSource->getHashCode(); + if (!isset($this->items[$hash])) { + $this->items[$hash] = $pSource; + $this->keyMap[count($this->items) - 1] = $hash; + } + } + + /** + * Remove HashTable item. + * + * @param IComparable $pSource Item to remove + */ + public function remove(IComparable $pSource): void + { + $hash = $pSource->getHashCode(); + if (isset($this->items[$hash])) { + unset($this->items[$hash]); + + $deleteKey = -1; + foreach ($this->keyMap as $key => $value) { + if ($deleteKey >= 0) { + $this->keyMap[$key - 1] = $value; + } + + if ($value == $hash) { + $deleteKey = $key; + } + } + unset($this->keyMap[count($this->keyMap) - 1]); + } + } + + /** + * Clear HashTable. + */ + public function clear(): void + { + $this->items = []; + $this->keyMap = []; + } + + /** + * Count. + * + * @return int + */ + public function count() + { + return count($this->items); + } + + /** + * Get index for hash code. + * + * @param string $pHashCode + * + * @return int Index + */ + public function getIndexForHashCode($pHashCode) + { + return array_search($pHashCode, $this->keyMap); + } + + /** + * Get by index. + * + * @param int $pIndex + * + * @return IComparable + */ + public function getByIndex($pIndex) + { + if (isset($this->keyMap[$pIndex])) { + return $this->getByHashCode($this->keyMap[$pIndex]); + } + + return null; + } + + /** + * Get by hashcode. + * + * @param string $pHashCode + * + * @return IComparable + */ + public function getByHashCode($pHashCode) + { + if (isset($this->items[$pHashCode])) { + return $this->items[$pHashCode]; + } + + return null; + } + + /** + * HashTable to array. + * + * @return IComparable[] + */ + public function toArray() + { + return $this->items; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Html.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Html.php new file mode 100755 index 0000000..252e14a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Html.php @@ -0,0 +1,839 @@ + 'f0f8ff', + 'antiquewhite' => 'faebd7', + 'antiquewhite1' => 'ffefdb', + 'antiquewhite2' => 'eedfcc', + 'antiquewhite3' => 'cdc0b0', + 'antiquewhite4' => '8b8378', + 'aqua' => '00ffff', + 'aquamarine1' => '7fffd4', + 'aquamarine2' => '76eec6', + 'aquamarine4' => '458b74', + 'azure1' => 'f0ffff', + 'azure2' => 'e0eeee', + 'azure3' => 'c1cdcd', + 'azure4' => '838b8b', + 'beige' => 'f5f5dc', + 'bisque1' => 'ffe4c4', + 'bisque2' => 'eed5b7', + 'bisque3' => 'cdb79e', + 'bisque4' => '8b7d6b', + 'black' => '000000', + 'blanchedalmond' => 'ffebcd', + 'blue' => '0000ff', + 'blue1' => '0000ff', + 'blue2' => '0000ee', + 'blue4' => '00008b', + 'blueviolet' => '8a2be2', + 'brown' => 'a52a2a', + 'brown1' => 'ff4040', + 'brown2' => 'ee3b3b', + 'brown3' => 'cd3333', + 'brown4' => '8b2323', + 'burlywood' => 'deb887', + 'burlywood1' => 'ffd39b', + 'burlywood2' => 'eec591', + 'burlywood3' => 'cdaa7d', + 'burlywood4' => '8b7355', + 'cadetblue' => '5f9ea0', + 'cadetblue1' => '98f5ff', + 'cadetblue2' => '8ee5ee', + 'cadetblue3' => '7ac5cd', + 'cadetblue4' => '53868b', + 'chartreuse1' => '7fff00', + 'chartreuse2' => '76ee00', + 'chartreuse3' => '66cd00', + 'chartreuse4' => '458b00', + 'chocolate' => 'd2691e', + 'chocolate1' => 'ff7f24', + 'chocolate2' => 'ee7621', + 'chocolate3' => 'cd661d', + 'coral' => 'ff7f50', + 'coral1' => 'ff7256', + 'coral2' => 'ee6a50', + 'coral3' => 'cd5b45', + 'coral4' => '8b3e2f', + 'cornflowerblue' => '6495ed', + 'cornsilk1' => 'fff8dc', + 'cornsilk2' => 'eee8cd', + 'cornsilk3' => 'cdc8b1', + 'cornsilk4' => '8b8878', + 'cyan1' => '00ffff', + 'cyan2' => '00eeee', + 'cyan3' => '00cdcd', + 'cyan4' => '008b8b', + 'darkgoldenrod' => 'b8860b', + 'darkgoldenrod1' => 'ffb90f', + 'darkgoldenrod2' => 'eead0e', + 'darkgoldenrod3' => 'cd950c', + 'darkgoldenrod4' => '8b6508', + 'darkgreen' => '006400', + 'darkkhaki' => 'bdb76b', + 'darkolivegreen' => '556b2f', + 'darkolivegreen1' => 'caff70', + 'darkolivegreen2' => 'bcee68', + 'darkolivegreen3' => 'a2cd5a', + 'darkolivegreen4' => '6e8b3d', + 'darkorange' => 'ff8c00', + 'darkorange1' => 'ff7f00', + 'darkorange2' => 'ee7600', + 'darkorange3' => 'cd6600', + 'darkorange4' => '8b4500', + 'darkorchid' => '9932cc', + 'darkorchid1' => 'bf3eff', + 'darkorchid2' => 'b23aee', + 'darkorchid3' => '9a32cd', + 'darkorchid4' => '68228b', + 'darksalmon' => 'e9967a', + 'darkseagreen' => '8fbc8f', + 'darkseagreen1' => 'c1ffc1', + 'darkseagreen2' => 'b4eeb4', + 'darkseagreen3' => '9bcd9b', + 'darkseagreen4' => '698b69', + 'darkslateblue' => '483d8b', + 'darkslategray' => '2f4f4f', + 'darkslategray1' => '97ffff', + 'darkslategray2' => '8deeee', + 'darkslategray3' => '79cdcd', + 'darkslategray4' => '528b8b', + 'darkturquoise' => '00ced1', + 'darkviolet' => '9400d3', + 'deeppink1' => 'ff1493', + 'deeppink2' => 'ee1289', + 'deeppink3' => 'cd1076', + 'deeppink4' => '8b0a50', + 'deepskyblue1' => '00bfff', + 'deepskyblue2' => '00b2ee', + 'deepskyblue3' => '009acd', + 'deepskyblue4' => '00688b', + 'dimgray' => '696969', + 'dodgerblue1' => '1e90ff', + 'dodgerblue2' => '1c86ee', + 'dodgerblue3' => '1874cd', + 'dodgerblue4' => '104e8b', + 'firebrick' => 'b22222', + 'firebrick1' => 'ff3030', + 'firebrick2' => 'ee2c2c', + 'firebrick3' => 'cd2626', + 'firebrick4' => '8b1a1a', + 'floralwhite' => 'fffaf0', + 'forestgreen' => '228b22', + 'fuchsia' => 'ff00ff', + 'gainsboro' => 'dcdcdc', + 'ghostwhite' => 'f8f8ff', + 'gold1' => 'ffd700', + 'gold2' => 'eec900', + 'gold3' => 'cdad00', + 'gold4' => '8b7500', + 'goldenrod' => 'daa520', + 'goldenrod1' => 'ffc125', + 'goldenrod2' => 'eeb422', + 'goldenrod3' => 'cd9b1d', + 'goldenrod4' => '8b6914', + 'gray' => 'bebebe', + 'gray1' => '030303', + 'gray10' => '1a1a1a', + 'gray11' => '1c1c1c', + 'gray12' => '1f1f1f', + 'gray13' => '212121', + 'gray14' => '242424', + 'gray15' => '262626', + 'gray16' => '292929', + 'gray17' => '2b2b2b', + 'gray18' => '2e2e2e', + 'gray19' => '303030', + 'gray2' => '050505', + 'gray20' => '333333', + 'gray21' => '363636', + 'gray22' => '383838', + 'gray23' => '3b3b3b', + 'gray24' => '3d3d3d', + 'gray25' => '404040', + 'gray26' => '424242', + 'gray27' => '454545', + 'gray28' => '474747', + 'gray29' => '4a4a4a', + 'gray3' => '080808', + 'gray30' => '4d4d4d', + 'gray31' => '4f4f4f', + 'gray32' => '525252', + 'gray33' => '545454', + 'gray34' => '575757', + 'gray35' => '595959', + 'gray36' => '5c5c5c', + 'gray37' => '5e5e5e', + 'gray38' => '616161', + 'gray39' => '636363', + 'gray4' => '0a0a0a', + 'gray40' => '666666', + 'gray41' => '696969', + 'gray42' => '6b6b6b', + 'gray43' => '6e6e6e', + 'gray44' => '707070', + 'gray45' => '737373', + 'gray46' => '757575', + 'gray47' => '787878', + 'gray48' => '7a7a7a', + 'gray49' => '7d7d7d', + 'gray5' => '0d0d0d', + 'gray50' => '7f7f7f', + 'gray51' => '828282', + 'gray52' => '858585', + 'gray53' => '878787', + 'gray54' => '8a8a8a', + 'gray55' => '8c8c8c', + 'gray56' => '8f8f8f', + 'gray57' => '919191', + 'gray58' => '949494', + 'gray59' => '969696', + 'gray6' => '0f0f0f', + 'gray60' => '999999', + 'gray61' => '9c9c9c', + 'gray62' => '9e9e9e', + 'gray63' => 'a1a1a1', + 'gray64' => 'a3a3a3', + 'gray65' => 'a6a6a6', + 'gray66' => 'a8a8a8', + 'gray67' => 'ababab', + 'gray68' => 'adadad', + 'gray69' => 'b0b0b0', + 'gray7' => '121212', + 'gray70' => 'b3b3b3', + 'gray71' => 'b5b5b5', + 'gray72' => 'b8b8b8', + 'gray73' => 'bababa', + 'gray74' => 'bdbdbd', + 'gray75' => 'bfbfbf', + 'gray76' => 'c2c2c2', + 'gray77' => 'c4c4c4', + 'gray78' => 'c7c7c7', + 'gray79' => 'c9c9c9', + 'gray8' => '141414', + 'gray80' => 'cccccc', + 'gray81' => 'cfcfcf', + 'gray82' => 'd1d1d1', + 'gray83' => 'd4d4d4', + 'gray84' => 'd6d6d6', + 'gray85' => 'd9d9d9', + 'gray86' => 'dbdbdb', + 'gray87' => 'dedede', + 'gray88' => 'e0e0e0', + 'gray89' => 'e3e3e3', + 'gray9' => '171717', + 'gray90' => 'e5e5e5', + 'gray91' => 'e8e8e8', + 'gray92' => 'ebebeb', + 'gray93' => 'ededed', + 'gray94' => 'f0f0f0', + 'gray95' => 'f2f2f2', + 'gray97' => 'f7f7f7', + 'gray98' => 'fafafa', + 'gray99' => 'fcfcfc', + 'green' => '00ff00', + 'green1' => '00ff00', + 'green2' => '00ee00', + 'green3' => '00cd00', + 'green4' => '008b00', + 'greenyellow' => 'adff2f', + 'honeydew1' => 'f0fff0', + 'honeydew2' => 'e0eee0', + 'honeydew3' => 'c1cdc1', + 'honeydew4' => '838b83', + 'hotpink' => 'ff69b4', + 'hotpink1' => 'ff6eb4', + 'hotpink2' => 'ee6aa7', + 'hotpink3' => 'cd6090', + 'hotpink4' => '8b3a62', + 'indianred' => 'cd5c5c', + 'indianred1' => 'ff6a6a', + 'indianred2' => 'ee6363', + 'indianred3' => 'cd5555', + 'indianred4' => '8b3a3a', + 'ivory1' => 'fffff0', + 'ivory2' => 'eeeee0', + 'ivory3' => 'cdcdc1', + 'ivory4' => '8b8b83', + 'khaki' => 'f0e68c', + 'khaki1' => 'fff68f', + 'khaki2' => 'eee685', + 'khaki3' => 'cdc673', + 'khaki4' => '8b864e', + 'lavender' => 'e6e6fa', + 'lavenderblush1' => 'fff0f5', + 'lavenderblush2' => 'eee0e5', + 'lavenderblush3' => 'cdc1c5', + 'lavenderblush4' => '8b8386', + 'lawngreen' => '7cfc00', + 'lemonchiffon1' => 'fffacd', + 'lemonchiffon2' => 'eee9bf', + 'lemonchiffon3' => 'cdc9a5', + 'lemonchiffon4' => '8b8970', + 'light' => 'eedd82', + 'lightblue' => 'add8e6', + 'lightblue1' => 'bfefff', + 'lightblue2' => 'b2dfee', + 'lightblue3' => '9ac0cd', + 'lightblue4' => '68838b', + 'lightcoral' => 'f08080', + 'lightcyan1' => 'e0ffff', + 'lightcyan2' => 'd1eeee', + 'lightcyan3' => 'b4cdcd', + 'lightcyan4' => '7a8b8b', + 'lightgoldenrod1' => 'ffec8b', + 'lightgoldenrod2' => 'eedc82', + 'lightgoldenrod3' => 'cdbe70', + 'lightgoldenrod4' => '8b814c', + 'lightgoldenrodyellow' => 'fafad2', + 'lightgray' => 'd3d3d3', + 'lightpink' => 'ffb6c1', + 'lightpink1' => 'ffaeb9', + 'lightpink2' => 'eea2ad', + 'lightpink3' => 'cd8c95', + 'lightpink4' => '8b5f65', + 'lightsalmon1' => 'ffa07a', + 'lightsalmon2' => 'ee9572', + 'lightsalmon3' => 'cd8162', + 'lightsalmon4' => '8b5742', + 'lightseagreen' => '20b2aa', + 'lightskyblue' => '87cefa', + 'lightskyblue1' => 'b0e2ff', + 'lightskyblue2' => 'a4d3ee', + 'lightskyblue3' => '8db6cd', + 'lightskyblue4' => '607b8b', + 'lightslateblue' => '8470ff', + 'lightslategray' => '778899', + 'lightsteelblue' => 'b0c4de', + 'lightsteelblue1' => 'cae1ff', + 'lightsteelblue2' => 'bcd2ee', + 'lightsteelblue3' => 'a2b5cd', + 'lightsteelblue4' => '6e7b8b', + 'lightyellow1' => 'ffffe0', + 'lightyellow2' => 'eeeed1', + 'lightyellow3' => 'cdcdb4', + 'lightyellow4' => '8b8b7a', + 'lime' => '00ff00', + 'limegreen' => '32cd32', + 'linen' => 'faf0e6', + 'magenta' => 'ff00ff', + 'magenta2' => 'ee00ee', + 'magenta3' => 'cd00cd', + 'magenta4' => '8b008b', + 'maroon' => 'b03060', + 'maroon1' => 'ff34b3', + 'maroon2' => 'ee30a7', + 'maroon3' => 'cd2990', + 'maroon4' => '8b1c62', + 'medium' => '66cdaa', + 'mediumaquamarine' => '66cdaa', + 'mediumblue' => '0000cd', + 'mediumorchid' => 'ba55d3', + 'mediumorchid1' => 'e066ff', + 'mediumorchid2' => 'd15fee', + 'mediumorchid3' => 'b452cd', + 'mediumorchid4' => '7a378b', + 'mediumpurple' => '9370db', + 'mediumpurple1' => 'ab82ff', + 'mediumpurple2' => '9f79ee', + 'mediumpurple3' => '8968cd', + 'mediumpurple4' => '5d478b', + 'mediumseagreen' => '3cb371', + 'mediumslateblue' => '7b68ee', + 'mediumspringgreen' => '00fa9a', + 'mediumturquoise' => '48d1cc', + 'mediumvioletred' => 'c71585', + 'midnightblue' => '191970', + 'mintcream' => 'f5fffa', + 'mistyrose1' => 'ffe4e1', + 'mistyrose2' => 'eed5d2', + 'mistyrose3' => 'cdb7b5', + 'mistyrose4' => '8b7d7b', + 'moccasin' => 'ffe4b5', + 'navajowhite1' => 'ffdead', + 'navajowhite2' => 'eecfa1', + 'navajowhite3' => 'cdb38b', + 'navajowhite4' => '8b795e', + 'navy' => '000080', + 'navyblue' => '000080', + 'oldlace' => 'fdf5e6', + 'olive' => '808000', + 'olivedrab' => '6b8e23', + 'olivedrab1' => 'c0ff3e', + 'olivedrab2' => 'b3ee3a', + 'olivedrab4' => '698b22', + 'orange' => 'ffa500', + 'orange1' => 'ffa500', + 'orange2' => 'ee9a00', + 'orange3' => 'cd8500', + 'orange4' => '8b5a00', + 'orangered1' => 'ff4500', + 'orangered2' => 'ee4000', + 'orangered3' => 'cd3700', + 'orangered4' => '8b2500', + 'orchid' => 'da70d6', + 'orchid1' => 'ff83fa', + 'orchid2' => 'ee7ae9', + 'orchid3' => 'cd69c9', + 'orchid4' => '8b4789', + 'pale' => 'db7093', + 'palegoldenrod' => 'eee8aa', + 'palegreen' => '98fb98', + 'palegreen1' => '9aff9a', + 'palegreen2' => '90ee90', + 'palegreen3' => '7ccd7c', + 'palegreen4' => '548b54', + 'paleturquoise' => 'afeeee', + 'paleturquoise1' => 'bbffff', + 'paleturquoise2' => 'aeeeee', + 'paleturquoise3' => '96cdcd', + 'paleturquoise4' => '668b8b', + 'palevioletred' => 'db7093', + 'palevioletred1' => 'ff82ab', + 'palevioletred2' => 'ee799f', + 'palevioletred3' => 'cd6889', + 'palevioletred4' => '8b475d', + 'papayawhip' => 'ffefd5', + 'peachpuff1' => 'ffdab9', + 'peachpuff2' => 'eecbad', + 'peachpuff3' => 'cdaf95', + 'peachpuff4' => '8b7765', + 'pink' => 'ffc0cb', + 'pink1' => 'ffb5c5', + 'pink2' => 'eea9b8', + 'pink3' => 'cd919e', + 'pink4' => '8b636c', + 'plum' => 'dda0dd', + 'plum1' => 'ffbbff', + 'plum2' => 'eeaeee', + 'plum3' => 'cd96cd', + 'plum4' => '8b668b', + 'powderblue' => 'b0e0e6', + 'purple' => 'a020f0', + 'rebeccapurple' => '663399', + 'purple1' => '9b30ff', + 'purple2' => '912cee', + 'purple3' => '7d26cd', + 'purple4' => '551a8b', + 'red' => 'ff0000', + 'red1' => 'ff0000', + 'red2' => 'ee0000', + 'red3' => 'cd0000', + 'red4' => '8b0000', + 'rosybrown' => 'bc8f8f', + 'rosybrown1' => 'ffc1c1', + 'rosybrown2' => 'eeb4b4', + 'rosybrown3' => 'cd9b9b', + 'rosybrown4' => '8b6969', + 'royalblue' => '4169e1', + 'royalblue1' => '4876ff', + 'royalblue2' => '436eee', + 'royalblue3' => '3a5fcd', + 'royalblue4' => '27408b', + 'saddlebrown' => '8b4513', + 'salmon' => 'fa8072', + 'salmon1' => 'ff8c69', + 'salmon2' => 'ee8262', + 'salmon3' => 'cd7054', + 'salmon4' => '8b4c39', + 'sandybrown' => 'f4a460', + 'seagreen1' => '54ff9f', + 'seagreen2' => '4eee94', + 'seagreen3' => '43cd80', + 'seagreen4' => '2e8b57', + 'seashell1' => 'fff5ee', + 'seashell2' => 'eee5de', + 'seashell3' => 'cdc5bf', + 'seashell4' => '8b8682', + 'sienna' => 'a0522d', + 'sienna1' => 'ff8247', + 'sienna2' => 'ee7942', + 'sienna3' => 'cd6839', + 'sienna4' => '8b4726', + 'silver' => 'c0c0c0', + 'skyblue' => '87ceeb', + 'skyblue1' => '87ceff', + 'skyblue2' => '7ec0ee', + 'skyblue3' => '6ca6cd', + 'skyblue4' => '4a708b', + 'slateblue' => '6a5acd', + 'slateblue1' => '836fff', + 'slateblue2' => '7a67ee', + 'slateblue3' => '6959cd', + 'slateblue4' => '473c8b', + 'slategray' => '708090', + 'slategray1' => 'c6e2ff', + 'slategray2' => 'b9d3ee', + 'slategray3' => '9fb6cd', + 'slategray4' => '6c7b8b', + 'snow1' => 'fffafa', + 'snow2' => 'eee9e9', + 'snow3' => 'cdc9c9', + 'snow4' => '8b8989', + 'springgreen1' => '00ff7f', + 'springgreen2' => '00ee76', + 'springgreen3' => '00cd66', + 'springgreen4' => '008b45', + 'steelblue' => '4682b4', + 'steelblue1' => '63b8ff', + 'steelblue2' => '5cacee', + 'steelblue3' => '4f94cd', + 'steelblue4' => '36648b', + 'tan' => 'd2b48c', + 'tan1' => 'ffa54f', + 'tan2' => 'ee9a49', + 'tan3' => 'cd853f', + 'tan4' => '8b5a2b', + 'teal' => '008080', + 'thistle' => 'd8bfd8', + 'thistle1' => 'ffe1ff', + 'thistle2' => 'eed2ee', + 'thistle3' => 'cdb5cd', + 'thistle4' => '8b7b8b', + 'tomato1' => 'ff6347', + 'tomato2' => 'ee5c42', + 'tomato3' => 'cd4f39', + 'tomato4' => '8b3626', + 'turquoise' => '40e0d0', + 'turquoise1' => '00f5ff', + 'turquoise2' => '00e5ee', + 'turquoise3' => '00c5cd', + 'turquoise4' => '00868b', + 'violet' => 'ee82ee', + 'violetred' => 'd02090', + 'violetred1' => 'ff3e96', + 'violetred2' => 'ee3a8c', + 'violetred3' => 'cd3278', + 'violetred4' => '8b2252', + 'wheat' => 'f5deb3', + 'wheat1' => 'ffe7ba', + 'wheat2' => 'eed8ae', + 'wheat3' => 'cdba96', + 'wheat4' => '8b7e66', + 'white' => 'ffffff', + 'whitesmoke' => 'f5f5f5', + 'yellow' => 'ffff00', + 'yellow1' => 'ffff00', + 'yellow2' => 'eeee00', + 'yellow3' => 'cdcd00', + 'yellow4' => '8b8b00', + 'yellowgreen' => '9acd32', + ]; + + protected $face; + + protected $size; + + protected $color; + + protected $bold = false; + + protected $italic = false; + + protected $underline = false; + + protected $superscript = false; + + protected $subscript = false; + + protected $strikethrough = false; + + protected $startTagCallbacks = [ + 'font' => 'startFontTag', + 'b' => 'startBoldTag', + 'strong' => 'startBoldTag', + 'i' => 'startItalicTag', + 'em' => 'startItalicTag', + 'u' => 'startUnderlineTag', + 'ins' => 'startUnderlineTag', + 'del' => 'startStrikethruTag', + 'sup' => 'startSuperscriptTag', + 'sub' => 'startSubscriptTag', + ]; + + protected $endTagCallbacks = [ + 'font' => 'endFontTag', + 'b' => 'endBoldTag', + 'strong' => 'endBoldTag', + 'i' => 'endItalicTag', + 'em' => 'endItalicTag', + 'u' => 'endUnderlineTag', + 'ins' => 'endUnderlineTag', + 'del' => 'endStrikethruTag', + 'sup' => 'endSuperscriptTag', + 'sub' => 'endSubscriptTag', + 'br' => 'breakTag', + 'p' => 'breakTag', + 'h1' => 'breakTag', + 'h2' => 'breakTag', + 'h3' => 'breakTag', + 'h4' => 'breakTag', + 'h5' => 'breakTag', + 'h6' => 'breakTag', + ]; + + protected $stack = []; + + protected $stringData = ''; + + /** + * @var RichText + */ + protected $richTextObject; + + protected function initialise(): void + { + $this->face = $this->size = $this->color = null; + $this->bold = $this->italic = $this->underline = $this->superscript = $this->subscript = $this->strikethrough = false; + + $this->stack = []; + + $this->stringData = ''; + } + + /** + * Parse HTML formatting and return the resulting RichText. + * + * @param string $html + * + * @return RichText + */ + public function toRichTextObject($html) + { + $this->initialise(); + + // Create a new DOM object + $dom = new DOMDocument(); + // Load the HTML file into the DOM object + // Note the use of error suppression, because typically this will be an html fragment, so not fully valid markup + $prefix = ''; + @$dom->loadHTML($prefix . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); + // Discard excess white space + $dom->preserveWhiteSpace = false; + + $this->richTextObject = new RichText(); + $this->parseElements($dom); + + // Clean any further spurious whitespace + $this->cleanWhitespace(); + + return $this->richTextObject; + } + + protected function cleanWhitespace(): void + { + foreach ($this->richTextObject->getRichTextElements() as $key => $element) { + $text = $element->getText(); + // Trim any leading spaces on the first run + if ($key == 0) { + $text = ltrim($text); + } + // Trim any spaces immediately after a line break + $text = preg_replace('/\n */mu', "\n", $text); + $element->setText($text); + } + } + + protected function buildTextRun(): void + { + $text = $this->stringData; + if (trim($text) === '') { + return; + } + + $richtextRun = $this->richTextObject->createTextRun($this->stringData); + if ($this->face) { + $richtextRun->getFont()->setName($this->face); + } + if ($this->size) { + $richtextRun->getFont()->setSize($this->size); + } + if ($this->color) { + $richtextRun->getFont()->setColor(new Color('ff' . $this->color)); + } + if ($this->bold) { + $richtextRun->getFont()->setBold(true); + } + if ($this->italic) { + $richtextRun->getFont()->setItalic(true); + } + if ($this->underline) { + $richtextRun->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + } + if ($this->superscript) { + $richtextRun->getFont()->setSuperscript(true); + } + if ($this->subscript) { + $richtextRun->getFont()->setSubscript(true); + } + if ($this->strikethrough) { + $richtextRun->getFont()->setStrikethrough(true); + } + $this->stringData = ''; + } + + protected function rgbToColour($rgb) + { + preg_match_all('/\d+/', $rgb, $values); + foreach ($values[0] as &$value) { + $value = str_pad(dechex($value), 2, '0', STR_PAD_LEFT); + } + + return implode('', $values[0]); + } + + protected function colourNameLookup($rgb) + { + return self::$colourMap[$rgb]; + } + + protected function startFontTag($tag): void + { + foreach ($tag->attributes as $attribute) { + $attributeName = strtolower($attribute->name); + $attributeValue = $attribute->value; + + if ($attributeName == 'color') { + if (preg_match('/rgb\s*\(/', $attributeValue)) { + $this->$attributeName = $this->rgbToColour($attributeValue); + } elseif (strpos(trim($attributeValue), '#') === 0) { + $this->$attributeName = ltrim($attributeValue, '#'); + } else { + $this->$attributeName = $this->colourNameLookup($attributeValue); + } + } else { + $this->$attributeName = $attributeValue; + } + } + } + + protected function endFontTag(): void + { + $this->face = $this->size = $this->color = null; + } + + protected function startBoldTag(): void + { + $this->bold = true; + } + + protected function endBoldTag(): void + { + $this->bold = false; + } + + protected function startItalicTag(): void + { + $this->italic = true; + } + + protected function endItalicTag(): void + { + $this->italic = false; + } + + protected function startUnderlineTag(): void + { + $this->underline = true; + } + + protected function endUnderlineTag(): void + { + $this->underline = false; + } + + protected function startSubscriptTag(): void + { + $this->subscript = true; + } + + protected function endSubscriptTag(): void + { + $this->subscript = false; + } + + protected function startSuperscriptTag(): void + { + $this->superscript = true; + } + + protected function endSuperscriptTag(): void + { + $this->superscript = false; + } + + protected function startStrikethruTag(): void + { + $this->strikethrough = true; + } + + protected function endStrikethruTag(): void + { + $this->strikethrough = false; + } + + protected function breakTag(): void + { + $this->stringData .= "\n"; + } + + protected function parseTextNode(DOMText $textNode): void + { + $domText = preg_replace( + '/\s+/u', + ' ', + str_replace(["\r", "\n"], ' ', $textNode->nodeValue) + ); + $this->stringData .= $domText; + $this->buildTextRun(); + } + + /** + * @param string $callbackTag + */ + protected function handleCallback(DOMElement $element, $callbackTag, array $callbacks): void + { + if (isset($callbacks[$callbackTag])) { + $elementHandler = $callbacks[$callbackTag]; + if (method_exists($this, $elementHandler)) { + call_user_func([$this, $elementHandler], $element); + } + } + } + + protected function parseElementNode(DOMElement $element): void + { + $callbackTag = strtolower($element->nodeName); + $this->stack[] = $callbackTag; + + $this->handleCallback($element, $callbackTag, $this->startTagCallbacks); + + $this->parseElements($element); + array_pop($this->stack); + + $this->handleCallback($element, $callbackTag, $this->endTagCallbacks); + } + + protected function parseElements(DOMNode $element): void + { + foreach ($element->childNodes as $child) { + if ($child instanceof DOMText) { + $this->parseTextNode($child); + } elseif ($child instanceof DOMElement) { + $this->parseElementNode($child); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Sample.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Sample.php new file mode 100755 index 0000000..a91b195 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Helper/Sample.php @@ -0,0 +1,229 @@ +getScriptFilename() === 'index'; + } + + /** + * Return the page title. + * + * @return string + */ + public function getPageTitle() + { + return $this->isIndex() ? 'PHPSpreadsheet' : $this->getScriptFilename(); + } + + /** + * Return the page heading. + * + * @return string + */ + public function getPageHeading() + { + return $this->isIndex() ? '' : '

' . str_replace('_', ' ', $this->getScriptFilename()) . '

'; + } + + /** + * Returns an array of all known samples. + * + * @return string[] [$name => $path] + */ + public function getSamples() + { + // Populate samples + $baseDir = realpath(__DIR__ . '/../../../samples'); + $directory = new RecursiveDirectoryIterator($baseDir); + $iterator = new RecursiveIteratorIterator($directory); + $regex = new RegexIterator($iterator, '/^.+\.php$/', RecursiveRegexIterator::GET_MATCH); + + $files = []; + foreach ($regex as $file) { + $file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0])); + $info = pathinfo($file); + $category = str_replace('_', ' ', $info['dirname']); + $name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename'])); + if (!in_array($category, ['.', 'boostrap', 'templates'])) { + if (!isset($files[$category])) { + $files[$category] = []; + } + $files[$category][$name] = $file; + } + } + + // Sort everything + ksort($files); + foreach ($files as &$f) { + asort($f); + } + + return $files; + } + + /** + * Write documents. + * + * @param string $filename + * @param string[] $writers + */ + public function write(Spreadsheet $spreadsheet, $filename, array $writers = ['Xlsx', 'Xls']): void + { + // Set active sheet index to the first sheet, so Excel opens this as the first sheet + $spreadsheet->setActiveSheetIndex(0); + + // Write documents + foreach ($writers as $writerType) { + $path = $this->getFilename($filename, mb_strtolower($writerType)); + $writer = IOFactory::createWriter($spreadsheet, $writerType); + if ($writer instanceof Pdf) { + // PDF writer needs temporary directory + $tempDir = $this->getTemporaryFolder(); + $writer->setTempDir($tempDir); + } + $callStartTime = microtime(true); + $writer->save($path); + $this->logWrite($writer, $path, $callStartTime); + } + + $this->logEndingNotes(); + } + + /** + * Returns the temporary directory and make sure it exists. + * + * @return string + */ + private function getTemporaryFolder() + { + $tempFolder = sys_get_temp_dir() . '/phpspreadsheet'; + if (!is_dir($tempFolder)) { + if (!mkdir($tempFolder) && !is_dir($tempFolder)) { + throw new RuntimeException(sprintf('Directory "%s" was not created', $tempFolder)); + } + } + + return $tempFolder; + } + + /** + * Returns the filename that should be used for sample output. + * + * @param string $filename + * @param string $extension + * + * @return string + */ + public function getFilename($filename, $extension = 'xlsx') + { + $originalExtension = pathinfo($filename, PATHINFO_EXTENSION); + + return $this->getTemporaryFolder() . '/' . str_replace('.' . $originalExtension, '.' . $extension, basename($filename)); + } + + /** + * Return a random temporary file name. + * + * @param string $extension + * + * @return string + */ + public function getTemporaryFilename($extension = 'xlsx') + { + $temporaryFilename = tempnam($this->getTemporaryFolder(), 'phpspreadsheet-'); + unlink($temporaryFilename); + + return $temporaryFilename . '.' . $extension; + } + + public function log($message): void + { + $eol = $this->isCli() ? PHP_EOL : '
'; + echo date('H:i:s ') . $message . $eol; + } + + /** + * Log ending notes. + */ + public function logEndingNotes(): void + { + // Do not show execution time for index + $this->log('Peak memory usage: ' . (memory_get_peak_usage(true) / 1024 / 1024) . 'MB'); + } + + /** + * Log a line about the write operation. + * + * @param string $path + * @param float $callStartTime + */ + public function logWrite(IWriter $writer, $path, $callStartTime): void + { + $callEndTime = microtime(true); + $callTime = $callEndTime - $callStartTime; + $reflection = new ReflectionClass($writer); + $format = $reflection->getShortName(); + $message = "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; + + $this->log($message); + } + + /** + * Log a line about the read operation. + * + * @param string $format + * @param string $path + * @param float $callStartTime + */ + public function logRead($format, $path, $callStartTime): void + { + $callEndTime = microtime(true); + $callTime = $callEndTime - $callStartTime; + $message = "Read {$format} format from {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; + + $this->log($message); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/IComparable.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/IComparable.php new file mode 100755 index 0000000..c215847 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/IComparable.php @@ -0,0 +1,13 @@ + Reader\Xlsx::class, + 'Xls' => Reader\Xls::class, + 'Xml' => Reader\Xml::class, + 'Ods' => Reader\Ods::class, + 'Slk' => Reader\Slk::class, + 'Gnumeric' => Reader\Gnumeric::class, + 'Html' => Reader\Html::class, + 'Csv' => Reader\Csv::class, + ]; + + private static $writers = [ + 'Xls' => Writer\Xls::class, + 'Xlsx' => Writer\Xlsx::class, + 'Ods' => Writer\Ods::class, + 'Csv' => Writer\Csv::class, + 'Html' => Writer\Html::class, + 'Tcpdf' => Writer\Pdf\Tcpdf::class, + 'Dompdf' => Writer\Pdf\Dompdf::class, + 'Mpdf' => Writer\Pdf\Mpdf::class, + ]; + + /** + * Create Writer\IWriter. + * + * @param string $writerType Example: Xlsx + * + * @return Writer\IWriter + */ + public static function createWriter(Spreadsheet $spreadsheet, $writerType) + { + if (!isset(self::$writers[$writerType])) { + throw new Writer\Exception("No writer found for type $writerType"); + } + + // Instantiate writer + $className = self::$writers[$writerType]; + + return new $className($spreadsheet); + } + + /** + * Create Reader\IReader. + * + * @param string $readerType Example: Xlsx + * + * @return Reader\IReader + */ + public static function createReader($readerType) + { + if (!isset(self::$readers[$readerType])) { + throw new Reader\Exception("No reader found for type $readerType"); + } + + // Instantiate reader + $className = self::$readers[$readerType]; + + return new $className(); + } + + /** + * Loads Spreadsheet from file using automatic Reader\IReader resolution. + * + * @param string $pFilename The name of the spreadsheet file + * + * @return Spreadsheet + */ + public static function load($pFilename) + { + $reader = self::createReaderForFile($pFilename); + + return $reader->load($pFilename); + } + + /** + * Identify file type using automatic Reader\IReader resolution. + * + * @param string $pFilename The name of the spreadsheet file to identify + * + * @return string + */ + public static function identify($pFilename) + { + $reader = self::createReaderForFile($pFilename); + $className = get_class($reader); + $classType = explode('\\', $className); + unset($reader); + + return array_pop($classType); + } + + /** + * Create Reader\IReader for file using automatic Reader\IReader resolution. + * + * @param string $filename The name of the spreadsheet file + * + * @return Reader\IReader + */ + public static function createReaderForFile($filename) + { + File::assertFile($filename); + + // First, lucky guess by inspecting file extension + $guessedReader = self::getReaderTypeFromExtension($filename); + if ($guessedReader !== null) { + $reader = self::createReader($guessedReader); + + // Let's see if we are lucky + if (isset($reader) && $reader->canRead($filename)) { + return $reader; + } + } + + // If we reach here then "lucky guess" didn't give any result + // Try walking through all the options in self::$autoResolveClasses + foreach (self::$readers as $type => $class) { + // Ignore our original guess, we know that won't work + if ($type !== $guessedReader) { + $reader = self::createReader($type); + if ($reader->canRead($filename)) { + return $reader; + } + } + } + + throw new Reader\Exception('Unable to identify a reader for this file'); + } + + /** + * Guess a reader type from the file extension, if any. + * + * @param string $filename + * + * @return null|string + */ + private static function getReaderTypeFromExtension($filename) + { + $pathinfo = pathinfo($filename); + if (!isset($pathinfo['extension'])) { + return null; + } + + switch (strtolower($pathinfo['extension'])) { + case 'xlsx': // Excel (OfficeOpenXML) Spreadsheet + case 'xlsm': // Excel (OfficeOpenXML) Macro Spreadsheet (macros will be discarded) + case 'xltx': // Excel (OfficeOpenXML) Template + case 'xltm': // Excel (OfficeOpenXML) Macro Template (macros will be discarded) + return 'Xlsx'; + case 'xls': // Excel (BIFF) Spreadsheet + case 'xlt': // Excel (BIFF) Template + return 'Xls'; + case 'ods': // Open/Libre Offic Calc + case 'ots': // Open/Libre Offic Calc Template + return 'Ods'; + case 'slk': + return 'Slk'; + case 'xml': // Excel 2003 SpreadSheetML + return 'Xml'; + case 'gnumeric': + return 'Gnumeric'; + case 'htm': + case 'html': + return 'Html'; + case 'csv': + // Do nothing + // We must not try to use CSV reader since it loads + // all files including Excel files etc. + return null; + default: + return null; + } + } + + /** + * Register a writer with its type and class name. + * + * @param string $writerType + * @param string $writerClass + */ + public static function registerWriter($writerType, $writerClass): void + { + if (!is_a($writerClass, Writer\IWriter::class, true)) { + throw new Writer\Exception('Registered writers must implement ' . Writer\IWriter::class); + } + + self::$writers[$writerType] = $writerClass; + } + + /** + * Register a reader with its type and class name. + * + * @param string $readerType + * @param string $readerClass + */ + public static function registerReader($readerType, $readerClass): void + { + if (!is_a($readerClass, Reader\IReader::class, true)) { + throw new Reader\Exception('Registered readers must implement ' . Reader\IReader::class); + } + + self::$readers[$readerType] = $readerClass; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/NamedRange.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/NamedRange.php new file mode 100755 index 0000000..94fe819 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/NamedRange.php @@ -0,0 +1,235 @@ +worksheet). + * + * @var bool + */ + private $localOnly; + + /** + * Scope. + * + * @var Worksheet + */ + private $scope; + + /** + * Create a new NamedRange. + * + * @param string $pName + * @param string $pRange + * @param bool $pLocalOnly + * @param null|Worksheet $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope. + */ + public function __construct($pName, Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null) + { + // Validate data + if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) { + throw new Exception('Parameters can not be null.'); + } + + // Set local members + $this->name = $pName; + $this->worksheet = $pWorksheet; + $this->range = $pRange; + $this->localOnly = $pLocalOnly; + $this->scope = ($pLocalOnly == true) ? (($pScope == null) ? $pWorksheet : $pScope) : null; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set name. + * + * @param string $value + * + * @return $this + */ + public function setName($value) + { + if ($value !== null) { + // Old title + $oldTitle = $this->name; + + // Re-attach + if ($this->worksheet !== null) { + $this->worksheet->getParent()->removeNamedRange($this->name, $this->worksheet); + } + $this->name = $value; + + if ($this->worksheet !== null) { + $this->worksheet->getParent()->addNamedRange($this); + } + + // New title + $newTitle = $this->name; + ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle); + } + + return $this; + } + + /** + * Get worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set worksheet. + * + * @param Worksheet $value + * + * @return $this + */ + public function setWorksheet(?Worksheet $value = null) + { + if ($value !== null) { + $this->worksheet = $value; + } + + return $this; + } + + /** + * Get range. + * + * @return string + */ + public function getRange() + { + return $this->range; + } + + /** + * Set range. + * + * @param string $value + * + * @return $this + */ + public function setRange($value) + { + if ($value !== null) { + $this->range = $value; + } + + return $this; + } + + /** + * Get localOnly. + * + * @return bool + */ + public function getLocalOnly() + { + return $this->localOnly; + } + + /** + * Set localOnly. + * + * @param bool $value + * + * @return $this + */ + public function setLocalOnly($value) + { + $this->localOnly = $value; + $this->scope = $value ? $this->worksheet : null; + + return $this; + } + + /** + * Get scope. + * + * @return null|Worksheet + */ + public function getScope() + { + return $this->scope; + } + + /** + * Set scope. + * + * @return $this + */ + public function setScope(?Worksheet $value = null) + { + $this->scope = $value; + $this->localOnly = $value != null; + + return $this; + } + + /** + * Resolve a named range to a regular cell range. + * + * @param string $pNamedRange Named range + * @param null|Worksheet $pSheet Scope. Use null for global scope + * + * @return NamedRange + */ + public static function resolveRange($pNamedRange, Worksheet $pSheet) + { + return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/BaseReader.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/BaseReader.php new file mode 100755 index 0000000..eb0e3ba --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/BaseReader.php @@ -0,0 +1,161 @@ +readFilter = new DefaultReadFilter(); + } + + public function getReadDataOnly() + { + return $this->readDataOnly; + } + + public function setReadDataOnly($pValue) + { + $this->readDataOnly = (bool) $pValue; + + return $this; + } + + public function getReadEmptyCells() + { + return $this->readEmptyCells; + } + + public function setReadEmptyCells($pValue) + { + $this->readEmptyCells = (bool) $pValue; + + return $this; + } + + public function getIncludeCharts() + { + return $this->includeCharts; + } + + public function setIncludeCharts($pValue) + { + $this->includeCharts = (bool) $pValue; + + return $this; + } + + public function getLoadSheetsOnly() + { + return $this->loadSheetsOnly; + } + + public function setLoadSheetsOnly($value) + { + if ($value === null) { + return $this->setLoadAllSheets(); + } + + $this->loadSheetsOnly = is_array($value) ? $value : [$value]; + + return $this; + } + + public function setLoadAllSheets() + { + $this->loadSheetsOnly = null; + + return $this; + } + + public function getReadFilter() + { + return $this->readFilter; + } + + public function setReadFilter(IReadFilter $pValue) + { + $this->readFilter = $pValue; + + return $this; + } + + public function getSecurityScanner() + { + return $this->securityScanner; + } + + /** + * Open file for reading. + * + * @param string $pFilename + */ + protected function openFile($pFilename): void + { + if ($pFilename) { + File::assertFile($pFilename); + + // Open file + $fileHandle = fopen($pFilename, 'rb'); + } else { + $fileHandle = false; + } + if ($fileHandle !== false) { + $this->fileHandle = $fileHandle; + } else { + throw new ReaderException('Could not open file ' . $pFilename . ' for reading.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Csv.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Csv.php new file mode 100755 index 0000000..db2b50b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Csv.php @@ -0,0 +1,533 @@ +inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @return string + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + /** + * Move filepointer past any BOM marker. + */ + protected function skipBOM(): void + { + rewind($this->fileHandle); + + switch ($this->inputEncoding) { + case 'UTF-8': + fgets($this->fileHandle, 4) == "\xEF\xBB\xBF" ? + fseek($this->fileHandle, 3) : fseek($this->fileHandle, 0); + + break; + } + } + + /** + * Identify any separator that is explicitly set in the file. + */ + protected function checkSeparator(): void + { + $line = fgets($this->fileHandle); + if ($line === false) { + return; + } + + if ((strlen(trim($line, "\r\n")) == 5) && (stripos($line, 'sep=') === 0)) { + $this->delimiter = substr($line, 4, 1); + + return; + } + + $this->skipBOM(); + } + + /** + * Infer the separator if it isn't explicitly set in the file or specified by the user. + */ + protected function inferSeparator(): void + { + if ($this->delimiter !== null) { + return; + } + + $potentialDelimiters = [',', ';', "\t", '|', ':', ' ', '~']; + $counts = []; + foreach ($potentialDelimiters as $delimiter) { + $counts[$delimiter] = []; + } + + // Count how many times each of the potential delimiters appears in each line + $numberLines = 0; + while (($line = $this->getNextLine()) !== false && (++$numberLines < 1000)) { + $countLine = []; + for ($i = strlen($line) - 1; $i >= 0; --$i) { + $char = $line[$i]; + if (isset($counts[$char])) { + if (!isset($countLine[$char])) { + $countLine[$char] = 0; + } + ++$countLine[$char]; + } + } + foreach ($potentialDelimiters as $delimiter) { + $counts[$delimiter][] = $countLine[$delimiter] + ?? 0; + } + } + + // If number of lines is 0, nothing to infer : fall back to the default + if ($numberLines === 0) { + $this->delimiter = reset($potentialDelimiters); + $this->skipBOM(); + + return; + } + + // Calculate the mean square deviations for each delimiter (ignoring delimiters that haven't been found consistently) + $meanSquareDeviations = []; + $middleIdx = floor(($numberLines - 1) / 2); + + foreach ($potentialDelimiters as $delimiter) { + $series = $counts[$delimiter]; + sort($series); + + $median = ($numberLines % 2) + ? $series[$middleIdx] + : ($series[$middleIdx] + $series[$middleIdx + 1]) / 2; + + if ($median === 0) { + continue; + } + + $meanSquareDeviations[$delimiter] = array_reduce( + $series, + function ($sum, $value) use ($median) { + return $sum + ($value - $median) ** 2; + } + ) / count($series); + } + + // ... and pick the delimiter with the smallest mean square deviation (in case of ties, the order in potentialDelimiters is respected) + $min = INF; + foreach ($potentialDelimiters as $delimiter) { + if (!isset($meanSquareDeviations[$delimiter])) { + continue; + } + + if ($meanSquareDeviations[$delimiter] < $min) { + $min = $meanSquareDeviations[$delimiter]; + $this->delimiter = $delimiter; + } + } + + // If no delimiter could be detected, fall back to the default + if ($this->delimiter === null) { + $this->delimiter = reset($potentialDelimiters); + } + + $this->skipBOM(); + } + + /** + * Get the next full line from the file. + * + * @return false|string + */ + private function getNextLine() + { + $line = ''; + $enclosure = '(?escapeCharacter, '/') . ')' . preg_quote($this->enclosure, '/'); + + do { + // Get the next line in the file + $newLine = fgets($this->fileHandle); + + // Return false if there is no next line + if ($newLine === false) { + return false; + } + + // Add the new line to the line passed in + $line = $line . $newLine; + + // Drop everything that is enclosed to avoid counting false positives in enclosures + $line = preg_replace('/(' . $enclosure . '.*' . $enclosure . ')/Us', '', $line); + + // See if we have any enclosures left in the line + // if we still have an enclosure then we need to read the next line as well + } while (preg_match('/(' . $enclosure . ')/', $line) > 0); + + return $line; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + // Open file + $this->openFileOrMemory($pFilename); + $fileHandle = $this->fileHandle; + + // Skip BOM, if any + $this->skipBOM(); + $this->checkSeparator(); + $this->inferSeparator(); + + $worksheetInfo = []; + $worksheetInfo[0]['worksheetName'] = 'Worksheet'; + $worksheetInfo[0]['lastColumnLetter'] = 'A'; + $worksheetInfo[0]['lastColumnIndex'] = 0; + $worksheetInfo[0]['totalRows'] = 0; + $worksheetInfo[0]['totalColumns'] = 0; + + // Loop through each line of the file in turn + while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure, $this->escapeCharacter)) !== false) { + ++$worksheetInfo[0]['totalRows']; + $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], count($rowData) - 1); + } + + $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1); + $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; + + // Close file + fclose($fileHandle); + + return $worksheetInfo; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + private function openFileOrMemory($pFilename): void + { + // Open file + $fhandle = $this->canRead($pFilename); + if (!$fhandle) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + $this->openFile($pFilename); + if ($this->inputEncoding !== 'UTF-8') { + fclose($this->fileHandle); + $entireFile = file_get_contents($pFilename); + $this->fileHandle = fopen('php://memory', 'r+b'); + $data = StringHelper::convertEncoding($entireFile, 'UTF-8', $this->inputEncoding); + fwrite($this->fileHandle, $data); + rewind($this->fileHandle); + } + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + $lineEnding = ini_get('auto_detect_line_endings'); + ini_set('auto_detect_line_endings', true); + + // Open file + $this->openFileOrMemory($pFilename); + $fileHandle = $this->fileHandle; + + // Skip BOM, if any + $this->skipBOM(); + $this->checkSeparator(); + $this->inferSeparator(); + + // Create new PhpSpreadsheet object + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $sheet = $spreadsheet->setActiveSheetIndex($this->sheetIndex); + + // Set our starting row based on whether we're in contiguous mode or not + $currentRow = 1; + $outRow = 0; + + // Loop through each line of the file in turn + while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure, $this->escapeCharacter)) !== false) { + $noOutputYet = true; + $columnLetter = 'A'; + foreach ($rowData as $rowDatum) { + if ($rowDatum != '' && $this->readFilter->readCell($columnLetter, $currentRow)) { + if ($this->contiguous) { + if ($noOutputYet) { + $noOutputYet = false; + ++$outRow; + } + } else { + $outRow = $currentRow; + } + // Set cell value + $sheet->getCell($columnLetter . $outRow)->setValue($rowDatum); + } + ++$columnLetter; + } + ++$currentRow; + } + + // Close file + fclose($fileHandle); + + ini_set('auto_detect_line_endings', $lineEnding); + + // Return + return $spreadsheet; + } + + /** + * Get delimiter. + * + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Set delimiter. + * + * @param string $delimiter Delimiter, eg: ',' + * + * @return $this + */ + public function setDelimiter($delimiter) + { + $this->delimiter = $delimiter; + + return $this; + } + + /** + * Get enclosure. + * + * @return string + */ + public function getEnclosure() + { + return $this->enclosure; + } + + /** + * Set enclosure. + * + * @param string $enclosure Enclosure, defaults to " + * + * @return $this + */ + public function setEnclosure($enclosure) + { + if ($enclosure == '') { + $enclosure = '"'; + } + $this->enclosure = $enclosure; + + return $this; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return $this + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Set Contiguous. + * + * @param bool $contiguous + * + * @return $this + */ + public function setContiguous($contiguous) + { + $this->contiguous = (bool) $contiguous; + + return $this; + } + + /** + * Get Contiguous. + * + * @return bool + */ + public function getContiguous() + { + return $this->contiguous; + } + + /** + * Set escape backslashes. + * + * @param string $escapeCharacter + * + * @return $this + */ + public function setEscapeCharacter($escapeCharacter) + { + $this->escapeCharacter = $escapeCharacter; + + return $this; + } + + /** + * Get escape backslashes. + * + * @return string + */ + public function getEscapeCharacter() + { + return $this->escapeCharacter; + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + // Check if file exists + try { + $this->openFile($pFilename); + } catch (InvalidArgumentException $e) { + return false; + } + + fclose($this->fileHandle); + + // Trust file extension if any + $extension = strtolower(pathinfo($pFilename, PATHINFO_EXTENSION)); + if (in_array($extension, ['csv', 'tsv'])) { + return true; + } + + // Attempt to guess mimetype + $type = mime_content_type($pFilename); + $supportedTypes = [ + 'text/csv', + 'text/plain', + 'inode/x-empty', + ]; + + return in_array($type, $supportedTypes, true); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/DefaultReadFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/DefaultReadFilter.php new file mode 100755 index 0000000..e104186 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/DefaultReadFilter.php @@ -0,0 +1,20 @@ +referenceHelper = ReferenceHelper::getInstance(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + // Check if gzlib functions are available + $data = ''; + if (function_exists('gzread')) { + // Read signature data (first 3 bytes) + $fh = fopen($pFilename, 'rb'); + $data = fread($fh, 2); + fclose($fh); + } + + return $data == chr(0x1F) . chr(0x8B); + } + + private static function matchXml(string $name, string $field): bool + { + return 1 === preg_match("/^(gnm|gmr):$field$/", $name); + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $xml = new XMLReader(); + $xml->xml($this->securityScanner->scanFile('compress.zlib://' . realpath($pFilename)), null, Settings::getLibXmlLoaderOptions()); + $xml->setParserProperty(2, true); + + $worksheetNames = []; + while ($xml->read()) { + if (self::matchXml($xml->name, 'SheetName') && $xml->nodeType == XMLReader::ELEMENT) { + $xml->read(); // Move onto the value node + $worksheetNames[] = (string) $xml->value; + } elseif (self::matchXml($xml->name, 'Sheets')) { + // break out of the loop once we've got our sheet names rather than parse the entire file + break; + } + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $xml = new XMLReader(); + $xml->xml($this->securityScanner->scanFile('compress.zlib://' . realpath($pFilename)), null, Settings::getLibXmlLoaderOptions()); + $xml->setParserProperty(2, true); + + $worksheetInfo = []; + while ($xml->read()) { + if (self::matchXml($xml->name, 'Sheet') && $xml->nodeType == XMLReader::ELEMENT) { + $tmpInfo = [ + 'worksheetName' => '', + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + while ($xml->read()) { + if ($xml->nodeType == XMLReader::ELEMENT) { + if (self::matchXml($xml->name, 'Name')) { + $xml->read(); // Move onto the value node + $tmpInfo['worksheetName'] = (string) $xml->value; + } elseif (self::matchXml($xml->name, 'MaxCol')) { + $xml->read(); // Move onto the value node + $tmpInfo['lastColumnIndex'] = (int) $xml->value; + $tmpInfo['totalColumns'] = (int) $xml->value + 1; + } elseif (self::matchXml($xml->name, 'MaxRow')) { + $xml->read(); // Move onto the value node + $tmpInfo['totalRows'] = (int) $xml->value + 1; + + break; + } + } + } + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $worksheetInfo[] = $tmpInfo; + } + } + + return $worksheetInfo; + } + + /** + * @param string $filename + * + * @return string + */ + private function gzfileGetContents($filename) + { + $file = @gzopen($filename, 'rb'); + $data = ''; + if ($file !== false) { + while (!gzeof($file)) { + $data .= gzread($file, 1024); + } + gzclose($file); + } + + return $data; + } + + private static $mappings = [ + 'borderStyle' => [ + '0' => Border::BORDER_NONE, + '1' => Border::BORDER_THIN, + '2' => Border::BORDER_MEDIUM, + '3' => Border::BORDER_SLANTDASHDOT, + '4' => Border::BORDER_DASHED, + '5' => Border::BORDER_THICK, + '6' => Border::BORDER_DOUBLE, + '7' => Border::BORDER_DOTTED, + '8' => Border::BORDER_MEDIUMDASHED, + '9' => Border::BORDER_DASHDOT, + '10' => Border::BORDER_MEDIUMDASHDOT, + '11' => Border::BORDER_DASHDOTDOT, + '12' => Border::BORDER_MEDIUMDASHDOTDOT, + '13' => Border::BORDER_MEDIUMDASHDOTDOT, + ], + 'dataType' => [ + '10' => DataType::TYPE_NULL, + '20' => DataType::TYPE_BOOL, + '30' => DataType::TYPE_NUMERIC, // Integer doesn't exist in Excel + '40' => DataType::TYPE_NUMERIC, // Float + '50' => DataType::TYPE_ERROR, + '60' => DataType::TYPE_STRING, + //'70': // Cell Range + //'80': // Array + ], + 'fillType' => [ + '1' => Fill::FILL_SOLID, + '2' => Fill::FILL_PATTERN_DARKGRAY, + '3' => Fill::FILL_PATTERN_MEDIUMGRAY, + '4' => Fill::FILL_PATTERN_LIGHTGRAY, + '5' => Fill::FILL_PATTERN_GRAY125, + '6' => Fill::FILL_PATTERN_GRAY0625, + '7' => Fill::FILL_PATTERN_DARKHORIZONTAL, // horizontal stripe + '8' => Fill::FILL_PATTERN_DARKVERTICAL, // vertical stripe + '9' => Fill::FILL_PATTERN_DARKDOWN, // diagonal stripe + '10' => Fill::FILL_PATTERN_DARKUP, // reverse diagonal stripe + '11' => Fill::FILL_PATTERN_DARKGRID, // diagoanl crosshatch + '12' => Fill::FILL_PATTERN_DARKTRELLIS, // thick diagonal crosshatch + '13' => Fill::FILL_PATTERN_LIGHTHORIZONTAL, + '14' => Fill::FILL_PATTERN_LIGHTVERTICAL, + '15' => Fill::FILL_PATTERN_LIGHTUP, + '16' => Fill::FILL_PATTERN_LIGHTDOWN, + '17' => Fill::FILL_PATTERN_LIGHTGRID, // thin horizontal crosshatch + '18' => Fill::FILL_PATTERN_LIGHTTRELLIS, // thin diagonal crosshatch + ], + 'horizontal' => [ + '1' => Alignment::HORIZONTAL_GENERAL, + '2' => Alignment::HORIZONTAL_LEFT, + '4' => Alignment::HORIZONTAL_RIGHT, + '8' => Alignment::HORIZONTAL_CENTER, + '16' => Alignment::HORIZONTAL_CENTER_CONTINUOUS, + '32' => Alignment::HORIZONTAL_JUSTIFY, + '64' => Alignment::HORIZONTAL_CENTER_CONTINUOUS, + ], + 'underline' => [ + '1' => Font::UNDERLINE_SINGLE, + '2' => Font::UNDERLINE_DOUBLE, + '3' => Font::UNDERLINE_SINGLEACCOUNTING, + '4' => Font::UNDERLINE_DOUBLEACCOUNTING, + ], + 'vertical' => [ + '1' => Alignment::VERTICAL_TOP, + '2' => Alignment::VERTICAL_BOTTOM, + '4' => Alignment::VERTICAL_CENTER, + '8' => Alignment::VERTICAL_JUSTIFY, + ], + ]; + + public static function gnumericMappings(): array + { + return self::$mappings; + } + + private function docPropertiesOld(SimpleXMLElement $gnmXML): void + { + $docProps = $this->spreadsheet->getProperties(); + foreach ($gnmXML->Summary->Item as $summaryItem) { + $propertyName = $summaryItem->name; + $propertyValue = $summaryItem->{'val-string'}; + switch ($propertyName) { + case 'title': + $docProps->setTitle(trim($propertyValue)); + + break; + case 'comments': + $docProps->setDescription(trim($propertyValue)); + + break; + case 'keywords': + $docProps->setKeywords(trim($propertyValue)); + + break; + case 'category': + $docProps->setCategory(trim($propertyValue)); + + break; + case 'manager': + $docProps->setManager(trim($propertyValue)); + + break; + case 'author': + $docProps->setCreator(trim($propertyValue)); + $docProps->setLastModifiedBy(trim($propertyValue)); + + break; + case 'company': + $docProps->setCompany(trim($propertyValue)); + + break; + } + } + } + + private function docPropertiesDC(SimpleXMLElement $officePropertyDC): void + { + $docProps = $this->spreadsheet->getProperties(); + foreach ($officePropertyDC as $propertyName => $propertyValue) { + $propertyValue = trim((string) $propertyValue); + switch ($propertyName) { + case 'title': + $docProps->setTitle($propertyValue); + + break; + case 'subject': + $docProps->setSubject($propertyValue); + + break; + case 'creator': + $docProps->setCreator($propertyValue); + $docProps->setLastModifiedBy($propertyValue); + + break; + case 'date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'description': + $docProps->setDescription($propertyValue); + + break; + } + } + } + + private function docPropertiesMeta(SimpleXMLElement $officePropertyMeta, array $namespacesMeta): void + { + $docProps = $this->spreadsheet->getProperties(); + foreach ($officePropertyMeta as $propertyName => $propertyValue) { + $attributes = $propertyValue->attributes($namespacesMeta['meta']); + $propertyValue = trim((string) $propertyValue); + switch ($propertyName) { + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'initial-creator': + $docProps->setCreator($propertyValue); + $docProps->setLastModifiedBy($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'user-defined': + [, $attrName] = explode(':', $attributes['name']); + switch ($attrName) { + case 'publisher': + $docProps->setCompany($propertyValue); + + break; + case 'category': + $docProps->setCategory($propertyValue); + + break; + case 'manager': + $docProps->setManager($propertyValue); + + break; + } + + break; + } + } + } + + private function docProperties(SimpleXMLElement $xml, SimpleXMLElement $gnmXML, array $namespacesMeta): void + { + if (isset($namespacesMeta['office'])) { + $officeXML = $xml->children($namespacesMeta['office']); + $officeDocXML = $officeXML->{'document-meta'}; + $officeDocMetaXML = $officeDocXML->meta; + + foreach ($officeDocMetaXML as $officePropertyData) { + $officePropertyDC = []; + if (isset($namespacesMeta['dc'])) { + $officePropertyDC = $officePropertyData->children($namespacesMeta['dc']); + } + $this->docPropertiesDC($officePropertyDC); + + $officePropertyMeta = []; + if (isset($namespacesMeta['meta'])) { + $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); + } + $this->docPropertiesMeta($officePropertyMeta, $namespacesMeta); + } + } elseif (isset($gnmXML->Summary)) { + $this->docPropertiesOld($gnmXML); + } + } + + private function sheetMargin(string $key, float $marginSize): void + { + switch ($key) { + case 'top': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setTop($marginSize); + + break; + case 'bottom': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setBottom($marginSize); + + break; + case 'left': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setLeft($marginSize); + + break; + case 'right': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setRight($marginSize); + + break; + case 'header': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setHeader($marginSize); + + break; + case 'footer': + $this->spreadsheet->getActiveSheet()->getPageMargins()->setFooter($marginSize); + + break; + } + } + + private function sheetMargins(SimpleXMLElement $sheet): void + { + if (!$this->readDataOnly && isset($sheet->PrintInformation, $sheet->PrintInformation->Margins)) { + foreach ($sheet->PrintInformation->Margins->children($this->gnm, true) as $key => $margin) { + $marginAttributes = $margin->attributes(); + $marginSize = 72 / 100; // Default + switch ($marginAttributes['PrefUnit']) { + case 'mm': + $marginSize = (int) ($marginAttributes['Points']) / 100; + + break; + } + $this->sheetMargin($key, (float) $marginSize); + } + } + } + + private function processComments(SimpleXMLElement $sheet): void + { + if ((!$this->readDataOnly) && (isset($sheet->Objects))) { + foreach ($sheet->Objects->children($this->gnm, true) as $key => $comment) { + $commentAttributes = $comment->attributes(); + // Only comment objects are handled at the moment + if ($commentAttributes->Text) { + $this->spreadsheet->getActiveSheet()->getComment((string) $commentAttributes->ObjectBound)->setAuthor((string) $commentAttributes->Author)->setText($this->parseRichText((string) $commentAttributes->Text)); + } + } + } + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + $spreadsheet->removeSheetByIndex(0); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads from file into Spreadsheet instance. + */ + public function loadIntoExisting(string $pFilename, Spreadsheet $spreadsheet): Spreadsheet + { + $this->spreadsheet = $spreadsheet; + File::assertFile($pFilename); + + $gFileData = $this->gzfileGetContents($pFilename); + + $xml2 = simplexml_load_string($this->securityScanner->scan($gFileData), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions()); + $xml = ($xml2 !== false) ? $xml2 : new SimpleXMLElement(''); + $namespacesMeta = $xml->getNamespaces(true); + $this->gnm = array_key_exists('gmr', $namespacesMeta) ? 'gmr' : 'gnm'; + + $gnmXML = $xml->children($namespacesMeta[$this->gnm]); + $this->docProperties($xml, $gnmXML, $namespacesMeta); + + $worksheetID = 0; + foreach ($gnmXML->Sheets->Sheet as $sheet) { + $worksheetName = (string) $sheet->Name; + if ((isset($this->loadSheetsOnly)) && (!in_array($worksheetName, $this->loadSheetsOnly))) { + continue; + } + + $maxRow = $maxCol = 0; + + // Create new Worksheet + $this->spreadsheet->createSheet(); + $this->spreadsheet->setActiveSheetIndex($worksheetID); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula + // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet + // name in line with the formula, not the reverse + $this->spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + + $this->sheetMargins($sheet); + + foreach ($sheet->Cells->Cell as $cell) { + $cellAttributes = $cell->attributes(); + $row = (int) $cellAttributes->Row + 1; + $column = (int) $cellAttributes->Col; + + if ($row > $maxRow) { + $maxRow = $row; + } + if ($column > $maxCol) { + $maxCol = $column; + } + + $column = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($column, $row, $worksheetName)) { + continue; + } + } + + $ValueType = $cellAttributes->ValueType; + $ExprID = (string) $cellAttributes->ExprID; + $type = DataType::TYPE_FORMULA; + if ($ExprID > '') { + if (((string) $cell) > '') { + $this->expressions[$ExprID] = [ + 'column' => $cellAttributes->Col, + 'row' => $cellAttributes->Row, + 'formula' => (string) $cell, + ]; + } else { + $expression = $this->expressions[$ExprID]; + + $cell = $this->referenceHelper->updateFormulaReferences( + $expression['formula'], + 'A1', + $cellAttributes->Col - $expression['column'], + $cellAttributes->Row - $expression['row'], + $worksheetName + ); + } + $type = DataType::TYPE_FORMULA; + } else { + $vtype = (string) $ValueType; + if (array_key_exists($vtype, self::$mappings['dataType'])) { + $type = self::$mappings['dataType'][$vtype]; + } + if ($vtype == '20') { // Boolean + $cell = $cell == 'TRUE'; + } + } + $this->spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit((string) $cell, $type); + } + + $this->processComments($sheet); + + foreach ($sheet->Styles->StyleRegion as $styleRegion) { + $styleAttributes = $styleRegion->attributes(); + if (($styleAttributes['startRow'] <= $maxRow) && + ($styleAttributes['startCol'] <= $maxCol)) { + $startColumn = Coordinate::stringFromColumnIndex((int) $styleAttributes['startCol'] + 1); + $startRow = $styleAttributes['startRow'] + 1; + + $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol']; + $endColumn = Coordinate::stringFromColumnIndex($endColumn + 1); + $endRow = 1 + (($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']); + $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow; + + $styleAttributes = $styleRegion->Style->attributes(); + + $styleArray = []; + // We still set the number format mask for date/time values, even if readDataOnly is true + $formatCode = (string) $styleAttributes['Format']; + if (Date::isDateTimeFormatCode($formatCode)) { + $styleArray['numberFormat']['formatCode'] = $formatCode; + } + if (!$this->readDataOnly) { + // If readDataOnly is false, we set all formatting information + $styleArray['numberFormat']['formatCode'] = $formatCode; + + self::addStyle2($styleArray, 'alignment', 'horizontal', $styleAttributes['HAlign']); + self::addStyle2($styleArray, 'alignment', 'vertical', $styleAttributes['VAlign']); + $styleArray['alignment']['wrapText'] = $styleAttributes['WrapText'] == '1'; + $styleArray['alignment']['textRotation'] = $this->calcRotation($styleAttributes); + $styleArray['alignment']['shrinkToFit'] = $styleAttributes['ShrinkToFit'] == '1'; + $styleArray['alignment']['indent'] = ((int) ($styleAttributes['Indent']) > 0) ? $styleAttributes['indent'] : 0; + + $this->addColors($styleArray, $styleAttributes); + + $fontAttributes = $styleRegion->Style->Font->attributes(); + $styleArray['font']['name'] = (string) $styleRegion->Style->Font; + $styleArray['font']['size'] = (int) ($fontAttributes['Unit']); + $styleArray['font']['bold'] = $fontAttributes['Bold'] == '1'; + $styleArray['font']['italic'] = $fontAttributes['Italic'] == '1'; + $styleArray['font']['strikethrough'] = $fontAttributes['StrikeThrough'] == '1'; + self::addStyle2($styleArray, 'font', 'underline', $fontAttributes['Underline']); + + switch ($fontAttributes['Script']) { + case '1': + $styleArray['font']['superscript'] = true; + + break; + case '-1': + $styleArray['font']['subscript'] = true; + + break; + } + + if (isset($styleRegion->Style->StyleBorder)) { + $srssb = $styleRegion->Style->StyleBorder; + $this->addBorderStyle($srssb, $styleArray, 'top'); + $this->addBorderStyle($srssb, $styleArray, 'bottom'); + $this->addBorderStyle($srssb, $styleArray, 'left'); + $this->addBorderStyle($srssb, $styleArray, 'right'); + $this->addBorderDiagonal($srssb, $styleArray); + } + if (isset($styleRegion->Style->HyperLink)) { + // TO DO + $hyperlink = $styleRegion->Style->HyperLink->attributes(); + } + } + $this->spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($styleArray); + } + } + + $this->processColumnWidths($sheet, $maxCol); + $this->processRowHeights($sheet, $maxRow); + $this->processMergedCells($sheet); + + ++$worksheetID; + } + + $this->processDefinedNames($gnmXML); + + // Return + return $this->spreadsheet; + } + + private function addBorderDiagonal(SimpleXMLElement $srssb, array &$styleArray): void + { + if (isset($srssb->Diagonal, $srssb->{'Rev-Diagonal'})) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->Diagonal->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_BOTH; + } elseif (isset($srssb->Diagonal)) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->Diagonal->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_UP; + } elseif (isset($srssb->{'Rev-Diagonal'})) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($srssb->{'Rev-Diagonal'}->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_DOWN; + } + } + + private function addBorderStyle(SimpleXMLElement $srssb, array &$styleArray, string $direction): void + { + $ucDirection = ucfirst($direction); + if (isset($srssb->$ucDirection)) { + $styleArray['borders'][$direction] = self::parseBorderAttributes($srssb->$ucDirection->attributes()); + } + } + + private function processMergedCells(SimpleXMLElement $sheet): void + { + // Handle Merged Cells in this worksheet + if (isset($sheet->MergedRegions)) { + foreach ($sheet->MergedRegions->Merge as $mergeCells) { + if (strpos($mergeCells, ':') !== false) { + $this->spreadsheet->getActiveSheet()->mergeCells($mergeCells); + } + } + } + } + + private function processColumnLoop(int $c, int $maxCol, SimpleXMLElement $columnOverride, float $defaultWidth): int + { + $columnAttributes = $columnOverride->attributes(); + $column = $columnAttributes['No']; + $columnWidth = ((float) $columnAttributes['Unit']) / 5.4; + $hidden = (isset($columnAttributes['Hidden'])) && ((string) $columnAttributes['Hidden'] == '1'); + $columnCount = (isset($columnAttributes['Count'])) ? $columnAttributes['Count'] : 1; + while ($c < $column) { + $this->spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($defaultWidth); + ++$c; + } + while (($c < ($column + $columnCount)) && ($c <= $maxCol)) { + $this->spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($columnWidth); + if ($hidden) { + $this->spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setVisible(false); + } + ++$c; + } + + return $c; + } + + private function processColumnWidths(SimpleXMLElement $sheet, int $maxCol): void + { + if ((!$this->readDataOnly) && (isset($sheet->Cols))) { + // Column Widths + $columnAttributes = $sheet->Cols->attributes(); + $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4; + $c = 0; + foreach ($sheet->Cols->ColInfo as $columnOverride) { + $c = $this->processColumnLoop($c, $maxCol, $columnOverride, $defaultWidth); + } + while ($c <= $maxCol) { + $this->spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($defaultWidth); + ++$c; + } + } + } + + private function processRowLoop(int $r, int $maxRow, SimpleXMLElement $rowOverride, float $defaultHeight): int + { + $rowAttributes = $rowOverride->attributes(); + $row = $rowAttributes['No']; + $rowHeight = (float) $rowAttributes['Unit']; + $hidden = (isset($rowAttributes['Hidden'])) && ((string) $rowAttributes['Hidden'] == '1'); + $rowCount = (isset($rowAttributes['Count'])) ? $rowAttributes['Count'] : 1; + while ($r < $row) { + ++$r; + $this->spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); + } + while (($r < ($row + $rowCount)) && ($r < $maxRow)) { + ++$r; + $this->spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($rowHeight); + if ($hidden) { + $this->spreadsheet->getActiveSheet()->getRowDimension($r)->setVisible(false); + } + } + + return $r; + } + + private function processRowHeights(SimpleXMLElement $sheet, int $maxRow): void + { + if ((!$this->readDataOnly) && (isset($sheet->Rows))) { + // Row Heights + $rowAttributes = $sheet->Rows->attributes(); + $defaultHeight = (float) $rowAttributes['DefaultSizePts']; + $r = 0; + + foreach ($sheet->Rows->RowInfo as $rowOverride) { + $r = $this->processRowLoop($r, $maxRow, $rowOverride, $defaultHeight); + } + // never executed, I can't figure out any circumstances + // under which it would be executed, and, even if + // such exist, I'm not convinced this is needed. + //while ($r < $maxRow) { + // ++$r; + // $this->spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); + //} + } + } + + private function processDefinedNames(SimpleXMLElement $gnmXML): void + { + // Loop through definedNames (global named ranges) + if (isset($gnmXML->Names)) { + foreach ($gnmXML->Names->Name as $namedRange) { + $name = (string) $namedRange->name; + $range = (string) $namedRange->value; + if (stripos($range, '#REF!') !== false) { + continue; + } + + $range = Worksheet::extractSheetTitle($range, true); + $range[0] = trim($range[0], "'"); + if ($worksheet = $this->spreadsheet->getSheetByName($range[0])) { + $extractedRange = str_replace('$', '', $range[1]); + $this->spreadsheet->addNamedRange(new NamedRange($name, $worksheet, $extractedRange)); + } + } + } + } + + private function calcRotation(SimpleXMLElement $styleAttributes): int + { + $rotation = (int) $styleAttributes->Rotation; + if ($rotation >= 270 && $rotation <= 360) { + $rotation -= 360; + } + $rotation = (abs($rotation) > 90) ? 0 : $rotation; + + return $rotation; + } + + private static function addStyle(array &$styleArray, string $key, string $value): void + { + if (array_key_exists($value, self::$mappings[$key])) { + $styleArray[$key] = self::$mappings[$key][$value]; + } + } + + private static function addStyle2(array &$styleArray, string $key1, string $key, string $value): void + { + if (array_key_exists($value, self::$mappings[$key])) { + $styleArray[$key1][$key] = self::$mappings[$key][$value]; + } + } + + private static function parseBorderAttributes($borderAttributes) + { + $styleArray = []; + if (isset($borderAttributes['Color'])) { + $styleArray['color']['rgb'] = self::parseGnumericColour($borderAttributes['Color']); + } + + self::addStyle($styleArray, 'borderStyle', $borderAttributes['Style']); + + return $styleArray; + } + + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } + + private static function parseGnumericColour($gnmColour) + { + [$gnmR, $gnmG, $gnmB] = explode(':', $gnmColour); + $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2); + $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2); + $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2); + + return $gnmR . $gnmG . $gnmB; + } + + private function addColors(array &$styleArray, SimpleXMLElement $styleAttributes): void + { + $RGB = self::parseGnumericColour($styleAttributes['Fore']); + $styleArray['font']['color']['rgb'] = $RGB; + $RGB = self::parseGnumericColour($styleAttributes['Back']); + $shade = (string) $styleAttributes['Shade']; + if (($RGB != '000000') || ($shade != '0')) { + $RGB2 = self::parseGnumericColour($styleAttributes['PatternColor']); + if ($shade == '1') { + $styleArray['fill']['startColor']['rgb'] = $RGB; + $styleArray['fill']['endColor']['rgb'] = $RGB2; + } else { + $styleArray['fill']['endColor']['rgb'] = $RGB; + $styleArray['fill']['startColor']['rgb'] = $RGB2; + } + self::addStyle2($styleArray, 'fill', 'fillType', $shade); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Html.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Html.php new file mode 100755 index 0000000..d59e474 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Html.php @@ -0,0 +1,971 @@ + [ + 'font' => [ + 'bold' => true, + 'size' => 24, + ], + ], // Bold, 24pt + 'h2' => [ + 'font' => [ + 'bold' => true, + 'size' => 18, + ], + ], // Bold, 18pt + 'h3' => [ + 'font' => [ + 'bold' => true, + 'size' => 13.5, + ], + ], // Bold, 13.5pt + 'h4' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ], + ], // Bold, 12pt + 'h5' => [ + 'font' => [ + 'bold' => true, + 'size' => 10, + ], + ], // Bold, 10pt + 'h6' => [ + 'font' => [ + 'bold' => true, + 'size' => 7.5, + ], + ], // Bold, 7.5pt + 'a' => [ + 'font' => [ + 'underline' => true, + 'color' => [ + 'argb' => Color::COLOR_BLUE, + ], + ], + ], // Blue underlined + 'hr' => [ + 'borders' => [ + 'bottom' => [ + 'borderStyle' => Border::BORDER_THIN, + 'color' => [ + Color::COLOR_BLACK, + ], + ], + ], + ], // Bottom border + 'strong' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'b' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'i' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic + 'em' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic + ]; + + protected $rowspan = []; + + /** + * Create a new HTML Reader instance. + */ + public function __construct() + { + parent::__construct(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Validate that the current file is an HTML file. + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + // Check if file exists + try { + $this->openFile($pFilename); + } catch (Exception $e) { + return false; + } + + $beginning = $this->readBeginning(); + $startWithTag = self::startsWithTag($beginning); + $containsTags = self::containsTags($beginning); + $endsWithTag = self::endsWithTag($this->readEnding()); + + fclose($this->fileHandle); + + return $startWithTag && $containsTags && $endsWithTag; + } + + private function readBeginning() + { + fseek($this->fileHandle, 0); + + return fread($this->fileHandle, self::TEST_SAMPLE_SIZE); + } + + private function readEnding() + { + $meta = stream_get_meta_data($this->fileHandle); + $filename = $meta['uri']; + + $size = filesize($filename); + if ($size === 0) { + return ''; + } + + $blockSize = self::TEST_SAMPLE_SIZE; + if ($size < $blockSize) { + $blockSize = $size; + } + + fseek($this->fileHandle, $size - $blockSize); + + return fread($this->fileHandle, $blockSize); + } + + private static function startsWithTag($data) + { + return '<' === substr(trim($data), 0, 1); + } + + private static function endsWithTag($data) + { + return '>' === substr(trim($data), -1, 1); + } + + private static function containsTags($data) + { + return strlen($data) !== strlen(strip_tags($data)); + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Set input encoding. + * + * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return $this + */ + public function setInputEncoding($pValue) + { + $this->inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @return string + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + // Data Array used for testing only, should write to Spreadsheet object on completion of tests + protected $dataArray = []; + + protected $tableLevel = 0; + + protected $nestedColumn = ['A']; + + protected function setTableStartColumn($column) + { + if ($this->tableLevel == 0) { + $column = 'A'; + } + ++$this->tableLevel; + $this->nestedColumn[$this->tableLevel] = $column; + + return $this->nestedColumn[$this->tableLevel]; + } + + protected function getTableStartColumn() + { + return $this->nestedColumn[$this->tableLevel]; + } + + protected function releaseTableStartColumn() + { + --$this->tableLevel; + + return array_pop($this->nestedColumn); + } + + protected function flushCell(Worksheet $sheet, $column, $row, &$cellContent): void + { + if (is_string($cellContent)) { + // Simple String content + if (trim($cellContent) > '') { + // Only actually write it if there's content in the string + // Write to worksheet to be done here... + // ... we return the cell so we can mess about with styles more easily + $sheet->setCellValue($column . $row, $cellContent); + $this->dataArray[$row][$column] = $cellContent; + } + } else { + // We have a Rich Text run + // TODO + $this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent; + } + $cellContent = (string) ''; + } + + /** + * @param int $row + * @param string $column + * @param string $cellContent + */ + protected function processDomElement(DOMNode $element, Worksheet $sheet, &$row, &$column, &$cellContent): void + { + foreach ($element->childNodes as $child) { + if ($child instanceof DOMText) { + $domText = preg_replace('/\s+/u', ' ', trim($child->nodeValue)); + if (is_string($cellContent)) { + // simply append the text if the cell content is a plain text string + $cellContent .= $domText; + } + // but if we have a rich text run instead, we need to append it correctly + // TODO + } elseif ($child instanceof DOMElement) { + $attributeArray = []; + foreach ($child->attributes as $attribute) { + $attributeArray[$attribute->name] = $attribute->value; + } + + switch ($child->nodeName) { + case 'meta': + foreach ($attributeArray as $attributeName => $attributeValue) { + // Extract character set, so we can convert to UTF-8 if required + if ($attributeName === 'charset') { + $this->setInputEncoding($attributeValue); + } + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'title': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $sheet->setTitle($cellContent, true, false); + $cellContent = ''; + + break; + case 'span': + case 'div': + case 'font': + case 'i': + case 'em': + case 'strong': + case 'b': + if (isset($attributeArray['class']) && $attributeArray['class'] === 'comment') { + $sheet->getComment($column . $row) + ->getText() + ->createTextRun($child->textContent); + + break; + } + + if ($cellContent > '') { + $cellContent .= ' '; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + if ($cellContent > '') { + $cellContent .= ' '; + } + + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + break; + case 'hr': + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } else { + $cellContent = '----------'; + $this->flushCell($sheet, $column, $row, $cellContent); + } + ++$row; + // Add a break after a horizontal rule, simply by allowing the code to dropthru + // no break + case 'br': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n and set the cell to wrap + $cellContent .= "\n"; + $sheet->getStyle($column . $row)->getAlignment()->setWrapText(true); + } else { + // Otherwise flush our existing content and move the row cursor on + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + } + + break; + case 'a': + foreach ($attributeArray as $attributeName => $attributeValue) { + switch ($attributeName) { + case 'href': + $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue); + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + break; + case 'class': + if ($attributeValue === 'comment-indicator') { + break; // Ignore - it's just a red square. + } + } + } + $cellContent .= ' '; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + case 'ol': + case 'ul': + case 'p': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n + $cellContent .= "\n"; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } else { + if ($cellContent > '') { + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent); + + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + ++$row; + $column = 'A'; + } + + break; + case 'li': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n + $cellContent .= "\n"; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } else { + if ($cellContent > '') { + $this->flushCell($sheet, $column, $row, $cellContent); + } + ++$row; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent); + $column = 'A'; + } + + break; + case 'img': + $this->insertImage($sheet, $column, $row, $attributeArray); + + break; + case 'table': + $this->flushCell($sheet, $column, $row, $cellContent); + $column = $this->setTableStartColumn($column); + if ($this->tableLevel > 1) { + --$row; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $column = $this->releaseTableStartColumn(); + if ($this->tableLevel > 1) { + ++$column; + } else { + ++$row; + } + + break; + case 'thead': + case 'tbody': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'tr': + $column = $this->getTableStartColumn(); + $cellContent = ''; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + + ++$row; + + break; + case 'th': + case 'td': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + while (isset($this->rowspan[$column . $row])) { + ++$column; + } + + // apply inline style + $this->applyInlineStyle($sheet, $row, $column, $attributeArray); + + $this->flushCell($sheet, $column, $row, $cellContent); + + if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) { + //create merging rowspan and colspan + $columnTo = $column; + for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $range = $column . $row . ':' . $columnTo . ($row + (int) $attributeArray['rowspan'] - 1); + foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { + $this->rowspan[$value] = true; + } + $sheet->mergeCells($range); + $column = $columnTo; + } elseif (isset($attributeArray['rowspan'])) { + //create merging rowspan + $range = $column . $row . ':' . $column . ($row + (int) $attributeArray['rowspan'] - 1); + foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { + $this->rowspan[$value] = true; + } + $sheet->mergeCells($range); + } elseif (isset($attributeArray['colspan'])) { + //create merging colspan + $columnTo = $column; + for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $sheet->mergeCells($column . $row . ':' . $columnTo . $row); + $column = $columnTo; + } elseif (isset($attributeArray['bgcolor'])) { + $sheet->getStyle($column . $row)->applyFromArray( + [ + 'fill' => [ + 'fillType' => Fill::FILL_SOLID, + 'color' => ['rgb' => $attributeArray['bgcolor']], + ], + ] + ); + } + + if (isset($attributeArray['width'])) { + $sheet->getColumnDimension($column)->setWidth($attributeArray['width']); + } + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + + if (isset($attributeArray['align'])) { + $sheet->getStyle($column . $row)->getAlignment()->setHorizontal($attributeArray['align']); + } + + if (isset($attributeArray['valign'])) { + $sheet->getStyle($column . $row)->getAlignment()->setVertical($attributeArray['valign']); + } + + if (isset($attributeArray['data-format'])) { + $sheet->getStyle($column . $row)->getNumberFormat()->setFormatCode($attributeArray['data-format']); + } + + ++$column; + + break; + case 'body': + $row = 1; + $column = 'A'; + $cellContent = ''; + $this->tableLevel = 0; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + default: + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } + } + } + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + // Validate + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid HTML file.'); + } + + // Create a new DOM object + $dom = new DOMDocument(); + // Reload the HTML file into the DOM object + $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanner->scanFile($pFilename), 'HTML-ENTITIES', 'UTF-8')); + if ($loaded === false) { + throw new Exception('Failed to load ' . $pFilename . ' as a DOM Document'); + } + + return $this->loadDocument($dom, $spreadsheet); + } + + /** + * Spreadsheet from content. + * + * @param string $content + */ + public function loadFromString($content, ?Spreadsheet $spreadsheet = null): Spreadsheet + { + // Create a new DOM object + $dom = new DOMDocument(); + // Reload the HTML file into the DOM object + $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanner->scan($content), 'HTML-ENTITIES', 'UTF-8')); + if ($loaded === false) { + throw new Exception('Failed to load content as a DOM Document'); + } + + return $this->loadDocument($dom, $spreadsheet ?? new Spreadsheet()); + } + + /** + * Loads PhpSpreadsheet from DOMDocument into PhpSpreadsheet instance. + */ + private function loadDocument(DOMDocument $document, Spreadsheet $spreadsheet): Spreadsheet + { + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $spreadsheet->setActiveSheetIndex($this->sheetIndex); + + // Discard white space + $document->preserveWhiteSpace = false; + + $row = 0; + $column = 'A'; + $content = ''; + $this->rowspan = []; + $this->processDomElement($document, $spreadsheet->getActiveSheet(), $row, $column, $content); + + // Return + return $spreadsheet; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return $this + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Apply inline css inline style. + * + * NOTES : + * Currently only intended for td & th element, + * and only takes 'background-color' and 'color'; property with HEX color + * + * TODO : + * - Implement to other propertie, such as border + * + * @param Worksheet $sheet + * @param int $row + * @param string $column + * @param array $attributeArray + */ + private function applyInlineStyle(&$sheet, $row, $column, $attributeArray): void + { + if (!isset($attributeArray['style'])) { + return; + } + + if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) { + $columnTo = $column; + for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $range = $column . $row . ':' . $columnTo . ($row + (int) $attributeArray['rowspan'] - 1); + $cellStyle = $sheet->getStyle($range); + } elseif (isset($attributeArray['rowspan'])) { + $range = $column . $row . ':' . $column . ($row + (int) $attributeArray['rowspan'] - 1); + $cellStyle = $sheet->getStyle($range); + } elseif (isset($attributeArray['colspan'])) { + $columnTo = $column; + for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $range = $column . $row . ':' . $columnTo . $row; + $cellStyle = $sheet->getStyle($range); + } else { + $cellStyle = $sheet->getStyle($column . $row); + } + + // add color styles (background & text) from dom element,currently support : td & th, using ONLY inline css style with RGB color + $styles = explode(';', $attributeArray['style']); + foreach ($styles as $st) { + $value = explode(':', $st); + $styleName = isset($value[0]) ? trim($value[0]) : null; + $styleValue = isset($value[1]) ? trim($value[1]) : null; + + if (!$styleName) { + continue; + } + + switch ($styleName) { + case 'background': + case 'background-color': + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['fill' => ['fillType' => Fill::FILL_SOLID, 'color' => ['rgb' => $styleColor]]]); + + break; + case 'color': + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['font' => ['color' => ['rgb' => $styleColor]]]); + + break; + + case 'border': + $this->setBorderStyle($cellStyle, $styleValue, 'allBorders'); + + break; + + case 'border-top': + $this->setBorderStyle($cellStyle, $styleValue, 'top'); + + break; + + case 'border-bottom': + $this->setBorderStyle($cellStyle, $styleValue, 'bottom'); + + break; + + case 'border-left': + $this->setBorderStyle($cellStyle, $styleValue, 'left'); + + break; + + case 'border-right': + $this->setBorderStyle($cellStyle, $styleValue, 'right'); + + break; + + case 'font-size': + $cellStyle->getFont()->setSize( + (float) $styleValue + ); + + break; + + case 'font-weight': + if ($styleValue === 'bold' || $styleValue >= 500) { + $cellStyle->getFont()->setBold(true); + } + + break; + + case 'font-style': + if ($styleValue === 'italic') { + $cellStyle->getFont()->setItalic(true); + } + + break; + + case 'font-family': + $cellStyle->getFont()->setName(str_replace('\'', '', $styleValue)); + + break; + + case 'text-decoration': + switch ($styleValue) { + case 'underline': + $cellStyle->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + + break; + case 'line-through': + $cellStyle->getFont()->setStrikethrough(true); + + break; + } + + break; + + case 'text-align': + $cellStyle->getAlignment()->setHorizontal($styleValue); + + break; + + case 'vertical-align': + $cellStyle->getAlignment()->setVertical($styleValue); + + break; + + case 'width': + $sheet->getColumnDimension($column)->setWidth( + str_replace('px', '', $styleValue) + ); + + break; + + case 'height': + $sheet->getRowDimension($row)->setRowHeight( + str_replace('px', '', $styleValue) + ); + + break; + + case 'word-wrap': + $cellStyle->getAlignment()->setWrapText( + $styleValue === 'break-word' + ); + + break; + + case 'text-indent': + $cellStyle->getAlignment()->setIndent( + (int) str_replace(['px'], '', $styleValue) + ); + + break; + } + } + } + + /** + * Check if has #, so we can get clean hex. + * + * @param $value + * + * @return null|string + */ + public function getStyleColor($value) + { + if (strpos($value, '#') === 0) { + return substr($value, 1); + } + + return null; + } + + /** + * @param string $column + * @param int $row + */ + private function insertImage(Worksheet $sheet, $column, $row, array $attributes): void + { + if (!isset($attributes['src'])) { + return; + } + + $src = urldecode($attributes['src']); + $width = isset($attributes['width']) ? (float) $attributes['width'] : null; + $height = isset($attributes['height']) ? (float) $attributes['height'] : null; + $name = isset($attributes['alt']) ? (float) $attributes['alt'] : null; + + $drawing = new Drawing(); + $drawing->setPath($src); + $drawing->setWorksheet($sheet); + $drawing->setCoordinates($column . $row); + $drawing->setOffsetX(0); + $drawing->setOffsetY(10); + $drawing->setResizeProportional(true); + + if ($name) { + $drawing->setName($name); + } + + if ($width) { + $drawing->setWidth((int) $width); + } + + if ($height) { + $drawing->setHeight((int) $height); + } + + $sheet->getColumnDimension($column)->setWidth( + $drawing->getWidth() / 6 + ); + + $sheet->getRowDimension($row)->setRowHeight( + $drawing->getHeight() * 0.9 + ); + } + + /** + * Map html border style to PhpSpreadsheet border style. + * + * @param string $style + * + * @return null|string + */ + public function getBorderStyle($style) + { + switch ($style) { + case 'solid': + return Border::BORDER_THIN; + case 'dashed': + return Border::BORDER_DASHED; + case 'dotted': + return Border::BORDER_DOTTED; + case 'medium': + return Border::BORDER_MEDIUM; + case 'thick': + return Border::BORDER_THICK; + case 'none': + return Border::BORDER_NONE; + case 'dash-dot': + return Border::BORDER_DASHDOT; + case 'dash-dot-dot': + return Border::BORDER_DASHDOTDOT; + case 'double': + return Border::BORDER_DOUBLE; + case 'hair': + return Border::BORDER_HAIR; + case 'medium-dash-dot': + return Border::BORDER_MEDIUMDASHDOT; + case 'medium-dash-dot-dot': + return Border::BORDER_MEDIUMDASHDOTDOT; + case 'medium-dashed': + return Border::BORDER_MEDIUMDASHED; + case 'slant-dash-dot': + return Border::BORDER_SLANTDASHDOT; + } + + return null; + } + + /** + * @param string $styleValue + * @param string $type + */ + private function setBorderStyle(Style $cellStyle, $styleValue, $type): void + { + if (trim($styleValue) === Border::BORDER_NONE) { + $borderStyle = Border::BORDER_NONE; + $color = null; + } else { + [, $borderStyle, $color] = explode(' ', $styleValue); + } + + $cellStyle->applyFromArray([ + 'borders' => [ + $type => [ + 'borderStyle' => $this->getBorderStyle($borderStyle), + 'color' => ['rgb' => $this->getStyleColor($color)], + ], + ], + ]); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/IReadFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/IReadFilter.php new file mode 100755 index 0000000..ccfe05a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/IReadFilter.php @@ -0,0 +1,17 @@ +securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + $mimeType = 'UNKNOWN'; + + // Load file + + $zip = new ZipArchive(); + if ($zip->open($pFilename) === true) { + // check if it is an OOXML archive + $stat = $zip->statName('mimetype'); + if ($stat && ($stat['size'] <= 255)) { + $mimeType = $zip->getFromName($stat['name']); + } elseif ($zip->statName('META-INF/manifest.xml')) { + $xml = simplexml_load_string( + $this->securityScanner->scan($zip->getFromName('META-INF/manifest.xml')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $namespacesContent = $xml->getNamespaces(true); + if (isset($namespacesContent['manifest'])) { + $manifest = $xml->children($namespacesContent['manifest']); + foreach ($manifest as $manifestDataSet) { + $manifestAttributes = $manifestDataSet->attributes($namespacesContent['manifest']); + if ($manifestAttributes->{'full-path'} == '/') { + $mimeType = (string) $manifestAttributes->{'media-type'}; + + break; + } + } + } + } + + $zip->close(); + + return $mimeType === 'application/vnd.oasis.opendocument.spreadsheet'; + } + + return false; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object. + * + * @param string $pFilename + * + * @return string[] + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); + } + + $worksheetNames = []; + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + // Step into the first level of content of the XML + $xml->read(); + while ($xml->read()) { + // Quickly jump through to the office:body node + while ($xml->name !== 'office:body') { + if ($xml->isEmptyElement) { + $xml->read(); + } else { + $xml->next(); + } + } + // Now read each node until we find our first table:table node + while ($xml->read()) { + if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { + // Loop through each table:table node reading the table:name attribute for each worksheet name + do { + $worksheetNames[] = $xml->getAttribute('table:name'); + $xml->next(); + } while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT); + } + } + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); + } + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + // Step into the first level of content of the XML + $xml->read(); + while ($xml->read()) { + // Quickly jump through to the office:body node + while ($xml->name !== 'office:body') { + if ($xml->isEmptyElement) { + $xml->read(); + } else { + $xml->next(); + } + } + // Now read each node until we find our first table:table node + while ($xml->read()) { + if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { + $worksheetNames[] = $xml->getAttribute('table:name'); + + $tmpInfo = [ + 'worksheetName' => $xml->getAttribute('table:name'), + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + // Loop through each child node of the table:table element reading + $currCells = 0; + do { + $xml->read(); + if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) { + $rowspan = $xml->getAttribute('table:number-rows-repeated'); + $rowspan = empty($rowspan) ? 1 : $rowspan; + $tmpInfo['totalRows'] += $rowspan; + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $currCells = 0; + // Step into the row + $xml->read(); + do { + if ($xml->name == 'table:table-cell' && $xml->nodeType == XMLReader::ELEMENT) { + if (!$xml->isEmptyElement) { + ++$currCells; + $xml->next(); + } else { + $xml->read(); + } + } elseif ($xml->name == 'table:covered-table-cell' && $xml->nodeType == XMLReader::ELEMENT) { + $mergeSize = $xml->getAttribute('table:number-columns-repeated'); + $currCells += (int) $mergeSize; + $xml->read(); + } else { + $xml->read(); + } + } while ($xml->name != 'table:table-row'); + } + } while ($xml->name != 'table:table'); + + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $worksheetInfo[] = $tmpInfo; + } + } + } + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + File::assertFile($pFilename); + + $timezoneObj = new DateTimeZone('Europe/London'); + $GMT = new DateTimeZone('UTC'); + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception("Could not open {$pFilename} for reading! Error opening file."); + } + + // Meta + + $xml = simplexml_load_string( + $this->securityScanner->scan($zip->getFromName('meta.xml')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($xml === false) { + throw new Exception('Unable to read data from {$pFilename}'); + } + + $namespacesMeta = $xml->getNamespaces(true); + + (new DocumentProperties($spreadsheet))->load($xml, $namespacesMeta); + + // Content + + $dom = new DOMDocument('1.01', 'UTF-8'); + $dom->loadXML( + $this->securityScanner->scan($zip->getFromName('content.xml')), + Settings::getLibXmlLoaderOptions() + ); + + $officeNs = $dom->lookupNamespaceUri('office'); + $tableNs = $dom->lookupNamespaceUri('table'); + $textNs = $dom->lookupNamespaceUri('text'); + $xlinkNs = $dom->lookupNamespaceUri('xlink'); + + $spreadsheets = $dom->getElementsByTagNameNS($officeNs, 'body') + ->item(0) + ->getElementsByTagNameNS($officeNs, 'spreadsheet'); + + foreach ($spreadsheets as $workbookData) { + /** @var DOMElement $workbookData */ + $tables = $workbookData->getElementsByTagNameNS($tableNs, 'table'); + + $worksheetID = 0; + foreach ($tables as $worksheetDataSet) { + /** @var DOMElement $worksheetDataSet */ + $worksheetName = $worksheetDataSet->getAttributeNS($tableNs, 'name'); + + // Check loadSheetsOnly + if (isset($this->loadSheetsOnly) + && $worksheetName + && !in_array($worksheetName, $this->loadSheetsOnly)) { + continue; + } + + // Create sheet + if ($worksheetID > 0) { + $spreadsheet->createSheet(); // First sheet is added by default + } + $spreadsheet->setActiveSheetIndex($worksheetID); + + if ($worksheetName) { + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in + // formula cells... during the load, all formulae should be correct, and we're simply + // bringing the worksheet name in line with the formula, not the reverse + $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + } + + // Go through every child of table element + $rowID = 1; + foreach ($worksheetDataSet->childNodes as $childNode) { + /** @var DOMElement $childNode */ + + // Filter elements which are not under the "table" ns + if ($childNode->namespaceURI != $tableNs) { + continue; + } + + $key = $childNode->nodeName; + + // Remove ns from node name + if (strpos($key, ':') !== false) { + $keyChunks = explode(':', $key); + $key = array_pop($keyChunks); + } + + switch ($key) { + case 'table-header-rows': + /// TODO :: Figure this out. This is only a partial implementation I guess. + // ($rowData it's not used at all and I'm not sure that PHPExcel + // has an API for this) + +// foreach ($rowData as $keyRowData => $cellData) { +// $rowData = $cellData; +// break; +// } + break; + case 'table-row': + if ($childNode->hasAttributeNS($tableNs, 'number-rows-repeated')) { + $rowRepeats = $childNode->getAttributeNS($tableNs, 'number-rows-repeated'); + } else { + $rowRepeats = 1; + } + + $columnID = 'A'; + foreach ($childNode->childNodes as $key => $cellData) { + // @var \DOMElement $cellData + + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; + + continue; + } + } + + // Initialize variables + $formatting = $hyperlink = null; + $hasCalculatedValue = false; + $cellDataFormula = ''; + + if ($cellData->hasAttributeNS($tableNs, 'formula')) { + $cellDataFormula = $cellData->getAttributeNS($tableNs, 'formula'); + $hasCalculatedValue = true; + } + + // Annotations + $annotation = $cellData->getElementsByTagNameNS($officeNs, 'annotation'); + + if ($annotation->length > 0) { + $textNode = $annotation->item(0)->getElementsByTagNameNS($textNs, 'p'); + + if ($textNode->length > 0) { + $text = $this->scanElementForText($textNode->item(0)); + + $spreadsheet->getActiveSheet() + ->getComment($columnID . $rowID) + ->setText($this->parseRichText($text)); +// ->setAuthor( $author ) + } + } + + // Content + + /** @var DOMElement[] $paragraphs */ + $paragraphs = []; + + foreach ($cellData->childNodes as $item) { + /** @var DOMElement $item */ + + // Filter text:p elements + if ($item->nodeName == 'text:p') { + $paragraphs[] = $item; + } + } + + if (count($paragraphs) > 0) { + // Consolidate if there are multiple p records (maybe with spans as well) + $dataArray = []; + + // Text can have multiple text:p and within those, multiple text:span. + // text:p newlines, but text:span does not. + // Also, here we assume there is no text data is span fields are specified, since + // we have no way of knowing proper positioning anyway. + + foreach ($paragraphs as $pData) { + $dataArray[] = $this->scanElementForText($pData); + } + $allCellDataText = implode("\n", $dataArray); + + $type = $cellData->getAttributeNS($officeNs, 'value-type'); + + switch ($type) { + case 'string': + $type = DataType::TYPE_STRING; + $dataValue = $allCellDataText; + + foreach ($paragraphs as $paragraph) { + $link = $paragraph->getElementsByTagNameNS($textNs, 'a'); + if ($link->length > 0) { + $hyperlink = $link->item(0)->getAttributeNS($xlinkNs, 'href'); + } + } + + break; + case 'boolean': + $type = DataType::TYPE_BOOL; + $dataValue = ($allCellDataText == 'TRUE') ? true : false; + + break; + case 'percentage': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + $dataValue = (int) $dataValue; + } + $formatting = NumberFormat::FORMAT_PERCENTAGE_00; + + break; + case 'currency': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + $dataValue = (int) $dataValue; + } + $formatting = NumberFormat::FORMAT_CURRENCY_USD_SIMPLE; + + break; + case 'float': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + if ($dataValue == (int) $dataValue) { + $dataValue = (int) $dataValue; + } else { + $dataValue = (float) $dataValue; + } + } + + break; + case 'date': + $type = DataType::TYPE_NUMERIC; + $value = $cellData->getAttributeNS($officeNs, 'date-value'); + + $dateObj = new DateTime($value, $GMT); + $dateObj->setTimeZone($timezoneObj); + [$year, $month, $day, $hour, $minute, $second] = explode( + ' ', + $dateObj->format('Y m d H i s') + ); + + $dataValue = Date::formattedPHPToExcel( + (int) $year, + (int) $month, + (int) $day, + (int) $hour, + (int) $minute, + (int) $second + ); + + if ($dataValue != floor($dataValue)) { + $formatting = NumberFormat::FORMAT_DATE_XLSX15 + . ' ' + . NumberFormat::FORMAT_DATE_TIME4; + } else { + $formatting = NumberFormat::FORMAT_DATE_XLSX15; + } + + break; + case 'time': + $type = DataType::TYPE_NUMERIC; + + $timeValue = $cellData->getAttributeNS($officeNs, 'time-value'); + + $dataValue = Date::PHPToExcel( + strtotime( + '01-01-1970 ' . implode(':', sscanf($timeValue, 'PT%dH%dM%dS')) + ) + ); + $formatting = NumberFormat::FORMAT_DATE_TIME4; + + break; + default: + $dataValue = null; + } + } else { + $type = DataType::TYPE_NULL; + $dataValue = null; + } + + if ($hasCalculatedValue) { + $type = DataType::TYPE_FORMULA; + $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=') + 1); + $temp = explode('"', $cellDataFormula); + $tKey = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($tKey = !$tKey) { + // Cell range reference in another sheet + $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/U', '$1!$2:$3', $value); + + // Cell reference in another sheet + $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/U', '$1!$2', $value); + + // Cell range reference + $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/U', '$1:$2', $value); + + // Simple cell reference + $value = preg_replace('/\[\.([^\.]+)\]/U', '$1', $value); + + $value = Calculation::translateSeparator(';', ',', $value, $inBraces); + } + } + unset($value); + + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + } + + if ($cellData->hasAttributeNS($tableNs, 'number-columns-repeated')) { + $colRepeats = (int) $cellData->getAttributeNS($tableNs, 'number-columns-repeated'); + } else { + $colRepeats = 1; + } + + if ($type !== null) { + for ($i = 0; $i < $colRepeats; ++$i) { + if ($i > 0) { + ++$columnID; + } + + if ($type !== DataType::TYPE_NULL) { + for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) { + $rID = $rowID + $rowAdjust; + + $cell = $spreadsheet->getActiveSheet() + ->getCell($columnID . $rID); + + // Set value + if ($hasCalculatedValue) { + $cell->setValueExplicit($cellDataFormula, $type); + } else { + $cell->setValueExplicit($dataValue, $type); + } + + if ($hasCalculatedValue) { + $cell->setCalculatedValue($dataValue); + } + + // Set other properties + if ($formatting !== null) { + $spreadsheet->getActiveSheet() + ->getStyle($columnID . $rID) + ->getNumberFormat() + ->setFormatCode($formatting); + } else { + $spreadsheet->getActiveSheet() + ->getStyle($columnID . $rID) + ->getNumberFormat() + ->setFormatCode(NumberFormat::FORMAT_GENERAL); + } + + if ($hyperlink !== null) { + $cell->getHyperlink() + ->setUrl($hyperlink); + } + } + } + } + } + + // Merged cells + if ($cellData->hasAttributeNS($tableNs, 'number-columns-spanned') + || $cellData->hasAttributeNS($tableNs, 'number-rows-spanned') + ) { + if (($type !== DataType::TYPE_NULL) || (!$this->readDataOnly)) { + $columnTo = $columnID; + + if ($cellData->hasAttributeNS($tableNs, 'number-columns-spanned')) { + $columnIndex = Coordinate::columnIndexFromString($columnID); + $columnIndex += (int) $cellData->getAttributeNS($tableNs, 'number-columns-spanned'); + $columnIndex -= 2; + + $columnTo = Coordinate::stringFromColumnIndex($columnIndex + 1); + } + + $rowTo = $rowID; + + if ($cellData->hasAttributeNS($tableNs, 'number-rows-spanned')) { + $rowTo = $rowTo + (int) $cellData->getAttributeNS($tableNs, 'number-rows-spanned') - 1; + } + + $cellRange = $columnID . $rowID . ':' . $columnTo . $rowTo; + $spreadsheet->getActiveSheet()->mergeCells($cellRange); + } + } + + ++$columnID; + } + $rowID += $rowRepeats; + + break; + } + } + ++$worksheetID; + } + } + + // Return + return $spreadsheet; + } + + /** + * Recursively scan element. + * + * @return string + */ + protected function scanElementForText(DOMNode $element) + { + $str = ''; + foreach ($element->childNodes as $child) { + /** @var DOMNode $child */ + if ($child->nodeType == XML_TEXT_NODE) { + $str .= $child->nodeValue; + } elseif ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName == 'text:s') { + // It's a space + + // Multiple spaces? + /** @var DOMAttr $cAttr */ + $cAttr = $child->attributes->getNamedItem('c'); + if ($cAttr) { + $multiplier = (int) $cAttr->nodeValue; + } else { + $multiplier = 1; + } + + $str .= str_repeat(' ', $multiplier); + } + + if ($child->hasChildNodes()) { + $str .= $this->scanElementForText($child); + } + } + + return $str; + } + + /** + * @param string $is + * + * @return RichText + */ + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Ods/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Ods/Properties.php new file mode 100755 index 0000000..c0b309a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Ods/Properties.php @@ -0,0 +1,136 @@ +spreadsheet = $spreadsheet; + } + + public function load(SimpleXMLElement $xml, $namespacesMeta): void + { + $docProps = $this->spreadsheet->getProperties(); + $officeProperty = $xml->children($namespacesMeta['office']); + foreach ($officeProperty as $officePropertyData) { + // @var \SimpleXMLElement $officePropertyData + if (isset($namespacesMeta['dc'])) { + $officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']); + $this->setCoreProperties($docProps, $officePropertiesDC); + } + + $officePropertyMeta = (object) []; + if (isset($namespacesMeta['dc'])) { + $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); + } + foreach ($officePropertyMeta as $propertyName => $propertyValue) { + $this->setMetaProperties($namespacesMeta, $propertyValue, $propertyName, $docProps); + } + } + } + + private function setCoreProperties(DocumentProperties $docProps, SimpleXMLElement $officePropertyDC): void + { + foreach ($officePropertyDC as $propertyName => $propertyValue) { + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'title': + $docProps->setTitle($propertyValue); + + break; + case 'subject': + $docProps->setSubject($propertyValue); + + break; + case 'creator': + $docProps->setCreator($propertyValue); + $docProps->setLastModifiedBy($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'description': + $docProps->setDescription($propertyValue); + + break; + } + } + } + + private function setMetaProperties( + $namespacesMeta, + SimpleXMLElement $propertyValue, + $propertyName, + DocumentProperties $docProps + ): void { + $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']); + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'initial-creator': + $docProps->setCreator($propertyValue); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + + break; + case 'user-defined': + $this->setUserDefinedProperty($propertyValueAttributes, $propertyValue, $docProps); + + break; + } + } + + private function setUserDefinedProperty($propertyValueAttributes, $propertyValue, DocumentProperties $docProps): void + { + $propertyValueName = ''; + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + foreach ($propertyValueAttributes as $key => $value) { + if ($key == 'name') { + $propertyValueName = (string) $value; + } elseif ($key == 'value-type') { + switch ($value) { + case 'date': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'date'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_DATE; + + break; + case 'boolean': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'bool'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_BOOLEAN; + + break; + case 'float': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'r4'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_FLOAT; + + break; + default: + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + } + } + } + + $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Security/XmlScanner.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Security/XmlScanner.php new file mode 100755 index 0000000..55bba63 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -0,0 +1,150 @@ +pattern = $pattern; + + $this->disableEntityLoaderCheck(); + + // A fatal error will bypass the destructor, so we register a shutdown here + register_shutdown_function([__CLASS__, 'shutdown']); + } + + public static function getInstance(Reader\IReader $reader) + { + switch (true) { + case $reader instanceof Reader\Html: + return new self('= 1; + case 1: + return PHP_RELEASE_VERSION >= 13; + case 0: + return PHP_RELEASE_VERSION >= 27; + } + + return true; + } + + return false; + } + + private function disableEntityLoaderCheck(): void + { + if (Settings::getLibXmlDisableEntityLoader()) { + $libxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); + + if (self::$libxmlDisableEntityLoaderValue === null) { + self::$libxmlDisableEntityLoaderValue = $libxmlDisableEntityLoaderValue; + } + } + } + + public static function shutdown(): void + { + if (self::$libxmlDisableEntityLoaderValue !== null) { + libxml_disable_entity_loader(self::$libxmlDisableEntityLoaderValue); + self::$libxmlDisableEntityLoaderValue = null; + } + } + + public function __destruct() + { + self::shutdown(); + } + + public function setAdditionalCallback(callable $callback): void + { + $this->callback = $callback; + } + + private function toUtf8($xml) + { + $pattern = '/encoding="(.*?)"/'; + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + + if ($charset !== 'UTF-8') { + $xml = mb_convert_encoding($xml, 'UTF-8', $charset); + + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + if ($charset !== 'UTF-8') { + throw new Reader\Exception('Suspicious Double-encoded XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } + } + + return $xml; + } + + /** + * Scan the XML for use of disableEntityLoaderCheck(); + + $xml = $this->toUtf8($xml); + + // Don't rely purely on libxml_disable_entity_loader() + $pattern = '/\\0?' . implode('\\0?', str_split($this->pattern)) . '\\0?/'; + + if (preg_match($pattern, $xml)) { + throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } + + if ($this->callback !== null && is_callable($this->callback)) { + $xml = call_user_func($this->callback, $xml); + } + + return $xml; + } + + /** + * Scan theXML for use of scan(file_get_contents($filestream)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Slk.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Slk.php new file mode 100755 index 0000000..0e14737 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Slk.php @@ -0,0 +1,590 @@ +openFile($pFilename); + } catch (InvalidArgumentException $e) { + return false; + } + + // Read sample data (first 2 KB will do) + $data = fread($this->fileHandle, 2048); + + // Count delimiters in file + $delimiterCount = substr_count($data, ';'); + $hasDelimiter = $delimiterCount > 0; + + // Analyze first line looking for ID; signature + $lines = explode("\n", $data); + $hasId = substr($lines[0], 0, 4) === 'ID;P'; + + fclose($this->fileHandle); + + return $hasDelimiter && $hasId; + } + + private function canReadOrBust(string $pFilename): void + { + if (!$this->canRead($pFilename)) { + throw new ReaderException($pFilename . ' is an Invalid SYLK file.'); + } + $this->openFile($pFilename); + } + + /** + * Set input encoding. + * + * @deprecated no use is made of this property + * + * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return $this + * + * @codeCoverageIgnore + */ + public function setInputEncoding($pValue) + { + $this->inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @deprecated no use is made of this property + * + * @return string + * + * @codeCoverageIgnore + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + // Open file + $this->canReadOrBust($pFilename); + $fileHandle = $this->fileHandle; + rewind($fileHandle); + + $worksheetInfo = []; + $worksheetInfo[0]['worksheetName'] = basename($pFilename, '.slk'); + + // loop through one row (line) at a time in the file + $rowIndex = 0; + $columnIndex = 0; + while (($rowData = fgets($fileHandle)) !== false) { + $columnIndex = 0; + + // convert SYLK encoded $rowData to UTF-8 + $rowData = StringHelper::SYLKtoUTF8($rowData); + + // explode each row at semicolons while taking into account that literal semicolon (;) + // is escaped like this (;;) + $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowData))))); + + $dataType = array_shift($rowData); + if ($dataType == 'B') { + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'X': + $columnIndex = substr($rowDatum, 1) - 1; + + break; + case 'Y': + $rowIndex = substr($rowDatum, 1); + + break; + } + } + + break; + } + } + + $worksheetInfo[0]['lastColumnIndex'] = $columnIndex; + $worksheetInfo[0]['totalRows'] = $rowIndex; + $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1); + $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; + + // Close file + fclose($fileHandle); + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + private $colorArray = [ + 'FF00FFFF', // 0 - cyan + 'FF000000', // 1 - black + 'FFFFFFFF', // 2 - white + 'FFFF0000', // 3 - red + 'FF00FF00', // 4 - green + 'FF0000FF', // 5 - blue + 'FFFFFF00', // 6 - yellow + 'FFFF00FF', // 7 - magenta + ]; + + private $fontStyleMappings = [ + 'B' => 'bold', + 'I' => 'italic', + 'U' => 'underline', + ]; + + private function processFormula(string $rowDatum, bool &$hasCalculatedValue, string &$cellDataFormula, string $row, string $column): void + { + $cellDataFormula = '=' . substr($rowDatum, 1); + // Convert R1C1 style references to A1 style references (but only when not quoted) + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only count/replace in alternate array entries + if ($key = !$key) { + preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); + // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way + // through the formula from left to right. Reversing means that we work right to left.through + // the formula + $cellReferences = array_reverse($cellReferences); + // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, + // then modify the formula to use that new reference + foreach ($cellReferences as $cellReference) { + $rowReference = $cellReference[2][0]; + // Empty R reference is the current row + if ($rowReference == '') { + $rowReference = $row; + } + // Bracketed R references are relative to the current row + if ($rowReference[0] == '[') { + $rowReference = $row + trim($rowReference, '[]'); + } + $columnReference = $cellReference[4][0]; + // Empty C reference is the current column + if ($columnReference == '') { + $columnReference = $column; + } + // Bracketed C references are relative to the current column + if ($columnReference[0] == '[') { + $columnReference = $column + trim($columnReference, '[]'); + } + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; + + $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); + } + } + } + unset($value); + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + $hasCalculatedValue = true; + } + + private function processCRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void + { + // Read cell value data + $hasCalculatedValue = false; + $cellDataFormula = $cellData = ''; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $column = substr($rowDatum, 1); + + break; + case 'R': + case 'Y': + $row = substr($rowDatum, 1); + + break; + case 'K': + $cellData = substr($rowDatum, 1); + + break; + case 'E': + $this->processFormula($rowDatum, $hasCalculatedValue, $cellDataFormula, $row, $column); + + break; + } + } + $columnLetter = Coordinate::stringFromColumnIndex((int) $column); + $cellData = Calculation::unwrapResult($cellData); + + // Set cell value + $this->processCFinal($spreadsheet, $hasCalculatedValue, $cellDataFormula, $cellData, "$columnLetter$row"); + } + + private function processCFinal(Spreadsheet &$spreadsheet, bool $hasCalculatedValue, string $cellDataFormula, string $cellData, string $coordinate): void + { + // Set cell value + $spreadsheet->getActiveSheet()->getCell($coordinate)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData); + if ($hasCalculatedValue) { + $cellData = Calculation::unwrapResult($cellData); + $spreadsheet->getActiveSheet()->getCell($coordinate)->setCalculatedValue($cellData); + } + } + + private function processFRecord(array $rowData, Spreadsheet &$spreadsheet, string &$row, string &$column): void + { + // Read cell formatting + $formatStyle = $columnWidth = ''; + $startCol = $endCol = ''; + $fontStyle = ''; + $styleData = []; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $column = substr($rowDatum, 1); + + break; + case 'R': + case 'Y': + $row = substr($rowDatum, 1); + + break; + case 'P': + $formatStyle = $rowDatum; + + break; + case 'W': + [$startCol, $endCol, $columnWidth] = explode(' ', substr($rowDatum, 1)); + + break; + case 'S': + $this->styleSettings($rowDatum, $styleData, $fontStyle); + + break; + } + } + $this->addFormats($spreadsheet, $formatStyle, $row, $column); + $this->addFonts($spreadsheet, $fontStyle, $row, $column); + $this->addStyle($spreadsheet, $styleData, $row, $column); + $this->addWidth($spreadsheet, $columnWidth, $startCol, $endCol); + } + + private $styleSettingsFont = ['D' => 'bold', 'I' => 'italic']; + + private $styleSettingsBorder = [ + 'B' => 'bottom', + 'L' => 'left', + 'R' => 'right', + 'T' => 'top', + ]; + + private function styleSettings(string $rowDatum, array &$styleData, string &$fontStyle): void + { + $styleSettings = substr($rowDatum, 1); + $iMax = strlen($styleSettings); + for ($i = 0; $i < $iMax; ++$i) { + $char = $styleSettings[$i]; + if (array_key_exists($char, $this->styleSettingsFont)) { + $styleData['font'][$this->styleSettingsFont[$char]] = true; + } elseif (array_key_exists($char, $this->styleSettingsBorder)) { + $styleData['borders'][$this->styleSettingsBorder[$char]]['borderStyle'] = Border::BORDER_THIN; + } elseif ($char == 'S') { + $styleData['fill']['fillType'] = \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY125; + } elseif ($char == 'M') { + if (preg_match('/M([1-9]\\d*)/', $styleSettings, $matches)) { + $fontStyle = $matches[1]; + } + } + } + } + + private function addFormats(Spreadsheet &$spreadsheet, string $formatStyle, string $row, string $column): void + { + if ($formatStyle && $column > '' && $row > '') { + $columnLetter = Coordinate::stringFromColumnIndex((int) $column); + if (isset($this->formats[$formatStyle])) { + $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->formats[$formatStyle]); + } + } + } + + private function addFonts(Spreadsheet &$spreadsheet, string $fontStyle, string $row, string $column): void + { + if ($fontStyle && $column > '' && $row > '') { + $columnLetter = Coordinate::stringFromColumnIndex((int) $column); + if (isset($this->fonts[$fontStyle])) { + $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->fonts[$fontStyle]); + } + } + } + + private function addStyle(Spreadsheet &$spreadsheet, array $styleData, string $row, string $column): void + { + if ((!empty($styleData)) && $column > '' && $row > '') { + $columnLetter = Coordinate::stringFromColumnIndex($column); + $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($styleData); + } + } + + private function addWidth(Spreadsheet $spreadsheet, string $columnWidth, string $startCol, string $endCol): void + { + if ($columnWidth > '') { + if ($startCol == $endCol) { + $startCol = Coordinate::stringFromColumnIndex((int) $startCol); + $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth($columnWidth); + } else { + $startCol = Coordinate::stringFromColumnIndex($startCol); + $endCol = Coordinate::stringFromColumnIndex($endCol); + $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth((float) $columnWidth); + do { + $spreadsheet->getActiveSheet()->getColumnDimension(++$startCol)->setWidth($columnWidth); + } while ($startCol != $endCol); + } + } + } + + private function processPRecord(array $rowData, Spreadsheet &$spreadsheet): void + { + // Read shared styles + $formatArray = []; + $fromFormats = ['\-', '\ ']; + $toFormats = ['-', ' ']; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'P': + $formatArray['numberFormat']['formatCode'] = str_replace($fromFormats, $toFormats, substr($rowDatum, 1)); + + break; + case 'E': + case 'F': + $formatArray['font']['name'] = substr($rowDatum, 1); + + break; + case 'M': + $formatArray['font']['size'] = substr($rowDatum, 1) / 20; + + break; + case 'L': + $this->processPColors($rowDatum, $formatArray); + + break; + case 'S': + $this->processPFontStyles($rowDatum, $formatArray); + + break; + } + } + $this->processPFinal($spreadsheet, $formatArray); + } + + private function processPColors(string $rowDatum, array &$formatArray): void + { + if (preg_match('/L([1-9]\\d*)/', $rowDatum, $matches)) { + $fontColor = $matches[1] % 8; + $formatArray['font']['color']['argb'] = $this->colorArray[$fontColor]; + } + } + + private function processPFontStyles(string $rowDatum, array &$formatArray): void + { + $styleSettings = substr($rowDatum, 1); + $iMax = strlen($styleSettings); + for ($i = 0; $i < $iMax; ++$i) { + if (array_key_exists($styleSettings[$i], $this->fontStyleMappings)) { + $formatArray['font'][$this->fontStyleMappings[$styleSettings[$i]]] = true; + } + } + } + + private function processPFinal(Spreadsheet &$spreadsheet, array $formatArray): void + { + if (array_key_exists('numberFormat', $formatArray)) { + $this->formats['P' . $this->format] = $formatArray; + ++$this->format; + } elseif (array_key_exists('font', $formatArray)) { + ++$this->fontcount; + $this->fonts[$this->fontcount] = $formatArray; + if ($this->fontcount === 1) { + $spreadsheet->getDefaultStyle()->applyFromArray($formatArray); + } + } + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + // Open file + $this->canReadOrBust($pFilename); + $fileHandle = $this->fileHandle; + rewind($fileHandle); + + // Create new Worksheets + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $spreadsheet->setActiveSheetIndex($this->sheetIndex); + $spreadsheet->getActiveSheet()->setTitle(basename($pFilename, '.slk')); + + // Loop through file + $column = $row = ''; + + // loop through one row (line) at a time in the file + while (($rowDataTxt = fgets($fileHandle)) !== false) { + // convert SYLK encoded $rowData to UTF-8 + $rowDataTxt = StringHelper::SYLKtoUTF8($rowDataTxt); + + // explode each row at semicolons while taking into account that literal semicolon (;) + // is escaped like this (;;) + $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowDataTxt))))); + + $dataType = array_shift($rowData); + if ($dataType == 'P') { + // Read shared styles + $this->processPRecord($rowData, $spreadsheet); + } elseif ($dataType == 'C') { + // Read cell value data + $this->processCRecord($rowData, $spreadsheet, $row, $column); + } elseif ($dataType == 'F') { + // Read cell formatting + $this->processFRecord($rowData, $spreadsheet, $row, $column); + } else { + $this->columnRowFromRowData($rowData, $column, $row); + } + } + + // Close file + fclose($fileHandle); + + // Return + return $spreadsheet; + } + + private function columnRowFromRowData(array $rowData, string &$column, string &$row): void + { + foreach ($rowData as $rowDatum) { + $char0 = $rowDatum[0]; + if ($char0 === 'X' || $char0 == 'C') { + $column = substr($rowDatum, 1); + } elseif ($char0 === 'Y' || $char0 == 'R') { + $row = substr($rowDatum, 1); + } + } + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return $this + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls.php new file mode 100755 index 0000000..11a6195 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls.php @@ -0,0 +1,7949 @@ +data. + * + * @var int + */ + private $dataSize; + + /** + * Current position in stream. + * + * @var int + */ + private $pos; + + /** + * Workbook to be returned by the reader. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Worksheet that is currently being built by the reader. + * + * @var Worksheet + */ + private $phpSheet; + + /** + * BIFF version. + * + * @var int + */ + private $version; + + /** + * Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95) + * For BIFF8 (Excel 97 - Excel 2003) this will always have the value 'UTF-16LE'. + * + * @var string + */ + private $codepage; + + /** + * Shared formats. + * + * @var array + */ + private $formats; + + /** + * Shared fonts. + * + * @var array + */ + private $objFonts; + + /** + * Color palette. + * + * @var array + */ + private $palette; + + /** + * Worksheets. + * + * @var array + */ + private $sheets; + + /** + * External books. + * + * @var array + */ + private $externalBooks; + + /** + * REF structures. Only applies to BIFF8. + * + * @var array + */ + private $ref; + + /** + * External names. + * + * @var array + */ + private $externalNames; + + /** + * Defined names. + * + * @var array + */ + private $definedname; + + /** + * Shared strings. Only applies to BIFF8. + * + * @var array + */ + private $sst; + + /** + * Panes are frozen? (in sheet currently being read). See WINDOW2 record. + * + * @var bool + */ + private $frozen; + + /** + * Fit printout to number of pages? (in sheet currently being read). See SHEETPR record. + * + * @var bool + */ + private $isFitToPages; + + /** + * Objects. One OBJ record contributes with one entry. + * + * @var array + */ + private $objs; + + /** + * Text Objects. One TXO record corresponds with one entry. + * + * @var array + */ + private $textObjects; + + /** + * Cell Annotations (BIFF8). + * + * @var array + */ + private $cellNotes; + + /** + * The combined MSODRAWINGGROUP data. + * + * @var string + */ + private $drawingGroupData; + + /** + * The combined MSODRAWING data (per sheet). + * + * @var string + */ + private $drawingData; + + /** + * Keep track of XF index. + * + * @var int + */ + private $xfIndex; + + /** + * Mapping of XF index (that is a cell XF) to final index in cellXf collection. + * + * @var array + */ + private $mapCellXfIndex; + + /** + * Mapping of XF index (that is a style XF) to final index in cellStyleXf collection. + * + * @var array + */ + private $mapCellStyleXfIndex; + + /** + * The shared formulas in a sheet. One SHAREDFMLA record contributes with one value. + * + * @var array + */ + private $sharedFormulas; + + /** + * The shared formula parts in a sheet. One FORMULA record contributes with one value if it + * refers to a shared formula. + * + * @var array + */ + private $sharedFormulaParts; + + /** + * The type of encryption in use. + * + * @var int + */ + private $encryption = 0; + + /** + * The position in the stream after which contents are encrypted. + * + * @var int + */ + private $encryptionStartPos = false; + + /** + * The current RC4 decryption object. + * + * @var Xls\RC4 + */ + private $rc4Key; + + /** + * The position in the stream that the RC4 decryption object was left at. + * + * @var int + */ + private $rc4Pos = 0; + + /** + * The current MD5 context state. + * + * @var string + */ + private $md5Ctxt; + + /** + * @var int + */ + private $textObjRef; + + /** + * @var string + */ + private $baseCell; + + /** + * Create a new Xls Reader instance. + */ + public function __construct() + { + parent::__construct(); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + try { + // Use ParseXL for the hard work. + $ole = new OLERead(); + + // get excel data + $ole->read($pFilename); + + return true; + } catch (PhpSpreadsheetException $e) { + return false; + } + } + + public function setCodepage(string $codepage): void + { + if (!CodePage::validate($codepage)) { + throw new PhpSpreadsheetException('Unknown codepage: ' . $codepage); + } + + $this->codepage = $codepage; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object. + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $worksheetNames = []; + + // Read the OLE file + $this->loadOLE($pFilename); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + $this->pos = 0; + $this->sheets = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module + continue; + } + + $worksheetNames[] = $sheet['name']; + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + // Read the OLE file + $this->loadOLE($pFilename); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + // initialize + $this->pos = 0; + $this->sheets = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // Parse the individual sheets + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet + // 0x02: Chart + // 0x06: Visual Basic module + continue; + } + + $tmpInfo = []; + $tmpInfo['worksheetName'] = $sheet['name']; + $tmpInfo['lastColumnLetter'] = 'A'; + $tmpInfo['lastColumnIndex'] = 0; + $tmpInfo['totalRows'] = 0; + $tmpInfo['totalColumns'] = 0; + + $this->pos = $sheet['offset']; + + while ($this->pos <= $this->dataSize - 4) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_RK: + case self::XLS_TYPE_LABELSST: + case self::XLS_TYPE_NUMBER: + case self::XLS_TYPE_FORMULA: + case self::XLS_TYPE_BOOLERR: + case self::XLS_TYPE_LABEL: + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + $rowIndex = self::getUInt2d($recordData, 0) + 1; + $columnIndex = self::getUInt2d($recordData, 2); + + $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); + $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); + + break; + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; + + $worksheetInfo[] = $tmpInfo; + } + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Read the OLE file + $this->loadOLE($pFilename); + + // Initialisations + $this->spreadsheet = new Spreadsheet(); + $this->spreadsheet->removeSheetByIndex(0); // remove 1st sheet + if (!$this->readDataOnly) { + $this->spreadsheet->removeCellStyleXfByIndex(0); // remove the default style + $this->spreadsheet->removeCellXfByIndex(0); // remove the default style + } + + // Read the summary information stream (containing meta data) + $this->readSummaryInformation(); + + // Read the Additional document summary information stream (containing application-specific meta data) + $this->readDocumentSummaryInformation(); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + // initialize + $this->pos = 0; + $this->codepage = $this->codepage ?: CodePage::DEFAULT_CODE_PAGE; + $this->formats = []; + $this->objFonts = []; + $this->palette = []; + $this->sheets = []; + $this->externalBooks = []; + $this->ref = []; + $this->definedname = []; + $this->sst = []; + $this->drawingGroupData = ''; + $this->xfIndex = ''; + $this->mapCellXfIndex = []; + $this->mapCellStyleXfIndex = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_FILEPASS: + $this->readFilepass(); + + break; + case self::XLS_TYPE_CODEPAGE: + $this->readCodepage(); + + break; + case self::XLS_TYPE_DATEMODE: + $this->readDateMode(); + + break; + case self::XLS_TYPE_FONT: + $this->readFont(); + + break; + case self::XLS_TYPE_FORMAT: + $this->readFormat(); + + break; + case self::XLS_TYPE_XF: + $this->readXf(); + + break; + case self::XLS_TYPE_XFEXT: + $this->readXfExt(); + + break; + case self::XLS_TYPE_STYLE: + $this->readStyle(); + + break; + case self::XLS_TYPE_PALETTE: + $this->readPalette(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EXTERNALBOOK: + $this->readExternalBook(); + + break; + case self::XLS_TYPE_EXTERNNAME: + $this->readExternName(); + + break; + case self::XLS_TYPE_EXTERNSHEET: + $this->readExternSheet(); + + break; + case self::XLS_TYPE_DEFINEDNAME: + $this->readDefinedName(); + + break; + case self::XLS_TYPE_MSODRAWINGGROUP: + $this->readMsoDrawingGroup(); + + break; + case self::XLS_TYPE_SST: + $this->readSst(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // Resolve indexed colors for font, fill, and border colors + // Cannot be resolved already in XF record, because PALETTE record comes afterwards + if (!$this->readDataOnly) { + foreach ($this->objFonts as $objFont) { + if (isset($objFont->colorIndex)) { + $color = Xls\Color::map($objFont->colorIndex, $this->palette, $this->version); + $objFont->getColor()->setRGB($color['rgb']); + } + } + + foreach ($this->spreadsheet->getCellXfCollection() as $objStyle) { + // fill start and end color + $fill = $objStyle->getFill(); + + if (isset($fill->startcolorIndex)) { + $startColor = Xls\Color::map($fill->startcolorIndex, $this->palette, $this->version); + $fill->getStartColor()->setRGB($startColor['rgb']); + } + if (isset($fill->endcolorIndex)) { + $endColor = Xls\Color::map($fill->endcolorIndex, $this->palette, $this->version); + $fill->getEndColor()->setRGB($endColor['rgb']); + } + + // border colors + $top = $objStyle->getBorders()->getTop(); + $right = $objStyle->getBorders()->getRight(); + $bottom = $objStyle->getBorders()->getBottom(); + $left = $objStyle->getBorders()->getLeft(); + $diagonal = $objStyle->getBorders()->getDiagonal(); + + if (isset($top->colorIndex)) { + $borderTopColor = Xls\Color::map($top->colorIndex, $this->palette, $this->version); + $top->getColor()->setRGB($borderTopColor['rgb']); + } + if (isset($right->colorIndex)) { + $borderRightColor = Xls\Color::map($right->colorIndex, $this->palette, $this->version); + $right->getColor()->setRGB($borderRightColor['rgb']); + } + if (isset($bottom->colorIndex)) { + $borderBottomColor = Xls\Color::map($bottom->colorIndex, $this->palette, $this->version); + $bottom->getColor()->setRGB($borderBottomColor['rgb']); + } + if (isset($left->colorIndex)) { + $borderLeftColor = Xls\Color::map($left->colorIndex, $this->palette, $this->version); + $left->getColor()->setRGB($borderLeftColor['rgb']); + } + if (isset($diagonal->colorIndex)) { + $borderDiagonalColor = Xls\Color::map($diagonal->colorIndex, $this->palette, $this->version); + $diagonal->getColor()->setRGB($borderDiagonalColor['rgb']); + } + } + } + + // treat MSODRAWINGGROUP records, workbook-level Escher + if (!$this->readDataOnly && $this->drawingGroupData) { + $escherWorkbook = new Escher(); + $reader = new Xls\Escher($escherWorkbook); + $escherWorkbook = $reader->load($this->drawingGroupData); + } + + // Parse the individual sheets + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module + continue; + } + + // check if sheet should be skipped + if (isset($this->loadSheetsOnly) && !in_array($sheet['name'], $this->loadSheetsOnly)) { + continue; + } + + // add sheet to PhpSpreadsheet object + $this->phpSheet = $this->spreadsheet->createSheet(); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula + // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet + // name in line with the formula, not the reverse + $this->phpSheet->setTitle($sheet['name'], false, false); + $this->phpSheet->setSheetState($sheet['sheetState']); + + $this->pos = $sheet['offset']; + + // Initialize isFitToPages. May change after reading SHEETPR record. + $this->isFitToPages = false; + + // Initialize drawingData + $this->drawingData = ''; + + // Initialize objs + $this->objs = []; + + // Initialize shared formula parts + $this->sharedFormulaParts = []; + + // Initialize shared formulas + $this->sharedFormulas = []; + + // Initialize text objs + $this->textObjects = []; + + // Initialize cell annotations + $this->cellNotes = []; + $this->textObjRef = -1; + + while ($this->pos <= $this->dataSize - 4) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_PRINTGRIDLINES: + $this->readPrintGridlines(); + + break; + case self::XLS_TYPE_DEFAULTROWHEIGHT: + $this->readDefaultRowHeight(); + + break; + case self::XLS_TYPE_SHEETPR: + $this->readSheetPr(); + + break; + case self::XLS_TYPE_HORIZONTALPAGEBREAKS: + $this->readHorizontalPageBreaks(); + + break; + case self::XLS_TYPE_VERTICALPAGEBREAKS: + $this->readVerticalPageBreaks(); + + break; + case self::XLS_TYPE_HEADER: + $this->readHeader(); + + break; + case self::XLS_TYPE_FOOTER: + $this->readFooter(); + + break; + case self::XLS_TYPE_HCENTER: + $this->readHcenter(); + + break; + case self::XLS_TYPE_VCENTER: + $this->readVcenter(); + + break; + case self::XLS_TYPE_LEFTMARGIN: + $this->readLeftMargin(); + + break; + case self::XLS_TYPE_RIGHTMARGIN: + $this->readRightMargin(); + + break; + case self::XLS_TYPE_TOPMARGIN: + $this->readTopMargin(); + + break; + case self::XLS_TYPE_BOTTOMMARGIN: + $this->readBottomMargin(); + + break; + case self::XLS_TYPE_PAGESETUP: + $this->readPageSetup(); + + break; + case self::XLS_TYPE_PROTECT: + $this->readProtect(); + + break; + case self::XLS_TYPE_SCENPROTECT: + $this->readScenProtect(); + + break; + case self::XLS_TYPE_OBJECTPROTECT: + $this->readObjectProtect(); + + break; + case self::XLS_TYPE_PASSWORD: + $this->readPassword(); + + break; + case self::XLS_TYPE_DEFCOLWIDTH: + $this->readDefColWidth(); + + break; + case self::XLS_TYPE_COLINFO: + $this->readColInfo(); + + break; + case self::XLS_TYPE_DIMENSION: + $this->readDefault(); + + break; + case self::XLS_TYPE_ROW: + $this->readRow(); + + break; + case self::XLS_TYPE_DBCELL: + $this->readDefault(); + + break; + case self::XLS_TYPE_RK: + $this->readRk(); + + break; + case self::XLS_TYPE_LABELSST: + $this->readLabelSst(); + + break; + case self::XLS_TYPE_MULRK: + $this->readMulRk(); + + break; + case self::XLS_TYPE_NUMBER: + $this->readNumber(); + + break; + case self::XLS_TYPE_FORMULA: + $this->readFormula(); + + break; + case self::XLS_TYPE_SHAREDFMLA: + $this->readSharedFmla(); + + break; + case self::XLS_TYPE_BOOLERR: + $this->readBoolErr(); + + break; + case self::XLS_TYPE_MULBLANK: + $this->readMulBlank(); + + break; + case self::XLS_TYPE_LABEL: + $this->readLabel(); + + break; + case self::XLS_TYPE_BLANK: + $this->readBlank(); + + break; + case self::XLS_TYPE_MSODRAWING: + $this->readMsoDrawing(); + + break; + case self::XLS_TYPE_OBJ: + $this->readObj(); + + break; + case self::XLS_TYPE_WINDOW2: + $this->readWindow2(); + + break; + case self::XLS_TYPE_PAGELAYOUTVIEW: + $this->readPageLayoutView(); + + break; + case self::XLS_TYPE_SCL: + $this->readScl(); + + break; + case self::XLS_TYPE_PANE: + $this->readPane(); + + break; + case self::XLS_TYPE_SELECTION: + $this->readSelection(); + + break; + case self::XLS_TYPE_MERGEDCELLS: + $this->readMergedCells(); + + break; + case self::XLS_TYPE_HYPERLINK: + $this->readHyperLink(); + + break; + case self::XLS_TYPE_DATAVALIDATIONS: + $this->readDataValidations(); + + break; + case self::XLS_TYPE_DATAVALIDATION: + $this->readDataValidation(); + + break; + case self::XLS_TYPE_SHEETLAYOUT: + $this->readSheetLayout(); + + break; + case self::XLS_TYPE_SHEETPROTECTION: + $this->readSheetProtection(); + + break; + case self::XLS_TYPE_RANGEPROTECTION: + $this->readRangeProtection(); + + break; + case self::XLS_TYPE_NOTE: + $this->readNote(); + + break; + case self::XLS_TYPE_TXO: + $this->readTextObject(); + + break; + case self::XLS_TYPE_CONTINUE: + $this->readContinue(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // treat MSODRAWING records, sheet-level Escher + if (!$this->readDataOnly && $this->drawingData) { + $escherWorksheet = new Escher(); + $reader = new Xls\Escher($escherWorksheet); + $escherWorksheet = $reader->load($this->drawingData); + + // get all spContainers in one long array, so they can be mapped to OBJ records + $allSpContainers = $escherWorksheet->getDgContainer()->getSpgrContainer()->getAllSpContainers(); + } + + // treat OBJ records + foreach ($this->objs as $n => $obj) { + // the first shape container never has a corresponding OBJ record, hence $n + 1 + if (isset($allSpContainers[$n + 1]) && is_object($allSpContainers[$n + 1])) { + $spContainer = $allSpContainers[$n + 1]; + + // we skip all spContainers that are a part of a group shape since we cannot yet handle those + if ($spContainer->getNestingLevel() > 1) { + continue; + } + + // calculate the width and height of the shape + [$startColumn, $startRow] = Coordinate::coordinateFromString($spContainer->getStartCoordinates()); + [$endColumn, $endRow] = Coordinate::coordinateFromString($spContainer->getEndCoordinates()); + + $startOffsetX = $spContainer->getStartOffsetX(); + $startOffsetY = $spContainer->getStartOffsetY(); + $endOffsetX = $spContainer->getEndOffsetX(); + $endOffsetY = $spContainer->getEndOffsetY(); + + $width = \PhpOffice\PhpSpreadsheet\Shared\Xls::getDistanceX($this->phpSheet, $startColumn, $startOffsetX, $endColumn, $endOffsetX); + $height = \PhpOffice\PhpSpreadsheet\Shared\Xls::getDistanceY($this->phpSheet, $startRow, $startOffsetY, $endRow, $endOffsetY); + + // calculate offsetX and offsetY of the shape + $offsetX = $startOffsetX * \PhpOffice\PhpSpreadsheet\Shared\Xls::sizeCol($this->phpSheet, $startColumn) / 1024; + $offsetY = $startOffsetY * \PhpOffice\PhpSpreadsheet\Shared\Xls::sizeRow($this->phpSheet, $startRow) / 256; + + switch ($obj['otObjType']) { + case 0x19: + // Note + if (isset($this->cellNotes[$obj['idObjID']])) { + $cellNote = $this->cellNotes[$obj['idObjID']]; + + if (isset($this->textObjects[$obj['idObjID']])) { + $textObject = $this->textObjects[$obj['idObjID']]; + $this->cellNotes[$obj['idObjID']]['objTextData'] = $textObject; + } + } + + break; + case 0x08: + // picture + // get index to BSE entry (1-based) + $BSEindex = $spContainer->getOPT(0x0104); + + // If there is no BSE Index, we will fail here and other fields are not read. + // Fix by checking here. + // TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field? + // More likely : a uncompatible picture + if (!$BSEindex) { + continue 2; + } + + $BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection(); + $BSE = $BSECollection[$BSEindex - 1]; + $blipType = $BSE->getBlipType(); + + // need check because some blip types are not supported by Escher reader such as EMF + if ($blip = $BSE->getBlip()) { + $ih = imagecreatefromstring($blip->getData()); + $drawing = new MemoryDrawing(); + $drawing->setImageResource($ih); + + // width, height, offsetX, offsetY + $drawing->setResizeProportional(false); + $drawing->setWidth($width); + $drawing->setHeight($height); + $drawing->setOffsetX($offsetX); + $drawing->setOffsetY($offsetY); + + switch ($blipType) { + case BSE::BLIPTYPE_JPEG: + $drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG); + $drawing->setMimeType(MemoryDrawing::MIMETYPE_JPEG); + + break; + case BSE::BLIPTYPE_PNG: + $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG); + $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG); + + break; + } + + $drawing->setWorksheet($this->phpSheet); + $drawing->setCoordinates($spContainer->getStartCoordinates()); + } + + break; + default: + // other object type + break; + } + } + } + + // treat SHAREDFMLA records + if ($this->version == self::XLS_BIFF8) { + foreach ($this->sharedFormulaParts as $cell => $baseCell) { + [$column, $row] = Coordinate::coordinateFromString($cell); + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { + $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); + $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); + } + } + } + + if (!empty($this->cellNotes)) { + foreach ($this->cellNotes as $note => $noteDetails) { + if (!isset($noteDetails['objTextData'])) { + if (isset($this->textObjects[$note])) { + $textObject = $this->textObjects[$note]; + $noteDetails['objTextData'] = $textObject; + } else { + $noteDetails['objTextData']['text'] = ''; + } + } + $cellAddress = str_replace('$', '', $noteDetails['cellRef']); + $this->phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->parseRichText($noteDetails['objTextData']['text'])); + } + } + } + + // add the named ranges (defined names) + foreach ($this->definedname as $definedName) { + if ($definedName['isBuiltInName']) { + switch ($definedName['name']) { + case pack('C', 0x06): + // print area + // in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2 + $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? + + $extractedRanges = []; + foreach ($ranges as $range) { + // $range should look like one of these + // Foo!$C$7:$J$66 + // Bar!$A$1:$IV$2 + $explodes = Worksheet::extractSheetTitle($range, true); + $sheetName = trim($explodes[0], "'"); + if (count($explodes) == 2) { + if (strpos($explodes[1], ':') === false) { + $explodes[1] = $explodes[1] . ':' . $explodes[1]; + } + $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66 + } + } + if ($docSheet = $this->spreadsheet->getSheetByName($sheetName)) { + $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2 + } + + break; + case pack('C', 0x07): + // print titles (repeating rows) + // Assuming BIFF8, there are 3 cases + // 1. repeating rows + // formula looks like this: Sheet!$A$1:$IV$2 + // rows 1-2 repeat + // 2. repeating columns + // formula looks like this: Sheet!$A$1:$B$65536 + // columns A-B repeat + // 3. both repeating rows and repeating columns + // formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2 + $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? + foreach ($ranges as $range) { + // $range should look like this one of these + // Sheet!$A$1:$B$65536 + // Sheet!$A$1:$IV$2 + if (strpos($range, '!') !== false) { + $explodes = Worksheet::extractSheetTitle($range, true); + if ($docSheet = $this->spreadsheet->getSheetByName($explodes[0])) { + $extractedRange = $explodes[1]; + $extractedRange = str_replace('$', '', $extractedRange); + + $coordinateStrings = explode(':', $extractedRange); + if (count($coordinateStrings) == 2) { + [$firstColumn, $firstRow] = Coordinate::coordinateFromString($coordinateStrings[0]); + [$lastColumn, $lastRow] = Coordinate::coordinateFromString($coordinateStrings[1]); + + if ($firstColumn == 'A' && $lastColumn == 'IV') { + // then we have repeating rows + $docSheet->getPageSetup()->setRowsToRepeatAtTop([$firstRow, $lastRow]); + } elseif ($firstRow == 1 && $lastRow == 65536) { + // then we have repeating columns + $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$firstColumn, $lastColumn]); + } + } + } + } + } + + break; + } + } else { + // Extract range + if (strpos($definedName['formula'], '!') !== false) { + $explodes = Worksheet::extractSheetTitle($definedName['formula'], true); + if (($docSheet = $this->spreadsheet->getSheetByName($explodes[0])) || + ($docSheet = $this->spreadsheet->getSheetByName(trim($explodes[0], "'")))) { + $extractedRange = $explodes[1]; + $extractedRange = str_replace('$', '', $extractedRange); + + $localOnly = ($definedName['scope'] == 0) ? false : true; + + $scope = ($definedName['scope'] == 0) ? null : $this->spreadsheet->getSheetByName($this->sheets[$definedName['scope'] - 1]['name']); + + $this->spreadsheet->addNamedRange(new NamedRange((string) $definedName['name'], $docSheet, $extractedRange, $localOnly, $scope)); + } + } + // Named Value + // TODO Provide support for named values + } + } + $this->data = null; + + return $this->spreadsheet; + } + + /** + * Read record data from stream, decrypting as required. + * + * @param string $data Data stream to read from + * @param int $pos Position to start reading from + * @param int $len Record data length + * + * @return string Record data + */ + private function readRecordData($data, $pos, $len) + { + $data = substr($data, $pos, $len); + + // File not encrypted, or record before encryption start point + if ($this->encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->encryptionStartPos) { + return $data; + } + + $recordData = ''; + if ($this->encryption == self::MS_BIFF_CRYPTO_RC4) { + $oldBlock = floor($this->rc4Pos / self::REKEY_BLOCK); + $block = floor($pos / self::REKEY_BLOCK); + $endBlock = floor(($pos + $len) / self::REKEY_BLOCK); + + // Spin an RC4 decryptor to the right spot. If we have a decryptor sitting + // at a point earlier in the current block, re-use it as we can save some time. + if ($block != $oldBlock || $pos < $this->rc4Pos || !$this->rc4Key) { + $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); + $step = $pos % self::REKEY_BLOCK; + } else { + $step = $pos - $this->rc4Pos; + } + $this->rc4Key->RC4(str_repeat("\0", $step)); + + // Decrypt record data (re-keying at the end of every block) + while ($block != $endBlock) { + $step = self::REKEY_BLOCK - ($pos % self::REKEY_BLOCK); + $recordData .= $this->rc4Key->RC4(substr($data, 0, $step)); + $data = substr($data, $step); + $pos += $step; + $len -= $step; + ++$block; + $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); + } + $recordData .= $this->rc4Key->RC4(substr($data, 0, $len)); + + // Keep track of the position of this decryptor. + // We'll try and re-use it later if we can to speed things up + $this->rc4Pos = $pos + $len; + } elseif ($this->encryption == self::MS_BIFF_CRYPTO_XOR) { + throw new Exception('XOr encryption not supported'); + } + + return $recordData; + } + + /** + * Use OLE reader to extract the relevant data streams from the OLE file. + * + * @param string $pFilename + */ + private function loadOLE($pFilename): void + { + // OLE reader + $ole = new OLERead(); + // get excel data, + $ole->read($pFilename); + // Get workbook data: workbook stream + sheet streams + $this->data = $ole->getStream($ole->wrkbook); + // Get summary information data + $this->summaryInformation = $ole->getStream($ole->summaryInformation); + // Get additional document summary information data + $this->documentSummaryInformation = $ole->getStream($ole->documentSummaryInformation); + } + + /** + * Read summary information. + */ + private function readSummaryInformation(): void + { + if (!isset($this->summaryInformation)) { + return; + } + + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + // offset: 2; size: 2; + // offset: 4; size: 2; OS version + // offset: 6; size: 2; OS indicator + // offset: 8; size: 16 + // offset: 24; size: 4; section count + $secCount = self::getInt4d($this->summaryInformation, 24); + + // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 + // offset: 44; size: 4 + $secOffset = self::getInt4d($this->summaryInformation, 44); + + // section header + // offset: $secOffset; size: 4; section length + $secLength = self::getInt4d($this->summaryInformation, $secOffset); + + // offset: $secOffset+4; size: 4; property count + $countProperties = self::getInt4d($this->summaryInformation, $secOffset + 4); + + // initialize code page (used to resolve string values) + $codePage = 'CP1252'; + + // offset: ($secOffset+8); size: var + // loop through property decarations and properties + for ($i = 0; $i < $countProperties; ++$i) { + // offset: ($secOffset+8) + (8 * $i); size: 4; property ID + $id = self::getInt4d($this->summaryInformation, ($secOffset + 8) + (8 * $i)); + + // Use value of property id as appropriate + // offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48) + $offset = self::getInt4d($this->summaryInformation, ($secOffset + 12) + (8 * $i)); + + $type = self::getInt4d($this->summaryInformation, $secOffset + $offset); + + // initialize property value + $value = null; + + // extract property value based on property type + switch ($type) { + case 0x02: // 2 byte signed integer + $value = self::getUInt2d($this->summaryInformation, $secOffset + 4 + $offset); + + break; + case 0x03: // 4 byte signed integer + $value = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); + + break; + case 0x13: // 4 byte unsigned integer + // not needed yet, fix later if necessary + break; + case 0x1E: // null-terminated string prepended by dword string length + $byteLength = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); + $value = substr($this->summaryInformation, $secOffset + 8 + $offset, $byteLength); + $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage); + $value = rtrim($value); + + break; + case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // PHP-time + $value = OLE::OLE2LocalDate(substr($this->summaryInformation, $secOffset + 4 + $offset, 8)); + + break; + case 0x47: // Clipboard format + // not needed yet, fix later if necessary + break; + } + + switch ($id) { + case 0x01: // Code Page + $codePage = CodePage::numberToName($value); + + break; + case 0x02: // Title + $this->spreadsheet->getProperties()->setTitle($value); + + break; + case 0x03: // Subject + $this->spreadsheet->getProperties()->setSubject($value); + + break; + case 0x04: // Author (Creator) + $this->spreadsheet->getProperties()->setCreator($value); + + break; + case 0x05: // Keywords + $this->spreadsheet->getProperties()->setKeywords($value); + + break; + case 0x06: // Comments (Description) + $this->spreadsheet->getProperties()->setDescription($value); + + break; + case 0x07: // Template + // Not supported by PhpSpreadsheet + break; + case 0x08: // Last Saved By (LastModifiedBy) + $this->spreadsheet->getProperties()->setLastModifiedBy($value); + + break; + case 0x09: // Revision + // Not supported by PhpSpreadsheet + break; + case 0x0A: // Total Editing Time + // Not supported by PhpSpreadsheet + break; + case 0x0B: // Last Printed + // Not supported by PhpSpreadsheet + break; + case 0x0C: // Created Date/Time + $this->spreadsheet->getProperties()->setCreated($value); + + break; + case 0x0D: // Modified Date/Time + $this->spreadsheet->getProperties()->setModified($value); + + break; + case 0x0E: // Number of Pages + // Not supported by PhpSpreadsheet + break; + case 0x0F: // Number of Words + // Not supported by PhpSpreadsheet + break; + case 0x10: // Number of Characters + // Not supported by PhpSpreadsheet + break; + case 0x11: // Thumbnail + // Not supported by PhpSpreadsheet + break; + case 0x12: // Name of creating application + // Not supported by PhpSpreadsheet + break; + case 0x13: // Security + // Not supported by PhpSpreadsheet + break; + } + } + } + + /** + * Read additional document summary information. + */ + private function readDocumentSummaryInformation(): void + { + if (!isset($this->documentSummaryInformation)) { + return; + } + + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + // offset: 2; size: 2; + // offset: 4; size: 2; OS version + // offset: 6; size: 2; OS indicator + // offset: 8; size: 16 + // offset: 24; size: 4; section count + $secCount = self::getInt4d($this->documentSummaryInformation, 24); + + // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae + // offset: 44; size: 4; first section offset + $secOffset = self::getInt4d($this->documentSummaryInformation, 44); + + // section header + // offset: $secOffset; size: 4; section length + $secLength = self::getInt4d($this->documentSummaryInformation, $secOffset); + + // offset: $secOffset+4; size: 4; property count + $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset + 4); + + // initialize code page (used to resolve string values) + $codePage = 'CP1252'; + + // offset: ($secOffset+8); size: var + // loop through property decarations and properties + for ($i = 0; $i < $countProperties; ++$i) { + // offset: ($secOffset+8) + (8 * $i); size: 4; property ID + $id = self::getInt4d($this->documentSummaryInformation, ($secOffset + 8) + (8 * $i)); + + // Use value of property id as appropriate + // offset: 60 + 8 * $i; size: 4; offset from beginning of section (48) + $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset + 12) + (8 * $i)); + + $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset); + + // initialize property value + $value = null; + + // extract property value based on property type + switch ($type) { + case 0x02: // 2 byte signed integer + $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); + + break; + case 0x03: // 4 byte signed integer + $value = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); + + break; + case 0x0B: // Boolean + $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); + $value = ($value == 0 ? false : true); + + break; + case 0x13: // 4 byte unsigned integer + // not needed yet, fix later if necessary + break; + case 0x1E: // null-terminated string prepended by dword string length + $byteLength = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); + $value = substr($this->documentSummaryInformation, $secOffset + 8 + $offset, $byteLength); + $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage); + $value = rtrim($value); + + break; + case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // PHP-Time + $value = OLE::OLE2LocalDate(substr($this->documentSummaryInformation, $secOffset + 4 + $offset, 8)); + + break; + case 0x47: // Clipboard format + // not needed yet, fix later if necessary + break; + } + + switch ($id) { + case 0x01: // Code Page + $codePage = CodePage::numberToName($value); + + break; + case 0x02: // Category + $this->spreadsheet->getProperties()->setCategory($value); + + break; + case 0x03: // Presentation Target + // Not supported by PhpSpreadsheet + break; + case 0x04: // Bytes + // Not supported by PhpSpreadsheet + break; + case 0x05: // Lines + // Not supported by PhpSpreadsheet + break; + case 0x06: // Paragraphs + // Not supported by PhpSpreadsheet + break; + case 0x07: // Slides + // Not supported by PhpSpreadsheet + break; + case 0x08: // Notes + // Not supported by PhpSpreadsheet + break; + case 0x09: // Hidden Slides + // Not supported by PhpSpreadsheet + break; + case 0x0A: // MM Clips + // Not supported by PhpSpreadsheet + break; + case 0x0B: // Scale Crop + // Not supported by PhpSpreadsheet + break; + case 0x0C: // Heading Pairs + // Not supported by PhpSpreadsheet + break; + case 0x0D: // Titles of Parts + // Not supported by PhpSpreadsheet + break; + case 0x0E: // Manager + $this->spreadsheet->getProperties()->setManager($value); + + break; + case 0x0F: // Company + $this->spreadsheet->getProperties()->setCompany($value); + + break; + case 0x10: // Links up-to-date + // Not supported by PhpSpreadsheet + break; + } + } + } + + /** + * Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record. + */ + private function readDefault(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // move stream pointer to next record + $this->pos += 4 + $length; + } + + /** + * The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, + * this record stores a note (cell note). This feature was significantly enhanced in Excel 97. + */ + private function readNote(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + $cellAddress = $this->readBIFF8CellAddress(substr($recordData, 0, 4)); + if ($this->version == self::XLS_BIFF8) { + $noteObjID = self::getUInt2d($recordData, 6); + $noteAuthor = self::readUnicodeStringLong(substr($recordData, 8)); + $noteAuthor = $noteAuthor['value']; + $this->cellNotes[$noteObjID] = [ + 'cellRef' => $cellAddress, + 'objectID' => $noteObjID, + 'author' => $noteAuthor, + ]; + } else { + $extension = false; + if ($cellAddress == '$B$65536') { + // If the address row is -1 and the column is 0, (which translates as $B$65536) then this is a continuation + // note from the previous cell annotation. We're not yet handling this, so annotations longer than the + // max 2048 bytes will probably throw a wobbly. + $row = self::getUInt2d($recordData, 0); + $extension = true; + $cellAddress = array_pop(array_keys($this->phpSheet->getComments())); + } + + $cellAddress = str_replace('$', '', $cellAddress); + $noteLength = self::getUInt2d($recordData, 4); + $noteText = trim(substr($recordData, 6)); + + if ($extension) { + // Concatenate this extension with the currently set comment for the cell + $comment = $this->phpSheet->getComment($cellAddress); + $commentText = $comment->getText()->getPlainText(); + $comment->setText($this->parseRichText($commentText . $noteText)); + } else { + // Set comment for the cell + $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText)); +// ->setAuthor($author) + } + } + } + + /** + * The TEXT Object record contains the text associated with a cell annotation. + */ + private function readTextObject(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // recordData consists of an array of subrecords looking like this: + // grbit: 2 bytes; Option Flags + // rot: 2 bytes; rotation + // cchText: 2 bytes; length of the text (in the first continue record) + // cbRuns: 2 bytes; length of the formatting (in the second continue record) + // followed by the continuation records containing the actual text and formatting + $grbitOpts = self::getUInt2d($recordData, 0); + $rot = self::getUInt2d($recordData, 2); + $cchText = self::getUInt2d($recordData, 10); + $cbRuns = self::getUInt2d($recordData, 12); + $text = $this->getSplicedRecordData(); + + $textByte = $text['spliceOffsets'][1] - $text['spliceOffsets'][0] - 1; + $textStr = substr($text['recordData'], $text['spliceOffsets'][0] + 1, $textByte); + // get 1 byte + $is16Bit = ord($text['recordData'][0]); + // it is possible to use a compressed format, + // which omits the high bytes of all characters, if they are all zero + if (($is16Bit & 0x01) === 0) { + $textStr = StringHelper::ConvertEncoding($textStr, 'UTF-8', 'ISO-8859-1'); + } else { + $textStr = $this->decodeCodepage($textStr); + } + + $this->textObjects[$this->textObjRef] = [ + 'text' => $textStr, + 'format' => substr($text['recordData'], $text['spliceOffsets'][1], $cbRuns), + 'alignment' => $grbitOpts, + 'rotation' => $rot, + ]; + } + + /** + * Read BOF. + */ + private function readBof(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = substr($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 2; size: 2; type of the following data + $substreamType = self::getUInt2d($recordData, 2); + + switch ($substreamType) { + case self::XLS_WORKBOOKGLOBALS: + $version = self::getUInt2d($recordData, 0); + if (($version != self::XLS_BIFF8) && ($version != self::XLS_BIFF7)) { + throw new Exception('Cannot read this Excel file. Version is too old.'); + } + $this->version = $version; + + break; + case self::XLS_WORKSHEET: + // do not use this version information for anything + // it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream + break; + default: + // substream, e.g. chart + // just skip the entire substream + do { + $code = self::getUInt2d($this->data, $this->pos); + $this->readDefault(); + } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize); + + break; + } + } + + /** + * FILEPASS. + * + * This record is part of the File Protection Block. It + * contains information about the read/write password of the + * file. All record contents following this record will be + * encrypted. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + * + * The decryption functions and objects used from here on in + * are based on the source of Spreadsheet-ParseExcel: + * https://metacpan.org/release/Spreadsheet-ParseExcel + */ + private function readFilepass(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + if ($length != 54) { + throw new Exception('Unexpected file pass record length'); + } + + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->verifyPassword('VelvetSweatshop', substr($recordData, 6, 16), substr($recordData, 22, 16), substr($recordData, 38, 16), $this->md5Ctxt)) { + throw new Exception('Decryption password incorrect'); + } + + $this->encryption = self::MS_BIFF_CRYPTO_RC4; + + // Decryption required from the record after next onwards + $this->encryptionStartPos = $this->pos + self::getUInt2d($this->data, $this->pos + 2); + } + + /** + * Make an RC4 decryptor for the given block. + * + * @param int $block Block for which to create decrypto + * @param string $valContext MD5 context state + * + * @return Xls\RC4 + */ + private function makeKey($block, $valContext) + { + $pwarray = str_repeat("\0", 64); + + for ($i = 0; $i < 5; ++$i) { + $pwarray[$i] = $valContext[$i]; + } + + $pwarray[5] = chr($block & 0xff); + $pwarray[6] = chr(($block >> 8) & 0xff); + $pwarray[7] = chr(($block >> 16) & 0xff); + $pwarray[8] = chr(($block >> 24) & 0xff); + + $pwarray[9] = "\x80"; + $pwarray[56] = "\x48"; + + $md5 = new Xls\MD5(); + $md5->add($pwarray); + + $s = $md5->getContext(); + + return new Xls\RC4($s); + } + + /** + * Verify RC4 file password. + * + * @param string $password Password to check + * @param string $docid Document id + * @param string $salt_data Salt data + * @param string $hashedsalt_data Hashed salt data + * @param string $valContext Set to the MD5 context of the value + * + * @return bool Success + */ + private function verifyPassword($password, $docid, $salt_data, $hashedsalt_data, &$valContext) + { + $pwarray = str_repeat("\0", 64); + + $iMax = strlen($password); + for ($i = 0; $i < $iMax; ++$i) { + $o = ord(substr($password, $i, 1)); + $pwarray[2 * $i] = chr($o & 0xff); + $pwarray[2 * $i + 1] = chr(($o >> 8) & 0xff); + } + $pwarray[2 * $i] = chr(0x80); + $pwarray[56] = chr(($i << 4) & 0xff); + + $md5 = new Xls\MD5(); + $md5->add($pwarray); + + $mdContext1 = $md5->getContext(); + + $offset = 0; + $keyoffset = 0; + $tocopy = 5; + + $md5->reset(); + + while ($offset != 16) { + if ((64 - $offset) < 5) { + $tocopy = 64 - $offset; + } + for ($i = 0; $i <= $tocopy; ++$i) { + $pwarray[$offset + $i] = $mdContext1[$keyoffset + $i]; + } + $offset += $tocopy; + + if ($offset == 64) { + $md5->add($pwarray); + $keyoffset = $tocopy; + $tocopy = 5 - $tocopy; + $offset = 0; + + continue; + } + + $keyoffset = 0; + $tocopy = 5; + for ($i = 0; $i < 16; ++$i) { + $pwarray[$offset + $i] = $docid[$i]; + } + $offset += 16; + } + + $pwarray[16] = "\x80"; + for ($i = 0; $i < 47; ++$i) { + $pwarray[17 + $i] = "\0"; + } + $pwarray[56] = "\x80"; + $pwarray[57] = "\x0a"; + + $md5->add($pwarray); + $valContext = $md5->getContext(); + + $key = $this->makeKey(0, $valContext); + + $salt = $key->RC4($salt_data); + $hashedsalt = $key->RC4($hashedsalt_data); + + $salt .= "\x80" . str_repeat("\0", 47); + $salt[56] = "\x80"; + + $md5->reset(); + $md5->add($salt); + $mdContext2 = $md5->getContext(); + + return $mdContext2 == $hashedsalt; + } + + /** + * CODEPAGE. + * + * This record stores the text encoding used to write byte + * strings, stored as MS Windows code page identifier. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readCodepage(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; code page identifier + $codepage = self::getUInt2d($recordData, 0); + + $this->codepage = CodePage::numberToName($codepage); + } + + /** + * DATEMODE. + * + * This record specifies the base date for displaying date + * values. All dates are stored as count of days past this + * base date. In BIFF2-BIFF4 this record is part of the + * Calculation Settings Block. In BIFF5-BIFF8 it is + * stored in the Workbook Globals Substream. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readDateMode(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; 0 = base 1900, 1 = base 1904 + Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); + if (ord($recordData[0]) == 1) { + Date::setExcelCalendar(Date::CALENDAR_MAC_1904); + } + } + + /** + * Read a FONT record. + */ + private function readFont(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + $objFont = new Font(); + + // offset: 0; size: 2; height of the font (in twips = 1/20 of a point) + $size = self::getUInt2d($recordData, 0); + $objFont->setSize($size / 20); + + // offset: 2; size: 2; option flags + // bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8) + // bit: 1; mask 0x0002; italic + $isItalic = (0x0002 & self::getUInt2d($recordData, 2)) >> 1; + if ($isItalic) { + $objFont->setItalic(true); + } + + // bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8) + // bit: 3; mask 0x0008; strikethrough + $isStrike = (0x0008 & self::getUInt2d($recordData, 2)) >> 3; + if ($isStrike) { + $objFont->setStrikethrough(true); + } + + // offset: 4; size: 2; colour index + $colorIndex = self::getUInt2d($recordData, 4); + $objFont->colorIndex = $colorIndex; + + // offset: 6; size: 2; font weight + $weight = self::getUInt2d($recordData, 6); + switch ($weight) { + case 0x02BC: + $objFont->setBold(true); + + break; + } + + // offset: 8; size: 2; escapement type + $escapement = self::getUInt2d($recordData, 8); + switch ($escapement) { + case 0x0001: + $objFont->setSuperscript(true); + + break; + case 0x0002: + $objFont->setSubscript(true); + + break; + } + + // offset: 10; size: 1; underline type + $underlineType = ord($recordData[10]); + switch ($underlineType) { + case 0x00: + break; // no underline + case 0x01: + $objFont->setUnderline(Font::UNDERLINE_SINGLE); + + break; + case 0x02: + $objFont->setUnderline(Font::UNDERLINE_DOUBLE); + + break; + case 0x21: + $objFont->setUnderline(Font::UNDERLINE_SINGLEACCOUNTING); + + break; + case 0x22: + $objFont->setUnderline(Font::UNDERLINE_DOUBLEACCOUNTING); + + break; + } + + // offset: 11; size: 1; font family + // offset: 12; size: 1; character set + // offset: 13; size: 1; not used + // offset: 14; size: var; font name + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringShort(substr($recordData, 14)); + } else { + $string = $this->readByteStringShort(substr($recordData, 14)); + } + $objFont->setName($string['value']); + + $this->objFonts[] = $objFont; + } + } + + /** + * FORMAT. + * + * This record contains information about a number format. + * All FORMAT records occur together in a sequential list. + * + * In BIFF2-BIFF4 other records referencing a FORMAT record + * contain a zero-based index into this list. From BIFF5 on + * the FORMAT record contains the index itself that will be + * used by other records. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readFormat(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + $indexCode = self::getUInt2d($recordData, 0); + + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong(substr($recordData, 2)); + } else { + // BIFF7 + $string = $this->readByteStringShort(substr($recordData, 2)); + } + + $formatString = $string['value']; + $this->formats[$indexCode] = $formatString; + } + } + + /** + * XF - Extended Format. + * + * This record contains formatting information for cells, rows, columns or styles. + * According to https://support.microsoft.com/en-us/help/147732 there are always at least 15 cell style XF + * and 1 cell XF. + * Inspection of Excel files generated by MS Office Excel shows that XF records 0-14 are cell style XF + * and XF record 15 is a cell XF + * We only read the first cell style XF and skip the remaining cell style XF records + * We read all cell XF records. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readXf(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + $objStyle = new Style(); + + if (!$this->readDataOnly) { + // offset: 0; size: 2; Index to FONT record + if (self::getUInt2d($recordData, 0) < 4) { + $fontIndex = self::getUInt2d($recordData, 0); + } else { + // this has to do with that index 4 is omitted in all BIFF versions for some strange reason + // check the OpenOffice documentation of the FONT record + $fontIndex = self::getUInt2d($recordData, 0) - 1; + } + $objStyle->setFont($this->objFonts[$fontIndex]); + + // offset: 2; size: 2; Index to FORMAT record + $numberFormatIndex = self::getUInt2d($recordData, 2); + if (isset($this->formats[$numberFormatIndex])) { + // then we have user-defined format code + $numberFormat = ['formatCode' => $this->formats[$numberFormatIndex]]; + } elseif (($code = NumberFormat::builtInFormatCode($numberFormatIndex)) !== '') { + // then we have built-in format code + $numberFormat = ['formatCode' => $code]; + } else { + // we set the general format code + $numberFormat = ['formatCode' => 'General']; + } + $objStyle->getNumberFormat()->setFormatCode($numberFormat['formatCode']); + + // offset: 4; size: 2; XF type, cell protection, and parent style XF + // bit 2-0; mask 0x0007; XF_TYPE_PROT + $xfTypeProt = self::getUInt2d($recordData, 4); + // bit 0; mask 0x01; 1 = cell is locked + $isLocked = (0x01 & $xfTypeProt) >> 0; + $objStyle->getProtection()->setLocked($isLocked ? Protection::PROTECTION_INHERIT : Protection::PROTECTION_UNPROTECTED); + + // bit 1; mask 0x02; 1 = Formula is hidden + $isHidden = (0x02 & $xfTypeProt) >> 1; + $objStyle->getProtection()->setHidden($isHidden ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED); + + // bit 2; mask 0x04; 0 = Cell XF, 1 = Cell Style XF + $isCellStyleXf = (0x04 & $xfTypeProt) >> 2; + + // offset: 6; size: 1; Alignment and text break + // bit 2-0, mask 0x07; horizontal alignment + $horAlign = (0x07 & ord($recordData[6])) >> 0; + switch ($horAlign) { + case 0: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_GENERAL); + + break; + case 1: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT); + + break; + case 2: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER); + + break; + case 3: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT); + + break; + case 4: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_FILL); + + break; + case 5: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_JUSTIFY); + + break; + case 6: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER_CONTINUOUS); + + break; + } + // bit 3, mask 0x08; wrap text + $wrapText = (0x08 & ord($recordData[6])) >> 3; + switch ($wrapText) { + case 0: + $objStyle->getAlignment()->setWrapText(false); + + break; + case 1: + $objStyle->getAlignment()->setWrapText(true); + + break; + } + // bit 6-4, mask 0x70; vertical alignment + $vertAlign = (0x70 & ord($recordData[6])) >> 4; + switch ($vertAlign) { + case 0: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_TOP); + + break; + case 1: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); + + break; + case 2: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_BOTTOM); + + break; + case 3: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_JUSTIFY); + + break; + } + + if ($this->version == self::XLS_BIFF8) { + // offset: 7; size: 1; XF_ROTATION: Text rotation angle + $angle = ord($recordData[7]); + $rotation = 0; + if ($angle <= 90) { + $rotation = $angle; + } elseif ($angle <= 180) { + $rotation = 90 - $angle; + } elseif ($angle == 255) { + $rotation = -165; + } + $objStyle->getAlignment()->setTextRotation($rotation); + + // offset: 8; size: 1; Indentation, shrink to cell size, and text direction + // bit: 3-0; mask: 0x0F; indent level + $indent = (0x0F & ord($recordData[8])) >> 0; + $objStyle->getAlignment()->setIndent($indent); + + // bit: 4; mask: 0x10; 1 = shrink content to fit into cell + $shrinkToFit = (0x10 & ord($recordData[8])) >> 4; + switch ($shrinkToFit) { + case 0: + $objStyle->getAlignment()->setShrinkToFit(false); + + break; + case 1: + $objStyle->getAlignment()->setShrinkToFit(true); + + break; + } + + // offset: 9; size: 1; Flags used for attribute groups + + // offset: 10; size: 4; Cell border lines and background area + // bit: 3-0; mask: 0x0000000F; left style + if ($bordersLeftStyle = Xls\Style\Border::lookup((0x0000000F & self::getInt4d($recordData, 10)) >> 0)) { + $objStyle->getBorders()->getLeft()->setBorderStyle($bordersLeftStyle); + } + // bit: 7-4; mask: 0x000000F0; right style + if ($bordersRightStyle = Xls\Style\Border::lookup((0x000000F0 & self::getInt4d($recordData, 10)) >> 4)) { + $objStyle->getBorders()->getRight()->setBorderStyle($bordersRightStyle); + } + // bit: 11-8; mask: 0x00000F00; top style + if ($bordersTopStyle = Xls\Style\Border::lookup((0x00000F00 & self::getInt4d($recordData, 10)) >> 8)) { + $objStyle->getBorders()->getTop()->setBorderStyle($bordersTopStyle); + } + // bit: 15-12; mask: 0x0000F000; bottom style + if ($bordersBottomStyle = Xls\Style\Border::lookup((0x0000F000 & self::getInt4d($recordData, 10)) >> 12)) { + $objStyle->getBorders()->getBottom()->setBorderStyle($bordersBottomStyle); + } + // bit: 22-16; mask: 0x007F0000; left color + $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & self::getInt4d($recordData, 10)) >> 16; + + // bit: 29-23; mask: 0x3F800000; right color + $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & self::getInt4d($recordData, 10)) >> 23; + + // bit: 30; mask: 0x40000000; 1 = diagonal line from top left to right bottom + $diagonalDown = (0x40000000 & self::getInt4d($recordData, 10)) >> 30 ? true : false; + + // bit: 31; mask: 0x80000000; 1 = diagonal line from bottom left to top right + $diagonalUp = (0x80000000 & self::getInt4d($recordData, 10)) >> 31 ? true : false; + + if ($diagonalUp == false && $diagonalDown == false) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp == true && $diagonalDown == false) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif ($diagonalUp == false && $diagonalDown == true) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } elseif ($diagonalUp == true && $diagonalDown == true) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + + // offset: 14; size: 4; + // bit: 6-0; mask: 0x0000007F; top color + $objStyle->getBorders()->getTop()->colorIndex = (0x0000007F & self::getInt4d($recordData, 14)) >> 0; + + // bit: 13-7; mask: 0x00003F80; bottom color + $objStyle->getBorders()->getBottom()->colorIndex = (0x00003F80 & self::getInt4d($recordData, 14)) >> 7; + + // bit: 20-14; mask: 0x001FC000; diagonal color + $objStyle->getBorders()->getDiagonal()->colorIndex = (0x001FC000 & self::getInt4d($recordData, 14)) >> 14; + + // bit: 24-21; mask: 0x01E00000; diagonal style + if ($bordersDiagonalStyle = Xls\Style\Border::lookup((0x01E00000 & self::getInt4d($recordData, 14)) >> 21)) { + $objStyle->getBorders()->getDiagonal()->setBorderStyle($bordersDiagonalStyle); + } + + // bit: 31-26; mask: 0xFC000000 fill pattern + if ($fillType = Xls\Style\FillPattern::lookup((0xFC000000 & self::getInt4d($recordData, 14)) >> 26)) { + $objStyle->getFill()->setFillType($fillType); + } + // offset: 18; size: 2; pattern and background colour + // bit: 6-0; mask: 0x007F; color index for pattern color + $objStyle->getFill()->startcolorIndex = (0x007F & self::getUInt2d($recordData, 18)) >> 0; + + // bit: 13-7; mask: 0x3F80; color index for pattern background + $objStyle->getFill()->endcolorIndex = (0x3F80 & self::getUInt2d($recordData, 18)) >> 7; + } else { + // BIFF5 + + // offset: 7; size: 1; Text orientation and flags + $orientationAndFlags = ord($recordData[7]); + + // bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation + $xfOrientation = (0x03 & $orientationAndFlags) >> 0; + switch ($xfOrientation) { + case 0: + $objStyle->getAlignment()->setTextRotation(0); + + break; + case 1: + $objStyle->getAlignment()->setTextRotation(-165); + + break; + case 2: + $objStyle->getAlignment()->setTextRotation(90); + + break; + case 3: + $objStyle->getAlignment()->setTextRotation(-90); + + break; + } + + // offset: 8; size: 4; cell border lines and background area + $borderAndBackground = self::getInt4d($recordData, 8); + + // bit: 6-0; mask: 0x0000007F; color index for pattern color + $objStyle->getFill()->startcolorIndex = (0x0000007F & $borderAndBackground) >> 0; + + // bit: 13-7; mask: 0x00003F80; color index for pattern background + $objStyle->getFill()->endcolorIndex = (0x00003F80 & $borderAndBackground) >> 7; + + // bit: 21-16; mask: 0x003F0000; fill pattern + $objStyle->getFill()->setFillType(Xls\Style\FillPattern::lookup((0x003F0000 & $borderAndBackground) >> 16)); + + // bit: 24-22; mask: 0x01C00000; bottom line style + $objStyle->getBorders()->getBottom()->setBorderStyle(Xls\Style\Border::lookup((0x01C00000 & $borderAndBackground) >> 22)); + + // bit: 31-25; mask: 0xFE000000; bottom line color + $objStyle->getBorders()->getBottom()->colorIndex = (0xFE000000 & $borderAndBackground) >> 25; + + // offset: 12; size: 4; cell border lines + $borderLines = self::getInt4d($recordData, 12); + + // bit: 2-0; mask: 0x00000007; top line style + $objStyle->getBorders()->getTop()->setBorderStyle(Xls\Style\Border::lookup((0x00000007 & $borderLines) >> 0)); + + // bit: 5-3; mask: 0x00000038; left line style + $objStyle->getBorders()->getLeft()->setBorderStyle(Xls\Style\Border::lookup((0x00000038 & $borderLines) >> 3)); + + // bit: 8-6; mask: 0x000001C0; right line style + $objStyle->getBorders()->getRight()->setBorderStyle(Xls\Style\Border::lookup((0x000001C0 & $borderLines) >> 6)); + + // bit: 15-9; mask: 0x0000FE00; top line color index + $objStyle->getBorders()->getTop()->colorIndex = (0x0000FE00 & $borderLines) >> 9; + + // bit: 22-16; mask: 0x007F0000; left line color index + $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & $borderLines) >> 16; + + // bit: 29-23; mask: 0x3F800000; right line color index + $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & $borderLines) >> 23; + } + + // add cellStyleXf or cellXf and update mapping + if ($isCellStyleXf) { + // we only read one style XF record which is always the first + if ($this->xfIndex == 0) { + $this->spreadsheet->addCellStyleXf($objStyle); + $this->mapCellStyleXfIndex[$this->xfIndex] = 0; + } + } else { + // we read all cell XF records + $this->spreadsheet->addCellXf($objStyle); + $this->mapCellXfIndex[$this->xfIndex] = count($this->spreadsheet->getCellXfCollection()) - 1; + } + + // update XF index for when we read next record + ++$this->xfIndex; + } + } + + private function readXfExt(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0x087D = repeated header + + // offset: 2; size: 2 + + // offset: 4; size: 8; not used + + // offset: 12; size: 2; record version + + // offset: 14; size: 2; index to XF record which this record modifies + $ixfe = self::getUInt2d($recordData, 14); + + // offset: 16; size: 2; not used + + // offset: 18; size: 2; number of extension properties that follow + $cexts = self::getUInt2d($recordData, 18); + + // start reading the actual extension data + $offset = 20; + while ($offset < $length) { + // extension type + $extType = self::getUInt2d($recordData, $offset); + + // extension length + $cb = self::getUInt2d($recordData, $offset + 2); + + // extension data + $extData = substr($recordData, $offset + 4, $cb); + + switch ($extType) { + case 4: // fill start color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); + $fill->getStartColor()->setRGB($rgb); + $fill->startcolorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 5: // fill end color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); + $fill->getEndColor()->setRGB($rgb); + $fill->endcolorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 7: // border color top + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $top = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getTop(); + $top->getColor()->setRGB($rgb); + $top->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 8: // border color bottom + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $bottom = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getBottom(); + $bottom->getColor()->setRGB($rgb); + $bottom->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 9: // border color left + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $left = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getLeft(); + $left->getColor()->setRGB($rgb); + $left->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 10: // border color right + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $right = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getRight(); + $right->getColor()->setRGB($rgb); + $right->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 11: // border color diagonal + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $diagonal = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getDiagonal(); + $diagonal->getColor()->setRGB($rgb); + $diagonal->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + case 13: // font color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $font = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFont(); + $font->getColor()->setRGB($rgb); + $font->colorIndex = null; // normal color index does not apply, discard + } + } + + break; + } + + $offset += $cb; + } + } + } + + /** + * Read STYLE record. + */ + private function readStyle(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index to XF record and flag for built-in style + $ixfe = self::getUInt2d($recordData, 0); + + // bit: 11-0; mask 0x0FFF; index to XF record + $xfIndex = (0x0FFF & $ixfe) >> 0; + + // bit: 15; mask 0x8000; 0 = user-defined style, 1 = built-in style + $isBuiltIn = (bool) ((0x8000 & $ixfe) >> 15); + + if ($isBuiltIn) { + // offset: 2; size: 1; identifier for built-in style + $builtInId = ord($recordData[2]); + + switch ($builtInId) { + case 0x00: + // currently, we are not using this for anything + break; + default: + break; + } + } + // user-defined; not supported by PhpSpreadsheet + } + } + + /** + * Read PALETTE record. + */ + private function readPalette(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; number of following colors + $nm = self::getUInt2d($recordData, 0); + + // list of RGB colors + for ($i = 0; $i < $nm; ++$i) { + $rgb = substr($recordData, 2 + 4 * $i, 4); + $this->palette[] = self::readRGB($rgb); + } + } + } + + /** + * SHEET. + * + * This record is located in the Workbook Globals + * Substream and represents a sheet inside the workbook. + * One SHEET record is written for each sheet. It stores the + * sheet name and a stream offset to the BOF record of the + * respective Sheet Substream within the Workbook Stream. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readSheet(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // offset: 0; size: 4; absolute stream position of the BOF record of the sheet + // NOTE: not encrypted + $rec_offset = self::getInt4d($this->data, $this->pos + 4); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 4; size: 1; sheet state + switch (ord($recordData[4])) { + case 0x00: + $sheetState = Worksheet::SHEETSTATE_VISIBLE; + + break; + case 0x01: + $sheetState = Worksheet::SHEETSTATE_HIDDEN; + + break; + case 0x02: + $sheetState = Worksheet::SHEETSTATE_VERYHIDDEN; + + break; + default: + $sheetState = Worksheet::SHEETSTATE_VISIBLE; + + break; + } + + // offset: 5; size: 1; sheet type + $sheetType = ord($recordData[5]); + + // offset: 6; size: var; sheet name + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringShort(substr($recordData, 6)); + $rec_name = $string['value']; + } elseif ($this->version == self::XLS_BIFF7) { + $string = $this->readByteStringShort(substr($recordData, 6)); + $rec_name = $string['value']; + } + + $this->sheets[] = [ + 'name' => $rec_name, + 'offset' => $rec_offset, + 'sheetState' => $sheetState, + 'sheetType' => $sheetType, + ]; + } + + /** + * Read EXTERNALBOOK record. + */ + private function readExternalBook(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset within record data + $offset = 0; + + // there are 4 types of records + if (strlen($recordData) > 4) { + // external reference + // offset: 0; size: 2; number of sheet names ($nm) + $nm = self::getUInt2d($recordData, 0); + $offset += 2; + + // offset: 2; size: var; encoded URL without sheet name (Unicode string, 16-bit length) + $encodedUrlString = self::readUnicodeStringLong(substr($recordData, 2)); + $offset += $encodedUrlString['size']; + + // offset: var; size: var; list of $nm sheet names (Unicode strings, 16-bit length) + $externalSheetNames = []; + for ($i = 0; $i < $nm; ++$i) { + $externalSheetNameString = self::readUnicodeStringLong(substr($recordData, $offset)); + $externalSheetNames[] = $externalSheetNameString['value']; + $offset += $externalSheetNameString['size']; + } + + // store the record data + $this->externalBooks[] = [ + 'type' => 'external', + 'encodedUrl' => $encodedUrlString['value'], + 'externalSheetNames' => $externalSheetNames, + ]; + } elseif (substr($recordData, 2, 2) == pack('CC', 0x01, 0x04)) { + // internal reference + // offset: 0; size: 2; number of sheet in this document + // offset: 2; size: 2; 0x01 0x04 + $this->externalBooks[] = [ + 'type' => 'internal', + ]; + } elseif (substr($recordData, 0, 4) == pack('vCC', 0x0001, 0x01, 0x3A)) { + // add-in function + // offset: 0; size: 2; 0x0001 + $this->externalBooks[] = [ + 'type' => 'addInFunction', + ]; + } elseif (substr($recordData, 0, 2) == pack('v', 0x0000)) { + // DDE links, OLE links + // offset: 0; size: 2; 0x0000 + // offset: 2; size: var; encoded source document name + $this->externalBooks[] = [ + 'type' => 'DDEorOLE', + ]; + } + } + + /** + * Read EXTERNNAME record. + */ + private function readExternName(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // external sheet references provided for named cells + if ($this->version == self::XLS_BIFF8) { + // offset: 0; size: 2; options + $options = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; + + // offset: 4; size: 2; not used + + // offset: 6; size: var + $nameString = self::readUnicodeStringShort(substr($recordData, 6)); + + // offset: var; size: var; formula data + $offset = 6 + $nameString['size']; + $formula = $this->getFormulaFromStructure(substr($recordData, $offset)); + + $this->externalNames[] = [ + 'name' => $nameString['value'], + 'formula' => $formula, + ]; + } + } + + /** + * Read EXTERNSHEET record. + */ + private function readExternSheet(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // external sheet references provided for named cells + if ($this->version == self::XLS_BIFF8) { + // offset: 0; size: 2; number of following ref structures + $nm = self::getUInt2d($recordData, 0); + for ($i = 0; $i < $nm; ++$i) { + $this->ref[] = [ + // offset: 2 + 6 * $i; index to EXTERNALBOOK record + 'externalBookIndex' => self::getUInt2d($recordData, 2 + 6 * $i), + // offset: 4 + 6 * $i; index to first sheet in EXTERNALBOOK record + 'firstSheetIndex' => self::getUInt2d($recordData, 4 + 6 * $i), + // offset: 6 + 6 * $i; index to last sheet in EXTERNALBOOK record + 'lastSheetIndex' => self::getUInt2d($recordData, 6 + 6 * $i), + ]; + } + } + } + + /** + * DEFINEDNAME. + * + * This record is part of a Link Table. It contains the name + * and the token array of an internal defined name. Token + * arrays of defined names contain tokens with aberrant + * token classes. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readDefinedName(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8) { + // retrieves named cells + + // offset: 0; size: 2; option flags + $opts = self::getUInt2d($recordData, 0); + + // bit: 5; mask: 0x0020; 0 = user-defined name, 1 = built-in-name + $isBuiltInName = (0x0020 & $opts) >> 5; + + // offset: 2; size: 1; keyboard shortcut + + // offset: 3; size: 1; length of the name (character count) + $nlen = ord($recordData[3]); + + // offset: 4; size: 2; size of the formula data (it can happen that this is zero) + // note: there can also be additional data, this is not included in $flen + $flen = self::getUInt2d($recordData, 4); + + // offset: 8; size: 2; 0=Global name, otherwise index to sheet (1-based) + $scope = self::getUInt2d($recordData, 8); + + // offset: 14; size: var; Name (Unicode string without length field) + $string = self::readUnicodeString(substr($recordData, 14), $nlen); + + // offset: var; size: $flen; formula data + $offset = 14 + $string['size']; + $formulaStructure = pack('v', $flen) . substr($recordData, $offset); + + try { + $formula = $this->getFormulaFromStructure($formulaStructure); + } catch (PhpSpreadsheetException $e) { + $formula = ''; + } + + $this->definedname[] = [ + 'isBuiltInName' => $isBuiltInName, + 'name' => $string['value'], + 'formula' => $formula, + 'scope' => $scope, + ]; + } + } + + /** + * Read MSODRAWINGGROUP record. + */ + private function readMsoDrawingGroup(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + $recordData = $splicedRecordData['recordData']; + + $this->drawingGroupData .= $recordData; + } + + /** + * SST - Shared String Table. + * + * This record contains a list of all strings used anywhere + * in the workbook. Each string occurs only once. The + * workbook uses indexes into the list to reference the + * strings. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readSst(): void + { + // offset within (spliced) record data + $pos = 0; + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + + $recordData = $splicedRecordData['recordData']; + $spliceOffsets = $splicedRecordData['spliceOffsets']; + + // offset: 0; size: 4; total number of strings in the workbook + $pos += 4; + + // offset: 4; size: 4; number of following strings ($nm) + $nm = self::getInt4d($recordData, 4); + $pos += 4; + + // loop through the Unicode strings (16-bit length) + for ($i = 0; $i < $nm; ++$i) { + // number of characters in the Unicode string + $numChars = self::getUInt2d($recordData, $pos); + $pos += 2; + + // option flags + $optionFlags = ord($recordData[$pos]); + ++$pos; + + // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed + $isCompressed = (($optionFlags & 0x01) == 0); + + // bit: 2; mask: 0x02; 0 = ordinary; 1 = Asian phonetic + $hasAsian = (($optionFlags & 0x04) != 0); + + // bit: 3; mask: 0x03; 0 = ordinary; 1 = Rich-Text + $hasRichText = (($optionFlags & 0x08) != 0); + + if ($hasRichText) { + // number of Rich-Text formatting runs + $formattingRuns = self::getUInt2d($recordData, $pos); + $pos += 2; + } + + if ($hasAsian) { + // size of Asian phonetic setting + $extendedRunLength = self::getInt4d($recordData, $pos); + $pos += 4; + } + + // expected byte length of character array if not split + $len = ($isCompressed) ? $numChars : $numChars * 2; + + // look up limit position + foreach ($spliceOffsets as $spliceOffset) { + // it can happen that the string is empty, therefore we need + // <= and not just < + if ($pos <= $spliceOffset) { + $limitpos = $spliceOffset; + + break; + } + } + + if ($pos + $len <= $limitpos) { + // character array is not split between records + + $retstr = substr($recordData, $pos, $len); + $pos += $len; + } else { + // character array is split between records + + // first part of character array + $retstr = substr($recordData, $pos, $limitpos - $pos); + + $bytesRead = $limitpos - $pos; + + // remaining characters in Unicode string + $charsLeft = $numChars - (($isCompressed) ? $bytesRead : ($bytesRead / 2)); + + $pos = $limitpos; + + // keep reading the characters + while ($charsLeft > 0) { + // look up next limit position, in case the string span more than one continue record + foreach ($spliceOffsets as $spliceOffset) { + if ($pos < $spliceOffset) { + $limitpos = $spliceOffset; + + break; + } + } + + // repeated option flags + // OpenOffice.org documentation 5.21 + $option = ord($recordData[$pos]); + ++$pos; + + if ($isCompressed && ($option == 0)) { + // 1st fragment compressed + // this fragment compressed + $len = min($charsLeft, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len; + $isCompressed = true; + } elseif (!$isCompressed && ($option != 0)) { + // 1st fragment uncompressed + // this fragment uncompressed + $len = min($charsLeft * 2, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len / 2; + $isCompressed = false; + } elseif (!$isCompressed && ($option == 0)) { + // 1st fragment uncompressed + // this fragment compressed + $len = min($charsLeft, $limitpos - $pos); + for ($j = 0; $j < $len; ++$j) { + $retstr .= $recordData[$pos + $j] + . chr(0); + } + $charsLeft -= $len; + $isCompressed = false; + } else { + // 1st fragment compressed + // this fragment uncompressed + $newstr = ''; + $jMax = strlen($retstr); + for ($j = 0; $j < $jMax; ++$j) { + $newstr .= $retstr[$j] . chr(0); + } + $retstr = $newstr; + $len = min($charsLeft * 2, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len / 2; + $isCompressed = false; + } + + $pos += $len; + } + } + + // convert to UTF-8 + $retstr = self::encodeUTF16($retstr, $isCompressed); + + // read additional Rich-Text information, if any + $fmtRuns = []; + if ($hasRichText) { + // list of formatting runs + for ($j = 0; $j < $formattingRuns; ++$j) { + // first formatted character; zero-based + $charPos = self::getUInt2d($recordData, $pos + $j * 4); + + // index to font record + $fontIndex = self::getUInt2d($recordData, $pos + 2 + $j * 4); + + $fmtRuns[] = [ + 'charPos' => $charPos, + 'fontIndex' => $fontIndex, + ]; + } + $pos += 4 * $formattingRuns; + } + + // read additional Asian phonetics information, if any + if ($hasAsian) { + // For Asian phonetic settings, we skip the extended string data + $pos += $extendedRunLength; + } + + // store the shared sting + $this->sst[] = [ + 'value' => $retstr, + 'fmtRuns' => $fmtRuns, + ]; + } + + // getSplicedRecordData() takes care of moving current position in data stream + } + + /** + * Read PRINTGRIDLINES record. + */ + private function readPrintGridlines(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; 0 = do not print sheet grid lines; 1 = print sheet gridlines + $printGridlines = (bool) self::getUInt2d($recordData, 0); + $this->phpSheet->setPrintGridlines($printGridlines); + } + } + + /** + * Read DEFAULTROWHEIGHT record. + */ + private function readDefaultRowHeight(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; option flags + // offset: 2; size: 2; default height for unused rows, (twips 1/20 point) + $height = self::getUInt2d($recordData, 2); + $this->phpSheet->getDefaultRowDimension()->setRowHeight($height / 20); + } + + /** + * Read SHEETPR record. + */ + private function readSheetPr(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2 + + // bit: 6; mask: 0x0040; 0 = outline buttons above outline group + $isSummaryBelow = (0x0040 & self::getUInt2d($recordData, 0)) >> 6; + $this->phpSheet->setShowSummaryBelow($isSummaryBelow); + + // bit: 7; mask: 0x0080; 0 = outline buttons left of outline group + $isSummaryRight = (0x0080 & self::getUInt2d($recordData, 0)) >> 7; + $this->phpSheet->setShowSummaryRight($isSummaryRight); + + // bit: 8; mask: 0x100; 0 = scale printout in percent, 1 = fit printout to number of pages + // this corresponds to radio button setting in page setup dialog in Excel + $this->isFitToPages = (bool) ((0x0100 & self::getUInt2d($recordData, 0)) >> 8); + } + + /** + * Read HORIZONTALPAGEBREAKS record. + */ + private function readHorizontalPageBreaks(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; number of the following row index structures + $nm = self::getUInt2d($recordData, 0); + + // offset: 2; size: 6 * $nm; list of $nm row index structures + for ($i = 0; $i < $nm; ++$i) { + $r = self::getUInt2d($recordData, 2 + 6 * $i); + $cf = self::getUInt2d($recordData, 2 + 6 * $i + 2); + $cl = self::getUInt2d($recordData, 2 + 6 * $i + 4); + + // not sure why two column indexes are necessary? + $this->phpSheet->setBreakByColumnAndRow($cf + 1, $r, Worksheet::BREAK_ROW); + } + } + } + + /** + * Read VERTICALPAGEBREAKS record. + */ + private function readVerticalPageBreaks(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; number of the following column index structures + $nm = self::getUInt2d($recordData, 0); + + // offset: 2; size: 6 * $nm; list of $nm row index structures + for ($i = 0; $i < $nm; ++$i) { + $c = self::getUInt2d($recordData, 2 + 6 * $i); + $rf = self::getUInt2d($recordData, 2 + 6 * $i + 2); + $rl = self::getUInt2d($recordData, 2 + 6 * $i + 4); + + // not sure why two row indexes are necessary? + $this->phpSheet->setBreakByColumnAndRow($c + 1, $rf, Worksheet::BREAK_COLUMN); + } + } + } + + /** + * Read HEADER record. + */ + private function readHeader(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: var + // realized that $recordData can be empty even when record exists + if ($recordData) { + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + } else { + $string = $this->readByteStringShort($recordData); + } + + $this->phpSheet->getHeaderFooter()->setOddHeader($string['value']); + $this->phpSheet->getHeaderFooter()->setEvenHeader($string['value']); + } + } + } + + /** + * Read FOOTER record. + */ + private function readFooter(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: var + // realized that $recordData can be empty even when record exists + if ($recordData) { + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + } else { + $string = $this->readByteStringShort($recordData); + } + $this->phpSheet->getHeaderFooter()->setOddFooter($string['value']); + $this->phpSheet->getHeaderFooter()->setEvenFooter($string['value']); + } + } + } + + /** + * Read HCENTER record. + */ + private function readHcenter(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0 = print sheet left aligned, 1 = print sheet centered horizontally + $isHorizontalCentered = (bool) self::getUInt2d($recordData, 0); + + $this->phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered); + } + } + + /** + * Read VCENTER record. + */ + private function readVcenter(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered + $isVerticalCentered = (bool) self::getUInt2d($recordData, 0); + + $this->phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered); + } + } + + /** + * Read LEFTMARGIN record. + */ + private function readLeftMargin(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setLeft(self::extractNumber($recordData)); + } + } + + /** + * Read RIGHTMARGIN record. + */ + private function readRightMargin(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setRight(self::extractNumber($recordData)); + } + } + + /** + * Read TOPMARGIN record. + */ + private function readTopMargin(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setTop(self::extractNumber($recordData)); + } + } + + /** + * Read BOTTOMMARGIN record. + */ + private function readBottomMargin(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setBottom(self::extractNumber($recordData)); + } + } + + /** + * Read PAGESETUP record. + */ + private function readPageSetup(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; paper size + $paperSize = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; scaling factor + $scale = self::getUInt2d($recordData, 2); + + // offset: 6; size: 2; fit worksheet width to this number of pages, 0 = use as many as needed + $fitToWidth = self::getUInt2d($recordData, 6); + + // offset: 8; size: 2; fit worksheet height to this number of pages, 0 = use as many as needed + $fitToHeight = self::getUInt2d($recordData, 8); + + // offset: 10; size: 2; option flags + + // bit: 1; mask: 0x0002; 0=landscape, 1=portrait + $isPortrait = (0x0002 & self::getUInt2d($recordData, 10)) >> 1; + + // bit: 2; mask: 0x0004; 1= paper size, scaling factor, paper orient. not init + // when this bit is set, do not use flags for those properties + $isNotInit = (0x0004 & self::getUInt2d($recordData, 10)) >> 2; + + if (!$isNotInit) { + $this->phpSheet->getPageSetup()->setPaperSize($paperSize); + switch ($isPortrait) { + case 0: + $this->phpSheet->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE); + + break; + case 1: + $this->phpSheet->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT); + + break; + } + + $this->phpSheet->getPageSetup()->setScale($scale, false); + $this->phpSheet->getPageSetup()->setFitToPage((bool) $this->isFitToPages); + $this->phpSheet->getPageSetup()->setFitToWidth($fitToWidth, false); + $this->phpSheet->getPageSetup()->setFitToHeight($fitToHeight, false); + } + + // offset: 16; size: 8; header margin (IEEE 754 floating-point value) + $marginHeader = self::extractNumber(substr($recordData, 16, 8)); + $this->phpSheet->getPageMargins()->setHeader($marginHeader); + + // offset: 24; size: 8; footer margin (IEEE 754 floating-point value) + $marginFooter = self::extractNumber(substr($recordData, 24, 8)); + $this->phpSheet->getPageMargins()->setFooter($marginFooter); + } + } + + /** + * PROTECT - Sheet protection (BIFF2 through BIFF8) + * if this record is omitted, then it also means no sheet protection. + */ + private function readProtect(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit 0, mask 0x01; 1 = sheet is protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + $this->phpSheet->getProtection()->setSheet((bool) $bool); + } + + /** + * SCENPROTECT. + */ + private function readScenProtect(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit: 0, mask 0x01; 1 = scenarios are protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + + $this->phpSheet->getProtection()->setScenarios((bool) $bool); + } + + /** + * OBJECTPROTECT. + */ + private function readObjectProtect(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit: 0, mask 0x01; 1 = objects are protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + + $this->phpSheet->getProtection()->setObjects((bool) $bool); + } + + /** + * PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8). + */ + private function readPassword(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 16-bit hash value of password + $password = strtoupper(dechex(self::getUInt2d($recordData, 0))); // the hashed password + $this->phpSheet->getProtection()->setPassword($password, true); + } + } + + /** + * Read DEFCOLWIDTH record. + */ + private function readDefColWidth(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; default column width + $width = self::getUInt2d($recordData, 0); + if ($width != 8) { + $this->phpSheet->getDefaultColumnDimension()->setWidth($width); + } + } + + /** + * Read COLINFO record. + */ + private function readColInfo(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index to first column in range + $firstColumnIndex = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to last column in range + $lastColumnIndex = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; width of the column in 1/256 of the width of the zero character + $width = self::getUInt2d($recordData, 4); + + // offset: 6; size: 2; index to XF record for default column formatting + $xfIndex = self::getUInt2d($recordData, 6); + + // offset: 8; size: 2; option flags + // bit: 0; mask: 0x0001; 1= columns are hidden + $isHidden = (0x0001 & self::getUInt2d($recordData, 8)) >> 0; + + // bit: 10-8; mask: 0x0700; outline level of the columns (0 = no outline) + $level = (0x0700 & self::getUInt2d($recordData, 8)) >> 8; + + // bit: 12; mask: 0x1000; 1 = collapsed + $isCollapsed = (0x1000 & self::getUInt2d($recordData, 8)) >> 12; + + // offset: 10; size: 2; not used + + for ($i = $firstColumnIndex + 1; $i <= $lastColumnIndex + 1; ++$i) { + if ($lastColumnIndex == 255 || $lastColumnIndex == 256) { + $this->phpSheet->getDefaultColumnDimension()->setWidth($width / 256); + + break; + } + $this->phpSheet->getColumnDimensionByColumn($i)->setWidth($width / 256); + $this->phpSheet->getColumnDimensionByColumn($i)->setVisible(!$isHidden); + $this->phpSheet->getColumnDimensionByColumn($i)->setOutlineLevel($level); + $this->phpSheet->getColumnDimensionByColumn($i)->setCollapsed($isCollapsed); + if (isset($this->mapCellXfIndex[$xfIndex])) { + $this->phpSheet->getColumnDimensionByColumn($i)->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + } + + /** + * ROW. + * + * This record contains the properties of a single row in a + * sheet. Rows and cells in a sheet are divided into blocks + * of 32 rows. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readRow(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index of this row + $r = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column of the first cell which is described by a cell record + + // offset: 4; size: 2; index to column of the last cell which is described by a cell record, increased by 1 + + // offset: 6; size: 2; + + // bit: 14-0; mask: 0x7FFF; height of the row, in twips = 1/20 of a point + $height = (0x7FFF & self::getUInt2d($recordData, 6)) >> 0; + + // bit: 15: mask: 0x8000; 0 = row has custom height; 1= row has default height + $useDefaultHeight = (0x8000 & self::getUInt2d($recordData, 6)) >> 15; + + if (!$useDefaultHeight) { + $this->phpSheet->getRowDimension($r + 1)->setRowHeight($height / 20); + } + + // offset: 8; size: 2; not used + + // offset: 10; size: 2; not used in BIFF5-BIFF8 + + // offset: 12; size: 4; option flags and default row formatting + + // bit: 2-0: mask: 0x00000007; outline level of the row + $level = (0x00000007 & self::getInt4d($recordData, 12)) >> 0; + $this->phpSheet->getRowDimension($r + 1)->setOutlineLevel($level); + + // bit: 4; mask: 0x00000010; 1 = outline group start or ends here... and is collapsed + $isCollapsed = (0x00000010 & self::getInt4d($recordData, 12)) >> 4; + $this->phpSheet->getRowDimension($r + 1)->setCollapsed($isCollapsed); + + // bit: 5; mask: 0x00000020; 1 = row is hidden + $isHidden = (0x00000020 & self::getInt4d($recordData, 12)) >> 5; + $this->phpSheet->getRowDimension($r + 1)->setVisible(!$isHidden); + + // bit: 7; mask: 0x00000080; 1 = row has explicit format + $hasExplicitFormat = (0x00000080 & self::getInt4d($recordData, 12)) >> 7; + + // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record + $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16; + + if ($hasExplicitFormat && isset($this->mapCellXfIndex[$xfIndex])) { + $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read RK record + * This record represents a cell that contains an RK value + * (encoded integer or floating-point value). If a + * floating-point value cannot be encoded to an RK value, + * a NUMBER record will be written. This record replaces the + * record INTEGER written in BIFF2. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readRk(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 4; RK value + $rknum = self::getInt4d($recordData, 6); + $numValue = self::getIEEE754($rknum); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add style information + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + } + + /** + * Read LABELSST record + * This record represents a cell that contains a string. It + * replaces the LABEL record and RSTRING record used in + * BIFF2-BIFF5. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readLabelSst(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + $emptyCell = true; + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 4; index to SST record + $index = self::getInt4d($recordData, 6); + + // add cell + if (($fmtRuns = $this->sst[$index]['fmtRuns']) && !$this->readDataOnly) { + // then we should treat as rich text + $richText = new RichText(); + $charPos = 0; + $sstCount = count($this->sst[$index]['fmtRuns']); + for ($i = 0; $i <= $sstCount; ++$i) { + if (isset($fmtRuns[$i])) { + $text = StringHelper::substring($this->sst[$index]['value'], $charPos, $fmtRuns[$i]['charPos'] - $charPos); + $charPos = $fmtRuns[$i]['charPos']; + } else { + $text = StringHelper::substring($this->sst[$index]['value'], $charPos, StringHelper::countCharacters($this->sst[$index]['value'])); + } + + if (StringHelper::countCharacters($text) > 0) { + if ($i == 0) { // first text run, no style + $richText->createText($text); + } else { + $textRun = $richText->createTextRun($text); + if (isset($fmtRuns[$i - 1])) { + if ($fmtRuns[$i - 1]['fontIndex'] < 4) { + $fontIndex = $fmtRuns[$i - 1]['fontIndex']; + } else { + // this has to do with that index 4 is omitted in all BIFF versions for some strange reason + // check the OpenOffice documentation of the FONT record + $fontIndex = $fmtRuns[$i - 1]['fontIndex'] - 1; + } + $textRun->setFont(clone $this->objFonts[$fontIndex]); + } + } + } + } + if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($richText, DataType::TYPE_STRING); + $emptyCell = false; + } + } else { + if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($this->sst[$index]['value'], DataType::TYPE_STRING); + $emptyCell = false; + } + } + + if (!$this->readDataOnly && !$emptyCell && isset($this->mapCellXfIndex[$xfIndex])) { + // add style information + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MULRK record + * This record represents a cell range containing RK value + * cells. All cells are located in the same row. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMulRk(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first column + $colFirst = self::getUInt2d($recordData, 2); + + // offset: var; size: 2; index to last column + $colLast = self::getUInt2d($recordData, $length - 2); + $columns = $colLast - $colFirst + 1; + + // offset within record data + $offset = 4; + + for ($i = 1; $i <= $columns; ++$i) { + $columnString = Coordinate::stringFromColumnIndex($colFirst + $i); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: var; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, $offset); + + // offset: var; size: 4; RK value + $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2)); + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell value + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + + $offset += 6; + } + } + + /** + * Read NUMBER record + * This record represents a cell that contains a + * floating-point value. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readNumber(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + $numValue = self::extractNumber(substr($recordData, 6, 8)); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell value + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + } + + /** + * Read FORMULA record + perhaps a following STRING record if formula result is a string + * This record contains the token array and the result of a + * formula cell. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readFormula(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; col index + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // offset: 20: size: variable; formula structure + $formulaStructure = substr($recordData, 20); + + // offset: 14: size: 2; option flags, recalculate always, recalculate on open etc. + $options = self::getUInt2d($recordData, 14); + + // bit: 0; mask: 0x0001; 1 = recalculate always + // bit: 1; mask: 0x0002; 1 = calculate on open + // bit: 2; mask: 0x0008; 1 = part of a shared formula + $isPartOfSharedFormula = (bool) (0x0008 & $options); + + // WARNING: + // We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true + // the formula data may be ordinary formula data, therefore we need to check + // explicitly for the tExp token (0x01) + $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01; + + if ($isPartOfSharedFormula) { + // part of shared formula which means there will be a formula with a tExp token and nothing else + // get the base cell, grab tExp token + $baseRow = self::getUInt2d($formulaStructure, 3); + $baseCol = self::getUInt2d($formulaStructure, 5); + $this->baseCell = Coordinate::stringFromColumnIndex($baseCol + 1) . ($baseRow + 1); + } + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + if ($isPartOfSharedFormula) { + // formula is added to this cell after the sheet has been read + $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->baseCell; + } + + // offset: 16: size: 4; not used + + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 8; result of the formula + if ((ord($recordData[6]) == 0) && (ord($recordData[12]) == 255) && (ord($recordData[13]) == 255)) { + // String formula. Result follows in appended STRING record + $dataType = DataType::TYPE_STRING; + + // read possible SHAREDFMLA record + $code = self::getUInt2d($this->data, $this->pos); + if ($code == self::XLS_TYPE_SHAREDFMLA) { + $this->readSharedFmla(); + } + + // read STRING record + $value = $this->readString(); + } elseif ((ord($recordData[6]) == 1) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Boolean formula. Result is in +2; 0=false, 1=true + $dataType = DataType::TYPE_BOOL; + $value = (bool) ord($recordData[8]); + } elseif ((ord($recordData[6]) == 2) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Error formula. Error code is in +2 + $dataType = DataType::TYPE_ERROR; + $value = Xls\ErrorCode::lookup(ord($recordData[8])); + } elseif ((ord($recordData[6]) == 3) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Formula result is a null string + $dataType = DataType::TYPE_NULL; + $value = ''; + } else { + // forumla result is a number, first 14 bytes like _NUMBER record + $dataType = DataType::TYPE_NUMERIC; + $value = self::extractNumber(substr($recordData, 6, 8)); + } + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // store the formula + if (!$isPartOfSharedFormula) { + // not part of shared formula + // add cell value. If we can read formula, populate with formula, otherwise just used cached value + try { + if ($this->version != self::XLS_BIFF8) { + throw new Exception('Not BIFF8. Can only read BIFF8 formulas'); + } + $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language + $cell->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); + } catch (PhpSpreadsheetException $e) { + $cell->setValueExplicit($value, $dataType); + } + } else { + if ($this->version == self::XLS_BIFF8) { + // do nothing at this point, formula id added later in the code + } else { + $cell->setValueExplicit($value, $dataType); + } + } + + // store the cached calculated value + $cell->setCalculatedValue($value); + } + } + + /** + * Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, + * which usually contains relative references. + * These will be used to construct the formula in each shared formula part after the sheet is read. + */ + private function readSharedFmla(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything + $cellRange = substr($recordData, 0, 6); + $cellRange = $this->readBIFF5CellRangeAddressFixed($cellRange); // note: even BIFF8 uses BIFF5 syntax + + // offset: 6, size: 1; not used + + // offset: 7, size: 1; number of existing FORMULA records for this shared formula + $no = ord($recordData[7]); + + // offset: 8, size: var; Binary token array of the shared formula + $formula = substr($recordData, 8); + + // at this point we only store the shared formula for later use + $this->sharedFormulas[$this->baseCell] = $formula; + } + + /** + * Read a STRING record from current stream position and advance the stream pointer to next record + * This record is used for storing result from FORMULA record when it is a string, and + * it occurs directly after the FORMULA record. + * + * @return string The string contents as UTF-8 + */ + private function readString() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + $value = $string['value']; + } else { + $string = $this->readByteStringLong($recordData); + $value = $string['value']; + } + + return $value; + } + + /** + * Read BOOLERR record + * This record represents a Boolean value or error value + * cell. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readBoolErr(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; column index + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 1; the boolean value or error value + $boolErr = ord($recordData[6]); + + // offset: 7; size: 1; 0=boolean; 1=error + $isError = ord($recordData[7]); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + switch ($isError) { + case 0: // boolean + $value = (bool) $boolErr; + + // add cell value + $cell->setValueExplicit($value, DataType::TYPE_BOOL); + + break; + case 1: // error type + $value = Xls\ErrorCode::lookup($boolErr); + + // add cell value + $cell->setValueExplicit($value, DataType::TYPE_ERROR); + + break; + } + + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MULBLANK record + * This record represents a cell range of empty cells. All + * cells are located in the same row. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMulBlank(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first column + $fc = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2 x nc; list of indexes to XF records + // add style information + if (!$this->readDataOnly && $this->readEmptyCells) { + for ($i = 0; $i < $length / 2 - 3; ++$i) { + $columnString = Coordinate::stringFromColumnIndex($fc + $i + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + $xfIndex = self::getUInt2d($recordData, 4 + 2 * $i); + if (isset($this->mapCellXfIndex[$xfIndex])) { + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + } + + // offset: 6; size 2; index to last column (not needed) + } + + /** + * Read LABEL record + * This record represents a cell that contains a string. In + * BIFF8 it is usually replaced by the LABELSST record. + * Excel still uses this record, if it copies unformatted + * text cells to the clipboard. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readLabel(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // add cell value + // todo: what if string is very long? continue record + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong(substr($recordData, 6)); + $value = $string['value']; + } else { + $string = $this->readByteStringLong(substr($recordData, 6)); + $value = $string['value']; + } + if ($this->readEmptyCells || trim($value) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($value, DataType::TYPE_STRING); + + if (!$this->readDataOnly && isset($this->mapCellXfIndex[$xfIndex])) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + } + + /** + * Read BLANK record. + */ + private function readBlank(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; col index + $col = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($col + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // add style information + if (!$this->readDataOnly && $this->readEmptyCells && isset($this->mapCellXfIndex[$xfIndex])) { + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MSODRAWING record. + */ + private function readMsoDrawing(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + $recordData = $splicedRecordData['recordData']; + + $this->drawingData .= $recordData; + } + + /** + * Read OBJ record. + */ + private function readObj(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly || $this->version != self::XLS_BIFF8) { + return; + } + + // recordData consists of an array of subrecords looking like this: + // ft: 2 bytes; ftCmo type (0x15) + // cb: 2 bytes; size in bytes of ftCmo data + // ot: 2 bytes; Object Type + // id: 2 bytes; Object id number + // grbit: 2 bytes; Option Flags + // data: var; subrecord data + + // for now, we are just interested in the second subrecord containing the object type + $ftCmoType = self::getUInt2d($recordData, 0); + $cbCmoSize = self::getUInt2d($recordData, 2); + $otObjType = self::getUInt2d($recordData, 4); + $idObjID = self::getUInt2d($recordData, 6); + $grbitOpts = self::getUInt2d($recordData, 6); + + $this->objs[] = [ + 'ftCmoType' => $ftCmoType, + 'cbCmoSize' => $cbCmoSize, + 'otObjType' => $otObjType, + 'idObjID' => $idObjID, + 'grbitOpts' => $grbitOpts, + ]; + $this->textObjRef = $idObjID; + } + + /** + * Read WINDOW2 record. + */ + private function readWindow2(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; option flags + $options = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first visible row + $firstVisibleRow = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; index to first visible colum + $firstVisibleColumn = self::getUInt2d($recordData, 4); + if ($this->version === self::XLS_BIFF8) { + // offset: 8; size: 2; not used + // offset: 10; size: 2; cached magnification factor in page break preview (in percent); 0 = Default (60%) + // offset: 12; size: 2; cached magnification factor in normal view (in percent); 0 = Default (100%) + // offset: 14; size: 4; not used + $zoomscaleInPageBreakPreview = self::getUInt2d($recordData, 10); + if ($zoomscaleInPageBreakPreview === 0) { + $zoomscaleInPageBreakPreview = 60; + } + $zoomscaleInNormalView = self::getUInt2d($recordData, 12); + if ($zoomscaleInNormalView === 0) { + $zoomscaleInNormalView = 100; + } + } + + // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines + $showGridlines = (bool) ((0x0002 & $options) >> 1); + $this->phpSheet->setShowGridlines($showGridlines); + + // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers + $showRowColHeaders = (bool) ((0x0004 & $options) >> 2); + $this->phpSheet->setShowRowColHeaders($showRowColHeaders); + + // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen + $this->frozen = (bool) ((0x0008 & $options) >> 3); + + // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left + $this->phpSheet->setRightToLeft((bool) ((0x0040 & $options) >> 6)); + + // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active + $isActive = (bool) ((0x0400 & $options) >> 10); + if ($isActive) { + $this->spreadsheet->setActiveSheetIndex($this->spreadsheet->getIndex($this->phpSheet)); + } + + // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view + $isPageBreakPreview = (bool) ((0x0800 & $options) >> 11); + + //FIXME: set $firstVisibleRow and $firstVisibleColumn + + if ($this->phpSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_PAGE_LAYOUT) { + //NOTE: this setting is inferior to page layout view(Excel2007-) + $view = $isPageBreakPreview ? SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : SheetView::SHEETVIEW_NORMAL; + $this->phpSheet->getSheetView()->setView($view); + if ($this->version === self::XLS_BIFF8) { + $zoomScale = $isPageBreakPreview ? $zoomscaleInPageBreakPreview : $zoomscaleInNormalView; + $this->phpSheet->getSheetView()->setZoomScale($zoomScale); + $this->phpSheet->getSheetView()->setZoomScaleNormal($zoomscaleInNormalView); + } + } + } + + /** + * Read PLV Record(Created by Excel2007 or upper). + */ + private function readPageLayoutView(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; rt + //->ignore + $rt = self::getUInt2d($recordData, 0); + // offset: 2; size: 2; grbitfr + //->ignore + $grbitFrt = self::getUInt2d($recordData, 2); + // offset: 4; size: 8; reserved + //->ignore + + // offset: 12; size 2; zoom scale + $wScalePLV = self::getUInt2d($recordData, 12); + // offset: 14; size 2; grbit + $grbit = self::getUInt2d($recordData, 14); + + // decomprise grbit + $fPageLayoutView = $grbit & 0x01; + $fRulerVisible = ($grbit >> 1) & 0x01; //no support + $fWhitespaceHidden = ($grbit >> 3) & 0x01; //no support + + if ($fPageLayoutView === 1) { + $this->phpSheet->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_LAYOUT); + $this->phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT + } + //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW. + } + + /** + * Read SCL record. + */ + private function readScl(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; numerator of the view magnification + $numerator = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; numerator of the view magnification + $denumerator = self::getUInt2d($recordData, 2); + + // set the zoom scale (in percent) + $this->phpSheet->getSheetView()->setZoomScale($numerator * 100 / $denumerator); + } + + /** + * Read PANE record. + */ + private function readPane(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; position of vertical split + $px = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; position of horizontal split + $py = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; top most visible row in the bottom pane + $rwTop = self::getUInt2d($recordData, 4); + + // offset: 6; size: 2; first visible left column in the right pane + $colLeft = self::getUInt2d($recordData, 6); + + if ($this->frozen) { + // frozen panes + $cell = Coordinate::stringFromColumnIndex($px + 1) . ($py + 1); + $topLeftCell = Coordinate::stringFromColumnIndex($colLeft + 1) . ($rwTop + 1); + $this->phpSheet->freezePane($cell, $topLeftCell); + } + // unfrozen panes; split windows; not supported by PhpSpreadsheet core + } + } + + /** + * Read SELECTION record. There is one such record for each pane in the sheet. + */ + private function readSelection(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 1; pane identifier + $paneId = ord($recordData[0]); + + // offset: 1; size: 2; index to row of the active cell + $r = self::getUInt2d($recordData, 1); + + // offset: 3; size: 2; index to column of the active cell + $c = self::getUInt2d($recordData, 3); + + // offset: 5; size: 2; index into the following cell range list to the + // entry that contains the active cell + $index = self::getUInt2d($recordData, 5); + + // offset: 7; size: var; cell range address list containing all selected cell ranges + $data = substr($recordData, 7); + $cellRangeAddressList = $this->readBIFF5CellRangeAddressList($data); // note: also BIFF8 uses BIFF5 syntax + + $selectedCells = $cellRangeAddressList['cellRangeAddresses'][0]; + + // first row '1' + last row '16384' indicates that full column is selected (apparently also in BIFF8!) + if (preg_match('/^([A-Z]+1\:[A-Z]+)16384$/', $selectedCells)) { + $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)16384$/', '${1}1048576', $selectedCells); + } + + // first row '1' + last row '65536' indicates that full column is selected + if (preg_match('/^([A-Z]+1\:[A-Z]+)65536$/', $selectedCells)) { + $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)65536$/', '${1}1048576', $selectedCells); + } + + // first column 'A' + last column 'IV' indicates that full row is selected + if (preg_match('/^(A\d+\:)IV(\d+)$/', $selectedCells)) { + $selectedCells = preg_replace('/^(A\d+\:)IV(\d+)$/', '${1}XFD${2}', $selectedCells); + } + + $this->phpSheet->setSelectedCells($selectedCells); + } + } + + private function includeCellRangeFiltered($cellRangeAddress) + { + $includeCellRange = true; + if ($this->getReadFilter() !== null) { + $includeCellRange = false; + $rangeBoundaries = Coordinate::getRangeBoundaries($cellRangeAddress); + ++$rangeBoundaries[1][0]; + for ($row = $rangeBoundaries[0][1]; $row <= $rangeBoundaries[1][1]; ++$row) { + for ($column = $rangeBoundaries[0][0]; $column != $rangeBoundaries[1][0]; ++$column) { + if ($this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { + $includeCellRange = true; + + break 2; + } + } + } + } + + return $includeCellRange; + } + + /** + * MERGEDCELLS. + * + * This record contains the addresses of merged cell ranges + * in the current sheet. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMergedCells(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($recordData); + foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) { + if ((strpos($cellRangeAddress, ':') !== false) && + ($this->includeCellRangeFiltered($cellRangeAddress))) { + $this->phpSheet->mergeCells($cellRangeAddress); + } + } + } + } + + /** + * Read HYPERLINK record. + */ + private function readHyperLink(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8; cell range address of all cells containing this hyperlink + try { + $cellRange = $this->readBIFF8CellRangeAddressFixed($recordData); + } catch (PhpSpreadsheetException $e) { + return; + } + + // offset: 8, size: 16; GUID of StdLink + + // offset: 24, size: 4; unknown value + + // offset: 28, size: 4; option flags + // bit: 0; mask: 0x00000001; 0 = no link or extant, 1 = file link or URL + $isFileLinkOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 0; + + // bit: 1; mask: 0x00000002; 0 = relative path, 1 = absolute path or URL + $isAbsPathOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 1; + + // bit: 2 (and 4); mask: 0x00000014; 0 = no description + $hasDesc = (0x00000014 & self::getUInt2d($recordData, 28)) >> 2; + + // bit: 3; mask: 0x00000008; 0 = no text, 1 = has text + $hasText = (0x00000008 & self::getUInt2d($recordData, 28)) >> 3; + + // bit: 7; mask: 0x00000080; 0 = no target frame, 1 = has target frame + $hasFrame = (0x00000080 & self::getUInt2d($recordData, 28)) >> 7; + + // bit: 8; mask: 0x00000100; 0 = file link or URL, 1 = UNC path (inc. server name) + $isUNC = (0x00000100 & self::getUInt2d($recordData, 28)) >> 8; + + // offset within record data + $offset = 32; + + if ($hasDesc) { + // offset: 32; size: var; character count of description text + $dl = self::getInt4d($recordData, 32); + // offset: 36; size: var; character array of description text, no Unicode string header, always 16-bit characters, zero terminated + $desc = self::encodeUTF16(substr($recordData, 36, 2 * ($dl - 1)), false); + $offset += 4 + 2 * $dl; + } + if ($hasFrame) { + $fl = self::getInt4d($recordData, $offset); + $offset += 4 + 2 * $fl; + } + + // detect type of hyperlink (there are 4 types) + $hyperlinkType = null; + + if ($isUNC) { + $hyperlinkType = 'UNC'; + } elseif (!$isFileLinkOrUrl) { + $hyperlinkType = 'workbook'; + } elseif (ord($recordData[$offset]) == 0x03) { + $hyperlinkType = 'local'; + } elseif (ord($recordData[$offset]) == 0xE0) { + $hyperlinkType = 'URL'; + } + + switch ($hyperlinkType) { + case 'URL': + // section 5.58.2: Hyperlink containing a URL + // e.g. http://example.org/index.php + + // offset: var; size: 16; GUID of URL Moniker + $offset += 16; + // offset: var; size: 4; size (in bytes) of character array of the URL including trailing zero word + $us = self::getInt4d($recordData, $offset); + $offset += 4; + // offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated + $url = self::encodeUTF16(substr($recordData, $offset, $us - 2), false); + $nullOffset = strpos($url, chr(0x00)); + if ($nullOffset) { + $url = substr($url, 0, $nullOffset); + } + $url .= $hasText ? '#' : ''; + $offset += $us; + + break; + case 'local': + // section 5.58.3: Hyperlink to local file + // examples: + // mydoc.txt + // ../../somedoc.xls#Sheet!A1 + + // offset: var; size: 16; GUI of File Moniker + $offset += 16; + + // offset: var; size: 2; directory up-level count. + $upLevelCount = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 4; character count of the shortened file path and name, including trailing zero word + $sl = self::getInt4d($recordData, $offset); + $offset += 4; + + // offset: var; size: sl; character array of the shortened file path and name in 8.3-DOS-format (compressed Unicode string) + $shortenedFilePath = substr($recordData, $offset, $sl); + $shortenedFilePath = self::encodeUTF16($shortenedFilePath, true); + $shortenedFilePath = substr($shortenedFilePath, 0, -1); // remove trailing zero + + $offset += $sl; + + // offset: var; size: 24; unknown sequence + $offset += 24; + + // extended file path + // offset: var; size: 4; size of the following file link field including string lenth mark + $sz = self::getInt4d($recordData, $offset); + $offset += 4; + + // only present if $sz > 0 + if ($sz > 0) { + // offset: var; size: 4; size of the character array of the extended file path and name + $xl = self::getInt4d($recordData, $offset); + $offset += 4; + + // offset: var; size 2; unknown + $offset += 2; + + // offset: var; size $xl; character array of the extended file path and name. + $extendedFilePath = substr($recordData, $offset, $xl); + $extendedFilePath = self::encodeUTF16($extendedFilePath, false); + $offset += $xl; + } + + // construct the path + $url = str_repeat('..\\', $upLevelCount); + $url .= ($sz > 0) ? $extendedFilePath : $shortenedFilePath; // use extended path if available + $url .= $hasText ? '#' : ''; + + break; + case 'UNC': + // section 5.58.4: Hyperlink to a File with UNC (Universal Naming Convention) Path + // todo: implement + return; + case 'workbook': + // section 5.58.5: Hyperlink to the Current Workbook + // e.g. Sheet2!B1:C2, stored in text mark field + $url = 'sheet://'; + + break; + default: + return; + } + + if ($hasText) { + // offset: var; size: 4; character count of text mark including trailing zero word + $tl = self::getInt4d($recordData, $offset); + $offset += 4; + // offset: var; size: var; character array of the text mark without the # sign, no Unicode header, always 16-bit characters, zero-terminated + $text = self::encodeUTF16(substr($recordData, $offset, 2 * ($tl - 1)), false); + $url .= $text; + } + + // apply the hyperlink to all the relevant cells + foreach (Coordinate::extractAllCellReferencesInRange($cellRange) as $coordinate) { + $this->phpSheet->getCell($coordinate)->getHyperLink()->setUrl($url); + } + } + } + + /** + * Read DATAVALIDATIONS record. + */ + private function readDataValidations(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + } + + /** + * Read DATAVALIDATION record. + */ + private function readDataValidation(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 4; Options + $options = self::getInt4d($recordData, 0); + + // bit: 0-3; mask: 0x0000000F; type + $type = (0x0000000F & $options) >> 0; + switch ($type) { + case 0x00: + $type = DataValidation::TYPE_NONE; + + break; + case 0x01: + $type = DataValidation::TYPE_WHOLE; + + break; + case 0x02: + $type = DataValidation::TYPE_DECIMAL; + + break; + case 0x03: + $type = DataValidation::TYPE_LIST; + + break; + case 0x04: + $type = DataValidation::TYPE_DATE; + + break; + case 0x05: + $type = DataValidation::TYPE_TIME; + + break; + case 0x06: + $type = DataValidation::TYPE_TEXTLENGTH; + + break; + case 0x07: + $type = DataValidation::TYPE_CUSTOM; + + break; + } + + // bit: 4-6; mask: 0x00000070; error type + $errorStyle = (0x00000070 & $options) >> 4; + switch ($errorStyle) { + case 0x00: + $errorStyle = DataValidation::STYLE_STOP; + + break; + case 0x01: + $errorStyle = DataValidation::STYLE_WARNING; + + break; + case 0x02: + $errorStyle = DataValidation::STYLE_INFORMATION; + + break; + } + + // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) + // I have only seen cases where this is 1 + $explicitFormula = (0x00000080 & $options) >> 7; + + // bit: 8; mask: 0x00000100; 1= empty cells allowed + $allowBlank = (0x00000100 & $options) >> 8; + + // bit: 9; mask: 0x00000200; 1= suppress drop down arrow in list type validity + $suppressDropDown = (0x00000200 & $options) >> 9; + + // bit: 18; mask: 0x00040000; 1= show prompt box if cell selected + $showInputMessage = (0x00040000 & $options) >> 18; + + // bit: 19; mask: 0x00080000; 1= show error box if invalid values entered + $showErrorMessage = (0x00080000 & $options) >> 19; + + // bit: 20-23; mask: 0x00F00000; condition operator + $operator = (0x00F00000 & $options) >> 20; + switch ($operator) { + case 0x00: + $operator = DataValidation::OPERATOR_BETWEEN; + + break; + case 0x01: + $operator = DataValidation::OPERATOR_NOTBETWEEN; + + break; + case 0x02: + $operator = DataValidation::OPERATOR_EQUAL; + + break; + case 0x03: + $operator = DataValidation::OPERATOR_NOTEQUAL; + + break; + case 0x04: + $operator = DataValidation::OPERATOR_GREATERTHAN; + + break; + case 0x05: + $operator = DataValidation::OPERATOR_LESSTHAN; + + break; + case 0x06: + $operator = DataValidation::OPERATOR_GREATERTHANOREQUAL; + + break; + case 0x07: + $operator = DataValidation::OPERATOR_LESSTHANOREQUAL; + + break; + } + + // offset: 4; size: var; title of the prompt box + $offset = 4; + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $promptTitle = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; title of the error box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $errorTitle = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; text of the prompt box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $prompt = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; text of the error box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $error = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: 2; size of the formula data for the first condition + $sz1 = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 2; not used + $offset += 2; + + // offset: var; size: $sz1; formula data for first condition (without size field) + $formula1 = substr($recordData, $offset, $sz1); + $formula1 = pack('v', $sz1) . $formula1; // prepend the length + + try { + $formula1 = $this->getFormulaFromStructure($formula1); + + // in list type validity, null characters are used as item separators + if ($type == DataValidation::TYPE_LIST) { + $formula1 = str_replace(chr(0), ',', $formula1); + } + } catch (PhpSpreadsheetException $e) { + return; + } + $offset += $sz1; + + // offset: var; size: 2; size of the formula data for the first condition + $sz2 = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 2; not used + $offset += 2; + + // offset: var; size: $sz2; formula data for second condition (without size field) + $formula2 = substr($recordData, $offset, $sz2); + $formula2 = pack('v', $sz2) . $formula2; // prepend the length + + try { + $formula2 = $this->getFormulaFromStructure($formula2); + } catch (PhpSpreadsheetException $e) { + return; + } + $offset += $sz2; + + // offset: var; size: var; cell range address list with + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList(substr($recordData, $offset)); + $cellRangeAddresses = $cellRangeAddressList['cellRangeAddresses']; + + foreach ($cellRangeAddresses as $cellRange) { + $stRange = $this->phpSheet->shrinkRangeToFit($cellRange); + foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $coordinate) { + $objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation(); + $objValidation->setType($type); + $objValidation->setErrorStyle($errorStyle); + $objValidation->setAllowBlank((bool) $allowBlank); + $objValidation->setShowInputMessage((bool) $showInputMessage); + $objValidation->setShowErrorMessage((bool) $showErrorMessage); + $objValidation->setShowDropDown(!$suppressDropDown); + $objValidation->setOperator($operator); + $objValidation->setErrorTitle($errorTitle); + $objValidation->setError($error); + $objValidation->setPromptTitle($promptTitle); + $objValidation->setPrompt($prompt); + $objValidation->setFormula1($formula1); + $objValidation->setFormula2($formula2); + } + } + } + + /** + * Read SHEETLAYOUT record. Stores sheet tab color information. + */ + private function readSheetLayout(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // local pointer in record data + $offset = 0; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; repeated record identifier 0x0862 + + // offset: 2; size: 10; not used + + // offset: 12; size: 4; size of record data + // Excel 2003 uses size of 0x14 (documented), Excel 2007 uses size of 0x28 (not documented?) + $sz = self::getInt4d($recordData, 12); + + switch ($sz) { + case 0x14: + // offset: 16; size: 2; color index for sheet tab + $colorIndex = self::getUInt2d($recordData, 16); + $color = Xls\Color::map($colorIndex, $this->palette, $this->version); + $this->phpSheet->getTabColor()->setRGB($color['rgb']); + + break; + case 0x28: + // TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007 + return; + + break; + } + } + } + + /** + * Read SHEETPROTECTION record (FEATHEADR). + */ + private function readSheetProtection(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; repeated record header + + // offset: 2; size: 2; FRT cell reference flag (=0 currently) + + // offset: 4; size: 8; Currently not used and set to 0 + + // offset: 12; size: 2; Shared feature type index (2=Enhanced Protetion, 4=SmartTag) + $isf = self::getUInt2d($recordData, 12); + if ($isf != 2) { + return; + } + + // offset: 14; size: 1; =1 since this is a feat header + + // offset: 15; size: 4; size of rgbHdrSData + + // rgbHdrSData, assume "Enhanced Protection" + // offset: 19; size: 2; option flags + $options = self::getUInt2d($recordData, 19); + + // bit: 0; mask 0x0001; 1 = user may edit objects, 0 = users must not edit objects + $bool = (0x0001 & $options) >> 0; + $this->phpSheet->getProtection()->setObjects(!$bool); + + // bit: 1; mask 0x0002; edit scenarios + $bool = (0x0002 & $options) >> 1; + $this->phpSheet->getProtection()->setScenarios(!$bool); + + // bit: 2; mask 0x0004; format cells + $bool = (0x0004 & $options) >> 2; + $this->phpSheet->getProtection()->setFormatCells(!$bool); + + // bit: 3; mask 0x0008; format columns + $bool = (0x0008 & $options) >> 3; + $this->phpSheet->getProtection()->setFormatColumns(!$bool); + + // bit: 4; mask 0x0010; format rows + $bool = (0x0010 & $options) >> 4; + $this->phpSheet->getProtection()->setFormatRows(!$bool); + + // bit: 5; mask 0x0020; insert columns + $bool = (0x0020 & $options) >> 5; + $this->phpSheet->getProtection()->setInsertColumns(!$bool); + + // bit: 6; mask 0x0040; insert rows + $bool = (0x0040 & $options) >> 6; + $this->phpSheet->getProtection()->setInsertRows(!$bool); + + // bit: 7; mask 0x0080; insert hyperlinks + $bool = (0x0080 & $options) >> 7; + $this->phpSheet->getProtection()->setInsertHyperlinks(!$bool); + + // bit: 8; mask 0x0100; delete columns + $bool = (0x0100 & $options) >> 8; + $this->phpSheet->getProtection()->setDeleteColumns(!$bool); + + // bit: 9; mask 0x0200; delete rows + $bool = (0x0200 & $options) >> 9; + $this->phpSheet->getProtection()->setDeleteRows(!$bool); + + // bit: 10; mask 0x0400; select locked cells + $bool = (0x0400 & $options) >> 10; + $this->phpSheet->getProtection()->setSelectLockedCells(!$bool); + + // bit: 11; mask 0x0800; sort cell range + $bool = (0x0800 & $options) >> 11; + $this->phpSheet->getProtection()->setSort(!$bool); + + // bit: 12; mask 0x1000; auto filter + $bool = (0x1000 & $options) >> 12; + $this->phpSheet->getProtection()->setAutoFilter(!$bool); + + // bit: 13; mask 0x2000; pivot tables + $bool = (0x2000 & $options) >> 13; + $this->phpSheet->getProtection()->setPivotTables(!$bool); + + // bit: 14; mask 0x4000; select unlocked cells + $bool = (0x4000 & $options) >> 14; + $this->phpSheet->getProtection()->setSelectUnlockedCells(!$bool); + + // offset: 21; size: 2; not used + } + + /** + * Read RANGEPROTECTION record + * Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, + * where it is referred to as FEAT record. + */ + private function readRangeProtection(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // local pointer in record data + $offset = 0; + + if (!$this->readDataOnly) { + $offset += 12; + + // offset: 12; size: 2; shared feature type, 2 = enhanced protection, 4 = smart tag + $isf = self::getUInt2d($recordData, 12); + if ($isf != 2) { + // we only read FEAT records of type 2 + return; + } + $offset += 2; + + $offset += 5; + + // offset: 19; size: 2; count of ref ranges this feature is on + $cref = self::getUInt2d($recordData, 19); + $offset += 2; + + $offset += 6; + + // offset: 27; size: 8 * $cref; list of cell ranges (like in hyperlink record) + $cellRanges = []; + for ($i = 0; $i < $cref; ++$i) { + try { + $cellRange = $this->readBIFF8CellRangeAddressFixed(substr($recordData, 27 + 8 * $i, 8)); + } catch (PhpSpreadsheetException $e) { + return; + } + $cellRanges[] = $cellRange; + $offset += 8; + } + + // offset: var; size: var; variable length of feature specific data + $rgbFeat = substr($recordData, $offset); + $offset += 4; + + // offset: var; size: 4; the encrypted password (only 16-bit although field is 32-bit) + $wPassword = self::getInt4d($recordData, $offset); + $offset += 4; + + // Apply range protection to sheet + if ($cellRanges) { + $this->phpSheet->protectCells(implode(' ', $cellRanges), strtoupper(dechex($wPassword)), true); + } + } + } + + /** + * Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record + * When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented. + * In this case, we must treat the CONTINUE record as a MSODRAWING record. + */ + private function readContinue(): void + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // check if we are reading drawing data + // this is in case a free CONTINUE record occurs in other circumstances we are unaware of + if ($this->drawingData == '') { + // move stream pointer to next record + $this->pos += 4 + $length; + + return; + } + + // check if record data is at least 4 bytes long, otherwise there is no chance this is MSODRAWING data + if ($length < 4) { + // move stream pointer to next record + $this->pos += 4 + $length; + + return; + } + + // dirty check to see if CONTINUE record could be a camouflaged MSODRAWING record + // look inside CONTINUE record to see if it looks like a part of an Escher stream + // we know that Escher stream may be split at least at + // 0xF003 MsofbtSpgrContainer + // 0xF004 MsofbtSpContainer + // 0xF00D MsofbtClientTextbox + $validSplitPoints = [0xF003, 0xF004, 0xF00D]; // add identifiers if we find more + + $splitPoint = self::getUInt2d($recordData, 2); + if (in_array($splitPoint, $validSplitPoints)) { + // get spliced record data (and move pointer to next record) + $splicedRecordData = $this->getSplicedRecordData(); + $this->drawingData .= $splicedRecordData['recordData']; + + return; + } + + // move stream pointer to next record + $this->pos += 4 + $length; + } + + /** + * Reads a record from current position in data stream and continues reading data as long as CONTINUE + * records are found. Splices the record data pieces and returns the combined string as if record data + * is in one piece. + * Moves to next current position in data stream to start of next record different from a CONtINUE record. + * + * @return array + */ + private function getSplicedRecordData() + { + $data = ''; + $spliceOffsets = []; + + $i = 0; + $spliceOffsets[0] = 0; + + do { + ++$i; + + // offset: 0; size: 2; identifier + $identifier = self::getUInt2d($this->data, $this->pos); + // offset: 2; size: 2; length + $length = self::getUInt2d($this->data, $this->pos + 2); + $data .= $this->readRecordData($this->data, $this->pos + 4, $length); + + $spliceOffsets[$i] = $spliceOffsets[$i - 1] + $length; + + $this->pos += 4 + $length; + $nextIdentifier = self::getUInt2d($this->data, $this->pos); + } while ($nextIdentifier == self::XLS_TYPE_CONTINUE); + + return [ + 'recordData' => $data, + 'spliceOffsets' => $spliceOffsets, + ]; + } + + /** + * Convert formula structure into human readable Excel formula like 'A3+A5*5'. + * + * @param string $formulaStructure The complete binary data for the formula + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string Human readable formula + */ + private function getFormulaFromStructure($formulaStructure, $baseCell = 'A1') + { + // offset: 0; size: 2; size of the following formula data + $sz = self::getUInt2d($formulaStructure, 0); + + // offset: 2; size: sz + $formulaData = substr($formulaStructure, 2, $sz); + + // offset: 2 + sz; size: variable (optional) + if (strlen($formulaStructure) > 2 + $sz) { + $additionalData = substr($formulaStructure, 2 + $sz); + } else { + $additionalData = ''; + } + + return $this->getFormulaFromData($formulaData, $additionalData, $baseCell); + } + + /** + * Take formula data and additional data for formula and return human readable formula. + * + * @param string $formulaData The binary data for the formula itself + * @param string $additionalData Additional binary data going with the formula + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string Human readable formula + */ + private function getFormulaFromData($formulaData, $additionalData = '', $baseCell = 'A1') + { + // start parsing the formula data + $tokens = []; + + while (strlen($formulaData) > 0 && $token = $this->getNextToken($formulaData, $baseCell)) { + $tokens[] = $token; + $formulaData = substr($formulaData, $token['size']); + } + + $formulaString = $this->createFormulaFromTokens($tokens, $additionalData); + + return $formulaString; + } + + /** + * Take array of tokens together with additional data for formula and return human readable formula. + * + * @param array $tokens + * @param string $additionalData Additional binary data going with the formula + * + * @return string Human readable formula + */ + private function createFormulaFromTokens($tokens, $additionalData) + { + // empty formula? + if (empty($tokens)) { + return ''; + } + + $formulaStrings = []; + foreach ($tokens as $token) { + // initialize spaces + $space0 = $space0 ?? ''; // spaces before next token, not tParen + $space1 = $space1 ?? ''; // carriage returns before next token, not tParen + $space2 = $space2 ?? ''; // spaces before opening parenthesis + $space3 = $space3 ?? ''; // carriage returns before opening parenthesis + $space4 = $space4 ?? ''; // spaces before closing parenthesis + $space5 = $space5 ?? ''; // carriage returns before closing parenthesis + + switch ($token['name']) { + case 'tAdd': // addition + case 'tConcat': // addition + case 'tDiv': // division + case 'tEQ': // equality + case 'tGE': // greater than or equal + case 'tGT': // greater than + case 'tIsect': // intersection + case 'tLE': // less than or equal + case 'tList': // less than or equal + case 'tLT': // less than + case 'tMul': // multiplication + case 'tNE': // multiplication + case 'tPower': // power + case 'tRange': // range + case 'tSub': // subtraction + $op2 = array_pop($formulaStrings); + $op1 = array_pop($formulaStrings); + $formulaStrings[] = "$op1$space1$space0{$token['data']}$op2"; + unset($space0, $space1); + + break; + case 'tUplus': // unary plus + case 'tUminus': // unary minus + $op = array_pop($formulaStrings); + $formulaStrings[] = "$space1$space0{$token['data']}$op"; + unset($space0, $space1); + + break; + case 'tPercent': // percent sign + $op = array_pop($formulaStrings); + $formulaStrings[] = "$op$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + case 'tAttrVolatile': // indicates volatile function + case 'tAttrIf': + case 'tAttrSkip': + case 'tAttrChoose': + // token is only important for Excel formula evaluator + // do nothing + break; + case 'tAttrSpace': // space / carriage return + // space will be used when next token arrives, do not alter formulaString stack + switch ($token['data']['spacetype']) { + case 'type0': + $space0 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type1': + $space1 = str_repeat("\n", $token['data']['spacecount']); + + break; + case 'type2': + $space2 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type3': + $space3 = str_repeat("\n", $token['data']['spacecount']); + + break; + case 'type4': + $space4 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type5': + $space5 = str_repeat("\n", $token['data']['spacecount']); + + break; + } + + break; + case 'tAttrSum': // SUM function with one parameter + $op = array_pop($formulaStrings); + $formulaStrings[] = "{$space1}{$space0}SUM($op)"; + unset($space0, $space1); + + break; + case 'tFunc': // function with fixed number of arguments + case 'tFuncV': // function with variable number of arguments + if ($token['data']['function'] != '') { + // normal function + $ops = []; // array of operators + for ($i = 0; $i < $token['data']['args']; ++$i) { + $ops[] = array_pop($formulaStrings); + } + $ops = array_reverse($ops); + $formulaStrings[] = "$space1$space0{$token['data']['function']}(" . implode(',', $ops) . ')'; + unset($space0, $space1); + } else { + // add-in function + $ops = []; // array of operators + for ($i = 0; $i < $token['data']['args'] - 1; ++$i) { + $ops[] = array_pop($formulaStrings); + } + $ops = array_reverse($ops); + $function = array_pop($formulaStrings); + $formulaStrings[] = "$space1$space0$function(" . implode(',', $ops) . ')'; + unset($space0, $space1); + } + + break; + case 'tParen': // parenthesis + $expression = array_pop($formulaStrings); + $formulaStrings[] = "$space3$space2($expression$space5$space4)"; + unset($space2, $space3, $space4, $space5); + + break; + case 'tArray': // array constant + $constantArray = self::readBIFF8ConstantArray($additionalData); + $formulaStrings[] = $space1 . $space0 . $constantArray['value']; + $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data + unset($space0, $space1); + + break; + case 'tMemArea': + // bite off chunk of additional data + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($additionalData); + $additionalData = substr($additionalData, $cellRangeAddressList['size']); + $formulaStrings[] = "$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + case 'tArea': // cell range address + case 'tBool': // boolean + case 'tErr': // error code + case 'tInt': // integer + case 'tMemErr': + case 'tMemFunc': + case 'tMissArg': + case 'tName': + case 'tNameX': + case 'tNum': // number + case 'tRef': // single cell reference + case 'tRef3d': // 3d cell reference + case 'tArea3d': // 3d cell range reference + case 'tRefN': + case 'tAreaN': + case 'tStr': // string + $formulaStrings[] = "$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + } + } + $formulaString = $formulaStrings[0]; + + return $formulaString; + } + + /** + * Fetch next token from binary formula data. + * + * @param string $formulaData Formula data + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return array + */ + private function getNextToken($formulaData, $baseCell = 'A1') + { + // offset: 0; size: 1; token id + $id = ord($formulaData[0]); // token id + $name = false; // initialize token name + + switch ($id) { + case 0x03: + $name = 'tAdd'; + $size = 1; + $data = '+'; + + break; + case 0x04: + $name = 'tSub'; + $size = 1; + $data = '-'; + + break; + case 0x05: + $name = 'tMul'; + $size = 1; + $data = '*'; + + break; + case 0x06: + $name = 'tDiv'; + $size = 1; + $data = '/'; + + break; + case 0x07: + $name = 'tPower'; + $size = 1; + $data = '^'; + + break; + case 0x08: + $name = 'tConcat'; + $size = 1; + $data = '&'; + + break; + case 0x09: + $name = 'tLT'; + $size = 1; + $data = '<'; + + break; + case 0x0A: + $name = 'tLE'; + $size = 1; + $data = '<='; + + break; + case 0x0B: + $name = 'tEQ'; + $size = 1; + $data = '='; + + break; + case 0x0C: + $name = 'tGE'; + $size = 1; + $data = '>='; + + break; + case 0x0D: + $name = 'tGT'; + $size = 1; + $data = '>'; + + break; + case 0x0E: + $name = 'tNE'; + $size = 1; + $data = '<>'; + + break; + case 0x0F: + $name = 'tIsect'; + $size = 1; + $data = ' '; + + break; + case 0x10: + $name = 'tList'; + $size = 1; + $data = ','; + + break; + case 0x11: + $name = 'tRange'; + $size = 1; + $data = ':'; + + break; + case 0x12: + $name = 'tUplus'; + $size = 1; + $data = '+'; + + break; + case 0x13: + $name = 'tUminus'; + $size = 1; + $data = '-'; + + break; + case 0x14: + $name = 'tPercent'; + $size = 1; + $data = '%'; + + break; + case 0x15: // parenthesis + $name = 'tParen'; + $size = 1; + $data = null; + + break; + case 0x16: // missing argument + $name = 'tMissArg'; + $size = 1; + $data = ''; + + break; + case 0x17: // string + $name = 'tStr'; + // offset: 1; size: var; Unicode string, 8-bit string length + $string = self::readUnicodeStringShort(substr($formulaData, 1)); + $size = 1 + $string['size']; + $data = self::UTF8toExcelDoubleQuoted($string['value']); + + break; + case 0x19: // Special attribute + // offset: 1; size: 1; attribute type flags: + switch (ord($formulaData[1])) { + case 0x01: + $name = 'tAttrVolatile'; + $size = 4; + $data = null; + + break; + case 0x02: + $name = 'tAttrIf'; + $size = 4; + $data = null; + + break; + case 0x04: + $name = 'tAttrChoose'; + // offset: 2; size: 2; number of choices in the CHOOSE function ($nc, number of parameters decreased by 1) + $nc = self::getUInt2d($formulaData, 2); + // offset: 4; size: 2 * $nc + // offset: 4 + 2 * $nc; size: 2 + $size = 2 * $nc + 6; + $data = null; + + break; + case 0x08: + $name = 'tAttrSkip'; + $size = 4; + $data = null; + + break; + case 0x10: + $name = 'tAttrSum'; + $size = 4; + $data = null; + + break; + case 0x40: + case 0x41: + $name = 'tAttrSpace'; + $size = 4; + // offset: 2; size: 2; space type and position + switch (ord($formulaData[2])) { + case 0x00: + $spacetype = 'type0'; + + break; + case 0x01: + $spacetype = 'type1'; + + break; + case 0x02: + $spacetype = 'type2'; + + break; + case 0x03: + $spacetype = 'type3'; + + break; + case 0x04: + $spacetype = 'type4'; + + break; + case 0x05: + $spacetype = 'type5'; + + break; + default: + throw new Exception('Unrecognized space type in tAttrSpace token'); + + break; + } + // offset: 3; size: 1; number of inserted spaces/carriage returns + $spacecount = ord($formulaData[3]); + + $data = ['spacetype' => $spacetype, 'spacecount' => $spacecount]; + + break; + default: + throw new Exception('Unrecognized attribute flag in tAttr token'); + + break; + } + + break; + case 0x1C: // error code + // offset: 1; size: 1; error code + $name = 'tErr'; + $size = 2; + $data = Xls\ErrorCode::lookup(ord($formulaData[1])); + + break; + case 0x1D: // boolean + // offset: 1; size: 1; 0 = false, 1 = true; + $name = 'tBool'; + $size = 2; + $data = ord($formulaData[1]) ? 'TRUE' : 'FALSE'; + + break; + case 0x1E: // integer + // offset: 1; size: 2; unsigned 16-bit integer + $name = 'tInt'; + $size = 3; + $data = self::getUInt2d($formulaData, 1); + + break; + case 0x1F: // number + // offset: 1; size: 8; + $name = 'tNum'; + $size = 9; + $data = self::extractNumber(substr($formulaData, 1)); + $data = str_replace(',', '.', (string) $data); // in case non-English locale + + break; + case 0x20: // array constant + case 0x40: + case 0x60: + // offset: 1; size: 7; not used + $name = 'tArray'; + $size = 8; + $data = null; + + break; + case 0x21: // function with fixed number of arguments + case 0x41: + case 0x61: + $name = 'tFunc'; + $size = 3; + // offset: 1; size: 2; index to built-in sheet function + switch (self::getUInt2d($formulaData, 1)) { + case 2: + $function = 'ISNA'; + $args = 1; + + break; + case 3: + $function = 'ISERROR'; + $args = 1; + + break; + case 10: + $function = 'NA'; + $args = 0; + + break; + case 15: + $function = 'SIN'; + $args = 1; + + break; + case 16: + $function = 'COS'; + $args = 1; + + break; + case 17: + $function = 'TAN'; + $args = 1; + + break; + case 18: + $function = 'ATAN'; + $args = 1; + + break; + case 19: + $function = 'PI'; + $args = 0; + + break; + case 20: + $function = 'SQRT'; + $args = 1; + + break; + case 21: + $function = 'EXP'; + $args = 1; + + break; + case 22: + $function = 'LN'; + $args = 1; + + break; + case 23: + $function = 'LOG10'; + $args = 1; + + break; + case 24: + $function = 'ABS'; + $args = 1; + + break; + case 25: + $function = 'INT'; + $args = 1; + + break; + case 26: + $function = 'SIGN'; + $args = 1; + + break; + case 27: + $function = 'ROUND'; + $args = 2; + + break; + case 30: + $function = 'REPT'; + $args = 2; + + break; + case 31: + $function = 'MID'; + $args = 3; + + break; + case 32: + $function = 'LEN'; + $args = 1; + + break; + case 33: + $function = 'VALUE'; + $args = 1; + + break; + case 34: + $function = 'TRUE'; + $args = 0; + + break; + case 35: + $function = 'FALSE'; + $args = 0; + + break; + case 38: + $function = 'NOT'; + $args = 1; + + break; + case 39: + $function = 'MOD'; + $args = 2; + + break; + case 40: + $function = 'DCOUNT'; + $args = 3; + + break; + case 41: + $function = 'DSUM'; + $args = 3; + + break; + case 42: + $function = 'DAVERAGE'; + $args = 3; + + break; + case 43: + $function = 'DMIN'; + $args = 3; + + break; + case 44: + $function = 'DMAX'; + $args = 3; + + break; + case 45: + $function = 'DSTDEV'; + $args = 3; + + break; + case 48: + $function = 'TEXT'; + $args = 2; + + break; + case 61: + $function = 'MIRR'; + $args = 3; + + break; + case 63: + $function = 'RAND'; + $args = 0; + + break; + case 65: + $function = 'DATE'; + $args = 3; + + break; + case 66: + $function = 'TIME'; + $args = 3; + + break; + case 67: + $function = 'DAY'; + $args = 1; + + break; + case 68: + $function = 'MONTH'; + $args = 1; + + break; + case 69: + $function = 'YEAR'; + $args = 1; + + break; + case 71: + $function = 'HOUR'; + $args = 1; + + break; + case 72: + $function = 'MINUTE'; + $args = 1; + + break; + case 73: + $function = 'SECOND'; + $args = 1; + + break; + case 74: + $function = 'NOW'; + $args = 0; + + break; + case 75: + $function = 'AREAS'; + $args = 1; + + break; + case 76: + $function = 'ROWS'; + $args = 1; + + break; + case 77: + $function = 'COLUMNS'; + $args = 1; + + break; + case 83: + $function = 'TRANSPOSE'; + $args = 1; + + break; + case 86: + $function = 'TYPE'; + $args = 1; + + break; + case 97: + $function = 'ATAN2'; + $args = 2; + + break; + case 98: + $function = 'ASIN'; + $args = 1; + + break; + case 99: + $function = 'ACOS'; + $args = 1; + + break; + case 105: + $function = 'ISREF'; + $args = 1; + + break; + case 111: + $function = 'CHAR'; + $args = 1; + + break; + case 112: + $function = 'LOWER'; + $args = 1; + + break; + case 113: + $function = 'UPPER'; + $args = 1; + + break; + case 114: + $function = 'PROPER'; + $args = 1; + + break; + case 117: + $function = 'EXACT'; + $args = 2; + + break; + case 118: + $function = 'TRIM'; + $args = 1; + + break; + case 119: + $function = 'REPLACE'; + $args = 4; + + break; + case 121: + $function = 'CODE'; + $args = 1; + + break; + case 126: + $function = 'ISERR'; + $args = 1; + + break; + case 127: + $function = 'ISTEXT'; + $args = 1; + + break; + case 128: + $function = 'ISNUMBER'; + $args = 1; + + break; + case 129: + $function = 'ISBLANK'; + $args = 1; + + break; + case 130: + $function = 'T'; + $args = 1; + + break; + case 131: + $function = 'N'; + $args = 1; + + break; + case 140: + $function = 'DATEVALUE'; + $args = 1; + + break; + case 141: + $function = 'TIMEVALUE'; + $args = 1; + + break; + case 142: + $function = 'SLN'; + $args = 3; + + break; + case 143: + $function = 'SYD'; + $args = 4; + + break; + case 162: + $function = 'CLEAN'; + $args = 1; + + break; + case 163: + $function = 'MDETERM'; + $args = 1; + + break; + case 164: + $function = 'MINVERSE'; + $args = 1; + + break; + case 165: + $function = 'MMULT'; + $args = 2; + + break; + case 184: + $function = 'FACT'; + $args = 1; + + break; + case 189: + $function = 'DPRODUCT'; + $args = 3; + + break; + case 190: + $function = 'ISNONTEXT'; + $args = 1; + + break; + case 195: + $function = 'DSTDEVP'; + $args = 3; + + break; + case 196: + $function = 'DVARP'; + $args = 3; + + break; + case 198: + $function = 'ISLOGICAL'; + $args = 1; + + break; + case 199: + $function = 'DCOUNTA'; + $args = 3; + + break; + case 207: + $function = 'REPLACEB'; + $args = 4; + + break; + case 210: + $function = 'MIDB'; + $args = 3; + + break; + case 211: + $function = 'LENB'; + $args = 1; + + break; + case 212: + $function = 'ROUNDUP'; + $args = 2; + + break; + case 213: + $function = 'ROUNDDOWN'; + $args = 2; + + break; + case 214: + $function = 'ASC'; + $args = 1; + + break; + case 215: + $function = 'DBCS'; + $args = 1; + + break; + case 221: + $function = 'TODAY'; + $args = 0; + + break; + case 229: + $function = 'SINH'; + $args = 1; + + break; + case 230: + $function = 'COSH'; + $args = 1; + + break; + case 231: + $function = 'TANH'; + $args = 1; + + break; + case 232: + $function = 'ASINH'; + $args = 1; + + break; + case 233: + $function = 'ACOSH'; + $args = 1; + + break; + case 234: + $function = 'ATANH'; + $args = 1; + + break; + case 235: + $function = 'DGET'; + $args = 3; + + break; + case 244: + $function = 'INFO'; + $args = 1; + + break; + case 252: + $function = 'FREQUENCY'; + $args = 2; + + break; + case 261: + $function = 'ERROR.TYPE'; + $args = 1; + + break; + case 271: + $function = 'GAMMALN'; + $args = 1; + + break; + case 273: + $function = 'BINOMDIST'; + $args = 4; + + break; + case 274: + $function = 'CHIDIST'; + $args = 2; + + break; + case 275: + $function = 'CHIINV'; + $args = 2; + + break; + case 276: + $function = 'COMBIN'; + $args = 2; + + break; + case 277: + $function = 'CONFIDENCE'; + $args = 3; + + break; + case 278: + $function = 'CRITBINOM'; + $args = 3; + + break; + case 279: + $function = 'EVEN'; + $args = 1; + + break; + case 280: + $function = 'EXPONDIST'; + $args = 3; + + break; + case 281: + $function = 'FDIST'; + $args = 3; + + break; + case 282: + $function = 'FINV'; + $args = 3; + + break; + case 283: + $function = 'FISHER'; + $args = 1; + + break; + case 284: + $function = 'FISHERINV'; + $args = 1; + + break; + case 285: + $function = 'FLOOR'; + $args = 2; + + break; + case 286: + $function = 'GAMMADIST'; + $args = 4; + + break; + case 287: + $function = 'GAMMAINV'; + $args = 3; + + break; + case 288: + $function = 'CEILING'; + $args = 2; + + break; + case 289: + $function = 'HYPGEOMDIST'; + $args = 4; + + break; + case 290: + $function = 'LOGNORMDIST'; + $args = 3; + + break; + case 291: + $function = 'LOGINV'; + $args = 3; + + break; + case 292: + $function = 'NEGBINOMDIST'; + $args = 3; + + break; + case 293: + $function = 'NORMDIST'; + $args = 4; + + break; + case 294: + $function = 'NORMSDIST'; + $args = 1; + + break; + case 295: + $function = 'NORMINV'; + $args = 3; + + break; + case 296: + $function = 'NORMSINV'; + $args = 1; + + break; + case 297: + $function = 'STANDARDIZE'; + $args = 3; + + break; + case 298: + $function = 'ODD'; + $args = 1; + + break; + case 299: + $function = 'PERMUT'; + $args = 2; + + break; + case 300: + $function = 'POISSON'; + $args = 3; + + break; + case 301: + $function = 'TDIST'; + $args = 3; + + break; + case 302: + $function = 'WEIBULL'; + $args = 4; + + break; + case 303: + $function = 'SUMXMY2'; + $args = 2; + + break; + case 304: + $function = 'SUMX2MY2'; + $args = 2; + + break; + case 305: + $function = 'SUMX2PY2'; + $args = 2; + + break; + case 306: + $function = 'CHITEST'; + $args = 2; + + break; + case 307: + $function = 'CORREL'; + $args = 2; + + break; + case 308: + $function = 'COVAR'; + $args = 2; + + break; + case 309: + $function = 'FORECAST'; + $args = 3; + + break; + case 310: + $function = 'FTEST'; + $args = 2; + + break; + case 311: + $function = 'INTERCEPT'; + $args = 2; + + break; + case 312: + $function = 'PEARSON'; + $args = 2; + + break; + case 313: + $function = 'RSQ'; + $args = 2; + + break; + case 314: + $function = 'STEYX'; + $args = 2; + + break; + case 315: + $function = 'SLOPE'; + $args = 2; + + break; + case 316: + $function = 'TTEST'; + $args = 4; + + break; + case 325: + $function = 'LARGE'; + $args = 2; + + break; + case 326: + $function = 'SMALL'; + $args = 2; + + break; + case 327: + $function = 'QUARTILE'; + $args = 2; + + break; + case 328: + $function = 'PERCENTILE'; + $args = 2; + + break; + case 331: + $function = 'TRIMMEAN'; + $args = 2; + + break; + case 332: + $function = 'TINV'; + $args = 2; + + break; + case 337: + $function = 'POWER'; + $args = 2; + + break; + case 342: + $function = 'RADIANS'; + $args = 1; + + break; + case 343: + $function = 'DEGREES'; + $args = 1; + + break; + case 346: + $function = 'COUNTIF'; + $args = 2; + + break; + case 347: + $function = 'COUNTBLANK'; + $args = 1; + + break; + case 350: + $function = 'ISPMT'; + $args = 4; + + break; + case 351: + $function = 'DATEDIF'; + $args = 3; + + break; + case 352: + $function = 'DATESTRING'; + $args = 1; + + break; + case 353: + $function = 'NUMBERSTRING'; + $args = 2; + + break; + case 360: + $function = 'PHONETIC'; + $args = 1; + + break; + case 368: + $function = 'BAHTTEXT'; + $args = 1; + + break; + default: + throw new Exception('Unrecognized function in formula'); + + break; + } + $data = ['function' => $function, 'args' => $args]; + + break; + case 0x22: // function with variable number of arguments + case 0x42: + case 0x62: + $name = 'tFuncV'; + $size = 4; + // offset: 1; size: 1; number of arguments + $args = ord($formulaData[1]); + // offset: 2: size: 2; index to built-in sheet function + $index = self::getUInt2d($formulaData, 2); + switch ($index) { + case 0: + $function = 'COUNT'; + + break; + case 1: + $function = 'IF'; + + break; + case 4: + $function = 'SUM'; + + break; + case 5: + $function = 'AVERAGE'; + + break; + case 6: + $function = 'MIN'; + + break; + case 7: + $function = 'MAX'; + + break; + case 8: + $function = 'ROW'; + + break; + case 9: + $function = 'COLUMN'; + + break; + case 11: + $function = 'NPV'; + + break; + case 12: + $function = 'STDEV'; + + break; + case 13: + $function = 'DOLLAR'; + + break; + case 14: + $function = 'FIXED'; + + break; + case 28: + $function = 'LOOKUP'; + + break; + case 29: + $function = 'INDEX'; + + break; + case 36: + $function = 'AND'; + + break; + case 37: + $function = 'OR'; + + break; + case 46: + $function = 'VAR'; + + break; + case 49: + $function = 'LINEST'; + + break; + case 50: + $function = 'TREND'; + + break; + case 51: + $function = 'LOGEST'; + + break; + case 52: + $function = 'GROWTH'; + + break; + case 56: + $function = 'PV'; + + break; + case 57: + $function = 'FV'; + + break; + case 58: + $function = 'NPER'; + + break; + case 59: + $function = 'PMT'; + + break; + case 60: + $function = 'RATE'; + + break; + case 62: + $function = 'IRR'; + + break; + case 64: + $function = 'MATCH'; + + break; + case 70: + $function = 'WEEKDAY'; + + break; + case 78: + $function = 'OFFSET'; + + break; + case 82: + $function = 'SEARCH'; + + break; + case 100: + $function = 'CHOOSE'; + + break; + case 101: + $function = 'HLOOKUP'; + + break; + case 102: + $function = 'VLOOKUP'; + + break; + case 109: + $function = 'LOG'; + + break; + case 115: + $function = 'LEFT'; + + break; + case 116: + $function = 'RIGHT'; + + break; + case 120: + $function = 'SUBSTITUTE'; + + break; + case 124: + $function = 'FIND'; + + break; + case 125: + $function = 'CELL'; + + break; + case 144: + $function = 'DDB'; + + break; + case 148: + $function = 'INDIRECT'; + + break; + case 167: + $function = 'IPMT'; + + break; + case 168: + $function = 'PPMT'; + + break; + case 169: + $function = 'COUNTA'; + + break; + case 183: + $function = 'PRODUCT'; + + break; + case 193: + $function = 'STDEVP'; + + break; + case 194: + $function = 'VARP'; + + break; + case 197: + $function = 'TRUNC'; + + break; + case 204: + $function = 'USDOLLAR'; + + break; + case 205: + $function = 'FINDB'; + + break; + case 206: + $function = 'SEARCHB'; + + break; + case 208: + $function = 'LEFTB'; + + break; + case 209: + $function = 'RIGHTB'; + + break; + case 216: + $function = 'RANK'; + + break; + case 219: + $function = 'ADDRESS'; + + break; + case 220: + $function = 'DAYS360'; + + break; + case 222: + $function = 'VDB'; + + break; + case 227: + $function = 'MEDIAN'; + + break; + case 228: + $function = 'SUMPRODUCT'; + + break; + case 247: + $function = 'DB'; + + break; + case 255: + $function = ''; + + break; + case 269: + $function = 'AVEDEV'; + + break; + case 270: + $function = 'BETADIST'; + + break; + case 272: + $function = 'BETAINV'; + + break; + case 317: + $function = 'PROB'; + + break; + case 318: + $function = 'DEVSQ'; + + break; + case 319: + $function = 'GEOMEAN'; + + break; + case 320: + $function = 'HARMEAN'; + + break; + case 321: + $function = 'SUMSQ'; + + break; + case 322: + $function = 'KURT'; + + break; + case 323: + $function = 'SKEW'; + + break; + case 324: + $function = 'ZTEST'; + + break; + case 329: + $function = 'PERCENTRANK'; + + break; + case 330: + $function = 'MODE'; + + break; + case 336: + $function = 'CONCATENATE'; + + break; + case 344: + $function = 'SUBTOTAL'; + + break; + case 345: + $function = 'SUMIF'; + + break; + case 354: + $function = 'ROMAN'; + + break; + case 358: + $function = 'GETPIVOTDATA'; + + break; + case 359: + $function = 'HYPERLINK'; + + break; + case 361: + $function = 'AVERAGEA'; + + break; + case 362: + $function = 'MAXA'; + + break; + case 363: + $function = 'MINA'; + + break; + case 364: + $function = 'STDEVPA'; + + break; + case 365: + $function = 'VARPA'; + + break; + case 366: + $function = 'STDEVA'; + + break; + case 367: + $function = 'VARA'; + + break; + default: + throw new Exception('Unrecognized function in formula'); + + break; + } + $data = ['function' => $function, 'args' => $args]; + + break; + case 0x23: // index to defined name + case 0x43: + case 0x63: + $name = 'tName'; + $size = 5; + // offset: 1; size: 2; one-based index to definedname record + $definedNameIndex = self::getUInt2d($formulaData, 1) - 1; + // offset: 2; size: 2; not used + $data = $this->definedname[$definedNameIndex]['name']; + + break; + case 0x24: // single cell reference e.g. A5 + case 0x44: + case 0x64: + $name = 'tRef'; + $size = 5; + $data = $this->readBIFF8CellAddress(substr($formulaData, 1, 4)); + + break; + case 0x25: // cell range reference to cells in the same sheet (2d) + case 0x45: + case 0x65: + $name = 'tArea'; + $size = 9; + $data = $this->readBIFF8CellRangeAddress(substr($formulaData, 1, 8)); + + break; + case 0x26: // Constant reference sub-expression + case 0x46: + case 0x66: + $name = 'tMemArea'; + // offset: 1; size: 4; not used + // offset: 5; size: 2; size of the following subexpression + $subSize = self::getUInt2d($formulaData, 5); + $size = 7 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); + + break; + case 0x27: // Deleted constant reference sub-expression + case 0x47: + case 0x67: + $name = 'tMemErr'; + // offset: 1; size: 4; not used + // offset: 5; size: 2; size of the following subexpression + $subSize = self::getUInt2d($formulaData, 5); + $size = 7 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); + + break; + case 0x29: // Variable reference sub-expression + case 0x49: + case 0x69: + $name = 'tMemFunc'; + // offset: 1; size: 2; size of the following sub-expression + $subSize = self::getUInt2d($formulaData, 1); + $size = 3 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 3, $subSize)); + + break; + case 0x2C: // Relative 2d cell reference reference, used in shared formulas and some other places + case 0x4C: + case 0x6C: + $name = 'tRefN'; + $size = 5; + $data = $this->readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell); + + break; + case 0x2D: // Relative 2d range reference + case 0x4D: + case 0x6D: + $name = 'tAreaN'; + $size = 9; + $data = $this->readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell); + + break; + case 0x39: // External name + case 0x59: + case 0x79: + $name = 'tNameX'; + $size = 7; + // offset: 1; size: 2; index to REF entry in EXTERNSHEET record + // offset: 3; size: 2; one-based index to DEFINEDNAME or EXTERNNAME record + $index = self::getUInt2d($formulaData, 3); + // assume index is to EXTERNNAME record + $data = $this->externalNames[$index - 1]['name']; + // offset: 5; size: 2; not used + break; + case 0x3A: // 3d reference to cell + case 0x5A: + case 0x7A: + $name = 'tRef3d'; + $size = 7; + + try { + // offset: 1; size: 2; index to REF entry + $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1)); + // offset: 3; size: 4; cell address + $cellAddress = $this->readBIFF8CellAddress(substr($formulaData, 3, 4)); + + $data = "$sheetRange!$cellAddress"; + } catch (PhpSpreadsheetException $e) { + // deleted sheet reference + $data = '#REF!'; + } + + break; + case 0x3B: // 3d reference to cell range + case 0x5B: + case 0x7B: + $name = 'tArea3d'; + $size = 11; + + try { + // offset: 1; size: 2; index to REF entry + $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1)); + // offset: 3; size: 8; cell address + $cellRangeAddress = $this->readBIFF8CellRangeAddress(substr($formulaData, 3, 8)); + + $data = "$sheetRange!$cellRangeAddress"; + } catch (PhpSpreadsheetException $e) { + // deleted sheet reference + $data = '#REF!'; + } + + break; + // Unknown cases // don't know how to deal with + default: + throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula'); + + break; + } + + return [ + 'id' => $id, + 'name' => $name, + 'size' => $size, + 'data' => $data, + ]; + } + + /** + * Reads a cell address in BIFF8 e.g. 'A2' or '$A$2' + * section 3.3.4. + * + * @param string $cellAddressStructure + * + * @return string + */ + private function readBIFF8CellAddress($cellAddressStructure) + { + // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) + $row = self::getUInt2d($cellAddressStructure, 0) + 1; + + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $column = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($cellAddressStructure, 2)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) { + $column = '$' . $column; + } + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { + $row = '$' . $row; + } + + return $column . $row; + } + + /** + * Reads a cell address in BIFF8 for shared formulas. Uses positive and negative values for row and column + * to indicate offsets from a base cell + * section 3.3.4. + * + * @param string $cellAddressStructure + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string + */ + private function readBIFF8CellAddressB($cellAddressStructure, $baseCell = 'A1') + { + [$baseCol, $baseRow] = Coordinate::coordinateFromString($baseCell); + $baseCol = Coordinate::columnIndexFromString($baseCol) - 1; + + // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) + $rowIndex = self::getUInt2d($cellAddressStructure, 0); + $row = self::getUInt2d($cellAddressStructure, 0) + 1; + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) { + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $colIndex = 0x00FF & self::getUInt2d($cellAddressStructure, 2); + + $column = Coordinate::stringFromColumnIndex($colIndex + 1); + $column = '$' . $column; + } else { + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $relativeColIndex = 0x00FF & self::getInt2d($cellAddressStructure, 2); + $colIndex = $baseCol + $relativeColIndex; + $colIndex = ($colIndex < 256) ? $colIndex : $colIndex - 256; + $colIndex = ($colIndex >= 0) ? $colIndex : $colIndex + 256; + $column = Coordinate::stringFromColumnIndex($colIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { + $row = '$' . $row; + } else { + $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536; + $row = $baseRow + $rowIndex; + } + + return $column . $row; + } + + /** + * Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1' + * always fixed range + * section 2.5.14. + * + * @param string $subData + * + * @return string + */ + private function readBIFF5CellRangeAddressFixed($subData) + { + // offset: 0; size: 2; index to first row + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 1; index to first column + $fc = ord($subData[4]); + + // offset: 5; size: 1; index to last column + $lc = ord($subData[5]); + + // check values + if ($fr > $lr || $fc > $lc) { + throw new Exception('Not a cell range address'); + } + + // column index to letter + $fc = Coordinate::stringFromColumnIndex($fc + 1); + $lc = Coordinate::stringFromColumnIndex($lc + 1); + + if ($fr == $lr && $fc == $lc) { + return "$fc$fr"; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 e.g. 'A2:B6' or 'A1' + * always fixed range + * section 2.5.14. + * + * @param string $subData + * + * @return string + */ + private function readBIFF8CellRangeAddressFixed($subData) + { + // offset: 0; size: 2; index to first row + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 2; index to first column + $fc = self::getUInt2d($subData, 4); + + // offset: 6; size: 2; index to last column + $lc = self::getUInt2d($subData, 6); + + // check values + if ($fr > $lr || $fc > $lc) { + throw new Exception('Not a cell range address'); + } + + // column index to letter + $fc = Coordinate::stringFromColumnIndex($fc + 1); + $lc = Coordinate::stringFromColumnIndex($lc + 1); + + if ($fr == $lr && $fc == $lc) { + return "$fc$fr"; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 e.g. 'A2:B6' or '$A$2:$B$6' + * there are flags indicating whether column/row index is relative + * section 3.3.4. + * + * @param string $subData + * + * @return string + */ + private function readBIFF8CellRangeAddress($subData) + { + // todo: if cell range is just a single cell, should this funciton + // not just return e.g. 'A1' and not 'A1:A1' ? + + // offset: 0; size: 2; index to first row (0... 65535) (or offset (-32768... 32767)) + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row (0... 65535) (or offset (-32768... 32767)) + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 2; index to first column or column offset + relative flags + + // bit: 7-0; mask 0x00FF; column index + $fc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 4)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 4))) { + $fc = '$' . $fc; + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 4))) { + $fr = '$' . $fr; + } + + // offset: 6; size: 2; index to last column or column offset + relative flags + + // bit: 7-0; mask 0x00FF; column index + $lc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 6)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 6))) { + $lc = '$' . $lc; + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 6))) { + $lr = '$' . $lr; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 for shared formulas. Uses positive and negative values for row and column + * to indicate offsets from a base cell + * section 3.3.4. + * + * @param string $subData + * @param string $baseCell Base cell + * + * @return string Cell range address + */ + private function readBIFF8CellRangeAddressB($subData, $baseCell = 'A1') + { + [$baseCol, $baseRow] = Coordinate::coordinateFromString($baseCell); + $baseCol = Coordinate::columnIndexFromString($baseCol) - 1; + + // TODO: if cell range is just a single cell, should this funciton + // not just return e.g. 'A1' and not 'A1:A1' ? + + // offset: 0; size: 2; first row + $frIndex = self::getUInt2d($subData, 0); // adjust below + + // offset: 2; size: 2; relative index to first row (0... 65535) should be treated as offset (-32768... 32767) + $lrIndex = self::getUInt2d($subData, 2); // adjust below + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 4))) { + // absolute column index + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $fcIndex = 0x00FF & self::getUInt2d($subData, 4); + $fc = Coordinate::stringFromColumnIndex($fcIndex + 1); + $fc = '$' . $fc; + } else { + // column offset + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $relativeFcIndex = 0x00FF & self::getInt2d($subData, 4); + $fcIndex = $baseCol + $relativeFcIndex; + $fcIndex = ($fcIndex < 256) ? $fcIndex : $fcIndex - 256; + $fcIndex = ($fcIndex >= 0) ? $fcIndex : $fcIndex + 256; + $fc = Coordinate::stringFromColumnIndex($fcIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 4))) { + // absolute row index + $fr = $frIndex + 1; + $fr = '$' . $fr; + } else { + // row offset + $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536; + $fr = $baseRow + $frIndex; + } + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 6))) { + // absolute column index + // offset: 6; size: 2; last column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $lcIndex = 0x00FF & self::getUInt2d($subData, 6); + $lc = Coordinate::stringFromColumnIndex($lcIndex + 1); + $lc = '$' . $lc; + } else { + // column offset + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $relativeLcIndex = 0x00FF & self::getInt2d($subData, 4); + $lcIndex = $baseCol + $relativeLcIndex; + $lcIndex = ($lcIndex < 256) ? $lcIndex : $lcIndex - 256; + $lcIndex = ($lcIndex >= 0) ? $lcIndex : $lcIndex + 256; + $lc = Coordinate::stringFromColumnIndex($lcIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 6))) { + // absolute row index + $lr = $lrIndex + 1; + $lr = '$' . $lr; + } else { + // row offset + $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536; + $lr = $baseRow + $lrIndex; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Read BIFF8 cell range address list + * section 2.5.15. + * + * @param string $subData + * + * @return array + */ + private function readBIFF8CellRangeAddressList($subData) + { + $cellRangeAddresses = []; + + // offset: 0; size: 2; number of the following cell range addresses + $nm = self::getUInt2d($subData, 0); + + $offset = 2; + // offset: 2; size: 8 * $nm; list of $nm (fixed) cell range addresses + for ($i = 0; $i < $nm; ++$i) { + $cellRangeAddresses[] = $this->readBIFF8CellRangeAddressFixed(substr($subData, $offset, 8)); + $offset += 8; + } + + return [ + 'size' => 2 + 8 * $nm, + 'cellRangeAddresses' => $cellRangeAddresses, + ]; + } + + /** + * Read BIFF5 cell range address list + * section 2.5.15. + * + * @param string $subData + * + * @return array + */ + private function readBIFF5CellRangeAddressList($subData) + { + $cellRangeAddresses = []; + + // offset: 0; size: 2; number of the following cell range addresses + $nm = self::getUInt2d($subData, 0); + + $offset = 2; + // offset: 2; size: 6 * $nm; list of $nm (fixed) cell range addresses + for ($i = 0; $i < $nm; ++$i) { + $cellRangeAddresses[] = $this->readBIFF5CellRangeAddressFixed(substr($subData, $offset, 6)); + $offset += 6; + } + + return [ + 'size' => 2 + 6 * $nm, + 'cellRangeAddresses' => $cellRangeAddresses, + ]; + } + + /** + * Get a sheet range like Sheet1:Sheet3 from REF index + * Note: If there is only one sheet in the range, one gets e.g Sheet1 + * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets, + * in which case an Exception is thrown. + * + * @param int $index + * + * @return false|string + */ + private function readSheetRangeByRefIndex($index) + { + if (isset($this->ref[$index])) { + $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type']; + + switch ($type) { + case 'internal': + // check if we have a deleted 3d reference + if ($this->ref[$index]['firstSheetIndex'] == 0xFFFF || $this->ref[$index]['lastSheetIndex'] == 0xFFFF) { + throw new Exception('Deleted sheet reference'); + } + + // we have normal sheet range (collapsed or uncollapsed) + $firstSheetName = $this->sheets[$this->ref[$index]['firstSheetIndex']]['name']; + $lastSheetName = $this->sheets[$this->ref[$index]['lastSheetIndex']]['name']; + + if ($firstSheetName == $lastSheetName) { + // collapsed sheet range + $sheetRange = $firstSheetName; + } else { + $sheetRange = "$firstSheetName:$lastSheetName"; + } + + // escape the single-quotes + $sheetRange = str_replace("'", "''", $sheetRange); + + // if there are special characters, we need to enclose the range in single-quotes + // todo: check if we have identified the whole set of special characters + // it seems that the following characters are not accepted for sheet names + // and we may assume that they are not present: []*/:\? + if (preg_match("/[ !\"@#£$%&{()}<>=+'|^,;-]/u", $sheetRange)) { + $sheetRange = "'$sheetRange'"; + } + + return $sheetRange; + + break; + default: + // TODO: external sheet support + throw new Exception('Xls reader only supports internal sheets in formulas'); + + break; + } + } + + return false; + } + + /** + * read BIFF8 constant value array from array data + * returns e.g. ['value' => '{1,2;3,4}', 'size' => 40] + * section 2.5.8. + * + * @param string $arrayData + * + * @return array + */ + private static function readBIFF8ConstantArray($arrayData) + { + // offset: 0; size: 1; number of columns decreased by 1 + $nc = ord($arrayData[0]); + + // offset: 1; size: 2; number of rows decreased by 1 + $nr = self::getUInt2d($arrayData, 1); + $size = 3; // initialize + $arrayData = substr($arrayData, 3); + + // offset: 3; size: var; list of ($nc + 1) * ($nr + 1) constant values + $matrixChunks = []; + for ($r = 1; $r <= $nr + 1; ++$r) { + $items = []; + for ($c = 1; $c <= $nc + 1; ++$c) { + $constant = self::readBIFF8Constant($arrayData); + $items[] = $constant['value']; + $arrayData = substr($arrayData, $constant['size']); + $size += $constant['size']; + } + $matrixChunks[] = implode(',', $items); // looks like e.g. '1,"hello"' + } + $matrix = '{' . implode(';', $matrixChunks) . '}'; + + return [ + 'value' => $matrix, + 'size' => $size, + ]; + } + + /** + * read BIFF8 constant value which may be 'Empty Value', 'Number', 'String Value', 'Boolean Value', 'Error Value' + * section 2.5.7 + * returns e.g. ['value' => '5', 'size' => 9]. + * + * @param string $valueData + * + * @return array + */ + private static function readBIFF8Constant($valueData) + { + // offset: 0; size: 1; identifier for type of constant + $identifier = ord($valueData[0]); + + switch ($identifier) { + case 0x00: // empty constant (what is this?) + $value = ''; + $size = 9; + + break; + case 0x01: // number + // offset: 1; size: 8; IEEE 754 floating-point value + $value = self::extractNumber(substr($valueData, 1, 8)); + $size = 9; + + break; + case 0x02: // string value + // offset: 1; size: var; Unicode string, 16-bit string length + $string = self::readUnicodeStringLong(substr($valueData, 1)); + $value = '"' . $string['value'] . '"'; + $size = 1 + $string['size']; + + break; + case 0x04: // boolean + // offset: 1; size: 1; 0 = FALSE, 1 = TRUE + if (ord($valueData[1])) { + $value = 'TRUE'; + } else { + $value = 'FALSE'; + } + $size = 9; + + break; + case 0x10: // error code + // offset: 1; size: 1; error code + $value = Xls\ErrorCode::lookup(ord($valueData[1])); + $size = 9; + + break; + } + + return [ + 'value' => $value, + 'size' => $size, + ]; + } + + /** + * Extract RGB color + * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4. + * + * @param string $rgb Encoded RGB value (4 bytes) + * + * @return array + */ + private static function readRGB($rgb) + { + // offset: 0; size 1; Red component + $r = ord($rgb[0]); + + // offset: 1; size: 1; Green component + $g = ord($rgb[1]); + + // offset: 2; size: 1; Blue component + $b = ord($rgb[2]); + + // HEX notation, e.g. 'FF00FC' + $rgb = sprintf('%02X%02X%02X', $r, $g, $b); + + return ['rgb' => $rgb]; + } + + /** + * Read byte string (8-bit string length) + * OpenOffice documentation: 2.5.2. + * + * @param string $subData + * + * @return array + */ + private function readByteStringShort($subData) + { + // offset: 0; size: 1; length of the string (character count) + $ln = ord($subData[0]); + + // offset: 1: size: var; character array (8-bit characters) + $value = $this->decodeCodepage(substr($subData, 1, $ln)); + + return [ + 'value' => $value, + 'size' => 1 + $ln, // size in bytes of data structure + ]; + } + + /** + * Read byte string (16-bit string length) + * OpenOffice documentation: 2.5.2. + * + * @param string $subData + * + * @return array + */ + private function readByteStringLong($subData) + { + // offset: 0; size: 2; length of the string (character count) + $ln = self::getUInt2d($subData, 0); + + // offset: 2: size: var; character array (8-bit characters) + $value = $this->decodeCodepage(substr($subData, 2)); + + //return $string; + return [ + 'value' => $value, + 'size' => 2 + $ln, // size in bytes of data structure + ]; + } + + /** + * Extracts an Excel Unicode short string (8-bit string length) + * OpenOffice documentation: 2.5.3 + * function will automatically find out where the Unicode string ends. + * + * @param string $subData + * + * @return array + */ + private static function readUnicodeStringShort($subData) + { + $value = ''; + + // offset: 0: size: 1; length of the string (character count) + $characterCount = ord($subData[0]); + + $string = self::readUnicodeString(substr($subData, 1), $characterCount); + + // add 1 for the string length + ++$string['size']; + + return $string; + } + + /** + * Extracts an Excel Unicode long string (16-bit string length) + * OpenOffice documentation: 2.5.3 + * this function is under construction, needs to support rich text, and Asian phonetic settings. + * + * @param string $subData + * + * @return array + */ + private static function readUnicodeStringLong($subData) + { + $value = ''; + + // offset: 0: size: 2; length of the string (character count) + $characterCount = self::getUInt2d($subData, 0); + + $string = self::readUnicodeString(substr($subData, 2), $characterCount); + + // add 2 for the string length + $string['size'] += 2; + + return $string; + } + + /** + * Read Unicode string with no string length field, but with known character count + * this function is under construction, needs to support rich text, and Asian phonetic settings + * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3. + * + * @param string $subData + * @param int $characterCount + * + * @return array + */ + private static function readUnicodeString($subData, $characterCount) + { + $value = ''; + + // offset: 0: size: 1; option flags + // bit: 0; mask: 0x01; character compression (0 = compressed 8-bit, 1 = uncompressed 16-bit) + $isCompressed = !((0x01 & ord($subData[0])) >> 0); + + // bit: 2; mask: 0x04; Asian phonetic settings + $hasAsian = (0x04) & ord($subData[0]) >> 2; + + // bit: 3; mask: 0x08; Rich-Text settings + $hasRichText = (0x08) & ord($subData[0]) >> 3; + + // offset: 1: size: var; character array + // this offset assumes richtext and Asian phonetic settings are off which is generally wrong + // needs to be fixed + $value = self::encodeUTF16(substr($subData, 1, $isCompressed ? $characterCount : 2 * $characterCount), $isCompressed); + + return [ + 'value' => $value, + 'size' => $isCompressed ? 1 + $characterCount : 1 + 2 * $characterCount, // the size in bytes including the option flags + ]; + } + + /** + * Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas. + * Example: hello"world --> "hello""world". + * + * @param string $value UTF-8 encoded string + * + * @return string + */ + private static function UTF8toExcelDoubleQuoted($value) + { + return '"' . str_replace('"', '""', $value) . '"'; + } + + /** + * Reads first 8 bytes of a string and return IEEE 754 float. + * + * @param string $data Binary string that is at least 8 bytes long + * + * @return float + */ + private static function extractNumber($data) + { + $rknumhigh = self::getInt4d($data, 4); + $rknumlow = self::getInt4d($data, 0); + $sign = ($rknumhigh & 0x80000000) >> 31; + $exp = (($rknumhigh & 0x7ff00000) >> 20) - 1023; + $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); + $mantissalow1 = ($rknumlow & 0x80000000) >> 31; + $mantissalow2 = ($rknumlow & 0x7fffffff); + $value = $mantissa / 2 ** (20 - $exp); + + if ($mantissalow1 != 0) { + $value += 1 / 2 ** (21 - $exp); + } + + $value += $mantissalow2 / 2 ** (52 - $exp); + if ($sign) { + $value *= -1; + } + + return $value; + } + + /** + * @param int $rknum + * + * @return float + */ + private static function getIEEE754($rknum) + { + if (($rknum & 0x02) != 0) { + $value = $rknum >> 2; + } else { + // changes by mmp, info on IEEE754 encoding from + // research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html + // The RK format calls for using only the most significant 30 bits + // of the 64 bit floating point value. The other 34 bits are assumed + // to be 0 so we use the upper 30 bits of $rknum as follows... + $sign = ($rknum & 0x80000000) >> 31; + $exp = ($rknum & 0x7ff00000) >> 20; + $mantissa = (0x100000 | ($rknum & 0x000ffffc)); + $value = $mantissa / 2 ** (20 - ($exp - 1023)); + if ($sign) { + $value = -1 * $value; + } + //end of changes by mmp + } + if (($rknum & 0x01) != 0) { + $value /= 100; + } + + return $value; + } + + /** + * Get UTF-8 string from (compressed or uncompressed) UTF-16 string. + * + * @param string $string + * @param bool $compressed + * + * @return string + */ + private static function encodeUTF16($string, $compressed = false) + { + if ($compressed) { + $string = self::uncompressByteString($string); + } + + return StringHelper::convertEncoding($string, 'UTF-8', 'UTF-16LE'); + } + + /** + * Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8. + * + * @param string $string + * + * @return string + */ + private static function uncompressByteString($string) + { + $uncompressedString = ''; + $strLen = strlen($string); + for ($i = 0; $i < $strLen; ++$i) { + $uncompressedString .= $string[$i] . "\0"; + } + + return $uncompressedString; + } + + /** + * Convert string to UTF-8. Only used for BIFF5. + * + * @param string $string + * + * @return string + */ + private function decodeCodepage($string) + { + return StringHelper::convertEncoding($string, 'UTF-8', $this->codepage); + } + + /** + * Read 16-bit unsigned integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getUInt2d($data, $pos) + { + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8); + } + + /** + * Read 16-bit signed integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getInt2d($data, $pos) + { + return unpack('s', $data[$pos] . $data[$pos + 1])[1]; + } + + /** + * Read 32-bit signed integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getInt4d($data, $pos) + { + // FIX: represent numbers correctly on 64-bit system + // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 + // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems + $_or_24 = ord($data[$pos + 3]); + if ($_or_24 >= 128) { + // negative number + $_ord_24 = -abs((256 - $_or_24) << 24); + } else { + $_ord_24 = ($_or_24 & 127) << 24; + } + + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24; + } + + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color.php new file mode 100755 index 0000000..c45f88c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color.php @@ -0,0 +1,36 @@ + 'FF0000'] + */ + public static function map($color, $palette, $version) + { + if ($color <= 0x07 || $color >= 0x40) { + // special built-in color + return Color\BuiltIn::lookup($color); + } elseif (isset($palette, $palette[$color - 8])) { + // palette color, color index 0x08 maps to pallete index 0 + return $palette[$color - 8]; + } + + // default color table + if ($version == Xls::XLS_BIFF8) { + return Color\BIFF8::lookup($color); + } + + // BIFF5 + return Color\BIFF5::lookup($color); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF5.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF5.php new file mode 100755 index 0000000..743d938 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF5.php @@ -0,0 +1,81 @@ + '000000', + 0x09 => 'FFFFFF', + 0x0A => 'FF0000', + 0x0B => '00FF00', + 0x0C => '0000FF', + 0x0D => 'FFFF00', + 0x0E => 'FF00FF', + 0x0F => '00FFFF', + 0x10 => '800000', + 0x11 => '008000', + 0x12 => '000080', + 0x13 => '808000', + 0x14 => '800080', + 0x15 => '008080', + 0x16 => 'C0C0C0', + 0x17 => '808080', + 0x18 => '8080FF', + 0x19 => '802060', + 0x1A => 'FFFFC0', + 0x1B => 'A0E0F0', + 0x1C => '600080', + 0x1D => 'FF8080', + 0x1E => '0080C0', + 0x1F => 'C0C0FF', + 0x20 => '000080', + 0x21 => 'FF00FF', + 0x22 => 'FFFF00', + 0x23 => '00FFFF', + 0x24 => '800080', + 0x25 => '800000', + 0x26 => '008080', + 0x27 => '0000FF', + 0x28 => '00CFFF', + 0x29 => '69FFFF', + 0x2A => 'E0FFE0', + 0x2B => 'FFFF80', + 0x2C => 'A6CAF0', + 0x2D => 'DD9CB3', + 0x2E => 'B38FEE', + 0x2F => 'E3E3E3', + 0x30 => '2A6FF9', + 0x31 => '3FB8CD', + 0x32 => '488436', + 0x33 => '958C41', + 0x34 => '8E5E42', + 0x35 => 'A0627A', + 0x36 => '624FAC', + 0x37 => '969696', + 0x38 => '1D2FBE', + 0x39 => '286676', + 0x3A => '004500', + 0x3B => '453E01', + 0x3C => '6A2813', + 0x3D => '85396A', + 0x3E => '4A3285', + 0x3F => '424242', + ]; + + /** + * Map color array from BIFF5 built-in color index. + * + * @param int $color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF8.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF8.php new file mode 100755 index 0000000..5c109fb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BIFF8.php @@ -0,0 +1,81 @@ + '000000', + 0x09 => 'FFFFFF', + 0x0A => 'FF0000', + 0x0B => '00FF00', + 0x0C => '0000FF', + 0x0D => 'FFFF00', + 0x0E => 'FF00FF', + 0x0F => '00FFFF', + 0x10 => '800000', + 0x11 => '008000', + 0x12 => '000080', + 0x13 => '808000', + 0x14 => '800080', + 0x15 => '008080', + 0x16 => 'C0C0C0', + 0x17 => '808080', + 0x18 => '9999FF', + 0x19 => '993366', + 0x1A => 'FFFFCC', + 0x1B => 'CCFFFF', + 0x1C => '660066', + 0x1D => 'FF8080', + 0x1E => '0066CC', + 0x1F => 'CCCCFF', + 0x20 => '000080', + 0x21 => 'FF00FF', + 0x22 => 'FFFF00', + 0x23 => '00FFFF', + 0x24 => '800080', + 0x25 => '800000', + 0x26 => '008080', + 0x27 => '0000FF', + 0x28 => '00CCFF', + 0x29 => 'CCFFFF', + 0x2A => 'CCFFCC', + 0x2B => 'FFFF99', + 0x2C => '99CCFF', + 0x2D => 'FF99CC', + 0x2E => 'CC99FF', + 0x2F => 'FFCC99', + 0x30 => '3366FF', + 0x31 => '33CCCC', + 0x32 => '99CC00', + 0x33 => 'FFCC00', + 0x34 => 'FF9900', + 0x35 => 'FF6600', + 0x36 => '666699', + 0x37 => '969696', + 0x38 => '003366', + 0x39 => '339966', + 0x3A => '003300', + 0x3B => '333300', + 0x3C => '993300', + 0x3D => '993366', + 0x3E => '333399', + 0x3F => '333333', + ]; + + /** + * Map color array from BIFF8 built-in color index. + * + * @param int $color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php new file mode 100755 index 0000000..90d50e3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php @@ -0,0 +1,35 @@ + '000000', + 0x01 => 'FFFFFF', + 0x02 => 'FF0000', + 0x03 => '00FF00', + 0x04 => '0000FF', + 0x05 => 'FFFF00', + 0x06 => 'FF00FF', + 0x07 => '00FFFF', + 0x40 => '000000', // system window text color + 0x41 => 'FFFFFF', // system window background color + ]; + + /** + * Map built-in color to RGB value. + * + * @param int $color Indexed color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/ErrorCode.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/ErrorCode.php new file mode 100755 index 0000000..7daf723 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/ErrorCode.php @@ -0,0 +1,32 @@ + '#NULL!', + 0x07 => '#DIV/0!', + 0x0F => '#VALUE!', + 0x17 => '#REF!', + 0x1D => '#NAME?', + 0x24 => '#NUM!', + 0x2A => '#N/A', + ]; + + /** + * Map error code, e.g. '#N/A'. + * + * @param int $code + * + * @return bool|string + */ + public static function lookup($code) + { + if (isset(self::$map[$code])) { + return self::$map[$code]; + } + + return false; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Escher.php new file mode 100755 index 0000000..306fc8f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Escher.php @@ -0,0 +1,677 @@ +object = $object; + } + + /** + * Load Escher stream data. May be a partial Escher stream. + * + * @param string $data + * + * @return BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer + */ + public function load($data) + { + $this->data = $data; + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + $this->pos = 0; + + // Parse Escher stream + while ($this->pos < $this->dataSize) { + // offset: 2; size: 2: Record Type + $fbt = Xls::getUInt2d($this->data, $this->pos + 2); + + switch ($fbt) { + case self::DGGCONTAINER: + $this->readDggContainer(); + + break; + case self::DGG: + $this->readDgg(); + + break; + case self::BSTORECONTAINER: + $this->readBstoreContainer(); + + break; + case self::BSE: + $this->readBSE(); + + break; + case self::BLIPJPEG: + $this->readBlipJPEG(); + + break; + case self::BLIPPNG: + $this->readBlipPNG(); + + break; + case self::OPT: + $this->readOPT(); + + break; + case self::TERTIARYOPT: + $this->readTertiaryOPT(); + + break; + case self::SPLITMENUCOLORS: + $this->readSplitMenuColors(); + + break; + case self::DGCONTAINER: + $this->readDgContainer(); + + break; + case self::DG: + $this->readDg(); + + break; + case self::SPGRCONTAINER: + $this->readSpgrContainer(); + + break; + case self::SPCONTAINER: + $this->readSpContainer(); + + break; + case self::SPGR: + $this->readSpgr(); + + break; + case self::SP: + $this->readSp(); + + break; + case self::CLIENTTEXTBOX: + $this->readClientTextbox(); + + break; + case self::CLIENTANCHOR: + $this->readClientAnchor(); + + break; + case self::CLIENTDATA: + $this->readClientData(); + + break; + default: + $this->readDefault(); + + break; + } + } + + return $this->object; + } + + /** + * Read a generic record. + */ + private function readDefault(): void + { + // offset 0; size: 2; recVer and recInstance + $verInstance = Xls::getUInt2d($this->data, $this->pos); + + // offset: 2; size: 2: Record Type + $fbt = Xls::getUInt2d($this->data, $this->pos + 2); + + // bit: 0-3; mask: 0x000F; recVer + $recVer = (0x000F & $verInstance) >> 0; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read DggContainer record (Drawing Group Container). + */ + private function readDggContainer(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $dggContainer = new DggContainer(); + $this->object->setDggContainer($dggContainer); + $reader = new self($dggContainer); + $reader->load($recordData); + } + + /** + * Read Dgg record (Drawing Group). + */ + private function readDgg(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read BstoreContainer record (Blip Store Container). + */ + private function readBstoreContainer(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $bstoreContainer = new BstoreContainer(); + $this->object->setBstoreContainer($bstoreContainer); + $reader = new self($bstoreContainer); + $reader->load($recordData); + } + + /** + * Read BSE record. + */ + private function readBSE(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // add BSE to BstoreContainer + $BSE = new BSE(); + $this->object->addBSE($BSE); + + $BSE->setBLIPType($recInstance); + + // offset: 0; size: 1; btWin32 (MSOBLIPTYPE) + $btWin32 = ord($recordData[0]); + + // offset: 1; size: 1; btWin32 (MSOBLIPTYPE) + $btMacOS = ord($recordData[1]); + + // offset: 2; size: 16; MD4 digest + $rgbUid = substr($recordData, 2, 16); + + // offset: 18; size: 2; tag + $tag = Xls::getUInt2d($recordData, 18); + + // offset: 20; size: 4; size of BLIP in bytes + $size = Xls::getInt4d($recordData, 20); + + // offset: 24; size: 4; number of references to this BLIP + $cRef = Xls::getInt4d($recordData, 24); + + // offset: 28; size: 4; MSOFO file offset + $foDelay = Xls::getInt4d($recordData, 28); + + // offset: 32; size: 1; unused1 + $unused1 = ord($recordData[32]); + + // offset: 33; size: 1; size of nameData in bytes (including null terminator) + $cbName = ord($recordData[33]); + + // offset: 34; size: 1; unused2 + $unused2 = ord($recordData[34]); + + // offset: 35; size: 1; unused3 + $unused3 = ord($recordData[35]); + + // offset: 36; size: $cbName; nameData + $nameData = substr($recordData, 36, $cbName); + + // offset: 36 + $cbName, size: var; the BLIP data + $blipData = substr($recordData, 36 + $cbName); + + // record is a container, read contents + $reader = new self($BSE); + $reader->load($blipData); + } + + /** + * Read BlipJPEG record. Holds raw JPEG image data. + */ + private function readBlipJPEG(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $pos = 0; + + // offset: 0; size: 16; rgbUid1 (MD4 digest of) + $rgbUid1 = substr($recordData, 0, 16); + $pos += 16; + + // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 + if (in_array($recInstance, [0x046B, 0x06E3])) { + $rgbUid2 = substr($recordData, 16, 16); + $pos += 16; + } + + // offset: var; size: 1; tag + $tag = ord($recordData[$pos]); + ++$pos; + + // offset: var; size: var; the raw image data + $data = substr($recordData, $pos); + + $blip = new Blip(); + $blip->setData($data); + + $this->object->setBlip($blip); + } + + /** + * Read BlipPNG record. Holds raw PNG image data. + */ + private function readBlipPNG(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $pos = 0; + + // offset: 0; size: 16; rgbUid1 (MD4 digest of) + $rgbUid1 = substr($recordData, 0, 16); + $pos += 16; + + // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 + if ($recInstance == 0x06E1) { + $rgbUid2 = substr($recordData, 16, 16); + $pos += 16; + } + + // offset: var; size: 1; tag + $tag = ord($recordData[$pos]); + ++$pos; + + // offset: var; size: var; the raw image data + $data = substr($recordData, $pos); + + $blip = new Blip(); + $blip->setData($data); + + $this->object->setBlip($blip); + } + + /** + * Read OPT record. This record may occur within DggContainer record or SpContainer. + */ + private function readOPT(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $this->readOfficeArtRGFOPTE($recordData, $recInstance); + } + + /** + * Read TertiaryOPT record. + */ + private function readTertiaryOPT(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read SplitMenuColors record. + */ + private function readSplitMenuColors(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read DgContainer record (Drawing Container). + */ + private function readDgContainer(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $dgContainer = new DgContainer(); + $this->object->setDgContainer($dgContainer); + $reader = new self($dgContainer); + $escher = $reader->load($recordData); + } + + /** + * Read Dg record (Drawing). + */ + private function readDg(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read SpgrContainer record (Shape Group Container). + */ + private function readSpgrContainer(): void + { + // context is either context DgContainer or SpgrContainer + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $spgrContainer = new SpgrContainer(); + + if ($this->object instanceof DgContainer) { + // DgContainer + $this->object->setSpgrContainer($spgrContainer); + } else { + // SpgrContainer + $this->object->addChild($spgrContainer); + } + + $reader = new self($spgrContainer); + $escher = $reader->load($recordData); + } + + /** + * Read SpContainer record (Shape Container). + */ + private function readSpContainer(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // add spContainer to spgrContainer + $spContainer = new SpContainer(); + $this->object->addChild($spContainer); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $reader = new self($spContainer); + $escher = $reader->load($recordData); + } + + /** + * Read Spgr record (Shape Group). + */ + private function readSpgr(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read Sp record (Shape). + */ + private function readSp(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read ClientTextbox record. + */ + private function readClientTextbox(): void + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read ClientAnchor record. This record holds information about where the shape is anchored in worksheet. + */ + private function readClientAnchor(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // offset: 2; size: 2; upper-left corner column index (0-based) + $c1 = Xls::getUInt2d($recordData, 2); + + // offset: 4; size: 2; upper-left corner horizontal offset in 1/1024 of column width + $startOffsetX = Xls::getUInt2d($recordData, 4); + + // offset: 6; size: 2; upper-left corner row index (0-based) + $r1 = Xls::getUInt2d($recordData, 6); + + // offset: 8; size: 2; upper-left corner vertical offset in 1/256 of row height + $startOffsetY = Xls::getUInt2d($recordData, 8); + + // offset: 10; size: 2; bottom-right corner column index (0-based) + $c2 = Xls::getUInt2d($recordData, 10); + + // offset: 12; size: 2; bottom-right corner horizontal offset in 1/1024 of column width + $endOffsetX = Xls::getUInt2d($recordData, 12); + + // offset: 14; size: 2; bottom-right corner row index (0-based) + $r2 = Xls::getUInt2d($recordData, 14); + + // offset: 16; size: 2; bottom-right corner vertical offset in 1/256 of row height + $endOffsetY = Xls::getUInt2d($recordData, 16); + + // set the start coordinates + $this->object->setStartCoordinates(Coordinate::stringFromColumnIndex($c1 + 1) . ($r1 + 1)); + + // set the start offsetX + $this->object->setStartOffsetX($startOffsetX); + + // set the start offsetY + $this->object->setStartOffsetY($startOffsetY); + + // set the end coordinates + $this->object->setEndCoordinates(Coordinate::stringFromColumnIndex($c2 + 1) . ($r2 + 1)); + + // set the end offsetX + $this->object->setEndOffsetX($endOffsetX); + + // set the end offsetY + $this->object->setEndOffsetY($endOffsetY); + } + + /** + * Read ClientData record. + */ + private function readClientData(): void + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read OfficeArtRGFOPTE table of property-value pairs. + * + * @param string $data Binary data + * @param int $n Number of properties + */ + private function readOfficeArtRGFOPTE($data, $n): void + { + $splicedComplexData = substr($data, 6 * $n); + + // loop through property-value pairs + for ($i = 0; $i < $n; ++$i) { + // read 6 bytes at a time + $fopte = substr($data, 6 * $i, 6); + + // offset: 0; size: 2; opid + $opid = Xls::getUInt2d($fopte, 0); + + // bit: 0-13; mask: 0x3FFF; opid.opid + $opidOpid = (0x3FFF & $opid) >> 0; + + // bit: 14; mask 0x4000; 1 = value in op field is BLIP identifier + $opidFBid = (0x4000 & $opid) >> 14; + + // bit: 15; mask 0x8000; 1 = this is a complex property, op field specifies size of complex data + $opidFComplex = (0x8000 & $opid) >> 15; + + // offset: 2; size: 4; the value for this property + $op = Xls::getInt4d($fopte, 2); + + if ($opidFComplex) { + $complexData = substr($splicedComplexData, 0, $op); + $splicedComplexData = substr($splicedComplexData, $op); + + // we store string value with complex data + $value = $complexData; + } else { + // we store integer value + $value = $op; + } + + $this->object->setOPT($opidOpid, $value); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/MD5.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/MD5.php new file mode 100755 index 0000000..c0417ba --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/MD5.php @@ -0,0 +1,184 @@ +reset(); + } + + /** + * Reset the MD5 stream context. + */ + public function reset(): void + { + $this->a = 0x67452301; + $this->b = 0xEFCDAB89; + $this->c = 0x98BADCFE; + $this->d = 0x10325476; + } + + /** + * Get MD5 stream context. + * + * @return string + */ + public function getContext() + { + $s = ''; + foreach (['a', 'b', 'c', 'd'] as $i) { + $v = $this->{$i}; + $s .= chr($v & 0xff); + $s .= chr(($v >> 8) & 0xff); + $s .= chr(($v >> 16) & 0xff); + $s .= chr(($v >> 24) & 0xff); + } + + return $s; + } + + /** + * Add data to context. + * + * @param string $data Data to add + */ + public function add($data): void + { + $words = array_values(unpack('V16', $data)); + + $A = $this->a; + $B = $this->b; + $C = $this->c; + $D = $this->d; + + $F = ['self', 'f']; + $G = ['self', 'g']; + $H = ['self', 'h']; + $I = ['self', 'i']; + + // ROUND 1 + self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478); + self::step($F, $D, $A, $B, $C, $words[1], 12, 0xe8c7b756); + self::step($F, $C, $D, $A, $B, $words[2], 17, 0x242070db); + self::step($F, $B, $C, $D, $A, $words[3], 22, 0xc1bdceee); + self::step($F, $A, $B, $C, $D, $words[4], 7, 0xf57c0faf); + self::step($F, $D, $A, $B, $C, $words[5], 12, 0x4787c62a); + self::step($F, $C, $D, $A, $B, $words[6], 17, 0xa8304613); + self::step($F, $B, $C, $D, $A, $words[7], 22, 0xfd469501); + self::step($F, $A, $B, $C, $D, $words[8], 7, 0x698098d8); + self::step($F, $D, $A, $B, $C, $words[9], 12, 0x8b44f7af); + self::step($F, $C, $D, $A, $B, $words[10], 17, 0xffff5bb1); + self::step($F, $B, $C, $D, $A, $words[11], 22, 0x895cd7be); + self::step($F, $A, $B, $C, $D, $words[12], 7, 0x6b901122); + self::step($F, $D, $A, $B, $C, $words[13], 12, 0xfd987193); + self::step($F, $C, $D, $A, $B, $words[14], 17, 0xa679438e); + self::step($F, $B, $C, $D, $A, $words[15], 22, 0x49b40821); + + // ROUND 2 + self::step($G, $A, $B, $C, $D, $words[1], 5, 0xf61e2562); + self::step($G, $D, $A, $B, $C, $words[6], 9, 0xc040b340); + self::step($G, $C, $D, $A, $B, $words[11], 14, 0x265e5a51); + self::step($G, $B, $C, $D, $A, $words[0], 20, 0xe9b6c7aa); + self::step($G, $A, $B, $C, $D, $words[5], 5, 0xd62f105d); + self::step($G, $D, $A, $B, $C, $words[10], 9, 0x02441453); + self::step($G, $C, $D, $A, $B, $words[15], 14, 0xd8a1e681); + self::step($G, $B, $C, $D, $A, $words[4], 20, 0xe7d3fbc8); + self::step($G, $A, $B, $C, $D, $words[9], 5, 0x21e1cde6); + self::step($G, $D, $A, $B, $C, $words[14], 9, 0xc33707d6); + self::step($G, $C, $D, $A, $B, $words[3], 14, 0xf4d50d87); + self::step($G, $B, $C, $D, $A, $words[8], 20, 0x455a14ed); + self::step($G, $A, $B, $C, $D, $words[13], 5, 0xa9e3e905); + self::step($G, $D, $A, $B, $C, $words[2], 9, 0xfcefa3f8); + self::step($G, $C, $D, $A, $B, $words[7], 14, 0x676f02d9); + self::step($G, $B, $C, $D, $A, $words[12], 20, 0x8d2a4c8a); + + // ROUND 3 + self::step($H, $A, $B, $C, $D, $words[5], 4, 0xfffa3942); + self::step($H, $D, $A, $B, $C, $words[8], 11, 0x8771f681); + self::step($H, $C, $D, $A, $B, $words[11], 16, 0x6d9d6122); + self::step($H, $B, $C, $D, $A, $words[14], 23, 0xfde5380c); + self::step($H, $A, $B, $C, $D, $words[1], 4, 0xa4beea44); + self::step($H, $D, $A, $B, $C, $words[4], 11, 0x4bdecfa9); + self::step($H, $C, $D, $A, $B, $words[7], 16, 0xf6bb4b60); + self::step($H, $B, $C, $D, $A, $words[10], 23, 0xbebfbc70); + self::step($H, $A, $B, $C, $D, $words[13], 4, 0x289b7ec6); + self::step($H, $D, $A, $B, $C, $words[0], 11, 0xeaa127fa); + self::step($H, $C, $D, $A, $B, $words[3], 16, 0xd4ef3085); + self::step($H, $B, $C, $D, $A, $words[6], 23, 0x04881d05); + self::step($H, $A, $B, $C, $D, $words[9], 4, 0xd9d4d039); + self::step($H, $D, $A, $B, $C, $words[12], 11, 0xe6db99e5); + self::step($H, $C, $D, $A, $B, $words[15], 16, 0x1fa27cf8); + self::step($H, $B, $C, $D, $A, $words[2], 23, 0xc4ac5665); + + // ROUND 4 + self::step($I, $A, $B, $C, $D, $words[0], 6, 0xf4292244); + self::step($I, $D, $A, $B, $C, $words[7], 10, 0x432aff97); + self::step($I, $C, $D, $A, $B, $words[14], 15, 0xab9423a7); + self::step($I, $B, $C, $D, $A, $words[5], 21, 0xfc93a039); + self::step($I, $A, $B, $C, $D, $words[12], 6, 0x655b59c3); + self::step($I, $D, $A, $B, $C, $words[3], 10, 0x8f0ccc92); + self::step($I, $C, $D, $A, $B, $words[10], 15, 0xffeff47d); + self::step($I, $B, $C, $D, $A, $words[1], 21, 0x85845dd1); + self::step($I, $A, $B, $C, $D, $words[8], 6, 0x6fa87e4f); + self::step($I, $D, $A, $B, $C, $words[15], 10, 0xfe2ce6e0); + self::step($I, $C, $D, $A, $B, $words[6], 15, 0xa3014314); + self::step($I, $B, $C, $D, $A, $words[13], 21, 0x4e0811a1); + self::step($I, $A, $B, $C, $D, $words[4], 6, 0xf7537e82); + self::step($I, $D, $A, $B, $C, $words[11], 10, 0xbd3af235); + self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2ad7d2bb); + self::step($I, $B, $C, $D, $A, $words[9], 21, 0xeb86d391); + + $this->a = ($this->a + $A) & 0xffffffff; + $this->b = ($this->b + $B) & 0xffffffff; + $this->c = ($this->c + $C) & 0xffffffff; + $this->d = ($this->d + $D) & 0xffffffff; + } + + private static function f($X, $Y, $Z) + { + return ($X & $Y) | ((~$X) & $Z); // X AND Y OR NOT X AND Z + } + + private static function g($X, $Y, $Z) + { + return ($X & $Z) | ($Y & (~$Z)); // X AND Z OR Y AND NOT Z + } + + private static function h($X, $Y, $Z) + { + return $X ^ $Y ^ $Z; // X XOR Y XOR Z + } + + private static function i($X, $Y, $Z) + { + return $Y ^ ($X | (~$Z)); // Y XOR (X OR NOT Z) + } + + private static function step($func, &$A, $B, $C, $D, $M, $s, $t): void + { + $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff; + $A = self::rotate($A, $s); + $A = ($B + $A) & 0xffffffff; + } + + private static function rotate($decimal, $bits) + { + $binary = str_pad(decbin($decimal), 32, '0', STR_PAD_LEFT); + + return bindec(substr($binary, $bits) . substr($binary, 0, $bits)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/RC4.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/RC4.php new file mode 100755 index 0000000..691aca7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/RC4.php @@ -0,0 +1,61 @@ +i = 0; $this->i < 256; ++$this->i) { + $this->s[$this->i] = $this->i; + } + + $this->j = 0; + for ($this->i = 0; $this->i < 256; ++$this->i) { + $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256; + $t = $this->s[$this->i]; + $this->s[$this->i] = $this->s[$this->j]; + $this->s[$this->j] = $t; + } + $this->i = $this->j = 0; + } + + /** + * Symmetric decryption/encryption function. + * + * @param string $data Data to encrypt/decrypt + * + * @return string + */ + public function RC4($data) + { + $len = strlen($data); + for ($c = 0; $c < $len; ++$c) { + $this->i = ($this->i + 1) % 256; + $this->j = ($this->j + $this->s[$this->i]) % 256; + $t = $this->s[$this->i]; + $this->s[$this->i] = $this->s[$this->j]; + $this->s[$this->j] = $t; + + $t = ($this->s[$this->i] + $this->s[$this->j]) % 256; + + $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]); + } + + return $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/Border.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/Border.php new file mode 100755 index 0000000..91cbe36 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/Border.php @@ -0,0 +1,42 @@ + StyleBorder::BORDER_NONE, + 0x01 => StyleBorder::BORDER_THIN, + 0x02 => StyleBorder::BORDER_MEDIUM, + 0x03 => StyleBorder::BORDER_DASHED, + 0x04 => StyleBorder::BORDER_DOTTED, + 0x05 => StyleBorder::BORDER_THICK, + 0x06 => StyleBorder::BORDER_DOUBLE, + 0x07 => StyleBorder::BORDER_HAIR, + 0x08 => StyleBorder::BORDER_MEDIUMDASHED, + 0x09 => StyleBorder::BORDER_DASHDOT, + 0x0A => StyleBorder::BORDER_MEDIUMDASHDOT, + 0x0B => StyleBorder::BORDER_DASHDOTDOT, + 0x0C => StyleBorder::BORDER_MEDIUMDASHDOTDOT, + 0x0D => StyleBorder::BORDER_SLANTDASHDOT, + ]; + + /** + * Map border style + * OpenOffice documentation: 2.5.11. + * + * @param int $index + * + * @return string + */ + public static function lookup($index) + { + if (isset(self::$map[$index])) { + return self::$map[$index]; + } + + return StyleBorder::BORDER_NONE; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/FillPattern.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/FillPattern.php new file mode 100755 index 0000000..7b85c08 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xls/Style/FillPattern.php @@ -0,0 +1,47 @@ + Fill::FILL_NONE, + 0x01 => Fill::FILL_SOLID, + 0x02 => Fill::FILL_PATTERN_MEDIUMGRAY, + 0x03 => Fill::FILL_PATTERN_DARKGRAY, + 0x04 => Fill::FILL_PATTERN_LIGHTGRAY, + 0x05 => Fill::FILL_PATTERN_DARKHORIZONTAL, + 0x06 => Fill::FILL_PATTERN_DARKVERTICAL, + 0x07 => Fill::FILL_PATTERN_DARKDOWN, + 0x08 => Fill::FILL_PATTERN_DARKUP, + 0x09 => Fill::FILL_PATTERN_DARKGRID, + 0x0A => Fill::FILL_PATTERN_DARKTRELLIS, + 0x0B => Fill::FILL_PATTERN_LIGHTHORIZONTAL, + 0x0C => Fill::FILL_PATTERN_LIGHTVERTICAL, + 0x0D => Fill::FILL_PATTERN_LIGHTDOWN, + 0x0E => Fill::FILL_PATTERN_LIGHTUP, + 0x0F => Fill::FILL_PATTERN_LIGHTGRID, + 0x10 => Fill::FILL_PATTERN_LIGHTTRELLIS, + 0x11 => Fill::FILL_PATTERN_GRAY125, + 0x12 => Fill::FILL_PATTERN_GRAY0625, + ]; + + /** + * Get fill pattern from index + * OpenOffice documentation: 2.5.12. + * + * @param int $index + * + * @return string + */ + public static function lookup($index) + { + if (isset(self::$map[$index])) { + return self::$map[$index]; + } + + return Fill::FILL_NONE; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx.php new file mode 100755 index 0000000..fb7f064 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx.php @@ -0,0 +1,2054 @@ +referenceHelper = ReferenceHelper::getInstance(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + $result = false; + $zip = new ZipArchive(); + + if ($zip->open($pFilename) === true) { + $workbookBasename = $this->getWorkbookBaseName($zip); + $result = !empty($workbookBasename); + + $zip->close(); + } + + return $result; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $worksheetNames = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + // The files we're looking at here are small enough that simpleXML is more efficient than XMLReader + //~ http://schemas.openxmlformats.org/package/2006/relationships"); + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')) + ); + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")) + ); + + if ($xmlWorkbook->sheets) { + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + // Check if sheet should be skipped + $worksheetNames[] = (string) $eleSheet['name']; + } + } + } + } + + $zip->close(); + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($rels->Relationship as $rel) { + if ($rel['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument') { + $dir = dirname($rel['Target']); + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorkbook = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $relsWorkbook->registerXPathNamespace('rel', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $worksheets = []; + foreach ($relsWorkbook->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet') { + $worksheets[(string) $ele['Id']] = $ele['Target']; + } + } + + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, "{$rel['Target']}") + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($xmlWorkbook->sheets) { + $dir = dirname($rel['Target']); + /** @var SimpleXMLElement $eleSheet */ + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + $tmpInfo = [ + 'worksheetName' => (string) $eleSheet['name'], + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id')]; + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile( + 'zip://' . File::realpath($pFilename) . '#' . "$dir/$fileWorksheet" + ), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + $currCells = 0; + while ($xml->read()) { + if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) { + $row = $xml->getAttribute('r'); + $tmpInfo['totalRows'] = $row; + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $currCells = 0; + } elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) { + ++$currCells; + } + } + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $xml->close(); + + $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + + $worksheetInfo[] = $tmpInfo; + } + } + } + } + + $zip->close(); + + return $worksheetInfo; + } + + private static function castToBoolean($c) + { + $value = isset($c->v) ? (string) $c->v : null; + if ($value == '0') { + return false; + } elseif ($value == '1') { + return true; + } + + return (bool) $c->v; + } + + private static function castToError($c) + { + return isset($c->v) ? (string) $c->v : null; + } + + private static function castToString($c) + { + return isset($c->v) ? (string) $c->v : null; + } + + private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType): void + { + $cellDataType = 'f'; + $value = "={$c->f}"; + $calculatedValue = self::$castBaseType($c); + + // Shared formula? + if (isset($c->f['t']) && strtolower((string) $c->f['t']) == 'shared') { + $instance = (string) $c->f['si']; + + if (!isset($sharedFormulas[(string) $c->f['si']])) { + $sharedFormulas[$instance] = ['master' => $r, 'formula' => $value]; + } else { + $master = Coordinate::coordinateFromString($sharedFormulas[$instance]['master']); + $current = Coordinate::coordinateFromString($r); + + $difference = [0, 0]; + $difference[0] = Coordinate::columnIndexFromString($current[0]) - Coordinate::columnIndexFromString($master[0]); + $difference[1] = $current[1] - $master[1]; + + $value = $this->referenceHelper->updateFormulaReferences($sharedFormulas[$instance]['formula'], 'A1', $difference[0], $difference[1]); + } + } + } + + /** + * @param string $fileName + * + * @return string + */ + private function getFromZipArchive(ZipArchive $archive, $fileName = '') + { + // Root-relative paths + if (strpos($fileName, '//') !== false) { + $fileName = substr($fileName, strpos($fileName, '//') + 1); + } + $fileName = File::realpath($fileName); + + // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming + // so we need to load case-insensitively from the zip file + + // Apache POI fixes + $contents = $archive->getFromName($fileName, 0, ZipArchive::FL_NOCASE); + if ($contents === false) { + $contents = $archive->getFromName(substr($fileName, 1), 0, ZipArchive::FL_NOCASE); + } + + return $contents; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + File::assertFile($pFilename); + + // Initialisations + $excel = new Spreadsheet(); + $excel->removeSheetByIndex(0); + if (!$this->readDataOnly) { + $excel->removeCellStyleXfByIndex(0); // remove the default style + $excel->removeCellXfByIndex(0); // remove the default style + } + $unparsedLoadedData = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + // Read the theme first, because we need the colour scheme when reading the styles + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $workbookBasename = $this->getWorkbookBaseName($zip); + $wbRels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "xl/_rels/${workbookBasename}.rels")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($wbRels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme': + $themeOrderArray = ['lt1', 'dk1', 'lt2', 'dk2']; + $themeOrderAdditional = count($themeOrderArray); + + $xmlTheme = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "xl/{$rel['Target']}")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (is_object($xmlTheme)) { + $xmlThemeName = $xmlTheme->attributes(); + $xmlTheme = $xmlTheme->children('http://schemas.openxmlformats.org/drawingml/2006/main'); + $themeName = (string) $xmlThemeName['name']; + + $colourScheme = $xmlTheme->themeElements->clrScheme->attributes(); + $colourSchemeName = (string) $colourScheme['name']; + $colourScheme = $xmlTheme->themeElements->clrScheme->children('http://schemas.openxmlformats.org/drawingml/2006/main'); + + $themeColours = []; + foreach ($colourScheme as $k => $xmlColour) { + $themePos = array_search($k, $themeOrderArray); + if ($themePos === false) { + $themePos = $themeOrderAdditional++; + } + if (isset($xmlColour->sysClr)) { + $xmlColourData = $xmlColour->sysClr->attributes(); + $themeColours[$themePos] = $xmlColourData['lastClr']; + } elseif (isset($xmlColour->srgbClr)) { + $xmlColourData = $xmlColour->srgbClr->attributes(); + $themeColours[$themePos] = $xmlColourData['val']; + } + } + self::$theme = new Xlsx\Theme($themeName, $colourSchemeName, $themeColours); + } + + break; + } + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $propertyReader = new PropertyReader($this->securityScanner, $excel->getProperties()); + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties': + $propertyReader->readCoreProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties': + $propertyReader->readExtendedProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties': + $propertyReader->readCustomProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + //Ribbon + case 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility': + $customUI = $rel['Target']; + if ($customUI !== null) { + $this->readRibbon($excel, $customUI, $zip); + } + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + $dir = dirname($rel['Target']); + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $relsWorkbook->registerXPathNamespace('rel', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $sharedStrings = []; + $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings']")); + if ($xpath) { + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlStrings = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (isset($xmlStrings, $xmlStrings->si)) { + foreach ($xmlStrings->si as $val) { + if (isset($val->t)) { + $sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t); + } elseif (isset($val->r)) { + $sharedStrings[] = $this->parseRichText($val); + } + } + } + } + + $worksheets = []; + $macros = $customUI = null; + foreach ($relsWorkbook->Relationship as $ele) { + switch ($ele['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet': + $worksheets[(string) $ele['Id']] = $ele['Target']; + + break; + // a vbaProject ? (: some macros) + case 'http://schemas.microsoft.com/office/2006/relationships/vbaProject': + $macros = $ele['Target']; + + break; + } + } + + if ($macros !== null) { + $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin + if ($macrosCode !== false) { + $excel->setMacrosCode($macrosCode); + $excel->setHasMacros(true); + //short-circuit : not reading vbaProject.bin.rel to get Signature =>allways vbaProjectSignature.bin in 'xl' dir + $Certificate = $this->getFromZipArchive($zip, 'xl/vbaProjectSignature.bin'); + if ($Certificate !== false) { + $excel->setMacrosCertificate($Certificate); + } + } + } + + $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']")); + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlStyles = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $styles = []; + $cellStyles = []; + $numFmts = null; + if ($xmlStyles && $xmlStyles->numFmts[0]) { + $numFmts = $xmlStyles->numFmts[0]; + } + if (isset($numFmts) && ($numFmts !== null)) { + $numFmts->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + } + if (!$this->readDataOnly && $xmlStyles) { + foreach ($xmlStyles->cellXfs->xf as $xf) { + $numFmt = NumberFormat::FORMAT_GENERAL; + + if ($xf['numFmtId']) { + if (isset($numFmts)) { + $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); + + if (isset($tmpNumFmt['formatCode'])) { + $numFmt = (string) $tmpNumFmt['formatCode']; + } + } + + // We shouldn't override any of the built-in MS Excel values (values below id 164) + // But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used + // So we make allowance for them rather than lose formatting masks + if ((int) $xf['numFmtId'] < 164 && + NumberFormat::builtInFormatCode((int) $xf['numFmtId']) !== '') { + $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']); + } + } + $quotePrefix = false; + if (isset($xf['quotePrefix'])) { + $quotePrefix = (bool) $xf['quotePrefix']; + } + + $style = (object) [ + 'numFmt' => $numFmt, + 'font' => $xmlStyles->fonts->font[(int) ($xf['fontId'])], + 'fill' => $xmlStyles->fills->fill[(int) ($xf['fillId'])], + 'border' => $xmlStyles->borders->border[(int) ($xf['borderId'])], + 'alignment' => $xf->alignment, + 'protection' => $xf->protection, + 'quotePrefix' => $quotePrefix, + ]; + $styles[] = $style; + + // add style to cellXf collection + $objStyle = new Style(); + self::readStyle($objStyle, $style); + $excel->addCellXf($objStyle); + } + + foreach (isset($xmlStyles->cellStyleXfs->xf) ? $xmlStyles->cellStyleXfs->xf : [] as $xf) { + $numFmt = NumberFormat::FORMAT_GENERAL; + if ($numFmts && $xf['numFmtId']) { + $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); + if (isset($tmpNumFmt['formatCode'])) { + $numFmt = (string) $tmpNumFmt['formatCode']; + } elseif ((int) $xf['numFmtId'] < 165) { + $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']); + } + } + + $cellStyle = (object) [ + 'numFmt' => $numFmt, + 'font' => $xmlStyles->fonts->font[(int) ($xf['fontId'])], + 'fill' => $xmlStyles->fills->fill[(int) ($xf['fillId'])], + 'border' => $xmlStyles->borders->border[(int) ($xf['borderId'])], + 'alignment' => $xf->alignment, + 'protection' => $xf->protection, + 'quotePrefix' => $quotePrefix, + ]; + $cellStyles[] = $cellStyle; + + // add style to cellStyleXf collection + $objStyle = new Style(); + self::readStyle($objStyle, $cellStyle); + $excel->addCellStyleXf($objStyle); + } + } + + $styleReader = new Styles($xmlStyles); + $styleReader->setStyleBaseData(self::$theme, $styles, $cellStyles); + $dxfs = $styleReader->dxfs($this->readDataOnly); + $styles = $styleReader->styles(); + + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Set base date + if ($xmlWorkbook->workbookPr) { + Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); + if (isset($xmlWorkbook->workbookPr['date1904'])) { + if (self::boolean((string) $xmlWorkbook->workbookPr['date1904'])) { + Date::setExcelCalendar(Date::CALENDAR_MAC_1904); + } + } + } + + // Set protection + $this->readProtection($excel, $xmlWorkbook); + + $sheetId = 0; // keep track of new sheet id in final workbook + $oldSheetId = -1; // keep track of old sheet id in final workbook + $countSkippedSheets = 0; // keep track of number of skipped sheets + $mapSheetId = []; // mapping of sheet ids from old to new + + $charts = $chartDetails = []; + + if ($xmlWorkbook->sheets) { + /** @var SimpleXMLElement $eleSheet */ + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + ++$oldSheetId; + + // Check if sheet should be skipped + if (isset($this->loadSheetsOnly) && !in_array((string) $eleSheet['name'], $this->loadSheetsOnly)) { + ++$countSkippedSheets; + $mapSheetId[$oldSheetId] = null; + + continue; + } + + // Map old sheet id in original workbook to new sheet id. + // They will differ if loadSheetsOnly() is being used + $mapSheetId[$oldSheetId] = $oldSheetId - $countSkippedSheets; + + // Load sheet + $docSheet = $excel->createSheet(); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet + // references in formula cells... during the load, all formulae should be correct, + // and we're simply bringing the worksheet name in line with the formula, not the + // reverse + $docSheet->setTitle((string) $eleSheet['name'], false, false); + $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id')]; + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlSheet = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$fileWorksheet")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $sharedFormulas = []; + + if (isset($eleSheet['state']) && (string) $eleSheet['state'] != '') { + $docSheet->setSheetState((string) $eleSheet['state']); + } + + if ($xmlSheet) { + if (isset($xmlSheet->sheetViews, $xmlSheet->sheetViews->sheetView)) { + $sheetViews = new SheetViews($xmlSheet->sheetViews->sheetView, $docSheet); + $sheetViews->load(); + } + + $sheetViewOptions = new SheetViewOptions($docSheet, $xmlSheet); + $sheetViewOptions->load($this->getReadDataOnly()); + + (new ColumnAndRowAttributes($docSheet, $xmlSheet)) + ->load($this->getReadFilter(), $this->getReadDataOnly()); + } + + if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) { + $cIndex = 1; // Cell Start from 1 + foreach ($xmlSheet->sheetData->row as $row) { + $rowIndex = 1; + foreach ($row->c as $c) { + $r = (string) $c['r']; + if ($r == '') { + $r = Coordinate::stringFromColumnIndex($rowIndex) . $cIndex; + } + $cellDataType = (string) $c['t']; + $value = null; + $calculatedValue = null; + + // Read cell? + if ($this->getReadFilter() !== null) { + $coordinates = Coordinate::coordinateFromString($r); + + if (!$this->getReadFilter()->readCell($coordinates[0], (int) $coordinates[1], $docSheet->getTitle())) { + ++$rowIndex; + + continue; + } + } + + // Read cell! + switch ($cellDataType) { + case 's': + if ((string) $c->v != '') { + $value = $sharedStrings[(int) ($c->v)]; + + if ($value instanceof RichText) { + $value = clone $value; + } + } else { + $value = ''; + } + + break; + case 'b': + if (!isset($c->f)) { + $value = self::castToBoolean($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToBoolean'); + if (isset($c->f['t'])) { + $att = $c->f; + $docSheet->getCell($r)->setFormulaAttributes($att); + } + } + + break; + case 'inlineStr': + if (isset($c->f)) { + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + } else { + $value = $this->parseRichText($c->is); + } + + break; + case 'e': + if (!isset($c->f)) { + $value = self::castToError($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + } + + break; + default: + if (!isset($c->f)) { + $value = self::castToString($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToString'); + } + + break; + } + + // read empty cells or the cells are not empty + if ($this->readEmptyCells || ($value !== null && $value !== '')) { + // Rich text? + if ($value instanceof RichText && $this->readDataOnly) { + $value = $value->getPlainText(); + } + + $cell = $docSheet->getCell($r); + // Assign value + if ($cellDataType != '') { + $cell->setValueExplicit($value, $cellDataType); + } else { + $cell->setValue($value); + } + if ($calculatedValue !== null) { + $cell->setCalculatedValue($calculatedValue); + } + + // Style information? + if ($c['s'] && !$this->readDataOnly) { + // no style index means 0, it seems + $cell->setXfIndex(isset($styles[(int) ($c['s'])]) ? + (int) ($c['s']) : 0); + } + } + ++$rowIndex; + } + ++$cIndex; + } + } + + if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { + (new ConditionalStyles($docSheet, $xmlSheet, $dxfs))->load(); + } + + $aKeys = ['sheet', 'objects', 'scenarios', 'formatCells', 'formatColumns', 'formatRows', 'insertColumns', 'insertRows', 'insertHyperlinks', 'deleteColumns', 'deleteRows', 'selectLockedCells', 'sort', 'autoFilter', 'pivotTables', 'selectUnlockedCells']; + if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) { + foreach ($aKeys as $key) { + $method = 'set' . ucfirst($key); + $docSheet->getProtection()->$method(self::boolean((string) $xmlSheet->sheetProtection[$key])); + } + } + + if ($xmlSheet) { + $this->readSheetProtection($docSheet, $xmlSheet); + } + + if ($xmlSheet && $xmlSheet->autoFilter && !$this->readDataOnly) { + (new AutoFilter($docSheet, $xmlSheet))->load(); + } + + if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->readDataOnly) { + foreach ($xmlSheet->mergeCells->mergeCell as $mergeCell) { + $mergeRef = (string) $mergeCell['ref']; + if (strpos($mergeRef, ':') !== false) { + $docSheet->mergeCells((string) $mergeCell['ref']); + } + } + } + + if ($xmlSheet && !$this->readDataOnly) { + $unparsedLoadedData = (new PageSetup($docSheet, $xmlSheet))->load($unparsedLoadedData); + } + + if ($xmlSheet && $xmlSheet->dataValidations && !$this->readDataOnly) { + (new DataValidations($docSheet, $xmlSheet))->load(); + } + + // unparsed sheet AlternateContent + if ($xmlSheet && !$this->readDataOnly) { + $mc = $xmlSheet->children('http://schemas.openxmlformats.org/markup-compatibility/2006'); + if ($mc->AlternateContent) { + foreach ($mc->AlternateContent as $alternateContent) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['AlternateContents'][] = $alternateContent->asXML(); + } + } + } + + // Add hyperlinks + if (!$this->readDataOnly) { + $hyperlinkReader = new Hyperlinks($docSheet); + // Locate hyperlink relations + $relationsFileName = dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels'; + if ($zip->locateName($relationsFileName)) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, $relationsFileName) + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $hyperlinkReader->readHyperlinks($relsWorksheet); + } + + // Loop through hyperlinks + if ($xmlSheet && $xmlSheet->hyperlinks) { + $hyperlinkReader->setHyperlinks($xmlSheet->hyperlinks); + } + } + + // Add comments + $comments = []; + $vmlComments = []; + if (!$this->readDataOnly) { + // Locate comment relations + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments') { + $comments[(string) $ele['Id']] = (string) $ele['Target']; + } + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing') { + $vmlComments[(string) $ele['Id']] = (string) $ele['Target']; + } + } + } + + // Loop through comments + foreach ($comments as $relName => $relPath) { + // Load comments file + $relPath = File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath); + $commentsFile = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Utility variables + $authors = []; + + // Loop through authors + foreach ($commentsFile->authors->author as $author) { + $authors[] = (string) $author; + } + + // Loop through contents + foreach ($commentsFile->commentList->comment as $comment) { + if (!empty($comment['authorId'])) { + $docSheet->getComment((string) $comment['ref'])->setAuthor($authors[(string) $comment['authorId']]); + } + $docSheet->getComment((string) $comment['ref'])->setText($this->parseRichText($comment->text)); + } + } + + // later we will remove from it real vmlComments + $unparsedVmlDrawings = $vmlComments; + + // Loop through VML comments + foreach ($vmlComments as $relName => $relPath) { + // Load VML comments file + $relPath = File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath); + + try { + $vmlCommentsFile = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + } catch (Throwable $ex) { + //Ignore unparsable vmlDrawings. Later they will be moved from $unparsedVmlDrawings to $unparsedLoadedData + continue; + } + + $shapes = $vmlCommentsFile->xpath('//v:shape'); + foreach ($shapes as $shape) { + $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + + if (isset($shape['style'])) { + $style = (string) $shape['style']; + $fillColor = strtoupper(substr((string) $shape['fillcolor'], 1)); + $column = null; + $row = null; + + $clientData = $shape->xpath('.//x:ClientData'); + if (is_array($clientData) && !empty($clientData)) { + $clientData = $clientData[0]; + + if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') { + $temp = $clientData->xpath('.//x:Row'); + if (is_array($temp)) { + $row = $temp[0]; + } + + $temp = $clientData->xpath('.//x:Column'); + if (is_array($temp)) { + $column = $temp[0]; + } + } + } + + if (($column !== null) && ($row !== null)) { + // Set comment properties + $comment = $docSheet->getCommentByColumnAndRow($column + 1, $row + 1); + $comment->getFillColor()->setRGB($fillColor); + + // Parse style + $styleArray = explode(';', str_replace(' ', '', $style)); + foreach ($styleArray as $stylePair) { + $stylePair = explode(':', $stylePair); + + if ($stylePair[0] == 'margin-left') { + $comment->setMarginLeft($stylePair[1]); + } + if ($stylePair[0] == 'margin-top') { + $comment->setMarginTop($stylePair[1]); + } + if ($stylePair[0] == 'width') { + $comment->setWidth($stylePair[1]); + } + if ($stylePair[0] == 'height') { + $comment->setHeight($stylePair[1]); + } + if ($stylePair[0] == 'visibility') { + $comment->setVisible($stylePair[1] == 'visible'); + } + } + + unset($unparsedVmlDrawings[$relName]); + } + } + } + } + + // unparsed vmlDrawing + if ($unparsedVmlDrawings) { + foreach ($unparsedVmlDrawings as $rId => $relPath) { + $rId = substr($rId, 3); // rIdXXX + $unparsedVmlDrawing = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['vmlDrawings']; + $unparsedVmlDrawing[$rId] = []; + $unparsedVmlDrawing[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $relPath); + $unparsedVmlDrawing[$rId]['relFilePath'] = $relPath; + $unparsedVmlDrawing[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedVmlDrawing[$rId]['filePath'])); + unset($unparsedVmlDrawing); + } + } + + // Header/footer images + if ($xmlSheet && $xmlSheet->legacyDrawingHF && !$this->readDataOnly) { + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlRelationship = ''; + + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing') { + $vmlRelationship = self::dirAdd("$dir/$fileWorksheet", $ele['Target']); + } + } + + if ($vmlRelationship != '') { + // Fetch linked images + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsVML = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $drawings = []; + if (isset($relsVML->Relationship)) { + foreach ($relsVML->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + $drawings[(string) $ele['Id']] = self::dirAdd($vmlRelationship, $ele['Target']); + } + } + } + // Fetch VML document + $vmlDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $vmlRelationship)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlDrawing->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + + $hfImages = []; + + $shapes = $vmlDrawing->xpath('//v:shape'); + foreach ($shapes as $idx => $shape) { + $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + $imageData = $shape->xpath('//v:imagedata'); + + if (!$imageData) { + continue; + } + + $imageData = $imageData[$idx]; + + $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); + $style = self::toCSSArray((string) $shape['style']); + + $hfImages[(string) $shape['id']] = new HeaderFooterDrawing(); + if (isset($imageData['title'])) { + $hfImages[(string) $shape['id']]->setName((string) $imageData['title']); + } + + $hfImages[(string) $shape['id']]->setPath('zip://' . File::realpath($pFilename) . '#' . $drawings[(string) $imageData['relid']], false); + $hfImages[(string) $shape['id']]->setResizeProportional(false); + $hfImages[(string) $shape['id']]->setWidth($style['width']); + $hfImages[(string) $shape['id']]->setHeight($style['height']); + if (isset($style['margin-left'])) { + $hfImages[(string) $shape['id']]->setOffsetX($style['margin-left']); + } + $hfImages[(string) $shape['id']]->setOffsetY($style['margin-top']); + $hfImages[(string) $shape['id']]->setResizeProportional(true); + } + + $docSheet->getHeaderFooter()->setImages($hfImages); + } + } + } + } + + // TODO: Autoshapes from twoCellAnchors! + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $drawings = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing') { + $drawings[(string) $ele['Id']] = self::dirAdd("$dir/$fileWorksheet", $ele['Target']); + } + } + if ($xmlSheet->drawing && !$this->readDataOnly) { + $unparsedDrawings = []; + foreach ($xmlSheet->drawing as $drawing) { + $drawingRelId = (string) self::getArrayItem($drawing->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id'); + $fileDrawing = $drawings[$drawingRelId]; + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsDrawing = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname($fileDrawing) . '/_rels/' . basename($fileDrawing) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $images = []; + $hyperlinks = []; + if ($relsDrawing && $relsDrawing->Relationship) { + foreach ($relsDrawing->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { + $hyperlinks[(string) $ele['Id']] = (string) $ele['Target']; + } + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + $images[(string) $ele['Id']] = self::dirAdd($fileDrawing, $ele['Target']); + } elseif ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart') { + if ($this->includeCharts) { + $charts[self::dirAdd($fileDrawing, $ele['Target'])] = [ + 'id' => (string) $ele['Id'], + 'sheet' => $docSheet->getTitle(), + ]; + } + } + } + } + $xmlDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $fileDrawing)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $xmlDrawingChildren = $xmlDrawing->children('http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + + if ($xmlDrawingChildren->oneCellAnchor) { + foreach ($xmlDrawingChildren->oneCellAnchor as $oneCellAnchor) { + if ($oneCellAnchor->pic->blipFill) { + /** @var SimpleXMLElement $blip */ + $blip = $oneCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; + /** @var SimpleXMLElement $xfrm */ + $xfrm = $oneCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->xfrm; + /** @var SimpleXMLElement $outerShdw */ + $outerShdw = $oneCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->effectLst->outerShdw; + /** @var SimpleXMLElement $hlinkClick */ + $hlinkClick = $oneCellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + + $objDrawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing(); + $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name')); + $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr')); + $objDrawing->setPath( + 'zip://' . File::realpath($pFilename) . '#' . + $images[(string) self::getArrayItem( + $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), + 'embed' + )], + false + ); + $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((string) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1)); + $objDrawing->setOffsetX(Drawing::EMUToPixels($oneCellAnchor->from->colOff)); + $objDrawing->setOffsetY(Drawing::EMUToPixels($oneCellAnchor->from->rowOff)); + $objDrawing->setResizeProportional(false); + $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cx'))); + $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cy'))); + if ($xfrm) { + $objDrawing->setRotation(Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), 'rot'))); + } + if ($outerShdw) { + $shadow = $objDrawing->getShadow(); + $shadow->setVisible(true); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); + $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); + } + + $this->readHyperLinkDrawing($objDrawing, $oneCellAnchor, $hyperlinks); + + $objDrawing->setWorksheet($docSheet); + } else { + // ? Can charts be positioned with a oneCellAnchor ? + $coordinates = Coordinate::stringFromColumnIndex(((string) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1); + $offsetX = Drawing::EMUToPixels($oneCellAnchor->from->colOff); + $offsetY = Drawing::EMUToPixels($oneCellAnchor->from->rowOff); + $width = Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cx')); + $height = Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cy')); + } + } + } + if ($xmlDrawingChildren->twoCellAnchor) { + foreach ($xmlDrawingChildren->twoCellAnchor as $twoCellAnchor) { + if ($twoCellAnchor->pic->blipFill) { + $blip = $twoCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; + $xfrm = $twoCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->xfrm; + $outerShdw = $twoCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->effectLst->outerShdw; + $hlinkClick = $twoCellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + $objDrawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing(); + $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name')); + $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr')); + $objDrawing->setPath( + 'zip://' . File::realpath($pFilename) . '#' . + $images[(string) self::getArrayItem( + $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), + 'embed' + )], + false + ); + $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1)); + $objDrawing->setOffsetX(Drawing::EMUToPixels($twoCellAnchor->from->colOff)); + $objDrawing->setOffsetY(Drawing::EMUToPixels($twoCellAnchor->from->rowOff)); + $objDrawing->setResizeProportional(false); + + if ($xfrm) { + $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), 'cx'))); + $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), 'cy'))); + $objDrawing->setRotation(Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), 'rot'))); + } + if ($outerShdw) { + $shadow = $objDrawing->getShadow(); + $shadow->setVisible(true); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); + $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); + } + + $this->readHyperLinkDrawing($objDrawing, $twoCellAnchor, $hyperlinks); + + $objDrawing->setWorksheet($docSheet); + } elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) { + $fromCoordinate = Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1); + $fromOffsetX = Drawing::EMUToPixels($twoCellAnchor->from->colOff); + $fromOffsetY = Drawing::EMUToPixels($twoCellAnchor->from->rowOff); + $toCoordinate = Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->to->col) + 1) . ($twoCellAnchor->to->row + 1); + $toOffsetX = Drawing::EMUToPixels($twoCellAnchor->to->colOff); + $toOffsetY = Drawing::EMUToPixels($twoCellAnchor->to->rowOff); + $graphic = $twoCellAnchor->graphicFrame->children('http://schemas.openxmlformats.org/drawingml/2006/main')->graphic; + /** @var SimpleXMLElement $chartRef */ + $chartRef = $graphic->graphicData->children('http://schemas.openxmlformats.org/drawingml/2006/chart')->chart; + $thisChart = (string) $chartRef->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [ + 'fromCoordinate' => $fromCoordinate, + 'fromOffsetX' => $fromOffsetX, + 'fromOffsetY' => $fromOffsetY, + 'toCoordinate' => $toCoordinate, + 'toOffsetX' => $toOffsetX, + 'toOffsetY' => $toOffsetY, + 'worksheetTitle' => $docSheet->getTitle(), + ]; + } + } + } + if ($relsDrawing === false && $xmlDrawing->count() == 0) { + // Save Drawing without rels and children as unparsed + $unparsedDrawings[$drawingRelId] = $xmlDrawing->asXML(); + } + } + + // store original rId of drawing files + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'] = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing') { + $drawingRelId = (string) $ele['Id']; + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'][(string) $ele['Target']] = $drawingRelId; + if (isset($unparsedDrawings[$drawingRelId])) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['Drawings'][$drawingRelId] = $unparsedDrawings[$drawingRelId]; + } + } + } + + // unparsed drawing AlternateContent + $xmlAltDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $fileDrawing)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + )->children('http://schemas.openxmlformats.org/markup-compatibility/2006'); + + if ($xmlAltDrawing->AlternateContent) { + foreach ($xmlAltDrawing->AlternateContent as $alternateContent) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingAlternateContents'][] = $alternateContent->asXML(); + } + } + } + } + + $this->readFormControlProperties($excel, $zip, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData); + $this->readPrinterSettings($excel, $zip, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData); + + // Loop through definedNames + if ($xmlWorkbook->definedNames) { + foreach ($xmlWorkbook->definedNames->definedName as $definedName) { + // Extract range + $extractedRange = (string) $definedName; + if (($spos = strpos($extractedRange, '!')) !== false) { + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); + } else { + $extractedRange = str_replace('$', '', $extractedRange); + } + + // Valid range? + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { + continue; + } + + // Some definedNames are only applicable if we are on the same sheet... + if ((string) $definedName['localSheetId'] != '' && (string) $definedName['localSheetId'] == $oldSheetId) { + // Switch on type + switch ((string) $definedName['name']) { + case '_xlnm._FilterDatabase': + if ((string) $definedName['hidden'] !== '1') { + $extractedRange = explode(',', $extractedRange); + foreach ($extractedRange as $range) { + $autoFilterRange = $range; + if (strpos($autoFilterRange, ':') !== false) { + $docSheet->getAutoFilter()->setRange($autoFilterRange); + } + } + } + + break; + case '_xlnm.Print_Titles': + // Split $extractedRange + $extractedRange = explode(',', $extractedRange); + + // Set print titles + foreach ($extractedRange as $range) { + $matches = []; + $range = str_replace('$', '', $range); + + // check for repeating columns, e g. 'A:A' or 'A:D' + if (preg_match('/!?([A-Z]+)\:([A-Z]+)$/', $range, $matches)) { + $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$matches[1], $matches[2]]); + } elseif (preg_match('/!?(\d+)\:(\d+)$/', $range, $matches)) { + // check for repeating rows, e.g. '1:1' or '1:5' + $docSheet->getPageSetup()->setRowsToRepeatAtTop([$matches[1], $matches[2]]); + } + } + + break; + case '_xlnm.Print_Area': + $rangeSets = preg_split("/('?(?:.*?)'?(?:![A-Z0-9]+:[A-Z0-9]+)),?/", $extractedRange, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $newRangeSets = []; + foreach ($rangeSets as $rangeSet) { + [$sheetName, $rangeSet] = Worksheet::extractSheetTitle($rangeSet, true); + if (strpos($rangeSet, ':') === false) { + $rangeSet = $rangeSet . ':' . $rangeSet; + } + $newRangeSets[] = str_replace('$', '', $rangeSet); + } + $docSheet->getPageSetup()->setPrintArea(implode(',', $newRangeSets)); + + break; + default: + break; + } + } + } + } + + // Next sheet id + ++$sheetId; + } + + // Loop through definedNames + if ($xmlWorkbook->definedNames) { + foreach ($xmlWorkbook->definedNames->definedName as $definedName) { + // Extract range + $extractedRange = (string) $definedName; + if (($spos = strpos($extractedRange, '!')) !== false) { + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); + } else { + $extractedRange = str_replace('$', '', $extractedRange); + } + + // Valid range? + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { + continue; + } + + // Some definedNames are only applicable if we are on the same sheet... + if ((string) $definedName['localSheetId'] != '') { + // Local defined name + // Switch on type + switch ((string) $definedName['name']) { + case '_xlnm._FilterDatabase': + case '_xlnm.Print_Titles': + case '_xlnm.Print_Area': + break; + default: + if ($mapSheetId[(int) $definedName['localSheetId']] !== null) { + if (strpos((string) $definedName, '!') !== false) { + $range = Worksheet::extractSheetTitle((string) $definedName, true); + $range[0] = str_replace("''", "'", $range[0]); + $range[0] = str_replace("'", '', $range[0]); + if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) { + $extractedRange = str_replace('$', '', $range[1]); + $scope = $docSheet->getParent()->getSheet($mapSheetId[(int) $definedName['localSheetId']]); + $excel->addNamedRange(new NamedRange((string) $definedName['name'], $worksheet, $extractedRange, true, $scope)); + } + } + } + + break; + } + } elseif (!isset($definedName['localSheetId'])) { + // "Global" definedNames + $locatedSheet = null; + $extractedSheetName = ''; + if (strpos((string) $definedName, '!') !== false) { + // Extract sheet name + $extractedSheetName = Worksheet::extractSheetTitle((string) $definedName, true); + $extractedSheetName = trim($extractedSheetName[0], "'"); + + // Locate sheet + $locatedSheet = $excel->getSheetByName($extractedSheetName); + + // Modify range + [$worksheetName, $extractedRange] = Worksheet::extractSheetTitle($extractedRange, true); + } + + if ($locatedSheet !== null) { + $excel->addNamedRange(new NamedRange((string) $definedName['name'], $locatedSheet, $extractedRange, false)); + } + } + } + } + } + + if ((!$this->readDataOnly || !empty($this->loadSheetsOnly)) && isset($xmlWorkbook->bookViews->workbookView)) { + $workbookView = $xmlWorkbook->bookViews->workbookView; + + // active sheet index + $activeTab = (int) ($workbookView['activeTab']); // refers to old sheet index + + // keep active sheet index if sheet is still loaded, else first sheet is set as the active + if (isset($mapSheetId[$activeTab]) && $mapSheetId[$activeTab] !== null) { + $excel->setActiveSheetIndex($mapSheetId[$activeTab]); + } else { + if ($excel->getSheetCount() == 0) { + $excel->createSheet(); + } + $excel->setActiveSheetIndex(0); + } + + if (isset($workbookView['showHorizontalScroll'])) { + $showHorizontalScroll = (string) $workbookView['showHorizontalScroll']; + $excel->setShowHorizontalScroll($this->castXsdBooleanToBool($showHorizontalScroll)); + } + + if (isset($workbookView['showVerticalScroll'])) { + $showVerticalScroll = (string) $workbookView['showVerticalScroll']; + $excel->setShowVerticalScroll($this->castXsdBooleanToBool($showVerticalScroll)); + } + + if (isset($workbookView['showSheetTabs'])) { + $showSheetTabs = (string) $workbookView['showSheetTabs']; + $excel->setShowSheetTabs($this->castXsdBooleanToBool($showSheetTabs)); + } + + if (isset($workbookView['minimized'])) { + $minimized = (string) $workbookView['minimized']; + $excel->setMinimized($this->castXsdBooleanToBool($minimized)); + } + + if (isset($workbookView['autoFilterDateGrouping'])) { + $autoFilterDateGrouping = (string) $workbookView['autoFilterDateGrouping']; + $excel->setAutoFilterDateGrouping($this->castXsdBooleanToBool($autoFilterDateGrouping)); + } + + if (isset($workbookView['firstSheet'])) { + $firstSheet = (string) $workbookView['firstSheet']; + $excel->setFirstSheetIndex((int) $firstSheet); + } + + if (isset($workbookView['visibility'])) { + $visibility = (string) $workbookView['visibility']; + $excel->setVisibility($visibility); + } + + if (isset($workbookView['tabRatio'])) { + $tabRatio = (string) $workbookView['tabRatio']; + $excel->setTabRatio((int) $tabRatio); + } + } + + break; + } + } + + if (!$this->readDataOnly) { + $contentTypes = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, '[Content_Types].xml') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Default content types + foreach ($contentTypes->Default as $contentType) { + switch ($contentType['ContentType']) { + case 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings': + $unparsedLoadedData['default_content_types'][(string) $contentType['Extension']] = (string) $contentType['ContentType']; + + break; + } + } + + // Override content types + foreach ($contentTypes->Override as $contentType) { + switch ($contentType['ContentType']) { + case 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml': + if ($this->includeCharts) { + $chartEntryRef = ltrim($contentType['PartName'], '/'); + $chartElements = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, $chartEntryRef) + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $objChart = Chart::readChart($chartElements, basename($chartEntryRef, '.xml')); + + if (isset($charts[$chartEntryRef])) { + $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id']; + if (isset($chartDetails[$chartPositionRef])) { + $excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart); + $objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet'])); + $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']); + $objChart->setBottomRightPosition($chartDetails[$chartPositionRef]['toCoordinate'], $chartDetails[$chartPositionRef]['toOffsetX'], $chartDetails[$chartPositionRef]['toOffsetY']); + } + } + } + + break; + + // unparsed + case 'application/vnd.ms-excel.controlproperties+xml': + $unparsedLoadedData['override_content_types'][(string) $contentType['PartName']] = (string) $contentType['ContentType']; + + break; + } + } + } + + $excel->setUnparsedLoadedData($unparsedLoadedData); + + $zip->close(); + + return $excel; + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } elseif (isset($color['theme'])) { + if (self::$theme !== null) { + $returnColour = self::$theme->getColourByIndex((int) $color['theme']); + if (isset($color['tint'])) { + $tintAdjust = (float) $color['tint']; + $returnColour = Color::changeBrightness($returnColour, $tintAdjust); + } + + return 'FF' . $returnColour; + } + } + + if ($background) { + return 'FFFFFFFF'; + } + + return 'FF000000'; + } + + /** + * @param SimpleXMLElement|stdClass $style + */ + private static function readStyle(Style $docStyle, $style): void + { + $docStyle->getNumberFormat()->setFormatCode($style->numFmt); + + // font + if (isset($style->font)) { + $docStyle->getFont()->setName((string) $style->font->name['val']); + $docStyle->getFont()->setSize((string) $style->font->sz['val']); + if (isset($style->font->b)) { + $docStyle->getFont()->setBold(!isset($style->font->b['val']) || self::boolean((string) $style->font->b['val'])); + } + if (isset($style->font->i)) { + $docStyle->getFont()->setItalic(!isset($style->font->i['val']) || self::boolean((string) $style->font->i['val'])); + } + if (isset($style->font->strike)) { + $docStyle->getFont()->setStrikethrough(!isset($style->font->strike['val']) || self::boolean((string) $style->font->strike['val'])); + } + $docStyle->getFont()->getColor()->setARGB(self::readColor($style->font->color)); + + if (isset($style->font->u) && !isset($style->font->u['val'])) { + $docStyle->getFont()->setUnderline(\PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); + } elseif (isset($style->font->u, $style->font->u['val'])) { + $docStyle->getFont()->setUnderline((string) $style->font->u['val']); + } + + if (isset($style->font->vertAlign, $style->font->vertAlign['val'])) { + $vertAlign = strtolower((string) $style->font->vertAlign['val']); + if ($vertAlign == 'superscript') { + $docStyle->getFont()->setSuperscript(true); + } + if ($vertAlign == 'subscript') { + $docStyle->getFont()->setSubscript(true); + } + } + } + + // fill + if (isset($style->fill)) { + if ($style->fill->gradientFill) { + /** @var SimpleXMLElement $gradientFill */ + $gradientFill = $style->fill->gradientFill[0]; + if (!empty($gradientFill['type'])) { + $docStyle->getFill()->setFillType((string) $gradientFill['type']); + } + $docStyle->getFill()->setRotation((float) ($gradientFill['degree'])); + $gradientFill->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $docStyle->getFill()->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); + $docStyle->getFill()->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); + } elseif ($style->fill->patternFill) { + $patternType = (string) $style->fill->patternFill['patternType'] != '' ? (string) $style->fill->patternFill['patternType'] : 'solid'; + $docStyle->getFill()->setFillType($patternType); + if ($style->fill->patternFill->fgColor) { + $docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true)); + } + if ($style->fill->patternFill->bgColor) { + $docStyle->getFill()->getEndColor()->setARGB(self::readColor($style->fill->patternFill->bgColor, true)); + } + } + } + + // border + if (isset($style->border)) { + $diagonalUp = self::boolean((string) $style->border['diagonalUp']); + $diagonalDown = self::boolean((string) $style->border['diagonalDown']); + if (!$diagonalUp && !$diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp && !$diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif (!$diagonalUp && $diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } else { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + self::readBorder($docStyle->getBorders()->getLeft(), $style->border->left); + self::readBorder($docStyle->getBorders()->getRight(), $style->border->right); + self::readBorder($docStyle->getBorders()->getTop(), $style->border->top); + self::readBorder($docStyle->getBorders()->getBottom(), $style->border->bottom); + self::readBorder($docStyle->getBorders()->getDiagonal(), $style->border->diagonal); + } + + // alignment + if (isset($style->alignment)) { + $docStyle->getAlignment()->setHorizontal((string) $style->alignment['horizontal']); + $docStyle->getAlignment()->setVertical((string) $style->alignment['vertical']); + + $textRotation = 0; + if ((int) $style->alignment['textRotation'] <= 90) { + $textRotation = (int) $style->alignment['textRotation']; + } elseif ((int) $style->alignment['textRotation'] > 90) { + $textRotation = 90 - (int) $style->alignment['textRotation']; + } + + $docStyle->getAlignment()->setTextRotation((int) $textRotation); + $docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment['wrapText'])); + $docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment['shrinkToFit'])); + $docStyle->getAlignment()->setIndent((int) ((string) $style->alignment['indent']) > 0 ? (int) ((string) $style->alignment['indent']) : 0); + $docStyle->getAlignment()->setReadOrder((int) ((string) $style->alignment['readingOrder']) > 0 ? (int) ((string) $style->alignment['readingOrder']) : 0); + } + + // protection + if (isset($style->protection)) { + if (isset($style->protection['locked'])) { + if (self::boolean((string) $style->protection['locked'])) { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED); + } + } + + if (isset($style->protection['hidden'])) { + if (self::boolean((string) $style->protection['hidden'])) { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED); + } + } + } + + // top-level style settings + if (isset($style->quotePrefix)) { + $docStyle->setQuotePrefix($style->quotePrefix); + } + } + + /** + * @param SimpleXMLElement $eleBorder + */ + private static function readBorder(Border $docBorder, $eleBorder): void + { + if (isset($eleBorder['style'])) { + $docBorder->setBorderStyle((string) $eleBorder['style']); + } + if (isset($eleBorder->color)) { + $docBorder->getColor()->setARGB(self::readColor($eleBorder->color)); + } + } + + /** + * @param SimpleXMLElement | null $is + * + * @return RichText + */ + private function parseRichText($is) + { + $value = new RichText(); + + if (isset($is->t)) { + $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $is->t)); + } else { + if (is_object($is->r)) { + foreach ($is->r as $run) { + if (!isset($run->rPr)) { + $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t)); + } else { + $objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t)); + + if (isset($run->rPr->rFont['val'])) { + $objText->getFont()->setName((string) $run->rPr->rFont['val']); + } + if (isset($run->rPr->sz['val'])) { + $objText->getFont()->setSize((float) $run->rPr->sz['val']); + } + if (isset($run->rPr->color)) { + $objText->getFont()->setColor(new Color(self::readColor($run->rPr->color))); + } + if ((isset($run->rPr->b['val']) && self::boolean((string) $run->rPr->b['val'])) || + (isset($run->rPr->b) && !isset($run->rPr->b['val']))) { + $objText->getFont()->setBold(true); + } + if ((isset($run->rPr->i['val']) && self::boolean((string) $run->rPr->i['val'])) || + (isset($run->rPr->i) && !isset($run->rPr->i['val']))) { + $objText->getFont()->setItalic(true); + } + if (isset($run->rPr->vertAlign, $run->rPr->vertAlign['val'])) { + $vertAlign = strtolower((string) $run->rPr->vertAlign['val']); + if ($vertAlign == 'superscript') { + $objText->getFont()->setSuperscript(true); + } + if ($vertAlign == 'subscript') { + $objText->getFont()->setSubscript(true); + } + } + if (isset($run->rPr->u) && !isset($run->rPr->u['val'])) { + $objText->getFont()->setUnderline(\PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); + } elseif (isset($run->rPr->u, $run->rPr->u['val'])) { + $objText->getFont()->setUnderline((string) $run->rPr->u['val']); + } + if ((isset($run->rPr->strike['val']) && self::boolean((string) $run->rPr->strike['val'])) || + (isset($run->rPr->strike) && !isset($run->rPr->strike['val']))) { + $objText->getFont()->setStrikethrough(true); + } + } + } + } + } + + return $value; + } + + /** + * @param mixed $customUITarget + * @param mixed $zip + */ + private function readRibbon(Spreadsheet $excel, $customUITarget, $zip): void + { + $baseDir = dirname($customUITarget); + $nameCustomUI = basename($customUITarget); + // get the xml file (ribbon) + $localRibbon = $this->getFromZipArchive($zip, $customUITarget); + $customUIImagesNames = []; + $customUIImagesBinaries = []; + // something like customUI/_rels/customUI.xml.rels + $pathRels = $baseDir . '/_rels/' . $nameCustomUI . '.rels'; + $dataRels = $this->getFromZipArchive($zip, $pathRels); + if ($dataRels) { + // exists and not empty if the ribbon have some pictures (other than internal MSO) + $UIRels = simplexml_load_string( + $this->securityScanner->scan($dataRels), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (false !== $UIRels) { + // we need to save id and target to avoid parsing customUI.xml and "guess" if it's a pseudo callback who load the image + foreach ($UIRels->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + // an image ? + $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target']; + $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']); + } + } + } + } + if ($localRibbon) { + $excel->setRibbonXMLData($customUITarget, $localRibbon); + if (count($customUIImagesNames) > 0 && count($customUIImagesBinaries) > 0) { + $excel->setRibbonBinObjects($customUIImagesNames, $customUIImagesBinaries); + } else { + $excel->setRibbonBinObjects(null, null); + } + } else { + $excel->setRibbonXMLData(null, null); + $excel->setRibbonBinObjects(null, null); + } + } + + private static function getArrayItem($array, $key = 0) + { + return $array[$key] ?? null; + } + + private static function dirAdd($base, $add) + { + return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add"); + } + + private static function toCSSArray($style) + { + $style = self::stripWhiteSpaceFromStyleString($style); + + $temp = explode(';', $style); + $style = []; + foreach ($temp as $item) { + $item = explode(':', $item); + + if (strpos($item[1], 'px') !== false) { + $item[1] = str_replace('px', '', $item[1]); + } + if (strpos($item[1], 'pt') !== false) { + $item[1] = str_replace('pt', '', $item[1]); + $item[1] = Font::fontSizeToPixels($item[1]); + } + if (strpos($item[1], 'in') !== false) { + $item[1] = str_replace('in', '', $item[1]); + $item[1] = Font::inchSizeToPixels($item[1]); + } + if (strpos($item[1], 'cm') !== false) { + $item[1] = str_replace('cm', '', $item[1]); + $item[1] = Font::centimeterSizeToPixels($item[1]); + } + + $style[$item[0]] = $item[1]; + } + + return $style; + } + + public static function stripWhiteSpaceFromStyleString($string) + { + return trim(str_replace(["\r", "\n", ' '], '', $string), ';'); + } + + private static function boolean($value) + { + if (is_object($value)) { + $value = (string) $value; + } + if (is_numeric($value)) { + return (bool) $value; + } + + return $value === 'true' || $value === 'TRUE'; + } + + /** + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $objDrawing + * @param SimpleXMLElement $cellAnchor + * @param array $hyperlinks + */ + private function readHyperLinkDrawing($objDrawing, $cellAnchor, $hyperlinks): void + { + $hlinkClick = $cellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + + if ($hlinkClick->count() === 0) { + return; + } + + $hlinkId = (string) $hlinkClick->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships')['id']; + $hyperlink = new Hyperlink( + $hyperlinks[$hlinkId], + (string) self::getArrayItem($cellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name') + ); + $objDrawing->setHyperlink($hyperlink); + } + + private function readProtection(Spreadsheet $excel, SimpleXMLElement $xmlWorkbook): void + { + if (!$xmlWorkbook->workbookProtection) { + return; + } + + if ($xmlWorkbook->workbookProtection['lockRevision']) { + $excel->getSecurity()->setLockRevision((bool) $xmlWorkbook->workbookProtection['lockRevision']); + } + + if ($xmlWorkbook->workbookProtection['lockStructure']) { + $excel->getSecurity()->setLockStructure((bool) $xmlWorkbook->workbookProtection['lockStructure']); + } + + if ($xmlWorkbook->workbookProtection['lockWindows']) { + $excel->getSecurity()->setLockWindows((bool) $xmlWorkbook->workbookProtection['lockWindows']); + } + + if ($xmlWorkbook->workbookProtection['revisionsPassword']) { + $excel->getSecurity()->setRevisionsPassword((string) $xmlWorkbook->workbookProtection['revisionsPassword'], true); + } + + if ($xmlWorkbook->workbookProtection['workbookPassword']) { + $excel->getSecurity()->setWorkbookPassword((string) $xmlWorkbook->workbookProtection['workbookPassword'], true); + } + } + + private function readFormControlProperties(Spreadsheet $excel, ZipArchive $zip, $dir, $fileWorksheet, $docSheet, array &$unparsedLoadedData): void + { + if (!$zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + return; + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $ctrlProps = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp') { + $ctrlProps[(string) $ele['Id']] = $ele; + } + } + + $unparsedCtrlProps = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['ctrlProps']; + foreach ($ctrlProps as $rId => $ctrlProp) { + $rId = substr($rId, 3); // rIdXXX + $unparsedCtrlProps[$rId] = []; + $unparsedCtrlProps[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $ctrlProp['Target']); + $unparsedCtrlProps[$rId]['relFilePath'] = (string) $ctrlProp['Target']; + $unparsedCtrlProps[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedCtrlProps[$rId]['filePath'])); + } + unset($unparsedCtrlProps); + } + + private function readPrinterSettings(Spreadsheet $excel, ZipArchive $zip, $dir, $fileWorksheet, $docSheet, array &$unparsedLoadedData): void + { + if (!$zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + return; + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $sheetPrinterSettings = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings') { + $sheetPrinterSettings[(string) $ele['Id']] = $ele; + } + } + + $unparsedPrinterSettings = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['printerSettings']; + foreach ($sheetPrinterSettings as $rId => $printerSettings) { + $rId = substr($rId, 3); // rIdXXX + $unparsedPrinterSettings[$rId] = []; + $unparsedPrinterSettings[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $printerSettings['Target']); + $unparsedPrinterSettings[$rId]['relFilePath'] = (string) $printerSettings['Target']; + $unparsedPrinterSettings[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedPrinterSettings[$rId]['filePath'])); + } + unset($unparsedPrinterSettings); + } + + /** + * Convert an 'xsd:boolean' XML value to a PHP boolean value. + * A valid 'xsd:boolean' XML value can be one of the following + * four values: 'true', 'false', '1', '0'. It is case sensitive. + * + * Note that just doing '(bool) $xsdBoolean' is not safe, + * since '(bool) "false"' returns true. + * + * @see https://www.w3.org/TR/xmlschema11-2/#boolean + * + * @param string $xsdBoolean An XML string value of type 'xsd:boolean' + * + * @return bool Boolean value + */ + private function castXsdBooleanToBool($xsdBoolean) + { + if ($xsdBoolean === 'false') { + return false; + } + + return (bool) $xsdBoolean; + } + + /** + * @param ZipArchive $zip Opened zip archive + * + * @return string basename of the used excel workbook + */ + private function getWorkbookBaseName(ZipArchive $zip) + { + $workbookBasename = ''; + + // check if it is an OOXML archive + $rels = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, '_rels/.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($rels !== false) { + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + $basename = basename($rel['Target']); + if (preg_match('/workbook.*\.xml/', $basename)) { + $workbookBasename = $basename; + } + + break; + } + } + } + + return $workbookBasename; + } + + private function readSheetProtection(Worksheet $docSheet, SimpleXMLElement $xmlSheet): void + { + if ($this->readDataOnly || !$xmlSheet->sheetProtection) { + return; + } + + $algorithmName = (string) $xmlSheet->sheetProtection['algorithmName']; + $protection = $docSheet->getProtection(); + $protection->setAlgorithm($algorithmName); + + if ($algorithmName) { + $protection->setPassword((string) $xmlSheet->sheetProtection['hashValue'], true); + $protection->setSalt((string) $xmlSheet->sheetProtection['saltValue']); + $protection->setSpinCount((int) $xmlSheet->sheetProtection['spinCount']); + } else { + $protection->setPassword((string) $xmlSheet->sheetProtection['password'], true); + } + + if ($xmlSheet->protectedRanges->protectedRange) { + foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) { + $docSheet->protectCells((string) $protectedRange['sqref'], (string) $protectedRange['password'], true); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/AutoFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/AutoFilter.php new file mode 100755 index 0000000..f52bfd4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/AutoFilter.php @@ -0,0 +1,146 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load(): void + { + // Remove all "$" in the auto filter range + $autoFilterRange = preg_replace('/\$/', '', $this->worksheetXml->autoFilter['ref']); + if (strpos($autoFilterRange, ':') !== false) { + $this->readAutoFilter($autoFilterRange, $this->worksheetXml); + } + } + + private function readAutoFilter($autoFilterRange, $xmlSheet): void + { + $autoFilter = $this->worksheet->getAutoFilter(); + $autoFilter->setRange($autoFilterRange); + + foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) { + $column = $autoFilter->getColumnByOffset((int) $filterColumn['colId']); + // Check for standard filters + if ($filterColumn->filters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER); + $filters = $filterColumn->filters; + if ((isset($filters['blank'])) && ($filters['blank'] == 1)) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, '')->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + // Standard filters are always an OR join, so no join rule needs to be set + // Entries can be either filter elements + foreach ($filters->filter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + + // Or Date Group elements + $this->readDateRangeAutoFilter($filters, $column); + } + + // Check for custom filters + $this->readCustomAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readDynamicAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readTopTenAutoFilter($filterColumn, $column); + } + } + + private function readDateRangeAutoFilter(SimpleXMLElement $filters, Column $column): void + { + foreach ($filters->dateGroupItem as $dateGroupItem) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + [ + 'year' => (string) $dateGroupItem['year'], + 'month' => (string) $dateGroupItem['month'], + 'day' => (string) $dateGroupItem['day'], + 'hour' => (string) $dateGroupItem['hour'], + 'minute' => (string) $dateGroupItem['minute'], + 'second' => (string) $dateGroupItem['second'], + ], + (string) $dateGroupItem['dateTimeGrouping'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP); + } + } + + private function readCustomAutoFilter(SimpleXMLElement $filterColumn, Column $column): void + { + if ($filterColumn->customFilters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER); + $customFilters = $filterColumn->customFilters; + // Custom filters can an AND or an OR join; + // and there should only ever be one or two entries + if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) { + $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND); + } + foreach ($customFilters->customFilter as $filterRule) { + $column->createRule()->setRule( + (string) $filterRule['operator'], + (string) $filterRule['val'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); + } + } + } + + private function readDynamicAutoFilter(SimpleXMLElement $filterColumn, Column $column): void + { + if ($filterColumn->dynamicFilter) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); + // We should only ever have one dynamic filter + foreach ($filterColumn->dynamicFilter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + (string) $filterRule['val'], + (string) $filterRule['type'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); + if (isset($filterRule['val'])) { + $column->setAttribute('val', (string) $filterRule['val']); + } + if (isset($filterRule['maxVal'])) { + $column->setAttribute('maxVal', (string) $filterRule['maxVal']); + } + } + } + } + + private function readTopTenAutoFilter(SimpleXMLElement $filterColumn, Column $column): void + { + if ($filterColumn->top10) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER); + // We should only ever have one top10 filter + foreach ($filterColumn->top10 as $filterRule) { + $column->createRule()->setRule( + (((isset($filterRule['percent'])) && ($filterRule['percent'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE + ), + (string) $filterRule['val'], + (((isset($filterRule['top'])) && ($filterRule['top'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM + ) + )->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php new file mode 100755 index 0000000..1679f01 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php @@ -0,0 +1,19 @@ +attributes(); + if (isset($attributes[$name])) { + if ($format == 'string') { + return (string) $attributes[$name]; + } elseif ($format == 'integer') { + return (int) $attributes[$name]; + } elseif ($format == 'boolean') { + return (bool) ($attributes[$name] === '0' || $attributes[$name] !== 'true') ? false : true; + } + + return (float) $attributes[$name]; + } + + return null; + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } + } + + /** + * @param string $chartName + * + * @return \PhpOffice\PhpSpreadsheet\Chart\Chart + */ + public static function readChart(SimpleXMLElement $chartElements, $chartName) + { + $namespacesChartMeta = $chartElements->getNamespaces(true); + $chartElementsC = $chartElements->children($namespacesChartMeta['c']); + + $XaxisLabel = $YaxisLabel = $legend = $title = null; + $dispBlanksAs = $plotVisOnly = null; + + foreach ($chartElementsC as $chartElementKey => $chartElement) { + switch ($chartElementKey) { + case 'chart': + foreach ($chartElement as $chartDetailsKey => $chartDetails) { + $chartDetailsC = $chartDetails->children($namespacesChartMeta['c']); + switch ($chartDetailsKey) { + case 'plotArea': + $plotAreaLayout = $XaxisLable = $YaxisLable = null; + $plotSeries = $plotAttributes = []; + foreach ($chartDetails as $chartDetailKey => $chartDetail) { + switch ($chartDetailKey) { + case 'layout': + $plotAreaLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + case 'catAx': + if (isset($chartDetail->title)) { + $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'dateAx': + if (isset($chartDetail->title)) { + $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'valAx': + if (isset($chartDetail->title)) { + $YaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'barChart': + case 'bar3DChart': + $barDirection = self::getAttribute($chartDetail->barDir, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotDirection($barDirection); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'lineChart': + case 'line3DChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'areaChart': + case 'area3DChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'doughnutChart': + case 'pieChart': + case 'pie3DChart': + $explosion = isset($chartDetail->ser->explosion); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($explosion); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'scatterChart': + $scatterStyle = self::getAttribute($chartDetail->scatterStyle, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($scatterStyle); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'bubbleChart': + $bubbleScale = self::getAttribute($chartDetail->bubbleScale, 'val', 'integer'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($bubbleScale); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'radarChart': + $radarStyle = self::getAttribute($chartDetail->radarStyle, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($radarStyle); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'surfaceChart': + case 'surface3DChart': + $wireFrame = self::getAttribute($chartDetail->wireframe, 'val', 'boolean'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($wireFrame); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'stockChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($plotAreaLayout); + + break; + } + } + if ($plotAreaLayout == null) { + $plotAreaLayout = new Layout(); + } + $plotArea = new PlotArea($plotAreaLayout, $plotSeries); + self::setChartAttributes($plotAreaLayout, $plotAttributes); + + break; + case 'plotVisOnly': + $plotVisOnly = self::getAttribute($chartDetails, 'val', 'string'); + + break; + case 'dispBlanksAs': + $dispBlanksAs = self::getAttribute($chartDetails, 'val', 'string'); + + break; + case 'title': + $title = self::chartTitle($chartDetails, $namespacesChartMeta); + + break; + case 'legend': + $legendPos = 'r'; + $legendLayout = null; + $legendOverlay = false; + foreach ($chartDetails as $chartDetailKey => $chartDetail) { + switch ($chartDetailKey) { + case 'legendPos': + $legendPos = self::getAttribute($chartDetail, 'val', 'string'); + + break; + case 'overlay': + $legendOverlay = self::getAttribute($chartDetail, 'val', 'boolean'); + + break; + case 'layout': + $legendLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + } + } + $legend = new Legend($legendPos, $legendLayout, $legendOverlay); + + break; + } + } + } + } + $chart = new \PhpOffice\PhpSpreadsheet\Chart\Chart($chartName, $title, $legend, $plotArea, $plotVisOnly, $dispBlanksAs, $XaxisLabel, $YaxisLabel); + + return $chart; + } + + private static function chartTitle(SimpleXMLElement $titleDetails, array $namespacesChartMeta) + { + $caption = []; + $titleLayout = null; + foreach ($titleDetails as $titleDetailKey => $chartDetail) { + switch ($titleDetailKey) { + case 'tx': + $titleDetails = $chartDetail->rich->children($namespacesChartMeta['a']); + foreach ($titleDetails as $titleKey => $titleDetail) { + switch ($titleKey) { + case 'p': + $titleDetailPart = $titleDetail->children($namespacesChartMeta['a']); + $caption[] = self::parseRichText($titleDetailPart); + } + } + + break; + case 'layout': + $titleLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + } + } + + return new Title($caption, $titleLayout); + } + + private static function chartLayoutDetails($chartDetail, $namespacesChartMeta) + { + if (!isset($chartDetail->manualLayout)) { + return null; + } + $details = $chartDetail->manualLayout->children($namespacesChartMeta['c']); + if ($details === null) { + return null; + } + $layout = []; + foreach ($details as $detailKey => $detail) { + $layout[$detailKey] = self::getAttribute($detail, 'val', 'string'); + } + + return new Layout($layout); + } + + private static function chartDataSeries($chartDetail, $namespacesChartMeta, $plotType) + { + $multiSeriesType = null; + $smoothLine = false; + $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = []; + + $seriesDetailSet = $chartDetail->children($namespacesChartMeta['c']); + foreach ($seriesDetailSet as $seriesDetailKey => $seriesDetails) { + switch ($seriesDetailKey) { + case 'grouping': + $multiSeriesType = self::getAttribute($chartDetail->grouping, 'val', 'string'); + + break; + case 'ser': + $marker = null; + $seriesIndex = ''; + foreach ($seriesDetails as $seriesKey => $seriesDetail) { + switch ($seriesKey) { + case 'idx': + $seriesIndex = self::getAttribute($seriesDetail, 'val', 'integer'); + + break; + case 'order': + $seriesOrder = self::getAttribute($seriesDetail, 'val', 'integer'); + $plotOrder[$seriesIndex] = $seriesOrder; + + break; + case 'tx': + $seriesLabel[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); + + break; + case 'marker': + $marker = self::getAttribute($seriesDetail->symbol, 'val', 'string'); + + break; + case 'smooth': + $smoothLine = self::getAttribute($seriesDetail, 'val', 'boolean'); + + break; + case 'cat': + $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); + + break; + case 'val': + $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + case 'xVal': + $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + case 'yVal': + $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + } + } + } + } + + return new DataSeries($plotType, $multiSeriesType, $plotOrder, $seriesLabel, $seriesCategory, $seriesValues, $smoothLine); + } + + private static function chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker = null) + { + if (isset($seriesDetail->strRef)) { + $seriesSource = (string) $seriesDetail->strRef->f; + $seriesData = self::chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']), 's'); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->numRef)) { + $seriesSource = (string) $seriesDetail->numRef->f; + $seriesData = self::chartDataSeriesValues($seriesDetail->numRef->numCache->children($namespacesChartMeta['c'])); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->multiLvlStrRef)) { + $seriesSource = (string) $seriesDetail->multiLvlStrRef->f; + $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']), 's'); + $seriesData['pointCount'] = count($seriesData['dataValues']); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->multiLvlNumRef)) { + $seriesSource = (string) $seriesDetail->multiLvlNumRef->f; + $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']), 's'); + $seriesData['pointCount'] = count($seriesData['dataValues']); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } + + return null; + } + + private static function chartDataSeriesValues($seriesValueSet, $dataType = 'n') + { + $seriesVal = []; + $formatCode = ''; + $pointCount = 0; + + foreach ($seriesValueSet as $seriesValueIdx => $seriesValue) { + switch ($seriesValueIdx) { + case 'ptCount': + $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); + + break; + case 'formatCode': + $formatCode = (string) $seriesValue; + + break; + case 'pt': + $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); + if ($dataType == 's') { + $seriesVal[$pointVal] = (string) $seriesValue->v; + } elseif ($seriesValue->v === Functions::NA()) { + $seriesVal[$pointVal] = null; + } else { + $seriesVal[$pointVal] = (float) $seriesValue->v; + } + + break; + } + } + + return [ + 'formatCode' => $formatCode, + 'pointCount' => $pointCount, + 'dataValues' => $seriesVal, + ]; + } + + private static function chartDataSeriesValuesMultiLevel($seriesValueSet, $dataType = 'n') + { + $seriesVal = []; + $formatCode = ''; + $pointCount = 0; + + foreach ($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) { + foreach ($seriesLevel as $seriesValueIdx => $seriesValue) { + switch ($seriesValueIdx) { + case 'ptCount': + $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); + + break; + case 'formatCode': + $formatCode = (string) $seriesValue; + + break; + case 'pt': + $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); + if ($dataType == 's') { + $seriesVal[$pointVal][] = (string) $seriesValue->v; + } elseif ($seriesValue->v === Functions::NA()) { + $seriesVal[$pointVal] = null; + } else { + $seriesVal[$pointVal][] = (float) $seriesValue->v; + } + + break; + } + } + } + + return [ + 'formatCode' => $formatCode, + 'pointCount' => $pointCount, + 'dataValues' => $seriesVal, + ]; + } + + private static function parseRichText(SimpleXMLElement $titleDetailPart) + { + $value = new RichText(); + $objText = null; + foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) { + if (isset($titleDetailElement->t)) { + $objText = $value->createTextRun((string) $titleDetailElement->t); + } + if (isset($titleDetailElement->rPr)) { + if (isset($titleDetailElement->rPr->rFont['val'])) { + $objText->getFont()->setName((string) $titleDetailElement->rPr->rFont['val']); + } + + $fontSize = (self::getAttribute($titleDetailElement->rPr, 'sz', 'integer')); + if ($fontSize !== null) { + $objText->getFont()->setSize(floor($fontSize / 100)); + } + + $fontColor = (self::getAttribute($titleDetailElement->rPr, 'color', 'string')); + if ($fontColor !== null) { + $objText->getFont()->setColor(new Color(self::readColor($fontColor))); + } + + $bold = self::getAttribute($titleDetailElement->rPr, 'b', 'boolean'); + if ($bold !== null) { + $objText->getFont()->setBold($bold); + } + + $italic = self::getAttribute($titleDetailElement->rPr, 'i', 'boolean'); + if ($italic !== null) { + $objText->getFont()->setItalic($italic); + } + + $baseline = self::getAttribute($titleDetailElement->rPr, 'baseline', 'integer'); + if ($baseline !== null) { + if ($baseline > 0) { + $objText->getFont()->setSuperscript(true); + } elseif ($baseline < 0) { + $objText->getFont()->setSubscript(true); + } + } + + $underscore = (self::getAttribute($titleDetailElement->rPr, 'u', 'string')); + if ($underscore !== null) { + if ($underscore == 'sng') { + $objText->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + } elseif ($underscore == 'dbl') { + $objText->getFont()->setUnderline(Font::UNDERLINE_DOUBLE); + } else { + $objText->getFont()->setUnderline(Font::UNDERLINE_NONE); + } + } + + $strikethrough = (self::getAttribute($titleDetailElement->rPr, 's', 'string')); + if ($strikethrough !== null) { + if ($strikethrough == 'noStrike') { + $objText->getFont()->setStrikethrough(false); + } else { + $objText->getFont()->setStrikethrough(true); + } + } + } + } + + return $value; + } + + private static function readChartAttributes($chartDetail) + { + $plotAttributes = []; + if (isset($chartDetail->dLbls)) { + if (isset($chartDetail->dLbls->howLegendKey)) { + $plotAttributes['showLegendKey'] = self::getAttribute($chartDetail->dLbls->showLegendKey, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showVal)) { + $plotAttributes['showVal'] = self::getAttribute($chartDetail->dLbls->showVal, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showCatName)) { + $plotAttributes['showCatName'] = self::getAttribute($chartDetail->dLbls->showCatName, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showSerName)) { + $plotAttributes['showSerName'] = self::getAttribute($chartDetail->dLbls->showSerName, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showPercent)) { + $plotAttributes['showPercent'] = self::getAttribute($chartDetail->dLbls->showPercent, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showBubbleSize)) { + $plotAttributes['showBubbleSize'] = self::getAttribute($chartDetail->dLbls->showBubbleSize, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showLeaderLines)) { + $plotAttributes['showLeaderLines'] = self::getAttribute($chartDetail->dLbls->showLeaderLines, 'val', 'string'); + } + } + + return $plotAttributes; + } + + /** + * @param mixed $plotAttributes + */ + private static function setChartAttributes(Layout $plotArea, $plotAttributes): void + { + foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) { + switch ($plotAttributeKey) { + case 'showLegendKey': + $plotArea->setShowLegendKey($plotAttributeValue); + + break; + case 'showVal': + $plotArea->setShowVal($plotAttributeValue); + + break; + case 'showCatName': + $plotArea->setShowCatName($plotAttributeValue); + + break; + case 'showSerName': + $plotArea->setShowSerName($plotAttributeValue); + + break; + case 'showPercent': + $plotArea->setShowPercent($plotAttributeValue); + + break; + case 'showBubbleSize': + $plotArea->setShowBubbleSize($plotAttributeValue); + + break; + case 'showLeaderLines': + $plotArea->setShowLeaderLines($plotAttributeValue); + + break; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php new file mode 100755 index 0000000..339c058 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php @@ -0,0 +1,205 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * Set Worksheet column attributes by attributes array passed. + * + * @param string $columnAddress A, B, ... DX, ... + * @param array $columnAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'width', ... ? + */ + private function setColumnAttributes($columnAddress, array $columnAttributes): void + { + if (isset($columnAttributes['xfIndex'])) { + $this->worksheet->getColumnDimension($columnAddress)->setXfIndex($columnAttributes['xfIndex']); + } + if (isset($columnAttributes['visible'])) { + $this->worksheet->getColumnDimension($columnAddress)->setVisible($columnAttributes['visible']); + } + if (isset($columnAttributes['collapsed'])) { + $this->worksheet->getColumnDimension($columnAddress)->setCollapsed($columnAttributes['collapsed']); + } + if (isset($columnAttributes['outlineLevel'])) { + $this->worksheet->getColumnDimension($columnAddress)->setOutlineLevel($columnAttributes['outlineLevel']); + } + if (isset($columnAttributes['width'])) { + $this->worksheet->getColumnDimension($columnAddress)->setWidth($columnAttributes['width']); + } + } + + /** + * Set Worksheet row attributes by attributes array passed. + * + * @param int $rowNumber 1, 2, 3, ... 99, ... + * @param array $rowAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'rowHeight', ... ? + */ + private function setRowAttributes($rowNumber, array $rowAttributes): void + { + if (isset($rowAttributes['xfIndex'])) { + $this->worksheet->getRowDimension($rowNumber)->setXfIndex($rowAttributes['xfIndex']); + } + if (isset($rowAttributes['visible'])) { + $this->worksheet->getRowDimension($rowNumber)->setVisible($rowAttributes['visible']); + } + if (isset($rowAttributes['collapsed'])) { + $this->worksheet->getRowDimension($rowNumber)->setCollapsed($rowAttributes['collapsed']); + } + if (isset($rowAttributes['outlineLevel'])) { + $this->worksheet->getRowDimension($rowNumber)->setOutlineLevel($rowAttributes['outlineLevel']); + } + if (isset($rowAttributes['rowHeight'])) { + $this->worksheet->getRowDimension($rowNumber)->setRowHeight($rowAttributes['rowHeight']); + } + } + + /** + * @param IReadFilter $readFilter + * @param bool $readDataOnly + */ + public function load(?IReadFilter $readFilter = null, $readDataOnly = false): void + { + if ($this->worksheetXml === null) { + return; + } + + $columnsAttributes = []; + $rowsAttributes = []; + if (isset($this->worksheetXml->cols)) { + $columnsAttributes = $this->readColumnAttributes($this->worksheetXml->cols, $readDataOnly); + } + + if ($this->worksheetXml->sheetData && $this->worksheetXml->sheetData->row) { + $rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly); + } + + // set columns/rows attributes + $columnsAttributesAreSet = []; + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if ($readFilter === null || + !$this->isFilteredColumn($readFilter, $columnCoordinate, $rowsAttributes)) { + if (!isset($columnsAttributesAreSet[$columnCoordinate])) { + $this->setColumnAttributes($columnCoordinate, $columnAttributes); + $columnsAttributesAreSet[$columnCoordinate] = true; + } + } + } + + $rowsAttributesAreSet = []; + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if ($readFilter === null || + !$this->isFilteredRow($readFilter, $rowCoordinate, $columnsAttributes)) { + if (!isset($rowsAttributesAreSet[$rowCoordinate])) { + $this->setRowAttributes($rowCoordinate, $rowAttributes); + $rowsAttributesAreSet[$rowCoordinate] = true; + } + } + } + } + + private function isFilteredColumn(IReadFilter $readFilter, $columnCoordinate, array $rowsAttributes) + { + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readColumnAttributes(SimpleXMLElement $worksheetCols, $readDataOnly) + { + $columnAttributes = []; + + foreach ($worksheetCols->col as $column) { + $startColumn = Coordinate::stringFromColumnIndex((int) $column['min']); + $endColumn = Coordinate::stringFromColumnIndex((int) $column['max']); + ++$endColumn; + for ($columnAddress = $startColumn; $columnAddress !== $endColumn; ++$columnAddress) { + $columnAttributes[$columnAddress] = $this->readColumnRangeAttributes($column, $readDataOnly); + + if ((int) ($column['max']) == 16384) { + break; + } + } + } + + return $columnAttributes; + } + + private function readColumnRangeAttributes(SimpleXMLElement $column, $readDataOnly) + { + $columnAttributes = []; + + if ($column['style'] && !$readDataOnly) { + $columnAttributes['xfIndex'] = (int) $column['style']; + } + if (self::boolean($column['hidden'])) { + $columnAttributes['visible'] = false; + } + if (self::boolean($column['collapsed'])) { + $columnAttributes['collapsed'] = true; + } + if (((int) $column['outlineLevel']) > 0) { + $columnAttributes['outlineLevel'] = (int) $column['outlineLevel']; + } + $columnAttributes['width'] = (float) $column['width']; + + return $columnAttributes; + } + + private function isFilteredRow(IReadFilter $readFilter, $rowCoordinate, array $columnsAttributes) + { + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readRowAttributes(SimpleXMLElement $worksheetRow, $readDataOnly) + { + $rowAttributes = []; + + foreach ($worksheetRow as $row) { + if ($row['ht'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['rowHeight'] = (float) $row['ht']; + } + if (self::boolean($row['hidden'])) { + $rowAttributes[(int) $row['r']]['visible'] = false; + } + if (self::boolean($row['collapsed'])) { + $rowAttributes[(int) $row['r']]['collapsed'] = true; + } + if ((int) $row['outlineLevel'] > 0) { + $rowAttributes[(int) $row['r']]['outlineLevel'] = (int) $row['outlineLevel']; + } + if ($row['s'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['xfIndex'] = (int) $row['s']; + } + } + + return $rowAttributes; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php new file mode 100755 index 0000000..668bfd1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php @@ -0,0 +1,95 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + $this->dxfs = $dxfs; + } + + public function load(): void + { + $this->setConditionalStyles( + $this->worksheet, + $this->readConditionalStyles($this->worksheetXml) + ); + } + + private function readConditionalStyles($xmlSheet) + { + $conditionals = []; + foreach ($xmlSheet->conditionalFormatting as $conditional) { + foreach ($conditional->cfRule as $cfRule) { + if (((string) $cfRule['type'] == Conditional::CONDITION_NONE + || (string) $cfRule['type'] == Conditional::CONDITION_CELLIS + || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT + || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSBLANKS + || (string) $cfRule['type'] == Conditional::CONDITION_NOTCONTAINSBLANKS + || (string) $cfRule['type'] == Conditional::CONDITION_EXPRESSION) + && isset($this->dxfs[(int) ($cfRule['dxfId'])])) { + $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule; + } + } + } + + return $conditionals; + } + + private function setConditionalStyles(Worksheet $worksheet, array $conditionals): void + { + foreach ($conditionals as $ref => $cfRules) { + ksort($cfRules); + $conditionalStyles = $this->readStyleRules($cfRules); + + // Extract all cell references in $ref + $cellBlocks = explode(' ', str_replace('$', '', strtoupper($ref))); + foreach ($cellBlocks as $cellBlock) { + $worksheet->getStyle($cellBlock)->setConditionalStyles($conditionalStyles); + } + } + } + + private function readStyleRules($cfRules) + { + $conditionalStyles = []; + foreach ($cfRules as $cfRule) { + $objConditional = new Conditional(); + $objConditional->setConditionType((string) $cfRule['type']); + $objConditional->setOperatorType((string) $cfRule['operator']); + + if ((string) $cfRule['text'] != '') { + $objConditional->setText((string) $cfRule['text']); + } + + if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) { + $objConditional->setStopIfTrue(true); + } + + if (count($cfRule->formula) > 1) { + foreach ($cfRule->formula as $formula) { + $objConditional->addCondition((string) $formula); + } + } else { + $objConditional->addCondition((string) $cfRule->formula); + } + $objConditional->setStyle(clone $this->dxfs[(int) ($cfRule['dxfId'])]); + $conditionalStyles[] = $objConditional; + } + + return $conditionalStyles; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/DataValidations.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/DataValidations.php new file mode 100755 index 0000000..41a8c9f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/DataValidations.php @@ -0,0 +1,51 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load(): void + { + foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) { + // Uppercase coordinate + $range = strtoupper($dataValidation['sqref']); + $rangeSet = explode(' ', $range); + foreach ($rangeSet as $range) { + $stRange = $this->worksheet->shrinkRangeToFit($range); + + // Extract all cell references in $range + foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $reference) { + // Create validation + $docValidation = $this->worksheet->getCell($reference)->getDataValidation(); + $docValidation->setType((string) $dataValidation['type']); + $docValidation->setErrorStyle((string) $dataValidation['errorStyle']); + $docValidation->setOperator((string) $dataValidation['operator']); + $docValidation->setAllowBlank($dataValidation['allowBlank'] != 0); + $docValidation->setShowDropDown($dataValidation['showDropDown'] == 0); + $docValidation->setShowInputMessage($dataValidation['showInputMessage'] != 0); + $docValidation->setShowErrorMessage($dataValidation['showErrorMessage'] != 0); + $docValidation->setErrorTitle((string) $dataValidation['errorTitle']); + $docValidation->setError((string) $dataValidation['error']); + $docValidation->setPromptTitle((string) $dataValidation['promptTitle']); + $docValidation->setPrompt((string) $dataValidation['prompt']); + $docValidation->setFormula1((string) $dataValidation->formula1); + $docValidation->setFormula2((string) $dataValidation->formula2); + } + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php new file mode 100755 index 0000000..9e6aeaf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php @@ -0,0 +1,59 @@ +worksheet = $workSheet; + } + + public function readHyperlinks(SimpleXMLElement $relsWorksheet): void + { + foreach ($relsWorksheet->Relationship as $element) { + if ($element['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { + $this->hyperlinks[(string) $element['Id']] = (string) $element['Target']; + } + } + } + + public function setHyperlinks(SimpleXMLElement $worksheetXml): void + { + foreach ($worksheetXml->hyperlink as $hyperlink) { + $this->setHyperlink($hyperlink, $this->worksheet); + } + } + + private function setHyperlink(SimpleXMLElement $hyperlink, Worksheet $worksheet): void + { + // Link url + $linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { + $cell = $worksheet->getCell($cellReference); + if (isset($linkRel['id'])) { + $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']]; + if (isset($hyperlink['location'])) { + $hyperlinkUrl .= '#' . (string) $hyperlink['location']; + } + $cell->getHyperlink()->setUrl($hyperlinkUrl); + } elseif (isset($hyperlink['location'])) { + $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']); + } + + // Tooltip + if (isset($hyperlink['tooltip'])) { + $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/PageSetup.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/PageSetup.php new file mode 100755 index 0000000..bfb7a1f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/PageSetup.php @@ -0,0 +1,151 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load(array $unparsedLoadedData) + { + if (!$this->worksheetXml) { + return $unparsedLoadedData; + } + + $this->margins($this->worksheetXml, $this->worksheet); + $unparsedLoadedData = $this->pageSetup($this->worksheetXml, $this->worksheet, $unparsedLoadedData); + $this->headerFooter($this->worksheetXml, $this->worksheet); + $this->pageBreaks($this->worksheetXml, $this->worksheet); + + return $unparsedLoadedData; + } + + private function margins(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void + { + if ($xmlSheet->pageMargins) { + $docPageMargins = $worksheet->getPageMargins(); + $docPageMargins->setLeft((float) ($xmlSheet->pageMargins['left'])); + $docPageMargins->setRight((float) ($xmlSheet->pageMargins['right'])); + $docPageMargins->setTop((float) ($xmlSheet->pageMargins['top'])); + $docPageMargins->setBottom((float) ($xmlSheet->pageMargins['bottom'])); + $docPageMargins->setHeader((float) ($xmlSheet->pageMargins['header'])); + $docPageMargins->setFooter((float) ($xmlSheet->pageMargins['footer'])); + } + } + + private function pageSetup(SimpleXMLElement $xmlSheet, Worksheet $worksheet, array $unparsedLoadedData) + { + if ($xmlSheet->pageSetup) { + $docPageSetup = $worksheet->getPageSetup(); + + if (isset($xmlSheet->pageSetup['orientation'])) { + $docPageSetup->setOrientation((string) $xmlSheet->pageSetup['orientation']); + } + if (isset($xmlSheet->pageSetup['paperSize'])) { + $docPageSetup->setPaperSize((int) ($xmlSheet->pageSetup['paperSize'])); + } + if (isset($xmlSheet->pageSetup['scale'])) { + $docPageSetup->setScale((int) ($xmlSheet->pageSetup['scale']), false); + } + if (isset($xmlSheet->pageSetup['fitToHeight']) && (int) ($xmlSheet->pageSetup['fitToHeight']) >= 0) { + $docPageSetup->setFitToHeight((int) ($xmlSheet->pageSetup['fitToHeight']), false); + } + if (isset($xmlSheet->pageSetup['fitToWidth']) && (int) ($xmlSheet->pageSetup['fitToWidth']) >= 0) { + $docPageSetup->setFitToWidth((int) ($xmlSheet->pageSetup['fitToWidth']), false); + } + if (isset($xmlSheet->pageSetup['firstPageNumber'], $xmlSheet->pageSetup['useFirstPageNumber']) && + self::boolean((string) $xmlSheet->pageSetup['useFirstPageNumber'])) { + $docPageSetup->setFirstPageNumber((int) ($xmlSheet->pageSetup['firstPageNumber'])); + } + + $relAttributes = $xmlSheet->pageSetup->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + if (isset($relAttributes['id'])) { + $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId'] = (string) $relAttributes['id']; + } + } + + return $unparsedLoadedData; + } + + private function headerFooter(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void + { + if ($xmlSheet->headerFooter) { + $docHeaderFooter = $worksheet->getHeaderFooter(); + + if (isset($xmlSheet->headerFooter['differentOddEven']) && + self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])) { + $docHeaderFooter->setDifferentOddEven(true); + } else { + $docHeaderFooter->setDifferentOddEven(false); + } + if (isset($xmlSheet->headerFooter['differentFirst']) && + self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) { + $docHeaderFooter->setDifferentFirst(true); + } else { + $docHeaderFooter->setDifferentFirst(false); + } + if (isset($xmlSheet->headerFooter['scaleWithDoc']) && + !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) { + $docHeaderFooter->setScaleWithDocument(false); + } else { + $docHeaderFooter->setScaleWithDocument(true); + } + if (isset($xmlSheet->headerFooter['alignWithMargins']) && + !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) { + $docHeaderFooter->setAlignWithMargins(false); + } else { + $docHeaderFooter->setAlignWithMargins(true); + } + + $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader); + $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter); + $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader); + $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter); + $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader); + $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter); + } + } + + private function pageBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void + { + if ($xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk) { + $this->rowBreaks($xmlSheet, $worksheet); + } + if ($xmlSheet->colBreaks && $xmlSheet->colBreaks->brk) { + $this->columnBreaks($xmlSheet, $worksheet); + } + } + + private function rowBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void + { + foreach ($xmlSheet->rowBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak("A{$brk['id']}", Worksheet::BREAK_ROW); + } + } + } + + private function columnBreaks(SimpleXMLElement $xmlSheet, Worksheet $worksheet): void + { + foreach ($xmlSheet->colBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak( + Coordinate::stringFromColumnIndex(((int) $brk['id']) + 1) . '1', + Worksheet::BREAK_COLUMN + ); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Properties.php new file mode 100755 index 0000000..b6f3c61 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Properties.php @@ -0,0 +1,92 @@ +securityScanner = $securityScanner; + $this->docProps = $docProps; + } + + private function extractPropertyData($propertyData) + { + return simplexml_load_string( + $this->securityScanner->scan($propertyData), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + } + + public function readCoreProperties($propertyData): void + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + $xmlCore->registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); + $xmlCore->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/'); + $xmlCore->registerXPathNamespace('cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + + $this->docProps->setCreator((string) self::getArrayItem($xmlCore->xpath('dc:creator'))); + $this->docProps->setLastModifiedBy((string) self::getArrayItem($xmlCore->xpath('cp:lastModifiedBy'))); + $this->docProps->setCreated(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:created')))); //! respect xsi:type + $this->docProps->setModified(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:modified')))); //! respect xsi:type + $this->docProps->setTitle((string) self::getArrayItem($xmlCore->xpath('dc:title'))); + $this->docProps->setDescription((string) self::getArrayItem($xmlCore->xpath('dc:description'))); + $this->docProps->setSubject((string) self::getArrayItem($xmlCore->xpath('dc:subject'))); + $this->docProps->setKeywords((string) self::getArrayItem($xmlCore->xpath('cp:keywords'))); + $this->docProps->setCategory((string) self::getArrayItem($xmlCore->xpath('cp:category'))); + } + } + + public function readExtendedProperties($propertyData): void + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + if (isset($xmlCore->Company)) { + $this->docProps->setCompany((string) $xmlCore->Company); + } + if (isset($xmlCore->Manager)) { + $this->docProps->setManager((string) $xmlCore->Manager); + } + } + } + + public function readCustomProperties($propertyData): void + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + foreach ($xmlCore as $xmlProperty) { + /** @var SimpleXMLElement $xmlProperty */ + $cellDataOfficeAttributes = $xmlProperty->attributes(); + if (isset($cellDataOfficeAttributes['name'])) { + $propertyName = (string) $cellDataOfficeAttributes['name']; + $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + $attributeType = $cellDataOfficeChildren->getName(); + $attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; + $attributeValue = DocumentProperties::convertProperty($attributeValue, $attributeType); + $attributeType = DocumentProperties::convertPropertyType($attributeType); + $this->docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); + } + } + } + } + + private static function getArrayItem(array $array, $key = 0) + { + return $array[$key] ?? null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php new file mode 100755 index 0000000..b3bee89 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php @@ -0,0 +1,125 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * @param bool $readDataOnly + */ + public function load($readDataOnly = false): void + { + if ($this->worksheetXml === null) { + return; + } + + if (isset($this->worksheetXml->sheetPr)) { + $this->tabColor($this->worksheetXml->sheetPr); + $this->codeName($this->worksheetXml->sheetPr); + $this->outlines($this->worksheetXml->sheetPr); + $this->pageSetup($this->worksheetXml->sheetPr); + } + + if (isset($this->worksheetXml->sheetFormatPr)) { + $this->sheetFormat($this->worksheetXml->sheetFormatPr); + } + + if (!$readDataOnly && isset($this->worksheetXml->printOptions)) { + $this->printOptions($this->worksheetXml->printOptions); + } + } + + private function tabColor(SimpleXMLElement $sheetPr): void + { + if (isset($sheetPr->tabColor, $sheetPr->tabColor['rgb'])) { + $this->worksheet->getTabColor()->setARGB((string) $sheetPr->tabColor['rgb']); + } + } + + private function codeName(SimpleXMLElement $sheetPr): void + { + if (isset($sheetPr['codeName'])) { + $this->worksheet->setCodeName((string) $sheetPr['codeName'], false); + } + } + + private function outlines(SimpleXMLElement $sheetPr): void + { + if (isset($sheetPr->outlinePr)) { + if (isset($sheetPr->outlinePr['summaryRight']) && + !self::boolean((string) $sheetPr->outlinePr['summaryRight'])) { + $this->worksheet->setShowSummaryRight(false); + } else { + $this->worksheet->setShowSummaryRight(true); + } + + if (isset($sheetPr->outlinePr['summaryBelow']) && + !self::boolean((string) $sheetPr->outlinePr['summaryBelow'])) { + $this->worksheet->setShowSummaryBelow(false); + } else { + $this->worksheet->setShowSummaryBelow(true); + } + } + } + + private function pageSetup(SimpleXMLElement $sheetPr): void + { + if (isset($sheetPr->pageSetUpPr)) { + if (isset($sheetPr->pageSetUpPr['fitToPage']) && + !self::boolean((string) $sheetPr->pageSetUpPr['fitToPage'])) { + $this->worksheet->getPageSetup()->setFitToPage(false); + } else { + $this->worksheet->getPageSetup()->setFitToPage(true); + } + } + } + + private function sheetFormat(SimpleXMLElement $sheetFormatPr): void + { + if (isset($sheetFormatPr['customHeight']) && + self::boolean((string) $sheetFormatPr['customHeight']) && + isset($sheetFormatPr['defaultRowHeight'])) { + $this->worksheet->getDefaultRowDimension() + ->setRowHeight((float) $sheetFormatPr['defaultRowHeight']); + } + + if (isset($sheetFormatPr['defaultColWidth'])) { + $this->worksheet->getDefaultColumnDimension() + ->setWidth((float) $sheetFormatPr['defaultColWidth']); + } + + if (isset($sheetFormatPr['zeroHeight']) && + ((string) $sheetFormatPr['zeroHeight'] === '1')) { + $this->worksheet->getDefaultRowDimension()->setZeroHeight(true); + } + } + + private function printOptions(SimpleXMLElement $printOptions): void + { + if (self::boolean((string) $printOptions['gridLinesSet'])) { + $this->worksheet->setShowGridlines(true); + } + if (self::boolean((string) $printOptions['gridLines'])) { + $this->worksheet->setPrintGridlines(true); + } + if (self::boolean((string) $printOptions['horizontalCentered'])) { + $this->worksheet->getPageSetup()->setHorizontalCentered(true); + } + if (self::boolean((string) $printOptions['verticalCentered'])) { + $this->worksheet->getPageSetup()->setVerticalCentered(true); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViews.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViews.php new file mode 100755 index 0000000..f6c4792 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/SheetViews.php @@ -0,0 +1,138 @@ +sheetViewXml = $sheetViewXml; + $this->worksheet = $workSheet; + } + + public function load(): void + { + $this->zoomScale(); + $this->view(); + $this->gridLines(); + $this->headers(); + $this->direction(); + $this->showZeros(); + + if (isset($this->sheetViewXml->pane)) { + $this->pane(); + } + if (isset($this->sheetViewXml->selection, $this->sheetViewXml->selection['sqref'])) { + $this->selection(); + } + } + + private function zoomScale(): void + { + if (isset($this->sheetViewXml['zoomScale'])) { + $zoomScale = (int) ($this->sheetViewXml['zoomScale']); + if ($zoomScale <= 0) { + // setZoomScale will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScale = 100; + } + + $this->worksheet->getSheetView()->setZoomScale($zoomScale); + } + + if (isset($this->sheetViewXml['zoomScaleNormal'])) { + $zoomScaleNormal = (int) ($this->sheetViewXml['zoomScaleNormal']); + if ($zoomScaleNormal <= 0) { + // setZoomScaleNormal will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScaleNormal = 100; + } + + $this->worksheet->getSheetView()->setZoomScaleNormal($zoomScaleNormal); + } + } + + private function view(): void + { + if (isset($this->sheetViewXml['view'])) { + $this->worksheet->getSheetView()->setView((string) $this->sheetViewXml['view']); + } + } + + private function gridLines(): void + { + if (isset($this->sheetViewXml['showGridLines'])) { + $this->worksheet->setShowGridLines( + self::boolean((string) $this->sheetViewXml['showGridLines']) + ); + } + } + + private function headers(): void + { + if (isset($this->sheetViewXml['showRowColHeaders'])) { + $this->worksheet->setShowRowColHeaders( + self::boolean((string) $this->sheetViewXml['showRowColHeaders']) + ); + } + } + + private function direction(): void + { + if (isset($this->sheetViewXml['rightToLeft'])) { + $this->worksheet->setRightToLeft( + self::boolean((string) $this->sheetViewXml['rightToLeft']) + ); + } + } + + private function showZeros(): void + { + if (isset($this->sheetViewXml['showZeros'])) { + $this->worksheet->getSheetView()->setShowZeros( + self::boolean((string) $this->sheetViewXml['showZeros']) + ); + } + } + + private function pane(): void + { + $xSplit = 0; + $ySplit = 0; + $topLeftCell = null; + + if (isset($this->sheetViewXml->pane['xSplit'])) { + $xSplit = (int) ($this->sheetViewXml->pane['xSplit']); + } + + if (isset($this->sheetViewXml->pane['ySplit'])) { + $ySplit = (int) ($this->sheetViewXml->pane['ySplit']); + } + + if (isset($this->sheetViewXml->pane['topLeftCell'])) { + $topLeftCell = (string) $this->sheetViewXml->pane['topLeftCell']; + } + + $this->worksheet->freezePane( + Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1), + $topLeftCell + ); + } + + private function selection(): void + { + $sqref = (string) $this->sheetViewXml->selection['sqref']; + $sqref = explode(' ', $sqref); + $sqref = $sqref[0]; + + $this->worksheet->setSelectedCells($sqref); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Styles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Styles.php new file mode 100755 index 0000000..43de878 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -0,0 +1,282 @@ +styleXml = $styleXml; + } + + public function setStyleBaseData(?Theme $theme = null, $styles = [], $cellStyles = []): void + { + self::$theme = $theme; + $this->styles = $styles; + $this->cellStyles = $cellStyles; + } + + private static function readFontStyle(Font $fontStyle, SimpleXMLElement $fontStyleXml): void + { + $fontStyle->setName((string) $fontStyleXml->name['val']); + $fontStyle->setSize((float) $fontStyleXml->sz['val']); + + if (isset($fontStyleXml->b)) { + $fontStyle->setBold(!isset($fontStyleXml->b['val']) || self::boolean((string) $fontStyleXml->b['val'])); + } + if (isset($fontStyleXml->i)) { + $fontStyle->setItalic(!isset($fontStyleXml->i['val']) || self::boolean((string) $fontStyleXml->i['val'])); + } + if (isset($fontStyleXml->strike)) { + $fontStyle->setStrikethrough(!isset($fontStyleXml->strike['val']) || self::boolean((string) $fontStyleXml->strike['val'])); + } + $fontStyle->getColor()->setARGB(self::readColor($fontStyleXml->color)); + + if (isset($fontStyleXml->u) && !isset($fontStyleXml->u['val'])) { + $fontStyle->setUnderline(Font::UNDERLINE_SINGLE); + } elseif (isset($fontStyleXml->u, $fontStyleXml->u['val'])) { + $fontStyle->setUnderline((string) $fontStyleXml->u['val']); + } + + if (isset($fontStyleXml->vertAlign, $fontStyleXml->vertAlign['val'])) { + $verticalAlign = strtolower((string) $fontStyleXml->vertAlign['val']); + if ($verticalAlign === 'superscript') { + $fontStyle->setSuperscript(true); + } + if ($verticalAlign === 'subscript') { + $fontStyle->setSubscript(true); + } + } + } + + private static function readNumberFormat(NumberFormat $numfmtStyle, SimpleXMLElement $numfmtStyleXml): void + { + if ($numfmtStyleXml->count() === 0) { + return; + } + $numfmt = $numfmtStyleXml->attributes(); + if ($numfmt->count() > 0 && isset($numfmt['formatCode'])) { + $numfmtStyle->setFormatCode((string) $numfmt['formatCode']); + } + } + + private static function readFillStyle(Fill $fillStyle, SimpleXMLElement $fillStyleXml): void + { + if ($fillStyleXml->gradientFill) { + /** @var SimpleXMLElement $gradientFill */ + $gradientFill = $fillStyleXml->gradientFill[0]; + if (!empty($gradientFill['type'])) { + $fillStyle->setFillType((string) $gradientFill['type']); + } + $fillStyle->setRotation((float) ($gradientFill['degree'])); + $gradientFill->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $fillStyle->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); + $fillStyle->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); + } elseif ($fillStyleXml->patternFill) { + $patternType = (string) $fillStyleXml->patternFill['patternType'] != '' ? (string) $fillStyleXml->patternFill['patternType'] : 'solid'; + $fillStyle->setFillType($patternType); + if ($fillStyleXml->patternFill->fgColor) { + $fillStyle->getStartColor()->setARGB(self::readColor($fillStyleXml->patternFill->fgColor, true)); + } else { + $fillStyle->getStartColor()->setARGB('FF000000'); + } + if ($fillStyleXml->patternFill->bgColor) { + $fillStyle->getEndColor()->setARGB(self::readColor($fillStyleXml->patternFill->bgColor, true)); + } + } + } + + private static function readBorderStyle(Borders $borderStyle, SimpleXMLElement $borderStyleXml): void + { + $diagonalUp = self::boolean((string) $borderStyleXml['diagonalUp']); + $diagonalDown = self::boolean((string) $borderStyleXml['diagonalDown']); + if (!$diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif (!$diagonalUp && $diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } else { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + + self::readBorder($borderStyle->getLeft(), $borderStyleXml->left); + self::readBorder($borderStyle->getRight(), $borderStyleXml->right); + self::readBorder($borderStyle->getTop(), $borderStyleXml->top); + self::readBorder($borderStyle->getBottom(), $borderStyleXml->bottom); + self::readBorder($borderStyle->getDiagonal(), $borderStyleXml->diagonal); + } + + private static function readBorder(Border $border, SimpleXMLElement $borderXml): void + { + if (isset($borderXml['style'])) { + $border->setBorderStyle((string) $borderXml['style']); + } + if (isset($borderXml->color)) { + $border->getColor()->setARGB(self::readColor($borderXml->color)); + } + } + + private static function readAlignmentStyle(Alignment $alignment, SimpleXMLElement $alignmentXml): void + { + $alignment->setHorizontal((string) $alignmentXml->alignment['horizontal']); + $alignment->setVertical((string) $alignmentXml->alignment['vertical']); + + $textRotation = 0; + if ((int) $alignmentXml->alignment['textRotation'] <= 90) { + $textRotation = (int) $alignmentXml->alignment['textRotation']; + } elseif ((int) $alignmentXml->alignment['textRotation'] > 90) { + $textRotation = 90 - (int) $alignmentXml->alignment['textRotation']; + } + + $alignment->setTextRotation((int) $textRotation); + $alignment->setWrapText(self::boolean((string) $alignmentXml->alignment['wrapText'])); + $alignment->setShrinkToFit(self::boolean((string) $alignmentXml->alignment['shrinkToFit'])); + $alignment->setIndent((int) ((string) $alignmentXml->alignment['indent']) > 0 ? (int) ((string) $alignmentXml->alignment['indent']) : 0); + $alignment->setReadOrder((int) ((string) $alignmentXml->alignment['readingOrder']) > 0 ? (int) ((string) $alignmentXml->alignment['readingOrder']) : 0); + } + + private function readStyle(Style $docStyle, $style): void + { + if ($style->numFmt instanceof SimpleXMLElement) { + self::readNumberFormat($docStyle->getNumberFormat(), $style->numFmt); + } else { + $docStyle->getNumberFormat()->setFormatCode($style->numFmt); + } + + if (isset($style->font)) { + self::readFontStyle($docStyle->getFont(), $style->font); + } + + if (isset($style->fill)) { + self::readFillStyle($docStyle->getFill(), $style->fill); + } + + if (isset($style->border)) { + self::readBorderStyle($docStyle->getBorders(), $style->border); + } + + if (isset($style->alignment->alignment)) { + self::readAlignmentStyle($docStyle->getAlignment(), $style->alignment); + } + + // protection + if (isset($style->protection)) { + $this->readProtectionLocked($docStyle, $style); + $this->readProtectionHidden($docStyle, $style); + } + + // top-level style settings + if (isset($style->quotePrefix)) { + $docStyle->setQuotePrefix(true); + } + } + + private function readProtectionLocked(Style $docStyle, $style): void + { + if (isset($style->protection['locked'])) { + if (self::boolean((string) $style->protection['locked'])) { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private function readProtectionHidden(Style $docStyle, $style): void + { + if (isset($style->protection['hidden'])) { + if (self::boolean((string) $style->protection['hidden'])) { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } elseif (isset($color['theme'])) { + if (self::$theme !== null) { + $returnColour = self::$theme->getColourByIndex((int) $color['theme']); + if (isset($color['tint'])) { + $tintAdjust = (float) $color['tint']; + $returnColour = Color::changeBrightness($returnColour, $tintAdjust); + } + + return 'FF' . $returnColour; + } + } + + return ($background) ? 'FFFFFFFF' : 'FF000000'; + } + + public function dxfs($readDataOnly = false) + { + $dxfs = []; + if (!$readDataOnly && $this->styleXml) { + // Conditional Styles + if ($this->styleXml->dxfs) { + foreach ($this->styleXml->dxfs->dxf as $dxf) { + $style = new Style(false, true); + $this->readStyle($style, $dxf); + $dxfs[] = $style; + } + } + // Cell Styles + if ($this->styleXml->cellStyles) { + foreach ($this->styleXml->cellStyles->cellStyle as $cellStyle) { + if ((int) ($cellStyle['builtinId']) == 0) { + if (isset($this->cellStyles[(int) ($cellStyle['xfId'])])) { + // Set default style + $style = new Style(); + $this->readStyle($style, $this->cellStyles[(int) ($cellStyle['xfId'])]); + + // normal style, currently not using it for anything + } + } + } + } + } + + return $dxfs; + } + + public function styles() + { + return $this->styles; + } + + private static function getArrayItem($array, $key = 0) + { + return $array[$key] ?? null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Theme.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Theme.php new file mode 100755 index 0000000..c105f3c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xlsx/Theme.php @@ -0,0 +1,93 @@ +themeName = $themeName; + $this->colourSchemeName = $colourSchemeName; + $this->colourMap = $colourMap; + } + + /** + * Get Theme Name. + * + * @return string + */ + public function getThemeName() + { + return $this->themeName; + } + + /** + * Get colour Scheme Name. + * + * @return string + */ + public function getColourSchemeName() + { + return $this->colourSchemeName; + } + + /** + * Get colour Map Value by Position. + * + * @param mixed $index + * + * @return string + */ + public function getColourByIndex($index) + { + if (isset($this->colourMap[$index])) { + return $this->colourMap[$index]; + } + + return null; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != '_parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xml.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xml.php new file mode 100755 index 0000000..f9ad547 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Reader/Xml.php @@ -0,0 +1,858 @@ +securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + // Office xmlns:o="urn:schemas-microsoft-com:office:office" + // Excel xmlns:x="urn:schemas-microsoft-com:office:excel" + // XML Spreadsheet xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" + // Spreadsheet component xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" + // XML schema xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" + // XML data type xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" + // MS-persist recordset xmlns:rs="urn:schemas-microsoft-com:rowset" + // Rowset xmlns:z="#RowsetSchema" + // + + $signature = [ + '', + ]; + + // Open file + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + + // Read sample data (first 2 KB will do) + $data = fread($fileHandle, 2048); + fclose($fileHandle); + $data = str_replace("'", '"', $data); // fix headers with single quote + + $valid = true; + foreach ($signature as $match) { + // every part of the signature must be present + if (strpos($data, $match) === false) { + $valid = false; + + break; + } + } + + // Retrieve charset encoding + if (preg_match('//um', $data, $matches)) { + $this->charSet = strtoupper($matches[1]); + } + + return $valid; + } + + /** + * Check if the file is a valid SimpleXML. + * + * @param string $pFilename + * + * @return false|SimpleXMLElement + */ + public function trySimpleXMLLoadString($pFilename) + { + try { + $xml = simplexml_load_string( + $this->securityScanner->scan(file_get_contents($pFilename)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + } catch (\Exception $e) { + throw new Exception('Cannot load invalid XML file: ' . $pFilename, 0, $e); + } + + return $xml; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + + $worksheetNames = []; + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $xml_ss = $xml->children($namespaces['ss']); + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + $worksheetNames[] = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $worksheetID = 1; + $xml_ss = $xml->children($namespaces['ss']); + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + + $tmpInfo = []; + $tmpInfo['worksheetName'] = ''; + $tmpInfo['lastColumnLetter'] = 'A'; + $tmpInfo['lastColumnIndex'] = 0; + $tmpInfo['totalRows'] = 0; + $tmpInfo['totalColumns'] = 0; + + if (isset($worksheet_ss['Name'])) { + $tmpInfo['worksheetName'] = (string) $worksheet_ss['Name']; + } else { + $tmpInfo['worksheetName'] = "Worksheet_{$worksheetID}"; + } + + if (isset($worksheet->Table->Row)) { + $rowIndex = 0; + + foreach ($worksheet->Table->Row as $rowData) { + $columnIndex = 0; + $rowHasData = false; + + foreach ($rowData->Cell as $cell) { + if (isset($cell->Data)) { + $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); + $rowHasData = true; + } + + ++$columnIndex; + } + + ++$rowIndex; + + if ($rowHasData) { + $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); + } + } + } + + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; + + $worksheetInfo[] = $tmpInfo; + ++$worksheetID; + } + + return $worksheetInfo; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + $spreadsheet->removeSheetByIndex(0); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + private static function identifyFixedStyleValue($styleList, &$styleAttributeValue) + { + $styleAttributeValue = strtolower($styleAttributeValue); + foreach ($styleList as $style) { + if ($styleAttributeValue == strtolower($style)) { + $styleAttributeValue = $style; + + return true; + } + } + + return false; + } + + /** + * pixel units to excel width units(units of 1/256th of a character width). + * + * @param float $pxs + * + * @return float + */ + protected static function pixel2WidthUnits($pxs) + { + $UNIT_OFFSET_MAP = [0, 36, 73, 109, 146, 182, 219]; + + $widthUnits = 256 * ($pxs / 7); + $widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)]; + + return $widthUnits; + } + + /** + * excel width units(units of 1/256th of a character width) to pixel units. + * + * @param float $widthUnits + * + * @return float + */ + protected static function widthUnits2Pixel($widthUnits) + { + $pixels = ($widthUnits / 256) * 7; + $offsetWidthUnits = $widthUnits % 256; + + return $pixels + round($offsetWidthUnits / (256 / 7)); + } + + protected static function hex2str($hex) + { + return chr(hexdec($hex[1])); + } + + /** + * Loads from file into Spreadsheet instance. + * + * @param string $pFilename + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + File::assertFile($pFilename); + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $docProps = $spreadsheet->getProperties(); + if (isset($xml->DocumentProperties[0])) { + foreach ($xml->DocumentProperties[0] as $propertyName => $propertyValue) { + switch ($propertyName) { + case 'Title': + $docProps->setTitle(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Subject': + $docProps->setSubject(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Author': + $docProps->setCreator(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Created': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + + break; + case 'LastAuthor': + $docProps->setLastModifiedBy(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'LastSaved': + $lastSaveDate = strtotime($propertyValue); + $docProps->setModified($lastSaveDate); + + break; + case 'Company': + $docProps->setCompany(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Category': + $docProps->setCategory(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Manager': + $docProps->setManager(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Keywords': + $docProps->setKeywords(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Description': + $docProps->setDescription(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + } + } + } + if (isset($xml->CustomDocumentProperties)) { + foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) { + $propertyAttributes = $propertyValue->attributes($namespaces['dt']); + $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', ['self', 'hex2str'], $propertyName); + $propertyType = Properties::PROPERTY_TYPE_UNKNOWN; + switch ((string) $propertyAttributes) { + case 'string': + $propertyType = Properties::PROPERTY_TYPE_STRING; + $propertyValue = trim($propertyValue); + + break; + case 'boolean': + $propertyType = Properties::PROPERTY_TYPE_BOOLEAN; + $propertyValue = (bool) $propertyValue; + + break; + case 'integer': + $propertyType = Properties::PROPERTY_TYPE_INTEGER; + $propertyValue = (int) $propertyValue; + + break; + case 'float': + $propertyType = Properties::PROPERTY_TYPE_FLOAT; + $propertyValue = (float) $propertyValue; + + break; + case 'dateTime.tz': + $propertyType = Properties::PROPERTY_TYPE_DATE; + $propertyValue = strtotime(trim($propertyValue)); + + break; + } + $docProps->setCustomProperty($propertyName, $propertyValue, $propertyType); + } + } + + $this->parseStyles($xml, $namespaces); + + $worksheetID = 0; + $xml_ss = $xml->children($namespaces['ss']); + + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + + if ((isset($this->loadSheetsOnly)) && (isset($worksheet_ss['Name'])) && + (!in_array($worksheet_ss['Name'], $this->loadSheetsOnly))) { + continue; + } + + // Create new Worksheet + $spreadsheet->createSheet(); + $spreadsheet->setActiveSheetIndex($worksheetID); + if (isset($worksheet_ss['Name'])) { + $worksheetName = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in + // formula cells... during the load, all formulae should be correct, and we're simply bringing + // the worksheet name in line with the formula, not the reverse + $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + } + + $columnID = 'A'; + if (isset($worksheet->Table->Column)) { + foreach ($worksheet->Table->Column as $columnData) { + $columnData_ss = $columnData->attributes($namespaces['ss']); + if (isset($columnData_ss['Index'])) { + $columnID = Coordinate::stringFromColumnIndex((int) $columnData_ss['Index']); + } + if (isset($columnData_ss['Width'])) { + $columnWidth = $columnData_ss['Width']; + $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4); + } + ++$columnID; + } + } + + $rowID = 1; + if (isset($worksheet->Table->Row)) { + $additionalMergedCells = 0; + foreach ($worksheet->Table->Row as $rowData) { + $rowHasData = false; + $row_ss = $rowData->attributes($namespaces['ss']); + if (isset($row_ss['Index'])) { + $rowID = (int) $row_ss['Index']; + } + + $columnID = 'A'; + foreach ($rowData->Cell as $cell) { + $cell_ss = $cell->attributes($namespaces['ss']); + if (isset($cell_ss['Index'])) { + $columnID = Coordinate::stringFromColumnIndex((int) $cell_ss['Index']); + } + $cellRange = $columnID . $rowID; + + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; + + continue; + } + } + + if (isset($cell_ss['HRef'])) { + $spreadsheet->getActiveSheet()->getCell($cellRange)->getHyperlink()->setUrl($cell_ss['HRef']); + } + + if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) { + $columnTo = $columnID; + if (isset($cell_ss['MergeAcross'])) { + $additionalMergedCells += (int) $cell_ss['MergeAcross']; + $columnTo = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($columnID) + $cell_ss['MergeAcross']); + } + $rowTo = $rowID; + if (isset($cell_ss['MergeDown'])) { + $rowTo = $rowTo + $cell_ss['MergeDown']; + } + $cellRange .= ':' . $columnTo . $rowTo; + $spreadsheet->getActiveSheet()->mergeCells($cellRange); + } + + $cellIsSet = $hasCalculatedValue = false; + $cellDataFormula = ''; + if (isset($cell_ss['Formula'])) { + $cellDataFormula = $cell_ss['Formula']; + $hasCalculatedValue = true; + } + if (isset($cell->Data)) { + $cellValue = $cellData = $cell->Data; + $type = DataType::TYPE_NULL; + $cellData_ss = $cellData->attributes($namespaces['ss']); + if (isset($cellData_ss['Type'])) { + $cellDataType = $cellData_ss['Type']; + switch ($cellDataType) { + /* + const TYPE_STRING = 's'; + const TYPE_FORMULA = 'f'; + const TYPE_NUMERIC = 'n'; + const TYPE_BOOL = 'b'; + const TYPE_NULL = 'null'; + const TYPE_INLINE = 'inlineStr'; + const TYPE_ERROR = 'e'; + */ + case 'String': + $cellValue = self::convertStringEncoding($cellValue, $this->charSet); + $type = DataType::TYPE_STRING; + + break; + case 'Number': + $type = DataType::TYPE_NUMERIC; + $cellValue = (float) $cellValue; + if (floor($cellValue) == $cellValue) { + $cellValue = (int) $cellValue; + } + + break; + case 'Boolean': + $type = DataType::TYPE_BOOL; + $cellValue = ($cellValue != 0); + + break; + case 'DateTime': + $type = DataType::TYPE_NUMERIC; + $cellValue = Date::PHPToExcel(strtotime($cellValue . ' UTC')); + + break; + case 'Error': + $type = DataType::TYPE_ERROR; + + break; + } + } + + if ($hasCalculatedValue) { + $type = DataType::TYPE_FORMULA; + $columnNumber = Coordinate::columnIndexFromString($columnID); + if (substr($cellDataFormula, 0, 3) == 'of:') { + $cellDataFormula = substr($cellDataFormula, 3); + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($key = !$key) { + $value = str_replace(['[.', '.', ']'], '', $value); + } + } + } else { + // Convert R1C1 style references to A1 style references (but only when not quoted) + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($key = !$key) { + preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); + // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way + // through the formula from left to right. Reversing means that we work right to left.through + // the formula + $cellReferences = array_reverse($cellReferences); + // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, + // then modify the formula to use that new reference + foreach ($cellReferences as $cellReference) { + $rowReference = $cellReference[2][0]; + // Empty R reference is the current row + if ($rowReference == '') { + $rowReference = $rowID; + } + // Bracketed R references are relative to the current row + if ($rowReference[0] == '[') { + $rowReference = $rowID + trim($rowReference, '[]'); + } + $columnReference = $cellReference[4][0]; + // Empty C reference is the current column + if ($columnReference == '') { + $columnReference = $columnNumber; + } + // Bracketed C references are relative to the current column + if ($columnReference[0] == '[') { + $columnReference = $columnNumber + trim($columnReference, '[]'); + } + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; + $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); + } + } + } + } + unset($value); + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + } + + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type); + if ($hasCalculatedValue) { + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue); + } + $cellIsSet = $rowHasData = true; + } + + if (isset($cell->Comment)) { + $commentAttributes = $cell->Comment->attributes($namespaces['ss']); + $author = 'unknown'; + if (isset($commentAttributes->Author)) { + $author = (string) $commentAttributes->Author; + } + $node = $cell->Comment->Data->asXML(); + $annotation = strip_tags($node); + $spreadsheet->getActiveSheet()->getComment($columnID . $rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation)); + } + + if (($cellIsSet) && (isset($cell_ss['StyleID']))) { + $style = (string) $cell_ss['StyleID']; + if ((isset($this->styles[$style])) && (!empty($this->styles[$style]))) { + if (!$spreadsheet->getActiveSheet()->cellExists($columnID . $rowID)) { + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValue(null); + } + $spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]); + } + } + ++$columnID; + while ($additionalMergedCells > 0) { + ++$columnID; + --$additionalMergedCells; + } + } + + if ($rowHasData) { + if (isset($row_ss['Height'])) { + $rowHeight = $row_ss['Height']; + $spreadsheet->getActiveSheet()->getRowDimension($rowID)->setRowHeight($rowHeight); + } + } + + ++$rowID; + } + } + ++$worksheetID; + } + + // Return + return $spreadsheet; + } + + protected static function convertStringEncoding($string, $charset) + { + if ($charset != 'UTF-8') { + return StringHelper::convertEncoding($string, 'UTF-8', $charset); + } + + return $string; + } + + protected function parseRichText($is) + { + $value = new RichText(); + + $value->createText(self::convertStringEncoding($is, $this->charSet)); + + return $value; + } + + private function parseStyles(SimpleXMLElement $xml, array $namespaces): void + { + if (!isset($xml->Styles)) { + return; + } + + foreach ($xml->Styles[0] as $style) { + $style_ss = $style->attributes($namespaces['ss']); + $styleID = (string) $style_ss['ID']; + $this->styles[$styleID] = (isset($this->styles['Default'])) ? $this->styles['Default'] : []; + foreach ($style as $styleType => $styleData) { + $styleAttributes = $styleData->attributes($namespaces['ss']); + switch ($styleType) { + case 'Alignment': + $this->parseStyleAlignment($styleID, $styleAttributes); + + break; + case 'Borders': + $this->parseStyleBorders($styleID, $styleData, $namespaces); + + break; + case 'Font': + $this->parseStyleFont($styleID, $styleAttributes); + + break; + case 'Interior': + $this->parseStyleInterior($styleID, $styleAttributes); + + break; + case 'NumberFormat': + $this->parseStyleNumberFormat($styleID, $styleAttributes); + + break; + } + } + } + } + + /** + * @param string $styleID + */ + private function parseStyleAlignment($styleID, SimpleXMLElement $styleAttributes): void + { + $verticalAlignmentStyles = [ + Alignment::VERTICAL_BOTTOM, + Alignment::VERTICAL_TOP, + Alignment::VERTICAL_CENTER, + Alignment::VERTICAL_JUSTIFY, + ]; + $horizontalAlignmentStyles = [ + Alignment::HORIZONTAL_GENERAL, + Alignment::HORIZONTAL_LEFT, + Alignment::HORIZONTAL_RIGHT, + Alignment::HORIZONTAL_CENTER, + Alignment::HORIZONTAL_CENTER_CONTINUOUS, + Alignment::HORIZONTAL_JUSTIFY, + ]; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = (string) $styleAttributeValue; + switch ($styleAttributeKey) { + case 'Vertical': + if (self::identifyFixedStyleValue($verticalAlignmentStyles, $styleAttributeValue)) { + $this->styles[$styleID]['alignment']['vertical'] = $styleAttributeValue; + } + + break; + case 'Horizontal': + if (self::identifyFixedStyleValue($horizontalAlignmentStyles, $styleAttributeValue)) { + $this->styles[$styleID]['alignment']['horizontal'] = $styleAttributeValue; + } + + break; + case 'WrapText': + $this->styles[$styleID]['alignment']['wrapText'] = true; + + break; + } + } + } + + /** + * @param $styleID + */ + private function parseStyleBorders($styleID, SimpleXMLElement $styleData, array $namespaces): void + { + foreach ($styleData->Border as $borderStyle) { + $borderAttributes = $borderStyle->attributes($namespaces['ss']); + $thisBorder = []; + foreach ($borderAttributes as $borderStyleKey => $borderStyleValue) { + switch ($borderStyleKey) { + case 'LineStyle': + $thisBorder['borderStyle'] = Border::BORDER_MEDIUM; + + break; + case 'Weight': + break; + case 'Position': + $borderPosition = strtolower($borderStyleValue); + + break; + case 'Color': + $borderColour = substr($borderStyleValue, 1); + $thisBorder['color']['rgb'] = $borderColour; + + break; + } + } + if (!empty($thisBorder)) { + if (($borderPosition == 'left') || ($borderPosition == 'right') || ($borderPosition == 'top') || ($borderPosition == 'bottom')) { + $this->styles[$styleID]['borders'][$borderPosition] = $thisBorder; + } + } + } + } + + /** + * @param $styleID + */ + private function parseStyleFont($styleID, SimpleXMLElement $styleAttributes): void + { + $underlineStyles = [ + Font::UNDERLINE_NONE, + Font::UNDERLINE_DOUBLE, + Font::UNDERLINE_DOUBLEACCOUNTING, + Font::UNDERLINE_SINGLE, + Font::UNDERLINE_SINGLEACCOUNTING, + ]; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = (string) $styleAttributeValue; + switch ($styleAttributeKey) { + case 'FontName': + $this->styles[$styleID]['font']['name'] = $styleAttributeValue; + + break; + case 'Size': + $this->styles[$styleID]['font']['size'] = $styleAttributeValue; + + break; + case 'Color': + $this->styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue, 1); + + break; + case 'Bold': + $this->styles[$styleID]['font']['bold'] = true; + + break; + case 'Italic': + $this->styles[$styleID]['font']['italic'] = true; + + break; + case 'Underline': + if (self::identifyFixedStyleValue($underlineStyles, $styleAttributeValue)) { + $this->styles[$styleID]['font']['underline'] = $styleAttributeValue; + } + + break; + } + } + } + + /** + * @param $styleID + */ + private function parseStyleInterior($styleID, SimpleXMLElement $styleAttributes): void + { + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + switch ($styleAttributeKey) { + case 'Color': + $this->styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue, 1); + + break; + case 'Pattern': + $this->styles[$styleID]['fill']['fillType'] = strtolower($styleAttributeValue); + + break; + } + } + } + + /** + * @param $styleID + */ + private function parseStyleNumberFormat($styleID, SimpleXMLElement $styleAttributes): void + { + $fromFormats = ['\-', '\ ']; + $toFormats = ['-', ' ']; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = str_replace($fromFormats, $toFormats, $styleAttributeValue); + switch ($styleAttributeValue) { + case 'Short Date': + $styleAttributeValue = 'dd/mm/yyyy'; + + break; + } + + if ($styleAttributeValue > '') { + $this->styles[$styleID]['numberFormat']['formatCode'] = $styleAttributeValue; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/ReferenceHelper.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/ReferenceHelper.php new file mode 100755 index 0000000..0b0f6dd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/ReferenceHelper.php @@ -0,0 +1,898 @@ += ($beforeRow + $pNumRows)) && + ($cellRow < $beforeRow)) { + return true; + } elseif ($pNumCols < 0 && + ($cellColumnIndex >= ($beforeColumnIndex + $pNumCols)) && + ($cellColumnIndex < $beforeColumnIndex)) { + return true; + } + + return false; + } + + /** + * Update page breaks when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustPageBreaks(Worksheet $pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aBreaks = $pSheet->getBreaks(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellSort']); + + foreach ($aBreaks as $key => $value) { + if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { + // If we're deleting, then clear any defined breaks that are within the range + // of rows/columns that we're deleting + $pSheet->setBreak($key, Worksheet::BREAK_NONE); + } else { + // Otherwise update any affected breaks by inserting a new break at the appropriate point + // and removing the old affected break + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setBreak($newReference, $value) + ->setBreak($key, Worksheet::BREAK_NONE); + } + } + } + } + + /** + * Update cell comments when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aComments = $pSheet->getComments(); + $aNewComments = []; // the new array of all comments + + foreach ($aComments as $key => &$value) { + // Any comments inside a deleted range will be ignored + if (!self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { + // Otherwise build a new array of comments indexed by the adjusted cell reference + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + $aNewComments[$newReference] = $value; + } + } + // Replace the comments array with the new set of comments + $pSheet->setComments($aNewComments); + } + + /** + * Update hyperlinks when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aHyperlinkCollection = $pSheet->getHyperlinkCollection(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']); + + foreach ($aHyperlinkCollection as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setHyperlink($newReference, $value); + $pSheet->setHyperlink($key, null); + } + } + } + + /** + * Update data validations when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aDataValidationCollection = $pSheet->getDataValidationCollection(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellSort']); + + foreach ($aDataValidationCollection as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setDataValidation($newReference, $value); + $pSheet->setDataValidation($key, null); + } + } + } + + /** + * Update merged cells when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aMergeCells = $pSheet->getMergeCells(); + $aNewMergeCells = []; // the new array of all merge cells + foreach ($aMergeCells as $key => &$value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + $aNewMergeCells[$newReference] = $newReference; + } + $pSheet->setMergeCells($aNewMergeCells); // replace the merge cells array + } + + /** + * Update protected cells when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aProtectedCells = $pSheet->getProtectedCells(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellSort']); + foreach ($aProtectedCells as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->protectCells($newReference, $value, true); + $pSheet->unprotectCells($key); + } + } + } + + /** + * Update column dimensions when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aColumnDimensions = array_reverse($pSheet->getColumnDimensions(), true); + if (!empty($aColumnDimensions)) { + foreach ($aColumnDimensions as $objColumnDimension) { + $newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows); + [$newReference] = Coordinate::coordinateFromString($newReference); + if ($objColumnDimension->getColumnIndex() != $newReference) { + $objColumnDimension->setColumnIndex($newReference); + } + } + $pSheet->refreshColumnDimensions(); + } + } + + /** + * Update row dimensions when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows): void + { + $aRowDimensions = array_reverse($pSheet->getRowDimensions(), true); + if (!empty($aRowDimensions)) { + foreach ($aRowDimensions as $objRowDimension) { + $newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows); + [, $newReference] = Coordinate::coordinateFromString($newReference); + if ($objRowDimension->getRowIndex() != $newReference) { + $objRowDimension->setRowIndex($newReference); + } + } + $pSheet->refreshRowDimensions(); + + $copyDimension = $pSheet->getRowDimension($beforeRow - 1); + for ($i = $beforeRow; $i <= $beforeRow - 1 + $pNumRows; ++$i) { + $newDimension = $pSheet->getRowDimension($i); + $newDimension->setRowHeight($copyDimension->getRowHeight()); + $newDimension->setVisible($copyDimension->getVisible()); + $newDimension->setOutlineLevel($copyDimension->getOutlineLevel()); + $newDimension->setCollapsed($copyDimension->getCollapsed()); + } + } + } + + /** + * Insert a new column or row, updating all possible related data. + * + * @param string $pBefore Insert before this cell address (e.g. 'A1') + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + * @param Worksheet $pSheet The worksheet that we're editing + */ + public function insertNewBefore($pBefore, $pNumCols, $pNumRows, Worksheet $pSheet): void + { + $remove = ($pNumCols < 0 || $pNumRows < 0); + $allCoordinates = $pSheet->getCoordinates(); + + // Get coordinate of $pBefore + [$beforeColumn, $beforeRow] = Coordinate::coordinateFromString($pBefore); + $beforeColumnIndex = Coordinate::columnIndexFromString($beforeColumn); + + // Clear cells if we are removing columns or rows + $highestColumn = $pSheet->getHighestColumn(); + $highestRow = $pSheet->getHighestRow(); + + // 1. Clear column strips if we are removing columns + if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) { + for ($i = 1; $i <= $highestRow - 1; ++$i) { + for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) { + $coordinate = Coordinate::stringFromColumnIndex($j + 1) . $i; + $pSheet->removeConditionalStyles($coordinate); + if ($pSheet->cellExists($coordinate)) { + $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); + $pSheet->getCell($coordinate)->setXfIndex(0); + } + } + } + } + + // 2. Clear row strips if we are removing rows + if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) { + for ($i = $beforeColumnIndex - 1; $i <= Coordinate::columnIndexFromString($highestColumn) - 1; ++$i) { + for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) { + $coordinate = Coordinate::stringFromColumnIndex($i + 1) . $j; + $pSheet->removeConditionalStyles($coordinate); + if ($pSheet->cellExists($coordinate)) { + $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); + $pSheet->getCell($coordinate)->setXfIndex(0); + } + } + } + } + + // Loop through cells, bottom-up, and change cell coordinate + if ($remove) { + // It's faster to reverse and pop than to use unshift, especially with large cell collections + $allCoordinates = array_reverse($allCoordinates); + } + while ($coordinate = array_pop($allCoordinates)) { + $cell = $pSheet->getCell($coordinate); + $cellIndex = Coordinate::columnIndexFromString($cell->getColumn()); + + if ($cellIndex - 1 + $pNumCols < 0) { + continue; + } + + // New coordinate + $newCoordinate = Coordinate::stringFromColumnIndex($cellIndex + $pNumCols) . ($cell->getRow() + $pNumRows); + + // Should the cell be updated? Move value and cellXf index from one cell to another. + if (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) { + // Update cell styles + $pSheet->getCell($newCoordinate)->setXfIndex($cell->getXfIndex()); + + // Insert this cell at its new location + if ($cell->getDataType() == DataType::TYPE_FORMULA) { + // Formula should be adjusted + $pSheet->getCell($newCoordinate) + ->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); + } else { + // Formula should not be adjusted + $pSheet->getCell($newCoordinate)->setValue($cell->getValue()); + } + + // Clear the original cell + $pSheet->getCellCollection()->delete($coordinate); + } else { + /* We don't need to update styles for rows/columns before our insertion position, + but we do still need to adjust any formulae in those cells */ + if ($cell->getDataType() == DataType::TYPE_FORMULA) { + // Formula should be adjusted + $cell->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); + } + } + } + + // Duplicate styles for the newly inserted cells + $highestColumn = $pSheet->getHighestColumn(); + $highestRow = $pSheet->getHighestRow(); + + if ($pNumCols > 0 && $beforeColumnIndex - 2 > 0) { + for ($i = $beforeRow; $i <= $highestRow - 1; ++$i) { + // Style + $coordinate = Coordinate::stringFromColumnIndex($beforeColumnIndex - 1) . $i; + if ($pSheet->cellExists($coordinate)) { + $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); + $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? + $pSheet->getConditionalStyles($coordinate) : false; + for ($j = $beforeColumnIndex; $j <= $beforeColumnIndex - 1 + $pNumCols; ++$j) { + $pSheet->getCellByColumnAndRow($j, $i)->setXfIndex($xfIndex); + if ($conditionalStyles) { + $cloned = []; + foreach ($conditionalStyles as $conditionalStyle) { + $cloned[] = clone $conditionalStyle; + } + $pSheet->setConditionalStyles(Coordinate::stringFromColumnIndex($j) . $i, $cloned); + } + } + } + } + } + + if ($pNumRows > 0 && $beforeRow - 1 > 0) { + for ($i = $beforeColumnIndex; $i <= Coordinate::columnIndexFromString($highestColumn); ++$i) { + // Style + $coordinate = Coordinate::stringFromColumnIndex($i) . ($beforeRow - 1); + if ($pSheet->cellExists($coordinate)) { + $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); + $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? + $pSheet->getConditionalStyles($coordinate) : false; + for ($j = $beforeRow; $j <= $beforeRow - 1 + $pNumRows; ++$j) { + $pSheet->getCell(Coordinate::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex); + if ($conditionalStyles) { + $cloned = []; + foreach ($conditionalStyles as $conditionalStyle) { + $cloned[] = clone $conditionalStyle; + } + $pSheet->setConditionalStyles(Coordinate::stringFromColumnIndex($i) . $j, $cloned); + } + } + } + } + } + + // Update worksheet: column dimensions + $this->adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: row dimensions + $this->adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: page breaks + $this->adjustPageBreaks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: comments + $this->adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: hyperlinks + $this->adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: data validations + $this->adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: merge cells + $this->adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: protected cells + $this->adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: autofilter + $autoFilter = $pSheet->getAutoFilter(); + $autoFilterRange = $autoFilter->getRange(); + if (!empty($autoFilterRange)) { + if ($pNumCols != 0) { + $autoFilterColumns = $autoFilter->getColumns(); + if (count($autoFilterColumns) > 0) { + $column = ''; + $row = 0; + sscanf($pBefore, '%[A-Z]%d', $column, $row); + $columnIndex = Coordinate::columnIndexFromString($column); + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($autoFilterRange); + if ($columnIndex <= $rangeEnd[0]) { + if ($pNumCols < 0) { + // If we're actually deleting any columns that fall within the autofilter range, + // then we delete any rules for those columns + $deleteColumn = $columnIndex + $pNumCols - 1; + $deleteCount = abs($pNumCols); + for ($i = 1; $i <= $deleteCount; ++$i) { + if (isset($autoFilterColumns[Coordinate::stringFromColumnIndex($deleteColumn + 1)])) { + $autoFilter->clearColumn(Coordinate::stringFromColumnIndex($deleteColumn + 1)); + } + ++$deleteColumn; + } + } + $startCol = ($columnIndex > $rangeStart[0]) ? $columnIndex : $rangeStart[0]; + + // Shuffle columns in autofilter range + if ($pNumCols > 0) { + $startColRef = $startCol; + $endColRef = $rangeEnd[0]; + $toColRef = $rangeEnd[0] + $pNumCols; + + do { + $autoFilter->shiftColumn(Coordinate::stringFromColumnIndex($endColRef), Coordinate::stringFromColumnIndex($toColRef)); + --$endColRef; + --$toColRef; + } while ($startColRef <= $endColRef); + } else { + // For delete, we shuffle from beginning to end to avoid overwriting + $startColID = Coordinate::stringFromColumnIndex($startCol); + $toColID = Coordinate::stringFromColumnIndex($startCol + $pNumCols); + $endColID = Coordinate::stringFromColumnIndex($rangeEnd[0] + 1); + do { + $autoFilter->shiftColumn($startColID, $toColID); + ++$startColID; + ++$toColID; + } while ($startColID != $endColID); + } + } + } + } + $pSheet->setAutoFilter($this->updateCellReference($autoFilterRange, $pBefore, $pNumCols, $pNumRows)); + } + + // Update worksheet: freeze pane + if ($pSheet->getFreezePane()) { + $splitCell = $pSheet->getFreezePane(); + $topLeftCell = $pSheet->getTopLeftCell(); + + $splitCell = $this->updateCellReference($splitCell, $pBefore, $pNumCols, $pNumRows); + $topLeftCell = $this->updateCellReference($topLeftCell, $pBefore, $pNumCols, $pNumRows); + + $pSheet->freezePane($splitCell, $topLeftCell); + } + + // Page setup + if ($pSheet->getPageSetup()->isPrintAreaSet()) { + $pSheet->getPageSetup()->setPrintArea($this->updateCellReference($pSheet->getPageSetup()->getPrintArea(), $pBefore, $pNumCols, $pNumRows)); + } + + // Update worksheet: drawings + $aDrawings = $pSheet->getDrawingCollection(); + foreach ($aDrawings as $objDrawing) { + $newReference = $this->updateCellReference($objDrawing->getCoordinates(), $pBefore, $pNumCols, $pNumRows); + if ($objDrawing->getCoordinates() != $newReference) { + $objDrawing->setCoordinates($newReference); + } + } + + // Update workbook: named ranges + if (count($pSheet->getParent()->getNamedRanges()) > 0) { + foreach ($pSheet->getParent()->getNamedRanges() as $namedRange) { + if ($namedRange->getWorksheet()->getHashCode() == $pSheet->getHashCode()) { + $namedRange->setRange($this->updateCellReference($namedRange->getRange(), $pBefore, $pNumCols, $pNumRows)); + } + } + } + + // Garbage collect + $pSheet->garbageCollect(); + } + + /** + * Update references within formulas. + * + * @param string $pFormula Formula to update + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to insert + * @param int $pNumRows Number of rows to insert + * @param string $sheetName Worksheet name/title + * + * @return string Updated formula + */ + public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') + { + // Update cell references in the formula + $formulaBlocks = explode('"', $pFormula); + $i = false; + foreach ($formulaBlocks as &$formulaBlock) { + // Ignore blocks that were enclosed in quotes (alternating entries in the $formulaBlocks array after the explode) + if ($i = !$i) { + $adjustCount = 0; + $newCellTokens = $cellTokens = []; + // Search for row ranges (e.g. 'Sheet1'!3:5 or 3:5) with or without $ absolutes (e.g. $3:5) + $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_ROWRANGE . '/i', ' ' . $formulaBlock . ' ', $matches, PREG_SET_ORDER); + if ($matchCount > 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = substr($this->updateCellReference('$A' . $match[3], $pBefore, $pNumCols, $pNumRows), 2); + $modified4 = substr($this->updateCellReference('$A' . $match[4], $pBefore, $pNumCols, $pNumRows), 2); + + if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = 100000; + $row = 10000000 + trim($match[3], '$'); + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = substr($this->updateCellReference($match[3] . '$1', $pBefore, $pNumCols, $pNumRows), 0, -2); + $modified4 = substr($this->updateCellReference($match[4] . '$1', $pBefore, $pNumCols, $pNumRows), 0, -2); + + if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($match[3], '$')) + 100000; + $row = 10000000; + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); + $modified4 = $this->updateCellReference($match[4], $pBefore, $pNumCols, $pNumRows); + + if ($match[3] . $match[4] !== $modified3 . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + [$column, $row] = Coordinate::coordinateFromString($match[3]); + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; + $row = trim($row, '$') + 10000000; + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3]; + + $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); + if ($match[3] !== $modified3) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3; + [$column, $row] = Coordinate::coordinateFromString($match[3]); + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; + $row = trim($row, '$') + 10000000; + $cellIndex = $row . $column; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + if ($pNumCols > 0 || $pNumRows > 0) { + krsort($cellTokens); + krsort($newCellTokens); + } else { + ksort($cellTokens); + ksort($newCellTokens); + } // Update cell references in the formula + $formulaBlock = str_replace('\\', '', preg_replace($cellTokens, $newCellTokens, $formulaBlock)); + } + } + } + unset($formulaBlock); + + // Then rebuild the formula string + return implode('"', $formulaBlocks); + } + + /** + * Update cell reference. + * + * @param string $pCellRange Cell range + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @return string Updated cell range + */ + public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + // Is it in another worksheet? Will not have to update anything. + if (strpos($pCellRange, '!') !== false) { + return $pCellRange; + // Is it a range or a single cell? + } elseif (!Coordinate::coordinateIsRange($pCellRange)) { + // Single cell + return $this->updateSingleCellReference($pCellRange, $pBefore, $pNumCols, $pNumRows); + } elseif (Coordinate::coordinateIsRange($pCellRange)) { + // Range + return $this->updateCellRange($pCellRange, $pBefore, $pNumCols, $pNumRows); + } + + // Return original + return $pCellRange; + } + + /** + * Update named formulas (i.e. containing worksheet references / named ranges). + * + * @param Spreadsheet $spreadsheet Object to update + * @param string $oldName Old name (name to replace) + * @param string $newName New name + */ + public function updateNamedFormulas(Spreadsheet $spreadsheet, $oldName = '', $newName = ''): void + { + if ($oldName == '') { + return; + } + + foreach ($spreadsheet->getWorksheetIterator() as $sheet) { + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + if (($cell !== null) && ($cell->getDataType() == DataType::TYPE_FORMULA)) { + $formula = $cell->getValue(); + if (strpos($formula, $oldName) !== false) { + $formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula); + $formula = str_replace($oldName . '!', $newName . '!', $formula); + $cell->setValueExplicit($formula, DataType::TYPE_FORMULA); + } + } + } + } + } + + /** + * Update cell range. + * + * @param string $pCellRange Cell range (e.g. 'B2:D4', 'B:C' or '2:3') + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @return string Updated cell range + */ + private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + if (!Coordinate::coordinateIsRange($pCellRange)) { + throw new Exception('Only cell ranges may be passed to this method.'); + } + + // Update range + $range = Coordinate::splitRange($pCellRange); + $ic = count($range); + for ($i = 0; $i < $ic; ++$i) { + $jc = count($range[$i]); + for ($j = 0; $j < $jc; ++$j) { + if (ctype_alpha($range[$i][$j])) { + $r = Coordinate::coordinateFromString($this->updateSingleCellReference($range[$i][$j] . '1', $pBefore, $pNumCols, $pNumRows)); + $range[$i][$j] = $r[0]; + } elseif (ctype_digit($range[$i][$j])) { + $r = Coordinate::coordinateFromString($this->updateSingleCellReference('A' . $range[$i][$j], $pBefore, $pNumCols, $pNumRows)); + $range[$i][$j] = $r[1]; + } else { + $range[$i][$j] = $this->updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows); + } + } + } + + // Recreate range string + return Coordinate::buildRange($range); + } + + /** + * Update single cell reference. + * + * @param string $pCellReference Single cell reference + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @return string Updated cell reference + */ + private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + if (Coordinate::coordinateIsRange($pCellReference)) { + throw new Exception('Only single cell references may be passed to this method.'); + } + + // Get coordinate of $pBefore + [$beforeColumn, $beforeRow] = Coordinate::coordinateFromString($pBefore); + + // Get coordinate of $pCellReference + [$newColumn, $newRow] = Coordinate::coordinateFromString($pCellReference); + + // Verify which parts should be updated + $updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && (Coordinate::columnIndexFromString($newColumn) >= Coordinate::columnIndexFromString($beforeColumn))); + $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') && $newRow >= $beforeRow); + + // Create new column reference + if ($updateColumn) { + $newColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($newColumn) + $pNumCols); + } + + // Create new row reference + if ($updateRow) { + $newRow = $newRow + $pNumRows; + } + + // Return new reference + return $newColumn . $newRow; + } + + /** + * __clone implementation. Cloning should not be allowed in a Singleton! + */ + final public function __clone() + { + throw new Exception('Cloning a Singleton is not allowed!'); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/ITextElement.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/ITextElement.php new file mode 100755 index 0000000..6995467 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/ITextElement.php @@ -0,0 +1,36 @@ +richTextElements = []; + + // Rich-Text string attached to cell? + if ($pCell !== null) { + // Add cell text and style + if ($pCell->getValue() != '') { + $objRun = new Run($pCell->getValue()); + $objRun->setFont(clone $pCell->getWorksheet()->getStyle($pCell->getCoordinate())->getFont()); + $this->addText($objRun); + } + + // Set parent value + $pCell->setValueExplicit($this, DataType::TYPE_STRING); + } + } + + /** + * Add text. + * + * @param ITextElement $pText Rich text element + * + * @return $this + */ + public function addText(ITextElement $pText) + { + $this->richTextElements[] = $pText; + + return $this; + } + + /** + * Create text. + * + * @param string $pText Text + * + * @return TextElement + */ + public function createText($pText) + { + $objText = new TextElement($pText); + $this->addText($objText); + + return $objText; + } + + /** + * Create text run. + * + * @param string $pText Text + * + * @return Run + */ + public function createTextRun($pText) + { + $objText = new Run($pText); + $this->addText($objText); + + return $objText; + } + + /** + * Get plain text. + * + * @return string + */ + public function getPlainText() + { + // Return value + $returnValue = ''; + + // Loop through all ITextElements + foreach ($this->richTextElements as $text) { + $returnValue .= $text->getText(); + } + + return $returnValue; + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return $this->getPlainText(); + } + + /** + * Get Rich Text elements. + * + * @return ITextElement[] + */ + public function getRichTextElements() + { + return $this->richTextElements; + } + + /** + * Set Rich Text elements. + * + * @param ITextElement[] $textElements Array of elements + * + * @return $this + */ + public function setRichTextElements(array $textElements) + { + $this->richTextElements = $textElements; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + $hashElements = ''; + foreach ($this->richTextElements as $element) { + $hashElements .= $element->getHashCode(); + } + + return md5( + $hashElements . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/Run.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/Run.php new file mode 100755 index 0000000..592d0e3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/Run.php @@ -0,0 +1,65 @@ +font = new Font(); + } + + /** + * Get font. + * + * @return null|\PhpOffice\PhpSpreadsheet\Style\Font + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. + * + * @param Font $pFont Font + * + * @return $this + */ + public function setFont(?Font $pFont = null) + { + $this->font = $pFont; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->getText() . + $this->font->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/TextElement.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/TextElement.php new file mode 100755 index 0000000..f8be5d5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/RichText/TextElement.php @@ -0,0 +1,86 @@ +text = $pText; + } + + /** + * Get text. + * + * @return string Text + */ + public function getText() + { + return $this->text; + } + + /** + * Set text. + * + * @param $text string Text + * + * @return $this + */ + public function setText($text) + { + $this->text = $text; + + return $this; + } + + /** + * Get font. + * + * @return null|\PhpOffice\PhpSpreadsheet\Style\Font + */ + public function getFont() + { + return null; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->text . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Settings.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Settings.php new file mode 100755 index 0000000..cfa5057 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Settings.php @@ -0,0 +1,218 @@ +setLocale($locale); + } + + /** + * Identify to PhpSpreadsheet the external library to use for rendering charts. + * + * @param string $rendererClass Class name of the chart renderer + * eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph + */ + public static function setChartRenderer($rendererClass): void + { + if (!is_a($rendererClass, IRenderer::class, true)) { + throw new Exception('Chart renderer must implement ' . IRenderer::class); + } + + self::$chartRenderer = $rendererClass; + } + + /** + * Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use. + * + * @return null|string Class name of the chart renderer + * eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph + */ + public static function getChartRenderer() + { + return self::$chartRenderer; + } + + /** + * Set default options for libxml loader. + * + * @param int $options Default options for libxml loader + */ + public static function setLibXmlLoaderOptions($options): void + { + if ($options === null && defined('LIBXML_DTDLOAD')) { + $options = LIBXML_DTDLOAD | LIBXML_DTDATTR; + } + self::$libXmlLoaderOptions = $options; + } + + /** + * Get default options for libxml loader. + * Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly. + * + * @return int Default options for libxml loader + */ + public static function getLibXmlLoaderOptions() + { + if (self::$libXmlLoaderOptions === null && defined('LIBXML_DTDLOAD')) { + self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR); + } elseif (self::$libXmlLoaderOptions === null) { + self::$libXmlLoaderOptions = true; + } + + return self::$libXmlLoaderOptions; + } + + /** + * Enable/Disable the entity loader for libxml loader. + * Allow/disallow libxml_disable_entity_loader() call when not thread safe. + * Default behaviour is to do the check, but if you're running PHP versions + * 7.2 < 7.2.1 + * then you may need to disable this check to prevent unwanted behaviour in other threads + * SECURITY WARNING: Changing this flag to false is not recommended. + * + * @param bool $state + */ + public static function setLibXmlDisableEntityLoader($state): void + { + self::$libXmlDisableEntityLoader = (bool) $state; + } + + /** + * Return the state of the entity loader (disabled/enabled) for libxml loader. + * + * @return bool $state + */ + public static function getLibXmlDisableEntityLoader() + { + return self::$libXmlDisableEntityLoader; + } + + /** + * Sets the implementation of cache that should be used for cell collection. + */ + public static function setCache(CacheInterface $cache): void + { + self::$cache = $cache; + } + + /** + * Gets the implementation of cache that should be used for cell collection. + * + * @return CacheInterface + */ + public static function getCache() + { + if (!self::$cache) { + self::$cache = new Memory(); + } + + return self::$cache; + } + + /** + * Set the HTTP client implementation to be used for network request. + */ + public static function setHttpClient(ClientInterface $httpClient, RequestFactoryInterface $requestFactory): void + { + self::$httpClient = $httpClient; + self::$requestFactory = $requestFactory; + } + + /** + * Unset the HTTP client configuration. + */ + public static function unsetHttpClient(): void + { + self::$httpClient = null; + self::$requestFactory = null; + } + + /** + * Get the HTTP client implementation to be used for network request. + */ + public static function getHttpClient(): ClientInterface + { + self::assertHttpClient(); + + return self::$httpClient; + } + + /** + * Get the HTTP request factory. + */ + public static function getRequestFactory(): RequestFactoryInterface + { + self::assertHttpClient(); + + return self::$requestFactory; + } + + private static function assertHttpClient(): void + { + if (!self::$httpClient || !self::$requestFactory) { + throw new Exception('HTTP client must be configured via Settings::setHttpClient() to be able to use WEBSERVICE function.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/CodePage.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/CodePage.php new file mode 100755 index 0000000..1d5d893 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/CodePage.php @@ -0,0 +1,99 @@ + 'CP1252', // CodePage is not always correctly set when the xls file was saved by Apple's Numbers program + 367 => 'ASCII', // ASCII + 437 => 'CP437', // OEM US + //720 => 'notsupported', // OEM Arabic + 737 => 'CP737', // OEM Greek + 775 => 'CP775', // OEM Baltic + 850 => 'CP850', // OEM Latin I + 852 => 'CP852', // OEM Latin II (Central European) + 855 => 'CP855', // OEM Cyrillic + 857 => 'CP857', // OEM Turkish + 858 => 'CP858', // OEM Multilingual Latin I with Euro + 860 => 'CP860', // OEM Portugese + 861 => 'CP861', // OEM Icelandic + 862 => 'CP862', // OEM Hebrew + 863 => 'CP863', // OEM Canadian (French) + 864 => 'CP864', // OEM Arabic + 865 => 'CP865', // OEM Nordic + 866 => 'CP866', // OEM Cyrillic (Russian) + 869 => 'CP869', // OEM Greek (Modern) + 874 => 'CP874', // ANSI Thai + 932 => 'CP932', // ANSI Japanese Shift-JIS + 936 => 'CP936', // ANSI Chinese Simplified GBK + 949 => 'CP949', // ANSI Korean (Wansung) + 950 => 'CP950', // ANSI Chinese Traditional BIG5 + 1200 => 'UTF-16LE', // UTF-16 (BIFF8) + 1250 => 'CP1250', // ANSI Latin II (Central European) + 1251 => 'CP1251', // ANSI Cyrillic + 1252 => 'CP1252', // ANSI Latin I (BIFF4-BIFF7) + 1253 => 'CP1253', // ANSI Greek + 1254 => 'CP1254', // ANSI Turkish + 1255 => 'CP1255', // ANSI Hebrew + 1256 => 'CP1256', // ANSI Arabic + 1257 => 'CP1257', // ANSI Baltic + 1258 => 'CP1258', // ANSI Vietnamese + 1361 => 'CP1361', // ANSI Korean (Johab) + 10000 => 'MAC', // Apple Roman + 10001 => 'CP932', // Macintosh Japanese + 10002 => 'CP950', // Macintosh Chinese Traditional + 10003 => 'CP1361', // Macintosh Korean + 10004 => 'MACARABIC', // Apple Arabic + 10005 => 'MACHEBREW', // Apple Hebrew + 10006 => 'MACGREEK', // Macintosh Greek + 10007 => 'MACCYRILLIC', // Macintosh Cyrillic + 10008 => 'CP936', // Macintosh - Simplified Chinese (GB 2312) + 10010 => 'MACROMANIA', // Macintosh Romania + 10017 => 'MACUKRAINE', // Macintosh Ukraine + 10021 => 'MACTHAI', // Macintosh Thai + 10029 => 'MACCENTRALEUROPE', // Macintosh Central Europe + 10079 => 'MACICELAND', // Macintosh Icelandic + 10081 => 'MACTURKISH', // Macintosh Turkish + 10082 => 'MACCROATIAN', // Macintosh Croatian + 21010 => 'UTF-16LE', // UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE + 32768 => 'MAC', // Apple Roman + //32769 => 'unsupported', // ANSI Latin I (BIFF2-BIFF3) + 65000 => 'UTF-7', // Unicode (UTF-7) + 65001 => 'UTF-8', // Unicode (UTF-8) + ]; + + public static function validate(string $codePage): bool + { + return in_array($codePage, self::$pageArray, true); + } + + /** + * Convert Microsoft Code Page Identifier to Code Page Name which iconv + * and mbstring understands. + * + * @param int $codePage Microsoft Code Page Indentifier + * + * @return string Code Page Name + */ + public static function numberToName(int $codePage): string + { + if (array_key_exists($codePage, self::$pageArray)) { + return self::$pageArray[$codePage]; + } + if ($codePage == 720 || $codePage == 32769) { + throw new PhpSpreadsheetException("Code page $codePage not supported."); // OEM Arabic + } + + throw new PhpSpreadsheetException('Unknown codepage: ' . $codePage); + } + + public static function getEncodings(): array + { + return self::$pageArray; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Date.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Date.php new file mode 100755 index 0000000..cb37515 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Date.php @@ -0,0 +1,488 @@ + 'January', + 'Feb' => 'February', + 'Mar' => 'March', + 'Apr' => 'April', + 'May' => 'May', + 'Jun' => 'June', + 'Jul' => 'July', + 'Aug' => 'August', + 'Sep' => 'September', + 'Oct' => 'October', + 'Nov' => 'November', + 'Dec' => 'December', + ]; + + /** + * @var string[] + */ + public static $numberSuffixes = [ + 'st', + 'nd', + 'rd', + 'th', + ]; + + /** + * Base calendar year to use for calculations + * Value is either CALENDAR_WINDOWS_1900 (1900) or CALENDAR_MAC_1904 (1904). + * + * @var int + */ + protected static $excelCalendar = self::CALENDAR_WINDOWS_1900; + + /** + * Default timezone to use for DateTime objects. + * + * @var null|DateTimeZone + */ + protected static $defaultTimeZone; + + /** + * Set the Excel calendar (Windows 1900 or Mac 1904). + * + * @param int $baseDate Excel base date (1900 or 1904) + * + * @return bool Success or failure + */ + public static function setExcelCalendar($baseDate) + { + if (($baseDate == self::CALENDAR_WINDOWS_1900) || + ($baseDate == self::CALENDAR_MAC_1904)) { + self::$excelCalendar = $baseDate; + + return true; + } + + return false; + } + + /** + * Return the Excel calendar (Windows 1900 or Mac 1904). + * + * @return int Excel base date (1900 or 1904) + */ + public static function getExcelCalendar() + { + return self::$excelCalendar; + } + + /** + * Set the Default timezone to use for dates. + * + * @param DateTimeZone|string $timeZone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions + * + * @return bool Success or failure + */ + public static function setDefaultTimezone($timeZone) + { + try { + $timeZone = self::validateTimeZone($timeZone); + self::$defaultTimeZone = $timeZone; + $retval = true; + } catch (PhpSpreadsheetException $e) { + $retval = false; + } + + return $retval; + } + + /** + * Return the Default timezone being used for dates. + * + * @return DateTimeZone The timezone being used as default for Excel timestamp to PHP DateTime object + */ + public static function getDefaultTimezone() + { + if (self::$defaultTimeZone === null) { + self::$defaultTimeZone = new DateTimeZone('UTC'); + } + + return self::$defaultTimeZone; + } + + /** + * Validate a timezone. + * + * @param DateTimeZone|string $timeZone The timezone to validate, either as a timezone string or object + * + * @return DateTimeZone The timezone as a timezone object + */ + private static function validateTimeZone($timeZone) + { + if ($timeZone instanceof DateTimeZone) { + return $timeZone; + } + if (in_array($timeZone, DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC))) { + return new DateTimeZone($timeZone); + } + + throw new PhpSpreadsheetException('Invalid timezone'); + } + + /** + * Convert a MS serialized datetime value from Excel to a PHP Date/Time object. + * + * @param float|int $excelTimestamp MS Excel serialized date/time value + * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp, + * if you don't want to treat it as a UTC value + * Use the default (UST) unless you absolutely need a conversion + * + * @return \DateTime PHP date/time object + */ + public static function excelToDateTimeObject($excelTimestamp, $timeZone = null) + { + $timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone); + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + if ($excelTimestamp < 1.0) { + // Unix timestamp base date + $baseDate = new \DateTime('1970-01-01', $timeZone); + } else { + // MS Excel calendar base dates + if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) { + // Allow adjustment for 1900 Leap Year in MS Excel + $baseDate = ($excelTimestamp < 60) ? new \DateTime('1899-12-31', $timeZone) : new \DateTime('1899-12-30', $timeZone); + } else { + $baseDate = new \DateTime('1904-01-01', $timeZone); + } + } + } else { + $baseDate = new \DateTime('1899-12-30', $timeZone); + } + + $days = floor($excelTimestamp); + $partDay = $excelTimestamp - $days; + $hours = floor($partDay * 24); + $partDay = $partDay * 24 - $hours; + $minutes = floor($partDay * 60); + $partDay = $partDay * 60 - $minutes; + $seconds = round($partDay * 60); + + if ($days >= 0) { + $days = '+' . $days; + } + $interval = $days . ' days'; + + return $baseDate->modify($interval) + ->setTime((int) $hours, (int) $minutes, (int) $seconds); + } + + /** + * Convert a MS serialized datetime value from Excel to a unix timestamp. + * + * @param float|int $excelTimestamp MS Excel serialized date/time value + * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp, + * if you don't want to treat it as a UTC value + * Use the default (UST) unless you absolutely need a conversion + * + * @return int Unix timetamp for this date/time + */ + public static function excelToTimestamp($excelTimestamp, $timeZone = null) + { + return (int) self::excelToDateTimeObject($excelTimestamp, $timeZone) + ->format('U'); + } + + /** + * Convert a date from PHP to an MS Excel serialized date/time value. + * + * @param mixed $dateValue Unix Timestamp or PHP DateTime object or a string + * + * @return bool|float Excel date/time value + * or boolean FALSE on failure + */ + public static function PHPToExcel($dateValue) + { + if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) { + return self::dateTimeToExcel($dateValue); + } elseif (is_numeric($dateValue)) { + return self::timestampToExcel($dateValue); + } elseif (is_string($dateValue)) { + return self::stringToExcel($dateValue); + } + + return false; + } + + /** + * Convert a PHP DateTime object to an MS Excel serialized date/time value. + * + * @param DateTimeInterface $dateValue PHP DateTime object + * + * @return float MS Excel serialized date/time value + */ + public static function dateTimeToExcel(DateTimeInterface $dateValue) + { + return self::formattedPHPToExcel( + (int) $dateValue->format('Y'), + (int) $dateValue->format('m'), + (int) $dateValue->format('d'), + (int) $dateValue->format('H'), + (int) $dateValue->format('i'), + (int) $dateValue->format('s') + ); + } + + /** + * Convert a Unix timestamp to an MS Excel serialized date/time value. + * + * @param int $dateValue Unix Timestamp + * + * @return float MS Excel serialized date/time value + */ + public static function timestampToExcel($dateValue) + { + if (!is_numeric($dateValue)) { + return false; + } + + return self::dateTimeToExcel(new \DateTime('@' . $dateValue)); + } + + /** + * formattedPHPToExcel. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hours + * @param int $minutes + * @param int $seconds + * + * @return float Excel date/time value + */ + public static function formattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0) + { + if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) { + // + // Fudge factor for the erroneous fact that the year 1900 is treated as a Leap Year in MS Excel + // This affects every date following 28th February 1900 + // + $excel1900isLeapYear = true; + if (($year == 1900) && ($month <= 2)) { + $excel1900isLeapYear = false; + } + $myexcelBaseDate = 2415020; + } else { + $myexcelBaseDate = 2416481; + $excel1900isLeapYear = false; + } + + // Julian base date Adjustment + if ($month > 2) { + $month -= 3; + } else { + $month += 9; + --$year; + } + + // Calculate the Julian Date, then subtract the Excel base date (JD 2415020 = 31-Dec-1899 Giving Excel Date of 0) + $century = substr($year, 0, 2); + $decade = substr($year, 2, 2); + $excelDate = floor((146097 * $century) / 4) + floor((1461 * $decade) / 4) + floor((153 * $month + 2) / 5) + $day + 1721119 - $myexcelBaseDate + $excel1900isLeapYear; + + $excelTime = (($hours * 3600) + ($minutes * 60) + $seconds) / 86400; + + return (float) $excelDate + $excelTime; + } + + /** + * Is a given cell a date/time? + * + * @return bool + */ + public static function isDateTime(Cell $pCell) + { + return is_numeric($pCell->getCalculatedValue()) && + self::isDateTimeFormat( + $pCell->getWorksheet()->getStyle( + $pCell->getCoordinate() + )->getNumberFormat() + ); + } + + /** + * Is a given number format a date/time? + * + * @return bool + */ + public static function isDateTimeFormat(NumberFormat $pFormat) + { + return self::isDateTimeFormatCode($pFormat->getFormatCode()); + } + + private static $possibleDateFormatCharacters = 'eymdHs'; + + /** + * Is a given number format code a date/time? + * + * @param string $pFormatCode + * + * @return bool + */ + public static function isDateTimeFormatCode($pFormatCode) + { + if (strtolower($pFormatCode) === strtolower(NumberFormat::FORMAT_GENERAL)) { + // "General" contains an epoch letter 'e', so we trap for it explicitly here (case-insensitive check) + return false; + } + if (preg_match('/[0#]E[+-]0/i', $pFormatCode)) { + // Scientific format + return false; + } + + // Switch on formatcode + switch ($pFormatCode) { + // Explicitly defined date formats + case NumberFormat::FORMAT_DATE_YYYYMMDD: + case NumberFormat::FORMAT_DATE_YYYYMMDD2: + case NumberFormat::FORMAT_DATE_DDMMYYYY: + case NumberFormat::FORMAT_DATE_DMYSLASH: + case NumberFormat::FORMAT_DATE_DMYMINUS: + case NumberFormat::FORMAT_DATE_DMMINUS: + case NumberFormat::FORMAT_DATE_MYMINUS: + case NumberFormat::FORMAT_DATE_DATETIME: + case NumberFormat::FORMAT_DATE_TIME1: + case NumberFormat::FORMAT_DATE_TIME2: + case NumberFormat::FORMAT_DATE_TIME3: + case NumberFormat::FORMAT_DATE_TIME4: + case NumberFormat::FORMAT_DATE_TIME5: + case NumberFormat::FORMAT_DATE_TIME6: + case NumberFormat::FORMAT_DATE_TIME7: + case NumberFormat::FORMAT_DATE_TIME8: + case NumberFormat::FORMAT_DATE_YYYYMMDDSLASH: + case NumberFormat::FORMAT_DATE_XLSX14: + case NumberFormat::FORMAT_DATE_XLSX15: + case NumberFormat::FORMAT_DATE_XLSX16: + case NumberFormat::FORMAT_DATE_XLSX17: + case NumberFormat::FORMAT_DATE_XLSX22: + return true; + } + + // Typically number, currency or accounting (or occasionally fraction) formats + if ((substr($pFormatCode, 0, 1) == '_') || (substr($pFormatCode, 0, 2) == '0 ')) { + return false; + } + // Some "special formats" provided in German Excel versions were detected as date time value, + // so filter them out here - "\C\H\-00000" (Switzerland) and "\D-00000" (Germany). + if (\strpos($pFormatCode, '-00000') !== false) { + return false; + } + // Try checking for any of the date formatting characters that don't appear within square braces + if (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $pFormatCode)) { + // We might also have a format mask containing quoted strings... + // we don't want to test for any of our characters within the quoted blocks + if (strpos($pFormatCode, '"') !== false) { + $segMatcher = false; + foreach (explode('"', $pFormatCode) as $subVal) { + // Only test in alternate array entries (the non-quoted blocks) + if (($segMatcher = !$segMatcher) && + (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $subVal))) { + return true; + } + } + + return false; + } + + return true; + } + + // No date... + return false; + } + + /** + * Convert a date/time string to Excel time. + * + * @param string $dateValue Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10' + * + * @return false|float Excel date/time serial value + */ + public static function stringToExcel($dateValue) + { + if (strlen($dateValue) < 2) { + return false; + } + if (!preg_match('/^(\d{1,4}[ \.\/\-][A-Z]{3,9}([ \.\/\-]\d{1,4})?|[A-Z]{3,9}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?|\d{1,4}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?)( \d{1,2}:\d{1,2}(:\d{1,2})?)?$/iu', $dateValue)) { + return false; + } + + $dateValueNew = DateTime::DATEVALUE($dateValue); + + if ($dateValueNew === Functions::VALUE()) { + return false; + } + + if (strpos($dateValue, ':') !== false) { + $timeValue = DateTime::TIMEVALUE($dateValue); + if ($timeValue === Functions::VALUE()) { + return false; + } + $dateValueNew += $timeValue; + } + + return $dateValueNew; + } + + /** + * Converts a month name (either a long or a short name) to a month number. + * + * @param string $month Month name or abbreviation + * + * @return int|string Month number (1 - 12), or the original string argument if it isn't a valid month name + */ + public static function monthStringToNumber($month) + { + $monthIndex = 1; + foreach (self::$monthNames as $shortMonthName => $longMonthName) { + if (($month === $longMonthName) || ($month === $shortMonthName)) { + return $monthIndex; + } + ++$monthIndex; + } + + return $month; + } + + /** + * Strips an ordinal from a numeric value. + * + * @param string $day Day number with an ordinal + * + * @return int|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric + */ + public static function dayStringToNumber($day) + { + $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day)); + if (is_numeric($strippedDayValue)) { + return (int) $strippedDayValue; + } + + return $day; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Drawing.php new file mode 100755 index 0000000..25d6910 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Drawing.php @@ -0,0 +1,249 @@ +getName(); + $size = $pDefaultFont->getSize(); + + if (isset(Font::$defaultColumnWidths[$name][$size])) { + // Exact width can be determined + $colWidth = $pValue * Font::$defaultColumnWidths[$name][$size]['width'] / Font::$defaultColumnWidths[$name][$size]['px']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $colWidth = $pValue * 11 * Font::$defaultColumnWidths['Calibri'][11]['width'] / Font::$defaultColumnWidths['Calibri'][11]['px'] / $size; + } + + return $colWidth; + } + + /** + * Convert column width from (intrinsic) Excel units to pixels. + * + * @param float $pValue Value in cell dimension + * @param \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont Default font of the workbook + * + * @return int Value in pixels + */ + public static function cellDimensionToPixels($pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) + { + // Font name and size + $name = $pDefaultFont->getName(); + $size = $pDefaultFont->getSize(); + + if (isset(Font::$defaultColumnWidths[$name][$size])) { + // Exact width can be determined + $colWidth = $pValue * Font::$defaultColumnWidths[$name][$size]['px'] / Font::$defaultColumnWidths[$name][$size]['width']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $colWidth = $pValue * $size * Font::$defaultColumnWidths['Calibri'][11]['px'] / Font::$defaultColumnWidths['Calibri'][11]['width'] / 11; + } + + // Round pixels to closest integer + $colWidth = (int) round($colWidth); + + return $colWidth; + } + + /** + * Convert pixels to points. + * + * @param int $pValue Value in pixels + * + * @return float Value in points + */ + public static function pixelsToPoints($pValue) + { + return $pValue * 0.67777777; + } + + /** + * Convert points to pixels. + * + * @param int $pValue Value in points + * + * @return int Value in pixels + */ + public static function pointsToPixels($pValue) + { + if ($pValue != 0) { + return (int) ceil($pValue * 1.333333333); + } + + return 0; + } + + /** + * Convert degrees to angle. + * + * @param int $pValue Degrees + * + * @return int Angle + */ + public static function degreesToAngle($pValue) + { + return (int) round($pValue * 60000); + } + + /** + * Convert angle to degrees. + * + * @param int $pValue Angle + * + * @return int Degrees + */ + public static function angleToDegrees($pValue) + { + if ($pValue != 0) { + return round($pValue / 60000); + } + + return 0; + } + + /** + * Create a new image from file. By alexander at alexauto dot nl. + * + * @see http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214 + * + * @param string $p_sFile Path to Windows DIB (BMP) image + * + * @return resource + */ + public static function imagecreatefrombmp($p_sFile) + { + // Load the image into a string + $file = fopen($p_sFile, 'rb'); + $read = fread($file, 10); + while (!feof($file) && ($read != '')) { + $read .= fread($file, 1024); + } + + $temp = unpack('H*', $read); + $hex = $temp[1]; + $header = substr($hex, 0, 108); + + // Process the header + // Structure: http://www.fastgraph.com/help/bmp_header_format.html + if (substr($header, 0, 4) == '424d') { + // Cut it in parts of 2 bytes + $header_parts = str_split($header, 2); + + // Get the width 4 bytes + $width = hexdec($header_parts[19] . $header_parts[18]); + + // Get the height 4 bytes + $height = hexdec($header_parts[23] . $header_parts[22]); + + // Unset the header params + unset($header_parts); + } + + // Define starting X and Y + $x = 0; + $y = 1; + + // Create newimage + $image = imagecreatetruecolor($width, $height); + + // Grab the body from the image + $body = substr($hex, 108); + + // Calculate if padding at the end-line is needed + // Divided by two to keep overview. + // 1 byte = 2 HEX-chars + $body_size = (strlen($body) / 2); + $header_size = ($width * $height); + + // Use end-line padding? Only when needed + $usePadding = ($body_size > ($header_size * 3) + 4); + + // Using a for-loop with index-calculation instaid of str_split to avoid large memory consumption + // Calculate the next DWORD-position in the body + for ($i = 0; $i < $body_size; $i += 3) { + // Calculate line-ending and padding + if ($x >= $width) { + // If padding needed, ignore image-padding + // Shift i to the ending of the current 32-bit-block + if ($usePadding) { + $i += $width % 4; + } + + // Reset horizontal position + $x = 0; + + // Raise the height-position (bottom-up) + ++$y; + + // Reached the image-height? Break the for-loop + if ($y > $height) { + break; + } + } + + // Calculation of the RGB-pixel (defined as BGR in image-data) + // Define $i_pos as absolute position in the body + $i_pos = $i * 2; + $r = hexdec($body[$i_pos + 4] . $body[$i_pos + 5]); + $g = hexdec($body[$i_pos + 2] . $body[$i_pos + 3]); + $b = hexdec($body[$i_pos] . $body[$i_pos + 1]); + + // Calculate and draw the pixel + $color = imagecolorallocate($image, $r, $g, $b); + imagesetpixel($image, $x, $height - $y, $color); + + // Raise the horizontal position + ++$x; + } + + // Unset the body / free the memory + unset($body); + + // Return image-object + return $image; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher.php new file mode 100755 index 0000000..c6d0a6f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher.php @@ -0,0 +1,64 @@ +dggContainer; + } + + /** + * Set Drawing Group Container. + * + * @param Escher\DggContainer $dggContainer + * + * @return Escher\DggContainer + */ + public function setDggContainer($dggContainer) + { + return $this->dggContainer = $dggContainer; + } + + /** + * Get Drawing Container. + * + * @return Escher\DgContainer + */ + public function getDgContainer() + { + return $this->dgContainer; + } + + /** + * Set Drawing Container. + * + * @param Escher\DgContainer $dgContainer + * + * @return Escher\DgContainer + */ + public function setDgContainer($dgContainer) + { + return $this->dgContainer = $dgContainer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer.php new file mode 100755 index 0000000..b0d75d7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer.php @@ -0,0 +1,52 @@ +dgId; + } + + public function setDgId($value): void + { + $this->dgId = $value; + } + + public function getLastSpId() + { + return $this->lastSpId; + } + + public function setLastSpId($value): void + { + $this->lastSpId = $value; + } + + public function getSpgrContainer() + { + return $this->spgrContainer; + } + + public function setSpgrContainer($spgrContainer) + { + return $this->spgrContainer = $spgrContainer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php new file mode 100755 index 0000000..1da8772 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php @@ -0,0 +1,79 @@ +parent = $parent; + } + + /** + * Get the parent Shape Group Container if any. + * + * @return null|\PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer + */ + public function getParent() + { + return $this->parent; + } + + /** + * Add a child. This will be either spgrContainer or spContainer. + * + * @param mixed $child + */ + public function addChild($child): void + { + $this->children[] = $child; + $child->setParent($this); + } + + /** + * Get collection of Shape Containers. + */ + public function getChildren() + { + return $this->children; + } + + /** + * Recursively get all spContainers within this spgrContainer. + * + * @return SpgrContainer\SpContainer[] + */ + public function getAllSpContainers() + { + $allSpContainers = []; + + foreach ($this->children as $child) { + if ($child instanceof self) { + $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); + } else { + $allSpContainers[] = $child; + } + } + + return $allSpContainers; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php new file mode 100755 index 0000000..8a81ff5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php @@ -0,0 +1,369 @@ +parent = $parent; + } + + /** + * Get the parent Shape Group Container. + * + * @return SpgrContainer + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set whether this is a group shape. + * + * @param bool $value + */ + public function setSpgr($value): void + { + $this->spgr = $value; + } + + /** + * Get whether this is a group shape. + * + * @return bool + */ + public function getSpgr() + { + return $this->spgr; + } + + /** + * Set the shape type. + * + * @param int $value + */ + public function setSpType($value): void + { + $this->spType = $value; + } + + /** + * Get the shape type. + * + * @return int + */ + public function getSpType() + { + return $this->spType; + } + + /** + * Set the shape flag. + * + * @param int $value + */ + public function setSpFlag($value): void + { + $this->spFlag = $value; + } + + /** + * Get the shape flag. + * + * @return int + */ + public function getSpFlag() + { + return $this->spFlag; + } + + /** + * Set the shape index. + * + * @param int $value + */ + public function setSpId($value): void + { + $this->spId = $value; + } + + /** + * Get the shape index. + * + * @return int + */ + public function getSpId() + { + return $this->spId; + } + + /** + * Set an option for the Shape Group Container. + * + * @param int $property The number specifies the option + * @param mixed $value + */ + public function setOPT($property, $value): void + { + $this->OPT[$property] = $value; + } + + /** + * Get an option for the Shape Group Container. + * + * @param int $property The number specifies the option + * + * @return mixed + */ + public function getOPT($property) + { + if (isset($this->OPT[$property])) { + return $this->OPT[$property]; + } + + return null; + } + + /** + * Get the collection of options. + * + * @return array + */ + public function getOPTCollection() + { + return $this->OPT; + } + + /** + * Set cell coordinates of upper-left corner of shape. + * + * @param string $value eg: 'A1' + */ + public function setStartCoordinates($value): void + { + $this->startCoordinates = $value; + } + + /** + * Get cell coordinates of upper-left corner of shape. + * + * @return string + */ + public function getStartCoordinates() + { + return $this->startCoordinates; + } + + /** + * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. + * + * @param int $startOffsetX + */ + public function setStartOffsetX($startOffsetX): void + { + $this->startOffsetX = $startOffsetX; + } + + /** + * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. + * + * @return int + */ + public function getStartOffsetX() + { + return $this->startOffsetX; + } + + /** + * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height. + * + * @param int $startOffsetY + */ + public function setStartOffsetY($startOffsetY): void + { + $this->startOffsetY = $startOffsetY; + } + + /** + * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height. + * + * @return int + */ + public function getStartOffsetY() + { + return $this->startOffsetY; + } + + /** + * Set cell coordinates of bottom-right corner of shape. + * + * @param string $value eg: 'A1' + */ + public function setEndCoordinates($value): void + { + $this->endCoordinates = $value; + } + + /** + * Get cell coordinates of bottom-right corner of shape. + * + * @return string + */ + public function getEndCoordinates() + { + return $this->endCoordinates; + } + + /** + * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. + * + * @param int $endOffsetX + */ + public function setEndOffsetX($endOffsetX): void + { + $this->endOffsetX = $endOffsetX; + } + + /** + * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. + * + * @return int + */ + public function getEndOffsetX() + { + return $this->endOffsetX; + } + + /** + * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. + * + * @param int $endOffsetY + */ + public function setEndOffsetY($endOffsetY): void + { + $this->endOffsetY = $endOffsetY; + } + + /** + * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. + * + * @return int + */ + public function getEndOffsetY() + { + return $this->endOffsetY; + } + + /** + * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and + * the dgContainer. A value of 1 = immediately within first spgrContainer + * Higher nesting level occurs if and only if spContainer is part of a shape group. + * + * @return int Nesting level + */ + public function getNestingLevel() + { + $nestingLevel = 0; + + $parent = $this->getParent(); + while ($parent instanceof SpgrContainer) { + ++$nestingLevel; + $parent = $parent->getParent(); + } + + return $nestingLevel; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer.php new file mode 100755 index 0000000..1bd15b9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer.php @@ -0,0 +1,175 @@ +spIdMax; + } + + /** + * Set maximum shape index of all shapes in all drawings (plus one). + * + * @param int $value + */ + public function setSpIdMax($value): void + { + $this->spIdMax = $value; + } + + /** + * Get total number of drawings saved. + * + * @return int + */ + public function getCDgSaved() + { + return $this->cDgSaved; + } + + /** + * Set total number of drawings saved. + * + * @param int $value + */ + public function setCDgSaved($value): void + { + $this->cDgSaved = $value; + } + + /** + * Get total number of shapes saved (including group shapes). + * + * @return int + */ + public function getCSpSaved() + { + return $this->cSpSaved; + } + + /** + * Set total number of shapes saved (including group shapes). + * + * @param int $value + */ + public function setCSpSaved($value): void + { + $this->cSpSaved = $value; + } + + /** + * Get BLIP Store Container. + * + * @return DggContainer\BstoreContainer + */ + public function getBstoreContainer() + { + return $this->bstoreContainer; + } + + /** + * Set BLIP Store Container. + * + * @param DggContainer\BstoreContainer $bstoreContainer + */ + public function setBstoreContainer($bstoreContainer): void + { + $this->bstoreContainer = $bstoreContainer; + } + + /** + * Set an option for the drawing group. + * + * @param int $property The number specifies the option + * @param mixed $value + */ + public function setOPT($property, $value): void + { + $this->OPT[$property] = $value; + } + + /** + * Get an option for the drawing group. + * + * @param int $property The number specifies the option + * + * @return mixed + */ + public function getOPT($property) + { + if (isset($this->OPT[$property])) { + return $this->OPT[$property]; + } + + return null; + } + + /** + * Get identifier clusters. + * + * @return array + */ + public function getIDCLs() + { + return $this->IDCLs; + } + + /** + * Set identifier clusters. [ => , ...]. + * + * @param array $pValue + */ + public function setIDCLs($pValue): void + { + $this->IDCLs = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php new file mode 100755 index 0000000..b07786f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php @@ -0,0 +1,34 @@ +BSECollection[] = $BSE; + $BSE->setParent($this); + } + + /** + * Get the collection of BLIP Store Entries. + * + * @return BstoreContainer\BSE[] + */ + public function getBSECollection() + { + return $this->BSECollection; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php new file mode 100755 index 0000000..e885146 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php @@ -0,0 +1,89 @@ +parent = $parent; + } + + /** + * Get the BLIP. + * + * @return BSE\Blip + */ + public function getBlip() + { + return $this->blip; + } + + /** + * Set the BLIP. + * + * @param BSE\Blip $blip + */ + public function setBlip($blip): void + { + $this->blip = $blip; + $blip->setParent($this); + } + + /** + * Get the BLIP type. + * + * @return int + */ + public function getBlipType() + { + return $this->blipType; + } + + /** + * Set the BLIP type. + * + * @param int $blipType + */ + public function setBlipType($blipType): void + { + $this->blipType = $blipType; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php new file mode 100755 index 0000000..500d7ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php @@ -0,0 +1,60 @@ +data; + } + + /** + * Set the raw image data. + * + * @param string $data + */ + public function setData($data): void + { + $this->data = $data; + } + + /** + * Set parent BSE. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE $parent + */ + public function setParent($parent): void + { + $this->parent = $parent; + } + + /** + * Get parent BSE. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE $parent + */ + public function getParent() + { + return $this->parent; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/File.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/File.php new file mode 100755 index 0000000..7525df8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/File.php @@ -0,0 +1,142 @@ +open($zipFile) === true) { + $returnValue = ($zip->getFromName($archiveFile) !== false); + $zip->close(); + + return $returnValue; + } + + return false; + } + + return file_exists($pFilename); + } + + /** + * Returns canonicalized absolute pathname, also for ZIP archives. + * + * @param string $pFilename + * + * @return string + */ + public static function realpath($pFilename) + { + // Returnvalue + $returnValue = ''; + + // Try using realpath() + if (file_exists($pFilename)) { + $returnValue = realpath($pFilename); + } + + // Found something? + if ($returnValue == '' || ($returnValue === null)) { + $pathArray = explode('/', $pFilename); + while (in_array('..', $pathArray) && $pathArray[0] != '..') { + $iMax = count($pathArray); + for ($i = 0; $i < $iMax; ++$i) { + if ($pathArray[$i] == '..' && $i > 0) { + unset($pathArray[$i], $pathArray[$i - 1]); + + break; + } + } + } + $returnValue = implode('/', $pathArray); + } + + // Return + return $returnValue; + } + + /** + * Get the systems temporary directory. + * + * @return string + */ + public static function sysGetTempDir() + { + if (self::$useUploadTempDirectory) { + // use upload-directory when defined to allow running on environments having very restricted + // open_basedir configs + if (ini_get('upload_tmp_dir') !== false) { + if ($temp = ini_get('upload_tmp_dir')) { + if (file_exists($temp)) { + return realpath($temp); + } + } + } + } + + return realpath(sys_get_temp_dir()); + } + + /** + * Assert that given path is an existing file and is readable, otherwise throw exception. + * + * @param string $filename + */ + public static function assertFile($filename): void + { + if (!is_file($filename)) { + throw new InvalidArgumentException('File "' . $filename . '" does not exist.'); + } + + if (!is_readable($filename)) { + throw new InvalidArgumentException('Could not open "' . $filename . '" for reading.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Font.php new file mode 100755 index 0000000..ee1f8ab --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Font.php @@ -0,0 +1,763 @@ + [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 56, 'width' => 9.33203125], + 9 => ['px' => 64, 'width' => 9.14062500], + 10 => ['px' => 64, 'width' => 9.14062500], + ], + 'Calibri' => [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 56, 'width' => 9.33203125], + 9 => ['px' => 56, 'width' => 9.33203125], + 10 => ['px' => 64, 'width' => 9.14062500], + 11 => ['px' => 64, 'width' => 9.14062500], + ], + 'Verdana' => [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 64, 'width' => 9.14062500], + 9 => ['px' => 72, 'width' => 9.00000000], + 10 => ['px' => 72, 'width' => 9.00000000], + ], + ]; + + /** + * Set autoSize method. + * + * @param string $pValue see self::AUTOSIZE_METHOD_* + * + * @return bool Success or failure + */ + public static function setAutoSizeMethod($pValue) + { + if (!in_array($pValue, self::$autoSizeMethods)) { + return false; + } + self::$autoSizeMethod = $pValue; + + return true; + } + + /** + * Get autoSize method. + * + * @return string + */ + public static function getAutoSizeMethod() + { + return self::$autoSizeMethod; + } + + /** + * Set the path to the folder containing .ttf files. There should be a trailing slash. + * Typical locations on variout some platforms: + *
    + *
  • C:/Windows/Fonts/
  • + *
  • /usr/share/fonts/truetype/
  • + *
  • ~/.fonts/
  • + *
. + * + * @param string $pValue + */ + public static function setTrueTypeFontPath($pValue): void + { + self::$trueTypeFontPath = $pValue; + } + + /** + * Get the path to the folder containing .ttf files. + * + * @return string + */ + public static function getTrueTypeFontPath() + { + return self::$trueTypeFontPath; + } + + /** + * Calculate an (approximate) OpenXML column width, based on font size and text contained. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font Font object + * @param RichText|string $cellText Text to calculate width + * @param int $rotation Rotation angle + * @param null|\PhpOffice\PhpSpreadsheet\Style\Font $defaultFont Font object + * + * @return int Column width + */ + public static function calculateColumnWidth(\PhpOffice\PhpSpreadsheet\Style\Font $font, $cellText = '', $rotation = 0, ?\PhpOffice\PhpSpreadsheet\Style\Font $defaultFont = null) + { + // If it is rich text, use plain text + if ($cellText instanceof RichText) { + $cellText = $cellText->getPlainText(); + } + + // Special case if there are one or more newline characters ("\n") + if (strpos($cellText, "\n") !== false) { + $lineTexts = explode("\n", $cellText); + $lineWidths = []; + foreach ($lineTexts as $lineText) { + $lineWidths[] = self::calculateColumnWidth($font, $lineText, $rotation = 0, $defaultFont); + } + + return max($lineWidths); // width of longest line in cell + } + + // Try to get the exact text width in pixels + $approximate = self::$autoSizeMethod == self::AUTOSIZE_METHOD_APPROX; + if (!$approximate) { + $columnWidthAdjust = ceil(self::getTextWidthPixelsExact('n', $font, 0) * 1.07); + + try { + // Width of text in pixels excl. padding + // and addition because Excel adds some padding, just use approx width of 'n' glyph + $columnWidth = self::getTextWidthPixelsExact($cellText, $font, $rotation) + $columnWidthAdjust; + } catch (PhpSpreadsheetException $e) { + $approximate = true; + } + } + + if ($approximate) { + $columnWidthAdjust = self::getTextWidthPixelsApprox('n', $font, 0); + // Width of text in pixels excl. padding, approximation + // and addition because Excel adds some padding, just use approx width of 'n' glyph + $columnWidth = self::getTextWidthPixelsApprox($cellText, $font, $rotation) + $columnWidthAdjust; + } + + // Convert from pixel width to column width + $columnWidth = Drawing::pixelsToCellDimension($columnWidth, $defaultFont); + + // Return + return round($columnWidth, 6); + } + + /** + * Get GD text width in pixels for a string of text in a certain font at a certain rotation angle. + * + * @param string $text + * @param \PhpOffice\PhpSpreadsheet\Style\Font + * @param int $rotation + * + * @return int + */ + public static function getTextWidthPixelsExact($text, \PhpOffice\PhpSpreadsheet\Style\Font $font, $rotation = 0) + { + if (!function_exists('imagettfbbox')) { + throw new PhpSpreadsheetException('GD library needs to be enabled'); + } + + // font size should really be supplied in pixels in GD2, + // but since GD2 seems to assume 72dpi, pixels and points are the same + $fontFile = self::getTrueTypeFontFileFromFont($font); + $textBox = imagettfbbox($font->getSize(), $rotation, $fontFile, $text); + + // Get corners positions + $lowerLeftCornerX = $textBox[0]; + $lowerRightCornerX = $textBox[2]; + $upperRightCornerX = $textBox[4]; + $upperLeftCornerX = $textBox[6]; + + // Consider the rotation when calculating the width + return max($lowerRightCornerX - $upperLeftCornerX, $upperRightCornerX - $lowerLeftCornerX); + } + + /** + * Get approximate width in pixels for a string of text in a certain font at a certain rotation angle. + * + * @param string $columnText + * @param int $rotation + * + * @return int Text width in pixels (no padding added) + */ + public static function getTextWidthPixelsApprox($columnText, \PhpOffice\PhpSpreadsheet\Style\Font $font, $rotation = 0) + { + $fontName = $font->getName(); + $fontSize = $font->getSize(); + + // Calculate column width in pixels. We assume fixed glyph width. Result varies with font name and size. + switch ($fontName) { + case 'Calibri': + // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font. + $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size + + break; + case 'Arial': + // value 8 was set because of experience in different exports at Arial 10 font. + $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size + + break; + case 'Verdana': + // value 8 was found via interpolation by inspecting real Excel files with Verdana 10 font. + $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size + + break; + default: + // just assume Calibri + $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size + + break; + } + + // Calculate approximate rotated column width + if ($rotation !== 0) { + if ($rotation == -165) { + // stacked text + $columnWidth = 4; // approximation + } else { + // rotated text + $columnWidth = $columnWidth * cos(deg2rad($rotation)) + + $fontSize * abs(sin(deg2rad($rotation))) / 5; // approximation + } + } + + // pixel width is an integer + return (int) $columnWidth; + } + + /** + * Calculate an (approximate) pixel size, based on a font points size. + * + * @param int $fontSizeInPoints Font size (in points) + * + * @return int Font size (in pixels) + */ + public static function fontSizeToPixels($fontSizeInPoints) + { + return (int) ((4 / 3) * $fontSizeInPoints); + } + + /** + * Calculate an (approximate) pixel size, based on inch size. + * + * @param int $sizeInInch Font size (in inch) + * + * @return int Size (in pixels) + */ + public static function inchSizeToPixels($sizeInInch) + { + return $sizeInInch * 96; + } + + /** + * Calculate an (approximate) pixel size, based on centimeter size. + * + * @param int $sizeInCm Font size (in centimeters) + * + * @return float Size (in pixels) + */ + public static function centimeterSizeToPixels($sizeInCm) + { + return $sizeInCm * 37.795275591; + } + + /** + * Returns the font path given the font. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font + * + * @return string Path to TrueType font file + */ + public static function getTrueTypeFontFileFromFont($font) + { + if (!file_exists(self::$trueTypeFontPath) || !is_dir(self::$trueTypeFontPath)) { + throw new PhpSpreadsheetException('Valid directory to TrueType Font files not specified'); + } + + $name = $font->getName(); + $bold = $font->getBold(); + $italic = $font->getItalic(); + + // Check if we can map font to true type font file + switch ($name) { + case 'Arial': + $fontFile = ( + $bold ? ($italic ? self::ARIAL_BOLD_ITALIC : self::ARIAL_BOLD) + : ($italic ? self::ARIAL_ITALIC : self::ARIAL) + ); + + break; + case 'Calibri': + $fontFile = ( + $bold ? ($italic ? self::CALIBRI_BOLD_ITALIC : self::CALIBRI_BOLD) + : ($italic ? self::CALIBRI_ITALIC : self::CALIBRI) + ); + + break; + case 'Courier New': + $fontFile = ( + $bold ? ($italic ? self::COURIER_NEW_BOLD_ITALIC : self::COURIER_NEW_BOLD) + : ($italic ? self::COURIER_NEW_ITALIC : self::COURIER_NEW) + ); + + break; + case 'Comic Sans MS': + $fontFile = ( + $bold ? self::COMIC_SANS_MS_BOLD : self::COMIC_SANS_MS + ); + + break; + case 'Georgia': + $fontFile = ( + $bold ? ($italic ? self::GEORGIA_BOLD_ITALIC : self::GEORGIA_BOLD) + : ($italic ? self::GEORGIA_ITALIC : self::GEORGIA) + ); + + break; + case 'Impact': + $fontFile = self::IMPACT; + + break; + case 'Liberation Sans': + $fontFile = ( + $bold ? ($italic ? self::LIBERATION_SANS_BOLD_ITALIC : self::LIBERATION_SANS_BOLD) + : ($italic ? self::LIBERATION_SANS_ITALIC : self::LIBERATION_SANS) + ); + + break; + case 'Lucida Console': + $fontFile = self::LUCIDA_CONSOLE; + + break; + case 'Lucida Sans Unicode': + $fontFile = self::LUCIDA_SANS_UNICODE; + + break; + case 'Microsoft Sans Serif': + $fontFile = self::MICROSOFT_SANS_SERIF; + + break; + case 'Palatino Linotype': + $fontFile = ( + $bold ? ($italic ? self::PALATINO_LINOTYPE_BOLD_ITALIC : self::PALATINO_LINOTYPE_BOLD) + : ($italic ? self::PALATINO_LINOTYPE_ITALIC : self::PALATINO_LINOTYPE) + ); + + break; + case 'Symbol': + $fontFile = self::SYMBOL; + + break; + case 'Tahoma': + $fontFile = ( + $bold ? self::TAHOMA_BOLD : self::TAHOMA + ); + + break; + case 'Times New Roman': + $fontFile = ( + $bold ? ($italic ? self::TIMES_NEW_ROMAN_BOLD_ITALIC : self::TIMES_NEW_ROMAN_BOLD) + : ($italic ? self::TIMES_NEW_ROMAN_ITALIC : self::TIMES_NEW_ROMAN) + ); + + break; + case 'Trebuchet MS': + $fontFile = ( + $bold ? ($italic ? self::TREBUCHET_MS_BOLD_ITALIC : self::TREBUCHET_MS_BOLD) + : ($italic ? self::TREBUCHET_MS_ITALIC : self::TREBUCHET_MS) + ); + + break; + case 'Verdana': + $fontFile = ( + $bold ? ($italic ? self::VERDANA_BOLD_ITALIC : self::VERDANA_BOLD) + : ($italic ? self::VERDANA_ITALIC : self::VERDANA) + ); + + break; + default: + throw new PhpSpreadsheetException('Unknown font name "' . $name . '". Cannot map to TrueType font file'); + + break; + } + + $fontFile = self::$trueTypeFontPath . $fontFile; + + // Check if file actually exists + if (!file_exists($fontFile)) { + throw new PhpSpreadsheetException('TrueType Font file not found'); + } + + return $fontFile; + } + + /** + * Returns the associated charset for the font name. + * + * @param string $name Font name + * + * @return int Character set code + */ + public static function getCharsetFromFontName($name) + { + switch ($name) { + // Add more cases. Check FONT records in real Excel files. + case 'EucrosiaUPC': + return self::CHARSET_ANSI_THAI; + case 'Wingdings': + return self::CHARSET_SYMBOL; + case 'Wingdings 2': + return self::CHARSET_SYMBOL; + case 'Wingdings 3': + return self::CHARSET_SYMBOL; + default: + return self::CHARSET_ANSI_LATIN; + } + } + + /** + * Get the effective column width for columns without a column dimension or column with width -1 + * For example, for Calibri 11 this is 9.140625 (64 px). + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font The workbooks default font + * @param bool $pPixels true = return column width in pixels, false = return in OOXML units + * + * @return mixed Column width + */ + public static function getDefaultColumnWidthByFont(\PhpOffice\PhpSpreadsheet\Style\Font $font, $pPixels = false) + { + if (isset(self::$defaultColumnWidths[$font->getName()][$font->getSize()])) { + // Exact width can be determined + $columnWidth = $pPixels ? + self::$defaultColumnWidths[$font->getName()][$font->getSize()]['px'] + : self::$defaultColumnWidths[$font->getName()][$font->getSize()]['width']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $columnWidth = $pPixels ? + self::$defaultColumnWidths['Calibri'][11]['px'] + : self::$defaultColumnWidths['Calibri'][11]['width']; + $columnWidth = $columnWidth * $font->getSize() / 11; + + // Round pixels to closest integer + if ($pPixels) { + $columnWidth = (int) round($columnWidth); + } + } + + return $columnWidth; + } + + /** + * Get the effective row height for rows without a row dimension or rows with height -1 + * For example, for Calibri 11 this is 15 points. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font The workbooks default font + * + * @return float Row height in points + */ + public static function getDefaultRowHeightByFont(\PhpOffice\PhpSpreadsheet\Style\Font $font) + { + switch ($font->getName()) { + case 'Arial': + switch ($font->getSize()) { + case 10: + // inspection of Arial 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Arial 9 workbook says 12.00pt ~16px + $rowHeight = 12; + + break; + case 8: + // inspection of Arial 8 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 7: + // inspection of Arial 7 workbook says 9.00pt ~12px + $rowHeight = 9; + + break; + case 6: + case 5: + // inspection of Arial 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Arial 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Arial 3 workbook says 6.00pt ~8px + $rowHeight = 6; + + break; + case 2: + case 1: + // inspection of Arial 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Arial 10 workbook as an approximation, extrapolation + $rowHeight = 12.75 * $font->getSize() / 10; + + break; + } + + break; + case 'Calibri': + switch ($font->getSize()) { + case 11: + // inspection of Calibri 11 workbook says 15.00pt ~20px + $rowHeight = 15; + + break; + case 10: + // inspection of Calibri 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Calibri 9 workbook says 12.00pt ~16px + $rowHeight = 12; + + break; + case 8: + // inspection of Calibri 8 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 7: + // inspection of Calibri 7 workbook says 9.00pt ~12px + $rowHeight = 9; + + break; + case 6: + case 5: + // inspection of Calibri 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Calibri 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Calibri 3 workbook says 6.00pt ~8px + $rowHeight = 6.00; + + break; + case 2: + case 1: + // inspection of Calibri 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Calibri 11 workbook as an approximation, extrapolation + $rowHeight = 15 * $font->getSize() / 11; + + break; + } + + break; + case 'Verdana': + switch ($font->getSize()) { + case 10: + // inspection of Verdana 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Verdana 9 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 8: + // inspection of Verdana 8 workbook says 10.50pt ~14px + $rowHeight = 10.50; + + break; + case 7: + // inspection of Verdana 7 workbook says 9.00pt ~12px + $rowHeight = 9.00; + + break; + case 6: + case 5: + // inspection of Verdana 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Verdana 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Verdana 3 workbook says 6.00pt ~8px + $rowHeight = 6; + + break; + case 2: + case 1: + // inspection of Verdana 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Verdana 10 workbook as an approximation, extrapolation + $rowHeight = 12.75 * $font->getSize() / 10; + + break; + } + + break; + default: + // just use Calibri as an approximation + $rowHeight = 15 * $font->getSize() / 11; + + break; + } + + return $rowHeight; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT new file mode 100755 index 0000000..1c18a5d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT @@ -0,0 +1,16 @@ +Mar 1, 2005 11:15 AST by PM + ++ For consistency, renamed Math.php to Maths.java, utils to util, + tests to test, docs to doc - + ++ Removed conditional logic from top of Matrix class. + ++ Switched to using hypo function in Maths.php for all php-hypot calls. + NOTE TO SELF: Need to make sure that all decompositions have been + switched over to using the bundled hypo. + +Feb 25, 2005 at 10:00 AST by PM + ++ Recommend using simpler Error.php instead of JAMA_Error.php but + can be persuaded otherwise. + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php new file mode 100755 index 0000000..2b241d5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php @@ -0,0 +1,147 @@ +L = $A->getArray(); + $this->m = $A->getRowDimension(); + + for ($i = 0; $i < $this->m; ++$i) { + for ($j = $i; $j < $this->m; ++$j) { + for ($sum = $this->L[$i][$j], $k = $i - 1; $k >= 0; --$k) { + $sum -= $this->L[$i][$k] * $this->L[$j][$k]; + } + if ($i == $j) { + if ($sum >= 0) { + $this->L[$i][$i] = sqrt($sum); + } else { + $this->isspd = false; + } + } else { + if ($this->L[$i][$i] != 0) { + $this->L[$j][$i] = $sum / $this->L[$i][$i]; + } + } + } + + for ($k = $i + 1; $k < $this->m; ++$k) { + $this->L[$i][$k] = 0.0; + } + } + } + + /** + * Is the matrix symmetric and positive definite? + * + * @return bool + */ + public function isSPD() + { + return $this->isspd; + } + + /** + * getL. + * + * Return triangular factor. + * + * @return Matrix Lower triangular matrix + */ + public function getL() + { + return new Matrix($this->L); + } + + /** + * Solve A*X = B. + * + * @param $B Row-equal matrix + * + * @return Matrix L * L' * X = B + */ + public function solve(Matrix $B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isspd) { + $X = $B->getArrayCopy(); + $nx = $B->getColumnDimension(); + + for ($k = 0; $k < $this->m; ++$k) { + for ($i = $k + 1; $i < $this->m; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->L[$i][$k]; + } + } + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->L[$k][$k]; + } + } + + for ($k = $this->m - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->L[$k][$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->L[$k][$i]; + } + } + } + + return new Matrix($X, $this->m, $nx); + } + + throw new CalculationException(Matrix::MATRIX_SPD_EXCEPTION); + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php new file mode 100755 index 0000000..f6fbccb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php @@ -0,0 +1,861 @@ +d = $this->V[$this->n - 1]; + // Householder reduction to tridiagonal form. + for ($i = $this->n - 1; $i > 0; --$i) { + $i_ = $i - 1; + // Scale to avoid under/overflow. + $h = $scale = 0.0; + $scale += array_sum(array_map('abs', $this->d)); + if ($scale == 0.0) { + $this->e[$i] = $this->d[$i_]; + $this->d = array_slice($this->V[$i_], 0, $i_); + for ($j = 0; $j < $i; ++$j) { + $this->V[$j][$i] = $this->V[$i][$j] = 0.0; + } + } else { + // Generate Householder vector. + for ($k = 0; $k < $i; ++$k) { + $this->d[$k] /= $scale; + $h += $this->d[$k] ** 2; + } + $f = $this->d[$i_]; + $g = sqrt($h); + if ($f > 0) { + $g = -$g; + } + $this->e[$i] = $scale * $g; + $h = $h - $f * $g; + $this->d[$i_] = $f - $g; + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] = 0.0; + } + // Apply similarity transformation to remaining columns. + for ($j = 0; $j < $i; ++$j) { + $f = $this->d[$j]; + $this->V[$j][$i] = $f; + $g = $this->e[$j] + $this->V[$j][$j] * $f; + for ($k = $j + 1; $k <= $i_; ++$k) { + $g += $this->V[$k][$j] * $this->d[$k]; + $this->e[$k] += $this->V[$k][$j] * $f; + } + $this->e[$j] = $g; + } + $f = 0.0; + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] /= $h; + $f += $this->e[$j] * $this->d[$j]; + } + $hh = $f / (2 * $h); + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] -= $hh * $this->d[$j]; + } + for ($j = 0; $j < $i; ++$j) { + $f = $this->d[$j]; + $g = $this->e[$j]; + for ($k = $j; $k <= $i_; ++$k) { + $this->V[$k][$j] -= ($f * $this->e[$k] + $g * $this->d[$k]); + } + $this->d[$j] = $this->V[$i - 1][$j]; + $this->V[$i][$j] = 0.0; + } + } + $this->d[$i] = $h; + } + + // Accumulate transformations. + for ($i = 0; $i < $this->n - 1; ++$i) { + $this->V[$this->n - 1][$i] = $this->V[$i][$i]; + $this->V[$i][$i] = 1.0; + $h = $this->d[$i + 1]; + if ($h != 0.0) { + for ($k = 0; $k <= $i; ++$k) { + $this->d[$k] = $this->V[$k][$i + 1] / $h; + } + for ($j = 0; $j <= $i; ++$j) { + $g = 0.0; + for ($k = 0; $k <= $i; ++$k) { + $g += $this->V[$k][$i + 1] * $this->V[$k][$j]; + } + for ($k = 0; $k <= $i; ++$k) { + $this->V[$k][$j] -= $g * $this->d[$k]; + } + } + } + for ($k = 0; $k <= $i; ++$k) { + $this->V[$k][$i + 1] = 0.0; + } + } + + $this->d = $this->V[$this->n - 1]; + $this->V[$this->n - 1] = array_fill(0, $j, 0.0); + $this->V[$this->n - 1][$this->n - 1] = 1.0; + $this->e[0] = 0.0; + } + + /** + * Symmetric tridiagonal QL algorithm. + * + * This is derived from the Algol procedures tql2, by + * Bowdler, Martin, Reinsch, and Wilkinson, Handbook for + * Auto. Comp., Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutine in EISPACK. + */ + private function tql2(): void + { + for ($i = 1; $i < $this->n; ++$i) { + $this->e[$i - 1] = $this->e[$i]; + } + $this->e[$this->n - 1] = 0.0; + $f = 0.0; + $tst1 = 0.0; + $eps = 2.0 ** (-52.0); + + for ($l = 0; $l < $this->n; ++$l) { + // Find small subdiagonal element + $tst1 = max($tst1, abs($this->d[$l]) + abs($this->e[$l])); + $m = $l; + while ($m < $this->n) { + if (abs($this->e[$m]) <= $eps * $tst1) { + break; + } + ++$m; + } + // If m == l, $this->d[l] is an eigenvalue, + // otherwise, iterate. + if ($m > $l) { + $iter = 0; + do { + // Could check iteration count here. + ++$iter; + // Compute implicit shift + $g = $this->d[$l]; + $p = ($this->d[$l + 1] - $g) / (2.0 * $this->e[$l]); + $r = hypo($p, 1.0); + if ($p < 0) { + $r *= -1; + } + $this->d[$l] = $this->e[$l] / ($p + $r); + $this->d[$l + 1] = $this->e[$l] * ($p + $r); + $dl1 = $this->d[$l + 1]; + $h = $g - $this->d[$l]; + for ($i = $l + 2; $i < $this->n; ++$i) { + $this->d[$i] -= $h; + } + $f += $h; + // Implicit QL transformation. + $p = $this->d[$m]; + $c = 1.0; + $c2 = $c3 = $c; + $el1 = $this->e[$l + 1]; + $s = $s2 = 0.0; + for ($i = $m - 1; $i >= $l; --$i) { + $c3 = $c2; + $c2 = $c; + $s2 = $s; + $g = $c * $this->e[$i]; + $h = $c * $p; + $r = hypo($p, $this->e[$i]); + $this->e[$i + 1] = $s * $r; + $s = $this->e[$i] / $r; + $c = $p / $r; + $p = $c * $this->d[$i] - $s * $g; + $this->d[$i + 1] = $h + $s * ($c * $g + $s * $this->d[$i]); + // Accumulate transformation. + for ($k = 0; $k < $this->n; ++$k) { + $h = $this->V[$k][$i + 1]; + $this->V[$k][$i + 1] = $s * $this->V[$k][$i] + $c * $h; + $this->V[$k][$i] = $c * $this->V[$k][$i] - $s * $h; + } + } + $p = -$s * $s2 * $c3 * $el1 * $this->e[$l] / $dl1; + $this->e[$l] = $s * $p; + $this->d[$l] = $c * $p; + // Check for convergence. + } while (abs($this->e[$l]) > $eps * $tst1); + } + $this->d[$l] = $this->d[$l] + $f; + $this->e[$l] = 0.0; + } + + // Sort eigenvalues and corresponding vectors. + for ($i = 0; $i < $this->n - 1; ++$i) { + $k = $i; + $p = $this->d[$i]; + for ($j = $i + 1; $j < $this->n; ++$j) { + if ($this->d[$j] < $p) { + $k = $j; + $p = $this->d[$j]; + } + } + if ($k != $i) { + $this->d[$k] = $this->d[$i]; + $this->d[$i] = $p; + for ($j = 0; $j < $this->n; ++$j) { + $p = $this->V[$j][$i]; + $this->V[$j][$i] = $this->V[$j][$k]; + $this->V[$j][$k] = $p; + } + } + } + } + + /** + * Nonsymmetric reduction to Hessenberg form. + * + * This is derived from the Algol procedures orthes and ortran, + * by Martin and Wilkinson, Handbook for Auto. Comp., + * Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutines in EISPACK. + */ + private function orthes(): void + { + $low = 0; + $high = $this->n - 1; + + for ($m = $low + 1; $m <= $high - 1; ++$m) { + // Scale column. + $scale = 0.0; + for ($i = $m; $i <= $high; ++$i) { + $scale = $scale + abs($this->H[$i][$m - 1]); + } + if ($scale != 0.0) { + // Compute Householder transformation. + $h = 0.0; + for ($i = $high; $i >= $m; --$i) { + $this->ort[$i] = $this->H[$i][$m - 1] / $scale; + $h += $this->ort[$i] * $this->ort[$i]; + } + $g = sqrt($h); + if ($this->ort[$m] > 0) { + $g *= -1; + } + $h -= $this->ort[$m] * $g; + $this->ort[$m] -= $g; + // Apply Householder similarity transformation + // H = (I -u * u' / h) * H * (I -u * u') / h) + for ($j = $m; $j < $this->n; ++$j) { + $f = 0.0; + for ($i = $high; $i >= $m; --$i) { + $f += $this->ort[$i] * $this->H[$i][$j]; + } + $f /= $h; + for ($i = $m; $i <= $high; ++$i) { + $this->H[$i][$j] -= $f * $this->ort[$i]; + } + } + for ($i = 0; $i <= $high; ++$i) { + $f = 0.0; + for ($j = $high; $j >= $m; --$j) { + $f += $this->ort[$j] * $this->H[$i][$j]; + } + $f = $f / $h; + for ($j = $m; $j <= $high; ++$j) { + $this->H[$i][$j] -= $f * $this->ort[$j]; + } + } + $this->ort[$m] = $scale * $this->ort[$m]; + $this->H[$m][$m - 1] = $scale * $g; + } + } + + // Accumulate transformations (Algol's ortran). + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->V[$i][$j] = ($i == $j ? 1.0 : 0.0); + } + } + for ($m = $high - 1; $m >= $low + 1; --$m) { + if ($this->H[$m][$m - 1] != 0.0) { + for ($i = $m + 1; $i <= $high; ++$i) { + $this->ort[$i] = $this->H[$i][$m - 1]; + } + for ($j = $m; $j <= $high; ++$j) { + $g = 0.0; + for ($i = $m; $i <= $high; ++$i) { + $g += $this->ort[$i] * $this->V[$i][$j]; + } + // Double division avoids possible underflow + $g = ($g / $this->ort[$m]) / $this->H[$m][$m - 1]; + for ($i = $m; $i <= $high; ++$i) { + $this->V[$i][$j] += $g * $this->ort[$i]; + } + } + } + } + } + + /** + * Performs complex division. + * + * @param mixed $xr + * @param mixed $xi + * @param mixed $yr + * @param mixed $yi + */ + private function cdiv($xr, $xi, $yr, $yi): void + { + if (abs($yr) > abs($yi)) { + $r = $yi / $yr; + $d = $yr + $r * $yi; + $this->cdivr = ($xr + $r * $xi) / $d; + $this->cdivi = ($xi - $r * $xr) / $d; + } else { + $r = $yr / $yi; + $d = $yi + $r * $yr; + $this->cdivr = ($r * $xr + $xi) / $d; + $this->cdivi = ($r * $xi - $xr) / $d; + } + } + + /** + * Nonsymmetric reduction from Hessenberg to real Schur form. + * + * Code is derived from the Algol procedure hqr2, + * by Martin and Wilkinson, Handbook for Auto. Comp., + * Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutine in EISPACK. + */ + private function hqr2(): void + { + // Initialize + $nn = $this->n; + $n = $nn - 1; + $low = 0; + $high = $nn - 1; + $eps = 2.0 ** (-52.0); + $exshift = 0.0; + $p = $q = $r = $s = $z = 0; + // Store roots isolated by balanc and compute matrix norm + $norm = 0.0; + + for ($i = 0; $i < $nn; ++$i) { + if (($i < $low) || ($i > $high)) { + $this->d[$i] = $this->H[$i][$i]; + $this->e[$i] = 0.0; + } + for ($j = max($i - 1, 0); $j < $nn; ++$j) { + $norm = $norm + abs($this->H[$i][$j]); + } + } + + // Outer loop over eigenvalue index + $iter = 0; + while ($n >= $low) { + // Look for single small sub-diagonal element + $l = $n; + while ($l > $low) { + $s = abs($this->H[$l - 1][$l - 1]) + abs($this->H[$l][$l]); + if ($s == 0.0) { + $s = $norm; + } + if (abs($this->H[$l][$l - 1]) < $eps * $s) { + break; + } + --$l; + } + // Check for convergence + // One root found + if ($l == $n) { + $this->H[$n][$n] = $this->H[$n][$n] + $exshift; + $this->d[$n] = $this->H[$n][$n]; + $this->e[$n] = 0.0; + --$n; + $iter = 0; + // Two roots found + } elseif ($l == $n - 1) { + $w = $this->H[$n][$n - 1] * $this->H[$n - 1][$n]; + $p = ($this->H[$n - 1][$n - 1] - $this->H[$n][$n]) / 2.0; + $q = $p * $p + $w; + $z = sqrt(abs($q)); + $this->H[$n][$n] = $this->H[$n][$n] + $exshift; + $this->H[$n - 1][$n - 1] = $this->H[$n - 1][$n - 1] + $exshift; + $x = $this->H[$n][$n]; + // Real pair + if ($q >= 0) { + if ($p >= 0) { + $z = $p + $z; + } else { + $z = $p - $z; + } + $this->d[$n - 1] = $x + $z; + $this->d[$n] = $this->d[$n - 1]; + if ($z != 0.0) { + $this->d[$n] = $x - $w / $z; + } + $this->e[$n - 1] = 0.0; + $this->e[$n] = 0.0; + $x = $this->H[$n][$n - 1]; + $s = abs($x) + abs($z); + $p = $x / $s; + $q = $z / $s; + $r = sqrt($p * $p + $q * $q); + $p = $p / $r; + $q = $q / $r; + // Row modification + for ($j = $n - 1; $j < $nn; ++$j) { + $z = $this->H[$n - 1][$j]; + $this->H[$n - 1][$j] = $q * $z + $p * $this->H[$n][$j]; + $this->H[$n][$j] = $q * $this->H[$n][$j] - $p * $z; + } + // Column modification + for ($i = 0; $i <= $n; ++$i) { + $z = $this->H[$i][$n - 1]; + $this->H[$i][$n - 1] = $q * $z + $p * $this->H[$i][$n]; + $this->H[$i][$n] = $q * $this->H[$i][$n] - $p * $z; + } + // Accumulate transformations + for ($i = $low; $i <= $high; ++$i) { + $z = $this->V[$i][$n - 1]; + $this->V[$i][$n - 1] = $q * $z + $p * $this->V[$i][$n]; + $this->V[$i][$n] = $q * $this->V[$i][$n] - $p * $z; + } + // Complex pair + } else { + $this->d[$n - 1] = $x + $p; + $this->d[$n] = $x + $p; + $this->e[$n - 1] = $z; + $this->e[$n] = -$z; + } + $n = $n - 2; + $iter = 0; + // No convergence yet + } else { + // Form shift + $x = $this->H[$n][$n]; + $y = 0.0; + $w = 0.0; + if ($l < $n) { + $y = $this->H[$n - 1][$n - 1]; + $w = $this->H[$n][$n - 1] * $this->H[$n - 1][$n]; + } + // Wilkinson's original ad hoc shift + if ($iter == 10) { + $exshift += $x; + for ($i = $low; $i <= $n; ++$i) { + $this->H[$i][$i] -= $x; + } + $s = abs($this->H[$n][$n - 1]) + abs($this->H[$n - 1][$n - 2]); + $x = $y = 0.75 * $s; + $w = -0.4375 * $s * $s; + } + // MATLAB's new ad hoc shift + if ($iter == 30) { + $s = ($y - $x) / 2.0; + $s = $s * $s + $w; + if ($s > 0) { + $s = sqrt($s); + if ($y < $x) { + $s = -$s; + } + $s = $x - $w / (($y - $x) / 2.0 + $s); + for ($i = $low; $i <= $n; ++$i) { + $this->H[$i][$i] -= $s; + } + $exshift += $s; + $x = $y = $w = 0.964; + } + } + // Could check iteration count here. + $iter = $iter + 1; + // Look for two consecutive small sub-diagonal elements + $m = $n - 2; + while ($m >= $l) { + $z = $this->H[$m][$m]; + $r = $x - $z; + $s = $y - $z; + $p = ($r * $s - $w) / $this->H[$m + 1][$m] + $this->H[$m][$m + 1]; + $q = $this->H[$m + 1][$m + 1] - $z - $r - $s; + $r = $this->H[$m + 2][$m + 1]; + $s = abs($p) + abs($q) + abs($r); + $p = $p / $s; + $q = $q / $s; + $r = $r / $s; + if ($m == $l) { + break; + } + if (abs($this->H[$m][$m - 1]) * (abs($q) + abs($r)) < + $eps * (abs($p) * (abs($this->H[$m - 1][$m - 1]) + abs($z) + abs($this->H[$m + 1][$m + 1])))) { + break; + } + --$m; + } + for ($i = $m + 2; $i <= $n; ++$i) { + $this->H[$i][$i - 2] = 0.0; + if ($i > $m + 2) { + $this->H[$i][$i - 3] = 0.0; + } + } + // Double QR step involving rows l:n and columns m:n + for ($k = $m; $k <= $n - 1; ++$k) { + $notlast = ($k != $n - 1); + if ($k != $m) { + $p = $this->H[$k][$k - 1]; + $q = $this->H[$k + 1][$k - 1]; + $r = ($notlast ? $this->H[$k + 2][$k - 1] : 0.0); + $x = abs($p) + abs($q) + abs($r); + if ($x != 0.0) { + $p = $p / $x; + $q = $q / $x; + $r = $r / $x; + } + } + if ($x == 0.0) { + break; + } + $s = sqrt($p * $p + $q * $q + $r * $r); + if ($p < 0) { + $s = -$s; + } + if ($s != 0) { + if ($k != $m) { + $this->H[$k][$k - 1] = -$s * $x; + } elseif ($l != $m) { + $this->H[$k][$k - 1] = -$this->H[$k][$k - 1]; + } + $p = $p + $s; + $x = $p / $s; + $y = $q / $s; + $z = $r / $s; + $q = $q / $p; + $r = $r / $p; + // Row modification + for ($j = $k; $j < $nn; ++$j) { + $p = $this->H[$k][$j] + $q * $this->H[$k + 1][$j]; + if ($notlast) { + $p = $p + $r * $this->H[$k + 2][$j]; + $this->H[$k + 2][$j] = $this->H[$k + 2][$j] - $p * $z; + } + $this->H[$k][$j] = $this->H[$k][$j] - $p * $x; + $this->H[$k + 1][$j] = $this->H[$k + 1][$j] - $p * $y; + } + // Column modification + $iMax = min($n, $k + 3); + for ($i = 0; $i <= $iMax; ++$i) { + $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k + 1]; + if ($notlast) { + $p = $p + $z * $this->H[$i][$k + 2]; + $this->H[$i][$k + 2] = $this->H[$i][$k + 2] - $p * $r; + } + $this->H[$i][$k] = $this->H[$i][$k] - $p; + $this->H[$i][$k + 1] = $this->H[$i][$k + 1] - $p * $q; + } + // Accumulate transformations + for ($i = $low; $i <= $high; ++$i) { + $p = $x * $this->V[$i][$k] + $y * $this->V[$i][$k + 1]; + if ($notlast) { + $p = $p + $z * $this->V[$i][$k + 2]; + $this->V[$i][$k + 2] = $this->V[$i][$k + 2] - $p * $r; + } + $this->V[$i][$k] = $this->V[$i][$k] - $p; + $this->V[$i][$k + 1] = $this->V[$i][$k + 1] - $p * $q; + } + } // ($s != 0) + } // k loop + } // check convergence + } // while ($n >= $low) + + // Backsubstitute to find vectors of upper triangular form + if ($norm == 0.0) { + return; + } + + for ($n = $nn - 1; $n >= 0; --$n) { + $p = $this->d[$n]; + $q = $this->e[$n]; + // Real vector + if ($q == 0) { + $l = $n; + $this->H[$n][$n] = 1.0; + for ($i = $n - 1; $i >= 0; --$i) { + $w = $this->H[$i][$i] - $p; + $r = 0.0; + for ($j = $l; $j <= $n; ++$j) { + $r = $r + $this->H[$i][$j] * $this->H[$j][$n]; + } + if ($this->e[$i] < 0.0) { + $z = $w; + $s = $r; + } else { + $l = $i; + if ($this->e[$i] == 0.0) { + if ($w != 0.0) { + $this->H[$i][$n] = -$r / $w; + } else { + $this->H[$i][$n] = -$r / ($eps * $norm); + } + // Solve real equations + } else { + $x = $this->H[$i][$i + 1]; + $y = $this->H[$i + 1][$i]; + $q = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i]; + $t = ($x * $s - $z * $r) / $q; + $this->H[$i][$n] = $t; + if (abs($x) > abs($z)) { + $this->H[$i + 1][$n] = (-$r - $w * $t) / $x; + } else { + $this->H[$i + 1][$n] = (-$s - $y * $t) / $z; + } + } + // Overflow control + $t = abs($this->H[$i][$n]); + if (($eps * $t) * $t > 1) { + for ($j = $i; $j <= $n; ++$j) { + $this->H[$j][$n] = $this->H[$j][$n] / $t; + } + } + } + } + // Complex vector + } elseif ($q < 0) { + $l = $n - 1; + // Last vector component imaginary so matrix is triangular + if (abs($this->H[$n][$n - 1]) > abs($this->H[$n - 1][$n])) { + $this->H[$n - 1][$n - 1] = $q / $this->H[$n][$n - 1]; + $this->H[$n - 1][$n] = -($this->H[$n][$n] - $p) / $this->H[$n][$n - 1]; + } else { + $this->cdiv(0.0, -$this->H[$n - 1][$n], $this->H[$n - 1][$n - 1] - $p, $q); + $this->H[$n - 1][$n - 1] = $this->cdivr; + $this->H[$n - 1][$n] = $this->cdivi; + } + $this->H[$n][$n - 1] = 0.0; + $this->H[$n][$n] = 1.0; + for ($i = $n - 2; $i >= 0; --$i) { + // double ra,sa,vr,vi; + $ra = 0.0; + $sa = 0.0; + for ($j = $l; $j <= $n; ++$j) { + $ra = $ra + $this->H[$i][$j] * $this->H[$j][$n - 1]; + $sa = $sa + $this->H[$i][$j] * $this->H[$j][$n]; + } + $w = $this->H[$i][$i] - $p; + if ($this->e[$i] < 0.0) { + $z = $w; + $r = $ra; + $s = $sa; + } else { + $l = $i; + if ($this->e[$i] == 0) { + $this->cdiv(-$ra, -$sa, $w, $q); + $this->H[$i][$n - 1] = $this->cdivr; + $this->H[$i][$n] = $this->cdivi; + } else { + // Solve complex equations + $x = $this->H[$i][$i + 1]; + $y = $this->H[$i + 1][$i]; + $vr = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i] - $q * $q; + $vi = ($this->d[$i] - $p) * 2.0 * $q; + if ($vr == 0.0 & $vi == 0.0) { + $vr = $eps * $norm * (abs($w) + abs($q) + abs($x) + abs($y) + abs($z)); + } + $this->cdiv($x * $r - $z * $ra + $q * $sa, $x * $s - $z * $sa - $q * $ra, $vr, $vi); + $this->H[$i][$n - 1] = $this->cdivr; + $this->H[$i][$n] = $this->cdivi; + if (abs($x) > (abs($z) + abs($q))) { + $this->H[$i + 1][$n - 1] = (-$ra - $w * $this->H[$i][$n - 1] + $q * $this->H[$i][$n]) / $x; + $this->H[$i + 1][$n] = (-$sa - $w * $this->H[$i][$n] - $q * $this->H[$i][$n - 1]) / $x; + } else { + $this->cdiv(-$r - $y * $this->H[$i][$n - 1], -$s - $y * $this->H[$i][$n], $z, $q); + $this->H[$i + 1][$n - 1] = $this->cdivr; + $this->H[$i + 1][$n] = $this->cdivi; + } + } + // Overflow control + $t = max(abs($this->H[$i][$n - 1]), abs($this->H[$i][$n])); + if (($eps * $t) * $t > 1) { + for ($j = $i; $j <= $n; ++$j) { + $this->H[$j][$n - 1] = $this->H[$j][$n - 1] / $t; + $this->H[$j][$n] = $this->H[$j][$n] / $t; + } + } + } // end else + } // end for + } // end else for complex case + } // end for + + // Vectors of isolated roots + for ($i = 0; $i < $nn; ++$i) { + if ($i < $low | $i > $high) { + for ($j = $i; $j < $nn; ++$j) { + $this->V[$i][$j] = $this->H[$i][$j]; + } + } + } + + // Back transformation to get eigenvectors of original matrix + for ($j = $nn - 1; $j >= $low; --$j) { + for ($i = $low; $i <= $high; ++$i) { + $z = 0.0; + $kMax = min($j, $high); + for ($k = $low; $k <= $kMax; ++$k) { + $z = $z + $this->V[$i][$k] * $this->H[$k][$j]; + } + $this->V[$i][$j] = $z; + } + } + } + + // end hqr2 + + /** + * Constructor: Check for symmetry, then construct the eigenvalue decomposition. + * + * @param mixed $Arg A Square matrix + */ + public function __construct($Arg) + { + $this->A = $Arg->getArray(); + $this->n = $Arg->getColumnDimension(); + + $issymmetric = true; + for ($j = 0; ($j < $this->n) & $issymmetric; ++$j) { + for ($i = 0; ($i < $this->n) & $issymmetric; ++$i) { + $issymmetric = ($this->A[$i][$j] == $this->A[$j][$i]); + } + } + + if ($issymmetric) { + $this->V = $this->A; + // Tridiagonalize. + $this->tred2(); + // Diagonalize. + $this->tql2(); + } else { + $this->H = $this->A; + $this->ort = []; + // Reduce to Hessenberg form. + $this->orthes(); + // Reduce Hessenberg to real Schur form. + $this->hqr2(); + } + } + + /** + * Return the eigenvector matrix. + * + * @return Matrix V + */ + public function getV() + { + return new Matrix($this->V, $this->n, $this->n); + } + + /** + * Return the real parts of the eigenvalues. + * + * @return array real(diag(D)) + */ + public function getRealEigenvalues() + { + return $this->d; + } + + /** + * Return the imaginary parts of the eigenvalues. + * + * @return array imag(diag(D)) + */ + public function getImagEigenvalues() + { + return $this->e; + } + + /** + * Return the block diagonal eigenvalue matrix. + * + * @return Matrix D + */ + public function getD() + { + for ($i = 0; $i < $this->n; ++$i) { + $D[$i] = array_fill(0, $this->n, 0.0); + $D[$i][$i] = $this->d[$i]; + if ($this->e[$i] == 0) { + continue; + } + $o = ($this->e[$i] > 0) ? $i + 1 : $i - 1; + $D[$i][$o] = $this->e[$i]; + } + + return new Matrix($D); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/LUDecomposition.php new file mode 100755 index 0000000..4aecff7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/LUDecomposition.php @@ -0,0 +1,282 @@ += n, the LU decomposition is an m-by-n + * unit lower triangular matrix L, an n-by-n upper triangular matrix U, + * and a permutation vector piv of length m so that A(piv,:) = L*U. + * If m < n, then L is m-by-m and U is m-by-n. + * + * The LU decompostion with pivoting always exists, even if the matrix is + * singular, so the constructor will never fail. The primary use of the + * LU decomposition is in the solution of square systems of simultaneous + * linear equations. This will fail if isNonsingular() returns false. + * + * @author Paul Meagher + * @author Bartosz Matosiuk + * @author Michael Bommarito + * + * @version 1.1 + */ +class LUDecomposition +{ + const MATRIX_SINGULAR_EXCEPTION = 'Can only perform operation on singular matrix.'; + const MATRIX_SQUARE_EXCEPTION = 'Mismatched Row dimension'; + + /** + * Decomposition storage. + * + * @var array + */ + private $LU = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Pivot sign. + * + * @var int + */ + private $pivsign; + + /** + * Internal storage of pivot vector. + * + * @var array + */ + private $piv = []; + + /** + * LU Decomposition constructor. + * + * @param Matrix $A Rectangular matrix + */ + public function __construct($A) + { + if ($A instanceof Matrix) { + // Use a "left-looking", dot-product, Crout/Doolittle algorithm. + $this->LU = $A->getArray(); + $this->m = $A->getRowDimension(); + $this->n = $A->getColumnDimension(); + for ($i = 0; $i < $this->m; ++$i) { + $this->piv[$i] = $i; + } + $this->pivsign = 1; + $LUrowi = $LUcolj = []; + + // Outer loop. + for ($j = 0; $j < $this->n; ++$j) { + // Make a copy of the j-th column to localize references. + for ($i = 0; $i < $this->m; ++$i) { + $LUcolj[$i] = &$this->LU[$i][$j]; + } + // Apply previous transformations. + for ($i = 0; $i < $this->m; ++$i) { + $LUrowi = $this->LU[$i]; + // Most of the time is spent in the following dot product. + $kmax = min($i, $j); + $s = 0.0; + for ($k = 0; $k < $kmax; ++$k) { + $s += $LUrowi[$k] * $LUcolj[$k]; + } + $LUrowi[$j] = $LUcolj[$i] -= $s; + } + // Find pivot and exchange if necessary. + $p = $j; + for ($i = $j + 1; $i < $this->m; ++$i) { + if (abs($LUcolj[$i]) > abs($LUcolj[$p])) { + $p = $i; + } + } + if ($p != $j) { + for ($k = 0; $k < $this->n; ++$k) { + $t = $this->LU[$p][$k]; + $this->LU[$p][$k] = $this->LU[$j][$k]; + $this->LU[$j][$k] = $t; + } + $k = $this->piv[$p]; + $this->piv[$p] = $this->piv[$j]; + $this->piv[$j] = $k; + $this->pivsign = $this->pivsign * -1; + } + // Compute multipliers. + if (($j < $this->m) && ($this->LU[$j][$j] != 0.0)) { + for ($i = $j + 1; $i < $this->m; ++$i) { + $this->LU[$i][$j] /= $this->LU[$j][$j]; + } + } + } + } else { + throw new CalculationException(Matrix::ARGUMENT_TYPE_EXCEPTION); + } + } + + // function __construct() + + /** + * Get lower triangular factor. + * + * @return Matrix Lower triangular factor + */ + public function getL() + { + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i > $j) { + $L[$i][$j] = $this->LU[$i][$j]; + } elseif ($i == $j) { + $L[$i][$j] = 1.0; + } else { + $L[$i][$j] = 0.0; + } + } + } + + return new Matrix($L); + } + + // function getL() + + /** + * Get upper triangular factor. + * + * @return Matrix Upper triangular factor + */ + public function getU() + { + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i <= $j) { + $U[$i][$j] = $this->LU[$i][$j]; + } else { + $U[$i][$j] = 0.0; + } + } + } + + return new Matrix($U); + } + + // function getU() + + /** + * Return pivot permutation vector. + * + * @return array Pivot vector + */ + public function getPivot() + { + return $this->piv; + } + + // function getPivot() + + /** + * Alias for getPivot. + * + * @see getPivot + */ + public function getDoublePivot() + { + return $this->getPivot(); + } + + // function getDoublePivot() + + /** + * Is the matrix nonsingular? + * + * @return bool true if U, and hence A, is nonsingular + */ + public function isNonsingular() + { + for ($j = 0; $j < $this->n; ++$j) { + if ($this->LU[$j][$j] == 0) { + return false; + } + } + + return true; + } + + // function isNonsingular() + + /** + * Count determinants. + * + * @return array d matrix deterninat + */ + public function det() + { + if ($this->m == $this->n) { + $d = $this->pivsign; + for ($j = 0; $j < $this->n; ++$j) { + $d *= $this->LU[$j][$j]; + } + + return $d; + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } + + // function det() + + /** + * Solve A*X = B. + * + * @param mixed $B a Matrix with as many rows as A and any number of columns + * + * @return Matrix X so that L*U*X = B(piv,:) + */ + public function solve($B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isNonsingular()) { + // Copy right hand side with pivoting + $nx = $B->getColumnDimension(); + $X = $B->getMatrix($this->piv, 0, $nx - 1); + // Solve L*Y = B(piv,:) + for ($k = 0; $k < $this->n; ++$k) { + for ($i = $k + 1; $i < $this->n; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; + } + } + } + // Solve U*X = Y; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$k][$j] /= $this->LU[$k][$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; + } + } + } + + return $X; + } + + throw new CalculationException(self::MATRIX_SINGULAR_EXCEPTION); + } + + throw new CalculationException(self::MATRIX_SQUARE_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/Matrix.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/Matrix.php new file mode 100755 index 0000000..a5cb6de --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/Matrix.php @@ -0,0 +1,1202 @@ + 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + //Rectangular matrix - m x n initialized from 2D array + case 'array': + $this->m = count($args[0]); + $this->n = count($args[0][0]); + $this->A = $args[0]; + + break; + //Square matrix - n x n + case 'integer': + $this->m = $args[0]; + $this->n = $args[0]; + $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); + + break; + //Rectangular matrix - m x n + case 'integer,integer': + $this->m = $args[0]; + $this->n = $args[1]; + $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); + + break; + //Rectangular matrix - m x n initialized from packed array + case 'array,integer': + $this->m = $args[1]; + if ($this->m != 0) { + $this->n = count($args[0]) / $this->m; + } else { + $this->n = 0; + } + if (($this->m * $this->n) == count($args[0])) { + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $args[0][$i + $j * $this->m]; + } + } + } else { + throw new CalculationException(self::ARRAY_LENGTH_EXCEPTION); + } + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * getArray. + * + * @return array Matrix array + */ + public function getArray() + { + return $this->A; + } + + /** + * getRowDimension. + * + * @return int Row dimension + */ + public function getRowDimension() + { + return $this->m; + } + + /** + * getColumnDimension. + * + * @return int Column dimension + */ + public function getColumnDimension() + { + return $this->n; + } + + /** + * get. + * + * Get the i,j-th element of the matrix. + * + * @param int $i Row position + * @param int $j Column position + * + * @return mixed Element (int/float/double) + */ + public function get($i = null, $j = null) + { + return $this->A[$i][$j]; + } + + /** + * getMatrix. + * + * Get a submatrix + * + * @return Matrix Submatrix + */ + public function getMatrix(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + //A($i0...; $j0...) + case 'integer,integer': + [$i0, $j0] = $args; + if ($i0 >= 0) { + $m = $this->m - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if ($j0 >= 0) { + $n = $this->n - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = $i0; $i < $this->m; ++$i) { + for ($j = $j0; $j < $this->n; ++$j) { + $R->set($i, $j, $this->A[$i][$j]); + } + } + + return $R; + + break; + //A($i0...$iF; $j0...$jF) + case 'integer,integer,integer,integer': + [$i0, $iF, $j0, $jF] = $args; + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { + $m = $iF - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { + $n = $jF - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m + 1, $n + 1); + for ($i = $i0; $i <= $iF; ++$i) { + for ($j = $j0; $j <= $jF; ++$j) { + $R->set($i - $i0, $j - $j0, $this->A[$i][$j]); + } + } + + return $R; + + break; + //$R = array of row indices; $C = array of column indices + case 'array,array': + [$RL, $CL] = $args; + if (count($RL) > 0) { + $m = count($RL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (count($CL) > 0) { + $n = count($CL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = 0; $i < $m; ++$i) { + for ($j = 0; $j < $n; ++$j) { + $R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]); + } + } + + return $R; + + break; + //A($i0...$iF); $CL = array of column indices + case 'integer,integer,array': + [$i0, $iF, $CL] = $args; + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { + $m = $iF - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (count($CL) > 0) { + $n = count($CL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = $i0; $i < $iF; ++$i) { + for ($j = 0; $j < $n; ++$j) { + $R->set($i - $i0, $j, $this->A[$i][$CL[$j]]); + } + } + + return $R; + + break; + //$RL = array of row indices + case 'array,integer,integer': + [$RL, $j0, $jF] = $args; + if (count($RL) > 0) { + $m = count($RL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { + $n = $jF - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n + 1); + for ($i = 0; $i < $m; ++$i) { + for ($j = $j0; $j <= $jF; ++$j) { + $R->set($i, $j - $j0, $this->A[$RL[$i]][$j]); + } + } + + return $R; + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * checkMatrixDimensions. + * + * Is matrix B the same size? + * + * @param Matrix $B Matrix B + * + * @return bool + */ + public function checkMatrixDimensions($B = null) + { + if ($B instanceof self) { + if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) { + return true; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + // function checkMatrixDimensions() + + /** + * set. + * + * Set the i,j-th element of the matrix. + * + * @param int $i Row position + * @param int $j Column position + * @param mixed $c Int/float/double value + * + * @return mixed Element (int/float/double) + */ + public function set($i = null, $j = null, $c = null) + { + // Optimized set version just has this + $this->A[$i][$j] = $c; + } + + // function set() + + /** + * identity. + * + * Generate an identity matrix. + * + * @param int $m Row dimension + * @param int $n Column dimension + * + * @return Matrix Identity matrix + */ + public function identity($m = null, $n = null) + { + return $this->diagonal($m, $n, 1); + } + + /** + * diagonal. + * + * Generate a diagonal matrix + * + * @param int $m Row dimension + * @param int $n Column dimension + * @param mixed $c Diagonal value + * + * @return Matrix Diagonal matrix + */ + public function diagonal($m = null, $n = null, $c = 1) + { + $R = new self($m, $n); + for ($i = 0; $i < $m; ++$i) { + $R->set($i, $i, $c); + } + + return $R; + } + + /** + * getMatrixByRow. + * + * Get a submatrix by row index/range + * + * @param int $i0 Initial row index + * @param int $iF Final row index + * + * @return Matrix Submatrix + */ + public function getMatrixByRow($i0 = null, $iF = null) + { + if (is_int($i0)) { + if (is_int($iF)) { + return $this->getMatrix($i0, 0, $iF + 1, $this->n); + } + + return $this->getMatrix($i0, 0, $i0 + 1, $this->n); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + /** + * getMatrixByCol. + * + * Get a submatrix by column index/range + * + * @param int $j0 Initial column index + * @param int $jF Final column index + * + * @return Matrix Submatrix + */ + public function getMatrixByCol($j0 = null, $jF = null) + { + if (is_int($j0)) { + if (is_int($jF)) { + return $this->getMatrix(0, $j0, $this->m, $jF + 1); + } + + return $this->getMatrix(0, $j0, $this->m, $j0 + 1); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + /** + * transpose. + * + * Tranpose matrix + * + * @return Matrix Transposed matrix + */ + public function transpose() + { + $R = new self($this->n, $this->m); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $R->set($j, $i, $this->A[$i][$j]); + } + } + + return $R; + } + + // function transpose() + + /** + * trace. + * + * Sum of diagonal elements + * + * @return float Sum of diagonal elements + */ + public function trace() + { + $s = 0; + $n = min($this->m, $this->n); + for ($i = 0; $i < $n; ++$i) { + $s += $this->A[$i][$i]; + } + + return $s; + } + + /** + * uminus. + * + * Unary minus matrix -A + * + * @return Matrix Unary minus matrix + */ + public function uminus() + { + } + + /** + * plus. + * + * A + B + * + * @return Matrix Sum + */ + public function plus(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) + $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * plusEquals. + * + * A = A + B + * + * @return $this + */ + public function plusEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] += $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * minus. + * + * A - B + * + * @return Matrix Sum + */ + public function minus(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) - $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * minusEquals. + * + * A = A - B + * + * @return $this + */ + public function minusEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] -= $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayTimes. + * + * Element-by-element multiplication + * Cij = Aij * Bij + * + * @return Matrix Matrix Cij + */ + public function arrayTimes(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) * $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayTimesEquals. + * + * Element-by-element multiplication + * Aij = Aij * Bij + * + * @return $this + */ + public function arrayTimesEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] *= $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayRightDivide. + * + * Element-by-element right division + * A / B + * + * @return Matrix Division result + */ + public function arrayRightDivide(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + if ($value == 0) { + // Trap for Divide by Zero error + $M->set($i, $j, '#DIV/0!'); + } else { + $M->set($i, $j, $this->A[$i][$j] / $value); + } + } else { + $M->set($i, $j, Functions::NAN()); + } + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayRightDivideEquals. + * + * Element-by-element right division + * Aij = Aij / Bij + * + * @return Matrix Matrix Aij + */ + public function arrayRightDivideEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $this->A[$i][$j] / $M->get($i, $j); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayLeftDivide. + * + * Element-by-element Left division + * A / B + * + * @return Matrix Division result + */ + public function arrayLeftDivide(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) / $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayLeftDivideEquals. + * + * Element-by-element Left division + * Aij = Aij / Bij + * + * @return Matrix Matrix Aij + */ + public function arrayLeftDivideEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $M->get($i, $j) / $this->A[$i][$j]; + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * times. + * + * Matrix multiplication + * + * @return Matrix Product + */ + public function times(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $B = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + if ($this->n == $B->m) { + $C = new self($this->m, $B->n); + for ($j = 0; $j < $B->n; ++$j) { + $Bcolj = []; + for ($k = 0; $k < $this->n; ++$k) { + $Bcolj[$k] = $B->A[$k][$j]; + } + for ($i = 0; $i < $this->m; ++$i) { + $Arowi = $this->A[$i]; + $s = 0; + for ($k = 0; $k < $this->n; ++$k) { + $s += $Arowi[$k] * $Bcolj[$k]; + } + $C->A[$i][$j] = $s; + } + } + + return $C; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + case 'array': + $B = new self($args[0]); + if ($this->n == $B->m) { + $C = new self($this->m, $B->n); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $s = '0'; + for ($k = 0; $k < $C->n; ++$k) { + $s += $this->A[$i][$k] * $B->A[$k][$j]; + } + $C->A[$i][$j] = $s; + } + } + + return $C; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + case 'integer': + $C = new self($this->A); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] *= $args[0]; + } + } + + return $C; + case 'double': + $C = new self($this->m, $this->n); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] = $args[0] * $this->A[$i][$j]; + } + } + + return $C; + case 'float': + $C = new self($this->A); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] *= $args[0]; + } + } + + return $C; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * power. + * + * A = A ^ B + * + * @return $this + */ + public function power(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] = $this->A[$i][$j] ** $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * concat. + * + * A = A & B + * + * @return $this + */ + public function concat(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"') . trim($M->get($i, $j), '"'); + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * Solve A*X = B. + * + * @param Matrix $B Right hand side + * + * @return Matrix ... Solution if A is square, least squares solution otherwise + */ + public function solve($B) + { + if ($this->m == $this->n) { + $LU = new LUDecomposition($this); + + return $LU->solve($B); + } + $QR = new QRDecomposition($this); + + return $QR->solve($B); + } + + /** + * Matrix inverse or pseudoinverse. + * + * @return Matrix ... Inverse(A) if A is square, pseudoinverse otherwise. + */ + public function inverse() + { + return $this->solve($this->identity($this->m, $this->m)); + } + + /** + * det. + * + * Calculate determinant + * + * @return float Determinant + */ + public function det() + { + $L = new LUDecomposition($this); + + return $L->det(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/QRDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/QRDecomposition.php new file mode 100755 index 0000000..3bb8a10 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/QRDecomposition.php @@ -0,0 +1,249 @@ += n, the QR decomposition is an m-by-n + * orthogonal matrix Q and an n-by-n upper triangular matrix R so that + * A = Q*R. + * + * The QR decompostion always exists, even if the matrix does not have + * full rank, so the constructor will never fail. The primary use of the + * QR decomposition is in the least squares solution of nonsquare systems + * of simultaneous linear equations. This will fail if isFullRank() + * returns false. + * + * @author Paul Meagher + * + * @version 1.1 + */ +class QRDecomposition +{ + const MATRIX_RANK_EXCEPTION = 'Can only perform operation on full-rank matrix.'; + + /** + * Array for internal storage of decomposition. + * + * @var array + */ + private $QR = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Array for internal storage of diagonal of R. + * + * @var array + */ + private $Rdiag = []; + + /** + * QR Decomposition computed by Householder reflections. + * + * @param matrix $A Rectangular matrix + */ + public function __construct($A) + { + if ($A instanceof Matrix) { + // Initialize. + $this->QR = $A->getArray(); + $this->m = $A->getRowDimension(); + $this->n = $A->getColumnDimension(); + // Main loop. + for ($k = 0; $k < $this->n; ++$k) { + // Compute 2-norm of k-th column without under/overflow. + $nrm = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $nrm = hypo($nrm, $this->QR[$i][$k]); + } + if ($nrm != 0.0) { + // Form k-th Householder vector. + if ($this->QR[$k][$k] < 0) { + $nrm = -$nrm; + } + for ($i = $k; $i < $this->m; ++$i) { + $this->QR[$i][$k] /= $nrm; + } + $this->QR[$k][$k] += 1.0; + // Apply transformation to remaining columns. + for ($j = $k + 1; $j < $this->n; ++$j) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $this->QR[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $this->QR[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + $this->Rdiag[$k] = -$nrm; + } + } else { + throw new CalculationException(Matrix::ARGUMENT_TYPE_EXCEPTION); + } + } + + // function __construct() + + /** + * Is the matrix full rank? + * + * @return bool true if R, and hence A, has full rank, else false + */ + public function isFullRank() + { + for ($j = 0; $j < $this->n; ++$j) { + if ($this->Rdiag[$j] == 0) { + return false; + } + } + + return true; + } + + // function isFullRank() + + /** + * Return the Householder vectors. + * + * @return Matrix Lower trapezoidal matrix whose columns define the reflections + */ + public function getH() + { + $H = []; + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i >= $j) { + $H[$i][$j] = $this->QR[$i][$j]; + } else { + $H[$i][$j] = 0.0; + } + } + } + + return new Matrix($H); + } + + // function getH() + + /** + * Return the upper triangular factor. + * + * @return Matrix upper triangular factor + */ + public function getR() + { + $R = []; + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i < $j) { + $R[$i][$j] = $this->QR[$i][$j]; + } elseif ($i == $j) { + $R[$i][$j] = $this->Rdiag[$i]; + } else { + $R[$i][$j] = 0.0; + } + } + } + + return new Matrix($R); + } + + // function getR() + + /** + * Generate and return the (economy-sized) orthogonal factor. + * + * @return Matrix orthogonal factor + */ + public function getQ() + { + $Q = []; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($i = 0; $i < $this->m; ++$i) { + $Q[$i][$k] = 0.0; + } + $Q[$k][$k] = 1.0; + for ($j = $k; $j < $this->n; ++$j) { + if ($this->QR[$k][$k] != 0) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $Q[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $Q[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + } + + return new Matrix($Q); + } + + // function getQ() + + /** + * Least squares solution of A*X = B. + * + * @param Matrix $B a Matrix with as many rows as A and any number of columns + * + * @return Matrix matrix that minimizes the two norm of Q*R*X-B + */ + public function solve($B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isFullRank()) { + // Copy right hand side + $nx = $B->getColumnDimension(); + $X = $B->getArrayCopy(); + // Compute Y = transpose(Q)*B + for ($k = 0; $k < $this->n; ++$k) { + for ($j = 0; $j < $nx; ++$j) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $X[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $X[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + // Solve R*X = Y; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->Rdiag[$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->QR[$i][$k]; + } + } + } + $X = new Matrix($X); + + return $X->getMatrix(0, $this->n - 1, 0, $nx); + } + + throw new CalculationException(self::MATRIX_RANK_EXCEPTION); + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php new file mode 100755 index 0000000..b997fb7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php @@ -0,0 +1,528 @@ += n, the singular value decomposition is + * an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and + * an n-by-n orthogonal matrix V so that A = U*S*V'. + * + * The singular values, sigma[$k] = S[$k][$k], are ordered so that + * sigma[0] >= sigma[1] >= ... >= sigma[n-1]. + * + * The singular value decompostion always exists, so the constructor will + * never fail. The matrix condition number and the effective numerical + * rank can be computed from this decomposition. + * + * @author Paul Meagher + * + * @version 1.1 + */ +class SingularValueDecomposition +{ + /** + * Internal storage of U. + * + * @var array + */ + private $U = []; + + /** + * Internal storage of V. + * + * @var array + */ + private $V = []; + + /** + * Internal storage of singular values. + * + * @var array + */ + private $s = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Construct the singular value decomposition. + * + * Derived from LINPACK code. + * + * @param mixed $Arg Rectangular matrix + */ + public function __construct($Arg) + { + // Initialize. + $A = $Arg->getArrayCopy(); + $this->m = $Arg->getRowDimension(); + $this->n = $Arg->getColumnDimension(); + $nu = min($this->m, $this->n); + $e = []; + $work = []; + $wantu = true; + $wantv = true; + $nct = min($this->m - 1, $this->n); + $nrt = max(0, min($this->n - 2, $this->m)); + + // Reduce A to bidiagonal form, storing the diagonal elements + // in s and the super-diagonal elements in e. + $kMax = max($nct, $nrt); + for ($k = 0; $k < $kMax; ++$k) { + if ($k < $nct) { + // Compute the transformation for the k-th column and + // place the k-th diagonal in s[$k]. + // Compute 2-norm of k-th column without under/overflow. + $this->s[$k] = 0; + for ($i = $k; $i < $this->m; ++$i) { + $this->s[$k] = hypo($this->s[$k], $A[$i][$k]); + } + if ($this->s[$k] != 0.0) { + if ($A[$k][$k] < 0.0) { + $this->s[$k] = -$this->s[$k]; + } + for ($i = $k; $i < $this->m; ++$i) { + $A[$i][$k] /= $this->s[$k]; + } + $A[$k][$k] += 1.0; + } + $this->s[$k] = -$this->s[$k]; + } + + for ($j = $k + 1; $j < $this->n; ++$j) { + if (($k < $nct) & ($this->s[$k] != 0.0)) { + // Apply the transformation. + $t = 0; + for ($i = $k; $i < $this->m; ++$i) { + $t += $A[$i][$k] * $A[$i][$j]; + } + $t = -$t / $A[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $A[$i][$j] += $t * $A[$i][$k]; + } + // Place the k-th row of A into e for the + // subsequent calculation of the row transformation. + $e[$j] = $A[$k][$j]; + } + } + + if ($wantu && ($k < $nct)) { + // Place the transformation in U for subsequent back + // multiplication. + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$k] = $A[$i][$k]; + } + } + + if ($k < $nrt) { + // Compute the k-th row transformation and place the + // k-th super-diagonal in e[$k]. + // Compute 2-norm without under/overflow. + $e[$k] = 0; + for ($i = $k + 1; $i < $this->n; ++$i) { + $e[$k] = hypo($e[$k], $e[$i]); + } + if ($e[$k] != 0.0) { + if ($e[$k + 1] < 0.0) { + $e[$k] = -$e[$k]; + } + for ($i = $k + 1; $i < $this->n; ++$i) { + $e[$i] /= $e[$k]; + } + $e[$k + 1] += 1.0; + } + $e[$k] = -$e[$k]; + if (($k + 1 < $this->m) && ($e[$k] != 0.0)) { + // Apply the transformation. + for ($i = $k + 1; $i < $this->m; ++$i) { + $work[$i] = 0.0; + } + for ($j = $k + 1; $j < $this->n; ++$j) { + for ($i = $k + 1; $i < $this->m; ++$i) { + $work[$i] += $e[$j] * $A[$i][$j]; + } + } + for ($j = $k + 1; $j < $this->n; ++$j) { + $t = -$e[$j] / $e[$k + 1]; + for ($i = $k + 1; $i < $this->m; ++$i) { + $A[$i][$j] += $t * $work[$i]; + } + } + } + if ($wantv) { + // Place the transformation in V for subsequent + // back multiplication. + for ($i = $k + 1; $i < $this->n; ++$i) { + $this->V[$i][$k] = $e[$i]; + } + } + } + } + + // Set up the final bidiagonal matrix or order p. + $p = min($this->n, $this->m + 1); + if ($nct < $this->n) { + $this->s[$nct] = $A[$nct][$nct]; + } + if ($this->m < $p) { + $this->s[$p - 1] = 0.0; + } + if ($nrt + 1 < $p) { + $e[$nrt] = $A[$nrt][$p - 1]; + } + $e[$p - 1] = 0.0; + // If required, generate U. + if ($wantu) { + for ($j = $nct; $j < $nu; ++$j) { + for ($i = 0; $i < $this->m; ++$i) { + $this->U[$i][$j] = 0.0; + } + $this->U[$j][$j] = 1.0; + } + for ($k = $nct - 1; $k >= 0; --$k) { + if ($this->s[$k] != 0.0) { + for ($j = $k + 1; $j < $nu; ++$j) { + $t = 0; + for ($i = $k; $i < $this->m; ++$i) { + $t += $this->U[$i][$k] * $this->U[$i][$j]; + } + $t = -$t / $this->U[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$j] += $t * $this->U[$i][$k]; + } + } + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$k] = -$this->U[$i][$k]; + } + $this->U[$k][$k] = 1.0 + $this->U[$k][$k]; + for ($i = 0; $i < $k - 1; ++$i) { + $this->U[$i][$k] = 0.0; + } + } else { + for ($i = 0; $i < $this->m; ++$i) { + $this->U[$i][$k] = 0.0; + } + $this->U[$k][$k] = 1.0; + } + } + } + + // If required, generate V. + if ($wantv) { + for ($k = $this->n - 1; $k >= 0; --$k) { + if (($k < $nrt) && ($e[$k] != 0.0)) { + for ($j = $k + 1; $j < $nu; ++$j) { + $t = 0; + for ($i = $k + 1; $i < $this->n; ++$i) { + $t += $this->V[$i][$k] * $this->V[$i][$j]; + } + $t = -$t / $this->V[$k + 1][$k]; + for ($i = $k + 1; $i < $this->n; ++$i) { + $this->V[$i][$j] += $t * $this->V[$i][$k]; + } + } + } + for ($i = 0; $i < $this->n; ++$i) { + $this->V[$i][$k] = 0.0; + } + $this->V[$k][$k] = 1.0; + } + } + + // Main iteration loop for the singular values. + $pp = $p - 1; + $iter = 0; + $eps = 2.0 ** (-52.0); + + while ($p > 0) { + // Here is where a test for too many iterations would go. + // This section of the program inspects for negligible + // elements in the s and e arrays. On completion the + // variables kase and k are set as follows: + // kase = 1 if s(p) and e[k-1] are negligible and k

= -1; --$k) { + if ($k == -1) { + break; + } + if (abs($e[$k]) <= $eps * (abs($this->s[$k]) + abs($this->s[$k + 1]))) { + $e[$k] = 0.0; + + break; + } + } + if ($k == $p - 2) { + $kase = 4; + } else { + for ($ks = $p - 1; $ks >= $k; --$ks) { + if ($ks == $k) { + break; + } + $t = ($ks != $p ? abs($e[$ks]) : 0.) + ($ks != $k + 1 ? abs($e[$ks - 1]) : 0.); + if (abs($this->s[$ks]) <= $eps * $t) { + $this->s[$ks] = 0.0; + + break; + } + } + if ($ks == $k) { + $kase = 3; + } elseif ($ks == $p - 1) { + $kase = 1; + } else { + $kase = 2; + $k = $ks; + } + } + ++$k; + + // Perform the task indicated by kase. + switch ($kase) { + // Deflate negligible s(p). + case 1: + $f = $e[$p - 2]; + $e[$p - 2] = 0.0; + for ($j = $p - 2; $j >= $k; --$j) { + $t = hypo($this->s[$j], $f); + $cs = $this->s[$j] / $t; + $sn = $f / $t; + $this->s[$j] = $t; + if ($j != $k) { + $f = -$sn * $e[$j - 1]; + $e[$j - 1] = $cs * $e[$j - 1]; + } + if ($wantv) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$p - 1]; + $this->V[$i][$p - 1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$p - 1]; + $this->V[$i][$j] = $t; + } + } + } + + break; + // Split at negligible s(k). + case 2: + $f = $e[$k - 1]; + $e[$k - 1] = 0.0; + for ($j = $k; $j < $p; ++$j) { + $t = hypo($this->s[$j], $f); + $cs = $this->s[$j] / $t; + $sn = $f / $t; + $this->s[$j] = $t; + $f = -$sn * $e[$j]; + $e[$j] = $cs * $e[$j]; + if ($wantu) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$k - 1]; + $this->U[$i][$k - 1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$k - 1]; + $this->U[$i][$j] = $t; + } + } + } + + break; + // Perform one qr step. + case 3: + // Calculate the shift. + $scale = max(max(max(max(abs($this->s[$p - 1]), abs($this->s[$p - 2])), abs($e[$p - 2])), abs($this->s[$k])), abs($e[$k])); + $sp = $this->s[$p - 1] / $scale; + $spm1 = $this->s[$p - 2] / $scale; + $epm1 = $e[$p - 2] / $scale; + $sk = $this->s[$k] / $scale; + $ek = $e[$k] / $scale; + $b = (($spm1 + $sp) * ($spm1 - $sp) + $epm1 * $epm1) / 2.0; + $c = ($sp * $epm1) * ($sp * $epm1); + $shift = 0.0; + if (($b != 0.0) || ($c != 0.0)) { + $shift = sqrt($b * $b + $c); + if ($b < 0.0) { + $shift = -$shift; + } + $shift = $c / ($b + $shift); + } + $f = ($sk + $sp) * ($sk - $sp) + $shift; + $g = $sk * $ek; + // Chase zeros. + for ($j = $k; $j < $p - 1; ++$j) { + $t = hypo($f, $g); + $cs = $f / $t; + $sn = $g / $t; + if ($j != $k) { + $e[$j - 1] = $t; + } + $f = $cs * $this->s[$j] + $sn * $e[$j]; + $e[$j] = $cs * $e[$j] - $sn * $this->s[$j]; + $g = $sn * $this->s[$j + 1]; + $this->s[$j + 1] = $cs * $this->s[$j + 1]; + if ($wantv) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$j + 1]; + $this->V[$i][$j + 1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$j + 1]; + $this->V[$i][$j] = $t; + } + } + $t = hypo($f, $g); + $cs = $f / $t; + $sn = $g / $t; + $this->s[$j] = $t; + $f = $cs * $e[$j] + $sn * $this->s[$j + 1]; + $this->s[$j + 1] = -$sn * $e[$j] + $cs * $this->s[$j + 1]; + $g = $sn * $e[$j + 1]; + $e[$j + 1] = $cs * $e[$j + 1]; + if ($wantu && ($j < $this->m - 1)) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$j + 1]; + $this->U[$i][$j + 1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$j + 1]; + $this->U[$i][$j] = $t; + } + } + } + $e[$p - 2] = $f; + $iter = $iter + 1; + + break; + // Convergence. + case 4: + // Make the singular values positive. + if ($this->s[$k] <= 0.0) { + $this->s[$k] = ($this->s[$k] < 0.0 ? -$this->s[$k] : 0.0); + if ($wantv) { + for ($i = 0; $i <= $pp; ++$i) { + $this->V[$i][$k] = -$this->V[$i][$k]; + } + } + } + // Order the singular values. + while ($k < $pp) { + if ($this->s[$k] >= $this->s[$k + 1]) { + break; + } + $t = $this->s[$k]; + $this->s[$k] = $this->s[$k + 1]; + $this->s[$k + 1] = $t; + if ($wantv && ($k < $this->n - 1)) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $this->V[$i][$k + 1]; + $this->V[$i][$k + 1] = $this->V[$i][$k]; + $this->V[$i][$k] = $t; + } + } + if ($wantu && ($k < $this->m - 1)) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $this->U[$i][$k + 1]; + $this->U[$i][$k + 1] = $this->U[$i][$k]; + $this->U[$i][$k] = $t; + } + } + ++$k; + } + $iter = 0; + --$p; + + break; + } // end switch + } // end while + } + + /** + * Return the left singular vectors. + * + * @return Matrix U + */ + public function getU() + { + return new Matrix($this->U, $this->m, min($this->m + 1, $this->n)); + } + + /** + * Return the right singular vectors. + * + * @return Matrix V + */ + public function getV() + { + return new Matrix($this->V); + } + + /** + * Return the one-dimensional array of singular values. + * + * @return array diagonal of S + */ + public function getSingularValues() + { + return $this->s; + } + + /** + * Return the diagonal matrix of singular values. + * + * @return Matrix S + */ + public function getS() + { + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $S[$i][$j] = 0.0; + } + $S[$i][$i] = $this->s[$i]; + } + + return new Matrix($S); + } + + /** + * Two norm. + * + * @return float max(S) + */ + public function norm2() + { + return $this->s[0]; + } + + /** + * Two norm condition number. + * + * @return float max(S)/min(S) + */ + public function cond() + { + return $this->s[0] / $this->s[min($this->m, $this->n) - 1]; + } + + /** + * Effective numerical matrix rank. + * + * @return int Number of nonnegligible singular values + */ + public function rank() + { + $eps = 2.0 ** (-52.0); + $tol = max($this->m, $this->n) * $this->s[0] * $eps; + $r = 0; + $iMax = count($this->s); + for ($i = 0; $i < $iMax; ++$i) { + if ($this->s[$i] > $tol) { + ++$r; + } + } + + return $r; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/utils/Maths.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/utils/Maths.php new file mode 100755 index 0000000..68c3864 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/JAMA/utils/Maths.php @@ -0,0 +1,30 @@ + abs($b)) { + $r = $b / $a; + $r = abs($a) * sqrt(1 + $r * $r); + } elseif ($b != 0) { + $r = $a / $b; + $r = abs($b) * sqrt(1 + $r * $r); + } else { + $r = 0.0; + } + + return $r; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE.php new file mode 100755 index 0000000..25d698a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE.php @@ -0,0 +1,566 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// + +use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException; +use PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\Root; + +/* + * Array for storing OLE instances that are accessed from + * OLE_ChainedBlockStream::stream_open(). + * + * @var array + */ +$GLOBALS['_OLE_INSTANCES'] = []; + +/** + * OLE package base class. + * + * @author Xavier Noguer + * @author Christian Schmidt + */ +class OLE +{ + const OLE_PPS_TYPE_ROOT = 5; + const OLE_PPS_TYPE_DIR = 1; + const OLE_PPS_TYPE_FILE = 2; + const OLE_DATA_SIZE_SMALL = 0x1000; + const OLE_LONG_INT_SIZE = 4; + const OLE_PPS_SIZE = 0x80; + + /** + * The file handle for reading an OLE container. + * + * @var resource + */ + public $_file_handle; + + /** + * Array of PPS's found on the OLE container. + * + * @var array + */ + public $_list = []; + + /** + * Root directory of OLE container. + * + * @var Root + */ + public $root; + + /** + * Big Block Allocation Table. + * + * @var array (blockId => nextBlockId) + */ + public $bbat; + + /** + * Short Block Allocation Table. + * + * @var array (blockId => nextBlockId) + */ + public $sbat; + + /** + * Size of big blocks. This is usually 512. + * + * @var int number of octets per block + */ + public $bigBlockSize; + + /** + * Size of small blocks. This is usually 64. + * + * @var int number of octets per block + */ + public $smallBlockSize; + + /** + * Threshold for big blocks. + * + * @var int + */ + public $bigBlockThreshold; + + /** + * Reads an OLE container from the contents of the file given. + * + * @acces public + * + * @param string $file + * + * @return bool true on success, PEAR_Error on failure + */ + public function read($file) + { + $fh = fopen($file, 'rb'); + if (!$fh) { + throw new ReaderException("Can't open file $file"); + } + $this->_file_handle = $fh; + + $signature = fread($fh, 8); + if ("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" != $signature) { + throw new ReaderException("File doesn't seem to be an OLE container."); + } + fseek($fh, 28); + if (fread($fh, 2) != "\xFE\xFF") { + // This shouldn't be a problem in practice + throw new ReaderException('Only Little-Endian encoding is supported.'); + } + // Size of blocks and short blocks in bytes + $this->bigBlockSize = 2 ** self::_readInt2($fh); + $this->smallBlockSize = 2 ** self::_readInt2($fh); + + // Skip UID, revision number and version number + fseek($fh, 44); + // Number of blocks in Big Block Allocation Table + $bbatBlockCount = self::_readInt4($fh); + + // Root chain 1st block + $directoryFirstBlockId = self::_readInt4($fh); + + // Skip unused bytes + fseek($fh, 56); + // Streams shorter than this are stored using small blocks + $this->bigBlockThreshold = self::_readInt4($fh); + // Block id of first sector in Short Block Allocation Table + $sbatFirstBlockId = self::_readInt4($fh); + // Number of blocks in Short Block Allocation Table + $sbbatBlockCount = self::_readInt4($fh); + // Block id of first sector in Master Block Allocation Table + $mbatFirstBlockId = self::_readInt4($fh); + // Number of blocks in Master Block Allocation Table + $mbbatBlockCount = self::_readInt4($fh); + $this->bbat = []; + + // Remaining 4 * 109 bytes of current block is beginning of Master + // Block Allocation Table + $mbatBlocks = []; + for ($i = 0; $i < 109; ++$i) { + $mbatBlocks[] = self::_readInt4($fh); + } + + // Read rest of Master Block Allocation Table (if any is left) + $pos = $this->_getBlockOffset($mbatFirstBlockId); + for ($i = 0; $i < $mbbatBlockCount; ++$i) { + fseek($fh, $pos); + for ($j = 0; $j < $this->bigBlockSize / 4 - 1; ++$j) { + $mbatBlocks[] = self::_readInt4($fh); + } + // Last block id in each block points to next block + $pos = $this->_getBlockOffset(self::_readInt4($fh)); + } + + // Read Big Block Allocation Table according to chain specified by $mbatBlocks + for ($i = 0; $i < $bbatBlockCount; ++$i) { + $pos = $this->_getBlockOffset($mbatBlocks[$i]); + fseek($fh, $pos); + for ($j = 0; $j < $this->bigBlockSize / 4; ++$j) { + $this->bbat[] = self::_readInt4($fh); + } + } + + // Read short block allocation table (SBAT) + $this->sbat = []; + $shortBlockCount = $sbbatBlockCount * $this->bigBlockSize / 4; + $sbatFh = $this->getStream($sbatFirstBlockId); + for ($blockId = 0; $blockId < $shortBlockCount; ++$blockId) { + $this->sbat[$blockId] = self::_readInt4($sbatFh); + } + fclose($sbatFh); + + $this->_readPpsWks($directoryFirstBlockId); + + return true; + } + + /** + * @param int $blockId byte offset from beginning of file + * + * @return int + */ + public function _getBlockOffset($blockId) + { + return 512 + $blockId * $this->bigBlockSize; + } + + /** + * Returns a stream for use with fread() etc. External callers should + * use \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::getStream(). + * + * @param int|OLE\PPS $blockIdOrPps block id or PPS + * + * @return resource read-only stream + */ + public function getStream($blockIdOrPps) + { + static $isRegistered = false; + if (!$isRegistered) { + stream_wrapper_register('ole-chainedblockstream', ChainedBlockStream::class); + $isRegistered = true; + } + + // Store current instance in global array, so that it can be accessed + // in OLE_ChainedBlockStream::stream_open(). + // Object is removed from self::$instances in OLE_Stream::close(). + $GLOBALS['_OLE_INSTANCES'][] = $this; + $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES'])); + + $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId; + if ($blockIdOrPps instanceof OLE\PPS) { + $path .= '&blockId=' . $blockIdOrPps->startBlock; + $path .= '&size=' . $blockIdOrPps->Size; + } else { + $path .= '&blockId=' . $blockIdOrPps; + } + + return fopen($path, 'rb'); + } + + /** + * Reads a signed char. + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt1($fh) + { + [, $tmp] = unpack('c', fread($fh, 1)); + + return $tmp; + } + + /** + * Reads an unsigned short (2 octets). + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt2($fh) + { + [, $tmp] = unpack('v', fread($fh, 2)); + + return $tmp; + } + + /** + * Reads an unsigned long (4 octets). + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt4($fh) + { + [, $tmp] = unpack('V', fread($fh, 4)); + + return $tmp; + } + + /** + * Gets information about all PPS's on the OLE container from the PPS WK's + * creates an OLE_PPS object for each one. + * + * @param int $blockId the block id of the first block + * + * @return bool true on success, PEAR_Error on failure + */ + public function _readPpsWks($blockId) + { + $fh = $this->getStream($blockId); + for ($pos = 0; true; $pos += 128) { + fseek($fh, $pos, SEEK_SET); + $nameUtf16 = fread($fh, 64); + $nameLength = self::_readInt2($fh); + $nameUtf16 = substr($nameUtf16, 0, $nameLength - 2); + // Simple conversion from UTF-16LE to ISO-8859-1 + $name = str_replace("\x00", '', $nameUtf16); + $type = self::_readInt1($fh); + switch ($type) { + case self::OLE_PPS_TYPE_ROOT: + $pps = new OLE\PPS\Root(null, null, []); + $this->root = $pps; + + break; + case self::OLE_PPS_TYPE_DIR: + $pps = new OLE\PPS(null, null, null, null, null, null, null, null, null, []); + + break; + case self::OLE_PPS_TYPE_FILE: + $pps = new OLE\PPS\File($name); + + break; + default: + break; + } + fseek($fh, 1, SEEK_CUR); + $pps->Type = $type; + $pps->Name = $name; + $pps->PrevPps = self::_readInt4($fh); + $pps->NextPps = self::_readInt4($fh); + $pps->DirPps = self::_readInt4($fh); + fseek($fh, 20, SEEK_CUR); + $pps->Time1st = self::OLE2LocalDate(fread($fh, 8)); + $pps->Time2nd = self::OLE2LocalDate(fread($fh, 8)); + $pps->startBlock = self::_readInt4($fh); + $pps->Size = self::_readInt4($fh); + $pps->No = count($this->_list); + $this->_list[] = $pps; + + // check if the PPS tree (starting from root) is complete + if (isset($this->root) && $this->_ppsTreeComplete($this->root->No)) { + break; + } + } + fclose($fh); + + // Initialize $pps->children on directories + foreach ($this->_list as $pps) { + if ($pps->Type == self::OLE_PPS_TYPE_DIR || $pps->Type == self::OLE_PPS_TYPE_ROOT) { + $nos = [$pps->DirPps]; + $pps->children = []; + while ($nos) { + $no = array_pop($nos); + if ($no != -1) { + $childPps = $this->_list[$no]; + $nos[] = $childPps->PrevPps; + $nos[] = $childPps->NextPps; + $pps->children[] = $childPps; + } + } + } + } + + return true; + } + + /** + * It checks whether the PPS tree is complete (all PPS's read) + * starting with the given PPS (not necessarily root). + * + * @param int $index The index of the PPS from which we are checking + * + * @return bool Whether the PPS tree for the given PPS is complete + */ + public function _ppsTreeComplete($index) + { + return isset($this->_list[$index]) && + ($pps = $this->_list[$index]) && + ($pps->PrevPps == -1 || + $this->_ppsTreeComplete($pps->PrevPps)) && + ($pps->NextPps == -1 || + $this->_ppsTreeComplete($pps->NextPps)) && + ($pps->DirPps == -1 || + $this->_ppsTreeComplete($pps->DirPps)); + } + + /** + * Checks whether a PPS is a File PPS or not. + * If there is no PPS for the index given, it will return false. + * + * @param int $index The index for the PPS + * + * @return bool true if it's a File PPS, false otherwise + */ + public function isFile($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Type == self::OLE_PPS_TYPE_FILE; + } + + return false; + } + + /** + * Checks whether a PPS is a Root PPS or not. + * If there is no PPS for the index given, it will return false. + * + * @param int $index the index for the PPS + * + * @return bool true if it's a Root PPS, false otherwise + */ + public function isRoot($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Type == self::OLE_PPS_TYPE_ROOT; + } + + return false; + } + + /** + * Gives the total number of PPS's found in the OLE container. + * + * @return int The total number of PPS's found in the OLE container + */ + public function ppsTotal() + { + return count($this->_list); + } + + /** + * Gets data from a PPS + * If there is no PPS for the index given, it will return an empty string. + * + * @param int $index The index for the PPS + * @param int $position The position from which to start reading + * (relative to the PPS) + * @param int $length The amount of bytes to read (at most) + * + * @return string The binary string containing the data requested + * + * @see OLE_PPS_File::getStream() + */ + public function getData($index, $position, $length) + { + // if position is not valid return empty string + if (!isset($this->_list[$index]) || ($position >= $this->_list[$index]->Size) || ($position < 0)) { + return ''; + } + $fh = $this->getStream($this->_list[$index]); + $data = stream_get_contents($fh, $length, $position); + fclose($fh); + + return $data; + } + + /** + * Gets the data length from a PPS + * If there is no PPS for the index given, it will return 0. + * + * @param int $index The index for the PPS + * + * @return int The amount of bytes in data the PPS has + */ + public function getDataLength($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Size; + } + + return 0; + } + + /** + * Utility function to transform ASCII text to Unicode. + * + * @param string $ascii The ASCII string to transform + * + * @return string The string in Unicode + */ + public static function ascToUcs($ascii) + { + $rawname = ''; + $iMax = strlen($ascii); + for ($i = 0; $i < $iMax; ++$i) { + $rawname .= $ascii[$i] + . "\x00"; + } + + return $rawname; + } + + /** + * Utility function + * Returns a string for the OLE container with the date given. + * + * @param int $date A timestamp + * + * @return string The string for the OLE container + */ + public static function localDateToOLE($date) + { + if (!isset($date)) { + return "\x00\x00\x00\x00\x00\x00\x00\x00"; + } + + // factor used for separating numbers into 4 bytes parts + $factor = 2 ** 32; + + // days from 1-1-1601 until the beggining of UNIX era + $days = 134774; + // calculate seconds + $big_date = $days * 24 * 3600 + mktime((int) date('H', $date), (int) date('i', $date), (int) date('s', $date), (int) date('m', $date), (int) date('d', $date), (int) date('Y', $date)); + // multiply just to make MS happy + $big_date *= 10000000; + + $high_part = floor($big_date / $factor); + // lower 4 bytes + $low_part = floor((($big_date / $factor) - $high_part) * $factor); + + // Make HEX string + $res = ''; + + for ($i = 0; $i < 4; ++$i) { + $hex = $low_part % 0x100; + $res .= pack('c', $hex); + $low_part /= 0x100; + } + for ($i = 0; $i < 4; ++$i) { + $hex = $high_part % 0x100; + $res .= pack('c', $hex); + $high_part /= 0x100; + } + + return $res; + } + + /** + * Returns a timestamp from an OLE container's date. + * + * @param string $oleTimestamp A binary string with the encoded date + * + * @return int The Unix timestamp corresponding to the string + */ + public static function OLE2LocalDate($oleTimestamp) + { + if (strlen($oleTimestamp) != 8) { + throw new ReaderException('Expecting 8 byte string'); + } + + // convert to units of 100 ns since 1601: + $unpackedTimestamp = unpack('v4', $oleTimestamp); + $timestampHigh = (float) $unpackedTimestamp[4] * 65536 + (float) $unpackedTimestamp[3]; + $timestampLow = (float) $unpackedTimestamp[2] * 65536 + (float) $unpackedTimestamp[1]; + + // translate to seconds since 1601: + $timestampHigh /= 10000000; + $timestampLow /= 10000000; + + // days from 1601 to 1970: + $days = 134774; + + // translate to seconds since 1970: + $unixTimestamp = floor(65536.0 * 65536.0 * $timestampHigh + $timestampLow - $days * 24 * 3600 + 0.5); + + $iTimestamp = (int) $unixTimestamp; + + // Overflow conditions can't happen on 64-bit system + return ($iTimestamp == $unixTimestamp) ? $iTimestamp : ($unixTimestamp >= 0.0 ? PHP_INT_MAX : PHP_INT_MIN); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php new file mode 100755 index 0000000..ecaa97e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php @@ -0,0 +1,196 @@ +params); + if (!isset($this->params['oleInstanceId'], $this->params['blockId'], $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { + if ($options & STREAM_REPORT_ERRORS) { + trigger_error('OLE stream not found', E_USER_WARNING); + } + + return false; + } + $this->ole = $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']]; + + $blockId = $this->params['blockId']; + $this->data = ''; + if (isset($this->params['size']) && $this->params['size'] < $this->ole->bigBlockThreshold && $blockId != $this->ole->root->startBlock) { + // Block id refers to small blocks + $rootPos = $this->ole->_getBlockOffset($this->ole->root->startBlock); + while ($blockId != -2) { + $pos = $rootPos + $blockId * $this->ole->bigBlockSize; + $blockId = $this->ole->sbat[$blockId]; + fseek($this->ole->_file_handle, $pos); + $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); + } + } else { + // Block id refers to big blocks + while ($blockId != -2) { + $pos = $this->ole->_getBlockOffset($blockId); + fseek($this->ole->_file_handle, $pos); + $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); + $blockId = $this->ole->bbat[$blockId]; + } + } + if (isset($this->params['size'])) { + $this->data = substr($this->data, 0, $this->params['size']); + } + + if ($options & STREAM_USE_PATH) { + $openedPath = $path; + } + + return true; + } + + /** + * Implements support for fclose(). + */ + public function stream_close(): void // @codingStandardsIgnoreLine + { + $this->ole = null; + unset($GLOBALS['_OLE_INSTANCES']); + } + + /** + * Implements support for fread(), fgets() etc. + * + * @param int $count maximum number of bytes to read + * + * @return string + */ + public function stream_read($count) // @codingStandardsIgnoreLine + { + if ($this->stream_eof()) { + return false; + } + $s = substr($this->data, $this->pos, $count); + $this->pos += $count; + + return $s; + } + + /** + * Implements support for feof(). + * + * @return bool TRUE if the file pointer is at EOF; otherwise FALSE + */ + public function stream_eof() // @codingStandardsIgnoreLine + { + return $this->pos >= strlen($this->data); + } + + /** + * Returns the position of the file pointer, i.e. its offset into the file + * stream. Implements support for ftell(). + * + * @return int + */ + public function stream_tell() // @codingStandardsIgnoreLine + { + return $this->pos; + } + + /** + * Implements support for fseek(). + * + * @param int $offset byte offset + * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END + * + * @return bool + */ + public function stream_seek($offset, $whence) // @codingStandardsIgnoreLine + { + if ($whence == SEEK_SET && $offset >= 0) { + $this->pos = $offset; + } elseif ($whence == SEEK_CUR && -$offset <= $this->pos) { + $this->pos += $offset; + } elseif ($whence == SEEK_END && -$offset <= count($this->data)) { + $this->pos = strlen($this->data) + $offset; + } else { + return false; + } + + return true; + } + + /** + * Implements support for fstat(). Currently the only supported field is + * "size". + * + * @return array + */ + public function stream_stat() // @codingStandardsIgnoreLine + { + return [ + 'size' => strlen($this->data), + ]; + } + + // Methods used by stream_wrapper_register() that are not implemented: + // bool stream_flush ( void ) + // int stream_write ( string data ) + // bool rename ( string path_from, string path_to ) + // bool mkdir ( string path, int mode, int options ) + // bool rmdir ( string path, int options ) + // bool dir_opendir ( string path, int options ) + // array url_stat ( string path, int flags ) + // string dir_readdir ( void ) + // bool dir_rewinddir ( void ) + // bool dir_closedir ( void ) +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS.php new file mode 100755 index 0000000..7aa42a1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS.php @@ -0,0 +1,237 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; + +/** + * Class for creating PPS's for OLE containers. + * + * @author Xavier Noguer + */ +class PPS +{ + /** + * The PPS index. + * + * @var int + */ + public $No; + + /** + * The PPS name (in Unicode). + * + * @var string + */ + public $Name; + + /** + * The PPS type. Dir, Root or File. + * + * @var int + */ + public $Type; + + /** + * The index of the previous PPS. + * + * @var int + */ + public $PrevPps; + + /** + * The index of the next PPS. + * + * @var int + */ + public $NextPps; + + /** + * The index of it's first child if this is a Dir or Root PPS. + * + * @var int + */ + public $DirPps; + + /** + * A timestamp. + * + * @var int + */ + public $Time1st; + + /** + * A timestamp. + * + * @var int + */ + public $Time2nd; + + /** + * Starting block (small or big) for this PPS's data inside the container. + * + * @var int + */ + public $startBlock; + + /** + * The size of the PPS's data (in bytes). + * + * @var int + */ + public $Size; + + /** + * The PPS's data (only used if it's not using a temporary file). + * + * @var string + */ + public $_data; + + /** + * Array of child PPS's (only used by Root and Dir PPS's). + * + * @var array + */ + public $children = []; + + /** + * Pointer to OLE container. + * + * @var OLE + */ + public $ole; + + /** + * The constructor. + * + * @param int $No The PPS index + * @param string $name The PPS name + * @param int $type The PPS type. Dir, Root or File + * @param int $prev The index of the previous PPS + * @param int $next The index of the next PPS + * @param int $dir The index of it's first child if this is a Dir or Root PPS + * @param int $time_1st A timestamp + * @param int $time_2nd A timestamp + * @param string $data The (usually binary) source data of the PPS + * @param array $children Array containing children PPS for this PPS + */ + public function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children) + { + $this->No = $No; + $this->Name = $name; + $this->Type = $type; + $this->PrevPps = $prev; + $this->NextPps = $next; + $this->DirPps = $dir; + $this->Time1st = $time_1st; + $this->Time2nd = $time_2nd; + $this->_data = $data; + $this->children = $children; + if ($data != '') { + $this->Size = strlen($data); + } else { + $this->Size = 0; + } + } + + /** + * Returns the amount of data saved for this PPS. + * + * @return int The amount of data (in bytes) + */ + public function getDataLen() + { + if (!isset($this->_data)) { + return 0; + } + + return strlen($this->_data); + } + + /** + * Returns a string with the PPS's WK (What is a WK?). + * + * @return string The binary string + */ + public function _getPpsWk() + { + $ret = str_pad($this->Name, 64, "\x00"); + + $ret .= pack('v', strlen($this->Name) + 2) // 66 + . pack('c', $this->Type) // 67 + . pack('c', 0x00) //UK // 68 + . pack('V', $this->PrevPps) //Prev // 72 + . pack('V', $this->NextPps) //Next // 76 + . pack('V', $this->DirPps) //Dir // 80 + . "\x00\x09\x02\x00" // 84 + . "\x00\x00\x00\x00" // 88 + . "\xc0\x00\x00\x00" // 92 + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root + . "\x00\x00\x00\x00" // 100 + . OLE::localDateToOLE($this->Time1st) // 108 + . OLE::localDateToOLE($this->Time2nd) // 116 + . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 + . pack('V', $this->Size) // 124 + . pack('V', 0); // 128 + + return $ret; + } + + /** + * Updates index and pointers to previous, next and children PPS's for this + * PPS. I don't think it'll work with Dir PPS's. + * + * @param array &$raList Reference to the array of PPS's for the whole OLE + * container + * @param mixed $to_save + * @param mixed $depth + * + * @return int The index for this PPS + */ + public static function _savePpsSetPnt(&$raList, $to_save, $depth = 0) + { + if (!is_array($to_save) || (empty($to_save))) { + return 0xFFFFFFFF; + } elseif (count($to_save) == 1) { + $cnt = count($raList); + // If the first entry, it's the root... Don't clone it! + $raList[$cnt] = ($depth == 0) ? $to_save[0] : clone $to_save[0]; + $raList[$cnt]->No = $cnt; + $raList[$cnt]->PrevPps = 0xFFFFFFFF; + $raList[$cnt]->NextPps = 0xFFFFFFFF; + $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); + } else { + $iPos = floor(count($to_save) / 2); + $aPrev = array_slice($to_save, 0, $iPos); + $aNext = array_slice($to_save, $iPos + 1); + $cnt = count($raList); + // If the first entry, it's the root... Don't clone it! + $raList[$cnt] = ($depth == 0) ? $to_save[$iPos] : clone $to_save[$iPos]; + $raList[$cnt]->No = $cnt; + $raList[$cnt]->PrevPps = self::_savePpsSetPnt($raList, $aPrev, $depth++); + $raList[$cnt]->NextPps = self::_savePpsSetPnt($raList, $aNext, $depth++); + $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); + } + + return $cnt; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/File.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/File.php new file mode 100755 index 0000000..dd1cda2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/File.php @@ -0,0 +1,64 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS; + +/** + * Class for creating File PPS's for OLE containers. + * + * @author Xavier Noguer + */ +class File extends PPS +{ + /** + * The constructor. + * + * @param string $name The name of the file (in Unicode) + * + * @see OLE::ascToUcs() + */ + public function __construct($name) + { + parent::__construct(null, $name, OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', []); + } + + /** + * Initialization method. Has to be called right after OLE_PPS_File(). + * + * @return mixed true on success + */ + public function init() + { + return true; + } + + /** + * Append data to PPS. + * + * @param string $data The data to append + */ + public function append($data): void + { + $this->_data .= $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/Root.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/Root.php new file mode 100755 index 0000000..11655c6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLE/PPS/Root.php @@ -0,0 +1,426 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS; + +/** + * Class for creating Root PPS's for OLE containers. + * + * @author Xavier Noguer + */ +class Root extends PPS +{ + /** + * @var resource + */ + private $fileHandle; + + /** + * @var int + */ + private $smallBlockSize; + + /** + * @var int + */ + private $bigBlockSize; + + /** + * @param int $time_1st A timestamp + * @param int $time_2nd A timestamp + * @param File[] $raChild + */ + public function __construct($time_1st, $time_2nd, $raChild) + { + parent::__construct(null, OLE::ascToUcs('Root Entry'), OLE::OLE_PPS_TYPE_ROOT, null, null, null, $time_1st, $time_2nd, null, $raChild); + } + + /** + * Method for saving the whole OLE container (including files). + * In fact, if called with an empty argument (or '-'), it saves to a + * temporary file and then outputs it's contents to stdout. + * If a resource pointer to a stream created by fopen() is passed + * it will be used, but you have to close such stream by yourself. + * + * @param resource $fileHandle the name of the file or stream where to save the OLE container + * + * @return bool true on success + */ + public function save($fileHandle) + { + $this->fileHandle = $fileHandle; + + // Initial Setting for saving + $this->bigBlockSize = 2 ** ( + (isset($this->bigBlockSize)) ? self::adjust2($this->bigBlockSize) : 9 + ); + $this->smallBlockSize = 2 ** ( + (isset($this->smallBlockSize)) ? self::adjust2($this->smallBlockSize) : 6 + ); + + // Make an array of PPS's (for Save) + $aList = []; + PPS::_savePpsSetPnt($aList, [$this]); + // calculate values for header + [$iSBDcnt, $iBBcnt, $iPPScnt] = $this->_calcSize($aList); //, $rhInfo); + // Save Header + $this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt); + + // Make Small Data string (write SBD) + $this->_data = $this->_makeSmallData($aList); + + // Write BB + $this->_saveBigData($iSBDcnt, $aList); + // Write PPS + $this->_savePps($aList); + // Write Big Block Depot and BDList and Adding Header informations + $this->_saveBbd($iSBDcnt, $iBBcnt, $iPPScnt); + + return true; + } + + /** + * Calculate some numbers. + * + * @param array $raList Reference to an array of PPS's + * + * @return float[] The array of numbers + */ + public function _calcSize(&$raList) + { + // Calculate Basic Setting + [$iSBDcnt, $iBBcnt, $iPPScnt] = [0, 0, 0]; + $iSmallLen = 0; + $iSBcnt = 0; + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) { + $raList[$i]->Size = $raList[$i]->getDataLen(); + if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) { + $iSBcnt += floor($raList[$i]->Size / $this->smallBlockSize) + + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0); + } else { + $iBBcnt += (floor($raList[$i]->Size / $this->bigBlockSize) + + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0)); + } + } + } + $iSmallLen = $iSBcnt * $this->smallBlockSize; + $iSlCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE); + $iSBDcnt = floor($iSBcnt / $iSlCnt) + (($iSBcnt % $iSlCnt) ? 1 : 0); + $iBBcnt += (floor($iSmallLen / $this->bigBlockSize) + + (($iSmallLen % $this->bigBlockSize) ? 1 : 0)); + $iCnt = count($raList); + $iBdCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE; + $iPPScnt = (floor($iCnt / $iBdCnt) + (($iCnt % $iBdCnt) ? 1 : 0)); + + return [$iSBDcnt, $iBBcnt, $iPPScnt]; + } + + /** + * Helper function for caculating a magic value for block sizes. + * + * @param int $i2 The argument + * + * @return float + * + * @see save() + */ + private static function adjust2($i2) + { + $iWk = log($i2) / log(2); + + return ($iWk > floor($iWk)) ? floor($iWk) + 1 : $iWk; + } + + /** + * Save OLE header. + * + * @param int $iSBDcnt + * @param int $iBBcnt + * @param int $iPPScnt + */ + public function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt): void + { + $FILE = $this->fileHandle; + + // Calculate Basic Setting + $iBlCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE; + $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE; + + $iBdExL = 0; + $iAll = $iBBcnt + $iPPScnt + $iSBDcnt; + $iAllW = $iAll; + $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0); + $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0); + + // Calculate BD count + if ($iBdCnt > $i1stBdL) { + while (1) { + ++$iBdExL; + ++$iAllW; + $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0); + $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0); + if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) { + break; + } + } + } + + // Save Header + fwrite( + $FILE, + "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . pack('v', 0x3b) + . pack('v', 0x03) + . pack('v', -2) + . pack('v', 9) + . pack('v', 6) + . pack('v', 0) + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . pack('V', $iBdCnt) + . pack('V', $iBBcnt + $iSBDcnt) //ROOT START + . pack('V', 0) + . pack('V', 0x1000) + . pack('V', $iSBDcnt ? 0 : -2) //Small Block Depot + . pack('V', $iSBDcnt) + ); + // Extra BDList Start, Count + if ($iBdCnt < $i1stBdL) { + fwrite( + $FILE, + pack('V', -2) // Extra BDList Start + . pack('V', 0)// Extra BDList Count + ); + } else { + fwrite($FILE, pack('V', $iAll + $iBdCnt) . pack('V', $iBdExL)); + } + + // BDList + for ($i = 0; $i < $i1stBdL && $i < $iBdCnt; ++$i) { + fwrite($FILE, pack('V', $iAll + $i)); + } + if ($i < $i1stBdL) { + $jB = $i1stBdL - $i; + for ($j = 0; $j < $jB; ++$j) { + fwrite($FILE, (pack('V', -1))); + } + } + } + + /** + * Saving big data (PPS's with data bigger than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL). + * + * @param int $iStBlk + * @param array &$raList Reference to array of PPS's + */ + public function _saveBigData($iStBlk, &$raList): void + { + $FILE = $this->fileHandle; + + // cycle through PPS's + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + if ($raList[$i]->Type != OLE::OLE_PPS_TYPE_DIR) { + $raList[$i]->Size = $raList[$i]->getDataLen(); + if (($raList[$i]->Size >= OLE::OLE_DATA_SIZE_SMALL) || (($raList[$i]->Type == OLE::OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data))) { + fwrite($FILE, $raList[$i]->_data); + + if ($raList[$i]->Size % $this->bigBlockSize) { + fwrite($FILE, str_repeat("\x00", $this->bigBlockSize - ($raList[$i]->Size % $this->bigBlockSize))); + } + // Set For PPS + $raList[$i]->startBlock = $iStBlk; + $iStBlk += + (floor($raList[$i]->Size / $this->bigBlockSize) + + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0)); + } + } + } + } + + /** + * get small data (PPS's with data smaller than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL). + * + * @param array &$raList Reference to array of PPS's + * + * @return string + */ + public function _makeSmallData(&$raList) + { + $sRes = ''; + $FILE = $this->fileHandle; + $iSmBlk = 0; + + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + // Make SBD, small data string + if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) { + if ($raList[$i]->Size <= 0) { + continue; + } + if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) { + $iSmbCnt = floor($raList[$i]->Size / $this->smallBlockSize) + + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0); + // Add to SBD + $jB = $iSmbCnt - 1; + for ($j = 0; $j < $jB; ++$j) { + fwrite($FILE, pack('V', $j + $iSmBlk + 1)); + } + fwrite($FILE, pack('V', -2)); + + // Add to Data String(this will be written for RootEntry) + $sRes .= $raList[$i]->_data; + if ($raList[$i]->Size % $this->smallBlockSize) { + $sRes .= str_repeat("\x00", $this->smallBlockSize - ($raList[$i]->Size % $this->smallBlockSize)); + } + // Set for PPS + $raList[$i]->startBlock = $iSmBlk; + $iSmBlk += $iSmbCnt; + } + } + } + $iSbCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE); + if ($iSmBlk % $iSbCnt) { + $iB = $iSbCnt - ($iSmBlk % $iSbCnt); + for ($i = 0; $i < $iB; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + + return $sRes; + } + + /** + * Saves all the PPS's WKs. + * + * @param array $raList Reference to an array with all PPS's + */ + public function _savePps(&$raList): void + { + // Save each PPS WK + $iC = count($raList); + for ($i = 0; $i < $iC; ++$i) { + fwrite($this->fileHandle, $raList[$i]->_getPpsWk()); + } + // Adjust for Block + $iCnt = count($raList); + $iBCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE; + if ($iCnt % $iBCnt) { + fwrite($this->fileHandle, str_repeat("\x00", ($iBCnt - ($iCnt % $iBCnt)) * OLE::OLE_PPS_SIZE)); + } + } + + /** + * Saving Big Block Depot. + * + * @param int $iSbdSize + * @param int $iBsize + * @param int $iPpsCnt + */ + public function _saveBbd($iSbdSize, $iBsize, $iPpsCnt): void + { + $FILE = $this->fileHandle; + // Calculate Basic Setting + $iBbCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE; + $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE; + + $iBdExL = 0; + $iAll = $iBsize + $iPpsCnt + $iSbdSize; + $iAllW = $iAll; + $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0); + $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0); + // Calculate BD count + if ($iBdCnt > $i1stBdL) { + while (1) { + ++$iBdExL; + ++$iAllW; + $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0); + $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0); + if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) { + break; + } + } + } + + // Making BD + // Set for SBD + if ($iSbdSize > 0) { + for ($i = 0; $i < ($iSbdSize - 1); ++$i) { + fwrite($FILE, pack('V', $i + 1)); + } + fwrite($FILE, pack('V', -2)); + } + // Set for B + for ($i = 0; $i < ($iBsize - 1); ++$i) { + fwrite($FILE, pack('V', $i + $iSbdSize + 1)); + } + fwrite($FILE, pack('V', -2)); + + // Set for PPS + for ($i = 0; $i < ($iPpsCnt - 1); ++$i) { + fwrite($FILE, pack('V', $i + $iSbdSize + $iBsize + 1)); + } + fwrite($FILE, pack('V', -2)); + // Set for BBD itself ( 0xFFFFFFFD : BBD) + for ($i = 0; $i < $iBdCnt; ++$i) { + fwrite($FILE, pack('V', 0xFFFFFFFD)); + } + // Set for ExtraBDList + for ($i = 0; $i < $iBdExL; ++$i) { + fwrite($FILE, pack('V', 0xFFFFFFFC)); + } + // Adjust for Block + if (($iAllW + $iBdCnt) % $iBbCnt) { + $iBlock = ($iBbCnt - (($iAllW + $iBdCnt) % $iBbCnt)); + for ($i = 0; $i < $iBlock; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + // Extra BDList + if ($iBdCnt > $i1stBdL) { + $iN = 0; + $iNb = 0; + for ($i = $i1stBdL; $i < $iBdCnt; $i++, ++$iN) { + if ($iN >= ($iBbCnt - 1)) { + $iN = 0; + ++$iNb; + fwrite($FILE, pack('V', $iAll + $iBdCnt + $iNb)); + } + fwrite($FILE, pack('V', $iBsize + $iSbdSize + $iPpsCnt + $i)); + } + if (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)) { + $iB = ($iBbCnt - 1) - (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)); + for ($i = 0; $i < $iB; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + fwrite($FILE, pack('V', -2)); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLERead.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLERead.php new file mode 100755 index 0000000..b6d5422 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/OLERead.php @@ -0,0 +1,350 @@ +data = file_get_contents($pFilename, false, null, 0, 8); + + // Check OLE identifier + $identifierOle = pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1); + if ($this->data != $identifierOle) { + throw new ReaderException('The filename ' . $pFilename . ' is not recognised as an OLE file'); + } + + // Get the file data + $this->data = file_get_contents($pFilename); + + // Total number of sectors used for the SAT + $this->numBigBlockDepotBlocks = self::getInt4d($this->data, self::NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); + + // SecID of the first sector of the directory stream + $this->rootStartBlock = self::getInt4d($this->data, self::ROOT_START_BLOCK_POS); + + // SecID of the first sector of the SSAT (or -2 if not extant) + $this->sbdStartBlock = self::getInt4d($this->data, self::SMALL_BLOCK_DEPOT_BLOCK_POS); + + // SecID of the first sector of the MSAT (or -2 if no additional sectors are used) + $this->extensionBlock = self::getInt4d($this->data, self::EXTENSION_BLOCK_POS); + + // Total number of sectors used by MSAT + $this->numExtensionBlocks = self::getInt4d($this->data, self::NUM_EXTENSION_BLOCK_POS); + + $bigBlockDepotBlocks = []; + $pos = self::BIG_BLOCK_DEPOT_BLOCKS_POS; + + $bbdBlocks = $this->numBigBlockDepotBlocks; + + if ($this->numExtensionBlocks != 0) { + $bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS) / 4; + } + + for ($i = 0; $i < $bbdBlocks; ++$i) { + $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); + $pos += 4; + } + + for ($j = 0; $j < $this->numExtensionBlocks; ++$j) { + $pos = ($this->extensionBlock + 1) * self::BIG_BLOCK_SIZE; + $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, self::BIG_BLOCK_SIZE / 4 - 1); + + for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; ++$i) { + $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); + $pos += 4; + } + + $bbdBlocks += $blocksToRead; + if ($bbdBlocks < $this->numBigBlockDepotBlocks) { + $this->extensionBlock = self::getInt4d($this->data, $pos); + } + } + + $pos = 0; + $this->bigBlockChain = ''; + $bbs = self::BIG_BLOCK_SIZE / 4; + for ($i = 0; $i < $this->numBigBlockDepotBlocks; ++$i) { + $pos = ($bigBlockDepotBlocks[$i] + 1) * self::BIG_BLOCK_SIZE; + + $this->bigBlockChain .= substr($this->data, $pos, 4 * $bbs); + $pos += 4 * $bbs; + } + + $pos = 0; + $sbdBlock = $this->sbdStartBlock; + $this->smallBlockChain = ''; + while ($sbdBlock != -2) { + $pos = ($sbdBlock + 1) * self::BIG_BLOCK_SIZE; + + $this->smallBlockChain .= substr($this->data, $pos, 4 * $bbs); + $pos += 4 * $bbs; + + $sbdBlock = self::getInt4d($this->bigBlockChain, $sbdBlock * 4); + } + + // read the directory stream + $block = $this->rootStartBlock; + $this->entry = $this->_readData($block); + + $this->readPropertySets(); + } + + /** + * Extract binary stream data. + * + * @param int $stream + * + * @return string + */ + public function getStream($stream) + { + if ($stream === null) { + return null; + } + + $streamData = ''; + + if ($this->props[$stream]['size'] < self::SMALL_BLOCK_THRESHOLD) { + $rootdata = $this->_readData($this->props[$this->rootentry]['startBlock']); + + $block = $this->props[$stream]['startBlock']; + + while ($block != -2) { + $pos = $block * self::SMALL_BLOCK_SIZE; + $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE); + + $block = self::getInt4d($this->smallBlockChain, $block * 4); + } + + return $streamData; + } + $numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE; + if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) { + ++$numBlocks; + } + + if ($numBlocks == 0) { + return ''; + } + + $block = $this->props[$stream]['startBlock']; + + while ($block != -2) { + $pos = ($block + 1) * self::BIG_BLOCK_SIZE; + $streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); + $block = self::getInt4d($this->bigBlockChain, $block * 4); + } + + return $streamData; + } + + /** + * Read a standard stream (by joining sectors using information from SAT). + * + * @param int $bl Sector ID where the stream starts + * + * @return string Data for standard stream + */ + private function _readData($bl) + { + $block = $bl; + $data = ''; + + while ($block != -2) { + $pos = ($block + 1) * self::BIG_BLOCK_SIZE; + $data .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); + $block = self::getInt4d($this->bigBlockChain, $block * 4); + } + + return $data; + } + + /** + * Read entries in the directory stream. + */ + private function readPropertySets(): void + { + $offset = 0; + + // loop through entires, each entry is 128 bytes + $entryLen = strlen($this->entry); + while ($offset < $entryLen) { + // entry data (128 bytes) + $d = substr($this->entry, $offset, self::PROPERTY_STORAGE_BLOCK_SIZE); + + // size in bytes of name + $nameSize = ord($d[self::SIZE_OF_NAME_POS]) | (ord($d[self::SIZE_OF_NAME_POS + 1]) << 8); + + // type of entry + $type = ord($d[self::TYPE_POS]); + + // sectorID of first sector or short sector, if this entry refers to a stream (the case with workbook) + // sectorID of first sector of the short-stream container stream, if this entry is root entry + $startBlock = self::getInt4d($d, self::START_BLOCK_POS); + + $size = self::getInt4d($d, self::SIZE_POS); + + $name = str_replace("\x00", '', substr($d, 0, $nameSize)); + + $this->props[] = [ + 'name' => $name, + 'type' => $type, + 'startBlock' => $startBlock, + 'size' => $size, + ]; + + // tmp helper to simplify checks + $upName = strtoupper($name); + + // Workbook directory entry (BIFF5 uses Book, BIFF8 uses Workbook) + if (($upName === 'WORKBOOK') || ($upName === 'BOOK')) { + $this->wrkbook = count($this->props) - 1; + } elseif ($upName === 'ROOT ENTRY' || $upName === 'R') { + // Root entry + $this->rootentry = count($this->props) - 1; + } + + // Summary information + if ($name == chr(5) . 'SummaryInformation') { + $this->summaryInformation = count($this->props) - 1; + } + + // Additional Document Summary information + if ($name == chr(5) . 'DocumentSummaryInformation') { + $this->documentSummaryInformation = count($this->props) - 1; + } + + $offset += self::PROPERTY_STORAGE_BLOCK_SIZE; + } + } + + /** + * Read 4 bytes of data at specified position. + * + * @param string $data + * @param int $pos + * + * @return int + */ + private static function getInt4d($data, $pos) + { + if ($pos < 0) { + // Invalid position + throw new ReaderException('Parameter pos=' . $pos . ' is invalid.'); + } + + $len = strlen($data); + if ($len < $pos + 4) { + $data .= str_repeat("\0", $pos + 4 - $len); + } + + // FIX: represent numbers correctly on 64-bit system + // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 + // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems + $_or_24 = ord($data[$pos + 3]); + if ($_or_24 >= 128) { + // negative number + $_ord_24 = -abs((256 - $_or_24) << 24); + } else { + $_ord_24 = ($_or_24 & 127) << 24; + } + + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/PasswordHasher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/PasswordHasher.php new file mode 100755 index 0000000..9fefe88 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/PasswordHasher.php @@ -0,0 +1,100 @@ + 'md2', + Protection::ALGORITHM_MD4 => 'md4', + Protection::ALGORITHM_MD5 => 'md5', + Protection::ALGORITHM_SHA_1 => 'sha1', + Protection::ALGORITHM_SHA_256 => 'sha256', + Protection::ALGORITHM_SHA_384 => 'sha384', + Protection::ALGORITHM_SHA_512 => 'sha512', + Protection::ALGORITHM_RIPEMD_128 => 'ripemd128', + Protection::ALGORITHM_RIPEMD_160 => 'ripemd160', + Protection::ALGORITHM_WHIRLPOOL => 'whirlpool', + ]; + + if (array_key_exists($algorithmName, $mapping)) { + return $mapping[$algorithmName]; + } + + throw new Exception('Unsupported password algorithm: ' . $algorithmName); + } + + /** + * Create a password hash from a given string. + * + * This method is based on the algorithm provided by + * Daniel Rentz of OpenOffice and the PEAR package + * Spreadsheet_Excel_Writer by Xavier Noguer . + * + * @param string $pPassword Password to hash + */ + private static function defaultHashPassword(string $pPassword): string + { + $password = 0x0000; + $charPos = 1; // char position + + // split the plain text password in its component characters + $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); + foreach ($chars as $char) { + $value = ord($char) << $charPos++; // shifted ASCII value + $rotated_bits = $value >> 15; // rotated bits beyond bit 15 + $value &= 0x7fff; // first 15 bits + $password ^= ($value | $rotated_bits); + } + + $password ^= strlen($pPassword); + $password ^= 0xCE4B; + + return strtoupper(dechex($password)); + } + + /** + * Create a password hash from a given string by a specific algorithm. + * + * 2.4.2.4 ISO Write Protection Method + * + * @see https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-offcrypto/1357ea58-646e-4483-92ef-95d718079d6f + * + * @param string $password Password to hash + * @param string $algorithm Hash algorithm used to compute the password hash value + * @param string $salt Pseudorandom string + * @param int $spinCount Number of times to iterate on a hash of a password + * + * @return string Hashed password + */ + public static function hashPassword(string $password, string $algorithm = '', string $salt = '', int $spinCount = 10000): string + { + $phpAlgorithm = self::getAlgorithm($algorithm); + if (!$phpAlgorithm) { + return self::defaultHashPassword($password); + } + + $saltValue = base64_decode($salt); + $encodedPassword = mb_convert_encoding($password, 'UCS-2LE', 'UTF-8'); + + $hashValue = hash($phpAlgorithm, $saltValue . $encodedPassword, true); + for ($i = 0; $i < $spinCount; ++$i) { + $hashValue = hash($phpAlgorithm, $hashValue . pack('L', $i), true); + } + + return base64_encode($hashValue); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/StringHelper.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/StringHelper.php new file mode 100755 index 0000000..9ae3241 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/StringHelper.php @@ -0,0 +1,722 @@ + chr(0), + "\x1B 1" => chr(1), + "\x1B 2" => chr(2), + "\x1B 3" => chr(3), + "\x1B 4" => chr(4), + "\x1B 5" => chr(5), + "\x1B 6" => chr(6), + "\x1B 7" => chr(7), + "\x1B 8" => chr(8), + "\x1B 9" => chr(9), + "\x1B :" => chr(10), + "\x1B ;" => chr(11), + "\x1B <" => chr(12), + "\x1B =" => chr(13), + "\x1B >" => chr(14), + "\x1B ?" => chr(15), + "\x1B!0" => chr(16), + "\x1B!1" => chr(17), + "\x1B!2" => chr(18), + "\x1B!3" => chr(19), + "\x1B!4" => chr(20), + "\x1B!5" => chr(21), + "\x1B!6" => chr(22), + "\x1B!7" => chr(23), + "\x1B!8" => chr(24), + "\x1B!9" => chr(25), + "\x1B!:" => chr(26), + "\x1B!;" => chr(27), + "\x1B!<" => chr(28), + "\x1B!=" => chr(29), + "\x1B!>" => chr(30), + "\x1B!?" => chr(31), + "\x1B'?" => chr(127), + "\x1B(0" => '€', // 128 in CP1252 + "\x1B(2" => '‚', // 130 in CP1252 + "\x1B(3" => 'ƒ', // 131 in CP1252 + "\x1B(4" => '„', // 132 in CP1252 + "\x1B(5" => '…', // 133 in CP1252 + "\x1B(6" => '†', // 134 in CP1252 + "\x1B(7" => '‡', // 135 in CP1252 + "\x1B(8" => 'ˆ', // 136 in CP1252 + "\x1B(9" => '‰', // 137 in CP1252 + "\x1B(:" => 'Š', // 138 in CP1252 + "\x1B(;" => '‹', // 139 in CP1252 + "\x1BNj" => 'Œ', // 140 in CP1252 + "\x1B(>" => 'Ž', // 142 in CP1252 + "\x1B)1" => '‘', // 145 in CP1252 + "\x1B)2" => '’', // 146 in CP1252 + "\x1B)3" => '“', // 147 in CP1252 + "\x1B)4" => '”', // 148 in CP1252 + "\x1B)5" => '•', // 149 in CP1252 + "\x1B)6" => '–', // 150 in CP1252 + "\x1B)7" => '—', // 151 in CP1252 + "\x1B)8" => '˜', // 152 in CP1252 + "\x1B)9" => '™', // 153 in CP1252 + "\x1B):" => 'š', // 154 in CP1252 + "\x1B);" => '›', // 155 in CP1252 + "\x1BNz" => 'œ', // 156 in CP1252 + "\x1B)>" => 'ž', // 158 in CP1252 + "\x1B)?" => 'Ÿ', // 159 in CP1252 + "\x1B*0" => ' ', // 160 in CP1252 + "\x1BN!" => '¡', // 161 in CP1252 + "\x1BN\"" => '¢', // 162 in CP1252 + "\x1BN#" => '£', // 163 in CP1252 + "\x1BN(" => '¤', // 164 in CP1252 + "\x1BN%" => '¥', // 165 in CP1252 + "\x1B*6" => '¦', // 166 in CP1252 + "\x1BN'" => '§', // 167 in CP1252 + "\x1BNH " => '¨', // 168 in CP1252 + "\x1BNS" => '©', // 169 in CP1252 + "\x1BNc" => 'ª', // 170 in CP1252 + "\x1BN+" => '«', // 171 in CP1252 + "\x1B*<" => '¬', // 172 in CP1252 + "\x1B*=" => '­', // 173 in CP1252 + "\x1BNR" => '®', // 174 in CP1252 + "\x1B*?" => '¯', // 175 in CP1252 + "\x1BN0" => '°', // 176 in CP1252 + "\x1BN1" => '±', // 177 in CP1252 + "\x1BN2" => '²', // 178 in CP1252 + "\x1BN3" => '³', // 179 in CP1252 + "\x1BNB " => '´', // 180 in CP1252 + "\x1BN5" => 'µ', // 181 in CP1252 + "\x1BN6" => '¶', // 182 in CP1252 + "\x1BN7" => '·', // 183 in CP1252 + "\x1B+8" => '¸', // 184 in CP1252 + "\x1BNQ" => '¹', // 185 in CP1252 + "\x1BNk" => 'º', // 186 in CP1252 + "\x1BN;" => '»', // 187 in CP1252 + "\x1BN<" => '¼', // 188 in CP1252 + "\x1BN=" => '½', // 189 in CP1252 + "\x1BN>" => '¾', // 190 in CP1252 + "\x1BN?" => '¿', // 191 in CP1252 + "\x1BNAA" => 'À', // 192 in CP1252 + "\x1BNBA" => 'Á', // 193 in CP1252 + "\x1BNCA" => 'Â', // 194 in CP1252 + "\x1BNDA" => 'Ã', // 195 in CP1252 + "\x1BNHA" => 'Ä', // 196 in CP1252 + "\x1BNJA" => 'Å', // 197 in CP1252 + "\x1BNa" => 'Æ', // 198 in CP1252 + "\x1BNKC" => 'Ç', // 199 in CP1252 + "\x1BNAE" => 'È', // 200 in CP1252 + "\x1BNBE" => 'É', // 201 in CP1252 + "\x1BNCE" => 'Ê', // 202 in CP1252 + "\x1BNHE" => 'Ë', // 203 in CP1252 + "\x1BNAI" => 'Ì', // 204 in CP1252 + "\x1BNBI" => 'Í', // 205 in CP1252 + "\x1BNCI" => 'Î', // 206 in CP1252 + "\x1BNHI" => 'Ï', // 207 in CP1252 + "\x1BNb" => 'Ð', // 208 in CP1252 + "\x1BNDN" => 'Ñ', // 209 in CP1252 + "\x1BNAO" => 'Ò', // 210 in CP1252 + "\x1BNBO" => 'Ó', // 211 in CP1252 + "\x1BNCO" => 'Ô', // 212 in CP1252 + "\x1BNDO" => 'Õ', // 213 in CP1252 + "\x1BNHO" => 'Ö', // 214 in CP1252 + "\x1B-7" => '×', // 215 in CP1252 + "\x1BNi" => 'Ø', // 216 in CP1252 + "\x1BNAU" => 'Ù', // 217 in CP1252 + "\x1BNBU" => 'Ú', // 218 in CP1252 + "\x1BNCU" => 'Û', // 219 in CP1252 + "\x1BNHU" => 'Ü', // 220 in CP1252 + "\x1B-=" => 'Ý', // 221 in CP1252 + "\x1BNl" => 'Þ', // 222 in CP1252 + "\x1BN{" => 'ß', // 223 in CP1252 + "\x1BNAa" => 'à', // 224 in CP1252 + "\x1BNBa" => 'á', // 225 in CP1252 + "\x1BNCa" => 'â', // 226 in CP1252 + "\x1BNDa" => 'ã', // 227 in CP1252 + "\x1BNHa" => 'ä', // 228 in CP1252 + "\x1BNJa" => 'å', // 229 in CP1252 + "\x1BNq" => 'æ', // 230 in CP1252 + "\x1BNKc" => 'ç', // 231 in CP1252 + "\x1BNAe" => 'è', // 232 in CP1252 + "\x1BNBe" => 'é', // 233 in CP1252 + "\x1BNCe" => 'ê', // 234 in CP1252 + "\x1BNHe" => 'ë', // 235 in CP1252 + "\x1BNAi" => 'ì', // 236 in CP1252 + "\x1BNBi" => 'í', // 237 in CP1252 + "\x1BNCi" => 'î', // 238 in CP1252 + "\x1BNHi" => 'ï', // 239 in CP1252 + "\x1BNs" => 'ð', // 240 in CP1252 + "\x1BNDn" => 'ñ', // 241 in CP1252 + "\x1BNAo" => 'ò', // 242 in CP1252 + "\x1BNBo" => 'ó', // 243 in CP1252 + "\x1BNCo" => 'ô', // 244 in CP1252 + "\x1BNDo" => 'õ', // 245 in CP1252 + "\x1BNHo" => 'ö', // 246 in CP1252 + "\x1B/7" => '÷', // 247 in CP1252 + "\x1BNy" => 'ø', // 248 in CP1252 + "\x1BNAu" => 'ù', // 249 in CP1252 + "\x1BNBu" => 'ú', // 250 in CP1252 + "\x1BNCu" => 'û', // 251 in CP1252 + "\x1BNHu" => 'ü', // 252 in CP1252 + "\x1B/=" => 'ý', // 253 in CP1252 + "\x1BN|" => 'þ', // 254 in CP1252 + "\x1BNHy" => 'ÿ', // 255 in CP1252 + ]; + } + + /** + * Get whether iconv extension is available. + * + * @return bool + */ + public static function getIsIconvEnabled() + { + if (isset(self::$isIconvEnabled)) { + return self::$isIconvEnabled; + } + + // Assume no problems with iconv + self::$isIconvEnabled = true; + + // Fail if iconv doesn't exist + if (!function_exists('iconv')) { + self::$isIconvEnabled = false; + } elseif (!@iconv('UTF-8', 'UTF-16LE', 'x')) { + // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false, + self::$isIconvEnabled = false; + } elseif (defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && defined('ICONV_VERSION') && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) { + // CUSTOM: IBM AIX iconv() does not work + self::$isIconvEnabled = false; + } + + // Deactivate iconv default options if they fail (as seen on IMB i) + if (self::$isIconvEnabled && !@iconv('UTF-8', 'UTF-16LE' . self::$iconvOptions, 'x')) { + self::$iconvOptions = ''; + } + + return self::$isIconvEnabled; + } + + private static function buildCharacterSets(): void + { + if (empty(self::$controlCharacters)) { + self::buildControlCharacters(); + } + + if (empty(self::$SYLKCharacters)) { + self::buildSYLKCharacters(); + } + } + + /** + * Convert from OpenXML escaped control character to PHP control character. + * + * Excel 2007 team: + * ---------------- + * That's correct, control characters are stored directly in the shared-strings table. + * We do encode characters that cannot be represented in XML using the following escape sequence: + * _xHHHH_ where H represents a hexadecimal character in the character's value... + * So you could end up with something like _x0008_ in a string (either in a cell value () + * element or in the shared string element. + * + * @param string $value Value to unescape + * + * @return string + */ + public static function controlCharacterOOXML2PHP($value) + { + self::buildCharacterSets(); + + return str_replace(array_keys(self::$controlCharacters), array_values(self::$controlCharacters), $value); + } + + /** + * Convert from PHP control character to OpenXML escaped control character. + * + * Excel 2007 team: + * ---------------- + * That's correct, control characters are stored directly in the shared-strings table. + * We do encode characters that cannot be represented in XML using the following escape sequence: + * _xHHHH_ where H represents a hexadecimal character in the character's value... + * So you could end up with something like _x0008_ in a string (either in a cell value () + * element or in the shared string element. + * + * @param string $value Value to escape + * + * @return string + */ + public static function controlCharacterPHP2OOXML($value) + { + self::buildCharacterSets(); + + return str_replace(array_values(self::$controlCharacters), array_keys(self::$controlCharacters), $value); + } + + /** + * Try to sanitize UTF8, stripping invalid byte sequences. Not perfect. Does not surrogate characters. + * + * @param string $value + * + * @return string + */ + public static function sanitizeUTF8($value) + { + if (self::getIsIconvEnabled()) { + $value = @iconv('UTF-8', 'UTF-8', $value); + + return $value; + } + + $value = mb_convert_encoding($value, 'UTF-8', 'UTF-8'); + + return $value; + } + + /** + * Check if a string contains UTF8 data. + * + * @param string $value + * + * @return bool + */ + public static function isUTF8($value) + { + return $value === '' || preg_match('/^./su', $value) === 1; + } + + /** + * Formats a numeric value as a string for output in various output writers forcing + * point as decimal separator in case locale is other than English. + * + * @param mixed $value + * + * @return string + */ + public static function formatNumber($value) + { + if (is_float($value)) { + return str_replace(',', '.', $value); + } + + return (string) $value; + } + + /** + * Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) + * Writes the string using uncompressed notation, no rich text, no Asian phonetics + * If mbstring extension is not available, ASCII is assumed, and compressed notation is used + * although this will give wrong results for non-ASCII strings + * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3. + * + * @param string $value UTF-8 encoded string + * @param mixed[] $arrcRuns Details of rich text runs in $value + * + * @return string + */ + public static function UTF8toBIFF8UnicodeShort($value, $arrcRuns = []) + { + // character count + $ln = self::countCharacters($value, 'UTF-8'); + // option flags + if (empty($arrcRuns)) { + $data = pack('CC', $ln, 0x0001); + // characters + $data .= self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + } else { + $data = pack('vC', $ln, 0x09); + $data .= pack('v', count($arrcRuns)); + // characters + $data .= self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + foreach ($arrcRuns as $cRun) { + $data .= pack('v', $cRun['strlen']); + $data .= pack('v', $cRun['fontidx']); + } + } + + return $data; + } + + /** + * Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) + * Writes the string using uncompressed notation, no rich text, no Asian phonetics + * If mbstring extension is not available, ASCII is assumed, and compressed notation is used + * although this will give wrong results for non-ASCII strings + * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3. + * + * @param string $value UTF-8 encoded string + * + * @return string + */ + public static function UTF8toBIFF8UnicodeLong($value) + { + // character count + $ln = self::countCharacters($value, 'UTF-8'); + + // characters + $chars = self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + + return pack('vC', $ln, 0x0001) . $chars; + } + + /** + * Convert string from one encoding to another. + * + * @param string $value + * @param string $to Encoding to convert to, e.g. 'UTF-8' + * @param string $from Encoding to convert from, e.g. 'UTF-16LE' + * + * @return string + */ + public static function convertEncoding($value, $to, $from) + { + if (self::getIsIconvEnabled()) { + $result = iconv($from, $to . self::$iconvOptions, $value); + if (false !== $result) { + return $result; + } + } + + return mb_convert_encoding($value, $to, $from); + } + + /** + * Get character count. + * + * @param string $value + * @param string $enc Encoding + * + * @return int Character count + */ + public static function countCharacters($value, $enc = 'UTF-8') + { + return mb_strlen($value, $enc); + } + + /** + * Get a substring of a UTF-8 encoded string. + * + * @param string $pValue UTF-8 encoded string + * @param int $pStart Start offset + * @param int $pLength Maximum number of characters in substring + * + * @return string + */ + public static function substring($pValue, $pStart, $pLength = 0) + { + return mb_substr($pValue, $pStart, $pLength, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to upper case. + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToUpper($pValue) + { + return mb_convert_case($pValue, MB_CASE_UPPER, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to lower case. + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToLower($pValue) + { + return mb_convert_case($pValue, MB_CASE_LOWER, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to title/proper case + * (uppercase every first character in each word, lower case all other characters). + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToTitle($pValue) + { + return mb_convert_case($pValue, MB_CASE_TITLE, 'UTF-8'); + } + + public static function mbIsUpper($char) + { + return mb_strtolower($char, 'UTF-8') != $char; + } + + public static function mbStrSplit($string) + { + // Split at all position not after the start: ^ + // and not before the end: $ + return preg_split('/(?_calculateFormulaValue($fractionFormula); + + return true; + } + + return false; + } + + // function convertToNumberIfFraction() + + /** + * Get the decimal separator. If it has not yet been set explicitly, try to obtain number + * formatting information from locale. + * + * @return string + */ + public static function getDecimalSeparator() + { + if (!isset(self::$decimalSeparator)) { + $localeconv = localeconv(); + self::$decimalSeparator = ($localeconv['decimal_point'] != '') + ? $localeconv['decimal_point'] : $localeconv['mon_decimal_point']; + + if (self::$decimalSeparator == '') { + // Default to . + self::$decimalSeparator = '.'; + } + } + + return self::$decimalSeparator; + } + + /** + * Set the decimal separator. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for decimal separator + */ + public static function setDecimalSeparator($pValue): void + { + self::$decimalSeparator = $pValue; + } + + /** + * Get the thousands separator. If it has not yet been set explicitly, try to obtain number + * formatting information from locale. + * + * @return string + */ + public static function getThousandsSeparator() + { + if (!isset(self::$thousandsSeparator)) { + $localeconv = localeconv(); + self::$thousandsSeparator = ($localeconv['thousands_sep'] != '') + ? $localeconv['thousands_sep'] : $localeconv['mon_thousands_sep']; + + if (self::$thousandsSeparator == '') { + // Default to . + self::$thousandsSeparator = ','; + } + } + + return self::$thousandsSeparator; + } + + /** + * Set the thousands separator. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for thousands separator + */ + public static function setThousandsSeparator($pValue): void + { + self::$thousandsSeparator = $pValue; + } + + /** + * Get the currency code. If it has not yet been set explicitly, try to obtain the + * symbol information from locale. + * + * @return string + */ + public static function getCurrencyCode() + { + if (!empty(self::$currencyCode)) { + return self::$currencyCode; + } + self::$currencyCode = '$'; + $localeconv = localeconv(); + if (!empty($localeconv['currency_symbol'])) { + self::$currencyCode = $localeconv['currency_symbol']; + + return self::$currencyCode; + } + if (!empty($localeconv['int_curr_symbol'])) { + self::$currencyCode = $localeconv['int_curr_symbol']; + + return self::$currencyCode; + } + + return self::$currencyCode; + } + + /** + * Set the currency code. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for currency code + */ + public static function setCurrencyCode($pValue): void + { + self::$currencyCode = $pValue; + } + + /** + * Convert SYLK encoded string to UTF-8. + * + * @param string $pValue + * + * @return string UTF-8 encoded string + */ + public static function SYLKtoUTF8($pValue) + { + self::buildCharacterSets(); + + // If there is no escape character in the string there is nothing to do + if (strpos($pValue, '') === false) { + return $pValue; + } + + foreach (self::$SYLKCharacters as $k => $v) { + $pValue = str_replace($k, $v, $pValue); + } + + return $pValue; + } + + /** + * Retrieve any leading numeric part of a string, or return the full string if no leading numeric + * (handles basic integer or float, but not exponent or non decimal). + * + * @param string $value + * + * @return mixed string or only the leading numeric part of the string + */ + public static function testStringAsNumeric($value) + { + if (is_numeric($value)) { + return $value; + } + $v = (float) $value; + + return (is_numeric(substr($value, 0, strlen($v)))) ? $v : $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/TimeZone.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/TimeZone.php new file mode 100755 index 0000000..43fd365 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/TimeZone.php @@ -0,0 +1,81 @@ +getTransitions($timestamp, $timestamp); + + return (count($transitions) > 0) ? $transitions[0]['offset'] : 0; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/BestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/BestFit.php new file mode 100755 index 0000000..c949972 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/BestFit.php @@ -0,0 +1,463 @@ +error; + } + + public function getBestFitType() + { + return $this->bestFitType; + } + + /** + * Return the Y-Value for a specified value of X. + * + * @param float $xValue X-Value + * + * @return bool Y-Value + */ + public function getValueOfYForX($xValue) + { + return false; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return bool X-Value + */ + public function getValueOfXForY($yValue) + { + return false; + } + + /** + * Return the original set of X-Values. + * + * @return float[] X-Values + */ + public function getXValues() + { + return $this->xValues; + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return bool + */ + public function getEquation($dp = 0) + { + return false; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + return round($this->slope, $dp); + } + + return $this->slope; + } + + /** + * Return the standard error of the Slope. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlopeSE($dp = 0) + { + if ($dp != 0) { + return round($this->slopeSE, $dp); + } + + return $this->slopeSE; + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round($this->intersect, $dp); + } + + return $this->intersect; + } + + /** + * Return the standard error of the Intersect. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersectSE($dp = 0) + { + if ($dp != 0) { + return round($this->intersectSE, $dp); + } + + return $this->intersectSE; + } + + /** + * Return the goodness of fit for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getGoodnessOfFit($dp = 0) + { + if ($dp != 0) { + return round($this->goodnessOfFit, $dp); + } + + return $this->goodnessOfFit; + } + + /** + * Return the goodness of fit for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getGoodnessOfFitPercent($dp = 0) + { + if ($dp != 0) { + return round($this->goodnessOfFit * 100, $dp); + } + + return $this->goodnessOfFit * 100; + } + + /** + * Return the standard deviation of the residuals for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getStdevOfResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->stdevOfResiduals, $dp); + } + + return $this->stdevOfResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getSSRegression($dp = 0) + { + if ($dp != 0) { + return round($this->SSRegression, $dp); + } + + return $this->SSRegression; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getSSResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->SSResiduals, $dp); + } + + return $this->SSResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getDFResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->DFResiduals, $dp); + } + + return $this->DFResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getF($dp = 0) + { + if ($dp != 0) { + return round($this->f, $dp); + } + + return $this->f; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getCovariance($dp = 0) + { + if ($dp != 0) { + return round($this->covariance, $dp); + } + + return $this->covariance; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getCorrelation($dp = 0) + { + if ($dp != 0) { + return round($this->correlation, $dp); + } + + return $this->correlation; + } + + /** + * @return float[] + */ + public function getYBestFitValues() + { + return $this->yBestFitValues; + } + + protected function calculateGoodnessOfFit($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const): void + { + $SSres = $SScov = $SScor = $SStot = $SSsex = 0.0; + foreach ($this->xValues as $xKey => $xValue) { + $bestFitY = $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); + + $SSres += ($this->yValues[$xKey] - $bestFitY) * ($this->yValues[$xKey] - $bestFitY); + if ($const) { + $SStot += ($this->yValues[$xKey] - $meanY) * ($this->yValues[$xKey] - $meanY); + } else { + $SStot += $this->yValues[$xKey] * $this->yValues[$xKey]; + } + $SScov += ($this->xValues[$xKey] - $meanX) * ($this->yValues[$xKey] - $meanY); + if ($const) { + $SSsex += ($this->xValues[$xKey] - $meanX) * ($this->xValues[$xKey] - $meanX); + } else { + $SSsex += $this->xValues[$xKey] * $this->xValues[$xKey]; + } + } + + $this->SSResiduals = $SSres; + $this->DFResiduals = $this->valueCount - 1 - $const; + + if ($this->DFResiduals == 0.0) { + $this->stdevOfResiduals = 0.0; + } else { + $this->stdevOfResiduals = sqrt($SSres / $this->DFResiduals); + } + if (($SStot == 0.0) || ($SSres == $SStot)) { + $this->goodnessOfFit = 1; + } else { + $this->goodnessOfFit = 1 - ($SSres / $SStot); + } + + $this->SSRegression = $this->goodnessOfFit * $SStot; + $this->covariance = $SScov / $this->valueCount; + $this->correlation = ($this->valueCount * $sumXY - $sumX * $sumY) / sqrt(($this->valueCount * $sumX2 - $sumX ** 2) * ($this->valueCount * $sumY2 - $sumY ** 2)); + $this->slopeSE = $this->stdevOfResiduals / sqrt($SSsex); + $this->intersectSE = $this->stdevOfResiduals * sqrt(1 / ($this->valueCount - ($sumX * $sumX) / $sumX2)); + if ($this->SSResiduals != 0.0) { + if ($this->DFResiduals == 0.0) { + $this->f = 0.0; + } else { + $this->f = $this->SSRegression / ($this->SSResiduals / $this->DFResiduals); + } + } else { + if ($this->DFResiduals == 0.0) { + $this->f = 0.0; + } else { + $this->f = $this->SSRegression / $this->DFResiduals; + } + } + } + + /** + * @param float[] $yValues + * @param float[] $xValues + * @param bool $const + */ + protected function leastSquareFit(array $yValues, array $xValues, $const): void + { + // calculate sums + $x_sum = array_sum($xValues); + $y_sum = array_sum($yValues); + $meanX = $x_sum / $this->valueCount; + $meanY = $y_sum / $this->valueCount; + $mBase = $mDivisor = $xx_sum = $xy_sum = $yy_sum = 0.0; + for ($i = 0; $i < $this->valueCount; ++$i) { + $xy_sum += $xValues[$i] * $yValues[$i]; + $xx_sum += $xValues[$i] * $xValues[$i]; + $yy_sum += $yValues[$i] * $yValues[$i]; + + if ($const) { + $mBase += ($xValues[$i] - $meanX) * ($yValues[$i] - $meanY); + $mDivisor += ($xValues[$i] - $meanX) * ($xValues[$i] - $meanX); + } else { + $mBase += $xValues[$i] * $yValues[$i]; + $mDivisor += $xValues[$i] * $xValues[$i]; + } + } + + // calculate slope + $this->slope = $mBase / $mDivisor; + + // calculate intersect + if ($const) { + $this->intersect = $meanY - ($this->slope * $meanX); + } else { + $this->intersect = 0; + } + + $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, $meanX, $meanY, $const); + } + + /** + * Define the regression. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + // Calculate number of points + $nY = count($yValues); + $nX = count($xValues); + + // Define X Values if necessary + if ($nX == 0) { + $xValues = range(1, $nY); + } elseif ($nY != $nX) { + // Ensure both arrays of points are the same size + $this->error = true; + } + + $this->valueCount = $nY; + $this->xValues = $xValues; + $this->yValues = $yValues; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php new file mode 100755 index 0000000..82866de --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php @@ -0,0 +1,122 @@ +getIntersect() * $this->getSlope() ** ($xValue - $this->xOffset); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return log(($yValue + $this->yOffset) / $this->getIntersect()) / log($this->getSlope()); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' * ' . $slope . '^X'; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + return round(exp($this->slope), $dp); + } + + return exp($this->slope); + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round(exp($this->intersect), $dp); + } + + return exp($this->intersect); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function exponentialRegression($yValues, $xValues, $const): void + { + foreach ($yValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->exponentialRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LinearBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LinearBestFit.php new file mode 100755 index 0000000..26a562c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LinearBestFit.php @@ -0,0 +1,81 @@ +getIntersect() + $this->getSlope() * $xValue; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return ($yValue - $this->getIntersect()) / $this->getSlope(); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' + ' . $slope . ' * X'; + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function linearRegression($yValues, $xValues, $const): void + { + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->linearRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php new file mode 100755 index 0000000..c469067 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php @@ -0,0 +1,90 @@ +getIntersect() + $this->getSlope() * log($xValue - $this->xOffset); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return exp(($yValue - $this->getIntersect()) / $this->getSlope()); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)'; + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function logarithmicRegression($yValues, $xValues, $const): void + { + foreach ($xValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->logarithmicRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php new file mode 100755 index 0000000..d959edd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php @@ -0,0 +1,200 @@ +order; + } + + /** + * Return the Y-Value for a specified value of X. + * + * @param float $xValue X-Value + * + * @return float Y-Value + */ + public function getValueOfYForX($xValue) + { + $retVal = $this->getIntersect(); + $slope = $this->getSlope(); + foreach ($slope as $key => $value) { + if ($value != 0.0) { + $retVal += $value * $xValue ** ($key + 1); + } + } + + return $retVal; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return ($yValue - $this->getIntersect()) / $this->getSlope(); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + $equation = 'Y = ' . $intersect; + foreach ($slope as $key => $value) { + if ($value != 0.0) { + $equation .= ' + ' . $value . ' * X'; + if ($key > 0) { + $equation .= '^' . ($key + 1); + } + } + } + + return $equation; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + $coefficients = []; + foreach ($this->slope as $coefficient) { + $coefficients[] = round($coefficient, $dp); + } + + return $coefficients; + } + + return $this->slope; + } + + public function getCoefficients($dp = 0) + { + return array_merge([$this->getIntersect($dp)], $this->getSlope($dp)); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param int $order Order of Polynomial for this regression + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + */ + private function polynomialRegression($order, $yValues, $xValues): void + { + // calculate sums + $x_sum = array_sum($xValues); + $y_sum = array_sum($yValues); + $xx_sum = $xy_sum = $yy_sum = 0; + for ($i = 0; $i < $this->valueCount; ++$i) { + $xy_sum += $xValues[$i] * $yValues[$i]; + $xx_sum += $xValues[$i] * $xValues[$i]; + $yy_sum += $yValues[$i] * $yValues[$i]; + } + /* + * This routine uses logic from the PHP port of polyfit version 0.1 + * written by Michael Bommarito and Paul Meagher + * + * The function fits a polynomial function of order $order through + * a series of x-y data points using least squares. + * + */ + $A = []; + $B = []; + for ($i = 0; $i < $this->valueCount; ++$i) { + for ($j = 0; $j <= $order; ++$j) { + $A[$i][$j] = $xValues[$i] ** $j; + } + } + for ($i = 0; $i < $this->valueCount; ++$i) { + $B[$i] = [$yValues[$i]]; + } + $matrixA = new Matrix($A); + $matrixB = new Matrix($B); + $C = $matrixA->solve($matrixB); + + $coefficients = []; + for ($i = 0; $i < $C->getRowDimension(); ++$i) { + $r = $C->get($i, 0); + if (abs($r) <= 10 ** (-9)) { + $r = 0; + } + $coefficients[] = $r; + } + + $this->intersect = array_shift($coefficients); + $this->slope = $coefficients; + + $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, 0, 0, 0); + foreach ($this->xValues as $xKey => $xValue) { + $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); + } + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param int $order Order of Polynomial for this regression + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($order, $yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + if ($order < $this->valueCount) { + $this->bestFitType .= '_' . $order; + $this->order = $order; + $this->polynomialRegression($order, $yValues, $xValues); + if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) { + $this->error = true; + } + } else { + $this->error = true; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PowerBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PowerBestFit.php new file mode 100755 index 0000000..c53eab6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/PowerBestFit.php @@ -0,0 +1,114 @@ +getIntersect() * ($xValue - $this->xOffset) ** $this->getSlope(); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return (($yValue + $this->yOffset) / $this->getIntersect()) ** (1 / $this->getSlope()); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' * X^' . $slope; + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round(exp($this->intersect), $dp); + } + + return exp($this->intersect); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function powerRegression($yValues, $xValues, $const): void + { + foreach ($xValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + foreach ($yValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->powerRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/Trend.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/Trend.php new file mode 100755 index 0000000..1b7b390 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Trend/Trend.php @@ -0,0 +1,120 @@ +getGoodnessOfFit(); + } + if ($trendType != self::TREND_BEST_FIT_NO_POLY) { + foreach (self::$trendTypePolynomialOrders as $trendMethod) { + $order = substr($trendMethod, -1); + $bestFit[$trendMethod] = new PolynomialBestFit($order, $yValues, $xValues, $const); + if ($bestFit[$trendMethod]->getError()) { + unset($bestFit[$trendMethod]); + } else { + $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit(); + } + } + } + // Determine which of our Trend lines is the best fit, and then we return the instance of that Trend class + arsort($bestFitValue); + $bestFitType = key($bestFitValue); + + return $bestFit[$bestFitType]; + default: + return false; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/XMLWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/XMLWriter.php new file mode 100755 index 0000000..4f7a6a0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/XMLWriter.php @@ -0,0 +1,92 @@ +openMemory(); + } else { + // Create temporary filename + if ($pTemporaryStorageFolder === null) { + $pTemporaryStorageFolder = File::sysGetTempDir(); + } + $this->tempFileName = @tempnam($pTemporaryStorageFolder, 'xml'); + + // Open storage + if ($this->openUri($this->tempFileName) === false) { + // Fallback to memory... + $this->openMemory(); + } + } + + // Set default values + if (self::$debugEnabled) { + $this->setIndent(true); + } + } + + /** + * Destructor. + */ + public function __destruct() + { + // Unlink temporary files + if ($this->tempFileName != '') { + @unlink($this->tempFileName); + } + } + + /** + * Get written data. + * + * @return string + */ + public function getData() + { + if ($this->tempFileName == '') { + return $this->outputMemory(true); + } + $this->flush(); + + return file_get_contents($this->tempFileName); + } + + /** + * Wrapper method for writeRaw. + * + * @param string|string[] $text + * + * @return bool + */ + public function writeRawData($text) + { + if (is_array($text)) { + $text = implode("\n", $text); + } + + return $this->writeRaw(htmlspecialchars($text)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Xls.php new file mode 100755 index 0000000..c9eaf37 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Shared/Xls.php @@ -0,0 +1,279 @@ +getParent()->getDefaultStyle()->getFont(); + + $columnDimensions = $sheet->getColumnDimensions(); + + // first find the true column width in pixels (uncollapsed and unhidden) + if (isset($columnDimensions[$col]) && $columnDimensions[$col]->getWidth() != -1) { + // then we have column dimension with explicit width + $columnDimension = $columnDimensions[$col]; + $width = $columnDimension->getWidth(); + $pixelWidth = Drawing::cellDimensionToPixels($width, $font); + } elseif ($sheet->getDefaultColumnDimension()->getWidth() != -1) { + // then we have default column dimension with explicit width + $defaultColumnDimension = $sheet->getDefaultColumnDimension(); + $width = $defaultColumnDimension->getWidth(); + $pixelWidth = Drawing::cellDimensionToPixels($width, $font); + } else { + // we don't even have any default column dimension. Width depends on default font + $pixelWidth = Font::getDefaultColumnWidthByFont($font, true); + } + + // now find the effective column width in pixels + if (isset($columnDimensions[$col]) && !$columnDimensions[$col]->getVisible()) { + $effectivePixelWidth = 0; + } else { + $effectivePixelWidth = $pixelWidth; + } + + return $effectivePixelWidth; + } + + /** + * Convert the height of a cell from user's units to pixels. By interpolation + * the relationship is: y = 4/3x. If the height hasn't been set by the user we + * use the default value. If the row is hidden we use a value of zero. + * + * @param Worksheet $sheet The sheet + * @param int $row The row index (1-based) + * + * @return int The width in pixels + */ + public static function sizeRow($sheet, $row = 1) + { + // default font of the workbook + $font = $sheet->getParent()->getDefaultStyle()->getFont(); + + $rowDimensions = $sheet->getRowDimensions(); + + // first find the true row height in pixels (uncollapsed and unhidden) + if (isset($rowDimensions[$row]) && $rowDimensions[$row]->getRowHeight() != -1) { + // then we have a row dimension + $rowDimension = $rowDimensions[$row]; + $rowHeight = $rowDimension->getRowHeight(); + $pixelRowHeight = (int) ceil(4 * $rowHeight / 3); // here we assume Arial 10 + } elseif ($sheet->getDefaultRowDimension()->getRowHeight() != -1) { + // then we have a default row dimension with explicit height + $defaultRowDimension = $sheet->getDefaultRowDimension(); + $rowHeight = $defaultRowDimension->getRowHeight(); + $pixelRowHeight = Drawing::pointsToPixels($rowHeight); + } else { + // we don't even have any default row dimension. Height depends on default font + $pointRowHeight = Font::getDefaultRowHeightByFont($font); + $pixelRowHeight = Font::fontSizeToPixels($pointRowHeight); + } + + // now find the effective row height in pixels + if (isset($rowDimensions[$row]) && !$rowDimensions[$row]->getVisible()) { + $effectivePixelRowHeight = 0; + } else { + $effectivePixelRowHeight = $pixelRowHeight; + } + + return $effectivePixelRowHeight; + } + + /** + * Get the horizontal distance in pixels between two anchors + * The distanceX is found as sum of all the spanning columns widths minus correction for the two offsets. + * + * @param string $startColumn + * @param int $startOffsetX Offset within start cell measured in 1/1024 of the cell width + * @param string $endColumn + * @param int $endOffsetX Offset within end cell measured in 1/1024 of the cell width + * + * @return int Horizontal measured in pixels + */ + public static function getDistanceX(Worksheet $sheet, $startColumn = 'A', $startOffsetX = 0, $endColumn = 'A', $endOffsetX = 0) + { + $distanceX = 0; + + // add the widths of the spanning columns + $startColumnIndex = Coordinate::columnIndexFromString($startColumn); + $endColumnIndex = Coordinate::columnIndexFromString($endColumn); + for ($i = $startColumnIndex; $i <= $endColumnIndex; ++$i) { + $distanceX += self::sizeCol($sheet, Coordinate::stringFromColumnIndex($i)); + } + + // correct for offsetX in startcell + $distanceX -= (int) floor(self::sizeCol($sheet, $startColumn) * $startOffsetX / 1024); + + // correct for offsetX in endcell + $distanceX -= (int) floor(self::sizeCol($sheet, $endColumn) * (1 - $endOffsetX / 1024)); + + return $distanceX; + } + + /** + * Get the vertical distance in pixels between two anchors + * The distanceY is found as sum of all the spanning rows minus two offsets. + * + * @param int $startRow (1-based) + * @param int $startOffsetY Offset within start cell measured in 1/256 of the cell height + * @param int $endRow (1-based) + * @param int $endOffsetY Offset within end cell measured in 1/256 of the cell height + * + * @return int Vertical distance measured in pixels + */ + public static function getDistanceY(Worksheet $sheet, $startRow = 1, $startOffsetY = 0, $endRow = 1, $endOffsetY = 0) + { + $distanceY = 0; + + // add the widths of the spanning rows + for ($row = $startRow; $row <= $endRow; ++$row) { + $distanceY += self::sizeRow($sheet, $row); + } + + // correct for offsetX in startcell + $distanceY -= (int) floor(self::sizeRow($sheet, $startRow) * $startOffsetY / 256); + + // correct for offsetX in endcell + $distanceY -= (int) floor(self::sizeRow($sheet, $endRow) * (1 - $endOffsetY / 256)); + + return $distanceY; + } + + /** + * Convert 1-cell anchor coordinates to 2-cell anchor coordinates + * This function is ported from PEAR Spreadsheet_Writer_Excel with small modifications. + * + * Calculate the vertices that define the position of the image as required by + * the OBJ record. + * + * +------------+------------+ + * | A | B | + * +-----+------------+------------+ + * | |(x1,y1) | | + * | 1 |(A1)._______|______ | + * | | | | | + * | | | | | + * +-----+----| BITMAP |-----+ + * | | | | | + * | 2 | |______________. | + * | | | (B2)| + * | | | (x2,y2)| + * +---- +------------+------------+ + * + * Example of a bitmap that covers some of the area from cell A1 to cell B2. + * + * Based on the width and height of the bitmap we need to calculate 8 vars: + * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. + * The width and height of the cells are also variable and have to be taken into + * account. + * The values of $col_start and $row_start are passed in from the calling + * function. The values of $col_end and $row_end are calculated by subtracting + * the width and height of the bitmap from the width and height of the + * underlying cells. + * The vertices are expressed as a percentage of the underlying cell width as + * follows (rhs values are in pixels): + * + * x1 = X / W *1024 + * y1 = Y / H *256 + * x2 = (X-1) / W *1024 + * y2 = (Y-1) / H *256 + * + * Where: X is distance from the left side of the underlying cell + * Y is distance from the top of the underlying cell + * W is the width of the cell + * H is the height of the cell + * + * @param Worksheet $sheet + * @param string $coordinates E.g. 'A1' + * @param int $offsetX Horizontal offset in pixels + * @param int $offsetY Vertical offset in pixels + * @param int $width Width in pixels + * @param int $height Height in pixels + * + * @return array + */ + public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height) + { + [$column, $row] = Coordinate::coordinateFromString($coordinates); + $col_start = Coordinate::columnIndexFromString($column); + $row_start = $row - 1; + + $x1 = $offsetX; + $y1 = $offsetY; + + // Initialise end cell to the same as the start cell + $col_end = $col_start; // Col containing lower right corner of object + $row_end = $row_start; // Row containing bottom right corner of object + + // Zero the specified offset if greater than the cell dimensions + if ($x1 >= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start))) { + $x1 = 0; + } + if ($y1 >= self::sizeRow($sheet, $row_start + 1)) { + $y1 = 0; + } + + $width = $width + $x1 - 1; + $height = $height + $y1 - 1; + + // Subtract the underlying cell widths to find the end cell of the image + while ($width >= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end))) { + $width -= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)); + ++$col_end; + } + + // Subtract the underlying cell heights to find the end cell of the image + while ($height >= self::sizeRow($sheet, $row_end + 1)) { + $height -= self::sizeRow($sheet, $row_end + 1); + ++$row_end; + } + + // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell + // with zero height or width. + if (self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start)) == 0) { + return; + } + if (self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)) == 0) { + return; + } + if (self::sizeRow($sheet, $row_start + 1) == 0) { + return; + } + if (self::sizeRow($sheet, $row_end + 1) == 0) { + return; + } + + // Convert the pixel values to the percentage value expected by Excel + $x1 = $x1 / self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start)) * 1024; + $y1 = $y1 / self::sizeRow($sheet, $row_start + 1) * 256; + $x2 = ($width + 1) / self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object + $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object + + $startCoordinates = Coordinate::stringFromColumnIndex($col_start) . ($row_start + 1); + $endCoordinates = Coordinate::stringFromColumnIndex($col_end) . ($row_end + 1); + + return [ + 'startCoordinates' => $startCoordinates, + 'startOffsetX' => $x1, + 'startOffsetY' => $y1, + 'endCoordinates' => $endCoordinates, + 'endOffsetX' => $x2, + 'endOffsetY' => $y2, + ]; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Spreadsheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Spreadsheet.php new file mode 100755 index 0000000..322d5f7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Spreadsheet.php @@ -0,0 +1,1443 @@ +hasMacros; + } + + /** + * Define if a workbook has macros. + * + * @param bool $hasMacros true|false + */ + public function setHasMacros($hasMacros): void + { + $this->hasMacros = (bool) $hasMacros; + } + + /** + * Set the macros code. + * + * @param string $macroCode string|null + */ + public function setMacrosCode($macroCode): void + { + $this->macrosCode = $macroCode; + $this->setHasMacros($macroCode !== null); + } + + /** + * Return the macros code. + * + * @return null|string + */ + public function getMacrosCode() + { + return $this->macrosCode; + } + + /** + * Set the macros certificate. + * + * @param null|string $certificate + */ + public function setMacrosCertificate($certificate): void + { + $this->macrosCertificate = $certificate; + } + + /** + * Is the project signed ? + * + * @return bool true|false + */ + public function hasMacrosCertificate() + { + return $this->macrosCertificate !== null; + } + + /** + * Return the macros certificate. + * + * @return null|string + */ + public function getMacrosCertificate() + { + return $this->macrosCertificate; + } + + /** + * Remove all macros, certificate from spreadsheet. + */ + public function discardMacros(): void + { + $this->hasMacros = false; + $this->macrosCode = null; + $this->macrosCertificate = null; + } + + /** + * set ribbon XML data. + * + * @param null|mixed $target + * @param null|mixed $xmlData + */ + public function setRibbonXMLData($target, $xmlData): void + { + if ($target !== null && $xmlData !== null) { + $this->ribbonXMLData = ['target' => $target, 'data' => $xmlData]; + } else { + $this->ribbonXMLData = null; + } + } + + /** + * retrieve ribbon XML Data. + * + * return string|null|array + * + * @param string $what + * + * @return string + */ + public function getRibbonXMLData($what = 'all') //we need some constants here... + { + $returnData = null; + $what = strtolower($what); + switch ($what) { + case 'all': + $returnData = $this->ribbonXMLData; + + break; + case 'target': + case 'data': + if (is_array($this->ribbonXMLData) && isset($this->ribbonXMLData[$what])) { + $returnData = $this->ribbonXMLData[$what]; + } + + break; + } + + return $returnData; + } + + /** + * store binaries ribbon objects (pictures). + * + * @param null|mixed $BinObjectsNames + * @param null|mixed $BinObjectsData + */ + public function setRibbonBinObjects($BinObjectsNames, $BinObjectsData): void + { + if ($BinObjectsNames !== null && $BinObjectsData !== null) { + $this->ribbonBinObjects = ['names' => $BinObjectsNames, 'data' => $BinObjectsData]; + } else { + $this->ribbonBinObjects = null; + } + } + + /** + * List of unparsed loaded data for export to same format with better compatibility. + * It has to be minimized when the library start to support currently unparsed data. + * + * @internal + * + * @return array + */ + public function getUnparsedLoadedData() + { + return $this->unparsedLoadedData; + } + + /** + * List of unparsed loaded data for export to same format with better compatibility. + * It has to be minimized when the library start to support currently unparsed data. + * + * @internal + */ + public function setUnparsedLoadedData(array $unparsedLoadedData): void + { + $this->unparsedLoadedData = $unparsedLoadedData; + } + + /** + * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function). + * + * @param mixed $path + * + * @return string + */ + private function getExtensionOnly($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + + /** + * retrieve Binaries Ribbon Objects. + * + * @param string $what + * + * @return null|array + */ + public function getRibbonBinObjects($what = 'all') + { + $ReturnData = null; + $what = strtolower($what); + switch ($what) { + case 'all': + return $this->ribbonBinObjects; + + break; + case 'names': + case 'data': + if (is_array($this->ribbonBinObjects) && isset($this->ribbonBinObjects[$what])) { + $ReturnData = $this->ribbonBinObjects[$what]; + } + + break; + case 'types': + if (is_array($this->ribbonBinObjects) && + isset($this->ribbonBinObjects['data']) && is_array($this->ribbonBinObjects['data'])) { + $tmpTypes = array_keys($this->ribbonBinObjects['data']); + $ReturnData = array_unique(array_map([$this, 'getExtensionOnly'], $tmpTypes)); + } else { + $ReturnData = []; // the caller want an array... not null if empty + } + + break; + } + + return $ReturnData; + } + + /** + * This workbook have a custom UI ? + * + * @return bool + */ + public function hasRibbon() + { + return $this->ribbonXMLData !== null; + } + + /** + * This workbook have additionnal object for the ribbon ? + * + * @return bool + */ + public function hasRibbonBinObjects() + { + return $this->ribbonBinObjects !== null; + } + + /** + * Check if a sheet with a specified code name already exists. + * + * @param string $pSheetCodeName Name of the worksheet to check + * + * @return bool + */ + public function sheetCodeNameExists($pSheetCodeName) + { + return $this->getSheetByCodeName($pSheetCodeName) !== null; + } + + /** + * Get sheet by code name. Warning : sheet don't have always a code name ! + * + * @param string $pName Sheet name + * + * @return Worksheet + */ + public function getSheetByCodeName($pName) + { + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + if ($this->workSheetCollection[$i]->getCodeName() == $pName) { + return $this->workSheetCollection[$i]; + } + } + + return null; + } + + /** + * Create a new PhpSpreadsheet with one Worksheet. + */ + public function __construct() + { + $this->uniqueID = uniqid('', true); + $this->calculationEngine = new Calculation($this); + + // Initialise worksheet collection and add one worksheet + $this->workSheetCollection = []; + $this->workSheetCollection[] = new Worksheet($this); + $this->activeSheetIndex = 0; + + // Create document properties + $this->properties = new Document\Properties(); + + // Create document security + $this->security = new Document\Security(); + + // Set named ranges + $this->namedRanges = []; + + // Create the cellXf supervisor + $this->cellXfSupervisor = new Style(true); + $this->cellXfSupervisor->bindParent($this); + + // Create the default style + $this->addCellXf(new Style()); + $this->addCellStyleXf(new Style()); + } + + /** + * Code to execute when this worksheet is unset(). + */ + public function __destruct() + { + $this->calculationEngine = null; + $this->disconnectWorksheets(); + } + + /** + * Disconnect all worksheets from this PhpSpreadsheet workbook object, + * typically so that the PhpSpreadsheet object can be unset. + */ + public function disconnectWorksheets(): void + { + $worksheet = null; + foreach ($this->workSheetCollection as $k => &$worksheet) { + $worksheet->disconnectCells(); + $this->workSheetCollection[$k] = null; + } + unset($worksheet); + $this->workSheetCollection = []; + } + + /** + * Return the calculation engine for this worksheet. + * + * @return Calculation + */ + public function getCalculationEngine() + { + return $this->calculationEngine; + } + + /** + * Get properties. + * + * @return Document\Properties + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Set properties. + */ + public function setProperties(Document\Properties $pValue): void + { + $this->properties = $pValue; + } + + /** + * Get security. + * + * @return Document\Security + */ + public function getSecurity() + { + return $this->security; + } + + /** + * Set security. + */ + public function setSecurity(Document\Security $pValue): void + { + $this->security = $pValue; + } + + /** + * Get active sheet. + * + * @return Worksheet + */ + public function getActiveSheet() + { + return $this->getSheet($this->activeSheetIndex); + } + + /** + * Create sheet and add it to this workbook. + * + * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @return Worksheet + */ + public function createSheet($sheetIndex = null) + { + $newSheet = new Worksheet($this); + $this->addSheet($newSheet, $sheetIndex); + + return $newSheet; + } + + /** + * Check if a sheet with a specified name already exists. + * + * @param string $pSheetName Name of the worksheet to check + * + * @return bool + */ + public function sheetNameExists($pSheetName) + { + return $this->getSheetByName($pSheetName) !== null; + } + + /** + * Add sheet. + * + * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @return Worksheet + */ + public function addSheet(Worksheet $pSheet, $iSheetIndex = null) + { + if ($this->sheetNameExists($pSheet->getTitle())) { + throw new Exception( + "Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first." + ); + } + + if ($iSheetIndex === null) { + if ($this->activeSheetIndex < 0) { + $this->activeSheetIndex = 0; + } + $this->workSheetCollection[] = $pSheet; + } else { + // Insert the sheet at the requested index + array_splice( + $this->workSheetCollection, + $iSheetIndex, + 0, + [$pSheet] + ); + + // Adjust active sheet index if necessary + if ($this->activeSheetIndex >= $iSheetIndex) { + ++$this->activeSheetIndex; + } + } + + if ($pSheet->getParent() === null) { + $pSheet->rebindParent($this); + } + + return $pSheet; + } + + /** + * Remove sheet by index. + * + * @param int $pIndex Active sheet index + */ + public function removeSheetByIndex($pIndex): void + { + $numSheets = count($this->workSheetCollection); + if ($pIndex > $numSheets - 1) { + throw new Exception( + "You tried to remove a sheet by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." + ); + } + array_splice($this->workSheetCollection, $pIndex, 1); + + // Adjust active sheet index if necessary + if (($this->activeSheetIndex >= $pIndex) && + ($pIndex > count($this->workSheetCollection) - 1)) { + --$this->activeSheetIndex; + } + } + + /** + * Get sheet by index. + * + * @param int $pIndex Sheet index + * + * @return Worksheet + */ + public function getSheet($pIndex) + { + if (!isset($this->workSheetCollection[$pIndex])) { + $numSheets = $this->getSheetCount(); + + throw new Exception( + "Your requested sheet index: {$pIndex} is out of bounds. The actual number of sheets is {$numSheets}." + ); + } + + return $this->workSheetCollection[$pIndex]; + } + + /** + * Get all sheets. + * + * @return Worksheet[] + */ + public function getAllSheets() + { + return $this->workSheetCollection; + } + + /** + * Get sheet by name. + * + * @param string $pName Sheet name + * + * @return null|Worksheet + */ + public function getSheetByName($pName) + { + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + if ($this->workSheetCollection[$i]->getTitle() === trim($pName, "'")) { + return $this->workSheetCollection[$i]; + } + } + + return null; + } + + /** + * Get index for sheet. + * + * @return int index + */ + public function getIndex(Worksheet $pSheet) + { + foreach ($this->workSheetCollection as $key => $value) { + if ($value->getHashCode() == $pSheet->getHashCode()) { + return $key; + } + } + + throw new Exception('Sheet does not exist.'); + } + + /** + * Set index for sheet by sheet name. + * + * @param string $sheetName Sheet name to modify index for + * @param int $newIndex New index for the sheet + * + * @return int New sheet index + */ + public function setIndexByName($sheetName, $newIndex) + { + $oldIndex = $this->getIndex($this->getSheetByName($sheetName)); + $pSheet = array_splice( + $this->workSheetCollection, + $oldIndex, + 1 + ); + array_splice( + $this->workSheetCollection, + $newIndex, + 0, + $pSheet + ); + + return $newIndex; + } + + /** + * Get sheet count. + * + * @return int + */ + public function getSheetCount() + { + return count($this->workSheetCollection); + } + + /** + * Get active sheet index. + * + * @return int Active sheet index + */ + public function getActiveSheetIndex() + { + return $this->activeSheetIndex; + } + + /** + * Set active sheet index. + * + * @param int $pIndex Active sheet index + * + * @return Worksheet + */ + public function setActiveSheetIndex($pIndex) + { + $numSheets = count($this->workSheetCollection); + + if ($pIndex > $numSheets - 1) { + throw new Exception( + "You tried to set a sheet active by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." + ); + } + $this->activeSheetIndex = $pIndex; + + return $this->getActiveSheet(); + } + + /** + * Set active sheet index by name. + * + * @param string $pValue Sheet title + * + * @return Worksheet + */ + public function setActiveSheetIndexByName($pValue) + { + if (($worksheet = $this->getSheetByName($pValue)) instanceof Worksheet) { + $this->setActiveSheetIndex($this->getIndex($worksheet)); + + return $worksheet; + } + + throw new Exception('Workbook does not contain sheet:' . $pValue); + } + + /** + * Get sheet names. + * + * @return string[] + */ + public function getSheetNames() + { + $returnValue = []; + $worksheetCount = $this->getSheetCount(); + for ($i = 0; $i < $worksheetCount; ++$i) { + $returnValue[] = $this->getSheet($i)->getTitle(); + } + + return $returnValue; + } + + /** + * Add external sheet. + * + * @param Worksheet $pSheet External sheet to add + * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @return Worksheet + */ + public function addExternalSheet(Worksheet $pSheet, $iSheetIndex = null) + { + if ($this->sheetNameExists($pSheet->getTitle())) { + throw new Exception("Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename the external sheet first."); + } + + // count how many cellXfs there are in this workbook currently, we will need this below + $countCellXfs = count($this->cellXfCollection); + + // copy all the shared cellXfs from the external workbook and append them to the current + foreach ($pSheet->getParent()->getCellXfCollection() as $cellXf) { + $this->addCellXf(clone $cellXf); + } + + // move sheet to this workbook + $pSheet->rebindParent($this); + + // update the cellXfs + foreach ($pSheet->getCoordinates(false) as $coordinate) { + $cell = $pSheet->getCell($coordinate); + $cell->setXfIndex($cell->getXfIndex() + $countCellXfs); + } + + return $this->addSheet($pSheet, $iSheetIndex); + } + + /** + * Get named ranges. + * + * @return NamedRange[] + */ + public function getNamedRanges() + { + return $this->namedRanges; + } + + /** + * Add named range. + * + * @return bool + */ + public function addNamedRange(NamedRange $namedRange) + { + if ($namedRange->getScope() == null) { + // global scope + $this->namedRanges[$namedRange->getName()] = $namedRange; + } else { + // local scope + $this->namedRanges[$namedRange->getScope()->getTitle() . '!' . $namedRange->getName()] = $namedRange; + } + + return true; + } + + /** + * Get named range. + * + * @param string $namedRange + * @param null|Worksheet $pSheet Scope. Use null for global scope + * + * @return null|NamedRange + */ + public function getNamedRange($namedRange, ?Worksheet $pSheet = null) + { + $returnValue = null; + + if ($namedRange != '' && ($namedRange !== null)) { + // first look for global defined name + if (isset($this->namedRanges[$namedRange])) { + $returnValue = $this->namedRanges[$namedRange]; + } + + // then look for local defined name (has priority over global defined name if both names exist) + if (($pSheet !== null) && isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { + $returnValue = $this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]; + } + } + + return $returnValue; + } + + /** + * Remove named range. + * + * @param string $namedRange + * @param null|Worksheet $pSheet scope: use null for global scope + * + * @return $this + */ + public function removeNamedRange($namedRange, ?Worksheet $pSheet = null) + { + if ($pSheet === null) { + if (isset($this->namedRanges[$namedRange])) { + unset($this->namedRanges[$namedRange]); + } + } else { + if (isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { + unset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]); + } + } + + return $this; + } + + /** + * Get worksheet iterator. + * + * @return Iterator + */ + public function getWorksheetIterator() + { + return new Iterator($this); + } + + /** + * Copy workbook (!= clone!). + * + * @return Spreadsheet + */ + public function copy() + { + $copied = clone $this; + + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + $this->workSheetCollection[$i] = $this->workSheetCollection[$i]->copy(); + $this->workSheetCollection[$i]->rebindParent($this); + } + + return $copied; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + foreach ($this as $key => $val) { + if (is_object($val) || (is_array($val))) { + $this->{$key} = unserialize(serialize($val)); + } + } + } + + /** + * Get the workbook collection of cellXfs. + * + * @return Style[] + */ + public function getCellXfCollection() + { + return $this->cellXfCollection; + } + + /** + * Get cellXf by index. + * + * @param int $pIndex + * + * @return Style + */ + public function getCellXfByIndex($pIndex) + { + return $this->cellXfCollection[$pIndex]; + } + + /** + * Get cellXf by hash code. + * + * @param string $pValue + * + * @return false|Style + */ + public function getCellXfByHashCode($pValue) + { + foreach ($this->cellXfCollection as $cellXf) { + if ($cellXf->getHashCode() == $pValue) { + return $cellXf; + } + } + + return false; + } + + /** + * Check if style exists in style collection. + * + * @param Style $pCellStyle + * + * @return bool + */ + public function cellXfExists($pCellStyle) + { + return in_array($pCellStyle, $this->cellXfCollection, true); + } + + /** + * Get default style. + * + * @return Style + */ + public function getDefaultStyle() + { + if (isset($this->cellXfCollection[0])) { + return $this->cellXfCollection[0]; + } + + throw new Exception('No default style found for this workbook'); + } + + /** + * Add a cellXf to the workbook. + */ + public function addCellXf(Style $style): void + { + $this->cellXfCollection[] = $style; + $style->setIndex(count($this->cellXfCollection) - 1); + } + + /** + * Remove cellXf by index. It is ensured that all cells get their xf index updated. + * + * @param int $pIndex Index to cellXf + */ + public function removeCellXfByIndex($pIndex): void + { + if ($pIndex > count($this->cellXfCollection) - 1) { + throw new Exception('CellXf index is out of bounds.'); + } + + // first remove the cellXf + array_splice($this->cellXfCollection, $pIndex, 1); + + // then update cellXf indexes for cells + foreach ($this->workSheetCollection as $worksheet) { + foreach ($worksheet->getCoordinates(false) as $coordinate) { + $cell = $worksheet->getCell($coordinate); + $xfIndex = $cell->getXfIndex(); + if ($xfIndex > $pIndex) { + // decrease xf index by 1 + $cell->setXfIndex($xfIndex - 1); + } elseif ($xfIndex == $pIndex) { + // set to default xf index 0 + $cell->setXfIndex(0); + } + } + } + } + + /** + * Get the cellXf supervisor. + * + * @return Style + */ + public function getCellXfSupervisor() + { + return $this->cellXfSupervisor; + } + + /** + * Get the workbook collection of cellStyleXfs. + * + * @return Style[] + */ + public function getCellStyleXfCollection() + { + return $this->cellStyleXfCollection; + } + + /** + * Get cellStyleXf by index. + * + * @param int $pIndex Index to cellXf + * + * @return Style + */ + public function getCellStyleXfByIndex($pIndex) + { + return $this->cellStyleXfCollection[$pIndex]; + } + + /** + * Get cellStyleXf by hash code. + * + * @param string $pValue + * + * @return false|Style + */ + public function getCellStyleXfByHashCode($pValue) + { + foreach ($this->cellStyleXfCollection as $cellStyleXf) { + if ($cellStyleXf->getHashCode() == $pValue) { + return $cellStyleXf; + } + } + + return false; + } + + /** + * Add a cellStyleXf to the workbook. + */ + public function addCellStyleXf(Style $pStyle): void + { + $this->cellStyleXfCollection[] = $pStyle; + $pStyle->setIndex(count($this->cellStyleXfCollection) - 1); + } + + /** + * Remove cellStyleXf by index. + * + * @param int $pIndex Index to cellXf + */ + public function removeCellStyleXfByIndex($pIndex): void + { + if ($pIndex > count($this->cellStyleXfCollection) - 1) { + throw new Exception('CellStyleXf index is out of bounds.'); + } + array_splice($this->cellStyleXfCollection, $pIndex, 1); + } + + /** + * Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells + * and columns in the workbook. + */ + public function garbageCollect(): void + { + // how many references are there to each cellXf ? + $countReferencesCellXf = []; + foreach ($this->cellXfCollection as $index => $cellXf) { + $countReferencesCellXf[$index] = 0; + } + + foreach ($this->getWorksheetIterator() as $sheet) { + // from cells + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + ++$countReferencesCellXf[$cell->getXfIndex()]; + } + + // from row dimensions + foreach ($sheet->getRowDimensions() as $rowDimension) { + if ($rowDimension->getXfIndex() !== null) { + ++$countReferencesCellXf[$rowDimension->getXfIndex()]; + } + } + + // from column dimensions + foreach ($sheet->getColumnDimensions() as $columnDimension) { + ++$countReferencesCellXf[$columnDimension->getXfIndex()]; + } + } + + // remove cellXfs without references and create mapping so we can update xfIndex + // for all cells and columns + $countNeededCellXfs = 0; + foreach ($this->cellXfCollection as $index => $cellXf) { + if ($countReferencesCellXf[$index] > 0 || $index == 0) { // we must never remove the first cellXf + ++$countNeededCellXfs; + } else { + unset($this->cellXfCollection[$index]); + } + $map[$index] = $countNeededCellXfs - 1; + } + $this->cellXfCollection = array_values($this->cellXfCollection); + + // update the index for all cellXfs + foreach ($this->cellXfCollection as $i => $cellXf) { + $cellXf->setIndex($i); + } + + // make sure there is always at least one cellXf (there should be) + if (empty($this->cellXfCollection)) { + $this->cellXfCollection[] = new Style(); + } + + // update the xfIndex for all cells, row dimensions, column dimensions + foreach ($this->getWorksheetIterator() as $sheet) { + // for all cells + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + $cell->setXfIndex($map[$cell->getXfIndex()]); + } + + // for all row dimensions + foreach ($sheet->getRowDimensions() as $rowDimension) { + if ($rowDimension->getXfIndex() !== null) { + $rowDimension->setXfIndex($map[$rowDimension->getXfIndex()]); + } + } + + // for all column dimensions + foreach ($sheet->getColumnDimensions() as $columnDimension) { + $columnDimension->setXfIndex($map[$columnDimension->getXfIndex()]); + } + + // also do garbage collection for all the sheets + $sheet->garbageCollect(); + } + } + + /** + * Return the unique ID value assigned to this spreadsheet workbook. + * + * @return string + */ + public function getID() + { + return $this->uniqueID; + } + + /** + * Get the visibility of the horizonal scroll bar in the application. + * + * @return bool True if horizonal scroll bar is visible + */ + public function getShowHorizontalScroll() + { + return $this->showHorizontalScroll; + } + + /** + * Set the visibility of the horizonal scroll bar in the application. + * + * @param bool $showHorizontalScroll True if horizonal scroll bar is visible + */ + public function setShowHorizontalScroll($showHorizontalScroll): void + { + $this->showHorizontalScroll = (bool) $showHorizontalScroll; + } + + /** + * Get the visibility of the vertical scroll bar in the application. + * + * @return bool True if vertical scroll bar is visible + */ + public function getShowVerticalScroll() + { + return $this->showVerticalScroll; + } + + /** + * Set the visibility of the vertical scroll bar in the application. + * + * @param bool $showVerticalScroll True if vertical scroll bar is visible + */ + public function setShowVerticalScroll($showVerticalScroll): void + { + $this->showVerticalScroll = (bool) $showVerticalScroll; + } + + /** + * Get the visibility of the sheet tabs in the application. + * + * @return bool True if the sheet tabs are visible + */ + public function getShowSheetTabs() + { + return $this->showSheetTabs; + } + + /** + * Set the visibility of the sheet tabs in the application. + * + * @param bool $showSheetTabs True if sheet tabs are visible + */ + public function setShowSheetTabs($showSheetTabs): void + { + $this->showSheetTabs = (bool) $showSheetTabs; + } + + /** + * Return whether the workbook window is minimized. + * + * @return bool true if workbook window is minimized + */ + public function getMinimized() + { + return $this->minimized; + } + + /** + * Set whether the workbook window is minimized. + * + * @param bool $minimized true if workbook window is minimized + */ + public function setMinimized($minimized): void + { + $this->minimized = (bool) $minimized; + } + + /** + * Return whether to group dates when presenting the user with + * filtering optiomd in the user interface. + * + * @return bool true if workbook window is minimized + */ + public function getAutoFilterDateGrouping() + { + return $this->autoFilterDateGrouping; + } + + /** + * Set whether to group dates when presenting the user with + * filtering optiomd in the user interface. + * + * @param bool $autoFilterDateGrouping true if workbook window is minimized + */ + public function setAutoFilterDateGrouping($autoFilterDateGrouping): void + { + $this->autoFilterDateGrouping = (bool) $autoFilterDateGrouping; + } + + /** + * Return the first sheet in the book view. + * + * @return int First sheet in book view + */ + public function getFirstSheetIndex() + { + return $this->firstSheetIndex; + } + + /** + * Set the first sheet in the book view. + * + * @param int $firstSheetIndex First sheet in book view + */ + public function setFirstSheetIndex($firstSheetIndex): void + { + if ($firstSheetIndex >= 0) { + $this->firstSheetIndex = (int) $firstSheetIndex; + } else { + throw new Exception('First sheet index must be a positive integer.'); + } + } + + /** + * Return the visibility status of the workbook. + * + * This may be one of the following three values: + * - visibile + * + * @return string Visible status + */ + public function getVisibility() + { + return $this->visibility; + } + + /** + * Set the visibility status of the workbook. + * + * Valid values are: + * - 'visible' (self::VISIBILITY_VISIBLE): + * Workbook window is visible + * - 'hidden' (self::VISIBILITY_HIDDEN): + * Workbook window is hidden, but can be shown by the user + * via the user interface + * - 'veryHidden' (self::VISIBILITY_VERY_HIDDEN): + * Workbook window is hidden and cannot be shown in the + * user interface. + * + * @param string $visibility visibility status of the workbook + */ + public function setVisibility($visibility): void + { + if ($visibility === null) { + $visibility = self::VISIBILITY_VISIBLE; + } + + if (in_array($visibility, self::$workbookViewVisibilityValues)) { + $this->visibility = $visibility; + } else { + throw new Exception('Invalid visibility value.'); + } + } + + /** + * Get the ratio between the workbook tabs bar and the horizontal scroll bar. + * TabRatio is assumed to be out of 1000 of the horizontal window width. + * + * @return int Ratio between the workbook tabs bar and the horizontal scroll bar + */ + public function getTabRatio() + { + return $this->tabRatio; + } + + /** + * Set the ratio between the workbook tabs bar and the horizontal scroll bar + * TabRatio is assumed to be out of 1000 of the horizontal window width. + * + * @param int $tabRatio Ratio between the tabs bar and the horizontal scroll bar + */ + public function setTabRatio($tabRatio): void + { + if ($tabRatio >= 0 || $tabRatio <= 1000) { + $this->tabRatio = (int) $tabRatio; + } else { + throw new Exception('Tab ratio must be between 0 and 1000.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Alignment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Alignment.php new file mode 100755 index 0000000..e54fa2a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Alignment.php @@ -0,0 +1,462 @@ +horizontal = null; + $this->vertical = null; + $this->textRotation = null; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Alignment + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getAlignment(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['alignment' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray( + * [ + * 'horizontal' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER, + * 'vertical' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_CENTER, + * 'textRotation' => 0, + * 'wrapText' => TRUE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells()) + ->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['horizontal'])) { + $this->setHorizontal($pStyles['horizontal']); + } + if (isset($pStyles['vertical'])) { + $this->setVertical($pStyles['vertical']); + } + if (isset($pStyles['textRotation'])) { + $this->setTextRotation($pStyles['textRotation']); + } + if (isset($pStyles['wrapText'])) { + $this->setWrapText($pStyles['wrapText']); + } + if (isset($pStyles['shrinkToFit'])) { + $this->setShrinkToFit($pStyles['shrinkToFit']); + } + if (isset($pStyles['indent'])) { + $this->setIndent($pStyles['indent']); + } + if (isset($pStyles['readOrder'])) { + $this->setReadOrder($pStyles['readOrder']); + } + } + + return $this; + } + + /** + * Get Horizontal. + * + * @return string + */ + public function getHorizontal() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHorizontal(); + } + + return $this->horizontal; + } + + /** + * Set Horizontal. + * + * @param string $pValue see self::HORIZONTAL_* + * + * @return $this + */ + public function setHorizontal($pValue) + { + if ($pValue == '') { + $pValue = self::HORIZONTAL_GENERAL; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['horizontal' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->horizontal = $pValue; + } + + return $this; + } + + /** + * Get Vertical. + * + * @return string + */ + public function getVertical() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getVertical(); + } + + return $this->vertical; + } + + /** + * Set Vertical. + * + * @param string $pValue see self::VERTICAL_* + * + * @return $this + */ + public function setVertical($pValue) + { + if ($pValue == '') { + $pValue = self::VERTICAL_BOTTOM; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['vertical' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->vertical = $pValue; + } + + return $this; + } + + /** + * Get TextRotation. + * + * @return int + */ + public function getTextRotation() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getTextRotation(); + } + + return $this->textRotation; + } + + /** + * Set TextRotation. + * + * @param int $pValue + * + * @return $this + */ + public function setTextRotation($pValue) + { + // Excel2007 value 255 => PhpSpreadsheet value -165 + if ($pValue == 255) { + $pValue = -165; + } + + // Set rotation + if (($pValue >= -90 && $pValue <= 90) || $pValue == -165) { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['textRotation' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->textRotation = $pValue; + } + } else { + throw new PhpSpreadsheetException('Text rotation should be a value between -90 and 90.'); + } + + return $this; + } + + /** + * Get Wrap Text. + * + * @return bool + */ + public function getWrapText() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getWrapText(); + } + + return $this->wrapText; + } + + /** + * Set Wrap Text. + * + * @param bool $pValue + * + * @return $this + */ + public function setWrapText($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['wrapText' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->wrapText = $pValue; + } + + return $this; + } + + /** + * Get Shrink to fit. + * + * @return bool + */ + public function getShrinkToFit() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getShrinkToFit(); + } + + return $this->shrinkToFit; + } + + /** + * Set Shrink to fit. + * + * @param bool $pValue + * + * @return $this + */ + public function setShrinkToFit($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['shrinkToFit' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->shrinkToFit = $pValue; + } + + return $this; + } + + /** + * Get indent. + * + * @return int + */ + public function getIndent() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getIndent(); + } + + return $this->indent; + } + + /** + * Set indent. + * + * @param int $pValue + * + * @return $this + */ + public function setIndent($pValue) + { + if ($pValue > 0) { + if ($this->getHorizontal() != self::HORIZONTAL_GENERAL && + $this->getHorizontal() != self::HORIZONTAL_LEFT && + $this->getHorizontal() != self::HORIZONTAL_RIGHT) { + $pValue = 0; // indent not supported + } + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['indent' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->indent = $pValue; + } + + return $this; + } + + /** + * Get read order. + * + * @return int + */ + public function getReadOrder() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getReadOrder(); + } + + return $this->readOrder; + } + + /** + * Set read order. + * + * @param int $pValue + * + * @return $this + */ + public function setReadOrder($pValue) + { + if ($pValue < 0 || $pValue > 2) { + $pValue = 0; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['readOrder' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->readOrder = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->horizontal . + $this->vertical . + $this->textRotation . + ($this->wrapText ? 't' : 'f') . + ($this->shrinkToFit ? 't' : 'f') . + $this->indent . + $this->readOrder . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Border.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Border.php new file mode 100755 index 0000000..78ad8b2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Border.php @@ -0,0 +1,231 @@ +color = new Color(Color::COLOR_BLACK, $isSupervisor); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->color->bindParent($this, 'color'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Border + */ + public function getSharedComponent() + { + switch ($this->parentPropertyName) { + case 'allBorders': + case 'horizontal': + case 'inside': + case 'outline': + case 'vertical': + throw new PhpSpreadsheetException('Cannot get shared component for a pseudo-border.'); + + break; + case 'bottom': + return $this->parent->getSharedComponent()->getBottom(); + case 'diagonal': + return $this->parent->getSharedComponent()->getDiagonal(); + case 'left': + return $this->parent->getSharedComponent()->getLeft(); + case 'right': + return $this->parent->getSharedComponent()->getRight(); + case 'top': + return $this->parent->getSharedComponent()->getTop(); + } + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return $this->parent->getStyleArray([$this->parentPropertyName => $array]); + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray( + * [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['borderStyle'])) { + $this->setBorderStyle($pStyles['borderStyle']); + } + if (isset($pStyles['color'])) { + $this->getColor()->applyFromArray($pStyles['color']); + } + } + + return $this; + } + + /** + * Get Border style. + * + * @return string + */ + public function getBorderStyle() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBorderStyle(); + } + + return $this->borderStyle; + } + + /** + * Set Border style. + * + * @param bool|string $pValue + * When passing a boolean, FALSE equates Border::BORDER_NONE + * and TRUE to Border::BORDER_MEDIUM + * + * @return $this + */ + public function setBorderStyle($pValue) + { + if (empty($pValue)) { + $pValue = self::BORDER_NONE; + } elseif (is_bool($pValue) && $pValue) { + $pValue = self::BORDER_MEDIUM; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['borderStyle' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->borderStyle = $pValue; + } + + return $this; + } + + /** + * Get Border Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Border Color. + * + * @return $this + */ + public function setColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->color = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->borderStyle . + $this->color->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Borders.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Borders.php new file mode 100755 index 0000000..e75d7ee --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Borders.php @@ -0,0 +1,411 @@ +left = new Border($isSupervisor, $isConditional); + $this->right = new Border($isSupervisor, $isConditional); + $this->top = new Border($isSupervisor, $isConditional); + $this->bottom = new Border($isSupervisor, $isConditional); + $this->diagonal = new Border($isSupervisor, $isConditional); + $this->diagonalDirection = self::DIAGONAL_NONE; + + // Specially for supervisor + if ($isSupervisor) { + // Initialize pseudo-borders + $this->allBorders = new Border(true); + $this->outline = new Border(true); + $this->inside = new Border(true); + $this->vertical = new Border(true); + $this->horizontal = new Border(true); + + // bind parent if we are a supervisor + $this->left->bindParent($this, 'left'); + $this->right->bindParent($this, 'right'); + $this->top->bindParent($this, 'top'); + $this->bottom->bindParent($this, 'bottom'); + $this->diagonal->bindParent($this, 'diagonal'); + $this->allBorders->bindParent($this, 'allBorders'); + $this->outline->bindParent($this, 'outline'); + $this->inside->bindParent($this, 'inside'); + $this->vertical->bindParent($this, 'vertical'); + $this->horizontal->bindParent($this, 'horizontal'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Borders + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getBorders(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['borders' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( + * [ + * 'bottom' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'top' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ] + * ); + * + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( + * [ + * 'allBorders' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['left'])) { + $this->getLeft()->applyFromArray($pStyles['left']); + } + if (isset($pStyles['right'])) { + $this->getRight()->applyFromArray($pStyles['right']); + } + if (isset($pStyles['top'])) { + $this->getTop()->applyFromArray($pStyles['top']); + } + if (isset($pStyles['bottom'])) { + $this->getBottom()->applyFromArray($pStyles['bottom']); + } + if (isset($pStyles['diagonal'])) { + $this->getDiagonal()->applyFromArray($pStyles['diagonal']); + } + if (isset($pStyles['diagonalDirection'])) { + $this->setDiagonalDirection($pStyles['diagonalDirection']); + } + if (isset($pStyles['allBorders'])) { + $this->getLeft()->applyFromArray($pStyles['allBorders']); + $this->getRight()->applyFromArray($pStyles['allBorders']); + $this->getTop()->applyFromArray($pStyles['allBorders']); + $this->getBottom()->applyFromArray($pStyles['allBorders']); + } + } + + return $this; + } + + /** + * Get Left. + * + * @return Border + */ + public function getLeft() + { + return $this->left; + } + + /** + * Get Right. + * + * @return Border + */ + public function getRight() + { + return $this->right; + } + + /** + * Get Top. + * + * @return Border + */ + public function getTop() + { + return $this->top; + } + + /** + * Get Bottom. + * + * @return Border + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Get Diagonal. + * + * @return Border + */ + public function getDiagonal() + { + return $this->diagonal; + } + + /** + * Get AllBorders (pseudo-border). Only applies to supervisor. + * + * @return Border + */ + public function getAllBorders() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->allBorders; + } + + /** + * Get Outline (pseudo-border). Only applies to supervisor. + * + * @return Border + */ + public function getOutline() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->outline; + } + + /** + * Get Inside (pseudo-border). Only applies to supervisor. + * + * @return Border + */ + public function getInside() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->inside; + } + + /** + * Get Vertical (pseudo-border). Only applies to supervisor. + * + * @return Border + */ + public function getVertical() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->vertical; + } + + /** + * Get Horizontal (pseudo-border). Only applies to supervisor. + * + * @return Border + */ + public function getHorizontal() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->horizontal; + } + + /** + * Get DiagonalDirection. + * + * @return int + */ + public function getDiagonalDirection() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getDiagonalDirection(); + } + + return $this->diagonalDirection; + } + + /** + * Set DiagonalDirection. + * + * @param int $pValue see self::DIAGONAL_* + * + * @return $this + */ + public function setDiagonalDirection($pValue) + { + if ($pValue == '') { + $pValue = self::DIAGONAL_NONE; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['diagonalDirection' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->diagonalDirection = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashcode(); + } + + return md5( + $this->getLeft()->getHashCode() . + $this->getRight()->getHashCode() . + $this->getTop()->getHashCode() . + $this->getBottom()->getHashCode() . + $this->getDiagonal()->getHashCode() . + $this->getDiagonalDirection() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Color.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Color.php new file mode 100755 index 0000000..d8ba08b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Color.php @@ -0,0 +1,407 @@ +argb = $pARGB; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Color + */ + public function getSharedComponent() + { + switch ($this->parentPropertyName) { + case 'endColor': + return $this->parent->getSharedComponent()->getEndColor(); + case 'color': + return $this->parent->getSharedComponent()->getColor(); + case 'startColor': + return $this->parent->getSharedComponent()->getStartColor(); + } + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return $this->parent->getStyleArray([$this->parentPropertyName => $array]); + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray(['rgb' => '808080']); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['rgb'])) { + $this->setRGB($pStyles['rgb']); + } + if (isset($pStyles['argb'])) { + $this->setARGB($pStyles['argb']); + } + } + + return $this; + } + + /** + * Get ARGB. + * + * @return string + */ + public function getARGB() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getARGB(); + } + + return $this->argb; + } + + /** + * Set ARGB. + * + * @param string $pValue see self::COLOR_* + * + * @return $this + */ + public function setARGB($pValue) + { + if ($pValue == '') { + $pValue = self::COLOR_BLACK; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['argb' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->argb = $pValue; + } + + return $this; + } + + /** + * Get RGB. + * + * @return string + */ + public function getRGB() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getRGB(); + } + + return substr($this->argb, 2); + } + + /** + * Set RGB. + * + * @param string $pValue RGB value + * + * @return $this + */ + public function setRGB($pValue) + { + if ($pValue == '') { + $pValue = '000000'; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['argb' => 'FF' . $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->argb = 'FF' . $pValue; + } + + return $this; + } + + /** + * Get a specified colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param int $offset Position within the RGB value to extract + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The extracted colour component + */ + private static function getColourComponent($RGB, $offset, $hex = true) + { + $colour = substr($RGB, $offset, 2); + + return ($hex) ? $colour : hexdec($colour); + } + + /** + * Get the red colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The red colour component + */ + public static function getRed($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 6, $hex); + } + + /** + * Get the green colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The green colour component + */ + public static function getGreen($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 4, $hex); + } + + /** + * Get the blue colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The blue colour component + */ + public static function getBlue($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 2, $hex); + } + + /** + * Adjust the brightness of a color. + * + * @param string $hex The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) + * @param float $adjustPercentage The percentage by which to adjust the colour as a float from -1 to 1 + * + * @return string The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) + */ + public static function changeBrightness($hex, $adjustPercentage) + { + $rgba = (strlen($hex) === 8); + + $red = self::getRed($hex, false); + $green = self::getGreen($hex, false); + $blue = self::getBlue($hex, false); + if ($adjustPercentage > 0) { + $red += (255 - $red) * $adjustPercentage; + $green += (255 - $green) * $adjustPercentage; + $blue += (255 - $blue) * $adjustPercentage; + } else { + $red += $red * $adjustPercentage; + $green += $green * $adjustPercentage; + $blue += $blue * $adjustPercentage; + } + + if ($red < 0) { + $red = 0; + } elseif ($red > 255) { + $red = 255; + } + if ($green < 0) { + $green = 0; + } elseif ($green > 255) { + $green = 255; + } + if ($blue < 0) { + $blue = 0; + } elseif ($blue > 255) { + $blue = 255; + } + + $rgb = strtoupper( + str_pad(dechex((int) $red), 2, '0', 0) . + str_pad(dechex((int) $green), 2, '0', 0) . + str_pad(dechex((int) $blue), 2, '0', 0) + ); + + return (($rgba) ? 'FF' : '') . $rgb; + } + + /** + * Get indexed color. + * + * @param int $pIndex Index entry point into the colour array + * @param bool $background Flag to indicate whether default background or foreground colour + * should be returned if the indexed colour doesn't exist + * + * @return self + */ + public static function indexedColor($pIndex, $background = false) + { + // Clean parameter + $pIndex = (int) $pIndex; + + // Indexed colors + if (self::$indexedColors === null) { + self::$indexedColors = [ + 1 => 'FF000000', // System Colour #1 - Black + 2 => 'FFFFFFFF', // System Colour #2 - White + 3 => 'FFFF0000', // System Colour #3 - Red + 4 => 'FF00FF00', // System Colour #4 - Green + 5 => 'FF0000FF', // System Colour #5 - Blue + 6 => 'FFFFFF00', // System Colour #6 - Yellow + 7 => 'FFFF00FF', // System Colour #7- Magenta + 8 => 'FF00FFFF', // System Colour #8- Cyan + 9 => 'FF800000', // Standard Colour #9 + 10 => 'FF008000', // Standard Colour #10 + 11 => 'FF000080', // Standard Colour #11 + 12 => 'FF808000', // Standard Colour #12 + 13 => 'FF800080', // Standard Colour #13 + 14 => 'FF008080', // Standard Colour #14 + 15 => 'FFC0C0C0', // Standard Colour #15 + 16 => 'FF808080', // Standard Colour #16 + 17 => 'FF9999FF', // Chart Fill Colour #17 + 18 => 'FF993366', // Chart Fill Colour #18 + 19 => 'FFFFFFCC', // Chart Fill Colour #19 + 20 => 'FFCCFFFF', // Chart Fill Colour #20 + 21 => 'FF660066', // Chart Fill Colour #21 + 22 => 'FFFF8080', // Chart Fill Colour #22 + 23 => 'FF0066CC', // Chart Fill Colour #23 + 24 => 'FFCCCCFF', // Chart Fill Colour #24 + 25 => 'FF000080', // Chart Line Colour #25 + 26 => 'FFFF00FF', // Chart Line Colour #26 + 27 => 'FFFFFF00', // Chart Line Colour #27 + 28 => 'FF00FFFF', // Chart Line Colour #28 + 29 => 'FF800080', // Chart Line Colour #29 + 30 => 'FF800000', // Chart Line Colour #30 + 31 => 'FF008080', // Chart Line Colour #31 + 32 => 'FF0000FF', // Chart Line Colour #32 + 33 => 'FF00CCFF', // Standard Colour #33 + 34 => 'FFCCFFFF', // Standard Colour #34 + 35 => 'FFCCFFCC', // Standard Colour #35 + 36 => 'FFFFFF99', // Standard Colour #36 + 37 => 'FF99CCFF', // Standard Colour #37 + 38 => 'FFFF99CC', // Standard Colour #38 + 39 => 'FFCC99FF', // Standard Colour #39 + 40 => 'FFFFCC99', // Standard Colour #40 + 41 => 'FF3366FF', // Standard Colour #41 + 42 => 'FF33CCCC', // Standard Colour #42 + 43 => 'FF99CC00', // Standard Colour #43 + 44 => 'FFFFCC00', // Standard Colour #44 + 45 => 'FFFF9900', // Standard Colour #45 + 46 => 'FFFF6600', // Standard Colour #46 + 47 => 'FF666699', // Standard Colour #47 + 48 => 'FF969696', // Standard Colour #48 + 49 => 'FF003366', // Standard Colour #49 + 50 => 'FF339966', // Standard Colour #50 + 51 => 'FF003300', // Standard Colour #51 + 52 => 'FF333300', // Standard Colour #52 + 53 => 'FF993300', // Standard Colour #53 + 54 => 'FF993366', // Standard Colour #54 + 55 => 'FF333399', // Standard Colour #55 + 56 => 'FF333333', // Standard Colour #56 + ]; + } + + if (isset(self::$indexedColors[$pIndex])) { + return new self(self::$indexedColors[$pIndex]); + } + + if ($background) { + return new self(self::COLOR_WHITE); + } + + return new self(self::COLOR_BLACK); + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->argb . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Conditional.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Conditional.php new file mode 100755 index 0000000..35ec479 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Conditional.php @@ -0,0 +1,274 @@ +style = new Style(false, true); + } + + /** + * Get Condition type. + * + * @return string + */ + public function getConditionType() + { + return $this->conditionType; + } + + /** + * Set Condition type. + * + * @param string $pValue Condition type, see self::CONDITION_* + * + * @return $this + */ + public function setConditionType($pValue) + { + $this->conditionType = $pValue; + + return $this; + } + + /** + * Get Operator type. + * + * @return string + */ + public function getOperatorType() + { + return $this->operatorType; + } + + /** + * Set Operator type. + * + * @param string $pValue Conditional operator type, see self::OPERATOR_* + * + * @return $this + */ + public function setOperatorType($pValue) + { + $this->operatorType = $pValue; + + return $this; + } + + /** + * Get text. + * + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Set text. + * + * @param string $value + * + * @return $this + */ + public function setText($value) + { + $this->text = $value; + + return $this; + } + + /** + * Get StopIfTrue. + * + * @return bool + */ + public function getStopIfTrue() + { + return $this->stopIfTrue; + } + + /** + * Set StopIfTrue. + * + * @param bool $value + * + * @return $this + */ + public function setStopIfTrue($value) + { + $this->stopIfTrue = $value; + + return $this; + } + + /** + * Get Conditions. + * + * @return string[] + */ + public function getConditions() + { + return $this->condition; + } + + /** + * Set Conditions. + * + * @param string[] $pValue Condition + * + * @return $this + */ + public function setConditions($pValue) + { + if (!is_array($pValue)) { + $pValue = [$pValue]; + } + $this->condition = $pValue; + + return $this; + } + + /** + * Add Condition. + * + * @param string $pValue Condition + * + * @return $this + */ + public function addCondition($pValue) + { + $this->condition[] = $pValue; + + return $this; + } + + /** + * Get Style. + * + * @return Style + */ + public function getStyle() + { + return $this->style; + } + + /** + * Set Style. + * + * @param Style $pValue + * + * @return $this + */ + public function setStyle(?Style $pValue = null) + { + $this->style = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->conditionType . + $this->operatorType . + implode(';', $this->condition) . + $this->style->getHashCode() . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Fill.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Fill.php new file mode 100755 index 0000000..c6baeed --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Fill.php @@ -0,0 +1,314 @@ +fillType = null; + } + $this->startColor = new Color(Color::COLOR_WHITE, $isSupervisor, $isConditional); + $this->endColor = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->startColor->bindParent($this, 'startColor'); + $this->endColor->bindParent($this, 'endColor'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Fill + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getFill(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['fill' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray( + * [ + * 'fillType' => Fill::FILL_GRADIENT_LINEAR, + * 'rotation' => 0, + * 'startColor' => [ + * 'rgb' => '000000' + * ], + * 'endColor' => [ + * 'argb' => 'FFFFFFFF' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['fillType'])) { + $this->setFillType($pStyles['fillType']); + } + if (isset($pStyles['rotation'])) { + $this->setRotation($pStyles['rotation']); + } + if (isset($pStyles['startColor'])) { + $this->getStartColor()->applyFromArray($pStyles['startColor']); + } + if (isset($pStyles['endColor'])) { + $this->getEndColor()->applyFromArray($pStyles['endColor']); + } + if (isset($pStyles['color'])) { + $this->getStartColor()->applyFromArray($pStyles['color']); + $this->getEndColor()->applyFromArray($pStyles['color']); + } + } + + return $this; + } + + /** + * Get Fill Type. + * + * @return string + */ + public function getFillType() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getFillType(); + } + + return $this->fillType; + } + + /** + * Set Fill Type. + * + * @param string $pValue Fill type, see self::FILL_* + * + * @return $this + */ + public function setFillType($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['fillType' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->fillType = $pValue; + } + + return $this; + } + + /** + * Get Rotation. + * + * @return float + */ + public function getRotation() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getRotation(); + } + + return $this->rotation; + } + + /** + * Set Rotation. + * + * @param float $pValue + * + * @return $this + */ + public function setRotation($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['rotation' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->rotation = $pValue; + } + + return $this; + } + + /** + * Get Start Color. + * + * @return Color + */ + public function getStartColor() + { + return $this->startColor; + } + + /** + * Set Start Color. + * + * @return $this + */ + public function setStartColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getStartColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->startColor = $color; + } + + return $this; + } + + /** + * Get End Color. + * + * @return Color + */ + public function getEndColor() + { + return $this->endColor; + } + + /** + * Set End Color. + * + * @return $this + */ + public function setEndColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getEndColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->endColor = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + // Note that we don't care about colours for fill type NONE, but could have duplicate NONEs with + // different hashes if we don't explicitly prevent this + return md5( + $this->getFillType() . + $this->getRotation() . + ($this->getFillType() !== self::FILL_NONE ? $this->getStartColor()->getHashCode() : '') . + ($this->getFillType() !== self::FILL_NONE ? $this->getEndColor()->getHashCode() : '') . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Font.php new file mode 100755 index 0000000..eee7df0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Font.php @@ -0,0 +1,548 @@ +name = null; + $this->size = null; + $this->bold = null; + $this->italic = null; + $this->superscript = null; + $this->subscript = null; + $this->underline = null; + $this->strikethrough = null; + $this->color = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional); + } else { + $this->color = new Color(Color::COLOR_BLACK, $isSupervisor); + } + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->color->bindParent($this, 'color'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Font + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getFont(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['font' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray( + * [ + * 'name' => 'Arial', + * 'bold' => TRUE, + * 'italic' => FALSE, + * 'underline' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE, + * 'strikethrough' => FALSE, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['name'])) { + $this->setName($pStyles['name']); + } + if (isset($pStyles['bold'])) { + $this->setBold($pStyles['bold']); + } + if (isset($pStyles['italic'])) { + $this->setItalic($pStyles['italic']); + } + if (isset($pStyles['superscript'])) { + $this->setSuperscript($pStyles['superscript']); + } + if (isset($pStyles['subscript'])) { + $this->setSubscript($pStyles['subscript']); + } + if (isset($pStyles['underline'])) { + $this->setUnderline($pStyles['underline']); + } + if (isset($pStyles['strikethrough'])) { + $this->setStrikethrough($pStyles['strikethrough']); + } + if (isset($pStyles['color'])) { + $this->getColor()->applyFromArray($pStyles['color']); + } + if (isset($pStyles['size'])) { + $this->setSize($pStyles['size']); + } + } + + return $this; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getName(); + } + + return $this->name; + } + + /** + * Set Name. + * + * @param string $pValue + * + * @return $this + */ + public function setName($pValue) + { + if ($pValue == '') { + $pValue = 'Calibri'; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['name' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->name = $pValue; + } + + return $this; + } + + /** + * Get Size. + * + * @return float + */ + public function getSize() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSize(); + } + + return $this->size; + } + + /** + * Set Size. + * + * @param float $pValue + * + * @return $this + */ + public function setSize($pValue) + { + if ($pValue == '') { + $pValue = 10; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['size' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->size = $pValue; + } + + return $this; + } + + /** + * Get Bold. + * + * @return bool + */ + public function getBold() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBold(); + } + + return $this->bold; + } + + /** + * Set Bold. + * + * @param bool $pValue + * + * @return $this + */ + public function setBold($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['bold' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->bold = $pValue; + } + + return $this; + } + + /** + * Get Italic. + * + * @return bool + */ + public function getItalic() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getItalic(); + } + + return $this->italic; + } + + /** + * Set Italic. + * + * @param bool $pValue + * + * @return $this + */ + public function setItalic($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['italic' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->italic = $pValue; + } + + return $this; + } + + /** + * Get Superscript. + * + * @return bool + */ + public function getSuperscript() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSuperscript(); + } + + return $this->superscript; + } + + /** + * Set Superscript. + * + * @param bool $pValue + * + * @return $this + */ + public function setSuperscript($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['superscript' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->superscript = $pValue; + $this->subscript = !$pValue; + } + + return $this; + } + + /** + * Get Subscript. + * + * @return bool + */ + public function getSubscript() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSubscript(); + } + + return $this->subscript; + } + + /** + * Set Subscript. + * + * @param bool $pValue + * + * @return $this + */ + public function setSubscript($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['subscript' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->subscript = $pValue; + $this->superscript = !$pValue; + } + + return $this; + } + + /** + * Get Underline. + * + * @return string + */ + public function getUnderline() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getUnderline(); + } + + return $this->underline; + } + + /** + * Set Underline. + * + * @param bool|string $pValue \PhpOffice\PhpSpreadsheet\Style\Font underline type + * If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, + * false equates to UNDERLINE_NONE + * + * @return $this + */ + public function setUnderline($pValue) + { + if (is_bool($pValue)) { + $pValue = ($pValue) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE; + } elseif ($pValue == '') { + $pValue = self::UNDERLINE_NONE; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['underline' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->underline = $pValue; + } + + return $this; + } + + /** + * Get Strikethrough. + * + * @return bool + */ + public function getStrikethrough() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getStrikethrough(); + } + + return $this->strikethrough; + } + + /** + * Set Strikethrough. + * + * @param bool $pValue + * + * @return $this + */ + public function setStrikethrough($pValue) + { + if ($pValue == '') { + $pValue = false; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['strikethrough' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->strikethrough = $pValue; + } + + return $this; + } + + /** + * Get Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Color. + * + * @return $this + */ + public function setColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->color = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->name . + $this->size . + ($this->bold ? 't' : 'f') . + ($this->italic ? 't' : 'f') . + ($this->superscript ? 't' : 'f') . + ($this->subscript ? 't' : 'f') . + $this->underline . + ($this->strikethrough ? 't' : 'f') . + $this->color->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/NumberFormat.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/NumberFormat.php new file mode 100755 index 0000000..259acab --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/NumberFormat.php @@ -0,0 +1,873 @@ +formatCode = null; + $this->builtInFormatCode = false; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return NumberFormat + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getNumberFormat(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['numberFormat' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray( + * [ + * 'formatCode' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['formatCode'])) { + $this->setFormatCode($pStyles['formatCode']); + } + } + + return $this; + } + + /** + * Get Format Code. + * + * @return string + */ + public function getFormatCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getFormatCode(); + } + if ($this->builtInFormatCode !== false) { + return self::builtInFormatCode($this->builtInFormatCode); + } + + return $this->formatCode; + } + + /** + * Set Format Code. + * + * @param string $pValue see self::FORMAT_* + * + * @return $this + */ + public function setFormatCode($pValue) + { + if ($pValue == '') { + $pValue = self::FORMAT_GENERAL; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['formatCode' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->formatCode = $pValue; + $this->builtInFormatCode = self::builtInFormatCodeIndex($pValue); + } + + return $this; + } + + /** + * Get Built-In Format Code. + * + * @return int + */ + public function getBuiltInFormatCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBuiltInFormatCode(); + } + + return $this->builtInFormatCode; + } + + /** + * Set Built-In Format Code. + * + * @param int $pValue + * + * @return $this + */ + public function setBuiltInFormatCode($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['formatCode' => self::builtInFormatCode($pValue)]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->builtInFormatCode = $pValue; + $this->formatCode = self::builtInFormatCode($pValue); + } + + return $this; + } + + /** + * Fill built-in format codes. + */ + private static function fillBuiltInFormatCodes(): void + { + // [MS-OI29500: Microsoft Office Implementation Information for ISO/IEC-29500 Standard Compliance] + // 18.8.30. numFmt (Number Format) + // + // The ECMA standard defines built-in format IDs + // 14: "mm-dd-yy" + // 22: "m/d/yy h:mm" + // 37: "#,##0 ;(#,##0)" + // 38: "#,##0 ;[Red](#,##0)" + // 39: "#,##0.00;(#,##0.00)" + // 40: "#,##0.00;[Red](#,##0.00)" + // 47: "mmss.0" + // KOR fmt 55: "yyyy-mm-dd" + // Excel defines built-in format IDs + // 14: "m/d/yyyy" + // 22: "m/d/yyyy h:mm" + // 37: "#,##0_);(#,##0)" + // 38: "#,##0_);[Red](#,##0)" + // 39: "#,##0.00_);(#,##0.00)" + // 40: "#,##0.00_);[Red](#,##0.00)" + // 47: "mm:ss.0" + // KOR fmt 55: "yyyy/mm/dd" + + // Built-in format codes + if (self::$builtInFormats === null) { + self::$builtInFormats = []; + + // General + self::$builtInFormats[0] = self::FORMAT_GENERAL; + self::$builtInFormats[1] = '0'; + self::$builtInFormats[2] = '0.00'; + self::$builtInFormats[3] = '#,##0'; + self::$builtInFormats[4] = '#,##0.00'; + + self::$builtInFormats[9] = '0%'; + self::$builtInFormats[10] = '0.00%'; + self::$builtInFormats[11] = '0.00E+00'; + self::$builtInFormats[12] = '# ?/?'; + self::$builtInFormats[13] = '# ??/??'; + self::$builtInFormats[14] = 'm/d/yyyy'; // Despite ECMA 'mm-dd-yy'; + self::$builtInFormats[15] = 'd-mmm-yy'; + self::$builtInFormats[16] = 'd-mmm'; + self::$builtInFormats[17] = 'mmm-yy'; + self::$builtInFormats[18] = 'h:mm AM/PM'; + self::$builtInFormats[19] = 'h:mm:ss AM/PM'; + self::$builtInFormats[20] = 'h:mm'; + self::$builtInFormats[21] = 'h:mm:ss'; + self::$builtInFormats[22] = 'm/d/yyyy h:mm'; // Despite ECMA 'm/d/yy h:mm'; + + self::$builtInFormats[37] = '#,##0_);(#,##0)'; // Despite ECMA '#,##0 ;(#,##0)'; + self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; // Despite ECMA '#,##0 ;[Red](#,##0)'; + self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; // Despite ECMA '#,##0.00;(#,##0.00)'; + self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; // Despite ECMA '#,##0.00;[Red](#,##0.00)'; + + self::$builtInFormats[44] = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'; + self::$builtInFormats[45] = 'mm:ss'; + self::$builtInFormats[46] = '[h]:mm:ss'; + self::$builtInFormats[47] = 'mm:ss.0'; // Despite ECMA 'mmss.0'; + self::$builtInFormats[48] = '##0.0E+0'; + self::$builtInFormats[49] = '@'; + + // CHT + self::$builtInFormats[27] = '[$-404]e/m/d'; + self::$builtInFormats[30] = 'm/d/yy'; + self::$builtInFormats[36] = '[$-404]e/m/d'; + self::$builtInFormats[50] = '[$-404]e/m/d'; + self::$builtInFormats[57] = '[$-404]e/m/d'; + + // THA + self::$builtInFormats[59] = 't0'; + self::$builtInFormats[60] = 't0.00'; + self::$builtInFormats[61] = 't#,##0'; + self::$builtInFormats[62] = 't#,##0.00'; + self::$builtInFormats[67] = 't0%'; + self::$builtInFormats[68] = 't0.00%'; + self::$builtInFormats[69] = 't# ?/?'; + self::$builtInFormats[70] = 't# ??/??'; + + // JPN + self::$builtInFormats[28] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[29] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[31] = 'yyyy"年"m"月"d"日"'; + self::$builtInFormats[32] = 'h"時"mm"分"'; + self::$builtInFormats[33] = 'h"時"mm"分"ss"秒"'; + self::$builtInFormats[34] = 'yyyy"年"m"月"'; + self::$builtInFormats[35] = 'm"月"d"日"'; + self::$builtInFormats[51] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[52] = 'yyyy"年"m"月"'; + self::$builtInFormats[53] = 'm"月"d"日"'; + self::$builtInFormats[54] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[55] = 'yyyy"年"m"月"'; + self::$builtInFormats[56] = 'm"月"d"日"'; + self::$builtInFormats[58] = '[$-411]ggge"年"m"月"d"日"'; + + // Flip array (for faster lookups) + self::$flippedBuiltInFormats = array_flip(self::$builtInFormats); + } + } + + /** + * Get built-in format code. + * + * @param int $pIndex + * + * @return string + */ + public static function builtInFormatCode($pIndex) + { + // Clean parameter + $pIndex = (int) $pIndex; + + // Ensure built-in format codes are available + self::fillBuiltInFormatCodes(); + + // Lookup format code + if (isset(self::$builtInFormats[$pIndex])) { + return self::$builtInFormats[$pIndex]; + } + + return ''; + } + + /** + * Get built-in format code index. + * + * @param string $formatCode + * + * @return bool|int + */ + public static function builtInFormatCodeIndex($formatCode) + { + // Ensure built-in format codes are available + self::fillBuiltInFormatCodes(); + + // Lookup format code + if (array_key_exists($formatCode, self::$flippedBuiltInFormats)) { + return self::$flippedBuiltInFormats[$formatCode]; + } + + return false; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->formatCode . + $this->builtInFormatCode . + __CLASS__ + ); + } + + /** + * Search/replace values to convert Excel date/time format masks to PHP format masks. + * + * @var array + */ + private static $dateFormatReplacements = [ + // first remove escapes related to non-format characters + '\\' => '', + // 12-hour suffix + 'am/pm' => 'A', + // 4-digit year + 'e' => 'Y', + 'yyyy' => 'Y', + // 2-digit year + 'yy' => 'y', + // first letter of month - no php equivalent + 'mmmmm' => 'M', + // full month name + 'mmmm' => 'F', + // short month name + 'mmm' => 'M', + // mm is minutes if time, but can also be month w/leading zero + // so we try to identify times be the inclusion of a : separator in the mask + // It isn't perfect, but the best way I know how + ':mm' => ':i', + 'mm:' => 'i:', + // month leading zero + 'mm' => 'm', + // month no leading zero + 'm' => 'n', + // full day of week name + 'dddd' => 'l', + // short day of week name + 'ddd' => 'D', + // days leading zero + 'dd' => 'd', + // days no leading zero + 'd' => 'j', + // seconds + 'ss' => 's', + // fractional seconds - no php equivalent + '.s' => '', + ]; + + /** + * Search/replace values to convert Excel date/time format masks hours to PHP format masks (24 hr clock). + * + * @var array + */ + private static $dateFormatReplacements24 = [ + 'hh' => 'H', + 'h' => 'G', + ]; + + /** + * Search/replace values to convert Excel date/time format masks hours to PHP format masks (12 hr clock). + * + * @var array + */ + private static $dateFormatReplacements12 = [ + 'hh' => 'h', + 'h' => 'g', + ]; + + private static function setLowercaseCallback($matches) + { + return mb_strtolower($matches[0]); + } + + private static function escapeQuotesCallback($matches) + { + return '\\' . implode('\\', str_split($matches[1])); + } + + private static function formatAsDate(&$value, &$format): void + { + // strip off first part containing e.g. [$-F800] or [$USD-409] + // general syntax: [$-] + // language info is in hexadecimal + // strip off chinese part like [DBNum1][$-804] + $format = preg_replace('/^(\[[0-9A-Za-z]*\])*(\[\$[A-Z]*-[0-9A-F]*\])/i', '', $format); + + // OpenOffice.org uses upper-case number formats, e.g. 'YYYY', convert to lower-case; + // but we don't want to change any quoted strings + $format = preg_replace_callback('/(?:^|")([^"]*)(?:$|")/', ['self', 'setLowercaseCallback'], $format); + + // Only process the non-quoted blocks for date format characters + $blocks = explode('"', $format); + foreach ($blocks as $key => &$block) { + if ($key % 2 == 0) { + $block = strtr($block, self::$dateFormatReplacements); + if (!strpos($block, 'A')) { + // 24-hour time format + // when [h]:mm format, the [h] should replace to the hours of the value * 24 + if (false !== strpos($block, '[h]')) { + $hours = (int) ($value * 24); + $block = str_replace('[h]', $hours, $block); + + continue; + } + $block = strtr($block, self::$dateFormatReplacements24); + } else { + // 12-hour time format + $block = strtr($block, self::$dateFormatReplacements12); + } + } + } + $format = implode('"', $blocks); + + // escape any quoted characters so that DateTime format() will render them correctly + $format = preg_replace_callback('/"(.*)"/U', ['self', 'escapeQuotesCallback'], $format); + + $dateObj = Date::excelToDateTimeObject($value); + $value = $dateObj->format($format); + } + + private static function formatAsPercentage(&$value, &$format): void + { + if ($format === self::FORMAT_PERCENTAGE) { + $value = round((100 * $value), 0) . '%'; + } else { + if (preg_match('/\.[#0]+/', $format, $m)) { + $s = substr($m[0], 0, 1) . (strlen($m[0]) - 1); + $format = str_replace($m[0], $s, $format); + } + if (preg_match('/^[#0]+/', $format, $m)) { + $format = str_replace($m[0], strlen($m[0]), $format); + } + $format = '%' . str_replace('%', 'f%%', $format); + + $value = sprintf($format, 100 * $value); + } + } + + private static function formatAsFraction(&$value, &$format): void + { + $sign = ($value < 0) ? '-' : ''; + + $integerPart = floor(abs($value)); + $decimalPart = trim(fmod(abs($value), 1), '0.'); + $decimalLength = strlen($decimalPart); + $decimalDivisor = 10 ** $decimalLength; + + $GCD = MathTrig::GCD($decimalPart, $decimalDivisor); + + $adjustedDecimalPart = $decimalPart / $GCD; + $adjustedDecimalDivisor = $decimalDivisor / $GCD; + + if ((strpos($format, '0') !== false)) { + $value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor"; + } elseif ((strpos($format, '#') !== false)) { + if ($integerPart == 0) { + $value = "$sign$adjustedDecimalPart/$adjustedDecimalDivisor"; + } else { + $value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor"; + } + } elseif ((substr($format, 0, 3) == '? ?')) { + if ($integerPart == 0) { + $integerPart = ''; + } + $value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor"; + } else { + $adjustedDecimalPart += $integerPart * $adjustedDecimalDivisor; + $value = "$sign$adjustedDecimalPart/$adjustedDecimalDivisor"; + } + } + + private static function mergeComplexNumberFormatMasks($numbers, $masks) + { + $decimalCount = strlen($numbers[1]); + $postDecimalMasks = []; + + do { + $tempMask = array_pop($masks); + $postDecimalMasks[] = $tempMask; + $decimalCount -= strlen($tempMask); + } while ($decimalCount > 0); + + return [ + implode('.', $masks), + implode('.', array_reverse($postDecimalMasks)), + ]; + } + + private static function processComplexNumberFormatMask($number, $mask) + { + $result = $number; + $maskingBlockCount = preg_match_all('/0+/', $mask, $maskingBlocks, PREG_OFFSET_CAPTURE); + + if ($maskingBlockCount > 1) { + $maskingBlocks = array_reverse($maskingBlocks[0]); + + foreach ($maskingBlocks as $block) { + $divisor = 1 . $block[0]; + $size = strlen($block[0]); + $offset = $block[1]; + + $blockValue = sprintf( + '%0' . $size . 'd', + fmod($number, $divisor) + ); + $number = floor($number / $divisor); + $mask = substr_replace($mask, $blockValue, $offset, $size); + } + if ($number > 0) { + $mask = substr_replace($mask, $number, $offset, 0); + } + $result = $mask; + } + + return $result; + } + + private static function complexNumberFormatMask($number, $mask, $splitOnPoint = true) + { + $sign = ($number < 0.0); + $number = abs($number); + + if ($splitOnPoint && strpos($mask, '.') !== false && strpos($number, '.') !== false) { + $numbers = explode('.', $number); + $masks = explode('.', $mask); + if (count($masks) > 2) { + $masks = self::mergeComplexNumberFormatMasks($numbers, $masks); + } + $result1 = self::complexNumberFormatMask($numbers[0], $masks[0], false); + $result2 = strrev(self::complexNumberFormatMask(strrev($numbers[1]), strrev($masks[1]), false)); + + return (($sign) ? '-' : '') . $result1 . '.' . $result2; + } + + $result = self::processComplexNumberFormatMask($number, $mask); + + return (($sign) ? '-' : '') . $result; + } + + private static function formatStraightNumericValue($value, $format, array $matches, $useThousands, $number_regex) + { + $left = $matches[1]; + $dec = $matches[2]; + $right = $matches[3]; + + // minimun width of formatted number (including dot) + $minWidth = strlen($left) + strlen($dec) + strlen($right); + if ($useThousands) { + $value = number_format( + $value, + strlen($right), + StringHelper::getDecimalSeparator(), + StringHelper::getThousandsSeparator() + ); + $value = preg_replace($number_regex, $value, $format); + } else { + if (preg_match('/[0#]E[+-]0/i', $format)) { + // Scientific format + $value = sprintf('%5.2E', $value); + } elseif (preg_match('/0([^\d\.]+)0/', $format) || substr_count($format, '.') > 1) { + if ($value == (int) $value && substr_count($format, '.') === 1) { + $value *= 10 ** strlen(explode('.', $format)[1]); + } + $value = self::complexNumberFormatMask($value, $format); + } else { + $sprintf_pattern = "%0$minWidth." . strlen($right) . 'f'; + $value = sprintf($sprintf_pattern, $value); + $value = preg_replace($number_regex, $value, $format); + } + } + + return $value; + } + + private static function formatAsNumber($value, $format) + { + // The "_" in this string has already been stripped out, + // so this test is never true. Furthermore, testing + // on Excel shows this format uses Euro symbol, not "EUR". + //if ($format === self::FORMAT_CURRENCY_EUR_SIMPLE) { + // return 'EUR ' . sprintf('%1.2f', $value); + //} + + // Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols + $format = str_replace(['"', '*'], '', $format); + + // Find out if we need thousands separator + // This is indicated by a comma enclosed by a digit placeholder: + // #,# or 0,0 + $useThousands = preg_match('/(#,#|0,0)/', $format); + if ($useThousands) { + $format = preg_replace('/0,0/', '00', $format); + $format = preg_replace('/#,#/', '##', $format); + } + + // Scale thousands, millions,... + // This is indicated by a number of commas after a digit placeholder: + // #, or 0.0,, + $scale = 1; // same as no scale + $matches = []; + if (preg_match('/(#|0)(,+)/', $format, $matches)) { + $scale = 1000 ** strlen($matches[2]); + + // strip the commas + $format = preg_replace('/0,+/', '0', $format); + $format = preg_replace('/#,+/', '#', $format); + } + + if (preg_match('/#?.*\?\/\?/', $format, $m)) { + if ($value != (int) $value) { + self::formatAsFraction($value, $format); + } + } else { + // Handle the number itself + + // scale number + $value = $value / $scale; + // Strip # + $format = preg_replace('/\\#/', '0', $format); + // Remove locale code [$-###] + $format = preg_replace('/\[\$\-.*\]/', '', $format); + + $n = '/\\[[^\\]]+\\]/'; + $m = preg_replace($n, '', $format); + $number_regex = '/(0+)(\\.?)(0*)/'; + if (preg_match($number_regex, $m, $matches)) { + $value = self::formatStraightNumericValue($value, $format, $matches, $useThousands, $number_regex); + } + } + + if (preg_match('/\[\$(.*)\]/u', $format, $m)) { + // Currency or Accounting + $currencyCode = $m[1]; + [$currencyCode] = explode('-', $currencyCode); + if ($currencyCode == '') { + $currencyCode = StringHelper::getCurrencyCode(); + } + $value = preg_replace('/\[\$([^\]]*)\]/u', $currencyCode, $value); + } + + return $value; + } + + private static function splitFormatCompare($value, $cond, $val, $dfcond, $dfval) + { + if (!$cond) { + $cond = $dfcond; + $val = $dfval; + } + switch ($cond) { + case '>': + return $value > $val; + + case '<': + return $value < $val; + + case '<=': + return $value <= $val; + + case '<>': + return $value != $val; + + case '=': + return $value == $val; + } + + return $value >= $val; + } + + private static function splitFormat($sections, $value) + { + // Extract the relevant section depending on whether number is positive, negative, or zero? + // Text not supported yet. + // Here is how the sections apply to various values in Excel: + // 1 section: [POSITIVE/NEGATIVE/ZERO/TEXT] + // 2 sections: [POSITIVE/ZERO/TEXT] [NEGATIVE] + // 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO] + // 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT] + $cnt = count($sections); + $color_regex = '/\\[(' . implode('|', Color::NAMED_COLORS) . ')\\]/'; + $cond_regex = '/\\[(>|>=|<|<=|=|<>)([+-]?\\d+([.]\\d+)?)\\]/'; + $colors = ['', '', '', '', '']; + $condops = ['', '', '', '', '']; + $condvals = [0, 0, 0, 0, 0]; + for ($idx = 0; $idx < $cnt; ++$idx) { + if (preg_match($color_regex, $sections[$idx], $matches)) { + $colors[$idx] = $matches[0]; + $sections[$idx] = preg_replace($color_regex, '', $sections[$idx]); + } + if (preg_match($cond_regex, $sections[$idx], $matches)) { + $condops[$idx] = $matches[1]; + $condvals[$idx] = $matches[2]; + $sections[$idx] = preg_replace($cond_regex, '', $sections[$idx]); + } + } + $color = $colors[0]; + $format = $sections[0]; + $absval = $value; + switch ($cnt) { + case 2: + $absval = abs($value); + if (!self::splitFormatCompare($value, $condops[0], $condvals[0], '>=', 0)) { + $color = $colors[1]; + $format = $sections[1]; + } + + break; + case 3: + case 4: + $absval = abs($value); + if (!self::splitFormatCompare($value, $condops[0], $condvals[0], '>', 0)) { + if (self::splitFormatCompare($value, $condops[1], $condvals[1], '<', 0)) { + $color = $colors[1]; + $format = $sections[1]; + } else { + $color = $colors[2]; + $format = $sections[2]; + } + } + + break; + } + + return [$color, $format, $absval]; + } + + /** + * Convert a value in a pre-defined format to a PHP string. + * + * @param mixed $value Value to format + * @param string $format Format code, see = self::FORMAT_* + * @param array $callBack Callback function for additional formatting of string + * + * @return string Formatted string + */ + public static function toFormattedString($value, $format, $callBack = null) + { + // For now we do not treat strings although section 4 of a format code affects strings + if (!is_numeric($value)) { + return $value; + } + + // For 'General' format code, we just pass the value although this is not entirely the way Excel does it, + // it seems to round numbers to a total of 10 digits. + if (($format === self::FORMAT_GENERAL) || ($format === self::FORMAT_TEXT)) { + return $value; + } + + // Convert any other escaped characters to quoted strings, e.g. (\T to "T") + $format = preg_replace('/(\\\(((.)(?!((AM\/PM)|(A\/P))))|([^ ])))(?=(?:[^"]|"[^"]*")*$)/u', '"${2}"', $format); + + // Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal) + $sections = preg_split('/(;)(?=(?:[^"]|"[^"]*")*$)/u', $format); + + [$colors, $format, $value] = self::splitFormat($sections, $value); + + // In Excel formats, "_" is used to add spacing, + // The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space + $format = preg_replace('/_./', ' ', $format); + + // Let's begin inspecting the format and converting the value to a formatted string + + // Check for date/time characters (not inside quotes) + if (preg_match('/(\[\$[A-Z]*-[0-9A-F]*\])*[hmsdy](?=(?:[^"]|"[^"]*")*$)/miu', $format, $matches)) { + // datetime format + self::formatAsDate($value, $format); + } else { + if (substr($format, 0, 1) === '"' && substr($format, -1, 1) === '"') { + $value = substr($format, 1, -1); + } elseif (preg_match('/%$/', $format)) { + // % number format + self::formatAsPercentage($value, $format); + } else { + $value = self::formatAsNumber($value, $format); + } + } + + // Additional formatting provided by callback function + if ($callBack !== null) { + [$writerInstance, $function] = $callBack; + $value = $writerInstance->$function($value, $colors); + } + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Protection.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Protection.php new file mode 100755 index 0000000..f695837 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Protection.php @@ -0,0 +1,186 @@ +locked = self::PROTECTION_INHERIT; + $this->hidden = self::PROTECTION_INHERIT; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Protection + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getProtection(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['protection' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getLocked()->applyFromArray( + * [ + * 'locked' => TRUE, + * 'hidden' => FALSE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @return $this + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['locked'])) { + $this->setLocked($pStyles['locked']); + } + if (isset($pStyles['hidden'])) { + $this->setHidden($pStyles['hidden']); + } + } + + return $this; + } + + /** + * Get locked. + * + * @return string + */ + public function getLocked() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getLocked(); + } + + return $this->locked; + } + + /** + * Set locked. + * + * @param string $pValue see self::PROTECTION_* + * + * @return $this + */ + public function setLocked($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['locked' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->locked = $pValue; + } + + return $this; + } + + /** + * Get hidden. + * + * @return string + */ + public function getHidden() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHidden(); + } + + return $this->hidden; + } + + /** + * Set hidden. + * + * @param string $pValue see self::PROTECTION_* + * + * @return $this + */ + public function setHidden($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['hidden' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->hidden = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->locked . + $this->hidden . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Style.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Style.php new file mode 100755 index 0000000..533a7c3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Style.php @@ -0,0 +1,639 @@ +conditionalStyles = []; + $this->font = new Font($isSupervisor, $isConditional); + $this->fill = new Fill($isSupervisor, $isConditional); + $this->borders = new Borders($isSupervisor, $isConditional); + $this->alignment = new Alignment($isSupervisor, $isConditional); + $this->numberFormat = new NumberFormat($isSupervisor, $isConditional); + $this->protection = new Protection($isSupervisor, $isConditional); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->font->bindParent($this); + $this->fill->bindParent($this); + $this->borders->bindParent($this); + $this->alignment->bindParent($this); + $this->numberFormat->bindParent($this); + $this->protection->bindParent($this); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Style + */ + public function getSharedComponent() + { + $activeSheet = $this->getActiveSheet(); + $selectedCell = $this->getActiveCell(); // e.g. 'A1' + + if ($activeSheet->cellExists($selectedCell)) { + $xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex(); + } else { + $xfIndex = 0; + } + + return $this->parent->getCellXfByIndex($xfIndex); + } + + /** + * Get parent. Only used for style supervisor. + * + * @return Spreadsheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['quotePrefix' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->applyFromArray( + * [ + * 'font' => [ + * 'name' => 'Arial', + * 'bold' => true, + * 'italic' => false, + * 'underline' => Font::UNDERLINE_DOUBLE, + * 'strikethrough' => false, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'borders' => [ + * 'bottom' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'top' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ], + * 'alignment' => [ + * 'horizontal' => Alignment::HORIZONTAL_CENTER, + * 'vertical' => Alignment::VERTICAL_CENTER, + * 'wrapText' => true, + * ], + * 'quotePrefix' => true + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * @param bool $pAdvanced advanced mode for setting borders + * + * @return $this + */ + public function applyFromArray(array $pStyles, $pAdvanced = true) + { + if ($this->isSupervisor) { + $pRange = $this->getSelectedCells(); + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Is it a cell range or a single cell? + if (strpos($pRange, ':') === false) { + $rangeA = $pRange; + $rangeB = $pRange; + } else { + [$rangeA, $rangeB] = explode(':', $pRange); + } + + // Calculate range outer borders + $rangeStart = Coordinate::coordinateFromString($rangeA); + $rangeEnd = Coordinate::coordinateFromString($rangeB); + + // Translate column into index + $rangeStart[0] = Coordinate::columnIndexFromString($rangeStart[0]); + $rangeEnd[0] = Coordinate::columnIndexFromString($rangeEnd[0]); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // ADVANCED MODE: + if ($pAdvanced && isset($pStyles['borders'])) { + // 'allBorders' is a shorthand property for 'outline' and 'inside' and + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['allBorders'])) { + foreach (['outline', 'inside'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['allBorders']; + } + } + unset($pStyles['borders']['allBorders']); // not needed any more + } + // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left' + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['outline'])) { + foreach (['top', 'right', 'bottom', 'left'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['outline']; + } + } + unset($pStyles['borders']['outline']); // not needed any more + } + // 'inside' is a shorthand property for 'vertical' and 'horizontal' + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['inside'])) { + foreach (['vertical', 'horizontal'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['inside']; + } + } + unset($pStyles['borders']['inside']); // not needed any more + } + // width and height characteristics of selection, 1, 2, or 3 (for 3 or more) + $xMax = min($rangeEnd[0] - $rangeStart[0] + 1, 3); + $yMax = min($rangeEnd[1] - $rangeStart[1] + 1, 3); + + // loop through up to 3 x 3 = 9 regions + for ($x = 1; $x <= $xMax; ++$x) { + // start column index for region + $colStart = ($x == 3) ? + Coordinate::stringFromColumnIndex($rangeEnd[0]) + : Coordinate::stringFromColumnIndex($rangeStart[0] + $x - 1); + // end column index for region + $colEnd = ($x == 1) ? + Coordinate::stringFromColumnIndex($rangeStart[0]) + : Coordinate::stringFromColumnIndex($rangeEnd[0] - $xMax + $x); + + for ($y = 1; $y <= $yMax; ++$y) { + // which edges are touching the region + $edges = []; + if ($x == 1) { + // are we at left edge + $edges[] = 'left'; + } + if ($x == $xMax) { + // are we at right edge + $edges[] = 'right'; + } + if ($y == 1) { + // are we at top edge? + $edges[] = 'top'; + } + if ($y == $yMax) { + // are we at bottom edge? + $edges[] = 'bottom'; + } + + // start row index for region + $rowStart = ($y == 3) ? + $rangeEnd[1] : $rangeStart[1] + $y - 1; + + // end row index for region + $rowEnd = ($y == 1) ? + $rangeStart[1] : $rangeEnd[1] - $yMax + $y; + + // build range for region + $range = $colStart . $rowStart . ':' . $colEnd . $rowEnd; + + // retrieve relevant style array for region + $regionStyles = $pStyles; + unset($regionStyles['borders']['inside']); + + // what are the inner edges of the region when looking at the selection + $innerEdges = array_diff(['top', 'right', 'bottom', 'left'], $edges); + + // inner edges that are not touching the region should take the 'inside' border properties if they have been set + foreach ($innerEdges as $innerEdge) { + switch ($innerEdge) { + case 'top': + case 'bottom': + // should pick up 'horizontal' border property if set + if (isset($pStyles['borders']['horizontal'])) { + $regionStyles['borders'][$innerEdge] = $pStyles['borders']['horizontal']; + } else { + unset($regionStyles['borders'][$innerEdge]); + } + + break; + case 'left': + case 'right': + // should pick up 'vertical' border property if set + if (isset($pStyles['borders']['vertical'])) { + $regionStyles['borders'][$innerEdge] = $pStyles['borders']['vertical']; + } else { + unset($regionStyles['borders'][$innerEdge]); + } + + break; + } + } + + // apply region style to region by calling applyFromArray() in simple mode + $this->getActiveSheet()->getStyle($range)->applyFromArray($regionStyles, false); + } + } + + // restore initial cell selection range + $this->getActiveSheet()->getStyle($pRange); + + return $this; + } + + // SIMPLE MODE: + // Selection type, inspect + if (preg_match('/^[A-Z]+1:[A-Z]+1048576$/', $pRange)) { + $selectionType = 'COLUMN'; + } elseif (preg_match('/^A\d+:XFD\d+$/', $pRange)) { + $selectionType = 'ROW'; + } else { + $selectionType = 'CELL'; + } + + // First loop through columns, rows, or cells to find out which styles are affected by this operation + switch ($selectionType) { + case 'COLUMN': + $oldXfIndexes = []; + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + $oldXfIndexes[$this->getActiveSheet()->getColumnDimensionByColumn($col)->getXfIndex()] = true; + } + + break; + case 'ROW': + $oldXfIndexes = []; + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + if ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() == null) { + $oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style + } else { + $oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true; + } + } + + break; + case 'CELL': + $oldXfIndexes = []; + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true; + } + } + + break; + } + + // clone each of the affected styles, apply the style array, and add the new styles to the workbook + $workbook = $this->getActiveSheet()->getParent(); + foreach ($oldXfIndexes as $oldXfIndex => $dummy) { + $style = $workbook->getCellXfByIndex($oldXfIndex); + $newStyle = clone $style; + $newStyle->applyFromArray($pStyles); + + if ($existingStyle = $workbook->getCellXfByHashCode($newStyle->getHashCode())) { + // there is already such cell Xf in our collection + $newXfIndexes[$oldXfIndex] = $existingStyle->getIndex(); + } else { + // we don't have such a cell Xf, need to add + $workbook->addCellXf($newStyle); + $newXfIndexes[$oldXfIndex] = $newStyle->getIndex(); + } + } + + // Loop through columns, rows, or cells again and update the XF index + switch ($selectionType) { + case 'COLUMN': + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + $columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col); + $oldXfIndex = $columnDimension->getXfIndex(); + $columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]); + } + + break; + case 'ROW': + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $rowDimension = $this->getActiveSheet()->getRowDimension($row); + $oldXfIndex = $rowDimension->getXfIndex() === null ? + 0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style + $rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]); + } + + break; + case 'CELL': + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row); + $oldXfIndex = $cell->getXfIndex(); + $cell->setXfIndex($newXfIndexes[$oldXfIndex]); + } + } + + break; + } + } else { + // not a supervisor, just apply the style array directly on style object + if (isset($pStyles['fill'])) { + $this->getFill()->applyFromArray($pStyles['fill']); + } + if (isset($pStyles['font'])) { + $this->getFont()->applyFromArray($pStyles['font']); + } + if (isset($pStyles['borders'])) { + $this->getBorders()->applyFromArray($pStyles['borders']); + } + if (isset($pStyles['alignment'])) { + $this->getAlignment()->applyFromArray($pStyles['alignment']); + } + if (isset($pStyles['numberFormat'])) { + $this->getNumberFormat()->applyFromArray($pStyles['numberFormat']); + } + if (isset($pStyles['protection'])) { + $this->getProtection()->applyFromArray($pStyles['protection']); + } + if (isset($pStyles['quotePrefix'])) { + $this->quotePrefix = $pStyles['quotePrefix']; + } + } + + return $this; + } + + /** + * Get Fill. + * + * @return Fill + */ + public function getFill() + { + return $this->fill; + } + + /** + * Get Font. + * + * @return Font + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. + * + * @return $this + */ + public function setFont(Font $font) + { + $this->font = $font; + + return $this; + } + + /** + * Get Borders. + * + * @return Borders + */ + public function getBorders() + { + return $this->borders; + } + + /** + * Get Alignment. + * + * @return Alignment + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Get Number Format. + * + * @return NumberFormat + */ + public function getNumberFormat() + { + return $this->numberFormat; + } + + /** + * Get Conditional Styles. Only used on supervisor. + * + * @return Conditional[] + */ + public function getConditionalStyles() + { + return $this->getActiveSheet()->getConditionalStyles($this->getActiveCell()); + } + + /** + * Set Conditional Styles. Only used on supervisor. + * + * @param Conditional[] $pValue Array of conditional styles + * + * @return $this + */ + public function setConditionalStyles(array $pValue) + { + $this->getActiveSheet()->setConditionalStyles($this->getSelectedCells(), $pValue); + + return $this; + } + + /** + * Get Protection. + * + * @return Protection + */ + public function getProtection() + { + return $this->protection; + } + + /** + * Get quote prefix. + * + * @return bool + */ + public function getQuotePrefix() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getQuotePrefix(); + } + + return $this->quotePrefix; + } + + /** + * Set quote prefix. + * + * @param bool $pValue + * + * @return $this + */ + public function setQuotePrefix($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = ['quotePrefix' => $pValue]; + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->quotePrefix = (bool) $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + $hashConditionals = ''; + foreach ($this->conditionalStyles as $conditional) { + $hashConditionals .= $conditional->getHashCode(); + } + + return md5( + $this->fill->getHashCode() . + $this->font->getHashCode() . + $this->borders->getHashCode() . + $this->alignment->getHashCode() . + $this->numberFormat->getHashCode() . + $hashConditionals . + $this->protection->getHashCode() . + ($this->quotePrefix ? 't' : 'f') . + __CLASS__ + ); + } + + /** + * Get own index in style collection. + * + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Set own index in style collection. + * + * @param int $pValue + */ + public function setIndex($pValue): void + { + $this->index = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Supervisor.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Supervisor.php new file mode 100755 index 0000000..1a70097 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Style/Supervisor.php @@ -0,0 +1,117 @@ +isSupervisor = $isSupervisor; + } + + /** + * Bind parent. Only used for supervisor. + * + * @param Spreadsheet|Style $parent + * @param null|string $parentPropertyName + * + * @return $this + */ + public function bindParent($parent, $parentPropertyName = null) + { + $this->parent = $parent; + $this->parentPropertyName = $parentPropertyName; + + return $this; + } + + /** + * Is this a supervisor or a cell style component? + * + * @return bool + */ + public function getIsSupervisor() + { + return $this->isSupervisor; + } + + /** + * Get the currently active sheet. Only used for supervisor. + * + * @return Worksheet + */ + public function getActiveSheet() + { + return $this->parent->getActiveSheet(); + } + + /** + * Get the currently active cell coordinate in currently active sheet. + * Only used for supervisor. + * + * @return string E.g. 'A1' + */ + public function getSelectedCells() + { + return $this->getActiveSheet()->getSelectedCells(); + } + + /** + * Get the currently active cell coordinate in currently active sheet. + * Only used for supervisor. + * + * @return string E.g. 'A1' + */ + public function getActiveCell() + { + return $this->getActiveSheet()->getActiveCell(); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != 'parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter.php new file mode 100755 index 0000000..c085b59 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter.php @@ -0,0 +1,857 @@ +range = $pRange; + $this->workSheet = $pSheet; + } + + /** + * Get AutoFilter Parent Worksheet. + * + * @return Worksheet + */ + public function getParent() + { + return $this->workSheet; + } + + /** + * Set AutoFilter Parent Worksheet. + * + * @param Worksheet $pSheet + * + * @return $this + */ + public function setParent(?Worksheet $pSheet = null) + { + $this->workSheet = $pSheet; + + return $this; + } + + /** + * Get AutoFilter Range. + * + * @return string + */ + public function getRange() + { + return $this->range; + } + + /** + * Set AutoFilter Range. + * + * @param string $pRange Cell range (i.e. A1:E10) + * + * @return $this + */ + public function setRange($pRange) + { + // extract coordinate + [$worksheet, $pRange] = Worksheet::extractSheetTitle($pRange, true); + + if (strpos($pRange, ':') !== false) { + $this->range = $pRange; + } elseif (empty($pRange)) { + $this->range = ''; + } else { + throw new PhpSpreadsheetException('Autofilter must be set on a range of cells.'); + } + + if (empty($pRange)) { + // Discard all column rules + $this->columns = []; + } else { + // Discard any column rules that are no longer valid within this range + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range); + foreach ($this->columns as $key => $value) { + $colIndex = Coordinate::columnIndexFromString($key); + if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) { + unset($this->columns[$key]); + } + } + } + + return $this; + } + + /** + * Get all AutoFilter Columns. + * + * @return AutoFilter\Column[] + */ + public function getColumns() + { + return $this->columns; + } + + /** + * Validate that the specified column is in the AutoFilter range. + * + * @param string $column Column name (e.g. A) + * + * @return int The column offset within the autofilter range + */ + public function testColumnInRange($column) + { + if (empty($this->range)) { + throw new PhpSpreadsheetException('No autofilter range is defined.'); + } + + $columnIndex = Coordinate::columnIndexFromString($column); + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range); + if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) { + throw new PhpSpreadsheetException('Column is outside of current autofilter range.'); + } + + return $columnIndex - $rangeStart[0]; + } + + /** + * Get a specified AutoFilter Column Offset within the defined AutoFilter range. + * + * @param string $pColumn Column name (e.g. A) + * + * @return int The offset of the specified column within the autofilter range + */ + public function getColumnOffset($pColumn) + { + return $this->testColumnInRange($pColumn); + } + + /** + * Get a specified AutoFilter Column. + * + * @param string $pColumn Column name (e.g. A) + * + * @return AutoFilter\Column + */ + public function getColumn($pColumn) + { + $this->testColumnInRange($pColumn); + + if (!isset($this->columns[$pColumn])) { + $this->columns[$pColumn] = new AutoFilter\Column($pColumn, $this); + } + + return $this->columns[$pColumn]; + } + + /** + * Get a specified AutoFilter Column by it's offset. + * + * @param int $pColumnOffset Column offset within range (starting from 0) + * + * @return AutoFilter\Column + */ + public function getColumnByOffset($pColumnOffset) + { + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range); + $pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $pColumnOffset); + + return $this->getColumn($pColumn); + } + + /** + * Set AutoFilter. + * + * @param AutoFilter\Column|string $pColumn + * A simple string containing a Column ID like 'A' is permitted + * + * @return $this + */ + public function setColumn($pColumn) + { + if ((is_string($pColumn)) && (!empty($pColumn))) { + $column = $pColumn; + } elseif (is_object($pColumn) && ($pColumn instanceof AutoFilter\Column)) { + $column = $pColumn->getColumnIndex(); + } else { + throw new PhpSpreadsheetException('Column is not within the autofilter range.'); + } + $this->testColumnInRange($column); + + if (is_string($pColumn)) { + $this->columns[$pColumn] = new AutoFilter\Column($pColumn, $this); + } elseif (is_object($pColumn) && ($pColumn instanceof AutoFilter\Column)) { + $pColumn->setParent($this); + $this->columns[$column] = $pColumn; + } + ksort($this->columns); + + return $this; + } + + /** + * Clear a specified AutoFilter Column. + * + * @param string $pColumn Column name (e.g. A) + * + * @return $this + */ + public function clearColumn($pColumn) + { + $this->testColumnInRange($pColumn); + + if (isset($this->columns[$pColumn])) { + unset($this->columns[$pColumn]); + } + + return $this; + } + + /** + * Shift an AutoFilter Column Rule to a different column. + * + * Note: This method bypasses validation of the destination column to ensure it is within this AutoFilter range. + * Nor does it verify whether any column rule already exists at $toColumn, but will simply override any existing value. + * Use with caution. + * + * @param string $fromColumn Column name (e.g. A) + * @param string $toColumn Column name (e.g. B) + * + * @return $this + */ + public function shiftColumn($fromColumn, $toColumn) + { + $fromColumn = strtoupper($fromColumn); + $toColumn = strtoupper($toColumn); + + if (($fromColumn !== null) && (isset($this->columns[$fromColumn])) && ($toColumn !== null)) { + $this->columns[$fromColumn]->setParent(); + $this->columns[$fromColumn]->setColumnIndex($toColumn); + $this->columns[$toColumn] = $this->columns[$fromColumn]; + $this->columns[$toColumn]->setParent($this); + unset($this->columns[$fromColumn]); + + ksort($this->columns); + } + + return $this; + } + + /** + * Test if cell value is in the defined set of values. + * + * @param mixed $cellValue + * @param mixed[] $dataSet + * + * @return bool + */ + private static function filterTestInSimpleDataSet($cellValue, $dataSet) + { + $dataSetValues = $dataSet['filterValues']; + $blanks = $dataSet['blanks']; + if (($cellValue == '') || ($cellValue === null)) { + return $blanks; + } + + return in_array($cellValue, $dataSetValues); + } + + /** + * Test if cell value is in the defined set of Excel date values. + * + * @param mixed $cellValue + * @param mixed[] $dataSet + * + * @return bool + */ + private static function filterTestInDateGroupSet($cellValue, $dataSet) + { + $dateSet = $dataSet['filterValues']; + $blanks = $dataSet['blanks']; + if (($cellValue == '') || ($cellValue === null)) { + return $blanks; + } + + if (is_numeric($cellValue)) { + $dateValue = Date::excelToTimestamp($cellValue); + if ($cellValue < 1) { + // Just the time part + $dtVal = date('His', $dateValue); + $dateSet = $dateSet['time']; + } elseif ($cellValue == floor($cellValue)) { + // Just the date part + $dtVal = date('Ymd', $dateValue); + $dateSet = $dateSet['date']; + } else { + // date and time parts + $dtVal = date('YmdHis', $dateValue); + $dateSet = $dateSet['dateTime']; + } + foreach ($dateSet as $dateValue) { + // Use of substr to extract value at the appropriate group level + if (substr($dtVal, 0, strlen($dateValue)) == $dateValue) { + return true; + } + } + } + + return false; + } + + /** + * Test if cell value is within a set of values defined by a ruleset. + * + * @param mixed $cellValue + * @param mixed[] $ruleSet + * + * @return bool + */ + private static function filterTestInCustomDataSet($cellValue, $ruleSet) + { + $dataSet = $ruleSet['filterRules']; + $join = $ruleSet['join']; + $customRuleForBlanks = $ruleSet['customRuleForBlanks'] ?? false; + + if (!$customRuleForBlanks) { + // Blank cells are always ignored, so return a FALSE + if (($cellValue == '') || ($cellValue === null)) { + return false; + } + } + $returnVal = ($join == AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND); + foreach ($dataSet as $rule) { + $retVal = false; + + if (is_numeric($rule['value'])) { + // Numeric values are tested using the appropriate operator + switch ($rule['operator']) { + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL: + $retVal = ($cellValue == $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: + $retVal = ($cellValue != $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN: + $retVal = ($cellValue > $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL: + $retVal = ($cellValue >= $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN: + $retVal = ($cellValue < $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL: + $retVal = ($cellValue <= $rule['value']); + + break; + } + } elseif ($rule['value'] == '') { + switch ($rule['operator']) { + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL: + $retVal = (($cellValue == '') || ($cellValue === null)); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: + $retVal = (($cellValue != '') && ($cellValue !== null)); + + break; + default: + $retVal = true; + + break; + } + } else { + // String values are always tested for equality, factoring in for wildcards (hence a regexp test) + $retVal = preg_match('/^' . $rule['value'] . '$/i', $cellValue); + } + // If there are multiple conditions, then we need to test both using the appropriate join operator + switch ($join) { + case AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR: + $returnVal = $returnVal || $retVal; + // Break as soon as we have a TRUE match for OR joins, + // to avoid unnecessary additional code execution + if ($returnVal) { + return $returnVal; + } + + break; + case AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND: + $returnVal = $returnVal && $retVal; + + break; + } + } + + return $returnVal; + } + + /** + * Test if cell date value is matches a set of values defined by a set of months. + * + * @param mixed $cellValue + * @param mixed[] $monthSet + * + * @return bool + */ + private static function filterTestInPeriodDateSet($cellValue, $monthSet) + { + // Blank cells are always ignored, so return a FALSE + if (($cellValue == '') || ($cellValue === null)) { + return false; + } + + if (is_numeric($cellValue)) { + $dateValue = date('m', Date::excelToTimestamp($cellValue)); + if (in_array($dateValue, $monthSet)) { + return true; + } + } + + return false; + } + + /** + * Search/Replace arrays to convert Excel wildcard syntax to a regexp syntax for preg_matching. + * + * @var array + */ + private static $fromReplace = ['\*', '\?', '~~', '~.*', '~.?']; + + private static $toReplace = ['.*', '.', '~', '\*', '\?']; + + /** + * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation. + * + * @param string $dynamicRuleType + * @param AutoFilter\Column $filterColumn + * + * @return mixed[] + */ + private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) + { + $rDateType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); + $val = $maxVal = null; + + $ruleValues = []; + $baseDate = DateTime::DATENOW(); + // Calculate start/end dates for the required date range based on current date + switch ($dynamicRuleType) { + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: + $baseDate = strtotime('-7 days', $baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: + $baseDate = strtotime('-7 days', $baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: + $baseDate = strtotime('-1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: + $baseDate = strtotime('+1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: + $baseDate = strtotime('-3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: + $baseDate = strtotime('+3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: + $baseDate = strtotime('-1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: + $baseDate = strtotime('+1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + } + + switch ($dynamicRuleType) { + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: + $maxVal = (int) Date::PHPtoExcel(strtotime('+1 day', $baseDate)); + $val = (int) Date::PHPToExcel($baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE: + $maxVal = (int) Date::PHPtoExcel(strtotime('+1 day', $baseDate)); + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: + $maxVal = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 31, 12, date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: + $thisMonth = date('m', $baseDate); + $thisQuarter = floor(--$thisMonth / 3); + $maxVal = (int) Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), (1 + $thisQuarter) * 3, date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1 + $thisQuarter * 3, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: + $maxVal = (int) Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), date('m', $baseDate), date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: + $dayOfWeek = date('w', $baseDate); + $val = (int) Date::PHPToExcel($baseDate) - $dayOfWeek; + $maxVal = $val + 7; + + break; + } + + switch ($dynamicRuleType) { + // Adjust Today dates for Yesterday and Tomorrow + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: + --$maxVal; + --$val; + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: + ++$maxVal; + ++$val; + + break; + } + + // Set the filter column rule attributes ready for writing + $filterColumn->setAttributes(['val' => $val, 'maxVal' => $maxVal]); + + // Set the rules for identifying rows for hide/show + $ruleValues[] = ['operator' => AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 'value' => $val]; + $ruleValues[] = ['operator' => AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 'value' => $maxVal]; + Functions::setReturnDateType($rDateType); + + return ['method' => 'filterTestInCustomDataSet', 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND]]; + } + + private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) + { + $range = $columnID . $startRow . ':' . $columnID . $endRow; + $dataValues = Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false)); + + $dataValues = array_filter($dataValues); + if ($ruleType == AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) { + rsort($dataValues); + } else { + sort($dataValues); + } + + return array_pop(array_slice($dataValues, 0, $ruleValue)); + } + + /** + * Apply the AutoFilter rules to the AutoFilter Range. + * + * @return $this + */ + public function showHideRows() + { + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($this->range); + + // The heading row should always be visible + $this->workSheet->getRowDimension($rangeStart[1])->setVisible(true); + + $columnFilterTests = []; + foreach ($this->columns as $columnID => $filterColumn) { + $rules = $filterColumn->getRules(); + switch ($filterColumn->getFilterType()) { + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER: + $ruleType = null; + $ruleValues = []; + // Build a list of the filter value selections + foreach ($rules as $rule) { + $ruleType = $rule->getRuleType(); + $ruleValues[] = $rule->getValue(); + } + // Test if we want to include blanks in our filter criteria + $blanks = false; + $ruleDataSet = array_filter($ruleValues); + if (count($ruleValues) != count($ruleDataSet)) { + $blanks = true; + } + if ($ruleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_FILTER) { + // Filter on absolute values + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInSimpleDataSet', + 'arguments' => ['filterValues' => $ruleDataSet, 'blanks' => $blanks], + ]; + } else { + // Filter on date group values + $arguments = [ + 'date' => [], + 'time' => [], + 'dateTime' => [], + ]; + foreach ($ruleDataSet as $ruleValue) { + $date = $time = ''; + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR] !== '')) { + $date .= sprintf('%04d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH] != '')) { + $date .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY] !== '')) { + $date .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]); + } + $dateTime = $date . $time; + $arguments['date'][] = $date; + $arguments['time'][] = $time; + $arguments['dateTime'][] = $dateTime; + } + // Remove empty elements + $arguments['date'] = array_filter($arguments['date']); + $arguments['time'] = array_filter($arguments['time']); + $arguments['dateTime'] = array_filter($arguments['dateTime']); + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInDateGroupSet', + 'arguments' => ['filterValues' => $arguments, 'blanks' => $blanks], + ]; + } + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER: + $customRuleForBlanks = false; + $ruleValues = []; + // Build a list of the filter value selections + foreach ($rules as $rule) { + $ruleValue = $rule->getValue(); + if (!is_numeric($ruleValue)) { + // Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards + $ruleValue = preg_quote($ruleValue); + $ruleValue = str_replace(self::$fromReplace, self::$toReplace, $ruleValue); + if (trim($ruleValue) == '') { + $customRuleForBlanks = true; + $ruleValue = trim($ruleValue); + } + } + $ruleValues[] = ['operator' => $rule->getOperator(), 'value' => $ruleValue]; + } + $join = $filterColumn->getJoin(); + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => $join, 'customRuleForBlanks' => $customRuleForBlanks], + ]; + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER: + $ruleValues = []; + foreach ($rules as $rule) { + // We should only ever have one Dynamic Filter Rule anyway + $dynamicRuleType = $rule->getGrouping(); + if (($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) || + ($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)) { + // Number (Average) based + // Calculate the average + $averageFormula = '=AVERAGE(' . $columnID . ($rangeStart[1] + 1) . ':' . $columnID . $rangeEnd[1] . ')'; + $average = Calculation::getInstance()->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1')); + // Set above/below rule based on greaterThan or LessTan + $operator = ($dynamicRuleType === AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) + ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN + : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN; + $ruleValues[] = [ + 'operator' => $operator, + 'value' => $average, + ]; + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR], + ]; + } else { + // Date based + if ($dynamicRuleType[0] == 'M' || $dynamicRuleType[0] == 'Q') { + $periodType = ''; + $period = 0; + // Month or Quarter + sscanf($dynamicRuleType, '%[A-Z]%d', $periodType, $period); + if ($periodType == 'M') { + $ruleValues = [$period]; + } else { + --$period; + $periodEnd = (1 + $period) * 3; + $periodStart = 1 + $period * 3; + $ruleValues = range($periodStart, $periodEnd); + } + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInPeriodDateSet', + 'arguments' => $ruleValues, + ]; + $filterColumn->setAttributes([]); + } else { + // Date Range + $columnFilterTests[$columnID] = $this->dynamicFilterDateRange($dynamicRuleType, $filterColumn); + + break; + } + } + } + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER: + $ruleValues = []; + $dataRowCount = $rangeEnd[1] - $rangeStart[1]; + foreach ($rules as $rule) { + // We should only ever have one Dynamic Filter Rule anyway + $toptenRuleType = $rule->getGrouping(); + $ruleValue = $rule->getValue(); + $ruleOperator = $rule->getOperator(); + } + if ($ruleOperator === AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) { + $ruleValue = floor($ruleValue * ($dataRowCount / 100)); + } + if ($ruleValue < 1) { + $ruleValue = 1; + } + if ($ruleValue > 500) { + $ruleValue = 500; + } + + $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1] + 1, $rangeEnd[1], $toptenRuleType, $ruleValue); + + $operator = ($toptenRuleType == AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) + ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL + : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL; + $ruleValues[] = ['operator' => $operator, 'value' => $maxVal]; + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR], + ]; + $filterColumn->setAttributes(['maxVal' => $maxVal]); + + break; + } + } + + // Execute the column tests for each row in the autoFilter range to determine show/hide, + for ($row = $rangeStart[1] + 1; $row <= $rangeEnd[1]; ++$row) { + $result = true; + foreach ($columnFilterTests as $columnID => $columnFilterTest) { + $cellValue = $this->workSheet->getCell($columnID . $row)->getCalculatedValue(); + // Execute the filter test + $result = $result && + call_user_func_array( + [self::class, $columnFilterTest['method']], + [$cellValue, $columnFilterTest['arguments']] + ); + // If filter test has resulted in FALSE, exit the loop straightaway rather than running any more tests + if (!$result) { + break; + } + } + // Set show/hide for the row based on the result of the autoFilter result + $this->workSheet->getRowDimension($row)->setVisible($result); + } + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + if ($key === 'workSheet') { + // Detach from worksheet + $this->{$key} = null; + } else { + $this->{$key} = clone $value; + } + } elseif ((is_array($value)) && ($key == 'columns')) { + // The columns array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter objects + $this->{$key} = []; + foreach ($value as $k => $v) { + $this->{$key}[$k] = clone $v; + // attach the new cloned Column to this new cloned Autofilter object + $this->{$key}[$k]->setParent($this); + } + } else { + $this->{$key} = $value; + } + } + } + + /** + * toString method replicates previous behavior by returning the range if object is + * referenced as a property of its parent. + */ + public function __toString() + { + return (string) $this->range; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column.php new file mode 100755 index 0000000..09584a7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column.php @@ -0,0 +1,380 @@ +columnIndex = $pColumn; + $this->parent = $pParent; + } + + /** + * Get AutoFilter column index as string eg: 'A'. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Set AutoFilter column index as string eg: 'A'. + * + * @param string $pColumn Column (e.g. A) + * + * @return $this + */ + public function setColumnIndex($pColumn) + { + // Uppercase coordinate + $pColumn = strtoupper($pColumn); + if ($this->parent !== null) { + $this->parent->testColumnInRange($pColumn); + } + + $this->columnIndex = $pColumn; + + return $this; + } + + /** + * Get this Column's AutoFilter Parent. + * + * @return AutoFilter + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set this Column's AutoFilter Parent. + * + * @param AutoFilter $pParent + * + * @return $this + */ + public function setParent(?AutoFilter $pParent = null) + { + $this->parent = $pParent; + + return $this; + } + + /** + * Get AutoFilter Type. + * + * @return string + */ + public function getFilterType() + { + return $this->filterType; + } + + /** + * Set AutoFilter Type. + * + * @param string $pFilterType + * + * @return $this + */ + public function setFilterType($pFilterType) + { + if (!in_array($pFilterType, self::$filterTypes)) { + throw new PhpSpreadsheetException('Invalid filter type for column AutoFilter.'); + } + + $this->filterType = $pFilterType; + + return $this; + } + + /** + * Get AutoFilter Multiple Rules And/Or Join. + * + * @return string + */ + public function getJoin() + { + return $this->join; + } + + /** + * Set AutoFilter Multiple Rules And/Or. + * + * @param string $pJoin And/Or + * + * @return $this + */ + public function setJoin($pJoin) + { + // Lowercase And/Or + $pJoin = strtolower($pJoin); + if (!in_array($pJoin, self::$ruleJoins)) { + throw new PhpSpreadsheetException('Invalid rule connection for column AutoFilter.'); + } + + $this->join = $pJoin; + + return $this; + } + + /** + * Set AutoFilter Attributes. + * + * @param string[] $attributes + * + * @return $this + */ + public function setAttributes(array $attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Set An AutoFilter Attribute. + * + * @param string $pName Attribute Name + * @param string $pValue Attribute Value + * + * @return $this + */ + public function setAttribute($pName, $pValue) + { + $this->attributes[$pName] = $pValue; + + return $this; + } + + /** + * Get AutoFilter Column Attributes. + * + * @return string[] + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Get specific AutoFilter Column Attribute. + * + * @param string $pName Attribute Name + * + * @return string + */ + public function getAttribute($pName) + { + if (isset($this->attributes[$pName])) { + return $this->attributes[$pName]; + } + + return null; + } + + /** + * Get all AutoFilter Column Rules. + * + * @return Column\Rule[] + */ + public function getRules() + { + return $this->ruleset; + } + + /** + * Get a specified AutoFilter Column Rule. + * + * @param int $pIndex Rule index in the ruleset array + * + * @return Column\Rule + */ + public function getRule($pIndex) + { + if (!isset($this->ruleset[$pIndex])) { + $this->ruleset[$pIndex] = new Column\Rule($this); + } + + return $this->ruleset[$pIndex]; + } + + /** + * Create a new AutoFilter Column Rule in the ruleset. + * + * @return Column\Rule + */ + public function createRule() + { + $this->ruleset[] = new Column\Rule($this); + + return end($this->ruleset); + } + + /** + * Add a new AutoFilter Column Rule to the ruleset. + * + * @return $this + */ + public function addRule(Column\Rule $pRule) + { + $pRule->setParent($this); + $this->ruleset[] = $pRule; + + return $this; + } + + /** + * Delete a specified AutoFilter Column Rule + * If the number of rules is reduced to 1, then we reset And/Or logic to Or. + * + * @param int $pIndex Rule index in the ruleset array + * + * @return $this + */ + public function deleteRule($pIndex) + { + if (isset($this->ruleset[$pIndex])) { + unset($this->ruleset[$pIndex]); + // If we've just deleted down to a single rule, then reset And/Or joining to Or + if (count($this->ruleset) <= 1) { + $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); + } + } + + return $this; + } + + /** + * Delete all AutoFilter Column Rules. + * + * @return $this + */ + public function clearRules() + { + $this->ruleset = []; + $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ($key === 'parent') { + // Detach from autofilter parent + $this->parent = null; + } elseif ($key === 'ruleset') { + // The columns array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter objects + $this->ruleset = []; + foreach ($value as $k => $v) { + $cloned = clone $v; + $cloned->setParent($this); // attach the new cloned Rule to this new cloned Autofilter Cloned object + $this->ruleset[$k] = $cloned; + } + } elseif (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php new file mode 100755 index 0000000..c0a15a7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php @@ -0,0 +1,445 @@ + + * + * + * + * + * + */ + const AUTOFILTER_COLUMN_RULE_EQUAL = 'equal'; + const AUTOFILTER_COLUMN_RULE_NOTEQUAL = 'notEqual'; + const AUTOFILTER_COLUMN_RULE_GREATERTHAN = 'greaterThan'; + const AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL = 'greaterThanOrEqual'; + const AUTOFILTER_COLUMN_RULE_LESSTHAN = 'lessThan'; + const AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL = 'lessThanOrEqual'; + + private static $operators = [ + self::AUTOFILTER_COLUMN_RULE_EQUAL, + self::AUTOFILTER_COLUMN_RULE_NOTEQUAL, + self::AUTOFILTER_COLUMN_RULE_GREATERTHAN, + self::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, + self::AUTOFILTER_COLUMN_RULE_LESSTHAN, + self::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, + ]; + + const AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE = 'byValue'; + const AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT = 'byPercent'; + + private static $topTenValue = [ + self::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, + self::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, + ]; + + const AUTOFILTER_COLUMN_RULE_TOPTEN_TOP = 'top'; + const AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM = 'bottom'; + + private static $topTenType = [ + self::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, + self::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, + ]; + + // Rule Operators (Numeric, Boolean etc) +// const AUTOFILTER_COLUMN_RULE_BETWEEN = 'between'; // greaterThanOrEqual 1 && lessThanOrEqual 2 + // Rule Operators (Numeric Special) which are translated to standard numeric operators with calculated values +// const AUTOFILTER_COLUMN_RULE_TOPTEN = 'topTen'; // greaterThan calculated value +// const AUTOFILTER_COLUMN_RULE_TOPTENPERCENT = 'topTenPercent'; // greaterThan calculated value +// const AUTOFILTER_COLUMN_RULE_ABOVEAVERAGE = 'aboveAverage'; // Value is calculated as the average +// const AUTOFILTER_COLUMN_RULE_BELOWAVERAGE = 'belowAverage'; // Value is calculated as the average + // Rule Operators (String) which are set as wild-carded values +// const AUTOFILTER_COLUMN_RULE_BEGINSWITH = 'beginsWith'; // A* +// const AUTOFILTER_COLUMN_RULE_ENDSWITH = 'endsWith'; // *Z +// const AUTOFILTER_COLUMN_RULE_CONTAINS = 'contains'; // *B* +// const AUTOFILTER_COLUMN_RULE_DOESNTCONTAIN = 'notEqual'; // notEqual *B* + // Rule Operators (Date Special) which are translated to standard numeric operators with calculated values +// const AUTOFILTER_COLUMN_RULE_BEFORE = 'lessThan'; +// const AUTOFILTER_COLUMN_RULE_AFTER = 'greaterThan'; +// const AUTOFILTER_COLUMN_RULE_YESTERDAY = 'yesterday'; +// const AUTOFILTER_COLUMN_RULE_TODAY = 'today'; +// const AUTOFILTER_COLUMN_RULE_TOMORROW = 'tomorrow'; +// const AUTOFILTER_COLUMN_RULE_LASTWEEK = 'lastWeek'; +// const AUTOFILTER_COLUMN_RULE_THISWEEK = 'thisWeek'; +// const AUTOFILTER_COLUMN_RULE_NEXTWEEK = 'nextWeek'; +// const AUTOFILTER_COLUMN_RULE_LASTMONTH = 'lastMonth'; +// const AUTOFILTER_COLUMN_RULE_THISMONTH = 'thisMonth'; +// const AUTOFILTER_COLUMN_RULE_NEXTMONTH = 'nextMonth'; +// const AUTOFILTER_COLUMN_RULE_LASTQUARTER = 'lastQuarter'; +// const AUTOFILTER_COLUMN_RULE_THISQUARTER = 'thisQuarter'; +// const AUTOFILTER_COLUMN_RULE_NEXTQUARTER = 'nextQuarter'; +// const AUTOFILTER_COLUMN_RULE_LASTYEAR = 'lastYear'; +// const AUTOFILTER_COLUMN_RULE_THISYEAR = 'thisYear'; +// const AUTOFILTER_COLUMN_RULE_NEXTYEAR = 'nextYear'; +// const AUTOFILTER_COLUMN_RULE_YEARTODATE = 'yearToDate'; // +// const AUTOFILTER_COLUMN_RULE_ALLDATESINMONTH = 'allDatesInMonth'; // for Month/February +// const AUTOFILTER_COLUMN_RULE_ALLDATESINQUARTER = 'allDatesInQuarter'; // for Quarter 2 + + /** + * Autofilter Column. + * + * @var Column + */ + private $parent; + + /** + * Autofilter Rule Type. + * + * @var string + */ + private $ruleType = self::AUTOFILTER_RULETYPE_FILTER; + + /** + * Autofilter Rule Value. + * + * @var string + */ + private $value = ''; + + /** + * Autofilter Rule Operator. + * + * @var string + */ + private $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL; + + /** + * DateTimeGrouping Group Value. + * + * @var string + */ + private $grouping = ''; + + /** + * Create a new Rule. + * + * @param Column $pParent + */ + public function __construct(?Column $pParent = null) + { + $this->parent = $pParent; + } + + /** + * Get AutoFilter Rule Type. + * + * @return string + */ + public function getRuleType() + { + return $this->ruleType; + } + + /** + * Set AutoFilter Rule Type. + * + * @param string $pRuleType see self::AUTOFILTER_RULETYPE_* + * + * @return $this + */ + public function setRuleType($pRuleType) + { + if (!in_array($pRuleType, self::$ruleTypes)) { + throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.'); + } + + $this->ruleType = $pRuleType; + + return $this; + } + + /** + * Get AutoFilter Rule Value. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set AutoFilter Rule Value. + * + * @param string|string[] $pValue + * + * @return $this + */ + public function setValue($pValue) + { + if (is_array($pValue)) { + $grouping = -1; + foreach ($pValue as $key => $value) { + // Validate array entries + if (!in_array($key, self::$dateTimeGroups)) { + // Remove any invalid entries from the value array + unset($pValue[$key]); + } else { + // Work out what the dateTime grouping will be + $grouping = max($grouping, array_search($key, self::$dateTimeGroups)); + } + } + if (count($pValue) == 0) { + throw new PhpSpreadsheetException('Invalid rule value for column AutoFilter Rule.'); + } + // Set the dateTime grouping that we've anticipated + $this->setGrouping(self::$dateTimeGroups[$grouping]); + } + $this->value = $pValue; + + return $this; + } + + /** + * Get AutoFilter Rule Operator. + * + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Set AutoFilter Rule Operator. + * + * @param string $pOperator see self::AUTOFILTER_COLUMN_RULE_* + * + * @return $this + */ + public function setOperator($pOperator) + { + if (empty($pOperator)) { + $pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL; + } + if ((!in_array($pOperator, self::$operators)) && + (!in_array($pOperator, self::$topTenValue))) { + throw new PhpSpreadsheetException('Invalid operator for column AutoFilter Rule.'); + } + $this->operator = $pOperator; + + return $this; + } + + /** + * Get AutoFilter Rule Grouping. + * + * @return string + */ + public function getGrouping() + { + return $this->grouping; + } + + /** + * Set AutoFilter Rule Grouping. + * + * @param string $pGrouping + * + * @return $this + */ + public function setGrouping($pGrouping) + { + if (($pGrouping !== null) && + (!in_array($pGrouping, self::$dateTimeGroups)) && + (!in_array($pGrouping, self::$dynamicTypes)) && + (!in_array($pGrouping, self::$topTenType))) { + throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.'); + } + $this->grouping = $pGrouping; + + return $this; + } + + /** + * Set AutoFilter Rule. + * + * @param string $pOperator see self::AUTOFILTER_COLUMN_RULE_* + * @param string|string[] $pValue + * @param string $pGrouping + * + * @return $this + */ + public function setRule($pOperator, $pValue, $pGrouping = null) + { + $this->setOperator($pOperator); + $this->setValue($pValue); + // Only set grouping if it's been passed in as a user-supplied argument, + // otherwise we're calculating it when we setValue() and don't want to overwrite that + // If the user supplies an argumnet for grouping, then on their own head be it + if ($pGrouping !== null) { + $this->setGrouping($pGrouping); + } + + return $this; + } + + /** + * Get this Rule's AutoFilter Column Parent. + * + * @return Column + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set this Rule's AutoFilter Column Parent. + * + * @param Column $pParent + * + * @return $this + */ + public function setParent(?Column $pParent = null) + { + $this->parent = $pParent; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + if ($key == 'parent') { + // Detach from autofilter column parent + $this->$key = null; + } else { + $this->$key = clone $value; + } + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/BaseDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/BaseDrawing.php new file mode 100755 index 0000000..1b145a8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/BaseDrawing.php @@ -0,0 +1,532 @@ +name = ''; + $this->description = ''; + $this->worksheet = null; + $this->coordinates = 'A1'; + $this->offsetX = 0; + $this->offsetY = 0; + $this->width = 0; + $this->height = 0; + $this->resizeProportional = true; + $this->rotation = 0; + $this->shadow = new Drawing\Shadow(); + + // Set image index + ++self::$imageCounter; + $this->imageIndex = self::$imageCounter; + } + + /** + * Get image index. + * + * @return int + */ + public function getImageIndex() + { + return $this->imageIndex; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set Name. + * + * @param string $pValue + * + * @return $this + */ + public function setName($pValue) + { + $this->name = $pValue; + + return $this; + } + + /** + * Get Description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set Description. + * + * @param string $description + * + * @return $this + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get Worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set Worksheet. + * + * @param Worksheet $pValue + * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? + * + * @return $this + */ + public function setWorksheet(?Worksheet $pValue = null, $pOverrideOld = false) + { + if ($this->worksheet === null) { + // Add drawing to \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $this->worksheet = $pValue; + $this->worksheet->getCell($this->coordinates); + $this->worksheet->getDrawingCollection()->append($this); + } else { + if ($pOverrideOld) { + // Remove drawing from old \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $iterator = $this->worksheet->getDrawingCollection()->getIterator(); + + while ($iterator->valid()) { + if ($iterator->current()->getHashCode() == $this->getHashCode()) { + $this->worksheet->getDrawingCollection()->offsetUnset($iterator->key()); + $this->worksheet = null; + + break; + } + } + + // Set new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $this->setWorksheet($pValue); + } else { + throw new PhpSpreadsheetException('A Worksheet has already been assigned. Drawings can only exist on one \\PhpOffice\\PhpSpreadsheet\\Worksheet.'); + } + } + + return $this; + } + + /** + * Get Coordinates. + * + * @return string + */ + public function getCoordinates() + { + return $this->coordinates; + } + + /** + * Set Coordinates. + * + * @param string $pValue eg: 'A1' + * + * @return $this + */ + public function setCoordinates($pValue) + { + $this->coordinates = $pValue; + + return $this; + } + + /** + * Get OffsetX. + * + * @return int + */ + public function getOffsetX() + { + return $this->offsetX; + } + + /** + * Set OffsetX. + * + * @param int $pValue + * + * @return $this + */ + public function setOffsetX($pValue) + { + $this->offsetX = $pValue; + + return $this; + } + + /** + * Get OffsetY. + * + * @return int + */ + public function getOffsetY() + { + return $this->offsetY; + } + + /** + * Set OffsetY. + * + * @param int $pValue + * + * @return $this + */ + public function setOffsetY($pValue) + { + $this->offsetY = $pValue; + + return $this; + } + + /** + * Get Width. + * + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param int $pValue + * + * @return $this + */ + public function setWidth($pValue) + { + // Resize proportional? + if ($this->resizeProportional && $pValue != 0) { + $ratio = $this->height / ($this->width != 0 ? $this->width : 1); + $this->height = round($ratio * $pValue); + } + + // Set width + $this->width = $pValue; + + return $this; + } + + /** + * Get Height. + * + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set Height. + * + * @param int $pValue + * + * @return $this + */ + public function setHeight($pValue) + { + // Resize proportional? + if ($this->resizeProportional && $pValue != 0) { + $ratio = $this->width / ($this->height != 0 ? $this->height : 1); + $this->width = round($ratio * $pValue); + } + + // Set height + $this->height = $pValue; + + return $this; + } + + /** + * Set width and height with proportional resize. + * + * Example: + * + * $objDrawing->setResizeProportional(true); + * $objDrawing->setWidthAndHeight(160,120); + * + * + * @author Vincent@luo MSN:kele_100@hotmail.com + * + * @param int $width + * @param int $height + * + * @return $this + */ + public function setWidthAndHeight($width, $height) + { + $xratio = $width / ($this->width != 0 ? $this->width : 1); + $yratio = $height / ($this->height != 0 ? $this->height : 1); + if ($this->resizeProportional && !($width == 0 || $height == 0)) { + if (($xratio * $this->height) < $height) { + $this->height = ceil($xratio * $this->height); + $this->width = $width; + } else { + $this->width = ceil($yratio * $this->width); + $this->height = $height; + } + } else { + $this->width = $width; + $this->height = $height; + } + + return $this; + } + + /** + * Get ResizeProportional. + * + * @return bool + */ + public function getResizeProportional() + { + return $this->resizeProportional; + } + + /** + * Set ResizeProportional. + * + * @param bool $pValue + * + * @return $this + */ + public function setResizeProportional($pValue) + { + $this->resizeProportional = $pValue; + + return $this; + } + + /** + * Get Rotation. + * + * @return int + */ + public function getRotation() + { + return $this->rotation; + } + + /** + * Set Rotation. + * + * @param int $pValue + * + * @return $this + */ + public function setRotation($pValue) + { + $this->rotation = $pValue; + + return $this; + } + + /** + * Get Shadow. + * + * @return Drawing\Shadow + */ + public function getShadow() + { + return $this->shadow; + } + + /** + * Set Shadow. + * + * @param Drawing\Shadow $pValue + * + * @return $this + */ + public function setShadow(?Drawing\Shadow $pValue = null) + { + $this->shadow = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->name . + $this->description . + $this->worksheet->getHashCode() . + $this->coordinates . + $this->offsetX . + $this->offsetY . + $this->width . + $this->height . + $this->rotation . + $this->shadow->getHashCode() . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ($key == 'worksheet') { + $this->worksheet = null; + } elseif (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + public function setHyperlink(?Hyperlink $pHyperlink = null): void + { + $this->hyperlink = $pHyperlink; + } + + /** + * @return null|Hyperlink + */ + public function getHyperlink() + { + return $this->hyperlink; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/CellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/CellIterator.php new file mode 100755 index 0000000..45f76ca --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/CellIterator.php @@ -0,0 +1,57 @@ +worksheet = null; + } + + /** + * Get loop only existing cells. + * + * @return bool + */ + public function getIterateOnlyExistingCells() + { + return $this->onlyExistingCells; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + */ + abstract protected function adjustForExistingOnlyRange(); + + /** + * Set the iterator to loop only existing cells. + * + * @param bool $value + */ + public function setIterateOnlyExistingCells($value): void + { + $this->onlyExistingCells = (bool) $value; + + $this->adjustForExistingOnlyRange(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Column.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Column.php new file mode 100755 index 0000000..410e807 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Column.php @@ -0,0 +1,64 @@ +parent = $parent; + $this->columnIndex = $columnIndex; + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->parent = null; + } + + /** + * Get column index as string eg: 'A'. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Get cell iterator. + * + * @param int $startRow The row number at which to start iterating + * @param int $endRow Optionally, the row number at which to stop iterating + * + * @return ColumnCellIterator + */ + public function getCellIterator($startRow = 1, $endRow = null) + { + return new ColumnCellIterator($this->parent, $this->columnIndex, $startRow, $endRow); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnCellIterator.php new file mode 100755 index 0000000..ec16fbe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -0,0 +1,189 @@ +worksheet = $subject; + $this->columnIndex = Coordinate::columnIndexFromString($columnIndex); + $this->resetEnd($endRow); + $this->resetStart($startRow); + } + + /** + * (Re)Set the start row and the current row pointer. + * + * @param int $startRow The row number at which to start iterating + * + * @return $this + */ + public function resetStart($startRow = 1) + { + $this->startRow = $startRow; + $this->adjustForExistingOnlyRange(); + $this->seek($startRow); + + return $this; + } + + /** + * (Re)Set the end row. + * + * @param int $endRow The row number at which to stop iterating + * + * @return $this + */ + public function resetEnd($endRow = null) + { + $this->endRow = ($endRow) ? $endRow : $this->worksheet->getHighestRow(); + $this->adjustForExistingOnlyRange(); + + return $this; + } + + /** + * Set the row pointer to the selected row. + * + * @param int $row The row number to set the current pointer at + * + * @return $this + */ + public function seek($row = 1) + { + if (($row < $this->startRow) || ($row > $this->endRow)) { + throw new PhpSpreadsheetException("Row $row is out of range ({$this->startRow} - {$this->endRow})"); + } elseif ($this->onlyExistingCells && !($this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $row))) { + throw new PhpSpreadsheetException('In "IterateOnlyExistingCells" mode and Cell does not exist'); + } + $this->currentRow = $row; + + return $this; + } + + /** + * Rewind the iterator to the starting row. + */ + public function rewind(): void + { + $this->currentRow = $this->startRow; + } + + /** + * Return the current cell in this worksheet column. + * + * @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function current() + { + return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow); + } + + /** + * Return the current iterator key. + * + * @return int + */ + public function key() + { + return $this->currentRow; + } + + /** + * Set the iterator to its next value. + */ + public function next(): void + { + do { + ++$this->currentRow; + } while (($this->onlyExistingCells) && + (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) && + ($this->currentRow <= $this->endRow)); + } + + /** + * Set the iterator to its previous value. + */ + public function prev(): void + { + do { + --$this->currentRow; + } while (($this->onlyExistingCells) && + (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) && + ($this->currentRow >= $this->startRow)); + } + + /** + * Indicate if more rows exist in the worksheet range of rows that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + */ + protected function adjustForExistingOnlyRange(): void + { + if ($this->onlyExistingCells) { + while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) && + ($this->startRow <= $this->endRow)) { + ++$this->startRow; + } + if ($this->startRow > $this->endRow) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) && + ($this->endRow >= $this->startRow)) { + --$this->endRow; + } + if ($this->endRow < $this->startRow) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnDimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnDimension.php new file mode 100755 index 0000000..4e87a34 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnDimension.php @@ -0,0 +1,115 @@ +columnIndex = $pIndex; + + // set dimension as unformatted by default + parent::__construct(0); + } + + /** + * Get column index as string eg: 'A'. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Set column index as string eg: 'A'. + * + * @param string $pValue + * + * @return $this + */ + public function setColumnIndex($pValue) + { + $this->columnIndex = $pValue; + + return $this; + } + + /** + * Get Width. + * + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param float $pValue + * + * @return $this + */ + public function setWidth($pValue) + { + $this->width = $pValue; + + return $this; + } + + /** + * Get Auto Size. + * + * @return bool + */ + public function getAutoSize() + { + return $this->autoSize; + } + + /** + * Set Auto Size. + * + * @param bool $pValue + * + * @return $this + */ + public function setAutoSize($pValue) + { + $this->autoSize = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnIterator.php new file mode 100755 index 0000000..d0bb20c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/ColumnIterator.php @@ -0,0 +1,172 @@ +worksheet = $worksheet; + $this->resetEnd($endColumn); + $this->resetStart($startColumn); + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->worksheet = null; + } + + /** + * (Re)Set the start column and the current column pointer. + * + * @param string $startColumn The column address at which to start iterating + * + * @return $this + */ + public function resetStart($startColumn = 'A') + { + $startColumnIndex = Coordinate::columnIndexFromString($startColumn); + if ($startColumnIndex > Coordinate::columnIndexFromString($this->worksheet->getHighestColumn())) { + throw new Exception("Start column ({$startColumn}) is beyond highest column ({$this->worksheet->getHighestColumn()})"); + } + + $this->startColumnIndex = $startColumnIndex; + if ($this->endColumnIndex < $this->startColumnIndex) { + $this->endColumnIndex = $this->startColumnIndex; + } + $this->seek($startColumn); + + return $this; + } + + /** + * (Re)Set the end column. + * + * @param string $endColumn The column address at which to stop iterating + * + * @return $this + */ + public function resetEnd($endColumn = null) + { + $endColumn = $endColumn ? $endColumn : $this->worksheet->getHighestColumn(); + $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn); + + return $this; + } + + /** + * Set the column pointer to the selected column. + * + * @param string $column The column address to set the current pointer at + * + * @return $this + */ + public function seek($column = 'A') + { + $column = Coordinate::columnIndexFromString($column); + if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) { + throw new PhpSpreadsheetException("Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})"); + } + $this->currentColumnIndex = $column; + + return $this; + } + + /** + * Rewind the iterator to the starting column. + */ + public function rewind(): void + { + $this->currentColumnIndex = $this->startColumnIndex; + } + + /** + * Return the current column in this worksheet. + * + * @return Column + */ + public function current() + { + return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex)); + } + + /** + * Return the current iterator key. + * + * @return string + */ + public function key() + { + return Coordinate::stringFromColumnIndex($this->currentColumnIndex); + } + + /** + * Set the iterator to its next value. + */ + public function next(): void + { + ++$this->currentColumnIndex; + } + + /** + * Set the iterator to its previous value. + */ + public function prev(): void + { + --$this->currentColumnIndex; + } + + /** + * Indicate if more columns exist in the worksheet range of columns that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Dimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Dimension.php new file mode 100755 index 0000000..a27daf0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Dimension.php @@ -0,0 +1,163 @@ +xfIndex = $initialValue; + } + + /** + * Get Visible. + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set Visible. + * + * @param bool $pValue + * + * @return $this + */ + public function setVisible($pValue) + { + $this->visible = (bool) $pValue; + + return $this; + } + + /** + * Get Outline Level. + * + * @return int + */ + public function getOutlineLevel() + { + return $this->outlineLevel; + } + + /** + * Set Outline Level. + * Value must be between 0 and 7. + * + * @param int $pValue + * + * @return $this + */ + public function setOutlineLevel($pValue) + { + if ($pValue < 0 || $pValue > 7) { + throw new PhpSpreadsheetException('Outline level must range between 0 and 7.'); + } + + $this->outlineLevel = $pValue; + + return $this; + } + + /** + * Get Collapsed. + * + * @return bool + */ + public function getCollapsed() + { + return $this->collapsed; + } + + /** + * Set Collapsed. + * + * @param bool $pValue + * + * @return $this + */ + public function setCollapsed($pValue) + { + $this->collapsed = (bool) $pValue; + + return $this; + } + + /** + * Get index to cellXf. + * + * @return int + */ + public function getXfIndex() + { + return $this->xfIndex; + } + + /** + * Set index to cellXf. + * + * @param int $pValue + * + * @return $this + */ + public function setXfIndex($pValue) + { + $this->xfIndex = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing.php new file mode 100755 index 0000000..1f1dae9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing.php @@ -0,0 +1,114 @@ +path = ''; + + // Initialize parent + parent::__construct(); + } + + /** + * Get Filename. + * + * @return string + */ + public function getFilename() + { + return basename($this->path); + } + + /** + * Get indexed filename (using image index). + * + * @return string + */ + public function getIndexedFilename() + { + $fileName = $this->getFilename(); + $fileName = str_replace(' ', '_', $fileName); + + return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension(); + } + + /** + * Get Extension. + * + * @return string + */ + public function getExtension() + { + $exploded = explode('.', basename($this->path)); + + return $exploded[count($exploded) - 1]; + } + + /** + * Get Path. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set Path. + * + * @param string $pValue File path + * @param bool $pVerifyFile Verify file + * + * @return $this + */ + public function setPath($pValue, $pVerifyFile = true) + { + if ($pVerifyFile) { + if (file_exists($pValue)) { + $this->path = $pValue; + + if ($this->width == 0 && $this->height == 0) { + // Get width/height + [$this->width, $this->height] = getimagesize($pValue); + } + } else { + throw new PhpSpreadsheetException("File $pValue not found!"); + } + } else { + $this->path = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->path . + parent::getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing/Shadow.php new file mode 100755 index 0000000..01ffed9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Drawing/Shadow.php @@ -0,0 +1,289 @@ +visible = false; + $this->blurRadius = 6; + $this->distance = 2; + $this->direction = 0; + $this->alignment = self::SHADOW_BOTTOM_RIGHT; + $this->color = new Color(Color::COLOR_BLACK); + $this->alpha = 50; + } + + /** + * Get Visible. + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set Visible. + * + * @param bool $pValue + * + * @return $this + */ + public function setVisible($pValue) + { + $this->visible = $pValue; + + return $this; + } + + /** + * Get Blur radius. + * + * @return int + */ + public function getBlurRadius() + { + return $this->blurRadius; + } + + /** + * Set Blur radius. + * + * @param int $pValue + * + * @return $this + */ + public function setBlurRadius($pValue) + { + $this->blurRadius = $pValue; + + return $this; + } + + /** + * Get Shadow distance. + * + * @return int + */ + public function getDistance() + { + return $this->distance; + } + + /** + * Set Shadow distance. + * + * @param int $pValue + * + * @return $this + */ + public function setDistance($pValue) + { + $this->distance = $pValue; + + return $this; + } + + /** + * Get Shadow direction (in degrees). + * + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * Set Shadow direction (in degrees). + * + * @param int $pValue + * + * @return $this + */ + public function setDirection($pValue) + { + $this->direction = $pValue; + + return $this; + } + + /** + * Get Shadow alignment. + * + * @return int + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Set Shadow alignment. + * + * @param int $pValue + * + * @return $this + */ + public function setAlignment($pValue) + { + $this->alignment = $pValue; + + return $this; + } + + /** + * Get Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Color. + * + * @param Color $pValue + * + * @return $this + */ + public function setColor(?Color $pValue = null) + { + $this->color = $pValue; + + return $this; + } + + /** + * Get Alpha. + * + * @return int + */ + public function getAlpha() + { + return $this->alpha; + } + + /** + * Set Alpha. + * + * @param int $pValue + * + * @return $this + */ + public function setAlpha($pValue) + { + $this->alpha = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + ($this->visible ? 't' : 'f') . + $this->blurRadius . + $this->distance . + $this->direction . + $this->alignment . + $this->color->getHashCode() . + $this->alpha . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooter.php new file mode 100755 index 0000000..cc37e7f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooter.php @@ -0,0 +1,490 @@ + + * Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970:. + * + * There are a number of formatting codes that can be written inline with the actual header / footer text, which + * affect the formatting in the header or footer. + * + * Example: This example shows the text "Center Bold Header" on the first line (center section), and the date on + * the second line (center section). + * &CCenter &"-,Bold"Bold&"-,Regular"Header_x000A_&D + * + * General Rules: + * There is no required order in which these codes must appear. + * + * The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again: + * - strikethrough + * - superscript + * - subscript + * Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored, + * while the first is ON. + * &L - code for "left section" (there are three header / footer locations, "left", "center", and "right"). When + * two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the + * order of appearance, and placed into the left section. + * &P - code for "current page #" + * &N - code for "total pages" + * &font size - code for "text font size", where font size is a font size in points. + * &K - code for "text font color" + * RGB Color is specified as RRGGBB + * Theme Color is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade + * value, NN is the tint/shade value. + * &S - code for "text strikethrough" on / off + * &X - code for "text super script" on / off + * &Y - code for "text subscript" on / off + * &C - code for "center section". When two or more occurrences of this section marker exist, the contents + * from all markers are concatenated, in the order of appearance, and placed into the center section. + * + * &D - code for "date" + * &T - code for "time" + * &G - code for "picture as background" + * &U - code for "text single underline" + * &E - code for "double underline" + * &R - code for "right section". When two or more occurrences of this section marker exist, the contents + * from all markers are concatenated, in the order of appearance, and placed into the right section. + * &Z - code for "this workbook's file path" + * &F - code for "this workbook's file name" + * &A - code for "sheet tab name" + * &+ - code for add to page #. + * &- - code for subtract from page #. + * &"font name,font type" - code for "text font name" and "text font type", where font name and font type + * are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font + * name, it means "none specified". Both of font name and font type can be localized values. + * &"-,Bold" - code for "bold font style" + * &B - also means "bold font style". + * &"-,Regular" - code for "regular font style" + * &"-,Italic" - code for "italic font style" + * &I - also means "italic font style" + * &"-,Bold Italic" code for "bold italic font style" + * &O - code for "outline style" + * &H - code for "shadow style" + * + */ +class HeaderFooter +{ + // Header/footer image location + const IMAGE_HEADER_LEFT = 'LH'; + const IMAGE_HEADER_CENTER = 'CH'; + const IMAGE_HEADER_RIGHT = 'RH'; + const IMAGE_FOOTER_LEFT = 'LF'; + const IMAGE_FOOTER_CENTER = 'CF'; + const IMAGE_FOOTER_RIGHT = 'RF'; + + /** + * OddHeader. + * + * @var string + */ + private $oddHeader = ''; + + /** + * OddFooter. + * + * @var string + */ + private $oddFooter = ''; + + /** + * EvenHeader. + * + * @var string + */ + private $evenHeader = ''; + + /** + * EvenFooter. + * + * @var string + */ + private $evenFooter = ''; + + /** + * FirstHeader. + * + * @var string + */ + private $firstHeader = ''; + + /** + * FirstFooter. + * + * @var string + */ + private $firstFooter = ''; + + /** + * Different header for Odd/Even, defaults to false. + * + * @var bool + */ + private $differentOddEven = false; + + /** + * Different header for first page, defaults to false. + * + * @var bool + */ + private $differentFirst = false; + + /** + * Scale with document, defaults to true. + * + * @var bool + */ + private $scaleWithDocument = true; + + /** + * Align with margins, defaults to true. + * + * @var bool + */ + private $alignWithMargins = true; + + /** + * Header/footer images. + * + * @var HeaderFooterDrawing[] + */ + private $headerFooterImages = []; + + /** + * Create a new HeaderFooter. + */ + public function __construct() + { + } + + /** + * Get OddHeader. + * + * @return string + */ + public function getOddHeader() + { + return $this->oddHeader; + } + + /** + * Set OddHeader. + * + * @param string $pValue + * + * @return $this + */ + public function setOddHeader($pValue) + { + $this->oddHeader = $pValue; + + return $this; + } + + /** + * Get OddFooter. + * + * @return string + */ + public function getOddFooter() + { + return $this->oddFooter; + } + + /** + * Set OddFooter. + * + * @param string $pValue + * + * @return $this + */ + public function setOddFooter($pValue) + { + $this->oddFooter = $pValue; + + return $this; + } + + /** + * Get EvenHeader. + * + * @return string + */ + public function getEvenHeader() + { + return $this->evenHeader; + } + + /** + * Set EvenHeader. + * + * @param string $pValue + * + * @return $this + */ + public function setEvenHeader($pValue) + { + $this->evenHeader = $pValue; + + return $this; + } + + /** + * Get EvenFooter. + * + * @return string + */ + public function getEvenFooter() + { + return $this->evenFooter; + } + + /** + * Set EvenFooter. + * + * @param string $pValue + * + * @return $this + */ + public function setEvenFooter($pValue) + { + $this->evenFooter = $pValue; + + return $this; + } + + /** + * Get FirstHeader. + * + * @return string + */ + public function getFirstHeader() + { + return $this->firstHeader; + } + + /** + * Set FirstHeader. + * + * @param string $pValue + * + * @return $this + */ + public function setFirstHeader($pValue) + { + $this->firstHeader = $pValue; + + return $this; + } + + /** + * Get FirstFooter. + * + * @return string + */ + public function getFirstFooter() + { + return $this->firstFooter; + } + + /** + * Set FirstFooter. + * + * @param string $pValue + * + * @return $this + */ + public function setFirstFooter($pValue) + { + $this->firstFooter = $pValue; + + return $this; + } + + /** + * Get DifferentOddEven. + * + * @return bool + */ + public function getDifferentOddEven() + { + return $this->differentOddEven; + } + + /** + * Set DifferentOddEven. + * + * @param bool $pValue + * + * @return $this + */ + public function setDifferentOddEven($pValue) + { + $this->differentOddEven = $pValue; + + return $this; + } + + /** + * Get DifferentFirst. + * + * @return bool + */ + public function getDifferentFirst() + { + return $this->differentFirst; + } + + /** + * Set DifferentFirst. + * + * @param bool $pValue + * + * @return $this + */ + public function setDifferentFirst($pValue) + { + $this->differentFirst = $pValue; + + return $this; + } + + /** + * Get ScaleWithDocument. + * + * @return bool + */ + public function getScaleWithDocument() + { + return $this->scaleWithDocument; + } + + /** + * Set ScaleWithDocument. + * + * @param bool $pValue + * + * @return $this + */ + public function setScaleWithDocument($pValue) + { + $this->scaleWithDocument = $pValue; + + return $this; + } + + /** + * Get AlignWithMargins. + * + * @return bool + */ + public function getAlignWithMargins() + { + return $this->alignWithMargins; + } + + /** + * Set AlignWithMargins. + * + * @param bool $pValue + * + * @return $this + */ + public function setAlignWithMargins($pValue) + { + $this->alignWithMargins = $pValue; + + return $this; + } + + /** + * Add header/footer image. + * + * @param string $location + * + * @return $this + */ + public function addImage(HeaderFooterDrawing $image, $location = self::IMAGE_HEADER_LEFT) + { + $this->headerFooterImages[$location] = $image; + + return $this; + } + + /** + * Remove header/footer image. + * + * @param string $location + * + * @return $this + */ + public function removeImage($location = self::IMAGE_HEADER_LEFT) + { + if (isset($this->headerFooterImages[$location])) { + unset($this->headerFooterImages[$location]); + } + + return $this; + } + + /** + * Set header/footer images. + * + * @param HeaderFooterDrawing[] $images + * + * @return $this + */ + public function setImages(array $images) + { + $this->headerFooterImages = $images; + + return $this; + } + + /** + * Get header/footer images. + * + * @return HeaderFooterDrawing[] + */ + public function getImages() + { + // Sort array + $images = []; + if (isset($this->headerFooterImages[self::IMAGE_HEADER_LEFT])) { + $images[self::IMAGE_HEADER_LEFT] = $this->headerFooterImages[self::IMAGE_HEADER_LEFT]; + } + if (isset($this->headerFooterImages[self::IMAGE_HEADER_CENTER])) { + $images[self::IMAGE_HEADER_CENTER] = $this->headerFooterImages[self::IMAGE_HEADER_CENTER]; + } + if (isset($this->headerFooterImages[self::IMAGE_HEADER_RIGHT])) { + $images[self::IMAGE_HEADER_RIGHT] = $this->headerFooterImages[self::IMAGE_HEADER_RIGHT]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_LEFT])) { + $images[self::IMAGE_FOOTER_LEFT] = $this->headerFooterImages[self::IMAGE_FOOTER_LEFT]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_CENTER])) { + $images[self::IMAGE_FOOTER_CENTER] = $this->headerFooterImages[self::IMAGE_FOOTER_CENTER]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_RIGHT])) { + $images[self::IMAGE_FOOTER_RIGHT] = $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT]; + } + $this->headerFooterImages = $images; + + return $this->headerFooterImages; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php new file mode 100755 index 0000000..b42c732 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php @@ -0,0 +1,24 @@ +getPath() . + $this->name . + $this->offsetX . + $this->offsetY . + $this->width . + $this->height . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Iterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Iterator.php new file mode 100755 index 0000000..6cfed37 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Iterator.php @@ -0,0 +1,85 @@ +subject = $subject; + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->subject = null; + } + + /** + * Rewind iterator. + */ + public function rewind(): void + { + $this->position = 0; + } + + /** + * Current Worksheet. + * + * @return Worksheet + */ + public function current() + { + return $this->subject->getSheet($this->position); + } + + /** + * Current key. + * + * @return int + */ + public function key() + { + return $this->position; + } + + /** + * Next value. + */ + public function next(): void + { + ++$this->position; + } + + /** + * Are there more Worksheet instances available? + * + * @return bool + */ + public function valid() + { + return $this->position < $this->subject->getSheetCount() && $this->position >= 0; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/MemoryDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/MemoryDrawing.php new file mode 100755 index 0000000..22e0909 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/MemoryDrawing.php @@ -0,0 +1,169 @@ +imageResource = null; + $this->renderingFunction = self::RENDERING_DEFAULT; + $this->mimeType = self::MIMETYPE_DEFAULT; + $this->uniqueName = md5(mt_rand(0, 9999) . time() . mt_rand(0, 9999)); + + // Initialize parent + parent::__construct(); + } + + /** + * Get image resource. + * + * @return resource + */ + public function getImageResource() + { + return $this->imageResource; + } + + /** + * Set image resource. + * + * @param resource $value + * + * @return $this + */ + public function setImageResource($value) + { + $this->imageResource = $value; + + if ($this->imageResource !== null) { + // Get width/height + $this->width = imagesx($this->imageResource); + $this->height = imagesy($this->imageResource); + } + + return $this; + } + + /** + * Get rendering function. + * + * @return string + */ + public function getRenderingFunction() + { + return $this->renderingFunction; + } + + /** + * Set rendering function. + * + * @param string $value see self::RENDERING_* + * + * @return $this + */ + public function setRenderingFunction($value) + { + $this->renderingFunction = $value; + + return $this; + } + + /** + * Get mime type. + * + * @return string + */ + public function getMimeType() + { + return $this->mimeType; + } + + /** + * Set mime type. + * + * @param string $value see self::MIMETYPE_* + * + * @return $this + */ + public function setMimeType($value) + { + $this->mimeType = $value; + + return $this; + } + + /** + * Get indexed filename (using image index). + * + * @return string + */ + public function getIndexedFilename() + { + $extension = strtolower($this->getMimeType()); + $extension = explode('/', $extension); + $extension = $extension[1]; + + return $this->uniqueName . $this->getImageIndex() . '.' . $extension; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->renderingFunction . + $this->mimeType . + $this->uniqueName . + parent::getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageMargins.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageMargins.php new file mode 100755 index 0000000..9ebfb64 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageMargins.php @@ -0,0 +1,214 @@ +left; + } + + /** + * Set Left. + * + * @param float $pValue + * + * @return $this + */ + public function setLeft($pValue) + { + $this->left = $pValue; + + return $this; + } + + /** + * Get Right. + * + * @return float + */ + public function getRight() + { + return $this->right; + } + + /** + * Set Right. + * + * @param float $pValue + * + * @return $this + */ + public function setRight($pValue) + { + $this->right = $pValue; + + return $this; + } + + /** + * Get Top. + * + * @return float + */ + public function getTop() + { + return $this->top; + } + + /** + * Set Top. + * + * @param float $pValue + * + * @return $this + */ + public function setTop($pValue) + { + $this->top = $pValue; + + return $this; + } + + /** + * Get Bottom. + * + * @return float + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Set Bottom. + * + * @param float $pValue + * + * @return $this + */ + public function setBottom($pValue) + { + $this->bottom = $pValue; + + return $this; + } + + /** + * Get Header. + * + * @return float + */ + public function getHeader() + { + return $this->header; + } + + /** + * Set Header. + * + * @param float $pValue + * + * @return $this + */ + public function setHeader($pValue) + { + $this->header = $pValue; + + return $this; + } + + /** + * Get Footer. + * + * @return float + */ + public function getFooter() + { + return $this->footer; + } + + /** + * Set Footer. + * + * @param float $pValue + * + * @return $this + */ + public function setFooter($pValue) + { + $this->footer = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageSetup.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageSetup.php new file mode 100755 index 0000000..f29dbad --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/PageSetup.php @@ -0,0 +1,835 @@ + + * Paper size taken from Office Open XML Part 4 - Markup Language Reference, page 1988:. + * + * 1 = Letter paper (8.5 in. by 11 in.) + * 2 = Letter small paper (8.5 in. by 11 in.) + * 3 = Tabloid paper (11 in. by 17 in.) + * 4 = Ledger paper (17 in. by 11 in.) + * 5 = Legal paper (8.5 in. by 14 in.) + * 6 = Statement paper (5.5 in. by 8.5 in.) + * 7 = Executive paper (7.25 in. by 10.5 in.) + * 8 = A3 paper (297 mm by 420 mm) + * 9 = A4 paper (210 mm by 297 mm) + * 10 = A4 small paper (210 mm by 297 mm) + * 11 = A5 paper (148 mm by 210 mm) + * 12 = B4 paper (250 mm by 353 mm) + * 13 = B5 paper (176 mm by 250 mm) + * 14 = Folio paper (8.5 in. by 13 in.) + * 15 = Quarto paper (215 mm by 275 mm) + * 16 = Standard paper (10 in. by 14 in.) + * 17 = Standard paper (11 in. by 17 in.) + * 18 = Note paper (8.5 in. by 11 in.) + * 19 = #9 envelope (3.875 in. by 8.875 in.) + * 20 = #10 envelope (4.125 in. by 9.5 in.) + * 21 = #11 envelope (4.5 in. by 10.375 in.) + * 22 = #12 envelope (4.75 in. by 11 in.) + * 23 = #14 envelope (5 in. by 11.5 in.) + * 24 = C paper (17 in. by 22 in.) + * 25 = D paper (22 in. by 34 in.) + * 26 = E paper (34 in. by 44 in.) + * 27 = DL envelope (110 mm by 220 mm) + * 28 = C5 envelope (162 mm by 229 mm) + * 29 = C3 envelope (324 mm by 458 mm) + * 30 = C4 envelope (229 mm by 324 mm) + * 31 = C6 envelope (114 mm by 162 mm) + * 32 = C65 envelope (114 mm by 229 mm) + * 33 = B4 envelope (250 mm by 353 mm) + * 34 = B5 envelope (176 mm by 250 mm) + * 35 = B6 envelope (176 mm by 125 mm) + * 36 = Italy envelope (110 mm by 230 mm) + * 37 = Monarch envelope (3.875 in. by 7.5 in.). + * 38 = 6 3/4 envelope (3.625 in. by 6.5 in.) + * 39 = US standard fanfold (14.875 in. by 11 in.) + * 40 = German standard fanfold (8.5 in. by 12 in.) + * 41 = German legal fanfold (8.5 in. by 13 in.) + * 42 = ISO B4 (250 mm by 353 mm) + * 43 = Japanese double postcard (200 mm by 148 mm) + * 44 = Standard paper (9 in. by 11 in.) + * 45 = Standard paper (10 in. by 11 in.) + * 46 = Standard paper (15 in. by 11 in.) + * 47 = Invite envelope (220 mm by 220 mm) + * 50 = Letter extra paper (9.275 in. by 12 in.) + * 51 = Legal extra paper (9.275 in. by 15 in.) + * 52 = Tabloid extra paper (11.69 in. by 18 in.) + * 53 = A4 extra paper (236 mm by 322 mm) + * 54 = Letter transverse paper (8.275 in. by 11 in.) + * 55 = A4 transverse paper (210 mm by 297 mm) + * 56 = Letter extra transverse paper (9.275 in. by 12 in.) + * 57 = SuperA/SuperA/A4 paper (227 mm by 356 mm) + * 58 = SuperB/SuperB/A3 paper (305 mm by 487 mm) + * 59 = Letter plus paper (8.5 in. by 12.69 in.) + * 60 = A4 plus paper (210 mm by 330 mm) + * 61 = A5 transverse paper (148 mm by 210 mm) + * 62 = JIS B5 transverse paper (182 mm by 257 mm) + * 63 = A3 extra paper (322 mm by 445 mm) + * 64 = A5 extra paper (174 mm by 235 mm) + * 65 = ISO B5 extra paper (201 mm by 276 mm) + * 66 = A2 paper (420 mm by 594 mm) + * 67 = A3 transverse paper (297 mm by 420 mm) + * 68 = A3 extra transverse paper (322 mm by 445 mm) + * + */ +class PageSetup +{ + // Paper size + const PAPERSIZE_LETTER = 1; + const PAPERSIZE_LETTER_SMALL = 2; + const PAPERSIZE_TABLOID = 3; + const PAPERSIZE_LEDGER = 4; + const PAPERSIZE_LEGAL = 5; + const PAPERSIZE_STATEMENT = 6; + const PAPERSIZE_EXECUTIVE = 7; + const PAPERSIZE_A3 = 8; + const PAPERSIZE_A4 = 9; + const PAPERSIZE_A4_SMALL = 10; + const PAPERSIZE_A5 = 11; + const PAPERSIZE_B4 = 12; + const PAPERSIZE_B5 = 13; + const PAPERSIZE_FOLIO = 14; + const PAPERSIZE_QUARTO = 15; + const PAPERSIZE_STANDARD_1 = 16; + const PAPERSIZE_STANDARD_2 = 17; + const PAPERSIZE_NOTE = 18; + const PAPERSIZE_NO9_ENVELOPE = 19; + const PAPERSIZE_NO10_ENVELOPE = 20; + const PAPERSIZE_NO11_ENVELOPE = 21; + const PAPERSIZE_NO12_ENVELOPE = 22; + const PAPERSIZE_NO14_ENVELOPE = 23; + const PAPERSIZE_C = 24; + const PAPERSIZE_D = 25; + const PAPERSIZE_E = 26; + const PAPERSIZE_DL_ENVELOPE = 27; + const PAPERSIZE_C5_ENVELOPE = 28; + const PAPERSIZE_C3_ENVELOPE = 29; + const PAPERSIZE_C4_ENVELOPE = 30; + const PAPERSIZE_C6_ENVELOPE = 31; + const PAPERSIZE_C65_ENVELOPE = 32; + const PAPERSIZE_B4_ENVELOPE = 33; + const PAPERSIZE_B5_ENVELOPE = 34; + const PAPERSIZE_B6_ENVELOPE = 35; + const PAPERSIZE_ITALY_ENVELOPE = 36; + const PAPERSIZE_MONARCH_ENVELOPE = 37; + const PAPERSIZE_6_3_4_ENVELOPE = 38; + const PAPERSIZE_US_STANDARD_FANFOLD = 39; + const PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40; + const PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41; + const PAPERSIZE_ISO_B4 = 42; + const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43; + const PAPERSIZE_STANDARD_PAPER_1 = 44; + const PAPERSIZE_STANDARD_PAPER_2 = 45; + const PAPERSIZE_STANDARD_PAPER_3 = 46; + const PAPERSIZE_INVITE_ENVELOPE = 47; + const PAPERSIZE_LETTER_EXTRA_PAPER = 48; + const PAPERSIZE_LEGAL_EXTRA_PAPER = 49; + const PAPERSIZE_TABLOID_EXTRA_PAPER = 50; + const PAPERSIZE_A4_EXTRA_PAPER = 51; + const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52; + const PAPERSIZE_A4_TRANSVERSE_PAPER = 53; + const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54; + const PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55; + const PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56; + const PAPERSIZE_LETTER_PLUS_PAPER = 57; + const PAPERSIZE_A4_PLUS_PAPER = 58; + const PAPERSIZE_A5_TRANSVERSE_PAPER = 59; + const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60; + const PAPERSIZE_A3_EXTRA_PAPER = 61; + const PAPERSIZE_A5_EXTRA_PAPER = 62; + const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63; + const PAPERSIZE_A2_PAPER = 64; + const PAPERSIZE_A3_TRANSVERSE_PAPER = 65; + const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66; + + // Page orientation + const ORIENTATION_DEFAULT = 'default'; + const ORIENTATION_LANDSCAPE = 'landscape'; + const ORIENTATION_PORTRAIT = 'portrait'; + + // Print Range Set Method + const SETPRINTRANGE_OVERWRITE = 'O'; + const SETPRINTRANGE_INSERT = 'I'; + + /** + * Paper size. + * + * @var int + */ + private $paperSize = self::PAPERSIZE_LETTER; + + /** + * Orientation. + * + * @var string + */ + private $orientation = self::ORIENTATION_DEFAULT; + + /** + * Scale (Print Scale). + * + * Print scaling. Valid values range from 10 to 400 + * This setting is overridden when fitToWidth and/or fitToHeight are in use + * + * @var null|int + */ + private $scale = 100; + + /** + * Fit To Page + * Whether scale or fitToWith / fitToHeight applies. + * + * @var bool + */ + private $fitToPage = false; + + /** + * Fit To Height + * Number of vertical pages to fit on. + * + * @var null|int + */ + private $fitToHeight = 1; + + /** + * Fit To Width + * Number of horizontal pages to fit on. + * + * @var null|int + */ + private $fitToWidth = 1; + + /** + * Columns to repeat at left. + * + * @var array Containing start column and end column, empty array if option unset + */ + private $columnsToRepeatAtLeft = ['', '']; + + /** + * Rows to repeat at top. + * + * @var array Containing start row number and end row number, empty array if option unset + */ + private $rowsToRepeatAtTop = [0, 0]; + + /** + * Center page horizontally. + * + * @var bool + */ + private $horizontalCentered = false; + + /** + * Center page vertically. + * + * @var bool + */ + private $verticalCentered = false; + + /** + * Print area. + * + * @var string + */ + private $printArea; + + /** + * First page number. + * + * @var int + */ + private $firstPageNumber; + + /** + * Create a new PageSetup. + */ + public function __construct() + { + } + + /** + * Get Paper Size. + * + * @return int + */ + public function getPaperSize() + { + return $this->paperSize; + } + + /** + * Set Paper Size. + * + * @param int $pValue see self::PAPERSIZE_* + * + * @return $this + */ + public function setPaperSize($pValue) + { + $this->paperSize = $pValue; + + return $this; + } + + /** + * Get Orientation. + * + * @return string + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Set Orientation. + * + * @param string $pValue see self::ORIENTATION_* + * + * @return $this + */ + public function setOrientation($pValue) + { + $this->orientation = $pValue; + + return $this; + } + + /** + * Get Scale. + * + * @return null|int + */ + public function getScale() + { + return $this->scale; + } + + /** + * Set Scale. + * Print scaling. Valid values range from 10 to 400 + * This setting is overridden when fitToWidth and/or fitToHeight are in use. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth + * + * @return $this + */ + public function setScale($pValue, $pUpdate = true) + { + // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, + // but it is apparently still able to handle any scale >= 0, where 0 results in 100 + if (($pValue >= 0) || $pValue === null) { + $this->scale = $pValue; + if ($pUpdate) { + $this->fitToPage = false; + } + } else { + throw new PhpSpreadsheetException('Scale must not be negative'); + } + + return $this; + } + + /** + * Get Fit To Page. + * + * @return bool + */ + public function getFitToPage() + { + return $this->fitToPage; + } + + /** + * Set Fit To Page. + * + * @param bool $pValue + * + * @return $this + */ + public function setFitToPage($pValue) + { + $this->fitToPage = $pValue; + + return $this; + } + + /** + * Get Fit To Height. + * + * @return null|int + */ + public function getFitToHeight() + { + return $this->fitToHeight; + } + + /** + * Set Fit To Height. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so it applies rather than scaling + * + * @return $this + */ + public function setFitToHeight($pValue, $pUpdate = true) + { + $this->fitToHeight = $pValue; + if ($pUpdate) { + $this->fitToPage = true; + } + + return $this; + } + + /** + * Get Fit To Width. + * + * @return null|int + */ + public function getFitToWidth() + { + return $this->fitToWidth; + } + + /** + * Set Fit To Width. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so it applies rather than scaling + * + * @return $this + */ + public function setFitToWidth($pValue, $pUpdate = true) + { + $this->fitToWidth = $pValue; + if ($pUpdate) { + $this->fitToPage = true; + } + + return $this; + } + + /** + * Is Columns to repeat at left set? + * + * @return bool + */ + public function isColumnsToRepeatAtLeftSet() + { + if (is_array($this->columnsToRepeatAtLeft)) { + if ($this->columnsToRepeatAtLeft[0] != '' && $this->columnsToRepeatAtLeft[1] != '') { + return true; + } + } + + return false; + } + + /** + * Get Columns to repeat at left. + * + * @return array Containing start column and end column, empty array if option unset + */ + public function getColumnsToRepeatAtLeft() + { + return $this->columnsToRepeatAtLeft; + } + + /** + * Set Columns to repeat at left. + * + * @param array $pValue Containing start column and end column, empty array if option unset + * + * @return $this + */ + public function setColumnsToRepeatAtLeft(array $pValue) + { + $this->columnsToRepeatAtLeft = $pValue; + + return $this; + } + + /** + * Set Columns to repeat at left by start and end. + * + * @param string $pStart eg: 'A' + * @param string $pEnd eg: 'B' + * + * @return $this + */ + public function setColumnsToRepeatAtLeftByStartAndEnd($pStart, $pEnd) + { + $this->columnsToRepeatAtLeft = [$pStart, $pEnd]; + + return $this; + } + + /** + * Is Rows to repeat at top set? + * + * @return bool + */ + public function isRowsToRepeatAtTopSet() + { + if (is_array($this->rowsToRepeatAtTop)) { + if ($this->rowsToRepeatAtTop[0] != 0 && $this->rowsToRepeatAtTop[1] != 0) { + return true; + } + } + + return false; + } + + /** + * Get Rows to repeat at top. + * + * @return array Containing start column and end column, empty array if option unset + */ + public function getRowsToRepeatAtTop() + { + return $this->rowsToRepeatAtTop; + } + + /** + * Set Rows to repeat at top. + * + * @param array $pValue Containing start column and end column, empty array if option unset + * + * @return $this + */ + public function setRowsToRepeatAtTop(array $pValue) + { + $this->rowsToRepeatAtTop = $pValue; + + return $this; + } + + /** + * Set Rows to repeat at top by start and end. + * + * @param int $pStart eg: 1 + * @param int $pEnd eg: 1 + * + * @return $this + */ + public function setRowsToRepeatAtTopByStartAndEnd($pStart, $pEnd) + { + $this->rowsToRepeatAtTop = [$pStart, $pEnd]; + + return $this; + } + + /** + * Get center page horizontally. + * + * @return bool + */ + public function getHorizontalCentered() + { + return $this->horizontalCentered; + } + + /** + * Set center page horizontally. + * + * @param bool $value + * + * @return $this + */ + public function setHorizontalCentered($value) + { + $this->horizontalCentered = $value; + + return $this; + } + + /** + * Get center page vertically. + * + * @return bool + */ + public function getVerticalCentered() + { + return $this->verticalCentered; + } + + /** + * Set center page vertically. + * + * @param bool $value + * + * @return $this + */ + public function setVerticalCentered($value) + { + $this->verticalCentered = $value; + + return $this; + } + + /** + * Get print area. + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string + * Otherwise, the specific range identified by the value of $index will be returned + * Print areas are numbered from 1 + * + * @return string + */ + public function getPrintArea($index = 0) + { + if ($index == 0) { + return $this->printArea; + } + $printAreas = explode(',', $this->printArea); + if (isset($printAreas[$index - 1])) { + return $printAreas[$index - 1]; + } + + throw new PhpSpreadsheetException('Requested Print Area does not exist'); + } + + /** + * Is print area set? + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or an index value of 0, will identify whether any print range is set + * Otherwise, existence of the range identified by the value of $index will be returned + * Print areas are numbered from 1 + * + * @return bool + */ + public function isPrintAreaSet($index = 0) + { + if ($index == 0) { + return $this->printArea !== null; + } + $printAreas = explode(',', $this->printArea); + + return isset($printAreas[$index - 1]); + } + + /** + * Clear a print area. + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or an index value of 0, will clear all print ranges that are set + * Otherwise, the range identified by the value of $index will be removed from the series + * Print areas are numbered from 1 + * + * @return $this + */ + public function clearPrintArea($index = 0) + { + if ($index == 0) { + $this->printArea = null; + } else { + $printAreas = explode(',', $this->printArea); + if (isset($printAreas[$index - 1])) { + unset($printAreas[$index - 1]); + $this->printArea = implode(',', $printAreas); + } + } + + return $this; + } + + /** + * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'. + * + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * When the method is "O"verwrite, then a positive integer index will overwrite that indexed + * entry in the print areas list; a negative index value will identify which entry to + * overwrite working bacward through the print area to the list, with the last entry as -1. + * Specifying an index value of 0, will overwrite all existing print ranges. + * When the method is "I"nsert, then a positive index will insert after that indexed entry in + * the print areas list, while a negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * @param string $method Determines the method used when setting multiple print areas + * Default behaviour, or the "O" method, overwrites existing print area + * The "I" method, inserts the new print area before any specified index, or at the end of the list + * + * @return $this + */ + public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) + { + if (strpos($value, '!') !== false) { + throw new PhpSpreadsheetException('Cell coordinate must not specify a worksheet.'); + } elseif (strpos($value, ':') === false) { + throw new PhpSpreadsheetException('Cell coordinate must be a range of cells.'); + } elseif (strpos($value, '$') !== false) { + throw new PhpSpreadsheetException('Cell coordinate must not be absolute.'); + } + $value = strtoupper($value); + + if ($method == self::SETPRINTRANGE_OVERWRITE) { + if ($index == 0) { + $this->printArea = $value; + } else { + $printAreas = explode(',', $this->printArea); + if ($index < 0) { + $index = count($printAreas) - abs($index) + 1; + } + if (($index <= 0) || ($index > count($printAreas))) { + throw new PhpSpreadsheetException('Invalid index for setting print range.'); + } + $printAreas[$index - 1] = $value; + $this->printArea = implode(',', $printAreas); + } + } elseif ($method == self::SETPRINTRANGE_INSERT) { + if ($index == 0) { + $this->printArea .= ($this->printArea == '') ? $value : ',' . $value; + } else { + $printAreas = explode(',', $this->printArea); + if ($index < 0) { + $index = abs($index) - 1; + } + if ($index > count($printAreas)) { + throw new PhpSpreadsheetException('Invalid index for setting print range.'); + } + $printAreas = array_merge(array_slice($printAreas, 0, $index), [$value], array_slice($printAreas, $index)); + $this->printArea = implode(',', $printAreas); + } + } else { + throw new PhpSpreadsheetException('Invalid method for setting print range.'); + } + + return $this; + } + + /** + * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas. + * + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * A positive index will insert after that indexed entry in the print areas list, while a + * negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * + * @return $this + */ + public function addPrintArea($value, $index = -1) + { + return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); + } + + /** + * Set print area. + * + * @param int $column1 Column 1 + * @param int $row1 Row 1 + * @param int $column2 Column 2 + * @param int $row2 Row 2 + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * When the method is "O"verwrite, then a positive integer index will overwrite that indexed + * entry in the print areas list; a negative index value will identify which entry to + * overwrite working backward through the print area to the list, with the last entry as -1. + * Specifying an index value of 0, will overwrite all existing print ranges. + * When the method is "I"nsert, then a positive index will insert after that indexed entry in + * the print areas list, while a negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * @param string $method Determines the method used when setting multiple print areas + * Default behaviour, or the "O" method, overwrites existing print area + * The "I" method, inserts the new print area before any specified index, or at the end of the list + * + * @return $this + */ + public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) + { + return $this->setPrintArea( + Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, + $index, + $method + ); + } + + /** + * Add a new print area to the list of print areas. + * + * @param int $column1 Start Column for the print area + * @param int $row1 Start Row for the print area + * @param int $column2 End Column for the print area + * @param int $row2 End Row for the print area + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * A positive index will insert after that indexed entry in the print areas list, while a + * negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * + * @return $this + */ + public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) + { + return $this->setPrintArea( + Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, + $index, + self::SETPRINTRANGE_INSERT + ); + } + + /** + * Get first page number. + * + * @return int + */ + public function getFirstPageNumber() + { + return $this->firstPageNumber; + } + + /** + * Set first page number. + * + * @param int $value + * + * @return $this + */ + public function setFirstPageNumber($value) + { + $this->firstPageNumber = $value; + + return $this; + } + + /** + * Reset first page number. + * + * @return $this + */ + public function resetFirstPageNumber() + { + return $this->setFirstPageNumber(null); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Protection.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Protection.php new file mode 100755 index 0000000..81abc0b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Protection.php @@ -0,0 +1,698 @@ +sheet || + $this->objects || + $this->scenarios || + $this->formatCells || + $this->formatColumns || + $this->formatRows || + $this->insertColumns || + $this->insertRows || + $this->insertHyperlinks || + $this->deleteColumns || + $this->deleteRows || + $this->selectLockedCells || + $this->sort || + $this->autoFilter || + $this->pivotTables || + $this->selectUnlockedCells; + } + + /** + * Get Sheet. + * + * @return bool + */ + public function getSheet() + { + return $this->sheet; + } + + /** + * Set Sheet. + * + * @param bool $pValue + * + * @return $this + */ + public function setSheet($pValue) + { + $this->sheet = $pValue; + + return $this; + } + + /** + * Get Objects. + * + * @return bool + */ + public function getObjects() + { + return $this->objects; + } + + /** + * Set Objects. + * + * @param bool $pValue + * + * @return $this + */ + public function setObjects($pValue) + { + $this->objects = $pValue; + + return $this; + } + + /** + * Get Scenarios. + * + * @return bool + */ + public function getScenarios() + { + return $this->scenarios; + } + + /** + * Set Scenarios. + * + * @param bool $pValue + * + * @return $this + */ + public function setScenarios($pValue) + { + $this->scenarios = $pValue; + + return $this; + } + + /** + * Get FormatCells. + * + * @return bool + */ + public function getFormatCells() + { + return $this->formatCells; + } + + /** + * Set FormatCells. + * + * @param bool $pValue + * + * @return $this + */ + public function setFormatCells($pValue) + { + $this->formatCells = $pValue; + + return $this; + } + + /** + * Get FormatColumns. + * + * @return bool + */ + public function getFormatColumns() + { + return $this->formatColumns; + } + + /** + * Set FormatColumns. + * + * @param bool $pValue + * + * @return $this + */ + public function setFormatColumns($pValue) + { + $this->formatColumns = $pValue; + + return $this; + } + + /** + * Get FormatRows. + * + * @return bool + */ + public function getFormatRows() + { + return $this->formatRows; + } + + /** + * Set FormatRows. + * + * @param bool $pValue + * + * @return $this + */ + public function setFormatRows($pValue) + { + $this->formatRows = $pValue; + + return $this; + } + + /** + * Get InsertColumns. + * + * @return bool + */ + public function getInsertColumns() + { + return $this->insertColumns; + } + + /** + * Set InsertColumns. + * + * @param bool $pValue + * + * @return $this + */ + public function setInsertColumns($pValue) + { + $this->insertColumns = $pValue; + + return $this; + } + + /** + * Get InsertRows. + * + * @return bool + */ + public function getInsertRows() + { + return $this->insertRows; + } + + /** + * Set InsertRows. + * + * @param bool $pValue + * + * @return $this + */ + public function setInsertRows($pValue) + { + $this->insertRows = $pValue; + + return $this; + } + + /** + * Get InsertHyperlinks. + * + * @return bool + */ + public function getInsertHyperlinks() + { + return $this->insertHyperlinks; + } + + /** + * Set InsertHyperlinks. + * + * @param bool $pValue + * + * @return $this + */ + public function setInsertHyperlinks($pValue) + { + $this->insertHyperlinks = $pValue; + + return $this; + } + + /** + * Get DeleteColumns. + * + * @return bool + */ + public function getDeleteColumns() + { + return $this->deleteColumns; + } + + /** + * Set DeleteColumns. + * + * @param bool $pValue + * + * @return $this + */ + public function setDeleteColumns($pValue) + { + $this->deleteColumns = $pValue; + + return $this; + } + + /** + * Get DeleteRows. + * + * @return bool + */ + public function getDeleteRows() + { + return $this->deleteRows; + } + + /** + * Set DeleteRows. + * + * @param bool $pValue + * + * @return $this + */ + public function setDeleteRows($pValue) + { + $this->deleteRows = $pValue; + + return $this; + } + + /** + * Get SelectLockedCells. + * + * @return bool + */ + public function getSelectLockedCells() + { + return $this->selectLockedCells; + } + + /** + * Set SelectLockedCells. + * + * @param bool $pValue + * + * @return $this + */ + public function setSelectLockedCells($pValue) + { + $this->selectLockedCells = $pValue; + + return $this; + } + + /** + * Get Sort. + * + * @return bool + */ + public function getSort() + { + return $this->sort; + } + + /** + * Set Sort. + * + * @param bool $pValue + * + * @return $this + */ + public function setSort($pValue) + { + $this->sort = $pValue; + + return $this; + } + + /** + * Get AutoFilter. + * + * @return bool + */ + public function getAutoFilter() + { + return $this->autoFilter; + } + + /** + * Set AutoFilter. + * + * @param bool $pValue + * + * @return $this + */ + public function setAutoFilter($pValue) + { + $this->autoFilter = $pValue; + + return $this; + } + + /** + * Get PivotTables. + * + * @return bool + */ + public function getPivotTables() + { + return $this->pivotTables; + } + + /** + * Set PivotTables. + * + * @param bool $pValue + * + * @return $this + */ + public function setPivotTables($pValue) + { + $this->pivotTables = $pValue; + + return $this; + } + + /** + * Get SelectUnlockedCells. + * + * @return bool + */ + public function getSelectUnlockedCells() + { + return $this->selectUnlockedCells; + } + + /** + * Set SelectUnlockedCells. + * + * @param bool $pValue + * + * @return $this + */ + public function setSelectUnlockedCells($pValue) + { + $this->selectUnlockedCells = $pValue; + + return $this; + } + + /** + * Get hashed password. + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set Password. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return $this + */ + public function setPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $salt = $this->generateSalt(); + $this->setSalt($salt); + $pValue = PasswordHasher::hashPassword($pValue, $this->getAlgorithm(), $this->getSalt(), $this->getSpinCount()); + } + + $this->password = $pValue; + + return $this; + } + + /** + * Create a pseudorandom string. + */ + private function generateSalt(): string + { + return base64_encode(random_bytes(16)); + } + + /** + * Get algorithm name. + */ + public function getAlgorithm(): string + { + return $this->algorithm; + } + + /** + * Set algorithm name. + */ + public function setAlgorithm(string $algorithm): void + { + $this->algorithm = $algorithm; + } + + /** + * Get salt value. + */ + public function getSalt(): string + { + return $this->salt; + } + + /** + * Set salt value. + */ + public function setSalt(string $salt): void + { + $this->salt = $salt; + } + + /** + * Get spin count. + */ + public function getSpinCount(): int + { + return $this->spinCount; + } + + /** + * Set spin count. + */ + public function setSpinCount(int $spinCount): void + { + $this->spinCount = $spinCount; + } + + /** + * Verify that the given non-hashed password can "unlock" the protection. + */ + public function verify(string $password): bool + { + if (!$this->isProtectionEnabled()) { + return true; + } + + $hash = PasswordHasher::hashPassword($password, $this->getAlgorithm(), $this->getSalt(), $this->getSpinCount()); + + return $this->getPassword() === $hash; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Row.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Row.php new file mode 100755 index 0000000..4f48a34 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Row.php @@ -0,0 +1,74 @@ +worksheet = $worksheet; + $this->rowIndex = $rowIndex; + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->worksheet = null; + } + + /** + * Get row index. + * + * @return int + */ + public function getRowIndex() + { + return $this->rowIndex; + } + + /** + * Get cell iterator. + * + * @param string $startColumn The column address at which to start iterating + * @param string $endColumn Optionally, the column address at which to stop iterating + * + * @return RowCellIterator + */ + public function getCellIterator($startColumn = 'A', $endColumn = null) + { + return new RowCellIterator($this->worksheet, $this->rowIndex, $startColumn, $endColumn); + } + + /** + * Returns bound worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowCellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowCellIterator.php new file mode 100755 index 0000000..f5576dc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -0,0 +1,195 @@ +worksheet = $worksheet; + $this->rowIndex = $rowIndex; + $this->resetEnd($endColumn); + $this->resetStart($startColumn); + } + + /** + * (Re)Set the start column and the current column pointer. + * + * @param string $startColumn The column address at which to start iterating + * + * @return $this + */ + public function resetStart($startColumn = 'A') + { + $this->startColumnIndex = Coordinate::columnIndexFromString($startColumn); + $this->adjustForExistingOnlyRange(); + $this->seek(Coordinate::stringFromColumnIndex($this->startColumnIndex)); + + return $this; + } + + /** + * (Re)Set the end column. + * + * @param string $endColumn The column address at which to stop iterating + * + * @return $this + */ + public function resetEnd($endColumn = null) + { + $endColumn = $endColumn ? $endColumn : $this->worksheet->getHighestColumn(); + $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn); + $this->adjustForExistingOnlyRange(); + + return $this; + } + + /** + * Set the column pointer to the selected column. + * + * @param string $column The column address to set the current pointer at + * + * @return $this + */ + public function seek($column = 'A') + { + $column = Coordinate::columnIndexFromString($column); + if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) { + throw new PhpSpreadsheetException("Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})"); + } elseif ($this->onlyExistingCells && !($this->worksheet->cellExistsByColumnAndRow($column, $this->rowIndex))) { + throw new PhpSpreadsheetException('In "IterateOnlyExistingCells" mode and Cell does not exist'); + } + $this->currentColumnIndex = $column; + + return $this; + } + + /** + * Rewind the iterator to the starting column. + */ + public function rewind(): void + { + $this->currentColumnIndex = $this->startColumnIndex; + } + + /** + * Return the current cell in this worksheet row. + * + * @return \PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function current() + { + return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex); + } + + /** + * Return the current iterator key. + * + * @return string + */ + public function key() + { + return Coordinate::stringFromColumnIndex($this->currentColumnIndex); + } + + /** + * Set the iterator to its next value. + */ + public function next(): void + { + do { + ++$this->currentColumnIndex; + } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex <= $this->endColumnIndex)); + } + + /** + * Set the iterator to its previous value. + */ + public function prev(): void + { + do { + --$this->currentColumnIndex; + } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex >= $this->startColumnIndex)); + } + + /** + * Indicate if more columns exist in the worksheet range of columns that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; + } + + /** + * Return the current iterator position. + * + * @return int + */ + public function getCurrentColumnIndex() + { + return $this->currentColumnIndex; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + */ + protected function adjustForExistingOnlyRange(): void + { + if ($this->onlyExistingCells) { + while ((!$this->worksheet->cellExistsByColumnAndRow($this->startColumnIndex, $this->rowIndex)) && ($this->startColumnIndex <= $this->endColumnIndex)) { + ++$this->startColumnIndex; + } + if ($this->startColumnIndex > $this->endColumnIndex) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + while ((!$this->worksheet->cellExistsByColumnAndRow($this->endColumnIndex, $this->rowIndex)) && ($this->endColumnIndex >= $this->startColumnIndex)) { + --$this->endColumnIndex; + } + if ($this->endColumnIndex < $this->startColumnIndex) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowDimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowDimension.php new file mode 100755 index 0000000..c4a87bd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowDimension.php @@ -0,0 +1,115 @@ +rowIndex = $pIndex; + + // set dimension as unformatted by default + parent::__construct(null); + } + + /** + * Get Row Index. + * + * @return int + */ + public function getRowIndex() + { + return $this->rowIndex; + } + + /** + * Set Row Index. + * + * @param int $pValue + * + * @return $this + */ + public function setRowIndex($pValue) + { + $this->rowIndex = $pValue; + + return $this; + } + + /** + * Get Row Height. + * + * @return float + */ + public function getRowHeight() + { + return $this->height; + } + + /** + * Set Row Height. + * + * @param float $pValue + * + * @return $this + */ + public function setRowHeight($pValue) + { + $this->height = $pValue; + + return $this; + } + + /** + * Get ZeroHeight. + * + * @return bool + */ + public function getZeroHeight() + { + return $this->zeroHeight; + } + + /** + * Set ZeroHeight. + * + * @param bool $pValue + * + * @return $this + */ + public function setZeroHeight($pValue) + { + $this->zeroHeight = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowIterator.php new file mode 100755 index 0000000..4254253 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/RowIterator.php @@ -0,0 +1,167 @@ +subject = $subject; + $this->resetEnd($endRow); + $this->resetStart($startRow); + } + + /** + * Destructor. + */ + public function __destruct() + { + $this->subject = null; + } + + /** + * (Re)Set the start row and the current row pointer. + * + * @param int $startRow The row number at which to start iterating + * + * @return $this + */ + public function resetStart($startRow = 1) + { + if ($startRow > $this->subject->getHighestRow()) { + throw new PhpSpreadsheetException("Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})"); + } + + $this->startRow = $startRow; + if ($this->endRow < $this->startRow) { + $this->endRow = $this->startRow; + } + $this->seek($startRow); + + return $this; + } + + /** + * (Re)Set the end row. + * + * @param int $endRow The row number at which to stop iterating + * + * @return $this + */ + public function resetEnd($endRow = null) + { + $this->endRow = ($endRow) ? $endRow : $this->subject->getHighestRow(); + + return $this; + } + + /** + * Set the row pointer to the selected row. + * + * @param int $row The row number to set the current pointer at + * + * @return $this + */ + public function seek($row = 1) + { + if (($row < $this->startRow) || ($row > $this->endRow)) { + throw new PhpSpreadsheetException("Row $row is out of range ({$this->startRow} - {$this->endRow})"); + } + $this->position = $row; + + return $this; + } + + /** + * Rewind the iterator to the starting row. + */ + public function rewind(): void + { + $this->position = $this->startRow; + } + + /** + * Return the current row in this worksheet. + * + * @return Row + */ + public function current() + { + return new Row($this->subject, $this->position); + } + + /** + * Return the current iterator key. + * + * @return int + */ + public function key() + { + return $this->position; + } + + /** + * Set the iterator to its next value. + */ + public function next(): void + { + ++$this->position; + } + + /** + * Set the iterator to its previous value. + */ + public function prev(): void + { + --$this->position; + } + + /** + * Indicate if more rows exist in the worksheet range of rows that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->position <= $this->endRow && $this->position >= $this->startRow; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/SheetView.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/SheetView.php new file mode 100755 index 0000000..2f7d381 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/SheetView.php @@ -0,0 +1,193 @@ +zoomScale; + } + + /** + * Set ZoomScale. + * Valid values range from 10 to 400. + * + * @param int $pValue + * + * @return $this + */ + public function setZoomScale($pValue) + { + // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, + // but it is apparently still able to handle any scale >= 1 + if (($pValue >= 1) || $pValue === null) { + $this->zoomScale = $pValue; + } else { + throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.'); + } + + return $this; + } + + /** + * Get ZoomScaleNormal. + * + * @return int + */ + public function getZoomScaleNormal() + { + return $this->zoomScaleNormal; + } + + /** + * Set ZoomScale. + * Valid values range from 10 to 400. + * + * @param int $pValue + * + * @return $this + */ + public function setZoomScaleNormal($pValue) + { + if (($pValue >= 1) || $pValue === null) { + $this->zoomScaleNormal = $pValue; + } else { + throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.'); + } + + return $this; + } + + /** + * Set ShowZeroes setting. + * + * @param bool $pValue + */ + public function setShowZeros($pValue): void + { + $this->showZeros = $pValue; + } + + /** + * @return bool + */ + public function getShowZeros() + { + return $this->showZeros; + } + + /** + * Get View. + * + * @return string + */ + public function getView() + { + return $this->sheetviewType; + } + + /** + * Set View. + * + * Valid values are + * 'normal' self::SHEETVIEW_NORMAL + * 'pageLayout' self::SHEETVIEW_PAGE_LAYOUT + * 'pageBreakPreview' self::SHEETVIEW_PAGE_BREAK_PREVIEW + * + * @param string $pValue + * + * @return $this + */ + public function setView($pValue) + { + // MS Excel 2007 allows setting the view to 'normal', 'pageLayout' or 'pageBreakPreview' via the user interface + if ($pValue === null) { + $pValue = self::SHEETVIEW_NORMAL; + } + if (in_array($pValue, self::$sheetViewTypes)) { + $this->sheetviewType = $pValue; + } else { + throw new PhpSpreadsheetException('Invalid sheetview layout type.'); + } + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Worksheet.php new file mode 100755 index 0000000..e2b0dd8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Worksheet/Worksheet.php @@ -0,0 +1,3013 @@ +parent = $parent; + $this->setTitle($pTitle, false); + // setTitle can change $pTitle + $this->setCodeName($this->getTitle()); + $this->setSheetState(self::SHEETSTATE_VISIBLE); + + $this->cellCollection = CellsFactory::getInstance($this); + // Set page setup + $this->pageSetup = new PageSetup(); + // Set page margins + $this->pageMargins = new PageMargins(); + // Set page header/footer + $this->headerFooter = new HeaderFooter(); + // Set sheet view + $this->sheetView = new SheetView(); + // Drawing collection + $this->drawingCollection = new ArrayObject(); + // Chart collection + $this->chartCollection = new ArrayObject(); + // Protection + $this->protection = new Protection(); + // Default row dimension + $this->defaultRowDimension = new RowDimension(null); + // Default column dimension + $this->defaultColumnDimension = new ColumnDimension(null); + $this->autoFilter = new AutoFilter(null, $this); + } + + /** + * Disconnect all cells from this Worksheet object, + * typically so that the worksheet object can be unset. + */ + public function disconnectCells(): void + { + if ($this->cellCollection !== null) { + $this->cellCollection->unsetWorksheetCells(); + $this->cellCollection = null; + } + // detach ourself from the workbook, so that it can then delete this worksheet successfully + $this->parent = null; + } + + /** + * Code to execute when this worksheet is unset(). + */ + public function __destruct() + { + Calculation::getInstance($this->parent)->clearCalculationCacheForWorksheet($this->title); + + $this->disconnectCells(); + } + + /** + * Return the cell collection. + * + * @return Cells + */ + public function getCellCollection() + { + return $this->cellCollection; + } + + /** + * Get array of invalid characters for sheet title. + * + * @return array + */ + public static function getInvalidCharacters() + { + return self::$invalidCharacters; + } + + /** + * Check sheet code name for valid Excel syntax. + * + * @param string $pValue The string to check + * + * @return string The valid string + */ + private static function checkSheetCodeName($pValue) + { + $CharCount = Shared\StringHelper::countCharacters($pValue); + if ($CharCount == 0) { + throw new Exception('Sheet code name cannot be empty.'); + } + // Some of the printable ASCII characters are invalid: * : / \ ? [ ] and first and last characters cannot be a "'" + if ((str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) || + (Shared\StringHelper::substring($pValue, -1, 1) == '\'') || + (Shared\StringHelper::substring($pValue, 0, 1) == '\'')) { + throw new Exception('Invalid character found in sheet code name'); + } + + // Enforce maximum characters allowed for sheet title + if ($CharCount > self::SHEET_TITLE_MAXIMUM_LENGTH) { + throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet code name.'); + } + + return $pValue; + } + + /** + * Check sheet title for valid Excel syntax. + * + * @param string $pValue The string to check + * + * @return string The valid string + */ + private static function checkSheetTitle($pValue) + { + // Some of the printable ASCII characters are invalid: * : / \ ? [ ] + if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) { + throw new Exception('Invalid character found in sheet title'); + } + + // Enforce maximum characters allowed for sheet title + if (Shared\StringHelper::countCharacters($pValue) > self::SHEET_TITLE_MAXIMUM_LENGTH) { + throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet title.'); + } + + return $pValue; + } + + /** + * Get a sorted list of all cell coordinates currently held in the collection by row and column. + * + * @param bool $sorted Also sort the cell collection? + * + * @return string[] + */ + public function getCoordinates($sorted = true) + { + if ($this->cellCollection == null) { + return []; + } + + if ($sorted) { + return $this->cellCollection->getSortedCoordinates(); + } + + return $this->cellCollection->getCoordinates(); + } + + /** + * Get collection of row dimensions. + * + * @return RowDimension[] + */ + public function getRowDimensions() + { + return $this->rowDimensions; + } + + /** + * Get default row dimension. + * + * @return RowDimension + */ + public function getDefaultRowDimension() + { + return $this->defaultRowDimension; + } + + /** + * Get collection of column dimensions. + * + * @return ColumnDimension[] + */ + public function getColumnDimensions() + { + return $this->columnDimensions; + } + + /** + * Get default column dimension. + * + * @return ColumnDimension + */ + public function getDefaultColumnDimension() + { + return $this->defaultColumnDimension; + } + + /** + * Get collection of drawings. + * + * @return BaseDrawing[] + */ + public function getDrawingCollection() + { + return $this->drawingCollection; + } + + /** + * Get collection of charts. + * + * @return Chart[] + */ + public function getChartCollection() + { + return $this->chartCollection; + } + + /** + * Add chart. + * + * @param null|int $iChartIndex Index where chart should go (0,1,..., or null for last) + * + * @return Chart + */ + public function addChart(Chart $pChart, $iChartIndex = null) + { + $pChart->setWorksheet($this); + if ($iChartIndex === null) { + $this->chartCollection[] = $pChart; + } else { + // Insert the chart at the requested index + array_splice($this->chartCollection, $iChartIndex, 0, [$pChart]); + } + + return $pChart; + } + + /** + * Return the count of charts on this worksheet. + * + * @return int The number of charts + */ + public function getChartCount() + { + return count($this->chartCollection); + } + + /** + * Get a chart by its index position. + * + * @param string $index Chart index position + * + * @return Chart|false + */ + public function getChartByIndex($index) + { + $chartCount = count($this->chartCollection); + if ($chartCount == 0) { + return false; + } + if ($index === null) { + $index = --$chartCount; + } + if (!isset($this->chartCollection[$index])) { + return false; + } + + return $this->chartCollection[$index]; + } + + /** + * Return an array of the names of charts on this worksheet. + * + * @return string[] The names of charts + */ + public function getChartNames() + { + $chartNames = []; + foreach ($this->chartCollection as $chart) { + $chartNames[] = $chart->getName(); + } + + return $chartNames; + } + + /** + * Get a chart by name. + * + * @param string $chartName Chart name + * + * @return Chart|false + */ + public function getChartByName($chartName) + { + $chartCount = count($this->chartCollection); + if ($chartCount == 0) { + return false; + } + foreach ($this->chartCollection as $index => $chart) { + if ($chart->getName() == $chartName) { + return $this->chartCollection[$index]; + } + } + + return false; + } + + /** + * Refresh column dimensions. + * + * @return $this + */ + public function refreshColumnDimensions() + { + $currentColumnDimensions = $this->getColumnDimensions(); + $newColumnDimensions = []; + + foreach ($currentColumnDimensions as $objColumnDimension) { + $newColumnDimensions[$objColumnDimension->getColumnIndex()] = $objColumnDimension; + } + + $this->columnDimensions = $newColumnDimensions; + + return $this; + } + + /** + * Refresh row dimensions. + * + * @return $this + */ + public function refreshRowDimensions() + { + $currentRowDimensions = $this->getRowDimensions(); + $newRowDimensions = []; + + foreach ($currentRowDimensions as $objRowDimension) { + $newRowDimensions[$objRowDimension->getRowIndex()] = $objRowDimension; + } + + $this->rowDimensions = $newRowDimensions; + + return $this; + } + + /** + * Calculate worksheet dimension. + * + * @return string String containing the dimension of this worksheet + */ + public function calculateWorksheetDimension() + { + // Return + return 'A1:' . $this->getHighestColumn() . $this->getHighestRow(); + } + + /** + * Calculate worksheet data dimension. + * + * @return string String containing the dimension of this worksheet that actually contain data + */ + public function calculateWorksheetDataDimension() + { + // Return + return 'A1:' . $this->getHighestDataColumn() . $this->getHighestDataRow(); + } + + /** + * Calculate widths for auto-size columns. + * + * @return $this + */ + public function calculateColumnWidths() + { + // initialize $autoSizes array + $autoSizes = []; + foreach ($this->getColumnDimensions() as $colDimension) { + if ($colDimension->getAutoSize()) { + $autoSizes[$colDimension->getColumnIndex()] = -1; + } + } + + // There is only something to do if there are some auto-size columns + if (!empty($autoSizes)) { + // build list of cells references that participate in a merge + $isMergeCell = []; + foreach ($this->getMergeCells() as $cells) { + foreach (Coordinate::extractAllCellReferencesInRange($cells) as $cellReference) { + $isMergeCell[$cellReference] = true; + } + } + + // loop through all cells in the worksheet + foreach ($this->getCoordinates(false) as $coordinate) { + $cell = $this->getCell($coordinate, false); + if ($cell !== null && isset($autoSizes[$this->cellCollection->getCurrentColumn()])) { + //Determine if cell is in merge range + $isMerged = isset($isMergeCell[$this->cellCollection->getCurrentCoordinate()]); + + //By default merged cells should be ignored + $isMergedButProceed = false; + + //The only exception is if it's a merge range value cell of a 'vertical' randge (1 column wide) + if ($isMerged && $cell->isMergeRangeValueCell()) { + $range = $cell->getMergeRange(); + $rangeBoundaries = Coordinate::rangeDimension($range); + if ($rangeBoundaries[0] == 1) { + $isMergedButProceed = true; + } + } + + // Determine width if cell does not participate in a merge or does and is a value cell of 1-column wide range + if (!$isMerged || $isMergedButProceed) { + // Calculated value + // To formatted string + $cellValue = NumberFormat::toFormattedString( + $cell->getCalculatedValue(), + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode() + ); + + $autoSizes[$this->cellCollection->getCurrentColumn()] = max( + (float) $autoSizes[$this->cellCollection->getCurrentColumn()], + (float) Shared\Font::calculateColumnWidth( + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont(), + $cellValue, + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getAlignment()->getTextRotation(), + $this->getParent()->getDefaultStyle()->getFont() + ) + ); + } + } + } + + // adjust column widths + foreach ($autoSizes as $columnIndex => $width) { + if ($width == -1) { + $width = $this->getDefaultColumnDimension()->getWidth(); + } + $this->getColumnDimension($columnIndex)->setWidth($width); + } + } + + return $this; + } + + /** + * Get parent. + * + * @return Spreadsheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Re-bind parent. + * + * @return $this + */ + public function rebindParent(Spreadsheet $parent) + { + if ($this->parent !== null) { + $namedRanges = $this->parent->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + $parent->addNamedRange($namedRange); + } + + $this->parent->removeSheetByIndex( + $this->parent->getIndex($this) + ); + } + $this->parent = $parent; + + return $this; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set title. + * + * @param string $pValue String containing the dimension of this worksheet + * @param bool $updateFormulaCellReferences Flag indicating whether cell references in formulae should + * be updated to reflect the new sheet name. + * This should be left as the default true, unless you are + * certain that no formula cells on any worksheet contain + * references to this worksheet + * @param bool $validate False to skip validation of new title. WARNING: This should only be set + * at parse time (by Readers), where titles can be assumed to be valid. + * + * @return $this + */ + public function setTitle($pValue, $updateFormulaCellReferences = true, $validate = true) + { + // Is this a 'rename' or not? + if ($this->getTitle() == $pValue) { + return $this; + } + + // Old title + $oldTitle = $this->getTitle(); + + if ($validate) { + // Syntax check + self::checkSheetTitle($pValue); + + if ($this->parent) { + // Is there already such sheet name? + if ($this->parent->sheetNameExists($pValue)) { + // Use name, but append with lowest possible integer + + if (Shared\StringHelper::countCharacters($pValue) > 29) { + $pValue = Shared\StringHelper::substring($pValue, 0, 29); + } + $i = 1; + while ($this->parent->sheetNameExists($pValue . ' ' . $i)) { + ++$i; + if ($i == 10) { + if (Shared\StringHelper::countCharacters($pValue) > 28) { + $pValue = Shared\StringHelper::substring($pValue, 0, 28); + } + } elseif ($i == 100) { + if (Shared\StringHelper::countCharacters($pValue) > 27) { + $pValue = Shared\StringHelper::substring($pValue, 0, 27); + } + } + } + + $pValue .= " $i"; + } + } + } + + // Set title + $this->title = $pValue; + $this->dirty = true; + + if ($this->parent && $this->parent->getCalculationEngine()) { + // New title + $newTitle = $this->getTitle(); + $this->parent->getCalculationEngine() + ->renameCalculationCacheForWorksheet($oldTitle, $newTitle); + if ($updateFormulaCellReferences) { + ReferenceHelper::getInstance()->updateNamedFormulas($this->parent, $oldTitle, $newTitle); + } + } + + return $this; + } + + /** + * Get sheet state. + * + * @return string Sheet state (visible, hidden, veryHidden) + */ + public function getSheetState() + { + return $this->sheetState; + } + + /** + * Set sheet state. + * + * @param string $value Sheet state (visible, hidden, veryHidden) + * + * @return $this + */ + public function setSheetState($value) + { + $this->sheetState = $value; + + return $this; + } + + /** + * Get page setup. + * + * @return PageSetup + */ + public function getPageSetup() + { + return $this->pageSetup; + } + + /** + * Set page setup. + * + * @return $this + */ + public function setPageSetup(PageSetup $pValue) + { + $this->pageSetup = $pValue; + + return $this; + } + + /** + * Get page margins. + * + * @return PageMargins + */ + public function getPageMargins() + { + return $this->pageMargins; + } + + /** + * Set page margins. + * + * @return $this + */ + public function setPageMargins(PageMargins $pValue) + { + $this->pageMargins = $pValue; + + return $this; + } + + /** + * Get page header/footer. + * + * @return HeaderFooter + */ + public function getHeaderFooter() + { + return $this->headerFooter; + } + + /** + * Set page header/footer. + * + * @return $this + */ + public function setHeaderFooter(HeaderFooter $pValue) + { + $this->headerFooter = $pValue; + + return $this; + } + + /** + * Get sheet view. + * + * @return SheetView + */ + public function getSheetView() + { + return $this->sheetView; + } + + /** + * Set sheet view. + * + * @return $this + */ + public function setSheetView(SheetView $pValue) + { + $this->sheetView = $pValue; + + return $this; + } + + /** + * Get Protection. + * + * @return Protection + */ + public function getProtection() + { + return $this->protection; + } + + /** + * Set Protection. + * + * @return $this + */ + public function setProtection(Protection $pValue) + { + $this->protection = $pValue; + $this->dirty = true; + + return $this; + } + + /** + * Get highest worksheet column. + * + * @param string $row Return the data highest column for the specified row, + * or the highest column of any row if no row number is passed + * + * @return string Highest column name + */ + public function getHighestColumn($row = null) + { + if ($row == null) { + return $this->cachedHighestColumn; + } + + return $this->getHighestDataColumn($row); + } + + /** + * Get highest worksheet column that contains data. + * + * @param string $row Return the highest data column for the specified row, + * or the highest data column of any row if no row number is passed + * + * @return string Highest column name that contains data + */ + public function getHighestDataColumn($row = null) + { + return $this->cellCollection->getHighestColumn($row); + } + + /** + * Get highest worksheet row. + * + * @param string $column Return the highest data row for the specified column, + * or the highest row of any column if no column letter is passed + * + * @return int Highest row number + */ + public function getHighestRow($column = null) + { + if ($column == null) { + return $this->cachedHighestRow; + } + + return $this->getHighestDataRow($column); + } + + /** + * Get highest worksheet row that contains data. + * + * @param string $column Return the highest data row for the specified column, + * or the highest data row of any column if no column letter is passed + * + * @return int Highest row number that contains data + */ + public function getHighestDataRow($column = null) + { + return $this->cellCollection->getHighestRow($column); + } + + /** + * Get highest worksheet column and highest row that have cell records. + * + * @return array Highest column name and highest row number + */ + public function getHighestRowAndColumn() + { + return $this->cellCollection->getHighestRowAndColumn(); + } + + /** + * Set a cell value. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param mixed $pValue Value of the cell + * + * @return $this + */ + public function setCellValue($pCoordinate, $pValue) + { + $this->getCell($pCoordinate)->setValue($pValue); + + return $this; + } + + /** + * Set a cell value by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param mixed $value Value of the cell + * + * @return $this + */ + public function setCellValueByColumnAndRow($columnIndex, $row, $value) + { + $this->getCellByColumnAndRow($columnIndex, $row)->setValue($value); + + return $this; + } + + /** + * Set a cell value. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param mixed $pValue Value of the cell + * @param string $pDataType Explicit data type, see DataType::TYPE_* + * + * @return $this + */ + public function setCellValueExplicit($pCoordinate, $pValue, $pDataType) + { + // Set value + $this->getCell($pCoordinate)->setValueExplicit($pValue, $pDataType); + + return $this; + } + + /** + * Set a cell value by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param mixed $value Value of the cell + * @param string $dataType Explicit data type, see DataType::TYPE_* + * + * @return $this + */ + public function setCellValueExplicitByColumnAndRow($columnIndex, $row, $value, $dataType) + { + $this->getCellByColumnAndRow($columnIndex, $row)->setValueExplicit($value, $dataType); + + return $this; + } + + /** + * Get cell at a specific coordinate. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param bool $createIfNotExists Flag indicating whether a new cell should be created if it doesn't + * already exist, or a null should be returned instead + * + * @return null|Cell Cell that was found/created or null + */ + public function getCell($pCoordinate, $createIfNotExists = true) + { + // Uppercase coordinate + $pCoordinateUpper = strtoupper($pCoordinate); + + // Check cell collection + if ($this->cellCollection->has($pCoordinateUpper)) { + return $this->cellCollection->get($pCoordinateUpper); + } + + // Worksheet reference? + if (strpos($pCoordinate, '!') !== false) { + $worksheetReference = self::extractSheetTitle($pCoordinate, true); + + return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists); + } + + // Named range? + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && + (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { + $namedRange = NamedRange::resolveRange($pCoordinate, $this); + if ($namedRange !== null) { + $pCoordinate = $namedRange->getRange(); + + return $namedRange->getWorksheet()->getCell($pCoordinate, $createIfNotExists); + } + } + + if (Coordinate::coordinateIsRange($pCoordinate)) { + throw new Exception('Cell coordinate can not be a range of cells.'); + } elseif (strpos($pCoordinate, '$') !== false) { + throw new Exception('Cell coordinate must not be absolute.'); + } + + // Create new cell object, if required + return $createIfNotExists ? $this->createNewCell($pCoordinateUpper) : null; + } + + /** + * Get cell at a specific coordinate by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param bool $createIfNotExists Flag indicating whether a new cell should be created if it doesn't + * already exist, or a null should be returned instead + * + * @return null|Cell Cell that was found/created or null + */ + public function getCellByColumnAndRow($columnIndex, $row, $createIfNotExists = true) + { + $columnLetter = Coordinate::stringFromColumnIndex($columnIndex); + $coordinate = $columnLetter . $row; + + if ($this->cellCollection->has($coordinate)) { + return $this->cellCollection->get($coordinate); + } + + // Create new cell object, if required + return $createIfNotExists ? $this->createNewCell($coordinate) : null; + } + + /** + * Create a new cell at the specified coordinate. + * + * @param string $pCoordinate Coordinate of the cell + * + * @return Cell Cell that was created + */ + private function createNewCell($pCoordinate) + { + $cell = new Cell(null, DataType::TYPE_NULL, $this); + $this->cellCollection->add($pCoordinate, $cell); + $this->cellCollectionIsSorted = false; + + // Coordinates + $aCoordinates = Coordinate::coordinateFromString($pCoordinate); + if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($aCoordinates[0])) { + $this->cachedHighestColumn = $aCoordinates[0]; + } + if ($aCoordinates[1] > $this->cachedHighestRow) { + $this->cachedHighestRow = $aCoordinates[1]; + } + + // Cell needs appropriate xfIndex from dimensions records + // but don't create dimension records if they don't already exist + $rowDimension = $this->getRowDimension($aCoordinates[1], false); + $columnDimension = $this->getColumnDimension($aCoordinates[0], false); + + if ($rowDimension !== null && $rowDimension->getXfIndex() > 0) { + // then there is a row dimension with explicit style, assign it to the cell + $cell->setXfIndex($rowDimension->getXfIndex()); + } elseif ($columnDimension !== null && $columnDimension->getXfIndex() > 0) { + // then there is a column dimension, assign it to the cell + $cell->setXfIndex($columnDimension->getXfIndex()); + } + + return $cell; + } + + /** + * Does the cell at a specific coordinate exist? + * + * @param string $pCoordinate Coordinate of the cell eg: 'A1' + * + * @return bool + */ + public function cellExists($pCoordinate) + { + // Worksheet reference? + if (strpos($pCoordinate, '!') !== false) { + $worksheetReference = self::extractSheetTitle($pCoordinate, true); + + return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1])); + } + + // Named range? + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && + (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { + $namedRange = NamedRange::resolveRange($pCoordinate, $this); + if ($namedRange !== null) { + $pCoordinate = $namedRange->getRange(); + if ($this->getHashCode() != $namedRange->getWorksheet()->getHashCode()) { + if (!$namedRange->getLocalOnly()) { + return $namedRange->getWorksheet()->cellExists($pCoordinate); + } + + throw new Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); + } + } else { + return false; + } + } + + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + if (Coordinate::coordinateIsRange($pCoordinate)) { + throw new Exception('Cell coordinate can not be a range of cells.'); + } elseif (strpos($pCoordinate, '$') !== false) { + throw new Exception('Cell coordinate must not be absolute.'); + } + + // Cell exists? + return $this->cellCollection->has($pCoordinate); + } + + /** + * Cell at a specific coordinate by using numeric cell coordinates exists? + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return bool + */ + public function cellExistsByColumnAndRow($columnIndex, $row) + { + return $this->cellExists(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get row dimension at a specific row. + * + * @param int $pRow Numeric index of the row + * @param bool $create + * + * @return RowDimension + */ + public function getRowDimension($pRow, $create = true) + { + // Found + $found = null; + + // Get row dimension + if (!isset($this->rowDimensions[$pRow])) { + if (!$create) { + return null; + } + $this->rowDimensions[$pRow] = new RowDimension($pRow); + + $this->cachedHighestRow = max($this->cachedHighestRow, $pRow); + } + + return $this->rowDimensions[$pRow]; + } + + /** + * Get column dimension at a specific column. + * + * @param string $pColumn String index of the column eg: 'A' + * @param bool $create + * + * @return ColumnDimension + */ + public function getColumnDimension($pColumn, $create = true) + { + // Uppercase coordinate + $pColumn = strtoupper($pColumn); + + // Fetch dimensions + if (!isset($this->columnDimensions[$pColumn])) { + if (!$create) { + return null; + } + $this->columnDimensions[$pColumn] = new ColumnDimension($pColumn); + + if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($pColumn)) { + $this->cachedHighestColumn = $pColumn; + } + } + + return $this->columnDimensions[$pColumn]; + } + + /** + * Get column dimension at a specific column by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * + * @return ColumnDimension + */ + public function getColumnDimensionByColumn($columnIndex) + { + return $this->getColumnDimension(Coordinate::stringFromColumnIndex($columnIndex)); + } + + /** + * Get styles. + * + * @return Style[] + */ + public function getStyles() + { + return $this->styles; + } + + /** + * Get style for cell. + * + * @param string $pCellCoordinate Cell coordinate (or range) to get style for, eg: 'A1' + * + * @return Style + */ + public function getStyle($pCellCoordinate) + { + // set this sheet as active + $this->parent->setActiveSheetIndex($this->parent->getIndex($this)); + + // set cell coordinate as active + $this->setSelectedCells($pCellCoordinate); + + return $this->parent->getCellXfSupervisor(); + } + + /** + * Get conditional styles for a cell. + * + * @param string $pCoordinate eg: 'A1' + * + * @return Conditional[] + */ + public function getConditionalStyles($pCoordinate) + { + $pCoordinate = strtoupper($pCoordinate); + if (!isset($this->conditionalStylesCollection[$pCoordinate])) { + $this->conditionalStylesCollection[$pCoordinate] = []; + } + + return $this->conditionalStylesCollection[$pCoordinate]; + } + + /** + * Do conditional styles exist for this cell? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function conditionalStylesExists($pCoordinate) + { + return isset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); + } + + /** + * Removes conditional styles for a cell. + * + * @param string $pCoordinate eg: 'A1' + * + * @return $this + */ + public function removeConditionalStyles($pCoordinate) + { + unset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); + + return $this; + } + + /** + * Get collection of conditional styles. + * + * @return array + */ + public function getConditionalStylesCollection() + { + return $this->conditionalStylesCollection; + } + + /** + * Set conditional styles. + * + * @param string $pCoordinate eg: 'A1' + * @param $pValue Conditional[] + * + * @return $this + */ + public function setConditionalStyles($pCoordinate, $pValue) + { + $this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue; + + return $this; + } + + /** + * Get style for cell by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the cell + * @param int $row1 Numeric row coordinate of the cell + * @param null|int $columnIndex2 Numeric column coordinate of the range cell + * @param null|int $row2 Numeric row coordinate of the range cell + * + * @return Style + */ + public function getStyleByColumnAndRow($columnIndex1, $row1, $columnIndex2 = null, $row2 = null) + { + if ($columnIndex2 !== null && $row2 !== null) { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->getStyle($cellRange); + } + + return $this->getStyle(Coordinate::stringFromColumnIndex($columnIndex1) . $row1); + } + + /** + * Duplicate cell style to a range of cells. + * + * Please note that this will overwrite existing cell styles for cells in range! + * + * @param Style $pCellStyle Cell style to duplicate + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * + * @return $this + */ + public function duplicateStyle(Style $pCellStyle, $pRange) + { + // Add the style to the workbook if necessary + $workbook = $this->parent; + if ($existingStyle = $this->parent->getCellXfByHashCode($pCellStyle->getHashCode())) { + // there is already such cell Xf in our collection + $xfIndex = $existingStyle->getIndex(); + } else { + // we don't have such a cell Xf, need to add + $workbook->addCellXf($pCellStyle); + $xfIndex = $pCellStyle->getIndex(); + } + + // Calculate range outer borders + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // Loop through cells and apply styles + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $this->getCell(Coordinate::stringFromColumnIndex($col) . $row)->setXfIndex($xfIndex); + } + } + + return $this; + } + + /** + * Duplicate conditional style to a range of cells. + * + * Please note that this will overwrite existing cell styles for cells in range! + * + * @param Conditional[] $pCellStyle Cell style to duplicate + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * + * @return $this + */ + public function duplicateConditionalStyle(array $pCellStyle, $pRange = '') + { + foreach ($pCellStyle as $cellStyle) { + if (!($cellStyle instanceof Conditional)) { + throw new Exception('Style is not a conditional style'); + } + } + + // Calculate range outer borders + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // Loop through cells and apply styles + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $this->setConditionalStyles(Coordinate::stringFromColumnIndex($col) . $row, $pCellStyle); + } + } + + return $this; + } + + /** + * Set break on a cell. + * + * @param string $pCoordinate Cell coordinate (e.g. A1) + * @param int $pBreak Break type (type of Worksheet::BREAK_*) + * + * @return $this + */ + public function setBreak($pCoordinate, $pBreak) + { + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + if ($pCoordinate != '') { + if ($pBreak == self::BREAK_NONE) { + if (isset($this->breaks[$pCoordinate])) { + unset($this->breaks[$pCoordinate]); + } + } else { + $this->breaks[$pCoordinate] = $pBreak; + } + } else { + throw new Exception('No cell coordinate specified.'); + } + + return $this; + } + + /** + * Set break on a cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param int $break Break type (type of Worksheet::BREAK_*) + * + * @return $this + */ + public function setBreakByColumnAndRow($columnIndex, $row, $break) + { + return $this->setBreak(Coordinate::stringFromColumnIndex($columnIndex) . $row, $break); + } + + /** + * Get breaks. + * + * @return array[] + */ + public function getBreaks() + { + return $this->breaks; + } + + /** + * Set merge on a cell range. + * + * @param string $pRange Cell range (e.g. A1:E1) + * + * @return $this + */ + public function mergeCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (strpos($pRange, ':') !== false) { + $this->mergeCells[$pRange] = $pRange; + + // make sure cells are created + + // get the cells in the range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + + // create upper left cell if it does not already exist + $upperLeft = $aReferences[0]; + if (!$this->cellExists($upperLeft)) { + $this->getCell($upperLeft)->setValueExplicit(null, DataType::TYPE_NULL); + } + + // Blank out the rest of the cells in the range (if they exist) + $count = count($aReferences); + for ($i = 1; $i < $count; ++$i) { + if ($this->cellExists($aReferences[$i])) { + $this->getCell($aReferences[$i])->setValueExplicit(null, DataType::TYPE_NULL); + } + } + } else { + throw new Exception('Merge must be set on a range of cells.'); + } + + return $this; + } + + /** + * Set merge on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @return $this + */ + public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->mergeCells($cellRange); + } + + /** + * Remove merge on a cell range. + * + * @param string $pRange Cell range (e.g. A1:E1) + * + * @return $this + */ + public function unmergeCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (strpos($pRange, ':') !== false) { + if (isset($this->mergeCells[$pRange])) { + unset($this->mergeCells[$pRange]); + } else { + throw new Exception('Cell range ' . $pRange . ' not known as merged.'); + } + } else { + throw new Exception('Merge can only be removed from a range of cells.'); + } + + return $this; + } + + /** + * Remove merge on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @return $this + */ + public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->unmergeCells($cellRange); + } + + /** + * Get merge cells array. + * + * @return string[] + */ + public function getMergeCells() + { + return $this->mergeCells; + } + + /** + * Set merge cells array for the entire sheet. Use instead mergeCells() to merge + * a single cell range. + * + * @param string[] $pValue + * + * @return $this + */ + public function setMergeCells(array $pValue) + { + $this->mergeCells = $pValue; + + return $this; + } + + /** + * Set protection on a cell range. + * + * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) + * @param string $pPassword Password to unlock the protection + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return $this + */ + public function protectCells($pRange, $pPassword, $pAlreadyHashed = false) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (!$pAlreadyHashed) { + $pPassword = Shared\PasswordHasher::hashPassword($pPassword); + } + $this->protectedCells[$pRange] = $pPassword; + + return $this; + } + + /** + * Set protection on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * @param string $password Password to unlock the protection + * @param bool $alreadyHashed If the password has already been hashed, set this to true + * + * @return $this + */ + public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->protectCells($cellRange, $password, $alreadyHashed); + } + + /** + * Remove protection on a cell range. + * + * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) + * + * @return $this + */ + public function unprotectCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (isset($this->protectedCells[$pRange])) { + unset($this->protectedCells[$pRange]); + } else { + throw new Exception('Cell range ' . $pRange . ' not known as protected.'); + } + + return $this; + } + + /** + * Remove protection on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @return $this + */ + public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->unprotectCells($cellRange); + } + + /** + * Get protected cells. + * + * @return array[] + */ + public function getProtectedCells() + { + return $this->protectedCells; + } + + /** + * Get Autofilter. + * + * @return AutoFilter + */ + public function getAutoFilter() + { + return $this->autoFilter; + } + + /** + * Set AutoFilter. + * + * @param AutoFilter|string $pValue + * A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility + * + * @return $this + */ + public function setAutoFilter($pValue) + { + if (is_string($pValue)) { + $this->autoFilter->setRange($pValue); + } elseif (is_object($pValue) && ($pValue instanceof AutoFilter)) { + $this->autoFilter = $pValue; + } + + return $this; + } + + /** + * Set Autofilter Range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the second cell + * @param int $row2 Numeric row coordinate of the second cell + * + * @return $this + */ + public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + return $this->setAutoFilter( + Coordinate::stringFromColumnIndex($columnIndex1) . $row1 + . ':' . + Coordinate::stringFromColumnIndex($columnIndex2) . $row2 + ); + } + + /** + * Remove autofilter. + * + * @return $this + */ + public function removeAutoFilter() + { + $this->autoFilter->setRange(null); + + return $this; + } + + /** + * Get Freeze Pane. + * + * @return string + */ + public function getFreezePane() + { + return $this->freezePane; + } + + /** + * Freeze Pane. + * + * Examples: + * + * - A2 will freeze the rows above cell A2 (i.e row 1) + * - B1 will freeze the columns to the left of cell B1 (i.e column A) + * - B2 will freeze the rows above and to the left of cell B2 (i.e row 1 and column A) + * + * @param null|string $cell Position of the split + * @param null|string $topLeftCell default position of the right bottom pane + * + * @return $this + */ + public function freezePane($cell, $topLeftCell = null) + { + if (is_string($cell) && Coordinate::coordinateIsRange($cell)) { + throw new Exception('Freeze pane can not be set on a range of cells.'); + } + + if ($cell !== null && $topLeftCell === null) { + $coordinate = Coordinate::coordinateFromString($cell); + $topLeftCell = $coordinate[0] . $coordinate[1]; + } + + $this->freezePane = $cell; + $this->topLeftCell = $topLeftCell; + + return $this; + } + + /** + * Freeze Pane by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return $this + */ + public function freezePaneByColumnAndRow($columnIndex, $row) + { + return $this->freezePane(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Unfreeze Pane. + * + * @return $this + */ + public function unfreezePane() + { + return $this->freezePane(null); + } + + /** + * Get the default position of the right bottom pane. + * + * @return int + */ + public function getTopLeftCell() + { + return $this->topLeftCell; + } + + /** + * Insert a new row, updating all possible related data. + * + * @param int $pBefore Insert before this one + * @param int $pNumRows Number of rows to insert + * + * @return $this + */ + public function insertNewRowBefore($pBefore, $pNumRows = 1) + { + if ($pBefore >= 1) { + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); + } else { + throw new Exception('Rows can only be inserted before at least row 1.'); + } + + return $this; + } + + /** + * Insert a new column, updating all possible related data. + * + * @param string $pBefore Insert before this one, eg: 'A' + * @param int $pNumCols Number of columns to insert + * + * @return $this + */ + public function insertNewColumnBefore($pBefore, $pNumCols = 1) + { + if (!is_numeric($pBefore)) { + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); + } else { + throw new Exception('Column references should not be numeric.'); + } + + return $this; + } + + /** + * Insert a new column, updating all possible related data. + * + * @param int $beforeColumnIndex Insert before this one (numeric column coordinate of the cell) + * @param int $pNumCols Number of columns to insert + * + * @return $this + */ + public function insertNewColumnBeforeByIndex($beforeColumnIndex, $pNumCols = 1) + { + if ($beforeColumnIndex >= 1) { + return $this->insertNewColumnBefore(Coordinate::stringFromColumnIndex($beforeColumnIndex), $pNumCols); + } + + throw new Exception('Columns can only be inserted before at least column A (1).'); + } + + /** + * Delete a row, updating all possible related data. + * + * @param int $pRow Remove starting with this one + * @param int $pNumRows Number of rows to remove + * + * @return $this + */ + public function removeRow($pRow, $pNumRows = 1) + { + if ($pRow < 1) { + throw new Exception('Rows to be deleted should at least start from row 1.'); + } + + $highestRow = $this->getHighestDataRow(); + $removedRowsCounter = 0; + + for ($r = 0; $r < $pNumRows; ++$r) { + if ($pRow + $r <= $highestRow) { + $this->getCellCollection()->removeRow($pRow + $r); + ++$removedRowsCounter; + } + } + + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); + for ($r = 0; $r < $removedRowsCounter; ++$r) { + $this->getCellCollection()->removeRow($highestRow); + --$highestRow; + } + + return $this; + } + + /** + * Remove a column, updating all possible related data. + * + * @param string $pColumn Remove starting with this one, eg: 'A' + * @param int $pNumCols Number of columns to remove + * + * @return $this + */ + public function removeColumn($pColumn, $pNumCols = 1) + { + if (is_numeric($pColumn)) { + throw new Exception('Column references should not be numeric.'); + } + + $highestColumn = $this->getHighestDataColumn(); + $highestColumnIndex = Coordinate::columnIndexFromString($highestColumn); + $pColumnIndex = Coordinate::columnIndexFromString($pColumn); + + if ($pColumnIndex > $highestColumnIndex) { + return $this; + } + + $pColumn = Coordinate::stringFromColumnIndex($pColumnIndex + $pNumCols); + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this); + + $maxPossibleColumnsToBeRemoved = $highestColumnIndex - $pColumnIndex + 1; + + for ($c = 0, $n = min($maxPossibleColumnsToBeRemoved, $pNumCols); $c < $n; ++$c) { + $this->getCellCollection()->removeColumn($highestColumn); + $highestColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($highestColumn) - 1); + } + + $this->garbageCollect(); + + return $this; + } + + /** + * Remove a column, updating all possible related data. + * + * @param int $columnIndex Remove starting with this one (numeric column coordinate of the cell) + * @param int $numColumns Number of columns to remove + * + * @return $this + */ + public function removeColumnByIndex($columnIndex, $numColumns = 1) + { + if ($columnIndex >= 1) { + return $this->removeColumn(Coordinate::stringFromColumnIndex($columnIndex), $numColumns); + } + + throw new Exception('Columns to be deleted should at least start from column A (1)'); + } + + /** + * Show gridlines? + * + * @return bool + */ + public function getShowGridlines() + { + return $this->showGridlines; + } + + /** + * Set show gridlines. + * + * @param bool $pValue Show gridlines (true/false) + * + * @return $this + */ + public function setShowGridlines($pValue) + { + $this->showGridlines = $pValue; + + return $this; + } + + /** + * Print gridlines? + * + * @return bool + */ + public function getPrintGridlines() + { + return $this->printGridlines; + } + + /** + * Set print gridlines. + * + * @param bool $pValue Print gridlines (true/false) + * + * @return $this + */ + public function setPrintGridlines($pValue) + { + $this->printGridlines = $pValue; + + return $this; + } + + /** + * Show row and column headers? + * + * @return bool + */ + public function getShowRowColHeaders() + { + return $this->showRowColHeaders; + } + + /** + * Set show row and column headers. + * + * @param bool $pValue Show row and column headers (true/false) + * + * @return $this + */ + public function setShowRowColHeaders($pValue) + { + $this->showRowColHeaders = $pValue; + + return $this; + } + + /** + * Show summary below? (Row/Column outlining). + * + * @return bool + */ + public function getShowSummaryBelow() + { + return $this->showSummaryBelow; + } + + /** + * Set show summary below. + * + * @param bool $pValue Show summary below (true/false) + * + * @return $this + */ + public function setShowSummaryBelow($pValue) + { + $this->showSummaryBelow = $pValue; + + return $this; + } + + /** + * Show summary right? (Row/Column outlining). + * + * @return bool + */ + public function getShowSummaryRight() + { + return $this->showSummaryRight; + } + + /** + * Set show summary right. + * + * @param bool $pValue Show summary right (true/false) + * + * @return $this + */ + public function setShowSummaryRight($pValue) + { + $this->showSummaryRight = $pValue; + + return $this; + } + + /** + * Get comments. + * + * @return Comment[] + */ + public function getComments() + { + return $this->comments; + } + + /** + * Set comments array for the entire sheet. + * + * @param Comment[] $pValue + * + * @return $this + */ + public function setComments(array $pValue) + { + $this->comments = $pValue; + + return $this; + } + + /** + * Get comment for cell. + * + * @param string $pCellCoordinate Cell coordinate to get comment for, eg: 'A1' + * + * @return Comment + */ + public function getComment($pCellCoordinate) + { + // Uppercase coordinate + $pCellCoordinate = strtoupper($pCellCoordinate); + + if (Coordinate::coordinateIsRange($pCellCoordinate)) { + throw new Exception('Cell coordinate string can not be a range of cells.'); + } elseif (strpos($pCellCoordinate, '$') !== false) { + throw new Exception('Cell coordinate string must not be absolute.'); + } elseif ($pCellCoordinate == '') { + throw new Exception('Cell coordinate can not be zero-length string.'); + } + + // Check if we already have a comment for this cell. + if (isset($this->comments[$pCellCoordinate])) { + return $this->comments[$pCellCoordinate]; + } + + // If not, create a new comment. + $newComment = new Comment(); + $this->comments[$pCellCoordinate] = $newComment; + + return $newComment; + } + + /** + * Get comment for cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return Comment + */ + public function getCommentByColumnAndRow($columnIndex, $row) + { + return $this->getComment(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get active cell. + * + * @return string Example: 'A1' + */ + public function getActiveCell() + { + return $this->activeCell; + } + + /** + * Get selected cells. + * + * @return string + */ + public function getSelectedCells() + { + return $this->selectedCells; + } + + /** + * Selected cell. + * + * @param string $pCoordinate Cell (i.e. A1) + * + * @return $this + */ + public function setSelectedCell($pCoordinate) + { + return $this->setSelectedCells($pCoordinate); + } + + /** + * Select a range of cells. + * + * @param string $pCoordinate Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' + * + * @return $this + */ + public function setSelectedCells($pCoordinate) + { + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + // Convert 'A' to 'A:A' + $pCoordinate = preg_replace('/^([A-Z]+)$/', '${1}:${1}', $pCoordinate); + + // Convert '1' to '1:1' + $pCoordinate = preg_replace('/^(\d+)$/', '${1}:${1}', $pCoordinate); + + // Convert 'A:C' to 'A1:C1048576' + $pCoordinate = preg_replace('/^([A-Z]+):([A-Z]+)$/', '${1}1:${2}1048576', $pCoordinate); + + // Convert '1:3' to 'A1:XFD3' + $pCoordinate = preg_replace('/^(\d+):(\d+)$/', 'A${1}:XFD${2}', $pCoordinate); + + if (Coordinate::coordinateIsRange($pCoordinate)) { + [$first] = Coordinate::splitRange($pCoordinate); + $this->activeCell = $first[0]; + } else { + $this->activeCell = $pCoordinate; + } + $this->selectedCells = $pCoordinate; + + return $this; + } + + /** + * Selected cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return $this + */ + public function setSelectedCellByColumnAndRow($columnIndex, $row) + { + return $this->setSelectedCells(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get right-to-left. + * + * @return bool + */ + public function getRightToLeft() + { + return $this->rightToLeft; + } + + /** + * Set right-to-left. + * + * @param bool $value Right-to-left true/false + * + * @return $this + */ + public function setRightToLeft($value) + { + $this->rightToLeft = $value; + + return $this; + } + + /** + * Fill worksheet from values in array. + * + * @param array $source Source array + * @param mixed $nullValue Value in source array that stands for blank cell + * @param string $startCell Insert array starting from this cell address as the top left coordinate + * @param bool $strictNullComparison Apply strict comparison when testing for null values in the array + * + * @return $this + */ + public function fromArray(array $source, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) + { + // Convert a 1-D array to 2-D (for ease of looping) + if (!is_array(end($source))) { + $source = [$source]; + } + + // start coordinate + [$startColumn, $startRow] = Coordinate::coordinateFromString($startCell); + + // Loop through $source + foreach ($source as $rowData) { + $currentColumn = $startColumn; + foreach ($rowData as $cellValue) { + if ($strictNullComparison) { + if ($cellValue !== $nullValue) { + // Set cell value + $this->getCell($currentColumn . $startRow)->setValue($cellValue); + } + } else { + if ($cellValue != $nullValue) { + // Set cell value + $this->getCell($currentColumn . $startRow)->setValue($cellValue); + } + } + ++$currentColumn; + } + ++$startRow; + } + + return $this; + } + + /** + * Create array from a range of cells. + * + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @return array + */ + public function rangeToArray($pRange, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + // Returnvalue + $returnValue = []; + // Identify the range that we need to extract from the worksheet + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange); + $minCol = Coordinate::stringFromColumnIndex($rangeStart[0]); + $minRow = $rangeStart[1]; + $maxCol = Coordinate::stringFromColumnIndex($rangeEnd[0]); + $maxRow = $rangeEnd[1]; + + ++$maxCol; + // Loop through rows + $r = -1; + for ($row = $minRow; $row <= $maxRow; ++$row) { + $rRef = $returnCellRef ? $row : ++$r; + $c = -1; + // Loop through columns in the current row + for ($col = $minCol; $col != $maxCol; ++$col) { + $cRef = $returnCellRef ? $col : ++$c; + // Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen + // so we test and retrieve directly against cellCollection + if ($this->cellCollection->has($col . $row)) { + // Cell exists + $cell = $this->cellCollection->get($col . $row); + if ($cell->getValue() !== null) { + if ($cell->getValue() instanceof RichText) { + $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText(); + } else { + if ($calculateFormulas) { + $returnValue[$rRef][$cRef] = $cell->getCalculatedValue(); + } else { + $returnValue[$rRef][$cRef] = $cell->getValue(); + } + } + + if ($formatData) { + $style = $this->parent->getCellXfByIndex($cell->getXfIndex()); + $returnValue[$rRef][$cRef] = NumberFormat::toFormattedString( + $returnValue[$rRef][$cRef], + ($style && $style->getNumberFormat()) ? $style->getNumberFormat()->getFormatCode() : NumberFormat::FORMAT_GENERAL + ); + } + } else { + // Cell holds a NULL + $returnValue[$rRef][$cRef] = $nullValue; + } + } else { + // Cell doesn't exist + $returnValue[$rRef][$cRef] = $nullValue; + } + } + } + + // Return + return $returnValue; + } + + /** + * Create array from a range of cells. + * + * @param string $pNamedRange Name of the Named Range + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @return array + */ + public function namedRangeToArray($pNamedRange, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + $namedRange = NamedRange::resolveRange($pNamedRange, $this); + if ($namedRange !== null) { + $pWorkSheet = $namedRange->getWorksheet(); + $pCellRange = $namedRange->getRange(); + + return $pWorkSheet->rangeToArray($pCellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + } + + throw new Exception('Named Range ' . $pNamedRange . ' does not exist.'); + } + + /** + * Create array from worksheet. + * + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @return array + */ + public function toArray($nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + // Garbage collect... + $this->garbageCollect(); + + // Identify the range that we need to extract from the worksheet + $maxCol = $this->getHighestColumn(); + $maxRow = $this->getHighestRow(); + + // Return + return $this->rangeToArray('A1:' . $maxCol . $maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + } + + /** + * Get row iterator. + * + * @param int $startRow The row number at which to start iterating + * @param int $endRow The row number at which to stop iterating + * + * @return RowIterator + */ + public function getRowIterator($startRow = 1, $endRow = null) + { + return new RowIterator($this, $startRow, $endRow); + } + + /** + * Get column iterator. + * + * @param string $startColumn The column address at which to start iterating + * @param string $endColumn The column address at which to stop iterating + * + * @return ColumnIterator + */ + public function getColumnIterator($startColumn = 'A', $endColumn = null) + { + return new ColumnIterator($this, $startColumn, $endColumn); + } + + /** + * Run PhpSpreadsheet garbage collector. + * + * @return $this + */ + public function garbageCollect() + { + // Flush cache + $this->cellCollection->get('A1'); + + // Lookup highest column and highest row if cells are cleaned + $colRow = $this->cellCollection->getHighestRowAndColumn(); + $highestRow = $colRow['row']; + $highestColumn = Coordinate::columnIndexFromString($colRow['column']); + + // Loop through column dimensions + foreach ($this->columnDimensions as $dimension) { + $highestColumn = max($highestColumn, Coordinate::columnIndexFromString($dimension->getColumnIndex())); + } + + // Loop through row dimensions + foreach ($this->rowDimensions as $dimension) { + $highestRow = max($highestRow, $dimension->getRowIndex()); + } + + // Cache values + if ($highestColumn < 1) { + $this->cachedHighestColumn = 'A'; + } else { + $this->cachedHighestColumn = Coordinate::stringFromColumnIndex($highestColumn); + } + $this->cachedHighestRow = $highestRow; + + // Return + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->dirty) { + $this->hash = md5($this->title . $this->autoFilter . ($this->protection->isProtectionEnabled() ? 't' : 'f') . __CLASS__); + $this->dirty = false; + } + + return $this->hash; + } + + /** + * Extract worksheet title from range. + * + * Example: extractSheetTitle("testSheet!A1") ==> 'A1' + * Example: extractSheetTitle("'testSheet 1'!A1", true) ==> ['testSheet 1', 'A1']; + * + * @param string $pRange Range to extract title from + * @param bool $returnRange Return range? (see example) + * + * @return mixed + */ + public static function extractSheetTitle($pRange, $returnRange = false) + { + // Sheet title included? + if (($sep = strrpos($pRange, '!')) === false) { + return $returnRange ? ['', $pRange] : ''; + } + + if ($returnRange) { + return [substr($pRange, 0, $sep), substr($pRange, $sep + 1)]; + } + + return substr($pRange, $sep + 1); + } + + /** + * Get hyperlink. + * + * @param string $pCellCoordinate Cell coordinate to get hyperlink for, eg: 'A1' + * + * @return Hyperlink + */ + public function getHyperlink($pCellCoordinate) + { + // return hyperlink if we already have one + if (isset($this->hyperlinkCollection[$pCellCoordinate])) { + return $this->hyperlinkCollection[$pCellCoordinate]; + } + + // else create hyperlink + $this->hyperlinkCollection[$pCellCoordinate] = new Hyperlink(); + + return $this->hyperlinkCollection[$pCellCoordinate]; + } + + /** + * Set hyperlink. + * + * @param string $pCellCoordinate Cell coordinate to insert hyperlink, eg: 'A1' + * + * @return $this + */ + public function setHyperlink($pCellCoordinate, ?Hyperlink $pHyperlink = null) + { + if ($pHyperlink === null) { + unset($this->hyperlinkCollection[$pCellCoordinate]); + } else { + $this->hyperlinkCollection[$pCellCoordinate] = $pHyperlink; + } + + return $this; + } + + /** + * Hyperlink at a specific coordinate exists? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function hyperlinkExists($pCoordinate) + { + return isset($this->hyperlinkCollection[$pCoordinate]); + } + + /** + * Get collection of hyperlinks. + * + * @return Hyperlink[] + */ + public function getHyperlinkCollection() + { + return $this->hyperlinkCollection; + } + + /** + * Get data validation. + * + * @param string $pCellCoordinate Cell coordinate to get data validation for, eg: 'A1' + * + * @return DataValidation + */ + public function getDataValidation($pCellCoordinate) + { + // return data validation if we already have one + if (isset($this->dataValidationCollection[$pCellCoordinate])) { + return $this->dataValidationCollection[$pCellCoordinate]; + } + + // else create data validation + $this->dataValidationCollection[$pCellCoordinate] = new DataValidation(); + + return $this->dataValidationCollection[$pCellCoordinate]; + } + + /** + * Set data validation. + * + * @param string $pCellCoordinate Cell coordinate to insert data validation, eg: 'A1' + * + * @return $this + */ + public function setDataValidation($pCellCoordinate, ?DataValidation $pDataValidation = null) + { + if ($pDataValidation === null) { + unset($this->dataValidationCollection[$pCellCoordinate]); + } else { + $this->dataValidationCollection[$pCellCoordinate] = $pDataValidation; + } + + return $this; + } + + /** + * Data validation at a specific coordinate exists? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function dataValidationExists($pCoordinate) + { + return isset($this->dataValidationCollection[$pCoordinate]); + } + + /** + * Get collection of data validations. + * + * @return DataValidation[] + */ + public function getDataValidationCollection() + { + return $this->dataValidationCollection; + } + + /** + * Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet. + * + * @param string $range + * + * @return string Adjusted range value + */ + public function shrinkRangeToFit($range) + { + $maxCol = $this->getHighestColumn(); + $maxRow = $this->getHighestRow(); + $maxCol = Coordinate::columnIndexFromString($maxCol); + + $rangeBlocks = explode(' ', $range); + foreach ($rangeBlocks as &$rangeSet) { + $rangeBoundaries = Coordinate::getRangeBoundaries($rangeSet); + + if (Coordinate::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) { + $rangeBoundaries[0][0] = Coordinate::stringFromColumnIndex($maxCol); + } + if ($rangeBoundaries[0][1] > $maxRow) { + $rangeBoundaries[0][1] = $maxRow; + } + if (Coordinate::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) { + $rangeBoundaries[1][0] = Coordinate::stringFromColumnIndex($maxCol); + } + if ($rangeBoundaries[1][1] > $maxRow) { + $rangeBoundaries[1][1] = $maxRow; + } + $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1]; + } + unset($rangeSet); + + return implode(' ', $rangeBlocks); + } + + /** + * Get tab color. + * + * @return Color + */ + public function getTabColor() + { + if ($this->tabColor === null) { + $this->tabColor = new Color(); + } + + return $this->tabColor; + } + + /** + * Reset tab color. + * + * @return $this + */ + public function resetTabColor() + { + $this->tabColor = null; + $this->tabColor = null; + + return $this; + } + + /** + * Tab color set? + * + * @return bool + */ + public function isTabColorSet() + { + return $this->tabColor !== null; + } + + /** + * Copy worksheet (!= clone!). + * + * @return static + */ + public function copy() + { + return clone $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + foreach ($this as $key => $val) { + if ($key == 'parent') { + continue; + } + + if (is_object($val) || (is_array($val))) { + if ($key == 'cellCollection') { + $newCollection = $this->cellCollection->cloneCellCollection($this); + $this->cellCollection = $newCollection; + } elseif ($key == 'drawingCollection') { + $currentCollection = $this->drawingCollection; + $this->drawingCollection = new ArrayObject(); + foreach ($currentCollection as $item) { + if (is_object($item)) { + $newDrawing = clone $item; + $newDrawing->setWorksheet($this); + } + } + } elseif (($key == 'autoFilter') && ($this->autoFilter instanceof AutoFilter)) { + $newAutoFilter = clone $this->autoFilter; + $this->autoFilter = $newAutoFilter; + $this->autoFilter->setParent($this); + } else { + $this->{$key} = unserialize(serialize($val)); + } + } + } + } + + /** + * Define the code name of the sheet. + * + * @param string $pValue Same rule as Title minus space not allowed (but, like Excel, change + * silently space to underscore) + * @param bool $validate False to skip validation of new title. WARNING: This should only be set + * at parse time (by Readers), where titles can be assumed to be valid. + * + * @return $this + */ + public function setCodeName($pValue, $validate = true) + { + // Is this a 'rename' or not? + if ($this->getCodeName() == $pValue) { + return $this; + } + + if ($validate) { + $pValue = str_replace(' ', '_', $pValue); //Excel does this automatically without flinching, we are doing the same + + // Syntax check + // throw an exception if not valid + self::checkSheetCodeName($pValue); + + // We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_' + + if ($this->getParent()) { + // Is there already such sheet name? + if ($this->getParent()->sheetCodeNameExists($pValue)) { + // Use name, but append with lowest possible integer + + if (Shared\StringHelper::countCharacters($pValue) > 29) { + $pValue = Shared\StringHelper::substring($pValue, 0, 29); + } + $i = 1; + while ($this->getParent()->sheetCodeNameExists($pValue . '_' . $i)) { + ++$i; + if ($i == 10) { + if (Shared\StringHelper::countCharacters($pValue) > 28) { + $pValue = Shared\StringHelper::substring($pValue, 0, 28); + } + } elseif ($i == 100) { + if (Shared\StringHelper::countCharacters($pValue) > 27) { + $pValue = Shared\StringHelper::substring($pValue, 0, 27); + } + } + } + + $pValue .= '_' . $i; // ok, we have a valid name + } + } + } + + $this->codeName = $pValue; + + return $this; + } + + /** + * Return the code name of the sheet. + * + * @return null|string + */ + public function getCodeName() + { + return $this->codeName; + } + + /** + * Sheet has a code name ? + * + * @return bool + */ + public function hasCodeName() + { + return $this->codeName !== null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/BaseWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/BaseWriter.php new file mode 100755 index 0000000..afda5c4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/BaseWriter.php @@ -0,0 +1,131 @@ +includeCharts; + } + + public function setIncludeCharts($pValue) + { + $this->includeCharts = (bool) $pValue; + + return $this; + } + + public function getPreCalculateFormulas() + { + return $this->preCalculateFormulas; + } + + public function setPreCalculateFormulas($pValue) + { + $this->preCalculateFormulas = (bool) $pValue; + + return $this; + } + + public function getUseDiskCaching() + { + return $this->useDiskCaching; + } + + public function setUseDiskCaching($pValue, $pDirectory = null) + { + $this->useDiskCaching = $pValue; + + if ($pDirectory !== null) { + if (is_dir($pDirectory)) { + $this->diskCachingDirectory = $pDirectory; + } else { + throw new Exception("Directory does not exist: $pDirectory"); + } + } + + return $this; + } + + public function getDiskCachingDirectory() + { + return $this->diskCachingDirectory; + } + + /** + * Open file handle. + * + * @param resource|string $filename + */ + public function openFileHandle($filename): void + { + if (is_resource($filename)) { + $this->fileHandle = $filename; + $this->shouldCloseFile = false; + + return; + } + + $fileHandle = $filename ? fopen($filename, 'wb+') : false; + if ($fileHandle === false) { + throw new Exception('Could not open file "' . $filename . '" for writing.'); + } + + $this->fileHandle = $fileHandle; + $this->shouldCloseFile = true; + } + + /** + * Close file handle only if we opened it ourselves. + */ + protected function maybeCloseFileHandle(): void + { + if ($this->shouldCloseFile) { + if (!fclose($this->fileHandle)) { + throw new Exception('Could not close file after writing.'); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Csv.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Csv.php new file mode 100755 index 0000000..74f2863 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Csv.php @@ -0,0 +1,352 @@ +spreadsheet = $spreadsheet; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + // Fetch sheet + $sheet = $this->spreadsheet->getSheet($this->sheetIndex); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveArrayReturnType = Calculation::getArrayReturnType(); + Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); + + // Open file + $this->openFileHandle($pFilename); + + if ($this->excelCompatibility) { + $this->setUseBOM(true); // Enforce UTF-8 BOM Header + $this->setIncludeSeparatorLine(true); // Set separator line + $this->setEnclosure('"'); // Set enclosure to " + $this->setDelimiter(';'); // Set delimiter to a semi-colon + $this->setLineEnding("\r\n"); + } + + if ($this->useBOM) { + // Write the UTF-8 BOM code if required + fwrite($this->fileHandle, "\xEF\xBB\xBF"); + } + + if ($this->includeSeparatorLine) { + // Write the separator line if required + fwrite($this->fileHandle, 'sep=' . $this->getDelimiter() . $this->lineEnding); + } + + // Identify the range that we need to extract from the worksheet + $maxCol = $sheet->getHighestDataColumn(); + $maxRow = $sheet->getHighestDataRow(); + + // Write rows to file + for ($row = 1; $row <= $maxRow; ++$row) { + // Convert the row to an array... + $cellsArray = $sheet->rangeToArray('A' . $row . ':' . $maxCol . $row, '', $this->preCalculateFormulas); + // ... and write to the file + $this->writeLine($this->fileHandle, $cellsArray[0]); + } + + $this->maybeCloseFileHandle(); + Calculation::setArrayReturnType($saveArrayReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Get delimiter. + * + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Set delimiter. + * + * @param string $pValue Delimiter, defaults to ',' + * + * @return $this + */ + public function setDelimiter($pValue) + { + $this->delimiter = $pValue; + + return $this; + } + + /** + * Get enclosure. + * + * @return string + */ + public function getEnclosure() + { + return $this->enclosure; + } + + /** + * Set enclosure. + * + * @param string $pValue Enclosure, defaults to " + * + * @return $this + */ + public function setEnclosure($pValue = '"') + { + $this->enclosure = $pValue; + + return $this; + } + + /** + * Get line ending. + * + * @return string + */ + public function getLineEnding() + { + return $this->lineEnding; + } + + /** + * Set line ending. + * + * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) + * + * @return $this + */ + public function setLineEnding($pValue) + { + $this->lineEnding = $pValue; + + return $this; + } + + /** + * Get whether BOM should be used. + * + * @return bool + */ + public function getUseBOM() + { + return $this->useBOM; + } + + /** + * Set whether BOM should be used. + * + * @param bool $pValue Use UTF-8 byte-order mark? Defaults to false + * + * @return $this + */ + public function setUseBOM($pValue) + { + $this->useBOM = $pValue; + + return $this; + } + + /** + * Get whether a separator line should be included. + * + * @return bool + */ + public function getIncludeSeparatorLine() + { + return $this->includeSeparatorLine; + } + + /** + * Set whether a separator line should be included as the first line of the file. + * + * @param bool $pValue Use separator line? Defaults to false + * + * @return $this + */ + public function setIncludeSeparatorLine($pValue) + { + $this->includeSeparatorLine = $pValue; + + return $this; + } + + /** + * Get whether the file should be saved with full Excel Compatibility. + * + * @return bool + */ + public function getExcelCompatibility() + { + return $this->excelCompatibility; + } + + /** + * Set whether the file should be saved with full Excel Compatibility. + * + * @param bool $pValue Set the file to be written as a fully Excel compatible csv file + * Note that this overrides other settings such as useBOM, enclosure and delimiter + * + * @return $this + */ + public function setExcelCompatibility($pValue) + { + $this->excelCompatibility = $pValue; + + return $this; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return $this + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + private $enclosureRequired = true; + + public function setEnclosureRequired(bool $value): self + { + $this->enclosureRequired = $value; + + return $this; + } + + public function getEnclosureRequired(): bool + { + return $this->enclosureRequired; + } + + /** + * Write line to CSV file. + * + * @param resource $pFileHandle PHP filehandle + * @param array $pValues Array containing values in a row + */ + private function writeLine($pFileHandle, array $pValues): void + { + // No leading delimiter + $delimiter = ''; + + // Build the line + $line = ''; + + foreach ($pValues as $element) { + // Add delimiter + $line .= $delimiter; + $delimiter = $this->delimiter; + // Escape enclosures + $enclosure = $this->enclosure; + if ($enclosure) { + // If enclosure is not required, use enclosure only if + // element contains newline, delimiter, or enclosure. + if (!$this->enclosureRequired && strpbrk($element, "$delimiter$enclosure\n") === false) { + $enclosure = ''; + } else { + $element = str_replace($enclosure, $enclosure . $enclosure, $element); + } + } + // Add enclosed string + $line .= $enclosure . $element . $enclosure; + } + + // Add line ending + $line .= $this->lineEnding; + + // Write to file + fwrite($pFileHandle, $line); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Exception.php new file mode 100755 index 0000000..92e6f5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Exception.php @@ -0,0 +1,9 @@ +spreadsheet = $spreadsheet; + $this->defaultFont = $this->spreadsheet->getDefaultStyle()->getFont(); + } + + /** + * Save Spreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + // Open file + $this->openFileHandle($pFilename); + + // Write html + fwrite($this->fileHandle, $this->generateHTMLAll()); + + // Close file + $this->maybeCloseFileHandle(); + } + + /** + * Save Spreadsheet as html to variable. + * + * @return string + */ + public function generateHtmlAll() + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveArrayReturnType = Calculation::getArrayReturnType(); + Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); + + // Build CSS + $this->buildCSS(!$this->useInlineCss); + + $html = ''; + + // Write headers + $html .= $this->generateHTMLHeader(!$this->useInlineCss); + + // Write navigation (tabs) + if ((!$this->isPdf) && ($this->generateSheetNavigationBlock)) { + $html .= $this->generateNavigation(); + } + + // Write data + $html .= $this->generateSheetData(); + + // Write footer + $html .= $this->generateHTMLFooter(); + $callback = $this->editHtmlCallback; + if ($callback) { + $html = $callback($html); + } + + Calculation::setArrayReturnType($saveArrayReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + + return $html; + } + + /** + * Set a callback to edit the entire HTML. + * + * The callback must accept the HTML as string as first parameter, + * and it must return the edited HTML as string. + */ + public function setEditHtmlCallback(?callable $callback): void + { + $this->editHtmlCallback = $callback; + } + + const VALIGN_ARR = [ + Alignment::VERTICAL_BOTTOM => 'bottom', + Alignment::VERTICAL_TOP => 'top', + Alignment::VERTICAL_CENTER => 'middle', + Alignment::VERTICAL_JUSTIFY => 'middle', + ]; + + /** + * Map VAlign. + * + * @param string $vAlign Vertical alignment + * + * @return string + */ + private function mapVAlign($vAlign) + { + return array_key_exists($vAlign, self::VALIGN_ARR) ? self::VALIGN_ARR[$vAlign] : 'baseline'; + } + + const HALIGN_ARR = [ + Alignment::HORIZONTAL_LEFT => 'left', + Alignment::HORIZONTAL_RIGHT => 'right', + Alignment::HORIZONTAL_CENTER => 'center', + Alignment::HORIZONTAL_CENTER_CONTINUOUS => 'center', + Alignment::HORIZONTAL_JUSTIFY => 'justify', + ]; + + /** + * Map HAlign. + * + * @param string $hAlign Horizontal alignment + * + * @return string + */ + private function mapHAlign($hAlign) + { + return array_key_exists($hAlign, self::HALIGN_ARR) ? self::HALIGN_ARR[$hAlign] : ''; + } + + const BORDER_ARR = [ + Border::BORDER_NONE => 'none', + Border::BORDER_DASHDOT => '1px dashed', + Border::BORDER_DASHDOTDOT => '1px dotted', + Border::BORDER_DASHED => '1px dashed', + Border::BORDER_DOTTED => '1px dotted', + Border::BORDER_DOUBLE => '3px double', + Border::BORDER_HAIR => '1px solid', + Border::BORDER_MEDIUM => '2px solid', + Border::BORDER_MEDIUMDASHDOT => '2px dashed', + Border::BORDER_MEDIUMDASHDOTDOT => '2px dotted', + Border::BORDER_SLANTDASHDOT => '2px dashed', + Border::BORDER_THICK => '3px solid', + ]; + + /** + * Map border style. + * + * @param int $borderStyle Sheet index + * + * @return string + */ + private function mapBorderStyle($borderStyle) + { + return array_key_exists($borderStyle, self::BORDER_ARR) ? self::BORDER_ARR[$borderStyle] : '1px solid'; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return $this + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Get sheet index. + * + * @return bool + */ + public function getGenerateSheetNavigationBlock() + { + return $this->generateSheetNavigationBlock; + } + + /** + * Set sheet index. + * + * @param bool $pValue Flag indicating whether the sheet navigation block should be generated or not + * + * @return $this + */ + public function setGenerateSheetNavigationBlock($pValue) + { + $this->generateSheetNavigationBlock = (bool) $pValue; + + return $this; + } + + /** + * Write all sheets (resets sheetIndex to NULL). + * + * @return $this + */ + public function writeAllSheets() + { + $this->sheetIndex = null; + + return $this; + } + + private static function generateMeta($val, $desc) + { + return $val ? (' ' . PHP_EOL) : ''; + } + + /** + * Generate HTML header. + * + * @param bool $pIncludeStyles Include styles? + * + * @return string + */ + public function generateHTMLHeader($pIncludeStyles = false) + { + // Construct HTML + $properties = $this->spreadsheet->getProperties(); + $html = '' . PHP_EOL; + $html .= '' . PHP_EOL; + $html .= ' ' . PHP_EOL; + $html .= ' ' . PHP_EOL; + $html .= ' ' . PHP_EOL; + $html .= ' ' . htmlspecialchars($properties->getTitle()) . '' . PHP_EOL; + $html .= self::generateMeta($properties->getCreator(), 'author'); + $html .= self::generateMeta($properties->getTitle(), 'title'); + $html .= self::generateMeta($properties->getDescription(), 'description'); + $html .= self::generateMeta($properties->getSubject(), 'subject'); + $html .= self::generateMeta($properties->getKeywords(), 'keywords'); + $html .= self::generateMeta($properties->getCategory(), 'category'); + $html .= self::generateMeta($properties->getCompany(), 'company'); + $html .= self::generateMeta($properties->getManager(), 'manager'); + + $html .= $pIncludeStyles ? $this->generateStyles(true) : $this->generatePageDeclarations(true); + + $html .= ' ' . PHP_EOL; + $html .= '' . PHP_EOL; + $html .= ' ' . PHP_EOL; + + return $html; + } + + private function generateSheetPrep() + { + // Ensure that Spans have been calculated? + $this->calculateSpans(); + + // Fetch sheets + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets = [$this->spreadsheet->getSheet($this->sheetIndex)]; + } + + return $sheets; + } + + private function generateSheetStarts($sheet, $rowMin) + { + // calculate start of

, + $tbodyStart = $rowMin; + $theadStart = $theadEnd = 0; // default: no no + if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop(); + + // we can only support repeating rows that start at top row + if ($rowsToRepeatAtTop[0] == 1) { + $theadStart = $rowsToRepeatAtTop[0]; + $theadEnd = $rowsToRepeatAtTop[1]; + $tbodyStart = $rowsToRepeatAtTop[1] + 1; + } + } + + return [$theadStart, $theadEnd, $tbodyStart]; + } + + private function generateSheetTags($row, $theadStart, $theadEnd, $tbodyStart) + { + // ? + $startTag = ($row == $theadStart) ? (' ' . PHP_EOL) : ''; + if (!$startTag) { + $startTag = ($row == $tbodyStart) ? (' ' . PHP_EOL) : ''; + } + $endTag = ($row == $theadEnd) ? (' ' . PHP_EOL) : ''; + $cellType = ($row >= $tbodyStart) ? 'td' : 'th'; + + return [$cellType, $startTag, $endTag]; + } + + /** + * Generate sheet data. + * + * @return string + */ + public function generateSheetData() + { + $sheets = $this->generateSheetPrep(); + + // Construct HTML + $html = ''; + + // Loop all sheets + $sheetId = 0; + foreach ($sheets as $sheet) { + // Write table header + $html .= $this->generateTableHeader($sheet); + + // Get worksheet dimension + [$min, $max] = explode(':', $sheet->calculateWorksheetDataDimension()); + [$minCol, $minRow] = Coordinate::coordinateFromString($min); + $minCol = Coordinate::columnIndexFromString($minCol); + [$maxCol, $maxRow] = Coordinate::coordinateFromString($max); + $maxCol = Coordinate::columnIndexFromString($maxCol); + + [$theadStart, $theadEnd, $tbodyStart] = $this->generateSheetStarts($sheet, $minRow); + + // Loop through cells + $row = $minRow - 1; + while ($row++ < $maxRow) { + [$cellType, $startTag, $endTag] = $this->generateSheetTags($row, $theadStart, $theadEnd, $tbodyStart); + $html .= $startTag; + + // Write row if there are HTML table cells in it + if (!isset($this->isSpannedRow[$sheet->getParent()->getIndex($sheet)][$row])) { + // Start a new rowData + $rowData = []; + // Loop through columns + $column = $minCol; + while ($column <= $maxCol) { + // Cell exists? + if ($sheet->cellExistsByColumnAndRow($column, $row)) { + $rowData[$column] = Coordinate::stringFromColumnIndex($column) . $row; + } else { + $rowData[$column] = ''; + } + ++$column; + } + $html .= $this->generateRow($sheet, $rowData, $row - 1, $cellType); + } + + $html .= $endTag; + } + $html .= $this->extendRowsForChartsAndImages($sheet, $row); + + // Write table footer + $html .= $this->generateTableFooter(); + // Writing PDF? + if ($this->isPdf && $this->useInlineCss) { + if ($this->sheetIndex === null && $sheetId + 1 < $this->spreadsheet->getSheetCount()) { + $html .= '
'; + } + } + + // Next sheet + ++$sheetId; + } + + return $html; + } + + /** + * Generate sheet tabs. + * + * @return string + */ + public function generateNavigation() + { + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Construct HTML + $html = ''; + + // Only if there are more than 1 sheets + if (count($sheets) > 1) { + // Loop all sheets + $sheetId = 0; + + $html .= '' . PHP_EOL; + } + + return $html; + } + + /** + * Extend Row if chart is placed after nominal end of row. + * This code should be exercised by sample: + * Chart/32_Chart_read_write_PDF.php. + * However, that test is suppressed due to out-of-date + * Jpgraph code issuing warnings. So, don't measure + * code coverage for this function till that is fixed. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param int $row Row to check for charts + * + * @return array + * + * @codeCoverageIgnore + */ + private function extendRowsForCharts(Worksheet $pSheet, int $row) + { + $rowMax = $row; + $colMax = 'A'; + $anyfound = false; + if ($this->includeCharts) { + foreach ($pSheet->getChartCollection() as $chart) { + if ($chart instanceof Chart) { + $anyfound = true; + $chartCoordinates = $chart->getTopLeftPosition(); + $chartTL = Coordinate::coordinateFromString($chartCoordinates['cell']); + $chartCol = Coordinate::columnIndexFromString($chartTL[0]); + if ($chartTL[1] > $rowMax) { + $rowMax = $chartTL[1]; + if ($chartCol > Coordinate::columnIndexFromString($colMax)) { + $colMax = $chartTL[0]; + } + } + } + } + } + + return [$rowMax, $colMax, $anyfound]; + } + + private function extendRowsForChartsAndImages(Worksheet $pSheet, int $row): string + { + [$rowMax, $colMax, $anyfound] = $this->extendRowsForCharts($pSheet, $row); + + foreach ($pSheet->getDrawingCollection() as $drawing) { + $anyfound = true; + $imageTL = Coordinate::coordinateFromString($drawing->getCoordinates()); + $imageCol = Coordinate::columnIndexFromString($imageTL[0]); + if ($imageTL[1] > $rowMax) { + $rowMax = $imageTL[1]; + if ($imageCol > Coordinate::columnIndexFromString($colMax)) { + $colMax = $imageTL[0]; + } + } + } + + // Don't extend rows if not needed + if ($row === $rowMax || !$anyfound) { + return ''; + } + + $html = ''; + ++$colMax; + ++$row; + while ($row <= $rowMax) { + $html .= ''; + for ($col = 'A'; $col != $colMax; ++$col) { + $htmlx = $this->writeImageInCell($pSheet, $col . $row); + $htmlx .= $this->includeCharts ? $this->writeChartInCell($pSheet, $col . $row) : ''; + if ($htmlx) { + $html .= ""; + } else { + $html .= ""; + } + } + ++$row; + $html .= '' . PHP_EOL; + } + + return $html; + } + + /** + * Convert Windows file name to file protocol URL. + * + * @param string $filename file name on local system + * + * @return string + */ + public static function winFileToUrl($filename) + { + // Windows filename + if (substr($filename, 1, 2) === ':\\') { + $filename = 'file:///' . str_replace('\\', '/', $filename); + } + + return $filename; + } + + /** + * Generate image tag in cell. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param string $coordinates Cell coordinates + * + * @return string + */ + private function writeImageInCell(Worksheet $pSheet, $coordinates) + { + // Construct HTML + $html = ''; + + // Write images + foreach ($pSheet->getDrawingCollection() as $drawing) { + if ($drawing->getCoordinates() != $coordinates) { + continue; + } + $filedesc = $drawing->getDescription(); + $filedesc = $filedesc ? htmlspecialchars($filedesc, ENT_QUOTES) : 'Embedded image'; + if ($drawing instanceof Drawing) { + $filename = $drawing->getPath(); + + // Strip off eventual '.' + $filename = preg_replace('/^[.]/', '', $filename); + + // Prepend images root + $filename = $this->getImagesRoot() . $filename; + + // Strip off eventual '.' if followed by non-/ + $filename = preg_replace('@^[.]([^/])@', '$1', $filename); + + // Convert UTF8 data to PCDATA + $filename = htmlspecialchars($filename); + + $html .= PHP_EOL; + $imageData = self::winFileToUrl($filename); + + if ($this->embedImages && !$this->isPdf) { + $picture = @file_get_contents($filename); + if ($picture !== false) { + $imageDetails = getimagesize($filename); + // base64 encode the binary data + $base64 = base64_encode($picture); + $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64; + } + } + + $html .= '' . $filedesc . ''; + } elseif ($drawing instanceof MemoryDrawing) { + ob_start(); // Let's start output buffering. + imagepng($drawing->getImageResource()); // This will normally output the image, but because of ob_start(), it won't. + $contents = ob_get_contents(); // Instead, output above is saved to $contents + ob_end_clean(); // End the output buffer. + + $dataUri = 'data:image/jpeg;base64,' . base64_encode($contents); + + // Because of the nature of tables, width is more important than height. + // max-width: 100% ensures that image doesnt overflow containing cell + // width: X sets width of supplied image. + // As a result, images bigger than cell will be contained and images smaller will not get stretched + $html .= '' . $filedesc . ''; + } + } + + return $html; + } + + /** + * Generate chart tag in cell. + * This code should be exercised by sample: + * Chart/32_Chart_read_write_PDF.php. + * However, that test is suppressed due to out-of-date + * Jpgraph code issuing warnings. So, don't measure + * code coverage for this function till that is fixed. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param string $coordinates Cell coordinates + * + * @return string + * + * @codeCoverageIgnore + */ + private function writeChartInCell(Worksheet $pSheet, $coordinates) + { + // Construct HTML + $html = ''; + + // Write charts + foreach ($pSheet->getChartCollection() as $chart) { + if ($chart instanceof Chart) { + $chartCoordinates = $chart->getTopLeftPosition(); + if ($chartCoordinates['cell'] == $coordinates) { + $chartFileName = File::sysGetTempDir() . '/' . uniqid('', true) . '.png'; + if (!$chart->render($chartFileName)) { + return; + } + + $html .= PHP_EOL; + $imageDetails = getimagesize($chartFileName); + $filedesc = $chart->getTitle(); + $filedesc = $filedesc ? self::getChartCaption($filedesc->getCaption()) : ''; + $filedesc = $filedesc ? htmlspecialchars($filedesc, ENT_QUOTES) : 'Embedded chart'; + if ($fp = fopen($chartFileName, 'rb', 0)) { + $picture = fread($fp, filesize($chartFileName)); + fclose($fp); + // base64 encode the binary data + $base64 = base64_encode($picture); + $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64; + + $html .= '' . $filedesc . '' . PHP_EOL; + + unlink($chartFileName); + } + } + } + } + + // Return + return $html; + } + + /** + * Extend Row if chart is placed after nominal end of row. + * This code should be exercised by sample: + * Chart/32_Chart_read_write_PDF.php. + * However, that test is suppressed due to out-of-date + * Jpgraph code issuing warnings. So, don't measure + * code coverage for this function till that is fixed. + * Caption is described in documentation as fixed, + * but in 32_Chart it is somehow an array of RichText. + * + * @param mixed $cap + * + * @return string + * + * @codeCoverageIgnore + */ + private static function getChartCaption($cap) + { + return is_array($cap) ? implode(' ', $cap) : $cap; + } + + /** + * Generate CSS styles. + * + * @param bool $generateSurroundingHTML Generate surrounding HTML tags? (<style> and </style>) + * + * @return string + */ + public function generateStyles($generateSurroundingHTML = true) + { + // Build CSS + $css = $this->buildCSS($generateSurroundingHTML); + + // Construct HTML + $html = ''; + + // Start styles + if ($generateSurroundingHTML) { + $html .= ' ' . PHP_EOL; + } + + // Return + return $html; + } + + private function buildCssRowHeights(Worksheet $sheet, array &$css, int $sheetIndex): void + { + // Calculate row heights + foreach ($sheet->getRowDimensions() as $rowDimension) { + $row = $rowDimension->getRowIndex() - 1; + + // table.sheetN tr.rowYYYYYY { } + $css['table.sheet' . $sheetIndex . ' tr.row' . $row] = []; + + if ($rowDimension->getRowHeight() != -1) { + $pt_height = $rowDimension->getRowHeight(); + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'] = $pt_height . 'pt'; + } + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['visibility'] = 'hidden'; + } + } + } + + private function buildCssPerSheet(Worksheet $sheet, array &$css): void + { + // Calculate hash code + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + // Build styles + // Calculate column widths + $sheet->calculateColumnWidths(); + + // col elements, initialize + $highestColumnIndex = Coordinate::columnIndexFromString($sheet->getHighestColumn()) - 1; + $column = -1; + while ($column++ < $highestColumnIndex) { + $this->columnWidths[$sheetIndex][$column] = 42; // approximation + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = '42pt'; + } + + // col elements, loop through columnDimensions and set width + foreach ($sheet->getColumnDimensions() as $columnDimension) { + $column = Coordinate::columnIndexFromString($columnDimension->getColumnIndex()) - 1; + $width = SharedDrawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont); + $width = SharedDrawing::pixelsToPoints($width); + if ($columnDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' .column' . $column]['display'] = 'none'; + } + if ($width >= 0) { + $this->columnWidths[$sheetIndex][$column] = $width; + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt'; + } + } + + // Default row height + $rowDimension = $sheet->getDefaultRowDimension(); + + // table.sheetN tr { } + $css['table.sheet' . $sheetIndex . ' tr'] = []; + + if ($rowDimension->getRowHeight() == -1) { + $pt_height = SharedFont::getDefaultRowHeightByFont($this->spreadsheet->getDefaultStyle()->getFont()); + } else { + $pt_height = $rowDimension->getRowHeight(); + } + $css['table.sheet' . $sheetIndex . ' tr']['height'] = $pt_height . 'pt'; + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr']['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr']['visibility'] = 'hidden'; + } + + $this->buildCssRowHeights($sheet, $css, $sheetIndex); + } + + /** + * Build CSS styles. + * + * @param bool $generateSurroundingHTML Generate surrounding HTML style? (html { }) + * + * @return array + */ + public function buildCSS($generateSurroundingHTML = true) + { + // Cached? + if ($this->cssStyles !== null) { + return $this->cssStyles; + } + + // Ensure that spans have been calculated + $this->calculateSpans(); + + // Construct CSS + $css = []; + + // Start styles + if ($generateSurroundingHTML) { + // html { } + $css['html']['font-family'] = 'Calibri, Arial, Helvetica, sans-serif'; + $css['html']['font-size'] = '11pt'; + $css['html']['background-color'] = 'white'; + } + + // CSS for comments as found in LibreOffice + $css['a.comment-indicator:hover + div.comment'] = [ + 'background' => '#ffd', + 'position' => 'absolute', + 'display' => 'block', + 'border' => '1px solid black', + 'padding' => '0.5em', + ]; + + $css['a.comment-indicator'] = [ + 'background' => 'red', + 'display' => 'inline-block', + 'border' => '1px solid black', + 'width' => '0.5em', + 'height' => '0.5em', + ]; + + $css['div.comment']['display'] = 'none'; + + // table { } + $css['table']['border-collapse'] = 'collapse'; + + // .b {} + $css['.b']['text-align'] = 'center'; // BOOL + + // .e {} + $css['.e']['text-align'] = 'center'; // ERROR + + // .f {} + $css['.f']['text-align'] = 'right'; // FORMULA + + // .inlineStr {} + $css['.inlineStr']['text-align'] = 'left'; // INLINE + + // .n {} + $css['.n']['text-align'] = 'right'; // NUMERIC + + // .s {} + $css['.s']['text-align'] = 'left'; // STRING + + // Calculate cell style hashes + foreach ($this->spreadsheet->getCellXfCollection() as $index => $style) { + $css['td.style' . $index] = $this->createCSSStyle($style); + $css['th.style' . $index] = $this->createCSSStyle($style); + } + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Build styles per sheet + foreach ($sheets as $sheet) { + $this->buildCssPerSheet($sheet, $css); + } + + // Cache + if ($this->cssStyles === null) { + $this->cssStyles = $css; + } + + // Return + return $css; + } + + /** + * Create CSS style. + * + * @return array + */ + private function createCSSStyle(Style $pStyle) + { + // Create CSS + return array_merge( + $this->createCSSStyleAlignment($pStyle->getAlignment()), + $this->createCSSStyleBorders($pStyle->getBorders()), + $this->createCSSStyleFont($pStyle->getFont()), + $this->createCSSStyleFill($pStyle->getFill()) + ); + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Alignment). + * + * @param Alignment $pStyle \PhpOffice\PhpSpreadsheet\Style\Alignment + * + * @return array + */ + private function createCSSStyleAlignment(Alignment $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['vertical-align'] = $this->mapVAlign($pStyle->getVertical()); + $textAlign = $this->mapHAlign($pStyle->getHorizontal()); + if ($textAlign) { + $css['text-align'] = $textAlign; + if (in_array($textAlign, ['left', 'right'])) { + $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px'; + } + } + + return $css; + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Font). + * + * @return array + */ + private function createCSSStyleFont(Font $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + if ($pStyle->getBold()) { + $css['font-weight'] = 'bold'; + } + if ($pStyle->getUnderline() != Font::UNDERLINE_NONE && $pStyle->getStrikethrough()) { + $css['text-decoration'] = 'underline line-through'; + } elseif ($pStyle->getUnderline() != Font::UNDERLINE_NONE) { + $css['text-decoration'] = 'underline'; + } elseif ($pStyle->getStrikethrough()) { + $css['text-decoration'] = 'line-through'; + } + if ($pStyle->getItalic()) { + $css['font-style'] = 'italic'; + } + + $css['color'] = '#' . $pStyle->getColor()->getRGB(); + $css['font-family'] = '\'' . $pStyle->getName() . '\''; + $css['font-size'] = $pStyle->getSize() . 'pt'; + + return $css; + } + + /** + * Create CSS style (Borders). + * + * @param Borders $pStyle Borders + * + * @return array + */ + private function createCSSStyleBorders(Borders $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['border-bottom'] = $this->createCSSStyleBorder($pStyle->getBottom()); + $css['border-top'] = $this->createCSSStyleBorder($pStyle->getTop()); + $css['border-left'] = $this->createCSSStyleBorder($pStyle->getLeft()); + $css['border-right'] = $this->createCSSStyleBorder($pStyle->getRight()); + + return $css; + } + + /** + * Create CSS style (Border). + * + * @param Border $pStyle Border + * + * @return string + */ + private function createCSSStyleBorder(Border $pStyle) + { + // Create CSS - add !important to non-none border styles for merged cells + $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle()); + + return $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); + } + + /** + * Create CSS style (Fill). + * + * @param Fill $pStyle Fill + * + * @return array + */ + private function createCSSStyleFill(Fill $pStyle) + { + // Construct HTML + $css = []; + + // Create CSS + $value = $pStyle->getFillType() == Fill::FILL_NONE ? + 'white' : '#' . $pStyle->getStartColor()->getRGB(); + $css['background-color'] = $value; + + return $css; + } + + /** + * Generate HTML footer. + */ + public function generateHTMLFooter() + { + // Construct HTML + $html = ''; + $html .= ' ' . PHP_EOL; + $html .= '' . PHP_EOL; + + return $html; + } + + private function generateTableTagInline($pSheet, $id) + { + $style = isset($this->cssStyles['table']) ? + $this->assembleCSS($this->cssStyles['table']) : ''; + + $prntgrid = $pSheet->getPrintGridlines(); + $viewgrid = $this->isPdf ? $prntgrid : $pSheet->getShowGridlines(); + if ($viewgrid && $prntgrid) { + $html = "
element because TCPDF + // does not recognize e.g.
element because TCPDF + // does not recognize e.g.
$htmlx
" . PHP_EOL; + } elseif ($viewgrid) { + $html = "
" . PHP_EOL; + } elseif ($prntgrid) { + $html = "
" . PHP_EOL; + } else { + $html = "
" . PHP_EOL; + } + + return $html; + } + + private function generateTableTag($pSheet, $id, &$html, $sheetIndex): void + { + if (!$this->useInlineCss) { + $gridlines = $pSheet->getShowGridlines() ? ' gridlines' : ''; + $gridlinesp = $pSheet->getPrintGridlines() ? ' gridlinesp' : ''; + $html .= "
" . PHP_EOL; + } else { + $html .= $this->generateTableTagInline($pSheet, $id); + } + } + + /** + * Generate table header. + * + * @param Worksheet $pSheet The worksheet for the table we are writing + * @param bool $showid whether or not to add id to table tag + * + * @return string + */ + private function generateTableHeader($pSheet, $showid = true) + { + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + + // Construct HTML + $html = ''; + $id = $showid ? "id='sheet$sheetIndex'" : ''; + if ($showid) { + $html .= "
\n"; + } else { + $html .= "
\n"; + } + + $this->generateTableTag($pSheet, $id, $html, $sheetIndex); + + // Write
elements + $highestColumnIndex = Coordinate::columnIndexFromString($pSheet->getHighestColumn()) - 1; + $i = -1; + while ($i++ < $highestColumnIndex) { + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) ? + $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : ''; + $html .= ' ' . PHP_EOL; + } + } + + return $html; + } + + /** + * Generate table footer. + */ + private function generateTableFooter() + { + return '
' . PHP_EOL . '
' . PHP_EOL; + } + + /** + * Generate row start. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param int $sheetIndex Sheet index (0-based) + * @param int $pRow row number + * + * @return string + */ + private function generateRowStart(Worksheet $pSheet, $sheetIndex, $pRow) + { + $html = ''; + if (count($pSheet->getBreaks()) > 0) { + $breaks = $pSheet->getBreaks(); + + // check if a break is needed before this row + if (isset($breaks['A' . $pRow])) { + // close table: + $html .= $this->generateTableFooter(); + if ($this->isPdf && $this->useInlineCss) { + $html .= '
'; + } + + // open table again: + etc. + $html .= $this->generateTableHeader($pSheet, false); + $html .= '' . PHP_EOL; + } + } + + // Write row start + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) + ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) : ''; + + $html .= ' ' . PHP_EOL; + } + + return $html; + } + + private function generateRowCellCss($pSheet, $cellAddress, $pRow, $colNum) + { + $cell = ($cellAddress > '') ? $pSheet->getCell($cellAddress) : ''; + $coordinate = Coordinate::stringFromColumnIndex($colNum + 1) . ($pRow + 1); + if (!$this->useInlineCss) { + $cssClass = 'column' . $colNum; + } else { + $cssClass = []; + // The statements below do nothing. + // Commenting out the code rather than deleting it + // in case someone can figure out what their intent was. + //if ($cellType == 'th') { + // if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum])) { + // $this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum]; + // } + //} else { + // if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum])) { + // $this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum]; + // } + //} + // End of mystery statements. + } + + return [$cell, $cssClass, $coordinate]; + } + + private function generateRowCellDataValueRich($cell, &$cellData): void + { + // Loop through rich text elements + $elements = $cell->getValue()->getRichTextElements(); + foreach ($elements as $element) { + // Rich text start? + if ($element instanceof Run) { + $cellData .= ''; + + $cellEnd = ''; + if ($element->getFont()->getSuperscript()) { + $cellData .= ''; + $cellEnd = ''; + } elseif ($element->getFont()->getSubscript()) { + $cellData .= ''; + $cellEnd = ''; + } + + // Convert UTF8 data to PCDATA + $cellText = $element->getText(); + $cellData .= htmlspecialchars($cellText); + + $cellData .= $cellEnd; + + $cellData .= ''; + } else { + // Convert UTF8 data to PCDATA + $cellText = $element->getText(); + $cellData .= htmlspecialchars($cellText); + } + } + } + + private function generateRowCellDataValue($pSheet, $cell, &$cellData): void + { + if ($cell->getValue() instanceof RichText) { + $this->generateRowCellDataValueRich($cell, $cellData); + } else { + $origData = $this->preCalculateFormulas ? $cell->getCalculatedValue() : $cell->getValue(); + $cellData = NumberFormat::toFormattedString( + $origData, + $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), + [$this, 'formatColor'] + ); + if ($cellData === $origData) { + $cellData = htmlspecialchars($cellData); + } + if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperscript()) { + $cellData = '' . $cellData . ''; + } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubscript()) { + $cellData = '' . $cellData . ''; + } + } + } + + private function generateRowCellData($pSheet, $cell, &$cssClass, $cellType) + { + $cellData = ' '; + if ($cell instanceof Cell) { + $cellData = ''; + // Don't know what this does, and no test cases. + //if ($cell->getParent() === null) { + // $cell->attach($pSheet); + //} + // Value + $this->generateRowCellDataValue($pSheet, $cell, $cellData); + + // Converts the cell content so that spaces occuring at beginning of each new line are replaced by   + // Example: " Hello\n to the world" is converted to "  Hello\n to the world" + $cellData = preg_replace('/(?m)(?:^|\\G) /', ' ', $cellData); + + // convert newline "\n" to '
' + $cellData = nl2br($cellData); + + // Extend CSS class? + if (!$this->useInlineCss) { + $cssClass .= ' style' . $cell->getXfIndex(); + $cssClass .= ' ' . $cell->getDataType(); + } else { + if ($cellType == 'th') { + if (isset($this->cssStyles['th.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['th.style' . $cell->getXfIndex()]); + } + } else { + if (isset($this->cssStyles['td.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['td.style' . $cell->getXfIndex()]); + } + } + + // General horizontal alignment: Actual horizontal alignment depends on dataType + $sharedStyle = $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex()); + if ($sharedStyle->getAlignment()->getHorizontal() == Alignment::HORIZONTAL_GENERAL + && isset($this->cssStyles['.' . $cell->getDataType()]['text-align']) + ) { + $cssClass['text-align'] = $this->cssStyles['.' . $cell->getDataType()]['text-align']; + } + } + } else { + // Use default borders for empty cell + if (is_string($cssClass)) { + $cssClass .= ' style0'; + } + } + + return $cellData; + } + + private function generateRowIncludeCharts($pSheet, $coordinate) + { + return $this->includeCharts ? $this->writeChartInCell($pSheet, $coordinate) : ''; + } + + private function generateRowSpans($html, $rowSpan, $colSpan) + { + $html .= ($colSpan > 1) ? (' colspan="' . $colSpan . '"') : ''; + $html .= ($rowSpan > 1) ? (' rowspan="' . $rowSpan . '"') : ''; + + return $html; + } + + private function generateRowWriteCell(&$html, $pSheet, $coordinate, $cellType, $cellData, $colSpan, $rowSpan, $cssClass, $colNum, $sheetIndex, $pRow): void + { + // Image? + $htmlx = $this->writeImageInCell($pSheet, $coordinate); + // Chart? + $htmlx .= $this->generateRowIncludeCharts($pSheet, $coordinate); + // Column start + $html .= ' <' . $cellType; + if (!$this->useInlineCss && !$this->isPdf) { + $html .= ' class="' . $cssClass . '"'; + if ($htmlx) { + $html .= " style='position: relative;'"; + } + } else { + //** Necessary redundant code for the sake of \PhpOffice\PhpSpreadsheet\Writer\Pdf ** + // We must explicitly write the width of the + if ($this->useInlineCss) { + $xcssClass = $cssClass; + } else { + $html .= ' class="' . $cssClass . '"'; + $xcssClass = []; + } + $width = 0; + $i = $colNum - 1; + $e = $colNum + $colSpan - 1; + while ($i++ < $e) { + if (isset($this->columnWidths[$sheetIndex][$i])) { + $width += $this->columnWidths[$sheetIndex][$i]; + } + } + $xcssClass['width'] = $width . 'pt'; + + // We must also explicitly write the height of the + if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height'])) { + $height = $this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height']; + $xcssClass['height'] = $height; + } + //** end of redundant code ** + + if ($htmlx) { + $xcssClass['position'] = 'relative'; + } + $html .= ' style="' . $this->assembleCSS($xcssClass) . '"'; + } + $html = $this->generateRowSpans($html, $rowSpan, $colSpan); + + $html .= '>'; + $html .= $htmlx; + + $html .= $this->writeComment($pSheet, $coordinate); + + // Cell data + $html .= $cellData; + + // Column end + $html .= '' . PHP_EOL; + } + + /** + * Generate row. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param array $pValues Array containing cells in a row + * @param int $pRow Row number (0-based) + * @param string $cellType eg: 'td' + * + * @return string + */ + private function generateRow(Worksheet $pSheet, array $pValues, $pRow, $cellType) + { + // Sheet index + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + $html = $this->generateRowStart($pSheet, $sheetIndex, $pRow); + + // Write cells + $colNum = 0; + foreach ($pValues as $cellAddress) { + [$cell, $cssClass, $coordinate] = $this->generateRowCellCss($pSheet, $cellAddress, $pRow, $colNum); + + $colSpan = 1; + $rowSpan = 1; + + // Cell Data + $cellData = $this->generateRowCellData($pSheet, $cell, $cssClass, $cellType); + + // Hyperlink? + if ($pSheet->hyperlinkExists($coordinate) && !$pSheet->getHyperlink($coordinate)->isInternal()) { + $cellData = '' . $cellData . ''; + } + + // Should the cell be written or is it swallowed by a rowspan or colspan? + $writeCell = !(isset($this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]) + && $this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]); + + // Colspan and Rowspan + $colspan = 1; + $rowspan = 1; + if (isset($this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum])) { + $spans = $this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]; + $rowSpan = $spans['rowspan']; + $colSpan = $spans['colspan']; + + // Also apply style from last cell in merge to fix borders - + // relies on !important for non-none border declarations in createCSSStyleBorder + $endCellCoord = Coordinate::stringFromColumnIndex($colNum + $colSpan) . ($pRow + $rowSpan); + if (!$this->useInlineCss) { + $cssClass .= ' style' . $pSheet->getCell($endCellCoord)->getXfIndex(); + } + } + + // Write + if ($writeCell) { + $this->generateRowWriteCell($html, $pSheet, $coordinate, $cellType, $cellData, $colSpan, $rowSpan, $cssClass, $colNum, $sheetIndex, $pRow); + } + + // Next column + ++$colNum; + } + + // Write row end + $html .= ' ' . PHP_EOL; + + // Return + return $html; + } + + /** + * Takes array where of CSS properties / values and converts to CSS string. + * + * @return string + */ + private function assembleCSS(array $pValue = []) + { + $pairs = []; + foreach ($pValue as $property => $value) { + $pairs[] = $property . ':' . $value; + } + $string = implode('; ', $pairs); + + return $string; + } + + /** + * Get images root. + * + * @return string + */ + public function getImagesRoot() + { + return $this->imagesRoot; + } + + /** + * Set images root. + * + * @param string $pValue + * + * @return $this + */ + public function setImagesRoot($pValue) + { + $this->imagesRoot = $pValue; + + return $this; + } + + /** + * Get embed images. + * + * @return bool + */ + public function getEmbedImages() + { + return $this->embedImages; + } + + /** + * Set embed images. + * + * @param bool $pValue + * + * @return $this + */ + public function setEmbedImages($pValue) + { + $this->embedImages = $pValue; + + return $this; + } + + /** + * Get use inline CSS? + * + * @return bool + */ + public function getUseInlineCss() + { + return $this->useInlineCss; + } + + /** + * Set use inline CSS? + * + * @param bool $pValue + * + * @return $this + */ + public function setUseInlineCss($pValue) + { + $this->useInlineCss = $pValue; + + return $this; + } + + /** + * Get use embedded CSS? + * + * @return bool + * + * @codeCoverageIgnore + * + * @deprecated no longer used + */ + public function getUseEmbeddedCSS() + { + return $this->useEmbeddedCSS; + } + + /** + * Set use embedded CSS? + * + * @param bool $pValue + * + * @return $this + * + * @codeCoverageIgnore + * + * @deprecated no longer used + */ + public function setUseEmbeddedCSS($pValue) + { + $this->useEmbeddedCSS = $pValue; + + return $this; + } + + /** + * Add color to formatted string as inline style. + * + * @param string $pValue Plain formatted value without color + * @param string $pFormat Format code + * + * @return string + */ + public function formatColor($pValue, $pFormat) + { + // Color information, e.g. [Red] is always at the beginning + $color = null; // initialize + $matches = []; + + $color_regex = '/^\\[[a-zA-Z]+\\]/'; + if (preg_match($color_regex, $pFormat, $matches)) { + $color = str_replace(['[', ']'], '', $matches[0]); + $color = strtolower($color); + } + + // convert to PCDATA + $value = htmlspecialchars($pValue); + + // color span tag + if ($color !== null) { + $value = '' . $value . ''; + } + + return $value; + } + + /** + * Calculate information about HTML colspan and rowspan which is not always the same as Excel's. + */ + private function calculateSpans(): void + { + if ($this->spansAreCalculated) { + return; + } + // Identify all cells that should be omitted in HTML due to cell merge. + // In HTML only the upper-left cell should be written and it should have + // appropriate rowspan / colspan attribute + $sheetIndexes = $this->sheetIndex !== null ? + [$this->sheetIndex] : range(0, $this->spreadsheet->getSheetCount() - 1); + + foreach ($sheetIndexes as $sheetIndex) { + $sheet = $this->spreadsheet->getSheet($sheetIndex); + + $candidateSpannedRow = []; + + // loop through all Excel merged cells + foreach ($sheet->getMergeCells() as $cells) { + [$cells] = Coordinate::splitRange($cells); + $first = $cells[0]; + $last = $cells[1]; + + [$fc, $fr] = Coordinate::coordinateFromString($first); + $fc = Coordinate::columnIndexFromString($fc) - 1; + + [$lc, $lr] = Coordinate::coordinateFromString($last); + $lc = Coordinate::columnIndexFromString($lc) - 1; + + // loop through the individual cells in the individual merge + $r = $fr - 1; + while ($r++ < $lr) { + // also, flag this row as a HTML row that is candidate to be omitted + $candidateSpannedRow[$r] = $r; + + $c = $fc - 1; + while ($c++ < $lc) { + if (!($c == $fc && $r == $fr)) { + // not the upper-left cell (should not be written in HTML) + $this->isSpannedCell[$sheetIndex][$r][$c] = [ + 'baseCell' => [$fr, $fc], + ]; + } else { + // upper-left is the base cell that should hold the colspan/rowspan attribute + $this->isBaseCell[$sheetIndex][$r][$c] = [ + 'xlrowspan' => $lr - $fr + 1, // Excel rowspan + 'rowspan' => $lr - $fr + 1, // HTML rowspan, value may change + 'xlcolspan' => $lc - $fc + 1, // Excel colspan + 'colspan' => $lc - $fc + 1, // HTML colspan, value may change + ]; + } + } + } + } + + $this->calculateSpansOmitRows($sheet, $sheetIndex, $candidateSpannedRow); + + // TODO: Same for columns + } + + // We have calculated the spans + $this->spansAreCalculated = true; + } + + private function calculateSpansOmitRows($sheet, $sheetIndex, $candidateSpannedRow): void + { + // Identify which rows should be omitted in HTML. These are the rows where all the cells + // participate in a merge and the where base cells are somewhere above. + $countColumns = Coordinate::columnIndexFromString($sheet->getHighestColumn()); + foreach ($candidateSpannedRow as $rowIndex) { + if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { + if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { + $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; + } + } + } + + // For each of the omitted rows we found above, the affected rowspans should be subtracted by 1 + if (isset($this->isSpannedRow[$sheetIndex])) { + foreach ($this->isSpannedRow[$sheetIndex] as $rowIndex) { + $adjustedBaseCells = []; + $c = -1; + $e = $countColumns - 1; + while ($c++ < $e) { + $baseCell = $this->isSpannedCell[$sheetIndex][$rowIndex][$c]['baseCell']; + + if (!in_array($baseCell, $adjustedBaseCells)) { + // subtract rowspan by 1 + --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan']; + $adjustedBaseCells[] = $baseCell; + } + } + } + } + } + + /** + * Write a comment in the same format as LibreOffice. + * + * @see https://github.com/LibreOffice/core/blob/9fc9bf3240f8c62ad7859947ab8a033ac1fe93fa/sc/source/filter/html/htmlexp.cxx#L1073-L1092 + * + * @param string $coordinate + * + * @return string + */ + private function writeComment(Worksheet $pSheet, $coordinate) + { + $result = ''; + if (!$this->isPdf && isset($pSheet->getComments()[$coordinate])) { + $result .= ''; + $result .= '
' . nl2br($pSheet->getComment($coordinate)->getText()->getPlainText()) . '
'; + $result .= PHP_EOL; + } + + return $result; + } + + /** + * Generate @page declarations. + * + * @param bool $generateSurroundingHTML + * + * @return string + */ + private function generatePageDeclarations($generateSurroundingHTML) + { + // Ensure that Spans have been calculated? + $this->calculateSpans(); + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Construct HTML + $htmlPage = $generateSurroundingHTML ? ('' . PHP_EOL) : ''; + + return $htmlPage; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/IWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/IWriter.php new file mode 100755 index 0000000..5129d65 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/IWriter.php @@ -0,0 +1,87 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'content' => Content::class, + 'meta' => Meta::class, + 'meta_inf' => MetaInf::class, + 'mimetype' => Mimetype::class, + 'settings' => Settings::class, + 'styles' => Styles::class, + 'thumbnails' => Thumbnails::class, + ]; + + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return null|Ods\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + if (!$this->spreadSheet) { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + + // garbage collect + $this->spreadSheet->garbageCollect(); + + $this->openFileHandle($pFilename); + + $zip = $this->createZip(); + + $zip->addFile('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest()); + $zip->addFile('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail()); + $zip->addFile('content.xml', $this->getWriterPart('content')->write()); + $zip->addFile('meta.xml', $this->getWriterPart('meta')->write()); + $zip->addFile('mimetype', $this->getWriterPart('mimetype')->write()); + $zip->addFile('settings.xml', $this->getWriterPart('settings')->write()); + $zip->addFile('styles.xml', $this->getWriterPart('styles')->write()); + + // Close file + try { + $zip->finish(); + } catch (OverflowException $e) { + throw new WriterException('Could not close resource.'); + } + + $this->maybeCloseFileHandle(); + } + + /** + * Create zip object. + * + * @return ZipStream + */ + private function createZip() + { + // Try opening the ZIP file + if (!is_resource($this->fileHandle)) { + throw new WriterException('Could not open resource for writing.'); + } + + // Create new ZIP stream + $options = new Archive(); + $options->setEnableZip64(false); + $options->setOutputStream($this->fileHandle); + + return new ZipStream(null, $options); + } + + /** + * Get Spreadsheet object. + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No PhpSpreadsheet assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return $this + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Cell/Comment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Cell/Comment.php new file mode 100755 index 0000000..b0829bf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Cell/Comment.php @@ -0,0 +1,30 @@ + + */ +class Comment +{ + public static function write(XMLWriter $objWriter, Cell $cell): void + { + $comments = $cell->getWorksheet()->getComments(); + if (!isset($comments[$cell->getCoordinate()])) { + return; + } + $comment = $comments[$cell->getCoordinate()]; + + $objWriter->startElement('office:annotation'); + $objWriter->writeAttribute('svg:width', $comment->getWidth()); + $objWriter->writeAttribute('svg:height', $comment->getHeight()); + $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); + $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); + $objWriter->writeElement('dc:creator', $comment->getAuthor()); + $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Content.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Content.php new file mode 100755 index 0000000..6588473 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Content.php @@ -0,0 +1,367 @@ + + */ +class Content extends WriterPart +{ + const NUMBER_COLS_REPEATED_MAX = 1024; + const NUMBER_ROWS_REPEATED_MAX = 1048576; + const CELL_STYLE_PREFIX = 'ce'; + + /** + * Write content.xml to XML format. + * + * @return string XML Output + */ + public function write() + { + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-content'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms'); + $objWriter->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0'); + $objWriter->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:scripts'); + $objWriter->writeElement('office:font-face-decls'); + + // Styles XF + $objWriter->startElement('office:automatic-styles'); + $this->writeXfStyles($objWriter, $this->getParentWriter()->getSpreadsheet()); + $objWriter->endElement(); + + $objWriter->startElement('office:body'); + $objWriter->startElement('office:spreadsheet'); + $objWriter->writeElement('table:calculation-settings'); + + $this->writeSheets($objWriter); + + $objWriter->writeElement('table:named-expressions'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write sheets. + */ + private function writeSheets(XMLWriter $objWriter): void + { + $spreadsheet = $this->getParentWriter()->getSpreadsheet(); /** @var Spreadsheet $spreadsheet */ + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->startElement('table:table'); + $objWriter->writeAttribute('table:name', $spreadsheet->getSheet($i)->getTitle()); + $objWriter->writeElement('office:forms'); + $objWriter->startElement('table:table-column'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $this->writeRows($objWriter, $spreadsheet->getSheet($i)); + $objWriter->endElement(); + } + } + + /** + * Write rows of the specified sheet. + */ + private function writeRows(XMLWriter $objWriter, Worksheet $sheet): void + { + $numberRowsRepeated = self::NUMBER_ROWS_REPEATED_MAX; + $span_row = 0; + $rows = $sheet->getRowIterator(); + while ($rows->valid()) { + --$numberRowsRepeated; + $row = $rows->current(); + if ($row->getCellIterator()->valid()) { + if ($span_row) { + $objWriter->startElement('table:table-row'); + if ($span_row > 1) { + $objWriter->writeAttribute('table:number-rows-repeated', $span_row); + } + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $objWriter->endElement(); + $span_row = 0; + } + $objWriter->startElement('table:table-row'); + $this->writeCells($objWriter, $row); + $objWriter->endElement(); + } else { + ++$span_row; + } + $rows->next(); + } + } + + /** + * Write cells of the specified row. + */ + private function writeCells(XMLWriter $objWriter, Row $row): void + { + $numberColsRepeated = self::NUMBER_COLS_REPEATED_MAX; + $prevColumn = -1; + $cells = $row->getCellIterator(); + while ($cells->valid()) { + /** @var \PhpOffice\PhpSpreadsheet\Cell\Cell $cell */ + $cell = $cells->current(); + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + $this->writeCellSpan($objWriter, $column, $prevColumn); + $objWriter->startElement('table:table-cell'); + $this->writeCellMerge($objWriter, $cell); + + // Style XF + $style = $cell->getXfIndex(); + if ($style !== null) { + $objWriter->writeAttribute('table:style-name', self::CELL_STYLE_PREFIX . $style); + } + + switch ($cell->getDataType()) { + case DataType::TYPE_BOOL: + $objWriter->writeAttribute('office:value-type', 'boolean'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_ERROR: + throw new Exception('Writing of error not implemented yet.'); + + break; + case DataType::TYPE_FORMULA: + $formulaValue = $cell->getValue(); + if ($this->getParentWriter()->getPreCalculateFormulas()) { + try { + $formulaValue = $cell->getCalculatedValue(); + } catch (Exception $e) { + // don't do anything + } + } + $objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue()); + if (is_numeric($formulaValue)) { + $objWriter->writeAttribute('office:value-type', 'float'); + } else { + $objWriter->writeAttribute('office:value-type', 'string'); + } + $objWriter->writeAttribute('office:value', $formulaValue); + $objWriter->writeElement('text:p', $formulaValue); + + break; + case DataType::TYPE_INLINE: + throw new Exception('Writing of inline not implemented yet.'); + + break; + case DataType::TYPE_NUMERIC: + $objWriter->writeAttribute('office:value-type', 'float'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_STRING: + $objWriter->writeAttribute('office:value-type', 'string'); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + } + Comment::write($objWriter, $cell); + $objWriter->endElement(); + $prevColumn = $column; + $cells->next(); + } + $numberColsRepeated = $numberColsRepeated - $prevColumn - 1; + if ($numberColsRepeated > 0) { + if ($numberColsRepeated > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $numberColsRepeated); + $objWriter->endElement(); + } else { + $objWriter->writeElement('table:table-cell'); + } + } + } + + /** + * Write span. + * + * @param int $curColumn + * @param int $prevColumn + */ + private function writeCellSpan(XMLWriter $objWriter, $curColumn, $prevColumn): void + { + $diff = $curColumn - $prevColumn - 1; + if (1 === $diff) { + $objWriter->writeElement('table:table-cell'); + } elseif ($diff > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $diff); + $objWriter->endElement(); + } + } + + /** + * Write XF cell styles. + */ + private function writeXfStyles(XMLWriter $writer, Spreadsheet $spreadsheet): void + { + foreach ($spreadsheet->getCellXfCollection() as $style) { + $writer->startElement('style:style'); + $writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX . $style->getIndex()); + $writer->writeAttribute('style:family', 'table-cell'); + $writer->writeAttribute('style:parent-style-name', 'Default'); + + // style:text-properties + + // Font + $writer->startElement('style:text-properties'); + + $font = $style->getFont(); + + if ($font->getBold()) { + $writer->writeAttribute('fo:font-weight', 'bold'); + $writer->writeAttribute('style:font-weight-complex', 'bold'); + $writer->writeAttribute('style:font-weight-asian', 'bold'); + } + + if ($font->getItalic()) { + $writer->writeAttribute('fo:font-style', 'italic'); + } + + if ($color = $font->getColor()) { + $writer->writeAttribute('fo:color', sprintf('#%s', $color->getRGB())); + } + + if ($family = $font->getName()) { + $writer->writeAttribute('fo:font-family', $family); + } + + if ($size = $font->getSize()) { + $writer->writeAttribute('fo:font-size', sprintf('%.1Fpt', $size)); + } + + if ($font->getUnderline() && $font->getUnderline() != Font::UNDERLINE_NONE) { + $writer->writeAttribute('style:text-underline-style', 'solid'); + $writer->writeAttribute('style:text-underline-width', 'auto'); + $writer->writeAttribute('style:text-underline-color', 'font-color'); + + switch ($font->getUnderline()) { + case Font::UNDERLINE_DOUBLE: + $writer->writeAttribute('style:text-underline-type', 'double'); + + break; + case Font::UNDERLINE_SINGLE: + $writer->writeAttribute('style:text-underline-type', 'single'); + + break; + } + } + + $writer->endElement(); // Close style:text-properties + + // style:table-cell-properties + + $writer->startElement('style:table-cell-properties'); + $writer->writeAttribute('style:rotation-align', 'none'); + + // Fill + if ($fill = $style->getFill()) { + switch ($fill->getFillType()) { + case Fill::FILL_SOLID: + $writer->writeAttribute('fo:background-color', sprintf( + '#%s', + strtolower($fill->getStartColor()->getRGB()) + )); + + break; + case Fill::FILL_GRADIENT_LINEAR: + case Fill::FILL_GRADIENT_PATH: + /// TODO :: To be implemented + break; + case Fill::FILL_NONE: + default: + } + } + + $writer->endElement(); // Close style:table-cell-properties + + // End + + $writer->endElement(); // Close style:style + } + } + + /** + * Write attributes for merged cell. + */ + private function writeCellMerge(XMLWriter $objWriter, Cell $cell): void + { + if (!$cell->isMergeRangeValueCell()) { + return; + } + + $mergeRange = Coordinate::splitRange($cell->getMergeRange()); + [$startCell, $endCell] = $mergeRange[0]; + $start = Coordinate::coordinateFromString($startCell); + $end = Coordinate::coordinateFromString($endCell); + $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1; + $rowSpan = $end[1] - $start[1] + 1; + + $objWriter->writeAttribute('table:number-columns-spanned', $columnSpan); + $objWriter->writeAttribute('table:number-rows-spanned', $rowSpan); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Meta.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Meta.php new file mode 100755 index 0000000..365221f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Meta.php @@ -0,0 +1,75 @@ +getParentWriter()->getSpreadsheet(); + } + + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Meta + $objWriter->startElement('office:document-meta'); + + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:meta'); + + $objWriter->writeElement('meta:initial-creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + $keywords = explode(' ', $spreadsheet->getProperties()->getKeywords()); + foreach ($keywords as $keyword) { + $objWriter->writeElement('meta:keyword', $keyword); + } + + // + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'Company'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCompany()); + $objWriter->endElement(); + + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'category'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCategory()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/MetaInf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/MetaInf.php new file mode 100755 index 0000000..c9085cf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/MetaInf.php @@ -0,0 +1,60 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Manifest + $objWriter->startElement('manifest:manifest'); + $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); + $objWriter->writeAttribute('manifest:version', '1.2'); + + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', '/'); + $objWriter->writeAttribute('manifest:version', '1.2'); + $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'content.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); + $objWriter->writeAttribute('manifest:media-type', 'image/png'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Mimetype.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Mimetype.php new file mode 100755 index 0000000..4aac368 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Mimetype.php @@ -0,0 +1,20 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Settings + $objWriter->startElement('office:document-settings'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:settings'); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:view-settings'); + $objWriter->startElement('config:config-item-map-indexed'); + $objWriter->writeAttribute('config:name', 'Views'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:configuration-settings'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Styles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Styles.php new file mode 100755 index 0000000..7ba7eba --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Styles.php @@ -0,0 +1,68 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-styles'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:font-face-decls'); + $objWriter->writeElement('office:styles'); + $objWriter->writeElement('office:automatic-styles'); + $objWriter->writeElement('office:master-styles'); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Thumbnails.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Thumbnails.php new file mode 100755 index 0000000..dfab065 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Ods/Thumbnails.php @@ -0,0 +1,20 @@ +parentWriter; + } + + /** + * Set parent Ods writer. + */ + public function __construct(Ods $writer) + { + $this->parentWriter = $writer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf.php new file mode 100755 index 0000000..8722045 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf.php @@ -0,0 +1,253 @@ + 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_LETTER_SMALL => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_TABLOID => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_LEDGER => [1224.00, 792.00], // (17 in. by 11 in.) + PageSetup::PAPERSIZE_LEGAL => 'LEGAL', // (8.5 in. by 14 in.) + PageSetup::PAPERSIZE_STATEMENT => [396.00, 612.00], // (5.5 in. by 8.5 in.) + PageSetup::PAPERSIZE_EXECUTIVE => 'EXECUTIVE', // (7.25 in. by 10.5 in.) + PageSetup::PAPERSIZE_A3 => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A4 => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A4_SMALL => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A5 => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5 => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_FOLIO => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_QUARTO => [609.45, 779.53], // (215 mm by 275 mm) + PageSetup::PAPERSIZE_STANDARD_1 => [720.00, 1008.00], // (10 in. by 14 in.) + PageSetup::PAPERSIZE_STANDARD_2 => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_NOTE => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_NO9_ENVELOPE => [279.00, 639.00], // (3.875 in. by 8.875 in.) + PageSetup::PAPERSIZE_NO10_ENVELOPE => [297.00, 684.00], // (4.125 in. by 9.5 in.) + PageSetup::PAPERSIZE_NO11_ENVELOPE => [324.00, 747.00], // (4.5 in. by 10.375 in.) + PageSetup::PAPERSIZE_NO12_ENVELOPE => [342.00, 792.00], // (4.75 in. by 11 in.) + PageSetup::PAPERSIZE_NO14_ENVELOPE => [360.00, 828.00], // (5 in. by 11.5 in.) + PageSetup::PAPERSIZE_C => [1224.00, 1584.00], // (17 in. by 22 in.) + PageSetup::PAPERSIZE_D => [1584.00, 2448.00], // (22 in. by 34 in.) + PageSetup::PAPERSIZE_E => [2448.00, 3168.00], // (34 in. by 44 in.) + PageSetup::PAPERSIZE_DL_ENVELOPE => [311.81, 623.62], // (110 mm by 220 mm) + PageSetup::PAPERSIZE_C5_ENVELOPE => 'C5', // (162 mm by 229 mm) + PageSetup::PAPERSIZE_C3_ENVELOPE => 'C3', // (324 mm by 458 mm) + PageSetup::PAPERSIZE_C4_ENVELOPE => 'C4', // (229 mm by 324 mm) + PageSetup::PAPERSIZE_C6_ENVELOPE => 'C6', // (114 mm by 162 mm) + PageSetup::PAPERSIZE_C65_ENVELOPE => [323.15, 649.13], // (114 mm by 229 mm) + PageSetup::PAPERSIZE_B4_ENVELOPE => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5_ENVELOPE => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_B6_ENVELOPE => [498.90, 354.33], // (176 mm by 125 mm) + PageSetup::PAPERSIZE_ITALY_ENVELOPE => [311.81, 651.97], // (110 mm by 230 mm) + PageSetup::PAPERSIZE_MONARCH_ENVELOPE => [279.00, 540.00], // (3.875 in. by 7.5 in.) + PageSetup::PAPERSIZE_6_3_4_ENVELOPE => [261.00, 468.00], // (3.625 in. by 6.5 in.) + PageSetup::PAPERSIZE_US_STANDARD_FANFOLD => [1071.00, 792.00], // (14.875 in. by 11 in.) + PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD => [612.00, 864.00], // (8.5 in. by 12 in.) + PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_ISO_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD => [566.93, 419.53], // (200 mm by 148 mm) + PageSetup::PAPERSIZE_STANDARD_PAPER_1 => [648.00, 792.00], // (9 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_2 => [720.00, 792.00], // (10 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_3 => [1080.00, 792.00], // (15 in. by 11 in.) + PageSetup::PAPERSIZE_INVITE_ENVELOPE => [623.62, 623.62], // (220 mm by 220 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER => [667.80, 1080.00], // (9.275 in. by 15 in.) + PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER => [841.68, 1296.00], // (11.69 in. by 18 in.) + PageSetup::PAPERSIZE_A4_EXTRA_PAPER => [668.98, 912.76], // (236 mm by 322 mm) + PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER => [595.80, 792.00], // (8.275 in. by 11 in.) + PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER => [643.46, 1009.13], // (227 mm by 356 mm) + PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER => [864.57, 1380.47], // (305 mm by 487 mm) + PageSetup::PAPERSIZE_LETTER_PLUS_PAPER => [612.00, 913.68], // (8.5 in. by 12.69 in.) + PageSetup::PAPERSIZE_A4_PLUS_PAPER => [595.28, 935.43], // (210 mm by 330 mm) + PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER => [515.91, 728.50], // (182 mm by 257 mm) + PageSetup::PAPERSIZE_A3_EXTRA_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + PageSetup::PAPERSIZE_A5_EXTRA_PAPER => [493.23, 666.14], // (174 mm by 235 mm) + PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER => [569.76, 782.36], // (201 mm by 276 mm) + PageSetup::PAPERSIZE_A2_PAPER => 'A2', // (420 mm by 594 mm) + PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + ]; + + /** + * Create a new PDF Writer instance. + * + * @param Spreadsheet $spreadsheet Spreadsheet object + */ + public function __construct(Spreadsheet $spreadsheet) + { + parent::__construct($spreadsheet); + //$this->setUseInlineCss(true); + $this->tempDir = File::sysGetTempDir() . '/phpsppdf'; + $this->isPdf = true; + } + + /** + * Get Font. + * + * @return string + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. Examples: + * 'arialunicid0-chinese-simplified' + * 'arialunicid0-chinese-traditional' + * 'arialunicid0-korean' + * 'arialunicid0-japanese'. + * + * @param string $fontName + * + * @return $this + */ + public function setFont($fontName) + { + $this->font = $fontName; + + return $this; + } + + /** + * Get Paper Size. + * + * @return int + */ + public function getPaperSize() + { + return $this->paperSize; + } + + /** + * Set Paper Size. + * + * @param string $pValue Paper size see PageSetup::PAPERSIZE_* + * + * @return self + */ + public function setPaperSize($pValue) + { + $this->paperSize = $pValue; + + return $this; + } + + /** + * Get Orientation. + * + * @return string + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Set Orientation. + * + * @param string $pValue Page orientation see PageSetup::ORIENTATION_* + * + * @return self + */ + public function setOrientation($pValue) + { + $this->orientation = $pValue; + + return $this; + } + + /** + * Get temporary storage directory. + * + * @return string + */ + public function getTempDir() + { + return $this->tempDir; + } + + /** + * Set temporary storage directory. + * + * @param string $pValue Temporary storage directory + * + * @return self + */ + public function setTempDir($pValue) + { + if (is_dir($pValue)) { + $this->tempDir = $pValue; + } else { + throw new WriterException("Directory does not exist: $pValue"); + } + + return $this; + } + + /** + * Save Spreadsheet to PDF file, pre-save. + * + * @param string $pFilename Name of the file to save as + * + * @return resource + */ + protected function prepareForSave($pFilename) + { + // Open file + $this->openFileHandle($pFilename); + + return $this->fileHandle; + } + + /** + * Save PhpSpreadsheet to PDF file, post-save. + */ + protected function restoreStateAfterSave(): void + { + $this->maybeCloseFileHandle(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Dompdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Dompdf.php new file mode 100755 index 0000000..9ae2cce --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Dompdf.php @@ -0,0 +1,72 @@ +getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + + $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance(); + $pdf->setPaper(strtolower($paperSize), $orientation); + + $pdf->loadHtml($this->generateHTMLAll()); + $pdf->render(); + + // Write to file + fwrite($fileHandle, $pdf->output()); + + parent::restoreStateAfterSave(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Mpdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Mpdf.php new file mode 100755 index 0000000..75e0010 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Mpdf.php @@ -0,0 +1,106 @@ +getSheetIndex()) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + $this->setOrientation($orientation); + + // Override Page Orientation + if (null !== $this->getOrientation()) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + $orientation = strtoupper($orientation); + + // Override Paper Size + if (null !== $this->getPaperSize()) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $config = ['tempDir' => $this->tempDir . '/mpdf']; + $pdf = $this->createExternalWriterInstance($config); + $ortmp = $orientation; + $pdf->_setPageSize(strtoupper($paperSize), $ortmp); + $pdf->DefOrientation = $orientation; + $pdf->AddPageByArray([ + 'orientation' => $orientation, + 'margin-left' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getLeft()), + 'margin-right' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getRight()), + 'margin-top' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getTop()), + 'margin-bottom' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getBottom()), + ]); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + $html = $this->generateHTMLAll(); + foreach (\array_chunk(\explode(PHP_EOL, $html), 1000) as $lines) { + $pdf->WriteHTML(\implode(PHP_EOL, $lines)); + } + + // Write to file + fwrite($fileHandle, $pdf->Output('', 'S')); + + parent::restoreStateAfterSave(); + } + + /** + * Convert inches to mm. + * + * @param float $inches + * + * @return float + */ + private function inchesToMm($inches) + { + return $inches * 25.4; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Tcpdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Tcpdf.php new file mode 100755 index 0000000..7530b1e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Pdf/Tcpdf.php @@ -0,0 +1,104 @@ +setUseInlineCss(true); + } + + /** + * Gets the implementation of external PDF library that should be used. + * + * @param string $orientation Page orientation + * @param string $unit Unit measure + * @param string $paperSize Paper size + * + * @return \TCPDF implementation + */ + protected function createExternalWriterInstance($orientation, $unit, $paperSize) + { + return new \TCPDF($orientation, $unit, $paperSize); + } + + /** + * Save Spreadsheet to file. + * + * @param string $pFilename Name of the file to save as + */ + public function save($pFilename): void + { + $fileHandle = parent::prepareForSave($pFilename); + + // Default PDF paper size + $paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.) + + // Check for paper size and page orientation + if ($this->getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet(0)->getPageMargins(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageMargins(); + } + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) + ? 'L' + : 'P'; + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance($orientation, 'pt', $paperSize); + $pdf->setFontSubsetting(false); + // Set margins, converting inches to points (using 72 dpi) + $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72); + $pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72); + + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + + $pdf->AddPage(); + + // Set the appropriate font + $pdf->SetFont($this->getFont()); + $pdf->writeHTML($this->generateHTMLAll()); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + // Write to file + fwrite($fileHandle, $pdf->output($pFilename, 'S')); + + parent::restoreStateAfterSave(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls.php new file mode 100755 index 0000000..4f4b256 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls.php @@ -0,0 +1,901 @@ +spreadsheet = $spreadsheet; + + $this->parser = new Xls\Parser(); + } + + /** + * Save Spreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // initialize colors array + $this->colors = []; + + // Initialise workbook writer + $this->writerWorkbook = new Xls\Workbook($this->spreadsheet, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser); + + // Initialise worksheet writers + $countSheets = $this->spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i] = new Xls\Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->spreadsheet->getSheet($i)); + } + + // build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook. + $this->buildWorksheetEschers(); + $this->buildWorkbookEscher(); + + // add 15 identical cell style Xfs + // for now, we use the first cellXf instead of cellStyleXf + $cellXfCollection = $this->spreadsheet->getCellXfCollection(); + for ($i = 0; $i < 15; ++$i) { + $this->writerWorkbook->addXfWriter($cellXfCollection[0], true); + } + + // add all the cell Xfs + foreach ($this->spreadsheet->getCellXfCollection() as $style) { + $this->writerWorkbook->addXfWriter($style, false); + } + + // add fonts from rich text eleemnts + for ($i = 0; $i < $countSheets; ++$i) { + foreach ($this->writerWorksheets[$i]->phpSheet->getCoordinates() as $coordinate) { + $cell = $this->writerWorksheets[$i]->phpSheet->getCell($coordinate); + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + if ($element instanceof Run) { + $font = $element->getFont(); + $this->writerWorksheets[$i]->fontHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font); + } + } + } + } + } + + // initialize OLE file + $workbookStreamName = 'Workbook'; + $OLE = new File(OLE::ascToUcs($workbookStreamName)); + + // Write the worksheet streams before the global workbook stream, + // because the byte sizes of these are needed in the global workbook stream + $worksheetSizes = []; + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i]->close(); + $worksheetSizes[] = $this->writerWorksheets[$i]->_datasize; + } + + // add binary data for global workbook stream + $OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes)); + + // add binary data for sheet streams + for ($i = 0; $i < $countSheets; ++$i) { + $OLE->append($this->writerWorksheets[$i]->getData()); + } + + $this->documentSummaryInformation = $this->writeDocumentSummaryInformation(); + // initialize OLE Document Summary Information + if (isset($this->documentSummaryInformation) && !empty($this->documentSummaryInformation)) { + $OLE_DocumentSummaryInformation = new File(OLE::ascToUcs(chr(5) . 'DocumentSummaryInformation')); + $OLE_DocumentSummaryInformation->append($this->documentSummaryInformation); + } + + $this->summaryInformation = $this->writeSummaryInformation(); + // initialize OLE Summary Information + if (isset($this->summaryInformation) && !empty($this->summaryInformation)) { + $OLE_SummaryInformation = new File(OLE::ascToUcs(chr(5) . 'SummaryInformation')); + $OLE_SummaryInformation->append($this->summaryInformation); + } + + // define OLE Parts + $arrRootData = [$OLE]; + // initialize OLE Properties file + if (isset($OLE_SummaryInformation)) { + $arrRootData[] = $OLE_SummaryInformation; + } + // initialize OLE Extended Properties file + if (isset($OLE_DocumentSummaryInformation)) { + $arrRootData[] = $OLE_DocumentSummaryInformation; + } + + $root = new Root(time(), time(), $arrRootData); + // save the OLE file + $this->openFileHandle($pFilename); + $root->save($this->fileHandle); + $this->maybeCloseFileHandle(); + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Build the Worksheet Escher objects. + */ + private function buildWorksheetEschers(): void + { + // 1-based index to BstoreContainer + $blipIndex = 0; + $lastReducedSpId = 0; + $lastSpId = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + // sheet index + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + $escher = null; + + // check if there are any shapes for this sheet + $filterRange = $sheet->getAutoFilter()->getRange(); + if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) { + continue; + } + + // create intermediate Escher object + $escher = new Escher(); + + // dgContainer + $dgContainer = new DgContainer(); + + // set the drawing index (we use sheet index + 1) + $dgId = $sheet->getParent()->getIndex($sheet) + 1; + $dgContainer->setDgId($dgId); + $escher->setDgContainer($dgContainer); + + // spgrContainer + $spgrContainer = new SpgrContainer(); + $dgContainer->setSpgrContainer($spgrContainer); + + // add one shape which is the group shape + $spContainer = new SpContainer(); + $spContainer->setSpgr(true); + $spContainer->setSpType(0); + $spContainer->setSpId(($sheet->getParent()->getIndex($sheet) + 1) << 10); + $spgrContainer->addChild($spContainer); + + // add the shapes + + $countShapes[$sheetIndex] = 0; // count number of shapes (minus group shape), in sheet + + foreach ($sheet->getDrawingCollection() as $drawing) { + ++$blipIndex; + + ++$countShapes[$sheetIndex]; + + // add the shape + $spContainer = new SpContainer(); + + // set the shape type + $spContainer->setSpType(0x004B); + // set the shape flag + $spContainer->setSpFlag(0x02); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + // set the BLIP index + $spContainer->setOPT(0x4104, $blipIndex); + + // set coordinates and offsets, client anchor + $coordinates = $drawing->getCoordinates(); + $offsetX = $drawing->getOffsetX(); + $offsetY = $drawing->getOffsetY(); + $width = $drawing->getWidth(); + $height = $drawing->getHeight(); + + $twoAnchor = \PhpOffice\PhpSpreadsheet\Shared\Xls::oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height); + + $spContainer->setStartCoordinates($twoAnchor['startCoordinates']); + $spContainer->setStartOffsetX($twoAnchor['startOffsetX']); + $spContainer->setStartOffsetY($twoAnchor['startOffsetY']); + $spContainer->setEndCoordinates($twoAnchor['endCoordinates']); + $spContainer->setEndOffsetX($twoAnchor['endOffsetX']); + $spContainer->setEndOffsetY($twoAnchor['endOffsetY']); + + $spgrContainer->addChild($spContainer); + } + + // AutoFilters + if (!empty($filterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($filterRange); + $iNumColStart = $rangeBounds[0][0]; + $iNumColEnd = $rangeBounds[1][0]; + + $iInc = $iNumColStart; + while ($iInc <= $iNumColEnd) { + ++$countShapes[$sheetIndex]; + + // create an Drawing Object for the dropdown + $oDrawing = new BaseDrawing(); + // get the coordinates of drawing + $cDrawing = Coordinate::stringFromColumnIndex($iInc) . $rangeBounds[0][1]; + $oDrawing->setCoordinates($cDrawing); + $oDrawing->setWorksheet($sheet); + + // add the shape + $spContainer = new SpContainer(); + // set the shape type + $spContainer->setSpType(0x00C9); + // set the shape flag + $spContainer->setSpFlag(0x01); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + $spContainer->setOPT(0x007F, 0x01040104); // Protection -> fLockAgainstGrouping + $spContainer->setOPT(0x00BF, 0x00080008); // Text -> fFitTextToShape + $spContainer->setOPT(0x01BF, 0x00010000); // Fill Style -> fNoFillHitTest + $spContainer->setOPT(0x01FF, 0x00080000); // Line Style -> fNoLineDrawDash + $spContainer->setOPT(0x03BF, 0x000A0000); // Group Shape -> fPrint + + // set coordinates and offsets, client anchor + $endCoordinates = Coordinate::stringFromColumnIndex($iInc); + $endCoordinates .= $rangeBounds[0][1] + 1; + + $spContainer->setStartCoordinates($cDrawing); + $spContainer->setStartOffsetX(0); + $spContainer->setStartOffsetY(0); + $spContainer->setEndCoordinates($endCoordinates); + $spContainer->setEndOffsetX(0); + $spContainer->setEndOffsetY(0); + + $spgrContainer->addChild($spContainer); + ++$iInc; + } + } + + // identifier clusters, used for workbook Escher object + $this->IDCLs[$dgId] = $lastReducedSpId; + + // set last shape index + $dgContainer->setLastSpId($lastSpId); + + // set the Escher object + $this->writerWorksheets[$sheetIndex]->setEscher($escher); + } + } + + private function processMemoryDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing, string $renderingFunctionx): void + { + switch ($renderingFunctionx) { + case MemoryDrawing::RENDERING_JPEG: + $blipType = BSE::BLIPTYPE_JPEG; + $renderingFunction = 'imagejpeg'; + + break; + default: + $blipType = BSE::BLIPTYPE_PNG; + $renderingFunction = 'imagepng'; + + break; + } + + ob_start(); + call_user_func($renderingFunction, $drawing->getImageResource()); + $blipData = ob_get_contents(); + ob_end_clean(); + + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } + + private function processDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void + { + $blipData = ''; + $filename = $drawing->getPath(); + + [$imagesx, $imagesy, $imageFormat] = getimagesize($filename); + + switch ($imageFormat) { + case 1: // GIF, not supported by BIFF8, we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(imagecreatefromgif($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + case 2: // JPEG + $blipType = BSE::BLIPTYPE_JPEG; + $blipData = file_get_contents($filename); + + break; + case 3: // PNG + $blipType = BSE::BLIPTYPE_PNG; + $blipData = file_get_contents($filename); + + break; + case 6: // Windows DIB (BMP), we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(SharedDrawing::imagecreatefrombmp($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + } + if ($blipData) { + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } + } + + private function processBaseDrawing(BstoreContainer &$bstoreContainer, BaseDrawing $drawing): void + { + if ($drawing instanceof Drawing) { + $this->processDrawing($bstoreContainer, $drawing); + } elseif ($drawing instanceof MemoryDrawing) { + $this->processMemoryDrawing($bstoreContainer, $drawing, $drawing->getRenderingFunction()); + } + } + + private function checkForDrawings(): bool + { + // any drawings in this workbook? + $found = false; + foreach ($this->spreadsheet->getAllSheets() as $sheet) { + if (count($sheet->getDrawingCollection()) > 0) { + $found = true; + + break; + } + } + + return $found; + } + + /** + * Build the Escher object corresponding to the MSODRAWINGGROUP record. + */ + private function buildWorkbookEscher(): void + { + // nothing to do if there are no drawings + if (!$this->checkForDrawings()) { + return; + } + + // if we reach here, then there are drawings in the workbook + $escher = new Escher(); + + // dggContainer + $dggContainer = new DggContainer(); + $escher->setDggContainer($dggContainer); + + // set IDCLs (identifier clusters) + $dggContainer->setIDCLs($this->IDCLs); + + // this loop is for determining maximum shape identifier of all drawing + $spIdMax = 0; + $totalCountShapes = 0; + $countDrawings = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet + + $addCount = 0; + foreach ($sheet->getDrawingCollection() as $drawing) { + $addCount = 1; + ++$sheetCountShapes; + ++$totalCountShapes; + + $spId = $sheetCountShapes | ($this->spreadsheet->getIndex($sheet) + 1) << 10; + $spIdMax = max($spId, $spIdMax); + } + $countDrawings += $addCount; + } + + $dggContainer->setSpIdMax($spIdMax + 1); + $dggContainer->setCDgSaved($countDrawings); + $dggContainer->setCSpSaved($totalCountShapes + $countDrawings); // total number of shapes incl. one group shapes per drawing + + // bstoreContainer + $bstoreContainer = new BstoreContainer(); + $dggContainer->setBstoreContainer($bstoreContainer); + + // the BSE's (all the images) + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + foreach ($sheet->getDrawingCollection() as $drawing) { + $this->processBaseDrawing($bstoreContainer, $drawing); + } + } + + // Set the Escher object + $this->writerWorkbook->setEscher($escher); + } + + /** + * Build the OLE Part for DocumentSummary Information. + * + * @return string + */ + private function writeDocumentSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae + $data .= pack('vvvvvvvv', 0xD502, 0xD5CD, 0x2E9C, 0x101B, 0x9793, 0x0008, 0x2C2B, 0xAEF9); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // GKPIDDSI_CODEPAGE: CodePage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_CATEGORY : Category + $dataProp = $this->spreadsheet->getProperties()->getCategory(); + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x02], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // GKPIDDSI_VERSION :Version of the application that wrote the property storage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x17], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], + 'data' => ['pack' => 'V', 'data' => 0x000C0000], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SCALE : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0B], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x10], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SHAREDOC : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x16], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_DOCSPARTS + // MS-OSHARED p75 (2.3.3.2.2.1) + // Structure is VtVecUnalignedLpstrValue (2.3.3.1.9) + // cElements + $dataProp = pack('v', 0x0001); + $dataProp .= pack('v', 0x0000); + // array of UnalignedLpstr + // cch + $dataProp .= pack('v', 0x000A); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Worksheet' . chr(0); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0D], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x101E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_HEADINGPAIR + // VtVecHeadingPairValue + // cElements + $dataProp = pack('v', 0x0002); + $dataProp .= pack('v', 0x0000); + // Array of vtHeadingPair + // vtUnalignedString - headingString + // stringType + $dataProp .= pack('v', 0x001E); + // padding + $dataProp .= pack('v', 0x0000); + // UnalignedLpstr + // cch + $dataProp .= pack('v', 0x0013); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Feuilles de calcul'; + // vtUnalignedString - headingParts + // wType : 0x0003 = 32 bit signed integer + $dataProp .= pack('v', 0x0300); + // padding + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= pack('v', 0x0100); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0C], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x100C], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x0B) { // Boolean + $dataSection_Content .= pack('V', (int) $dataProp['data']['data']); + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + ++$dataProp['data']['length']; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + // Condition below can never be true + //} elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // $dataSection_Content .= $dataProp['data']['data']; + + // $dataSection_Content_Offset += 4 + 8; + } else { + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + $dataProp['data']['length']; + } + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } + + private function writeSummaryPropOle(int $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void + { + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => $sumdata], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length + 'data' => ['data' => OLE::localDateToOLE($dataProp)], + ]; + ++$dataSection_NumProps; + } + } + + private function writeSummaryProp(string $dataProp, int &$dataSection_NumProps, array &$dataSection, int $sumdata, int $typdata): void + { + if ($dataProp) { + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => $sumdata], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => $typdata], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + } + + /** + * Build the OLE Part for Summary Information. + * + * @return string + */ + private function writeSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 + $data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // CodePage : CP-1252 + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + $props = $this->spreadsheet->getProperties(); + $this->writeSummaryProp($props->getTitle(), $dataSection_NumProps, $dataSection, 0x02, 0x1e); + $this->writeSummaryProp($props->getSubject(), $dataSection_NumProps, $dataSection, 0x03, 0x1e); + $this->writeSummaryProp($props->getCreator(), $dataSection_NumProps, $dataSection, 0x04, 0x1e); + $this->writeSummaryProp($props->getKeywords(), $dataSection_NumProps, $dataSection, 0x05, 0x1e); + $this->writeSummaryProp($props->getDescription(), $dataSection_NumProps, $dataSection, 0x06, 0x1e); + $this->writeSummaryProp($props->getLastModifiedBy(), $dataSection_NumProps, $dataSection, 0x08, 0x1e); + $this->writeSummaryPropOle($props->getCreated(), $dataSection_NumProps, $dataSection, 0x0c, 0x40); + $this->writeSummaryPropOle($props->getModified(), $dataSection_NumProps, $dataSection, 0x0d, 0x40); + + // Security + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], // 4 byte signed integer + 'data' => ['data' => 0x00], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + ++$dataProp['data']['length']; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 8; + } + // Data Type Not Used at the moment + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/BIFFwriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/BIFFwriter.php new file mode 100755 index 0000000..84e27d0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/BIFFwriter.php @@ -0,0 +1,224 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class BIFFwriter +{ + /** + * The byte order of this architecture. 0 => little endian, 1 => big endian. + * + * @var int + */ + private static $byteOrder; + + /** + * The string containing the data of the BIFF stream. + * + * @var string + */ + public $_data; + + /** + * The size of the data in bytes. Should be the same as strlen($this->_data). + * + * @var int + */ + public $_datasize; + + /** + * The maximum length for a BIFF record (excluding record header and length field). See addContinue(). + * + * @var int + * + * @see addContinue() + */ + private $limit = 8224; + + /** + * Constructor. + */ + public function __construct() + { + $this->_data = ''; + $this->_datasize = 0; + } + + /** + * Determine the byte order and store it as class data to avoid + * recalculating it for each call to new(). + * + * @return int + */ + public static function getByteOrder() + { + if (!isset(self::$byteOrder)) { + // Check if "pack" gives the required IEEE 64bit float + $teststr = pack('d', 1.2345); + $number = pack('C8', 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); + if ($number == $teststr) { + $byte_order = 0; // Little Endian + } elseif ($number == strrev($teststr)) { + $byte_order = 1; // Big Endian + } else { + // Give up. I'll fix this in a later version. + throw new WriterException('Required floating point format not supported on this platform.'); + } + self::$byteOrder = $byte_order; + } + + return self::$byteOrder; + } + + /** + * General storage function. + * + * @param string $data binary data to append + */ + protected function append($data): void + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_data .= $data; + $this->_datasize += strlen($data); + } + + /** + * General storage function like append, but returns string instead of modifying $this->_data. + * + * @param string $data binary data to write + * + * @return string + */ + public function writeData($data) + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_datasize += strlen($data); + + return $data; + } + + /** + * Writes Excel BOF record to indicate the beginning of a stream or + * sub-stream in the BIFF file. + * + * @param int $type type of BIFF file to write: 0x0005 Workbook, + * 0x0010 Worksheet + */ + protected function storeBof($type): void + { + $record = 0x0809; // Record identifier (BIFF5-BIFF8) + $length = 0x0010; + + // by inspection of real files, MS Office Excel 2007 writes the following + $unknown = pack('VV', 0x000100D1, 0x00000406); + + $build = 0x0DBB; // Excel 97 + $year = 0x07CC; // Excel 97 + + $version = 0x0600; // BIFF8 + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $version, $type, $build, $year); + $this->append($header . $data . $unknown); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + protected function storeEof(): void + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $this->append($header); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + public function writeEof() + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + $header = pack('vv', $record, $length); + + return $this->writeData($header); + } + + /** + * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In + * Excel 97 the limit is 8228 bytes. Records that are longer than these limits + * must be split up into CONTINUE blocks. + * + * This function takes a long BIFF record and inserts CONTINUE records as + * necessary. + * + * @param string $data The original binary data to be written + * + * @return string A very convenient string of continue blocks + */ + private function addContinue($data) + { + $limit = $this->limit; + $record = 0x003C; // Record identifier + + // The first 2080/8224 bytes remain intact. However, we have to change + // the length field of the record. + $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit); + + $header = pack('vv', $record, $limit); // Headers for continue records + + // Retrieve chunks of 2080/8224 bytes +4 for the header. + $data_length = strlen($data); + for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) { + $tmp .= $header; + $tmp .= substr($data, $i, $limit); + } + + // Retrieve the last chunk of data + $header = pack('vv', $record, strlen($data) - $i); + $tmp .= $header; + $tmp .= substr($data, $i); + + return $tmp; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Escher.php new file mode 100755 index 0000000..1ee2e90 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Escher.php @@ -0,0 +1,510 @@ +object = $object; + } + + /** + * Process the object to be written. + * + * @return string + */ + public function close() + { + // initialize + $this->data = ''; + + switch (get_class($this->object)) { + case \PhpOffice\PhpSpreadsheet\Shared\Escher::class: + if ($dggContainer = $this->object->getDggContainer()) { + $writer = new self($dggContainer); + $this->data = $writer->close(); + } elseif ($dgContainer = $this->object->getDgContainer()) { + $writer = new self($dgContainer); + $this->data = $writer->close(); + $this->spOffsets = $writer->getSpOffsets(); + $this->spTypes = $writer->getSpTypes(); + } + + break; + case DggContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dgg + $recVer = 0x0; + $recInstance = 0x0000; + $recType = 0xF006; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + // dgg data + $dggData = + pack( + 'VVVV', + $this->object->getSpIdMax(), // maximum shape identifier increased by one + $this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one + $this->object->getCSpSaved(), + $this->object->getCDgSaved() // count total number of drawings saved + ); + + // add file identifier clusters (one per drawing) + $IDCLs = $this->object->getIDCLs(); + + foreach ($IDCLs as $dgId => $maxReducedSpId) { + $dggData .= pack('VV', $dgId, $maxReducedSpId + 1); + } + + $header = pack('vvV', $recVerInstance, $recType, strlen($dggData)); + $innerData .= $header . $dggData; + + // write the bstoreContainer + if ($bstoreContainer = $this->object->getBstoreContainer()) { + $writer = new self($bstoreContainer); + $innerData .= $writer->close(); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF000; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BstoreContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // treat the inner data + if ($BSECollection = $this->object->getBSECollection()) { + foreach ($BSECollection as $BSE) { + $writer = new self($BSE); + $innerData .= $writer->close(); + } + } + + // write the record + $recVer = 0xF; + $recInstance = count($this->object->getBSECollection()); + $recType = 0xF001; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BSE::class: + // this is a semi-container record + + // initialize + $innerData = ''; + + // here we treat the inner data + if ($blip = $this->object->getBlip()) { + $writer = new self($blip); + $innerData .= $writer->close(); + } + + // initialize + $data = ''; + + $btWin32 = $this->object->getBlipType(); + $btMacOS = $this->object->getBlipType(); + $data .= pack('CC', $btWin32, $btMacOS); + + $rgbUid = pack('VVVV', 0, 0, 0, 0); // todo + $data .= $rgbUid; + + $tag = 0; + $size = strlen($innerData); + $cRef = 1; + $foDelay = 0; //todo + $unused1 = 0x0; + $cbName = 0x0; + $unused2 = 0x0; + $unused3 = 0x0; + $data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3); + + $data .= $innerData; + + // write the record + $recVer = 0x2; + $recInstance = $this->object->getBlipType(); + $recType = 0xF007; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $data; + + break; + case Blip::class: + // this is an atom record + + // write the record + switch ($this->object->getParent()->getBlipType()) { + case BSE::BLIPTYPE_JPEG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x46A; + $recType = 0xF01D; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + case BSE::BLIPTYPE_PNG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x6E0; + $recType = 0xF01E; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + } + + break; + case DgContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dg + $recVer = 0x0; + $recInstance = $this->object->getDgId(); + $recType = 0xF008; + $length = 8; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + // number of shapes in this drawing (including group shape) + $countShapes = count($this->object->getSpgrContainer()->getChildren()); + $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId()); + + // write the spgrContainer + if ($spgrContainer = $this->object->getSpgrContainer()) { + $writer = new self($spgrContainer); + $innerData .= $writer->close(); + + // get the shape offsets relative to the spgrContainer record + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + + // save the shape offsets relative to dgContainer + foreach ($spOffsets as &$spOffset) { + $spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes) + } + + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF002; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case SpgrContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // initialize spape offsets + $totalSize = 8; + $spOffsets = []; + $spTypes = []; + + // treat the inner data + foreach ($this->object->getChildren() as $spContainer) { + $writer = new self($spContainer); + $spData = $writer->close(); + $innerData .= $spData; + + // save the shape offsets (where new shape records begin) + $totalSize += strlen($spData); + $spOffsets[] = $totalSize; + + $spTypes = array_merge($spTypes, $writer->getSpTypes()); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF003; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + + break; + case SpContainer::class: + // initialize + $data = ''; + + // build the data + + // write group shape record, if necessary? + if ($this->object->getSpgr()) { + $recVer = 0x1; + $recInstance = 0x0000; + $recType = 0xF009; + $length = 0x00000010; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VVVV', 0, 0, 0, 0); + } + $this->spTypes[] = ($this->object->getSpType()); + + // write the shape record + $recVer = 0x2; + $recInstance = $this->object->getSpType(); // shape type + $recType = 0xF00A; + $length = 0x00000008; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); + + // the options + if ($this->object->getOPTCollection()) { + $optData = ''; + + $recVer = 0x3; + $recInstance = count($this->object->getOPTCollection()); + $recType = 0xF00B; + foreach ($this->object->getOPTCollection() as $property => $value) { + $optData .= pack('vV', $property, $value); + } + $length = strlen($optData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $optData; + } + + // the client anchor + if ($this->object->getStartCoordinates()) { + $clientAnchorData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF010; + + // start coordinates + [$column, $row] = Coordinate::coordinateFromString($this->object->getStartCoordinates()); + $c1 = Coordinate::columnIndexFromString($column) - 1; + $r1 = $row - 1; + + // start offsetX + $startOffsetX = $this->object->getStartOffsetX(); + + // start offsetY + $startOffsetY = $this->object->getStartOffsetY(); + + // end coordinates + [$column, $row] = Coordinate::coordinateFromString($this->object->getEndCoordinates()); + $c2 = Coordinate::columnIndexFromString($column) - 1; + $r2 = $row - 1; + + // end offsetX + $endOffsetX = $this->object->getEndOffsetX(); + + // end offsetY + $endOffsetY = $this->object->getEndOffsetY(); + + $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY); + + $length = strlen($clientAnchorData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientAnchorData; + } + + // the client data, just empty for now + if (!$this->object->getSpgr()) { + $clientDataData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF011; + + $length = strlen($clientDataData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientDataData; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF004; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $data; + + break; + } + + return $this->data; + } + + /** + * Gets the shape offsets. + * + * @return array + */ + public function getSpOffsets() + { + return $this->spOffsets; + } + + /** + * Gets the shape types. + * + * @return array + */ + public function getSpTypes() + { + return $this->spTypes; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Font.php new file mode 100755 index 0000000..9cb31ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Font.php @@ -0,0 +1,147 @@ +colorIndex = 0x7FFF; + $this->font = $font; + } + + /** + * Set the color index. + * + * @param int $colorIndex + */ + public function setColorIndex($colorIndex): void + { + $this->colorIndex = $colorIndex; + } + + /** + * Get font record data. + * + * @return string + */ + public function writeFont() + { + $font_outline = 0; + $font_shadow = 0; + + $icv = $this->colorIndex; // Index to color palette + if ($this->font->getSuperscript()) { + $sss = 1; + } elseif ($this->font->getSubscript()) { + $sss = 2; + } else { + $sss = 0; + } + $bFamily = 0; // Font family + $bCharSet = \PhpOffice\PhpSpreadsheet\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set + + $record = 0x31; // Record identifier + $reserved = 0x00; // Reserved + $grbit = 0x00; // Font attributes + if ($this->font->getItalic()) { + $grbit |= 0x02; + } + if ($this->font->getStrikethrough()) { + $grbit |= 0x08; + } + if ($font_outline) { + $grbit |= 0x10; + } + if ($font_shadow) { + $grbit |= 0x20; + } + + $data = pack( + 'vvvvvCCCC', + // Fontsize (in twips) + $this->font->getSize() * 20, + $grbit, + // Colour + $icv, + // Font weight + self::mapBold($this->font->getBold()), + // Superscript/Subscript + $sss, + self::mapUnderline($this->font->getUnderline()), + $bFamily, + $bCharSet, + $reserved + ); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($this->font->getName()); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Map to BIFF5-BIFF8 codes for bold. + * + * @param bool $bold + * + * @return int + */ + private static function mapBold($bold) + { + if ($bold) { + return 0x2BC; // 700 = Bold font weight + } + + return 0x190; // 400 = Normal font weight + } + + /** + * Map of BIFF2-BIFF8 codes for underline styles. + * + * @var array of int + */ + private static $mapUnderline = [ + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE => 0x00, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE => 0x01, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE => 0x02, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING => 0x21, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING => 0x22, + ]; + + /** + * Map underline. + * + * @param string $underline + * + * @return int + */ + private static function mapUnderline($underline) + { + if (isset(self::$mapUnderline[$underline])) { + return self::$mapUnderline[$underline]; + } + + return 0x00; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Parser.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Parser.php new file mode 100755 index 0000000..621853c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Parser.php @@ -0,0 +1,1440 @@ +=,;#()"{} + const REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&\<\>\=\,\;\#\(\)\"\{\}]+'; + + // Sheet title in quoted form (without surrounding quotes) + // Invalid sheet title characters cannot occur in the sheet title: + // *:/\?[] (usual invalid sheet title characters) + // Single quote is represented as a pair '' + const REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+'; + + /** + * The index of the character we are currently looking at. + * + * @var int + */ + public $currentCharacter; + + /** + * The token we are working on. + * + * @var string + */ + public $currentToken; + + /** + * The formula to parse. + * + * @var string + */ + private $formula; + + /** + * The character ahead of the current char. + * + * @var string + */ + public $lookAhead; + + /** + * The parse tree to be generated. + * + * @var string + */ + private $parseTree; + + /** + * Array of external sheets. + * + * @var array + */ + private $externalSheets; + + /** + * Array of sheet references in the form of REF structures. + * + * @var array + */ + public $references; + + /** + * The Excel ptg indices. + * + * @var array + */ + private $ptg = [ + 'ptgExp' => 0x01, + 'ptgTbl' => 0x02, + 'ptgAdd' => 0x03, + 'ptgSub' => 0x04, + 'ptgMul' => 0x05, + 'ptgDiv' => 0x06, + 'ptgPower' => 0x07, + 'ptgConcat' => 0x08, + 'ptgLT' => 0x09, + 'ptgLE' => 0x0A, + 'ptgEQ' => 0x0B, + 'ptgGE' => 0x0C, + 'ptgGT' => 0x0D, + 'ptgNE' => 0x0E, + 'ptgIsect' => 0x0F, + 'ptgUnion' => 0x10, + 'ptgRange' => 0x11, + 'ptgUplus' => 0x12, + 'ptgUminus' => 0x13, + 'ptgPercent' => 0x14, + 'ptgParen' => 0x15, + 'ptgMissArg' => 0x16, + 'ptgStr' => 0x17, + 'ptgAttr' => 0x19, + 'ptgSheet' => 0x1A, + 'ptgEndSheet' => 0x1B, + 'ptgErr' => 0x1C, + 'ptgBool' => 0x1D, + 'ptgInt' => 0x1E, + 'ptgNum' => 0x1F, + 'ptgArray' => 0x20, + 'ptgFunc' => 0x21, + 'ptgFuncVar' => 0x22, + 'ptgName' => 0x23, + 'ptgRef' => 0x24, + 'ptgArea' => 0x25, + 'ptgMemArea' => 0x26, + 'ptgMemErr' => 0x27, + 'ptgMemNoMem' => 0x28, + 'ptgMemFunc' => 0x29, + 'ptgRefErr' => 0x2A, + 'ptgAreaErr' => 0x2B, + 'ptgRefN' => 0x2C, + 'ptgAreaN' => 0x2D, + 'ptgMemAreaN' => 0x2E, + 'ptgMemNoMemN' => 0x2F, + 'ptgNameX' => 0x39, + 'ptgRef3d' => 0x3A, + 'ptgArea3d' => 0x3B, + 'ptgRefErr3d' => 0x3C, + 'ptgAreaErr3d' => 0x3D, + 'ptgArrayV' => 0x40, + 'ptgFuncV' => 0x41, + 'ptgFuncVarV' => 0x42, + 'ptgNameV' => 0x43, + 'ptgRefV' => 0x44, + 'ptgAreaV' => 0x45, + 'ptgMemAreaV' => 0x46, + 'ptgMemErrV' => 0x47, + 'ptgMemNoMemV' => 0x48, + 'ptgMemFuncV' => 0x49, + 'ptgRefErrV' => 0x4A, + 'ptgAreaErrV' => 0x4B, + 'ptgRefNV' => 0x4C, + 'ptgAreaNV' => 0x4D, + 'ptgMemAreaNV' => 0x4E, + 'ptgMemNoMemNV' => 0x4F, + 'ptgFuncCEV' => 0x58, + 'ptgNameXV' => 0x59, + 'ptgRef3dV' => 0x5A, + 'ptgArea3dV' => 0x5B, + 'ptgRefErr3dV' => 0x5C, + 'ptgAreaErr3dV' => 0x5D, + 'ptgArrayA' => 0x60, + 'ptgFuncA' => 0x61, + 'ptgFuncVarA' => 0x62, + 'ptgNameA' => 0x63, + 'ptgRefA' => 0x64, + 'ptgAreaA' => 0x65, + 'ptgMemAreaA' => 0x66, + 'ptgMemErrA' => 0x67, + 'ptgMemNoMemA' => 0x68, + 'ptgMemFuncA' => 0x69, + 'ptgRefErrA' => 0x6A, + 'ptgAreaErrA' => 0x6B, + 'ptgRefNA' => 0x6C, + 'ptgAreaNA' => 0x6D, + 'ptgMemAreaNA' => 0x6E, + 'ptgMemNoMemNA' => 0x6F, + 'ptgFuncCEA' => 0x78, + 'ptgNameXA' => 0x79, + 'ptgRef3dA' => 0x7A, + 'ptgArea3dA' => 0x7B, + 'ptgRefErr3dA' => 0x7C, + 'ptgAreaErr3dA' => 0x7D, + ]; + + /** + * Thanks to Michael Meeks and Gnumeric for the initial arg values. + * + * The following hash was generated by "function_locale.pl" in the distro. + * Refer to function_locale.pl for non-English function names. + * + * The array elements are as follow: + * ptg: The Excel function ptg code. + * args: The number of arguments that the function takes: + * >=0 is a fixed number of arguments. + * -1 is a variable number of arguments. + * class: The reference, value or array class of the function args. + * vol: The function is volatile. + * + * @var array + */ + private $functions = [ + // function ptg args class vol + 'COUNT' => [0, -1, 0, 0], + 'IF' => [1, -1, 1, 0], + 'ISNA' => [2, 1, 1, 0], + 'ISERROR' => [3, 1, 1, 0], + 'SUM' => [4, -1, 0, 0], + 'AVERAGE' => [5, -1, 0, 0], + 'MIN' => [6, -1, 0, 0], + 'MAX' => [7, -1, 0, 0], + 'ROW' => [8, -1, 0, 0], + 'COLUMN' => [9, -1, 0, 0], + 'NA' => [10, 0, 0, 0], + 'NPV' => [11, -1, 1, 0], + 'STDEV' => [12, -1, 0, 0], + 'DOLLAR' => [13, -1, 1, 0], + 'FIXED' => [14, -1, 1, 0], + 'SIN' => [15, 1, 1, 0], + 'COS' => [16, 1, 1, 0], + 'TAN' => [17, 1, 1, 0], + 'ATAN' => [18, 1, 1, 0], + 'PI' => [19, 0, 1, 0], + 'SQRT' => [20, 1, 1, 0], + 'EXP' => [21, 1, 1, 0], + 'LN' => [22, 1, 1, 0], + 'LOG10' => [23, 1, 1, 0], + 'ABS' => [24, 1, 1, 0], + 'INT' => [25, 1, 1, 0], + 'SIGN' => [26, 1, 1, 0], + 'ROUND' => [27, 2, 1, 0], + 'LOOKUP' => [28, -1, 0, 0], + 'INDEX' => [29, -1, 0, 1], + 'REPT' => [30, 2, 1, 0], + 'MID' => [31, 3, 1, 0], + 'LEN' => [32, 1, 1, 0], + 'VALUE' => [33, 1, 1, 0], + 'TRUE' => [34, 0, 1, 0], + 'FALSE' => [35, 0, 1, 0], + 'AND' => [36, -1, 0, 0], + 'OR' => [37, -1, 0, 0], + 'NOT' => [38, 1, 1, 0], + 'MOD' => [39, 2, 1, 0], + 'DCOUNT' => [40, 3, 0, 0], + 'DSUM' => [41, 3, 0, 0], + 'DAVERAGE' => [42, 3, 0, 0], + 'DMIN' => [43, 3, 0, 0], + 'DMAX' => [44, 3, 0, 0], + 'DSTDEV' => [45, 3, 0, 0], + 'VAR' => [46, -1, 0, 0], + 'DVAR' => [47, 3, 0, 0], + 'TEXT' => [48, 2, 1, 0], + 'LINEST' => [49, -1, 0, 0], + 'TREND' => [50, -1, 0, 0], + 'LOGEST' => [51, -1, 0, 0], + 'GROWTH' => [52, -1, 0, 0], + 'PV' => [56, -1, 1, 0], + 'FV' => [57, -1, 1, 0], + 'NPER' => [58, -1, 1, 0], + 'PMT' => [59, -1, 1, 0], + 'RATE' => [60, -1, 1, 0], + 'MIRR' => [61, 3, 0, 0], + 'IRR' => [62, -1, 0, 0], + 'RAND' => [63, 0, 1, 1], + 'MATCH' => [64, -1, 0, 0], + 'DATE' => [65, 3, 1, 0], + 'TIME' => [66, 3, 1, 0], + 'DAY' => [67, 1, 1, 0], + 'MONTH' => [68, 1, 1, 0], + 'YEAR' => [69, 1, 1, 0], + 'WEEKDAY' => [70, -1, 1, 0], + 'HOUR' => [71, 1, 1, 0], + 'MINUTE' => [72, 1, 1, 0], + 'SECOND' => [73, 1, 1, 0], + 'NOW' => [74, 0, 1, 1], + 'AREAS' => [75, 1, 0, 1], + 'ROWS' => [76, 1, 0, 1], + 'COLUMNS' => [77, 1, 0, 1], + 'OFFSET' => [78, -1, 0, 1], + 'SEARCH' => [82, -1, 1, 0], + 'TRANSPOSE' => [83, 1, 1, 0], + 'TYPE' => [86, 1, 1, 0], + 'ATAN2' => [97, 2, 1, 0], + 'ASIN' => [98, 1, 1, 0], + 'ACOS' => [99, 1, 1, 0], + 'CHOOSE' => [100, -1, 1, 0], + 'HLOOKUP' => [101, -1, 0, 0], + 'VLOOKUP' => [102, -1, 0, 0], + 'ISREF' => [105, 1, 0, 0], + 'LOG' => [109, -1, 1, 0], + 'CHAR' => [111, 1, 1, 0], + 'LOWER' => [112, 1, 1, 0], + 'UPPER' => [113, 1, 1, 0], + 'PROPER' => [114, 1, 1, 0], + 'LEFT' => [115, -1, 1, 0], + 'RIGHT' => [116, -1, 1, 0], + 'EXACT' => [117, 2, 1, 0], + 'TRIM' => [118, 1, 1, 0], + 'REPLACE' => [119, 4, 1, 0], + 'SUBSTITUTE' => [120, -1, 1, 0], + 'CODE' => [121, 1, 1, 0], + 'FIND' => [124, -1, 1, 0], + 'CELL' => [125, -1, 0, 1], + 'ISERR' => [126, 1, 1, 0], + 'ISTEXT' => [127, 1, 1, 0], + 'ISNUMBER' => [128, 1, 1, 0], + 'ISBLANK' => [129, 1, 1, 0], + 'T' => [130, 1, 0, 0], + 'N' => [131, 1, 0, 0], + 'DATEVALUE' => [140, 1, 1, 0], + 'TIMEVALUE' => [141, 1, 1, 0], + 'SLN' => [142, 3, 1, 0], + 'SYD' => [143, 4, 1, 0], + 'DDB' => [144, -1, 1, 0], + 'INDIRECT' => [148, -1, 1, 1], + 'CALL' => [150, -1, 1, 0], + 'CLEAN' => [162, 1, 1, 0], + 'MDETERM' => [163, 1, 2, 0], + 'MINVERSE' => [164, 1, 2, 0], + 'MMULT' => [165, 2, 2, 0], + 'IPMT' => [167, -1, 1, 0], + 'PPMT' => [168, -1, 1, 0], + 'COUNTA' => [169, -1, 0, 0], + 'PRODUCT' => [183, -1, 0, 0], + 'FACT' => [184, 1, 1, 0], + 'DPRODUCT' => [189, 3, 0, 0], + 'ISNONTEXT' => [190, 1, 1, 0], + 'STDEVP' => [193, -1, 0, 0], + 'VARP' => [194, -1, 0, 0], + 'DSTDEVP' => [195, 3, 0, 0], + 'DVARP' => [196, 3, 0, 0], + 'TRUNC' => [197, -1, 1, 0], + 'ISLOGICAL' => [198, 1, 1, 0], + 'DCOUNTA' => [199, 3, 0, 0], + 'USDOLLAR' => [204, -1, 1, 0], + 'FINDB' => [205, -1, 1, 0], + 'SEARCHB' => [206, -1, 1, 0], + 'REPLACEB' => [207, 4, 1, 0], + 'LEFTB' => [208, -1, 1, 0], + 'RIGHTB' => [209, -1, 1, 0], + 'MIDB' => [210, 3, 1, 0], + 'LENB' => [211, 1, 1, 0], + 'ROUNDUP' => [212, 2, 1, 0], + 'ROUNDDOWN' => [213, 2, 1, 0], + 'ASC' => [214, 1, 1, 0], + 'DBCS' => [215, 1, 1, 0], + 'RANK' => [216, -1, 0, 0], + 'ADDRESS' => [219, -1, 1, 0], + 'DAYS360' => [220, -1, 1, 0], + 'TODAY' => [221, 0, 1, 1], + 'VDB' => [222, -1, 1, 0], + 'MEDIAN' => [227, -1, 0, 0], + 'SUMPRODUCT' => [228, -1, 2, 0], + 'SINH' => [229, 1, 1, 0], + 'COSH' => [230, 1, 1, 0], + 'TANH' => [231, 1, 1, 0], + 'ASINH' => [232, 1, 1, 0], + 'ACOSH' => [233, 1, 1, 0], + 'ATANH' => [234, 1, 1, 0], + 'DGET' => [235, 3, 0, 0], + 'INFO' => [244, 1, 1, 1], + 'DB' => [247, -1, 1, 0], + 'FREQUENCY' => [252, 2, 0, 0], + 'ERROR.TYPE' => [261, 1, 1, 0], + 'REGISTER.ID' => [267, -1, 1, 0], + 'AVEDEV' => [269, -1, 0, 0], + 'BETADIST' => [270, -1, 1, 0], + 'GAMMALN' => [271, 1, 1, 0], + 'BETAINV' => [272, -1, 1, 0], + 'BINOMDIST' => [273, 4, 1, 0], + 'CHIDIST' => [274, 2, 1, 0], + 'CHIINV' => [275, 2, 1, 0], + 'COMBIN' => [276, 2, 1, 0], + 'CONFIDENCE' => [277, 3, 1, 0], + 'CRITBINOM' => [278, 3, 1, 0], + 'EVEN' => [279, 1, 1, 0], + 'EXPONDIST' => [280, 3, 1, 0], + 'FDIST' => [281, 3, 1, 0], + 'FINV' => [282, 3, 1, 0], + 'FISHER' => [283, 1, 1, 0], + 'FISHERINV' => [284, 1, 1, 0], + 'FLOOR' => [285, 2, 1, 0], + 'GAMMADIST' => [286, 4, 1, 0], + 'GAMMAINV' => [287, 3, 1, 0], + 'CEILING' => [288, 2, 1, 0], + 'HYPGEOMDIST' => [289, 4, 1, 0], + 'LOGNORMDIST' => [290, 3, 1, 0], + 'LOGINV' => [291, 3, 1, 0], + 'NEGBINOMDIST' => [292, 3, 1, 0], + 'NORMDIST' => [293, 4, 1, 0], + 'NORMSDIST' => [294, 1, 1, 0], + 'NORMINV' => [295, 3, 1, 0], + 'NORMSINV' => [296, 1, 1, 0], + 'STANDARDIZE' => [297, 3, 1, 0], + 'ODD' => [298, 1, 1, 0], + 'PERMUT' => [299, 2, 1, 0], + 'POISSON' => [300, 3, 1, 0], + 'TDIST' => [301, 3, 1, 0], + 'WEIBULL' => [302, 4, 1, 0], + 'SUMXMY2' => [303, 2, 2, 0], + 'SUMX2MY2' => [304, 2, 2, 0], + 'SUMX2PY2' => [305, 2, 2, 0], + 'CHITEST' => [306, 2, 2, 0], + 'CORREL' => [307, 2, 2, 0], + 'COVAR' => [308, 2, 2, 0], + 'FORECAST' => [309, 3, 2, 0], + 'FTEST' => [310, 2, 2, 0], + 'INTERCEPT' => [311, 2, 2, 0], + 'PEARSON' => [312, 2, 2, 0], + 'RSQ' => [313, 2, 2, 0], + 'STEYX' => [314, 2, 2, 0], + 'SLOPE' => [315, 2, 2, 0], + 'TTEST' => [316, 4, 2, 0], + 'PROB' => [317, -1, 2, 0], + 'DEVSQ' => [318, -1, 0, 0], + 'GEOMEAN' => [319, -1, 0, 0], + 'HARMEAN' => [320, -1, 0, 0], + 'SUMSQ' => [321, -1, 0, 0], + 'KURT' => [322, -1, 0, 0], + 'SKEW' => [323, -1, 0, 0], + 'ZTEST' => [324, -1, 0, 0], + 'LARGE' => [325, 2, 0, 0], + 'SMALL' => [326, 2, 0, 0], + 'QUARTILE' => [327, 2, 0, 0], + 'PERCENTILE' => [328, 2, 0, 0], + 'PERCENTRANK' => [329, -1, 0, 0], + 'MODE' => [330, -1, 2, 0], + 'TRIMMEAN' => [331, 2, 0, 0], + 'TINV' => [332, 2, 1, 0], + 'CONCATENATE' => [336, -1, 1, 0], + 'POWER' => [337, 2, 1, 0], + 'RADIANS' => [342, 1, 1, 0], + 'DEGREES' => [343, 1, 1, 0], + 'SUBTOTAL' => [344, -1, 0, 0], + 'SUMIF' => [345, -1, 0, 0], + 'COUNTIF' => [346, 2, 0, 0], + 'COUNTBLANK' => [347, 1, 0, 0], + 'ISPMT' => [350, 4, 1, 0], + 'DATEDIF' => [351, 3, 1, 0], + 'DATESTRING' => [352, 1, 1, 0], + 'NUMBERSTRING' => [353, 2, 1, 0], + 'ROMAN' => [354, -1, 1, 0], + 'GETPIVOTDATA' => [358, -1, 0, 0], + 'HYPERLINK' => [359, -1, 1, 0], + 'PHONETIC' => [360, 1, 0, 0], + 'AVERAGEA' => [361, -1, 0, 0], + 'MAXA' => [362, -1, 0, 0], + 'MINA' => [363, -1, 0, 0], + 'STDEVPA' => [364, -1, 0, 0], + 'VARPA' => [365, -1, 0, 0], + 'STDEVA' => [366, -1, 0, 0], + 'VARA' => [367, -1, 0, 0], + 'BAHTTEXT' => [368, 1, 0, 0], + ]; + + /** + * The class constructor. + */ + public function __construct() + { + $this->currentCharacter = 0; + $this->currentToken = ''; // The token we are working on. + $this->formula = ''; // The formula to parse. + $this->lookAhead = ''; // The character ahead of the current char. + $this->parseTree = ''; // The parse tree to be generated. + $this->externalSheets = []; + $this->references = []; + } + + /** + * Convert a token to the proper ptg value. + * + * @param mixed $token the token to convert + * + * @return mixed the converted token on success + */ + private function convert($token) + { + if (preg_match('/"([^"]|""){0,255}"/', $token)) { + return $this->convertString($token); + } elseif (is_numeric($token)) { + return $this->convertNumber($token); + // match references like A1 or $A$1 + } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) { + return $this->convertRef2d($token); + // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?(\\d+)$/u', $token)) { + return $this->convertRef3d($token); + // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u", $token)) { + return $this->convertRef3d($token); + // match ranges like A1:B2 or $A$1:$B$2 + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) { + return $this->convertRange2d($token); + // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)\\:\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)$/u', $token)) { + return $this->convertRange3d($token); + // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u", $token)) { + return $this->convertRange3d($token); + // operators (including parentheses) + } elseif (isset($this->ptg[$token])) { + return pack('C', $this->ptg[$token]); + // match error codes + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) || $token == '#N/A') { + return $this->convertError($token); + // commented so argument number can be processed correctly. See toReversePolish(). + /*elseif (preg_match("/[A-Z0-9\xc0-\xdc\.]+/", $token)) + { + return($this->convertFunction($token, $this->_func_args)); + }*/ + // if it's an argument, ignore the token (the argument remains) + } elseif ($token == 'arg') { + return ''; + } + + // TODO: use real error codes + throw new WriterException("Unknown token $token"); + } + + /** + * Convert a number token to ptgInt or ptgNum. + * + * @param mixed $num an integer or double for conversion to its ptg value + * + * @return string + */ + private function convertNumber($num) + { + // Integer in the range 0..2**16-1 + if ((preg_match('/^\\d+$/', $num)) && ($num <= 65535)) { + return pack('Cv', $this->ptg['ptgInt'], $num); + } + + // A float + if (BIFFwriter::getByteOrder()) { // if it's Big Endian + $num = strrev($num); + } + + return pack('Cd', $this->ptg['ptgNum'], $num); + } + + /** + * Convert a string token to ptgStr. + * + * @param string $string a string for conversion to its ptg value + * + * @return mixed the converted token on success + */ + private function convertString($string) + { + // chop away beggining and ending quotes + $string = substr($string, 1, -1); + if (strlen($string) > 255) { + throw new WriterException('String is too long'); + } + + return pack('C', $this->ptg['ptgStr']) . StringHelper::UTF8toBIFF8UnicodeShort($string); + } + + /** + * Convert a function to a ptgFunc or ptgFuncVarV depending on the number of + * args that it takes. + * + * @param string $token the name of the function for convertion to ptg value + * @param int $num_args the number of arguments the function receives + * + * @return string The packed ptg for the function + */ + private function convertFunction($token, $num_args) + { + $args = $this->functions[$token][1]; + + // Fixed number of args eg. TIME($i, $j, $k). + if ($args >= 0) { + return pack('Cv', $this->ptg['ptgFuncV'], $this->functions[$token][0]); + } + // Variable number of args eg. SUM($i, $j, $k, ..). + if ($args == -1) { + return pack('CCv', $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]); + } + } + + /** + * Convert an Excel range such as A1:D4 to a ptgRefV. + * + * @param string $range An Excel range in the A1:A2 + * @param int $class + * + * @return string + */ + private function convertRange2d($range, $class = 0) + { + // TODO: possible class value 0,1,2 check Formula.pm + // Split the range into 2 cell refs + if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) { + [$cell1, $cell2] = explode(':', $range); + } else { + // TODO: use real error codes + throw new WriterException('Unknown range separator'); + } + + // Convert the cell references + [$row1, $col1] = $this->cellToPackedRowcol($cell1); + [$row2, $col2] = $this->cellToPackedRowcol($cell2); + + // The ptg value depends on the class of the ptg. + if ($class == 0) { + $ptgArea = pack('C', $this->ptg['ptgArea']); + } elseif ($class == 1) { + $ptgArea = pack('C', $this->ptg['ptgAreaV']); + } elseif ($class == 2) { + $ptgArea = pack('C', $this->ptg['ptgAreaA']); + } else { + // TODO: use real error codes + throw new WriterException("Unknown class $class"); + } + + return $ptgArea . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to + * a ptgArea3d. + * + * @param string $token an Excel range in the Sheet1!A1:A2 format + * + * @return mixed the packed ptgArea3d token on success + */ + private function convertRange3d($token) + { + // Split the ref at the ! symbol + [$ext_ref, $range] = PhpspreadsheetWorksheet::extractSheetTitle($token, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Split the range into 2 cell refs + [$cell1, $cell2] = explode(':', $range); + + // Convert the cell references + if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\\d+)$/', $cell1)) { + [$row1, $col1] = $this->cellToPackedRowcol($cell1); + [$row2, $col2] = $this->cellToPackedRowcol($cell2); + } else { // It's a rows range (like 26:27) + [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1 . ':' . $cell2); + } + + // The ptg value depends on the class of the ptg. + $ptgArea = pack('C', $this->ptg['ptgArea3d']); + + return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV. + * + * @param string $cell An Excel cell reference + * + * @return string The cell in packed() format with the corresponding ptg + */ + private function convertRef2d($cell) + { + // Convert the cell reference + $cell_array = $this->cellToPackedRowcol($cell); + [$row, $col] = $cell_array; + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRefA']); + + return $ptgRef . $row . $col; + } + + /** + * Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a + * ptgRef3d. + * + * @param string $cell An Excel cell reference + * + * @return mixed the packed ptgRef3d token on success + */ + private function convertRef3d($cell) + { + // Split the ref at the ! symbol + [$ext_ref, $cell] = PhpspreadsheetWorksheet::extractSheetTitle($cell, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Convert the cell reference part + [$row, $col] = $this->cellToPackedRowcol($cell); + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRef3dA']); + + return $ptgRef . $ext_ref . $row . $col; + } + + /** + * Convert an error code to a ptgErr. + * + * @param string $errorCode The error code for conversion to its ptg value + * + * @return string The error code ptgErr + */ + private function convertError($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return pack('C', 0x00); + case '#DIV/0!': + return pack('C', 0x07); + case '#VALUE!': + return pack('C', 0x0F); + case '#REF!': + return pack('C', 0x17); + case '#NAME?': + return pack('C', 0x1D); + case '#NUM!': + return pack('C', 0x24); + case '#N/A': + return pack('C', 0x2A); + } + + return pack('C', 0xFF); + } + + /** + * Look up the REF index that corresponds to an external sheet name + * (or range). If it doesn't exist yet add it to the workbook's references + * array. It assumes all sheet names given must exist. + * + * @param string $ext_ref The name of the external reference + * + * @return mixed The reference index in packed() format on success + */ + private function getRefIndex($ext_ref) + { + $ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any. + $ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any. + $ext_ref = str_replace('\'\'', '\'', $ext_ref); // Replace escaped '' with ' + + // Check if there is a sheet range eg., Sheet1:Sheet2. + if (preg_match('/:/', $ext_ref)) { + [$sheet_name1, $sheet_name2] = explode(':', $ext_ref); + + $sheet1 = $this->getSheetIndex($sheet_name1); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $sheet_name1 in formula"); + } + $sheet2 = $this->getSheetIndex($sheet_name2); + if ($sheet2 == -1) { + throw new WriterException("Unknown sheet name $sheet_name2 in formula"); + } + + // Reverse max and min sheet numbers if necessary + if ($sheet1 > $sheet2) { + [$sheet1, $sheet2] = [$sheet2, $sheet1]; + } + } else { // Single sheet name only. + $sheet1 = $this->getSheetIndex($ext_ref); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $ext_ref in formula"); + } + $sheet2 = $sheet1; + } + + // assume all references belong to this document + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $sheet1, $sheet2); + $totalreferences = count($this->references); + $index = -1; + for ($i = 0; $i < $totalreferences; ++$i) { + if ($ref == $this->references[$i]) { + $index = $i; + + break; + } + } + // if REF was not found add it to references array + if ($index == -1) { + $this->references[$totalreferences] = $ref; + $index = $totalreferences; + } + + return pack('v', $index); + } + + /** + * Look up the index that corresponds to an external sheet name. The hash of + * sheet names is updated by the addworksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @param string $sheet_name Sheet name + * + * @return int The sheet index, -1 if the sheet was not found + */ + private function getSheetIndex($sheet_name) + { + if (!isset($this->externalSheets[$sheet_name])) { + return -1; + } + + return $this->externalSheets[$sheet_name]; + } + + /** + * This method is used to update the array of sheet names. It is + * called by the addWorksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::addWorksheet() + * + * @param string $name The name of the worksheet being added + * @param int $index The index of the worksheet being added + */ + public function setExtSheet($name, $index): void + { + $this->externalSheets[$name] = $index; + } + + /** + * pack() row and column into the required 3 or 4 byte format. + * + * @param string $cell The Excel cell reference to be packed + * + * @return array Array containing the row and column in packed() format + */ + private function cellToPackedRowcol($cell) + { + $cell = strtoupper($cell); + [$row, $col, $row_rel, $col_rel] = $this->cellToRowcol($cell); + if ($col >= 256) { + throw new WriterException("Column in: $cell greater than 255"); + } + if ($row >= 65536) { + throw new WriterException("Row in: $cell greater than 65536 "); + } + + // Set the high bits to indicate if row or col are relative. + $col |= $col_rel << 14; + $col |= $row_rel << 15; + $col = pack('v', $col); + + $row = pack('v', $row); + + return [$row, $col]; + } + + /** + * pack() row range into the required 3 or 4 byte format. + * Just using maximum col/rows, which is probably not the correct solution. + * + * @param string $range The Excel range to be packed + * + * @return array Array containing (row1,col1,row2,col2) in packed() format + */ + private function rangeToPackedRange($range) + { + preg_match('/(\$)?(\d+)\:(\$)?(\d+)/', $range, $match); + // return absolute rows if there is a $ in the ref + $row1_rel = empty($match[1]) ? 1 : 0; + $row1 = $match[2]; + $row2_rel = empty($match[3]) ? 1 : 0; + $row2 = $match[4]; + // Convert 1-index to zero-index + --$row1; + --$row2; + // Trick poor inocent Excel + $col1 = 0; + $col2 = 65535; // FIXME: maximum possible value for Excel 5 (change this!!!) + + // FIXME: this changes for BIFF8 + if (($row1 >= 65536) || ($row2 >= 65536)) { + throw new WriterException("Row in: $range greater than 65536 "); + } + + // Set the high bits to indicate if rows are relative. + $col1 |= $row1_rel << 15; + $col2 |= $row2_rel << 15; + $col1 = pack('v', $col1); + $col2 = pack('v', $col2); + + $row1 = pack('v', $row1); + $row2 = pack('v', $row2); + + return [$row1, $col1, $row2, $col2]; + } + + /** + * Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero + * indexed row and column number. Also returns two (0,1) values to indicate + * whether the row or column are relative references. + * + * @param string $cell the Excel cell reference in A1 format + * + * @return array + */ + private function cellToRowcol($cell) + { + preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/', $cell, $match); + // return absolute column if there is a $ in the ref + $col_rel = empty($match[1]) ? 1 : 0; + $col_ref = $match[2]; + $row_rel = empty($match[3]) ? 1 : 0; + $row = $match[4]; + + // Convert base26 column string to a number. + $expn = strlen($col_ref) - 1; + $col = 0; + $col_ref_length = strlen($col_ref); + for ($i = 0; $i < $col_ref_length; ++$i) { + $col += (ord($col_ref[$i]) - 64) * 26 ** $expn; + --$expn; + } + + // Convert 1-index to zero-index + --$row; + --$col; + + return [$row, $col, $row_rel, $col_rel]; + } + + /** + * Advance to the next valid token. + */ + private function advance() + { + $i = $this->currentCharacter; + $formula_length = strlen($this->formula); + // eat up white spaces + if ($i < $formula_length) { + while ($this->formula[$i] == ' ') { + ++$i; + } + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } + $token = ''; + } + + while ($i < $formula_length) { + $token .= $this->formula[$i]; + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } else { + $this->lookAhead = ''; + } + + if ($this->match($token) != '') { + $this->currentCharacter = $i + 1; + $this->currentToken = $token; + + return 1; + } + + if ($i < ($formula_length - 2)) { + $this->lookAhead = $this->formula[$i + 2]; + } else { // if we run out of characters lookAhead becomes empty + $this->lookAhead = ''; + } + ++$i; + } + //die("Lexical error ".$this->currentCharacter); + } + + /** + * Checks if it's a valid token. + * + * @param mixed $token the token to check + * + * @return mixed The checked token or false on failure + */ + private function match($token) + { + switch ($token) { + case '+': + case '-': + case '*': + case '/': + case '(': + case ')': + case ',': + case ';': + case '>=': + case '<=': + case '=': + case '<>': + case '^': + case '&': + case '%': + return $token; + + break; + case '>': + if ($this->lookAhead === '=') { // it's a GE token + break; + } + + return $token; + + break; + case '<': + // it's a LE or a NE token + if (($this->lookAhead === '=') || ($this->lookAhead === '>')) { + break; + } + + return $token; + + break; + default: + // if it's a reference A1 or $A$1 or $A1 or A$1 + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.') && ($this->lookAhead !== '!')) { + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.')) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) && !preg_match('/\d/', $this->lookAhead) && ($this->lookAhead !== ':') && ($this->lookAhead !== '.')) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + return $token; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead)) { + // if it's a range A1:A2 or $A$1:$A$2 + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $token) && !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) && !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + return $token; + } elseif (is_numeric($token) && (!is_numeric($token . $this->lookAhead) || ($this->lookAhead == '')) && ($this->lookAhead !== '!') && ($this->lookAhead !== ':')) { + // If it's a number (check that it's not a sheet name or range) + return $token; + } elseif (preg_match('/"([^"]|""){0,255}"/', $token) && $this->lookAhead !== '"' && (substr_count($token, '"') % 2 == 0)) { + // If it's a string (of maximum 255 characters) + return $token; + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) || $token === '#N/A') { + // If it's an error code + return $token; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $token) && ($this->lookAhead === '(')) { + // if it's a function call + return $token; + } elseif (substr($token, -1) === ')') { + // It's an argument of some description (e.g. a named range), + // precise nature yet to be determined + return $token; + } + + return ''; + } + } + + /** + * The parsing method. It parses a formula. + * + * @param string $formula the formula to parse, without the initial equal + * sign (=) + * + * @return mixed true on success + */ + public function parse($formula) + { + $this->currentCharacter = 0; + $this->formula = (string) $formula; + $this->lookAhead = $formula[1] ?? ''; + $this->advance(); + $this->parseTree = $this->condition(); + + return true; + } + + /** + * It parses a condition. It assumes the following rule: + * Cond -> Expr [(">" | "<") Expr]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function condition() + { + $result = $this->expression(); + if ($this->currentToken == '<') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLT', $result, $result2); + } elseif ($this->currentToken == '>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGT', $result, $result2); + } elseif ($this->currentToken == '<=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLE', $result, $result2); + } elseif ($this->currentToken == '>=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGE', $result, $result2); + } elseif ($this->currentToken == '=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgEQ', $result, $result2); + } elseif ($this->currentToken == '<>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgNE', $result, $result2); + } elseif ($this->currentToken == '&') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgConcat', $result, $result2); + } + + return $result; + } + + /** + * It parses a expression. It assumes the following rule: + * Expr -> Term [("+" | "-") Term] + * -> "string" + * -> "-" Term : Negative value + * -> "+" Term : Positive value + * -> Error code. + * + * @return mixed The parsed ptg'd tree on success + */ + private function expression() + { + // If it's a string return a string node + if (preg_match('/"([^"]|""){0,255}"/', $this->currentToken)) { + $tmp = str_replace('""', '"', $this->currentToken); + if (($tmp == '"') || ($tmp == '')) { + // Trap for "" that has been used for an empty string + $tmp = '""'; + } + $result = $this->createTree($tmp, '', ''); + $this->advance(); + + return $result; + // If it's an error code + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken) || $this->currentToken == '#N/A') { + $result = $this->createTree($this->currentToken, 'ptgErr', ''); + $this->advance(); + + return $result; + // If it's a negative value + } elseif ($this->currentToken == '-') { + // catch "-" Term + $this->advance(); + $result2 = $this->expression(); + + return $this->createTree('ptgUminus', $result2, ''); + // If it's a positive value + } elseif ($this->currentToken == '+') { + // catch "+" Term + $this->advance(); + $result2 = $this->expression(); + + return $this->createTree('ptgUplus', $result2, ''); + } + $result = $this->term(); + while (($this->currentToken == '+') || + ($this->currentToken == '-') || + ($this->currentToken == '^')) { + if ($this->currentToken == '+') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgAdd', $result, $result2); + } elseif ($this->currentToken == '-') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgSub', $result, $result2); + } else { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgPower', $result, $result2); + } + } + + return $result; + } + + /** + * This function just introduces a ptgParen element in the tree, so that Excel + * doesn't get confused when working with a parenthesized formula afterwards. + * + * @see fact() + * + * @return array The parsed ptg'd tree + */ + private function parenthesizedExpression() + { + return $this->createTree('ptgParen', $this->expression(), ''); + } + + /** + * It parses a term. It assumes the following rule: + * Term -> Fact [("*" | "/") Fact]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function term() + { + $result = $this->fact(); + while (($this->currentToken == '*') || + ($this->currentToken == '/')) { + if ($this->currentToken == '*') { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgMul', $result, $result2); + } else { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgDiv', $result, $result2); + } + } + + return $result; + } + + /** + * It parses a factor. It assumes the following rule: + * Fact -> ( Expr ) + * | CellRef + * | CellRange + * | Number + * | Function. + * + * @return mixed The parsed ptg'd tree on success + */ + private function fact() + { + if ($this->currentToken === '(') { + $this->advance(); // eat the "(" + $result = $this->parenthesizedExpression(); + if ($this->currentToken !== ')') { + throw new WriterException("')' token expected."); + } + $this->advance(); // eat the ")" + + return $result; + } + // if it's a reference + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $this->currentToken)) { + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $this->currentToken)) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $this->currentToken)) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken) || + preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken)) { + // if it's a range A1:B2 or $A$1:$B$2 + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $this->currentToken)) { + // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $this->currentToken)) { + // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (is_numeric($this->currentToken)) { + // If it's a number or a percent + if ($this->lookAhead === '%') { + $result = $this->createTree('ptgPercent', $this->currentToken, ''); + $this->advance(); // Skip the percentage operator once we've pre-built that tree + } else { + $result = $this->createTree($this->currentToken, '', ''); + } + $this->advance(); + + return $result; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $this->currentToken)) { + // if it's a function call + return $this->func(); + } + + throw new WriterException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter); + } + + /** + * It parses a function call. It assumes the following rule: + * Func -> ( Expr [,Expr]* ). + * + * @return mixed The parsed ptg'd tree on success + */ + private function func() + { + $num_args = 0; // number of arguments received + $function = strtoupper($this->currentToken); + $result = ''; // initialize result + $this->advance(); + $this->advance(); // eat the "(" + while ($this->currentToken !== ')') { + if ($num_args > 0) { + if ($this->currentToken === ',' || $this->currentToken === ';') { + $this->advance(); // eat the "," or ";" + } else { + throw new WriterException("Syntax error: comma expected in function $function, arg #{$num_args}"); + } + $result2 = $this->condition(); + $result = $this->createTree('arg', $result, $result2); + } else { // first argument + $result2 = $this->condition(); + $result = $this->createTree('arg', '', $result2); + } + ++$num_args; + } + if (!isset($this->functions[$function])) { + throw new WriterException("Function $function() doesn't exist"); + } + $args = $this->functions[$function][1]; + // If fixed number of args eg. TIME($i, $j, $k). Check that the number of args is valid. + if (($args >= 0) && ($args != $num_args)) { + throw new WriterException("Incorrect number of arguments in function $function() "); + } + + $result = $this->createTree($function, $result, $num_args); + $this->advance(); // eat the ")" + + return $result; + } + + /** + * Creates a tree. In fact an array which may have one or two arrays (sub-trees) + * as elements. + * + * @param mixed $value the value of this node + * @param mixed $left the left array (sub-tree) or a final node + * @param mixed $right the right array (sub-tree) or a final node + * + * @return array A tree + */ + private function createTree($value, $left, $right) + { + return ['value' => $value, 'left' => $left, 'right' => $right]; + } + + /** + * Builds a string containing the tree in reverse polish notation (What you + * would use in a HP calculator stack). + * The following tree:. + * + * + + * / \ + * 2 3 + * + * produces: "23+" + * + * The following tree: + * + * + + * / \ + * 3 * + * / \ + * 6 A1 + * + * produces: "36A1*+" + * + * In fact all operands, functions, references, etc... are written as ptg's + * + * @param array $tree the optional tree to convert + * + * @return string The tree in reverse polish notation + */ + public function toReversePolish($tree = []) + { + $polish = ''; // the string we are going to return + if (empty($tree)) { // If it's the first call use parseTree + $tree = $this->parseTree; + } + + if (is_array($tree['left'])) { + $converted_tree = $this->toReversePolish($tree['left']); + $polish .= $converted_tree; + } elseif ($tree['left'] != '') { // It's a final node + $converted_tree = $this->convert($tree['left']); + $polish .= $converted_tree; + } + if (is_array($tree['right'])) { + $converted_tree = $this->toReversePolish($tree['right']); + $polish .= $converted_tree; + } elseif ($tree['right'] != '') { // It's a final node + $converted_tree = $this->convert($tree['right']); + $polish .= $converted_tree; + } + // if it's a function convert it here (so we can set it's arguments) + if (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/", $tree['value']) && + !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) && + !preg_match('/^[A-Ia-i]?[A-Za-z](\\d+)\\.\\.[A-Ia-i]?[A-Za-z](\\d+)$/', $tree['value']) && + !is_numeric($tree['value']) && + !isset($this->ptg[$tree['value']])) { + // left subtree for a function is always an array. + if ($tree['left'] != '') { + $left_tree = $this->toReversePolish($tree['left']); + } else { + $left_tree = ''; + } + // add it's left subtree and return. + return $left_tree . $this->convertFunction($tree['value'], $tree['right']); + } + $converted_tree = $this->convert($tree['value']); + + return $polish . $converted_tree; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Workbook.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Workbook.php new file mode 100755 index 0000000..d5f61bf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Workbook.php @@ -0,0 +1,1147 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Workbook extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * The BIFF file size for the workbook. + * + * @var int + * + * @see calcSheetOffsets() + */ + private $biffSize; + + /** + * XF Writers. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Xf[] + */ + private $xfWriters = []; + + /** + * Array containing the colour palette. + * + * @var array + */ + private $palette; + + /** + * The codepage indicates the text encoding used for strings. + * + * @var int + */ + private $codepage; + + /** + * The country code used for localization. + * + * @var int + */ + private $countryCode; + + /** + * Workbook. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Fonts writers. + * + * @var Font[] + */ + private $fontWriters = []; + + /** + * Added fonts. Maps from font's hash => index in workbook. + * + * @var array + */ + private $addedFonts = []; + + /** + * Shared number formats. + * + * @var array + */ + private $numberFormats = []; + + /** + * Added number formats. Maps from numberFormat's hash => index in workbook. + * + * @var array + */ + private $addedNumberFormats = []; + + /** + * Sizes of the binary worksheet streams. + * + * @var array + */ + private $worksheetSizes = []; + + /** + * Offsets of the binary worksheet streams relative to the start of the global workbook stream. + * + * @var array + */ + private $worksheetOffsets = []; + + /** + * Total number of shared strings in workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Number of unique shared strings in workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Array of unique shared strings in workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Escher object corresponding to MSODRAWINGGROUP. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Class constructor. + * + * @param Spreadsheet $spreadsheet The Workbook + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array $str_table String Table + * @param array $colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + */ + public function __construct(Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, Parser $parser) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->parser = $parser; + $this->biffSize = 0; + $this->palette = []; + $this->countryCode = -1; + + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->setPaletteXl97(); + + $this->spreadsheet = $spreadsheet; + + $this->codepage = 0x04B0; + + // Add empty sheets and Build color cache + $countSheets = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $phpSheet = $spreadsheet->getSheet($i); + + $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser + + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $i, $i); + $this->parser->references[] = $ref; // Register reference with parser + + // Sheet tab colors? + if ($phpSheet->isTabColorSet()) { + $this->addColor($phpSheet->getTabColor()->getRGB()); + } + } + } + + /** + * Add a new XF writer. + * + * @param bool $isStyleXf Is it a style XF? + * + * @return int Index to XF record + */ + public function addXfWriter(Style $style, $isStyleXf = false) + { + $xfWriter = new Xf($style); + $xfWriter->setIsStyleXf($isStyleXf); + + // Add the font if not already added + $fontIndex = $this->addFont($style->getFont()); + + // Assign the font index to the xf record + $xfWriter->setFontIndex($fontIndex); + + // Background colors, best to treat these after the font so black will come after white in custom palette + $xfWriter->setFgColor($this->addColor($style->getFill()->getStartColor()->getRGB())); + $xfWriter->setBgColor($this->addColor($style->getFill()->getEndColor()->getRGB())); + $xfWriter->setBottomColor($this->addColor($style->getBorders()->getBottom()->getColor()->getRGB())); + $xfWriter->setTopColor($this->addColor($style->getBorders()->getTop()->getColor()->getRGB())); + $xfWriter->setRightColor($this->addColor($style->getBorders()->getRight()->getColor()->getRGB())); + $xfWriter->setLeftColor($this->addColor($style->getBorders()->getLeft()->getColor()->getRGB())); + $xfWriter->setDiagColor($this->addColor($style->getBorders()->getDiagonal()->getColor()->getRGB())); + + // Add the number format if it is not a built-in one and not already added + if ($style->getNumberFormat()->getBuiltInFormatCode() === false) { + $numberFormatHashCode = $style->getNumberFormat()->getHashCode(); + + if (isset($this->addedNumberFormats[$numberFormatHashCode])) { + $numberFormatIndex = $this->addedNumberFormats[$numberFormatHashCode]; + } else { + $numberFormatIndex = 164 + count($this->numberFormats); + $this->numberFormats[$numberFormatIndex] = $style->getNumberFormat(); + $this->addedNumberFormats[$numberFormatHashCode] = $numberFormatIndex; + } + } else { + $numberFormatIndex = (int) $style->getNumberFormat()->getBuiltInFormatCode(); + } + + // Assign the number format index to xf record + $xfWriter->setNumberFormatIndex($numberFormatIndex); + + $this->xfWriters[] = $xfWriter; + + return count($this->xfWriters) - 1; + } + + /** + * Add a font to added fonts. + * + * @return int Index to FONT record + */ + public function addFont(\PhpOffice\PhpSpreadsheet\Style\Font $font) + { + $fontHashCode = $font->getHashCode(); + if (isset($this->addedFonts[$fontHashCode])) { + $fontIndex = $this->addedFonts[$fontHashCode]; + } else { + $countFonts = count($this->fontWriters); + $fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1; + + $fontWriter = new Font($font); + $fontWriter->setColorIndex($this->addColor($font->getColor()->getRGB())); + $this->fontWriters[] = $fontWriter; + + $this->addedFonts[$fontHashCode] = $fontIndex; + } + + return $fontIndex; + } + + /** + * Alter color palette adding a custom color. + * + * @param string $rgb E.g. 'FF00AA' + * + * @return int Color index + */ + private function addColor($rgb) + { + if (!isset($this->colors[$rgb])) { + $color = + [ + hexdec(substr($rgb, 0, 2)), + hexdec(substr($rgb, 2, 2)), + hexdec(substr($rgb, 4)), + 0, + ]; + $colorIndex = array_search($color, $this->palette); + if ($colorIndex) { + $this->colors[$rgb] = $colorIndex; + } else { + if (count($this->colors) === 0) { + $lastColor = 7; + } else { + $lastColor = end($this->colors); + } + if ($lastColor < 57) { + // then we add a custom color altering the palette + $colorIndex = $lastColor + 1; + $this->palette[$colorIndex] = $color; + $this->colors[$rgb] = $colorIndex; + } else { + // no room for more custom colors, just map to black + $colorIndex = 0; + } + } + } else { + // fetch already added custom color + $colorIndex = $this->colors[$rgb]; + } + + return $colorIndex; + } + + /** + * Sets the colour palette to the Excel 97+ default. + */ + private function setPaletteXl97(): void + { + $this->palette = [ + 0x08 => [0x00, 0x00, 0x00, 0x00], + 0x09 => [0xff, 0xff, 0xff, 0x00], + 0x0A => [0xff, 0x00, 0x00, 0x00], + 0x0B => [0x00, 0xff, 0x00, 0x00], + 0x0C => [0x00, 0x00, 0xff, 0x00], + 0x0D => [0xff, 0xff, 0x00, 0x00], + 0x0E => [0xff, 0x00, 0xff, 0x00], + 0x0F => [0x00, 0xff, 0xff, 0x00], + 0x10 => [0x80, 0x00, 0x00, 0x00], + 0x11 => [0x00, 0x80, 0x00, 0x00], + 0x12 => [0x00, 0x00, 0x80, 0x00], + 0x13 => [0x80, 0x80, 0x00, 0x00], + 0x14 => [0x80, 0x00, 0x80, 0x00], + 0x15 => [0x00, 0x80, 0x80, 0x00], + 0x16 => [0xc0, 0xc0, 0xc0, 0x00], + 0x17 => [0x80, 0x80, 0x80, 0x00], + 0x18 => [0x99, 0x99, 0xff, 0x00], + 0x19 => [0x99, 0x33, 0x66, 0x00], + 0x1A => [0xff, 0xff, 0xcc, 0x00], + 0x1B => [0xcc, 0xff, 0xff, 0x00], + 0x1C => [0x66, 0x00, 0x66, 0x00], + 0x1D => [0xff, 0x80, 0x80, 0x00], + 0x1E => [0x00, 0x66, 0xcc, 0x00], + 0x1F => [0xcc, 0xcc, 0xff, 0x00], + 0x20 => [0x00, 0x00, 0x80, 0x00], + 0x21 => [0xff, 0x00, 0xff, 0x00], + 0x22 => [0xff, 0xff, 0x00, 0x00], + 0x23 => [0x00, 0xff, 0xff, 0x00], + 0x24 => [0x80, 0x00, 0x80, 0x00], + 0x25 => [0x80, 0x00, 0x00, 0x00], + 0x26 => [0x00, 0x80, 0x80, 0x00], + 0x27 => [0x00, 0x00, 0xff, 0x00], + 0x28 => [0x00, 0xcc, 0xff, 0x00], + 0x29 => [0xcc, 0xff, 0xff, 0x00], + 0x2A => [0xcc, 0xff, 0xcc, 0x00], + 0x2B => [0xff, 0xff, 0x99, 0x00], + 0x2C => [0x99, 0xcc, 0xff, 0x00], + 0x2D => [0xff, 0x99, 0xcc, 0x00], + 0x2E => [0xcc, 0x99, 0xff, 0x00], + 0x2F => [0xff, 0xcc, 0x99, 0x00], + 0x30 => [0x33, 0x66, 0xff, 0x00], + 0x31 => [0x33, 0xcc, 0xcc, 0x00], + 0x32 => [0x99, 0xcc, 0x00, 0x00], + 0x33 => [0xff, 0xcc, 0x00, 0x00], + 0x34 => [0xff, 0x99, 0x00, 0x00], + 0x35 => [0xff, 0x66, 0x00, 0x00], + 0x36 => [0x66, 0x66, 0x99, 0x00], + 0x37 => [0x96, 0x96, 0x96, 0x00], + 0x38 => [0x00, 0x33, 0x66, 0x00], + 0x39 => [0x33, 0x99, 0x66, 0x00], + 0x3A => [0x00, 0x33, 0x00, 0x00], + 0x3B => [0x33, 0x33, 0x00, 0x00], + 0x3C => [0x99, 0x33, 0x00, 0x00], + 0x3D => [0x99, 0x33, 0x66, 0x00], + 0x3E => [0x33, 0x33, 0x99, 0x00], + 0x3F => [0x33, 0x33, 0x33, 0x00], + ]; + } + + /** + * Assemble worksheets into a workbook and send the BIFF data to an OLE + * storage. + * + * @param array $pWorksheetSizes The sizes in bytes of the binary worksheet streams + * + * @return string Binary data for workbook stream + */ + public function writeWorkbook(array $pWorksheetSizes) + { + $this->worksheetSizes = $pWorksheetSizes; + + // Calculate the number of selected worksheet tabs and call the finalization + // methods for each worksheet + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // Add part 1 of the Workbook globals, what goes before the SHEET records + $this->storeBof(0x0005); + $this->writeCodepage(); + $this->writeWindow1(); + + $this->writeDateMode(); + $this->writeAllFonts(); + $this->writeAllNumberFormats(); + $this->writeAllXfs(); + $this->writeAllStyles(); + $this->writePalette(); + + // Prepare part 3 of the workbook global stream, what goes after the SHEET records + $part3 = ''; + if ($this->countryCode !== -1) { + $part3 .= $this->writeCountry(); + } + $part3 .= $this->writeRecalcId(); + + $part3 .= $this->writeSupbookInternal(); + /* TODO: store external SUPBOOK records and XCT and CRN records + in case of external references for BIFF8 */ + $part3 .= $this->writeExternalsheetBiff8(); + $part3 .= $this->writeAllDefinedNamesBiff8(); + $part3 .= $this->writeMsoDrawingGroup(); + $part3 .= $this->writeSharedStringsTable(); + + $part3 .= $this->writeEof(); + + // Add part 2 of the Workbook globals, the SHEET records + $this->calcSheetOffsets(); + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->writeBoundSheet($this->spreadsheet->getSheet($i), $this->worksheetOffsets[$i]); + } + + // Add part 3 of the Workbook globals + $this->_data .= $part3; + + return $this->_data; + } + + /** + * Calculate offsets for Worksheet BOF records. + */ + private function calcSheetOffsets(): void + { + $boundsheet_length = 10; // fixed length for a BOUNDSHEET record + + // size of Workbook globals part 1 + 3 + $offset = $this->_datasize; + + // add size of Workbook globals part 2, the length of the SHEET records + $total_worksheets = count($this->spreadsheet->getAllSheets()); + foreach ($this->spreadsheet->getWorksheetIterator() as $sheet) { + $offset += $boundsheet_length + strlen(StringHelper::UTF8toBIFF8UnicodeShort($sheet->getTitle())); + } + + // add the sizes of each of the Sheet substreams, respectively + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->worksheetOffsets[$i] = $offset; + $offset += $this->worksheetSizes[$i]; + } + $this->biffSize = $offset; + } + + /** + * Store the Excel FONT records. + */ + private function writeAllFonts(): void + { + foreach ($this->fontWriters as $fontWriter) { + $this->append($fontWriter->writeFont()); + } + } + + /** + * Store user defined numerical formats i.e. FORMAT records. + */ + private function writeAllNumberFormats(): void + { + foreach ($this->numberFormats as $numberFormatIndex => $numberFormat) { + $this->writeNumberFormat($numberFormat->getFormatCode(), $numberFormatIndex); + } + } + + /** + * Write all XF records. + */ + private function writeAllXfs(): void + { + foreach ($this->xfWriters as $xfWriter) { + $this->append($xfWriter->writeXf()); + } + } + + /** + * Write all STYLE records. + */ + private function writeAllStyles(): void + { + $this->writeStyle(); + } + + /** + * Writes all the DEFINEDNAME records (BIFF8). + * So far this is only used for repeating rows/columns (print titles) and print areas. + */ + private function writeAllDefinedNamesBiff8() + { + $chunk = ''; + + // Named ranges + if (count($this->spreadsheet->getNamedRanges()) > 0) { + // Loop named ranges + $namedRanges = $this->spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + // Create absolute coordinate + $range = Coordinate::splitRange($namedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteCoordinate($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteCoordinate($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); // e.g. Sheet1!$A$1:$B$2 + + // parse formula + try { + $error = $this->parser->parse($range); + $formulaData = $this->parser->toReversePolish(); + + // make sure tRef3d is of type tRef3dR (0x3A) + if (isset($formulaData[0]) && ($formulaData[0] == "\x7A" || $formulaData[0] == "\x5A")) { + $formulaData = "\x3A" . substr($formulaData, 1); + } + + if ($namedRange->getLocalOnly()) { + // local scope + $scope = $this->spreadsheet->getIndex($namedRange->getScope()) + 1; + } else { + // global scope + $scope = 0; + } + $chunk .= $this->writeData($this->writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false)); + } catch (PhpSpreadsheetException $e) { + // do nothing + } + } + } + + // total number of sheets + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // write the print titles (repeating rows, columns), if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + // simultaneous repeatColumns repeatRows + if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + + // construct formula data manually + $formulaData = pack('Cv', 0x29, 0x17); // tMemFunc + $formulaData .= pack('Cvvvvv', 0x3B, $i, 0, 65535, $colmin, $colmax); // tArea3d + $formulaData .= pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, 0, 255); // tArea3d + $formulaData .= pack('C', 0x10); // tList + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + + // (exclusive) either repeatColumns or repeatRows + } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { + // Columns to repeat + if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + } else { + $colmin = 0; + $colmax = 255; + } + // Rows to repeat + if ($sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + } else { + $rowmin = 0; + $rowmax = 65535; + } + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData = pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, $colmin, $colmax); + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + } + } + + // write the print areas, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + if ($sheetSetup->isPrintAreaSet()) { + // Print area, e.g. A3:J6,H1:X20 + $printArea = Coordinate::splitRange($sheetSetup->getPrintArea()); + $countPrintArea = count($printArea); + + $formulaData = ''; + for ($j = 0; $j < $countPrintArea; ++$j) { + $printAreaRect = $printArea[$j]; // e.g. A3:J6 + $printAreaRect[0] = Coordinate::coordinateFromString($printAreaRect[0]); + $printAreaRect[1] = Coordinate::coordinateFromString($printAreaRect[1]); + + $print_rowmin = $printAreaRect[0][1] - 1; + $print_rowmax = $printAreaRect[1][1] - 1; + $print_colmin = Coordinate::columnIndexFromString($printAreaRect[0][0]) - 1; + $print_colmax = Coordinate::columnIndexFromString($printAreaRect[1][0]) - 1; + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData .= pack('Cvvvvv', 0x3B, $i, $print_rowmin, $print_rowmax, $print_colmin, $print_colmax); + + if ($j > 0) { + $formulaData .= pack('C', 0x10); // list operator token ',' + } + } + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x06), $formulaData, $i + 1, true)); + } + } + + // write autofilters, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetAutoFilter = $this->spreadsheet->getSheet($i)->getAutoFilter(); + $autoFilterRange = $sheetAutoFilter->getRange(); + if (!empty($autoFilterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($autoFilterRange); + + //Autofilter built in name + $name = pack('C', 0x0D); + + $chunk .= $this->writeData($this->writeShortNameBiff8($name, $i + 1, $rangeBounds, true)); + } + } + + return $chunk; + } + + /** + * Write a DEFINEDNAME record for BIFF8 using explicit binary formula data. + * + * @param string $name The name in UTF-8 + * @param string $formulaData The binary formula data + * @param int $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param bool $isBuiltIn Built-in name? + * + * @return string Complete binary record data + */ + private function writeDefinedNameBiff8($name, $formulaData, $sheetIndex = 0, $isBuiltIn = false) + { + $record = 0x0018; + + // option flags + $options = $isBuiltIn ? 0x20 : 0x00; + + // length of the name, character count + $nlen = StringHelper::countCharacters($name); + + // name with stripped length field + $name = substr(StringHelper::UTF8toBIFF8UnicodeLong($name), 2); + + // size of the formula (in bytes) + $sz = strlen($formulaData); + + // combine the parts + $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0) + . $name . $formulaData; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Write a short NAME record. + * + * @param string $name + * @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param integer[][] $rangeBounds range boundaries + * @param bool $isHidden + * + * @return string Complete binary record data + * */ + private function writeShortNameBiff8($name, $sheetIndex, $rangeBounds, $isHidden = false) + { + $record = 0x0018; + + // option flags + $options = ($isHidden ? 0x21 : 0x00); + + $extra = pack( + 'Cvvvvv', + 0x3B, + $sheetIndex - 1, + $rangeBounds[0][1] - 1, + $rangeBounds[1][1] - 1, + $rangeBounds[0][0] - 1, + $rangeBounds[1][0] - 1 + ); + + // size of the formula (in bytes) + $sz = strlen($extra); + + // combine the parts + $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0) + . $name . $extra; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Stores the CODEPAGE biff record. + */ + private function writeCodepage(): void + { + $record = 0x0042; // Record identifier + $length = 0x0002; // Number of bytes to follow + $cv = $this->codepage; // The code page + + $header = pack('vv', $record, $length); + $data = pack('v', $cv); + + $this->append($header . $data); + } + + /** + * Write Excel BIFF WINDOW1 record. + */ + private function writeWindow1(): void + { + $record = 0x003D; // Record identifier + $length = 0x0012; // Number of bytes to follow + + $xWn = 0x0000; // Horizontal position of window + $yWn = 0x0000; // Vertical position of window + $dxWn = 0x25BC; // Width of window + $dyWn = 0x1572; // Height of window + + $grbit = 0x0038; // Option flags + + // not supported by PhpSpreadsheet, so there is only one selected sheet, the active + $ctabsel = 1; // Number of workbook tabs selected + + $wTabRatio = 0x0258; // Tab to scrollbar ratio + + // not supported by PhpSpreadsheet, set to 0 + $itabFirst = 0; // 1st displayed worksheet + $itabCur = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio); + $this->append($header . $data); + } + + /** + * Writes Excel BIFF BOUNDSHEET record. + * + * @param Worksheet $sheet Worksheet name + * @param int $offset Location of worksheet BOF + */ + private function writeBoundSheet($sheet, $offset): void + { + $sheetname = $sheet->getTitle(); + $record = 0x0085; // Record identifier + + // sheet state + switch ($sheet->getSheetState()) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE: + $ss = 0x00; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN: + $ss = 0x01; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN: + $ss = 0x02; + + break; + default: + $ss = 0x00; + + break; + } + + // sheet type + $st = 0x00; + + $grbit = 0x0000; // Visibility and sheet type + + $data = pack('VCC', $offset, $ss, $st); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname); + + $length = strlen($data); + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write Internal SUPBOOK record. + */ + private function writeSupbookInternal() + { + $record = 0x01AE; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401); + + return $this->writeData($header . $data); + } + + /** + * Writes the Excel BIFF EXTERNSHEET record. These references are used by + * formulas. + */ + private function writeExternalsheetBiff8() + { + $totalReferences = count($this->parser->references); + $record = 0x0017; // Record identifier + $length = 2 + 6 * $totalReferences; // Number of bytes to follow + + $supbook_index = 0; // FIXME: only using internal SUPBOOK record + $header = pack('vv', $record, $length); + $data = pack('v', $totalReferences); + for ($i = 0; $i < $totalReferences; ++$i) { + $data .= $this->parser->references[$i]; + } + + return $this->writeData($header . $data); + } + + /** + * Write Excel BIFF STYLE records. + */ + private function writeStyle(): void + { + $record = 0x0293; // Record identifier + $length = 0x0004; // Bytes to follow + + $ixfe = 0x8000; // Index to cell style XF + $BuiltIn = 0x00; // Built-in style + $iLevel = 0xff; // Outline style level + + $header = pack('vv', $record, $length); + $data = pack('vCC', $ixfe, $BuiltIn, $iLevel); + $this->append($header . $data); + } + + /** + * Writes Excel FORMAT record for non "built-in" numerical formats. + * + * @param string $format Custom format string + * @param int $ifmt Format index code + */ + private function writeNumberFormat($format, $ifmt): void + { + $record = 0x041E; // Record identifier + + $numberFormatString = StringHelper::UTF8toBIFF8UnicodeLong($format); + $length = 2 + strlen($numberFormatString); // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $ifmt) . $numberFormatString; + $this->append($header . $data); + } + + /** + * Write DATEMODE record to indicate the date system in use (1904 or 1900). + */ + private function writeDateMode(): void + { + $record = 0x0022; // Record identifier + $length = 0x0002; // Bytes to follow + + $f1904 = (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) + ? 1 + : 0; // Flag for 1904 date system + + $header = pack('vv', $record, $length); + $data = pack('v', $f1904); + $this->append($header . $data); + } + + /** + * Stores the COUNTRY record for localization. + * + * @return string + */ + private function writeCountry() + { + $record = 0x008C; // Record identifier + $length = 4; // Number of bytes to follow + + $header = pack('vv', $record, $length); + // using the same country code always for simplicity + $data = pack('vv', $this->countryCode, $this->countryCode); + + return $this->writeData($header . $data); + } + + /** + * Write the RECALCID record. + * + * @return string + */ + private function writeRecalcId() + { + $record = 0x01C1; // Record identifier + $length = 8; // Number of bytes to follow + + $header = pack('vv', $record, $length); + + // by inspection of real Excel files, MS Office Excel 2007 writes this + $data = pack('VV', 0x000001C1, 0x00001E667); + + return $this->writeData($header . $data); + } + + /** + * Stores the PALETTE biff record. + */ + private function writePalette(): void + { + $aref = $this->palette; + + $record = 0x0092; // Record identifier + $length = 2 + 4 * count($aref); // Number of bytes to follow + $ccv = count($aref); // Number of RGB values to follow + $data = ''; // The RGB data + + // Pack the RGB data + foreach ($aref as $color) { + foreach ($color as $byte) { + $data .= pack('C', $byte); + } + } + + $header = pack('vvv', $record, $length, $ccv); + $this->append($header . $data); + } + + /** + * Handling of the SST continue blocks is complicated by the need to include an + * additional continuation byte depending on whether the string is split between + * blocks or whether it starts at the beginning of the block. (There are also + * additional complications that will arise later when/if Rich Strings are + * supported). + * + * The Excel documentation says that the SST record should be followed by an + * EXTSST record. The EXTSST record is a hash table that is used to optimise + * access to SST. However, despite the documentation it doesn't seem to be + * required so we will ignore it. + * + * @return string Binary data + */ + private function writeSharedStringsTable() + { + // maximum size of record data (excluding record header) + $continue_limit = 8224; + + // initialize array of record data blocks + $recordDatas = []; + + // start SST record data block with total number of strings, total number of unique strings + $recordData = pack('VV', $this->stringTotal, $this->stringUnique); + + // loop through all (unique) strings in shared strings table + foreach (array_keys($this->stringTable) as $string) { + // here $string is a BIFF8 encoded string + + // length = character count + $headerinfo = unpack('vlength/Cencoding', $string); + + // currently, this is always 1 = uncompressed + $encoding = $headerinfo['encoding']; + + // initialize finished writing current $string + $finished = false; + + while ($finished === false) { + // normally, there will be only one cycle, but if string cannot immediately be written as is + // there will be need for more than one cylcle, if string longer than one record data block, there + // may be need for even more cycles + + if (strlen($recordData) + strlen($string) <= $continue_limit) { + // then we can write the string (or remainder of string) without any problems + $recordData .= $string; + + if (strlen($recordData) + strlen($string) == $continue_limit) { + // we close the record data block, and initialize a new one + $recordDatas[] = $recordData; + $recordData = ''; + } + + // we are finished writing this string + $finished = true; + } else { + // special treatment writing the string (or remainder of the string) + // If the string is very long it may need to be written in more than one CONTINUE record. + + // check how many bytes more there is room for in the current record + $space_remaining = $continue_limit - strlen($recordData); + + // minimum space needed + // uncompressed: 2 byte string length length field + 1 byte option flags + 2 byte character + // compressed: 2 byte string length length field + 1 byte option flags + 1 byte character + $min_space_needed = ($encoding == 1) ? 5 : 4; + + // We have two cases + // 1. space remaining is less than minimum space needed + // here we must waste the space remaining and move to next record data block + // 2. space remaining is greater than or equal to minimum space needed + // here we write as much as we can in the current block, then move to next record data block + + // 1. space remaining is less than minimum space needed + if ($space_remaining < $min_space_needed) { + // we close the block, store the block data + $recordDatas[] = $recordData; + + // and start new record data block where we start writing the string + $recordData = ''; + + // 2. space remaining is greater than or equal to minimum space needed + } else { + // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below + $effective_space_remaining = $space_remaining; + + // for uncompressed strings, sometimes effective space remaining is reduced by 1 + if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) { + --$effective_space_remaining; + } + + // one block fininshed, store the block data + $recordData .= substr($string, 0, $effective_space_remaining); + + $string = substr($string, $effective_space_remaining); // for next cycle in while loop + $recordDatas[] = $recordData; + + // start new record data block with the repeated option flags + $recordData = pack('C', $encoding); + } + } + } + } + + // Store the last record data block unless it is empty + // if there was no need for any continue records, this will be the for SST record data block itself + if (strlen($recordData) > 0) { + $recordDatas[] = $recordData; + } + + // combine into one chunk with all the blocks SST, CONTINUE,... + $chunk = ''; + foreach ($recordDatas as $i => $recordData) { + // first block should have the SST record header, remaing should have CONTINUE header + $record = ($i == 0) ? 0x00FC : 0x003C; + + $header = pack('vv', $record, strlen($recordData)); + $data = $header . $recordData; + + $chunk .= $this->writeData($data); + } + + return $chunk; + } + + /** + * Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records. + */ + private function writeMsoDrawingGroup() + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + + $record = 0x00EB; + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $this->writeData($header . $data); + } + + return ''; + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(?\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null): void + { + $this->escher = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Worksheet.php new file mode 100755 index 0000000..0dce7ba --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -0,0 +1,4484 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Worksheet extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * Maximum number of characters for a string (LABEL record in BIFF5). + * + * @var int + */ + private $xlsStringMaxLength; + + /** + * Array containing format information for columns. + * + * @var array + */ + private $columnInfo; + + /** + * Array containing the selected area for the worksheet. + * + * @var array + */ + private $selection; + + /** + * The active pane for the worksheet. + * + * @var int + */ + private $activePane; + + /** + * Whether to use outline. + * + * @var int + */ + private $outlineOn; + + /** + * Auto outline styles. + * + * @var bool + */ + private $outlineStyle; + + /** + * Whether to have outline summary below. + * + * @var bool + */ + private $outlineBelow; + + /** + * Whether to have outline summary at the right. + * + * @var bool + */ + private $outlineRight; + + /** + * Reference to the total number of strings in the workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Reference to the number of unique strings in the workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Reference to the array containing all the unique strings in the workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Index of first used row (at least 0). + * + * @var int + */ + private $firstRowIndex; + + /** + * Index of last used row. (no used rows means -1). + * + * @var int + */ + private $lastRowIndex; + + /** + * Index of first used column (at least 0). + * + * @var int + */ + private $firstColumnIndex; + + /** + * Index of last used column (no used columns means -1). + * + * @var int + */ + private $lastColumnIndex; + + /** + * Sheet object. + * + * @var \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + */ + public $phpSheet; + + /** + * Count cell style Xfs. + * + * @var int + */ + private $countCellStyleXfs; + + /** + * Escher object corresponding to MSODRAWING. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Array of font hashes associated to FONT records index. + * + * @var array + */ + public $fontHashIndex; + + /** + * @var bool + */ + private $preCalculateFormulas; + + /** + * @var int + */ + private $printHeaders; + + /** + * Constructor. + * + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array &$str_table String Table + * @param array &$colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + * @param bool $preCalculateFormulas Flag indicating whether formulas should be calculated or just written + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet The worksheet to write + */ + public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, Parser $parser, $preCalculateFormulas, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->preCalculateFormulas = $preCalculateFormulas; + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->parser = $parser; + + $this->phpSheet = $phpSheet; + + $this->xlsStringMaxLength = 255; + $this->columnInfo = []; + $this->selection = [0, 0, 0, 0]; + $this->activePane = 3; + + $this->printHeaders = 0; + + $this->outlineStyle = 0; + $this->outlineBelow = 1; + $this->outlineRight = 1; + $this->outlineOn = 1; + + $this->fontHashIndex = []; + + // calculate values for DIMENSIONS record + $minR = 1; + $minC = 'A'; + + $maxR = $this->phpSheet->getHighestRow(); + $maxC = $this->phpSheet->getHighestColumn(); + + // Determine lowest and highest column and row + $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR; + + $this->firstColumnIndex = Coordinate::columnIndexFromString($minC); + $this->lastColumnIndex = Coordinate::columnIndexFromString($maxC); + +// if ($this->firstColumnIndex > 255) $this->firstColumnIndex = 255; + if ($this->lastColumnIndex > 255) { + $this->lastColumnIndex = 255; + } + + $this->countCellStyleXfs = count($phpSheet->getParent()->getCellStyleXfCollection()); + } + + /** + * Add data to the beginning of the workbook (note the reverse order) + * and to the end of the workbook. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::storeWorkbook() + */ + public function close(): void + { + $phpSheet = $this->phpSheet; + + // Storing selected cells and active sheet because it changes while parsing cells with formulas. + $selectedCells = $this->phpSheet->getSelectedCells(); + $activeSheetIndex = $this->phpSheet->getParent()->getActiveSheetIndex(); + + // Write BOF record + $this->storeBof(0x0010); + + // Write PRINTHEADERS + $this->writePrintHeaders(); + + // Write PRINTGRIDLINES + $this->writePrintGridlines(); + + // Write GRIDSET + $this->writeGridset(); + + // Calculate column widths + $phpSheet->calculateColumnWidths(); + + // Column dimensions + if (($defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth()) < 0) { + $defaultWidth = \PhpOffice\PhpSpreadsheet\Shared\Font::getDefaultColumnWidthByFont($phpSheet->getParent()->getDefaultStyle()->getFont()); + } + + $columnDimensions = $phpSheet->getColumnDimensions(); + $maxCol = $this->lastColumnIndex - 1; + for ($i = 0; $i <= $maxCol; ++$i) { + $hidden = 0; + $level = 0; + $xfIndex = 15; // there are 15 cell style Xfs + + $width = $defaultWidth; + + $columnLetter = Coordinate::stringFromColumnIndex($i + 1); + if (isset($columnDimensions[$columnLetter])) { + $columnDimension = $columnDimensions[$columnLetter]; + if ($columnDimension->getWidth() >= 0) { + $width = $columnDimension->getWidth(); + } + $hidden = $columnDimension->getVisible() ? 0 : 1; + $level = $columnDimension->getOutlineLevel(); + $xfIndex = $columnDimension->getXfIndex() + 15; // there are 15 cell style Xfs + } + + // Components of columnInfo: + // $firstcol first column on the range + // $lastcol last column on the range + // $width width to set + // $xfIndex The optional cell style Xf index to apply to the columns + // $hidden The optional hidden atribute + // $level The optional outline level + $this->columnInfo[] = [$i, $i, $width, $xfIndex, $hidden, $level]; + } + + // Write GUTS + $this->writeGuts(); + + // Write DEFAULTROWHEIGHT + $this->writeDefaultRowHeight(); + // Write WSBOOL + $this->writeWsbool(); + // Write horizontal and vertical page breaks + $this->writeBreaks(); + // Write page header + $this->writeHeader(); + // Write page footer + $this->writeFooter(); + // Write page horizontal centering + $this->writeHcenter(); + // Write page vertical centering + $this->writeVcenter(); + // Write left margin + $this->writeMarginLeft(); + // Write right margin + $this->writeMarginRight(); + // Write top margin + $this->writeMarginTop(); + // Write bottom margin + $this->writeMarginBottom(); + // Write page setup + $this->writeSetup(); + // Write sheet protection + $this->writeProtect(); + // Write SCENPROTECT + $this->writeScenProtect(); + // Write OBJECTPROTECT + $this->writeObjectProtect(); + // Write sheet password + $this->writePassword(); + // Write DEFCOLWIDTH record + $this->writeDefcol(); + + // Write the COLINFO records if they exist + if (!empty($this->columnInfo)) { + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $this->writeColinfo($this->columnInfo[$i]); + } + } + $autoFilterRange = $phpSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // Write AUTOFILTERINFO + $this->writeAutoFilterInfo(); + } + + // Write sheet dimensions + $this->writeDimensions(); + + // Row dimensions + foreach ($phpSheet->getRowDimensions() as $rowDimension) { + $xfIndex = $rowDimension->getXfIndex() + 15; // there are 15 cellXfs + $this->writeRow($rowDimension->getRowIndex() - 1, $rowDimension->getRowHeight(), $xfIndex, ($rowDimension->getVisible() ? '0' : '1'), $rowDimension->getOutlineLevel()); + } + + // Write Cells + foreach ($phpSheet->getCoordinates() as $coordinate) { + $cell = $phpSheet->getCell($coordinate); + $row = $cell->getRow() - 1; + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + // Don't break Excel break the code! + if ($row > 65535 || $column > 255) { + throw new WriterException('Rows or columns overflow! Excel5 has limit to 65535 rows and 255 columns. Use XLSX instead.'); + } + + // Write cell value + $xfIndex = $cell->getXfIndex() + 15; // there are 15 cell style Xfs + + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $arrcRun = []; + $str_len = StringHelper::countCharacters($cVal->getPlainText(), 'UTF-8'); + $str_pos = 0; + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + // FONT Index + if ($element instanceof Run) { + $str_fontidx = $this->fontHashIndex[$element->getFont()->getHashCode()]; + } else { + $str_fontidx = 0; + } + $arrcRun[] = ['strlen' => $str_pos, 'fontidx' => $str_fontidx]; + // Position FROM + $str_pos += StringHelper::countCharacters($element->getText(), 'UTF-8'); + } + $this->writeRichTextString($row, $column, $cVal->getPlainText(), $xfIndex, $arrcRun); + } else { + switch ($cell->getDatatype()) { + case DataType::TYPE_STRING: + case DataType::TYPE_NULL: + if ($cVal === '' || $cVal === null) { + $this->writeBlank($row, $column, $xfIndex); + } else { + $this->writeString($row, $column, $cVal, $xfIndex); + } + + break; + case DataType::TYPE_NUMERIC: + $this->writeNumber($row, $column, $cVal, $xfIndex); + + break; + case DataType::TYPE_FORMULA: + $calculatedValue = $this->preCalculateFormulas ? + $cell->getCalculatedValue() : null; + if (self::WRITE_FORMULA_EXCEPTION == $this->writeFormula($row, $column, $cVal, $xfIndex, $calculatedValue)) { + if ($calculatedValue === null) { + $calculatedValue = $cell->getCalculatedValue(); + } + $calctype = gettype($calculatedValue); + switch ($calctype) { + case 'integer': + case 'double': + $this->writeNumber($row, $column, $calculatedValue, $xfIndex); + + break; + case 'string': + $this->writeString($row, $column, $calculatedValue, $xfIndex); + + break; + case 'boolean': + $this->writeBoolErr($row, $column, $calculatedValue, 0, $xfIndex); + + break; + default: + $this->writeString($row, $column, $cVal, $xfIndex); + } + } + + break; + case DataType::TYPE_BOOL: + $this->writeBoolErr($row, $column, $cVal, 0, $xfIndex); + + break; + case DataType::TYPE_ERROR: + $this->writeBoolErr($row, $column, self::mapErrorCode($cVal), 1, $xfIndex); + + break; + } + } + } + + // Append + $this->writeMsoDrawing(); + + // Restoring active sheet. + $this->phpSheet->getParent()->setActiveSheetIndex($activeSheetIndex); + + // Write WINDOW2 record + $this->writeWindow2(); + + // Write PLV record + $this->writePageLayoutView(); + + // Write ZOOM record + $this->writeZoom(); + if ($phpSheet->getFreezePane()) { + $this->writePanes(); + } + + // Restoring selected cells. + $this->phpSheet->setSelectedCells($selectedCells); + + // Write SELECTION record + $this->writeSelection(); + + // Write MergedCellsTable Record + $this->writeMergedCells(); + + // Hyperlinks + foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { + [$column, $row] = Coordinate::coordinateFromString($coordinate); + + $url = $hyperlink->getUrl(); + + if (strpos($url, 'sheet://') !== false) { + // internal to current workbook + $url = str_replace('sheet://', 'internal:', $url); + } elseif (preg_match('/^(http:|https:|ftp:|mailto:)/', $url)) { + // URL + } else { + // external (local file) + $url = 'external:' . $url; + } + + $this->writeUrl($row - 1, Coordinate::columnIndexFromString($column) - 1, $url); + } + + $this->writeDataValidity(); + $this->writeSheetLayout(); + + // Write SHEETPROTECTION record + $this->writeSheetProtection(); + $this->writeRangeProtection(); + + $arrConditionalStyles = $phpSheet->getConditionalStylesCollection(); + if (!empty($arrConditionalStyles)) { + $arrConditional = []; + // @TODO CFRule & CFHeader + // Write CFHEADER record + $this->writeCFHeader(); + // Write ConditionalFormattingTable records + foreach ($arrConditionalStyles as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!isset($arrConditional[$conditional->getHashCode()])) { + // This hash code has been handled + $arrConditional[$conditional->getHashCode()] = true; + + // Write CFRULE record + $this->writeCFRule($conditional); + } + } + } + } + } + + $this->storeEof(); + } + + /** + * Write a cell range address in BIFF8 + * always fixed range + * See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format. + * + * @param string $range E.g. 'A1' or 'A1:B6' + * + * @return string Binary data + */ + private function writeBIFF8CellRangeAddressFixed($range) + { + $explodes = explode(':', $range); + + // extract first cell, e.g. 'A1' + $firstCell = $explodes[0]; + + // extract last cell, e.g. 'B6' + if (count($explodes) == 1) { + $lastCell = $firstCell; + } else { + $lastCell = $explodes[1]; + } + + $firstCellCoordinates = Coordinate::coordinateFromString($firstCell); // e.g. [0, 1] + $lastCellCoordinates = Coordinate::coordinateFromString($lastCell); // e.g. [1, 6] + + return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, Coordinate::columnIndexFromString($firstCellCoordinates[0]) - 1, Coordinate::columnIndexFromString($lastCellCoordinates[0]) - 1); + } + + /** + * Retrieves data from memory in one chunk, or from disk in $buffer + * sized chunks. + * + * @return string The data + */ + public function getData() + { + $buffer = 4096; + + // Return data stored in memory + if (isset($this->_data)) { + $tmp = $this->_data; + $this->_data = null; + + return $tmp; + } + + // No data to return + return false; + } + + /** + * Set the option to print the row and column headers on the printed page. + * + * @param int $print Whether to print the headers or not. Defaults to 1 (print). + */ + public function printRowColHeaders($print = 1): void + { + $this->printHeaders = $print; + } + + /** + * This method sets the properties for outlining and grouping. The defaults + * correspond to Excel's defaults. + * + * @param bool $visible + * @param bool $symbols_below + * @param bool $symbols_right + * @param bool $auto_style + */ + public function setOutline($visible = true, $symbols_below = true, $symbols_right = true, $auto_style = false): void + { + $this->outlineOn = $visible; + $this->outlineBelow = $symbols_below; + $this->outlineRight = $symbols_right; + $this->outlineStyle = $auto_style; + + // Ensure this is a boolean vale for Window2 + if ($this->outlineOn) { + $this->outlineOn = 1; + } + } + + /** + * Write a double to the specified row and column (zero indexed). + * An integer can be written as a double. Excel will display an + * integer. $format is optional. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param float $num The number to write + * @param mixed $xfIndex The optional XF format + * + * @return int + */ + private function writeNumber($row, $col, $num, $xfIndex) + { + $record = 0x0203; // Record identifier + $length = 0x000E; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $xl_double = pack('d', $num); + if (self::getByteOrder()) { // if it's Big Endian + $xl_double = strrev($xl_double); + } + + $this->append($header . $data . $xl_double); + + return 0; + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex Index to XF record + */ + private function writeString($row, $col, $str, $xfIndex): void + { + $this->writeLabelSst($row, $col, $str, $xfIndex); + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version + * It differs from writeString by the writing of rich text strings. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex The XF format index for the cell + * @param array $arrcRun Index to Font record and characters beginning + */ + private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun): void + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a string to the specified row and column (zero indexed). + * This is the BIFF8 version (no 255 chars limit). + * $format is optional. + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $str The string to write + * @param mixed $xfIndex The XF format index for the cell + */ + private function writeLabelSst($row, $col, $str, $xfIndex): void + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + + $str = StringHelper::UTF8toBIFF8UnicodeLong($str); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a blank cell to the specified row and column (zero indexed). + * A blank cell is used to specify formatting without adding a string + * or a number. + * + * A blank cell without a format serves no purpose. Therefore, we don't write + * a BLANK record unless a format is specified. + * + * Returns 0 : normal termination (including no format) + * -1 : insufficient number of arguments + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param mixed $xfIndex The XF format index + * + * @return int + */ + public function writeBlank($row, $col, $xfIndex) + { + $record = 0x0201; // Record identifier + $length = 0x0006; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $this->append($header . $data); + + return 0; + } + + /** + * Write a boolean or an error type to the specified row and column (zero indexed). + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param int $value + * @param bool $isError Error or Boolean? + * @param int $xfIndex + * + * @return int + */ + private function writeBoolErr($row, $col, $value, $isError, $xfIndex) + { + $record = 0x0205; + $length = 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError); + $this->append($header . $data); + + return 0; + } + + const WRITE_FORMULA_NORMAL = 0; + const WRITE_FORMULA_ERRORS = -1; + const WRITE_FORMULA_RANGE = -2; + const WRITE_FORMULA_EXCEPTION = -3; + + /** + * Write a formula to the specified row and column (zero indexed). + * The textual representation of the formula is passed to the parser in + * Parser.php which returns a packed binary string. + * + * Returns 0 : WRITE_FORMULA_NORMAL normal termination + * -1 : WRITE_FORMULA_ERRORS formula errors (bad formula) + * -2 : WRITE_FORMULA_RANGE row or column out of range + * -3 : WRITE_FORMULA_EXCEPTION parse raised exception, probably due to definedname + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $formula The formula text string + * @param mixed $xfIndex The XF format index + * @param mixed $calculatedValue Calculated value + * + * @return int + */ + private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue) + { + $record = 0x0006; // Record identifier + + // Initialize possible additional value for STRING record that should be written after the FORMULA record? + $stringValue = null; + + // calculated value + if (isset($calculatedValue)) { + // Since we can't yet get the data type of the calculated value, + // we use best effort to determine data type + if (is_bool($calculatedValue)) { + // Boolean value + $num = pack('CCCvCv', 0x01, 0x00, (int) $calculatedValue, 0x00, 0x00, 0xFFFF); + } elseif (is_int($calculatedValue) || is_float($calculatedValue)) { + // Numeric value + $num = pack('d', $calculatedValue); + } elseif (is_string($calculatedValue)) { + $errorCodes = DataType::getErrorCodes(); + if (isset($errorCodes[$calculatedValue])) { + // Error value + $num = pack('CCCvCv', 0x02, 0x00, self::mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF); + } elseif ($calculatedValue === '') { + // Empty string (and BIFF8) + $num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } else { + // Non-empty string value (or empty string BIFF5) + $stringValue = $calculatedValue; + $num = pack('CCCvCv', 0x00, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } + } else { + // We are really not supposed to reach here + $num = pack('d', 0x00); + } + } else { + $num = pack('d', 0x00); + } + + $grbit = 0x03; // Option flags + $unknown = 0x0000; // Must be zero + + // Strip the '=' or '@' sign at the beginning of the formula string + if ($formula[0] == '=') { + $formula = substr($formula, 1); + } else { + // Error handling + $this->writeString($row, $col, 'Unrecognised character for formula', 0); + + return self::WRITE_FORMULA_ERRORS; + } + + // Parse the formula using the parser in Parser.php + try { + $error = $this->parser->parse($formula); + $formula = $this->parser->toReversePolish(); + + $formlen = strlen($formula); // Length of the binary string + $length = 0x16 + $formlen; // Length of the record data + + $header = pack('vv', $record, $length); + + $data = pack('vvv', $row, $col, $xfIndex) + . $num + . pack('vVv', $grbit, $unknown, $formlen); + $this->append($header . $data . $formula); + + // Append also a STRING record if necessary + if ($stringValue !== null) { + $this->writeStringRecord($stringValue); + } + + return self::WRITE_FORMULA_NORMAL; + } catch (PhpSpreadsheetException $e) { + return self::WRITE_FORMULA_EXCEPTION; + } + } + + /** + * Write a STRING record. This. + * + * @param string $stringValue + */ + private function writeStringRecord($stringValue): void + { + $record = 0x0207; // Record identifier + $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + + /** + * Write a hyperlink. + * This is comprised of two elements: the visible label and + * the invisible link. The visible label is the same as the link unless an + * alternative string is specified. The label is written using the + * writeString() method. Therefore the 255 characters string limit applies. + * $string and $format are optional. + * + * The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external + * directory url. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * -3 : long string truncated to 255 chars + * + * @param int $row Row + * @param int $col Column + * @param string $url URL string + * + * @return int + */ + private function writeUrl($row, $col, $url) + { + // Add start row and col to arg list + return $this->writeUrlRange($row, $col, $row, $col, $url); + } + + /** + * This is the more general form of writeUrl(). It allows a hyperlink to be + * written to a range of cells. This function also decides the type of hyperlink + * to be written. These are either, Web (http, ftp, mailto), Internal + * (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1'). + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlRange($row1, $col1, $row2, $col2, $url) + { + // Check for internal/external sheet links or default to web link + if (preg_match('[^internal:]', $url)) { + return $this->writeUrlInternal($row1, $col1, $row2, $col2, $url); + } + if (preg_match('[^external:]', $url)) { + return $this->writeUrlExternal($row1, $col1, $row2, $col2, $url); + } + + return $this->writeUrlWeb($row1, $col1, $row2, $col2, $url); + } + + /** + * Used to write http, ftp and mailto hyperlinks. + * The link type ($options) is 0x03 is the same as absolute dir ref without + * sheet. However it is differentiated by the $unknown2 data stream. + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlWeb($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', 'E0C9EA79F9BACE118C8200AA004BA90B'); + + // Pack the option flags + $options = pack('V', 0x03); + + // Convert URL to a null terminated wchar string + $url = implode("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY)); + $url = $url . "\0\0\0"; + + // Pack the length of the URL + $url_len = pack('V', strlen($url)); + + // Calculate the data length + $length = 0x34 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url); + + return 0; + } + + /** + * Used to write internal reference hyperlinks such as "Sheet1!A1". + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlInternal($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type + $url = preg_replace('/^internal:/', '', $url); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + + // Pack the option flags + $options = pack('V', 0x08); + + // Convert the URL type and to a null terminated wchar string + $url .= "\0"; + + // character count + $url_len = StringHelper::countCharacters($url); + $url_len = pack('V', $url_len); + + $url = StringHelper::convertEncoding($url, 'UTF-16LE', 'UTF-8'); + + // Calculate the data length + $length = 0x24 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $url_len . $url); + + return 0; + } + + /** + * Write links to external directory names such as 'c:\foo.xls', + * c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'. + * + * Note: Excel writes some relative links with the $dir_long string. We ignore + * these cases for the sake of simpler code. + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + * + * @see writeUrl() + */ + public function writeUrlExternal($row1, $col1, $row2, $col2, $url) + { + // Network drives are different. We will handle them separately + // MS/Novell network drives and shares start with \\ + if (preg_match('[^external:\\\\]', $url)) { + return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format)); + } + + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type and change Unix dir separator to Dos style (if needed) + // + $url = preg_replace('/^external:/', '', $url); + $url = preg_replace('/\//', '\\', $url); + + // Determine if the link is relative or absolute: + // relative if link contains no dir separator, "somefile.xls" + // relative if link starts with up-dir, "..\..\somefile.xls" + // otherwise, absolute + + $absolute = 0x00; // relative path + if (preg_match('/^[A-Z]:/', $url)) { + $absolute = 0x02; // absolute path on Windows, e.g. C:\... + } + $link_type = 0x01 | $absolute; + + // Determine if the link contains a sheet reference and change some of the + // parameters accordingly. + // Split the dir name and sheet name (if it exists) + $dir_long = $url; + if (preg_match('/\\#/', $url)) { + $link_type |= 0x08; + } + + // Pack the link type + $link_type = pack('V', $link_type); + + // Calculate the up-level dir count e.g.. (..\..\..\ == 3) + $up_count = preg_match_all('/\\.\\.\\\\/', $dir_long, $useless); + $up_count = pack('v', $up_count); + + // Store the short dos dir name (null terminated) + $dir_short = preg_replace('/\\.\\.\\\\/', '', $dir_long) . "\0"; + + // Store the long dir name as a wchar string (non-null terminated) + $dir_long = $dir_long . "\0"; + + // Pack the lengths of the dir strings + $dir_short_len = pack('V', strlen($dir_short)); + $dir_long_len = pack('V', strlen($dir_long)); + $stream_len = pack('V', 0); //strlen($dir_long) + 0x06); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', '0303000000000000C000000000000046'); + $unknown3 = pack('H*', 'FFFFADDE000000000000000000000000000000000000000'); + $unknown4 = pack('v', 0x03); + + // Pack the main data stream + $data = pack('vvvv', $row1, $row2, $col1, $col2) . + $unknown1 . + $link_type . + $unknown2 . + $up_count . + $dir_short_len . + $dir_short . + $unknown3 . + $stream_len; /*. + $dir_long_len . + $unknown4 . + $dir_long . + $sheet_len . + $sheet ;*/ + + // Pack the header data + $length = strlen($data); + $header = pack('vv', $record, $length); + + // Write the packed data + $this->append($header . $data); + + return 0; + } + + /** + * This method is used to set the height and format for a row. + * + * @param int $row The row to set + * @param int $height Height we are giving to the row. + * Use null to set XF without setting height + * @param int $xfIndex The optional cell style Xf index to apply to the columns + * @param bool $hidden The optional hidden attribute + * @param int $level The optional outline level for row, in range [0,7] + */ + private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0): void + { + $record = 0x0208; // Record identifier + $length = 0x0010; // Number of bytes to follow + + $colMic = 0x0000; // First defined column + $colMac = 0x0000; // Last defined column + $irwMac = 0x0000; // Used by Excel to optimise loading + $reserved = 0x0000; // Reserved + $grbit = 0x0000; // Option flags + $ixfe = $xfIndex; + + if ($height < 0) { + $height = null; + } + + // Use writeRow($row, null, $XF) to set XF format without setting height + if ($height != null) { + $miyRw = $height * 20; // row height + } else { + $miyRw = 0xff; // default row height is 256 + } + + // Set the options flags. fUnsynced is used to show that the font and row + // heights are not compatible. This is usually the case for WriteExcel. + // The collapsed flag 0x10 doesn't seem to be used to indicate that a row + // is collapsed. Instead it is used to indicate that the previous row is + // collapsed. The zero height flag, 0x20, is used to collapse a row. + + $grbit |= $level; + if ($hidden) { + $grbit |= 0x0030; + } + if ($height !== null) { + $grbit |= 0x0040; // fUnsynced + } + if ($xfIndex !== 0xF) { + $grbit |= 0x0080; + } + $grbit |= 0x0100; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe); + $this->append($header . $data); + } + + /** + * Writes Excel DIMENSIONS to define the area in which there is data. + */ + private function writeDimensions(): void + { + $record = 0x0200; // Record identifier + + $length = 0x000E; + $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved + + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write BIFF record Window2. + */ + private function writeWindow2(): void + { + $record = 0x023E; // Record identifier + $length = 0x0012; + + $grbit = 0x00B6; // Option flags + $rwTop = 0x0000; // Top row visible in window + $colLeft = 0x0000; // Leftmost column visible in window + + // The options flags that comprise $grbit + $fDspFmla = 0; // 0 - bit + $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1 + $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2 + $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 + $fDspZeros = 1; // 4 + $fDefaultHdr = 1; // 5 + $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6 + $fDspGuts = $this->outlineOn; // 7 + $fFrozenNoSplit = 0; // 0 - bit + // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet + $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0; + $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW; + + $grbit = $fDspFmla; + $grbit |= $fDspGrid << 1; + $grbit |= $fDspRwCol << 2; + $grbit |= $fFrozen << 3; + $grbit |= $fDspZeros << 4; + $grbit |= $fDefaultHdr << 5; + $grbit |= $fArabic << 6; + $grbit |= $fDspGuts << 7; + $grbit |= $fFrozenNoSplit << 8; + $grbit |= $fSelected << 9; // Selected sheets. + $grbit |= $fSelected << 10; // Active sheet. + $grbit |= $fPageBreakPreview << 11; + + $header = pack('vv', $record, $length); + $data = pack('vvv', $grbit, $rwTop, $colLeft); + + // FIXME !!! + $rgbHdr = 0x0040; // Row/column heading and gridline color index + $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000); + $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal(); + + $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); + + $this->append($header . $data); + } + + /** + * Write BIFF record DEFAULTROWHEIGHT. + */ + private function writeDefaultRowHeight(): void + { + $defaultRowHeight = $this->phpSheet->getDefaultRowDimension()->getRowHeight(); + + if ($defaultRowHeight < 0) { + return; + } + + // convert to twips + $defaultRowHeight = (int) 20 * $defaultRowHeight; + + $record = 0x0225; // Record identifier + $length = 0x0004; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', 1, $defaultRowHeight); + $this->append($header . $data); + } + + /** + * Write BIFF record DEFCOLWIDTH if COLINFO records are in use. + */ + private function writeDefcol(): void + { + $defaultColWidth = 8; + + $record = 0x0055; // Record identifier + $length = 0x0002; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $defaultColWidth); + $this->append($header . $data); + } + + /** + * Write BIFF record COLINFO to define column widths. + * + * Note: The SDK says the record length is 0x0B but Excel writes a 0x0C + * length record. + * + * @param array $col_array This is the only parameter received and is composed of the following: + * 0 => First formatted column, + * 1 => Last formatted column, + * 2 => Col width (8.43 is Excel default), + * 3 => The optional XF format of the column, + * 4 => Option flags. + * 5 => Optional outline level + */ + private function writeColinfo($col_array): void + { + if (isset($col_array[0])) { + $colFirst = $col_array[0]; + } + if (isset($col_array[1])) { + $colLast = $col_array[1]; + } + if (isset($col_array[2])) { + $coldx = $col_array[2]; + } else { + $coldx = 8.43; + } + if (isset($col_array[3])) { + $xfIndex = $col_array[3]; + } else { + $xfIndex = 15; + } + if (isset($col_array[4])) { + $grbit = $col_array[4]; + } else { + $grbit = 0; + } + if (isset($col_array[5])) { + $level = $col_array[5]; + } else { + $level = 0; + } + $record = 0x007D; // Record identifier + $length = 0x000C; // Number of bytes to follow + + $coldx *= 256; // Convert to units of 1/256 of a char + + $ixfe = $xfIndex; + $reserved = 0x0000; // Reserved + + $level = max(0, min($level, 7)); + $grbit |= $level << 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved); + $this->append($header . $data); + } + + /** + * Write BIFF record SELECTION. + */ + private function writeSelection(): void + { + // look up the selected cell range + $selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells()); + $selectedCells = $selectedCells[0]; + if (count($selectedCells) == 2) { + [$first, $last] = $selectedCells; + } else { + $first = $selectedCells[0]; + $last = $selectedCells[0]; + } + + [$colFirst, $rwFirst] = Coordinate::coordinateFromString($first); + $colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index + --$rwFirst; // base 0 row index + + [$colLast, $rwLast] = Coordinate::coordinateFromString($last); + $colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index + --$rwLast; // base 0 row index + + // make sure we are not out of bounds + $colFirst = min($colFirst, 255); + $colLast = min($colLast, 255); + + $rwFirst = min($rwFirst, 65535); + $rwLast = min($rwLast, 65535); + + $record = 0x001D; // Record identifier + $length = 0x000F; // Number of bytes to follow + + $pnn = $this->activePane; // Pane position + $rwAct = $rwFirst; // Active row + $colAct = $colFirst; // Active column + $irefAct = 0; // Active cell ref + $cref = 1; // Number of refs + + if (!isset($rwLast)) { + $rwLast = $rwFirst; // Last row in reference + } + if (!isset($colLast)) { + $colLast = $colFirst; // Last col in reference + } + + // Swap last row/col for first row/col as necessary + if ($rwFirst > $rwLast) { + [$rwFirst, $rwLast] = [$rwLast, $rwFirst]; + } + + if ($colFirst > $colLast) { + [$colFirst, $colLast] = [$colLast, $colFirst]; + } + + $header = pack('vv', $record, $length); + $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast); + $this->append($header . $data); + } + + /** + * Store the MERGEDCELLS records for all ranges of merged cells. + */ + private function writeMergedCells(): void + { + $mergeCells = $this->phpSheet->getMergeCells(); + $countMergeCells = count($mergeCells); + + if ($countMergeCells == 0) { + return; + } + + // maximum allowed number of merged cells per record + $maxCountMergeCellsPerRecord = 1027; + + // record identifier + $record = 0x00E5; + + // counter for total number of merged cells treated so far by the writer + $i = 0; + + // counter for number of merged cells written in record currently being written + $j = 0; + + // initialize record data + $recordData = ''; + + // loop through the merged cells + foreach ($mergeCells as $mergeCell) { + ++$i; + ++$j; + + // extract the row and column indexes + $range = Coordinate::splitRange($mergeCell); + [$first, $last] = $range[0]; + [$firstColumn, $firstRow] = Coordinate::coordinateFromString($first); + [$lastColumn, $lastRow] = Coordinate::coordinateFromString($last); + + $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, Coordinate::columnIndexFromString($firstColumn) - 1, Coordinate::columnIndexFromString($lastColumn) - 1); + + // flush record if we have reached limit for number of merged cells, or reached final merged cell + if ($j == $maxCountMergeCellsPerRecord || $i == $countMergeCells) { + $recordData = pack('v', $j) . $recordData; + $length = strlen($recordData); + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + + // initialize for next record, if any + $recordData = ''; + $j = 0; + } + } + } + + /** + * Write SHEETLAYOUT record. + */ + private function writeSheetLayout(): void + { + if (!$this->phpSheet->isTabColorSet()) { + return; + } + + $recordData = pack( + 'vvVVVvv', + 0x0862, + 0x0000, // unused + 0x00000000, // unused + 0x00000000, // unused + 0x00000014, // size of record data + $this->colors[$this->phpSheet->getTabColor()->getRGB()], // color index + 0x0000 // unused + ); + + $length = strlen($recordData); + + $record = 0x0862; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + + /** + * Write SHEETPROTECTION. + */ + private function writeSheetProtection(): void + { + // record identifier + $record = 0x0867; + + // prepare options + $options = (int) !$this->phpSheet->getProtection()->getObjects() + | (int) !$this->phpSheet->getProtection()->getScenarios() << 1 + | (int) !$this->phpSheet->getProtection()->getFormatCells() << 2 + | (int) !$this->phpSheet->getProtection()->getFormatColumns() << 3 + | (int) !$this->phpSheet->getProtection()->getFormatRows() << 4 + | (int) !$this->phpSheet->getProtection()->getInsertColumns() << 5 + | (int) !$this->phpSheet->getProtection()->getInsertRows() << 6 + | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks() << 7 + | (int) !$this->phpSheet->getProtection()->getDeleteColumns() << 8 + | (int) !$this->phpSheet->getProtection()->getDeleteRows() << 9 + | (int) !$this->phpSheet->getProtection()->getSelectLockedCells() << 10 + | (int) !$this->phpSheet->getProtection()->getSort() << 11 + | (int) !$this->phpSheet->getProtection()->getAutoFilter() << 12 + | (int) !$this->phpSheet->getProtection()->getPivotTables() << 13 + | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14; + + // record data + $recordData = pack( + 'vVVCVVvv', + 0x0867, // repeated record identifier + 0x0000, // not used + 0x0000, // not used + 0x00, // not used + 0x01000200, // unknown data + 0xFFFFFFFF, // unknown data + $options, // options + 0x0000 // not used + ); + + $length = strlen($recordData); + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Write BIFF record RANGEPROTECTION. + * + * Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records + * Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records + */ + private function writeRangeProtection(): void + { + foreach ($this->phpSheet->getProtectedCells() as $range => $password) { + // number of ranges, e.g. 'A1:B3 C20:D25' + $cellRanges = explode(' ', $range); + $cref = count($cellRanges); + + $recordData = pack( + 'vvVVvCVvVv', + 0x0868, + 0x00, + 0x0000, + 0x0000, + 0x02, + 0x0, + 0x0000, + $cref, + 0x0000, + 0x00 + ); + + foreach ($cellRanges as $cellRange) { + $recordData .= $this->writeBIFF8CellRangeAddressFixed($cellRange); + } + + // the rgbFeat structure + $recordData .= pack( + 'VV', + 0x0000, + hexdec($password) + ); + + $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData)); + + $length = strlen($recordData); + + $record = 0x0868; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + } + + /** + * Writes the Excel BIFF PANE record. + * The panes can either be frozen or thawed (unfrozen). + * Frozen panes are specified in terms of an integer number of rows and columns. + * Thawed panes are specified in terms of Excel's units for rows and columns. + */ + private function writePanes(): void + { + $panes = []; + if ($this->phpSheet->getFreezePane()) { + [$column, $row] = Coordinate::coordinateFromString($this->phpSheet->getFreezePane()); + $panes[0] = Coordinate::columnIndexFromString($column) - 1; + $panes[1] = $row - 1; + + [$leftMostColumn, $topRow] = Coordinate::coordinateFromString($this->phpSheet->getTopLeftCell()); + //Coordinates are zero-based in xls files + $panes[2] = $topRow - 1; + $panes[3] = Coordinate::columnIndexFromString($leftMostColumn) - 1; + } else { + // thaw panes + return; + } + + $x = $panes[0] ?? null; + $y = $panes[1] ?? null; + $rwTop = $panes[2] ?? null; + $colLeft = $panes[3] ?? null; + if (count($panes) > 4) { // if Active pane was received + $pnnAct = $panes[4]; + } else { + $pnnAct = null; + } + $record = 0x0041; // Record identifier + $length = 0x000A; // Number of bytes to follow + + // Code specific to frozen or thawed panes. + if ($this->phpSheet->getFreezePane()) { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = $y; + } + if (!isset($colLeft)) { + $colLeft = $x; + } + } else { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = 0; + } + if (!isset($colLeft)) { + $colLeft = 0; + } + + // Convert Excel's row and column units to the internal units. + // The default row height is 12.75 + // The default column width is 8.43 + // The following slope and intersection values were interpolated. + // + $y = 20 * $y + 255; + $x = 113.879 * $x + 390; + } + + // Determine which pane should be active. There is also the undocumented + // option to override this should it be necessary: may be removed later. + // + if (!isset($pnnAct)) { + if ($x != 0 && $y != 0) { + $pnnAct = 0; // Bottom right + } + if ($x != 0 && $y == 0) { + $pnnAct = 1; // Top right + } + if ($x == 0 && $y != 0) { + $pnnAct = 2; // Bottom left + } + if ($x == 0 && $y == 0) { + $pnnAct = 3; // Top left + } + } + + $this->activePane = $pnnAct; // Used in writeSelection + + $header = pack('vv', $record, $length); + $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct); + $this->append($header . $data); + } + + /** + * Store the page setup SETUP BIFF record. + */ + private function writeSetup(): void + { + $record = 0x00A1; // Record identifier + $length = 0x0022; // Number of bytes to follow + + $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size + + $iScale = $this->phpSheet->getPageSetup()->getScale() ? + $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor + + $iPageStart = 0x01; // Starting page number + $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide + $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high + $grbit = 0x00; // Option flags + $iRes = 0x0258; // Print resolution + $iVRes = 0x0258; // Vertical print resolution + + $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin + + $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin + $iCopies = 0x01; // Number of copies + + $fLeftToRight = 0x0; // Print over then down + + // Page orientation + $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) ? + 0x0 : 0x1; + + $fNoPls = 0x0; // Setup not read from printer + $fNoColor = 0x0; // Print black and white + $fDraft = 0x0; // Print draft quality + $fNotes = 0x0; // Print notes + $fNoOrient = 0x0; // Orientation not set + $fUsePage = 0x0; // Use custom starting page + + $grbit = $fLeftToRight; + $grbit |= $fLandscape << 1; + $grbit |= $fNoPls << 2; + $grbit |= $fNoColor << 3; + $grbit |= $fDraft << 4; + $grbit |= $fNotes << 5; + $grbit |= $fNoOrient << 6; + $grbit |= $fUsePage << 7; + + $numHdr = pack('d', $numHdr); + $numFtr = pack('d', $numFtr); + if (self::getByteOrder()) { // if it's Big Endian + $numHdr = strrev($numHdr); + $numFtr = strrev($numFtr); + } + + $header = pack('vv', $record, $length); + $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes); + $data2 = $numHdr . $numFtr; + $data3 = pack('v', $iCopies); + $this->append($header . $data1 . $data2 . $data3); + } + + /** + * Store the header caption BIFF record. + */ + private function writeHeader(): void + { + $record = 0x0014; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the footer caption BIFF record. + */ + private function writeFooter(): void + { + $record = 0x0015; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the horizontal centering HCENTER BIFF record. + */ + private function writeHcenter(): void + { + $record = 0x0083; // Record identifier + $length = 0x0002; // Bytes to follow + + $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fHCenter); + + $this->append($header . $data); + } + + /** + * Store the vertical centering VCENTER BIFF record. + */ + private function writeVcenter(): void + { + $record = 0x0084; // Record identifier + $length = 0x0002; // Bytes to follow + + $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fVCenter); + $this->append($header . $data); + } + + /** + * Store the LEFTMARGIN BIFF record. + */ + private function writeMarginLeft(): void + { + $record = 0x0026; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the RIGHTMARGIN BIFF record. + */ + private function writeMarginRight(): void + { + $record = 0x0027; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the TOPMARGIN BIFF record. + */ + private function writeMarginTop(): void + { + $record = 0x0028; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the BOTTOMMARGIN BIFF record. + */ + private function writeMarginBottom(): void + { + $record = 0x0029; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Write the PRINTHEADERS BIFF record. + */ + private function writePrintHeaders(): void + { + $record = 0x002a; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintRwCol = $this->printHeaders; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintRwCol); + $this->append($header . $data); + } + + /** + * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the + * GRIDSET record. + */ + private function writePrintGridlines(): void + { + $record = 0x002b; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintGrid); + $this->append($header . $data); + } + + /** + * Write the GRIDSET BIFF record. Must be used in conjunction with the + * PRINTGRIDLINES record. + */ + private function writeGridset(): void + { + $record = 0x0082; // Record identifier + $length = 0x0002; // Bytes to follow + + $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fGridSet); + $this->append($header . $data); + } + + /** + * Write the AUTOFILTERINFO BIFF record. This is used to configure the number of autofilter select used in the sheet. + */ + private function writeAutoFilterInfo(): void + { + $record = 0x009D; // Record identifier + $length = 0x0002; // Bytes to follow + + $rangeBounds = Coordinate::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange()); + $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0]; + + $header = pack('vv', $record, $length); + $data = pack('v', $iNumFilters); + $this->append($header . $data); + } + + /** + * Write the GUTS BIFF record. This is used to configure the gutter margins + * where Excel outline symbols are displayed. The visibility of the gutters is + * controlled by a flag in WSBOOL. + * + * @see writeWsbool() + */ + private function writeGuts(): void + { + $record = 0x0080; // Record identifier + $length = 0x0008; // Bytes to follow + + $dxRwGut = 0x0000; // Size of row gutter + $dxColGut = 0x0000; // Size of col gutter + + // determine maximum row outline level + $maxRowOutlineLevel = 0; + foreach ($this->phpSheet->getRowDimensions() as $rowDimension) { + $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel()); + } + + $col_level = 0; + + // Calculate the maximum column outline level. The equivalent calculation + // for the row outline level is carried out in writeRow(). + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $col_level = max($this->columnInfo[$i][5], $col_level); + } + + // Set the limits for the outline levels (0 <= x <= 7). + $col_level = max(0, min($col_level, 7)); + + // The displayed level is one greater than the max outline levels + if ($maxRowOutlineLevel) { + ++$maxRowOutlineLevel; + } + if ($col_level) { + ++$col_level; + } + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level); + + $this->append($header . $data); + } + + /** + * Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction + * with the SETUP record. + */ + private function writeWsbool(): void + { + $record = 0x0081; // Record identifier + $length = 0x0002; // Bytes to follow + $grbit = 0x0000; + + // The only option that is of interest is the flag for fit to page. So we + // set all the options in one go. + // + // Set the option flags + $grbit |= 0x0001; // Auto page breaks visible + if ($this->outlineStyle) { + $grbit |= 0x0020; // Auto outline styles + } + if ($this->phpSheet->getShowSummaryBelow()) { + $grbit |= 0x0040; // Outline summary below + } + if ($this->phpSheet->getShowSummaryRight()) { + $grbit |= 0x0080; // Outline summary right + } + if ($this->phpSheet->getPageSetup()->getFitToPage()) { + $grbit |= 0x0100; // Page setup fit to page + } + if ($this->outlineOn) { + $grbit |= 0x0400; // Outline symbols displayed + } + + $header = pack('vv', $record, $length); + $data = pack('v', $grbit); + $this->append($header . $data); + } + + /** + * Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records. + */ + private function writeBreaks(): void + { + // initialize + $vbreaks = []; + $hbreaks = []; + + foreach ($this->phpSheet->getBreaks() as $cell => $breakType) { + // Fetch coordinates + $coordinates = Coordinate::coordinateFromString($cell); + + // Decide what to do by the type of break + switch ($breakType) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_COLUMN: + // Add to list of vertical breaks + $vbreaks[] = Coordinate::columnIndexFromString($coordinates[0]) - 1; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_ROW: + // Add to list of horizontal breaks + $hbreaks[] = $coordinates[1]; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_NONE: + default: + // Nothing to do + break; + } + } + + //horizontal page breaks + if (!empty($hbreaks)) { + // Sort and filter array of page breaks + sort($hbreaks, SORT_NUMERIC); + if ($hbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($hbreaks); + } + + $record = 0x001b; // Record identifier + $cbrk = count($hbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($hbreaks as $hbreak) { + $data .= pack('vvv', $hbreak, 0x0000, 0x00ff); + } + + $this->append($header . $data); + } + + // vertical page breaks + if (!empty($vbreaks)) { + // 1000 vertical pagebreaks appears to be an internal Excel 5 limit. + // It is slightly higher in Excel 97/200, approx. 1026 + $vbreaks = array_slice($vbreaks, 0, 1000); + + // Sort and filter array of page breaks + sort($vbreaks, SORT_NUMERIC); + if ($vbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($vbreaks); + } + + $record = 0x001a; // Record identifier + $cbrk = count($vbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($vbreaks as $vbreak) { + $data .= pack('vvv', $vbreak, 0x0000, 0xffff); + } + + $this->append($header . $data); + } + } + + /** + * Set the Biff PROTECT record to indicate that the worksheet is protected. + */ + private function writeProtect(): void + { + // Exit unless sheet protection has been specified + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + $record = 0x0012; // Record identifier + $length = 0x0002; // Bytes to follow + + $fLock = 1; // Worksheet is protected + + $header = pack('vv', $record, $length); + $data = pack('v', $fLock); + + $this->append($header . $data); + } + + /** + * Write SCENPROTECT. + */ + private function writeScenProtect(): void + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if scenarios are not protected + if (!$this->phpSheet->getProtection()->getScenarios()) { + return; + } + + $record = 0x00DD; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write OBJECTPROTECT. + */ + private function writeObjectProtect(): void + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if objects are not protected + if (!$this->phpSheet->getProtection()->getObjects()) { + return; + } + + $record = 0x0063; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write the worksheet PASSWORD record. + */ + private function writePassword(): void + { + // Exit unless sheet protection and password have been specified + if (!$this->phpSheet->getProtection()->getSheet() || !$this->phpSheet->getProtection()->getPassword()) { + return; + } + + $record = 0x0013; // Record identifier + $length = 0x0002; // Bytes to follow + + $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password + + $header = pack('vv', $record, $length); + $data = pack('v', $wPassword); + + $this->append($header . $data); + } + + /** + * Insert a 24bit bitmap image in a worksheet. + * + * @param int $row The row we are going to insert the bitmap into + * @param int $col The column we are going to insert the bitmap into + * @param mixed $bitmap The bitmap filename or GD-image resource + * @param int $x the horizontal position (offset) of the image inside the cell + * @param int $y the vertical position (offset) of the image inside the cell + * @param float $scale_x The horizontal scale + * @param float $scale_y The vertical scale + */ + public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1): void + { + $bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap)); + [$width, $height, $size, $data] = $bitmap_array; + + // Scale the frame of the image. + $width *= $scale_x; + $height *= $scale_y; + + // Calculate the vertices of the image and write the OBJ record + $this->positionImage($col, $row, $x, $y, $width, $height); + + // Write the IMDATA record to store the bitmap data + $record = 0x007f; + $length = 8 + $size; + $cf = 0x09; + $env = 0x01; + $lcb = $size; + + $header = pack('vvvvV', $record, $length, $cf, $env, $lcb); + $this->append($header . $data); + } + + /** + * Calculate the vertices that define the position of the image as required by + * the OBJ record. + * + * +------------+------------+ + * | A | B | + * +-----+------------+------------+ + * | |(x1,y1) | | + * | 1 |(A1)._______|______ | + * | | | | | + * | | | | | + * +-----+----| BITMAP |-----+ + * | | | | | + * | 2 | |______________. | + * | | | (B2)| + * | | | (x2,y2)| + * +---- +------------+------------+ + * + * Example of a bitmap that covers some of the area from cell A1 to cell B2. + * + * Based on the width and height of the bitmap we need to calculate 8 vars: + * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. + * The width and height of the cells are also variable and have to be taken into + * account. + * The values of $col_start and $row_start are passed in from the calling + * function. The values of $col_end and $row_end are calculated by subtracting + * the width and height of the bitmap from the width and height of the + * underlying cells. + * The vertices are expressed as a percentage of the underlying cell width as + * follows (rhs values are in pixels): + * + * x1 = X / W *1024 + * y1 = Y / H *256 + * x2 = (X-1) / W *1024 + * y2 = (Y-1) / H *256 + * + * Where: X is distance from the left side of the underlying cell + * Y is distance from the top of the underlying cell + * W is the width of the cell + * H is the height of the cell + * The SDK incorrectly states that the height should be expressed as a + * percentage of 1024. + * + * @param int $col_start Col containing upper left corner of object + * @param int $row_start Row containing top left corner of object + * @param int $x1 Distance to left side of object + * @param int $y1 Distance to top of object + * @param int $width Width of image frame + * @param int $height Height of image frame + */ + public function positionImage($col_start, $row_start, $x1, $y1, $width, $height): void + { + // Initialise end cell to the same as the start cell + $col_end = $col_start; // Col containing lower right corner of object + $row_end = $row_start; // Row containing bottom right corner of object + + // Zero the specified offset if greater than the cell dimensions + if ($x1 >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1))) { + $x1 = 0; + } + if ($y1 >= Xls::sizeRow($this->phpSheet, $row_start + 1)) { + $y1 = 0; + } + + $width = $width + $x1 - 1; + $height = $height + $y1 - 1; + + // Subtract the underlying cell widths to find the end cell of the image + while ($width >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1))) { + $width -= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)); + ++$col_end; + } + + // Subtract the underlying cell heights to find the end cell of the image + while ($height >= Xls::sizeRow($this->phpSheet, $row_end + 1)) { + $height -= Xls::sizeRow($this->phpSheet, $row_end + 1); + ++$row_end; + } + + // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell + // with zero eight or width. + // + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) == 0) { + return; + } + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_start + 1) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_end + 1) == 0) { + return; + } + + // Convert the pixel values to the percentage value expected by Excel + $x1 = $x1 / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) * 1024; + $y1 = $y1 / Xls::sizeRow($this->phpSheet, $row_start + 1) * 256; + $x2 = $width / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) * 1024; // Distance to right side of object + $y2 = $height / Xls::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object + + $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2); + } + + /** + * Store the OBJ record that precedes an IMDATA record. This could be generalise + * to support other Excel objects. + * + * @param int $colL Column containing upper left corner of object + * @param int $dxL Distance from left side of cell + * @param int $rwT Row containing top left corner of object + * @param int $dyT Distance from top of cell + * @param int $colR Column containing lower right corner of object + * @param int $dxR Distance from right of cell + * @param int $rwB Row containing bottom right corner of object + * @param int $dyB Distance from bottom of cell + */ + private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB): void + { + $record = 0x005d; // Record identifier + $length = 0x003c; // Bytes to follow + + $cObj = 0x0001; // Count of objects in file (set to 1) + $OT = 0x0008; // Object type. 8 = Picture + $id = 0x0001; // Object ID + $grbit = 0x0614; // Option flags + + $cbMacro = 0x0000; // Length of FMLA structure + $Reserved1 = 0x0000; // Reserved + $Reserved2 = 0x0000; // Reserved + + $icvBack = 0x09; // Background colour + $icvFore = 0x09; // Foreground colour + $fls = 0x00; // Fill pattern + $fAuto = 0x00; // Automatic fill + $icv = 0x08; // Line colour + $lns = 0xff; // Line style + $lnw = 0x01; // Line weight + $fAutoB = 0x00; // Automatic border + $frs = 0x0000; // Frame style + $cf = 0x0009; // Image format, 9 = bitmap + $Reserved3 = 0x0000; // Reserved + $cbPictFmla = 0x0000; // Length of FMLA structure + $Reserved4 = 0x0000; // Reserved + $grbit2 = 0x0001; // Option flags + $Reserved5 = 0x0000; // Reserved + + $header = pack('vv', $record, $length); + $data = pack('V', $cObj); + $data .= pack('v', $OT); + $data .= pack('v', $id); + $data .= pack('v', $grbit); + $data .= pack('v', $colL); + $data .= pack('v', $dxL); + $data .= pack('v', $rwT); + $data .= pack('v', $dyT); + $data .= pack('v', $colR); + $data .= pack('v', $dxR); + $data .= pack('v', $rwB); + $data .= pack('v', $dyB); + $data .= pack('v', $cbMacro); + $data .= pack('V', $Reserved1); + $data .= pack('v', $Reserved2); + $data .= pack('C', $icvBack); + $data .= pack('C', $icvFore); + $data .= pack('C', $fls); + $data .= pack('C', $fAuto); + $data .= pack('C', $icv); + $data .= pack('C', $lns); + $data .= pack('C', $lnw); + $data .= pack('C', $fAutoB); + $data .= pack('v', $frs); + $data .= pack('V', $cf); + $data .= pack('v', $Reserved3); + $data .= pack('v', $cbPictFmla); + $data .= pack('v', $Reserved4); + $data .= pack('v', $grbit2); + $data .= pack('V', $Reserved5); + + $this->append($header . $data); + } + + /** + * Convert a GD-image into the internal format. + * + * @param resource $image The image to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmapGd($image) + { + $width = imagesx($image); + $height = imagesy($image); + + $data = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + for ($j = $height; --$j;) { + for ($i = 0; $i < $width; ++$i) { + $color = imagecolorsforindex($image, imagecolorat($image, $i, $j)); + foreach (['red', 'green', 'blue'] as $key) { + $color[$key] = $color[$key] + round((255 - $color[$key]) * $color['alpha'] / 127); + } + $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']); + } + if (3 * $width % 4) { + $data .= str_repeat("\x00", 4 - 3 * $width % 4); + } + } + + return [$width, $height, strlen($data), $data]; + } + + /** + * Convert a 24 bit bitmap into the modified internal format used by Windows. + * This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the + * MSDN library. + * + * @param string $bitmap The bitmap to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmap($bitmap) + { + // Open file. + $bmp_fd = @fopen($bitmap, 'rb'); + if (!$bmp_fd) { + throw new WriterException("Couldn't import $bitmap"); + } + + // Slurp the file into a string. + $data = fread($bmp_fd, filesize($bitmap)); + + // Check that the file is big enough to be a bitmap. + if (strlen($data) <= 0x36) { + throw new WriterException("$bitmap doesn't contain enough data.\n"); + } + + // The first 2 bytes are used to identify the bitmap. + $identity = unpack('A2ident', $data); + if ($identity['ident'] != 'BM') { + throw new WriterException("$bitmap doesn't appear to be a valid bitmap image.\n"); + } + + // Remove bitmap data: ID. + $data = substr($data, 2); + + // Read and remove the bitmap size. This is more reliable than reading + // the data size at offset 0x22. + // + $size_array = unpack('Vsa', substr($data, 0, 4)); + $size = $size_array['sa']; + $data = substr($data, 4); + $size -= 0x36; // Subtract size of bitmap header. + $size += 0x0C; // Add size of BIFF header. + + // Remove bitmap data: reserved, offset, header length. + $data = substr($data, 12); + + // Read and remove the bitmap width and height. Verify the sizes. + $width_and_height = unpack('V2', substr($data, 0, 8)); + $width = $width_and_height[1]; + $height = $width_and_height[2]; + $data = substr($data, 8); + if ($width > 0xFFFF) { + throw new WriterException("$bitmap: largest image width supported is 65k.\n"); + } + if ($height > 0xFFFF) { + throw new WriterException("$bitmap: largest image height supported is 65k.\n"); + } + + // Read and remove the bitmap planes and bpp data. Verify them. + $planes_and_bitcount = unpack('v2', substr($data, 0, 4)); + $data = substr($data, 4); + if ($planes_and_bitcount[2] != 24) { // Bitcount + throw new WriterException("$bitmap isn't a 24bit true color bitmap.\n"); + } + if ($planes_and_bitcount[1] != 1) { + throw new WriterException("$bitmap: only 1 plane supported in bitmap image.\n"); + } + + // Read and remove the bitmap compression. Verify compression. + $compression = unpack('Vcomp', substr($data, 0, 4)); + $data = substr($data, 4); + + if ($compression['comp'] != 0) { + throw new WriterException("$bitmap: compression not supported in bitmap image.\n"); + } + + // Remove bitmap data: data size, hres, vres, colours, imp. colours. + $data = substr($data, 20); + + // Add the BITMAPCOREHEADER data + $header = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + $data = $header . $data; + + return [$width, $height, $size, $data]; + } + + /** + * Store the window zoom factor. This should be a reduced fraction but for + * simplicity we will store all fractions with a numerator of 100. + */ + private function writeZoom(): void + { + // If scale is 100 we don't need to write a record + if ($this->phpSheet->getSheetView()->getZoomScale() == 100) { + return; + } + + $record = 0x00A0; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100); + $this->append($header . $data); + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(?\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null): void + { + $this->escher = $pValue; + } + + /** + * Write MSODRAWING record. + */ + private function writeMsoDrawing(): void + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + // write the neccesary MSODRAWING, OBJ records + + // split the Escher stream + $spOffsets[0] = 0; + $nm = count($spOffsets) - 1; // number of shapes excluding first shape + for ($i = 1; $i <= $nm; ++$i) { + // MSODRAWING record + $record = 0x00EC; // Record identifier + + // chunk of Escher stream for one shape + $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]); + + $length = strlen($dataChunk); + $header = pack('vv', $record, $length); + + $this->append($header . $dataChunk); + + // OBJ record + $record = 0x005D; // record identifier + $objData = ''; + + // ftCmo + if ($spTypes[$i] == 0x00C9) { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0014, // object type, 0x0014 = filter + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x2101, // option flags, 0x2001 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + + // Add ftSbs Scroll bar subobject + $objData .= pack('vv', 0x00C, 0x0014); + $objData .= pack('H*', '0000000000000000640001000A00000010000100'); + // Add ftLbsData (List box data) subobject + $objData .= pack('vv', 0x0013, 0x1FEE); + $objData .= pack('H*', '00000000010001030000020008005700'); + } else { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0008, // object type, 0x0008 = picture + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x6011, // option flags, 0x6011 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + } + + // ftEnd + $objData .= + pack( + 'vv', + 0x0000, // 0x0000 = ftEnd + 0x0000 // length of ftEnd data + ); + + $length = strlen($objData); + $header = pack('vv', $record, $length); + $this->append($header . $objData); + } + } + } + + /** + * Store the DATAVALIDATIONS and DATAVALIDATION records. + */ + private function writeDataValidity(): void + { + // Datavalidation collection + $dataValidationCollection = $this->phpSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + // DATAVALIDATIONS record + $record = 0x01B2; // Record identifier + $length = 0x0012; // Bytes to follow + + $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records + $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position + $verPos = 0x00000000; // Vertical position of prompt box, if fixed position + $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible + + $header = pack('vv', $record, $length); + $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); + $this->append($header . $data); + + // DATAVALIDATION records + $record = 0x01BE; // Record identifier + + foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) { + // initialize record data + $data = ''; + + // options + $options = 0x00000000; + + // data type + $type = 0x00; + switch ($dataValidation->getType()) { + case DataValidation::TYPE_NONE: + $type = 0x00; + + break; + case DataValidation::TYPE_WHOLE: + $type = 0x01; + + break; + case DataValidation::TYPE_DECIMAL: + $type = 0x02; + + break; + case DataValidation::TYPE_LIST: + $type = 0x03; + + break; + case DataValidation::TYPE_DATE: + $type = 0x04; + + break; + case DataValidation::TYPE_TIME: + $type = 0x05; + + break; + case DataValidation::TYPE_TEXTLENGTH: + $type = 0x06; + + break; + case DataValidation::TYPE_CUSTOM: + $type = 0x07; + + break; + } + + $options |= $type << 0; + + // error style + $errorStyle = 0x00; + switch ($dataValidation->getErrorStyle()) { + case DataValidation::STYLE_STOP: + $errorStyle = 0x00; + + break; + case DataValidation::STYLE_WARNING: + $errorStyle = 0x01; + + break; + case DataValidation::STYLE_INFORMATION: + $errorStyle = 0x02; + + break; + } + + $options |= $errorStyle << 4; + + // explicit formula? + if ($type == 0x03 && preg_match('/^\".*\"$/', $dataValidation->getFormula1())) { + $options |= 0x01 << 7; + } + + // empty cells allowed + $options |= $dataValidation->getAllowBlank() << 8; + + // show drop down + $options |= (!$dataValidation->getShowDropDown()) << 9; + + // show input message + $options |= $dataValidation->getShowInputMessage() << 18; + + // show error message + $options |= $dataValidation->getShowErrorMessage() << 19; + + // condition operator + $operator = 0x00; + switch ($dataValidation->getOperator()) { + case DataValidation::OPERATOR_BETWEEN: + $operator = 0x00; + + break; + case DataValidation::OPERATOR_NOTBETWEEN: + $operator = 0x01; + + break; + case DataValidation::OPERATOR_EQUAL: + $operator = 0x02; + + break; + case DataValidation::OPERATOR_NOTEQUAL: + $operator = 0x03; + + break; + case DataValidation::OPERATOR_GREATERTHAN: + $operator = 0x04; + + break; + case DataValidation::OPERATOR_LESSTHAN: + $operator = 0x05; + + break; + case DataValidation::OPERATOR_GREATERTHANOREQUAL: + $operator = 0x06; + + break; + case DataValidation::OPERATOR_LESSTHANOREQUAL: + $operator = 0x07; + + break; + } + + $options |= $operator << 20; + + $data = pack('V', $options); + + // prompt title + $promptTitle = $dataValidation->getPromptTitle() !== '' ? + $dataValidation->getPromptTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($promptTitle); + + // error title + $errorTitle = $dataValidation->getErrorTitle() !== '' ? + $dataValidation->getErrorTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($errorTitle); + + // prompt text + $prompt = $dataValidation->getPrompt() !== '' ? + $dataValidation->getPrompt() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($prompt); + + // error text + $error = $dataValidation->getError() !== '' ? + $dataValidation->getError() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($error); + + // formula 1 + try { + $formula1 = $dataValidation->getFormula1(); + if ($type == 0x03) { // list type + $formula1 = str_replace(',', chr(0), $formula1); + } + $this->parser->parse($formula1); + $formula1 = $this->parser->toReversePolish(); + $sz1 = strlen($formula1); + } catch (PhpSpreadsheetException $e) { + $sz1 = 0; + $formula1 = ''; + } + $data .= pack('vv', $sz1, 0x0000); + $data .= $formula1; + + // formula 2 + try { + $formula2 = $dataValidation->getFormula2(); + if ($formula2 === '') { + throw new WriterException('No formula2'); + } + $this->parser->parse($formula2); + $formula2 = $this->parser->toReversePolish(); + $sz2 = strlen($formula2); + } catch (PhpSpreadsheetException $e) { + $sz2 = 0; + $formula2 = ''; + } + $data .= pack('vv', $sz2, 0x0000); + $data .= $formula2; + + // cell range address list + $data .= pack('v', 0x0001); + $data .= $this->writeBIFF8CellRangeAddressFixed($cellCoordinate); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + } + } + + /** + * Map Error code. + * + * @param string $errorCode + * + * @return int + */ + private static function mapErrorCode($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return 0x00; + case '#DIV/0!': + return 0x07; + case '#VALUE!': + return 0x0F; + case '#REF!': + return 0x17; + case '#NAME?': + return 0x1D; + case '#NUM!': + return 0x24; + case '#N/A': + return 0x2A; + } + + return 0; + } + + /** + * Write PLV Record. + */ + private function writePageLayoutView(): void + { + $record = 0x088B; // Record identifier + $length = 0x0010; // Bytes to follow + + $rt = 0x088B; // 2 + $grbitFrt = 0x0000; // 2 + $reserved = 0x0000000000000000; // 8 + $wScalvePLV = $this->phpSheet->getSheetView()->getZoomScale(); // 2 + + // The options flags that comprise $grbit + if ($this->phpSheet->getSheetView()->getView() == SheetView::SHEETVIEW_PAGE_LAYOUT) { + $fPageLayoutView = 1; + } else { + $fPageLayoutView = 0; + } + $fRulerVisible = 0; + $fWhitespaceHidden = 0; + + $grbit = $fPageLayoutView; // 2 + $grbit |= $fRulerVisible << 1; + $grbit |= $fWhitespaceHidden << 3; + + $header = pack('vv', $record, $length); + $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); + $this->append($header . $data); + } + + /** + * Write CFRule Record. + */ + private function writeCFRule(Conditional $conditional): void + { + $record = 0x01B1; // Record identifier + + // $type : Type of the CF + // $operatorType : Comparison operator + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + $type = 0x02; + $operatorType = 0x00; + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + $type = 0x01; + + switch ($conditional->getOperatorType()) { + case Conditional::OPERATOR_NONE: + $operatorType = 0x00; + + break; + case Conditional::OPERATOR_EQUAL: + $operatorType = 0x03; + + break; + case Conditional::OPERATOR_GREATERTHAN: + $operatorType = 0x05; + + break; + case Conditional::OPERATOR_GREATERTHANOREQUAL: + $operatorType = 0x07; + + break; + case Conditional::OPERATOR_LESSTHAN: + $operatorType = 0x06; + + break; + case Conditional::OPERATOR_LESSTHANOREQUAL: + $operatorType = 0x08; + + break; + case Conditional::OPERATOR_NOTEQUAL: + $operatorType = 0x04; + + break; + case Conditional::OPERATOR_BETWEEN: + $operatorType = 0x01; + + break; + // not OPERATOR_NOTBETWEEN 0x02 + } + } + + // $szValue1 : size of the formula data for first value or formula + // $szValue2 : size of the formula data for second value or formula + $arrConditions = $conditional->getConditions(); + $numConditions = count($arrConditions); + if ($numConditions == 1) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = 0x0000; + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = null; + } elseif ($numConditions == 2 && ($conditional->getOperatorType() == Conditional::OPERATOR_BETWEEN)) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = ($arrConditions[1] <= 65535 ? 3 : 0x0000); + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = pack('Cv', 0x1E, $arrConditions[1]); + } else { + $szValue1 = 0x0000; + $szValue2 = 0x0000; + $operand1 = null; + $operand2 = null; + } + + // $flags : Option flags + // Alignment + $bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() == null ? 1 : 0); + $bAlignVt = ($conditional->getStyle()->getAlignment()->getVertical() == null ? 1 : 0); + $bAlignWrapTx = ($conditional->getStyle()->getAlignment()->getWrapText() == false ? 1 : 0); + $bTxRotation = ($conditional->getStyle()->getAlignment()->getTextRotation() == null ? 1 : 0); + $bIndent = ($conditional->getStyle()->getAlignment()->getIndent() == 0 ? 1 : 0); + $bShrinkToFit = ($conditional->getStyle()->getAlignment()->getShrinkToFit() == false ? 1 : 0); + if ($bAlignHz == 0 || $bAlignVt == 0 || $bAlignWrapTx == 0 || $bTxRotation == 0 || $bIndent == 0 || $bShrinkToFit == 0) { + $bFormatAlign = 1; + } else { + $bFormatAlign = 0; + } + // Protection + $bProtLocked = ($conditional->getStyle()->getProtection()->getLocked() == null ? 1 : 0); + $bProtHidden = ($conditional->getStyle()->getProtection()->getHidden() == null ? 1 : 0); + if ($bProtLocked == 0 || $bProtHidden == 0) { + $bFormatProt = 1; + } else { + $bFormatProt = 0; + } + // Border + $bBorderLeft = ($conditional->getStyle()->getBorders()->getLeft()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getLeft()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderRight = ($conditional->getStyle()->getBorders()->getRight()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getRight()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderTop = ($conditional->getStyle()->getBorders()->getTop()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getTop()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderBottom = ($conditional->getStyle()->getBorders()->getBottom()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getBottom()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + if ($bBorderLeft == 0 || $bBorderRight == 0 || $bBorderTop == 0 || $bBorderBottom == 0) { + $bFormatBorder = 1; + } else { + $bFormatBorder = 0; + } + // Pattern + $bFillStyle = ($conditional->getStyle()->getFill()->getFillType() == null ? 0 : 1); + $bFillColor = ($conditional->getStyle()->getFill()->getStartColor()->getARGB() == null ? 0 : 1); + $bFillColorBg = ($conditional->getStyle()->getFill()->getEndColor()->getARGB() == null ? 0 : 1); + if ($bFillStyle == 0 || $bFillColor == 0 || $bFillColorBg == 0) { + $bFormatFill = 1; + } else { + $bFormatFill = 0; + } + // Font + if ($conditional->getStyle()->getFont()->getName() != null + || $conditional->getStyle()->getFont()->getSize() != null + || $conditional->getStyle()->getFont()->getBold() != null + || $conditional->getStyle()->getFont()->getItalic() != null + || $conditional->getStyle()->getFont()->getSuperscript() != null + || $conditional->getStyle()->getFont()->getSubscript() != null + || $conditional->getStyle()->getFont()->getUnderline() != null + || $conditional->getStyle()->getFont()->getStrikethrough() != null + || $conditional->getStyle()->getFont()->getColor()->getARGB() != null) { + $bFormatFont = 1; + } else { + $bFormatFont = 0; + } + // Alignment + $flags = 0; + $flags |= (1 == $bAlignHz ? 0x00000001 : 0); + $flags |= (1 == $bAlignVt ? 0x00000002 : 0); + $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); + $flags |= (1 == $bTxRotation ? 0x00000008 : 0); + // Justify last line flag + $flags |= (1 == 1 ? 0x00000010 : 0); + $flags |= (1 == $bIndent ? 0x00000020 : 0); + $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); + // Default + $flags |= (1 == 1 ? 0x00000080 : 0); + // Protection + $flags |= (1 == $bProtLocked ? 0x00000100 : 0); + $flags |= (1 == $bProtHidden ? 0x00000200 : 0); + // Border + $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); + $flags |= (1 == $bBorderRight ? 0x00000800 : 0); + $flags |= (1 == $bBorderTop ? 0x00001000 : 0); + $flags |= (1 == $bBorderBottom ? 0x00002000 : 0); + $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border + $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border + // Pattern + $flags |= (1 == $bFillStyle ? 0x00010000 : 0); + $flags |= (1 == $bFillColor ? 0x00020000 : 0); + $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); + $flags |= (1 == 1 ? 0x00380000 : 0); + // Font + $flags |= (1 == $bFormatFont ? 0x04000000 : 0); + // Alignment: + $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); + // Border + $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); + // Pattern + $flags |= (1 == $bFormatFill ? 0x20000000 : 0); + // Protection + $flags |= (1 == $bFormatProt ? 0x40000000 : 0); + // Text direction + $flags |= (1 == 0 ? 0x80000000 : 0); + + // Data Blocks + if ($bFormatFont == 1) { + // Font Name + if ($conditional->getStyle()->getFont()->getName() == null) { + $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + } else { + $dataBlockFont = StringHelper::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName()); + } + // Font Size + if ($conditional->getStyle()->getFont()->getSize() == null) { + $dataBlockFont .= pack('V', 20 * 11); + } else { + $dataBlockFont .= pack('V', 20 * $conditional->getStyle()->getFont()->getSize()); + } + // Font Options + $dataBlockFont .= pack('V', 0); + // Font weight + if ($conditional->getStyle()->getFont()->getBold() == true) { + $dataBlockFont .= pack('v', 0x02BC); + } else { + $dataBlockFont .= pack('v', 0x0190); + } + // Escapement type + if ($conditional->getStyle()->getFont()->getSubscript() == true) { + $dataBlockFont .= pack('v', 0x02); + $fontEscapement = 0; + } elseif ($conditional->getStyle()->getFont()->getSuperscript() == true) { + $dataBlockFont .= pack('v', 0x01); + $fontEscapement = 0; + } else { + $dataBlockFont .= pack('v', 0x00); + $fontEscapement = 1; + } + // Underline type + switch ($conditional->getStyle()->getFont()->getUnderline()) { + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE: + $dataBlockFont .= pack('C', 0x02); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING: + $dataBlockFont .= pack('C', 0x22); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE: + $dataBlockFont .= pack('C', 0x01); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING: + $dataBlockFont .= pack('C', 0x21); + $fontUnderline = 0; + + break; + default: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 1; + + break; + } + // Not used (3) + $dataBlockFont .= pack('vC', 0x0000, 0x00); + // Font color index + switch ($conditional->getStyle()->getFont()->getColor()->getRGB()) { + case '000000': + $colorIdx = 0x08; + + break; + case 'FFFFFF': + $colorIdx = 0x09; + + break; + case 'FF0000': + $colorIdx = 0x0A; + + break; + case '00FF00': + $colorIdx = 0x0B; + + break; + case '0000FF': + $colorIdx = 0x0C; + + break; + case 'FFFF00': + $colorIdx = 0x0D; + + break; + case 'FF00FF': + $colorIdx = 0x0E; + + break; + case '00FFFF': + $colorIdx = 0x0F; + + break; + case '800000': + $colorIdx = 0x10; + + break; + case '008000': + $colorIdx = 0x11; + + break; + case '000080': + $colorIdx = 0x12; + + break; + case '808000': + $colorIdx = 0x13; + + break; + case '800080': + $colorIdx = 0x14; + + break; + case '008080': + $colorIdx = 0x15; + + break; + case 'C0C0C0': + $colorIdx = 0x16; + + break; + case '808080': + $colorIdx = 0x17; + + break; + case '9999FF': + $colorIdx = 0x18; + + break; + case '993366': + $colorIdx = 0x19; + + break; + case 'FFFFCC': + $colorIdx = 0x1A; + + break; + case 'CCFFFF': + $colorIdx = 0x1B; + + break; + case '660066': + $colorIdx = 0x1C; + + break; + case 'FF8080': + $colorIdx = 0x1D; + + break; + case '0066CC': + $colorIdx = 0x1E; + + break; + case 'CCCCFF': + $colorIdx = 0x1F; + + break; + case '000080': + $colorIdx = 0x20; + + break; + case 'FF00FF': + $colorIdx = 0x21; + + break; + case 'FFFF00': + $colorIdx = 0x22; + + break; + case '00FFFF': + $colorIdx = 0x23; + + break; + case '800080': + $colorIdx = 0x24; + + break; + case '800000': + $colorIdx = 0x25; + + break; + case '008080': + $colorIdx = 0x26; + + break; + case '0000FF': + $colorIdx = 0x27; + + break; + case '00CCFF': + $colorIdx = 0x28; + + break; + case 'CCFFFF': + $colorIdx = 0x29; + + break; + case 'CCFFCC': + $colorIdx = 0x2A; + + break; + case 'FFFF99': + $colorIdx = 0x2B; + + break; + case '99CCFF': + $colorIdx = 0x2C; + + break; + case 'FF99CC': + $colorIdx = 0x2D; + + break; + case 'CC99FF': + $colorIdx = 0x2E; + + break; + case 'FFCC99': + $colorIdx = 0x2F; + + break; + case '3366FF': + $colorIdx = 0x30; + + break; + case '33CCCC': + $colorIdx = 0x31; + + break; + case '99CC00': + $colorIdx = 0x32; + + break; + case 'FFCC00': + $colorIdx = 0x33; + + break; + case 'FF9900': + $colorIdx = 0x34; + + break; + case 'FF6600': + $colorIdx = 0x35; + + break; + case '666699': + $colorIdx = 0x36; + + break; + case '969696': + $colorIdx = 0x37; + + break; + case '003366': + $colorIdx = 0x38; + + break; + case '339966': + $colorIdx = 0x39; + + break; + case '003300': + $colorIdx = 0x3A; + + break; + case '333300': + $colorIdx = 0x3B; + + break; + case '993300': + $colorIdx = 0x3C; + + break; + case '993366': + $colorIdx = 0x3D; + + break; + case '333399': + $colorIdx = 0x3E; + + break; + case '333333': + $colorIdx = 0x3F; + + break; + default: + $colorIdx = 0x00; + + break; + } + $dataBlockFont .= pack('V', $colorIdx); + // Not used (4) + $dataBlockFont .= pack('V', 0x00000000); + // Options flags for modified font attributes + $optionsFlags = 0; + $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0); + $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); + $optionsFlags |= (1 == 1 ? 0x00000008 : 0); + $optionsFlags |= (1 == 1 ? 0x00000010 : 0); + $optionsFlags |= (1 == 0 ? 0x00000020 : 0); + $optionsFlags |= (1 == 1 ? 0x00000080 : 0); + $dataBlockFont .= pack('V', $optionsFlags); + // Escapement type + $dataBlockFont .= pack('V', $fontEscapement); + // Underline type + $dataBlockFont .= pack('V', $fontUnderline); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Not used (8) + $dataBlockFont .= pack('VV', 0x00000000, 0x00000000); + // Always + $dataBlockFont .= pack('v', 0x0001); + } + if ($bFormatAlign == 1) { + $blockAlign = 0; + // Alignment and text break + switch ($conditional->getStyle()->getAlignment()->getHorizontal()) { + case Alignment::HORIZONTAL_GENERAL: + $blockAlign = 0; + + break; + case Alignment::HORIZONTAL_LEFT: + $blockAlign = 1; + + break; + case Alignment::HORIZONTAL_RIGHT: + $blockAlign = 3; + + break; + case Alignment::HORIZONTAL_CENTER: + $blockAlign = 2; + + break; + case Alignment::HORIZONTAL_CENTER_CONTINUOUS: + $blockAlign = 6; + + break; + case Alignment::HORIZONTAL_JUSTIFY: + $blockAlign = 5; + + break; + } + if ($conditional->getStyle()->getAlignment()->getWrapText() == true) { + $blockAlign |= 1 << 3; + } else { + $blockAlign |= 0 << 3; + } + switch ($conditional->getStyle()->getAlignment()->getVertical()) { + case Alignment::VERTICAL_BOTTOM: + $blockAlign = 2 << 4; + + break; + case Alignment::VERTICAL_TOP: + $blockAlign = 0 << 4; + + break; + case Alignment::VERTICAL_CENTER: + $blockAlign = 1 << 4; + + break; + case Alignment::VERTICAL_JUSTIFY: + $blockAlign = 3 << 4; + + break; + } + $blockAlign |= 0 << 7; + + // Text rotation angle + $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); + + // Indentation + $blockIndent = $conditional->getStyle()->getAlignment()->getIndent(); + if ($conditional->getStyle()->getAlignment()->getShrinkToFit() == true) { + $blockIndent |= 1 << 4; + } else { + $blockIndent |= 0 << 4; + } + $blockIndent |= 0 << 6; + + // Relative indentation + $blockIndentRelative = 255; + + $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000); + } + if ($bFormatBorder == 1) { + $blockLineStyle = 0; + switch ($conditional->getStyle()->getBorders()->getLeft()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D; + + break; + } + switch ($conditional->getStyle()->getBorders()->getRight()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 4; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 4; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 4; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 4; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 4; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 4; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 4; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 4; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 4; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 4; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 4; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 4; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 4; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 4; + + break; + } + switch ($conditional->getStyle()->getBorders()->getTop()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 8; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 8; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 8; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 8; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 8; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 8; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 8; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 8; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 8; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 8; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 8; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 8; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 8; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 8; + + break; + } + switch ($conditional->getStyle()->getBorders()->getBottom()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 12; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 12; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 12; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 12; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 12; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 12; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 12; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 12; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 12; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 12; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 12; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 12; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 12; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 12; + + break; + } + + // TODO writeCFRule() => $blockLineStyle => Index Color for left line + // TODO writeCFRule() => $blockLineStyle => Index Color for right line + // TODO writeCFRule() => $blockLineStyle => Top-left to bottom-right on/off + // TODO writeCFRule() => $blockLineStyle => Bottom-left to top-right on/off + $blockColor = 0; + // TODO writeCFRule() => $blockColor => Index Color for top line + // TODO writeCFRule() => $blockColor => Index Color for bottom line + // TODO writeCFRule() => $blockColor => Index Color for diagonal line + switch ($conditional->getStyle()->getBorders()->getDiagonal()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockColor |= 0x00 << 21; + + break; + case Border::BORDER_THIN: + $blockColor |= 0x01 << 21; + + break; + case Border::BORDER_MEDIUM: + $blockColor |= 0x02 << 21; + + break; + case Border::BORDER_DASHED: + $blockColor |= 0x03 << 21; + + break; + case Border::BORDER_DOTTED: + $blockColor |= 0x04 << 21; + + break; + case Border::BORDER_THICK: + $blockColor |= 0x05 << 21; + + break; + case Border::BORDER_DOUBLE: + $blockColor |= 0x06 << 21; + + break; + case Border::BORDER_HAIR: + $blockColor |= 0x07 << 21; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockColor |= 0x08 << 21; + + break; + case Border::BORDER_DASHDOT: + $blockColor |= 0x09 << 21; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockColor |= 0x0A << 21; + + break; + case Border::BORDER_DASHDOTDOT: + $blockColor |= 0x0B << 21; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockColor |= 0x0C << 21; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockColor |= 0x0D << 21; + + break; + } + $dataBlockBorder = pack('vv', $blockLineStyle, $blockColor); + } + if ($bFormatFill == 1) { + // Fill Patern Style + $blockFillPatternStyle = 0; + switch ($conditional->getStyle()->getFill()->getFillType()) { + case Fill::FILL_NONE: + $blockFillPatternStyle = 0x00; + + break; + case Fill::FILL_SOLID: + $blockFillPatternStyle = 0x01; + + break; + case Fill::FILL_PATTERN_MEDIUMGRAY: + $blockFillPatternStyle = 0x02; + + break; + case Fill::FILL_PATTERN_DARKGRAY: + $blockFillPatternStyle = 0x03; + + break; + case Fill::FILL_PATTERN_LIGHTGRAY: + $blockFillPatternStyle = 0x04; + + break; + case Fill::FILL_PATTERN_DARKHORIZONTAL: + $blockFillPatternStyle = 0x05; + + break; + case Fill::FILL_PATTERN_DARKVERTICAL: + $blockFillPatternStyle = 0x06; + + break; + case Fill::FILL_PATTERN_DARKDOWN: + $blockFillPatternStyle = 0x07; + + break; + case Fill::FILL_PATTERN_DARKUP: + $blockFillPatternStyle = 0x08; + + break; + case Fill::FILL_PATTERN_DARKGRID: + $blockFillPatternStyle = 0x09; + + break; + case Fill::FILL_PATTERN_DARKTRELLIS: + $blockFillPatternStyle = 0x0A; + + break; + case Fill::FILL_PATTERN_LIGHTHORIZONTAL: + $blockFillPatternStyle = 0x0B; + + break; + case Fill::FILL_PATTERN_LIGHTVERTICAL: + $blockFillPatternStyle = 0x0C; + + break; + case Fill::FILL_PATTERN_LIGHTDOWN: + $blockFillPatternStyle = 0x0D; + + break; + case Fill::FILL_PATTERN_LIGHTUP: + $blockFillPatternStyle = 0x0E; + + break; + case Fill::FILL_PATTERN_LIGHTGRID: + $blockFillPatternStyle = 0x0F; + + break; + case Fill::FILL_PATTERN_LIGHTTRELLIS: + $blockFillPatternStyle = 0x10; + + break; + case Fill::FILL_PATTERN_GRAY125: + $blockFillPatternStyle = 0x11; + + break; + case Fill::FILL_PATTERN_GRAY0625: + $blockFillPatternStyle = 0x12; + + break; + case Fill::FILL_GRADIENT_LINEAR: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + case Fill::FILL_GRADIENT_PATH: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + default: + $blockFillPatternStyle = 0x00; + + break; + } + // Color + switch ($conditional->getStyle()->getFill()->getStartColor()->getRGB()) { + case '000000': + $colorIdxBg = 0x08; + + break; + case 'FFFFFF': + $colorIdxBg = 0x09; + + break; + case 'FF0000': + $colorIdxBg = 0x0A; + + break; + case '00FF00': + $colorIdxBg = 0x0B; + + break; + case '0000FF': + $colorIdxBg = 0x0C; + + break; + case 'FFFF00': + $colorIdxBg = 0x0D; + + break; + case 'FF00FF': + $colorIdxBg = 0x0E; + + break; + case '00FFFF': + $colorIdxBg = 0x0F; + + break; + case '800000': + $colorIdxBg = 0x10; + + break; + case '008000': + $colorIdxBg = 0x11; + + break; + case '000080': + $colorIdxBg = 0x12; + + break; + case '808000': + $colorIdxBg = 0x13; + + break; + case '800080': + $colorIdxBg = 0x14; + + break; + case '008080': + $colorIdxBg = 0x15; + + break; + case 'C0C0C0': + $colorIdxBg = 0x16; + + break; + case '808080': + $colorIdxBg = 0x17; + + break; + case '9999FF': + $colorIdxBg = 0x18; + + break; + case '993366': + $colorIdxBg = 0x19; + + break; + case 'FFFFCC': + $colorIdxBg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxBg = 0x1B; + + break; + case '660066': + $colorIdxBg = 0x1C; + + break; + case 'FF8080': + $colorIdxBg = 0x1D; + + break; + case '0066CC': + $colorIdxBg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxBg = 0x1F; + + break; + case '000080': + $colorIdxBg = 0x20; + + break; + case 'FF00FF': + $colorIdxBg = 0x21; + + break; + case 'FFFF00': + $colorIdxBg = 0x22; + + break; + case '00FFFF': + $colorIdxBg = 0x23; + + break; + case '800080': + $colorIdxBg = 0x24; + + break; + case '800000': + $colorIdxBg = 0x25; + + break; + case '008080': + $colorIdxBg = 0x26; + + break; + case '0000FF': + $colorIdxBg = 0x27; + + break; + case '00CCFF': + $colorIdxBg = 0x28; + + break; + case 'CCFFFF': + $colorIdxBg = 0x29; + + break; + case 'CCFFCC': + $colorIdxBg = 0x2A; + + break; + case 'FFFF99': + $colorIdxBg = 0x2B; + + break; + case '99CCFF': + $colorIdxBg = 0x2C; + + break; + case 'FF99CC': + $colorIdxBg = 0x2D; + + break; + case 'CC99FF': + $colorIdxBg = 0x2E; + + break; + case 'FFCC99': + $colorIdxBg = 0x2F; + + break; + case '3366FF': + $colorIdxBg = 0x30; + + break; + case '33CCCC': + $colorIdxBg = 0x31; + + break; + case '99CC00': + $colorIdxBg = 0x32; + + break; + case 'FFCC00': + $colorIdxBg = 0x33; + + break; + case 'FF9900': + $colorIdxBg = 0x34; + + break; + case 'FF6600': + $colorIdxBg = 0x35; + + break; + case '666699': + $colorIdxBg = 0x36; + + break; + case '969696': + $colorIdxBg = 0x37; + + break; + case '003366': + $colorIdxBg = 0x38; + + break; + case '339966': + $colorIdxBg = 0x39; + + break; + case '003300': + $colorIdxBg = 0x3A; + + break; + case '333300': + $colorIdxBg = 0x3B; + + break; + case '993300': + $colorIdxBg = 0x3C; + + break; + case '993366': + $colorIdxBg = 0x3D; + + break; + case '333399': + $colorIdxBg = 0x3E; + + break; + case '333333': + $colorIdxBg = 0x3F; + + break; + default: + $colorIdxBg = 0x41; + + break; + } + // Fg Color + switch ($conditional->getStyle()->getFill()->getEndColor()->getRGB()) { + case '000000': + $colorIdxFg = 0x08; + + break; + case 'FFFFFF': + $colorIdxFg = 0x09; + + break; + case 'FF0000': + $colorIdxFg = 0x0A; + + break; + case '00FF00': + $colorIdxFg = 0x0B; + + break; + case '0000FF': + $colorIdxFg = 0x0C; + + break; + case 'FFFF00': + $colorIdxFg = 0x0D; + + break; + case 'FF00FF': + $colorIdxFg = 0x0E; + + break; + case '00FFFF': + $colorIdxFg = 0x0F; + + break; + case '800000': + $colorIdxFg = 0x10; + + break; + case '008000': + $colorIdxFg = 0x11; + + break; + case '000080': + $colorIdxFg = 0x12; + + break; + case '808000': + $colorIdxFg = 0x13; + + break; + case '800080': + $colorIdxFg = 0x14; + + break; + case '008080': + $colorIdxFg = 0x15; + + break; + case 'C0C0C0': + $colorIdxFg = 0x16; + + break; + case '808080': + $colorIdxFg = 0x17; + + break; + case '9999FF': + $colorIdxFg = 0x18; + + break; + case '993366': + $colorIdxFg = 0x19; + + break; + case 'FFFFCC': + $colorIdxFg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxFg = 0x1B; + + break; + case '660066': + $colorIdxFg = 0x1C; + + break; + case 'FF8080': + $colorIdxFg = 0x1D; + + break; + case '0066CC': + $colorIdxFg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxFg = 0x1F; + + break; + case '000080': + $colorIdxFg = 0x20; + + break; + case 'FF00FF': + $colorIdxFg = 0x21; + + break; + case 'FFFF00': + $colorIdxFg = 0x22; + + break; + case '00FFFF': + $colorIdxFg = 0x23; + + break; + case '800080': + $colorIdxFg = 0x24; + + break; + case '800000': + $colorIdxFg = 0x25; + + break; + case '008080': + $colorIdxFg = 0x26; + + break; + case '0000FF': + $colorIdxFg = 0x27; + + break; + case '00CCFF': + $colorIdxFg = 0x28; + + break; + case 'CCFFFF': + $colorIdxFg = 0x29; + + break; + case 'CCFFCC': + $colorIdxFg = 0x2A; + + break; + case 'FFFF99': + $colorIdxFg = 0x2B; + + break; + case '99CCFF': + $colorIdxFg = 0x2C; + + break; + case 'FF99CC': + $colorIdxFg = 0x2D; + + break; + case 'CC99FF': + $colorIdxFg = 0x2E; + + break; + case 'FFCC99': + $colorIdxFg = 0x2F; + + break; + case '3366FF': + $colorIdxFg = 0x30; + + break; + case '33CCCC': + $colorIdxFg = 0x31; + + break; + case '99CC00': + $colorIdxFg = 0x32; + + break; + case 'FFCC00': + $colorIdxFg = 0x33; + + break; + case 'FF9900': + $colorIdxFg = 0x34; + + break; + case 'FF6600': + $colorIdxFg = 0x35; + + break; + case '666699': + $colorIdxFg = 0x36; + + break; + case '969696': + $colorIdxFg = 0x37; + + break; + case '003366': + $colorIdxFg = 0x38; + + break; + case '339966': + $colorIdxFg = 0x39; + + break; + case '003300': + $colorIdxFg = 0x3A; + + break; + case '333300': + $colorIdxFg = 0x3B; + + break; + case '993300': + $colorIdxFg = 0x3C; + + break; + case '993366': + $colorIdxFg = 0x3D; + + break; + case '333399': + $colorIdxFg = 0x3E; + + break; + case '333333': + $colorIdxFg = 0x3F; + + break; + default: + $colorIdxFg = 0x40; + + break; + } + $dataBlockFill = pack('v', $blockFillPatternStyle); + $dataBlockFill .= pack('v', $colorIdxFg | ($colorIdxBg << 7)); + } + if ($bFormatProt == 1) { + $dataBlockProtection = 0; + if ($conditional->getStyle()->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1; + } + if ($conditional->getStyle()->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1 << 1; + } + } + + $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000); + if ($bFormatFont == 1) { // Block Formatting : OK + $data .= $dataBlockFont; + } + if ($bFormatAlign == 1) { + $data .= $dataBlockAlign; + } + if ($bFormatBorder == 1) { + $data .= $dataBlockBorder; + } + if ($bFormatFill == 1) { // Block Formatting : OK + $data .= $dataBlockFill; + } + if ($bFormatProt == 1) { + $data .= $dataBlockProtection; + } + if ($operand1 !== null) { + $data .= $operand1; + } + if ($operand2 !== null) { + $data .= $operand2; + } + $header = pack('vv', $record, strlen($data)); + $this->append($header . $data); + } + + /** + * Write CFHeader record. + */ + private function writeCFHeader(): void + { + $record = 0x01B0; // Record identifier + $length = 0x0016; // Bytes to follow + + $numColumnMin = null; + $numColumnMax = null; + $numRowMin = null; + $numRowMax = null; + $arrConditional = []; + foreach ($this->phpSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!in_array($conditional->getHashCode(), $arrConditional)) { + $arrConditional[] = $conditional->getHashCode(); + } + // Cells + $arrCoord = Coordinate::coordinateFromString($cellCoordinate); + if (!is_numeric($arrCoord[0])) { + $arrCoord[0] = Coordinate::columnIndexFromString($arrCoord[0]); + } + if ($numColumnMin === null || ($numColumnMin > $arrCoord[0])) { + $numColumnMin = $arrCoord[0]; + } + if ($numColumnMax === null || ($numColumnMax < $arrCoord[0])) { + $numColumnMax = $arrCoord[0]; + } + if ($numRowMin === null || ($numRowMin > $arrCoord[1])) { + $numRowMin = $arrCoord[1]; + } + if ($numRowMax === null || ($numRowMax < $arrCoord[1])) { + $numRowMax = $arrCoord[1]; + } + } + } + } + $needRedraw = 1; + $cellRange = pack('vvvv', $numRowMin - 1, $numRowMax - 1, $numColumnMin - 1, $numColumnMax - 1); + + $header = pack('vv', $record, $length); + $data = pack('vv', count($arrConditional), $needRedraw); + $data .= $cellRange; + $data .= pack('v', 0x0001); + $data .= $cellRange; + $this->append($header . $data); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Xf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Xf.php new file mode 100755 index 0000000..3e8169b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xls/Xf.php @@ -0,0 +1,548 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Xf +{ + /** + * Style XF or a cell XF ? + * + * @var bool + */ + private $isStyleXf; + + /** + * Index to the FONT record. Index 4 does not exist. + * + * @var int + */ + private $fontIndex; + + /** + * An index (2 bytes) to a FORMAT record (number format). + * + * @var int + */ + private $numberFormatIndex; + + /** + * 1 bit, apparently not used. + * + * @var int + */ + private $textJustLast; + + /** + * The cell's foreground color. + * + * @var int + */ + private $foregroundColor; + + /** + * The cell's background color. + * + * @var int + */ + private $backgroundColor; + + /** + * Color of the bottom border of the cell. + * + * @var int + */ + private $bottomBorderColor; + + /** + * Color of the top border of the cell. + * + * @var int + */ + private $topBorderColor; + + /** + * Color of the left border of the cell. + * + * @var int + */ + private $leftBorderColor; + + /** + * Color of the right border of the cell. + * + * @var int + */ + private $rightBorderColor; + + /** + * Constructor. + * + * @param Style $style The XF format + */ + public function __construct(Style $style) + { + $this->isStyleXf = false; + $this->fontIndex = 0; + + $this->numberFormatIndex = 0; + + $this->textJustLast = 0; + + $this->foregroundColor = 0x40; + $this->backgroundColor = 0x41; + + $this->_diag = 0; + + $this->bottomBorderColor = 0x40; + $this->topBorderColor = 0x40; + $this->leftBorderColor = 0x40; + $this->rightBorderColor = 0x40; + $this->_diag_color = 0x40; + $this->_style = $style; + } + + /** + * Generate an Excel BIFF XF record (style or cell). + * + * @return string The XF record + */ + public function writeXf() + { + // Set the type of the XF record and some of the attributes. + if ($this->isStyleXf) { + $style = 0xFFF5; + } else { + $style = self::mapLocked($this->_style->getProtection()->getLocked()); + $style |= self::mapHidden($this->_style->getProtection()->getHidden()) << 1; + } + + // Flags to indicate if attributes have been set. + $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0; + $atr_fnt = ($this->fontIndex != 0) ? 1 : 0; + $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; + $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0; + $atr_pat = (($this->foregroundColor != 0x40) || + ($this->backgroundColor != 0x41) || + self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0; + $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) + | self::mapHidden($this->_style->getProtection()->getHidden()); + + // Zero the default border colour if the border has not been set. + if (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) == 0) { + $this->bottomBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { + $this->topBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) == 0) { + $this->rightBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) == 0) { + $this->leftBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) == 0) { + $this->_diag_color = 0; + } + + $record = 0x00E0; // Record identifier + $length = 0x0014; // Number of bytes to follow + + $ifnt = $this->fontIndex; // Index to FONT record + $ifmt = $this->numberFormatIndex; // Index to FORMAT record + + $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment + $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; + $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; + $align |= $this->textJustLast << 7; + + $used_attrib = $atr_num << 2; + $used_attrib |= $atr_fnt << 3; + $used_attrib |= $atr_alc << 4; + $used_attrib |= $atr_bdr << 5; + $used_attrib |= $atr_pat << 6; + $used_attrib |= $atr_prot << 7; + + $icv = $this->foregroundColor; // fg and bg pattern colors + $icv |= $this->backgroundColor << 7; + + $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; + $border1 |= $this->leftBorderColor << 16; + $border1 |= $this->rightBorderColor << 23; + + $diagonalDirection = $this->_style->getBorders()->getDiagonalDirection(); + $diag_tl_to_rb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_DOWN; + $diag_tr_to_lb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_UP; + $border1 |= $diag_tl_to_rb << 30; + $border1 |= $diag_tr_to_lb << 31; + + $border2 = $this->topBorderColor; // Border color + $border2 |= $this->bottomBorderColor << 7; + $border2 |= $this->_diag_color << 14; + $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; + $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; + + $header = pack('vv', $record, $length); + + //BIFF8 options: identation, shrinkToFit and text direction + $biff8_options = $this->_style->getAlignment()->getIndent(); + $biff8_options |= (int) $this->_style->getAlignment()->getShrinkToFit() << 4; + + $data = pack('vvvC', $ifnt, $ifmt, $style, $align); + $data .= pack('CCC', self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib); + $data .= pack('VVv', $border1, $border2, $icv); + + return $header . $data; + } + + /** + * Is this a style XF ? + * + * @param bool $value + */ + public function setIsStyleXf($value): void + { + $this->isStyleXf = $value; + } + + /** + * Sets the cell's bottom border color. + * + * @param int $colorIndex Color index + */ + public function setBottomColor($colorIndex): void + { + $this->bottomBorderColor = $colorIndex; + } + + /** + * Sets the cell's top border color. + * + * @param int $colorIndex Color index + */ + public function setTopColor($colorIndex): void + { + $this->topBorderColor = $colorIndex; + } + + /** + * Sets the cell's left border color. + * + * @param int $colorIndex Color index + */ + public function setLeftColor($colorIndex): void + { + $this->leftBorderColor = $colorIndex; + } + + /** + * Sets the cell's right border color. + * + * @param int $colorIndex Color index + */ + public function setRightColor($colorIndex): void + { + $this->rightBorderColor = $colorIndex; + } + + /** + * Sets the cell's diagonal border color. + * + * @param int $colorIndex Color index + */ + public function setDiagColor($colorIndex): void + { + $this->_diag_color = $colorIndex; + } + + /** + * Sets the cell's foreground color. + * + * @param int $colorIndex Color index + */ + public function setFgColor($colorIndex): void + { + $this->foregroundColor = $colorIndex; + } + + /** + * Sets the cell's background color. + * + * @param int $colorIndex Color index + */ + public function setBgColor($colorIndex): void + { + $this->backgroundColor = $colorIndex; + } + + /** + * Sets the index to the number format record + * It can be date, time, currency, etc... + * + * @param int $numberFormatIndex Index to format record + */ + public function setNumberFormatIndex($numberFormatIndex): void + { + $this->numberFormatIndex = $numberFormatIndex; + } + + /** + * Set the font index. + * + * @param int $value Font index, note that value 4 does not exist + */ + public function setFontIndex($value): void + { + $this->fontIndex = $value; + } + + /** + * Map of BIFF2-BIFF8 codes for border styles. + * + * @var array of int + */ + private static $mapBorderStyles = [ + Border::BORDER_NONE => 0x00, + Border::BORDER_THIN => 0x01, + Border::BORDER_MEDIUM => 0x02, + Border::BORDER_DASHED => 0x03, + Border::BORDER_DOTTED => 0x04, + Border::BORDER_THICK => 0x05, + Border::BORDER_DOUBLE => 0x06, + Border::BORDER_HAIR => 0x07, + Border::BORDER_MEDIUMDASHED => 0x08, + Border::BORDER_DASHDOT => 0x09, + Border::BORDER_MEDIUMDASHDOT => 0x0A, + Border::BORDER_DASHDOTDOT => 0x0B, + Border::BORDER_MEDIUMDASHDOTDOT => 0x0C, + Border::BORDER_SLANTDASHDOT => 0x0D, + ]; + + /** + * Map border style. + * + * @param string $borderStyle + * + * @return int + */ + private static function mapBorderStyle($borderStyle) + { + if (isset(self::$mapBorderStyles[$borderStyle])) { + return self::$mapBorderStyles[$borderStyle]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for fill types. + * + * @var array of int + */ + private static $mapFillTypes = [ + Fill::FILL_NONE => 0x00, + Fill::FILL_SOLID => 0x01, + Fill::FILL_PATTERN_MEDIUMGRAY => 0x02, + Fill::FILL_PATTERN_DARKGRAY => 0x03, + Fill::FILL_PATTERN_LIGHTGRAY => 0x04, + Fill::FILL_PATTERN_DARKHORIZONTAL => 0x05, + Fill::FILL_PATTERN_DARKVERTICAL => 0x06, + Fill::FILL_PATTERN_DARKDOWN => 0x07, + Fill::FILL_PATTERN_DARKUP => 0x08, + Fill::FILL_PATTERN_DARKGRID => 0x09, + Fill::FILL_PATTERN_DARKTRELLIS => 0x0A, + Fill::FILL_PATTERN_LIGHTHORIZONTAL => 0x0B, + Fill::FILL_PATTERN_LIGHTVERTICAL => 0x0C, + Fill::FILL_PATTERN_LIGHTDOWN => 0x0D, + Fill::FILL_PATTERN_LIGHTUP => 0x0E, + Fill::FILL_PATTERN_LIGHTGRID => 0x0F, + Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, + Fill::FILL_PATTERN_GRAY125 => 0x11, + Fill::FILL_PATTERN_GRAY0625 => 0x12, + Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 + Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 + ]; + + /** + * Map fill type. + * + * @param string $fillType + * + * @return int + */ + private static function mapFillType($fillType) + { + if (isset(self::$mapFillTypes[$fillType])) { + return self::$mapFillTypes[$fillType]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for horizontal alignment. + * + * @var array of int + */ + private static $mapHAlignments = [ + Alignment::HORIZONTAL_GENERAL => 0, + Alignment::HORIZONTAL_LEFT => 1, + Alignment::HORIZONTAL_CENTER => 2, + Alignment::HORIZONTAL_RIGHT => 3, + Alignment::HORIZONTAL_FILL => 4, + Alignment::HORIZONTAL_JUSTIFY => 5, + Alignment::HORIZONTAL_CENTER_CONTINUOUS => 6, + ]; + + /** + * Map to BIFF2-BIFF8 codes for horizontal alignment. + * + * @param string $hAlign + * + * @return int + */ + private function mapHAlign($hAlign) + { + if (isset(self::$mapHAlignments[$hAlign])) { + return self::$mapHAlignments[$hAlign]; + } + + return 0; + } + + /** + * Map of BIFF2-BIFF8 codes for vertical alignment. + * + * @var array of int + */ + private static $mapVAlignments = [ + Alignment::VERTICAL_TOP => 0, + Alignment::VERTICAL_CENTER => 1, + Alignment::VERTICAL_BOTTOM => 2, + Alignment::VERTICAL_JUSTIFY => 3, + ]; + + /** + * Map to BIFF2-BIFF8 codes for vertical alignment. + * + * @param string $vAlign + * + * @return int + */ + private static function mapVAlign($vAlign) + { + if (isset(self::$mapVAlignments[$vAlign])) { + return self::$mapVAlignments[$vAlign]; + } + + return 2; + } + + /** + * Map to BIFF8 codes for text rotation angle. + * + * @param int $textRotation + * + * @return int + */ + private static function mapTextRotation($textRotation) + { + if ($textRotation >= 0) { + return $textRotation; + } elseif ($textRotation == -165) { + return 255; + } elseif ($textRotation < 0) { + return 90 - $textRotation; + } + } + + /** + * Map locked. + * + * @param string $locked + * + * @return int + */ + private static function mapLocked($locked) + { + switch ($locked) { + case Protection::PROTECTION_INHERIT: + return 1; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 1; + } + } + + /** + * Map hidden. + * + * @param string $hidden + * + * @return int + */ + private static function mapHidden($hidden) + { + switch ($hidden) { + case Protection::PROTECTION_INHERIT: + return 0; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 0; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx.php new file mode 100755 index 0000000..4cb1028 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx.php @@ -0,0 +1,556 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'stringtable' => StringTable::class, + 'contenttypes' => ContentTypes::class, + 'docprops' => DocProps::class, + 'rels' => Rels::class, + 'theme' => Theme::class, + 'style' => Style::class, + 'workbook' => Workbook::class, + 'worksheet' => Worksheet::class, + 'drawing' => Drawing::class, + 'comments' => Comments::class, + 'chart' => Chart::class, + 'relsvba' => RelsVBA::class, + 'relsribbonobjects' => RelsRibbon::class, + ]; + + // Initialise writer parts + // and Assign their parent IWriters + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + + $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable', + 'bordersHashTable', 'numFmtHashTable', 'drawingHashTable', + 'styleHashTable', + ]; + + // Set HashTable variables + foreach ($hashTablesArray as $tableName) { + $this->$tableName = new HashTable(); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param resource|string $pFilename + */ + public function save($pFilename): void + { + if ($this->spreadSheet !== null) { + // garbage collect + $this->pathNames = []; + $this->spreadSheet->garbageCollect(); + + $this->openFileHandle($pFilename); + + $saveDebugLog = Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // Create string lookup table + $this->stringTable = []; + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $this->stringTable = $this->getWriterPart('StringTable')->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable); + } + + // Create styles dictionaries + $this->styleHashTable->addFromSource($this->getWriterPart('Style')->allStyles($this->spreadSheet)); + $this->stylesConditionalHashTable->addFromSource($this->getWriterPart('Style')->allConditionalStyles($this->spreadSheet)); + $this->fillHashTable->addFromSource($this->getWriterPart('Style')->allFills($this->spreadSheet)); + $this->fontHashTable->addFromSource($this->getWriterPart('Style')->allFonts($this->spreadSheet)); + $this->bordersHashTable->addFromSource($this->getWriterPart('Style')->allBorders($this->spreadSheet)); + $this->numFmtHashTable->addFromSource($this->getWriterPart('Style')->allNumberFormats($this->spreadSheet)); + + // Create drawing dictionary + $this->drawingHashTable->addFromSource($this->getWriterPart('Drawing')->allDrawings($this->spreadSheet)); + + $options = new Archive(); + $options->setEnableZip64(false); + $options->setOutputStream($this->fileHandle); + + $this->zip = new ZipStream(null, $options); + + // Add [Content_Types].xml to ZIP file + $this->addZipFile('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); + + //if hasMacros, add the vbaProject.bin file, Certificate file(if exists) + if ($this->spreadSheet->hasMacros()) { + $macrosCode = $this->spreadSheet->getMacrosCode(); + if ($macrosCode !== null) { + // we have the code ? + $this->addZipFile('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin + if ($this->spreadSheet->hasMacrosCertificate()) { + //signed macros ? + // Yes : add the certificate file and the related rels file + $this->addZipFile('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate()); + $this->addZipFile('xl/_rels/vbaProject.bin.rels', $this->getWriterPart('RelsVBA')->writeVBARelationships($this->spreadSheet)); + } + } + } + //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels) + if ($this->spreadSheet->hasRibbon()) { + $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target'); + $this->addZipFile($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); + if ($this->spreadSheet->hasRibbonBinObjects()) { + $tmpRootPath = dirname($tmpRibbonTarget) . '/'; + $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write + foreach ($ribbonBinObjects as $aPath => $aContent) { + $this->addZipFile($tmpRootPath . $aPath, $aContent); + } + //the rels for files + $this->addZipFile($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); + } + } + + // Add relationships to ZIP file + $this->addZipFile('_rels/.rels', $this->getWriterPart('Rels')->writeRelationships($this->spreadSheet)); + $this->addZipFile('xl/_rels/workbook.xml.rels', $this->getWriterPart('Rels')->writeWorkbookRelationships($this->spreadSheet)); + + // Add document properties to ZIP file + $this->addZipFile('docProps/app.xml', $this->getWriterPart('DocProps')->writeDocPropsApp($this->spreadSheet)); + $this->addZipFile('docProps/core.xml', $this->getWriterPart('DocProps')->writeDocPropsCore($this->spreadSheet)); + $customPropertiesPart = $this->getWriterPart('DocProps')->writeDocPropsCustom($this->spreadSheet); + if ($customPropertiesPart !== null) { + $this->addZipFile('docProps/custom.xml', $customPropertiesPart); + } + + // Add theme to ZIP file + $this->addZipFile('xl/theme/theme1.xml', $this->getWriterPart('Theme')->writeTheme($this->spreadSheet)); + + // Add string table to ZIP file + $this->addZipFile('xl/sharedStrings.xml', $this->getWriterPart('StringTable')->writeStringTable($this->stringTable)); + + // Add styles to ZIP file + $this->addZipFile('xl/styles.xml', $this->getWriterPart('Style')->writeStyles($this->spreadSheet)); + + // Add workbook to ZIP file + $this->addZipFile('xl/workbook.xml', $this->getWriterPart('Workbook')->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas)); + + $chartCount = 0; + // Add worksheets + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $this->addZipFile('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); + if ($this->includeCharts) { + $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); + if (count($charts) > 0) { + foreach ($charts as $chart) { + $this->addZipFile('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); + ++$chartCount; + } + } + } + } + + $chartRef1 = 0; + // Add worksheet relationships (drawings, ...) + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + // Add relationships + $this->addZipFile('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); + + // Add unparsedLoadedData + $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName(); + $unparsedLoadedData = $this->spreadSheet->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'] as $ctrlProp) { + $this->addZipFile($ctrlProp['filePath'], $ctrlProp['content']); + } + } + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'] as $ctrlProp) { + $this->addZipFile($ctrlProp['filePath'], $ctrlProp['content']); + } + } + + $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + if ($this->includeCharts) { + $chartCount = $this->spreadSheet->getSheet($i)->getChartCount(); + } + + // Add drawing and image relationship parts + if (($drawingCount > 0) || ($chartCount > 0)) { + // Drawing relationships + $this->addZipFile('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); + + // Drawings + $this->addZipFile('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } elseif (isset($unparsedLoadedData['sheets'][$sheetCodeName]['drawingAlternateContents'])) { + // Drawings + $this->addZipFile('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } + + // Add unparsed drawings + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'] as $relId => $drawingXml) { + $drawingFile = array_search($relId, $unparsedLoadedData['sheets'][$sheetCodeName]['drawingOriginalIds']); + if ($drawingFile !== false) { + $drawingFile = ltrim($drawingFile, '.'); + $this->addZipFile('xl' . $drawingFile, $drawingXml); + } + } + } + + // Add comment relationship parts + if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { + // VML Comments + $this->addZipFile('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); + + // Comments + $this->addZipFile('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); + } + + // Add unparsed relationship parts + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'] as $vmlDrawing) { + $this->addZipFile($vmlDrawing['filePath'], $vmlDrawing['content']); + } + } + + // Add header/footer relationship parts + if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + // VML Drawings + $this->addZipFile('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); + + // VML Drawing relationships + $this->addZipFile('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); + + // Media + foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + $this->addZipFile('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); + } + } + } + + // Add media + for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { + if ($this->getDrawingHashTable()->getByIndex($i) instanceof WorksheetDrawing) { + $imageContents = null; + $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath(); + if (strpos($imagePath, 'zip://') !== false) { + $imagePath = substr($imagePath, 6); + $imagePathSplitted = explode('#', $imagePath); + + $imageZip = new ZipArchive(); + $imageZip->open($imagePathSplitted[0]); + $imageContents = $imageZip->getFromName($imagePathSplitted[1]); + $imageZip->close(); + unset($imageZip); + } else { + $imageContents = file_get_contents($imagePath); + } + + $this->addZipFile('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + ob_start(); + call_user_func( + $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction(), + $this->getDrawingHashTable()->getByIndex($i)->getImageResource() + ); + $imageContents = ob_get_contents(); + ob_end_clean(); + + $this->addZipFile('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } + } + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + + // Close file + try { + $this->zip->finish(); + } catch (OverflowException $e) { + throw new WriterException('Could not close resource.'); + } + + $this->maybeCloseFileHandle(); + } else { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + } + + /** + * Get Spreadsheet object. + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No Spreadsheet object assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return $this + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } + + /** + * Get string table. + * + * @return string[] + */ + public function getStringTable() + { + return $this->stringTable; + } + + /** + * Get Style HashTable. + * + * @return HashTable + */ + public function getStyleHashTable() + { + return $this->styleHashTable; + } + + /** + * Get Conditional HashTable. + * + * @return HashTable + */ + public function getStylesConditionalHashTable() + { + return $this->stylesConditionalHashTable; + } + + /** + * Get Fill HashTable. + * + * @return HashTable + */ + public function getFillHashTable() + { + return $this->fillHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Style\Font HashTable. + * + * @return HashTable + */ + public function getFontHashTable() + { + return $this->fontHashTable; + } + + /** + * Get Borders HashTable. + * + * @return HashTable + */ + public function getBordersHashTable() + { + return $this->bordersHashTable; + } + + /** + * Get NumberFormat HashTable. + * + * @return HashTable + */ + public function getNumFmtHashTable() + { + return $this->numFmtHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\BaseDrawing HashTable. + * + * @return HashTable + */ + public function getDrawingHashTable() + { + return $this->drawingHashTable; + } + + /** + * Get Office2003 compatibility. + * + * @return bool + */ + public function getOffice2003Compatibility() + { + return $this->office2003compatibility; + } + + /** + * Set Office2003 compatibility. + * + * @param bool $pValue Office2003 compatibility? + * + * @return $this + */ + public function setOffice2003Compatibility($pValue) + { + $this->office2003compatibility = $pValue; + + return $this; + } + + private $pathNames = []; + + private function addZipFile(string $path, string $content): void + { + if (!in_array($path, $this->pathNames)) { + $this->pathNames[] = $path; + $this->zip->addFile($path, $content); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Chart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Chart.php new file mode 100755 index 0000000..583b262 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -0,0 +1,1516 @@ +calculateCellValues = $calculateCellValues; + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + // Ensure that data series values are up-to-date before we save + if ($this->calculateCellValues) { + $pChart->refresh(); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // c:chartSpace + $objWriter->startElement('c:chartSpace'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->startElement('c:date1904'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + $objWriter->startElement('c:lang'); + $objWriter->writeAttribute('val', 'en-GB'); + $objWriter->endElement(); + $objWriter->startElement('c:roundedCorners'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writeAlternateContent($objWriter); + + $objWriter->startElement('c:chart'); + + $this->writeTitle($objWriter, $pChart->getTitle()); + + $objWriter->startElement('c:autoTitleDeleted'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writePlotArea($objWriter, $pChart->getWorksheet(), $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines()); + + $this->writeLegend($objWriter, $pChart->getLegend()); + + $objWriter->startElement('c:plotVisOnly'); + $objWriter->writeAttribute('val', (int) $pChart->getPlotVisibleOnly()); + $objWriter->endElement(); + + $objWriter->startElement('c:dispBlanksAs'); + $objWriter->writeAttribute('val', $pChart->getDisplayBlanksAs()); + $objWriter->endElement(); + + $objWriter->startElement('c:showDLblsOverMax'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + $this->writePrintSettings($objWriter); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Chart Title. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $title + */ + private function writeTitle(XMLWriter $objWriter, ?Title $title = null): void + { + if ($title === null) { + return; + } + + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + + $caption = $title->getCaption(); + if ((is_array($caption)) && (count($caption) > 0)) { + $caption = $caption[0]; + } + $this->getParentWriter()->getWriterPart('stringtable')->writeRichTextForCharts($objWriter, $caption, 'a'); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $title->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Legend. + * + * @param XMLWriter $objWriter XML Writer + * @param Legend $legend + */ + private function writeLegend(XMLWriter $objWriter, ?Legend $legend = null): void + { + if ($legend === null) { + return; + } + + $objWriter->startElement('c:legend'); + + $objWriter->startElement('c:legendPos'); + $objWriter->writeAttribute('val', $legend->getPosition()); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $legend->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0'); + $objWriter->endElement(); + + $objWriter->startElement('c:txPr'); + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:pPr'); + $objWriter->writeAttribute('rtl', 0); + + $objWriter->startElement('a:defRPr'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:endParaRPr'); + $objWriter->writeAttribute('lang', 'en-US'); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Plot Area. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $xAxisLabel + * @param Title $yAxisLabel + * @param Axis $xAxis + * @param Axis $yAxis + */ + private function writePlotArea(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet, PlotArea $plotArea, ?Title $xAxisLabel = null, ?Title $yAxisLabel = null, ?Axis $xAxis = null, ?Axis $yAxis = null, ?GridLines $majorGridlines = null, ?GridLines $minorGridlines = null): void + { + if ($plotArea === null) { + return; + } + + $id1 = $id2 = 0; + $this->seriesIndex = 0; + $objWriter->startElement('c:plotArea'); + + $layout = $plotArea->getLayout(); + + $this->writeLayout($objWriter, $layout); + + $chartTypes = self::getChartType($plotArea); + $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; + $plotGroupingType = ''; + foreach ($chartTypes as $chartType) { + $objWriter->startElement('c:' . $chartType); + + $groupCount = $plotArea->getPlotGroupCount(); + for ($i = 0; $i < $groupCount; ++$i) { + $plotGroup = $plotArea->getPlotGroupByIndex($i); + $groupType = $plotGroup->getPlotType(); + if ($groupType == $chartType) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($groupType === DataSeries::TYPE_RADARCHART) { + $objWriter->startElement('c:radarStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } elseif ($groupType === DataSeries::TYPE_SCATTERCHART) { + $objWriter->startElement('c:scatterStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } + + $this->writePlotGroup($plotGroup, $chartType, $objWriter, $catIsMultiLevelSeries, $valIsMultiLevelSeries, $plotGroupingType); + } + } + + $this->writeDataLabels($objWriter, $layout); + + if ($chartType === DataSeries::TYPE_LINECHART) { + // Line only, Line3D can't be smoothed + $objWriter->startElement('c:smooth'); + $objWriter->writeAttribute('val', (int) $plotGroup->getSmoothLine()); + $objWriter->endElement(); + } elseif (($chartType === DataSeries::TYPE_BARCHART) || ($chartType === DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 150); + $objWriter->endElement(); + + if ($plotGroupingType == 'percentStacked' || $plotGroupingType == 'stacked') { + $objWriter->startElement('c:overlap'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + } + } elseif ($chartType === DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:bubbleScale'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + + $objWriter->startElement('c:showNegBubbles'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } elseif ($chartType === DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('c:hiLowLines'); + $objWriter->endElement(); + + $objWriter->startElement('c:upDownBars'); + + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 300); + $objWriter->endElement(); + + $objWriter->startElement('c:upBars'); + $objWriter->endElement(); + + $objWriter->startElement('c:downBars'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // Generate 2 unique numbers to use for axId values + $id1 = '75091328'; + $id2 = '75089408'; + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:firstSliceAng'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + if ($chartType === DataSeries::TYPE_DONUTCHART) { + $objWriter->startElement('c:holeSize'); + $objWriter->writeAttribute('val', 50); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + if ($chartType === DataSeries::TYPE_BUBBLECHART) { + $this->writeValueAxis($objWriter, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } else { + $this->writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $catIsMultiLevelSeries, $yAxis); + } + + $this->writeValueAxis($objWriter, $yAxisLabel, $chartType, $id1, $id2, $valIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } + + $objWriter->endElement(); + } + + /** + * Write Data Labels. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Chart\Layout $chartLayout Chart layout + */ + private function writeDataLabels(XMLWriter $objWriter, ?Layout $chartLayout = null): void + { + $objWriter->startElement('c:dLbls'); + + $objWriter->startElement('c:showLegendKey'); + $showLegendKey = (empty($chartLayout)) ? 0 : $chartLayout->getShowLegendKey(); + $objWriter->writeAttribute('val', ((empty($showLegendKey)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showVal'); + $showVal = (empty($chartLayout)) ? 0 : $chartLayout->getShowVal(); + $objWriter->writeAttribute('val', ((empty($showVal)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showCatName'); + $showCatName = (empty($chartLayout)) ? 0 : $chartLayout->getShowCatName(); + $objWriter->writeAttribute('val', ((empty($showCatName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showSerName'); + $showSerName = (empty($chartLayout)) ? 0 : $chartLayout->getShowSerName(); + $objWriter->writeAttribute('val', ((empty($showSerName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showPercent'); + $showPercent = (empty($chartLayout)) ? 0 : $chartLayout->getShowPercent(); + $objWriter->writeAttribute('val', ((empty($showPercent)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showBubbleSize'); + $showBubbleSize = (empty($chartLayout)) ? 0 : $chartLayout->getShowBubbleSize(); + $objWriter->writeAttribute('val', ((empty($showBubbleSize)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showLeaderLines'); + $showLeaderLines = (empty($chartLayout)) ? 1 : $chartLayout->getShowLeaderLines(); + $objWriter->writeAttribute('val', ((empty($showLeaderLines)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Category Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $xAxisLabel + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + */ + private function writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $isMultiLevelSeries, Axis $yAxis): void + { + $objWriter->startElement('c:catAx'); + + if ($id1 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('orientation')); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'b'); + $objWriter->endElement(); + + if ($xAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $xAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $layout = $xAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $yAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $yAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + if ($id2 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:auto'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + + $objWriter->startElement('c:lblAlgn'); + $objWriter->writeAttribute('val', 'ctr'); + $objWriter->endElement(); + + $objWriter->startElement('c:lblOffset'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + + if ($isMultiLevelSeries) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Value Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $yAxisLabel + * @param string $groupType Chart type + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + */ + private function writeValueAxis($objWriter, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, Axis $xAxis, GridLines $majorGridlines, GridLines $minorGridlines): void + { + $objWriter->startElement('c:valAx'); + + if ($id2 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + + if ($xAxis->getAxisOptionsProperty('maximum') !== null) { + $objWriter->startElement('c:max'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('maximum')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minimum') !== null) { + $objWriter->startElement('c:min'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minimum')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'l'); + $objWriter->endElement(); + + $objWriter->startElement('c:majorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($majorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$majorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $majorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($majorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + $objWriter->startElement('a:effectLst'); + + if ($majorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $majorGridlines->getGlowSize()); + $objWriter->startElement("a:{$majorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($majorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$majorGridlines->getShadowProperty('effect')}"); + if ($majorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $majorGridlines->getShadowProperty('blur')); + } + if ($majorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $majorGridlines->getShadowProperty('distance')); + } + if ($majorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $majorGridlines->getShadowProperty('direction')); + } + if ($majorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $majorGridlines->getShadowProperty('algn')); + } + if ($majorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $majorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($majorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $majorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($majorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $majorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($majorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $majorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$majorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'value'])); + + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($majorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $majorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end majorGridLines + + if ($minorGridlines->getObjectState()) { + $objWriter->startElement('c:minorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($minorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$minorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $minorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($minorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + + $objWriter->startElement('a:effectLst'); + + if ($minorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $minorGridlines->getGlowSize()); + $objWriter->startElement("a:{$minorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($minorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$minorGridlines->getShadowProperty('effect')}"); + if ($minorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $minorGridlines->getShadowProperty('blur')); + } + if ($minorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $minorGridlines->getShadowProperty('distance')); + } + if ($minorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $minorGridlines->getShadowProperty('direction')); + } + if ($minorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $minorGridlines->getShadowProperty('algn')); + } + if ($minorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $minorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($minorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $minorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($minorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $minorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($minorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $minorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$minorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($minorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $minorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end minorGridLines + } + + if ($yAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $yAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $layout = $yAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + } + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $xAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $xAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + + if ($xAxis->getFillProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:ln'); + + $objWriter->writeAttribute('w', $xAxis->getLineStyleProperty('width')); + $objWriter->writeAttribute('cap', $xAxis->getLineStyleProperty('cap')); + $objWriter->writeAttribute('cmpd', $xAxis->getLineStyleProperty('compound')); + + if ($xAxis->getLineProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $xAxis->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($xAxis->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('head')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('head')); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('end')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('end')); + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->startElement('a:effectLst'); + + if ($xAxis->getGlowProperty('size') !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $xAxis->getGlowProperty('size')); + $objWriter->startElement("a:{$xAxis->getGlowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($xAxis->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$xAxis->getShadowProperty('effect')}"); + + if ($xAxis->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $xAxis->getShadowProperty('blur')); + } + if ($xAxis->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $xAxis->getShadowProperty('distance')); + } + if ($xAxis->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $xAxis->getShadowProperty('direction')); + } + if ($xAxis->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $xAxis->getShadowProperty('algn')); + } + if ($xAxis->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(['size', 'sx'])); + } + if ($xAxis->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(['size', 'sy'])); + } + if ($xAxis->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(['size', 'kx'])); + } + if ($xAxis->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $xAxis->getShadowProperty('rotWithShape')); + } + + $objWriter->startElement("a:{$xAxis->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + if ($xAxis->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $xAxis->getSoftEdgesSize()); + $objWriter->endElement(); + } + + $objWriter->endElement(); //effectList + $objWriter->endElement(); //end spPr + + if ($id1 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('horizontal_crosses_value') !== null) { + $objWriter->startElement('c:crossesAt'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses_value')); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:crossBetween'); + $objWriter->writeAttribute('val', 'midCat'); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('major_unit') !== null) { + $objWriter->startElement('c:majorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_unit')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minor_unit') !== null) { + $objWriter->startElement('c:minorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_unit')); + $objWriter->endElement(); + } + } + + if ($isMultiLevelSeries) { + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Get the data series type(s) for a chart plot series. + * + * @param PlotArea $plotArea + * + * @return array|string + */ + private static function getChartType($plotArea) + { + $groupCount = $plotArea->getPlotGroupCount(); + + if ($groupCount == 1) { + $chartType = [$plotArea->getPlotGroupByIndex(0)->getPlotType()]; + } else { + $chartTypes = []; + for ($i = 0; $i < $groupCount; ++$i) { + $chartTypes[] = $plotArea->getPlotGroupByIndex($i)->getPlotType(); + } + $chartType = array_unique($chartTypes); + if (count($chartTypes) == 0) { + throw new WriterException('Chart is not yet implemented'); + } + } + + return $chartType; + } + + /** + * Method writing plot series values. + * + * @param XMLWriter $objWriter XML Writer + * @param int $val value for idx (default: 3) + * @param string $fillColor hex color (default: FF9900) + * + * @return XMLWriter XML Writer + */ + private function writePlotSeriesValuesElement($objWriter, $val = 3, $fillColor = 'FF9900') + { + $objWriter->startElement('c:dPt'); + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $val); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter; + } + + /** + * Write Plot Group (series of related plots). + * + * @param DataSeries $plotGroup + * @param string $groupType Type of plot for dataseries + * @param XMLWriter $objWriter XML Writer + * @param bool &$catIsMultiLevelSeries Is category a multi-series category + * @param bool &$valIsMultiLevelSeries Is value set a multi-series set + * @param string &$plotGroupingType Type of grouping for multi-series values + */ + private function writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType): void + { + if ($plotGroup === null) { + return; + } + + if (($groupType == DataSeries::TYPE_BARCHART) || ($groupType == DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:barDir'); + $objWriter->writeAttribute('val', $plotGroup->getPlotDirection()); + $objWriter->endElement(); + } + + if ($plotGroup->getPlotGrouping() !== null) { + $plotGroupingType = $plotGroup->getPlotGrouping(); + $objWriter->startElement('c:grouping'); + $objWriter->writeAttribute('val', $plotGroupingType); + $objWriter->endElement(); + } + + // Get these details before the loop, because we can use the count to check for varyColors + $plotSeriesOrder = $plotGroup->getPlotOrder(); + $plotSeriesCount = count($plotSeriesOrder); + + if (($groupType !== DataSeries::TYPE_RADARCHART) && ($groupType !== DataSeries::TYPE_STOCKCHART)) { + if ($groupType !== DataSeries::TYPE_LINECHART) { + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + } + + foreach ($plotSeriesOrder as $plotSeriesIdx => $plotSeriesRef) { + $objWriter->startElement('c:ser'); + + $plotLabel = $plotGroup->getPlotLabelByIndex($plotSeriesIdx); + if ($plotLabel) { + $fillColor = $plotLabel->getFillColor(); + if ($fillColor !== null && !is_array($fillColor)) { + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesIdx); + $objWriter->endElement(); + + $objWriter->startElement('c:order'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesRef); + $objWriter->endElement(); + + // Values + $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + $fillColorValues = $plotSeriesValues->getFillColor(); + if ($fillColorValues !== null && is_array($fillColorValues)) { + foreach ($plotSeriesValues->getDataValues() as $dataKey => $dataValue) { + $this->writePlotSeriesValuesElement($objWriter, $dataKey, ($fillColorValues[$dataKey] ?? 'FF9900')); + } + } else { + $this->writePlotSeriesValuesElement($objWriter); + } + } + + // Labels + $plotSeriesLabel = $plotGroup->getPlotLabelByIndex($plotSeriesRef); + if ($plotSeriesLabel && ($plotSeriesLabel->getPointCount() > 0)) { + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:strRef'); + $this->writePlotSeriesLabel($plotSeriesLabel, $objWriter); + $objWriter->endElement(); + $objWriter->endElement(); + } + + // Formatting for the points + if (($groupType == DataSeries::TYPE_LINECHART) || ($groupType == DataSeries::TYPE_STOCKCHART)) { + $plotLineWidth = 12700; + if ($plotSeriesValues) { + $plotLineWidth = $plotSeriesValues->getLineWidth(); + } + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $plotLineWidth); + if ($groupType == DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('a:noFill'); + $objWriter->endElement(); + } + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($plotSeriesValues) { + $plotSeriesMarker = $plotSeriesValues->getPointMarker(); + if ($plotSeriesMarker) { + $objWriter->startElement('c:marker'); + $objWriter->startElement('c:symbol'); + $objWriter->writeAttribute('val', $plotSeriesMarker); + $objWriter->endElement(); + + if ($plotSeriesMarker !== 'none') { + $objWriter->startElement('c:size'); + $objWriter->writeAttribute('val', 3); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + if (($groupType === DataSeries::TYPE_BARCHART) || ($groupType === DataSeries::TYPE_BARCHART_3D) || ($groupType === DataSeries::TYPE_BUBBLECHART)) { + $objWriter->startElement('c:invertIfNegative'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + // Category Labels + $plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesRef); + if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) { + $catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries(); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + if ($plotGroup->getPlotStyle() !== null) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($plotStyle) { + $objWriter->startElement('c:explosion'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + } + } + } + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:xVal'); + } else { + $objWriter->startElement('c:cat'); + } + + $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str'); + $objWriter->endElement(); + } + + // Values + if ($plotSeriesValues) { + $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries(); + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:yVal'); + } else { + $objWriter->startElement('c:val'); + } + + $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num'); + $objWriter->endElement(); + } + + if ($groupType === DataSeries::TYPE_BUBBLECHART) { + $this->writeBubbles($plotSeriesValues, $objWriter); + } + + $objWriter->endElement(); + } + + $this->seriesIndex += $plotSeriesIdx + 1; + } + + /** + * Write Plot Series Label. + * + * @param DataSeriesValues $plotSeriesLabel + * @param XMLWriter $objWriter XML Writer + */ + private function writePlotSeriesLabel($plotSeriesLabel, $objWriter): void + { + if ($plotSeriesLabel === null) { + return; + } + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesLabel->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:strCache'); + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesLabel->getPointCount()); + $objWriter->endElement(); + + foreach ($plotSeriesLabel->getDataValues() as $plotLabelKey => $plotLabelValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotLabelKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotLabelValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Plot Series Values. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + * @param string $groupType Type of plot for dataseries + * @param string $dataType Datatype of series values + */ + private function writePlotSeriesValues($plotSeriesValues, XMLWriter $objWriter, $groupType, $dataType = 'str'): void + { + if ($plotSeriesValues === null) { + return; + } + + if ($plotSeriesValues->isMultiLevelSeries()) { + $levelCount = $plotSeriesValues->multiLevelCount(); + + $objWriter->startElement('c:multiLvlStrRef'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:multiLvlStrCache'); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + for ($level = 0; $level < $levelCount; ++$level) { + $objWriter->startElement('c:lvl'); + + foreach ($plotSeriesValues->getDataValues() as $plotSeriesKey => $plotSeriesValue) { + if (isset($plotSeriesValue[$level])) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue[$level]); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } else { + $objWriter->startElement('c:' . $dataType . 'Ref'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:' . $dataType . 'Cache'); + + if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { + if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData($plotSeriesValues->getFormatCode()); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Bubble Chart Details. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + */ + private function writeBubbles($plotSeriesValues, $objWriter): void + { + if ($plotSeriesValues === null) { + return; + } + + $objWriter->startElement('c:bubbleSize'); + $objWriter->startElement('c:numLit'); + + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData('General'); + $objWriter->endElement(); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + $objWriter->startElement('c:v'); + $objWriter->writeRawData(1); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + /** + * Write Layout. + * + * @param XMLWriter $objWriter XML Writer + * @param Layout $layout + */ + private function writeLayout(XMLWriter $objWriter, ?Layout $layout = null): void + { + $objWriter->startElement('c:layout'); + + if ($layout !== null) { + $objWriter->startElement('c:manualLayout'); + + $layoutTarget = $layout->getLayoutTarget(); + if ($layoutTarget !== null) { + $objWriter->startElement('c:layoutTarget'); + $objWriter->writeAttribute('val', $layoutTarget); + $objWriter->endElement(); + } + + $xMode = $layout->getXMode(); + if ($xMode !== null) { + $objWriter->startElement('c:xMode'); + $objWriter->writeAttribute('val', $xMode); + $objWriter->endElement(); + } + + $yMode = $layout->getYMode(); + if ($yMode !== null) { + $objWriter->startElement('c:yMode'); + $objWriter->writeAttribute('val', $yMode); + $objWriter->endElement(); + } + + $x = $layout->getXPosition(); + if ($x !== null) { + $objWriter->startElement('c:x'); + $objWriter->writeAttribute('val', $x); + $objWriter->endElement(); + } + + $y = $layout->getYPosition(); + if ($y !== null) { + $objWriter->startElement('c:y'); + $objWriter->writeAttribute('val', $y); + $objWriter->endElement(); + } + + $w = $layout->getWidth(); + if ($w !== null) { + $objWriter->startElement('c:w'); + $objWriter->writeAttribute('val', $w); + $objWriter->endElement(); + } + + $h = $layout->getHeight(); + if ($h !== null) { + $objWriter->startElement('c:h'); + $objWriter->writeAttribute('val', $h); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Alternate Content block. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeAlternateContent($objWriter): void + { + $objWriter->startElement('mc:AlternateContent'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + + $objWriter->startElement('mc:Choice'); + $objWriter->writeAttribute('xmlns:c14', 'http://schemas.microsoft.com/office/drawing/2007/8/2/chart'); + $objWriter->writeAttribute('Requires', 'c14'); + + $objWriter->startElement('c14:style'); + $objWriter->writeAttribute('val', '102'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('mc:Fallback'); + $objWriter->startElement('c:style'); + $objWriter->writeAttribute('val', '2'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Printer Settings. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writePrintSettings($objWriter): void + { + $objWriter->startElement('c:printSettings'); + + $objWriter->startElement('c:headerFooter'); + $objWriter->endElement(); + + $objWriter->startElement('c:pageMargins'); + $objWriter->writeAttribute('footer', 0.3); + $objWriter->writeAttribute('header', 0.3); + $objWriter->writeAttribute('r', 0.7); + $objWriter->writeAttribute('l', 0.7); + $objWriter->writeAttribute('t', 0.75); + $objWriter->writeAttribute('b', 0.75); + $objWriter->endElement(); + + $objWriter->startElement('c:pageSetup'); + $objWriter->writeAttribute('orientation', 'portrait'); + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Comments.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Comments.php new file mode 100755 index 0000000..73c4308 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Comments.php @@ -0,0 +1,232 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // Authors cache + $authors = []; + $authorId = 0; + foreach ($comments as $comment) { + if (!isset($authors[$comment->getAuthor()])) { + $authors[$comment->getAuthor()] = $authorId++; + } + } + + // comments + $objWriter->startElement('comments'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // Loop through authors + $objWriter->startElement('authors'); + foreach ($authors as $author => $index) { + $objWriter->writeElement('author', $author); + } + $objWriter->endElement(); + + // Loop through comments + $objWriter->startElement('commentList'); + foreach ($comments as $key => $value) { + $this->writeComment($objWriter, $key, $value, $authors); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference + * @param Comment $pComment Comment + * @param array $pAuthors Array of authors + */ + private function writeComment(XMLWriter $objWriter, $pCellReference, Comment $pComment, array $pAuthors): void + { + // comment + $objWriter->startElement('comment'); + $objWriter->writeAttribute('ref', $pCellReference); + $objWriter->writeAttribute('authorId', $pAuthors[$pComment->getAuthor()]); + + // text + $objWriter->startElement('text'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write VML comments to XML format. + * + * @return string XML Output + */ + public function writeVMLComments(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t202'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '202'); + $objWriter->writeAttribute('path', 'm,l,21600r21600,l21600,xe'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through comments + foreach ($comments as $key => $value) { + $this->writeVMLComment($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference, eg: 'A1' + * @param Comment $pComment Comment + */ + private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment): void + { + // Metadata + [$column, $row] = Coordinate::coordinateFromString($pCellReference); + $column = Coordinate::columnIndexFromString($column); + $id = 1024 + $column + $row; + $id = substr($id, 0, 4); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t202'); + $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden')); + $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->writeAttribute('o:insetmode', 'auto'); + + // v:fill + $objWriter->startElement('v:fill'); + $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->endElement(); + + // v:shadow + $objWriter->startElement('v:shadow'); + $objWriter->writeAttribute('on', 't'); + $objWriter->writeAttribute('color', 'black'); + $objWriter->writeAttribute('obscured', 't'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:connecttype', 'none'); + $objWriter->endElement(); + + // v:textbox + $objWriter->startElement('v:textbox'); + $objWriter->writeAttribute('style', 'mso-direction-alt:auto'); + + // div + $objWriter->startElement('div'); + $objWriter->writeAttribute('style', 'text-align:left'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // x:ClientData + $objWriter->startElement('x:ClientData'); + $objWriter->writeAttribute('ObjectType', 'Note'); + + // x:MoveWithCells + $objWriter->writeElement('x:MoveWithCells', ''); + + // x:SizeWithCells + $objWriter->writeElement('x:SizeWithCells', ''); + + // x:AutoFill + $objWriter->writeElement('x:AutoFill', 'False'); + + // x:Row + $objWriter->writeElement('x:Row', ($row - 1)); + + // x:Column + $objWriter->writeElement('x:Column', ($column - 1)); + + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/ContentTypes.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/ContentTypes.php new file mode 100755 index 0000000..2cff1a8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/ContentTypes.php @@ -0,0 +1,240 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Types + $objWriter->startElement('Types'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types'); + + // Theme + $this->writeOverrideContentType($objWriter, '/xl/theme/theme1.xml', 'application/vnd.openxmlformats-officedocument.theme+xml'); + + // Styles + $this->writeOverrideContentType($objWriter, '/xl/styles.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'); + + // Rels + $this->writeDefaultContentType($objWriter, 'rels', 'application/vnd.openxmlformats-package.relationships+xml'); + + // XML + $this->writeDefaultContentType($objWriter, 'xml', 'application/xml'); + + // VML + $this->writeDefaultContentType($objWriter, 'vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'); + + // Workbook + if ($spreadsheet->hasMacros()) { //Macros in workbook ? + // Yes : not standard content but "macroEnabled" + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'); + //... and define a new type for the VBA project + // Better use Override, because we can use 'bin' also for xl\printerSettings\printerSettings1.bin + $this->writeOverrideContentType($objWriter, '/xl/vbaProject.bin', 'application/vnd.ms-office.vbaProject'); + if ($spreadsheet->hasMacrosCertificate()) { + // signed macros ? + // Yes : add needed information + $this->writeOverrideContentType($objWriter, '/xl/vbaProjectSignature.bin', 'application/vnd.ms-office.vbaProjectSignature'); + } + } else { + // no macros in workbook, so standard type + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'); + } + + // DocProps + $this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml'); + + $this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + $this->writeOverrideContentType($objWriter, '/docProps/custom.xml', 'application/vnd.openxmlformats-officedocument.custom-properties+xml'); + } + + // Worksheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'); + } + + // Shared strings + $this->writeOverrideContentType($objWriter, '/xl/sharedStrings.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'); + + // Add worksheet relationship content types + $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData(); + $chart = 1; + for ($i = 0; $i < $sheetCount; ++$i) { + $drawings = $spreadsheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + $chartCount = ($includeCharts) ? $spreadsheet->getSheet($i)->getChartCount() : 0; + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$spreadsheet->getSheet($i)->getCodeName()]['drawingOriginalIds']); + + // We need a drawing relationship for the worksheet if we have either drawings or charts + if (($drawingCount > 0) || ($chartCount > 0) || $hasUnparsedDrawing) { + $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml'); + } + + // If we have charts, then we need a chart relationship for every individual chart + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'); + } + } + } + + // Comments + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getComments()) > 0) { + $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'); + } + } + + // Add media content-types + $aMediaContentTypes = []; + $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count(); + for ($i = 0; $i < $mediaCount; ++$i) { + $extension = ''; + $mimeType = ''; + + if ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getExtension()); + $mimeType = $this->getImageMimeType($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getPath()); + } elseif ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType()); + $extension = explode('/', $extension); + $extension = $extension[1]; + + $mimeType = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType(); + } + + if (!isset($aMediaContentTypes[$extension])) { + $aMediaContentTypes[$extension] = $mimeType; + + $this->writeDefaultContentType($objWriter, $extension, $mimeType); + } + } + if ($spreadsheet->hasRibbonBinObjects()) { + // Some additional objects in the ribbon ? + // we need to write "Extension" but not already write for media content + $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes)); + foreach ($tabRibbonTypes as $aRibbonType) { + $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor + $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType); + } + } + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + foreach ($spreadsheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + if (!isset($aMediaContentTypes[strtolower($image->getExtension())])) { + $aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath()); + + $this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]); + } + } + } + } + + // unparsed defaults + if (isset($unparsedLoadedData['default_content_types'])) { + foreach ($unparsedLoadedData['default_content_types'] as $extName => $contentType) { + $this->writeDefaultContentType($objWriter, $extName, $contentType); + } + } + + // unparsed overrides + if (isset($unparsedLoadedData['override_content_types'])) { + foreach ($unparsedLoadedData['override_content_types'] as $partName => $overrideType) { + $this->writeOverrideContentType($objWriter, $partName, $overrideType); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Get image mime type. + * + * @param string $pFile Filename + * + * @return string Mime Type + */ + private function getImageMimeType($pFile) + { + if (File::fileExists($pFile)) { + $image = getimagesize($pFile); + + return image_type_to_mime_type($image[2]); + } + + throw new WriterException("File $pFile does not exist"); + } + + /** + * Write Default content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + */ + private function writeDefaultContentType(XMLWriter $objWriter, $pPartname, $pContentType): void + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Default'); + $objWriter->writeAttribute('Extension', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + */ + private function writeOverrideContentType(XMLWriter $objWriter, $pPartname, $pContentType): void + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Override'); + $objWriter->writeAttribute('PartName', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/DocProps.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/DocProps.php new file mode 100755 index 0000000..bcbc237 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/DocProps.php @@ -0,0 +1,239 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Properties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + // Application + $objWriter->writeElement('Application', 'Microsoft Excel'); + + // DocSecurity + $objWriter->writeElement('DocSecurity', '0'); + + // ScaleCrop + $objWriter->writeElement('ScaleCrop', 'false'); + + // HeadingPairs + $objWriter->startElement('HeadingPairs'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', '2'); + $objWriter->writeAttribute('baseType', 'variant'); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:lpstr', 'Worksheets'); + $objWriter->endElement(); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:i4', $spreadsheet->getSheetCount()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // TitlesOfParts + $objWriter->startElement('TitlesOfParts'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', $spreadsheet->getSheetCount()); + $objWriter->writeAttribute('baseType', 'lpstr'); + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->writeElement('vt:lpstr', $spreadsheet->getSheet($i)->getTitle()); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + + // Company + $objWriter->writeElement('Company', $spreadsheet->getProperties()->getCompany()); + + // Company + $objWriter->writeElement('Manager', $spreadsheet->getProperties()->getManager()); + + // LinksUpToDate + $objWriter->writeElement('LinksUpToDate', 'false'); + + // SharedDoc + $objWriter->writeElement('SharedDoc', 'false'); + + // HyperlinksChanged + $objWriter->writeElement('HyperlinksChanged', 'false'); + + // AppVersion + $objWriter->writeElement('AppVersion', '12.0000'); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/core.xml to XML format. + * + * @return string XML Output + */ + public function writeDocPropsCore(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('cp:coreProperties'); + $objWriter->writeAttribute('xmlns:cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:dcterms', 'http://purl.org/dc/terms/'); + $objWriter->writeAttribute('xmlns:dcmitype', 'http://purl.org/dc/dcmitype/'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + + // dc:creator + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + + // cp:lastModifiedBy + $objWriter->writeElement('cp:lastModifiedBy', $spreadsheet->getProperties()->getLastModifiedBy()); + + // dcterms:created + $objWriter->startElement('dcterms:created'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->endElement(); + + // dcterms:modified + $objWriter->startElement('dcterms:modified'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getModified())); + $objWriter->endElement(); + + // dc:title + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + + // dc:description + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + + // dc:subject + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + + // cp:keywords + $objWriter->writeElement('cp:keywords', $spreadsheet->getProperties()->getKeywords()); + + // cp:category + $objWriter->writeElement('cp:category', $spreadsheet->getProperties()->getCategory()); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/custom.xml to XML format. + * + * @return string XML Output + */ + public function writeDocPropsCustom(Spreadsheet $spreadsheet) + { + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (empty($customPropertyList)) { + return; + } + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + foreach ($customPropertyList as $key => $customProperty) { + $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty); + $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty); + + $objWriter->startElement('property'); + $objWriter->writeAttribute('fmtid', '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}'); + $objWriter->writeAttribute('pid', $key + 2); + $objWriter->writeAttribute('name', $customProperty); + + switch ($propertyType) { + case 'i': + $objWriter->writeElement('vt:i4', $propertyValue); + + break; + case 'f': + $objWriter->writeElement('vt:r8', $propertyValue); + + break; + case 'b': + $objWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false'); + + break; + case 'd': + $objWriter->startElement('vt:filetime'); + $objWriter->writeRawData(date(DATE_W3C, $propertyValue)); + $objWriter->endElement(); + + break; + default: + $objWriter->writeElement('vt:lpwstr', $propertyValue); + + break; + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Drawing.php new file mode 100755 index 0000000..1713b98 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Drawing.php @@ -0,0 +1,505 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // xdr:wsDr + $objWriter->startElement('xdr:wsDr'); + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + + // Loop through images and write drawings + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + /** @var BaseDrawing $pDrawing */ + $pDrawing = $iterator->current(); + $pRelationId = $i; + $hlinkClickId = $pDrawing->getHyperlink() === null ? null : ++$i; + + $this->writeDrawing($objWriter, $pDrawing, $pRelationId, $hlinkClickId); + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + $chartCount = $pWorksheet->getChartCount(); + // Loop through charts and write the chart position + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c + $i); + } + } + } + + // unparsed AlternateContent + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'])) { + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'] as $drawingAlternateContent) { + $objWriter->writeRaw($drawingAlternateContent); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pRelationId + */ + public function writeChart(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $pRelationId = -1): void + { + $tl = $pChart->getTopLeftPosition(); + $tl['colRow'] = Coordinate::coordinateFromString($tl['cell']); + $br = $pChart->getBottomRightPosition(); + $br['colRow'] = Coordinate::coordinateFromString($br['cell']); + + $objWriter->startElement('xdr:twoCellAnchor'); + + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($tl['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['xOffset'])); + $objWriter->writeElement('xdr:row', $tl['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['yOffset'])); + $objWriter->endElement(); + $objWriter->startElement('xdr:to'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($br['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['xOffset'])); + $objWriter->writeElement('xdr:row', $br['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['yOffset'])); + $objWriter->endElement(); + + $objWriter->startElement('xdr:graphicFrame'); + $objWriter->writeAttribute('macro', ''); + $objWriter->startElement('xdr:nvGraphicFramePr'); + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('name', 'Chart ' . $pRelationId); + $objWriter->writeAttribute('id', 1025 * $pRelationId); + $objWriter->endElement(); + $objWriter->startElement('xdr:cNvGraphicFramePr'); + $objWriter->startElement('a:graphicFrameLocks'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:xfrm'); + $objWriter->startElement('a:off'); + $objWriter->writeAttribute('x', '0'); + $objWriter->writeAttribute('y', '0'); + $objWriter->endElement(); + $objWriter->startElement('a:ext'); + $objWriter->writeAttribute('cx', '0'); + $objWriter->writeAttribute('cy', '0'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:graphic'); + $objWriter->startElement('a:graphicData'); + $objWriter->writeAttribute('uri', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->startElement('c:chart'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $pRelationId); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:clientData'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pRelationId + * @param null|int $hlinkClickId + */ + public function writeDrawing(XMLWriter $objWriter, BaseDrawing $pDrawing, $pRelationId = -1, $hlinkClickId = null): void + { + if ($pRelationId >= 0) { + // xdr:oneCellAnchor + $objWriter->startElement('xdr:oneCellAnchor'); + // Image location + $aCoordinates = Coordinate::coordinateFromString($pDrawing->getCoordinates()); + $aCoordinates[0] = Coordinate::columnIndexFromString($aCoordinates[0]); + + // xdr:from + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', $aCoordinates[0] - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetX())); + $objWriter->writeElement('xdr:row', $aCoordinates[1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetY())); + $objWriter->endElement(); + + // xdr:ext + $objWriter->startElement('xdr:ext'); + $objWriter->writeAttribute('cx', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getWidth())); + $objWriter->writeAttribute('cy', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getHeight())); + $objWriter->endElement(); + + // xdr:pic + $objWriter->startElement('xdr:pic'); + + // xdr:nvPicPr + $objWriter->startElement('xdr:nvPicPr'); + + // xdr:cNvPr + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('id', $pRelationId); + $objWriter->writeAttribute('name', $pDrawing->getName()); + $objWriter->writeAttribute('descr', $pDrawing->getDescription()); + + //a:hlinkClick + $this->writeHyperLinkDrawing($objWriter, $hlinkClickId); + + $objWriter->endElement(); + + // xdr:cNvPicPr + $objWriter->startElement('xdr:cNvPicPr'); + + // a:picLocks + $objWriter->startElement('a:picLocks'); + $objWriter->writeAttribute('noChangeAspect', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:blipFill + $objWriter->startElement('xdr:blipFill'); + + // a:blip + $objWriter->startElement('a:blip'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId); + $objWriter->endElement(); + + // a:stretch + $objWriter->startElement('a:stretch'); + $objWriter->writeElement('a:fillRect', null); + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:spPr + $objWriter->startElement('xdr:spPr'); + + // a:xfrm + $objWriter->startElement('a:xfrm'); + $objWriter->writeAttribute('rot', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getRotation())); + $objWriter->endElement(); + + // a:prstGeom + $objWriter->startElement('a:prstGeom'); + $objWriter->writeAttribute('prst', 'rect'); + + // a:avLst + $objWriter->writeElement('a:avLst', null); + + $objWriter->endElement(); + + if ($pDrawing->getShadow()->getVisible()) { + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getBlurRadius())); + $objWriter->writeAttribute('dist', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getDistance())); + $objWriter->writeAttribute('dir', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getShadow()->getDirection())); + $objWriter->writeAttribute('algn', $pDrawing->getShadow()->getAlignment()); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getColor()->getRGB()); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getAlpha() * 1000); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:clientData + $objWriter->writeElement('xdr:clientData', null); + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write VML header/footer images to XML format. + * + * @return string XML Output + */ + public function writeVMLHeaderFooterImages(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Header/footer images + $images = $pWorksheet->getHeaderFooter()->getImages(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t75'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '75'); + $objWriter->writeAttribute('o:preferrelative', 't'); + $objWriter->writeAttribute('path', 'm@4@5l@4@11@9@11@9@5xe'); + $objWriter->writeAttribute('filled', 'f'); + $objWriter->writeAttribute('stroked', 'f'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:formulas + $objWriter->startElement('v:formulas'); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'if lineDrawn pixelLineWidth 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 1 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum 0 0 @1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @2 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 0 1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @6 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @8 21600 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @10 21600 0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:extrusionok', 'f'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('aspectratio', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through images + foreach ($images as $key => $value) { + $this->writeVMLHeaderFooterImage($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pReference Reference + * @param HeaderFooterDrawing $pImage Image + */ + private function writeVMLHeaderFooterImage(XMLWriter $objWriter, $pReference, HeaderFooterDrawing $pImage): void + { + // Calculate object id + preg_match('{(\d+)}', md5($pReference), $m); + $id = 1500 + (substr($m[1], 0, 2) * 1); + + // Calculate offset + $width = $pImage->getWidth(); + $height = $pImage->getHeight(); + $marginLeft = $pImage->getOffsetX(); + $marginTop = $pImage->getOffsetY(); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', $pReference); + $objWriter->writeAttribute('o:spid', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t75'); + $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1"); + + // v:imagedata + $objWriter->startElement('v:imagedata'); + $objWriter->writeAttribute('o:relid', 'rId' . $pReference); + $objWriter->writeAttribute('o:title', $pImage->getName()); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('textRotation', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Get an array of all drawings. + * + * @return \PhpOffice\PhpSpreadsheet\Worksheet\Drawing[] All drawings in PhpSpreadsheet + */ + public function allDrawings(Spreadsheet $spreadsheet) + { + // Get an array of all drawings + $aDrawings = []; + + // Loop through PhpSpreadsheet + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // Loop through images and add to array + $iterator = $spreadsheet->getSheet($i)->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + $aDrawings[] = $iterator->current(); + + $iterator->next(); + } + } + + return $aDrawings; + } + + /** + * @param null|int $hlinkClickId + */ + private function writeHyperLinkDrawing(XMLWriter $objWriter, $hlinkClickId): void + { + if ($hlinkClickId === null) { + return; + } + + $objWriter->startElement('a:hlinkClick'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $hlinkClickId); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Rels.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Rels.php new file mode 100755 index 0000000..a4e5769 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Rels.php @@ -0,0 +1,449 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 4, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties', + 'docProps/custom.xml' + ); + } + + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties', + 'docProps/app.xml' + ); + + // Relationship docProps/core.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', + 'docProps/core.xml' + ); + + // Relationship xl/workbook.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', + 'xl/workbook.xml' + ); + // a custom UI in workbook ? + if ($spreadsheet->hasRibbon()) { + $this->writeRelationShip( + $objWriter, + 5, + 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility', + $spreadsheet->getRibbonXMLData('target') + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write workbook relationships to XML format. + * + * @return string XML Output + */ + public function writeWorkbookRelationships(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Relationship styles.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', + 'styles.xml' + ); + + // Relationship theme/theme1.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', + 'theme/theme1.xml' + ); + + // Relationship sharedStrings.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', + 'sharedStrings.xml' + ); + + // Relationships with sheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeRelationship( + $objWriter, + ($i + 1 + 3), + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', + 'worksheets/sheet' . ($i + 1) . '.xml' + ); + } + // Relationships for vbaProject if needed + // id : just after the last sheet + if ($spreadsheet->hasMacros()) { + $this->writeRelationShip( + $objWriter, + ($i + 1 + 3), + 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', + 'vbaProject.bin' + ); + ++$i; //increment i if needed for an another relation + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write worksheet relationships to XML format. + * + * Numbering is as follows: + * rId1 - Drawings + * rId_hyperlink_x - Hyperlinks + * + * @param int $pWorksheetId + * @param bool $includeCharts Flag indicating if we should write charts + * + * @return string XML Output + */ + public function writeWorksheetRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, $pWorksheetId = 1, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Write drawing relationships? + $drawingOriginalIds = []; + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds']; + } + + if ($includeCharts) { + $charts = $pWorksheet->getChartCollection(); + } else { + $charts = []; + } + + if (($pWorksheet->getDrawingCollection()->count() > 0) || (count($charts) > 0) || $drawingOriginalIds) { + $rId = 1; + + // Use original $relPath to get original $rId. + // Take first. In future can be overwritten. + // (! synchronize with \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet::writeDrawings) + reset($drawingOriginalIds); + $relPath = key($drawingOriginalIds); + if (isset($drawingOriginalIds[$relPath])) { + $rId = (int) (substr($drawingOriginalIds[$relPath], 3)); + } + + // Generate new $relPath to write drawing relationship + $relPath = '../drawings/drawing' . $pWorksheetId . '.xml'; + $this->writeRelationship( + $objWriter, + $rId, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', + $relPath + ); + } + + // Write hyperlink relationships? + $i = 1; + foreach ($pWorksheet->getHyperlinkCollection() as $hyperlink) { + if (!$hyperlink->isInternal()) { + $this->writeRelationship( + $objWriter, + '_hyperlink_' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $hyperlink->getUrl(), + 'External' + ); + + ++$i; + } + } + + // Write comments relationship? + $i = 1; + if (count($pWorksheet->getComments()) > 0) { + $this->writeRelationship( + $objWriter, + '_comments_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawing' . $pWorksheetId . '.vml' + ); + + $this->writeRelationship( + $objWriter, + '_comments' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', + '../comments' . $pWorksheetId . '.xml' + ); + } + + // Write header/footer relationship? + $i = 1; + if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { + $this->writeRelationship( + $objWriter, + '_headerfooter_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' + ); + } + + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'ctrlProps', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'vmlDrawings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'printerSettings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'); + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + private function writeUnparsedRelationship(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, XMLWriter $objWriter, $relationship, $type): void + { + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (!isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship])) { + return; + } + + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship] as $rId => $value) { + $this->writeRelationship( + $objWriter, + $rId, + $type, + $value['relFilePath'] + ); + } + } + + /** + * Write drawing relationships to XML format. + * + * @param int &$chartRef Chart ID + * @param bool $includeCharts Flag indicating if we should write charts + * + * @return string XML Output + */ + public function writeDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, &$chartRef, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + if ($iterator->current() instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing + || $iterator->current() instanceof MemoryDrawing) { + // Write relationship for image drawing + /** @var \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing */ + $drawing = $iterator->current(); + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . str_replace(' ', '', $drawing->getIndexedFilename()) + ); + + $i = $this->writeDrawingHyperLink($objWriter, $drawing, $i); + } + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + // Loop through charts and write relationships + $chartCount = $pWorksheet->getChartCount(); + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeRelationship( + $objWriter, + $i++, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', + '../charts/chart' . ++$chartRef . '.xml' + ); + } + } + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write header/footer drawing relationships to XML format. + * + * @return string XML Output + */ + public function writeHeaderFooterDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + foreach ($pWorksheet->getHeaderFooter()->getImages() as $key => $value) { + // Write relationship for image drawing + $this->writeRelationship( + $objWriter, + $key, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . $value->getIndexedFilename() + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pId Relationship ID. rId will be prepended! + * @param string $pType Relationship type + * @param string $pTarget Relationship target + * @param string $pTargetMode Relationship target mode + */ + private function writeRelationship(XMLWriter $objWriter, $pId, $pType, $pTarget, $pTargetMode = ''): void + { + if ($pType != '' && $pTarget != '') { + // Write relationship + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId' . $pId); + $objWriter->writeAttribute('Type', $pType); + $objWriter->writeAttribute('Target', $pTarget); + + if ($pTargetMode != '') { + $objWriter->writeAttribute('TargetMode', $pTargetMode); + } + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * @param $objWriter + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing + * @param $i + * + * @return int + */ + private function writeDrawingHyperLink($objWriter, $drawing, $i) + { + if ($drawing->getHyperlink() === null) { + return $i; + } + + ++$i; + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $drawing->getHyperlink()->getUrl(), + $drawing->getHyperlink()->getTypeHyperlink() + ); + + return $i; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php new file mode 100755 index 0000000..8005207 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php @@ -0,0 +1,45 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $localRels = $spreadsheet->getRibbonBinObjects('names'); + if (is_array($localRels)) { + foreach ($localRels as $aId => $aTarget) { + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', $aId); + $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); + $objWriter->writeAttribute('Target', $aTarget); + $objWriter->endElement(); + } + } + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsVBA.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsVBA.php new file mode 100755 index 0000000..55bcd36 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/RelsVBA.php @@ -0,0 +1,40 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId1'); + $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); + $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/StringTable.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/StringTable.php new file mode 100755 index 0000000..872d034 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -0,0 +1,278 @@ +flipStringTable($aStringTable); + + // Loop through cells + foreach ($pSheet->getCoordinates() as $coordinate) { + $cell = $pSheet->getCell($coordinate); + $cellValue = $cell->getValue(); + if (!is_object($cellValue) && + ($cellValue !== null) && + $cellValue !== '' && + !isset($aFlippedStringTable[$cellValue]) && + ($cell->getDataType() == DataType::TYPE_STRING || $cell->getDataType() == DataType::TYPE_STRING2 || $cell->getDataType() == DataType::TYPE_NULL)) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue] = true; + } elseif ($cellValue instanceof RichText && + ($cellValue !== null) && + !isset($aFlippedStringTable[$cellValue->getHashCode()])) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue->getHashCode()] = true; + } + } + + return $aStringTable; + } + + /** + * Write string table to XML format. + * + * @param string[] $pStringTable + * + * @return string XML Output + */ + public function writeStringTable(array $pStringTable) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // String table + $objWriter->startElement('sst'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('uniqueCount', count($pStringTable)); + + // Loop through string table + foreach ($pStringTable as $textElement) { + $objWriter->startElement('si'); + + if (!$textElement instanceof RichText) { + $textToWrite = StringHelper::controlCharacterPHP2OOXML($textElement); + $objWriter->startElement('t'); + if ($textToWrite !== trim($textToWrite)) { + $objWriter->writeAttribute('xml:space', 'preserve'); + } + $objWriter->writeRawData($textToWrite); + $objWriter->endElement(); + } elseif ($textElement instanceof RichText) { + $this->writeRichText($objWriter, $textElement); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText $pRichText Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichText(XMLWriter $objWriter, RichText $pRichText, $prefix = null): void + { + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + if ($element instanceof Run) { + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // rFont + $objWriter->startElement($prefix . 'rFont'); + $objWriter->writeAttribute('val', $element->getFont()->getName()); + $objWriter->endElement(); + + // Bold + $objWriter->startElement($prefix . 'b'); + $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); + $objWriter->endElement(); + + // Italic + $objWriter->startElement($prefix . 'i'); + $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); + $objWriter->endElement(); + + // Superscript / subscript + if ($element->getFont()->getSuperscript() || $element->getFont()->getSubscript()) { + $objWriter->startElement($prefix . 'vertAlign'); + if ($element->getFont()->getSuperscript()) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($element->getFont()->getSubscript()) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Strikethrough + $objWriter->startElement($prefix . 'strike'); + $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); + $objWriter->endElement(); + + // Color + $objWriter->startElement($prefix . 'color'); + $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); + $objWriter->endElement(); + + // Size + $objWriter->startElement($prefix . 'sz'); + $objWriter->writeAttribute('val', $element->getFont()->getSize()); + $objWriter->endElement(); + + // Underline + $objWriter->startElement($prefix . 'u'); + $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText|string $pRichText text string or Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichTextForCharts(XMLWriter $objWriter, $pRichText = null, $prefix = null): void + { + if (!$pRichText instanceof RichText) { + $textRun = $pRichText; + $pRichText = new RichText(); + $pRichText->createTextRun($textRun); + } + + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // Bold + $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); + // Italic + $objWriter->writeAttribute('i', ($element->getFont()->getItalic() ? 1 : 0)); + // Underline + $underlineType = $element->getFont()->getUnderline(); + switch ($underlineType) { + case 'single': + $underlineType = 'sng'; + + break; + case 'double': + $underlineType = 'dbl'; + + break; + } + $objWriter->writeAttribute('u', $underlineType); + // Strikethrough + $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); + + // rFont + $objWriter->startElement($prefix . 'latin'); + $objWriter->writeAttribute('typeface', $element->getFont()->getName()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Flip string table (for index searching). + * + * @param array $stringTable Stringtable + * + * @return array + */ + public function flipStringTable(array $stringTable) + { + // Return value + $returnValue = []; + + // Loop through stringtable and add flipped items to $returnValue + foreach ($stringTable as $key => $value) { + if (!$value instanceof RichText) { + $returnValue[$value] = $key; + } elseif ($value instanceof RichText) { + $returnValue[$value->getHashCode()] = $key; + } + } + + return $returnValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Style.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Style.php new file mode 100755 index 0000000..74300a9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Style.php @@ -0,0 +1,668 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // styleSheet + $objWriter->startElement('styleSheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // numFmts + $objWriter->startElement('numFmts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getNumFmtHashTable()->count()); + + // numFmt + for ($i = 0; $i < $this->getParentWriter()->getNumFmtHashTable()->count(); ++$i) { + $this->writeNumFmt($objWriter, $this->getParentWriter()->getNumFmtHashTable()->getByIndex($i), $i); + } + + $objWriter->endElement(); + + // fonts + $objWriter->startElement('fonts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFontHashTable()->count()); + + // font + for ($i = 0; $i < $this->getParentWriter()->getFontHashTable()->count(); ++$i) { + $this->writeFont($objWriter, $this->getParentWriter()->getFontHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // fills + $objWriter->startElement('fills'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFillHashTable()->count()); + + // fill + for ($i = 0; $i < $this->getParentWriter()->getFillHashTable()->count(); ++$i) { + $this->writeFill($objWriter, $this->getParentWriter()->getFillHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // borders + $objWriter->startElement('borders'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getBordersHashTable()->count()); + + // border + for ($i = 0; $i < $this->getParentWriter()->getBordersHashTable()->count(); ++$i) { + $this->writeBorder($objWriter, $this->getParentWriter()->getBordersHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // cellStyleXfs + $objWriter->startElement('cellStyleXfs'); + $objWriter->writeAttribute('count', 1); + + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('numFmtId', 0); + $objWriter->writeAttribute('fontId', 0); + $objWriter->writeAttribute('fillId', 0); + $objWriter->writeAttribute('borderId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // cellXfs + $objWriter->startElement('cellXfs'); + $objWriter->writeAttribute('count', count($spreadsheet->getCellXfCollection())); + + // xf + foreach ($spreadsheet->getCellXfCollection() as $cellXf) { + $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet); + } + + $objWriter->endElement(); + + // cellStyles + $objWriter->startElement('cellStyles'); + $objWriter->writeAttribute('count', 1); + + // cellStyle + $objWriter->startElement('cellStyle'); + $objWriter->writeAttribute('name', 'Normal'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('builtinId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // dxfs + $objWriter->startElement('dxfs'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getStylesConditionalHashTable()->count()); + + // dxf + for ($i = 0; $i < $this->getParentWriter()->getStylesConditionalHashTable()->count(); ++$i) { + $this->writeCellStyleDxf($objWriter, $this->getParentWriter()->getStylesConditionalHashTable()->getByIndex($i)->getStyle()); + } + + $objWriter->endElement(); + + // tableStyles + $objWriter->startElement('tableStyles'); + $objWriter->writeAttribute('defaultTableStyle', 'TableStyleMedium9'); + $objWriter->writeAttribute('defaultPivotStyle', 'PivotTableStyle1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeFill(XMLWriter $objWriter, Fill $pFill): void + { + // Check if this is a pattern type or gradient type + if ($pFill->getFillType() === Fill::FILL_GRADIENT_LINEAR || + $pFill->getFillType() === Fill::FILL_GRADIENT_PATH) { + // Gradient fill + $this->writeGradientFill($objWriter, $pFill); + } elseif ($pFill->getFillType() !== null) { + // Pattern fill + $this->writePatternFill($objWriter, $pFill); + } + } + + /** + * Write Gradient Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeGradientFill(XMLWriter $objWriter, Fill $pFill): void + { + // fill + $objWriter->startElement('fill'); + + // gradientFill + $objWriter->startElement('gradientFill'); + $objWriter->writeAttribute('type', $pFill->getFillType()); + $objWriter->writeAttribute('degree', $pFill->getRotation()); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '0'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '1'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Pattern Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writePatternFill(XMLWriter $objWriter, Fill $pFill): void + { + // fill + $objWriter->startElement('fill'); + + // patternFill + $objWriter->startElement('patternFill'); + $objWriter->writeAttribute('patternType', $pFill->getFillType()); + + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // fgColor + if ($pFill->getStartColor()->getARGB()) { + $objWriter->startElement('fgColor'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + } + } + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // bgColor + if ($pFill->getEndColor()->getARGB()) { + $objWriter->startElement('bgColor'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Font. + * + * @param XMLWriter $objWriter XML Writer + * @param Font $pFont Font style + */ + private function writeFont(XMLWriter $objWriter, Font $pFont): void + { + // font + $objWriter->startElement('font'); + // Weird! The order of these elements actually makes a difference when opening Xlsx + // files in Excel2003 with the compatibility pack. It's not documented behaviour, + // and makes for a real WTF! + + // Bold. We explicitly write this element also when false (like MS Office Excel 2007 does + // for conditional formatting). Otherwise it will apparently not be picked up in conditional + // formatting style dialog + if ($pFont->getBold() !== null) { + $objWriter->startElement('b'); + $objWriter->writeAttribute('val', $pFont->getBold() ? '1' : '0'); + $objWriter->endElement(); + } + + // Italic + if ($pFont->getItalic() !== null) { + $objWriter->startElement('i'); + $objWriter->writeAttribute('val', $pFont->getItalic() ? '1' : '0'); + $objWriter->endElement(); + } + + // Strikethrough + if ($pFont->getStrikethrough() !== null) { + $objWriter->startElement('strike'); + $objWriter->writeAttribute('val', $pFont->getStrikethrough() ? '1' : '0'); + $objWriter->endElement(); + } + + // Underline + if ($pFont->getUnderline() !== null) { + $objWriter->startElement('u'); + $objWriter->writeAttribute('val', $pFont->getUnderline()); + $objWriter->endElement(); + } + + // Superscript / subscript + if ($pFont->getSuperscript() === true || $pFont->getSubscript() === true) { + $objWriter->startElement('vertAlign'); + if ($pFont->getSuperscript() === true) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($pFont->getSubscript() === true) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Size + if ($pFont->getSize() !== null) { + $objWriter->startElement('sz'); + $objWriter->writeAttribute('val', StringHelper::formatNumber($pFont->getSize())); + $objWriter->endElement(); + } + + // Foreground color + if ($pFont->getColor()->getARGB() !== null) { + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFont->getColor()->getARGB()); + $objWriter->endElement(); + } + + // Name + if ($pFont->getName() !== null) { + $objWriter->startElement('name'); + $objWriter->writeAttribute('val', $pFont->getName()); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Border. + * + * @param XMLWriter $objWriter XML Writer + * @param Borders $pBorders Borders style + */ + private function writeBorder(XMLWriter $objWriter, Borders $pBorders): void + { + // Write border + $objWriter->startElement('border'); + // Diagonal? + switch ($pBorders->getDiagonalDirection()) { + case Borders::DIAGONAL_UP: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'false'); + + break; + case Borders::DIAGONAL_DOWN: + $objWriter->writeAttribute('diagonalUp', 'false'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + case Borders::DIAGONAL_BOTH: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + } + + // BorderPr + $this->writeBorderPr($objWriter, 'left', $pBorders->getLeft()); + $this->writeBorderPr($objWriter, 'right', $pBorders->getRight()); + $this->writeBorderPr($objWriter, 'top', $pBorders->getTop()); + $this->writeBorderPr($objWriter, 'bottom', $pBorders->getBottom()); + $this->writeBorderPr($objWriter, 'diagonal', $pBorders->getDiagonal()); + $objWriter->endElement(); + } + + /** + * Write Cell Style Xf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + * @param Spreadsheet $spreadsheet Workbook + */ + private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle, Spreadsheet $spreadsheet): void + { + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('fontId', (int) $this->getParentWriter()->getFontHashTable()->getIndexForHashCode($pStyle->getFont()->getHashCode())); + if ($pStyle->getQuotePrefix()) { + $objWriter->writeAttribute('quotePrefix', 1); + } + + if ($pStyle->getNumberFormat()->getBuiltInFormatCode() === false) { + $objWriter->writeAttribute('numFmtId', (int) ($this->getParentWriter()->getNumFmtHashTable()->getIndexForHashCode($pStyle->getNumberFormat()->getHashCode()) + 164)); + } else { + $objWriter->writeAttribute('numFmtId', (int) $pStyle->getNumberFormat()->getBuiltInFormatCode()); + } + + $objWriter->writeAttribute('fillId', (int) $this->getParentWriter()->getFillHashTable()->getIndexForHashCode($pStyle->getFill()->getHashCode())); + $objWriter->writeAttribute('borderId', (int) $this->getParentWriter()->getBordersHashTable()->getIndexForHashCode($pStyle->getBorders()->getHashCode())); + + // Apply styles? + $objWriter->writeAttribute('applyFont', ($spreadsheet->getDefaultStyle()->getFont()->getHashCode() != $pStyle->getFont()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyNumberFormat', ($spreadsheet->getDefaultStyle()->getNumberFormat()->getHashCode() != $pStyle->getNumberFormat()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyFill', ($spreadsheet->getDefaultStyle()->getFill()->getHashCode() != $pStyle->getFill()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyBorder', ($spreadsheet->getDefaultStyle()->getBorders()->getHashCode() != $pStyle->getBorders()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyAlignment', ($spreadsheet->getDefaultStyle()->getAlignment()->getHashCode() != $pStyle->getAlignment()->getHashCode()) ? '1' : '0'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('applyProtection', 'true'); + } + + // alignment + $objWriter->startElement('alignment'); + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + + $objWriter->writeAttribute('wrapText', ($pStyle->getAlignment()->getWrapText() ? 'true' : 'false')); + $objWriter->writeAttribute('shrinkToFit', ($pStyle->getAlignment()->getShrinkToFit() ? 'true' : 'false')); + + if ($pStyle->getAlignment()->getIndent() > 0) { + $objWriter->writeAttribute('indent', $pStyle->getAlignment()->getIndent()); + } + if ($pStyle->getAlignment()->getReadOrder() > 0) { + $objWriter->writeAttribute('readingOrder', $pStyle->getAlignment()->getReadOrder()); + } + $objWriter->endElement(); + + // protection + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if ($pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Cell Style Dxf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + */ + private function writeCellStyleDxf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle): void + { + // dxf + $objWriter->startElement('dxf'); + + // font + $this->writeFont($objWriter, $pStyle->getFont()); + + // numFmt + $this->writeNumFmt($objWriter, $pStyle->getNumberFormat()); + + // fill + $this->writeFill($objWriter, $pStyle->getFill()); + + // alignment + $objWriter->startElement('alignment'); + if ($pStyle->getAlignment()->getHorizontal() !== null) { + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + } + if ($pStyle->getAlignment()->getVertical() !== null) { + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + } + + if ($pStyle->getAlignment()->getTextRotation() !== null) { + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + } + $objWriter->endElement(); + + // border + $this->writeBorder($objWriter, $pStyle->getBorders()); + + // protection + if (($pStyle->getProtection()->getLocked() !== null) || ($pStyle->getProtection()->getHidden() !== null)) { + if ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT || + $pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if (($pStyle->getProtection()->getLocked() !== null) && + ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if (($pStyle->getProtection()->getHidden() !== null) && + ($pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Write BorderPr. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pName Element name + * @param Border $pBorder Border style + */ + private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder): void + { + // Write BorderPr + if ($pBorder->getBorderStyle() != Border::BORDER_NONE) { + $objWriter->startElement($pName); + $objWriter->writeAttribute('style', $pBorder->getBorderStyle()); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pBorder->getColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write NumberFormat. + * + * @param XMLWriter $objWriter XML Writer + * @param NumberFormat $pNumberFormat Number Format + * @param int $pId Number Format identifier + */ + private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0): void + { + // Translate formatcode + $formatCode = $pNumberFormat->getFormatCode(); + + // numFmt + if ($formatCode !== null) { + $objWriter->startElement('numFmt'); + $objWriter->writeAttribute('numFmtId', ($pId + 164)); + $objWriter->writeAttribute('formatCode', $formatCode); + $objWriter->endElement(); + } + } + + /** + * Get an array of all styles. + * + * @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet + */ + public function allStyles(Spreadsheet $spreadsheet) + { + return $spreadsheet->getCellXfCollection(); + } + + /** + * Get an array of all conditional styles. + * + * @return Conditional[] All conditional styles in PhpSpreadsheet + */ + public function allConditionalStyles(Spreadsheet $spreadsheet) + { + // Get an array of all styles + $aStyles = []; + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + foreach ($spreadsheet->getSheet($i)->getConditionalStylesCollection() as $conditionalStyles) { + foreach ($conditionalStyles as $conditionalStyle) { + $aStyles[] = $conditionalStyle; + } + } + } + + return $aStyles; + } + + /** + * Get an array of all fills. + * + * @return Fill[] All fills in PhpSpreadsheet + */ + public function allFills(Spreadsheet $spreadsheet) + { + // Get an array of unique fills + $aFills = []; + + // Two first fills are predefined + $fill0 = new Fill(); + $fill0->setFillType(Fill::FILL_NONE); + $aFills[] = $fill0; + + $fill1 = new Fill(); + $fill1->setFillType(Fill::FILL_PATTERN_GRAY125); + $aFills[] = $fill1; + // The remaining fills + $aStyles = $this->allStyles($spreadsheet); + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFills[$style->getFill()->getHashCode()])) { + $aFills[$style->getFill()->getHashCode()] = $style->getFill(); + } + } + + return $aFills; + } + + /** + * Get an array of all fonts. + * + * @return Font[] All fonts in PhpSpreadsheet + */ + public function allFonts(Spreadsheet $spreadsheet) + { + // Get an array of unique fonts + $aFonts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFonts[$style->getFont()->getHashCode()])) { + $aFonts[$style->getFont()->getHashCode()] = $style->getFont(); + } + } + + return $aFonts; + } + + /** + * Get an array of all borders. + * + * @return Borders[] All borders in PhpSpreadsheet + */ + public function allBorders(Spreadsheet $spreadsheet) + { + // Get an array of unique borders + $aBorders = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aBorders[$style->getBorders()->getHashCode()])) { + $aBorders[$style->getBorders()->getHashCode()] = $style->getBorders(); + } + } + + return $aBorders; + } + + /** + * Get an array of all number formats. + * + * @return NumberFormat[] All number formats in PhpSpreadsheet + */ + public function allNumberFormats(Spreadsheet $spreadsheet) + { + // Get an array of unique number formats + $aNumFmts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !isset($aNumFmts[$style->getNumberFormat()->getHashCode()])) { + $aNumFmts[$style->getNumberFormat()->getHashCode()] = $style->getNumberFormat(); + } + } + + return $aNumFmts; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Theme.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Theme.php new file mode 100755 index 0000000..3a47be7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -0,0 +1,837 @@ + 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Times New Roman', + 'Hebr' => 'Times New Roman', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'MoolBoran', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Times New Roman', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of Minor fonts to write. + * + * @var array of string + */ + private static $minorFonts = [ + 'Jpan' => 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Arial', + 'Hebr' => 'Arial', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'DaunPenh', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Arial', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of core colours. + * + * @var array of string + */ + private static $colourScheme = [ + 'dk2' => '1F497D', + 'lt2' => 'EEECE1', + 'accent1' => '4F81BD', + 'accent2' => 'C0504D', + 'accent3' => '9BBB59', + 'accent4' => '8064A2', + 'accent5' => '4BACC6', + 'accent6' => 'F79646', + 'hlink' => '0000FF', + 'folHlink' => '800080', + ]; + + /** + * Write theme to XML format. + * + * @return string XML Output + */ + public function writeTheme(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // a:theme + $objWriter->startElement('a:theme'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('name', 'Office Theme'); + + // a:themeElements + $objWriter->startElement('a:themeElements'); + + // a:clrScheme + $objWriter->startElement('a:clrScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:dk1 + $objWriter->startElement('a:dk1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'windowText'); + $objWriter->writeAttribute('lastClr', '000000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lt1 + $objWriter->startElement('a:lt1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'window'); + $objWriter->writeAttribute('lastClr', 'FFFFFF'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:dk2 + $this->writeColourScheme($objWriter); + + $objWriter->endElement(); + + // a:fontScheme + $objWriter->startElement('a:fontScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:majorFont + $objWriter->startElement('a:majorFont'); + $this->writeFonts($objWriter, 'Cambria', self::$majorFonts); + $objWriter->endElement(); + + // a:minorFont + $objWriter->startElement('a:minorFont'); + $this->writeFonts($objWriter, 'Calibri', self::$minorFonts); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:fmtScheme + $objWriter->startElement('a:fmtScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:fillStyleLst + $objWriter->startElement('a:fillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '50000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '35000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '37000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '15000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '51000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '80000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '93000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '94000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '135000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lnStyleLst + $objWriter->startElement('a:lnStyleLst'); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '9525'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '95000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '105000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '25400'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '38100'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyleLst + $objWriter->startElement('a:effectStyleLst'); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '20000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '38000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:scene3d + $objWriter->startElement('a:scene3d'); + + // a:camera + $objWriter->startElement('a:camera'); + $objWriter->writeAttribute('prst', 'orthographicFront'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lightRig + $objWriter->startElement('a:lightRig'); + $objWriter->writeAttribute('rig', 'threePt'); + $objWriter->writeAttribute('dir', 't'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '1200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:sp3d + $objWriter->startElement('a:sp3d'); + + // a:bevelT + $objWriter->startElement('a:bevelT'); + $objWriter->writeAttribute('w', '63500'); + $objWriter->writeAttribute('h', '25400'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:bgFillStyleLst + $objWriter->startElement('a:bgFillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '40000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '40000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '45000'); + $objWriter->endElement(); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '99000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '20000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '255000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '-80000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '180000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '80000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '30000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '50000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '50000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:objectDefaults + $objWriter->writeElement('a:objectDefaults', null); + + // a:extraClrSchemeLst + $objWriter->writeElement('a:extraClrSchemeLst', null); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write fonts to XML format. + * + * @param XMLWriter $objWriter + * @param string $latinFont + * @param array of string $fontSet + * + * @return string XML Output + */ + private function writeFonts($objWriter, $latinFont, $fontSet) + { + // a:latin + $objWriter->startElement('a:latin'); + $objWriter->writeAttribute('typeface', $latinFont); + $objWriter->endElement(); + + // a:ea + $objWriter->startElement('a:ea'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + // a:cs + $objWriter->startElement('a:cs'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + foreach ($fontSet as $fontScript => $typeface) { + $objWriter->startElement('a:font'); + $objWriter->writeAttribute('script', $fontScript); + $objWriter->writeAttribute('typeface', $typeface); + $objWriter->endElement(); + } + } + + /** + * Write colour scheme to XML format. + * + * @param XMLWriter $objWriter + * + * @return string XML Output + */ + private function writeColourScheme($objWriter) + { + foreach (self::$colourScheme as $colourName => $colourValue) { + $objWriter->startElement('a:' . $colourName); + + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $colourValue); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Workbook.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Workbook.php new file mode 100755 index 0000000..88befd0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -0,0 +1,406 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // workbook + $objWriter->startElement('workbook'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + // fileVersion + $this->writeFileVersion($objWriter); + + // workbookPr + $this->writeWorkbookPr($objWriter); + + // workbookProtection + $this->writeWorkbookProtection($objWriter, $spreadsheet); + + // bookViews + if ($this->getParentWriter()->getOffice2003Compatibility() === false) { + $this->writeBookViews($objWriter, $spreadsheet); + } + + // sheets + $this->writeSheets($objWriter, $spreadsheet); + + // definedNames + $this->writeDefinedNames($objWriter, $spreadsheet); + + // calcPr + $this->writeCalcPr($objWriter, $recalcRequired); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write file version. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeFileVersion(XMLWriter $objWriter): void + { + $objWriter->startElement('fileVersion'); + $objWriter->writeAttribute('appName', 'xl'); + $objWriter->writeAttribute('lastEdited', '4'); + $objWriter->writeAttribute('lowestEdited', '4'); + $objWriter->writeAttribute('rupBuild', '4505'); + $objWriter->endElement(); + } + + /** + * Write WorkbookPr. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeWorkbookPr(XMLWriter $objWriter): void + { + $objWriter->startElement('workbookPr'); + + if (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) { + $objWriter->writeAttribute('date1904', '1'); + } + + $objWriter->writeAttribute('codeName', 'ThisWorkbook'); + + $objWriter->endElement(); + } + + /** + * Write BookViews. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // bookViews + $objWriter->startElement('bookViews'); + + // workbookView + $objWriter->startElement('workbookView'); + + $objWriter->writeAttribute('activeTab', $spreadsheet->getActiveSheetIndex()); + $objWriter->writeAttribute('autoFilterDateGrouping', ($spreadsheet->getAutoFilterDateGrouping() ? 'true' : 'false')); + $objWriter->writeAttribute('firstSheet', $spreadsheet->getFirstSheetIndex()); + $objWriter->writeAttribute('minimized', ($spreadsheet->getMinimized() ? 'true' : 'false')); + $objWriter->writeAttribute('showHorizontalScroll', ($spreadsheet->getShowHorizontalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('showSheetTabs', ($spreadsheet->getShowSheetTabs() ? 'true' : 'false')); + $objWriter->writeAttribute('showVerticalScroll', ($spreadsheet->getShowVerticalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('tabRatio', $spreadsheet->getTabRatio()); + $objWriter->writeAttribute('visibility', $spreadsheet->getVisibility()); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write WorkbookProtection. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + if ($spreadsheet->getSecurity()->isSecurityEnabled()) { + $objWriter->startElement('workbookProtection'); + $objWriter->writeAttribute('lockRevision', ($spreadsheet->getSecurity()->getLockRevision() ? 'true' : 'false')); + $objWriter->writeAttribute('lockStructure', ($spreadsheet->getSecurity()->getLockStructure() ? 'true' : 'false')); + $objWriter->writeAttribute('lockWindows', ($spreadsheet->getSecurity()->getLockWindows() ? 'true' : 'false')); + + if ($spreadsheet->getSecurity()->getRevisionsPassword() != '') { + $objWriter->writeAttribute('revisionsPassword', $spreadsheet->getSecurity()->getRevisionsPassword()); + } + + if ($spreadsheet->getSecurity()->getWorkbookPassword() != '') { + $objWriter->writeAttribute('workbookPassword', $spreadsheet->getSecurity()->getWorkbookPassword()); + } + + $objWriter->endElement(); + } + } + + /** + * Write calcPr. + * + * @param XMLWriter $objWriter XML Writer + * @param bool $recalcRequired Indicate whether formulas should be recalculated before writing + */ + private function writeCalcPr(XMLWriter $objWriter, $recalcRequired = true): void + { + $objWriter->startElement('calcPr'); + + // Set the calcid to a higher value than Excel itself will use, otherwise Excel will always recalc + // If MS Excel does do a recalc, then users opening a file in MS Excel will be prompted to save on exit + // because the file has changed + $objWriter->writeAttribute('calcId', '999999'); + $objWriter->writeAttribute('calcMode', 'auto'); + // fullCalcOnLoad isn't needed if we've recalculating for the save + $objWriter->writeAttribute('calcCompleted', ($recalcRequired) ? 1 : 0); + $objWriter->writeAttribute('fullCalcOnLoad', ($recalcRequired) ? 0 : 1); + $objWriter->writeAttribute('forceFullCalc', ($recalcRequired) ? 0 : 1); + + $objWriter->endElement(); + } + + /** + * Write sheets. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Write sheets + $objWriter->startElement('sheets'); + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // sheet + $this->writeSheet( + $objWriter, + $spreadsheet->getSheet($i)->getTitle(), + ($i + 1), + ($i + 1 + 3), + $spreadsheet->getSheet($i)->getSheetState() + ); + } + + $objWriter->endElement(); + } + + /** + * Write sheet. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pSheetname Sheet name + * @param int $pSheetId Sheet id + * @param int $pRelId Relationship ID + * @param string $sheetState Sheet state (visible, hidden, veryHidden) + */ + private function writeSheet(XMLWriter $objWriter, $pSheetname, $pSheetId = 1, $pRelId = 1, $sheetState = 'visible'): void + { + if ($pSheetname != '') { + // Write sheet + $objWriter->startElement('sheet'); + $objWriter->writeAttribute('name', $pSheetname); + $objWriter->writeAttribute('sheetId', $pSheetId); + if ($sheetState !== 'visible' && $sheetState != '') { + $objWriter->writeAttribute('state', $sheetState); + } + $objWriter->writeAttribute('r:id', 'rId' . $pRelId); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Defined Names. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeDefinedNames(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Write defined names + $objWriter->startElement('definedNames'); + + // Named ranges + if (count($spreadsheet->getNamedRanges()) > 0) { + // Named ranges + $this->writeNamedRanges($objWriter, $spreadsheet); + } + + // Other defined names + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // definedName for autoFilter + $this->writeDefinedNameForAutofilter($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Titles + $this->writeDefinedNameForPrintTitles($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Area + $this->writeDefinedNameForPrintArea($objWriter, $spreadsheet->getSheet($i), $i); + } + + $objWriter->endElement(); + } + + /** + * Write named ranges. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeNamedRanges(XMLWriter $objWriter, Spreadsheet $spreadsheet): void + { + // Loop named ranges + $namedRanges = $spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + $this->writeDefinedNameForNamedRange($objWriter, $namedRange); + } + } + + /** + * Write Defined Name for named range. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeDefinedNameForNamedRange(XMLWriter $objWriter, NamedRange $pNamedRange): void + { + // definedName for named range + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', $pNamedRange->getName()); + if ($pNamedRange->getLocalOnly()) { + $objWriter->writeAttribute('localSheetId', $pNamedRange->getScope()->getParent()->getIndex($pNamedRange->getScope())); + } + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($pNamedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteReference($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteReference($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); + + $objWriter->writeRawData($range); + + $objWriter->endElement(); + } + + /** + * Write Defined Name for autoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForAutofilter(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for autoFilter + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm._FilterDatabase'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + $objWriter->writeAttribute('hidden', '1'); + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref so we can make the cell ref absolute + [$ws, $range[0]] = Worksheet::extractSheetTitle($range[0], true); + + $range[0] = Coordinate::absoluteCoordinate($range[0]); + $range[1] = Coordinate::absoluteCoordinate($range[1]); + $range = implode(':', $range); + + $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForPrintTitles(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for PrintTitles + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Titles'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Setting string + $settingString = ''; + + // Columns to repeat + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + // Rows to repeat + if ($pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $settingString .= ','; + } + + $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + $objWriter->writeRawData($settingString); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pSheetId + */ + private function writeDefinedNameForPrintArea(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0): void + { + // definedName for PrintArea + if ($pSheet->getPageSetup()->isPrintAreaSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Area'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Print area + $printArea = Coordinate::splitRange($pSheet->getPageSetup()->getPrintArea()); + + $chunks = []; + foreach ($printArea as $printAreaRect) { + $printAreaRect[0] = Coordinate::absoluteReference($printAreaRect[0]); + $printAreaRect[1] = Coordinate::absoluteReference($printAreaRect[1]); + $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect); + } + + $objWriter->writeRawData(implode(',', $chunks)); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Worksheet.php new file mode 100755 index 0000000..be06425 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -0,0 +1,1275 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Worksheet + $objWriter->startElement('worksheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:x14', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + $objWriter->writeAttribute('mc:Ignorable', 'x14ac'); + $objWriter->writeAttribute('xmlns:x14ac', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac'); + + // sheetPr + $this->writeSheetPr($objWriter, $pSheet); + + // Dimension + $this->writeDimension($objWriter, $pSheet); + + // sheetViews + $this->writeSheetViews($objWriter, $pSheet); + + // sheetFormatPr + $this->writeSheetFormatPr($objWriter, $pSheet); + + // cols + $this->writeCols($objWriter, $pSheet); + + // sheetData + $this->writeSheetData($objWriter, $pSheet, $pStringTable); + + // sheetProtection + $this->writeSheetProtection($objWriter, $pSheet); + + // protectedRanges + $this->writeProtectedRanges($objWriter, $pSheet); + + // autoFilter + $this->writeAutoFilter($objWriter, $pSheet); + + // mergeCells + $this->writeMergeCells($objWriter, $pSheet); + + // conditionalFormatting + $this->writeConditionalFormatting($objWriter, $pSheet); + + // dataValidations + $this->writeDataValidations($objWriter, $pSheet); + + // hyperlinks + $this->writeHyperlinks($objWriter, $pSheet); + + // Print options + $this->writePrintOptions($objWriter, $pSheet); + + // Page margins + $this->writePageMargins($objWriter, $pSheet); + + // Page setup + $this->writePageSetup($objWriter, $pSheet); + + // Header / footer + $this->writeHeaderFooter($objWriter, $pSheet); + + // Breaks + $this->writeBreaks($objWriter, $pSheet); + + // Drawings and/or Charts + $this->writeDrawings($objWriter, $pSheet, $includeCharts); + + // LegacyDrawing + $this->writeLegacyDrawing($objWriter, $pSheet); + + // LegacyDrawingHF + $this->writeLegacyDrawingHF($objWriter, $pSheet); + + // AlternateContent + $this->writeAlternateContent($objWriter, $pSheet); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write SheetPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetPr + $objWriter->startElement('sheetPr'); + if ($pSheet->getParent()->hasMacros()) { + //if the workbook have macros, we need to have codeName for the sheet + if (!$pSheet->hasCodeName()) { + $pSheet->setCodeName($pSheet->getTitle()); + } + $objWriter->writeAttribute('codeName', $pSheet->getCodeName()); + } + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->writeAttribute('filterMode', 1); + $pSheet->getAutoFilter()->showHideRows(); + } + + // tabColor + if ($pSheet->isTabColorSet()) { + $objWriter->startElement('tabColor'); + $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB()); + $objWriter->endElement(); + } + + // outlinePr + $objWriter->startElement('outlinePr'); + $objWriter->writeAttribute('summaryBelow', ($pSheet->getShowSummaryBelow() ? '1' : '0')); + $objWriter->writeAttribute('summaryRight', ($pSheet->getShowSummaryRight() ? '1' : '0')); + $objWriter->endElement(); + + // pageSetUpPr + if ($pSheet->getPageSetup()->getFitToPage()) { + $objWriter->startElement('pageSetUpPr'); + $objWriter->writeAttribute('fitToPage', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Dimension. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // dimension + $objWriter->startElement('dimension'); + $objWriter->writeAttribute('ref', $pSheet->calculateWorksheetDimension()); + $objWriter->endElement(); + } + + /** + * Write SheetViews. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetViews + $objWriter->startElement('sheetViews'); + + // Sheet selected? + $sheetSelected = false; + if ($this->getParentWriter()->getSpreadsheet()->getIndex($pSheet) == $this->getParentWriter()->getSpreadsheet()->getActiveSheetIndex()) { + $sheetSelected = true; + } + + // sheetView + $objWriter->startElement('sheetView'); + $objWriter->writeAttribute('tabSelected', $sheetSelected ? '1' : '0'); + $objWriter->writeAttribute('workbookViewId', '0'); + + // Zoom scales + if ($pSheet->getSheetView()->getZoomScale() != 100) { + $objWriter->writeAttribute('zoomScale', $pSheet->getSheetView()->getZoomScale()); + } + if ($pSheet->getSheetView()->getZoomScaleNormal() != 100) { + $objWriter->writeAttribute('zoomScaleNormal', $pSheet->getSheetView()->getZoomScaleNormal()); + } + + // Show zeros (Excel also writes this attribute only if set to false) + if ($pSheet->getSheetView()->getShowZeros() === false) { + $objWriter->writeAttribute('showZeros', 0); + } + + // View Layout Type + if ($pSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_NORMAL) { + $objWriter->writeAttribute('view', $pSheet->getSheetView()->getView()); + } + + // Gridlines + if ($pSheet->getShowGridlines()) { + $objWriter->writeAttribute('showGridLines', 'true'); + } else { + $objWriter->writeAttribute('showGridLines', 'false'); + } + + // Row and column headers + if ($pSheet->getShowRowColHeaders()) { + $objWriter->writeAttribute('showRowColHeaders', '1'); + } else { + $objWriter->writeAttribute('showRowColHeaders', '0'); + } + + // Right-to-left + if ($pSheet->getRightToLeft()) { + $objWriter->writeAttribute('rightToLeft', 'true'); + } + + $activeCell = $pSheet->getActiveCell(); + $sqref = $pSheet->getSelectedCells(); + + // Pane + $pane = ''; + if ($pSheet->getFreezePane()) { + [$xSplit, $ySplit] = Coordinate::coordinateFromString($pSheet->getFreezePane()); + $xSplit = Coordinate::columnIndexFromString($xSplit); + --$xSplit; + --$ySplit; + + $topLeftCell = $pSheet->getTopLeftCell(); + + // pane + $pane = 'topRight'; + $objWriter->startElement('pane'); + if ($xSplit > 0) { + $objWriter->writeAttribute('xSplit', $xSplit); + } + if ($ySplit > 0) { + $objWriter->writeAttribute('ySplit', $ySplit); + $pane = ($xSplit > 0) ? 'bottomRight' : 'bottomLeft'; + } + $objWriter->writeAttribute('topLeftCell', $topLeftCell); + $objWriter->writeAttribute('activePane', $pane); + $objWriter->writeAttribute('state', 'frozen'); + $objWriter->endElement(); + + if (($xSplit > 0) && ($ySplit > 0)) { + // Write additional selections if more than two panes (ie both an X and a Y split) + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'topRight'); + $objWriter->endElement(); + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'bottomLeft'); + $objWriter->endElement(); + } + } + + // Selection + // Only need to write selection element if we have a split pane + // We cheat a little by over-riding the active cell selection, setting it to the split cell + $objWriter->startElement('selection'); + if ($pane != '') { + $objWriter->writeAttribute('pane', $pane); + } + $objWriter->writeAttribute('activeCell', $activeCell); + $objWriter->writeAttribute('sqref', $sqref); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write SheetFormatPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetFormatPr + $objWriter->startElement('sheetFormatPr'); + + // Default row height + if ($pSheet->getDefaultRowDimension()->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', 'true'); + $objWriter->writeAttribute('defaultRowHeight', StringHelper::formatNumber($pSheet->getDefaultRowDimension()->getRowHeight())); + } else { + $objWriter->writeAttribute('defaultRowHeight', '14.4'); + } + + // Set Zero Height row + if ((string) $pSheet->getDefaultRowDimension()->getZeroHeight() === '1' || + strtolower((string) $pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true') { + $objWriter->writeAttribute('zeroHeight', '1'); + } + + // Default column width + if ($pSheet->getDefaultColumnDimension()->getWidth() >= 0) { + $objWriter->writeAttribute('defaultColWidth', StringHelper::formatNumber($pSheet->getDefaultColumnDimension()->getWidth())); + } + + // Outline level - row + $outlineLevelRow = 0; + foreach ($pSheet->getRowDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelRow) { + $outlineLevelRow = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelRow', (int) $outlineLevelRow); + + // Outline level - column + $outlineLevelCol = 0; + foreach ($pSheet->getColumnDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelCol) { + $outlineLevelCol = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelCol', (int) $outlineLevelCol); + + $objWriter->endElement(); + } + + /** + * Write Cols. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // cols + if (count($pSheet->getColumnDimensions()) > 0) { + $objWriter->startElement('cols'); + + $pSheet->calculateColumnWidths(); + + // Loop through column dimensions + foreach ($pSheet->getColumnDimensions() as $colDimension) { + // col + $objWriter->startElement('col'); + $objWriter->writeAttribute('min', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + $objWriter->writeAttribute('max', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + + if ($colDimension->getWidth() < 0) { + // No width set, apply default of 10 + $objWriter->writeAttribute('width', '9.10'); + } else { + // Width set + $objWriter->writeAttribute('width', StringHelper::formatNumber($colDimension->getWidth())); + } + + // Column visibility + if ($colDimension->getVisible() === false) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Auto size? + if ($colDimension->getAutoSize()) { + $objWriter->writeAttribute('bestFit', 'true'); + } + + // Custom width? + if ($colDimension->getWidth() != $pSheet->getDefaultColumnDimension()->getWidth()) { + $objWriter->writeAttribute('customWidth', 'true'); + } + + // Collapsed + if ($colDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($colDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $colDimension->getOutlineLevel()); + } + + // Style + $objWriter->writeAttribute('style', $colDimension->getXfIndex()); + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetProtection. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // sheetProtection + $objWriter->startElement('sheetProtection'); + + $protection = $pSheet->getProtection(); + + if ($protection->getAlgorithm()) { + $objWriter->writeAttribute('algorithmName', $protection->getAlgorithm()); + $objWriter->writeAttribute('hashValue', $protection->getPassword()); + $objWriter->writeAttribute('saltValue', $protection->getSalt()); + $objWriter->writeAttribute('spinCount', $protection->getSpinCount()); + } elseif ($protection->getPassword() !== '') { + $objWriter->writeAttribute('password', $protection->getPassword()); + } + + $objWriter->writeAttribute('sheet', ($protection->getSheet() ? 'true' : 'false')); + $objWriter->writeAttribute('objects', ($protection->getObjects() ? 'true' : 'false')); + $objWriter->writeAttribute('scenarios', ($protection->getScenarios() ? 'true' : 'false')); + $objWriter->writeAttribute('formatCells', ($protection->getFormatCells() ? 'true' : 'false')); + $objWriter->writeAttribute('formatColumns', ($protection->getFormatColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('formatRows', ($protection->getFormatRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertColumns', ($protection->getInsertColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('insertRows', ($protection->getInsertRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertHyperlinks', ($protection->getInsertHyperlinks() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteColumns', ($protection->getDeleteColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteRows', ($protection->getDeleteRows() ? 'true' : 'false')); + $objWriter->writeAttribute('selectLockedCells', ($protection->getSelectLockedCells() ? 'true' : 'false')); + $objWriter->writeAttribute('sort', ($protection->getSort() ? 'true' : 'false')); + $objWriter->writeAttribute('autoFilter', ($protection->getAutoFilter() ? 'true' : 'false')); + $objWriter->writeAttribute('pivotTables', ($protection->getPivotTables() ? 'true' : 'false')); + $objWriter->writeAttribute('selectUnlockedCells', ($protection->getSelectUnlockedCells() ? 'true' : 'false')); + $objWriter->endElement(); + } + + private static function writeAttributeIf(XMLWriter $objWriter, $condition, string $attr, string $val): void + { + if ($condition) { + $objWriter->writeAttribute($attr, $val); + } + } + + private static function writeElementIf(XMLWriter $objWriter, $condition, string $attr, string $val): void + { + if ($condition) { + $objWriter->writeElement($attr, $val); + } + } + + private static function writeOtherCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void + { + if ($conditional->getConditionType() == Conditional::CONDITION_CELLIS + || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + || $conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + foreach ($conditional->getConditions() as $formula) { + // Formula + $objWriter->writeElement('formula', Xlfn::addXlfn($formula)); + } + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_NOTCONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))>0'); + } + } + + private static function writeTextCondElements(XMLWriter $objWriter, Conditional $conditional, string $cellCoordinate): void + { + $txt = $conditional->getText(); + if ($txt !== null) { + $objWriter->writeAttribute('text', $txt); + if ($conditional->getOperatorType() == Conditional::OPERATOR_CONTAINSTEXT) { + $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("' . $txt . '",' . $cellCoordinate . ')))'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_BEGINSWITH) { + $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',' . strlen($txt) . ')="' . $txt . '"'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_ENDSWITH) { + $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',' . strlen($txt) . ')="' . $txt . '"'); + } elseif ($conditional->getOperatorType() == Conditional::OPERATOR_NOTCONTAINS) { + $objWriter->writeElement('formula', 'ISERROR(SEARCH("' . $txt . '",' . $cellCoordinate . '))'); + } + } + } + + /** + * Write ConditionalFormatting. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Conditional id + $id = 1; + + // Loop through styles in the current worksheet + foreach ($pSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + // WHY was this again? + // if ($this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode()) == '') { + // continue; + // } + if ($conditional->getConditionType() != Conditional::CONDITION_NONE) { + // conditionalFormatting + $objWriter->startElement('conditionalFormatting'); + $objWriter->writeAttribute('sqref', $cellCoordinate); + + // cfRule + $objWriter->startElement('cfRule'); + $objWriter->writeAttribute('type', $conditional->getConditionType()); + $objWriter->writeAttribute('dxfId', $this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode())); + $objWriter->writeAttribute('priority', $id++); + + self::writeAttributeif( + $objWriter, + ($conditional->getConditionType() == Conditional::CONDITION_CELLIS || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT) + && $conditional->getOperatorType() != Conditional::OPERATOR_NONE, + 'operator', + $conditional->getOperatorType() + ); + + self::writeAttributeIf($objWriter, $conditional->getStopIfTrue(), 'stopIfTrue', '1'); + + if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT) { + self::writeTextCondElements($objWriter, $conditional, $cellCoordinate); + } else { + self::writeOtherCondElements($objWriter, $conditional, $cellCoordinate); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + } + + /** + * Write DataValidations. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Datavalidation collection + $dataValidationCollection = $pSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + $dataValidationCollection = Coordinate::mergeRangesInCollection($dataValidationCollection); + $objWriter->startElement('dataValidations'); + $objWriter->writeAttribute('count', count($dataValidationCollection)); + + foreach ($dataValidationCollection as $coordinate => $dv) { + $objWriter->startElement('dataValidation'); + + if ($dv->getType() != '') { + $objWriter->writeAttribute('type', $dv->getType()); + } + + if ($dv->getErrorStyle() != '') { + $objWriter->writeAttribute('errorStyle', $dv->getErrorStyle()); + } + + if ($dv->getOperator() != '') { + $objWriter->writeAttribute('operator', $dv->getOperator()); + } + + $objWriter->writeAttribute('allowBlank', ($dv->getAllowBlank() ? '1' : '0')); + $objWriter->writeAttribute('showDropDown', (!$dv->getShowDropDown() ? '1' : '0')); + $objWriter->writeAttribute('showInputMessage', ($dv->getShowInputMessage() ? '1' : '0')); + $objWriter->writeAttribute('showErrorMessage', ($dv->getShowErrorMessage() ? '1' : '0')); + + if ($dv->getErrorTitle() !== '') { + $objWriter->writeAttribute('errorTitle', $dv->getErrorTitle()); + } + if ($dv->getError() !== '') { + $objWriter->writeAttribute('error', $dv->getError()); + } + if ($dv->getPromptTitle() !== '') { + $objWriter->writeAttribute('promptTitle', $dv->getPromptTitle()); + } + if ($dv->getPrompt() !== '') { + $objWriter->writeAttribute('prompt', $dv->getPrompt()); + } + + $objWriter->writeAttribute('sqref', $coordinate); + + if ($dv->getFormula1() !== '') { + $objWriter->writeElement('formula1', $dv->getFormula1()); + } + if ($dv->getFormula2() !== '') { + $objWriter->writeElement('formula2', $dv->getFormula2()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write Hyperlinks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Hyperlink collection + $hyperlinkCollection = $pSheet->getHyperlinkCollection(); + + // Relation ID + $relationId = 1; + + // Write hyperlinks? + if (!empty($hyperlinkCollection)) { + $objWriter->startElement('hyperlinks'); + + foreach ($hyperlinkCollection as $coordinate => $hyperlink) { + $objWriter->startElement('hyperlink'); + + $objWriter->writeAttribute('ref', $coordinate); + if (!$hyperlink->isInternal()) { + $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId); + ++$relationId; + } else { + $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); + } + + if ($hyperlink->getTooltip() !== '') { + $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip()); + $objWriter->writeAttribute('display', $hyperlink->getTooltip()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write ProtectedRanges. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (count($pSheet->getProtectedCells()) > 0) { + // protectedRanges + $objWriter->startElement('protectedRanges'); + + // Loop protectedRanges + foreach ($pSheet->getProtectedCells() as $protectedCell => $passwordHash) { + // protectedRange + $objWriter->startElement('protectedRange'); + $objWriter->writeAttribute('name', 'p' . md5($protectedCell)); + $objWriter->writeAttribute('sqref', $protectedCell); + if (!empty($passwordHash)) { + $objWriter->writeAttribute('password', $passwordHash); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write MergeCells. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (count($pSheet->getMergeCells()) > 0) { + // mergeCells + $objWriter->startElement('mergeCells'); + + // Loop mergeCells + foreach ($pSheet->getMergeCells() as $mergeCell) { + // mergeCell + $objWriter->startElement('mergeCell'); + $objWriter->writeAttribute('ref', $mergeCell); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write PrintOptions. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // printOptions + $objWriter->startElement('printOptions'); + + $objWriter->writeAttribute('gridLines', ($pSheet->getPrintGridlines() ? 'true' : 'false')); + $objWriter->writeAttribute('gridLinesSet', 'true'); + + if ($pSheet->getPageSetup()->getHorizontalCentered()) { + $objWriter->writeAttribute('horizontalCentered', 'true'); + } + + if ($pSheet->getPageSetup()->getVerticalCentered()) { + $objWriter->writeAttribute('verticalCentered', 'true'); + } + + $objWriter->endElement(); + } + + /** + * Write PageMargins. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // pageMargins + $objWriter->startElement('pageMargins'); + $objWriter->writeAttribute('left', StringHelper::formatNumber($pSheet->getPageMargins()->getLeft())); + $objWriter->writeAttribute('right', StringHelper::formatNumber($pSheet->getPageMargins()->getRight())); + $objWriter->writeAttribute('top', StringHelper::formatNumber($pSheet->getPageMargins()->getTop())); + $objWriter->writeAttribute('bottom', StringHelper::formatNumber($pSheet->getPageMargins()->getBottom())); + $objWriter->writeAttribute('header', StringHelper::formatNumber($pSheet->getPageMargins()->getHeader())); + $objWriter->writeAttribute('footer', StringHelper::formatNumber($pSheet->getPageMargins()->getFooter())); + $objWriter->endElement(); + } + + /** + * Write AutoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // autoFilter + $objWriter->startElement('autoFilter'); + + // Strip any worksheet reference from the filter coordinates + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref + [$ws, $range[0]] = PhpspreadsheetWorksheet::extractSheetTitle($range[0], true); + $range = implode(':', $range); + + $objWriter->writeAttribute('ref', str_replace('$', '', $range)); + + $columns = $pSheet->getAutoFilter()->getColumns(); + if (count($columns) > 0) { + foreach ($columns as $columnID => $column) { + $rules = $column->getRules(); + if (count($rules) > 0) { + $objWriter->startElement('filterColumn'); + $objWriter->writeAttribute('colId', $pSheet->getAutoFilter()->getColumnOffset($columnID)); + + $objWriter->startElement($column->getFilterType()); + if ($column->getJoin() == Column::AUTOFILTER_COLUMN_JOIN_AND) { + $objWriter->writeAttribute('and', 1); + } + + foreach ($rules as $rule) { + if (($column->getFilterType() === Column::AUTOFILTER_FILTERTYPE_FILTER) && + ($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_EQUAL) && + ($rule->getValue() === '')) { + // Filter rule for Blanks + $objWriter->writeAttribute('blank', 1); + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER) { + // Dynamic Filter Rule + $objWriter->writeAttribute('type', $rule->getGrouping()); + $val = $column->getAttribute('val'); + if ($val !== null) { + $objWriter->writeAttribute('val', $val); + } + $maxVal = $column->getAttribute('maxVal'); + if ($maxVal !== null) { + $objWriter->writeAttribute('maxVal', $maxVal); + } + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_TOPTENFILTER) { + // Top 10 Filter Rule + $objWriter->writeAttribute('val', $rule->getValue()); + $objWriter->writeAttribute('percent', (($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) ? '1' : '0')); + $objWriter->writeAttribute('top', (($rule->getGrouping() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) ? '1' : '0')); + } else { + // Filter, DateGroupItem or CustomFilter + $objWriter->startElement($rule->getRuleType()); + + if ($rule->getOperator() !== Rule::AUTOFILTER_COLUMN_RULE_EQUAL) { + $objWriter->writeAttribute('operator', $rule->getOperator()); + } + if ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DATEGROUP) { + // Date Group filters + foreach ($rule->getValue() as $key => $value) { + if ($value > '') { + $objWriter->writeAttribute($key, $value); + } + } + $objWriter->writeAttribute('dateTimeGrouping', $rule->getGrouping()); + } else { + $objWriter->writeAttribute('val', $rule->getValue()); + } + + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + $objWriter->endElement(); + } + } + + /** + * Write PageSetup. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // pageSetup + $objWriter->startElement('pageSetup'); + $objWriter->writeAttribute('paperSize', $pSheet->getPageSetup()->getPaperSize()); + $objWriter->writeAttribute('orientation', $pSheet->getPageSetup()->getOrientation()); + + if ($pSheet->getPageSetup()->getScale() !== null) { + $objWriter->writeAttribute('scale', $pSheet->getPageSetup()->getScale()); + } + if ($pSheet->getPageSetup()->getFitToHeight() !== null) { + $objWriter->writeAttribute('fitToHeight', $pSheet->getPageSetup()->getFitToHeight()); + } else { + $objWriter->writeAttribute('fitToHeight', '0'); + } + if ($pSheet->getPageSetup()->getFitToWidth() !== null) { + $objWriter->writeAttribute('fitToWidth', $pSheet->getPageSetup()->getFitToWidth()); + } else { + $objWriter->writeAttribute('fitToWidth', '0'); + } + if ($pSheet->getPageSetup()->getFirstPageNumber() !== null) { + $objWriter->writeAttribute('firstPageNumber', $pSheet->getPageSetup()->getFirstPageNumber()); + $objWriter->writeAttribute('useFirstPageNumber', '1'); + } + + $getUnparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + if (isset($getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId'])) { + $objWriter->writeAttribute('r:id', $getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId']); + } + + $objWriter->endElement(); + } + + /** + * Write Header / Footer. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // headerFooter + $objWriter->startElement('headerFooter'); + $objWriter->writeAttribute('differentOddEven', ($pSheet->getHeaderFooter()->getDifferentOddEven() ? 'true' : 'false')); + $objWriter->writeAttribute('differentFirst', ($pSheet->getHeaderFooter()->getDifferentFirst() ? 'true' : 'false')); + $objWriter->writeAttribute('scaleWithDoc', ($pSheet->getHeaderFooter()->getScaleWithDocument() ? 'true' : 'false')); + $objWriter->writeAttribute('alignWithMargins', ($pSheet->getHeaderFooter()->getAlignWithMargins() ? 'true' : 'false')); + + $objWriter->writeElement('oddHeader', $pSheet->getHeaderFooter()->getOddHeader()); + $objWriter->writeElement('oddFooter', $pSheet->getHeaderFooter()->getOddFooter()); + $objWriter->writeElement('evenHeader', $pSheet->getHeaderFooter()->getEvenHeader()); + $objWriter->writeElement('evenFooter', $pSheet->getHeaderFooter()->getEvenFooter()); + $objWriter->writeElement('firstHeader', $pSheet->getHeaderFooter()->getFirstHeader()); + $objWriter->writeElement('firstFooter', $pSheet->getHeaderFooter()->getFirstFooter()); + $objWriter->endElement(); + } + + /** + * Write Breaks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // Get row and column breaks + $aRowBreaks = []; + $aColumnBreaks = []; + foreach ($pSheet->getBreaks() as $cell => $breakType) { + if ($breakType == PhpspreadsheetWorksheet::BREAK_ROW) { + $aRowBreaks[] = $cell; + } elseif ($breakType == PhpspreadsheetWorksheet::BREAK_COLUMN) { + $aColumnBreaks[] = $cell; + } + } + + // rowBreaks + if (!empty($aRowBreaks)) { + $objWriter->startElement('rowBreaks'); + $objWriter->writeAttribute('count', count($aRowBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aRowBreaks)); + + foreach ($aRowBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', $coords[1]); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + // Second, write column breaks + if (!empty($aColumnBreaks)) { + $objWriter->startElement('colBreaks'); + $objWriter->writeAttribute('count', count($aColumnBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aColumnBreaks)); + + foreach ($aColumnBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', Coordinate::columnIndexFromString($coords[0]) - 1); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetData. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param string[] $pStringTable String table + */ + private function writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, array $pStringTable): void + { + // Flipped stringtable, for faster index searching + $aFlippedStringTable = $this->getParentWriter()->getWriterPart('stringtable')->flipStringTable($pStringTable); + + // sheetData + $objWriter->startElement('sheetData'); + + // Get column count + $colCount = Coordinate::columnIndexFromString($pSheet->getHighestColumn()); + + // Highest row number + $highestRow = $pSheet->getHighestRow(); + + // Loop through cells + $cellsByRow = []; + foreach ($pSheet->getCoordinates() as $coordinate) { + $cellAddress = Coordinate::coordinateFromString($coordinate); + $cellsByRow[$cellAddress[1]][] = $coordinate; + } + + $currentRow = 0; + while ($currentRow++ < $highestRow) { + // Get row dimension + $rowDimension = $pSheet->getRowDimension($currentRow); + + // Write current row? + $writeCurrentRow = isset($cellsByRow[$currentRow]) || $rowDimension->getRowHeight() >= 0 || $rowDimension->getVisible() == false || $rowDimension->getCollapsed() == true || $rowDimension->getOutlineLevel() > 0 || $rowDimension->getXfIndex() !== null; + + if ($writeCurrentRow) { + // Start a new row + $objWriter->startElement('row'); + $objWriter->writeAttribute('r', $currentRow); + $objWriter->writeAttribute('spans', '1:' . $colCount); + + // Row dimensions + if ($rowDimension->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', '1'); + $objWriter->writeAttribute('ht', StringHelper::formatNumber($rowDimension->getRowHeight())); + } + + // Row visibility + if (!$rowDimension->getVisible() === true) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Collapsed + if ($rowDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($rowDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $rowDimension->getOutlineLevel()); + } + + // Style + if ($rowDimension->getXfIndex() !== null) { + $objWriter->writeAttribute('s', $rowDimension->getXfIndex()); + $objWriter->writeAttribute('customFormat', '1'); + } + + // Write cells + if (isset($cellsByRow[$currentRow])) { + foreach ($cellsByRow[$currentRow] as $cellAddress) { + // Write cell + $this->writeCell($objWriter, $pSheet, $cellAddress, $aFlippedStringTable); + } + } + + // End row + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * @param RichText|string $cellValue + */ + private function writeCellInlineStr(XMLWriter $objWriter, string $mappedType, $cellValue): void + { + $objWriter->writeAttribute('t', $mappedType); + if (!$cellValue instanceof RichText) { + $objWriter->writeElement('t', StringHelper::controlCharacterPHP2OOXML(htmlspecialchars($cellValue))); + } elseif ($cellValue instanceof RichText) { + $objWriter->startElement('is'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $cellValue); + $objWriter->endElement(); + } + } + + /** + * @param RichText|string $cellValue + * @param string[] $pFlippedStringTable + */ + private function writeCellString(XMLWriter $objWriter, string $mappedType, $cellValue, array $pFlippedStringTable): void + { + $objWriter->writeAttribute('t', $mappedType); + if (!$cellValue instanceof RichText) { + self::writeElementIf($objWriter, isset($pFlippedStringTable[$cellValue]), 'v', $pFlippedStringTable[$cellValue]); + } else { + $objWriter->writeElement('v', $pFlippedStringTable[$cellValue->getHashCode()]); + } + } + + /** + * @param float|int $cellValue + */ + private function writeCellNumeric(XMLWriter $objWriter, $cellValue): void + { + //force a decimal to be written if the type is float + if (is_float($cellValue)) { + // force point as decimal separator in case current locale uses comma + $cellValue = str_replace(',', '.', (string) $cellValue); + if (strpos($cellValue, '.') === false) { + $cellValue = $cellValue . '.0'; + } + } + $objWriter->writeElement('v', $cellValue); + } + + private function writeCellBoolean(XMLWriter $objWriter, string $mappedType, bool $cellValue): void + { + $objWriter->writeAttribute('t', $mappedType); + $objWriter->writeElement('v', $cellValue ? '1' : '0'); + } + + private function writeCellError(XMLWriter $objWriter, string $mappedType, string $cellValue, string $formulaerr = '#NULL!'): void + { + $objWriter->writeAttribute('t', $mappedType); + $cellIsFormula = substr($cellValue, 0, 1) === '='; + self::writeElementIf($objWriter, $cellIsFormula, 'f', Xlfn::addXlfnStripEquals($cellValue)); + $objWriter->writeElement('v', $cellIsFormula ? $formulaerr : $cellValue); + } + + private function writeCellFormula(XMLWriter $objWriter, string $cellValue, Cell $pCell): void + { + $calculatedValue = $this->getParentWriter()->getPreCalculateFormulas() ? $pCell->getCalculatedValue() : $cellValue; + if (is_string($calculatedValue)) { + if (\PhpOffice\PhpSpreadsheet\Calculation\Functions::isError($calculatedValue)) { + $this->writeCellError($objWriter, 'e', $cellValue, $calculatedValue); + + return; + } + $objWriter->writeAttribute('t', 'str'); + } elseif (is_bool($calculatedValue)) { + $objWriter->writeAttribute('t', 'b'); + } + // array values are not yet supported + //$attributes = $pCell->getFormulaAttributes(); + //if (($attributes['t'] ?? null) === 'array') { + // $objWriter->startElement('f'); + // $objWriter->writeAttribute('t', 'array'); + // $objWriter->writeAttribute('ref', $pCellAddress); + // $objWriter->writeAttribute('aca', '1'); + // $objWriter->writeAttribute('ca', '1'); + // $objWriter->text(substr($cellValue, 1)); + // $objWriter->endElement(); + //} else { + // $objWriter->writeElement('f', Xlfn::addXlfnStripEquals($cellValue)); + //} + $objWriter->writeElement('f', Xlfn::addXlfnStripEquals($cellValue)); + self::writeElementIf( + $objWriter, + $this->getParentWriter()->getOffice2003Compatibility() === false, + 'v', + ($this->getParentWriter()->getPreCalculateFormulas() && !is_array($calculatedValue) && substr($calculatedValue, 0, 1) !== '#') + ? StringHelper::formatNumber($calculatedValue) : '0' + ); + } + + /** + * Write Cell. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param string $pCellAddress Cell Address + * @param string[] $pFlippedStringTable String table (flipped), for faster index searching + */ + private function writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, string $pCellAddress, array $pFlippedStringTable): void + { + // Cell + $pCell = $pSheet->getCell($pCellAddress); + $objWriter->startElement('c'); + $objWriter->writeAttribute('r', $pCellAddress); + + // Sheet styles + $xfi = $pCell->getXfIndex(); + self::writeAttributeIf($objWriter, $xfi, 's', $xfi); + + // If cell value is supplied, write cell value + $cellValue = $pCell->getValue(); + if (is_object($cellValue) || $cellValue !== '') { + // Map type + $mappedType = $pCell->getDataType(); + + // Write data depending on its type + switch (strtolower($mappedType)) { + case 'inlinestr': // Inline string + $this->writeCellInlineStr($objWriter, $mappedType, $cellValue); + + break; + case 's': // String + $this->writeCellString($objWriter, $mappedType, $cellValue, $pFlippedStringTable); + + break; + case 'f': // Formula + $this->writeCellFormula($objWriter, $cellValue, $pCell); + + break; + case 'n': // Numeric + $this->writeCellNumeric($objWriter, $cellValue); + + break; + case 'b': // Boolean + $this->writeCellBoolean($objWriter, $mappedType, $cellValue); + + break; + case 'e': // Error + $this->writeCellError($objWriter, $mappedType, $cellValue); + } + } + + $objWriter->endElement(); + } + + /** + * Write Drawings. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param bool $includeCharts Flag indicating if we should include drawing details for charts + */ + private function writeDrawings(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, $includeCharts = false): void + { + $unparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']); + $chartCount = ($includeCharts) ? $pSheet->getChartCollection()->count() : 0; + if ($chartCount == 0 && $pSheet->getDrawingCollection()->count() == 0 && !$hasUnparsedDrawing) { + return; + } + + // If sheet contains drawings, add the relationships + $objWriter->startElement('drawing'); + + $rId = 'rId1'; + if (isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']; + // take first. In future can be overriten + // (! synchronize with \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Rels::writeWorksheetRelationships) + $rId = reset($drawingOriginalIds); + } + + $objWriter->writeAttribute('r:id', $rId); + $objWriter->endElement(); + } + + /** + * Write LegacyDrawing. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // If sheet contains comments, add the relationships + if (count($pSheet->getComments()) > 0) { + $objWriter->startElement('legacyDrawing'); + $objWriter->writeAttribute('r:id', 'rId_comments_vml1'); + $objWriter->endElement(); + } + } + + /** + * Write LegacyDrawingHF. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + // If sheet contains images, add the relationships + if (count($pSheet->getHeaderFooter()->getImages()) > 0) { + $objWriter->startElement('legacyDrawingHF'); + $objWriter->writeAttribute('r:id', 'rId_headerfooter_vml1'); + $objWriter->endElement(); + } + } + + private function writeAlternateContent(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet): void + { + if (empty($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'])) { + return; + } + + foreach ($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'] as $alternateContent) { + $objWriter->writeRaw($alternateContent); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/WriterPart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/WriterPart.php new file mode 100755 index 0000000..a9137df --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/WriterPart.php @@ -0,0 +1,33 @@ +parentWriter; + } + + /** + * Set parent Xlsx object. + */ + public function __construct(Xlsx $pWriter) + { + $this->parentWriter = $pWriter; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Xlfn.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Xlfn.php new file mode 100755 index 0000000..8f7c07e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/#PhpSpreadsheet/Writer/Xlsx/Xlfn.php @@ -0,0 +1,159 @@ +=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d{1,7})'; + // Named Range of cells + const CALCULATION_REGEXP_NAMEDRANGE = '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_A-Z][_A-Z0-9\.]*)'; + // Error + const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; + + /** constants */ + const RETURN_ARRAY_AS_ERROR = 'error'; + const RETURN_ARRAY_AS_VALUE = 'value'; + const RETURN_ARRAY_AS_ARRAY = 'array'; + + private static $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE; + + /** + * Instance of this class. + * + * @var Calculation + */ + private static $instance; + + /** + * Instance of the spreadsheet this Calculation Engine is using. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Calculation cache. + * + * @var array + */ + private $calculationCache = []; + + /** + * Calculation cache enabled. + * + * @var bool + */ + private $calculationCacheEnabled = true; + + /** + * List of operators that can be used within formulae + * The true/false value indicates whether it is a binary operator or a unary operator. + * + * @var array + */ + private static $operators = [ + '+' => true, '-' => true, '*' => true, '/' => true, + '^' => true, '&' => true, '%' => false, '~' => false, + '>' => true, '<' => true, '=' => true, '>=' => true, + '<=' => true, '<>' => true, '|' => true, ':' => true, + ]; + + /** + * List of binary operators (those that expect two operands). + * + * @var array + */ + private static $binaryOperators = [ + '+' => true, '-' => true, '*' => true, '/' => true, + '^' => true, '&' => true, '>' => true, '<' => true, + '=' => true, '>=' => true, '<=' => true, '<>' => true, + '|' => true, ':' => true, + ]; + + /** + * The debug log generated by the calculation engine. + * + * @var Logger + */ + private $debugLog; + + /** + * Flag to determine how formula errors should be handled + * If true, then a user error will be triggered + * If false, then an exception will be thrown. + * + * @var bool + */ + public $suppressFormulaErrors = false; + + /** + * Error message for any error that was raised/thrown by the calculation engine. + * + * @var string + */ + public $formulaError; + + /** + * An array of the nested cell references accessed by the calculation engine, used for the debug log. + * + * @var CyclicReferenceStack + */ + private $cyclicReferenceStack; + + private $cellStack = []; + + /** + * Current iteration counter for cyclic formulae + * If the value is 0 (or less) then cyclic formulae will throw an exception, + * otherwise they will iterate to the limit defined here before returning a result. + * + * @var int + */ + private $cyclicFormulaCounter = 1; + + private $cyclicFormulaCell = ''; + + /** + * Number of iterations for cyclic formulae. + * + * @var int + */ + public $cyclicFormulaCount = 1; + + /** + * Epsilon Precision used for comparisons in calculations. + * + * @var float + */ + private $delta = 0.1e-12; + + /** + * The current locale setting. + * + * @var string + */ + private static $localeLanguage = 'en_us'; // US English (default locale) + + /** + * List of available locale settings + * Note that this is read for the locale subdirectory only when requested. + * + * @var string[] + */ + private static $validLocaleLanguages = [ + 'en', // English (default language) + ]; + + /** + * Locale-specific argument separator for function arguments. + * + * @var string + */ + private static $localeArgumentSeparator = ','; + + private static $localeFunctions = []; + + /** + * Locale-specific translations for Excel constants (True, False and Null). + * + * @var string[] + */ + public static $localeBoolean = [ + 'TRUE' => 'TRUE', + 'FALSE' => 'FALSE', + 'NULL' => 'NULL', + ]; + + /** + * Excel constant string translations to their PHP equivalents + * Constant conversion from text name/value to actual (datatyped) value. + * + * @var string[] + */ + private static $excelConstants = [ + 'TRUE' => true, + 'FALSE' => false, + 'NULL' => null, + ]; + + // PhpSpreadsheet functions + private static $phpSpreadsheetFunctions = [ + 'ABS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'abs', + 'argumentCount' => '1', + ], + 'ACCRINT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ACCRINT'], + 'argumentCount' => '4-7', + ], + 'ACCRINTM' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ACCRINTM'], + 'argumentCount' => '3-5', + ], + 'ACOS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'acos', + 'argumentCount' => '1', + ], + 'ACOSH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'acosh', + 'argumentCount' => '1', + ], + 'ACOT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ACOT'], + 'argumentCount' => '1', + ], + 'ACOTH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ACOTH'], + 'argumentCount' => '1', + ], + 'ADDRESS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'cellAddress'], + 'argumentCount' => '2-5', + ], + 'AMORDEGRC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'AMORDEGRC'], + 'argumentCount' => '6,7', + ], + 'AMORLINC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'AMORLINC'], + 'argumentCount' => '6,7', + ], + 'AND' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalAnd'], + 'argumentCount' => '1+', + ], + 'AREAS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ASC' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ASIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'asin', + 'argumentCount' => '1', + ], + 'ASINH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'asinh', + 'argumentCount' => '1', + ], + 'ATAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'atan', + 'argumentCount' => '1', + ], + 'ATAN2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ATAN2'], + 'argumentCount' => '2', + ], + 'ATANH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'atanh', + 'argumentCount' => '1', + ], + 'AVEDEV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVEDEV'], + 'argumentCount' => '1+', + ], + 'AVERAGE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGE'], + 'argumentCount' => '1+', + ], + 'AVERAGEA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGEA'], + 'argumentCount' => '1+', + ], + 'AVERAGEIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'AVERAGEIF'], + 'argumentCount' => '2,3', + ], + 'AVERAGEIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3+', + ], + 'BAHTTEXT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'BESSELI' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELI'], + 'argumentCount' => '2', + ], + 'BESSELJ' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELJ'], + 'argumentCount' => '2', + ], + 'BESSELK' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELK'], + 'argumentCount' => '2', + ], + 'BESSELY' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BESSELY'], + 'argumentCount' => '2', + ], + 'BETADIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BETADIST'], + 'argumentCount' => '3-5', + ], + 'BETAINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BETAINV'], + 'argumentCount' => '3-5', + ], + 'BIN2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTODEC'], + 'argumentCount' => '1', + ], + 'BIN2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTOHEX'], + 'argumentCount' => '1,2', + ], + 'BIN2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BINTOOCT'], + 'argumentCount' => '1,2', + ], + 'BINOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'BINOMDIST'], + 'argumentCount' => '4', + ], + 'BITAND' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITAND'], + 'argumentCount' => '2', + ], + 'BITOR' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITOR'], + 'argumentCount' => '2', + ], + 'BITXOR' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITOR'], + 'argumentCount' => '2', + ], + 'BITLSHIFT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITLSHIFT'], + 'argumentCount' => '2', + ], + 'BITRSHIFT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'BITRSHIFT'], + 'argumentCount' => '2', + ], + 'CEILING' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CEILING'], + 'argumentCount' => '2', + ], + 'CELL' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1,2', + ], + 'CHAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CHARACTER'], + 'argumentCount' => '1', + ], + 'CHIDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CHIDIST'], + 'argumentCount' => '2', + ], + 'CHIINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CHIINV'], + 'argumentCount' => '2', + ], + 'CHITEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'CHOOSE' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'CHOOSE'], + 'argumentCount' => '2+', + ], + 'CLEAN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TRIMNONPRINTABLE'], + 'argumentCount' => '1', + ], + 'CODE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'ASCIICODE'], + 'argumentCount' => '1', + ], + 'COLUMN' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'COLUMN'], + 'argumentCount' => '-1', + 'passByReference' => [true], + ], + 'COLUMNS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'COLUMNS'], + 'argumentCount' => '1', + ], + 'COMBIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COMBIN'], + 'argumentCount' => '2', + ], + 'COMPLEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'COMPLEX'], + 'argumentCount' => '2,3', + ], + 'CONCAT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CONCATENATE'], + 'argumentCount' => '1+', + ], + 'CONCATENATE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CONCATENATE'], + 'argumentCount' => '1+', + ], + 'CONFIDENCE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CONFIDENCE'], + 'argumentCount' => '3', + ], + 'CONVERT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'CONVERTUOM'], + 'argumentCount' => '3', + ], + 'CORREL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CORREL'], + 'argumentCount' => '2', + ], + 'COS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'cos', + 'argumentCount' => '1', + ], + 'COSH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'cosh', + 'argumentCount' => '1', + ], + 'COT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COT'], + 'argumentCount' => '1', + ], + 'COTH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'COTH'], + 'argumentCount' => '1', + ], + 'COUNT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNT'], + 'argumentCount' => '1+', + ], + 'COUNTA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTA'], + 'argumentCount' => '1+', + ], + 'COUNTBLANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTBLANK'], + 'argumentCount' => '1', + ], + 'COUNTIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COUNTIF'], + 'argumentCount' => '2', + ], + 'COUNTIFS' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2+', + ], + 'COUPDAYBS' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYBS'], + 'argumentCount' => '3,4', + ], + 'COUPDAYS' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYS'], + 'argumentCount' => '3,4', + ], + 'COUPDAYSNC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPDAYSNC'], + 'argumentCount' => '3,4', + ], + 'COUPNCD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPNCD'], + 'argumentCount' => '3,4', + ], + 'COUPNUM' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPNUM'], + 'argumentCount' => '3,4', + ], + 'COUPPCD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'COUPPCD'], + 'argumentCount' => '3,4', + ], + 'COVAR' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'COVAR'], + 'argumentCount' => '2', + ], + 'CRITBINOM' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CRITBINOM'], + 'argumentCount' => '3', + ], + 'CSC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CSC'], + 'argumentCount' => '1', + ], + 'CSCH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'CSCH'], + 'argumentCount' => '1', + ], + 'CUBEKPIMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEMEMBERPROPERTY' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBERANKEDMEMBER' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBESET' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBESETCOUNT' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUBEVALUE' => [ + 'category' => Category::CATEGORY_CUBE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '?', + ], + 'CUMIPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'CUMIPMT'], + 'argumentCount' => '6', + ], + 'CUMPRINC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'CUMPRINC'], + 'argumentCount' => '6', + ], + 'DATE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATE'], + 'argumentCount' => '3', + ], + 'DATEDIF' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATEDIF'], + 'argumentCount' => '2,3', + ], + 'DATEVALUE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATEVALUE'], + 'argumentCount' => '1', + ], + 'DAVERAGE' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DAVERAGE'], + 'argumentCount' => '3', + ], + 'DAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYOFMONTH'], + 'argumentCount' => '1', + ], + 'DAYS' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYS'], + 'argumentCount' => '2', + ], + 'DAYS360' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DAYS360'], + 'argumentCount' => '2,3', + ], + 'DB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DB'], + 'argumentCount' => '4,5', + ], + 'DCOUNT' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DCOUNT'], + 'argumentCount' => '3', + ], + 'DCOUNTA' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DCOUNTA'], + 'argumentCount' => '3', + ], + 'DDB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DDB'], + 'argumentCount' => '4,5', + ], + 'DEC2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOBIN'], + 'argumentCount' => '1,2', + ], + 'DEC2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOHEX'], + 'argumentCount' => '1,2', + ], + 'DEC2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DECTOOCT'], + 'argumentCount' => '1,2', + ], + 'DEGREES' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'rad2deg', + 'argumentCount' => '1', + ], + 'DELTA' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'DELTA'], + 'argumentCount' => '1,2', + ], + 'DEVSQ' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'DEVSQ'], + 'argumentCount' => '1+', + ], + 'DGET' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DGET'], + 'argumentCount' => '3', + ], + 'DISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DISC'], + 'argumentCount' => '4,5', + ], + 'DMAX' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DMAX'], + 'argumentCount' => '3', + ], + 'DMIN' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DMIN'], + 'argumentCount' => '3', + ], + 'DOLLAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'DOLLAR'], + 'argumentCount' => '1,2', + ], + 'DOLLARDE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DOLLARDE'], + 'argumentCount' => '2', + ], + 'DOLLARFR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'DOLLARFR'], + 'argumentCount' => '2', + ], + 'DPRODUCT' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DPRODUCT'], + 'argumentCount' => '3', + ], + 'DSTDEV' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSTDEV'], + 'argumentCount' => '3', + ], + 'DSTDEVP' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSTDEVP'], + 'argumentCount' => '3', + ], + 'DSUM' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DSUM'], + 'argumentCount' => '3', + ], + 'DURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5,6', + ], + 'DVAR' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DVAR'], + 'argumentCount' => '3', + ], + 'DVARP' => [ + 'category' => Category::CATEGORY_DATABASE, + 'functionCall' => [Database::class, 'DVARP'], + 'argumentCount' => '3', + ], + 'EDATE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'EDATE'], + 'argumentCount' => '2', + ], + 'EFFECT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'EFFECT'], + 'argumentCount' => '2', + ], + 'EOMONTH' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'EOMONTH'], + 'argumentCount' => '2', + ], + 'ERF' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERF'], + 'argumentCount' => '1,2', + ], + 'ERF.PRECISE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFPRECISE'], + 'argumentCount' => '1', + ], + 'ERFC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFC'], + 'argumentCount' => '1', + ], + 'ERFC.PRECISE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'ERFC'], + 'argumentCount' => '1', + ], + 'ERROR.TYPE' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'errorType'], + 'argumentCount' => '1', + ], + 'EVEN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'EVEN'], + 'argumentCount' => '1', + ], + 'EXACT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'EXACT'], + 'argumentCount' => '2', + ], + 'EXP' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'exp', + 'argumentCount' => '1', + ], + 'EXPONDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'EXPONDIST'], + 'argumentCount' => '3', + ], + 'FACT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FACT'], + 'argumentCount' => '1', + ], + 'FACTDOUBLE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FACTDOUBLE'], + 'argumentCount' => '1', + ], + 'FALSE' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'FALSE'], + 'argumentCount' => '0', + ], + 'FDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3', + ], + 'FIND' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'FINDB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'FINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3', + ], + 'FISHER' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FISHER'], + 'argumentCount' => '1', + ], + 'FISHERINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FISHERINV'], + 'argumentCount' => '1', + ], + 'FIXED' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'FIXEDFORMAT'], + 'argumentCount' => '1-3', + ], + 'FLOOR' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'FLOOR'], + 'argumentCount' => '2', + ], + 'FORECAST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'FORECAST'], + 'argumentCount' => '3', + ], + 'FORMULATEXT' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'FORMULATEXT'], + 'argumentCount' => '1', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'FREQUENCY' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'FTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'FV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'FV'], + 'argumentCount' => '3-5', + ], + 'FVSCHEDULE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'FVSCHEDULE'], + 'argumentCount' => '2', + ], + 'GAMMADIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMADIST'], + 'argumentCount' => '4', + ], + 'GAMMAINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMAINV'], + 'argumentCount' => '3', + ], + 'GAMMALN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GAMMALN'], + 'argumentCount' => '1', + ], + 'GCD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'GCD'], + 'argumentCount' => '1+', + ], + 'GEOMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GEOMEAN'], + 'argumentCount' => '1+', + ], + 'GESTEP' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'GESTEP'], + 'argumentCount' => '1,2', + ], + 'GETPIVOTDATA' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2+', + ], + 'GROWTH' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'GROWTH'], + 'argumentCount' => '1-4', + ], + 'HARMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'HARMEAN'], + 'argumentCount' => '1+', + ], + 'HEX2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTOBIN'], + 'argumentCount' => '1,2', + ], + 'HEX2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTODEC'], + 'argumentCount' => '1', + ], + 'HEX2OCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'HEXTOOCT'], + 'argumentCount' => '1,2', + ], + 'HLOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'HLOOKUP'], + 'argumentCount' => '3,4', + ], + 'HOUR' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'HOUROFDAY'], + 'argumentCount' => '1', + ], + 'HYPERLINK' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'HYPERLINK'], + 'argumentCount' => '1,2', + 'passCellReference' => true, + ], + 'HYPGEOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'HYPGEOMDIST'], + 'argumentCount' => '4', + ], + 'IF' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'statementIf'], + 'argumentCount' => '1-3', + ], + 'IFERROR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'IFERROR'], + 'argumentCount' => '2', + ], + 'IMABS' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMABS'], + 'argumentCount' => '1', + ], + 'IMAGINARY' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMAGINARY'], + 'argumentCount' => '1', + ], + 'IMARGUMENT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMARGUMENT'], + 'argumentCount' => '1', + ], + 'IMCONJUGATE' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCONJUGATE'], + 'argumentCount' => '1', + ], + 'IMCOS' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOS'], + 'argumentCount' => '1', + ], + 'IMCOSH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOSH'], + 'argumentCount' => '1', + ], + 'IMCOT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCOT'], + 'argumentCount' => '1', + ], + 'IMCSC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCSC'], + 'argumentCount' => '1', + ], + 'IMCSCH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMCSCH'], + 'argumentCount' => '1', + ], + 'IMDIV' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMDIV'], + 'argumentCount' => '2', + ], + 'IMEXP' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMEXP'], + 'argumentCount' => '1', + ], + 'IMLN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLN'], + 'argumentCount' => '1', + ], + 'IMLOG10' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLOG10'], + 'argumentCount' => '1', + ], + 'IMLOG2' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMLOG2'], + 'argumentCount' => '1', + ], + 'IMPOWER' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMPOWER'], + 'argumentCount' => '2', + ], + 'IMPRODUCT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMPRODUCT'], + 'argumentCount' => '1+', + ], + 'IMREAL' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMREAL'], + 'argumentCount' => '1', + ], + 'IMSEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSEC'], + 'argumentCount' => '1', + ], + 'IMSECH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSECH'], + 'argumentCount' => '1', + ], + 'IMSIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSIN'], + 'argumentCount' => '1', + ], + 'IMSINH' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSINH'], + 'argumentCount' => '1', + ], + 'IMSQRT' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSQRT'], + 'argumentCount' => '1', + ], + 'IMSUB' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSUB'], + 'argumentCount' => '2', + ], + 'IMSUM' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMSUM'], + 'argumentCount' => '1+', + ], + 'IMTAN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'IMTAN'], + 'argumentCount' => '1', + ], + 'INDEX' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'INDEX'], + 'argumentCount' => '1-4', + ], + 'INDIRECT' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'INDIRECT'], + 'argumentCount' => '1,2', + 'passCellReference' => true, + ], + 'INFO' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'INT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'INT'], + 'argumentCount' => '1', + ], + 'INTERCEPT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'INTERCEPT'], + 'argumentCount' => '2', + ], + 'INTRATE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'INTRATE'], + 'argumentCount' => '4,5', + ], + 'IPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'IPMT'], + 'argumentCount' => '4-6', + ], + 'IRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'IRR'], + 'argumentCount' => '1,2', + ], + 'ISBLANK' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isBlank'], + 'argumentCount' => '1', + ], + 'ISERR' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isErr'], + 'argumentCount' => '1', + ], + 'ISERROR' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isError'], + 'argumentCount' => '1', + ], + 'ISEVEN' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isEven'], + 'argumentCount' => '1', + ], + 'ISFORMULA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isFormula'], + 'argumentCount' => '1', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'ISLOGICAL' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isLogical'], + 'argumentCount' => '1', + ], + 'ISNA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNa'], + 'argumentCount' => '1', + ], + 'ISNONTEXT' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNonText'], + 'argumentCount' => '1', + ], + 'ISNUMBER' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isNumber'], + 'argumentCount' => '1', + ], + 'ISODD' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isOdd'], + 'argumentCount' => '1', + ], + 'ISOWEEKNUM' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'ISOWEEKNUM'], + 'argumentCount' => '1', + ], + 'ISPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'ISPMT'], + 'argumentCount' => '4', + ], + 'ISREF' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'ISTEXT' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'isText'], + 'argumentCount' => '1', + ], + 'JIS' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'KURT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'KURT'], + 'argumentCount' => '1+', + ], + 'LARGE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LARGE'], + 'argumentCount' => '2', + ], + 'LCM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'LCM'], + 'argumentCount' => '1+', + ], + 'LEFT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LEFT'], + 'argumentCount' => '1,2', + ], + 'LEFTB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LEFT'], + 'argumentCount' => '1,2', + ], + 'LEN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'STRINGLENGTH'], + 'argumentCount' => '1', + ], + 'LENB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'STRINGLENGTH'], + 'argumentCount' => '1', + ], + 'LINEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LINEST'], + 'argumentCount' => '1-4', + ], + 'LN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'log', + 'argumentCount' => '1', + ], + 'LOG' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'logBase'], + 'argumentCount' => '1,2', + ], + 'LOG10' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'log10', + 'argumentCount' => '1', + ], + 'LOGEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGEST'], + 'argumentCount' => '1-4', + ], + 'LOGINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGINV'], + 'argumentCount' => '3', + ], + 'LOGNORMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'LOGNORMDIST'], + 'argumentCount' => '3', + ], + 'LOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'LOOKUP'], + 'argumentCount' => '2,3', + ], + 'LOWER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'LOWERCASE'], + 'argumentCount' => '1', + ], + 'MATCH' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'MATCH'], + 'argumentCount' => '2,3', + ], + 'MAX' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAX'], + 'argumentCount' => '1+', + ], + 'MAXA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAXA'], + 'argumentCount' => '1+', + ], + 'MAXIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MAXIF'], + 'argumentCount' => '2+', + ], + 'MDETERM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MDETERM'], + 'argumentCount' => '1', + ], + 'MDURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5,6', + ], + 'MEDIAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MEDIAN'], + 'argumentCount' => '1+', + ], + 'MEDIANIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2+', + ], + 'MID' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'MID'], + 'argumentCount' => '3', + ], + 'MIDB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'MID'], + 'argumentCount' => '3', + ], + 'MIN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MIN'], + 'argumentCount' => '1+', + ], + 'MINA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MINA'], + 'argumentCount' => '1+', + ], + 'MINIF' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MINIF'], + 'argumentCount' => '2+', + ], + 'MINUTE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'MINUTE'], + 'argumentCount' => '1', + ], + 'MINVERSE' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MINVERSE'], + 'argumentCount' => '1', + ], + 'MIRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'MIRR'], + 'argumentCount' => '3', + ], + 'MMULT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MMULT'], + 'argumentCount' => '2', + ], + 'MOD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MOD'], + 'argumentCount' => '2', + ], + 'MODE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MODE'], + 'argumentCount' => '1+', + ], + 'MODE.SNGL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'MODE'], + 'argumentCount' => '1+', + ], + 'MONTH' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'MONTHOFYEAR'], + 'argumentCount' => '1', + ], + 'MROUND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MROUND'], + 'argumentCount' => '2', + ], + 'MULTINOMIAL' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'MULTINOMIAL'], + 'argumentCount' => '1+', + ], + 'N' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'n'], + 'argumentCount' => '1', + ], + 'NA' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'NA'], + 'argumentCount' => '0', + ], + 'NEGBINOMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NEGBINOMDIST'], + 'argumentCount' => '3', + ], + 'NETWORKDAYS' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'NETWORKDAYS'], + 'argumentCount' => '2+', + ], + 'NOMINAL' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NOMINAL'], + 'argumentCount' => '2', + ], + 'NORMDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMDIST'], + 'argumentCount' => '4', + ], + 'NORMINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMINV'], + 'argumentCount' => '3', + ], + 'NORMSDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMSDIST'], + 'argumentCount' => '1', + ], + 'NORMSINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'NORMSINV'], + 'argumentCount' => '1', + ], + 'NOT' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'NOT'], + 'argumentCount' => '1', + ], + 'NOW' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATETIMENOW'], + 'argumentCount' => '0', + ], + 'NPER' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NPER'], + 'argumentCount' => '3-5', + ], + 'NPV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'NPV'], + 'argumentCount' => '2+', + ], + 'NUMBERVALUE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'NUMBERVALUE'], + 'argumentCount' => '1+', + ], + 'OCT2BIN' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTOBIN'], + 'argumentCount' => '1,2', + ], + 'OCT2DEC' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTODEC'], + 'argumentCount' => '1', + ], + 'OCT2HEX' => [ + 'category' => Category::CATEGORY_ENGINEERING, + 'functionCall' => [Engineering::class, 'OCTTOHEX'], + 'argumentCount' => '1,2', + ], + 'ODD' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ODD'], + 'argumentCount' => '1', + ], + 'ODDFPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '8,9', + ], + 'ODDFYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '8,9', + ], + 'ODDLPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '7,8', + ], + 'ODDLYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '7,8', + ], + 'OFFSET' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'OFFSET'], + 'argumentCount' => '3-5', + 'passCellReference' => true, + 'passByReference' => [true], + ], + 'OR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalOr'], + 'argumentCount' => '1+', + ], + 'PDURATION' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PDURATION'], + 'argumentCount' => '3', + ], + 'PEARSON' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'CORREL'], + 'argumentCount' => '2', + ], + 'PERCENTILE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERCENTILE'], + 'argumentCount' => '2', + ], + 'PERCENTRANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERCENTRANK'], + 'argumentCount' => '2,3', + ], + 'PERMUT' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'PERMUT'], + 'argumentCount' => '2', + ], + 'PHONETIC' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1', + ], + 'PI' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'pi', + 'argumentCount' => '0', + ], + 'PMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PMT'], + 'argumentCount' => '3-5', + ], + 'POISSON' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'POISSON'], + 'argumentCount' => '3', + ], + 'POWER' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'POWER'], + 'argumentCount' => '2', + ], + 'PPMT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PPMT'], + 'argumentCount' => '4-6', + ], + 'PRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICE'], + 'argumentCount' => '6,7', + ], + 'PRICEDISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICEDISC'], + 'argumentCount' => '4,5', + ], + 'PRICEMAT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PRICEMAT'], + 'argumentCount' => '5,6', + ], + 'PROB' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '3,4', + ], + 'PRODUCT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'PRODUCT'], + 'argumentCount' => '1+', + ], + 'PROPER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'PROPERCASE'], + 'argumentCount' => '1', + ], + 'PV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'PV'], + 'argumentCount' => '3-5', + ], + 'QUARTILE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'QUARTILE'], + 'argumentCount' => '2', + ], + 'QUOTIENT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'QUOTIENT'], + 'argumentCount' => '2', + ], + 'RADIANS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'deg2rad', + 'argumentCount' => '1', + ], + 'RAND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'RAND'], + 'argumentCount' => '0', + ], + 'RANDBETWEEN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'RAND'], + 'argumentCount' => '2', + ], + 'RANK' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'RANK'], + 'argumentCount' => '2,3', + ], + 'RATE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RATE'], + 'argumentCount' => '3-6', + ], + 'RECEIVED' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RECEIVED'], + 'argumentCount' => '4-5', + ], + 'REPLACE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'REPLACE'], + 'argumentCount' => '4', + ], + 'REPLACEB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'REPLACE'], + 'argumentCount' => '4', + ], + 'REPT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => 'str_repeat', + 'argumentCount' => '2', + ], + 'RIGHT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RIGHT'], + 'argumentCount' => '1,2', + ], + 'RIGHTB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RIGHT'], + 'argumentCount' => '1,2', + ], + 'ROMAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROMAN'], + 'argumentCount' => '1,2', + ], + 'ROUND' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'round', + 'argumentCount' => '2', + ], + 'ROUNDDOWN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROUNDDOWN'], + 'argumentCount' => '2', + ], + 'ROUNDUP' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'ROUNDUP'], + 'argumentCount' => '2', + ], + 'ROW' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'ROW'], + 'argumentCount' => '-1', + 'passByReference' => [true], + ], + 'ROWS' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'ROWS'], + 'argumentCount' => '1', + ], + 'RRI' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'RRI'], + 'argumentCount' => '3', + ], + 'RSQ' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'RSQ'], + 'argumentCount' => '2', + ], + 'RTD' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '1+', + ], + 'SEARCH' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'SEARCHB' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'], + 'argumentCount' => '2,3', + ], + 'SEC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SEC'], + 'argumentCount' => '1', + ], + 'SECH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SECH'], + 'argumentCount' => '1', + ], + 'SECOND' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'SECOND'], + 'argumentCount' => '1', + ], + 'SERIESSUM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SERIESSUM'], + 'argumentCount' => '4', + ], + 'SIGN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SIGN'], + 'argumentCount' => '1', + ], + 'SIN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sin', + 'argumentCount' => '1', + ], + 'SINH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sinh', + 'argumentCount' => '1', + ], + 'SKEW' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SKEW'], + 'argumentCount' => '1+', + ], + 'SLN' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'SLN'], + 'argumentCount' => '3', + ], + 'SLOPE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SLOPE'], + 'argumentCount' => '2', + ], + 'SMALL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'SMALL'], + 'argumentCount' => '2', + ], + 'SQRT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'sqrt', + 'argumentCount' => '1', + ], + 'SQRTPI' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SQRTPI'], + 'argumentCount' => '1', + ], + 'STANDARDIZE' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STANDARDIZE'], + 'argumentCount' => '3', + ], + 'STDEV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEV'], + 'argumentCount' => '1+', + ], + 'STDEV.S' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEV'], + 'argumentCount' => '1+', + ], + 'STDEV.P' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVP'], + 'argumentCount' => '1+', + ], + 'STDEVA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVA'], + 'argumentCount' => '1+', + ], + 'STDEVP' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVP'], + 'argumentCount' => '1+', + ], + 'STDEVPA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STDEVPA'], + 'argumentCount' => '1+', + ], + 'STEYX' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'STEYX'], + 'argumentCount' => '2', + ], + 'SUBSTITUTE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'SUBSTITUTE'], + 'argumentCount' => '3,4', + ], + 'SUBTOTAL' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUBTOTAL'], + 'argumentCount' => '2+', + 'passCellReference' => true, + ], + 'SUM' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUM'], + 'argumentCount' => '1+', + ], + 'SUMIF' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMIF'], + 'argumentCount' => '2,3', + ], + 'SUMIFS' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMIFS'], + 'argumentCount' => '3+', + ], + 'SUMPRODUCT' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMPRODUCT'], + 'argumentCount' => '1+', + ], + 'SUMSQ' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMSQ'], + 'argumentCount' => '1+', + ], + 'SUMX2MY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMX2MY2'], + 'argumentCount' => '2', + ], + 'SUMX2PY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMX2PY2'], + 'argumentCount' => '2', + ], + 'SUMXMY2' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'SUMXMY2'], + 'argumentCount' => '2', + ], + 'SWITCH' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'statementSwitch'], + 'argumentCount' => '3+', + ], + 'SYD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'SYD'], + 'argumentCount' => '4', + ], + 'T' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'RETURNSTRING'], + 'argumentCount' => '1', + ], + 'TAN' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'tan', + 'argumentCount' => '1', + ], + 'TANH' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => 'tanh', + 'argumentCount' => '1', + ], + 'TBILLEQ' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLEQ'], + 'argumentCount' => '3', + ], + 'TBILLPRICE' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLPRICE'], + 'argumentCount' => '3', + ], + 'TBILLYIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'TBILLYIELD'], + 'argumentCount' => '3', + ], + 'TDIST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TDIST'], + 'argumentCount' => '3', + ], + 'TEXT' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TEXTFORMAT'], + 'argumentCount' => '2', + ], + 'TEXTJOIN' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TEXTJOIN'], + 'argumentCount' => '3+', + ], + 'TIME' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'TIME'], + 'argumentCount' => '3', + ], + 'TIMEVALUE' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'TIMEVALUE'], + 'argumentCount' => '1', + ], + 'TINV' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TINV'], + 'argumentCount' => '2', + ], + 'TODAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'DATENOW'], + 'argumentCount' => '0', + ], + 'TRANSPOSE' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'TRANSPOSE'], + 'argumentCount' => '1', + ], + 'TREND' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TREND'], + 'argumentCount' => '1-4', + ], + 'TRIM' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'TRIMSPACES'], + 'argumentCount' => '1', + ], + 'TRIMMEAN' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'TRIMMEAN'], + 'argumentCount' => '2', + ], + 'TRUE' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'TRUE'], + 'argumentCount' => '0', + ], + 'TRUNC' => [ + 'category' => Category::CATEGORY_MATH_AND_TRIG, + 'functionCall' => [MathTrig::class, 'TRUNC'], + 'argumentCount' => '1,2', + ], + 'TTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '4', + ], + 'TYPE' => [ + 'category' => Category::CATEGORY_INFORMATION, + 'functionCall' => [Functions::class, 'TYPE'], + 'argumentCount' => '1', + ], + 'UNICHAR' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'CHARACTER'], + 'argumentCount' => '1', + ], + 'UNICODE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'ASCIICODE'], + 'argumentCount' => '1', + ], + 'UPPER' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'UPPERCASE'], + 'argumentCount' => '1', + ], + 'USDOLLAR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '2', + ], + 'VALUE' => [ + 'category' => Category::CATEGORY_TEXT_AND_DATA, + 'functionCall' => [TextData::class, 'VALUE'], + 'argumentCount' => '1', + ], + 'VAR' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARFunc'], + 'argumentCount' => '1+', + ], + 'VAR.P' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARP'], + 'argumentCount' => '1+', + ], + 'VAR.S' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARFunc'], + 'argumentCount' => '1+', + ], + 'VARA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARA'], + 'argumentCount' => '1+', + ], + 'VARP' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARP'], + 'argumentCount' => '1+', + ], + 'VARPA' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'VARPA'], + 'argumentCount' => '1+', + ], + 'VDB' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '5-7', + ], + 'VLOOKUP' => [ + 'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE, + 'functionCall' => [LookupRef::class, 'VLOOKUP'], + 'argumentCount' => '3,4', + ], + 'WEEKDAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WEEKDAY'], + 'argumentCount' => '1,2', + ], + 'WEEKNUM' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WEEKNUM'], + 'argumentCount' => '1,2', + ], + 'WEIBULL' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'WEIBULL'], + 'argumentCount' => '4', + ], + 'WORKDAY' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'WORKDAY'], + 'argumentCount' => '2+', + ], + 'XIRR' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'XIRR'], + 'argumentCount' => '2,3', + ], + 'XNPV' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'XNPV'], + 'argumentCount' => '3', + ], + 'XOR' => [ + 'category' => Category::CATEGORY_LOGICAL, + 'functionCall' => [Logical::class, 'logicalXor'], + 'argumentCount' => '1+', + ], + 'YEAR' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'YEAR'], + 'argumentCount' => '1', + ], + 'YEARFRAC' => [ + 'category' => Category::CATEGORY_DATE_AND_TIME, + 'functionCall' => [DateTime::class, 'YEARFRAC'], + 'argumentCount' => '2,3', + ], + 'YIELD' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Functions::class, 'DUMMY'], + 'argumentCount' => '6,7', + ], + 'YIELDDISC' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'YIELDDISC'], + 'argumentCount' => '4,5', + ], + 'YIELDMAT' => [ + 'category' => Category::CATEGORY_FINANCIAL, + 'functionCall' => [Financial::class, 'YIELDMAT'], + 'argumentCount' => '5,6', + ], + 'ZTEST' => [ + 'category' => Category::CATEGORY_STATISTICAL, + 'functionCall' => [Statistical::class, 'ZTEST'], + 'argumentCount' => '2-3', + ], + ]; + + // Internal functions used for special control purposes + private static $controlFunctions = [ + 'MKMATRIX' => [ + 'argumentCount' => '*', + 'functionCall' => 'self::mkMatrix', + ], + ]; + + public function __construct(Spreadsheet $spreadsheet = null) + { + $this->delta = 1 * pow(10, 0 - ini_get('precision')); + + $this->spreadsheet = $spreadsheet; + $this->cyclicReferenceStack = new CyclicReferenceStack(); + $this->debugLog = new Logger($this->cyclicReferenceStack); + } + + private static function loadLocales() + { + $localeFileDirectory = __DIR__ . '/locale/'; + foreach (glob($localeFileDirectory . '*', GLOB_ONLYDIR) as $filename) { + $filename = substr($filename, strlen($localeFileDirectory)); + if ($filename != 'en') { + self::$validLocaleLanguages[] = $filename; + } + } + } + + /** + * Get an instance of this class. + * + * @param Spreadsheet $spreadsheet Injected spreadsheet for working with a PhpSpreadsheet Spreadsheet object, + * or NULL to create a standalone claculation engine + * + * @return Calculation + */ + public static function getInstance(Spreadsheet $spreadsheet = null) + { + if ($spreadsheet !== null) { + $instance = $spreadsheet->getCalculationEngine(); + if (isset($instance)) { + return $instance; + } + } + + if (!isset(self::$instance) || (self::$instance === null)) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Flush the calculation cache for any existing instance of this class + * but only if a Calculation instance exists. + */ + public function flushInstance() + { + $this->clearCalculationCache(); + } + + /** + * Get the Logger for this calculation engine instance. + * + * @return Logger + */ + public function getDebugLog() + { + return $this->debugLog; + } + + /** + * __clone implementation. Cloning should not be allowed in a Singleton! + * + * @throws Exception + */ + final public function __clone() + { + throw new Exception('Cloning the calculation engine is not allowed!'); + } + + /** + * Return the locale-specific translation of TRUE. + * + * @return string locale-specific translation of TRUE + */ + public static function getTRUE() + { + return self::$localeBoolean['TRUE']; + } + + /** + * Return the locale-specific translation of FALSE. + * + * @return string locale-specific translation of FALSE + */ + public static function getFALSE() + { + return self::$localeBoolean['FALSE']; + } + + /** + * Set the Array Return Type (Array or Value of first element in the array). + * + * @param string $returnType Array return type + * + * @return bool Success or failure + */ + public static function setArrayReturnType($returnType) + { + if (($returnType == self::RETURN_ARRAY_AS_VALUE) || + ($returnType == self::RETURN_ARRAY_AS_ERROR) || + ($returnType == self::RETURN_ARRAY_AS_ARRAY)) { + self::$returnArrayAsType = $returnType; + + return true; + } + + return false; + } + + /** + * Return the Array Return Type (Array or Value of first element in the array). + * + * @return string $returnType Array return type + */ + public static function getArrayReturnType() + { + return self::$returnArrayAsType; + } + + /** + * Is calculation caching enabled? + * + * @return bool + */ + public function getCalculationCacheEnabled() + { + return $this->calculationCacheEnabled; + } + + /** + * Enable/disable calculation cache. + * + * @param bool $pValue + */ + public function setCalculationCacheEnabled($pValue) + { + $this->calculationCacheEnabled = $pValue; + $this->clearCalculationCache(); + } + + /** + * Enable calculation cache. + */ + public function enableCalculationCache() + { + $this->setCalculationCacheEnabled(true); + } + + /** + * Disable calculation cache. + */ + public function disableCalculationCache() + { + $this->setCalculationCacheEnabled(false); + } + + /** + * Clear calculation cache. + */ + public function clearCalculationCache() + { + $this->calculationCache = []; + } + + /** + * Clear calculation cache for a specified worksheet. + * + * @param string $worksheetName + */ + public function clearCalculationCacheForWorksheet($worksheetName) + { + if (isset($this->calculationCache[$worksheetName])) { + unset($this->calculationCache[$worksheetName]); + } + } + + /** + * Rename calculation cache for a specified worksheet. + * + * @param string $fromWorksheetName + * @param string $toWorksheetName + */ + public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksheetName) + { + if (isset($this->calculationCache[$fromWorksheetName])) { + $this->calculationCache[$toWorksheetName] = &$this->calculationCache[$fromWorksheetName]; + unset($this->calculationCache[$fromWorksheetName]); + } + } + + /** + * Get the currently defined locale code. + * + * @return string + */ + public function getLocale() + { + return self::$localeLanguage; + } + + /** + * Set the locale code. + * + * @param string $locale The locale to use for formula translation, eg: 'en_us' + * + * @return bool + */ + public function setLocale($locale) + { + // Identify our locale and language + $language = $locale = strtolower($locale); + if (strpos($locale, '_') !== false) { + list($language) = explode('_', $locale); + } + if (count(self::$validLocaleLanguages) == 1) { + self::loadLocales(); + } + // Test whether we have any language data for this language (any locale) + if (in_array($language, self::$validLocaleLanguages)) { + // initialise language/locale settings + self::$localeFunctions = []; + self::$localeArgumentSeparator = ','; + self::$localeBoolean = ['TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL']; + // Default is English, if user isn't requesting english, then read the necessary data from the locale files + if ($locale != 'en_us') { + // Search for a file with a list of function names for locale + $functionNamesFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions'; + if (!file_exists($functionNamesFile)) { + // If there isn't a locale specific function file, look for a language specific function file + $functionNamesFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'functions'; + if (!file_exists($functionNamesFile)) { + return false; + } + } + // Retrieve the list of locale or language specific function names + $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($localeFunctions as $localeFunction) { + list($localeFunction) = explode('##', $localeFunction); // Strip out comments + if (strpos($localeFunction, '=') !== false) { + list($fName, $lfName) = explode('=', $localeFunction); + $fName = trim($fName); + $lfName = trim($lfName); + if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) { + self::$localeFunctions[$fName] = $lfName; + } + } + } + // Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions + if (isset(self::$localeFunctions['TRUE'])) { + self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE']; + } + if (isset(self::$localeFunctions['FALSE'])) { + self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE']; + } + + $configFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config'; + if (!file_exists($configFile)) { + $configFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'config'; + } + if (file_exists($configFile)) { + $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($localeSettings as $localeSetting) { + list($localeSetting) = explode('##', $localeSetting); // Strip out comments + if (strpos($localeSetting, '=') !== false) { + list($settingName, $settingValue) = explode('=', $localeSetting); + $settingName = strtoupper(trim($settingName)); + switch ($settingName) { + case 'ARGUMENTSEPARATOR': + self::$localeArgumentSeparator = trim($settingValue); + + break; + } + } + } + } + } + + self::$functionReplaceFromExcel = self::$functionReplaceToExcel = + self::$functionReplaceFromLocale = self::$functionReplaceToLocale = null; + self::$localeLanguage = $locale; + + return true; + } + + return false; + } + + /** + * @param string $fromSeparator + * @param string $toSeparator + * @param string $formula + * @param bool $inBraces + * + * @return string + */ + public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces) + { + $strlen = mb_strlen($formula); + for ($i = 0; $i < $strlen; ++$i) { + $chr = mb_substr($formula, $i, 1); + switch ($chr) { + case '{': + $inBraces = true; + + break; + case '}': + $inBraces = false; + + break; + case $fromSeparator: + if (!$inBraces) { + $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1); + } + } + } + + return $formula; + } + + /** + * @param string[] $from + * @param string[] $to + * @param string $formula + * @param string $fromSeparator + * @param string $toSeparator + * + * @return string + */ + private static function translateFormula(array $from, array $to, $formula, $fromSeparator, $toSeparator) + { + // Convert any Excel function names to the required language + if (self::$localeLanguage !== 'en_us') { + $inBraces = false; + // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators + if (strpos($formula, '"') !== false) { + // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded + // the formula + $temp = explode('"', $formula); + $i = false; + foreach ($temp as &$value) { + // Only count/replace in alternating array entries + if ($i = !$i) { + $value = preg_replace($from, $to, $value); + $value = self::translateSeparator($fromSeparator, $toSeparator, $value, $inBraces); + } + } + unset($value); + // Then rebuild the formula string + $formula = implode('"', $temp); + } else { + // If there's no quoted strings, then we do a simple count/replace + $formula = preg_replace($from, $to, $formula); + $formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces); + } + } + + return $formula; + } + + private static $functionReplaceFromExcel = null; + + private static $functionReplaceToLocale = null; + + public function _translateFormulaToLocale($formula) + { + if (self::$functionReplaceFromExcel === null) { + self::$functionReplaceFromExcel = []; + foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelFunctionName, '/') . '([\s]*\()/Ui'; + } + foreach (array_keys(self::$localeBoolean) as $excelBoolean) { + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui'; + } + } + + if (self::$functionReplaceToLocale === null) { + self::$functionReplaceToLocale = []; + foreach (self::$localeFunctions as $localeFunctionName) { + self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2'; + } + foreach (self::$localeBoolean as $localeBoolean) { + self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2'; + } + } + + return self::translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator); + } + + private static $functionReplaceFromLocale = null; + + private static $functionReplaceToExcel = null; + + public function _translateFormulaToEnglish($formula) + { + if (self::$functionReplaceFromLocale === null) { + self::$functionReplaceFromLocale = []; + foreach (self::$localeFunctions as $localeFunctionName) { + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($localeFunctionName, '/') . '([\s]*\()/Ui'; + } + foreach (self::$localeBoolean as $excelBoolean) { + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($excelBoolean, '/') . '([^\w\.])/Ui'; + } + } + + if (self::$functionReplaceToExcel === null) { + self::$functionReplaceToExcel = []; + foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { + self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2'; + } + foreach (array_keys(self::$localeBoolean) as $excelBoolean) { + self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2'; + } + } + + return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ','); + } + + public static function localeFunc($function) + { + if (self::$localeLanguage !== 'en_us') { + $functionName = trim($function, '('); + if (isset(self::$localeFunctions[$functionName])) { + $brace = ($functionName != $function); + $function = self::$localeFunctions[$functionName]; + if ($brace) { + $function .= '('; + } + } + } + + return $function; + } + + /** + * Wrap string values in quotes. + * + * @param mixed $value + * + * @return mixed + */ + public static function wrapResult($value) + { + if (is_string($value)) { + // Error values cannot be "wrapped" + if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) { + // Return Excel errors "as is" + return $value; + } + // Return strings wrapped in quotes + return '"' . $value . '"'; + // Convert numeric errors to NaN error + } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { + return Functions::NAN(); + } + + return $value; + } + + /** + * Remove quotes used as a wrapper to identify string values. + * + * @param mixed $value + * + * @return mixed + */ + public static function unwrapResult($value) + { + if (is_string($value)) { + if ((isset($value[0])) && ($value[0] == '"') && (substr($value, -1) == '"')) { + return substr($value, 1, -1); + } + // Convert numeric errors to NAN error + } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { + return Functions::NAN(); + } + + return $value; + } + + /** + * Calculate cell value (using formula from a cell ID) + * Retained for backward compatibility. + * + * @param Cell $pCell Cell to calculate + * + * @throws Exception + * + * @return mixed + */ + public function calculate(Cell $pCell = null) + { + try { + return $this->calculateCellValue($pCell); + } catch (\Exception $e) { + throw new Exception($e->getMessage()); + } + } + + /** + * Calculate the value of a cell formula. + * + * @param Cell $pCell Cell to calculate + * @param bool $resetLog Flag indicating whether the debug log should be reset or not + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + * + * @return mixed + */ + public function calculateCellValue(Cell $pCell = null, $resetLog = true) + { + if ($pCell === null) { + return null; + } + + $returnArrayAsType = self::$returnArrayAsType; + if ($resetLog) { + // Initialise the logging settings if requested + $this->formulaError = null; + $this->debugLog->clearLog(); + $this->cyclicReferenceStack->clear(); + $this->cyclicFormulaCounter = 1; + + self::$returnArrayAsType = self::RETURN_ARRAY_AS_ARRAY; + } + + // Execute the calculation for the cell formula + $this->cellStack[] = [ + 'sheet' => $pCell->getWorksheet()->getTitle(), + 'cell' => $pCell->getCoordinate(), + ]; + + try { + $result = self::unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell)); + $cellAddress = array_pop($this->cellStack); + $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); + } catch (\Exception $e) { + $cellAddress = array_pop($this->cellStack); + $this->spreadsheet->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); + + throw new Exception($e->getMessage()); + } + + if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { + self::$returnArrayAsType = $returnArrayAsType; + $testResult = Functions::flattenArray($result); + if (self::$returnArrayAsType == self::RETURN_ARRAY_AS_ERROR) { + return Functions::VALUE(); + } + // If there's only a single cell in the array, then we allow it + if (count($testResult) != 1) { + // If keys are numeric, then it's a matrix result rather than a cell range result, so we permit it + $r = array_keys($result); + $r = array_shift($r); + if (!is_numeric($r)) { + return Functions::VALUE(); + } + if (is_array($result[$r])) { + $c = array_keys($result[$r]); + $c = array_shift($c); + if (!is_numeric($c)) { + return Functions::VALUE(); + } + } + } + $result = array_shift($testResult); + } + self::$returnArrayAsType = $returnArrayAsType; + + if ($result === null) { + return 0; + } elseif ((is_float($result)) && ((is_nan($result)) || (is_infinite($result)))) { + return Functions::NAN(); + } + + return $result; + } + + /** + * Validate and parse a formula string. + * + * @param string $formula Formula to parse + * + * @return array|bool + */ + public function parseFormula($formula) + { + // Basic validation that this is indeed a formula + // We return an empty array if not + $formula = trim($formula); + if ((!isset($formula[0])) || ($formula[0] != '=')) { + return []; + } + $formula = ltrim(substr($formula, 1)); + if (!isset($formula[0])) { + return []; + } + + // Parse the formula and return the token stack + return $this->_parseFormula($formula); + } + + /** + * Calculate the value of a formula. + * + * @param string $formula Formula to parse + * @param string $cellID Address of the cell to calculate + * @param Cell $pCell Cell to calculate + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + * + * @return mixed + */ + public function calculateFormula($formula, $cellID = null, Cell $pCell = null) + { + // Initialise the logging settings + $this->formulaError = null; + $this->debugLog->clearLog(); + $this->cyclicReferenceStack->clear(); + + if ($this->spreadsheet !== null && $cellID === null && $pCell === null) { + $cellID = 'A1'; + $pCell = $this->spreadsheet->getActiveSheet()->getCell($cellID); + } else { + // Disable calculation cacheing because it only applies to cell calculations, not straight formulae + // But don't actually flush any cache + $resetCache = $this->getCalculationCacheEnabled(); + $this->calculationCacheEnabled = false; + } + + // Execute the calculation + try { + $result = self::unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell)); + } catch (\Exception $e) { + throw new Exception($e->getMessage()); + } + + if ($this->spreadsheet === null) { + // Reset calculation cacheing to its previous state + $this->calculationCacheEnabled = $resetCache; + } + + return $result; + } + + /** + * @param string $cellReference + * @param mixed $cellValue + * + * @return bool + */ + public function getValueFromCache($cellReference, &$cellValue) + { + // Is calculation cacheing enabled? + // Is the value present in calculation cache? + $this->debugLog->writeDebugLog('Testing cache value for cell ', $cellReference); + if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) { + $this->debugLog->writeDebugLog('Retrieving value for cell ', $cellReference, ' from cache'); + // Return the cached result + $cellValue = $this->calculationCache[$cellReference]; + + return true; + } + + return false; + } + + /** + * @param string $cellReference + * @param mixed $cellValue + */ + public function saveValueToCache($cellReference, $cellValue) + { + if ($this->calculationCacheEnabled) { + $this->calculationCache[$cellReference] = $cellValue; + } + } + + /** + * Parse a cell formula and calculate its value. + * + * @param string $formula The formula to parse and calculate + * @param string $cellID The ID (e.g. A3) of the cell that we are calculating + * @param Cell $pCell Cell to calculate + * + * @throws Exception + * + * @return mixed + */ + public function _calculateFormulaValue($formula, $cellID = null, Cell $pCell = null) + { + $cellValue = null; + + // Quote-Prefixed cell values cannot be formulae, but are treated as strings + if ($pCell !== null && $pCell->getStyle()->getQuotePrefix() === true) { + return self::wrapResult((string) $formula); + } + + if (preg_match('/^=\s*cmd\s*\|/miu', $formula) !== 0) { + return self::wrapResult($formula); + } + + // Basic validation that this is indeed a formula + // We simply return the cell value if not + $formula = trim($formula); + if ($formula[0] != '=') { + return self::wrapResult($formula); + } + $formula = ltrim(substr($formula, 1)); + if (!isset($formula[0])) { + return self::wrapResult($formula); + } + + $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; + $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : "\x00Wrk"; + $wsCellReference = $wsTitle . '!' . $cellID; + + if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) { + return $cellValue; + } + + if (($wsTitle[0] !== "\x00") && ($this->cyclicReferenceStack->onStack($wsCellReference))) { + if ($this->cyclicFormulaCount <= 0) { + $this->cyclicFormulaCell = ''; + + return $this->raiseFormulaError('Cyclic Reference in Formula'); + } elseif ($this->cyclicFormulaCell === $wsCellReference) { + ++$this->cyclicFormulaCounter; + if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { + $this->cyclicFormulaCell = ''; + + return $cellValue; + } + } elseif ($this->cyclicFormulaCell == '') { + if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { + return $cellValue; + } + $this->cyclicFormulaCell = $wsCellReference; + } + } + + // Parse the formula onto the token stack and calculate the value + $this->cyclicReferenceStack->push($wsCellReference); + $cellValue = $this->processTokenStack($this->_parseFormula($formula, $pCell), $cellID, $pCell); + $this->cyclicReferenceStack->pop(); + + // Save to calculation cache + if ($cellID !== null) { + $this->saveValueToCache($wsCellReference, $cellValue); + } + + // Return the calculated value + return $cellValue; + } + + /** + * Ensure that paired matrix operands are both matrices and of the same size. + * + * @param mixed &$operand1 First matrix operand + * @param mixed &$operand2 Second matrix operand + * @param int $resize Flag indicating whether the matrices should be resized to match + * and (if so), whether the smaller dimension should grow or the + * larger should shrink. + * 0 = no resize + * 1 = shrink to fit + * 2 = extend to fit + * + * @return array + */ + private static function checkMatrixOperands(&$operand1, &$operand2, $resize = 1) + { + // Examine each of the two operands, and turn them into an array if they aren't one already + // Note that this function should only be called if one or both of the operand is already an array + if (!is_array($operand1)) { + list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand2); + $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1)); + $resize = 0; + } elseif (!is_array($operand2)) { + list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand1); + $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2)); + $resize = 0; + } + + list($matrix1Rows, $matrix1Columns) = self::getMatrixDimensions($operand1); + list($matrix2Rows, $matrix2Columns) = self::getMatrixDimensions($operand2); + if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) { + $resize = 1; + } + + if ($resize == 2) { + // Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger + self::resizeMatricesExtend($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); + } elseif ($resize == 1) { + // Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller + self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); + } + + return [$matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns]; + } + + /** + * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0. + * + * @param array &$matrix matrix operand + * + * @return int[] An array comprising the number of rows, and number of columns + */ + public static function getMatrixDimensions(array &$matrix) + { + $matrixRows = count($matrix); + $matrixColumns = 0; + foreach ($matrix as $rowKey => $rowValue) { + if (!is_array($rowValue)) { + $matrix[$rowKey] = [$rowValue]; + $matrixColumns = max(1, $matrixColumns); + } else { + $matrix[$rowKey] = array_values($rowValue); + $matrixColumns = max(count($rowValue), $matrixColumns); + } + } + $matrix = array_values($matrix); + + return [$matrixRows, $matrixColumns]; + } + + /** + * Ensure that paired matrix operands are both matrices of the same size. + * + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand + * @param int $matrix1Rows Row size of first matrix operand + * @param int $matrix1Columns Column size of first matrix operand + * @param int $matrix2Rows Row size of second matrix operand + * @param int $matrix2Columns Column size of second matrix operand + */ + private static function resizeMatricesShrink(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns) + { + if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { + if ($matrix2Rows < $matrix1Rows) { + for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) { + unset($matrix1[$i]); + } + } + if ($matrix2Columns < $matrix1Columns) { + for ($i = 0; $i < $matrix1Rows; ++$i) { + for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { + unset($matrix1[$i][$j]); + } + } + } + } + + if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { + if ($matrix1Rows < $matrix2Rows) { + for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) { + unset($matrix2[$i]); + } + } + if ($matrix1Columns < $matrix2Columns) { + for ($i = 0; $i < $matrix2Rows; ++$i) { + for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { + unset($matrix2[$i][$j]); + } + } + } + } + } + + /** + * Ensure that paired matrix operands are both matrices of the same size. + * + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand + * @param int $matrix1Rows Row size of first matrix operand + * @param int $matrix1Columns Column size of first matrix operand + * @param int $matrix2Rows Row size of second matrix operand + * @param int $matrix2Columns Column size of second matrix operand + */ + private static function resizeMatricesExtend(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns) + { + if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { + if ($matrix2Columns < $matrix1Columns) { + for ($i = 0; $i < $matrix2Rows; ++$i) { + $x = $matrix2[$i][$matrix2Columns - 1]; + for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { + $matrix2[$i][$j] = $x; + } + } + } + if ($matrix2Rows < $matrix1Rows) { + $x = $matrix2[$matrix2Rows - 1]; + for ($i = 0; $i < $matrix1Rows; ++$i) { + $matrix2[$i] = $x; + } + } + } + + if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { + if ($matrix1Columns < $matrix2Columns) { + for ($i = 0; $i < $matrix1Rows; ++$i) { + $x = $matrix1[$i][$matrix1Columns - 1]; + for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { + $matrix1[$i][$j] = $x; + } + } + } + if ($matrix1Rows < $matrix2Rows) { + $x = $matrix1[$matrix1Rows - 1]; + for ($i = 0; $i < $matrix2Rows; ++$i) { + $matrix1[$i] = $x; + } + } + } + } + + /** + * Format details of an operand for display in the log (based on operand type). + * + * @param mixed $value First matrix operand + * + * @return mixed + */ + private function showValue($value) + { + if ($this->debugLog->getWriteDebugLog()) { + $testArray = Functions::flattenArray($value); + if (count($testArray) == 1) { + $value = array_pop($testArray); + } + + if (is_array($value)) { + $returnMatrix = []; + $pad = $rpad = ', '; + foreach ($value as $row) { + if (is_array($row)) { + $returnMatrix[] = implode($pad, array_map([$this, 'showValue'], $row)); + $rpad = '; '; + } else { + $returnMatrix[] = $this->showValue($row); + } + } + + return '{ ' . implode($rpad, $returnMatrix) . ' }'; + } elseif (is_string($value) && (trim($value, '"') == $value)) { + return '"' . $value . '"'; + } elseif (is_bool($value)) { + return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + } + + return Functions::flattenSingleValue($value); + } + + /** + * Format type and details of an operand for display in the log (based on operand type). + * + * @param mixed $value First matrix operand + * + * @return null|string + */ + private function showTypeDetails($value) + { + if ($this->debugLog->getWriteDebugLog()) { + $testArray = Functions::flattenArray($value); + if (count($testArray) == 1) { + $value = array_pop($testArray); + } + + if ($value === null) { + return 'a NULL value'; + } elseif (is_float($value)) { + $typeString = 'a floating point number'; + } elseif (is_int($value)) { + $typeString = 'an integer number'; + } elseif (is_bool($value)) { + $typeString = 'a boolean'; + } elseif (is_array($value)) { + $typeString = 'a matrix'; + } else { + if ($value == '') { + return 'an empty string'; + } elseif ($value[0] == '#') { + return 'a ' . $value . ' error'; + } + $typeString = 'a string'; + } + + return $typeString . ' with a value of ' . $this->showValue($value); + } + } + + /** + * @param string $formula + * + * @return string + */ + private function convertMatrixReferences($formula) + { + static $matrixReplaceFrom = ['{', ';', '}']; + static $matrixReplaceTo = ['MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))']; + + // Convert any Excel matrix references to the MKMATRIX() function + if (strpos($formula, '{') !== false) { + // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators + if (strpos($formula, '"') !== false) { + // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded + // the formula + $temp = explode('"', $formula); + // Open and Closed counts used for trapping mismatched braces in the formula + $openCount = $closeCount = 0; + $i = false; + foreach ($temp as &$value) { + // Only count/replace in alternating array entries + if ($i = !$i) { + $openCount += substr_count($value, '{'); + $closeCount += substr_count($value, '}'); + $value = str_replace($matrixReplaceFrom, $matrixReplaceTo, $value); + } + } + unset($value); + // Then rebuild the formula string + $formula = implode('"', $temp); + } else { + // If there's no quoted strings, then we do a simple count/replace + $openCount = substr_count($formula, '{'); + $closeCount = substr_count($formula, '}'); + $formula = str_replace($matrixReplaceFrom, $matrixReplaceTo, $formula); + } + // Trap for mismatched braces and trigger an appropriate error + if ($openCount < $closeCount) { + if ($openCount > 0) { + return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '}'"); + } + + return $this->raiseFormulaError("Formula Error: Unexpected '}' encountered"); + } elseif ($openCount > $closeCount) { + if ($closeCount > 0) { + return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '{'"); + } + + return $this->raiseFormulaError("Formula Error: Unexpected '{' encountered"); + } + } + + return $formula; + } + + private static function mkMatrix(...$args) + { + return $args; + } + + // Binary Operators + // These operators always work on two values + // Array key is the operator, the value indicates whether this is a left or right associative operator + private static $operatorAssociativity = [ + '^' => 0, // Exponentiation + '*' => 0, '/' => 0, // Multiplication and Division + '+' => 0, '-' => 0, // Addition and Subtraction + '&' => 0, // Concatenation + '|' => 0, ':' => 0, // Intersect and Range + '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison + ]; + + // Comparison (Boolean) Operators + // These operators work on two values, but always return a boolean result + private static $comparisonOperators = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true]; + + // Operator Precedence + // This list includes all valid operators, whether binary (including boolean) or unary (such as %) + // Array key is the operator, the value is its precedence + private static $operatorPrecedence = [ + ':' => 8, // Range + '|' => 7, // Intersect + '~' => 6, // Negation + '%' => 5, // Percentage + '^' => 4, // Exponentiation + '*' => 3, '/' => 3, // Multiplication and Division + '+' => 2, '-' => 2, // Addition and Subtraction + '&' => 1, // Concatenation + '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0, // Comparison + ]; + + // Convert infix to postfix notation + + /** + * @param string $formula + * @param null|\PhpOffice\PhpSpreadsheet\Cell\Cell $pCell + * + * @return bool + */ + private function _parseFormula($formula, Cell $pCell = null) + { + if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { + return false; + } + + // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet), + // so we store the parent worksheet so that we can re-attach it when necessary + $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; + + $regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION . + '|' . self::CALCULATION_REGEXP_CELLREF . + '|' . self::CALCULATION_REGEXP_NUMBER . + '|' . self::CALCULATION_REGEXP_STRING . + '|' . self::CALCULATION_REGEXP_OPENBRACE . + '|' . self::CALCULATION_REGEXP_NAMEDRANGE . + '|' . self::CALCULATION_REGEXP_ERROR . + ')/si'; + + // Start with initialisation + $index = 0; + $stack = new Stack(); + $output = []; + $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a + // - is a negation or + is a positive operator rather than an operation + $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand + // should be null in a function call + // The guts of the lexical parser + // Loop through the formula extracting each operator and operand in turn + while (true) { + $opCharacter = $formula[$index]; // Get the first character of the value at the current index position + if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula[$index + 1]]))) { + $opCharacter .= $formula[++$index]; + } + + // Find out if we're currently at the beginning of a number, variable, cell reference, function, parenthesis or operand + $isOperandOrFunction = preg_match($regexpMatchString, substr($formula, $index), $match); + + if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus? + $stack->push('Unary Operator', '~'); // Put a negation on the stack + ++$index; // and drop the negation symbol + } elseif ($opCharacter == '%' && $expectingOperator) { + $stack->push('Unary Operator', '%'); // Put a percentage on the stack + ++$index; + } elseif ($opCharacter == '+' && !$expectingOperator) { // Positive (unary plus rather than binary operator plus) can be discarded? + ++$index; // Drop the redundant plus symbol + } elseif ((($opCharacter == '~') || ($opCharacter == '|')) && (!$isOperandOrFunction)) { // We have to explicitly deny a tilde or pipe, because they are legal + return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression + } elseif ((isset(self::$operators[$opCharacter]) or $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack? + while ($stack->count() > 0 && + ($o2 = $stack->last()) && + isset(self::$operators[$o2['value']]) && + @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output + } + $stack->push('Binary Operator', $opCharacter); // Finally put our current operator onto the stack + ++$index; + $expectingOperator = false; + } elseif ($opCharacter == ')' && $expectingOperator) { // Are we expecting to close a parenthesis? + $expectingOperand = false; + while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( + if ($o2 === null) { + return $this->raiseFormulaError('Formula Error: Unexpected closing brace ")"'); + } + $output[] = $o2; + } + $d = $stack->last(2); + if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) { // Did this parenthesis just close a function? + $functionName = $matches[1]; // Get the function name + $d = $stack->pop(); + $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack) + $output[] = $d; // Dump the argument count on the output + $output[] = $stack->pop(); // Pop the function and push onto the output + if (isset(self::$controlFunctions[$functionName])) { + $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount']; + $functionCall = self::$controlFunctions[$functionName]['functionCall']; + } elseif (isset(self::$phpSpreadsheetFunctions[$functionName])) { + $expectedArgumentCount = self::$phpSpreadsheetFunctions[$functionName]['argumentCount']; + $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall']; + } else { // did we somehow push a non-function on the stack? this should never happen + return $this->raiseFormulaError('Formula Error: Internal error, non-function on stack'); + } + // Check the argument count + $argumentCountError = false; + if (is_numeric($expectedArgumentCount)) { + if ($expectedArgumentCount < 0) { + if ($argumentCount > abs($expectedArgumentCount)) { + $argumentCountError = true; + $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount); + } + } else { + if ($argumentCount != $expectedArgumentCount) { + $argumentCountError = true; + $expectedArgumentCountString = $expectedArgumentCount; + } + } + } elseif ($expectedArgumentCount != '*') { + $isOperandOrFunction = preg_match('/(\d*)([-+,])(\d*)/', $expectedArgumentCount, $argMatch); + switch ($argMatch[2]) { + case '+': + if ($argumentCount < $argMatch[1]) { + $argumentCountError = true; + $expectedArgumentCountString = $argMatch[1] . ' or more '; + } + + break; + case '-': + if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) { + $argumentCountError = true; + $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3]; + } + + break; + case ',': + if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) { + $argumentCountError = true; + $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3]; + } + + break; + } + } + if ($argumentCountError) { + return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, " . $expectedArgumentCountString . ' expected'); + } + } + ++$index; + } elseif ($opCharacter == ',') { // Is this the separator for function arguments? + while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( + if ($o2 === null) { + return $this->raiseFormulaError('Formula Error: Unexpected ,'); + } + $output[] = $o2; // pop the argument expression stuff and push onto the output + } + // If we've a comma when we're expecting an operand, then what we actually have is a null operand; + // so push a null onto the stack + if (($expectingOperand) || (!$expectingOperator)) { + $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null]; + } + // make sure there was a function + $d = $stack->last(2); + if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) { + return $this->raiseFormulaError('Formula Error: Unexpected ,'); + } + $d = $stack->pop(); + $stack->push($d['type'], ++$d['value'], $d['reference']); // increment the argument count + $stack->push('Brace', '('); // put the ( back on, we'll need to pop back to it again + $expectingOperator = false; + $expectingOperand = true; + ++$index; + } elseif ($opCharacter == '(' && !$expectingOperator) { + $stack->push('Brace', '('); + ++$index; + } elseif ($isOperandOrFunction && !$expectingOperator) { // do we now have a function/variable/number? + $expectingOperator = true; + $expectingOperand = false; + $val = $match[1]; + $length = strlen($val); + + if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $val, $matches)) { + $val = preg_replace('/\s/u', '', $val); + if (isset(self::$phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function + $stack->push('Function', strtoupper($val)); + $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index + $length), $amatch); + if ($ax) { + $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 0); + $expectingOperator = true; + } else { + $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 1); + $expectingOperator = false; + } + $stack->push('Brace', '('); + } else { // it's a var w/ implicit multiplication + $output[] = ['type' => 'Value', 'value' => $matches[1], 'reference' => null]; + } + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $val, $matches)) { + // Watch for this case-change when modifying to allow cell references in different worksheets... + // Should only be applied to the actual cell column, not the worksheet name + + // If the last entry on the stack was a : operator, then we have a cell range reference + $testPrevOp = $stack->last(1); + if ($testPrevOp['value'] == ':') { + // If we have a worksheet reference, then we're playing with a 3D reference + if ($matches[2] == '') { + // Otherwise, we 'inherit' the worksheet reference from the start cell reference + // The start of the cell range reference should be the last entry in $output + $startCellRef = $output[count($output) - 1]['value']; + preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $startCellRef, $startMatches); + if ($startMatches[2] > '') { + $val = $startMatches[2] . '!' . $val; + } + } else { + return $this->raiseFormulaError('3D Range references are not yet supported'); + } + } + + $output[] = ['type' => 'Cell Reference', 'value' => $val, 'reference' => $val]; + } else { // it's a variable, constant, string, number or boolean + // If the last entry on the stack was a : operator, then we may have a row or column range reference + $testPrevOp = $stack->last(1); + if ($testPrevOp['value'] == ':') { + $startRowColRef = $output[count($output) - 1]['value']; + list($rangeWS1, $startRowColRef) = Worksheet::extractSheetTitle($startRowColRef, true); + if ($rangeWS1 != '') { + $rangeWS1 .= '!'; + } + list($rangeWS2, $val) = Worksheet::extractSheetTitle($val, true); + if ($rangeWS2 != '') { + $rangeWS2 .= '!'; + } else { + $rangeWS2 = $rangeWS1; + } + if ((is_int($startRowColRef)) && (ctype_digit($val)) && + ($startRowColRef <= 1048576) && ($val <= 1048576)) { + // Row range + $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007 + $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef; + $val = $rangeWS2 . $endRowColRef . $val; + } elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) && + (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) { + // Column range + $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007 + $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1'; + $val = $rangeWS2 . $val . $endRowColRef; + } + } + + $localeConstant = false; + if ($opCharacter == '"') { + // UnEscape any quotes within the string + $val = self::wrapResult(str_replace('""', '"', self::unwrapResult($val))); + } elseif (is_numeric($val)) { + if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) { + $val = (float) $val; + } else { + $val = (int) $val; + } + } elseif (isset(self::$excelConstants[trim(strtoupper($val))])) { + $excelConstant = trim(strtoupper($val)); + $val = self::$excelConstants[$excelConstant]; + } elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) { + $val = self::$excelConstants[$localeConstant]; + } + $details = ['type' => 'Value', 'value' => $val, 'reference' => null]; + if ($localeConstant) { + $details['localeValue'] = $localeConstant; + } + $output[] = $details; + } + $index += $length; + } elseif ($opCharacter == '$') { // absolute row or column range + ++$index; + } elseif ($opCharacter == ')') { // miscellaneous error checking + if ($expectingOperand) { + $output[] = ['type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null]; + $expectingOperand = false; + $expectingOperator = true; + } else { + return $this->raiseFormulaError("Formula Error: Unexpected ')'"); + } + } elseif (isset(self::$operators[$opCharacter]) && !$expectingOperator) { + return $this->raiseFormulaError("Formula Error: Unexpected operator '$opCharacter'"); + } else { // I don't even want to know what you did to get here + return $this->raiseFormulaError('Formula Error: An unexpected error occured'); + } + // Test for end of formula string + if ($index == strlen($formula)) { + // Did we end with an operator?. + // Only valid for the % unary operator + if ((isset(self::$operators[$opCharacter])) && ($opCharacter != '%')) { + return $this->raiseFormulaError("Formula Error: Operator '$opCharacter' has no operands"); + } + + break; + } + // Ignore white space + while (($formula[$index] == "\n") || ($formula[$index] == "\r")) { + ++$index; + } + if ($formula[$index] == ' ') { + while ($formula[$index] == ' ') { + ++$index; + } + // If we're expecting an operator, but only have a space between the previous and next operands (and both are + // Cell References) then we have an INTERSECTION operator + if (($expectingOperator) && (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) && + ($output[count($output) - 1]['type'] == 'Cell Reference')) { + while ($stack->count() > 0 && + ($o2 = $stack->last()) && + isset(self::$operators[$o2['value']]) && + @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output + } + $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack + $expectingOperator = false; + } + } + } + + while (($op = $stack->pop()) !== null) { // pop everything off the stack and push onto output + if ((is_array($op) && $op['value'] == '(') || ($op === '(')) { + return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced + } + $output[] = $op; + } + + return $output; + } + + private static function dataTestReference(&$operandData) + { + $operand = $operandData['value']; + if (($operandData['reference'] === null) && (is_array($operand))) { + $rKeys = array_keys($operand); + $rowKey = array_shift($rKeys); + $cKeys = array_keys(array_keys($operand[$rowKey])); + $colKey = array_shift($cKeys); + if (ctype_upper($colKey)) { + $operandData['reference'] = $colKey . $rowKey; + } + } + + return $operand; + } + + // evaluate postfix notation + + /** + * @param mixed $tokens + * @param null|string $cellID + * @param null|Cell $pCell + * + * @return bool + */ + private function processTokenStack($tokens, $cellID = null, Cell $pCell = null) + { + if ($tokens == false) { + return false; + } + + // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent cell collection), + // so we store the parent cell collection so that we can re-attach it when necessary + $pCellWorksheet = ($pCell !== null) ? $pCell->getWorksheet() : null; + $pCellParent = ($pCell !== null) ? $pCell->getParent() : null; + $stack = new Stack(); + + // Loop through each token in turn + foreach ($tokens as $tokenData) { + $token = $tokenData['value']; + // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack + if (isset(self::$binaryOperators[$token])) { + // We must have two operands, error if we don't + if (($operand2Data = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + if (($operand1Data = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + + $operand1 = self::dataTestReference($operand1Data); + $operand2 = self::dataTestReference($operand2Data); + + // Log what we're doing + if ($token == ':') { + $this->debugLog->writeDebugLog('Evaluating Range ', $this->showValue($operand1Data['reference']), ' ', $token, ' ', $this->showValue($operand2Data['reference'])); + } else { + $this->debugLog->writeDebugLog('Evaluating ', $this->showValue($operand1), ' ', $token, ' ', $this->showValue($operand2)); + } + + // Process the operation in the appropriate manner + switch ($token) { + // Comparison (Boolean) Operators + case '>': // Greater than + case '<': // Less than + case '>=': // Greater than or Equal to + case '<=': // Less than or Equal to + case '=': // Equality + case '<>': // Inequality + $this->executeBinaryComparisonOperation($cellID, $operand1, $operand2, $token, $stack); + + break; + // Binary Operators + case ':': // Range + if (strpos($operand1Data['reference'], '!') !== false) { + list($sheet1, $operand1Data['reference']) = Worksheet::extractSheetTitle($operand1Data['reference'], true); + } else { + $sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : ''; + } + + list($sheet2, $operand2Data['reference']) = Worksheet::extractSheetTitle($operand2Data['reference'], true); + if (empty($sheet2)) { + $sheet2 = $sheet1; + } + + if ($sheet1 == $sheet2) { + if ($operand1Data['reference'] === null) { + if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) { + $operand1Data['reference'] = $pCell->getColumn() . $operand1Data['value']; + } elseif (trim($operand1Data['reference']) == '') { + $operand1Data['reference'] = $pCell->getCoordinate(); + } else { + $operand1Data['reference'] = $operand1Data['value'] . $pCell->getRow(); + } + } + if ($operand2Data['reference'] === null) { + if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) { + $operand2Data['reference'] = $pCell->getColumn() . $operand2Data['value']; + } elseif (trim($operand2Data['reference']) == '') { + $operand2Data['reference'] = $pCell->getCoordinate(); + } else { + $operand2Data['reference'] = $operand2Data['value'] . $pCell->getRow(); + } + } + + $oData = array_merge(explode(':', $operand1Data['reference']), explode(':', $operand2Data['reference'])); + $oCol = $oRow = []; + foreach ($oData as $oDatum) { + $oCR = Coordinate::coordinateFromString($oDatum); + $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1; + $oRow[] = $oCR[1]; + } + $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $stack->push('Cell Reference', $cellValue, $cellRef); + } else { + $stack->push('Error', Functions::REF(), null); + } + + break; + case '+': // Addition + $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'plusEquals', $stack); + + break; + case '-': // Subtraction + $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'minusEquals', $stack); + + break; + case '*': // Multiplication + $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayTimesEquals', $stack); + + break; + case '/': // Division + $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'arrayRightDivide', $stack); + + break; + case '^': // Exponential + $this->executeNumericBinaryOperation($operand1, $operand2, $token, 'power', $stack); + + break; + case '&': // Concatenation + // If either of the operands is a matrix, we need to treat them both as matrices + // (converting the other operand to a matrix if need be); then perform the required + // matrix operation + if (is_bool($operand1)) { + $operand1 = ($operand1) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + if (is_bool($operand2)) { + $operand2 = ($operand2) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; + } + if ((is_array($operand1)) || (is_array($operand2))) { + // Ensure that both operands are arrays/matrices + self::checkMatrixOperands($operand1, $operand2, 2); + + try { + // Convert operand 1 from a PHP array to a matrix + $matrix = new Shared\JAMA\Matrix($operand1); + // Perform the required operation against the operand 1 matrix, passing in operand 2 + $matrixResult = $matrix->concat($operand2); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + } else { + $result = '"' . str_replace('""', '"', self::unwrapResult($operand1) . self::unwrapResult($operand2)) . '"'; + } + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + $stack->push('Value', $result); + + break; + case '|': // Intersect + $rowIntersect = array_intersect_key($operand1, $operand2); + $cellIntersect = $oCol = $oRow = []; + foreach (array_keys($rowIntersect) as $row) { + $oRow[] = $row; + foreach ($rowIntersect[$row] as $col => $data) { + $oCol[] = Coordinate::columnIndexFromString($col) - 1; + $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]); + } + } + $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect)); + $stack->push('Value', $cellIntersect, $cellRef); + + break; + } + + // if the token is a unary operator, pop one value off the stack, do the operation, and push it back on + } elseif (($token === '~') || ($token === '%')) { + if (($arg = $stack->pop()) === null) { + return $this->raiseFormulaError('Internal error - Operand value missing from stack'); + } + $arg = $arg['value']; + if ($token === '~') { + $this->debugLog->writeDebugLog('Evaluating Negation of ', $this->showValue($arg)); + $multiplier = -1; + } else { + $this->debugLog->writeDebugLog('Evaluating Percentile of ', $this->showValue($arg)); + $multiplier = 0.01; + } + if (is_array($arg)) { + self::checkMatrixOperands($arg, $multiplier, 2); + + try { + $matrix1 = new Shared\JAMA\Matrix($arg); + $matrixResult = $matrix1->arrayTimesEquals($multiplier); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + $stack->push('Value', $result); + } else { + $this->executeNumericBinaryOperation($multiplier, $arg, '*', 'arrayTimesEquals', $stack); + } + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) { + $cellRef = null; + if (isset($matches[8])) { + if ($pCell === null) { + // We can't access the range, so return a REF error + $cellValue = Functions::REF(); + } else { + $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10]; + if ($matches[2] > '') { + $matches[2] = trim($matches[2], "\"'"); + if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { + // It's a Reference to an external spreadsheet (not currently supported) + return $this->raiseFormulaError('Unable to access External Workbook'); + } + $matches[2] = trim($matches[2], "\"'"); + $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); + } else { + $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in current worksheet'); + if ($pCellParent !== null) { + $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); + } + } + } else { + if ($pCell === null) { + // We can't access the cell, so return a REF error + $cellValue = Functions::REF(); + } else { + $cellRef = $matches[6] . $matches[7]; + if ($matches[2] > '') { + $matches[2] = trim($matches[2], "\"'"); + if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { + // It's a Reference to an external spreadsheet (not currently supported) + return $this->raiseFormulaError('Unable to access External Workbook'); + } + $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]); + if ($pCellParent !== null) { + $cellSheet = $this->spreadsheet->getSheetByName($matches[2]); + if ($cellSheet && $cellSheet->cellExists($cellRef)) { + $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false); + $pCell->attach($pCellParent); + } else { + $cellValue = null; + } + } else { + return $this->raiseFormulaError('Unable to access Cell Reference'); + } + $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); + } else { + $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in current worksheet'); + if ($pCellParent->has($cellRef)) { + $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); + $pCell->attach($pCellParent); + } else { + $cellValue = null; + } + $this->debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); + } + } + } + $stack->push('Value', $cellValue, $cellRef); + + // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $token, $matches)) { + $functionName = $matches[1]; + $argCount = $stack->pop(); + $argCount = $argCount['value']; + if ($functionName != 'MKMATRIX') { + $this->debugLog->writeDebugLog('Evaluating Function ', self::localeFunc($functionName), '() with ', (($argCount == 0) ? 'no' : $argCount), ' argument', (($argCount == 1) ? '' : 's')); + } + if ((isset(self::$phpSpreadsheetFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) { // function + if (isset(self::$phpSpreadsheetFunctions[$functionName])) { + $functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall']; + $passByReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference']); + $passCellReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passCellReference']); + } elseif (isset(self::$controlFunctions[$functionName])) { + $functionCall = self::$controlFunctions[$functionName]['functionCall']; + $passByReference = isset(self::$controlFunctions[$functionName]['passByReference']); + $passCellReference = isset(self::$controlFunctions[$functionName]['passCellReference']); + } + // get the arguments for this function + $args = $argArrayVals = []; + for ($i = 0; $i < $argCount; ++$i) { + $arg = $stack->pop(); + $a = $argCount - $i - 1; + if (($passByReference) && + (isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) && + (self::$phpSpreadsheetFunctions[$functionName]['passByReference'][$a])) { + if ($arg['reference'] === null) { + $args[] = $cellID; + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($cellID); + } + } else { + $args[] = $arg['reference']; + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($arg['reference']); + } + } + } else { + $args[] = self::unwrapResult($arg['value']); + if ($functionName != 'MKMATRIX') { + $argArrayVals[] = $this->showValue($arg['value']); + } + } + } + // Reverse the order of the arguments + krsort($args); + + if (($passByReference) && ($argCount == 0)) { + $args[] = $cellID; + $argArrayVals[] = $this->showValue($cellID); + } + + if ($functionName != 'MKMATRIX') { + if ($this->debugLog->getWriteDebugLog()) { + krsort($argArrayVals); + $this->debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator . ' ', Functions::flattenArray($argArrayVals)), ' )'); + } + } + + // Process the argument with the appropriate function call + $args = $this->addCellReference($args, $passCellReference, $functionCall, $pCell); + + if (!is_array($functionCall)) { + foreach ($args as &$arg) { + $arg = Functions::flattenSingleValue($arg); + } + unset($arg); + } + $result = call_user_func_array($functionCall, $args); + + if ($functionName != 'MKMATRIX') { + $this->debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($result)); + } + $stack->push('Value', self::wrapResult($result)); + } + } else { + // if the token is a number, boolean, string or an Excel error, push it onto the stack + if (isset(self::$excelConstants[strtoupper($token)])) { + $excelConstant = strtoupper($token); + $stack->push('Constant Value', self::$excelConstants[$excelConstant]); + $this->debugLog->writeDebugLog('Evaluating Constant ', $excelConstant, ' as ', $this->showTypeDetails(self::$excelConstants[$excelConstant])); + } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token[0] == '"') || ($token[0] == '#')) { + $stack->push('Value', $token); + // if the token is a named range, push the named range name onto the stack + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $token, $matches)) { + $namedRange = $matches[6]; + $this->debugLog->writeDebugLog('Evaluating Named Range ', $namedRange); + + $cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false); + $pCell->attach($pCellParent); + $this->debugLog->writeDebugLog('Evaluation Result for named range ', $namedRange, ' is ', $this->showTypeDetails($cellValue)); + $stack->push('Named Range', $cellValue, $namedRange); + } else { + return $this->raiseFormulaError("undefined variable '$token'"); + } + } + } + // when we're out of tokens, the stack should have a single element, the final result + if ($stack->count() != 1) { + return $this->raiseFormulaError('internal error'); + } + $output = $stack->pop(); + $output = $output['value']; + + return $output; + } + + private function validateBinaryOperand(&$operand, &$stack) + { + if (is_array($operand)) { + if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) { + do { + $operand = array_pop($operand); + } while (is_array($operand)); + } + } + // Numbers, matrices and booleans can pass straight through, as they're already valid + if (is_string($operand)) { + // We only need special validations for the operand if it is a string + // Start by stripping off the quotation marks we use to identify true excel string values internally + if ($operand > '' && $operand[0] == '"') { + $operand = self::unwrapResult($operand); + } + // If the string is a numeric value, we treat it as a numeric, so no further testing + if (!is_numeric($operand)) { + // If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations + if ($operand > '' && $operand[0] == '#') { + $stack->push('Value', $operand); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($operand)); + + return false; + } elseif (!Shared\StringHelper::convertToNumberIfFraction($operand)) { + // If not a numeric or a fraction, then it's a text string, and so can't be used in mathematical binary operations + $stack->push('Value', '#VALUE!'); + $this->debugLog->writeDebugLog('Evaluation Result is a ', $this->showTypeDetails('#VALUE!')); + + return false; + } + } + } + + // return a true if the value of the operand is one that we can use in normal binary operations + return true; + } + + /** + * @param null|string $cellID + * @param mixed $operand1 + * @param mixed $operand2 + * @param string $operation + * @param Stack $stack + * @param bool $recursingArrays + * + * @return bool + */ + private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false) + { + // If we're dealing with matrix operations, we want a matrix result + if ((is_array($operand1)) || (is_array($operand2))) { + $result = []; + if ((is_array($operand1)) && (!is_array($operand2))) { + foreach ($operand1 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2)); + $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } elseif ((!is_array($operand1)) && (is_array($operand2))) { + foreach ($operand2 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData)); + $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } else { + if (!$recursingArrays) { + self::checkMatrixOperands($operand1, $operand2, 2); + } + foreach ($operand1 as $x => $operandData) { + $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x])); + $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true); + $r = $stack->pop(); + $result[$x] = $r['value']; + } + } + // Log the result details + $this->debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Array', $result); + + return true; + } + + // Simple validate the two operands if they are string values + if (is_string($operand1) && $operand1 > '' && $operand1[0] == '"') { + $operand1 = self::unwrapResult($operand1); + } + if (is_string($operand2) && $operand2 > '' && $operand2[0] == '"') { + $operand2 = self::unwrapResult($operand2); + } + + // Use case insensitive comparaison if not OpenOffice mode + if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) { + if (is_string($operand1)) { + $operand1 = strtoupper($operand1); + } + if (is_string($operand2)) { + $operand2 = strtoupper($operand2); + } + } + + $useLowercaseFirstComparison = is_string($operand1) && is_string($operand2) && Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE; + + // execute the necessary operation + switch ($operation) { + // Greater than + case '>': + if ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) > 0; + } else { + $result = ($operand1 > $operand2); + } + + break; + // Less than + case '<': + if ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) < 0; + } else { + $result = ($operand1 < $operand2); + } + + break; + // Equality + case '=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = (abs($operand1 - $operand2) < $this->delta); + } else { + $result = strcmp($operand1, $operand2) == 0; + } + + break; + // Greater than or equal + case '>=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 > $operand2)); + } elseif ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) >= 0; + } else { + $result = strcmp($operand1, $operand2) >= 0; + } + + break; + // Less than or equal + case '<=': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 < $operand2)); + } elseif ($useLowercaseFirstComparison) { + $result = $this->strcmpLowercaseFirst($operand1, $operand2) <= 0; + } else { + $result = strcmp($operand1, $operand2) <= 0; + } + + break; + // Inequality + case '<>': + if (is_numeric($operand1) && is_numeric($operand2)) { + $result = (abs($operand1 - $operand2) > 1E-14); + } else { + $result = strcmp($operand1, $operand2) != 0; + } + + break; + } + + // Log the result details + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Value', $result); + + return true; + } + + /** + * Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters. + * + * @param string $str1 First string value for the comparison + * @param string $str2 Second string value for the comparison + * + * @return int + */ + private function strcmpLowercaseFirst($str1, $str2) + { + $inversedStr1 = Shared\StringHelper::strCaseReverse($str1); + $inversedStr2 = Shared\StringHelper::strCaseReverse($str2); + + return strcmp($inversedStr1, $inversedStr2); + } + + /** + * @param mixed $operand1 + * @param mixed $operand2 + * @param mixed $operation + * @param string $matrixFunction + * @param mixed $stack + * + * @return bool + */ + private function executeNumericBinaryOperation($operand1, $operand2, $operation, $matrixFunction, &$stack) + { + // Validate the two operands + if (!$this->validateBinaryOperand($operand1, $stack)) { + return false; + } + if (!$this->validateBinaryOperand($operand2, $stack)) { + return false; + } + + // If either of the operands is a matrix, we need to treat them both as matrices + // (converting the other operand to a matrix if need be); then perform the required + // matrix operation + if ((is_array($operand1)) || (is_array($operand2))) { + // Ensure that both operands are arrays/matrices of the same size + self::checkMatrixOperands($operand1, $operand2, 2); + + try { + // Convert operand 1 from a PHP array to a matrix + $matrix = new Shared\JAMA\Matrix($operand1); + // Perform the required operation against the operand 1 matrix, passing in operand 2 + $matrixResult = $matrix->$matrixFunction($operand2); + $result = $matrixResult->getArray(); + } catch (\Exception $ex) { + $this->debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); + $result = '#VALUE!'; + } + } else { + if ((Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) && + ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1) > 0) || + (is_string($operand2) && !is_numeric($operand2) && strlen($operand2) > 0))) { + $result = Functions::VALUE(); + } else { + // If we're dealing with non-matrix operations, execute the necessary operation + switch ($operation) { + // Addition + case '+': + $result = $operand1 + $operand2; + + break; + // Subtraction + case '-': + $result = $operand1 - $operand2; + + break; + // Multiplication + case '*': + $result = $operand1 * $operand2; + + break; + // Division + case '/': + if ($operand2 == 0) { + // Trap for Divide by Zero error + $stack->push('Value', '#DIV/0!'); + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails('#DIV/0!')); + + return false; + } + $result = $operand1 / $operand2; + + break; + // Power + case '^': + $result = pow($operand1, $operand2); + + break; + } + } + } + + // Log the result details + $this->debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); + // And push the result onto the stack + $stack->push('Value', $result); + + return true; + } + + // trigger an error, but nicely, if need be + protected function raiseFormulaError($errorMessage) + { + $this->formulaError = $errorMessage; + $this->cyclicReferenceStack->clear(); + if (!$this->suppressFormulaErrors) { + throw new Exception($errorMessage); + } + trigger_error($errorMessage, E_USER_ERROR); + + return false; + } + + /** + * Extract range values. + * + * @param string &$pRange String based range representation + * @param Worksheet $pSheet Worksheet + * @param bool $resetLog Flag indicating whether calculation log should be reset or not + * + * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. + */ + public function extractCellRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) + { + // Return value + $returnValue = []; + + if ($pSheet !== null) { + $pSheetName = $pSheet->getTitle(); + if (strpos($pRange, '!') !== false) { + list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true); + $pSheet = $this->spreadsheet->getSheetByName($pSheetName); + } + + // Extract range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + $pRange = $pSheetName . '!' . $pRange; + if (!isset($aReferences[1])) { + $currentCol = ''; + $currentRow = 0; + // Single cell in range + sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow); + if ($pSheet->cellExists($aReferences[0])) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } else { + // Extract cell data for all cells in the range + foreach ($aReferences as $reference) { + $currentCol = ''; + $currentRow = 0; + // Extract range + sscanf($reference, '%[A-Z]%d', $currentCol, $currentRow); + if ($pSheet->cellExists($reference)) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } + } + } + + return $returnValue; + } + + /** + * Extract range values. + * + * @param string &$pRange String based range representation + * @param Worksheet $pSheet Worksheet + * @param bool $resetLog Flag indicating whether calculation log should be reset or not + * + * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. + */ + public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) + { + // Return value + $returnValue = []; + + if ($pSheet !== null) { + $pSheetName = $pSheet->getTitle(); + if (strpos($pRange, '!') !== false) { + list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true); + $pSheet = $this->spreadsheet->getSheetByName($pSheetName); + } + + // Named range? + $namedRange = NamedRange::resolveRange($pRange, $pSheet); + if ($namedRange !== null) { + $pSheet = $namedRange->getWorksheet(); + $pRange = $namedRange->getRange(); + $splitRange = Coordinate::splitRange($pRange); + // Convert row and column references + if (ctype_alpha($splitRange[0][0])) { + $pRange = $splitRange[0][0] . '1:' . $splitRange[0][1] . $namedRange->getWorksheet()->getHighestRow(); + } elseif (ctype_digit($splitRange[0][0])) { + $pRange = 'A' . $splitRange[0][0] . ':' . $namedRange->getWorksheet()->getHighestColumn() . $splitRange[0][1]; + } + } else { + return Functions::REF(); + } + + // Extract range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + if (!isset($aReferences[1])) { + // Single cell (or single column or row) in range + list($currentCol, $currentRow) = Coordinate::coordinateFromString($aReferences[0]); + if ($pSheet->cellExists($aReferences[0])) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } else { + // Extract cell data for all cells in the range + foreach ($aReferences as $reference) { + // Extract range + list($currentCol, $currentRow) = Coordinate::coordinateFromString($reference); + if ($pSheet->cellExists($reference)) { + $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); + } else { + $returnValue[$currentRow][$currentCol] = null; + } + } + } + } + + return $returnValue; + } + + /** + * Is a specific function implemented? + * + * @param string $pFunction Function Name + * + * @return bool + */ + public function isImplemented($pFunction) + { + $pFunction = strtoupper($pFunction); + $notImplemented = !isset(self::$phpSpreadsheetFunctions[$pFunction]) || (is_array(self::$phpSpreadsheetFunctions[$pFunction]['functionCall']) && self::$phpSpreadsheetFunctions[$pFunction]['functionCall'][1] === 'DUMMY'); + + return !$notImplemented; + } + + /** + * Get a list of all implemented functions as an array of function objects. + * + * @return array of Category + */ + public function getFunctions() + { + return self::$phpSpreadsheetFunctions; + } + + /** + * Get a list of implemented Excel function names. + * + * @return array + */ + public function getImplementedFunctionNames() + { + $returnValue = []; + foreach (self::$phpSpreadsheetFunctions as $functionName => $function) { + if ($this->isImplemented($functionName)) { + $returnValue[] = $functionName; + } + } + + return $returnValue; + } + + /** + * Add cell reference if needed while making sure that it is the last argument. + * + * @param array $args + * @param bool $passCellReference + * @param array|string $functionCall + * @param null|Cell $pCell + * + * @return array + */ + private function addCellReference(array $args, $passCellReference, $functionCall, Cell $pCell = null) + { + if ($passCellReference) { + if (is_array($functionCall)) { + $className = $functionCall[0]; + $methodName = $functionCall[1]; + + $reflectionMethod = new \ReflectionMethod($className, $methodName); + $argumentCount = count($reflectionMethod->getParameters()); + while (count($args) < $argumentCount - 1) { + $args[] = null; + } + } + + $args[] = $pCell; + } + + return $args; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php new file mode 100755 index 0000000..7574cb4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Category.php @@ -0,0 +1,19 @@ + $criteriaName) { + $testCondition = []; + $testConditionCount = 0; + foreach ($criteria as $row => $criterion) { + if ($criterion[$key] > '') { + $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]); + ++$testConditionCount; + } + } + if ($testConditionCount > 1) { + $testConditions[] = 'OR(' . implode(',', $testCondition) . ')'; + ++$testConditionsCount; + } elseif ($testConditionCount == 1) { + $testConditions[] = $testCondition[0]; + ++$testConditionsCount; + } + } + + if ($testConditionsCount > 1) { + $testConditionSet = 'AND(' . implode(',', $testConditions) . ')'; + } elseif ($testConditionsCount == 1) { + $testConditionSet = $testConditions[0]; + } + + // Loop through each row of the database + foreach ($database as $dataRow => $dataValues) { + // Substitute actual values from the database row for our [:placeholders] + $testConditionList = $testConditionSet; + foreach ($criteriaNames as $key => $criteriaName) { + $k = array_search($criteriaName, $fieldNames); + if (isset($dataValues[$k])) { + $dataValue = $dataValues[$k]; + $dataValue = (is_string($dataValue)) ? Calculation::wrapResult(strtoupper($dataValue)) : $dataValue; + $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList); + } + } + // evaluate the criteria against the row data + $result = Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList); + // If the row failed to meet the criteria, remove it from the database + if (!$result) { + unset($database[$dataRow]); + } + } + + return $database; + } + + private static function getFilteredColumn($database, $field, $criteria) + { + // reduce the database to a set of rows that match all the criteria + $database = self::filter($database, $criteria); + // extract an array of values for the requested column + $colData = []; + foreach ($database as $row) { + $colData[] = $row[$field]; + } + + return $colData; + } + + /** + * DAVERAGE. + * + * Averages the values in a column of a list or database that match conditions you specify. + * + * Excel Function: + * DAVERAGE(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DAVERAGE($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::AVERAGE( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DCOUNT. + * + * Counts the cells that contain numbers in a column of a list or database that match conditions + * that you specify. + * + * Excel Function: + * DCOUNT(database,[field],criteria) + * + * Excel Function: + * DAVERAGE(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return int + * + * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the + * database that match the criteria. + */ + public static function DCOUNT($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::COUNT( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DCOUNTA. + * + * Counts the nonblank cells in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DCOUNTA(database,[field],criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return int + * + * @TODO The field argument is optional. If field is omitted, DCOUNTA counts all records in the + * database that match the criteria. + */ + public static function DCOUNTA($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // reduce the database to a set of rows that match all the criteria + $database = self::filter($database, $criteria); + // extract an array of values for the requested column + $colData = []; + foreach ($database as $row) { + $colData[] = $row[$field]; + } + + // Return + return Statistical::COUNTA( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DGET. + * + * Extracts a single value from a column of a list or database that matches conditions that you + * specify. + * + * Excel Function: + * DGET(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return mixed + */ + public static function DGET($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + $colData = self::getFilteredColumn($database, $field, $criteria); + if (count($colData) > 1) { + return Functions::NAN(); + } + + return $colData[0]; + } + + /** + * DMAX. + * + * Returns the largest number in a column of a list or database that matches conditions you that + * specify. + * + * Excel Function: + * DMAX(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DMAX($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::MAX( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DMIN. + * + * Returns the smallest number in a column of a list or database that matches conditions you that + * specify. + * + * Excel Function: + * DMIN(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DMIN($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::MIN( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DPRODUCT. + * + * Multiplies the values in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DPRODUCT(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DPRODUCT($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return MathTrig::PRODUCT( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSTDEV. + * + * Estimates the standard deviation of a population based on a sample by using the numbers in a + * column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSTDEV(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DSTDEV($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::STDEV( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSTDEVP. + * + * Calculates the standard deviation of a population based on the entire population by using the + * numbers in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSTDEVP(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DSTDEVP($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::STDEVP( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DSUM. + * + * Adds the numbers in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DSUM(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DSUM($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return MathTrig::SUM( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DVAR. + * + * Estimates the variance of a population based on a sample by using the numbers in a column + * of a list or database that match conditions that you specify. + * + * Excel Function: + * DVAR(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DVAR($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::VARFunc( + self::getFilteredColumn($database, $field, $criteria) + ); + } + + /** + * DVARP. + * + * Calculates the variance of a population based on the entire population by using the numbers + * in a column of a list or database that match conditions that you specify. + * + * Excel Function: + * DVARP(database,field,criteria) + * + * @category Database Functions + * + * @param mixed[] $database The range of cells that makes up the list or database. + * A database is a list of related data in which rows of related + * information are records, and columns of data are fields. The + * first row of the list contains labels for each column. + * @param int|string $field Indicates which column is used in the function. Enter the + * column label enclosed between double quotation marks, such as + * "Age" or "Yield," or a number (without quotation marks) that + * represents the position of the column within the list: 1 for + * the first column, 2 for the second column, and so on. + * @param mixed[] $criteria The range of cells that contains the conditions you specify. + * You can use any range for the criteria argument, as long as it + * includes at least one column label and at least one cell below + * the column label in which you specify a condition for the + * column. + * + * @return float + */ + public static function DVARP($database, $field, $criteria) + { + $field = self::fieldExtract($database, $field); + if ($field === null) { + return null; + } + + // Return + return Statistical::VARP( + self::getFilteredColumn($database, $field, $criteria) + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php new file mode 100755 index 0000000..3c39db2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php @@ -0,0 +1,1649 @@ +format('m'); + $oYear = (int) $PHPDateObject->format('Y'); + + $adjustmentMonthsString = (string) $adjustmentMonths; + if ($adjustmentMonths > 0) { + $adjustmentMonthsString = '+' . $adjustmentMonths; + } + if ($adjustmentMonths != 0) { + $PHPDateObject->modify($adjustmentMonthsString . ' months'); + } + $nMonth = (int) $PHPDateObject->format('m'); + $nYear = (int) $PHPDateObject->format('Y'); + + $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12); + if ($monthDiff != $adjustmentMonths) { + $adjustDays = (int) $PHPDateObject->format('d'); + $adjustDaysString = '-' . $adjustDays . ' days'; + $PHPDateObject->modify($adjustDaysString); + } + + return $PHPDateObject; + } + + /** + * DATETIMENOW. + * + * Returns the current date and time. + * The NOW function is useful when you need to display the current date and time on a worksheet or + * calculate a value based on the current date and time, and have that value updated each time you + * open the worksheet. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * NOW() + * + * @category Date/Time Functions + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATETIMENOW() + { + $saveTimeZone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + $retValue = false; + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $retValue = (float) Date::PHPToExcel(time()); + + break; + case Functions::RETURNDATE_PHP_NUMERIC: + $retValue = (int) time(); + + break; + case Functions::RETURNDATE_PHP_OBJECT: + $retValue = new \DateTime(); + + break; + } + date_default_timezone_set($saveTimeZone); + + return $retValue; + } + + /** + * DATENOW. + * + * Returns the current date. + * The NOW function is useful when you need to display the current date and time on a worksheet or + * calculate a value based on the current date and time, and have that value updated each time you + * open the worksheet. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TODAY() + * + * @category Date/Time Functions + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATENOW() + { + $saveTimeZone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + $retValue = false; + $excelDateTime = floor(Date::PHPToExcel(time())); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $retValue = (float) $excelDateTime; + + break; + case Functions::RETURNDATE_PHP_NUMERIC: + $retValue = (int) Date::excelToTimestamp($excelDateTime); + + break; + case Functions::RETURNDATE_PHP_OBJECT: + $retValue = Date::excelToDateTimeObject($excelDateTime); + + break; + } + date_default_timezone_set($saveTimeZone); + + return $retValue; + } + + /** + * DATE. + * + * The DATE function returns a value that represents a particular date. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * DATE(year,month,day) + * + * PhpSpreadsheet is a lot more forgiving than MS Excel when passing non numeric values to this function. + * A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted, + * as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language. + * + * @category Date/Time Functions + * + * @param int $year The value of the year argument can include one to four digits. + * Excel interprets the year argument according to the configured + * date system: 1900 or 1904. + * If year is between 0 (zero) and 1899 (inclusive), Excel adds that + * value to 1900 to calculate the year. For example, DATE(108,1,2) + * returns January 2, 2008 (1900+108). + * If year is between 1900 and 9999 (inclusive), Excel uses that + * value as the year. For example, DATE(2008,1,2) returns January 2, + * 2008. + * If year is less than 0 or is 10000 or greater, Excel returns the + * #NUM! error value. + * @param int $month A positive or negative integer representing the month of the year + * from 1 to 12 (January to December). + * If month is greater than 12, month adds that number of months to + * the first month in the year specified. For example, DATE(2008,14,2) + * returns the serial number representing February 2, 2009. + * If month is less than 1, month subtracts the magnitude of that + * number of months, plus 1, from the first month in the year + * specified. For example, DATE(2008,-3,2) returns the serial number + * representing September 2, 2007. + * @param int $day A positive or negative integer representing the day of the month + * from 1 to 31. + * If day is greater than the number of days in the month specified, + * day adds that number of days to the first day in the month. For + * example, DATE(2008,1,35) returns the serial number representing + * February 4, 2008. + * If day is less than 1, day subtracts the magnitude that number of + * days, plus one, from the first day of the month specified. For + * example, DATE(2008,1,-15) returns the serial number representing + * December 16, 2007. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATE($year = 0, $month = 1, $day = 1) + { + $year = Functions::flattenSingleValue($year); + $month = Functions::flattenSingleValue($month); + $day = Functions::flattenSingleValue($day); + + if (($month !== null) && (!is_numeric($month))) { + $month = Date::monthStringToNumber($month); + } + + if (($day !== null) && (!is_numeric($day))) { + $day = Date::dayStringToNumber($day); + } + + $year = ($year !== null) ? StringHelper::testStringAsNumeric($year) : 0; + $month = ($month !== null) ? StringHelper::testStringAsNumeric($month) : 0; + $day = ($day !== null) ? StringHelper::testStringAsNumeric($day) : 0; + if ((!is_numeric($year)) || + (!is_numeric($month)) || + (!is_numeric($day))) { + return Functions::VALUE(); + } + $year = (int) $year; + $month = (int) $month; + $day = (int) $day; + + $baseYear = Date::getExcelCalendar(); + // Validate parameters + if ($year < ($baseYear - 1900)) { + return Functions::NAN(); + } + if ((($baseYear - 1900) != 0) && ($year < $baseYear) && ($year >= 1900)) { + return Functions::NAN(); + } + + if (($year < $baseYear) && ($year >= ($baseYear - 1900))) { + $year += 1900; + } + + if ($month < 1) { + // Handle year/month adjustment if month < 1 + --$month; + $year += ceil($month / 12) - 1; + $month = 13 - abs($month % 12); + } elseif ($month > 12) { + // Handle year/month adjustment if month > 12 + $year += floor($month / 12); + $month = ($month % 12); + } + + // Re-validate the year parameter after adjustments + if (($year < $baseYear) || ($year >= 10000)) { + return Functions::NAN(); + } + + // Execute function + $excelDateValue = Date::formattedPHPToExcel($year, $month, $day); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp($excelDateValue); + case Functions::RETURNDATE_PHP_OBJECT: + return Date::excelToDateTimeObject($excelDateValue); + } + } + + /** + * TIME. + * + * The TIME function returns a value that represents a particular time. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TIME(hour,minute,second) + * + * @category Date/Time Functions + * + * @param int $hour A number from 0 (zero) to 32767 representing the hour. + * Any value greater than 23 will be divided by 24 and the remainder + * will be treated as the hour value. For example, TIME(27,0,0) = + * TIME(3,0,0) = .125 or 3:00 AM. + * @param int $minute A number from 0 to 32767 representing the minute. + * Any value greater than 59 will be converted to hours and minutes. + * For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM. + * @param int $second A number from 0 to 32767 representing the second. + * Any value greater than 59 will be converted to hours, minutes, + * and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 + * or 12:33:20 AM + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function TIME($hour = 0, $minute = 0, $second = 0) + { + $hour = Functions::flattenSingleValue($hour); + $minute = Functions::flattenSingleValue($minute); + $second = Functions::flattenSingleValue($second); + + if ($hour == '') { + $hour = 0; + } + if ($minute == '') { + $minute = 0; + } + if ($second == '') { + $second = 0; + } + + if ((!is_numeric($hour)) || (!is_numeric($minute)) || (!is_numeric($second))) { + return Functions::VALUE(); + } + $hour = (int) $hour; + $minute = (int) $minute; + $second = (int) $second; + + if ($second < 0) { + $minute += floor($second / 60); + $second = 60 - abs($second % 60); + if ($second == 60) { + $second = 0; + } + } elseif ($second >= 60) { + $minute += floor($second / 60); + $second = $second % 60; + } + if ($minute < 0) { + $hour += floor($minute / 60); + $minute = 60 - abs($minute % 60); + if ($minute == 60) { + $minute = 0; + } + } elseif ($minute >= 60) { + $hour += floor($minute / 60); + $minute = $minute % 60; + } + + if ($hour > 23) { + $hour = $hour % 24; + } elseif ($hour < 0) { + return Functions::NAN(); + } + + // Execute function + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + $date = 0; + $calendar = Date::getExcelCalendar(); + if ($calendar != Date::CALENDAR_WINDOWS_1900) { + $date = 1; + } + + return (float) Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second); + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp(Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600 + case Functions::RETURNDATE_PHP_OBJECT: + $dayAdjust = 0; + if ($hour < 0) { + $dayAdjust = floor($hour / 24); + $hour = 24 - abs($hour % 24); + if ($hour == 24) { + $hour = 0; + } + } elseif ($hour >= 24) { + $dayAdjust = floor($hour / 24); + $hour = $hour % 24; + } + $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second); + if ($dayAdjust != 0) { + $phpDateObject->modify($dayAdjust . ' days'); + } + + return $phpDateObject; + } + } + + /** + * DATEVALUE. + * + * Returns a value that represents a particular date. + * Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp + * value. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * DATEVALUE(dateValue) + * + * @category Date/Time Functions + * + * @param string $dateValue Text that represents a date in a Microsoft Excel date format. + * For example, "1/30/2008" or "30-Jan-2008" are text strings within + * quotation marks that represent dates. Using the default date + * system in Excel for Windows, date_text must represent a date from + * January 1, 1900, to December 31, 9999. Using the default date + * system in Excel for the Macintosh, date_text must represent a date + * from January 1, 1904, to December 31, 9999. DATEVALUE returns the + * #VALUE! error value if date_text is out of this range. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function DATEVALUE($dateValue = 1) + { + $dateValueOrig = $dateValue; + $dateValue = trim(Functions::flattenSingleValue($dateValue), '"'); + // Strip any ordinals because they're allowed in Excel (English only) + $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue); + // Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany) + $dateValue = str_replace(['/', '.', '-', ' '], ' ', $dateValue); + + $yearFound = false; + $t1 = explode(' ', $dateValue); + foreach ($t1 as &$t) { + if ((is_numeric($t)) && ($t > 31)) { + if ($yearFound) { + return Functions::VALUE(); + } + if ($t < 100) { + $t += 1900; + } + $yearFound = true; + } + } + if ((count($t1) == 1) && (strpos($t, ':') != false)) { + // We've been fed a time value without any date + return 0.0; + } elseif (count($t1) == 2) { + // We only have two parts of the date: either day/month or month/year + if ($yearFound) { + array_unshift($t1, 1); + } else { + if ($t1[1] > 29) { + $t1[1] += 1900; + array_unshift($t1, 1); + } else { + $t1[] = date('Y'); + } + } + } + unset($t); + $dateValue = implode(' ', $t1); + + $PHPDateArray = date_parse($dateValue); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + $testVal1 = strtok($dateValue, '- '); + if ($testVal1 !== false) { + $testVal2 = strtok('- '); + if ($testVal2 !== false) { + $testVal3 = strtok('- '); + if ($testVal3 === false) { + $testVal3 = strftime('%Y'); + } + } else { + return Functions::VALUE(); + } + } else { + return Functions::VALUE(); + } + if ($testVal1 < 31 && $testVal2 < 12 && $testVal3 < 12 && strlen($testVal3) == 2) { + $testVal3 += 2000; + } + $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3); + if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { + return Functions::VALUE(); + } + } + } + + if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { + // Execute function + if ($PHPDateArray['year'] == '') { + $PHPDateArray['year'] = strftime('%Y'); + } + if ($PHPDateArray['year'] < 1900) { + return Functions::VALUE(); + } + if ($PHPDateArray['month'] == '') { + $PHPDateArray['month'] = strftime('%m'); + } + if ($PHPDateArray['day'] == '') { + $PHPDateArray['day'] = strftime('%d'); + } + if (!checkdate($PHPDateArray['month'], $PHPDateArray['day'], $PHPDateArray['year'])) { + return Functions::VALUE(); + } + $excelDateValue = floor( + Date::formattedPHPToExcel( + $PHPDateArray['year'], + $PHPDateArray['month'], + $PHPDateArray['day'], + $PHPDateArray['hour'], + $PHPDateArray['minute'], + $PHPDateArray['second'] + ) + ); + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp($excelDateValue); + case Functions::RETURNDATE_PHP_OBJECT: + return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00'); + } + } + + return Functions::VALUE(); + } + + /** + * TIMEVALUE. + * + * Returns a value that represents a particular time. + * Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp + * value. + * + * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time + * format of your regional settings. PhpSpreadsheet does not change cell formatting in this way. + * + * Excel Function: + * TIMEVALUE(timeValue) + * + * @category Date/Time Functions + * + * @param string $timeValue A text string that represents a time in any one of the Microsoft + * Excel time formats; for example, "6:45 PM" and "18:45" text strings + * within quotation marks that represent time. + * Date information in time_text is ignored. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function TIMEVALUE($timeValue) + { + $timeValue = trim(Functions::flattenSingleValue($timeValue), '"'); + $timeValue = str_replace(['/', '.'], '-', $timeValue); + + $arraySplit = preg_split('/[\/:\-\s]/', $timeValue); + if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) { + $arraySplit[0] = ($arraySplit[0] % 24); + $timeValue = implode(':', $arraySplit); + } + + $PHPDateArray = date_parse($timeValue); + if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $excelDateValue = Date::formattedPHPToExcel( + $PHPDateArray['year'], + $PHPDateArray['month'], + $PHPDateArray['day'], + $PHPDateArray['hour'], + $PHPDateArray['minute'], + $PHPDateArray['second'] + ); + } else { + $excelDateValue = Date::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1; + } + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $excelDateValue; + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) $phpDateValue = Date::excelToTimestamp($excelDateValue + 25569) - 3600; + case Functions::RETURNDATE_PHP_OBJECT: + return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']); + } + } + + return Functions::VALUE(); + } + + /** + * DATEDIF. + * + * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object + * or a standard date string + * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object + * or a standard date string + * @param string $unit + * + * @return int|string Interval between the dates + */ + public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 'D') + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + $unit = strtoupper(Functions::flattenSingleValue($unit)); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + + // Validate parameters + if ($startDate > $endDate) { + return Functions::NAN(); + } + + // Execute function + $difference = $endDate - $startDate; + + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $startDays = $PHPStartDateObject->format('j'); + $startMonths = $PHPStartDateObject->format('n'); + $startYears = $PHPStartDateObject->format('Y'); + + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + $endDays = $PHPEndDateObject->format('j'); + $endMonths = $PHPEndDateObject->format('n'); + $endYears = $PHPEndDateObject->format('Y'); + + $retVal = Functions::NAN(); + switch ($unit) { + case 'D': + $retVal = (int) $difference; + + break; + case 'M': + $retVal = (int) ($endMonths - $startMonths) + ((int) ($endYears - $startYears) * 12); + // We're only interested in full months + if ($endDays < $startDays) { + --$retVal; + } + + break; + case 'Y': + $retVal = (int) ($endYears - $startYears); + // We're only interested in full months + if ($endMonths < $startMonths) { + --$retVal; + } elseif (($endMonths == $startMonths) && ($endDays < $startDays)) { + // Remove start month + --$retVal; + // Remove end month + --$retVal; + } + + break; + case 'MD': + if ($endDays < $startDays) { + $retVal = $endDays; + $PHPEndDateObject->modify('-' . $endDays . ' days'); + $adjustDays = $PHPEndDateObject->format('j'); + $retVal += ($adjustDays - $startDays); + } else { + $retVal = $endDays - $startDays; + } + + break; + case 'YM': + $retVal = (int) ($endMonths - $startMonths); + if ($retVal < 0) { + $retVal += 12; + } + // We're only interested in full months + if ($endDays < $startDays) { + --$retVal; + } + + break; + case 'YD': + $retVal = (int) $difference; + if ($endYears > $startYears) { + $isLeapStartYear = $PHPStartDateObject->format('L'); + $wasLeapEndYear = $PHPEndDateObject->format('L'); + + // Adjust end year to be as close as possible as start year + while ($PHPEndDateObject >= $PHPStartDateObject) { + $PHPEndDateObject->modify('-1 year'); + $endYears = $PHPEndDateObject->format('Y'); + } + $PHPEndDateObject->modify('+1 year'); + + // Get the result + $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days; + + // Adjust for leap years cases + $isLeapEndYear = $PHPEndDateObject->format('L'); + $limit = new \DateTime($PHPEndDateObject->format('Y-02-29')); + if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) { + --$retVal; + } + } + + break; + default: + $retVal = Functions::VALUE(); + } + + return $retVal; + } + + /** + * DAYS. + * + * Returns the number of days between two dates + * + * Excel Function: + * DAYS(endDate, startDate) + * + * @category Date/Time Functions + * + * @param \DateTimeImmutable|float|int|string $endDate Excel date serial value (float), + * PHP date timestamp (integer), PHP DateTime object, or a standard date string + * @param \DateTimeImmutable|float|int|string $startDate Excel date serial value (float), + * PHP date timestamp (integer), PHP DateTime object, or a standard date string + * + * @return int|string Number of days between start date and end date or an error + */ + public static function DAYS($endDate = 0, $startDate = 0) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + + $startDate = self::getDateValue($startDate); + if (is_string($startDate)) { + return Functions::VALUE(); + } + + $endDate = self::getDateValue($endDate); + if (is_string($endDate)) { + return Functions::VALUE(); + } + + // Execute function + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + + $diff = $PHPStartDateObject->diff($PHPEndDateObject); + $days = $diff->days; + + if ($diff->invert) { + $days = -$days; + } + + return $days; + } + + /** + * DAYS360. + * + * Returns the number of days between two dates based on a 360-day year (twelve 30-day months), + * which is used in some accounting calculations. Use this function to help compute payments if + * your accounting system is based on twelve 30-day months. + * + * Excel Function: + * DAYS360(startDate,endDate[,method]) + * + * @category Date/Time Functions + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param bool $method US or European Method + * FALSE or omitted: U.S. (NASD) method. If the starting date is + * the last day of a month, it becomes equal to the 30th of the + * same month. If the ending date is the last day of a month and + * the starting date is earlier than the 30th of a month, the + * ending date becomes equal to the 1st of the next month; + * otherwise the ending date becomes equal to the 30th of the + * same month. + * TRUE: European method. Starting dates and ending dates that + * occur on the 31st of a month become equal to the 30th of the + * same month. + * + * @return int|string Number of days between start date and end date + */ + public static function DAYS360($startDate = 0, $endDate = 0, $method = false) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + + if (!is_bool($method)) { + return Functions::VALUE(); + } + + // Execute function + $PHPStartDateObject = Date::excelToDateTimeObject($startDate); + $startDay = $PHPStartDateObject->format('j'); + $startMonth = $PHPStartDateObject->format('n'); + $startYear = $PHPStartDateObject->format('Y'); + + $PHPEndDateObject = Date::excelToDateTimeObject($endDate); + $endDay = $PHPEndDateObject->format('j'); + $endMonth = $PHPEndDateObject->format('n'); + $endYear = $PHPEndDateObject->format('Y'); + + return self::dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, !$method); + } + + /** + * YEARFRAC. + * + * Calculates the fraction of the year represented by the number of whole days between two dates + * (the start_date and the end_date). + * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or + * obligations to assign to a specific term. + * + * Excel Function: + * YEARFRAC(startDate,endDate[,method]) + * + * @category Date/Time Functions + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $method Method used for the calculation + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float fraction of the year + */ + public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) + { + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + $method = Functions::flattenSingleValue($method); + + if (is_string($startDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + if (is_string($endDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + + if (((is_numeric($method)) && (!is_string($method))) || ($method == '')) { + switch ($method) { + case 0: + return self::DAYS360($startDate, $endDate) / 360; + case 1: + $days = self::DATEDIF($startDate, $endDate); + $startYear = self::YEAR($startDate); + $endYear = self::YEAR($endDate); + $years = $endYear - $startYear + 1; + $leapDays = 0; + if ($years == 1) { + if (self::isLeapYear($endYear)) { + $startMonth = self::MONTHOFYEAR($startDate); + $endMonth = self::MONTHOFYEAR($endDate); + $endDay = self::DAYOFMONTH($endDate); + if (($startMonth < 3) || + (($endMonth * 100 + $endDay) >= (2 * 100 + 29))) { + $leapDays += 1; + } + } + } else { + for ($year = $startYear; $year <= $endYear; ++$year) { + if ($year == $startYear) { + $startMonth = self::MONTHOFYEAR($startDate); + $startDay = self::DAYOFMONTH($startDate); + if ($startMonth < 3) { + $leapDays += (self::isLeapYear($year)) ? 1 : 0; + } + } elseif ($year == $endYear) { + $endMonth = self::MONTHOFYEAR($endDate); + $endDay = self::DAYOFMONTH($endDate); + if (($endMonth * 100 + $endDay) >= (2 * 100 + 29)) { + $leapDays += (self::isLeapYear($year)) ? 1 : 0; + } + } else { + $leapDays += (self::isLeapYear($year)) ? 1 : 0; + } + } + if ($years == 2) { + if (($leapDays == 0) && (self::isLeapYear($startYear)) && ($days > 365)) { + $leapDays = 1; + } elseif ($days < 366) { + $years = 1; + } + } + $leapDays /= $years; + } + + return $days / (365 + $leapDays); + case 2: + return self::DATEDIF($startDate, $endDate) / 360; + case 3: + return self::DATEDIF($startDate, $endDate) / 365; + case 4: + return self::DAYS360($startDate, $endDate, true) / 360; + } + } + + return Functions::VALUE(); + } + + /** + * NETWORKDAYS. + * + * Returns the number of whole working days between start_date and end_date. Working days + * exclude weekends and any dates identified in holidays. + * Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days + * worked during a specific term. + * + * Excel Function: + * NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]]) + * + * @category Date/Time Functions + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Interval between the dates + */ + public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs) + { + // Retrieve the mandatory start and end date that are referenced in the function definition + $startDate = Functions::flattenSingleValue($startDate); + $endDate = Functions::flattenSingleValue($endDate); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); + + // Validate the start and end dates + if (is_string($startDate = $sDate = self::getDateValue($startDate))) { + return Functions::VALUE(); + } + $startDate = (float) floor($startDate); + if (is_string($endDate = $eDate = self::getDateValue($endDate))) { + return Functions::VALUE(); + } + $endDate = (float) floor($endDate); + + if ($sDate > $eDate) { + $startDate = $eDate; + $endDate = $sDate; + } + + // Execute function + $startDoW = 6 - self::WEEKDAY($startDate, 2); + if ($startDoW < 0) { + $startDoW = 0; + } + $endDoW = self::WEEKDAY($endDate, 2); + if ($endDoW >= 6) { + $endDoW = 0; + } + + $wholeWeekDays = floor(($endDate - $startDate) / 7) * 5; + $partWeekDays = $endDoW + $startDoW; + if ($partWeekDays > 5) { + $partWeekDays -= 5; + } + + // Test any extra holiday parameters + $holidayCountedArray = []; + foreach ($dateArgs as $holidayDate) { + if (is_string($holidayDate = self::getDateValue($holidayDate))) { + return Functions::VALUE(); + } + if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { + if ((self::WEEKDAY($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) { + --$partWeekDays; + $holidayCountedArray[] = $holidayDate; + } + } + } + + if ($sDate > $eDate) { + return 0 - ($wholeWeekDays + $partWeekDays); + } + + return $wholeWeekDays + $partWeekDays; + } + + /** + * WORKDAY. + * + * Returns the date that is the indicated number of working days before or after a date (the + * starting date). Working days exclude weekends and any dates identified as holidays. + * Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected + * delivery times, or the number of days of work performed. + * + * Excel Function: + * WORKDAY(startDate,endDays[,holidays[,holiday[,...]]]) + * + * @category Date/Time Functions + * + * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $endDays The number of nonweekend and nonholiday days before or after + * startDate. A positive value for days yields a future date; a + * negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function WORKDAY($startDate, $endDays, ...$dateArgs) + { + // Retrieve the mandatory start date and days that are referenced in the function definition + $startDate = Functions::flattenSingleValue($startDate); + $endDays = Functions::flattenSingleValue($endDays); + // Get the optional days + $dateArgs = Functions::flattenArray($dateArgs); + + if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) { + return Functions::VALUE(); + } + $startDate = (float) floor($startDate); + $endDays = (int) floor($endDays); + // If endDays is 0, we always return startDate + if ($endDays == 0) { + return $startDate; + } + + $decrementing = $endDays < 0; + + // Adjust the start date if it falls over a weekend + + $startDoW = self::WEEKDAY($startDate, 3); + if (self::WEEKDAY($startDate, 3) >= 5) { + $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW; + ($decrementing) ? $endDays++ : $endDays--; + } + + // Add endDays + $endDate = (float) $startDate + ((int) ($endDays / 5) * 7) + ($endDays % 5); + + // Adjust the calculated end date if it falls over a weekend + $endDoW = self::WEEKDAY($endDate, 3); + if ($endDoW >= 5) { + $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW; + } + + // Test any extra holiday parameters + if (!empty($dateArgs)) { + $holidayCountedArray = $holidayDates = []; + foreach ($dateArgs as $holidayDate) { + if (($holidayDate !== null) && (trim($holidayDate) > '')) { + if (is_string($holidayDate = self::getDateValue($holidayDate))) { + return Functions::VALUE(); + } + if (self::WEEKDAY($holidayDate, 3) < 5) { + $holidayDates[] = $holidayDate; + } + } + } + if ($decrementing) { + rsort($holidayDates, SORT_NUMERIC); + } else { + sort($holidayDates, SORT_NUMERIC); + } + foreach ($holidayDates as $holidayDate) { + if ($decrementing) { + if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) { + if (!in_array($holidayDate, $holidayCountedArray)) { + --$endDate; + $holidayCountedArray[] = $holidayDate; + } + } + } else { + if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { + if (!in_array($holidayDate, $holidayCountedArray)) { + ++$endDate; + $holidayCountedArray[] = $holidayDate; + } + } + } + // Adjust the calculated end date if it falls over a weekend + $endDoW = self::WEEKDAY($endDate, 3); + if ($endDoW >= 5) { + $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW; + } + } + } + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) $endDate; + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp($endDate); + case Functions::RETURNDATE_PHP_OBJECT: + return Date::excelToDateTimeObject($endDate); + } + } + + /** + * DAYOFMONTH. + * + * Returns the day of the month, for a specified date. The day is given as an integer + * ranging from 1 to 31. + * + * Excel Function: + * DAY(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Day of the month + */ + public static function DAYOFMONTH($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + if ($dateValue < 0.0) { + return Functions::NAN(); + } elseif ($dateValue < 1.0) { + return 0; + } + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('j'); + } + + /** + * WEEKDAY. + * + * Returns the day of the week for a specified date. The day is given as an integer + * ranging from 0 to 7 (dependent on the requested style). + * + * Excel Function: + * WEEKDAY(dateValue[,style]) + * + * @param int $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $style A number that determines the type of return value + * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). + * 2 Numbers 1 (Monday) through 7 (Sunday). + * 3 Numbers 0 (Monday) through 6 (Sunday). + * + * @return int|string Day of the week value + */ + public static function WEEKDAY($dateValue = 1, $style = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $style = Functions::flattenSingleValue($style); + + if (!is_numeric($style)) { + return Functions::VALUE(); + } elseif (($style < 1) || ($style > 3)) { + return Functions::NAN(); + } + $style = floor($style); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + $DoW = $PHPDateObject->format('w'); + + $firstDay = 1; + switch ($style) { + case 1: + ++$DoW; + + break; + case 2: + if ($DoW == 0) { + $DoW = 7; + } + + break; + case 3: + if ($DoW == 0) { + $DoW = 7; + } + $firstDay = 0; + --$DoW; + + break; + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + // Test for Excel's 1900 leap year, and introduce the error as required + if (($PHPDateObject->format('Y') == 1900) && ($PHPDateObject->format('n') <= 2)) { + --$DoW; + if ($DoW < $firstDay) { + $DoW += 7; + } + } + } + + return (int) $DoW; + } + + /** + * WEEKNUM. + * + * Returns the week of the year for a specified date. + * The WEEKNUM function considers the week containing January 1 to be the first week of the year. + * However, there is a European standard that defines the first week as the one with the majority + * of days (four or more) falling in the new year. This means that for years in which there are + * three days or less in the first week of January, the WEEKNUM function returns week numbers + * that are incorrect according to the European standard. + * + * Excel Function: + * WEEKNUM(dateValue[,style]) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $method Week begins on Sunday or Monday + * 1 or omitted Week begins on Sunday. + * 2 Week begins on Monday. + * + * @return int|string Week Number + */ + public static function WEEKNUM($dateValue = 1, $method = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $method = Functions::flattenSingleValue($method); + + if (!is_numeric($method)) { + return Functions::VALUE(); + } elseif (($method < 1) || ($method > 2)) { + return Functions::NAN(); + } + $method = floor($method); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + $dayOfYear = $PHPDateObject->format('z'); + $PHPDateObject->modify('-' . $dayOfYear . ' days'); + $firstDayOfFirstWeek = $PHPDateObject->format('w'); + $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7; + $interval = $dayOfYear - $daysInFirstWeek; + $weekOfYear = floor($interval / 7) + 1; + + if ($daysInFirstWeek) { + ++$weekOfYear; + } + + return (int) $weekOfYear; + } + + /** + * ISOWEEKNUM. + * + * Returns the ISO 8601 week number of the year for a specified date. + * + * Excel Function: + * ISOWEEKNUM(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Week Number + */ + public static function ISOWEEKNUM($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('W'); + } + + /** + * MONTHOFYEAR. + * + * Returns the month of a date represented by a serial number. + * The month is given as an integer, ranging from 1 (January) to 12 (December). + * + * Excel Function: + * MONTH(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Month of the year + */ + public static function MONTHOFYEAR($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if (empty($dateValue)) { + $dateValue = 1; + } + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('n'); + } + + /** + * YEAR. + * + * Returns the year corresponding to a date. + * The year is returned as an integer in the range 1900-9999. + * + * Excel Function: + * YEAR(dateValue) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * + * @return int|string Year + */ + public static function YEAR($dateValue = 1) + { + $dateValue = Functions::flattenSingleValue($dateValue); + + if ($dateValue === null) { + $dateValue = 1; + } elseif (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } elseif ($dateValue < 0.0) { + return Functions::NAN(); + } + + // Execute function + $PHPDateObject = Date::excelToDateTimeObject($dateValue); + + return (int) $PHPDateObject->format('Y'); + } + + /** + * HOUROFDAY. + * + * Returns the hour of a time value. + * The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). + * + * Excel Function: + * HOUR(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Hour + */ + public static function HOUROFDAY($timeValue = 0) + { + $timeValue = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('G', $timeValue); + } + + /** + * MINUTE. + * + * Returns the minutes of a time value. + * The minute is given as an integer, ranging from 0 to 59. + * + * Excel Function: + * MINUTE(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Minute + */ + public static function MINUTE($timeValue = 0) + { + $timeValue = $timeTester = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('i', $timeValue); + } + + /** + * SECOND. + * + * Returns the seconds of a time value. + * The second is given as an integer in the range 0 (zero) to 59. + * + * Excel Function: + * SECOND(timeValue) + * + * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard time string + * + * @return int|string Second + */ + public static function SECOND($timeValue = 0) + { + $timeValue = Functions::flattenSingleValue($timeValue); + + if (!is_numeric($timeValue)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $testVal = strtok($timeValue, '/-: '); + if (strlen($testVal) < strlen($timeValue)) { + return Functions::VALUE(); + } + } + $timeValue = self::getTimeValue($timeValue); + if (is_string($timeValue)) { + return Functions::VALUE(); + } + } + // Execute function + if ($timeValue >= 1) { + $timeValue = fmod($timeValue, 1); + } elseif ($timeValue < 0.0) { + return Functions::NAN(); + } + $timeValue = Date::excelToTimestamp($timeValue); + + return (int) gmdate('s', $timeValue); + } + + /** + * EDATE. + * + * Returns the serial number that represents the date that is the indicated number of months + * before or after a specified date (the start_date). + * Use EDATE to calculate maturity dates or due dates that fall on the same day of the month + * as the date of issue. + * + * Excel Function: + * EDATE(dateValue,adjustmentMonths) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $adjustmentMonths The number of months before or after start_date. + * A positive value for months yields a future date; + * a negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function EDATE($dateValue = 1, $adjustmentMonths = 0) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths); + + if (!is_numeric($adjustmentMonths)) { + return Functions::VALUE(); + } + $adjustmentMonths = floor($adjustmentMonths); + + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + // Execute function + $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) Date::PHPToExcel($PHPDateObject); + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject)); + case Functions::RETURNDATE_PHP_OBJECT: + return $PHPDateObject; + } + } + + /** + * EOMONTH. + * + * Returns the date value for the last day of the month that is the indicated number of months + * before or after start_date. + * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. + * + * Excel Function: + * EOMONTH(dateValue,adjustmentMonths) + * + * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * PHP DateTime object, or a standard date string + * @param int $adjustmentMonths The number of months before or after start_date. + * A positive value for months yields a future date; + * a negative value yields a past date. + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0) + { + $dateValue = Functions::flattenSingleValue($dateValue); + $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths); + + if (!is_numeric($adjustmentMonths)) { + return Functions::VALUE(); + } + $adjustmentMonths = floor($adjustmentMonths); + + if (is_string($dateValue = self::getDateValue($dateValue))) { + return Functions::VALUE(); + } + + // Execute function + $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1); + $adjustDays = (int) $PHPDateObject->format('d'); + $adjustDaysString = '-' . $adjustDays . ' days'; + $PHPDateObject->modify($adjustDaysString); + + switch (Functions::getReturnDateType()) { + case Functions::RETURNDATE_EXCEL: + return (float) Date::PHPToExcel($PHPDateObject); + case Functions::RETURNDATE_PHP_NUMERIC: + return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject)); + case Functions::RETURNDATE_PHP_OBJECT: + return $PHPDateObject; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php new file mode 100755 index 0000000..5a54d83 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php @@ -0,0 +1,73 @@ +stack); + } + + /** + * Push a new entry onto the stack. + * + * @param mixed $value + */ + public function push($value) + { + $this->stack[$value] = $value; + } + + /** + * Pop the last entry from the stack. + * + * @return mixed + */ + public function pop() + { + return array_pop($this->stack); + } + + /** + * Test to see if a specified entry exists on the stack. + * + * @param mixed $value The value to test + * + * @return bool + */ + public function onStack($value) + { + return isset($this->stack[$value]); + } + + /** + * Clear the stack. + */ + public function clear() + { + $this->stack = []; + } + + /** + * Return an array of all entries on the stack. + * + * @return mixed[] + */ + public function showStack() + { + return $this->stack; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php new file mode 100755 index 0000000..6793dad --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php @@ -0,0 +1,128 @@ +cellStack = $stack; + } + + /** + * Enable/Disable Calculation engine logging. + * + * @param bool $pValue + */ + public function setWriteDebugLog($pValue) + { + $this->writeDebugLog = $pValue; + } + + /** + * Return whether calculation engine logging is enabled or disabled. + * + * @return bool + */ + public function getWriteDebugLog() + { + return $this->writeDebugLog; + } + + /** + * Enable/Disable echoing of debug log information. + * + * @param bool $pValue + */ + public function setEchoDebugLog($pValue) + { + $this->echoDebugLog = $pValue; + } + + /** + * Return whether echoing of debug log information is enabled or disabled. + * + * @return bool + */ + public function getEchoDebugLog() + { + return $this->echoDebugLog; + } + + /** + * Write an entry to the calculation engine debug log. + */ + public function writeDebugLog(...$args) + { + // Only write the debug log if logging is enabled + if ($this->writeDebugLog) { + $message = implode($args); + $cellReference = implode(' -> ', $this->cellStack->showStack()); + if ($this->echoDebugLog) { + echo $cellReference, + ($this->cellStack->count() > 0 ? ' => ' : ''), + $message, + PHP_EOL; + } + $this->debugLog[] = $cellReference . + ($this->cellStack->count() > 0 ? ' => ' : '') . + $message; + } + } + + /** + * Clear the calculation engine debug log. + */ + public function clearLog() + { + $this->debugLog = []; + } + + /** + * Return the calculation engine debug log. + * + * @return string[] + */ + public function getLog() + { + return $this->debugLog; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php new file mode 100755 index 0000000..3f1b48b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php @@ -0,0 +1,2807 @@ + ['Group' => 'Mass', 'Unit Name' => 'Gram', 'AllowPrefix' => true], + 'sg' => ['Group' => 'Mass', 'Unit Name' => 'Slug', 'AllowPrefix' => false], + 'lbm' => ['Group' => 'Mass', 'Unit Name' => 'Pound mass (avoirdupois)', 'AllowPrefix' => false], + 'u' => ['Group' => 'Mass', 'Unit Name' => 'U (atomic mass unit)', 'AllowPrefix' => true], + 'ozm' => ['Group' => 'Mass', 'Unit Name' => 'Ounce mass (avoirdupois)', 'AllowPrefix' => false], + 'm' => ['Group' => 'Distance', 'Unit Name' => 'Meter', 'AllowPrefix' => true], + 'mi' => ['Group' => 'Distance', 'Unit Name' => 'Statute mile', 'AllowPrefix' => false], + 'Nmi' => ['Group' => 'Distance', 'Unit Name' => 'Nautical mile', 'AllowPrefix' => false], + 'in' => ['Group' => 'Distance', 'Unit Name' => 'Inch', 'AllowPrefix' => false], + 'ft' => ['Group' => 'Distance', 'Unit Name' => 'Foot', 'AllowPrefix' => false], + 'yd' => ['Group' => 'Distance', 'Unit Name' => 'Yard', 'AllowPrefix' => false], + 'ang' => ['Group' => 'Distance', 'Unit Name' => 'Angstrom', 'AllowPrefix' => true], + 'Pica' => ['Group' => 'Distance', 'Unit Name' => 'Pica (1/72 in)', 'AllowPrefix' => false], + 'yr' => ['Group' => 'Time', 'Unit Name' => 'Year', 'AllowPrefix' => false], + 'day' => ['Group' => 'Time', 'Unit Name' => 'Day', 'AllowPrefix' => false], + 'hr' => ['Group' => 'Time', 'Unit Name' => 'Hour', 'AllowPrefix' => false], + 'mn' => ['Group' => 'Time', 'Unit Name' => 'Minute', 'AllowPrefix' => false], + 'sec' => ['Group' => 'Time', 'Unit Name' => 'Second', 'AllowPrefix' => true], + 'Pa' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true], + 'p' => ['Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true], + 'atm' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true], + 'at' => ['Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true], + 'mmHg' => ['Group' => 'Pressure', 'Unit Name' => 'mm of Mercury', 'AllowPrefix' => true], + 'N' => ['Group' => 'Force', 'Unit Name' => 'Newton', 'AllowPrefix' => true], + 'dyn' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true], + 'dy' => ['Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true], + 'lbf' => ['Group' => 'Force', 'Unit Name' => 'Pound force', 'AllowPrefix' => false], + 'J' => ['Group' => 'Energy', 'Unit Name' => 'Joule', 'AllowPrefix' => true], + 'e' => ['Group' => 'Energy', 'Unit Name' => 'Erg', 'AllowPrefix' => true], + 'c' => ['Group' => 'Energy', 'Unit Name' => 'Thermodynamic calorie', 'AllowPrefix' => true], + 'cal' => ['Group' => 'Energy', 'Unit Name' => 'IT calorie', 'AllowPrefix' => true], + 'eV' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true], + 'ev' => ['Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true], + 'HPh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false], + 'hh' => ['Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false], + 'Wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true], + 'wh' => ['Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true], + 'flb' => ['Group' => 'Energy', 'Unit Name' => 'Foot-pound', 'AllowPrefix' => false], + 'BTU' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false], + 'btu' => ['Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false], + 'HP' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false], + 'h' => ['Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false], + 'W' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true], + 'w' => ['Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true], + 'T' => ['Group' => 'Magnetism', 'Unit Name' => 'Tesla', 'AllowPrefix' => true], + 'ga' => ['Group' => 'Magnetism', 'Unit Name' => 'Gauss', 'AllowPrefix' => true], + 'C' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false], + 'cel' => ['Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false], + 'F' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false], + 'fah' => ['Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false], + 'K' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false], + 'kel' => ['Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false], + 'tsp' => ['Group' => 'Liquid', 'Unit Name' => 'Teaspoon', 'AllowPrefix' => false], + 'tbs' => ['Group' => 'Liquid', 'Unit Name' => 'Tablespoon', 'AllowPrefix' => false], + 'oz' => ['Group' => 'Liquid', 'Unit Name' => 'Fluid Ounce', 'AllowPrefix' => false], + 'cup' => ['Group' => 'Liquid', 'Unit Name' => 'Cup', 'AllowPrefix' => false], + 'pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false], + 'us_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false], + 'uk_pt' => ['Group' => 'Liquid', 'Unit Name' => 'U.K. Pint', 'AllowPrefix' => false], + 'qt' => ['Group' => 'Liquid', 'Unit Name' => 'Quart', 'AllowPrefix' => false], + 'gal' => ['Group' => 'Liquid', 'Unit Name' => 'Gallon', 'AllowPrefix' => false], + 'l' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true], + 'lt' => ['Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true], + ]; + + /** + * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM(). + * + * @var mixed[] + */ + private static $conversionMultipliers = [ + 'Y' => ['multiplier' => 1E24, 'name' => 'yotta'], + 'Z' => ['multiplier' => 1E21, 'name' => 'zetta'], + 'E' => ['multiplier' => 1E18, 'name' => 'exa'], + 'P' => ['multiplier' => 1E15, 'name' => 'peta'], + 'T' => ['multiplier' => 1E12, 'name' => 'tera'], + 'G' => ['multiplier' => 1E9, 'name' => 'giga'], + 'M' => ['multiplier' => 1E6, 'name' => 'mega'], + 'k' => ['multiplier' => 1E3, 'name' => 'kilo'], + 'h' => ['multiplier' => 1E2, 'name' => 'hecto'], + 'e' => ['multiplier' => 1E1, 'name' => 'deka'], + 'd' => ['multiplier' => 1E-1, 'name' => 'deci'], + 'c' => ['multiplier' => 1E-2, 'name' => 'centi'], + 'm' => ['multiplier' => 1E-3, 'name' => 'milli'], + 'u' => ['multiplier' => 1E-6, 'name' => 'micro'], + 'n' => ['multiplier' => 1E-9, 'name' => 'nano'], + 'p' => ['multiplier' => 1E-12, 'name' => 'pico'], + 'f' => ['multiplier' => 1E-15, 'name' => 'femto'], + 'a' => ['multiplier' => 1E-18, 'name' => 'atto'], + 'z' => ['multiplier' => 1E-21, 'name' => 'zepto'], + 'y' => ['multiplier' => 1E-24, 'name' => 'yocto'], + ]; + + /** + * Details of the Units of measure conversion factors, organised by group. + * + * @var mixed[] + */ + private static $unitConversions = [ + 'Mass' => [ + 'g' => [ + 'g' => 1.0, + 'sg' => 6.85220500053478E-05, + 'lbm' => 2.20462291469134E-03, + 'u' => 6.02217000000000E+23, + 'ozm' => 3.52739718003627E-02, + ], + 'sg' => [ + 'g' => 1.45938424189287E+04, + 'sg' => 1.0, + 'lbm' => 3.21739194101647E+01, + 'u' => 8.78866000000000E+27, + 'ozm' => 5.14782785944229E+02, + ], + 'lbm' => [ + 'g' => 4.5359230974881148E+02, + 'sg' => 3.10810749306493E-02, + 'lbm' => 1.0, + 'u' => 2.73161000000000E+26, + 'ozm' => 1.60000023429410E+01, + ], + 'u' => [ + 'g' => 1.66053100460465E-24, + 'sg' => 1.13782988532950E-28, + 'lbm' => 3.66084470330684E-27, + 'u' => 1.0, + 'ozm' => 5.85735238300524E-26, + ], + 'ozm' => [ + 'g' => 2.83495152079732E+01, + 'sg' => 1.94256689870811E-03, + 'lbm' => 6.24999908478882E-02, + 'u' => 1.70725600000000E+25, + 'ozm' => 1.0, + ], + ], + 'Distance' => [ + 'm' => [ + 'm' => 1.0, + 'mi' => 6.21371192237334E-04, + 'Nmi' => 5.39956803455724E-04, + 'in' => 3.93700787401575E+01, + 'ft' => 3.28083989501312E+00, + 'yd' => 1.09361329797891E+00, + 'ang' => 1.00000000000000E+10, + 'Pica' => 2.83464566929116E+03, + ], + 'mi' => [ + 'm' => 1.60934400000000E+03, + 'mi' => 1.0, + 'Nmi' => 8.68976241900648E-01, + 'in' => 6.33600000000000E+04, + 'ft' => 5.28000000000000E+03, + 'yd' => 1.76000000000000E+03, + 'ang' => 1.60934400000000E+13, + 'Pica' => 4.56191999999971E+06, + ], + 'Nmi' => [ + 'm' => 1.85200000000000E+03, + 'mi' => 1.15077944802354E+00, + 'Nmi' => 1.0, + 'in' => 7.29133858267717E+04, + 'ft' => 6.07611548556430E+03, + 'yd' => 2.02537182785694E+03, + 'ang' => 1.85200000000000E+13, + 'Pica' => 5.24976377952723E+06, + ], + 'in' => [ + 'm' => 2.54000000000000E-02, + 'mi' => 1.57828282828283E-05, + 'Nmi' => 1.37149028077754E-05, + 'in' => 1.0, + 'ft' => 8.33333333333333E-02, + 'yd' => 2.77777777686643E-02, + 'ang' => 2.54000000000000E+08, + 'Pica' => 7.19999999999955E+01, + ], + 'ft' => [ + 'm' => 3.04800000000000E-01, + 'mi' => 1.89393939393939E-04, + 'Nmi' => 1.64578833693305E-04, + 'in' => 1.20000000000000E+01, + 'ft' => 1.0, + 'yd' => 3.33333333223972E-01, + 'ang' => 3.04800000000000E+09, + 'Pica' => 8.63999999999946E+02, + ], + 'yd' => [ + 'm' => 9.14400000300000E-01, + 'mi' => 5.68181818368230E-04, + 'Nmi' => 4.93736501241901E-04, + 'in' => 3.60000000118110E+01, + 'ft' => 3.00000000000000E+00, + 'yd' => 1.0, + 'ang' => 9.14400000300000E+09, + 'Pica' => 2.59200000085023E+03, + ], + 'ang' => [ + 'm' => 1.00000000000000E-10, + 'mi' => 6.21371192237334E-14, + 'Nmi' => 5.39956803455724E-14, + 'in' => 3.93700787401575E-09, + 'ft' => 3.28083989501312E-10, + 'yd' => 1.09361329797891E-10, + 'ang' => 1.0, + 'Pica' => 2.83464566929116E-07, + ], + 'Pica' => [ + 'm' => 3.52777777777800E-04, + 'mi' => 2.19205948372629E-07, + 'Nmi' => 1.90484761219114E-07, + 'in' => 1.38888888888898E-02, + 'ft' => 1.15740740740748E-03, + 'yd' => 3.85802469009251E-04, + 'ang' => 3.52777777777800E+06, + 'Pica' => 1.0, + ], + ], + 'Time' => [ + 'yr' => [ + 'yr' => 1.0, + 'day' => 365.25, + 'hr' => 8766.0, + 'mn' => 525960.0, + 'sec' => 31557600.0, + ], + 'day' => [ + 'yr' => 2.73785078713210E-03, + 'day' => 1.0, + 'hr' => 24.0, + 'mn' => 1440.0, + 'sec' => 86400.0, + ], + 'hr' => [ + 'yr' => 1.14077116130504E-04, + 'day' => 4.16666666666667E-02, + 'hr' => 1.0, + 'mn' => 60.0, + 'sec' => 3600.0, + ], + 'mn' => [ + 'yr' => 1.90128526884174E-06, + 'day' => 6.94444444444444E-04, + 'hr' => 1.66666666666667E-02, + 'mn' => 1.0, + 'sec' => 60.0, + ], + 'sec' => [ + 'yr' => 3.16880878140289E-08, + 'day' => 1.15740740740741E-05, + 'hr' => 2.77777777777778E-04, + 'mn' => 1.66666666666667E-02, + 'sec' => 1.0, + ], + ], + 'Pressure' => [ + 'Pa' => [ + 'Pa' => 1.0, + 'p' => 1.0, + 'atm' => 9.86923299998193E-06, + 'at' => 9.86923299998193E-06, + 'mmHg' => 7.50061707998627E-03, + ], + 'p' => [ + 'Pa' => 1.0, + 'p' => 1.0, + 'atm' => 9.86923299998193E-06, + 'at' => 9.86923299998193E-06, + 'mmHg' => 7.50061707998627E-03, + ], + 'atm' => [ + 'Pa' => 1.01324996583000E+05, + 'p' => 1.01324996583000E+05, + 'atm' => 1.0, + 'at' => 1.0, + 'mmHg' => 760.0, + ], + 'at' => [ + 'Pa' => 1.01324996583000E+05, + 'p' => 1.01324996583000E+05, + 'atm' => 1.0, + 'at' => 1.0, + 'mmHg' => 760.0, + ], + 'mmHg' => [ + 'Pa' => 1.33322363925000E+02, + 'p' => 1.33322363925000E+02, + 'atm' => 1.31578947368421E-03, + 'at' => 1.31578947368421E-03, + 'mmHg' => 1.0, + ], + ], + 'Force' => [ + 'N' => [ + 'N' => 1.0, + 'dyn' => 1.0E+5, + 'dy' => 1.0E+5, + 'lbf' => 2.24808923655339E-01, + ], + 'dyn' => [ + 'N' => 1.0E-5, + 'dyn' => 1.0, + 'dy' => 1.0, + 'lbf' => 2.24808923655339E-06, + ], + 'dy' => [ + 'N' => 1.0E-5, + 'dyn' => 1.0, + 'dy' => 1.0, + 'lbf' => 2.24808923655339E-06, + ], + 'lbf' => [ + 'N' => 4.448222, + 'dyn' => 4.448222E+5, + 'dy' => 4.448222E+5, + 'lbf' => 1.0, + ], + ], + 'Energy' => [ + 'J' => [ + 'J' => 1.0, + 'e' => 9.99999519343231E+06, + 'c' => 2.39006249473467E-01, + 'cal' => 2.38846190642017E-01, + 'eV' => 6.24145700000000E+18, + 'ev' => 6.24145700000000E+18, + 'HPh' => 3.72506430801000E-07, + 'hh' => 3.72506430801000E-07, + 'Wh' => 2.77777916238711E-04, + 'wh' => 2.77777916238711E-04, + 'flb' => 2.37304222192651E+01, + 'BTU' => 9.47815067349015E-04, + 'btu' => 9.47815067349015E-04, + ], + 'e' => [ + 'J' => 1.00000048065700E-07, + 'e' => 1.0, + 'c' => 2.39006364353494E-08, + 'cal' => 2.38846305445111E-08, + 'eV' => 6.24146000000000E+11, + 'ev' => 6.24146000000000E+11, + 'HPh' => 3.72506609848824E-14, + 'hh' => 3.72506609848824E-14, + 'Wh' => 2.77778049754611E-11, + 'wh' => 2.77778049754611E-11, + 'flb' => 2.37304336254586E-06, + 'BTU' => 9.47815522922962E-11, + 'btu' => 9.47815522922962E-11, + ], + 'c' => [ + 'J' => 4.18399101363672E+00, + 'e' => 4.18398900257312E+07, + 'c' => 1.0, + 'cal' => 9.99330315287563E-01, + 'eV' => 2.61142000000000E+19, + 'ev' => 2.61142000000000E+19, + 'HPh' => 1.55856355899327E-06, + 'hh' => 1.55856355899327E-06, + 'Wh' => 1.16222030532950E-03, + 'wh' => 1.16222030532950E-03, + 'flb' => 9.92878733152102E+01, + 'BTU' => 3.96564972437776E-03, + 'btu' => 3.96564972437776E-03, + ], + 'cal' => [ + 'J' => 4.18679484613929E+00, + 'e' => 4.18679283372801E+07, + 'c' => 1.00067013349059E+00, + 'cal' => 1.0, + 'eV' => 2.61317000000000E+19, + 'ev' => 2.61317000000000E+19, + 'HPh' => 1.55960800463137E-06, + 'hh' => 1.55960800463137E-06, + 'Wh' => 1.16299914807955E-03, + 'wh' => 1.16299914807955E-03, + 'flb' => 9.93544094443283E+01, + 'BTU' => 3.96830723907002E-03, + 'btu' => 3.96830723907002E-03, + ], + 'eV' => [ + 'J' => 1.60219000146921E-19, + 'e' => 1.60218923136574E-12, + 'c' => 3.82933423195043E-20, + 'cal' => 3.82676978535648E-20, + 'eV' => 1.0, + 'ev' => 1.0, + 'HPh' => 5.96826078912344E-26, + 'hh' => 5.96826078912344E-26, + 'Wh' => 4.45053000026614E-23, + 'wh' => 4.45053000026614E-23, + 'flb' => 3.80206452103492E-18, + 'BTU' => 1.51857982414846E-22, + 'btu' => 1.51857982414846E-22, + ], + 'ev' => [ + 'J' => 1.60219000146921E-19, + 'e' => 1.60218923136574E-12, + 'c' => 3.82933423195043E-20, + 'cal' => 3.82676978535648E-20, + 'eV' => 1.0, + 'ev' => 1.0, + 'HPh' => 5.96826078912344E-26, + 'hh' => 5.96826078912344E-26, + 'Wh' => 4.45053000026614E-23, + 'wh' => 4.45053000026614E-23, + 'flb' => 3.80206452103492E-18, + 'BTU' => 1.51857982414846E-22, + 'btu' => 1.51857982414846E-22, + ], + 'HPh' => [ + 'J' => 2.68451741316170E+06, + 'e' => 2.68451612283024E+13, + 'c' => 6.41616438565991E+05, + 'cal' => 6.41186757845835E+05, + 'eV' => 1.67553000000000E+25, + 'ev' => 1.67553000000000E+25, + 'HPh' => 1.0, + 'hh' => 1.0, + 'Wh' => 7.45699653134593E+02, + 'wh' => 7.45699653134593E+02, + 'flb' => 6.37047316692964E+07, + 'BTU' => 2.54442605275546E+03, + 'btu' => 2.54442605275546E+03, + ], + 'hh' => [ + 'J' => 2.68451741316170E+06, + 'e' => 2.68451612283024E+13, + 'c' => 6.41616438565991E+05, + 'cal' => 6.41186757845835E+05, + 'eV' => 1.67553000000000E+25, + 'ev' => 1.67553000000000E+25, + 'HPh' => 1.0, + 'hh' => 1.0, + 'Wh' => 7.45699653134593E+02, + 'wh' => 7.45699653134593E+02, + 'flb' => 6.37047316692964E+07, + 'BTU' => 2.54442605275546E+03, + 'btu' => 2.54442605275546E+03, + ], + 'Wh' => [ + 'J' => 3.59999820554720E+03, + 'e' => 3.59999647518369E+10, + 'c' => 8.60422069219046E+02, + 'cal' => 8.59845857713046E+02, + 'eV' => 2.24692340000000E+22, + 'ev' => 2.24692340000000E+22, + 'HPh' => 1.34102248243839E-03, + 'hh' => 1.34102248243839E-03, + 'Wh' => 1.0, + 'wh' => 1.0, + 'flb' => 8.54294774062316E+04, + 'BTU' => 3.41213254164705E+00, + 'btu' => 3.41213254164705E+00, + ], + 'wh' => [ + 'J' => 3.59999820554720E+03, + 'e' => 3.59999647518369E+10, + 'c' => 8.60422069219046E+02, + 'cal' => 8.59845857713046E+02, + 'eV' => 2.24692340000000E+22, + 'ev' => 2.24692340000000E+22, + 'HPh' => 1.34102248243839E-03, + 'hh' => 1.34102248243839E-03, + 'Wh' => 1.0, + 'wh' => 1.0, + 'flb' => 8.54294774062316E+04, + 'BTU' => 3.41213254164705E+00, + 'btu' => 3.41213254164705E+00, + ], + 'flb' => [ + 'J' => 4.21400003236424E-02, + 'e' => 4.21399800687660E+05, + 'c' => 1.00717234301644E-02, + 'cal' => 1.00649785509554E-02, + 'eV' => 2.63015000000000E+17, + 'ev' => 2.63015000000000E+17, + 'HPh' => 1.56974211145130E-08, + 'hh' => 1.56974211145130E-08, + 'Wh' => 1.17055614802000E-05, + 'wh' => 1.17055614802000E-05, + 'flb' => 1.0, + 'BTU' => 3.99409272448406E-05, + 'btu' => 3.99409272448406E-05, + ], + 'BTU' => [ + 'J' => 1.05505813786749E+03, + 'e' => 1.05505763074665E+10, + 'c' => 2.52165488508168E+02, + 'cal' => 2.51996617135510E+02, + 'eV' => 6.58510000000000E+21, + 'ev' => 6.58510000000000E+21, + 'HPh' => 3.93015941224568E-04, + 'hh' => 3.93015941224568E-04, + 'Wh' => 2.93071851047526E-01, + 'wh' => 2.93071851047526E-01, + 'flb' => 2.50369750774671E+04, + 'BTU' => 1.0, + 'btu' => 1.0, + ], + 'btu' => [ + 'J' => 1.05505813786749E+03, + 'e' => 1.05505763074665E+10, + 'c' => 2.52165488508168E+02, + 'cal' => 2.51996617135510E+02, + 'eV' => 6.58510000000000E+21, + 'ev' => 6.58510000000000E+21, + 'HPh' => 3.93015941224568E-04, + 'hh' => 3.93015941224568E-04, + 'Wh' => 2.93071851047526E-01, + 'wh' => 2.93071851047526E-01, + 'flb' => 2.50369750774671E+04, + 'BTU' => 1.0, + 'btu' => 1.0, + ], + ], + 'Power' => [ + 'HP' => [ + 'HP' => 1.0, + 'h' => 1.0, + 'W' => 7.45701000000000E+02, + 'w' => 7.45701000000000E+02, + ], + 'h' => [ + 'HP' => 1.0, + 'h' => 1.0, + 'W' => 7.45701000000000E+02, + 'w' => 7.45701000000000E+02, + ], + 'W' => [ + 'HP' => 1.34102006031908E-03, + 'h' => 1.34102006031908E-03, + 'W' => 1.0, + 'w' => 1.0, + ], + 'w' => [ + 'HP' => 1.34102006031908E-03, + 'h' => 1.34102006031908E-03, + 'W' => 1.0, + 'w' => 1.0, + ], + ], + 'Magnetism' => [ + 'T' => [ + 'T' => 1.0, + 'ga' => 10000.0, + ], + 'ga' => [ + 'T' => 0.0001, + 'ga' => 1.0, + ], + ], + 'Liquid' => [ + 'tsp' => [ + 'tsp' => 1.0, + 'tbs' => 3.33333333333333E-01, + 'oz' => 1.66666666666667E-01, + 'cup' => 2.08333333333333E-02, + 'pt' => 1.04166666666667E-02, + 'us_pt' => 1.04166666666667E-02, + 'uk_pt' => 8.67558516821960E-03, + 'qt' => 5.20833333333333E-03, + 'gal' => 1.30208333333333E-03, + 'l' => 4.92999408400710E-03, + 'lt' => 4.92999408400710E-03, + ], + 'tbs' => [ + 'tsp' => 3.00000000000000E+00, + 'tbs' => 1.0, + 'oz' => 5.00000000000000E-01, + 'cup' => 6.25000000000000E-02, + 'pt' => 3.12500000000000E-02, + 'us_pt' => 3.12500000000000E-02, + 'uk_pt' => 2.60267555046588E-02, + 'qt' => 1.56250000000000E-02, + 'gal' => 3.90625000000000E-03, + 'l' => 1.47899822520213E-02, + 'lt' => 1.47899822520213E-02, + ], + 'oz' => [ + 'tsp' => 6.00000000000000E+00, + 'tbs' => 2.00000000000000E+00, + 'oz' => 1.0, + 'cup' => 1.25000000000000E-01, + 'pt' => 6.25000000000000E-02, + 'us_pt' => 6.25000000000000E-02, + 'uk_pt' => 5.20535110093176E-02, + 'qt' => 3.12500000000000E-02, + 'gal' => 7.81250000000000E-03, + 'l' => 2.95799645040426E-02, + 'lt' => 2.95799645040426E-02, + ], + 'cup' => [ + 'tsp' => 4.80000000000000E+01, + 'tbs' => 1.60000000000000E+01, + 'oz' => 8.00000000000000E+00, + 'cup' => 1.0, + 'pt' => 5.00000000000000E-01, + 'us_pt' => 5.00000000000000E-01, + 'uk_pt' => 4.16428088074541E-01, + 'qt' => 2.50000000000000E-01, + 'gal' => 6.25000000000000E-02, + 'l' => 2.36639716032341E-01, + 'lt' => 2.36639716032341E-01, + ], + 'pt' => [ + 'tsp' => 9.60000000000000E+01, + 'tbs' => 3.20000000000000E+01, + 'oz' => 1.60000000000000E+01, + 'cup' => 2.00000000000000E+00, + 'pt' => 1.0, + 'us_pt' => 1.0, + 'uk_pt' => 8.32856176149081E-01, + 'qt' => 5.00000000000000E-01, + 'gal' => 1.25000000000000E-01, + 'l' => 4.73279432064682E-01, + 'lt' => 4.73279432064682E-01, + ], + 'us_pt' => [ + 'tsp' => 9.60000000000000E+01, + 'tbs' => 3.20000000000000E+01, + 'oz' => 1.60000000000000E+01, + 'cup' => 2.00000000000000E+00, + 'pt' => 1.0, + 'us_pt' => 1.0, + 'uk_pt' => 8.32856176149081E-01, + 'qt' => 5.00000000000000E-01, + 'gal' => 1.25000000000000E-01, + 'l' => 4.73279432064682E-01, + 'lt' => 4.73279432064682E-01, + ], + 'uk_pt' => [ + 'tsp' => 1.15266000000000E+02, + 'tbs' => 3.84220000000000E+01, + 'oz' => 1.92110000000000E+01, + 'cup' => 2.40137500000000E+00, + 'pt' => 1.20068750000000E+00, + 'us_pt' => 1.20068750000000E+00, + 'uk_pt' => 1.0, + 'qt' => 6.00343750000000E-01, + 'gal' => 1.50085937500000E-01, + 'l' => 5.68260698087162E-01, + 'lt' => 5.68260698087162E-01, + ], + 'qt' => [ + 'tsp' => 1.92000000000000E+02, + 'tbs' => 6.40000000000000E+01, + 'oz' => 3.20000000000000E+01, + 'cup' => 4.00000000000000E+00, + 'pt' => 2.00000000000000E+00, + 'us_pt' => 2.00000000000000E+00, + 'uk_pt' => 1.66571235229816E+00, + 'qt' => 1.0, + 'gal' => 2.50000000000000E-01, + 'l' => 9.46558864129363E-01, + 'lt' => 9.46558864129363E-01, + ], + 'gal' => [ + 'tsp' => 7.68000000000000E+02, + 'tbs' => 2.56000000000000E+02, + 'oz' => 1.28000000000000E+02, + 'cup' => 1.60000000000000E+01, + 'pt' => 8.00000000000000E+00, + 'us_pt' => 8.00000000000000E+00, + 'uk_pt' => 6.66284940919265E+00, + 'qt' => 4.00000000000000E+00, + 'gal' => 1.0, + 'l' => 3.78623545651745E+00, + 'lt' => 3.78623545651745E+00, + ], + 'l' => [ + 'tsp' => 2.02840000000000E+02, + 'tbs' => 6.76133333333333E+01, + 'oz' => 3.38066666666667E+01, + 'cup' => 4.22583333333333E+00, + 'pt' => 2.11291666666667E+00, + 'us_pt' => 2.11291666666667E+00, + 'uk_pt' => 1.75975569552166E+00, + 'qt' => 1.05645833333333E+00, + 'gal' => 2.64114583333333E-01, + 'l' => 1.0, + 'lt' => 1.0, + ], + 'lt' => [ + 'tsp' => 2.02840000000000E+02, + 'tbs' => 6.76133333333333E+01, + 'oz' => 3.38066666666667E+01, + 'cup' => 4.22583333333333E+00, + 'pt' => 2.11291666666667E+00, + 'us_pt' => 2.11291666666667E+00, + 'uk_pt' => 1.75975569552166E+00, + 'qt' => 1.05645833333333E+00, + 'gal' => 2.64114583333333E-01, + 'l' => 1.0, + 'lt' => 1.0, + ], + ], + ]; + + /** + * parseComplex. + * + * Parses a complex number into its real and imaginary parts, and an I or J suffix + * + * @deprecated 2.0.0 No longer used by internal code. Please use the Complex\Complex class instead + * + * @param string $complexNumber The complex number + * + * @return mixed[] Indexed on "real", "imaginary" and "suffix" + */ + public static function parseComplex($complexNumber) + { + $complex = new Complex($complexNumber); + + return [ + 'real' => $complex->getReal(), + 'imaginary' => $complex->getImaginary(), + 'suffix' => $complex->getSuffix(), + ]; + } + + /** + * Formats a number base string value with leading zeroes. + * + * @param string $xVal The "number" to pad + * @param int $places The length that we want to pad this value + * + * @return string The padded "number" + */ + private static function nbrConversionFormat($xVal, $places) + { + if ($places !== null) { + if (is_numeric($places)) { + $places = (int) $places; + } else { + return Functions::VALUE(); + } + if ($places < 0) { + return Functions::NAN(); + } + if (strlen($xVal) <= $places) { + return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10); + } + + return Functions::NAN(); + } + + return substr($xVal, -10); + } + + /** + * BESSELI. + * + * Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated + * for purely imaginary arguments + * + * Excel Function: + * BESSELI(x,ord) + * + * @category Engineering Functions + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELI returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. + * If ord is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELI returns the #VALUE! error value. + * If $ord < 0, BESSELI returns the #NUM! error value. + * + * @return float + */ + public static function BESSELI($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + $ord = floor($ord); + if ($ord < 0) { + return Functions::NAN(); + } + + if (abs($x) <= 30) { + $fResult = $fTerm = pow($x / 2, $ord) / MathTrig::FACT($ord); + $ordK = 1; + $fSqrX = ($x * $x) / 4; + do { + $fTerm *= $fSqrX; + $fTerm /= ($ordK * ($ordK + $ord)); + $fResult += $fTerm; + } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); + } else { + $f_2_PI = 2 * M_PI; + + $fXAbs = abs($x); + $fResult = exp($fXAbs) / sqrt($f_2_PI * $fXAbs); + if (($ord & 1) && ($x < 0)) { + $fResult = -$fResult; + } + } + + return (is_nan($fResult)) ? Functions::NAN() : $fResult; + } + + return Functions::VALUE(); + } + + /** + * BESSELJ. + * + * Returns the Bessel function + * + * Excel Function: + * BESSELJ(x,ord) + * + * @category Engineering Functions + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELJ returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELJ returns the #VALUE! error value. + * If $ord < 0, BESSELJ returns the #NUM! error value. + * + * @return float + */ + public static function BESSELJ($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + $ord = floor($ord); + if ($ord < 0) { + return Functions::NAN(); + } + + $fResult = 0; + if (abs($x) <= 30) { + $fResult = $fTerm = pow($x / 2, $ord) / MathTrig::FACT($ord); + $ordK = 1; + $fSqrX = ($x * $x) / -4; + do { + $fTerm *= $fSqrX; + $fTerm /= ($ordK * ($ordK + $ord)); + $fResult += $fTerm; + } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); + } else { + $f_PI_DIV_2 = M_PI / 2; + $f_PI_DIV_4 = M_PI / 4; + + $fXAbs = abs($x); + $fResult = sqrt(Functions::M_2DIVPI / $fXAbs) * cos($fXAbs - $ord * $f_PI_DIV_2 - $f_PI_DIV_4); + if (($ord & 1) && ($x < 0)) { + $fResult = -$fResult; + } + } + + return (is_nan($fResult)) ? Functions::NAN() : $fResult; + } + + return Functions::VALUE(); + } + + private static function besselK0($fNum) + { + if ($fNum <= 2) { + $fNum2 = $fNum * 0.5; + $y = ($fNum2 * $fNum2); + $fRet = -log($fNum2) * self::BESSELI($fNum, 0) + + (-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y * + (0.10750e-3 + $y * 0.74e-5)))))); + } else { + $y = 2 / $fNum; + $fRet = exp(-$fNum) / sqrt($fNum) * + (1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y * + (0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3)))))); + } + + return $fRet; + } + + private static function besselK1($fNum) + { + if ($fNum <= 2) { + $fNum2 = $fNum * 0.5; + $y = ($fNum2 * $fNum2); + $fRet = log($fNum2) * self::BESSELI($fNum, 1) + + (1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y * + (-0.110404e-2 + $y * (-0.4686e-4))))))) / $fNum; + } else { + $y = 2 / $fNum; + $fRet = exp(-$fNum) / sqrt($fNum) * + (1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y * + (0.325614e-2 + $y * (-0.68245e-3))))))); + } + + return $fRet; + } + + /** + * BESSELK. + * + * Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated + * for purely imaginary arguments. + * + * Excel Function: + * BESSELK(x,ord) + * + * @category Engineering Functions + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELK returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. + * If $ord < 0, BESSELK returns the #NUM! error value. + * + * @return float + */ + public static function BESSELK($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + if (($ord < 0) || ($x == 0.0)) { + return Functions::NAN(); + } + + switch (floor($ord)) { + case 0: + $fBk = self::besselK0($x); + + break; + case 1: + $fBk = self::besselK1($x); + + break; + default: + $fTox = 2 / $x; + $fBkm = self::besselK0($x); + $fBk = self::besselK1($x); + for ($n = 1; $n < $ord; ++$n) { + $fBkp = $fBkm + $n * $fTox * $fBk; + $fBkm = $fBk; + $fBk = $fBkp; + } + } + + return (is_nan($fBk)) ? Functions::NAN() : $fBk; + } + + return Functions::VALUE(); + } + + private static function besselY0($fNum) + { + if ($fNum < 8.0) { + $y = ($fNum * $fNum); + $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y * (-86327.92757 + $y * 228.4622733)))); + $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y * (47447.26470 + $y * (226.1030244 + $y)))); + $fRet = $f1 / $f2 + 0.636619772 * self::BESSELJ($fNum, 0) * log($fNum); + } else { + $z = 8.0 / $fNum; + $y = ($z * $z); + $xx = $fNum - 0.785398164; + $f1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6))); + $f2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y * (-0.934945152e-7)))); + $fRet = sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2); + } + + return $fRet; + } + + private static function besselY1($fNum) + { + if ($fNum < 8.0) { + $y = ($fNum * $fNum); + $f1 = $fNum * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y * (0.7349264551e9 + $y * + (-0.4237922726e7 + $y * 0.8511937935e4))))); + $f2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y * + (0.1020426050e6 + $y * (0.3549632885e3 + $y))))); + $fRet = $f1 / $f2 + 0.636619772 * (self::BESSELJ($fNum, 1) * log($fNum) - 1 / $fNum); + } else { + $fRet = sqrt(0.636619772 / $fNum) * sin($fNum - 2.356194491); + } + + return $fRet; + } + + /** + * BESSELY. + * + * Returns the Bessel function, which is also called the Weber function or the Neumann function. + * + * Excel Function: + * BESSELY(x,ord) + * + * @category Engineering Functions + * + * @param float $x The value at which to evaluate the function. + * If x is nonnumeric, BESSELK returns the #VALUE! error value. + * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated. + * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. + * If $ord < 0, BESSELK returns the #NUM! error value. + * + * @return float + */ + public static function BESSELY($x, $ord) + { + $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x); + $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord); + + if ((is_numeric($x)) && (is_numeric($ord))) { + if (($ord < 0) || ($x == 0.0)) { + return Functions::NAN(); + } + + switch (floor($ord)) { + case 0: + $fBy = self::besselY0($x); + + break; + case 1: + $fBy = self::besselY1($x); + + break; + default: + $fTox = 2 / $x; + $fBym = self::besselY0($x); + $fBy = self::besselY1($x); + for ($n = 1; $n < $ord; ++$n) { + $fByp = $n * $fTox * $fBy - $fBym; + $fBym = $fBy; + $fBy = $fByp; + } + } + + return (is_nan($fBy)) ? Functions::NAN() : $fBy; + } + + return Functions::VALUE(); + } + + /** + * BINTODEC. + * + * Return a binary value as decimal. + * + * Excel Function: + * BIN2DEC(x) + * + * @category Engineering Functions + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2DEC returns the #NUM! error value. + * + * @return string + */ + public static function BINTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + $x = substr($x, -9); + + return '-' . (512 - bindec($x)); + } + + return bindec($x); + } + + /** + * BINTOHEX. + * + * Return a binary value as hex. + * + * Excel Function: + * BIN2HEX(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2HEX returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, BIN2HEX uses the + * minimum number of characters necessary. Places is useful for padding the + * return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, BIN2HEX returns the #VALUE! error value. + * If places is negative, BIN2HEX returns the #NUM! error value. + * + * @return string + */ + public static function BINTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + // Argument X + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + return str_repeat('F', 8) . substr(strtoupper(dechex(bindec(substr($x, -9)))), -2); + } + $hexVal = (string) strtoupper(dechex(bindec($x))); + + return self::nbrConversionFormat($hexVal, $places); + } + + /** + * BINTOOCT. + * + * Return a binary value as octal. + * + * Excel Function: + * BIN2OCT(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The binary number (as a string) that you want to convert. The number + * cannot contain more than 10 characters (10 bits). The most significant + * bit of number is the sign bit. The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is not a valid binary number, or if number contains more than + * 10 characters (10 bits), BIN2OCT returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, BIN2OCT uses the + * minimum number of characters necessary. Places is useful for padding the + * return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, BIN2OCT returns the #VALUE! error value. + * If places is negative, BIN2OCT returns the #NUM! error value. + * + * @return string + */ + public static function BINTOOCT($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $x = floor($x); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { + return Functions::NAN(); + } + if (strlen($x) > 10) { + return Functions::NAN(); + } elseif (strlen($x) == 10) { + // Two's Complement + return str_repeat('7', 7) . substr(strtoupper(decoct(bindec(substr($x, -9)))), -3); + } + $octVal = (string) decoct(bindec($x)); + + return self::nbrConversionFormat($octVal, $places); + } + + /** + * DECTOBIN. + * + * Return a decimal value as binary. + * + * Excel Function: + * DEC2BIN(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The decimal integer you want to convert. If number is negative, + * valid place values are ignored and DEC2BIN returns a 10-character + * (10-bit) binary number in which the most significant bit is the sign + * bit. The remaining 9 bits are magnitude bits. Negative numbers are + * represented using two's-complement notation. + * If number < -512 or if number > 511, DEC2BIN returns the #NUM! error + * value. + * If number is nonnumeric, DEC2BIN returns the #VALUE! error value. + * If DEC2BIN requires more than places characters, it returns the #NUM! + * error value. + * @param int $places The number of characters to use. If places is omitted, DEC2BIN uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2BIN returns the #VALUE! error value. + * If places is zero or negative, DEC2BIN returns the #NUM! error value. + * + * @return string + */ + public static function DECTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + + $x = (string) floor($x); + if ($x < -512 || $x > 511) { + return Functions::NAN(); + } + + $r = decbin($x); + // Two's Complement + $r = substr($r, -10); + if (strlen($r) >= 11) { + return Functions::NAN(); + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * DECTOHEX. + * + * Return a decimal value as hex. + * + * Excel Function: + * DEC2HEX(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The decimal integer you want to convert. If number is negative, + * places is ignored and DEC2HEX returns a 10-character (40-bit) + * hexadecimal number in which the most significant bit is the sign + * bit. The remaining 39 bits are magnitude bits. Negative numbers + * are represented using two's-complement notation. + * If number < -549,755,813,888 or if number > 549,755,813,887, + * DEC2HEX returns the #NUM! error value. + * If number is nonnumeric, DEC2HEX returns the #VALUE! error value. + * If DEC2HEX requires more than places characters, it returns the + * #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, DEC2HEX uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2HEX returns the #VALUE! error value. + * If places is zero or negative, DEC2HEX returns the #NUM! error value. + * + * @return string + */ + public static function DECTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + $x = (string) floor($x); + $r = strtoupper(dechex($x)); + if (strlen($r) == 8) { + // Two's Complement + $r = 'FF' . $r; + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * DECTOOCT. + * + * Return an decimal value as octal. + * + * Excel Function: + * DEC2OCT(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The decimal integer you want to convert. If number is negative, + * places is ignored and DEC2OCT returns a 10-character (30-bit) + * octal number in which the most significant bit is the sign bit. + * The remaining 29 bits are magnitude bits. Negative numbers are + * represented using two's-complement notation. + * If number < -536,870,912 or if number > 536,870,911, DEC2OCT + * returns the #NUM! error value. + * If number is nonnumeric, DEC2OCT returns the #VALUE! error value. + * If DEC2OCT requires more than places characters, it returns the + * #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, DEC2OCT uses + * the minimum number of characters necessary. Places is useful for + * padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, DEC2OCT returns the #VALUE! error value. + * If places is zero or negative, DEC2OCT returns the #NUM! error value. + * + * @return string + */ + public static function DECTOOCT($x, $places = null) + { + $xorig = $x; + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $x = (int) $x; + } else { + return Functions::VALUE(); + } + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { + return Functions::VALUE(); + } + $x = (string) floor($x); + $r = decoct($x); + if (strlen($r) == 11) { + // Two's Complement + $r = substr($r, -10); + } + + return self::nbrConversionFormat($r, $places); + } + + /** + * HEXTOBIN. + * + * Return a hex value as binary. + * + * Excel Function: + * HEX2BIN(x[,places]) + * + * @category Engineering Functions + * + * @param string $x the hexadecimal number you want to convert. + * Number cannot contain more than 10 characters. + * The most significant bit of number is the sign bit (40th bit from the right). + * The remaining 9 bits are magnitude bits. + * Negative numbers are represented using two's-complement notation. + * If number is negative, HEX2BIN ignores places and returns a 10-character binary number. + * If number is negative, it cannot be less than FFFFFFFE00, + * and if number is positive, it cannot be greater than 1FF. + * If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value. + * If HEX2BIN requires more than places characters, it returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, + * HEX2BIN uses the minimum number of characters necessary. Places + * is useful for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, HEX2BIN returns the #VALUE! error value. + * If places is negative, HEX2BIN returns the #NUM! error value. + * + * @return string + */ + public static function HEXTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + return self::DECTOBIN(self::HEXTODEC($x), $places); + } + + /** + * HEXTODEC. + * + * Return a hex value as decimal. + * + * Excel Function: + * HEX2DEC(x) + * + * @category Engineering Functions + * + * @param string $x The hexadecimal number you want to convert. This number cannot + * contain more than 10 characters (40 bits). The most significant + * bit of number is the sign bit. The remaining 39 bits are magnitude + * bits. Negative numbers are represented using two's-complement + * notation. + * If number is not a valid hexadecimal number, HEX2DEC returns the + * #NUM! error value. + * + * @return string + */ + public static function HEXTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + if (strlen($x) > 10) { + return Functions::NAN(); + } + + $binX = ''; + foreach (str_split($x) as $char) { + $binX .= str_pad(base_convert($char, 16, 2), 4, '0', STR_PAD_LEFT); + } + if (strlen($binX) == 40 && $binX[0] == '1') { + for ($i = 0; $i < 40; ++$i) { + $binX[$i] = ($binX[$i] == '1' ? '0' : '1'); + } + + return (bindec($binX) + 1) * -1; + } + + return bindec($binX); + } + + /** + * HEXTOOCT. + * + * Return a hex value as octal. + * + * Excel Function: + * HEX2OCT(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The hexadecimal number you want to convert. Number cannot + * contain more than 10 characters. The most significant bit of + * number is the sign bit. The remaining 39 bits are magnitude + * bits. Negative numbers are represented using two's-complement + * notation. + * If number is negative, HEX2OCT ignores places and returns a + * 10-character octal number. + * If number is negative, it cannot be less than FFE0000000, and + * if number is positive, it cannot be greater than 1FFFFFFF. + * If number is not a valid hexadecimal number, HEX2OCT returns + * the #NUM! error value. + * If HEX2OCT requires more than places characters, it returns + * the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, HEX2OCT + * uses the minimum number of characters necessary. Places is + * useful for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, HEX2OCT returns the #VALUE! error + * value. + * If places is negative, HEX2OCT returns the #NUM! error value. + * + * @return string + */ + public static function HEXTOOCT($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { + return Functions::NAN(); + } + + $decimal = self::HEXTODEC($x); + if ($decimal < -536870912 || $decimal > 536870911) { + return Functions::NAN(); + } + + return self::DECTOOCT($decimal, $places); + } + + /** + * OCTTOBIN. + * + * Return an octal value as binary. + * + * Excel Function: + * OCT2BIN(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The octal number you want to convert. Number may not + * contain more than 10 characters. The most significant + * bit of number is the sign bit. The remaining 29 bits + * are magnitude bits. Negative numbers are represented + * using two's-complement notation. + * If number is negative, OCT2BIN ignores places and returns + * a 10-character binary number. + * If number is negative, it cannot be less than 7777777000, + * and if number is positive, it cannot be greater than 777. + * If number is not a valid octal number, OCT2BIN returns + * the #NUM! error value. + * If OCT2BIN requires more than places characters, it + * returns the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, + * OCT2BIN uses the minimum number of characters necessary. + * Places is useful for padding the return value with + * leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, OCT2BIN returns the #VALUE! + * error value. + * If places is negative, OCT2BIN returns the #NUM! error + * value. + * + * @return string + */ + public static function OCTTOBIN($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + + return self::DECTOBIN(self::OCTTODEC($x), $places); + } + + /** + * OCTTODEC. + * + * Return an octal value as decimal. + * + * Excel Function: + * OCT2DEC(x) + * + * @category Engineering Functions + * + * @param string $x The octal number you want to convert. Number may not contain + * more than 10 octal characters (30 bits). The most significant + * bit of number is the sign bit. The remaining 29 bits are + * magnitude bits. Negative numbers are represented using + * two's-complement notation. + * If number is not a valid octal number, OCT2DEC returns the + * #NUM! error value. + * + * @return string + */ + public static function OCTTODEC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + $binX = ''; + foreach (str_split($x) as $char) { + $binX .= str_pad(decbin((int) $char), 3, '0', STR_PAD_LEFT); + } + if (strlen($binX) == 30 && $binX[0] == '1') { + for ($i = 0; $i < 30; ++$i) { + $binX[$i] = ($binX[$i] == '1' ? '0' : '1'); + } + + return (bindec($binX) + 1) * -1; + } + + return bindec($binX); + } + + /** + * OCTTOHEX. + * + * Return an octal value as hex. + * + * Excel Function: + * OCT2HEX(x[,places]) + * + * @category Engineering Functions + * + * @param string $x The octal number you want to convert. Number may not contain + * more than 10 octal characters (30 bits). The most significant + * bit of number is the sign bit. The remaining 29 bits are + * magnitude bits. Negative numbers are represented using + * two's-complement notation. + * If number is negative, OCT2HEX ignores places and returns a + * 10-character hexadecimal number. + * If number is not a valid octal number, OCT2HEX returns the + * #NUM! error value. + * If OCT2HEX requires more than places characters, it returns + * the #NUM! error value. + * @param int $places The number of characters to use. If places is omitted, OCT2HEX + * uses the minimum number of characters necessary. Places is useful + * for padding the return value with leading 0s (zeros). + * If places is not an integer, it is truncated. + * If places is nonnumeric, OCT2HEX returns the #VALUE! error value. + * If places is negative, OCT2HEX returns the #NUM! error value. + * + * @return string + */ + public static function OCTTOHEX($x, $places = null) + { + $x = Functions::flattenSingleValue($x); + $places = Functions::flattenSingleValue($places); + + if (is_bool($x)) { + return Functions::VALUE(); + } + $x = (string) $x; + if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { + return Functions::NAN(); + } + $hexVal = strtoupper(dechex(self::OCTTODEC($x))); + + return self::nbrConversionFormat($hexVal, $places); + } + + /** + * COMPLEX. + * + * Converts real and imaginary coefficients into a complex number of the form x +/- yi or x +/- yj. + * + * Excel Function: + * COMPLEX(realNumber,imaginary[,suffix]) + * + * @category Engineering Functions + * + * @param float $realNumber the real coefficient of the complex number + * @param float $imaginary the imaginary coefficient of the complex number + * @param string $suffix The suffix for the imaginary component of the complex number. + * If omitted, the suffix is assumed to be "i". + * + * @return string + */ + public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i') + { + $realNumber = ($realNumber === null) ? 0.0 : Functions::flattenSingleValue($realNumber); + $imaginary = ($imaginary === null) ? 0.0 : Functions::flattenSingleValue($imaginary); + $suffix = ($suffix === null) ? 'i' : Functions::flattenSingleValue($suffix); + + if (((is_numeric($realNumber)) && (is_numeric($imaginary))) && + (($suffix == 'i') || ($suffix == 'j') || ($suffix == '')) + ) { + $complex = new Complex($realNumber, $imaginary, $suffix); + + return (string) $complex; + } + + return Functions::VALUE(); + } + + /** + * IMAGINARY. + * + * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMAGINARY(complexNumber) + * + * @category Engineering Functions + * + * @param string $complexNumber the complex number for which you want the imaginary + * coefficient + * + * @return float + */ + public static function IMAGINARY($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->getImaginary(); + } + + /** + * IMREAL. + * + * Returns the real coefficient of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMREAL(complexNumber) + * + * @category Engineering Functions + * + * @param string $complexNumber the complex number for which you want the real coefficient + * + * @return float + */ + public static function IMREAL($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->getReal(); + } + + /** + * IMABS. + * + * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMABS(complexNumber) + * + * @param string $complexNumber the complex number for which you want the absolute value + * + * @return float + */ + public static function IMABS($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (new Complex($complexNumber))->abs(); + } + + /** + * IMARGUMENT. + * + * Returns the argument theta of a complex number, i.e. the angle in radians from the real + * axis to the representation of the number in polar coordinates. + * + * Excel Function: + * IMARGUMENT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the argument theta + * + * @return float|string + */ + public static function IMARGUMENT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::DIV0(); + } + + return $complex->argument(); + } + + /** + * IMCONJUGATE. + * + * Returns the complex conjugate of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCONJUGATE(complexNumber) + * + * @param string $complexNumber the complex number for which you want the conjugate + * + * @return string + */ + public static function IMCONJUGATE($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->conjugate(); + } + + /** + * IMCOS. + * + * Returns the cosine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOS(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cosine + * + * @return float|string + */ + public static function IMCOS($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cos(); + } + + /** + * IMCOSH. + * + * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOSH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic cosine + * + * @return float|string + */ + public static function IMCOSH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cosh(); + } + + /** + * IMCOT. + * + * Returns the cotangent of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCOT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cotangent + * + * @return float|string + */ + public static function IMCOT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->cot(); + } + + /** + * IMCSC. + * + * Returns the cosecant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCSC(complexNumber) + * + * @param string $complexNumber the complex number for which you want the cosecant + * + * @return float|string + */ + public static function IMCSC($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->csc(); + } + + /** + * IMCSCH. + * + * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMCSCH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic cosecant + * + * @return float|string + */ + public static function IMCSCH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->csch(); + } + + /** + * IMSIN. + * + * Returns the sine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSIN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the sine + * + * @return float|string + */ + public static function IMSIN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sin(); + } + + /** + * IMSINH. + * + * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSINH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic sine + * + * @return float|string + */ + public static function IMSINH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sinh(); + } + + /** + * IMSEC. + * + * Returns the secant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSEC(complexNumber) + * + * @param string $complexNumber the complex number for which you want the secant + * + * @return float|string + */ + public static function IMSEC($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sec(); + } + + /** + * IMSECH. + * + * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSECH(complexNumber) + * + * @param string $complexNumber the complex number for which you want the hyperbolic secant + * + * @return float|string + */ + public static function IMSECH($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->sech(); + } + + /** + * IMTAN. + * + * Returns the tangent of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMTAN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the tangent + * + * @return float|string + */ + public static function IMTAN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->tan(); + } + + /** + * IMSQRT. + * + * Returns the square root of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMSQRT(complexNumber) + * + * @param string $complexNumber the complex number for which you want the square root + * + * @return string + */ + public static function IMSQRT($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $theta = self::IMARGUMENT($complexNumber); + if ($theta === Functions::DIV0()) { + return '0'; + } + + return (string) (new Complex($complexNumber))->sqrt(); + } + + /** + * IMLN. + * + * Returns the natural logarithm of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLN(complexNumber) + * + * @param string $complexNumber the complex number for which you want the natural logarithm + * + * @return string + */ + public static function IMLN($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->ln(); + } + + /** + * IMLOG10. + * + * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLOG10(complexNumber) + * + * @param string $complexNumber the complex number for which you want the common logarithm + * + * @return string + */ + public static function IMLOG10($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->log10(); + } + + /** + * IMLOG2. + * + * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMLOG2(complexNumber) + * + * @param string $complexNumber the complex number for which you want the base-2 logarithm + * + * @return string + */ + public static function IMLOG2($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + $complex = new Complex($complexNumber); + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return Functions::NAN(); + } + + return (string) (new Complex($complexNumber))->log2(); + } + + /** + * IMEXP. + * + * Returns the exponential of a complex number in x + yi or x + yj text format. + * + * Excel Function: + * IMEXP(complexNumber) + * + * @param string $complexNumber the complex number for which you want the exponential + * + * @return string + */ + public static function IMEXP($complexNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + + return (string) (new Complex($complexNumber))->exp(); + } + + /** + * IMPOWER. + * + * Returns a complex number in x + yi or x + yj text format raised to a power. + * + * Excel Function: + * IMPOWER(complexNumber,realNumber) + * + * @param string $complexNumber the complex number you want to raise to a power + * @param float $realNumber the power to which you want to raise the complex number + * + * @return string + */ + public static function IMPOWER($complexNumber, $realNumber) + { + $complexNumber = Functions::flattenSingleValue($complexNumber); + $realNumber = Functions::flattenSingleValue($realNumber); + + if (!is_numeric($realNumber)) { + return Functions::VALUE(); + } + + return (string) (new Complex($complexNumber))->pow($realNumber); + } + + /** + * IMDIV. + * + * Returns the quotient of two complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMDIV(complexDividend,complexDivisor) + * + * @param string $complexDividend the complex numerator or dividend + * @param string $complexDivisor the complex denominator or divisor + * + * @return string + */ + public static function IMDIV($complexDividend, $complexDivisor) + { + $complexDividend = Functions::flattenSingleValue($complexDividend); + $complexDivisor = Functions::flattenSingleValue($complexDivisor); + + try { + return (string) (new Complex($complexDividend))->divideby(new Complex($complexDivisor)); + } catch (ComplexException $e) { + return Functions::NAN(); + } + } + + /** + * IMSUB. + * + * Returns the difference of two complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMSUB(complexNumber1,complexNumber2) + * + * @param string $complexNumber1 the complex number from which to subtract complexNumber2 + * @param string $complexNumber2 the complex number to subtract from complexNumber1 + * + * @return string + */ + public static function IMSUB($complexNumber1, $complexNumber2) + { + $complexNumber1 = Functions::flattenSingleValue($complexNumber1); + $complexNumber2 = Functions::flattenSingleValue($complexNumber2); + + try { + return (string) (new Complex($complexNumber1))->subtract(new Complex($complexNumber2)); + } catch (ComplexException $e) { + return Functions::NAN(); + } + } + + /** + * IMSUM. + * + * Returns the sum of two or more complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMSUM(complexNumber[,complexNumber[,...]]) + * + * @param string ...$complexNumbers Series of complex numbers to add + * + * @return string + */ + public static function IMSUM(...$complexNumbers) + { + // Return value + $returnValue = new Complex(0.0); + $aArgs = Functions::flattenArray($complexNumbers); + + try { + // Loop through the arguments + foreach ($aArgs as $complex) { + $returnValue = $returnValue->add(new Complex($complex)); + } + } catch (ComplexException $e) { + return Functions::NAN(); + } + + return (string) $returnValue; + } + + /** + * IMPRODUCT. + * + * Returns the product of two or more complex numbers in x + yi or x + yj text format. + * + * Excel Function: + * IMPRODUCT(complexNumber[,complexNumber[,...]]) + * + * @param string ...$complexNumbers Series of complex numbers to multiply + * + * @return string + */ + public static function IMPRODUCT(...$complexNumbers) + { + // Return value + $returnValue = new Complex(1.0); + $aArgs = Functions::flattenArray($complexNumbers); + + try { + // Loop through the arguments + foreach ($aArgs as $complex) { + $returnValue = $returnValue->multiply(new Complex($complex)); + } + } catch (ComplexException $e) { + return Functions::NAN(); + } + + return (string) $returnValue; + } + + /** + * DELTA. + * + * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. + * Use this function to filter a set of values. For example, by summing several DELTA + * functions you calculate the count of equal pairs. This function is also known as the + * Kronecker Delta function. + * + * Excel Function: + * DELTA(a[,b]) + * + * @param float $a the first number + * @param float $b The second number. If omitted, b is assumed to be zero. + * + * @return int + */ + public static function DELTA($a, $b = 0) + { + $a = Functions::flattenSingleValue($a); + $b = Functions::flattenSingleValue($b); + + return (int) ($a == $b); + } + + /** + * GESTEP. + * + * Excel Function: + * GESTEP(number[,step]) + * + * Returns 1 if number >= step; returns 0 (zero) otherwise + * Use this function to filter a set of values. For example, by summing several GESTEP + * functions you calculate the count of values that exceed a threshold. + * + * @param float $number the value to test against step + * @param float $step The threshold value. + * If you omit a value for step, GESTEP uses zero. + * + * @return int + */ + public static function GESTEP($number, $step = 0) + { + $number = Functions::flattenSingleValue($number); + $step = Functions::flattenSingleValue($step); + + return (int) ($number >= $step); + } + + // + // Private method to calculate the erf value + // + private static $twoSqrtPi = 1.128379167095512574; + + public static function erfVal($x) + { + if (abs($x) > 2.2) { + return 1 - self::erfcVal($x); + } + $sum = $term = $x; + $xsqr = ($x * $x); + $j = 1; + do { + $term *= $xsqr / $j; + $sum -= $term / (2 * $j + 1); + ++$j; + $term *= $xsqr / $j; + $sum += $term / (2 * $j + 1); + ++$j; + if ($sum == 0.0) { + break; + } + } while (abs($term / $sum) > Functions::PRECISION); + + return self::$twoSqrtPi * $sum; + } + + /** + * Validate arguments passed to the bitwise functions. + * + * @param mixed $value + * + * @throws Exception + * + * @return int + */ + private static function validateBitwiseArgument($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_int($value)) { + return $value; + } elseif (is_numeric($value)) { + if ($value == (int) ($value)) { + $value = (int) ($value); + if (($value > pow(2, 48) - 1) || ($value < 0)) { + throw new Exception(Functions::NAN()); + } + + return $value; + } + + throw new Exception(Functions::NAN()); + } + + throw new Exception(Functions::VALUE()); + } + + /** + * BITAND. + * + * Returns the bitwise AND of two integer values. + * + * Excel Function: + * BITAND(number1, number2) + * + * @category Engineering Functions + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITAND($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 & $number2; + } + + /** + * BITOR. + * + * Returns the bitwise OR of two integer values. + * + * Excel Function: + * BITOR(number1, number2) + * + * @category Engineering Functions + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITOR($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 | $number2; + } + + /** + * BITXOR. + * + * Returns the bitwise XOR of two integer values. + * + * Excel Function: + * BITXOR(number1, number2) + * + * @category Engineering Functions + * + * @param int $number1 + * @param int $number2 + * + * @return int|string + */ + public static function BITXOR($number1, $number2) + { + try { + $number1 = self::validateBitwiseArgument($number1); + $number2 = self::validateBitwiseArgument($number2); + } catch (Exception $e) { + return $e->getMessage(); + } + + return $number1 ^ $number2; + } + + /** + * BITLSHIFT. + * + * Returns the number value shifted left by shift_amount bits. + * + * Excel Function: + * BITLSHIFT(number, shift_amount) + * + * @category Engineering Functions + * + * @param int $number + * @param int $shiftAmount + * + * @return int|string + */ + public static function BITLSHIFT($number, $shiftAmount) + { + try { + $number = self::validateBitwiseArgument($number); + } catch (Exception $e) { + return $e->getMessage(); + } + + $shiftAmount = Functions::flattenSingleValue($shiftAmount); + + $result = $number << $shiftAmount; + if ($result > pow(2, 48) - 1) { + return Functions::NAN(); + } + + return $result; + } + + /** + * BITRSHIFT. + * + * Returns the number value shifted right by shift_amount bits. + * + * Excel Function: + * BITRSHIFT(number, shift_amount) + * + * @category Engineering Functions + * + * @param int $number + * @param int $shiftAmount + * + * @return int|string + */ + public static function BITRSHIFT($number, $shiftAmount) + { + try { + $number = self::validateBitwiseArgument($number); + } catch (Exception $e) { + return $e->getMessage(); + } + + $shiftAmount = Functions::flattenSingleValue($shiftAmount); + + return $number >> $shiftAmount; + } + + /** + * ERF. + * + * Returns the error function integrated between the lower and upper bound arguments. + * + * Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments, + * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was + * improved, so that it can now calculate the function for both positive and negative ranges. + * PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments. + * + * Excel Function: + * ERF(lower[,upper]) + * + * @param float $lower lower bound for integrating ERF + * @param float $upper upper bound for integrating ERF. + * If omitted, ERF integrates between zero and lower_limit + * + * @return float|string + */ + public static function ERF($lower, $upper = null) + { + $lower = Functions::flattenSingleValue($lower); + $upper = Functions::flattenSingleValue($upper); + + if (is_numeric($lower)) { + if ($upper === null) { + return self::erfVal($lower); + } + if (is_numeric($upper)) { + return self::erfVal($upper) - self::erfVal($lower); + } + } + + return Functions::VALUE(); + } + + /** + * ERFPRECISE. + * + * Returns the error function integrated between the lower and upper bound arguments. + * + * Excel Function: + * ERF.PRECISE(limit) + * + * @param float $limit bound for integrating ERF + * + * @return float|string + */ + public static function ERFPRECISE($limit) + { + $limit = Functions::flattenSingleValue($limit); + + return self::ERF($limit); + } + + // + // Private method to calculate the erfc value + // + private static $oneSqrtPi = 0.564189583547756287; + + private static function erfcVal($x) + { + if (abs($x) < 2.2) { + return 1 - self::erfVal($x); + } + if ($x < 0) { + return 2 - self::ERFC(-$x); + } + $a = $n = 1; + $b = $c = $x; + $d = ($x * $x) + 0.5; + $q1 = $q2 = $b / $d; + $t = 0; + do { + $t = $a * $n + $b * $x; + $a = $b; + $b = $t; + $t = $c * $n + $d * $x; + $c = $d; + $d = $t; + $n += 0.5; + $q1 = $q2; + $q2 = $b / $d; + } while ((abs($q1 - $q2) / $q2) > Functions::PRECISION); + + return self::$oneSqrtPi * exp(-$x * $x) * $q2; + } + + /** + * ERFC. + * + * Returns the complementary ERF function integrated between x and infinity + * + * Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument, + * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was + * improved, so that it can now calculate the function for both positive and negative x values. + * PhpSpreadsheet follows Excel 2010 behaviour, and accepts nagative arguments. + * + * Excel Function: + * ERFC(x) + * + * @param float $x The lower bound for integrating ERFC + * + * @return float|string + */ + public static function ERFC($x) + { + $x = Functions::flattenSingleValue($x); + + if (is_numeric($x)) { + return self::erfcVal($x); + } + + return Functions::VALUE(); + } + + /** + * getConversionGroups + * Returns a list of the different conversion groups for UOM conversions. + * + * @return array + */ + public static function getConversionGroups() + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit) { + $conversionGroups[] = $conversionUnit['Group']; + } + + return array_merge(array_unique($conversionGroups)); + } + + /** + * getConversionGroupUnits + * Returns an array of units of measure, for a specified conversion group, or for all groups. + * + * @param string $group The group whose units of measure you want to retrieve + * + * @return array + */ + public static function getConversionGroupUnits($group = null) + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { + if (($group === null) || ($conversionGroup['Group'] == $group)) { + $conversionGroups[$conversionGroup['Group']][] = $conversionUnit; + } + } + + return $conversionGroups; + } + + /** + * getConversionGroupUnitDetails. + * + * @param string $group The group whose units of measure you want to retrieve + * + * @return array + */ + public static function getConversionGroupUnitDetails($group = null) + { + $conversionGroups = []; + foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { + if (($group === null) || ($conversionGroup['Group'] == $group)) { + $conversionGroups[$conversionGroup['Group']][] = [ + 'unit' => $conversionUnit, + 'description' => $conversionGroup['Unit Name'], + ]; + } + } + + return $conversionGroups; + } + + /** + * getConversionMultipliers + * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM(). + * + * @return array of mixed + */ + public static function getConversionMultipliers() + { + return self::$conversionMultipliers; + } + + /** + * CONVERTUOM. + * + * Converts a number from one measurement system to another. + * For example, CONVERT can translate a table of distances in miles to a table of distances + * in kilometers. + * + * Excel Function: + * CONVERT(value,fromUOM,toUOM) + * + * @param float $value the value in fromUOM to convert + * @param string $fromUOM the units for value + * @param string $toUOM the units for the result + * + * @return float + */ + public static function CONVERTUOM($value, $fromUOM, $toUOM) + { + $value = Functions::flattenSingleValue($value); + $fromUOM = Functions::flattenSingleValue($fromUOM); + $toUOM = Functions::flattenSingleValue($toUOM); + + if (!is_numeric($value)) { + return Functions::VALUE(); + } + $fromMultiplier = 1.0; + if (isset(self::$conversionUnits[$fromUOM])) { + $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; + } else { + $fromMultiplier = substr($fromUOM, 0, 1); + $fromUOM = substr($fromUOM, 1); + if (isset(self::$conversionMultipliers[$fromMultiplier])) { + $fromMultiplier = self::$conversionMultipliers[$fromMultiplier]['multiplier']; + } else { + return Functions::NA(); + } + if ((isset(self::$conversionUnits[$fromUOM])) && (self::$conversionUnits[$fromUOM]['AllowPrefix'])) { + $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; + } else { + return Functions::NA(); + } + } + $value *= $fromMultiplier; + + $toMultiplier = 1.0; + if (isset(self::$conversionUnits[$toUOM])) { + $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; + } else { + $toMultiplier = substr($toUOM, 0, 1); + $toUOM = substr($toUOM, 1); + if (isset(self::$conversionMultipliers[$toMultiplier])) { + $toMultiplier = self::$conversionMultipliers[$toMultiplier]['multiplier']; + } else { + return Functions::NA(); + } + if ((isset(self::$conversionUnits[$toUOM])) && (self::$conversionUnits[$toUOM]['AllowPrefix'])) { + $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; + } else { + return Functions::NA(); + } + } + if ($unitGroup1 != $unitGroup2) { + return Functions::NA(); + } + + if (($fromUOM == $toUOM) && ($fromMultiplier == $toMultiplier)) { + // We've already factored $fromMultiplier into the value, so we need + // to reverse it again + return $value / $fromMultiplier; + } elseif ($unitGroup1 == 'Temperature') { + if (($fromUOM == 'F') || ($fromUOM == 'fah')) { + if (($toUOM == 'F') || ($toUOM == 'fah')) { + return $value; + } + $value = (($value - 32) / 1.8); + if (($toUOM == 'K') || ($toUOM == 'kel')) { + $value += 273.15; + } + + return $value; + } elseif ((($fromUOM == 'K') || ($fromUOM == 'kel')) && + (($toUOM == 'K') || ($toUOM == 'kel')) + ) { + return $value; + } elseif ((($fromUOM == 'C') || ($fromUOM == 'cel')) && + (($toUOM == 'C') || ($toUOM == 'cel')) + ) { + return $value; + } + if (($toUOM == 'F') || ($toUOM == 'fah')) { + if (($fromUOM == 'K') || ($fromUOM == 'kel')) { + $value -= 273.15; + } + + return ($value * 1.8) + 32; + } + if (($toUOM == 'C') || ($toUOM == 'cel')) { + return $value - 273.15; + } + + return $value + 273.15; + } + + return ($value * self::$unitConversions[$unitGroup1][$fromUOM][$toUOM]) / $toMultiplier; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php new file mode 100755 index 0000000..fccf0af --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Exception.php @@ -0,0 +1,26 @@ +line = $line; + $e->file = $file; + + throw $e; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php new file mode 100755 index 0000000..41e51d4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/ExceptionHandler.php @@ -0,0 +1,22 @@ +format('d') == $testDate->format('t'); + } + + private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next) + { + $months = 12 / $frequency; + + $result = Date::excelToDateTimeObject($maturity); + $eom = self::isLastDayOfMonth($result); + + while ($settlement < Date::PHPToExcel($result)) { + $result->modify('-' . $months . ' months'); + } + if ($next) { + $result->modify('+' . $months . ' months'); + } + + if ($eom) { + $result->modify('-1 day'); + } + + return Date::PHPToExcel($result); + } + + private static function isValidFrequency($frequency) + { + if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) { + return true; + } + if ((Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) && + (($frequency == 6) || ($frequency == 12))) { + return true; + } + + return false; + } + + /** + * daysPerYear. + * + * Returns the number of days in a specified year, as defined by the "basis" value + * + * @param int|string $year The year against which we're testing + * @param int|string $basis The type of day count: + * 0 or omitted US (NASD) 360 + * 1 Actual (365 or 366 in a leap year) + * 2 360 + * 3 365 + * 4 European 360 + * + * @return int + */ + private static function daysPerYear($year, $basis = 0) + { + switch ($basis) { + case 0: + case 2: + case 4: + $daysPerYear = 360; + + break; + case 3: + $daysPerYear = 365; + + break; + case 1: + $daysPerYear = (DateTime::isLeapYear($year)) ? 366 : 365; + + break; + default: + return Functions::NAN(); + } + + return $daysPerYear; + } + + private static function interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) + { + $pmt = self::PMT($rate, $nper, $pv, $fv, $type); + $capital = $pv; + for ($i = 1; $i <= $per; ++$i) { + $interest = ($type && $i == 1) ? 0 : -$capital * $rate; + $principal = $pmt - $interest; + $capital += $principal; + } + + return [$interest, $principal]; + } + + /** + * ACCRINT. + * + * Returns the accrued interest for a security that pays periodic interest. + * + * Excel Function: + * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $issue the security's issue date + * @param mixed $firstinterest the security's first interest date + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date + * when the security is traded to the buyer. + * @param float $rate the security's annual coupon rate + * @param float $par The security's par value. + * If you omit par, ACCRINT uses $1,000. + * @param int $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0) + { + $issue = Functions::flattenSingleValue($issue); + $firstinterest = Functions::flattenSingleValue($firstinterest); + $settlement = Functions::flattenSingleValue($settlement); + $rate = Functions::flattenSingleValue($rate); + $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par); + $frequency = ($frequency === null) ? 1 : Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($rate)) && (is_numeric($par))) { + $rate = (float) $rate; + $par = (float) $par; + if (($rate <= 0) || ($par <= 0)) { + return Functions::NAN(); + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + + return $par * $rate * $daysBetweenIssueAndSettlement; + } + + return Functions::VALUE(); + } + + /** + * ACCRINTM. + * + * Returns the accrued interest for a security that pays interest at maturity. + * + * Excel Function: + * ACCRINTM(issue,settlement,rate[,par[,basis]]) + * + * @category Financial Functions + * + * @param mixed $issue The security's issue date + * @param mixed $settlement The security's settlement (or maturity) date + * @param float $rate The security's annual coupon rate + * @param float $par The security's par value. + * If you omit par, ACCRINT uses $1,000. + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0) + { + $issue = Functions::flattenSingleValue($issue); + $settlement = Functions::flattenSingleValue($settlement); + $rate = Functions::flattenSingleValue($rate); + $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par); + $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($rate)) && (is_numeric($par))) { + $rate = (float) $rate; + $par = (float) $par; + if (($rate <= 0) || ($par <= 0)) { + return Functions::NAN(); + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + + return $par * $rate * $daysBetweenIssueAndSettlement; + } + + return Functions::VALUE(); + } + + /** + * AMORDEGRC. + * + * Returns the depreciation for each accounting period. + * This function is provided for the French accounting system. If an asset is purchased in + * the middle of the accounting period, the prorated depreciation is taken into account. + * The function is similar to AMORLINC, except that a depreciation coefficient is applied in + * the calculation depending on the life of the assets. + * This function will return the depreciation until the last period of the life of the assets + * or until the cumulated value of depreciation is greater than the cost of the assets minus + * the salvage value. + * + * Excel Function: + * AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) + * + * @category Financial Functions + * + * @param float $cost The cost of the asset + * @param mixed $purchased Date of the purchase of the asset + * @param mixed $firstPeriod Date of the end of the first period + * @param mixed $salvage The salvage value at the end of the life of the asset + * @param float $period The period + * @param float $rate Rate of depreciation + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) + { + $cost = Functions::flattenSingleValue($cost); + $purchased = Functions::flattenSingleValue($purchased); + $firstPeriod = Functions::flattenSingleValue($firstPeriod); + $salvage = Functions::flattenSingleValue($salvage); + $period = floor(Functions::flattenSingleValue($period)); + $rate = Functions::flattenSingleValue($rate); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + // The depreciation coefficients are: + // Life of assets (1/rate) Depreciation coefficient + // Less than 3 years 1 + // Between 3 and 4 years 1.5 + // Between 5 and 6 years 2 + // More than 6 years 2.5 + $fUsePer = 1.0 / $rate; + if ($fUsePer < 3.0) { + $amortiseCoeff = 1.0; + } elseif ($fUsePer < 5.0) { + $amortiseCoeff = 1.5; + } elseif ($fUsePer <= 6.0) { + $amortiseCoeff = 2.0; + } else { + $amortiseCoeff = 2.5; + } + + $rate *= $amortiseCoeff; + $fNRate = round(DateTime::YEARFRAC($purchased, $firstPeriod, $basis) * $rate * $cost, 0); + $cost -= $fNRate; + $fRest = $cost - $salvage; + + for ($n = 0; $n < $period; ++$n) { + $fNRate = round($rate * $cost, 0); + $fRest -= $fNRate; + + if ($fRest < 0.0) { + switch ($period - $n) { + case 0: + case 1: + return round($cost * 0.5, 0); + default: + return 0.0; + } + } + $cost -= $fNRate; + } + + return $fNRate; + } + + /** + * AMORLINC. + * + * Returns the depreciation for each accounting period. + * This function is provided for the French accounting system. If an asset is purchased in + * the middle of the accounting period, the prorated depreciation is taken into account. + * + * Excel Function: + * AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) + * + * @category Financial Functions + * + * @param float $cost The cost of the asset + * @param mixed $purchased Date of the purchase of the asset + * @param mixed $firstPeriod Date of the end of the first period + * @param mixed $salvage The salvage value at the end of the life of the asset + * @param float $period The period + * @param float $rate Rate of depreciation + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) + { + $cost = Functions::flattenSingleValue($cost); + $purchased = Functions::flattenSingleValue($purchased); + $firstPeriod = Functions::flattenSingleValue($firstPeriod); + $salvage = Functions::flattenSingleValue($salvage); + $period = Functions::flattenSingleValue($period); + $rate = Functions::flattenSingleValue($rate); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + $fOneRate = $cost * $rate; + $fCostDelta = $cost - $salvage; + // Note, quirky variation for leap years on the YEARFRAC for this function + $purchasedYear = DateTime::YEAR($purchased); + $yearFrac = DateTime::YEARFRAC($purchased, $firstPeriod, $basis); + + if (($basis == 1) && ($yearFrac < 1) && (DateTime::isLeapYear($purchasedYear))) { + $yearFrac *= 365 / 366; + } + + $f0Rate = $yearFrac * $rate * $cost; + $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate); + + if ($period == 0) { + return $f0Rate; + } elseif ($period <= $nNumOfFullPeriods) { + return $fOneRate; + } elseif ($period == ($nNumOfFullPeriods + 1)) { + return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate; + } + + return 0.0; + } + + /** + * COUPDAYBS. + * + * Returns the number of days from the beginning of the coupon period to the settlement date. + * + * Excel Function: + * COUPDAYBS(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + + return DateTime::YEARFRAC($prev, $settlement, $basis) * $daysPerYear; + } + + /** + * COUPDAYS. + * + * Returns the number of days in the coupon period that contains the settlement date. + * + * Excel Function: + * COUPDAYS(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + switch ($basis) { + case 3: + // Actual/365 + return 365 / $frequency; + case 1: + // Actual/actual + if ($frequency == 1) { + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + + return $daysPerYear / $frequency; + } + $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + + return $next - $prev; + default: + // US (NASD) 30/360, Actual/360 or European 30/360 + return 360 / $frequency; + } + } + + /** + * COUPDAYSNC. + * + * Returns the number of days from the settlement date to the next coupon date. + * + * Excel Function: + * COUPDAYSNC(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + + return DateTime::YEARFRAC($settlement, $next, $basis) * $daysPerYear; + } + + /** + * COUPNCD. + * + * Returns the next coupon date after the settlement date. + * + * Excel Function: + * COUPNCD(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + } + + /** + * COUPNUM. + * + * Returns the number of coupons payable between the settlement date and maturity date, + * rounded up to the nearest whole coupon. + * + * Excel Function: + * COUPNUM(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return int|string + */ + public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $settlement = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis) * 365; + + switch ($frequency) { + case 1: // annual payments + return ceil($daysBetweenSettlementAndMaturity / 360); + case 2: // half-yearly + return ceil($daysBetweenSettlementAndMaturity / 180); + case 4: // quarterly + return ceil($daysBetweenSettlementAndMaturity / 90); + case 6: // bimonthly + return ceil($daysBetweenSettlementAndMaturity / 60); + case 12: // monthly + return ceil($daysBetweenSettlementAndMaturity / 30); + } + + return Functions::VALUE(); + } + + /** + * COUPPCD. + * + * Returns the previous coupon date before the settlement date. + * + * Excel Function: + * COUPPCD(settlement,maturity,frequency[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $frequency the number of coupon payments per year. + * Valid frequency values are: + * 1 Annual + * 2 Semi-Annual + * 4 Quarterly + * If working in Gnumeric Mode, the following frequency options are + * also available + * 6 Bimonthly + * 12 Monthly + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, + * depending on the value of the ReturnDateType flag + */ + public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + return self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); + } + + /** + * CUMIPMT. + * + * Returns the cumulative interest paid on a loan between the start and end periods. + * + * Excel Function: + * CUMIPMT(rate,nper,pv,start,end[,type]) + * + * @category Financial Functions + * + * @param float $rate The Interest rate + * @param int $nper The total number of payment periods + * @param float $pv Present Value + * @param int $start The first period in the calculation. + * Payment periods are numbered beginning with 1. + * @param int $end the last period in the calculation + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $start = (int) Functions::flattenSingleValue($start); + $end = (int) Functions::flattenSingleValue($end); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($start < 1 || $start > $end) { + return Functions::VALUE(); + } + + // Calculate + $interest = 0; + for ($per = $start; $per <= $end; ++$per) { + $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type); + } + + return $interest; + } + + /** + * CUMPRINC. + * + * Returns the cumulative principal paid on a loan between the start and end periods. + * + * Excel Function: + * CUMPRINC(rate,nper,pv,start,end[,type]) + * + * @category Financial Functions + * + * @param float $rate The Interest rate + * @param int $nper The total number of payment periods + * @param float $pv Present Value + * @param int $start The first period in the calculation. + * Payment periods are numbered beginning with 1. + * @param int $end the last period in the calculation + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $start = (int) Functions::flattenSingleValue($start); + $end = (int) Functions::flattenSingleValue($end); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($start < 1 || $start > $end) { + return Functions::VALUE(); + } + + // Calculate + $principal = 0; + for ($per = $start; $per <= $end; ++$per) { + $principal += self::PPMT($rate, $per, $nper, $pv, 0, $type); + } + + return $principal; + } + + /** + * DB. + * + * Returns the depreciation of an asset for a specified period using the + * fixed-declining balance method. + * This form of depreciation is used if you want to get a higher depreciation value + * at the beginning of the depreciation (as opposed to linear depreciation). The + * depreciation value is reduced with every depreciation period by the depreciation + * already deducted from the initial cost. + * + * Excel Function: + * DB(cost,salvage,life,period[,month]) + * + * @category Financial Functions + * + * @param float $cost Initial cost of the asset + * @param float $salvage Value at the end of the depreciation. + * (Sometimes called the salvage value of the asset) + * @param int $life Number of periods over which the asset is depreciated. + * (Sometimes called the useful life of the asset) + * @param int $period The period for which you want to calculate the + * depreciation. Period must use the same units as life. + * @param int $month Number of months in the first year. If month is omitted, + * it defaults to 12. + * + * @return float|string + */ + public static function DB($cost, $salvage, $life, $period, $month = 12) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + $month = Functions::flattenSingleValue($month); + + // Validate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($month))) { + $cost = (float) $cost; + $salvage = (float) $salvage; + $life = (int) $life; + $period = (int) $period; + $month = (int) $month; + if ($cost == 0) { + return 0.0; + } elseif (($cost < 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($month < 1)) { + return Functions::NAN(); + } + // Set Fixed Depreciation Rate + $fixedDepreciationRate = 1 - pow(($salvage / $cost), (1 / $life)); + $fixedDepreciationRate = round($fixedDepreciationRate, 3); + + // Loop through each period calculating the depreciation + $previousDepreciation = 0; + for ($per = 1; $per <= $period; ++$per) { + if ($per == 1) { + $depreciation = $cost * $fixedDepreciationRate * $month / 12; + } elseif ($per == ($life + 1)) { + $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12; + } else { + $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate; + } + $previousDepreciation += $depreciation; + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $depreciation = round($depreciation, 2); + } + + return $depreciation; + } + + return Functions::VALUE(); + } + + /** + * DDB. + * + * Returns the depreciation of an asset for a specified period using the + * double-declining balance method or some other method you specify. + * + * Excel Function: + * DDB(cost,salvage,life,period[,factor]) + * + * @category Financial Functions + * + * @param float $cost Initial cost of the asset + * @param float $salvage Value at the end of the depreciation. + * (Sometimes called the salvage value of the asset) + * @param int $life Number of periods over which the asset is depreciated. + * (Sometimes called the useful life of the asset) + * @param int $period The period for which you want to calculate the + * depreciation. Period must use the same units as life. + * @param float $factor The rate at which the balance declines. + * If factor is omitted, it is assumed to be 2 (the + * double-declining balance method). + * + * @return float|string + */ + public static function DDB($cost, $salvage, $life, $period, $factor = 2.0) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + $factor = Functions::flattenSingleValue($factor); + + // Validate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($factor))) { + $cost = (float) $cost; + $salvage = (float) $salvage; + $life = (int) $life; + $period = (int) $period; + $factor = (float) $factor; + if (($cost <= 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($factor <= 0.0) || ($period > $life)) { + return Functions::NAN(); + } + // Set Fixed Depreciation Rate + $fixedDepreciationRate = 1 - pow(($salvage / $cost), (1 / $life)); + $fixedDepreciationRate = round($fixedDepreciationRate, 3); + + // Loop through each period calculating the depreciation + $previousDepreciation = 0; + for ($per = 1; $per <= $period; ++$per) { + $depreciation = min(($cost - $previousDepreciation) * ($factor / $life), ($cost - $salvage - $previousDepreciation)); + $previousDepreciation += $depreciation; + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + $depreciation = round($depreciation, 2); + } + + return $depreciation; + } + + return Functions::VALUE(); + } + + /** + * DISC. + * + * Returns the discount rate for a security. + * + * Excel Function: + * DISC(settlement,maturity,price,redemption[,basis]) + * + * @category Financial Functions + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue + * date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $price The security's price per $100 face value + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function DISC($settlement, $maturity, $price, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + $redemption = Functions::flattenSingleValue($redemption); + $basis = Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($price)) && (is_numeric($redemption)) && (is_numeric($basis))) { + $price = (float) $price; + $redemption = (float) $redemption; + $basis = (int) $basis; + if (($price <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity; + } + + return Functions::VALUE(); + } + + /** + * DOLLARDE. + * + * Converts a dollar price expressed as an integer part and a fraction + * part into a dollar price expressed as a decimal number. + * Fractional dollar numbers are sometimes used for security prices. + * + * Excel Function: + * DOLLARDE(fractional_dollar,fraction) + * + * @category Financial Functions + * + * @param float $fractional_dollar Fractional Dollar + * @param int $fraction Fraction + * + * @return float|string + */ + public static function DOLLARDE($fractional_dollar = null, $fraction = 0) + { + $fractional_dollar = Functions::flattenSingleValue($fractional_dollar); + $fraction = (int) Functions::flattenSingleValue($fraction); + + // Validate parameters + if ($fractional_dollar === null || $fraction < 0) { + return Functions::NAN(); + } + if ($fraction == 0) { + return Functions::DIV0(); + } + + $dollars = floor($fractional_dollar); + $cents = fmod($fractional_dollar, 1); + $cents /= $fraction; + $cents *= pow(10, ceil(log10($fraction))); + + return $dollars + $cents; + } + + /** + * DOLLARFR. + * + * Converts a dollar price expressed as a decimal number into a dollar price + * expressed as a fraction. + * Fractional dollar numbers are sometimes used for security prices. + * + * Excel Function: + * DOLLARFR(decimal_dollar,fraction) + * + * @category Financial Functions + * + * @param float $decimal_dollar Decimal Dollar + * @param int $fraction Fraction + * + * @return float|string + */ + public static function DOLLARFR($decimal_dollar = null, $fraction = 0) + { + $decimal_dollar = Functions::flattenSingleValue($decimal_dollar); + $fraction = (int) Functions::flattenSingleValue($fraction); + + // Validate parameters + if ($decimal_dollar === null || $fraction < 0) { + return Functions::NAN(); + } + if ($fraction == 0) { + return Functions::DIV0(); + } + + $dollars = floor($decimal_dollar); + $cents = fmod($decimal_dollar, 1); + $cents *= $fraction; + $cents *= pow(10, -ceil(log10($fraction))); + + return $dollars + $cents; + } + + /** + * EFFECT. + * + * Returns the effective interest rate given the nominal rate and the number of + * compounding payments per year. + * + * Excel Function: + * EFFECT(nominal_rate,npery) + * + * @category Financial Functions + * + * @param float $nominal_rate Nominal interest rate + * @param int $npery Number of compounding payments per year + * + * @return float|string + */ + public static function EFFECT($nominal_rate = 0, $npery = 0) + { + $nominal_rate = Functions::flattenSingleValue($nominal_rate); + $npery = (int) Functions::flattenSingleValue($npery); + + // Validate parameters + if ($nominal_rate <= 0 || $npery < 1) { + return Functions::NAN(); + } + + return pow((1 + $nominal_rate / $npery), $npery) - 1; + } + + /** + * FV. + * + * Returns the Future Value of a cash flow with constant payments and interest rate (annuities). + * + * Excel Function: + * FV(rate,nper,pmt[,pv[,type]]) + * + * @category Financial Functions + * + * @param float $rate The interest rate per period + * @param int $nper Total number of payment periods in an annuity + * @param float $pmt The payment made each period: it cannot change over the + * life of the annuity. Typically, pmt contains principal + * and interest but no other fees or taxes. + * @param float $pv present Value, or the lump-sum amount that a series of + * future payments is worth right now + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * + * @return float|string + */ + public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return -$pv * pow(1 + $rate, $nper) - $pmt * (1 + $rate * $type) * (pow(1 + $rate, $nper) - 1) / $rate; + } + + return -$pv - $pmt * $nper; + } + + /** + * FVSCHEDULE. + * + * Returns the future value of an initial principal after applying a series of compound interest rates. + * Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate. + * + * Excel Function: + * FVSCHEDULE(principal,schedule) + * + * @param float $principal the present value + * @param float[] $schedule an array of interest rates to apply + * + * @return float + */ + public static function FVSCHEDULE($principal, $schedule) + { + $principal = Functions::flattenSingleValue($principal); + $schedule = Functions::flattenArray($schedule); + + foreach ($schedule as $rate) { + $principal *= 1 + $rate; + } + + return $principal; + } + + /** + * INTRATE. + * + * Returns the interest rate for a fully invested security. + * + * Excel Function: + * INTRATE(settlement,maturity,investment,redemption[,basis]) + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $investment the amount invested in the security + * @param int $redemption the amount to be received at maturity + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float|string + */ + public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $investment = Functions::flattenSingleValue($investment); + $redemption = Functions::flattenSingleValue($redemption); + $basis = Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($investment)) && (is_numeric($redemption)) && (is_numeric($basis))) { + $investment = (float) $investment; + $redemption = (float) $redemption; + $basis = (int) $basis; + if (($investment <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * IPMT. + * + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * + * Excel Function: + * IPMT(rate,per,nper,pv[,fv][,type]) + * + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string + */ + public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $per = (int) Functions::flattenSingleValue($per); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($per <= 0 || $per > $nper) { + return Functions::VALUE(); + } + + // Calculate + $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); + + return $interestAndPrincipal[0]; + } + + /** + * IRR. + * + * Returns the internal rate of return for a series of cash flows represented by the numbers in values. + * These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur + * at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received + * for an investment consisting of payments (negative values) and income (positive values) that occur at regular + * periods. + * + * Excel Function: + * IRR(values[,guess]) + * + * @param float[] $values An array or a reference to cells that contain numbers for which you want + * to calculate the internal rate of return. + * Values must contain at least one positive value and one negative value to + * calculate the internal rate of return. + * @param float $guess A number that you guess is close to the result of IRR + * + * @return float|string + */ + public static function IRR($values, $guess = 0.1) + { + if (!is_array($values)) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $guess = Functions::flattenSingleValue($guess); + + // create an initial range, with a root somewhere between 0 and guess + $x1 = 0.0; + $x2 = $guess; + $f1 = self::NPV($x1, $values); + $f2 = self::NPV($x2, $values); + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + if (($f1 * $f2) < 0.0) { + break; + } + if (abs($f1) < abs($f2)) { + $f1 = self::NPV($x1 += 1.6 * ($x1 - $x2), $values); + } else { + $f2 = self::NPV($x2 += 1.6 * ($x2 - $x1), $values); + } + } + if (($f1 * $f2) > 0.0) { + return Functions::VALUE(); + } + + $f = self::NPV($x1, $values); + if ($f < 0.0) { + $rtb = $x1; + $dx = $x2 - $x1; + } else { + $rtb = $x2; + $dx = $x1 - $x2; + } + + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + $dx *= 0.5; + $x_mid = $rtb + $dx; + $f_mid = self::NPV($x_mid, $values); + if ($f_mid <= 0.0) { + $rtb = $x_mid; + } + if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) { + return $x_mid; + } + } + + return Functions::VALUE(); + } + + /** + * ISPMT. + * + * Returns the interest payment for an investment based on an interest rate and a constant payment schedule. + * + * Excel Function: + * =ISPMT(interest_rate, period, number_payments, PV) + * + * interest_rate is the interest rate for the investment + * + * period is the period to calculate the interest rate. It must be betweeen 1 and number_payments. + * + * number_payments is the number of payments for the annuity + * + * PV is the loan amount or present value of the payments + */ + public static function ISPMT(...$args) + { + // Return value + $returnValue = 0; + + // Get the parameters + $aArgs = Functions::flattenArray($args); + $interestRate = array_shift($aArgs); + $period = array_shift($aArgs); + $numberPeriods = array_shift($aArgs); + $principleRemaining = array_shift($aArgs); + + // Calculate + $principlePayment = ($principleRemaining * 1.0) / ($numberPeriods * 1.0); + for ($i = 0; $i <= $period; ++$i) { + $returnValue = $interestRate * $principleRemaining * -1; + $principleRemaining -= $principlePayment; + // principle needs to be 0 after the last payment, don't let floating point screw it up + if ($i == $numberPeriods) { + $returnValue = 0; + } + } + + return $returnValue; + } + + /** + * MIRR. + * + * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both + * the cost of the investment and the interest received on reinvestment of cash. + * + * Excel Function: + * MIRR(values,finance_rate, reinvestment_rate) + * + * @param float[] $values An array or a reference to cells that contain a series of payments and + * income occurring at regular intervals. + * Payments are negative value, income is positive values. + * @param float $finance_rate The interest rate you pay on the money used in the cash flows + * @param float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them + * + * @return float|string + */ + public static function MIRR($values, $finance_rate, $reinvestment_rate) + { + if (!is_array($values)) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $finance_rate = Functions::flattenSingleValue($finance_rate); + $reinvestment_rate = Functions::flattenSingleValue($reinvestment_rate); + $n = count($values); + + $rr = 1.0 + $reinvestment_rate; + $fr = 1.0 + $finance_rate; + + $npv_pos = $npv_neg = 0.0; + foreach ($values as $i => $v) { + if ($v >= 0) { + $npv_pos += $v / pow($rr, $i); + } else { + $npv_neg += $v / pow($fr, $i); + } + } + + if (($npv_neg == 0) || ($npv_pos == 0) || ($reinvestment_rate <= -1)) { + return Functions::VALUE(); + } + + $mirr = pow((-$npv_pos * pow($rr, $n)) + / ($npv_neg * ($rr)), (1.0 / ($n - 1))) - 1.0; + + return is_finite($mirr) ? $mirr : Functions::VALUE(); + } + + /** + * NOMINAL. + * + * Returns the nominal interest rate given the effective rate and the number of compounding payments per year. + * + * @param float $effect_rate Effective interest rate + * @param int $npery Number of compounding payments per year + * + * @return float|string + */ + public static function NOMINAL($effect_rate = 0, $npery = 0) + { + $effect_rate = Functions::flattenSingleValue($effect_rate); + $npery = (int) Functions::flattenSingleValue($npery); + + // Validate parameters + if ($effect_rate <= 0 || $npery < 1) { + return Functions::NAN(); + } + + // Calculate + return $npery * (pow($effect_rate + 1, 1 / $npery) - 1); + } + + /** + * NPER. + * + * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate. + * + * @param float $rate Interest rate per period + * @param int $pmt Periodic payment (annuity) + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float|string + */ + public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + if ($pmt == 0 && $pv == 0) { + return Functions::NAN(); + } + + return log(($pmt * (1 + $rate * $type) / $rate - $fv) / ($pv + $pmt * (1 + $rate * $type) / $rate)) / log(1 + $rate); + } + if ($pmt == 0) { + return Functions::NAN(); + } + + return (-$pv - $fv) / $pmt; + } + + /** + * NPV. + * + * Returns the Net Present Value of a cash flow series given a discount rate. + * + * @return float + */ + public static function NPV(...$args) + { + // Return value + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + // Calculate + $rate = array_shift($aArgs); + $countArgs = count($aArgs); + for ($i = 1; $i <= $countArgs; ++$i) { + // Is it a numeric value? + if (is_numeric($aArgs[$i - 1])) { + $returnValue += $aArgs[$i - 1] / pow(1 + $rate, $i); + } + } + + // Return + return $returnValue; + } + + /** + * PDURATION. + * + * Calculates the number of periods required for an investment to reach a specified value. + * + * @param float $rate Interest rate per period + * @param float $pv Present Value + * @param float $fv Future Value + * + * @return float|string + */ + public static function PDURATION($rate = 0, $pv = 0, $fv = 0) + { + $rate = Functions::flattenSingleValue($rate); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + + // Validate parameters + if (!is_numeric($rate) || !is_numeric($pv) || !is_numeric($fv)) { + return Functions::VALUE(); + } elseif ($rate <= 0.0 || $pv <= 0.0 || $fv <= 0.0) { + return Functions::NAN(); + } + + return (log($fv) - log($pv)) / log(1 + $rate); + } + + /** + * PMT. + * + * Returns the constant payment (annuity) for a cash flow with a constant interest rate. + * + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float + */ + public static function PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return (-$fv - $pv * pow(1 + $rate, $nper)) / (1 + $rate * $type) / ((pow(1 + $rate, $nper) - 1) / $rate); + } + + return (-$pv - $fv) / $nper; + } + + /** + * PPMT. + * + * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. + * + * @param float $rate Interest rate per period + * @param int $per Period for which we want to find the interest + * @param int $nper Number of periods + * @param float $pv Present Value + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float + */ + public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $per = (int) Functions::flattenSingleValue($per); + $nper = (int) Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + $type = (int) Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + if ($per <= 0 || $per > $nper) { + return Functions::VALUE(); + } + + // Calculate + $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); + + return $interestAndPrincipal[1]; + } + + public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $rate = (float) Functions::flattenSingleValue($rate); + $yield = (float) Functions::flattenSingleValue($yield); + $redemption = (float) Functions::flattenSingleValue($redemption); + $frequency = (int) Functions::flattenSingleValue($frequency); + $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis); + + if (is_string($settlement = DateTime::getDateValue($settlement))) { + return Functions::VALUE(); + } + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (($settlement > $maturity) || + (!self::isValidFrequency($frequency)) || + (($basis < 0) || ($basis > 4))) { + return Functions::NAN(); + } + + $dsc = self::COUPDAYSNC($settlement, $maturity, $frequency, $basis); + $e = self::COUPDAYS($settlement, $maturity, $frequency, $basis); + $n = self::COUPNUM($settlement, $maturity, $frequency, $basis); + $a = self::COUPDAYBS($settlement, $maturity, $frequency, $basis); + + $baseYF = 1.0 + ($yield / $frequency); + $rfp = 100 * ($rate / $frequency); + $de = $dsc / $e; + + $result = $redemption / pow($baseYF, (--$n + $de)); + for ($k = 0; $k <= $n; ++$k) { + $result += $rfp / (pow($baseYF, ($k + $de))); + } + $result -= $rfp * ($a / $e); + + return $result; + } + + /** + * PRICEDISC. + * + * Returns the price per $100 face value of a discounted security. + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $discount The security's discount rate + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = (float) Functions::flattenSingleValue($discount); + $redemption = (float) Functions::flattenSingleValue($redemption); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($discount)) && (is_numeric($redemption)) && (is_numeric($basis))) { + if (($discount <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * PRICEMAT. + * + * Returns the price per $100 face value of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $issue The security's issue date + * @param int $rate The security's interest rate at date of issue + * @param int $yield The security's annual yield + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $issue = Functions::flattenSingleValue($issue); + $rate = Functions::flattenSingleValue($rate); + $yield = Functions::flattenSingleValue($yield); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($rate) && is_numeric($yield)) { + if (($rate <= 0) || ($yield <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + $daysBetweenIssueAndSettlement *= $daysPerYear; + $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis); + if (!is_numeric($daysBetweenIssueAndMaturity)) { + // return date error + return $daysBetweenIssueAndMaturity; + } + $daysBetweenIssueAndMaturity *= $daysPerYear; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) / + (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) - + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100); + } + + return Functions::VALUE(); + } + + /** + * PV. + * + * Returns the Present Value of a cash flow with constant payments and interest rate (annuities). + * + * @param float $rate Interest rate per period + * @param int $nper Number of periods + * @param float $pmt Periodic payment (annuity) + * @param float $fv Future Value + * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period + * + * @return float + */ + public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0) + { + $rate = Functions::flattenSingleValue($rate); + $nper = Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $fv = Functions::flattenSingleValue($fv); + $type = Functions::flattenSingleValue($type); + + // Validate parameters + if ($type != 0 && $type != 1) { + return Functions::NAN(); + } + + // Calculate + if ($rate !== null && $rate != 0) { + return (-$pmt * (1 + $rate * $type) * ((pow(1 + $rate, $nper) - 1) / $rate) - $fv) / pow(1 + $rate, $nper); + } + + return -$fv - $pmt * $nper; + } + + /** + * RATE. + * + * Returns the interest rate per period of an annuity. + * RATE is calculated by iteration and can have zero or more solutions. + * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, + * RATE returns the #NUM! error value. + * + * Excel Function: + * RATE(nper,pmt,pv[,fv[,type[,guess]]]) + * + * @category Financial Functions + * + * @param float $nper The total number of payment periods in an annuity + * @param float $pmt The payment made each period and cannot change over the life + * of the annuity. + * Typically, pmt includes principal and interest but no other + * fees or taxes. + * @param float $pv The present value - the total amount that a series of future + * payments is worth now + * @param float $fv The future value, or a cash balance you want to attain after + * the last payment is made. If fv is omitted, it is assumed + * to be 0 (the future value of a loan, for example, is 0). + * @param int $type A number 0 or 1 and indicates when payments are due: + * 0 or omitted At the end of the period. + * 1 At the beginning of the period. + * @param float $guess Your guess for what the rate will be. + * If you omit guess, it is assumed to be 10 percent. + * + * @return float + */ + public static function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1) + { + $nper = (int) Functions::flattenSingleValue($nper); + $pmt = Functions::flattenSingleValue($pmt); + $pv = Functions::flattenSingleValue($pv); + $fv = ($fv === null) ? 0.0 : Functions::flattenSingleValue($fv); + $type = ($type === null) ? 0 : (int) Functions::flattenSingleValue($type); + $guess = ($guess === null) ? 0.1 : Functions::flattenSingleValue($guess); + + $rate = $guess; + if (abs($rate) < self::FINANCIAL_PRECISION) { + $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; + } else { + $f = exp($nper * log(1 + $rate)); + $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; + } + $y0 = $pv + $pmt * $nper + $fv; + $y1 = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; + + // find root by secant method + $i = $x0 = 0.0; + $x1 = $rate; + while ((abs($y0 - $y1) > self::FINANCIAL_PRECISION) && ($i < self::FINANCIAL_MAX_ITERATIONS)) { + $rate = ($y1 * $x0 - $y0 * $x1) / ($y1 - $y0); + $x0 = $x1; + $x1 = $rate; + if (($nper * abs($pmt)) > ($pv - $fv)) { + $x1 = abs($x1); + } + if (abs($rate) < self::FINANCIAL_PRECISION) { + $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; + } else { + $f = exp($nper * log(1 + $rate)); + $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; + } + + $y0 = $y1; + $y1 = $y; + ++$i; + } + + return $rate; + } + + /** + * RECEIVED. + * + * Returns the price per $100 face value of a discounted security. + * + * @param mixed $settlement The security's settlement date. + * The security settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $investment The amount invested in the security + * @param int $discount The security's discount rate + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $investment = (float) Functions::flattenSingleValue($investment); + $discount = (float) Functions::flattenSingleValue($discount); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if ((is_numeric($investment)) && (is_numeric($discount)) && (is_numeric($basis))) { + if (($investment <= 0) || ($discount <= 0)) { + return Functions::NAN(); + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + + return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity)); + } + + return Functions::VALUE(); + } + + /** + * RRI. + * + * Calculates the interest rate required for an investment to grow to a specified future value . + * + * @param float $nper The number of periods over which the investment is made + * @param float $pv Present Value + * @param float $fv Future Value + * + * @return float|string + */ + public static function RRI($nper = 0, $pv = 0, $fv = 0) + { + $nper = Functions::flattenSingleValue($nper); + $pv = Functions::flattenSingleValue($pv); + $fv = Functions::flattenSingleValue($fv); + + // Validate parameters + if (!is_numeric($nper) || !is_numeric($pv) || !is_numeric($fv)) { + return Functions::VALUE(); + } elseif ($nper <= 0.0 || $pv <= 0.0 || $fv < 0.0) { + return Functions::NAN(); + } + + return pow($fv / $pv, 1 / $nper) - 1; + } + + /** + * SLN. + * + * Returns the straight-line depreciation of an asset for one period + * + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated + * + * @return float|string + */ + public static function SLN($cost, $salvage, $life) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + + // Calculate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) { + if ($life < 0) { + return Functions::NAN(); + } + + return ($cost - $salvage) / $life; + } + + return Functions::VALUE(); + } + + /** + * SYD. + * + * Returns the sum-of-years' digits depreciation of an asset for a specified period. + * + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated + * @param mixed $period Period + * + * @return float|string + */ + public static function SYD($cost, $salvage, $life, $period) + { + $cost = Functions::flattenSingleValue($cost); + $salvage = Functions::flattenSingleValue($salvage); + $life = Functions::flattenSingleValue($life); + $period = Functions::flattenSingleValue($period); + + // Calculate + if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period))) { + if (($life < 1) || ($period > $life)) { + return Functions::NAN(); + } + + return (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1)); + } + + return Functions::VALUE(); + } + + /** + * TBILLEQ. + * + * Returns the bond-equivalent yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $discount The Treasury bill's discount rate + * + * @return float + */ + public static function TBILLEQ($settlement, $maturity, $discount) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = Functions::flattenSingleValue($discount); + + // Use TBILLPRICE for validation + $testValue = self::TBILLPRICE($settlement, $maturity, $discount); + if (is_string($testValue)) { + return $testValue; + } + + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity); + } + + /** + * TBILLPRICE. + * + * Returns the yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $discount The Treasury bill's discount rate + * + * @return float + */ + public static function TBILLPRICE($settlement, $maturity, $discount) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $discount = Functions::flattenSingleValue($discount); + + if (is_string($maturity = DateTime::getDateValue($maturity))) { + return Functions::VALUE(); + } + + // Validate + if (is_numeric($discount)) { + if ($discount <= 0) { + return Functions::NAN(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + if ($daysBetweenSettlementAndMaturity > 360) { + return Functions::NAN(); + } + + $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360)); + if ($price <= 0) { + return Functions::NAN(); + } + + return $price; + } + + return Functions::VALUE(); + } + + /** + * TBILLYIELD. + * + * Returns the yield for a Treasury bill. + * + * @param mixed $settlement The Treasury bill's settlement date. + * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + * @param mixed $maturity The Treasury bill's maturity date. + * The maturity date is the date when the Treasury bill expires. + * @param int $price The Treasury bill's price per $100 face value + * + * @return float + */ + public static function TBILLYIELD($settlement, $maturity, $price) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + + // Validate + if (is_numeric($price)) { + if ($price <= 0) { + return Functions::NAN(); + } + + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + ++$maturity; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360; + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + } else { + $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement)); + } + + if ($daysBetweenSettlementAndMaturity > 360) { + return Functions::NAN(); + } + + return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + public static function XIRR($values, $dates, $guess = 0.1) + { + if ((!is_array($values)) && (!is_array($dates))) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $dates = Functions::flattenArray($dates); + $guess = Functions::flattenSingleValue($guess); + if (count($values) != count($dates)) { + return Functions::NAN(); + } + + // create an initial range, with a root somewhere between 0 and guess + $x1 = 0.0; + $x2 = $guess; + $f1 = self::XNPV($x1, $values, $dates); + $f2 = self::XNPV($x2, $values, $dates); + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + if (($f1 * $f2) < 0.0) { + break; + } elseif (abs($f1) < abs($f2)) { + $f1 = self::XNPV($x1 += 1.6 * ($x1 - $x2), $values, $dates); + } else { + $f2 = self::XNPV($x2 += 1.6 * ($x2 - $x1), $values, $dates); + } + } + if (($f1 * $f2) > 0.0) { + return Functions::VALUE(); + } + + $f = self::XNPV($x1, $values, $dates); + if ($f < 0.0) { + $rtb = $x1; + $dx = $x2 - $x1; + } else { + $rtb = $x2; + $dx = $x1 - $x2; + } + + for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) { + $dx *= 0.5; + $x_mid = $rtb + $dx; + $f_mid = self::XNPV($x_mid, $values, $dates); + if ($f_mid <= 0.0) { + $rtb = $x_mid; + } + if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) { + return $x_mid; + } + } + + return Functions::VALUE(); + } + + /** + * XNPV. + * + * Returns the net present value for a schedule of cash flows that is not necessarily periodic. + * To calculate the net present value for a series of cash flows that is periodic, use the NPV function. + * + * Excel Function: + * =XNPV(rate,values,dates) + * + * @param float $rate the discount rate to apply to the cash flows + * @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. + * The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. + * If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. + * The series of values must contain at least one positive value and one negative value. + * @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. + * The first payment date indicates the beginning of the schedule of payments. + * All other dates must be later than this date, but they may occur in any order. + * + * @return float + */ + public static function XNPV($rate, $values, $dates) + { + $rate = Functions::flattenSingleValue($rate); + if (!is_numeric($rate)) { + return Functions::VALUE(); + } + if ((!is_array($values)) || (!is_array($dates))) { + return Functions::VALUE(); + } + $values = Functions::flattenArray($values); + $dates = Functions::flattenArray($dates); + $valCount = count($values); + if ($valCount != count($dates)) { + return Functions::NAN(); + } + if ((min($values) > 0) || (max($values) < 0)) { + return Functions::VALUE(); + } + + $xnpv = 0.0; + for ($i = 0; $i < $valCount; ++$i) { + if (!is_numeric($values[$i])) { + return Functions::VALUE(); + } + $xnpv += $values[$i] / pow(1 + $rate, DateTime::DATEDIF($dates[0], $dates[$i], 'd') / 365); + } + + return (is_finite($xnpv)) ? $xnpv : Functions::VALUE(); + } + + /** + * YIELDDISC. + * + * Returns the annual yield of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param int $price The security's price per $100 face value + * @param int $redemption The security's redemption value per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $price = Functions::flattenSingleValue($price); + $redemption = Functions::flattenSingleValue($redemption); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($price) && is_numeric($redemption)) { + if (($price <= 0) || ($redemption <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } + + /** + * YIELDMAT. + * + * Returns the annual yield of a security that pays interest at maturity. + * + * @param mixed $settlement The security's settlement date. + * The security's settlement date is the date after the issue date when the security is traded to the buyer. + * @param mixed $maturity The security's maturity date. + * The maturity date is the date when the security expires. + * @param mixed $issue The security's issue date + * @param int $rate The security's interest rate at date of issue + * @param int $price The security's price per $100 face value + * @param int $basis The type of day count to use. + * 0 or omitted US (NASD) 30/360 + * 1 Actual/actual + * 2 Actual/360 + * 3 Actual/365 + * 4 European 30/360 + * + * @return float + */ + public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0) + { + $settlement = Functions::flattenSingleValue($settlement); + $maturity = Functions::flattenSingleValue($maturity); + $issue = Functions::flattenSingleValue($issue); + $rate = Functions::flattenSingleValue($rate); + $price = Functions::flattenSingleValue($price); + $basis = (int) Functions::flattenSingleValue($basis); + + // Validate + if (is_numeric($rate) && is_numeric($price)) { + if (($rate <= 0) || ($price <= 0)) { + return Functions::NAN(); + } + $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis); + if (!is_numeric($daysPerYear)) { + return $daysPerYear; + } + $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis); + if (!is_numeric($daysBetweenIssueAndSettlement)) { + // return date error + return $daysBetweenIssueAndSettlement; + } + $daysBetweenIssueAndSettlement *= $daysPerYear; + $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis); + if (!is_numeric($daysBetweenIssueAndMaturity)) { + // return date error + return $daysBetweenIssueAndMaturity; + } + $daysBetweenIssueAndMaturity *= $daysPerYear; + $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis); + if (!is_numeric($daysBetweenSettlementAndMaturity)) { + // return date error + return $daysBetweenSettlementAndMaturity; + } + $daysBetweenSettlementAndMaturity *= $daysPerYear; + + return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) / + (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) * + ($daysPerYear / $daysBetweenSettlementAndMaturity); + } + + return Functions::VALUE(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php new file mode 100755 index 0000000..9b3c66e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php @@ -0,0 +1,623 @@ +<'; + const OPERATORS_POSTFIX = '%'; + + /** + * Formula. + * + * @var string + */ + private $formula; + + /** + * Tokens. + * + * @var FormulaToken[] + */ + private $tokens = []; + + /** + * Create a new FormulaParser. + * + * @param string $pFormula Formula to parse + * + * @throws Exception + */ + public function __construct($pFormula = '') + { + // Check parameters + if ($pFormula === null) { + throw new Exception('Invalid parameter passed: formula'); + } + + // Initialise values + $this->formula = trim($pFormula); + // Parse! + $this->parseToTokens(); + } + + /** + * Get Formula. + * + * @return string + */ + public function getFormula() + { + return $this->formula; + } + + /** + * Get Token. + * + * @param int $pId Token id + * + * @throws Exception + * + * @return string + */ + public function getToken($pId = 0) + { + if (isset($this->tokens[$pId])) { + return $this->tokens[$pId]; + } + + throw new Exception("Token with id $pId does not exist."); + } + + /** + * Get Token count. + * + * @return int + */ + public function getTokenCount() + { + return count($this->tokens); + } + + /** + * Get Tokens. + * + * @return FormulaToken[] + */ + public function getTokens() + { + return $this->tokens; + } + + /** + * Parse to tokens. + */ + private function parseToTokens() + { + // No attempt is made to verify formulas; assumes formulas are derived from Excel, where + // they can only exist if valid; stack overflows/underflows sunk as nulls without exceptions. + + // Check if the formula has a valid starting = + $formulaLength = strlen($this->formula); + if ($formulaLength < 2 || $this->formula[0] != '=') { + return; + } + + // Helper variables + $tokens1 = $tokens2 = $stack = []; + $inString = $inPath = $inRange = $inError = false; + $token = $previousToken = $nextToken = null; + + $index = 1; + $value = ''; + + $ERRORS = ['#NULL!', '#DIV/0!', '#VALUE!', '#REF!', '#NAME?', '#NUM!', '#N/A']; + $COMPARATORS_MULTI = ['>=', '<=', '<>']; + + while ($index < $formulaLength) { + // state-dependent character evaluation (order is important) + + // double-quoted strings + // embeds are doubled + // end marks token + if ($inString) { + if ($this->formula[$index] == self::QUOTE_DOUBLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_DOUBLE)) { + $value .= self::QUOTE_DOUBLE; + ++$index; + } else { + $inString = false; + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_TEXT); + $value = ''; + } + } else { + $value .= $this->formula[$index]; + } + ++$index; + + continue; + } + + // single-quoted strings (links) + // embeds are double + // end does not mark a token + if ($inPath) { + if ($this->formula[$index] == self::QUOTE_SINGLE) { + if ((($index + 2) <= $formulaLength) && ($this->formula[$index + 1] == self::QUOTE_SINGLE)) { + $value .= self::QUOTE_SINGLE; + ++$index; + } else { + $inPath = false; + } + } else { + $value .= $this->formula[$index]; + } + ++$index; + + continue; + } + + // bracked strings (R1C1 range index or linked workbook name) + // no embeds (changed to "()" by Excel) + // end does not mark a token + if ($inRange) { + if ($this->formula[$index] == self::BRACKET_CLOSE) { + $inRange = false; + } + $value .= $this->formula[$index]; + ++$index; + + continue; + } + + // error values + // end marks a token, determined from absolute list of values + if ($inError) { + $value .= $this->formula[$index]; + ++$index; + if (in_array($value, $ERRORS)) { + $inError = false; + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND, FormulaToken::TOKEN_SUBTYPE_ERROR); + $value = ''; + } + + continue; + } + + // scientific notation check + if (strpos(self::OPERATORS_SN, $this->formula[$index]) !== false) { + if (strlen($value) > 1) { + if (preg_match('/^[1-9]{1}(\\.\\d+)?E{1}$/', $this->formula[$index]) != 0) { + $value .= $this->formula[$index]; + ++$index; + + continue; + } + } + } + + // independent character evaluation (order not important) + + // establish state-dependent character evaluations + if ($this->formula[$index] == self::QUOTE_DOUBLE) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inString = true; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::QUOTE_SINGLE) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inPath = true; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::BRACKET_OPEN) { + $inRange = true; + $value .= self::BRACKET_OPEN; + ++$index; + + continue; + } + + if ($this->formula[$index] == self::ERROR_START) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + $inError = true; + $value .= self::ERROR_START; + ++$index; + + continue; + } + + // mark start and end of arrays and array rows + if ($this->formula[$index] == self::BRACE_OPEN) { + if (strlen($value) > 0) { + // unexpected + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_UNKNOWN); + $value = ''; + } + + $tmp = new FormulaToken('ARRAY', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + ++$index; + + continue; + } + + if ($this->formula[$index] == self::SEMICOLON) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + $tmp = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT); + $tokens1[] = $tmp; + + $tmp = new FormulaToken('ARRAYROW', FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + + ++$index; + + continue; + } + + if ($this->formula[$index] == self::BRACE_CLOSE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + ++$index; + + continue; + } + + // trim white-space + if ($this->formula[$index] == self::WHITESPACE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken('', FormulaToken::TOKEN_TYPE_WHITESPACE); + ++$index; + while (($this->formula[$index] == self::WHITESPACE) && ($index < $formulaLength)) { + ++$index; + } + + continue; + } + + // multi-character comparators + if (($index + 2) <= $formulaLength) { + if (in_array(substr($this->formula, $index, 2), $COMPARATORS_MULTI)) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken(substr($this->formula, $index, 2), FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_LOGICAL); + $index += 2; + + continue; + } + } + + // standard infix operators + if (strpos(self::OPERATORS_INFIX, $this->formula[$index]) !== false) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORINFIX); + ++$index; + + continue; + } + + // standard postfix operators (only one) + if (strpos(self::OPERATORS_POSTFIX, $this->formula[$index]) !== false) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + $tokens1[] = new FormulaToken($this->formula[$index], FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); + ++$index; + + continue; + } + + // start subexpression or function + if ($this->formula[$index] == self::PAREN_OPEN) { + if (strlen($value) > 0) { + $tmp = new FormulaToken($value, FormulaToken::TOKEN_TYPE_FUNCTION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + $value = ''; + } else { + $tmp = new FormulaToken('', FormulaToken::TOKEN_TYPE_SUBEXPRESSION, FormulaToken::TOKEN_SUBTYPE_START); + $tokens1[] = $tmp; + $stack[] = clone $tmp; + } + ++$index; + + continue; + } + + // function, subexpression, or array parameters, or operand unions + if ($this->formula[$index] == self::COMMA) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $stack[] = $tmp; + + if ($tmp->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) { + $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_UNION); + } else { + $tokens1[] = new FormulaToken(',', FormulaToken::TOKEN_TYPE_ARGUMENT); + } + ++$index; + + continue; + } + + // stop subexpression + if ($this->formula[$index] == self::PAREN_CLOSE) { + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + $value = ''; + } + + $tmp = array_pop($stack); + $tmp->setValue(''); + $tmp->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_STOP); + $tokens1[] = $tmp; + + ++$index; + + continue; + } + + // token accumulation + $value .= $this->formula[$index]; + ++$index; + } + + // dump remaining accumulation + if (strlen($value) > 0) { + $tokens1[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERAND); + } + + // move tokenList to new set, excluding unnecessary white-space tokens and converting necessary ones to intersections + $tokenCount = count($tokens1); + for ($i = 0; $i < $tokenCount; ++$i) { + $token = $tokens1[$i]; + if (isset($tokens1[$i - 1])) { + $previousToken = $tokens1[$i - 1]; + } else { + $previousToken = null; + } + if (isset($tokens1[$i + 1])) { + $nextToken = $tokens1[$i + 1]; + } else { + $nextToken = null; + } + + if ($token === null) { + continue; + } + + if ($token->getTokenType() != FormulaToken::TOKEN_TYPE_WHITESPACE) { + $tokens2[] = $token; + + continue; + } + + if ($previousToken === null) { + continue; + } + + if (!( + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND) + )) { + continue; + } + + if ($nextToken === null) { + continue; + } + + if (!( + (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) || + (($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($nextToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_START)) || + ($nextToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND) + )) { + continue; + } + + $tokens2[] = new FormulaToken($value, FormulaToken::TOKEN_TYPE_OPERATORINFIX, FormulaToken::TOKEN_SUBTYPE_INTERSECTION); + } + + // move tokens to final list, switching infix "-" operators to prefix when appropriate, switching infix "+" operators + // to noop when appropriate, identifying operand and infix-operator subtypes, and pulling "@" from function names + $this->tokens = []; + + $tokenCount = count($tokens2); + for ($i = 0; $i < $tokenCount; ++$i) { + $token = $tokens2[$i]; + if (isset($tokens2[$i - 1])) { + $previousToken = $tokens2[$i - 1]; + } else { + $previousToken = null; + } + if (isset($tokens2[$i + 1])) { + $nextToken = $tokens2[$i + 1]; + } else { + $nextToken = null; + } + + if ($token === null) { + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '-') { + if ($i == 0) { + $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX); + } elseif ((($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } else { + $token->setTokenType(FormulaToken::TOKEN_TYPE_OPERATORPREFIX); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == '+') { + if ($i == 0) { + continue; + } elseif ((($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + (($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && + ($previousToken->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_STOP)) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || + ($previousToken->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND)) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } else { + continue; + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERATORINFIX && + $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING) { + if (strpos('<>=', substr($token->getValue(), 0, 1)) !== false) { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL); + } elseif ($token->getValue() == '&') { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_CONCATENATION); + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_MATH); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_OPERAND && + $token->getTokenSubType() == FormulaToken::TOKEN_SUBTYPE_NOTHING) { + if (!is_numeric($token->getValue())) { + if (strtoupper($token->getValue()) == 'TRUE' || strtoupper($token->getValue()) == 'FALSE') { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_LOGICAL); + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_RANGE); + } + } else { + $token->setTokenSubType(FormulaToken::TOKEN_SUBTYPE_NUMBER); + } + + $this->tokens[] = $token; + + continue; + } + + if ($token->getTokenType() == FormulaToken::TOKEN_TYPE_FUNCTION) { + if (strlen($token->getValue()) > 0) { + if (substr($token->getValue(), 0, 1) == '@') { + $token->setValue(substr($token->getValue(), 1)); + } + } + } + + $this->tokens[] = $token; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php new file mode 100755 index 0000000..66618d4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaToken.php @@ -0,0 +1,150 @@ +value = $pValue; + $this->tokenType = $pTokenType; + $this->tokenSubType = $pTokenSubType; + } + + /** + * Get Value. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set Value. + * + * @param string $value + */ + public function setValue($value) + { + $this->value = $value; + } + + /** + * Get Token Type (represented by TOKEN_TYPE_*). + * + * @return string + */ + public function getTokenType() + { + return $this->tokenType; + } + + /** + * Set Token Type (represented by TOKEN_TYPE_*). + * + * @param string $value + */ + public function setTokenType($value) + { + $this->tokenType = $value; + } + + /** + * Get Token SubType (represented by TOKEN_SUBTYPE_*). + * + * @return string + */ + public function getTokenSubType() + { + return $this->tokenSubType; + } + + /** + * Set Token SubType (represented by TOKEN_SUBTYPE_*). + * + * @param string $value + */ + public function setTokenSubType($value) + { + $this->tokenSubType = $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php new file mode 100755 index 0000000..0a607c7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php @@ -0,0 +1,673 @@ + '#NULL!', + 'divisionbyzero' => '#DIV/0!', + 'value' => '#VALUE!', + 'reference' => '#REF!', + 'name' => '#NAME?', + 'num' => '#NUM!', + 'na' => '#N/A', + 'gettingdata' => '#GETTING_DATA', + ]; + + /** + * Set the Compatibility Mode. + * + * @category Function Configuration + * + * @param string $compatibilityMode Compatibility Mode + * Permitted values are: + * Functions::COMPATIBILITY_EXCEL 'Excel' + * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' + * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' + * + * @return bool (Success or Failure) + */ + public static function setCompatibilityMode($compatibilityMode) + { + if (($compatibilityMode == self::COMPATIBILITY_EXCEL) || + ($compatibilityMode == self::COMPATIBILITY_GNUMERIC) || + ($compatibilityMode == self::COMPATIBILITY_OPENOFFICE) + ) { + self::$compatibilityMode = $compatibilityMode; + + return true; + } + + return false; + } + + /** + * Return the current Compatibility Mode. + * + * @category Function Configuration + * + * @return string Compatibility Mode + * Possible Return values are: + * Functions::COMPATIBILITY_EXCEL 'Excel' + * Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' + * Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' + */ + public static function getCompatibilityMode() + { + return self::$compatibilityMode; + } + + /** + * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object). + * + * @category Function Configuration + * + * @param string $returnDateType Return Date Format + * Permitted values are: + * Functions::RETURNDATE_PHP_NUMERIC 'P' + * Functions::RETURNDATE_PHP_OBJECT 'O' + * Functions::RETURNDATE_EXCEL 'E' + * + * @return bool Success or failure + */ + public static function setReturnDateType($returnDateType) + { + if (($returnDateType == self::RETURNDATE_PHP_NUMERIC) || + ($returnDateType == self::RETURNDATE_PHP_OBJECT) || + ($returnDateType == self::RETURNDATE_EXCEL) + ) { + self::$returnDateType = $returnDateType; + + return true; + } + + return false; + } + + /** + * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object). + * + * @category Function Configuration + * + * @return string Return Date Format + * Possible Return values are: + * Functions::RETURNDATE_PHP_NUMERIC 'P' + * Functions::RETURNDATE_PHP_OBJECT 'O' + * Functions::RETURNDATE_EXCEL 'E' + */ + public static function getReturnDateType() + { + return self::$returnDateType; + } + + /** + * DUMMY. + * + * @category Error Returns + * + * @return string #Not Yet Implemented + */ + public static function DUMMY() + { + return '#Not Yet Implemented'; + } + + /** + * DIV0. + * + * @category Error Returns + * + * @return string #Not Yet Implemented + */ + public static function DIV0() + { + return self::$errorCodes['divisionbyzero']; + } + + /** + * NA. + * + * Excel Function: + * =NA() + * + * Returns the error value #N/A + * #N/A is the error value that means "no value is available." + * + * @category Logical Functions + * + * @return string #N/A! + */ + public static function NA() + { + return self::$errorCodes['na']; + } + + /** + * NaN. + * + * Returns the error value #NUM! + * + * @category Error Returns + * + * @return string #NUM! + */ + public static function NAN() + { + return self::$errorCodes['num']; + } + + /** + * NAME. + * + * Returns the error value #NAME? + * + * @category Error Returns + * + * @return string #NAME? + */ + public static function NAME() + { + return self::$errorCodes['name']; + } + + /** + * REF. + * + * Returns the error value #REF! + * + * @category Error Returns + * + * @return string #REF! + */ + public static function REF() + { + return self::$errorCodes['reference']; + } + + /** + * NULL. + * + * Returns the error value #NULL! + * + * @category Error Returns + * + * @return string #NULL! + */ + public static function null() + { + return self::$errorCodes['null']; + } + + /** + * VALUE. + * + * Returns the error value #VALUE! + * + * @category Error Returns + * + * @return string #VALUE! + */ + public static function VALUE() + { + return self::$errorCodes['value']; + } + + public static function isMatrixValue($idx) + { + return (substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0); + } + + public static function isValue($idx) + { + return substr_count($idx, '.') == 0; + } + + public static function isCellValue($idx) + { + return substr_count($idx, '.') > 1; + } + + public static function ifCondition($condition) + { + $condition = self::flattenSingleValue($condition); + if (!isset($condition[0]) && !is_numeric($condition)) { + $condition = '=""'; + } + if (!in_array($condition[0], ['>', '<', '='])) { + if (!is_numeric($condition)) { + $condition = Calculation::wrapResult(strtoupper($condition)); + } + + return '=' . $condition; + } + preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches); + list(, $operator, $operand) = $matches; + + if (!is_numeric($operand)) { + $operand = str_replace('"', '""', $operand); + $operand = Calculation::wrapResult(strtoupper($operand)); + } + + return $operator . $operand; + } + + /** + * ERROR_TYPE. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function errorType($value = '') + { + $value = self::flattenSingleValue($value); + + $i = 1; + foreach (self::$errorCodes as $errorCode) { + if ($value === $errorCode) { + return $i; + } + ++$i; + } + + return self::NA(); + } + + /** + * IS_BLANK. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isBlank($value = null) + { + if ($value !== null) { + $value = self::flattenSingleValue($value); + } + + return $value === null; + } + + /** + * IS_ERR. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isErr($value = '') + { + $value = self::flattenSingleValue($value); + + return self::isError($value) && (!self::isNa(($value))); + } + + /** + * IS_ERROR. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isError($value = '') + { + $value = self::flattenSingleValue($value); + + if (!is_string($value)) { + return false; + } + + return in_array($value, self::$errorCodes); + } + + /** + * IS_NA. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNa($value = '') + { + $value = self::flattenSingleValue($value); + + return $value === self::NA(); + } + + /** + * IS_EVEN. + * + * @param mixed $value Value to check + * + * @return bool|string + */ + public static function isEven($value = null) + { + $value = self::flattenSingleValue($value); + + if ($value === null) { + return self::NAME(); + } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { + return self::VALUE(); + } + + return $value % 2 == 0; + } + + /** + * IS_ODD. + * + * @param mixed $value Value to check + * + * @return bool|string + */ + public static function isOdd($value = null) + { + $value = self::flattenSingleValue($value); + + if ($value === null) { + return self::NAME(); + } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { + return self::VALUE(); + } + + return abs($value) % 2 == 1; + } + + /** + * IS_NUMBER. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNumber($value = null) + { + $value = self::flattenSingleValue($value); + + if (is_string($value)) { + return false; + } + + return is_numeric($value); + } + + /** + * IS_LOGICAL. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isLogical($value = null) + { + $value = self::flattenSingleValue($value); + + return is_bool($value); + } + + /** + * IS_TEXT. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isText($value = null) + { + $value = self::flattenSingleValue($value); + + return is_string($value) && !self::isError($value); + } + + /** + * IS_NONTEXT. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function isNonText($value = null) + { + return !self::isText($value); + } + + /** + * N. + * + * Returns a value converted to a number + * + * @param null|mixed $value The value you want converted + * + * @return number N converts values listed in the following table + * If value is or refers to N returns + * A number That number + * A date The serial number of that date + * TRUE 1 + * FALSE 0 + * An error value The error value + * Anything else 0 + */ + public static function n($value = null) + { + while (is_array($value)) { + $value = array_shift($value); + } + + switch (gettype($value)) { + case 'double': + case 'float': + case 'integer': + return $value; + case 'boolean': + return (int) $value; + case 'string': + // Errors + if ((strlen($value) > 0) && ($value[0] == '#')) { + return $value; + } + + break; + } + + return 0; + } + + /** + * TYPE. + * + * Returns a number that identifies the type of a value + * + * @param null|mixed $value The value you want tested + * + * @return number N converts values listed in the following table + * If value is or refers to N returns + * A number 1 + * Text 2 + * Logical Value 4 + * An error value 16 + * Array or Matrix 64 + */ + public static function TYPE($value = null) + { + $value = self::flattenArrayIndexed($value); + if (is_array($value) && (count($value) > 1)) { + end($value); + $a = key($value); + // Range of cells is an error + if (self::isCellValue($a)) { + return 16; + // Test for Matrix + } elseif (self::isMatrixValue($a)) { + return 64; + } + } elseif (empty($value)) { + // Empty Cell + return 1; + } + $value = self::flattenSingleValue($value); + + if (($value === null) || (is_float($value)) || (is_int($value))) { + return 1; + } elseif (is_bool($value)) { + return 4; + } elseif (is_array($value)) { + return 64; + } elseif (is_string($value)) { + // Errors + if ((strlen($value) > 0) && ($value[0] == '#')) { + return 16; + } + + return 2; + } + + return 0; + } + + /** + * Convert a multi-dimensional array to a simple 1-dimensional array. + * + * @param array $array Array to be flattened + * + * @return array Flattened array + */ + public static function flattenArray($array) + { + if (!is_array($array)) { + return (array) $array; + } + + $arrayValues = []; + foreach ($array as $value) { + if (is_array($value)) { + foreach ($value as $val) { + if (is_array($val)) { + foreach ($val as $v) { + $arrayValues[] = $v; + } + } else { + $arrayValues[] = $val; + } + } + } else { + $arrayValues[] = $value; + } + } + + return $arrayValues; + } + + /** + * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing. + * + * @param array $array Array to be flattened + * + * @return array Flattened array + */ + public static function flattenArrayIndexed($array) + { + if (!is_array($array)) { + return (array) $array; + } + + $arrayValues = []; + foreach ($array as $k1 => $value) { + if (is_array($value)) { + foreach ($value as $k2 => $val) { + if (is_array($val)) { + foreach ($val as $k3 => $v) { + $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v; + } + } else { + $arrayValues[$k1 . '.' . $k2] = $val; + } + } + } else { + $arrayValues[$k1] = $value; + } + } + + return $arrayValues; + } + + /** + * Convert an array to a single scalar value by extracting the first element. + * + * @param mixed $value Array or scalar value + * + * @return mixed + */ + public static function flattenSingleValue($value = '') + { + while (is_array($value)) { + $value = array_pop($value); + } + + return $value; + } + + /** + * ISFORMULA. + * + * @param mixed $cellReference The cell to check + * @param Cell $pCell The current cell (containing this formula) + * + * @return bool|string + */ + public static function isFormula($cellReference = '', Cell $pCell = null) + { + if ($pCell === null) { + return self::REF(); + } + + preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches); + + $cellReference = $matches[6] . $matches[7]; + $worksheetName = trim($matches[3], "'"); + + $worksheet = (!empty($worksheetName)) + ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName) + : $pCell->getWorksheet(); + + return $worksheet->getCell($cellReference)->isFormula(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php new file mode 100755 index 0000000..3e6c5e7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php @@ -0,0 +1,350 @@ + 0) && ($returnValue == $argCount); + } + + /** + * LOGICAL_OR. + * + * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE. + * + * Excel Function: + * =OR(logical1[,logical2[, ...]]) + * + * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays + * or references that contain logical values. + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @category Logical Functions + * + * @param mixed $args Data values + * + * @return bool|string the logical OR of the arguments + */ + public static function logicalOr(...$args) + { + $args = Functions::flattenArray($args); + + if (count($args) == 0) { + return Functions::VALUE(); + } + + $args = array_filter($args, function ($value) { + return $value !== null || (is_string($value) && trim($value) == ''); + }); + + $returnValue = self::countTrueValues($args); + if (is_string($returnValue)) { + return $returnValue; + } + + return $returnValue > 0; + } + + /** + * LOGICAL_XOR. + * + * Returns the Exclusive Or logical operation for one or more supplied conditions. + * i.e. the Xor function returns TRUE if an odd number of the supplied conditions evaluate to TRUE, and FALSE otherwise. + * + * Excel Function: + * =XOR(logical1[,logical2[, ...]]) + * + * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays + * or references that contain logical values. + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @category Logical Functions + * + * @param mixed $args Data values + * + * @return bool|string the logical XOR of the arguments + */ + public static function logicalXor(...$args) + { + $args = Functions::flattenArray($args); + + if (count($args) == 0) { + return Functions::VALUE(); + } + + $args = array_filter($args, function ($value) { + return $value !== null || (is_string($value) && trim($value) == ''); + }); + + $returnValue = self::countTrueValues($args); + if (is_string($returnValue)) { + return $returnValue; + } + + return $returnValue % 2 == 1; + } + + /** + * NOT. + * + * Returns the boolean inverse of the argument. + * + * Excel Function: + * =NOT(logical) + * + * The argument must evaluate to a logical value such as TRUE or FALSE + * + * Boolean arguments are treated as True or False as appropriate + * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False + * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds + * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value + * + * @category Logical Functions + * + * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE + * + * @return bool|string the boolean inverse of the argument + */ + public static function NOT($logical = false) + { + $logical = Functions::flattenSingleValue($logical); + + if (is_string($logical)) { + $logical = strtoupper($logical); + if (($logical == 'TRUE') || ($logical == Calculation::getTRUE())) { + return false; + } elseif (($logical == 'FALSE') || ($logical == Calculation::getFALSE())) { + return true; + } + + return Functions::VALUE(); + } + + return !$logical; + } + + /** + * STATEMENT_IF. + * + * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. + * + * Excel Function: + * =IF(condition[,returnIfTrue[,returnIfFalse]]) + * + * Condition is any value or expression that can be evaluated to TRUE or FALSE. + * For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, + * the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. + * This argument can use any comparison calculation operator. + * ReturnIfTrue is the value that is returned if condition evaluates to TRUE. + * For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE, + * then the IF function returns the text "Within budget" + * If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use + * the logical value TRUE for this argument. + * ReturnIfTrue can be another formula. + * ReturnIfFalse is the value that is returned if condition evaluates to FALSE. + * For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE, + * then the IF function returns the text "Over budget". + * If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned. + * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. + * ReturnIfFalse can be another formula. + * + * @category Logical Functions + * + * @param mixed $condition Condition to evaluate + * @param mixed $returnIfTrue Value to return when condition is true + * @param mixed $returnIfFalse Optional value to return when condition is false + * + * @return mixed The value of returnIfTrue or returnIfFalse determined by condition + */ + public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false) + { + $condition = ($condition === null) ? true : (bool) Functions::flattenSingleValue($condition); + $returnIfTrue = ($returnIfTrue === null) ? 0 : Functions::flattenSingleValue($returnIfTrue); + $returnIfFalse = ($returnIfFalse === null) ? false : Functions::flattenSingleValue($returnIfFalse); + + return ($condition) ? $returnIfTrue : $returnIfFalse; + } + + /** + * STATEMENT_SWITCH. + * + * Returns corresponding with first match (any data type such as a string, numeric, date, etc). + * + * Excel Function: + * =SWITCH (expression, value1, result1, value2, result2, ... value_n, result_n [, default]) + * + * Expression + * The expression to compare to a list of values. + * value1, value2, ... value_n + * A list of values that are compared to expression. The SWITCH function is looking for the first value that matches the expression. + * result1, result2, ... result_n + * A list of results. The SWITCH function returns the corresponding result when a value matches expression. + * default + * Optional. It is the default to return if expression does not match any of the values (value1, value2, ... value_n). + * + * @category Logical Functions + * + * @param mixed $arguments Statement arguments + * + * @return mixed The value of matched expression + */ + public static function statementSwitch(...$arguments) + { + $result = Functions::VALUE(); + + if (count($arguments) > 0) { + $targetValue = Functions::flattenSingleValue($arguments[0]); + $argc = count($arguments) - 1; + $switchCount = floor($argc / 2); + $switchSatisfied = false; + $hasDefaultClause = $argc % 2 !== 0; + $defaultClause = $argc % 2 === 0 ? null : $arguments[count($arguments) - 1]; + + if ($switchCount) { + for ($index = 0; $index < $switchCount; ++$index) { + if ($targetValue == $arguments[$index * 2 + 1]) { + $result = $arguments[$index * 2 + 2]; + $switchSatisfied = true; + + break; + } + } + } + + if (!$switchSatisfied) { + $result = $hasDefaultClause ? $defaultClause : Functions::NA(); + } + } + + return $result; + } + + /** + * IFERROR. + * + * Excel Function: + * =IFERROR(testValue,errorpart) + * + * @category Logical Functions + * + * @param mixed $testValue Value to check, is also the value returned when no error + * @param mixed $errorpart Value to return when testValue is an error condition + * + * @return mixed The value of errorpart or testValue determined by error condition + */ + public static function IFERROR($testValue = '', $errorpart = '') + { + $testValue = ($testValue === null) ? '' : Functions::flattenSingleValue($testValue); + $errorpart = ($errorpart === null) ? '' : Functions::flattenSingleValue($errorpart); + + return self::statementIf(Functions::isError($testValue), $errorpart, $testValue); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php new file mode 100755 index 0000000..e6b0f32 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php @@ -0,0 +1,926 @@ + '') { + if (strpos($sheetText, ' ') !== false) { + $sheetText = "'" . $sheetText . "'"; + } + $sheetText .= '!'; + } + if ((!is_bool($referenceStyle)) || $referenceStyle) { + $rowRelative = $columnRelative = '$'; + $column = Coordinate::stringFromColumnIndex($column); + if (($relativity == 2) || ($relativity == 4)) { + $columnRelative = ''; + } + if (($relativity == 3) || ($relativity == 4)) { + $rowRelative = ''; + } + + return $sheetText . $columnRelative . $column . $rowRelative . $row; + } + if (($relativity == 2) || ($relativity == 4)) { + $column = '[' . $column . ']'; + } + if (($relativity == 3) || ($relativity == 4)) { + $row = '[' . $row . ']'; + } + + return $sheetText . 'R' . $row . 'C' . $column; + } + + /** + * COLUMN. + * + * Returns the column number of the given cell reference + * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * reference of the cell in which the COLUMN function appears; otherwise this function returns 0. + * + * Excel Function: + * =COLUMN([cellAddress]) + * + * @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers + * + * @return int|int[] + */ + public static function COLUMN($cellAddress = null) + { + if ($cellAddress === null || trim($cellAddress) === '') { + return 0; + } + + if (is_array($cellAddress)) { + foreach ($cellAddress as $columnKey => $value) { + $columnKey = preg_replace('/[^a-z]/i', '', $columnKey); + + return (int) Coordinate::columnIndexFromString($columnKey); + } + } else { + list($sheet, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); + if (strpos($cellAddress, ':') !== false) { + list($startAddress, $endAddress) = explode(':', $cellAddress); + $startAddress = preg_replace('/[^a-z]/i', '', $startAddress); + $endAddress = preg_replace('/[^a-z]/i', '', $endAddress); + $returnValue = []; + do { + $returnValue[] = (int) Coordinate::columnIndexFromString($startAddress); + } while ($startAddress++ != $endAddress); + + return $returnValue; + } + $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress); + + return (int) Coordinate::columnIndexFromString($cellAddress); + } + } + + /** + * COLUMNS. + * + * Returns the number of columns in an array or reference. + * + * Excel Function: + * =COLUMNS(cellAddress) + * + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns + * + * @return int The number of columns in cellAddress + */ + public static function COLUMNS($cellAddress = null) + { + if ($cellAddress === null || $cellAddress === '') { + return 1; + } elseif (!is_array($cellAddress)) { + return Functions::VALUE(); + } + + reset($cellAddress); + $isMatrix = (is_numeric(key($cellAddress))); + list($columns, $rows) = Calculation::getMatrixDimensions($cellAddress); + + if ($isMatrix) { + return $rows; + } + + return $columns; + } + + /** + * ROW. + * + * Returns the row number of the given cell reference + * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. + * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the + * reference of the cell in which the ROW function appears; otherwise this function returns 0. + * + * Excel Function: + * =ROW([cellAddress]) + * + * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers + * + * @return int or array of integer + */ + public static function ROW($cellAddress = null) + { + if ($cellAddress === null || trim($cellAddress) === '') { + return 0; + } + + if (is_array($cellAddress)) { + foreach ($cellAddress as $columnKey => $rowValue) { + foreach ($rowValue as $rowKey => $cellValue) { + return (int) preg_replace('/\D/', '', $rowKey); + } + } + } else { + list($sheet, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); + if (strpos($cellAddress, ':') !== false) { + list($startAddress, $endAddress) = explode(':', $cellAddress); + $startAddress = preg_replace('/\D/', '', $startAddress); + $endAddress = preg_replace('/\D/', '', $endAddress); + $returnValue = []; + do { + $returnValue[][] = (int) $startAddress; + } while ($startAddress++ != $endAddress); + + return $returnValue; + } + list($cellAddress) = explode(':', $cellAddress); + + return (int) preg_replace('/\D/', '', $cellAddress); + } + } + + /** + * ROWS. + * + * Returns the number of rows in an array or reference. + * + * Excel Function: + * =ROWS(cellAddress) + * + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows + * + * @return int The number of rows in cellAddress + */ + public static function ROWS($cellAddress = null) + { + if ($cellAddress === null || $cellAddress === '') { + return 1; + } elseif (!is_array($cellAddress)) { + return Functions::VALUE(); + } + + reset($cellAddress); + $isMatrix = (is_numeric(key($cellAddress))); + list($columns, $rows) = Calculation::getMatrixDimensions($cellAddress); + + if ($isMatrix) { + return $columns; + } + + return $rows; + } + + /** + * HYPERLINK. + * + * Excel Function: + * =HYPERLINK(linkURL,displayName) + * + * @category Logical Functions + * + * @param string $linkURL Value to check, is also the value returned when no error + * @param string $displayName Value to return when testValue is an error condition + * @param Cell $pCell The cell to set the hyperlink in + * + * @return mixed The value of $displayName (or $linkURL if $displayName was blank) + */ + public static function HYPERLINK($linkURL = '', $displayName = null, Cell $pCell = null) + { + $linkURL = ($linkURL === null) ? '' : Functions::flattenSingleValue($linkURL); + $displayName = ($displayName === null) ? '' : Functions::flattenSingleValue($displayName); + + if ((!is_object($pCell)) || (trim($linkURL) == '')) { + return Functions::REF(); + } + + if ((is_object($displayName)) || trim($displayName) == '') { + $displayName = $linkURL; + } + + $pCell->getHyperlink()->setUrl($linkURL); + $pCell->getHyperlink()->setTooltip($displayName); + + return $displayName; + } + + /** + * INDIRECT. + * + * Returns the reference specified by a text string. + * References are immediately evaluated to display their contents. + * + * Excel Function: + * =INDIRECT(cellAddress) + * + * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 + * + * @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula) + * @param Cell $pCell The current cell (containing this formula) + * + * @return mixed The cells referenced by cellAddress + * + * @todo Support for the optional a1 parameter introduced in Excel 2010 + */ + public static function INDIRECT($cellAddress = null, Cell $pCell = null) + { + $cellAddress = Functions::flattenSingleValue($cellAddress); + if ($cellAddress === null || $cellAddress === '') { + return Functions::REF(); + } + + $cellAddress1 = $cellAddress; + $cellAddress2 = null; + if (strpos($cellAddress, ':') !== false) { + list($cellAddress1, $cellAddress2) = explode(':', $cellAddress); + } + + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) || + (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))) { + if (!preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $cellAddress1, $matches)) { + return Functions::REF(); + } + + if (strpos($cellAddress, '!') !== false) { + list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, false); + } + + if (strpos($cellAddress, '!') !== false) { + list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); + } + + /** + * OFFSET. + * + * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. + * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and + * the number of columns to be returned. + * + * Excel Function: + * =OFFSET(cellAddress, rows, cols, [height], [width]) + * + * @param null|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or + * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. + * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to. + * Using 5 as the rows argument specifies that the upper-left cell in the reference is + * five rows below reference. Rows can be positive (which means below the starting reference) + * or negative (which means above the starting reference). + * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result + * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the + * reference is five columns to the right of reference. Cols can be positive (which means + * to the right of the starting reference) or negative (which means to the left of the + * starting reference). + * @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. + * @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. + * @param null|Cell $pCell + * + * @return string A reference to a cell or range of cells + */ + public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, Cell $pCell = null) + { + $rows = Functions::flattenSingleValue($rows); + $columns = Functions::flattenSingleValue($columns); + $height = Functions::flattenSingleValue($height); + $width = Functions::flattenSingleValue($width); + if ($cellAddress === null) { + return 0; + } + + if (!is_object($pCell)) { + return Functions::REF(); + } + + $sheetName = null; + if (strpos($cellAddress, '!')) { + list($sheetName, $cellAddress) = Worksheet::extractSheetTitle($cellAddress, true); + $sheetName = trim($sheetName, "'"); + } + if (strpos($cellAddress, ':')) { + list($startCell, $endCell) = explode(':', $cellAddress); + } else { + $startCell = $endCell = $cellAddress; + } + list($startCellColumn, $startCellRow) = Coordinate::coordinateFromString($startCell); + list($endCellColumn, $endCellRow) = Coordinate::coordinateFromString($endCell); + + $startCellRow += $rows; + $startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1; + $startCellColumn += $columns; + + if (($startCellRow <= 0) || ($startCellColumn < 0)) { + return Functions::REF(); + } + $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1; + if (($width != null) && (!is_object($width))) { + $endCellColumn = $startCellColumn + $width - 1; + } else { + $endCellColumn += $columns; + } + $startCellColumn = Coordinate::stringFromColumnIndex($startCellColumn + 1); + + if (($height != null) && (!is_object($height))) { + $endCellRow = $startCellRow + $height - 1; + } else { + $endCellRow += $rows; + } + + if (($endCellRow <= 0) || ($endCellColumn < 0)) { + return Functions::REF(); + } + $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1); + + $cellAddress = $startCellColumn . $startCellRow; + if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) { + $cellAddress .= ':' . $endCellColumn . $endCellRow; + } + + if ($sheetName !== null) { + $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); + } else { + $pSheet = $pCell->getWorksheet(); + } + + return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); + } + + /** + * CHOOSE. + * + * Uses lookup_value to return a value from the list of value arguments. + * Use CHOOSE to select one of up to 254 values based on the lookup_value. + * + * Excel Function: + * =CHOOSE(index_num, value1, [value2], ...) + * + * @param mixed $index_num Specifies which value argument is selected. + * Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number + * between 1 and 254. + * @param mixed $value1 ... Value1 is required, subsequent values are optional. + * Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on + * index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or + * text. + * + * @return mixed The selected value + */ + public static function CHOOSE(...$chooseArgs) + { + $chosenEntry = Functions::flattenArray(array_shift($chooseArgs)); + $entryCount = count($chooseArgs) - 1; + + if (is_array($chosenEntry)) { + $chosenEntry = array_shift($chosenEntry); + } + if ((is_numeric($chosenEntry)) && (!is_bool($chosenEntry))) { + --$chosenEntry; + } else { + return Functions::VALUE(); + } + $chosenEntry = floor($chosenEntry); + if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) { + return Functions::VALUE(); + } + + if (is_array($chooseArgs[$chosenEntry])) { + return Functions::flattenArray($chooseArgs[$chosenEntry]); + } + + return $chooseArgs[$chosenEntry]; + } + + /** + * MATCH. + * + * The MATCH function searches for a specified item in a range of cells + * + * Excel Function: + * =MATCH(lookup_value, lookup_array, [match_type]) + * + * @param mixed $lookupValue The value that you want to match in lookup_array + * @param mixed $lookupArray The range of cells being searched + * @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. + * + * @return int The relative position of the found item + */ + public static function MATCH($lookupValue, $lookupArray, $matchType = 1) + { + $lookupArray = Functions::flattenArray($lookupArray); + $lookupValue = Functions::flattenSingleValue($lookupValue); + $matchType = ($matchType === null) ? 1 : (int) Functions::flattenSingleValue($matchType); + + $initialLookupValue = $lookupValue; + // MATCH is not case sensitive + $lookupValue = StringHelper::strToLower($lookupValue); + + // Lookup_value type has to be number, text, or logical values + if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) { + return Functions::NA(); + } + + // Match_type is 0, 1 or -1 + if (($matchType !== 0) && ($matchType !== -1) && ($matchType !== 1)) { + return Functions::NA(); + } + + // Lookup_array should not be empty + $lookupArraySize = count($lookupArray); + if ($lookupArraySize <= 0) { + return Functions::NA(); + } + + // Lookup_array should contain only number, text, or logical values, or empty (null) cells + foreach ($lookupArray as $i => $lookupArrayValue) { + // check the type of the value + if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) && + (!is_bool($lookupArrayValue)) && ($lookupArrayValue !== null) + ) { + return Functions::NA(); + } + // Convert strings to lowercase for case-insensitive testing + if (is_string($lookupArrayValue)) { + $lookupArray[$i] = StringHelper::strToLower($lookupArrayValue); + } + if (($lookupArrayValue === null) && (($matchType == 1) || ($matchType == -1))) { + $lookupArray = array_slice($lookupArray, 0, $i - 1); + } + } + + if ($matchType == 1) { + // If match_type is 1 the list has to be processed from last to first + + $lookupArray = array_reverse($lookupArray); + $keySet = array_reverse(array_keys($lookupArray)); + } + + // ** + // find the match + // ** + + if ($matchType == 0 || $matchType == 1) { + foreach ($lookupArray as $i => $lookupArrayValue) { + $onlyNumeric = is_numeric($lookupArrayValue) && is_numeric($lookupValue); + $onlyNumericExactMatch = $onlyNumeric && $lookupArrayValue == $lookupValue; + $nonOnlyNumericExactMatch = !$onlyNumeric && $lookupArrayValue === $lookupValue; + $exactMatch = $onlyNumericExactMatch || $nonOnlyNumericExactMatch; + if (($matchType == 0) && $exactMatch) { + // exact match + return $i + 1; + } elseif (($matchType == 1) && ($lookupArrayValue <= $lookupValue)) { + $i = array_search($i, $keySet); + + // The current value is the (first) match + return $i + 1; + } + } + } else { + // matchType = -1 + + // "Special" case: since the array it's supposed to be ordered in descending order, the + // Excel algorithm gives up immediately if the first element is smaller than the searched value + if ($lookupArray[0] < $lookupValue) { + return Functions::NA(); + } + + $maxValueKey = null; + + // The basic algorithm is: + // Iterate and keep the highest match until the next element is smaller than the searched value. + // Return immediately if perfect match is found + foreach ($lookupArray as $i => $lookupArrayValue) { + if ($lookupArrayValue == $lookupValue) { + // Another "special" case. If a perfect match is found, + // the algorithm gives up immediately + return $i + 1; + } elseif ($lookupArrayValue >= $lookupValue) { + $maxValueKey = $i + 1; + } + } + + if ($maxValueKey !== null) { + return $maxValueKey; + } + } + + // Unsuccessful in finding a match, return #N/A error value + return Functions::NA(); + } + + /** + * INDEX. + * + * Uses an index to choose a value from a reference or array + * + * Excel Function: + * =INDEX(range_array, row_num, [column_num]) + * + * @param mixed $arrayValues A range of cells or an array constant + * @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required. + * @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required. + * + * @return mixed the value of a specified cell or array of cells + */ + public static function INDEX($arrayValues, $rowNum = 0, $columnNum = 0) + { + $rowNum = Functions::flattenSingleValue($rowNum); + $columnNum = Functions::flattenSingleValue($columnNum); + + if (($rowNum < 0) || ($columnNum < 0)) { + return Functions::VALUE(); + } + + if (!is_array($arrayValues) || ($rowNum > count($arrayValues))) { + return Functions::REF(); + } + + $rowKeys = array_keys($arrayValues); + $columnKeys = @array_keys($arrayValues[$rowKeys[0]]); + + if ($columnNum > count($columnKeys)) { + return Functions::VALUE(); + } elseif ($columnNum == 0) { + if ($rowNum == 0) { + return $arrayValues; + } + $rowNum = $rowKeys[--$rowNum]; + $returnArray = []; + foreach ($arrayValues as $arrayColumn) { + if (is_array($arrayColumn)) { + if (isset($arrayColumn[$rowNum])) { + $returnArray[] = $arrayColumn[$rowNum]; + } else { + return [$rowNum => $arrayValues[$rowNum]]; + } + } else { + return $arrayValues[$rowNum]; + } + } + + return $returnArray; + } + $columnNum = $columnKeys[--$columnNum]; + if ($rowNum > count($rowKeys)) { + return Functions::VALUE(); + } elseif ($rowNum == 0) { + return $arrayValues[$columnNum]; + } + $rowNum = $rowKeys[--$rowNum]; + + return $arrayValues[$rowNum][$columnNum]; + } + + /** + * TRANSPOSE. + * + * @param array $matrixData A matrix of values + * + * @return array + * + * Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix + */ + public static function TRANSPOSE($matrixData) + { + $returnMatrix = []; + if (!is_array($matrixData)) { + $matrixData = [[$matrixData]]; + } + + $column = 0; + foreach ($matrixData as $matrixRow) { + $row = 0; + foreach ($matrixRow as $matrixCell) { + $returnMatrix[$row][$column] = $matrixCell; + ++$row; + } + ++$column; + } + + return $returnMatrix; + } + + private static function vlookupSort($a, $b) + { + reset($a); + $firstColumn = key($a); + $aLower = StringHelper::strToLower($a[$firstColumn]); + $bLower = StringHelper::strToLower($b[$firstColumn]); + if ($aLower == $bLower) { + return 0; + } + + return ($aLower < $bLower) ? -1 : 1; + } + + /** + * VLOOKUP + * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value + * + * @return mixed The value of the found cell + */ + public static function VLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + $index_number = Functions::flattenSingleValue($index_number); + $not_exact_match = Functions::flattenSingleValue($not_exact_match); + + // index_number must be greater than or equal to 1 + if ($index_number < 1) { + return Functions::VALUE(); + } + + // index_number must be less than or equal to the number of columns in lookup_array + if ((!is_array($lookup_array)) || (empty($lookup_array))) { + return Functions::REF(); + } + $f = array_keys($lookup_array); + $firstRow = array_pop($f); + if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) { + return Functions::REF(); + } + $columnKeys = array_keys($lookup_array[$firstRow]); + $returnColumn = $columnKeys[--$index_number]; + $firstColumn = array_shift($columnKeys); + + if (!$not_exact_match) { + uasort($lookup_array, ['self', 'vlookupSort']); + } + + $lookupLower = StringHelper::strToLower($lookup_value); + $rowNumber = $rowValue = false; + foreach ($lookup_array as $rowKey => $rowData) { + $firstLower = StringHelper::strToLower($rowData[$firstColumn]); + + // break if we have passed possible keys + if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) || + (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && ($firstLower > $lookupLower))) { + break; + } + // remember the last key, but only if datatypes match + if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn])) || + (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]))) { + if ($not_exact_match) { + $rowNumber = $rowKey; + + continue; + } elseif (($firstLower == $lookupLower) + // Spreadsheets software returns first exact match, + // we have sorted and we might have broken key orders + // we want the first one (by its initial index) + && (($rowNumber == false) || ($rowKey < $rowNumber)) + ) { + $rowNumber = $rowKey; + } + } + } + + if ($rowNumber !== false) { + // return the appropriate value + return $lookup_array[$rowNumber][$returnColumn]; + } + + return Functions::NA(); + } + + /** + * HLOOKUP + * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value + * + * @return mixed The value of the found cell + */ + public static function HLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + $index_number = Functions::flattenSingleValue($index_number); + $not_exact_match = Functions::flattenSingleValue($not_exact_match); + + // index_number must be greater than or equal to 1 + if ($index_number < 1) { + return Functions::VALUE(); + } + + // index_number must be less than or equal to the number of columns in lookup_array + if ((!is_array($lookup_array)) || (empty($lookup_array))) { + return Functions::REF(); + } + $f = array_keys($lookup_array); + $firstRow = array_pop($f); + if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array))) { + return Functions::REF(); + } + + $firstkey = $f[0] - 1; + $returnColumn = $firstkey + $index_number; + $firstColumn = array_shift($f); + $rowNumber = null; + foreach ($lookup_array[$firstColumn] as $rowKey => $rowData) { + // break if we have passed possible keys + $bothNumeric = is_numeric($lookup_value) && is_numeric($rowData); + $bothNotNumeric = !is_numeric($lookup_value) && !is_numeric($rowData); + $lookupLower = StringHelper::strToLower($lookup_value); + $rowDataLower = StringHelper::strToLower($rowData); + + if (($bothNumeric && $rowData > $lookup_value) || + ($bothNotNumeric && $rowDataLower > $lookupLower)) { + break; + } + + // Remember the last key, but only if datatypes match (as in VLOOKUP) + if ($bothNumeric || $bothNotNumeric) { + if ($not_exact_match) { + $rowNumber = $rowKey; + + continue; + } elseif ($rowDataLower === $lookupLower + && ($rowNumber === null || $rowKey < $rowNumber) + ) { + $rowNumber = $rowKey; + } + } + } + + if ($rowNumber !== null) { + // otherwise return the appropriate value + return $lookup_array[$returnColumn][$rowNumber]; + } + + return Functions::NA(); + } + + /** + * LOOKUP + * The LOOKUP function searches for value either from a one-row or one-column range or from an array. + * + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_vector The range of cells being searched + * @param null|mixed $result_vector The column from which the matching value must be returned + * + * @return mixed The value of the found cell + */ + public static function LOOKUP($lookup_value, $lookup_vector, $result_vector = null) + { + $lookup_value = Functions::flattenSingleValue($lookup_value); + + if (!is_array($lookup_vector)) { + return Functions::NA(); + } + $hasResultVector = isset($result_vector); + $lookupRows = count($lookup_vector); + $l = array_keys($lookup_vector); + $l = array_shift($l); + $lookupColumns = count($lookup_vector[$l]); + // we correctly orient our results + if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) { + $lookup_vector = self::TRANSPOSE($lookup_vector); + $lookupRows = count($lookup_vector); + $l = array_keys($lookup_vector); + $lookupColumns = count($lookup_vector[array_shift($l)]); + } + + if ($result_vector === null) { + $result_vector = $lookup_vector; + } + $resultRows = count($result_vector); + $l = array_keys($result_vector); + $l = array_shift($l); + $resultColumns = count($result_vector[$l]); + // we correctly orient our results + if ($resultRows === 1 && $resultColumns > 1) { + $result_vector = self::TRANSPOSE($result_vector); + $resultRows = count($result_vector); + $r = array_keys($result_vector); + $resultColumns = count($result_vector[array_shift($r)]); + } + + if ($lookupRows === 2 && !$hasResultVector) { + $result_vector = array_pop($lookup_vector); + $lookup_vector = array_shift($lookup_vector); + } + + if ($lookupColumns !== 2) { + foreach ($lookup_vector as &$value) { + if (is_array($value)) { + $k = array_keys($value); + $key1 = $key2 = array_shift($k); + ++$key2; + $dataValue1 = $value[$key1]; + } else { + $key1 = 0; + $key2 = 1; + $dataValue1 = $value; + } + $dataValue2 = array_shift($result_vector); + if (is_array($dataValue2)) { + $dataValue2 = array_shift($dataValue2); + } + $value = [$key1 => $dataValue1, $key2 => $dataValue2]; + } + unset($value); + } + + return self::VLOOKUP($lookup_value, $lookup_vector, 2); + } + + /** + * FORMULATEXT. + * + * @param mixed $cellReference The cell to check + * @param Cell $pCell The current cell (containing this formula) + * + * @return string + */ + public static function FORMULATEXT($cellReference = '', Cell $pCell = null) + { + if ($pCell === null) { + return Functions::REF(); + } + + preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches); + + $cellReference = $matches[6] . $matches[7]; + $worksheetName = trim($matches[3], "'"); + $worksheet = (!empty($worksheetName)) + ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName) + : $pCell->getWorksheet(); + + if (!$worksheet->getCell($cellReference)->isFormula()) { + return Functions::NA(); + } + + return $worksheet->getCell($cellReference)->getValue(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php new file mode 100755 index 0000000..a06f3a3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php @@ -0,0 +1,1650 @@ + 1; --$i) { + if (($value % $i) == 0) { + $factorArray = array_merge($factorArray, self::factors($value / $i)); + $factorArray = array_merge($factorArray, self::factors($i)); + if ($i <= sqrt($value)) { + break; + } + } + } + if (!empty($factorArray)) { + rsort($factorArray); + + return $factorArray; + } + + return [(int) $value]; + } + + private static function romanCut($num, $n) + { + return ($num - ($num % $n)) / $n; + } + + /** + * ATAN2. + * + * This function calculates the arc tangent of the two variables x and y. It is similar to + * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used + * to determine the quadrant of the result. + * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a + * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between + * -pi and pi, excluding -pi. + * + * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard + * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function. + * + * Excel Function: + * ATAN2(xCoordinate,yCoordinate) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $xCoordinate the x-coordinate of the point + * @param float $yCoordinate the y-coordinate of the point + * + * @return float the inverse tangent of the specified x- and y-coordinates + */ + public static function ATAN2($xCoordinate = null, $yCoordinate = null) + { + $xCoordinate = Functions::flattenSingleValue($xCoordinate); + $yCoordinate = Functions::flattenSingleValue($yCoordinate); + + $xCoordinate = ($xCoordinate !== null) ? $xCoordinate : 0.0; + $yCoordinate = ($yCoordinate !== null) ? $yCoordinate : 0.0; + + if (((is_numeric($xCoordinate)) || (is_bool($xCoordinate))) && + ((is_numeric($yCoordinate))) || (is_bool($yCoordinate))) { + $xCoordinate = (float) $xCoordinate; + $yCoordinate = (float) $yCoordinate; + + if (($xCoordinate == 0) && ($yCoordinate == 0)) { + return Functions::DIV0(); + } + + return atan2($yCoordinate, $xCoordinate); + } + + return Functions::VALUE(); + } + + /** + * CEILING. + * + * Returns number rounded up, away from zero, to the nearest multiple of significance. + * For example, if you want to avoid using pennies in your prices and your product is + * priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the + * nearest nickel. + * + * Excel Function: + * CEILING(number[,significance]) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $number the number you want to round + * @param float $significance the multiple to which you want to round + * + * @return float Rounded Number + */ + public static function CEILING($number, $significance = null) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + + if (($significance === null) && + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)) { + $significance = $number / abs($number); + } + + if ((is_numeric($number)) && (is_numeric($significance))) { + if (($number == 0.0) || ($significance == 0.0)) { + return 0.0; + } elseif (self::SIGN($number) == self::SIGN($significance)) { + return ceil($number / $significance) * $significance; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + /** + * COMBIN. + * + * Returns the number of combinations for a given number of items. Use COMBIN to + * determine the total possible number of groups for a given number of items. + * + * Excel Function: + * COMBIN(numObjs,numInSet) + * + * @category Mathematical and Trigonometric Functions + * + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each combination + * + * @return int Number of combinations + */ + public static function COMBIN($numObjs, $numInSet) + { + $numObjs = Functions::flattenSingleValue($numObjs); + $numInSet = Functions::flattenSingleValue($numInSet); + + if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { + if ($numObjs < $numInSet) { + return Functions::NAN(); + } elseif ($numInSet < 0) { + return Functions::NAN(); + } + + return round(self::FACT($numObjs) / self::FACT($numObjs - $numInSet)) / self::FACT($numInSet); + } + + return Functions::VALUE(); + } + + /** + * EVEN. + * + * Returns number rounded up to the nearest even integer. + * You can use this function for processing items that come in twos. For example, + * a packing crate accepts rows of one or two items. The crate is full when + * the number of items, rounded up to the nearest two, matches the crate's + * capacity. + * + * Excel Function: + * EVEN(number) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $number Number to round + * + * @return int Rounded Number + */ + public static function EVEN($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 0; + } elseif (is_bool($number)) { + $number = (int) $number; + } + + if (is_numeric($number)) { + $significance = 2 * self::SIGN($number); + + return (int) self::CEILING($number, $significance); + } + + return Functions::VALUE(); + } + + /** + * FACT. + * + * Returns the factorial of a number. + * The factorial of a number is equal to 1*2*3*...* number. + * + * Excel Function: + * FACT(factVal) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $factVal Factorial Value + * + * @return int Factorial + */ + public static function FACT($factVal) + { + $factVal = Functions::flattenSingleValue($factVal); + + if (is_numeric($factVal)) { + if ($factVal < 0) { + return Functions::NAN(); + } + $factLoop = floor($factVal); + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + if ($factVal > $factLoop) { + return Functions::NAN(); + } + } + + $factorial = 1; + while ($factLoop > 1) { + $factorial *= $factLoop--; + } + + return $factorial; + } + + return Functions::VALUE(); + } + + /** + * FACTDOUBLE. + * + * Returns the double factorial of a number. + * + * Excel Function: + * FACTDOUBLE(factVal) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $factVal Factorial Value + * + * @return int Double Factorial + */ + public static function FACTDOUBLE($factVal) + { + $factLoop = Functions::flattenSingleValue($factVal); + + if (is_numeric($factLoop)) { + $factLoop = floor($factLoop); + if ($factVal < 0) { + return Functions::NAN(); + } + $factorial = 1; + while ($factLoop > 1) { + $factorial *= $factLoop--; + --$factLoop; + } + + return $factorial; + } + + return Functions::VALUE(); + } + + /** + * FLOOR. + * + * Rounds number down, toward zero, to the nearest multiple of significance. + * + * Excel Function: + * FLOOR(number[,significance]) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $number Number to round + * @param float $significance Significance + * + * @return float Rounded Number + */ + public static function FLOOR($number, $significance = null) + { + $number = Functions::flattenSingleValue($number); + $significance = Functions::flattenSingleValue($significance); + + if (($significance === null) && + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC)) { + $significance = $number / abs($number); + } + + if ((is_numeric($number)) && (is_numeric($significance))) { + if ($significance == 0.0) { + return Functions::DIV0(); + } elseif ($number == 0.0) { + return 0.0; + } elseif (self::SIGN($number) == self::SIGN($significance)) { + return floor($number / $significance) * $significance; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + private static function evaluateGCD($a, $b) + { + return $b ? self::evaluateGCD($b, $a % $b) : $a; + } + + /** + * GCD. + * + * Returns the greatest common divisor of a series of numbers. + * The greatest common divisor is the largest integer that divides both + * number1 and number2 without a remainder. + * + * Excel Function: + * GCD(number1[,number2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return int Greatest Common Divisor + */ + public static function GCD(...$args) + { + $args = Functions::flattenArray($args); + // Loop through arguments + foreach (Functions::flattenArray($args) as $value) { + if (!is_numeric($value)) { + return Functions::VALUE(); + } elseif ($value < 0) { + return Functions::NAN(); + } + } + + $gcd = (int) array_pop($args); + do { + $gcd = self::evaluateGCD($gcd, (int) array_pop($args)); + } while (!empty($args)); + + return $gcd; + } + + /** + * INT. + * + * Casts a floating point value to an integer + * + * Excel Function: + * INT(number) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $number Number to cast to an integer + * + * @return int Integer value + */ + public static function INT($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 0; + } elseif (is_bool($number)) { + return (int) $number; + } + if (is_numeric($number)) { + return (int) floor($number); + } + + return Functions::VALUE(); + } + + /** + * LCM. + * + * Returns the lowest common multiplier of a series of numbers + * The least common multiple is the smallest positive integer that is a multiple + * of all integer arguments number1, number2, and so on. Use LCM to add fractions + * with different denominators. + * + * Excel Function: + * LCM(number1[,number2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return int Lowest Common Multiplier + */ + public static function LCM(...$args) + { + $returnValue = 1; + $allPoweredFactors = []; + // Loop through arguments + foreach (Functions::flattenArray($args) as $value) { + if (!is_numeric($value)) { + return Functions::VALUE(); + } + if ($value == 0) { + return 0; + } elseif ($value < 0) { + return Functions::NAN(); + } + $myFactors = self::factors(floor($value)); + $myCountedFactors = array_count_values($myFactors); + $myPoweredFactors = []; + foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) { + $myPoweredFactors[$myCountedFactor] = pow($myCountedFactor, $myCountedPower); + } + foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) { + if (isset($allPoweredFactors[$myPoweredValue])) { + if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) { + $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; + } + } else { + $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; + } + } + } + foreach ($allPoweredFactors as $allPoweredFactor) { + $returnValue *= (int) $allPoweredFactor; + } + + return $returnValue; + } + + /** + * LOG_BASE. + * + * Returns the logarithm of a number to a specified base. The default base is 10. + * + * Excel Function: + * LOG(number[,base]) + * + * @category Mathematical and Trigonometric Functions + * + * @param float $number The positive real number for which you want the logarithm + * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. + * + * @return float + */ + public static function logBase($number = null, $base = 10) + { + $number = Functions::flattenSingleValue($number); + $base = ($base === null) ? 10 : (float) Functions::flattenSingleValue($base); + + if ((!is_numeric($base)) || (!is_numeric($number))) { + return Functions::VALUE(); + } + if (($base <= 0) || ($number <= 0)) { + return Functions::NAN(); + } + + return log($number, $base); + } + + /** + * MDETERM. + * + * Returns the matrix determinant of an array. + * + * Excel Function: + * MDETERM(array) + * + * @category Mathematical and Trigonometric Functions + * + * @param array $matrixValues A matrix of values + * + * @return float + */ + public static function MDETERM($matrixValues) + { + $matrixData = []; + if (!is_array($matrixValues)) { + $matrixValues = [[$matrixValues]]; + } + + $row = $maxColumn = 0; + foreach ($matrixValues as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $column = 0; + foreach ($matrixRow as $matrixCell) { + if ((is_string($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixData[$row][$column] = $matrixCell; + ++$column; + } + if ($column > $maxColumn) { + $maxColumn = $column; + } + ++$row; + } + + $matrix = new Matrix($matrixData); + if (!$matrix->isSquare()) { + return Functions::VALUE(); + } + + try { + return $matrix->determinant(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MINVERSE. + * + * Returns the inverse matrix for the matrix stored in an array. + * + * Excel Function: + * MINVERSE(array) + * + * @category Mathematical and Trigonometric Functions + * + * @param array $matrixValues A matrix of values + * + * @return array + */ + public static function MINVERSE($matrixValues) + { + $matrixData = []; + if (!is_array($matrixValues)) { + $matrixValues = [[$matrixValues]]; + } + + $row = $maxColumn = 0; + foreach ($matrixValues as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $column = 0; + foreach ($matrixRow as $matrixCell) { + if ((is_string($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixData[$row][$column] = $matrixCell; + ++$column; + } + if ($column > $maxColumn) { + $maxColumn = $column; + } + ++$row; + } + + $matrix = new Matrix($matrixData); + if (!$matrix->isSquare()) { + return Functions::VALUE(); + } + + if ($matrix->determinant() == 0.0) { + return Functions::NAN(); + } + + try { + return $matrix->inverse()->toArray(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MMULT. + * + * @param array $matrixData1 A matrix of values + * @param array $matrixData2 A matrix of values + * + * @return array + */ + public static function MMULT($matrixData1, $matrixData2) + { + $matrixAData = $matrixBData = []; + if (!is_array($matrixData1)) { + $matrixData1 = [[$matrixData1]]; + } + if (!is_array($matrixData2)) { + $matrixData2 = [[$matrixData2]]; + } + + try { + $rowA = 0; + foreach ($matrixData1 as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $columnA = 0; + foreach ($matrixRow as $matrixCell) { + if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixAData[$rowA][$columnA] = $matrixCell; + ++$columnA; + } + ++$rowA; + } + $matrixA = new Matrix($matrixAData); + $rowB = 0; + foreach ($matrixData2 as $matrixRow) { + if (!is_array($matrixRow)) { + $matrixRow = [$matrixRow]; + } + $columnB = 0; + foreach ($matrixRow as $matrixCell) { + if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { + return Functions::VALUE(); + } + $matrixBData[$rowB][$columnB] = $matrixCell; + ++$columnB; + } + ++$rowB; + } + $matrixB = new Matrix($matrixBData); + + if ($columnA != $rowB) { + return Functions::VALUE(); + } + + return $matrixA->multiply($matrixB)->toArray(); + } catch (MatrixException $ex) { + return Functions::VALUE(); + } + } + + /** + * MOD. + * + * @param int $a Dividend + * @param int $b Divisor + * + * @return int Remainder + */ + public static function MOD($a = 1, $b = 1) + { + $a = (float) Functions::flattenSingleValue($a); + $b = (float) Functions::flattenSingleValue($b); + + if ($b == 0.0) { + return Functions::DIV0(); + } elseif (($a < 0.0) && ($b > 0.0)) { + return $b - fmod(abs($a), $b); + } elseif (($a > 0.0) && ($b < 0.0)) { + return $b + fmod($a, abs($b)); + } + + return fmod($a, $b); + } + + /** + * MROUND. + * + * Rounds a number to the nearest multiple of a specified value + * + * @param float $number Number to round + * @param int $multiple Multiple to which you want to round $number + * + * @return float Rounded Number + */ + public static function MROUND($number, $multiple) + { + $number = Functions::flattenSingleValue($number); + $multiple = Functions::flattenSingleValue($multiple); + + if ((is_numeric($number)) && (is_numeric($multiple))) { + if ($multiple == 0) { + return 0; + } + if ((self::SIGN($number)) == (self::SIGN($multiple))) { + $multiplier = 1 / $multiple; + + return round($number * $multiplier) / $multiplier; + } + + return Functions::NAN(); + } + + return Functions::VALUE(); + } + + /** + * MULTINOMIAL. + * + * Returns the ratio of the factorial of a sum of values to the product of factorials. + * + * @param array of mixed Data Series + * + * @return float + */ + public static function MULTINOMIAL(...$args) + { + $summer = 0; + $divisor = 1; + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if (is_numeric($arg)) { + if ($arg < 1) { + return Functions::NAN(); + } + $summer += floor($arg); + $divisor *= self::FACT($arg); + } else { + return Functions::VALUE(); + } + } + + // Return + if ($summer > 0) { + $summer = self::FACT($summer); + + return $summer / $divisor; + } + + return 0; + } + + /** + * ODD. + * + * Returns number rounded up to the nearest odd integer. + * + * @param float $number Number to round + * + * @return int Rounded Number + */ + public static function ODD($number) + { + $number = Functions::flattenSingleValue($number); + + if ($number === null) { + return 1; + } elseif (is_bool($number)) { + return 1; + } elseif (is_numeric($number)) { + $significance = self::SIGN($number); + if ($significance == 0) { + return 1; + } + + $result = self::CEILING($number, $significance); + if ($result == self::EVEN($result)) { + $result += $significance; + } + + return (int) $result; + } + + return Functions::VALUE(); + } + + /** + * POWER. + * + * Computes x raised to the power y. + * + * @param float $x + * @param float $y + * + * @return float + */ + public static function POWER($x = 0, $y = 2) + { + $x = Functions::flattenSingleValue($x); + $y = Functions::flattenSingleValue($y); + + // Validate parameters + if ($x == 0.0 && $y == 0.0) { + return Functions::NAN(); + } elseif ($x == 0.0 && $y < 0.0) { + return Functions::DIV0(); + } + + // Return + $result = pow($x, $y); + + return (!is_nan($result) && !is_infinite($result)) ? $result : Functions::NAN(); + } + + /** + * PRODUCT. + * + * PRODUCT returns the product of all the values and cells referenced in the argument list. + * + * Excel Function: + * PRODUCT(value1[,value2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function PRODUCT(...$args) + { + // Return value + $returnValue = null; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = $arg; + } else { + $returnValue *= $arg; + } + } + } + + // Return + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * QUOTIENT. + * + * QUOTIENT function returns the integer portion of a division. Numerator is the divided number + * and denominator is the divisor. + * + * Excel Function: + * QUOTIENT(value1[,value2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function QUOTIENT(...$args) + { + // Return value + $returnValue = null; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = ($arg == 0) ? 0 : $arg; + } else { + if (($returnValue == 0) || ($arg == 0)) { + $returnValue = 0; + } else { + $returnValue /= $arg; + } + } + } + } + + // Return + return (int) $returnValue; + } + + /** + * RAND. + * + * @param int $min Minimal value + * @param int $max Maximal value + * + * @return int Random number + */ + public static function RAND($min = 0, $max = 0) + { + $min = Functions::flattenSingleValue($min); + $max = Functions::flattenSingleValue($max); + + if ($min == 0 && $max == 0) { + return (mt_rand(0, 10000000)) / 10000000; + } + + return mt_rand($min, $max); + } + + public static function ROMAN($aValue, $style = 0) + { + $aValue = Functions::flattenSingleValue($aValue); + $style = ($style === null) ? 0 : (int) Functions::flattenSingleValue($style); + if ((!is_numeric($aValue)) || ($aValue < 0) || ($aValue >= 4000)) { + return Functions::VALUE(); + } + $aValue = (int) $aValue; + if ($aValue == 0) { + return ''; + } + + $mill = ['', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM']; + $cent = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM']; + $tens = ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC']; + $ones = ['', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; + + $roman = ''; + while ($aValue > 5999) { + $roman .= 'M'; + $aValue -= 1000; + } + $m = self::romanCut($aValue, 1000); + $aValue %= 1000; + $c = self::romanCut($aValue, 100); + $aValue %= 100; + $t = self::romanCut($aValue, 10); + $aValue %= 10; + + return $roman . $mill[$m] . $cent[$c] . $tens[$t] . $ones[$aValue]; + } + + /** + * ROUNDUP. + * + * Rounds a number up to a specified number of decimal places + * + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * + * @return float Rounded Number + */ + public static function ROUNDUP($number, $digits) + { + $number = Functions::flattenSingleValue($number); + $digits = Functions::flattenSingleValue($digits); + + if ((is_numeric($number)) && (is_numeric($digits))) { + $significance = pow(10, (int) $digits); + if ($number < 0.0) { + return floor($number * $significance) / $significance; + } + + return ceil($number * $significance) / $significance; + } + + return Functions::VALUE(); + } + + /** + * ROUNDDOWN. + * + * Rounds a number down to a specified number of decimal places + * + * @param float $number Number to round + * @param int $digits Number of digits to which you want to round $number + * + * @return float Rounded Number + */ + public static function ROUNDDOWN($number, $digits) + { + $number = Functions::flattenSingleValue($number); + $digits = Functions::flattenSingleValue($digits); + + if ((is_numeric($number)) && (is_numeric($digits))) { + $significance = pow(10, (int) $digits); + if ($number < 0.0) { + return ceil($number * $significance) / $significance; + } + + return floor($number * $significance) / $significance; + } + + return Functions::VALUE(); + } + + /** + * SERIESSUM. + * + * Returns the sum of a power series + * + * @param float $x Input value to the power series + * @param float $n Initial power to which you want to raise $x + * @param float $m Step by which to increase $n for each term in the series + * @param array of mixed Data Series + * + * @return float + */ + public static function SERIESSUM(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + $x = array_shift($aArgs); + $n = array_shift($aArgs); + $m = array_shift($aArgs); + + if ((is_numeric($x)) && (is_numeric($n)) && (is_numeric($m))) { + // Calculate + $i = 0; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += $arg * pow($x, $n + ($m * $i++)); + } else { + return Functions::VALUE(); + } + } + + return $returnValue; + } + + return Functions::VALUE(); + } + + /** + * SIGN. + * + * Determines the sign of a number. Returns 1 if the number is positive, zero (0) + * if the number is 0, and -1 if the number is negative. + * + * @param float $number Number to round + * + * @return int sign value + */ + public static function SIGN($number) + { + $number = Functions::flattenSingleValue($number); + + if (is_bool($number)) { + return (int) $number; + } + if (is_numeric($number)) { + if ($number == 0.0) { + return 0; + } + + return $number / abs($number); + } + + return Functions::VALUE(); + } + + /** + * SQRTPI. + * + * Returns the square root of (number * pi). + * + * @param float $number Number + * + * @return float Square Root of Number * Pi + */ + public static function SQRTPI($number) + { + $number = Functions::flattenSingleValue($number); + + if (is_numeric($number)) { + if ($number < 0) { + return Functions::NAN(); + } + + return sqrt($number * M_PI); + } + + return Functions::VALUE(); + } + + protected static function filterHiddenArgs($cellReference, $args) + { + return array_filter( + $args, + function ($index) use ($cellReference) { + list(, $row, $column) = explode('.', $index); + + return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() && + $cellReference->getWorksheet()->getColumnDimension($column)->getVisible(); + }, + ARRAY_FILTER_USE_KEY + ); + } + + protected static function filterFormulaArgs($cellReference, $args) + { + return array_filter( + $args, + function ($index) use ($cellReference) { + list(, $row, $column) = explode('.', $index); + if ($cellReference->getWorksheet()->cellExists($column . $row)) { + //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula + $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula(); + $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue()); + + return !$isFormula || $cellFormula; + } + + return true; + }, + ARRAY_FILTER_USE_KEY + ); + } + + /** + * SUBTOTAL. + * + * Returns a subtotal in a list or database. + * + * @param int the number 1 to 11 that specifies which function to + * use in calculating subtotals within a range + * list + * Numbers 101 to 111 shadow the functions of 1 to 11 + * but ignore any values in the range that are + * in hidden rows or columns + * @param array of mixed Data Series + * + * @return float + */ + public static function SUBTOTAL(...$args) + { + $cellReference = array_pop($args); + $aArgs = Functions::flattenArrayIndexed($args); + $subtotal = array_shift($aArgs); + + // Calculate + if ((is_numeric($subtotal)) && (!is_string($subtotal))) { + if ($subtotal > 100) { + $aArgs = self::filterHiddenArgs($cellReference, $aArgs); + $subtotal -= 100; + } + + $aArgs = self::filterFormulaArgs($cellReference, $aArgs); + switch ($subtotal) { + case 1: + return Statistical::AVERAGE($aArgs); + case 2: + return Statistical::COUNT($aArgs); + case 3: + return Statistical::COUNTA($aArgs); + case 4: + return Statistical::MAX($aArgs); + case 5: + return Statistical::MIN($aArgs); + case 6: + return self::PRODUCT($aArgs); + case 7: + return Statistical::STDEV($aArgs); + case 8: + return Statistical::STDEVP($aArgs); + case 9: + return self::SUM($aArgs); + case 10: + return Statistical::VARFunc($aArgs); + case 11: + return Statistical::VARP($aArgs); + } + } + + return Functions::VALUE(); + } + + /** + * SUM. + * + * SUM computes the sum of all the values and cells referenced in the argument list. + * + * Excel Function: + * SUM(value1[,value2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function SUM(...$args) + { + $returnValue = 0; + + // Loop through the arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += $arg; + } + } + + return $returnValue; + } + + /** + * SUMIF. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * SUMIF(value1[,value2[, ...]],condition) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be summed + * @param mixed $sumArgs + * + * @return float + */ + public static function SUMIF($aArgs, $condition, $sumArgs = []) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $sumArgs = Functions::flattenArray($sumArgs); + if (empty($sumArgs)) { + $sumArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + // Loop through arguments + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + $arg = str_replace('"', '""', $arg); + $arg = Calculation::wrapResult(strtoupper($arg)); + } + + $testCondition = '=' . $arg . $condition; + $sumValue = array_key_exists($key, $sumArgs) ? $sumArgs[$key] : 0; + + if (is_numeric($sumValue) && + Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is it a value within our criteria and only numeric can be added to the result + $returnValue += $sumValue; + } + } + + return $returnValue; + } + + /** + * SUMIFS. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * SUMIFS(value1[,value2[, ...]],condition) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed $args Data values + * @param string $condition the criteria that defines which cells will be summed + * + * @return float + */ + public static function SUMIFS(...$args) + { + $arrayList = $args; + + // Return value + $returnValue = 0; + + $sumArgs = Functions::flattenArray(array_shift($arrayList)); + $aArgsArray = []; + $conditions = []; + + while (count($arrayList) > 0) { + $aArgsArray[] = Functions::flattenArray(array_shift($arrayList)); + $conditions[] = Functions::ifCondition(array_shift($arrayList)); + } + + // Loop through each sum and see if arguments and conditions are true + foreach ($sumArgs as $index => $value) { + $valid = true; + + foreach ($conditions as $cidx => $condition) { + $arg = $aArgsArray[$cidx][$index]; + + // Loop through arguments + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is not a value within our criteria + $valid = false; + + break; // if false found, don't need to check other conditions + } + } + + if ($valid) { + $returnValue += $value; + } + } + + // Return + return $returnValue; + } + + /** + * SUMPRODUCT. + * + * Excel Function: + * SUMPRODUCT(value1[,value2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function SUMPRODUCT(...$args) + { + $arrayList = $args; + + $wrkArray = Functions::flattenArray(array_shift($arrayList)); + $wrkCellCount = count($wrkArray); + + for ($i = 0; $i < $wrkCellCount; ++$i) { + if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) { + $wrkArray[$i] = 0; + } + } + + foreach ($arrayList as $matrixData) { + $array2 = Functions::flattenArray($matrixData); + $count = count($array2); + if ($wrkCellCount != $count) { + return Functions::VALUE(); + } + + foreach ($array2 as $i => $val) { + if ((!is_numeric($val)) || (is_string($val))) { + $val = 0; + } + $wrkArray[$i] *= $val; + } + } + + return array_sum($wrkArray); + } + + /** + * SUMSQ. + * + * SUMSQ returns the sum of the squares of the arguments + * + * Excel Function: + * SUMSQ(value1[,value2[, ...]]) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function SUMSQ(...$args) + { + $returnValue = 0; + + // Loop through arguments + foreach (Functions::flattenArray($args) as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $returnValue += ($arg * $arg); + } + } + + return $returnValue; + } + + /** + * SUMX2MY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMX2MY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]); + } + } + + return $result; + } + + /** + * SUMX2PY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMX2PY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]); + } + } + + return $result; + } + + /** + * SUMXMY2. + * + * @param mixed[] $matrixData1 Matrix #1 + * @param mixed[] $matrixData2 Matrix #2 + * + * @return float + */ + public static function SUMXMY2($matrixData1, $matrixData2) + { + $array1 = Functions::flattenArray($matrixData1); + $array2 = Functions::flattenArray($matrixData2); + $count = min(count($array1), count($array2)); + + $result = 0; + for ($i = 0; $i < $count; ++$i) { + if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && + ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { + $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]); + } + } + + return $result; + } + + /** + * TRUNC. + * + * Truncates value to the number of fractional digits by number_digits. + * + * @param float $value + * @param int $digits + * + * @return float Truncated value + */ + public static function TRUNC($value = 0, $digits = 0) + { + $value = Functions::flattenSingleValue($value); + $digits = Functions::flattenSingleValue($digits); + + // Validate parameters + if ((!is_numeric($value)) || (!is_numeric($digits))) { + return Functions::VALUE(); + } + $digits = floor($digits); + + // Truncate + $adjust = pow(10, $digits); + + if (($digits > 0) && (rtrim((int) ((abs($value) - abs((int) $value)) * $adjust), '0') < $adjust / 10)) { + return $value; + } + + return ((int) ($value * $adjust)) / $adjust; + } + + /** + * SEC. + * + * Returns the secant of an angle. + * + * @param float $angle Number + * + * @return float|string The secant of the angle + */ + public static function SEC($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = cos($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * SECH. + * + * Returns the hyperbolic secant of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic secant of the angle + */ + public static function SECH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = cosh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * CSC. + * + * Returns the cosecant of an angle. + * + * @param float $angle Number + * + * @return float|string The cosecant of the angle + */ + public static function CSC($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = sin($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * CSCH. + * + * Returns the hyperbolic cosecant of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic cosecant of the angle + */ + public static function CSCH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = sinh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * COT. + * + * Returns the cotangent of an angle. + * + * @param float $angle Number + * + * @return float|string The cotangent of the angle + */ + public static function COT($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = tan($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * COTH. + * + * Returns the hyperbolic cotangent of an angle. + * + * @param float $angle Number + * + * @return float|string The hyperbolic cotangent of the angle + */ + public static function COTH($angle) + { + $angle = Functions::flattenSingleValue($angle); + + if (!is_numeric($angle)) { + return Functions::VALUE(); + } + + $result = tanh($angle); + + return ($result == 0.0) ? Functions::DIV0() : 1 / $result; + } + + /** + * ACOT. + * + * Returns the arccotangent of a number. + * + * @param float $number Number + * + * @return float|string The arccotangent of the number + */ + public static function ACOT($number) + { + $number = Functions::flattenSingleValue($number); + + if (!is_numeric($number)) { + return Functions::VALUE(); + } + + return (M_PI / 2) - atan($number); + } + + /** + * ACOTH. + * + * Returns the hyperbolic arccotangent of a number. + * + * @param float $number Number + * + * @return float|string The hyperbolic arccotangent of the number + */ + public static function ACOTH($number) + { + $number = Functions::flattenSingleValue($number); + + if (!is_numeric($number)) { + return Functions::VALUE(); + } + + $result = log(($number + 1) / ($number - 1)) / 2; + + return is_nan($result) ? Functions::NAN() : $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php new file mode 100755 index 0000000..395b46a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php @@ -0,0 +1,3621 @@ + $value) { + if ((is_bool($value)) || (is_string($value)) || ($value === null)) { + unset($array1[$key], $array2[$key]); + } + } + foreach ($array2 as $key => $value) { + if ((is_bool($value)) || (is_string($value)) || ($value === null)) { + unset($array1[$key], $array2[$key]); + } + } + $array1 = array_merge($array1); + $array2 = array_merge($array2); + + return true; + } + + /** + * Incomplete beta function. + * + * @author Jaco van Kooten + * @author Paul Meagher + * + * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992). + * + * @param mixed $x require 0<=x<=1 + * @param mixed $p require p>0 + * @param mixed $q require q>0 + * + * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow + */ + private static function incompleteBeta($x, $p, $q) + { + if ($x <= 0.0) { + return 0.0; + } elseif ($x >= 1.0) { + return 1.0; + } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) { + return 0.0; + } + $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x)); + if ($x < ($p + 1.0) / ($p + $q + 2.0)) { + return $beta_gam * self::betaFraction($x, $p, $q) / $p; + } + + return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q); + } + + // Function cache for logBeta function + private static $logBetaCacheP = 0.0; + + private static $logBetaCacheQ = 0.0; + + private static $logBetaCacheResult = 0.0; + + /** + * The natural logarithm of the beta function. + * + * @param mixed $p require p>0 + * @param mixed $q require q>0 + * + * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow + * + * @author Jaco van Kooten + */ + private static function logBeta($p, $q) + { + if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) { + self::$logBetaCacheP = $p; + self::$logBetaCacheQ = $q; + if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) { + self::$logBetaCacheResult = 0.0; + } else { + self::$logBetaCacheResult = self::logGamma($p) + self::logGamma($q) - self::logGamma($p + $q); + } + } + + return self::$logBetaCacheResult; + } + + /** + * Evaluates of continued fraction part of incomplete beta function. + * Based on an idea from Numerical Recipes (W.H. Press et al, 1992). + * + * @author Jaco van Kooten + * + * @param mixed $x + * @param mixed $p + * @param mixed $q + * + * @return float + */ + private static function betaFraction($x, $p, $q) + { + $c = 1.0; + $sum_pq = $p + $q; + $p_plus = $p + 1.0; + $p_minus = $p - 1.0; + $h = 1.0 - $sum_pq * $x / $p_plus; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $frac = $h; + $m = 1; + $delta = 0.0; + while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) { + $m2 = 2 * $m; + // even index for d + $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2)); + $h = 1.0 + $d * $h; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $c = 1.0 + $d / $c; + if (abs($c) < self::XMININ) { + $c = self::XMININ; + } + $frac *= $h * $c; + // odd index for d + $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2)); + $h = 1.0 + $d * $h; + if (abs($h) < self::XMININ) { + $h = self::XMININ; + } + $h = 1.0 / $h; + $c = 1.0 + $d / $c; + if (abs($c) < self::XMININ) { + $c = self::XMININ; + } + $delta = $h * $c; + $frac *= $delta; + ++$m; + } + + return $frac; + } + + /** + * logGamma function. + * + * @version 1.1 + * + * @author Jaco van Kooten + * + * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher. + * + * The natural logarithm of the gamma function.
+ * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz
+ * Applied Mathematics Division
+ * Argonne National Laboratory
+ * Argonne, IL 60439
+ *

+ * References: + *

    + *
  1. W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural + * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.
  2. + *
  3. K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.
  4. + *
  5. Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.
  6. + *
+ *

+ *

+ * From the original documentation: + *

+ *

+ * This routine calculates the LOG(GAMMA) function for a positive real argument X. + * Computation is based on an algorithm outlined in references 1 and 2. + * The program uses rational functions that theoretically approximate LOG(GAMMA) + * to at least 18 significant decimal digits. The approximation for X > 12 is from + * reference 3, while approximations for X < 12.0 are similar to those in reference + * 1, but are unpublished. The accuracy achieved depends on the arithmetic system, + * the compiler, the intrinsic functions, and proper selection of the + * machine-dependent constants. + *

+ *

+ * Error returns:
+ * The program returns the value XINF for X .LE. 0.0 or when overflow would occur. + * The computation is believed to be free of underflow and overflow. + *

+ * + * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305 + */ + + // Function cache for logGamma + private static $logGammaCacheResult = 0.0; + + private static $logGammaCacheX = 0.0; + + private static function logGamma($x) + { + // Log Gamma related constants + static $lg_d1 = -0.5772156649015328605195174; + static $lg_d2 = 0.4227843350984671393993777; + static $lg_d4 = 1.791759469228055000094023; + + static $lg_p1 = [ + 4.945235359296727046734888, + 201.8112620856775083915565, + 2290.838373831346393026739, + 11319.67205903380828685045, + 28557.24635671635335736389, + 38484.96228443793359990269, + 26377.48787624195437963534, + 7225.813979700288197698961, + ]; + static $lg_p2 = [ + 4.974607845568932035012064, + 542.4138599891070494101986, + 15506.93864978364947665077, + 184793.2904445632425417223, + 1088204.76946882876749847, + 3338152.967987029735917223, + 5106661.678927352456275255, + 3074109.054850539556250927, + ]; + static $lg_p4 = [ + 14745.02166059939948905062, + 2426813.369486704502836312, + 121475557.4045093227939592, + 2663432449.630976949898078, + 29403789566.34553899906876, + 170266573776.5398868392998, + 492612579337.743088758812, + 560625185622.3951465078242, + ]; + static $lg_q1 = [ + 67.48212550303777196073036, + 1113.332393857199323513008, + 7738.757056935398733233834, + 27639.87074403340708898585, + 54993.10206226157329794414, + 61611.22180066002127833352, + 36351.27591501940507276287, + 8785.536302431013170870835, + ]; + static $lg_q2 = [ + 183.0328399370592604055942, + 7765.049321445005871323047, + 133190.3827966074194402448, + 1136705.821321969608938755, + 5267964.117437946917577538, + 13467014.54311101692290052, + 17827365.30353274213975932, + 9533095.591844353613395747, + ]; + static $lg_q4 = [ + 2690.530175870899333379843, + 639388.5654300092398984238, + 41355999.30241388052042842, + 1120872109.61614794137657, + 14886137286.78813811542398, + 101680358627.2438228077304, + 341747634550.7377132798597, + 446315818741.9713286462081, + ]; + static $lg_c = [ + -0.001910444077728, + 8.4171387781295e-4, + -5.952379913043012e-4, + 7.93650793500350248e-4, + -0.002777777777777681622553, + 0.08333333333333333331554247, + 0.0057083835261, + ]; + + // Rough estimate of the fourth root of logGamma_xBig + static $lg_frtbig = 2.25e76; + static $pnt68 = 0.6796875; + + if ($x == self::$logGammaCacheX) { + return self::$logGammaCacheResult; + } + $y = $x; + if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) { + if ($y <= self::EPS) { + $res = -log($y); + } elseif ($y <= 1.5) { + // --------------------- + // EPS .LT. X .LE. 1.5 + // --------------------- + if ($y < $pnt68) { + $corr = -log($y); + $xm1 = $y; + } else { + $corr = 0.0; + $xm1 = $y - 1.0; + } + if ($y <= 0.5 || $y >= $pnt68) { + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm1 + $lg_p1[$i]; + $xden = $xden * $xm1 + $lg_q1[$i]; + } + $res = $corr + $xm1 * ($lg_d1 + $xm1 * ($xnum / $xden)); + } else { + $xm2 = $y - 1.0; + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm2 + $lg_p2[$i]; + $xden = $xden * $xm2 + $lg_q2[$i]; + } + $res = $corr + $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); + } + } elseif ($y <= 4.0) { + // --------------------- + // 1.5 .LT. X .LE. 4.0 + // --------------------- + $xm2 = $y - 2.0; + $xden = 1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm2 + $lg_p2[$i]; + $xden = $xden * $xm2 + $lg_q2[$i]; + } + $res = $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); + } elseif ($y <= 12.0) { + // ---------------------- + // 4.0 .LT. X .LE. 12.0 + // ---------------------- + $xm4 = $y - 4.0; + $xden = -1.0; + $xnum = 0.0; + for ($i = 0; $i < 8; ++$i) { + $xnum = $xnum * $xm4 + $lg_p4[$i]; + $xden = $xden * $xm4 + $lg_q4[$i]; + } + $res = $lg_d4 + $xm4 * ($xnum / $xden); + } else { + // --------------------------------- + // Evaluate for argument .GE. 12.0 + // --------------------------------- + $res = 0.0; + if ($y <= $lg_frtbig) { + $res = $lg_c[6]; + $ysq = $y * $y; + for ($i = 0; $i < 6; ++$i) { + $res = $res / $ysq + $lg_c[$i]; + } + $res /= $y; + $corr = log($y); + $res = $res + log(self::SQRT2PI) - 0.5 * $corr; + $res += $y * ($corr - 1.0); + } + } + } else { + // -------------------------- + // Return for bad arguments + // -------------------------- + $res = self::MAX_VALUE; + } + // ------------------------------ + // Final adjustments and return + // ------------------------------ + self::$logGammaCacheX = $x; + self::$logGammaCacheResult = $res; + + return $res; + } + + // + // Private implementation of the incomplete Gamma function + // + private static function incompleteGamma($a, $x) + { + static $max = 32; + $summer = 0; + for ($n = 0; $n <= $max; ++$n) { + $divisor = $a; + for ($i = 1; $i <= $n; ++$i) { + $divisor *= ($a + $i); + } + $summer += (pow($x, $n) / $divisor); + } + + return pow($x, $a) * exp(0 - $x) * $summer; + } + + // + // Private implementation of the Gamma function + // + private static function gamma($data) + { + if ($data == 0.0) { + return 0; + } + + static $p0 = 1.000000000190015; + static $p = [ + 1 => 76.18009172947146, + 2 => -86.50532032941677, + 3 => 24.01409824083091, + 4 => -1.231739572450155, + 5 => 1.208650973866179e-3, + 6 => -5.395239384953e-6, + ]; + + $y = $x = $data; + $tmp = $x + 5.5; + $tmp -= ($x + 0.5) * log($tmp); + + $summer = $p0; + for ($j = 1; $j <= 6; ++$j) { + $summer += ($p[$j] / ++$y); + } + + return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x)); + } + + /* + * inverse_ncdf.php + * ------------------- + * begin : Friday, January 16, 2004 + * copyright : (C) 2004 Michael Nickerson + * email : nickersonm@yahoo.com + * + */ + private static function inverseNcdf($p) + { + // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to + // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as + // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html + // I have not checked the accuracy of this implementation. Be aware that PHP + // will truncate the coeficcients to 14 digits. + + // You have permission to use and distribute this function freely for + // whatever purpose you want, but please show common courtesy and give credit + // where credit is due. + + // Input paramater is $p - probability - where 0 < p < 1. + + // Coefficients in rational approximations + static $a = [ + 1 => -3.969683028665376e+01, + 2 => 2.209460984245205e+02, + 3 => -2.759285104469687e+02, + 4 => 1.383577518672690e+02, + 5 => -3.066479806614716e+01, + 6 => 2.506628277459239e+00, + ]; + + static $b = [ + 1 => -5.447609879822406e+01, + 2 => 1.615858368580409e+02, + 3 => -1.556989798598866e+02, + 4 => 6.680131188771972e+01, + 5 => -1.328068155288572e+01, + ]; + + static $c = [ + 1 => -7.784894002430293e-03, + 2 => -3.223964580411365e-01, + 3 => -2.400758277161838e+00, + 4 => -2.549732539343734e+00, + 5 => 4.374664141464968e+00, + 6 => 2.938163982698783e+00, + ]; + + static $d = [ + 1 => 7.784695709041462e-03, + 2 => 3.224671290700398e-01, + 3 => 2.445134137142996e+00, + 4 => 3.754408661907416e+00, + ]; + + // Define lower and upper region break-points. + $p_low = 0.02425; //Use lower region approx. below this + $p_high = 1 - $p_low; //Use upper region approx. above this + + if (0 < $p && $p < $p_low) { + // Rational approximation for lower region. + $q = sqrt(-2 * log($p)); + + return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / + (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); + } elseif ($p_low <= $p && $p <= $p_high) { + // Rational approximation for central region. + $q = $p - 0.5; + $r = $q * $q; + + return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q / + ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1); + } elseif ($p_high < $p && $p < 1) { + // Rational approximation for upper region. + $q = sqrt(-2 * log(1 - $p)); + + return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / + (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); + } + // If 0 < p < 1, return a null value + return Functions::NULL(); + } + + /** + * AVEDEV. + * + * Returns the average of the absolute deviations of data points from their mean. + * AVEDEV is a measure of the variability in a data set. + * + * Excel Function: + * AVEDEV(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function AVEDEV(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean != Functions::DIV0()) { + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = abs($arg - $aMean); + } else { + $returnValue += abs($arg - $aMean); + } + ++$aCount; + } + } + + // Return + if ($aCount == 0) { + return Functions::DIV0(); + } + + return $returnValue / $aCount; + } + + return Functions::NAN(); + } + + /** + * AVERAGE. + * + * Returns the average (arithmetic mean) of the arguments + * + * Excel Function: + * AVERAGE(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function AVERAGE(...$args) + { + $returnValue = $aCount = 0; + + // Loop through arguments + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = $arg; + } else { + $returnValue += $arg; + } + ++$aCount; + } + } + + // Return + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * AVERAGEA. + * + * Returns the average of its arguments, including numbers, text, and logical values + * + * Excel Function: + * AVERAGEA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function AVERAGEA(...$args) + { + $returnValue = null; + + $aCount = 0; + // Loop through arguments + foreach (Functions::flattenArrayIndexed($args) as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if ($returnValue === null) { + $returnValue = $arg; + } else { + $returnValue += $arg; + } + ++$aCount; + } + } + } + + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * AVERAGEIF. + * + * Returns the average value from a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * AVERAGEIF(value1[,value2[, ...]],condition) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be checked + * @param mixed[] $averageArgs Data values + * + * @return float + */ + public static function AVERAGEIF($aArgs, $condition, $averageArgs = []) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $averageArgs = Functions::flattenArray($averageArgs); + if (empty($averageArgs)) { + $averageArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + // Loop through arguments + $aCount = 0; + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue += $arg; + ++$aCount; + } + } + } + + if ($aCount > 0) { + return $returnValue / $aCount; + } + + return Functions::DIV0(); + } + + /** + * BETADIST. + * + * Returns the beta distribution. + * + * @param float $value Value at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * @param mixed $rMin + * @param mixed $rMax + * + * @return float + */ + public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) + { + $value = Functions::flattenSingleValue($value); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + $rMin = Functions::flattenSingleValue($rMin); + $rMax = Functions::flattenSingleValue($rMax); + + if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { + if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) { + return Functions::NAN(); + } + if ($rMin > $rMax) { + $tmp = $rMin; + $rMin = $rMax; + $rMax = $tmp; + } + $value -= $rMin; + $value /= ($rMax - $rMin); + + return self::incompleteBeta($value, $alpha, $beta); + } + + return Functions::VALUE(); + } + + /** + * BETAINV. + * + * Returns the inverse of the beta distribution. + * + * @param float $probability Probability at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * @param float $rMin Minimum value + * @param float $rMax Maximum value + * + * @return float + */ + public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) + { + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + $rMin = Functions::flattenSingleValue($rMin); + $rMax = Functions::flattenSingleValue($rMax); + + if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { + if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ($rMin > $rMax) { + $tmp = $rMin; + $rMin = $rMax; + $rMax = $tmp; + } + $a = 0; + $b = 2; + + $i = 0; + while ((($b - $a) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + $guess = ($a + $b) / 2; + $result = self::BETADIST($guess, $alpha, $beta); + if (($result == $probability) || ($result == 0)) { + $b = $a; + } elseif ($result > $probability) { + $b = $guess; + } else { + $a = $guess; + } + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($rMin + $guess * ($rMax - $rMin), 12); + } + + return Functions::VALUE(); + } + + /** + * BINOMDIST. + * + * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with + * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, + * when trials are independent, and when the probability of success is constant throughout the + * experiment. For example, BINOMDIST can calculate the probability that two of the next three + * babies born are male. + * + * @param float $value Number of successes in trials + * @param float $trials Number of trials + * @param float $probability Probability of success on each trial + * @param bool $cumulative + * + * @return float + * + * @todo Cumulative distribution function + */ + public static function BINOMDIST($value, $trials, $probability, $cumulative) + { + $value = floor(Functions::flattenSingleValue($value)); + $trials = floor(Functions::flattenSingleValue($trials)); + $probability = Functions::flattenSingleValue($probability); + + if ((is_numeric($value)) && (is_numeric($trials)) && (is_numeric($probability))) { + if (($value < 0) || ($value > $trials)) { + return Functions::NAN(); + } + if (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + $summer = 0; + for ($i = 0; $i <= $value; ++$i) { + $summer += MathTrig::COMBIN($trials, $i) * pow($probability, $i) * pow(1 - $probability, $trials - $i); + } + + return $summer; + } + + return MathTrig::COMBIN($trials, $value) * pow($probability, $value) * pow(1 - $probability, $trials - $value); + } + } + + return Functions::VALUE(); + } + + /** + * CHIDIST. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $value Value for the function + * @param float $degrees degrees of freedom + * + * @return float + */ + public static function CHIDIST($value, $degrees) + { + $value = Functions::flattenSingleValue($value); + $degrees = floor(Functions::flattenSingleValue($degrees)); + + if ((is_numeric($value)) && (is_numeric($degrees))) { + if ($degrees < 1) { + return Functions::NAN(); + } + if ($value < 0) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + return 1; + } + + return Functions::NAN(); + } + + return 1 - (self::incompleteGamma($degrees / 2, $value / 2) / self::gamma($degrees / 2)); + } + + return Functions::VALUE(); + } + + /** + * CHIINV. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $probability Probability for the function + * @param float $degrees degrees of freedom + * + * @return float + */ + public static function CHIINV($probability, $degrees) + { + $probability = Functions::flattenSingleValue($probability); + $degrees = floor(Functions::flattenSingleValue($degrees)); + + if ((is_numeric($probability)) && (is_numeric($degrees))) { + $xLo = 100; + $xHi = 0; + + $x = $xNew = 1; + $dx = 1; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $result = self::CHIDIST($x, $degrees); + $error = $result - $probability; + if ($error == 0.0) { + $dx = 0; + } elseif ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + // Avoid division by zero + if ($result != 0.0) { + $dx = $error / $result; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($x, 12); + } + + return Functions::VALUE(); + } + + /** + * CONFIDENCE. + * + * Returns the confidence interval for a population mean + * + * @param float $alpha + * @param float $stdDev Standard Deviation + * @param float $size + * + * @return float + */ + public static function CONFIDENCE($alpha, $stdDev, $size) + { + $alpha = Functions::flattenSingleValue($alpha); + $stdDev = Functions::flattenSingleValue($stdDev); + $size = floor(Functions::flattenSingleValue($size)); + + if ((is_numeric($alpha)) && (is_numeric($stdDev)) && (is_numeric($size))) { + if (($alpha <= 0) || ($alpha >= 1)) { + return Functions::NAN(); + } + if (($stdDev <= 0) || ($size < 1)) { + return Functions::NAN(); + } + + return self::NORMSINV(1 - $alpha / 2) * $stdDev / sqrt($size); + } + + return Functions::VALUE(); + } + + /** + * CORREL. + * + * Returns covariance, the average of the products of deviations for each data point pair. + * + * @param mixed $yValues array of mixed Data Series Y + * @param null|mixed $xValues array of mixed Data Series X + * + * @return float + */ + public static function CORREL($yValues, $xValues = null) + { + if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) { + return Functions::VALUE(); + } + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getCorrelation(); + } + + /** + * COUNT. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * COUNT(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNT(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTA. + * + * Counts the number of cells that are not empty within the list of arguments + * + * Excel Function: + * COUNTA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNTA(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric, boolean or string value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTBLANK. + * + * Counts the number of empty cells within the list of arguments + * + * Excel Function: + * COUNTBLANK(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return int + */ + public static function COUNTBLANK(...$args) + { + $returnValue = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a blank cell? + if (($arg === null) || ((is_string($arg)) && ($arg == ''))) { + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COUNTIF. + * + * Counts the number of cells that contain numbers within the list of arguments + * + * Excel Function: + * COUNTIF(value1[,value2[, ...]],condition) + * + * @category Statistical Functions + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be counted + * + * @return int + */ + public static function COUNTIF($aArgs, $condition) + { + $returnValue = 0; + + $aArgs = Functions::flattenArray($aArgs); + $condition = Functions::ifCondition($condition); + // Loop through arguments + foreach ($aArgs as $arg) { + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + // Is it a value within our criteria + ++$returnValue; + } + } + + return $returnValue; + } + + /** + * COVAR. + * + * Returns covariance, the average of the products of deviations for each data point pair. + * + * @param mixed $yValues array of mixed Data Series Y + * @param mixed $xValues array of mixed Data Series X + * + * @return float + */ + public static function COVAR($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getCovariance(); + } + + /** + * CRITBINOM. + * + * Returns the smallest value for which the cumulative binomial distribution is greater + * than or equal to a criterion value + * + * See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used + * + * @param float $trials number of Bernoulli trials + * @param float $probability probability of a success on each trial + * @param float $alpha criterion value + * + * @return int + * + * @todo Warning. This implementation differs from the algorithm detailed on the MS + * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess + * This eliminates a potential endless loop error, but may have an adverse affect on the + * accuracy of the function (although all my tests have so far returned correct results). + */ + public static function CRITBINOM($trials, $probability, $alpha) + { + $trials = floor(Functions::flattenSingleValue($trials)); + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + + if ((is_numeric($trials)) && (is_numeric($probability)) && (is_numeric($alpha))) { + if ($trials < 0) { + return Functions::NAN(); + } elseif (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } elseif (($alpha < 0) || ($alpha > 1)) { + return Functions::NAN(); + } elseif ($alpha <= 0.5) { + $t = sqrt(log(1 / ($alpha * $alpha))); + $trialsApprox = 0 - ($t + (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t)); + } else { + $t = sqrt(log(1 / pow(1 - $alpha, 2))); + $trialsApprox = $t - (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t); + } + $Guess = floor($trials * $probability + $trialsApprox * sqrt($trials * $probability * (1 - $probability))); + if ($Guess < 0) { + $Guess = 0; + } elseif ($Guess > $trials) { + $Guess = $trials; + } + + $TotalUnscaledProbability = $UnscaledPGuess = $UnscaledCumPGuess = 0.0; + $EssentiallyZero = 10e-12; + + $m = floor($trials * $probability); + ++$TotalUnscaledProbability; + if ($m == $Guess) { + ++$UnscaledPGuess; + } + if ($m <= $Guess) { + ++$UnscaledCumPGuess; + } + + $PreviousValue = 1; + $Done = false; + $k = $m + 1; + while ((!$Done) && ($k <= $trials)) { + $CurrentValue = $PreviousValue * ($trials - $k + 1) * $probability / ($k * (1 - $probability)); + $TotalUnscaledProbability += $CurrentValue; + if ($k == $Guess) { + $UnscaledPGuess += $CurrentValue; + } + if ($k <= $Guess) { + $UnscaledCumPGuess += $CurrentValue; + } + if ($CurrentValue <= $EssentiallyZero) { + $Done = true; + } + $PreviousValue = $CurrentValue; + ++$k; + } + + $PreviousValue = 1; + $Done = false; + $k = $m - 1; + while ((!$Done) && ($k >= 0)) { + $CurrentValue = $PreviousValue * $k + 1 * (1 - $probability) / (($trials - $k) * $probability); + $TotalUnscaledProbability += $CurrentValue; + if ($k == $Guess) { + $UnscaledPGuess += $CurrentValue; + } + if ($k <= $Guess) { + $UnscaledCumPGuess += $CurrentValue; + } + if ($CurrentValue <= $EssentiallyZero) { + $Done = true; + } + $PreviousValue = $CurrentValue; + --$k; + } + + $PGuess = $UnscaledPGuess / $TotalUnscaledProbability; + $CumPGuess = $UnscaledCumPGuess / $TotalUnscaledProbability; + + $CumPGuessMinus1 = $CumPGuess - 1; + + while (true) { + if (($CumPGuessMinus1 < $alpha) && ($CumPGuess >= $alpha)) { + return $Guess; + } elseif (($CumPGuessMinus1 < $alpha) && ($CumPGuess < $alpha)) { + $PGuessPlus1 = $PGuess * ($trials - $Guess) * $probability / $Guess / (1 - $probability); + $CumPGuessMinus1 = $CumPGuess; + $CumPGuess = $CumPGuess + $PGuessPlus1; + $PGuess = $PGuessPlus1; + ++$Guess; + } elseif (($CumPGuessMinus1 >= $alpha) && ($CumPGuess >= $alpha)) { + $PGuessMinus1 = $PGuess * $Guess * (1 - $probability) / ($trials - $Guess + 1) / $probability; + $CumPGuess = $CumPGuessMinus1; + $CumPGuessMinus1 = $CumPGuessMinus1 - $PGuess; + $PGuess = $PGuessMinus1; + --$Guess; + } + } + } + + return Functions::VALUE(); + } + + /** + * DEVSQ. + * + * Returns the sum of squares of deviations of data points from their sample mean. + * + * Excel Function: + * DEVSQ(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function DEVSQ(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean != Functions::DIV0()) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + // Is it a numeric value? + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || + (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = pow(($arg - $aMean), 2); + } else { + $returnValue += pow(($arg - $aMean), 2); + } + ++$aCount; + } + } + + // Return + if ($returnValue === null) { + return Functions::NAN(); + } + + return $returnValue; + } + + return self::NA(); + } + + /** + * EXPONDIST. + * + * Returns the exponential distribution. Use EXPONDIST to model the time between events, + * such as how long an automated bank teller takes to deliver cash. For example, you can + * use EXPONDIST to determine the probability that the process takes at most 1 minute. + * + * @param float $value Value of the function + * @param float $lambda The parameter value + * @param bool $cumulative + * + * @return float + */ + public static function EXPONDIST($value, $lambda, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $lambda = Functions::flattenSingleValue($lambda); + $cumulative = Functions::flattenSingleValue($cumulative); + + if ((is_numeric($value)) && (is_numeric($lambda))) { + if (($value < 0) || ($lambda < 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 1 - exp(0 - $value * $lambda); + } + + return $lambda * exp(0 - $value * $lambda); + } + } + + return Functions::VALUE(); + } + + /** + * FISHER. + * + * Returns the Fisher transformation at x. This transformation produces a function that + * is normally distributed rather than skewed. Use this function to perform hypothesis + * testing on the correlation coefficient. + * + * @param float $value + * + * @return float + */ + public static function FISHER($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + if (($value <= -1) || ($value >= 1)) { + return Functions::NAN(); + } + + return 0.5 * log((1 + $value) / (1 - $value)); + } + + return Functions::VALUE(); + } + + /** + * FISHERINV. + * + * Returns the inverse of the Fisher transformation. Use this transformation when + * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then + * FISHERINV(y) = x. + * + * @param float $value + * + * @return float + */ + public static function FISHERINV($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + return (exp(2 * $value) - 1) / (exp(2 * $value) + 1); + } + + return Functions::VALUE(); + } + + /** + * FORECAST. + * + * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. + * + * @param float $xValue Value of X for which we want to find Y + * @param mixed $yValues array of mixed Data Series Y + * @param mixed $xValues of mixed Data Series X + * + * @return float + */ + public static function FORECAST($xValue, $yValues, $xValues) + { + $xValue = Functions::flattenSingleValue($xValue); + if (!is_numeric($xValue)) { + return Functions::VALUE(); + } elseif (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getValueOfYForX($xValue); + } + + /** + * GAMMADIST. + * + * Returns the gamma distribution. + * + * @param float $value Value at which you want to evaluate the distribution + * @param float $a Parameter to the distribution + * @param float $b Parameter to the distribution + * @param bool $cumulative + * + * @return float + */ + public static function GAMMADIST($value, $a, $b, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $a = Functions::flattenSingleValue($a); + $b = Functions::flattenSingleValue($b); + + if ((is_numeric($value)) && (is_numeric($a)) && (is_numeric($b))) { + if (($value < 0) || ($a <= 0) || ($b <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return self::incompleteGamma($a, $value / $b) / self::gamma($a); + } + + return (1 / (pow($b, $a) * self::gamma($a))) * pow($value, $a - 1) * exp(0 - ($value / $b)); + } + } + + return Functions::VALUE(); + } + + /** + * GAMMAINV. + * + * Returns the inverse of the beta distribution. + * + * @param float $probability Probability at which you want to evaluate the distribution + * @param float $alpha Parameter to the distribution + * @param float $beta Parameter to the distribution + * + * @return float + */ + public static function GAMMAINV($probability, $alpha, $beta) + { + $probability = Functions::flattenSingleValue($probability); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + + if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta))) { + if (($alpha <= 0) || ($beta <= 0) || ($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + + $xLo = 0; + $xHi = $alpha * $beta * 5; + + $x = $xNew = 1; + $error = $pdf = 0; + $dx = 1024; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $error = self::GAMMADIST($x, $alpha, $beta, true) - $probability; + if ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + $pdf = self::GAMMADIST($x, $alpha, $beta, false); + // Avoid division by zero + if ($pdf != 0.0) { + $dx = $error / $pdf; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return $x; + } + + return Functions::VALUE(); + } + + /** + * GAMMALN. + * + * Returns the natural logarithm of the gamma function. + * + * @param float $value + * + * @return float + */ + public static function GAMMALN($value) + { + $value = Functions::flattenSingleValue($value); + + if (is_numeric($value)) { + if ($value <= 0) { + return Functions::NAN(); + } + + return log(self::gamma($value)); + } + + return Functions::VALUE(); + } + + /** + * GEOMEAN. + * + * Returns the geometric mean of an array or range of positive data. For example, you + * can use GEOMEAN to calculate average growth rate given compound interest with + * variable rates. + * + * Excel Function: + * GEOMEAN(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function GEOMEAN(...$args) + { + $aArgs = Functions::flattenArray($args); + + $aMean = MathTrig::PRODUCT($aArgs); + if (is_numeric($aMean) && ($aMean > 0)) { + $aCount = self::COUNT($aArgs); + if (self::MIN($aArgs) > 0) { + return pow($aMean, (1 / $aCount)); + } + } + + return Functions::NAN(); + } + + /** + * GROWTH. + * + * Returns values along a predicted emponential Trend + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * @param mixed[] $newValues Values of X for which we want to find Y + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * + * @return array of float + */ + public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true) + { + $yValues = Functions::flattenArray($yValues); + $xValues = Functions::flattenArray($xValues); + $newValues = Functions::flattenArray($newValues); + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + + $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const); + if (empty($newValues)) { + $newValues = $bestFitExponential->getXValues(); + } + + $returnArray = []; + foreach ($newValues as $xValue) { + $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue); + } + + return $returnArray; + } + + /** + * HARMEAN. + * + * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the + * arithmetic mean of reciprocals. + * + * Excel Function: + * HARMEAN(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function HARMEAN(...$args) + { + // Return value + $returnValue = Functions::NA(); + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + if (self::MIN($aArgs) < 0) { + return Functions::NAN(); + } + $aCount = 0; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($arg <= 0) { + return Functions::NAN(); + } + if ($returnValue === null) { + $returnValue = (1 / $arg); + } else { + $returnValue += (1 / $arg); + } + ++$aCount; + } + } + + // Return + if ($aCount > 0) { + return 1 / ($returnValue / $aCount); + } + + return $returnValue; + } + + /** + * HYPGEOMDIST. + * + * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of + * sample successes, given the sample size, population successes, and population size. + * + * @param float $sampleSuccesses Number of successes in the sample + * @param float $sampleNumber Size of the sample + * @param float $populationSuccesses Number of successes in the population + * @param float $populationNumber Population size + * + * @return float + */ + public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber) + { + $sampleSuccesses = floor(Functions::flattenSingleValue($sampleSuccesses)); + $sampleNumber = floor(Functions::flattenSingleValue($sampleNumber)); + $populationSuccesses = floor(Functions::flattenSingleValue($populationSuccesses)); + $populationNumber = floor(Functions::flattenSingleValue($populationNumber)); + + if ((is_numeric($sampleSuccesses)) && (is_numeric($sampleNumber)) && (is_numeric($populationSuccesses)) && (is_numeric($populationNumber))) { + if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) { + return Functions::NAN(); + } + if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) { + return Functions::NAN(); + } + if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) { + return Functions::NAN(); + } + + return MathTrig::COMBIN($populationSuccesses, $sampleSuccesses) * + MathTrig::COMBIN($populationNumber - $populationSuccesses, $sampleNumber - $sampleSuccesses) / + MathTrig::COMBIN($populationNumber, $sampleNumber); + } + + return Functions::VALUE(); + } + + /** + * INTERCEPT. + * + * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float + */ + public static function INTERCEPT($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getIntersect(); + } + + /** + * KURT. + * + * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness + * or flatness of a distribution compared with the normal distribution. Positive + * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a + * relatively flat distribution. + * + * @param array ...$args Data Series + * + * @return float + */ + public static function KURT(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + $mean = self::AVERAGE($aArgs); + $stdDev = self::STDEV($aArgs); + + if ($stdDev > 0) { + $count = $summer = 0; + // Loop through arguments + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summer += pow((($arg - $mean) / $stdDev), 4); + ++$count; + } + } + } + + // Return + if ($count > 3) { + return $summer * ($count * ($count + 1) / (($count - 1) * ($count - 2) * ($count - 3))) - (3 * pow($count - 1, 2) / (($count - 2) * ($count - 3))); + } + } + + return Functions::DIV0(); + } + + /** + * LARGE. + * + * Returns the nth largest value in a data set. You can use this function to + * select a value based on its relative standing. + * + * Excel Function: + * LARGE(value1[,value2[, ...]],entry) + * + * @category Statistical Functions + * + * @param mixed $args Data values + * @param int $entry Position (ordered from the largest) in the array or range of data to return + * + * @return float + */ + public static function LARGE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = floor(array_pop($aArgs)); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $count = self::COUNT($mArgs); + $entry = floor(--$entry); + if (($entry < 0) || ($entry >= $count) || ($count == 0)) { + return Functions::NAN(); + } + rsort($mArgs); + + return $mArgs[$entry]; + } + + return Functions::VALUE(); + } + + /** + * LINEST. + * + * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, + * and then returns an array that describes the line. + * + * @param mixed[] $yValues Data Series Y + * @param null|mixed[] $xValues Data Series X + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * @param bool $stats a logical value specifying whether to return additional regression statistics + * + * @return array + */ + public static function LINEST($yValues, $xValues = null, $const = true, $stats = false) + { + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); + if ($xValues === null) { + $xValues = range(1, count(Functions::flattenArray($yValues))); + } + + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return 0; + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const); + if ($stats) { + return [ + [ + $bestFitLinear->getSlope(), + $bestFitLinear->getSlopeSE(), + $bestFitLinear->getGoodnessOfFit(), + $bestFitLinear->getF(), + $bestFitLinear->getSSRegression(), + ], + [ + $bestFitLinear->getIntersect(), + $bestFitLinear->getIntersectSE(), + $bestFitLinear->getStdevOfResiduals(), + $bestFitLinear->getDFResiduals(), + $bestFitLinear->getSSResiduals(), + ], + ]; + } + + return [ + $bestFitLinear->getSlope(), + $bestFitLinear->getIntersect(), + ]; + } + + /** + * LOGEST. + * + * Calculates an exponential curve that best fits the X and Y data series, + * and then returns an array that describes the line. + * + * @param mixed[] $yValues Data Series Y + * @param null|mixed[] $xValues Data Series X + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * @param bool $stats a logical value specifying whether to return additional regression statistics + * + * @return array + */ + public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false) + { + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats); + if ($xValues === null) { + $xValues = range(1, count(Functions::flattenArray($yValues))); + } + + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + foreach ($yValues as $value) { + if ($value <= 0.0) { + return Functions::NAN(); + } + } + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return 1; + } + + $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const); + if ($stats) { + return [ + [ + $bestFitExponential->getSlope(), + $bestFitExponential->getSlopeSE(), + $bestFitExponential->getGoodnessOfFit(), + $bestFitExponential->getF(), + $bestFitExponential->getSSRegression(), + ], + [ + $bestFitExponential->getIntersect(), + $bestFitExponential->getIntersectSE(), + $bestFitExponential->getStdevOfResiduals(), + $bestFitExponential->getDFResiduals(), + $bestFitExponential->getSSResiduals(), + ], + ]; + } + + return [ + $bestFitExponential->getSlope(), + $bestFitExponential->getIntersect(), + ]; + } + + /** + * LOGINV. + * + * Returns the inverse of the normal cumulative distribution + * + * @param float $probability + * @param float $mean + * @param float $stdDev + * + * @return float + * + * @todo Try implementing P J Acklam's refinement algorithm for greater + * accuracy if I can get my head round the mathematics + * (as described at) http://home.online.no/~pjacklam/notes/invnorm/ + */ + public static function LOGINV($probability, $mean, $stdDev) + { + $probability = Functions::flattenSingleValue($probability); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($probability < 0) || ($probability > 1) || ($stdDev <= 0)) { + return Functions::NAN(); + } + + return exp($mean + $stdDev * self::NORMSINV($probability)); + } + + return Functions::VALUE(); + } + + /** + * LOGNORMDIST. + * + * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed + * with parameters mean and standard_dev. + * + * @param float $value + * @param float $mean + * @param float $stdDev + * + * @return float + */ + public static function LOGNORMDIST($value, $mean, $stdDev) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($value <= 0) || ($stdDev <= 0)) { + return Functions::NAN(); + } + + return self::NORMSDIST((log($value) - $mean) / $stdDev); + } + + return Functions::VALUE(); + } + + /** + * MAX. + * + * MAX returns the value of the element of the values passed that has the highest value, + * with negative numbers considered smaller than positive numbers. + * + * Excel Function: + * MAX(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MAX(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MAXA. + * + * Returns the greatest value in a list of arguments, including numbers, text, and logical values + * + * Excel Function: + * MAXA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MAXA(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MAXIF. + * + * Counts the maximum value within a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * MAXIF(value1[,value2[, ...]],condition) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be checked + * @param mixed $sumArgs + * + * @return float + */ + public static function MAXIF($aArgs, $condition, $sumArgs = []) + { + $returnValue = null; + + $aArgs = Functions::flattenArray($aArgs); + $sumArgs = Functions::flattenArray($sumArgs); + if (empty($sumArgs)) { + $sumArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + // Loop through arguments + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + if (($returnValue === null) || ($arg > $returnValue)) { + $returnValue = $arg; + } + } + } + + return $returnValue; + } + + /** + * MEDIAN. + * + * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. + * + * Excel Function: + * MEDIAN(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MEDIAN(...$args) + { + $returnValue = Functions::NAN(); + + $mArgs = []; + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + + $mValueCount = count($mArgs); + if ($mValueCount > 0) { + sort($mArgs, SORT_NUMERIC); + $mValueCount = $mValueCount / 2; + if ($mValueCount == floor($mValueCount)) { + $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2; + } else { + $mValueCount = floor($mValueCount); + $returnValue = $mArgs[$mValueCount]; + } + } + + return $returnValue; + } + + /** + * MIN. + * + * MIN returns the value of the element of the values passed that has the smallest value, + * with negative numbers considered smaller than positive numbers. + * + * Excel Function: + * MIN(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MIN(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if (($returnValue === null) || ($arg < $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MINA. + * + * Returns the smallest value in a list of arguments, including numbers, text, and logical values + * + * Excel Function: + * MINA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MINA(...$args) + { + $returnValue = null; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if (($returnValue === null) || ($arg < $returnValue)) { + $returnValue = $arg; + } + } + } + + if ($returnValue === null) { + return 0; + } + + return $returnValue; + } + + /** + * MINIF. + * + * Returns the minimum value within a range of cells that contain numbers within the list of arguments + * + * Excel Function: + * MINIF(value1[,value2[, ...]],condition) + * + * @category Mathematical and Trigonometric Functions + * + * @param mixed $aArgs Data values + * @param string $condition the criteria that defines which cells will be checked + * @param mixed $sumArgs + * + * @return float + */ + public static function MINIF($aArgs, $condition, $sumArgs = []) + { + $returnValue = null; + + $aArgs = Functions::flattenArray($aArgs); + $sumArgs = Functions::flattenArray($sumArgs); + if (empty($sumArgs)) { + $sumArgs = $aArgs; + } + $condition = Functions::ifCondition($condition); + // Loop through arguments + foreach ($aArgs as $key => $arg) { + if (!is_numeric($arg)) { + $arg = Calculation::wrapResult(strtoupper($arg)); + } + $testCondition = '=' . $arg . $condition; + if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) { + if (($returnValue === null) || ($arg < $returnValue)) { + $returnValue = $arg; + } + } + } + + return $returnValue; + } + + // + // Special variant of array_count_values that isn't limited to strings and integers, + // but can work with floating point numbers as values + // + private static function modeCalc($data) + { + $frequencyArray = []; + foreach ($data as $datum) { + $found = false; + foreach ($frequencyArray as $key => $value) { + if ((string) $value['value'] == (string) $datum) { + ++$frequencyArray[$key]['frequency']; + $found = true; + + break; + } + } + if (!$found) { + $frequencyArray[] = [ + 'value' => $datum, + 'frequency' => 1, + ]; + } + } + + foreach ($frequencyArray as $key => $value) { + $frequencyList[$key] = $value['frequency']; + $valueList[$key] = $value['value']; + } + array_multisort($frequencyList, SORT_DESC, $valueList, SORT_ASC, SORT_NUMERIC, $frequencyArray); + + if ($frequencyArray[0]['frequency'] == 1) { + return Functions::NA(); + } + + return $frequencyArray[0]['value']; + } + + /** + * MODE. + * + * Returns the most frequently occurring, or repetitive, value in an array or range of data + * + * Excel Function: + * MODE(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function MODE(...$args) + { + $returnValue = Functions::NA(); + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + + if (!empty($mArgs)) { + return self::modeCalc($mArgs); + } + + return $returnValue; + } + + /** + * NEGBINOMDIST. + * + * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that + * there will be number_f failures before the number_s-th success, when the constant + * probability of a success is probability_s. This function is similar to the binomial + * distribution, except that the number of successes is fixed, and the number of trials is + * variable. Like the binomial, trials are assumed to be independent. + * + * @param float $failures Number of Failures + * @param float $successes Threshold number of Successes + * @param float $probability Probability of success on each trial + * + * @return float + */ + public static function NEGBINOMDIST($failures, $successes, $probability) + { + $failures = floor(Functions::flattenSingleValue($failures)); + $successes = floor(Functions::flattenSingleValue($successes)); + $probability = Functions::flattenSingleValue($probability); + + if ((is_numeric($failures)) && (is_numeric($successes)) && (is_numeric($probability))) { + if (($failures < 0) || ($successes < 1)) { + return Functions::NAN(); + } elseif (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) { + if (($failures + $successes - 1) <= 0) { + return Functions::NAN(); + } + } + + return (MathTrig::COMBIN($failures + $successes - 1, $successes - 1)) * (pow($probability, $successes)) * (pow(1 - $probability, $failures)); + } + + return Functions::VALUE(); + } + + /** + * NORMDIST. + * + * Returns the normal distribution for the specified mean and standard deviation. This + * function has a very wide range of applications in statistics, including hypothesis + * testing. + * + * @param float $value + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * @param bool $cumulative + * + * @return float + */ + public static function NORMDIST($value, $mean, $stdDev, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if ($stdDev < 0) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 0.5 * (1 + Engineering::erfVal(($value - $mean) / ($stdDev * sqrt(2)))); + } + + return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (pow($value - $mean, 2) / (2 * ($stdDev * $stdDev)))); + } + } + + return Functions::VALUE(); + } + + /** + * NORMINV. + * + * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. + * + * @param float $probability + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * + * @return float + */ + public static function NORMINV($probability, $mean, $stdDev) + { + $probability = Functions::flattenSingleValue($probability); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if (($probability < 0) || ($probability > 1)) { + return Functions::NAN(); + } + if ($stdDev < 0) { + return Functions::NAN(); + } + + return (self::inverseNcdf($probability) * $stdDev) + $mean; + } + + return Functions::VALUE(); + } + + /** + * NORMSDIST. + * + * Returns the standard normal cumulative distribution function. The distribution has + * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a + * table of standard normal curve areas. + * + * @param float $value + * + * @return float + */ + public static function NORMSDIST($value) + { + $value = Functions::flattenSingleValue($value); + + return self::NORMDIST($value, 0, 1, true); + } + + /** + * NORMSINV. + * + * Returns the inverse of the standard normal cumulative distribution + * + * @param float $value + * + * @return float + */ + public static function NORMSINV($value) + { + return self::NORMINV($value, 0, 1); + } + + /** + * PERCENTILE. + * + * Returns the nth percentile of values in a range.. + * + * Excel Function: + * PERCENTILE(value1[,value2[, ...]],entry) + * + * @category Statistical Functions + * + * @param mixed $args Data values + * @param float $entry Percentile value in the range 0..1, inclusive. + * + * @return float + */ + public static function PERCENTILE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = array_pop($aArgs); + + if ((is_numeric($entry)) && (!is_string($entry))) { + if (($entry < 0) || ($entry > 1)) { + return Functions::NAN(); + } + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $mValueCount = count($mArgs); + if ($mValueCount > 0) { + sort($mArgs); + $count = self::COUNT($mArgs); + $index = $entry * ($count - 1); + $iBase = floor($index); + if ($index == $iBase) { + return $mArgs[$index]; + } + $iNext = $iBase + 1; + $iProportion = $index - $iBase; + + return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion); + } + } + + return Functions::VALUE(); + } + + /** + * PERCENTRANK. + * + * Returns the rank of a value in a data set as a percentage of the data set. + * + * @param float[] $valueSet An array of, or a reference to, a list of numbers + * @param int $value the number whose rank you want to find + * @param int $significance the number of significant digits for the returned percentage value + * + * @return float + */ + public static function PERCENTRANK($valueSet, $value, $significance = 3) + { + $valueSet = Functions::flattenArray($valueSet); + $value = Functions::flattenSingleValue($value); + $significance = ($significance === null) ? 3 : (int) Functions::flattenSingleValue($significance); + + foreach ($valueSet as $key => $valueEntry) { + if (!is_numeric($valueEntry)) { + unset($valueSet[$key]); + } + } + sort($valueSet, SORT_NUMERIC); + $valueCount = count($valueSet); + if ($valueCount == 0) { + return Functions::NAN(); + } + + $valueAdjustor = $valueCount - 1; + if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) { + return Functions::NA(); + } + + $pos = array_search($value, $valueSet); + if ($pos === false) { + $pos = 0; + $testValue = $valueSet[0]; + while ($testValue < $value) { + $testValue = $valueSet[++$pos]; + } + --$pos; + $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos])); + } + + return round($pos / $valueAdjustor, $significance); + } + + /** + * PERMUT. + * + * Returns the number of permutations for a given number of objects that can be + * selected from number objects. A permutation is any set or subset of objects or + * events where internal order is significant. Permutations are different from + * combinations, for which the internal order is not significant. Use this function + * for lottery-style probability calculations. + * + * @param int $numObjs Number of different objects + * @param int $numInSet Number of objects in each permutation + * + * @return int Number of permutations + */ + public static function PERMUT($numObjs, $numInSet) + { + $numObjs = Functions::flattenSingleValue($numObjs); + $numInSet = Functions::flattenSingleValue($numInSet); + + if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { + $numInSet = floor($numInSet); + if ($numObjs < $numInSet) { + return Functions::NAN(); + } + + return round(MathTrig::FACT($numObjs) / MathTrig::FACT($numObjs - $numInSet)); + } + + return Functions::VALUE(); + } + + /** + * POISSON. + * + * Returns the Poisson distribution. A common application of the Poisson distribution + * is predicting the number of events over a specific time, such as the number of + * cars arriving at a toll plaza in 1 minute. + * + * @param float $value + * @param float $mean Mean Value + * @param bool $cumulative + * + * @return float + */ + public static function POISSON($value, $mean, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + + if ((is_numeric($value)) && (is_numeric($mean))) { + if (($value < 0) || ($mean <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + $summer = 0; + $floor = floor($value); + for ($i = 0; $i <= $floor; ++$i) { + $summer += pow($mean, $i) / MathTrig::FACT($i); + } + + return exp(0 - $mean) * $summer; + } + + return (exp(0 - $mean) * pow($mean, $value)) / MathTrig::FACT($value); + } + } + + return Functions::VALUE(); + } + + /** + * QUARTILE. + * + * Returns the quartile of a data set. + * + * Excel Function: + * QUARTILE(value1[,value2[, ...]],entry) + * + * @category Statistical Functions + * + * @param mixed $args Data values + * @param int $entry Quartile value in the range 1..3, inclusive. + * + * @return float + */ + public static function QUARTILE(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = floor(array_pop($aArgs)); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $entry /= 4; + if (($entry < 0) || ($entry > 1)) { + return Functions::NAN(); + } + + return self::PERCENTILE($aArgs, $entry); + } + + return Functions::VALUE(); + } + + /** + * RANK. + * + * Returns the rank of a number in a list of numbers. + * + * @param int $value the number whose rank you want to find + * @param float[] $valueSet An array of, or a reference to, a list of numbers + * @param int $order Order to sort the values in the value set + * + * @return float + */ + public static function RANK($value, $valueSet, $order = 0) + { + $value = Functions::flattenSingleValue($value); + $valueSet = Functions::flattenArray($valueSet); + $order = ($order === null) ? 0 : (int) Functions::flattenSingleValue($order); + + foreach ($valueSet as $key => $valueEntry) { + if (!is_numeric($valueEntry)) { + unset($valueSet[$key]); + } + } + + if ($order == 0) { + rsort($valueSet, SORT_NUMERIC); + } else { + sort($valueSet, SORT_NUMERIC); + } + $pos = array_search($value, $valueSet); + if ($pos === false) { + return Functions::NA(); + } + + return ++$pos; + } + + /** + * RSQ. + * + * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float + */ + public static function RSQ($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getGoodnessOfFit(); + } + + /** + * SKEW. + * + * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry + * of a distribution around its mean. Positive skewness indicates a distribution with an + * asymmetric tail extending toward more positive values. Negative skewness indicates a + * distribution with an asymmetric tail extending toward more negative values. + * + * @param array ...$args Data Series + * + * @return float + */ + public static function SKEW(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + $mean = self::AVERAGE($aArgs); + $stdDev = self::STDEV($aArgs); + + $count = $summer = 0; + // Loop through arguments + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summer += pow((($arg - $mean) / $stdDev), 3); + ++$count; + } + } + } + + if ($count > 2) { + return $summer * ($count / (($count - 1) * ($count - 2))); + } + + return Functions::DIV0(); + } + + /** + * SLOPE. + * + * Returns the slope of the linear regression line through data points in known_y's and known_x's. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float + */ + public static function SLOPE($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getSlope(); + } + + /** + * SMALL. + * + * Returns the nth smallest value in a data set. You can use this function to + * select a value based on its relative standing. + * + * Excel Function: + * SMALL(value1[,value2[, ...]],entry) + * + * @category Statistical Functions + * + * @param mixed $args Data values + * @param int $entry Position (ordered from the smallest) in the array or range of data to return + * + * @return float + */ + public static function SMALL(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $entry = array_pop($aArgs); + + if ((is_numeric($entry)) && (!is_string($entry))) { + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $count = self::COUNT($mArgs); + $entry = floor(--$entry); + if (($entry < 0) || ($entry >= $count) || ($count == 0)) { + return Functions::NAN(); + } + sort($mArgs); + + return $mArgs[$entry]; + } + + return Functions::VALUE(); + } + + /** + * STANDARDIZE. + * + * Returns a normalized value from a distribution characterized by mean and standard_dev. + * + * @param float $value Value to normalize + * @param float $mean Mean Value + * @param float $stdDev Standard Deviation + * + * @return float Standardized value + */ + public static function STANDARDIZE($value, $mean, $stdDev) + { + $value = Functions::flattenSingleValue($value); + $mean = Functions::flattenSingleValue($mean); + $stdDev = Functions::flattenSingleValue($stdDev); + + if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { + if ($stdDev <= 0) { + return Functions::NAN(); + } + + return ($value - $mean) / $stdDev; + } + + return Functions::VALUE(); + } + + /** + * STDEV. + * + * Estimates standard deviation based on a sample. The standard deviation is a measure of how + * widely values are dispersed from the average value (the mean). + * + * Excel Function: + * STDEV(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function STDEV(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + // Return value + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean !== null) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = pow(($arg - $aMean), 2); + } else { + $returnValue += pow(($arg - $aMean), 2); + } + ++$aCount; + } + } + + // Return + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVA. + * + * Estimates standard deviation based on a sample, including numbers, text, and logical values + * + * Excel Function: + * STDEVA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function STDEVA(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGEA($aArgs); + if ($aMean !== null) { + $aCount = -1; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if ($returnValue === null) { + $returnValue = pow(($arg - $aMean), 2); + } else { + $returnValue += pow(($arg - $aMean), 2); + } + ++$aCount; + } + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVP. + * + * Calculates standard deviation based on the entire population + * + * Excel Function: + * STDEVP(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function STDEVP(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGE($aArgs); + if ($aMean !== null) { + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + if ($returnValue === null) { + $returnValue = pow(($arg - $aMean), 2); + } else { + $returnValue += pow(($arg - $aMean), 2); + } + ++$aCount; + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STDEVPA. + * + * Calculates standard deviation based on the entire population, including numbers, text, and logical values + * + * Excel Function: + * STDEVPA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function STDEVPA(...$args) + { + $aArgs = Functions::flattenArrayIndexed($args); + + $returnValue = null; + + $aMean = self::AVERAGEA($aArgs); + if ($aMean !== null) { + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_bool($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + if ($returnValue === null) { + $returnValue = pow(($arg - $aMean), 2); + } else { + $returnValue += pow(($arg - $aMean), 2); + } + ++$aCount; + } + } + } + + if (($aCount > 0) && ($returnValue >= 0)) { + return sqrt($returnValue / $aCount); + } + } + + return Functions::DIV0(); + } + + /** + * STEYX. + * + * Returns the standard error of the predicted y-value for each x in the regression. + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * + * @return float + */ + public static function STEYX($yValues, $xValues) + { + if (!self::checkTrendArrays($yValues, $xValues)) { + return Functions::VALUE(); + } + $yValueCount = count($yValues); + $xValueCount = count($xValues); + + if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { + return Functions::NA(); + } elseif ($yValueCount == 1) { + return Functions::DIV0(); + } + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues); + + return $bestFitLinear->getStdevOfResiduals(); + } + + /** + * TDIST. + * + * Returns the probability of Student's T distribution. + * + * @param float $value Value for the function + * @param float $degrees degrees of freedom + * @param float $tails number of tails (1 or 2) + * + * @return float + */ + public static function TDIST($value, $degrees, $tails) + { + $value = Functions::flattenSingleValue($value); + $degrees = floor(Functions::flattenSingleValue($degrees)); + $tails = floor(Functions::flattenSingleValue($tails)); + + if ((is_numeric($value)) && (is_numeric($degrees)) && (is_numeric($tails))) { + if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) { + return Functions::NAN(); + } + // tdist, which finds the probability that corresponds to a given value + // of t with k degrees of freedom. This algorithm is translated from a + // pascal function on p81 of "Statistical Computing in Pascal" by D + // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd: + // London). The above Pascal algorithm is itself a translation of the + // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer + // Laboratory as reported in (among other places) "Applied Statistics + // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis + // Horwood Ltd.; W. Sussex, England). + $tterm = $degrees; + $ttheta = atan2($value, sqrt($tterm)); + $tc = cos($ttheta); + $ts = sin($ttheta); + $tsum = 0; + + if (($degrees % 2) == 1) { + $ti = 3; + $tterm = $tc; + } else { + $ti = 2; + $tterm = 1; + } + + $tsum = $tterm; + while ($ti < $degrees) { + $tterm *= $tc * $tc * ($ti - 1) / $ti; + $tsum += $tterm; + $ti += 2; + } + $tsum *= $ts; + if (($degrees % 2) == 1) { + $tsum = Functions::M_2DIVPI * ($tsum + $ttheta); + } + $tValue = 0.5 * (1 + $tsum); + if ($tails == 1) { + return 1 - abs($tValue); + } + + return 1 - abs((1 - $tValue) - $tValue); + } + + return Functions::VALUE(); + } + + /** + * TINV. + * + * Returns the one-tailed probability of the chi-squared distribution. + * + * @param float $probability Probability for the function + * @param float $degrees degrees of freedom + * + * @return float + */ + public static function TINV($probability, $degrees) + { + $probability = Functions::flattenSingleValue($probability); + $degrees = floor(Functions::flattenSingleValue($degrees)); + + if ((is_numeric($probability)) && (is_numeric($degrees))) { + $xLo = 100; + $xHi = 0; + + $x = $xNew = 1; + $dx = 1; + $i = 0; + + while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) { + // Apply Newton-Raphson step + $result = self::TDIST($x, $degrees, 2); + $error = $result - $probability; + if ($error == 0.0) { + $dx = 0; + } elseif ($error < 0.0) { + $xLo = $x; + } else { + $xHi = $x; + } + // Avoid division by zero + if ($result != 0.0) { + $dx = $error / $result; + $xNew = $x - $dx; + } + // If the NR fails to converge (which for example may be the + // case if the initial guess is too rough) we apply a bisection + // step to determine a more narrow interval around the root. + if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { + $xNew = ($xLo + $xHi) / 2; + $dx = $xNew - $x; + } + $x = $xNew; + } + if ($i == self::MAX_ITERATIONS) { + return Functions::NA(); + } + + return round($x, 12); + } + + return Functions::VALUE(); + } + + /** + * TREND. + * + * Returns values along a linear Trend + * + * @param mixed[] $yValues Data Series Y + * @param mixed[] $xValues Data Series X + * @param mixed[] $newValues Values of X for which we want to find Y + * @param bool $const a logical value specifying whether to force the intersect to equal 0 + * + * @return array of float + */ + public static function TREND($yValues, $xValues = [], $newValues = [], $const = true) + { + $yValues = Functions::flattenArray($yValues); + $xValues = Functions::flattenArray($xValues); + $newValues = Functions::flattenArray($newValues); + $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const); + + $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const); + if (empty($newValues)) { + $newValues = $bestFitLinear->getXValues(); + } + + $returnArray = []; + foreach ($newValues as $xValue) { + $returnArray[0][] = $bestFitLinear->getValueOfYForX($xValue); + } + + return $returnArray; + } + + /** + * TRIMMEAN. + * + * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean + * taken by excluding a percentage of data points from the top and bottom tails + * of a data set. + * + * Excel Function: + * TRIMEAN(value1[,value2[, ...]], $discard) + * + * @category Statistical Functions + * + * @param mixed $args Data values + * @param float $discard Percentage to discard + * + * @return float + */ + public static function TRIMMEAN(...$args) + { + $aArgs = Functions::flattenArray($args); + + // Calculate + $percent = array_pop($aArgs); + + if ((is_numeric($percent)) && (!is_string($percent))) { + if (($percent < 0) || ($percent > 1)) { + return Functions::NAN(); + } + $mArgs = []; + foreach ($aArgs as $arg) { + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $mArgs[] = $arg; + } + } + $discard = floor(self::COUNT($mArgs) * $percent / 2); + sort($mArgs); + for ($i = 0; $i < $discard; ++$i) { + array_pop($mArgs); + array_shift($mArgs); + } + + return self::AVERAGE($mArgs); + } + + return Functions::VALUE(); + } + + /** + * VARFunc. + * + * Estimates variance based on a sample. + * + * Excel Function: + * VAR(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARFunc(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + $aCount = 0; + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + + if ($aCount > 1) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); + } + + return $returnValue; + } + + /** + * VARA. + * + * Estimates variance based on a sample, including numbers, text, and logical values + * + * Excel Function: + * VARA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARA(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_string($arg)) && + (Functions::isValue($k))) { + return Functions::VALUE(); + } elseif ((is_string($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + } + + if ($aCount > 1) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); + } + + return $returnValue; + } + + /** + * VARP. + * + * Calculates variance based on the entire population + * + * Excel Function: + * VARP(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARP(...$args) + { + // Return value + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + $aCount = 0; + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + $arg = (int) $arg; + } + // Is it a numeric value? + if ((is_numeric($arg)) && (!is_string($arg))) { + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + + if ($aCount > 0) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * $aCount); + } + + return $returnValue; + } + + /** + * VARPA. + * + * Calculates variance based on the entire population, including numbers, text, and logical values + * + * Excel Function: + * VARPA(value1[,value2[, ...]]) + * + * @category Statistical Functions + * + * @param mixed ...$args Data values + * + * @return float + */ + public static function VARPA(...$args) + { + $returnValue = Functions::DIV0(); + + $summerA = $summerB = 0; + + // Loop through arguments + $aArgs = Functions::flattenArrayIndexed($args); + $aCount = 0; + foreach ($aArgs as $k => $arg) { + if ((is_string($arg)) && + (Functions::isValue($k))) { + return Functions::VALUE(); + } elseif ((is_string($arg)) && + (!Functions::isMatrixValue($k))) { + } else { + // Is it a numeric value? + if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { + if (is_bool($arg)) { + $arg = (int) $arg; + } elseif (is_string($arg)) { + $arg = 0; + } + $summerA += ($arg * $arg); + $summerB += $arg; + ++$aCount; + } + } + } + + if ($aCount > 0) { + $summerA *= $aCount; + $summerB *= $summerB; + $returnValue = ($summerA - $summerB) / ($aCount * $aCount); + } + + return $returnValue; + } + + /** + * WEIBULL. + * + * Returns the Weibull distribution. Use this distribution in reliability + * analysis, such as calculating a device's mean time to failure. + * + * @param float $value + * @param float $alpha Alpha Parameter + * @param float $beta Beta Parameter + * @param bool $cumulative + * + * @return float + */ + public static function WEIBULL($value, $alpha, $beta, $cumulative) + { + $value = Functions::flattenSingleValue($value); + $alpha = Functions::flattenSingleValue($alpha); + $beta = Functions::flattenSingleValue($beta); + + if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta))) { + if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) { + return Functions::NAN(); + } + if ((is_numeric($cumulative)) || (is_bool($cumulative))) { + if ($cumulative) { + return 1 - exp(0 - pow($value / $beta, $alpha)); + } + + return ($alpha / pow($beta, $alpha)) * pow($value, $alpha - 1) * exp(0 - pow($value / $beta, $alpha)); + } + } + + return Functions::VALUE(); + } + + /** + * ZTEST. + * + * Returns the Weibull distribution. Use this distribution in reliability + * analysis, such as calculating a device's mean time to failure. + * + * @param float $dataSet + * @param float $m0 Alpha Parameter + * @param float $sigma Beta Parameter + * + * @return float + */ + public static function ZTEST($dataSet, $m0, $sigma = null) + { + $dataSet = Functions::flattenArrayIndexed($dataSet); + $m0 = Functions::flattenSingleValue($m0); + $sigma = Functions::flattenSingleValue($sigma); + + if ($sigma === null) { + $sigma = self::STDEV($dataSet); + } + $n = count($dataSet); + + return 1 - self::NORMSDIST((self::AVERAGE($dataSet) - $m0) / ($sigma / sqrt($n))); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php new file mode 100755 index 0000000..e30b2ff --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php @@ -0,0 +1,672 @@ + 1) { + $character = mb_substr($characters, 0, 1, 'UTF-8'); + } + + return self::unicodeToOrd($character); + } + + /** + * CONCATENATE. + * + * @return string + */ + public static function CONCATENATE(...$args) + { + $returnValue = ''; + + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $arg) { + if (is_bool($arg)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $arg = (int) $arg; + } else { + $arg = ($arg) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + } + $returnValue .= $arg; + } + + return $returnValue; + } + + /** + * DOLLAR. + * + * This function converts a number to text using currency format, with the decimals rounded to the specified place. + * The format used is $#,##0.00_);($#,##0.00).. + * + * @param float $value The value to format + * @param int $decimals The number of digits to display to the right of the decimal point. + * If decimals is negative, number is rounded to the left of the decimal point. + * If you omit decimals, it is assumed to be 2 + * + * @return string + */ + public static function DOLLAR($value = 0, $decimals = 2) + { + $value = Functions::flattenSingleValue($value); + $decimals = $decimals === null ? 0 : Functions::flattenSingleValue($decimals); + + // Validate parameters + if (!is_numeric($value) || !is_numeric($decimals)) { + return Functions::NAN(); + } + $decimals = floor($decimals); + + $mask = '$#,##0'; + if ($decimals > 0) { + $mask .= '.' . str_repeat('0', $decimals); + } else { + $round = pow(10, abs($decimals)); + if ($value < 0) { + $round = 0 - $round; + } + $value = MathTrig::MROUND($value, $round); + } + + return NumberFormat::toFormattedString($value, $mask); + } + + /** + * SEARCHSENSITIVE. + * + * @param string $needle The string to look for + * @param string $haystack The string in which to look + * @param int $offset Offset within $haystack + * + * @return string + */ + public static function SEARCHSENSITIVE($needle, $haystack, $offset = 1) + { + $needle = Functions::flattenSingleValue($needle); + $haystack = Functions::flattenSingleValue($haystack); + $offset = Functions::flattenSingleValue($offset); + + if (!is_bool($needle)) { + if (is_bool($haystack)) { + $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) { + if (StringHelper::countCharacters($needle) == 0) { + return $offset; + } + + $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8'); + if ($pos !== false) { + return ++$pos; + } + } + } + + return Functions::VALUE(); + } + + /** + * SEARCHINSENSITIVE. + * + * @param string $needle The string to look for + * @param string $haystack The string in which to look + * @param int $offset Offset within $haystack + * + * @return string + */ + public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1) + { + $needle = Functions::flattenSingleValue($needle); + $haystack = Functions::flattenSingleValue($haystack); + $offset = Functions::flattenSingleValue($offset); + + if (!is_bool($needle)) { + if (is_bool($haystack)) { + $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) { + if (StringHelper::countCharacters($needle) == 0) { + return $offset; + } + + $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8'); + if ($pos !== false) { + return ++$pos; + } + } + } + + return Functions::VALUE(); + } + + /** + * FIXEDFORMAT. + * + * @param mixed $value Value to check + * @param int $decimals + * @param bool $no_commas + * + * @return string + */ + public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false) + { + $value = Functions::flattenSingleValue($value); + $decimals = Functions::flattenSingleValue($decimals); + $no_commas = Functions::flattenSingleValue($no_commas); + + // Validate parameters + if (!is_numeric($value) || !is_numeric($decimals)) { + return Functions::NAN(); + } + $decimals = floor($decimals); + + $valueResult = round($value, $decimals); + if ($decimals < 0) { + $decimals = 0; + } + if (!$no_commas) { + $valueResult = number_format($valueResult, $decimals); + } + + return (string) $valueResult; + } + + /** + * LEFT. + * + * @param string $value Value + * @param int $chars Number of characters + * + * @return string + */ + public static function LEFT($value = '', $chars = 1) + { + $value = Functions::flattenSingleValue($value); + $chars = Functions::flattenSingleValue($chars); + + if ($chars < 0) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_substr($value, 0, $chars, 'UTF-8'); + } + + /** + * MID. + * + * @param string $value Value + * @param int $start Start character + * @param int $chars Number of characters + * + * @return string + */ + public static function MID($value = '', $start = 1, $chars = null) + { + $value = Functions::flattenSingleValue($value); + $start = Functions::flattenSingleValue($start); + $chars = Functions::flattenSingleValue($chars); + + if (($start < 1) || ($chars < 0)) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + if (empty($chars)) { + return ''; + } + + return mb_substr($value, --$start, $chars, 'UTF-8'); + } + + /** + * RIGHT. + * + * @param string $value Value + * @param int $chars Number of characters + * + * @return string + */ + public static function RIGHT($value = '', $chars = 1) + { + $value = Functions::flattenSingleValue($value); + $chars = Functions::flattenSingleValue($chars); + + if ($chars < 0) { + return Functions::VALUE(); + } + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8'); + } + + /** + * STRINGLENGTH. + * + * @param string $value Value + * + * @return int + */ + public static function STRINGLENGTH($value = '') + { + $value = Functions::flattenSingleValue($value); + + if (is_bool($value)) { + $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return mb_strlen($value, 'UTF-8'); + } + + /** + * LOWERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function LOWERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToLower($mixedCaseString); + } + + /** + * UPPERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function UPPERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToUpper($mixedCaseString); + } + + /** + * PROPERCASE. + * + * Converts a string value to upper case. + * + * @param string $mixedCaseString + * + * @return string + */ + public static function PROPERCASE($mixedCaseString) + { + $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); + + if (is_bool($mixedCaseString)) { + $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + + return StringHelper::strToTitle($mixedCaseString); + } + + /** + * REPLACE. + * + * @param string $oldText String to modify + * @param int $start Start character + * @param int $chars Number of characters + * @param string $newText String to replace in defined position + * + * @return string + */ + public static function REPLACE($oldText, $start, $chars, $newText) + { + $oldText = Functions::flattenSingleValue($oldText); + $start = Functions::flattenSingleValue($start); + $chars = Functions::flattenSingleValue($chars); + $newText = Functions::flattenSingleValue($newText); + + $left = self::LEFT($oldText, $start - 1); + $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1); + + return $left . $newText . $right; + } + + /** + * SUBSTITUTE. + * + * @param string $text Value + * @param string $fromText From Value + * @param string $toText To Value + * @param int $instance Instance Number + * + * @return string + */ + public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) + { + $text = Functions::flattenSingleValue($text); + $fromText = Functions::flattenSingleValue($fromText); + $toText = Functions::flattenSingleValue($toText); + $instance = floor(Functions::flattenSingleValue($instance)); + + if ($instance == 0) { + return str_replace($fromText, $toText, $text); + } + + $pos = -1; + while ($instance > 0) { + $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8'); + if ($pos === false) { + break; + } + --$instance; + } + + if ($pos !== false) { + return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText); + } + + return $text; + } + + /** + * RETURNSTRING. + * + * @param mixed $testValue Value to check + * + * @return null|string + */ + public static function RETURNSTRING($testValue = '') + { + $testValue = Functions::flattenSingleValue($testValue); + + if (is_string($testValue)) { + return $testValue; + } + + return null; + } + + /** + * TEXTFORMAT. + * + * @param mixed $value Value to check + * @param string $format Format mask to use + * + * @return string + */ + public static function TEXTFORMAT($value, $format) + { + $value = Functions::flattenSingleValue($value); + $format = Functions::flattenSingleValue($format); + + if ((is_string($value)) && (!is_numeric($value)) && Date::isDateTimeFormatCode($format)) { + $value = DateTime::DATEVALUE($value); + } + + return (string) NumberFormat::toFormattedString($value, $format); + } + + /** + * VALUE. + * + * @param mixed $value Value to check + * + * @return bool + */ + public static function VALUE($value = '') + { + $value = Functions::flattenSingleValue($value); + + if (!is_numeric($value)) { + $numberValue = str_replace( + StringHelper::getThousandsSeparator(), + '', + trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode()) + ); + if (is_numeric($numberValue)) { + return (float) $numberValue; + } + + $dateSetting = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + if (strpos($value, ':') !== false) { + $timeValue = DateTime::TIMEVALUE($value); + if ($timeValue !== Functions::VALUE()) { + Functions::setReturnDateType($dateSetting); + + return $timeValue; + } + } + $dateValue = DateTime::DATEVALUE($value); + if ($dateValue !== Functions::VALUE()) { + Functions::setReturnDateType($dateSetting); + + return $dateValue; + } + Functions::setReturnDateType($dateSetting); + + return Functions::VALUE(); + } + + return (float) $value; + } + + /** + * NUMBERVALUE. + * + * @param mixed $value Value to check + * @param string $decimalSeparator decimal separator, defaults to locale defined value + * @param string $groupSeparator group/thosands separator, defaults to locale defined value + * + * @return float|string + */ + public static function NUMBERVALUE($value = '', $decimalSeparator = null, $groupSeparator = null) + { + $value = Functions::flattenSingleValue($value); + $decimalSeparator = Functions::flattenSingleValue($decimalSeparator); + $groupSeparator = Functions::flattenSingleValue($groupSeparator); + + if (!is_numeric($value)) { + $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator; + $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator; + + $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE); + if ($decimalPositions > 1) { + return Functions::VALUE(); + } + $decimalOffset = array_pop($matches[0])[1]; + if (strpos($value, $groupSeparator, $decimalOffset) !== false) { + return Functions::VALUE(); + } + + $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value); + + // Handle the special case of trailing % signs + $percentageString = rtrim($value, '%'); + if (!is_numeric($percentageString)) { + return Functions::VALUE(); + } + + $percentageAdjustment = strlen($value) - strlen($percentageString); + if ($percentageAdjustment) { + $value = (float) $percentageString; + $value /= pow(10, $percentageAdjustment * 2); + } + } + + return (float) $value; + } + + /** + * Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. + * EXACT is case-sensitive but ignores formatting differences. + * Use EXACT to test text being entered into a document. + * + * @param $value1 + * @param $value2 + * + * @return bool + */ + public static function EXACT($value1, $value2) + { + $value1 = Functions::flattenSingleValue($value1); + $value2 = Functions::flattenSingleValue($value2); + + return (string) $value2 === (string) $value1; + } + + /** + * TEXTJOIN. + * + * @param mixed $delimiter + * @param mixed $ignoreEmpty + * @param mixed $args + * + * @return string + */ + public static function TEXTJOIN($delimiter, $ignoreEmpty, ...$args) + { + // Loop through arguments + $aArgs = Functions::flattenArray($args); + foreach ($aArgs as $key => &$arg) { + if ($ignoreEmpty && trim($arg) == '') { + unset($aArgs[$key]); + } elseif (is_bool($arg)) { + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) { + $arg = (int) $arg; + } else { + $arg = ($arg) ? Calculation::getTRUE() : Calculation::getFALSE(); + } + } + } + + return implode($delimiter, $aArgs); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php new file mode 100755 index 0000000..b8dccf9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php @@ -0,0 +1,93 @@ +count; + } + + /** + * Push a new entry onto the stack. + * + * @param mixed $type + * @param mixed $value + * @param mixed $reference + */ + public function push($type, $value, $reference = null) + { + $this->stack[$this->count++] = [ + 'type' => $type, + 'value' => $value, + 'reference' => $reference, + ]; + if ($type == 'Function') { + $localeFunction = Calculation::localeFunc($value); + if ($localeFunction != $value) { + $this->stack[($this->count - 1)]['localeValue'] = $localeFunction; + } + } + } + + /** + * Pop the last entry from the stack. + * + * @return mixed + */ + public function pop() + { + if ($this->count > 0) { + return $this->stack[--$this->count]; + } + + return null; + } + + /** + * Return an entry from the stack without removing it. + * + * @param int $n number indicating how far back in the stack we want to look + * + * @return mixed + */ + public function last($n = 1) + { + if ($this->count - $n < 0) { + return null; + } + + return $this->stack[$this->count - $n]; + } + + /** + * Clear the stack. + */ + public function clear() + { + $this->stack = []; + $this->count = 0; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt new file mode 100755 index 0000000..4a5cd26 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt @@ -0,0 +1,386 @@ +ABS +ACCRINT +ACCRINTM +ACOS +ACOSH +ACOT +ACOTH +ADDRESS +AMORDEGRC +AMORLINC +AND +AREAS +ASC +ASIN +ASINH +ATAN +ATAN2 +ATANH +AVEDEV +AVERAGE +AVERAGEA +AVERAGEIF +AVERAGEIFS +BAHTTEXT +BESSELI +BESSELJ +BESSELK +BESSELY +BETADIST +BETAINV +BIN2DEC +BIN2HEX +BIN2OCT +BINOMDIST +BITAND +BITLSHIFT +BITOR +BITRSHIFT +BITXOR +CEILING +CELL +CHAR +CHIDIST +CHIINV +CHITEST +CHOOSE +CLEAN +CODE +COLUMN +COLUMNS +COMBIN +COMPLEX +CONCAT +CONCATENATE +CONFIDENCE +CONVERT +CORREL +COS +COSH +COT +COTH +COUNT +COUNTA +COUNTBLANK +COUNTIF +COUNTIFS +COUPDAYBS +COUPDAYBS +COUPDAYSNC +COUPNCD +COUPNUM +COUPPCD +COVAR +CRITBINOM +CSC +CSCH +CUBEKPIMEMBER +CUBEMEMBER +CUBEMEMBERPROPERTY +CUBERANKEDMEMBER +CUBESET +CUBESETCOUNT +CUBEVALUE +CUMIPMT +CUMPRINC +DATE +DATEDIF +DATEVALUE +DAVERAGE +DAY +DAYS +DAYS360 +DB +DCOUNT +DCOUNTA +DDB +DEC2BIN +DEC2HEX +DEC2OCT +DEGREES +DELTA +DEVSQ +DGET +DISC +DMAX +DMIN +DOLLAR +DOLLARDE +DOLLARFR +DPRODUCT +DSTDEV +DSTDEVP +DSUM +DURATION +DVAR +DVARP +EDATE +EFFECT +EOMONTH +ERF +ERF.PRECISE +ERFC +ERFC.PRECISE +ERROR.TYPE +EVEN +EXACT +EXP +EXPONDIST +FACT +FACTDOUBLE +FALSE +FDIST +FIND +FINDB +FINV +FISHER +FISHERINV +FIXED +FLOOR +FORECAST +FREQUENCY +FTEST +FV +FVSCHEDULE +GAMAMDIST +GAMMAINV +GAMMALN +GCD +GEOMEAN +GESTEP +GETPIVOTDATA +GROWTH +HARMEAN +HEX2BIN +HEX2OCT +HLOOKUP +HOUR +HYPERLINK +HYPGEOMDIST +IF +IFERROR +IMABS +IMAGINARY +IMARGUMENT +IMCONJUGATE +IMCOS +IMCOSH +IMCOT +IMCSC +IMCSCH +IMEXP +IMLN +IMLOG10 +IMLOG2 +IMPOWER +IMPRODUCT +IMREAL +IMSEC +IMSECH +IMSIN +IMSINH +IMSQRT +IMSUB +IMSUM +IMTAN +INDEX +INDIRECT +INFO +INT +INTERCEPT +INTRATE +IPMT +IRR +ISBLANK +ISERR +ISERROR +ISEVEN +ISLOGICAL +ISNA +ISNONTEXT +ISNUMBER +ISODD +ISOWEEKNUM +ISPMT +ISREF +ISTEXT +JIS +KURT +LARGE +LCM +LEFT +LEFTB +LEN +LENB +LINEST +LN +LOG +LOG10 +LOGEST +LOGINV +LOGNORMDIST +LOOKUP +LOWER +MATCH +MAX +MAXA +MDETERM +MDURATION +MEDIAN +MID +MIDB +MIN +MINA +MINUTE +MINVERSE +MIRR +MMULT +MOD +MODE +MONTH +MROUND +MULTINOMIAL +N +NA +NEGBINOMDIST +NETWORKDAYS +NOMINAL +NORMDIST +NORMINV +NORMSDIST +NORMSINV +NOT +NOW +NPER +NPV +NUMBERVALUE +OCT2BIN +OCT2DEC +OCT2HEX +ODD +ODDFPRICE +ODDFYIELD +ODDLPRICE +ODDLYIELD +OFFSET +OR +PDURATION +PEARSON +PERCENTILE +PERCENTRANK +PERMUT +PHONETIC +PI +PMT +POISSON +POWER +PPMT +PRICE +PRICEDISC +PRICEMAT +PROB +PRODUCT +PROPER +PV +QUARTILE +QUOTIENT +RADIANS +RAND +RANDBETWEEN +RANK +RATE +RECEIVED +REPLACE +REPLACEB +REPT +RIGHT +RIGHTB +ROMAN +ROUND +ROUNDDOWN +ROUNDUP +ROW +ROWS +RRI +RSQ +RTD +SEARCH +SEARCHB +SEC +SECH +SECOND +SERIESSUM +SIGN +SIN +SINH +SKEW +SLN +SLOPE +SMALL +SQRT +SQRTPI +STANDARDIZE +STDEV +STDEV.A +STDEV.P +STDEVA +STDEVP +STDEVPA +STEYX +SUBSTITUTE +SUBTOTAL +SUM +SUMIF +SUMIFS +SUMPRODUCT +SUMSQ +SUMX2MY2 +SUMX2PY2 +SUMXMY2 +SWITCH +SYD +T +TAN +TANH +TBILLEQ +TBILLPRICE +TBILLYIELD +TDIST +TEXT +TEXTJOIN +TIME +TIMEVALUE +TINV +TODAY +TRANSPOSE +TREND +TRIM +TRIMMEAN +TRUE +TRUNC +TTEST +TYPE +UNICHAR +UNIORD +UPPER +USDOLLAR +VALUE +VAR +VARA +VARP +VARPA +VDB +VLOOKUP +WEEKDAY +WEEKNUM +WEIBULL +WORKDAY +XIRR +XNPV +XOR +YEAR +YEARFRAC +YIELD +YIELDDISC +YIELDMAT +ZTEST diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config new file mode 100755 index 0000000..86f94d3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/config @@ -0,0 +1,27 @@ +## +## PhpSpreadsheet +## +## +## + + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = лв + + +## +## Excel Error Codes (For future use) + +## +NULL = #ПРАЗНО! +DIV0 = #ДЕЛ/0! +VALUE = #СТОЙНОСТ! +REF = #РЕФ! +NAME = #ИМЕ? +NUM = #ЧИСЛО! +NA = #Н/Д diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions new file mode 100755 index 0000000..4bc1574 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/bg/functions @@ -0,0 +1,417 @@ +## +## PhpSpreadsheet +## +## +## Data in this file derived from information provided by web-junior (http://www.web-junior.net/) +## +## + + +## +## Add-in and Automation functions Функции надстроек и автоматизации +## +GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы. + + +## +## Cube functions Функции Куб +## +CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации. +CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе. +CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента. +CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов. +CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel. +CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества. +CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба. + + +## +## Database functions Функции для работы с базами данных +## +DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных. +DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных. +DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных. +DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию. +DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных. +DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных. +DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию. +DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных. +DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных +DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию. +DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных +DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных + + +## +## Date and time functions Функции даты и времени +## +DATE = ДАТА ## Возвращает заданную дату в числовом формате. +DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат. +DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца. +DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года. +EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты. +EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев. +HOUR = ЧАС ## Преобразует дату в числовом формате в часы. +MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты. +MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы. +NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами. +NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате. +SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды. +TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате. +TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат. +TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате. +WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели. +WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата. +WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней. +YEAR = ГОД ## Преобразует дату в числовом формате в год. +YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами. + + +## +## Engineering functions Инженерные функции +## +BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x). +BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x). +BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x). +BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x). +BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное. +BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное. +BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное. +COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число. +CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую. +DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное. +DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное. +DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное. +DELTA = ДЕЛЬТА ## Проверяет равенство двух значений. +ERF = ФОШ ## Возвращает функцию ошибки. +ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки. +GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения. +HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное. +HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное. +HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное. +IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа. +IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа. +IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах. +IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число. +IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа. +IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел. +IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа. +IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа. +IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа. +IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа. +IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень. +IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел. +IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа. +IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа. +IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа. +IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел. +IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел. +OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное. +OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное. +OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное. + + +## +## Financial functions Финансовые функции +## +ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов. +ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения. +AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации. +AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода. +COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения. +COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения. +COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона. +COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения. +COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу. +COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения. +CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами. +CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами. +DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка. +DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод. +DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг. +DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом. +DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби. +DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам. +EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки. +FV = БС ## Возвращает будущую стоимость инвестиции. +FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов. +INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг. +IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период. +IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств. +ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции. +MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей. +MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки. +NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку. +NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада. +NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования. +ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом. +ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом. +ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом. +ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом. +PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета. +PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период. +PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов. +PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка. +PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения. +PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции. +RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период. +RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг. +SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период. +SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел. +TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку. +TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека. +TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку. +VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса. +XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер. +XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими. +YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов. +YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки). +YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения. + + +## +## Information functions Информационные функции +## +CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки. +ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки. +INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде. +ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку. +ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д. +ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки. +ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом. +ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение. +ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д. +ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом. +ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число. +ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом. +ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой. +ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом. +N = Ч ## Возвращает значение, преобразованное в число. +NA = НД ## Возвращает значение ошибки #Н/Д. +TYPE = ТИП ## Возвращает число, обозначающее тип данных значения. + + +## +## Logical functions Логические функции +## +AND = И ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ. +IF = ЕСЛИ ## Выполняет проверку условия. +IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления. +NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное. +OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА. +TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА. + + +## +## Lookup and reference functions Функции ссылки и поиска +## +ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста. +AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке. +CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу. +COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка. +COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке. +HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки +HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете. +INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива. +INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением. +LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве. +MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве. +OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки. +ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой. +ROWS = ЧСТРОК ## Возвращает количество строк в ссылке. +RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).). +TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив. +VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце. + + +## +## Math and trigonometry functions Математические и тригонометрические функции +## +ABS = ABS ## Возвращает модуль (абсолютную величину) числа. +ACOS = ACOS ## Возвращает арккосинус числа. +ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа. +ASIN = ASIN ## Возвращает арксинус числа. +ASINH = ASINH ## Возвращает гиперболический арксинус числа. +ATAN = ATAN ## Возвращает арктангенс числа. +ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y. +ATANH = ATANH ## Возвращает гиперболический арктангенс числа. +CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению. +COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов. +COS = COS ## Возвращает косинус числа. +COSH = COSH ## Возвращает гиперболический косинус числа. +DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы. +EVEN = ЧЁТН ## Округляет число до ближайшего четного целого. +EXP = EXP ## Возвращает число e, возведенное в указанную степень. +FACT = ФАКТР ## Возвращает факториал числа. +FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа. +FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +GCD = НОД ## Возвращает наибольший общий делитель. +INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого. +LCM = НОК ## Возвращает наименьшее общее кратное. +LN = LN ## Возвращает натуральный логарифм числа. +LOG = LOG ## Возвращает логарифм числа по заданному основанию. +LOG10 = LOG10 ## Возвращает десятичный логарифм числа. +MDETERM = МОПРЕД ## Возвращает определитель матрицы массива. +MINVERSE = МОБР ## Возвращает обратную матрицу массива. +MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов. +MOD = ОСТАТ ## Возвращает остаток от деления. +MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью. +MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел. +ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого. +PI = ПИ ## Возвращает число пи. +POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень. +PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов. +QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении. +RADIANS = РАДИАНЫ ## Преобразует градусы в радианы. +RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1. +RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами. +ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста. +ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов. +ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения. +SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле. +SIGN = ЗНАК ## Возвращает знак числа. +SIN = SIN ## Возвращает синус заданного угла. +SINH = SINH ## Возвращает гиперболический синус числа. +SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня. +SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ). +SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных. +SUM = СУММ ## Суммирует аргументы. +SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию. +SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям. +SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов. +SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов. +SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах. +SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов. +SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах. +TAN = TAN ## Возвращает тангенс числа. +TANH = TANH ## Возвращает гиперболический тангенс числа. +TRUNC = ОТБР ## Отбрасывает дробную часть числа. + + +## +## Statistical functions Статистические функции +## +AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего. +AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов. +AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения. +AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию. +AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям. +BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения. +BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения. +BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения. +CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат. +CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат. +CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость. +CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности. +CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных. +COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов. +COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов. +COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне +COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию +COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям. +COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений +CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию. +DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений. +EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение. +FDIST = FРАСП ## Возвращает F-распределение вероятности. +FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности. +FISHER = ФИШЕР ## Возвращает преобразование Фишера. +FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера. +FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда. +FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива. +FTEST = ФТЕСТ ## Возвращает результат F-теста. +GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение. +GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение. +GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x). +GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое. +GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом. +HARMEAN = СРГАРМ ## Возвращает среднее гармоническое. +HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение. +INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии. +KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных. +LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных. +LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда. +LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда. +LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение. +LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение. +MAX = МАКС ## Возвращает наибольшее значение в списке аргументов. +MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения. +MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел. +MIN = МИН ## Возвращает наименьшее значение в списке аргументов. +MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения. +MODE = МОДА ## Возвращает значение моды множества данных. +NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение. +NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения. +NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение. +NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение. +NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения. +PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона. +PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона. +PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных. +PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов. +POISSON = ПУАССОН ## Возвращает распределение Пуассона. +PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов. +QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных. +RANK = РАНГ ## Возвращает ранг числа в списке чисел. +RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона. +SKEW = СКОС ## Возвращает асимметрию распределения. +SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии. +SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных. +STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение. +STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке. +STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения. +STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности. +STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения. +STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии. +TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента. +TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента. +TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом. +TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных. +TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента. +VAR = ДИСП ## Оценивает дисперсию по выборке. +VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения. +VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности. +VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения. +WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла. +ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста. + + +## +## Text functions Текстовые функции +## +ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые). +BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ). +CHAR = СИМВОЛ ## Возвращает знак с заданным кодом. +CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста. +CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке. +CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один. +DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат. +EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений. +FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков. +JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые). +LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения. +LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения. +LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке. +LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке. +LOWER = СТРОЧН ## Преобразует все буквы текста в строчные. +MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки. +PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную. +REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте. +REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте. +REPT = ПОВТОР ## Повторяет текст заданное число раз. +RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки. +RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки. +SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым. +T = Т ## Преобразует аргументы в текст. +TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст. +TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы. +UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные. +VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config new file mode 100755 index 0000000..df51373 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/config @@ -0,0 +1,23 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = Kč + + +## +## Excel Error Codes (For future use) +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #HODNOTA! +REF = #REF! +NAME = #NÁZEV? +NUM = #NUM! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions new file mode 100755 index 0000000..733d406 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/cs/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funkce doplňků a automatizace +## +GETPIVOTDATA = ZÍSKATKONTDATA ## Vrátí data uložená v kontingenční tabulce. Pomocí funkce ZÍSKATKONTDATA můžete načíst souhrnná data z kontingenční tabulky, pokud jsou tato data v kontingenční sestavě zobrazena. + + +## +## Cube functions Funkce pro práci s krychlemi +## +CUBEKPIMEMBER = CUBEKPIMEMBER ## Vrátí název, vlastnost a velikost klíčového ukazatele výkonu (KUV) a zobrazí v buňce název a vlastnost. Klíčový ukazatel výkonu je kvantifikovatelná veličina, například hrubý měsíční zisk nebo čtvrtletní obrat na zaměstnance, která se používá pro sledování výkonnosti organizace. +CUBEMEMBER = CUBEMEMBER ## Vrátí člen nebo n-tici v hierarchii krychle. Slouží k ověření, zda v krychli existuje člen nebo n-tice. +CUBEMEMBERPROPERTY = CUBEMEMBERPROPERTY ## Vrátí hodnotu vlastnosti člena v krychli. Slouží k ověření, zda v krychli existuje člen s daným názvem, a k vrácení konkrétní vlastnosti tohoto člena. +CUBERANKEDMEMBER = CUBERANKEDMEMBER ## Vrátí n-tý nebo pořadový člen sady. Použijte ji pro vrácení jednoho nebo více prvků sady, například obchodníka s nejvyšším obratem nebo deseti nejlepších studentů. +CUBESET = CUBESET ## Definuje vypočtenou sadu členů nebo n-tic odesláním výrazu sady do krychle na serveru, který vytvoří sadu a potom ji vrátí do aplikace Microsoft Office Excel. +CUBESETCOUNT = CUBESETCOUNT ## Vrátí počet položek v množině +CUBEVALUE = CUBEVALUE ## Vrátí úhrnnou hodnotu z krychle. + + +## +## Database functions Funkce databáze +## +DAVERAGE = DPRŮMĚR ## Vrátí průměr vybraných položek databáze. +DCOUNT = DPOČET ## Spočítá buňky databáze obsahující čísla. +DCOUNTA = DPOČET2 ## Spočítá buňky databáze, které nejsou prázdné. +DGET = DZÍSKAT ## Extrahuje z databáze jeden záznam splňující zadaná kritéria. +DMAX = DMAX ## Vrátí maximální hodnotu z vybraných položek databáze. +DMIN = DMIN ## Vrátí minimální hodnotu z vybraných položek databáze. +DPRODUCT = DSOUČIN ## Vynásobí hodnoty určitého pole záznamů v databázi, které splňují daná kritéria. +DSTDEV = DSMODCH.VÝBĚR ## Odhadne směrodatnou odchylku výběru vybraných položek databáze. +DSTDEVP = DSMODCH ## Vypočte směrodatnou odchylku základního souboru vybraných položek databáze. +DSUM = DSUMA ## Sečte čísla ve sloupcovém poli záznamů databáze, která splňují daná kritéria. +DVAR = DVAR.VÝBĚR ## Odhadne rozptyl výběru vybraných položek databáze. +DVARP = DVAR ## Vypočte rozptyl základního souboru vybraných položek databáze. + + +## +## Date and time functions Funkce data a času +## +DATE = DATUM ## Vrátí pořadové číslo určitého data. +DATEVALUE = DATUMHODN ## Převede datum ve formě textu na pořadové číslo. +DAY = DEN ## Převede pořadové číslo na den v měsíci. +DAYS360 = ROK360 ## Vrátí počet dní mezi dvěma daty na základě roku s 360 dny. +EDATE = EDATE ## Vrátí pořadové číslo data, které označuje určený počet měsíců před nebo po počátečním datu. +EOMONTH = EOMONTH ## Vrátí pořadové číslo posledního dne měsíce před nebo po zadaném počtu měsíců. +HOUR = HODINA ## Převede pořadové číslo na hodinu. +MINUTE = MINUTA ## Převede pořadové číslo na minutu. +MONTH = MĚSÍC ## Převede pořadové číslo na měsíc. +NETWORKDAYS = NETWORKDAYS ## Vrátí počet celých pracovních dní mezi dvěma daty. +NOW = NYNÍ ## Vrátí pořadové číslo aktuálního data a času. +SECOND = SEKUNDA ## Převede pořadové číslo na sekundu. +TIME = ČAS ## Vrátí pořadové číslo určitého času. +TIMEVALUE = ČASHODN ## Převede čas ve formě textu na pořadové číslo. +TODAY = DNES ## Vrátí pořadové číslo dnešního data. +WEEKDAY = DENTÝDNE ## Převede pořadové číslo na den v týdnu. +WEEKNUM = WEEKNUM ## Převede pořadové číslo na číslo představující číselnou pozici týdne v roce. +WORKDAY = WORKDAY ## Vrátí pořadové číslo data před nebo po zadaném počtu pracovních dní. +YEAR = ROK ## Převede pořadové číslo na rok. +YEARFRAC = YEARFRAC ## Vrátí část roku vyjádřenou zlomkem a představující počet celých dní mezi počátečním a koncovým datem. + + +## +## Engineering functions Inženýrské funkce (Technické funkce) +## +BESSELI = BESSELI ## Vrátí modifikovanou Besselovu funkci In(x). +BESSELJ = BESSELJ ## Vrátí modifikovanou Besselovu funkci Jn(x). +BESSELK = BESSELK ## Vrátí modifikovanou Besselovu funkci Kn(x). +BESSELY = BESSELY ## Vrátí Besselovu funkci Yn(x). +BIN2DEC = BIN2DEC ## Převede binární číslo na desítkové. +BIN2HEX = BIN2HEX ## Převede binární číslo na šestnáctkové. +BIN2OCT = BIN2OCT ## Převede binární číslo na osmičkové. +COMPLEX = COMPLEX ## Převede reálnou a imaginární část na komplexní číslo. +CONVERT = CONVERT ## Převede číslo do jiného jednotkového měrného systému. +DEC2BIN = DEC2BIN ## Převede desítkového čísla na dvojkové +DEC2HEX = DEC2HEX ## Převede desítkové číslo na šestnáctkové. +DEC2OCT = DEC2OCT ## Převede desítkové číslo na osmičkové. +DELTA = DELTA ## Testuje rovnost dvou hodnot. +ERF = ERF ## Vrátí chybovou funkci. +ERFC = ERFC ## Vrátí doplňkovou chybovou funkci. +GESTEP = GESTEP ## Testuje, zda je číslo větší než mezní hodnota. +HEX2BIN = HEX2BIN ## Převede šestnáctkové číslo na binární. +HEX2DEC = HEX2DEC ## Převede šestnáctkové číslo na desítkové. +HEX2OCT = HEX2OCT ## Převede šestnáctkové číslo na osmičkové. +IMABS = IMABS ## Vrátí absolutní hodnotu (modul) komplexního čísla. +IMAGINARY = IMAGINARY ## Vrátí imaginární část komplexního čísla. +IMARGUMENT = IMARGUMENT ## Vrátí argument théta, úhel vyjádřený v radiánech. +IMCONJUGATE = IMCONJUGATE ## Vrátí komplexně sdružené číslo ke komplexnímu číslu. +IMCOS = IMCOS ## Vrátí kosinus komplexního čísla. +IMDIV = IMDIV ## Vrátí podíl dvou komplexních čísel. +IMEXP = IMEXP ## Vrátí exponenciální tvar komplexního čísla. +IMLN = IMLN ## Vrátí přirozený logaritmus komplexního čísla. +IMLOG10 = IMLOG10 ## Vrátí dekadický logaritmus komplexního čísla. +IMLOG2 = IMLOG2 ## Vrátí logaritmus komplexního čísla při základu 2. +IMPOWER = IMPOWER ## Vrátí komplexní číslo umocněné na celé číslo. +IMPRODUCT = IMPRODUCT ## Vrátí součin komplexních čísel. +IMREAL = IMREAL ## Vrátí reálnou část komplexního čísla. +IMSIN = IMSIN ## Vrátí sinus komplexního čísla. +IMSQRT = IMSQRT ## Vrátí druhou odmocninu komplexního čísla. +IMSUB = IMSUB ## Vrátí rozdíl mezi dvěma komplexními čísly. +IMSUM = IMSUM ## Vrátí součet dvou komplexních čísel. +OCT2BIN = OCT2BIN ## Převede osmičkové číslo na binární. +OCT2DEC = OCT2DEC ## Převede osmičkové číslo na desítkové. +OCT2HEX = OCT2HEX ## Převede osmičkové číslo na šestnáctkové. + + +## +## Financial functions Finanční funkce +## +ACCRINT = ACCRINT ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen v pravidelných termínech. +ACCRINTM = ACCRINTM ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen k datu splatnosti. +AMORDEGRC = AMORDEGRC ## Vrátí lineární amortizaci v každém účetním období pomocí koeficientu amortizace. +AMORLINC = AMORLINC ## Vrátí lineární amortizaci v každém účetním období. +COUPDAYBS = COUPDAYBS ## Vrátí počet dnů od začátku období placení kupónů do data splatnosti. +COUPDAYS = COUPDAYS ## Vrátí počet dnů v období placení kupónů, které obsahuje den zúčtování. +COUPDAYSNC = COUPDAYSNC ## Vrátí počet dnů od data zúčtování do následujícího data placení kupónu. +COUPNCD = COUPNCD ## Vrátí následující datum placení kupónu po datu zúčtování. +COUPNUM = COUPNUM ## Vrátí počet kupónů splatných mezi datem zúčtování a datem splatnosti. +COUPPCD = COUPPCD ## Vrátí předchozí datum placení kupónu před datem zúčtování. +CUMIPMT = CUMIPMT ## Vrátí kumulativní úrok splacený mezi dvěma obdobími. +CUMPRINC = CUMPRINC ## Vrátí kumulativní jistinu splacenou mezi dvěma obdobími půjčky. +DB = ODPIS.ZRYCH ## Vrátí odpis aktiva za určité období pomocí degresivní metody odpisu s pevným zůstatkem. +DDB = ODPIS.ZRYCH2 ## Vrátí odpis aktiva za určité období pomocí dvojité degresivní metody odpisu nebo jiné metody, kterou zadáte. +DISC = DISC ## Vrátí diskontní sazbu cenného papíru. +DOLLARDE = DOLLARDE ## Převede částku v korunách vyjádřenou zlomkem na částku v korunách vyjádřenou desetinným číslem. +DOLLARFR = DOLLARFR ## Převede částku v korunách vyjádřenou desetinným číslem na částku v korunách vyjádřenou zlomkem. +DURATION = DURATION ## Vrátí roční dobu cenného papíru s pravidelnými úrokovými sazbami. +EFFECT = EFFECT ## Vrátí efektivní roční úrokovou sazbu. +FV = BUDHODNOTA ## Vrátí budoucí hodnotu investice. +FVSCHEDULE = FVSCHEDULE ## Vrátí budoucí hodnotu počáteční jistiny po použití série sazeb složitého úroku. +INTRATE = INTRATE ## Vrátí úrokovou sazbu plně investovaného cenného papíru. +IPMT = PLATBA.ÚROK ## Vrátí výšku úroku investice za dané období. +IRR = MÍRA.VÝNOSNOSTI ## Vrátí vnitřní výnosové procento série peněžních toků. +ISPMT = ISPMT ## Vypočte výši úroku z investice zaplaceného během určitého období. +MDURATION = MDURATION ## Vrátí Macauleyho modifikovanou dobu cenného papíru o nominální hodnotě 100 Kč. +MIRR = MOD.MÍRA.VÝNOSNOSTI ## Vrátí vnitřní sazbu výnosu, přičemž kladné a záporné hodnoty peněžních prostředků jsou financovány podle různých sazeb. +NOMINAL = NOMINAL ## Vrátí nominální roční úrokovou sazbu. +NPER = POČET.OBDOBÍ ## Vrátí počet období pro investici. +NPV = ČISTÁ.SOUČHODNOTA ## Vrátí čistou současnou hodnotu investice vypočítanou na základě série pravidelných peněžních toků a diskontní sazby. +ODDFPRICE = ODDFPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným prvním obdobím. +ODDFYIELD = ODDFYIELD ## Vrátí výnos cenného papíru s odlišným prvním obdobím. +ODDLPRICE = ODDLPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným posledním obdobím. +ODDLYIELD = ODDLYIELD ## Vrátí výnos cenného papíru s odlišným posledním obdobím. +PMT = PLATBA ## Vrátí hodnotu pravidelné splátky anuity. +PPMT = PLATBA.ZÁKLAD ## Vrátí hodnotu splátky jistiny pro zadanou investici za dané období. +PRICE = PRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen v pravidelných termínech. +PRICEDISC = PRICEDISC ## Vrátí cenu diskontního cenného papíru o nominální hodnotě 100 Kč. +PRICEMAT = PRICEMAT ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen k datu splatnosti. +PV = SOUČHODNOTA ## Vrátí současnou hodnotu investice. +RATE = ÚROKOVÁ.MÍRA ## Vrátí úrokovou sazbu vztaženou na období anuity. +RECEIVED = RECEIVED ## Vrátí částku obdrženou k datu splatnosti plně investovaného cenného papíru. +SLN = ODPIS.LIN ## Vrátí přímé odpisy aktiva pro jedno období. +SYD = ODPIS.NELIN ## Vrátí směrné číslo ročních odpisů aktiva pro zadané období. +TBILLEQ = TBILLEQ ## Vrátí výnos směnky státní pokladny ekvivalentní výnosu obligace. +TBILLPRICE = TBILLPRICE ## Vrátí cenu směnky státní pokladny o nominální hodnotě 100 Kč. +TBILLYIELD = TBILLYIELD ## Vrátí výnos směnky státní pokladny. +VDB = ODPIS.ZA.INT ## Vrátí odpis aktiva pro určité období nebo část období pomocí degresivní metody odpisu. +XIRR = XIRR ## Vrátí vnitřní výnosnost pro harmonogram peněžních toků, který nemusí být nutně periodický. +XNPV = XNPV ## Vrátí čistou současnou hodnotu pro harmonogram peněžních toků, který nemusí být nutně periodický. +YIELD = YIELD ## Vrátí výnos cenného papíru, ze kterého je úrok placen v pravidelných termínech. +YIELDDISC = YIELDDISC ## Vrátí roční výnos diskontního cenného papíru, například směnky státní pokladny. +YIELDMAT = YIELDMAT ## Vrátí roční výnos cenného papíru, ze kterého je úrok placen k datu splatnosti. + + +## +## Information functions Informační funkce +## +CELL = POLÍČKO ## Vrátí informace o formátování, umístění nebo obsahu buňky. +ERROR.TYPE = CHYBA.TYP ## Vrátí číslo odpovídající typu chyby. +INFO = O.PROSTŘEDÍ ## Vrátí informace o aktuálním pracovním prostředí. +ISBLANK = JE.PRÁZDNÉ ## Vrátí hodnotu PRAVDA, pokud se argument hodnota odkazuje na prázdnou buňku. +ISERR = JE.CHYBA ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota (kromě #N/A). +ISERROR = JE.CHYBHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota. +ISEVEN = ISEVEN ## Vrátí hodnotu PRAVDA, pokud je číslo sudé. +ISLOGICAL = JE.LOGHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota logická hodnota. +ISNA = JE.NEDEF ## Vrátí hodnotu PRAVDA, pokud je argument hodnota chybová hodnota #N/A. +ISNONTEXT = JE.NETEXT ## Vrátí hodnotu PRAVDA, pokud argument hodnota není text. +ISNUMBER = JE.ČÍSLO ## Vrátí hodnotu PRAVDA, pokud je argument hodnota číslo. +ISODD = ISODD ## Vrátí hodnotu PRAVDA, pokud je číslo liché. +ISREF = JE.ODKAZ ## Vrátí hodnotu PRAVDA, pokud je argument hodnota odkaz. +ISTEXT = JE.TEXT ## Vrátí hodnotu PRAVDA, pokud je argument hodnota text. +N = N ## Vrátí hodnotu převedenou na číslo. +NA = NEDEF ## Vrátí chybovou hodnotu #N/A. +TYPE = TYP ## Vrátí číslo označující datový typ hodnoty. + + +## +## Logical functions Logické funkce +## +AND = A ## Vrátí hodnotu PRAVDA, mají-li všechny argumenty hodnotu PRAVDA. +FALSE = NEPRAVDA ## Vrátí logickou hodnotu NEPRAVDA. +IF = KDYŽ ## Určí, který logický test má proběhnout. +IFERROR = IFERROR ## Pokud je vzorec vyhodnocen jako chyba, vrátí zadanou hodnotu. V opačném případě vrátí výsledek vzorce. +NOT = NE ## Provede logickou negaci argumentu funkce. +OR = NEBO ## Vrátí hodnotu PRAVDA, je-li alespoň jeden argument roven hodnotě PRAVDA. +TRUE = PRAVDA ## Vrátí logickou hodnotu PRAVDA. + + +## +## Lookup and reference functions Vyhledávací funkce +## +ADDRESS = ODKAZ ## Vrátí textový odkaz na jednu buňku listu. +AREAS = POČET.BLOKŮ ## Vrátí počet oblastí v odkazu. +CHOOSE = ZVOLIT ## Zvolí hodnotu ze seznamu hodnot. +COLUMN = SLOUPEC ## Vrátí číslo sloupce odkazu. +COLUMNS = SLOUPCE ## Vrátí počet sloupců v odkazu. +HLOOKUP = VVYHLEDAT ## Prohledá horní řádek matice a vrátí hodnotu určené buňky. +HYPERLINK = HYPERTEXTOVÝ.ODKAZ ## Vytvoří zástupce nebo odkaz, který otevře dokument uložený na síťovém serveru, v síti intranet nebo Internet. +INDEX = INDEX ## Pomocí rejstříku zvolí hodnotu z odkazu nebo matice. +INDIRECT = NEPŘÍMÝ.ODKAZ ## Vrátí odkaz určený textovou hodnotou. +LOOKUP = VYHLEDAT ## Vyhledá hodnoty ve vektoru nebo matici. +MATCH = POZVYHLEDAT ## Vyhledá hodnoty v odkazu nebo matici. +OFFSET = POSUN ## Vrátí posun odkazu od zadaného odkazu. +ROW = ŘÁDEK ## Vrátí číslo řádku odkazu. +ROWS = ŘÁDKY ## Vrátí počet řádků v odkazu. +RTD = RTD ## Načte data reálného času z programu, který podporuje automatizaci modelu COM (Automatizace: Způsob práce s objekty určité aplikace z jiné aplikace nebo nástroje pro vývoj. Automatizace (dříve nazývaná automatizace OLE) je počítačovým standardem a je funkcí modelu COM (Component Object Model).). +TRANSPOSE = TRANSPOZICE ## Vrátí transponovanou matici. +VLOOKUP = SVYHLEDAT ## Prohledá první sloupec matice, přesune kurzor v řádku a vrátí hodnotu buňky. + + +## +## Math and trigonometry functions Matematické a trigonometrické funkce +## +ABS = ABS ## Vrátí absolutní hodnotu čísla. +ACOS = ARCCOS ## Vrátí arkuskosinus čísla. +ACOSH = ARCCOSH ## Vrátí hyperbolický arkuskosinus čísla. +ASIN = ARCSIN ## Vrátí arkussinus čísla. +ASINH = ARCSINH ## Vrátí hyperbolický arkussinus čísla. +ATAN = ARCTG ## Vrátí arkustangens čísla. +ATAN2 = ARCTG2 ## Vrátí arkustangens x-ové a y-ové souřadnice. +ATANH = ARCTGH ## Vrátí hyperbolický arkustangens čísla. +CEILING = ZAOKR.NAHORU ## Zaokrouhlí číslo na nejbližší celé číslo nebo na nejbližší násobek zadané hodnoty. +COMBIN = KOMBINACE ## Vrátí počet kombinací pro daný počet položek. +COS = COS ## Vrátí kosinus čísla. +COSH = COSH ## Vrátí hyperbolický kosinus čísla. +DEGREES = DEGREES ## Převede radiány na stupně. +EVEN = ZAOKROUHLIT.NA.SUDÉ ## Zaokrouhlí číslo nahoru na nejbližší celé sudé číslo. +EXP = EXP ## Vrátí základ přirozeného logaritmu e umocněný na zadané číslo. +FACT = FAKTORIÁL ## Vrátí faktoriál čísla. +FACTDOUBLE = FACTDOUBLE ## Vrátí dvojitý faktoriál čísla. +FLOOR = ZAOKR.DOLŮ ## Zaokrouhlí číslo dolů, směrem k nule. +GCD = GCD ## Vrátí největší společný dělitel. +INT = CELÁ.ČÁST ## Zaokrouhlí číslo dolů na nejbližší celé číslo. +LCM = LCM ## Vrátí nejmenší společný násobek. +LN = LN ## Vrátí přirozený logaritmus čísla. +LOG = LOGZ ## Vrátí logaritmus čísla při zadaném základu. +LOG10 = LOG ## Vrátí dekadický logaritmus čísla. +MDETERM = DETERMINANT ## Vrátí determinant matice. +MINVERSE = INVERZE ## Vrátí inverzní matici. +MMULT = SOUČIN.MATIC ## Vrátí součin dvou matic. +MOD = MOD ## Vrátí zbytek po dělení. +MROUND = MROUND ## Vrátí číslo zaokrouhlené na požadovaný násobek. +MULTINOMIAL = MULTINOMIAL ## Vrátí mnohočlen z množiny čísel. +ODD = ZAOKROUHLIT.NA.LICHÉ ## Zaokrouhlí číslo nahoru na nejbližší celé liché číslo. +PI = PI ## Vrátí hodnotu čísla pí. +POWER = POWER ## Umocní číslo na zadanou mocninu. +PRODUCT = SOUČIN ## Vynásobí argumenty funkce. +QUOTIENT = QUOTIENT ## Vrátí celou část dělení. +RADIANS = RADIANS ## Převede stupně na radiány. +RAND = NÁHČÍSLO ## Vrátí náhodné číslo mezi 0 a 1. +RANDBETWEEN = RANDBETWEEN ## Vrátí náhodné číslo mezi zadanými čísly. +ROMAN = ROMAN ## Převede arabskou číslici na římskou ve formátu textu. +ROUND = ZAOKROUHLIT ## Zaokrouhlí číslo na zadaný počet číslic. +ROUNDDOWN = ROUNDDOWN ## Zaokrouhlí číslo dolů, směrem k nule. +ROUNDUP = ROUNDUP ## Zaokrouhlí číslo nahoru, směrem od nuly. +SERIESSUM = SERIESSUM ## Vrátí součet mocninné řady určené podle vzorce. +SIGN = SIGN ## Vrátí znaménko čísla. +SIN = SIN ## Vrátí sinus daného úhlu. +SINH = SINH ## Vrátí hyperbolický sinus čísla. +SQRT = ODMOCNINA ## Vrátí kladnou druhou odmocninu. +SQRTPI = SQRTPI ## Vrátí druhou odmocninu výrazu (číslo * pí). +SUBTOTAL = SUBTOTAL ## Vrátí souhrn v seznamu nebo databázi. +SUM = SUMA ## Sečte argumenty funkce. +SUMIF = SUMIF ## Sečte buňky vybrané podle zadaných kritérií. +SUMIFS = SUMIFS ## Sečte buňky určené více zadanými podmínkami. +SUMPRODUCT = SOUČIN.SKALÁRNÍ ## Vrátí součet součinů odpovídajících prvků matic. +SUMSQ = SUMA.ČTVERCŮ ## Vrátí součet čtverců argumentů. +SUMX2MY2 = SUMX2MY2 ## Vrátí součet rozdílu čtverců odpovídajících hodnot ve dvou maticích. +SUMX2PY2 = SUMX2PY2 ## Vrátí součet součtu čtverců odpovídajících hodnot ve dvou maticích. +SUMXMY2 = SUMXMY2 ## Vrátí součet čtverců rozdílů odpovídajících hodnot ve dvou maticích. +TAN = TGTG ## Vrátí tangens čísla. +TANH = TGH ## Vrátí hyperbolický tangens čísla. +TRUNC = USEKNOUT ## Zkrátí číslo na celé číslo. + + +## +## Statistical functions Statistické funkce +## +AVEDEV = PRŮMODCHYLKA ## Vrátí průměrnou hodnotu absolutních odchylek datových bodů od jejich střední hodnoty. +AVERAGE = PRŮMĚR ## Vrátí průměrnou hodnotu argumentů. +AVERAGEA = AVERAGEA ## Vrátí průměrnou hodnotu argumentů včetně čísel, textu a logických hodnot. +AVERAGEIF = AVERAGEIF ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk v oblasti, které vyhovují příslušné podmínce. +AVERAGEIFS = AVERAGEIFS ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk vyhovujících několika podmínkám. +BETADIST = BETADIST ## Vrátí hodnotu součtového rozdělení beta. +BETAINV = BETAINV ## Vrátí inverzní hodnotu součtového rozdělení pro zadané rozdělení beta. +BINOMDIST = BINOMDIST ## Vrátí hodnotu binomického rozdělení pravděpodobnosti jednotlivých veličin. +CHIDIST = CHIDIST ## Vrátí jednostrannou pravděpodobnost rozdělení chí-kvadrát. +CHIINV = CHIINV ## Vrátí hodnotu funkce inverzní k distribuční funkci jednostranné pravděpodobnosti rozdělení chí-kvadrát. +CHITEST = CHITEST ## Vrátí test nezávislosti. +CONFIDENCE = CONFIDENCE ## Vrátí interval spolehlivosti pro střední hodnotu základního souboru. +CORREL = CORREL ## Vrátí korelační koeficient mezi dvěma množinami dat. +COUNT = POČET ## Vrátí počet čísel v seznamu argumentů. +COUNTA = POČET2 ## Vrátí počet hodnot v seznamu argumentů. +COUNTBLANK = COUNTBLANK ## Spočítá počet prázdných buněk v oblasti. +COUNTIF = COUNTIF ## Spočítá buňky v oblasti, které odpovídají zadaným kritériím. +COUNTIFS = COUNTIFS ## Spočítá buňky v oblasti, které odpovídají více kritériím. +COVAR = COVAR ## Vrátí hodnotu kovariance, průměrnou hodnotu součinů párových odchylek +CRITBINOM = CRITBINOM ## Vrátí nejmenší hodnotu, pro kterou má součtové binomické rozdělení hodnotu větší nebo rovnu hodnotě kritéria. +DEVSQ = DEVSQ ## Vrátí součet čtverců odchylek. +EXPONDIST = EXPONDIST ## Vrátí hodnotu exponenciálního rozdělení. +FDIST = FDIST ## Vrátí hodnotu rozdělení pravděpodobnosti F. +FINV = FINV ## Vrátí hodnotu inverzní funkce k distribuční funkci rozdělení F. +FISHER = FISHER ## Vrátí hodnotu Fisherovy transformace. +FISHERINV = FISHERINV ## Vrátí hodnotu inverzní funkce k Fisherově transformaci. +FORECAST = FORECAST ## Vrátí hodnotu lineárního trendu. +FREQUENCY = ČETNOSTI ## Vrátí četnost rozdělení jako svislou matici. +FTEST = FTEST ## Vrátí výsledek F-testu. +GAMMADIST = GAMMADIST ## Vrátí hodnotu rozdělení gama. +GAMMAINV = GAMMAINV ## Vrátí hodnotu inverzní funkce k distribuční funkci součtového rozdělení gama. +GAMMALN = GAMMALN ## Vrátí přirozený logaritmus funkce gama, Γ(x). +GEOMEAN = GEOMEAN ## Vrátí geometrický průměr. +GROWTH = LOGLINTREND ## Vrátí hodnoty exponenciálního trendu. +HARMEAN = HARMEAN ## Vrátí harmonický průměr. +HYPGEOMDIST = HYPGEOMDIST ## Vrátí hodnotu hypergeometrického rozdělení. +INTERCEPT = INTERCEPT ## Vrátí úsek lineární regresní čáry. +KURT = KURT ## Vrátí hodnotu excesu množiny dat. +LARGE = LARGE ## Vrátí k-tou největší hodnotu množiny dat. +LINEST = LINREGRESE ## Vrátí parametry lineárního trendu. +LOGEST = LOGLINREGRESE ## Vrátí parametry exponenciálního trendu. +LOGINV = LOGINV ## Vrátí inverzní funkci k distribuční funkci logaritmicko-normálního rozdělení. +LOGNORMDIST = LOGNORMDIST ## Vrátí hodnotu součtového logaritmicko-normálního rozdělení. +MAX = MAX ## Vrátí maximální hodnotu seznamu argumentů. +MAXA = MAXA ## Vrátí maximální hodnotu seznamu argumentů včetně čísel, textu a logických hodnot. +MEDIAN = MEDIAN ## Vrátí střední hodnotu zadaných čísel. +MIN = MIN ## Vrátí minimální hodnotu seznamu argumentů. +MINA = MINA ## Vrátí nejmenší hodnotu v seznamu argumentů včetně čísel, textu a logických hodnot. +MODE = MODE ## Vrátí hodnotu, která se v množině dat vyskytuje nejčastěji. +NEGBINOMDIST = NEGBINOMDIST ## Vrátí hodnotu negativního binomického rozdělení. +NORMDIST = NORMDIST ## Vrátí hodnotu normálního součtového rozdělení. +NORMINV = NORMINV ## Vrátí inverzní funkci k funkci normálního součtového rozdělení. +NORMSDIST = NORMSDIST ## Vrátí hodnotu standardního normálního součtového rozdělení. +NORMSINV = NORMSINV ## Vrátí inverzní funkci k funkci standardního normálního součtového rozdělení. +PEARSON = PEARSON ## Vrátí Pearsonův výsledný momentový korelační koeficient. +PERCENTILE = PERCENTIL ## Vrátí hodnotu k-tého percentilu hodnot v oblasti. +PERCENTRANK = PERCENTRANK ## Vrátí pořadí hodnoty v množině dat vyjádřené procentuální částí množiny dat. +PERMUT = PERMUTACE ## Vrátí počet permutací pro zadaný počet objektů. +POISSON = POISSON ## Vrátí hodnotu distribuční funkce Poissonova rozdělení. +PROB = PROB ## Vrátí pravděpodobnost výskytu hodnot v oblasti mezi dvěma mezními hodnotami. +QUARTILE = QUARTIL ## Vrátí hodnotu kvartilu množiny dat. +RANK = RANK ## Vrátí pořadí čísla v seznamu čísel. +RSQ = RKQ ## Vrátí druhou mocninu Pearsonova výsledného momentového korelačního koeficientu. +SKEW = SKEW ## Vrátí zešikmení rozdělení. +SLOPE = SLOPE ## Vrátí směrnici lineární regresní čáry. +SMALL = SMALL ## Vrátí k-tou nejmenší hodnotu množiny dat. +STANDARDIZE = STANDARDIZE ## Vrátí normalizovanou hodnotu. +STDEV = SMODCH.VÝBĚR ## Vypočte směrodatnou odchylku výběru. +STDEVA = STDEVA ## Vypočte směrodatnou odchylku výběru včetně čísel, textu a logických hodnot. +STDEVP = SMODCH ## Vypočte směrodatnou odchylku základního souboru. +STDEVPA = STDEVPA ## Vypočte směrodatnou odchylku základního souboru včetně čísel, textu a logických hodnot. +STEYX = STEYX ## Vrátí standardní chybu předpovězené hodnoty y pro každou hodnotu x v regresi. +TDIST = TDIST ## Vrátí hodnotu Studentova t-rozdělení. +TINV = TINV ## Vrátí inverzní funkci k distribuční funkci Studentova t-rozdělení. +TREND = LINTREND ## Vrátí hodnoty lineárního trendu. +TRIMMEAN = TRIMMEAN ## Vrátí střední hodnotu vnitřní části množiny dat. +TTEST = TTEST ## Vrátí pravděpodobnost spojenou se Studentovým t-testem. +VAR = VAR.VÝBĚR ## Vypočte rozptyl výběru. +VARA = VARA ## Vypočte rozptyl výběru včetně čísel, textu a logických hodnot. +VARP = VAR ## Vypočte rozptyl základního souboru. +VARPA = VARPA ## Vypočte rozptyl základního souboru včetně čísel, textu a logických hodnot. +WEIBULL = WEIBULL ## Vrátí hodnotu Weibullova rozdělení. +ZTEST = ZTEST ## Vrátí jednostrannou P-hodnotu z-testu. + + +## +## Text functions Textové funkce +## +ASC = ASC ## Změní znaky s plnou šířkou (dvoubajtové)v řetězci znaků na znaky s poloviční šířkou (jednobajtové). +BAHTTEXT = BAHTTEXT ## Převede číslo na text ve formátu, měny ß (baht). +CHAR = ZNAK ## Vrátí znak určený číslem kódu. +CLEAN = VYČISTIT ## Odebere z textu všechny netisknutelné znaky. +CODE = KÓD ## Vrátí číselný kód prvního znaku zadaného textového řetězce. +CONCATENATE = CONCATENATE ## Spojí několik textových položek do jedné. +DOLLAR = KČ ## Převede číslo na text ve formátu měny Kč (česká koruna). +EXACT = STEJNÉ ## Zkontroluje, zda jsou dvě textové hodnoty shodné. +FIND = NAJÍT ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). +FINDB = FINDB ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). +FIXED = ZAOKROUHLIT.NA.TEXT ## Zformátuje číslo jako text s pevným počtem desetinných míst. +JIS = JIS ## Změní znaky s poloviční šířkou (jednobajtové) v řetězci znaků na znaky s plnou šířkou (dvoubajtové). +LEFT = ZLEVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. +LEFTB = LEFTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. +LEN = DÉLKA ## Vrátí počet znaků textového řetězce. +LENB = LENB ## Vrátí počet znaků textového řetězce. +LOWER = MALÁ ## Převede text na malá písmena. +MID = ČÁST ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. +MIDB = MIDB ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. +PHONETIC = ZVUKOVÉ ## Extrahuje fonetické znaky (furigana) z textového řetězce. +PROPER = VELKÁ2 ## Převede první písmeno každého slova textové hodnoty na velké. +REPLACE = NAHRADIT ## Nahradí znaky uvnitř textu. +REPLACEB = NAHRADITB ## Nahradí znaky uvnitř textu. +REPT = OPAKOVAT ## Zopakuje text podle zadaného počtu opakování. +RIGHT = ZPRAVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. +RIGHTB = RIGHTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. +SEARCH = HLEDAT ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). +SEARCHB = SEARCHB ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). +SUBSTITUTE = DOSADIT ## V textovém řetězci nahradí starý text novým. +T = T ## Převede argumenty na text. +TEXT = HODNOTA.NA.TEXT ## Zformátuje číslo a převede ho na text. +TRIM = PROČISTIT ## Odstraní z textu mezery. +UPPER = VELKÁ ## Převede text na velká písmena. +VALUE = HODNOTA ## Převede textový argument na číslo. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config new file mode 100755 index 0000000..a7aa8fe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/config @@ -0,0 +1,25 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + + +## +## Excel Error Codes (For future use) + +## +NULL = #NUL! +DIV0 = #DIVISION/0! +VALUE = #VÆRDI! +REF = #REFERENCE! +NAME = #NAVN? +NUM = #NUM! +NA = #I/T diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions new file mode 100755 index 0000000..d02aa2e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/da/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Tilføjelsesprogram- og automatiseringsfunktioner +## +GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data, der er lagret i en pivottabelrapport + + +## +## Cube functions Kubefunktioner +## +CUBEKPIMEMBER = KUBE.KPI.MEDLEM ## Returnerer navn, egenskab og mål for en KPI-indikator og viser navnet og egenskaben i cellen. En KPI-indikator er en målbar størrelse, f.eks. bruttooverskud pr. måned eller personaleudskiftning pr. kvartal, der bruges til at overvåge en organisations præstationer. +CUBEMEMBER = KUBE.MEDLEM ## Returnerer et medlem eller en tupel fra kubehierarkiet. Bruges til at validere, om et medlem eller en tupel findes i kuben. +CUBEMEMBERPROPERTY = KUBEMEDLEM.EGENSKAB ## Returnerer værdien af en egenskab for et medlem i kuben. Bruges til at validere, om et medlemsnavn findes i kuben, og returnere den angivne egenskab for medlemmet. +CUBERANKEDMEMBER = KUBEMEDLEM.RANG ## Returnerer det n'te eller rangordnede medlem i et sæt. Bruges til at returnere et eller flere elementer i et sæt, f.eks. topsælgere eller de 10 bedste elever. +CUBESET = KUBESÆT ## Definerer et beregnet sæt medlemmer eller tupler ved at sende et sætudtryk til kuben på serveren, som opretter sættet og returnerer det til Microsoft Office Excel. +CUBESETCOUNT = KUBESÆT.TÆL ## Returnerer antallet af elementer i et sæt. +CUBEVALUE = KUBEVÆRDI ## Returnerer en sammenlagt (aggregeret) værdi fra en kube. + + +## +## Database functions Databasefunktioner +## +DAVERAGE = DMIDDEL ## Returnerer gennemsnittet af markerede databaseposter +DCOUNT = DTÆL ## Tæller de celler, der indeholder tal, i en database +DCOUNTA = DTÆLV ## Tæller udfyldte celler i en database +DGET = DHENT ## Uddrager en enkelt post, der opfylder de angivne kriterier, fra en database +DMAX = DMAKS ## Returnerer den største værdi blandt markerede databaseposter +DMIN = DMIN ## Returnerer den mindste værdi blandt markerede databaseposter +DPRODUCT = DPRODUKT ## Ganger værdierne i et bestemt felt med poster, der opfylder kriterierne i en database +DSTDEV = DSTDAFV ## Beregner et skøn over standardafvigelsen baseret på en stikprøve af markerede databaseposter +DSTDEVP = DSTDAFVP ## Beregner standardafvigelsen baseret på hele populationen af markerede databaseposter +DSUM = DSUM ## Sammenlægger de tal i feltkolonnen i databasen, der opfylder kriterierne +DVAR = DVARIANS ## Beregner varians baseret på en stikprøve af markerede databaseposter +DVARP = DVARIANSP ## Beregner varians baseret på hele populationen af markerede databaseposter + + +## +## Date and time functions Dato- og klokkeslætsfunktioner +## +DATE = DATO ## Returnerer serienummeret for en bestemt dato +DATEVALUE = DATOVÆRDI ## Konverterer en dato i form af tekst til et serienummer +DAY = DAG ## Konverterer et serienummer til en dag i måneden +DAYS360 = DAGE360 ## Beregner antallet af dage mellem to datoer på grundlag af et år med 360 dage +EDATE = EDATO ## Returnerer serienummeret for den dato, der ligger det angivne antal måneder før eller efter startdatoen +EOMONTH = SLUT.PÅ.MÅNED ## Returnerer serienummeret på den sidste dag i måneden før eller efter et angivet antal måneder +HOUR = TIME ## Konverterer et serienummer til en time +MINUTE = MINUT ## Konverterer et serienummer til et minut +MONTH = MÅNED ## Konverterer et serienummer til en måned +NETWORKDAYS = ANTAL.ARBEJDSDAGE ## Returnerer antallet af hele arbejdsdage mellem to datoer +NOW = NU ## Returnerer serienummeret for den aktuelle dato eller det aktuelle klokkeslæt +SECOND = SEKUND ## Konverterer et serienummer til et sekund +TIME = KLOKKESLÆT ## Returnerer serienummeret for et bestemt klokkeslæt +TIMEVALUE = TIDSVÆRDI ## Konverterer et klokkeslæt i form af tekst til et serienummer +TODAY = IDAG ## Returnerer serienummeret for dags dato +WEEKDAY = UGEDAG ## Konverterer et serienummer til en ugedag +WEEKNUM = UGE.NR ## Konverterer et serienummer til et tal, der angiver ugenummeret i året +WORKDAY = ARBEJDSDAG ## Returnerer serienummeret for dagen før eller efter det angivne antal arbejdsdage +YEAR = ÅR ## Konverterer et serienummer til et år +YEARFRAC = ÅR.BRØK ## Returnerer årsbrøken, der repræsenterer antallet af hele dage mellem startdato og slutdato + + +## +## Engineering functions Tekniske funktioner +## +BESSELI = BESSELI ## Returnerer den modificerede Bessel-funktion In(x) +BESSELJ = BESSELJ ## Returnerer Bessel-funktionen Jn(x) +BESSELK = BESSELK ## Returnerer den modificerede Bessel-funktion Kn(x) +BESSELY = BESSELY ## Returnerer Bessel-funktionen Yn(x) +BIN2DEC = BIN.TIL.DEC ## Konverterer et binært tal til et decimaltal +BIN2HEX = BIN.TIL.HEX ## Konverterer et binært tal til et heksadecimalt tal +BIN2OCT = BIN.TIL.OKT ## Konverterer et binært tal til et oktaltal. +COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koefficienter til et komplekst tal +CONVERT = KONVERTER ## Konverterer et tal fra én måleenhed til en anden +DEC2BIN = DEC.TIL.BIN ## Konverterer et decimaltal til et binært tal +DEC2HEX = DEC.TIL.HEX ## Konverterer et decimaltal til et heksadecimalt tal +DEC2OCT = DEC.TIL.OKT ## Konverterer et decimaltal til et oktaltal +DELTA = DELTA ## Tester, om to værdier er ens +ERF = FEJLFUNK ## Returner fejlfunktionen +ERFC = FEJLFUNK.KOMP ## Returnerer den komplementære fejlfunktion +GESTEP = GETRIN ## Tester, om et tal er større end en grænseværdi +HEX2BIN = HEX.TIL.BIN ## Konverterer et heksadecimalt tal til et binært tal +HEX2DEC = HEX.TIL.DEC ## Konverterer et decimaltal til et heksadecimalt tal +HEX2OCT = HEX.TIL.OKT ## Konverterer et heksadecimalt tal til et oktaltal +IMABS = IMAGABS ## Returnerer den absolutte værdi (modulus) for et komplekst tal +IMAGINARY = IMAGINÆR ## Returnerer den imaginære koefficient for et komplekst tal +IMARGUMENT = IMAGARGUMENT ## Returnerer argumentet theta, en vinkel udtrykt i radianer +IMCONJUGATE = IMAGKONJUGERE ## Returnerer den komplekse konjugation af et komplekst tal +IMCOS = IMAGCOS ## Returnerer et komplekst tals cosinus +IMDIV = IMAGDIV ## Returnerer kvotienten for to komplekse tal +IMEXP = IMAGEKSP ## Returnerer et komplekst tals eksponentialfunktion +IMLN = IMAGLN ## Returnerer et komplekst tals naturlige logaritme +IMLOG10 = IMAGLOG10 ## Returnerer et komplekst tals sædvanlige logaritme (titalslogaritme) +IMLOG2 = IMAGLOG2 ## Returnerer et komplekst tals sædvanlige logaritme (totalslogaritme) +IMPOWER = IMAGPOTENS ## Returnerer et komplekst tal opløftet i en heltalspotens +IMPRODUCT = IMAGPRODUKT ## Returnerer produktet af komplekse tal +IMREAL = IMAGREELT ## Returnerer den reelle koefficient for et komplekst tal +IMSIN = IMAGSIN ## Returnerer et komplekst tals sinus +IMSQRT = IMAGKVROD ## Returnerer et komplekst tals kvadratrod +IMSUB = IMAGSUB ## Returnerer forskellen mellem to komplekse tal +IMSUM = IMAGSUM ## Returnerer summen af komplekse tal +OCT2BIN = OKT.TIL.BIN ## Konverterer et oktaltal til et binært tal +OCT2DEC = OKT.TIL.DEC ## Konverterer et oktaltal til et decimaltal +OCT2HEX = OKT.TIL.HEX ## Konverterer et oktaltal til et heksadecimalt tal + + +## +## Financial functions Finansielle funktioner +## +ACCRINT = PÅLØBRENTE ## Returnerer den påløbne rente for et værdipapir med periodiske renteudbetalinger +ACCRINTM = PÅLØBRENTE.UDLØB ## Returnerer den påløbne rente for et værdipapir, hvor renteudbetalingen finder sted ved papirets udløb +AMORDEGRC = AMORDEGRC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode ved hjælp af en afskrivningskoefficient +AMORLINC = AMORLINC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode +COUPDAYBS = KUPONDAGE.SA ## Returnerer antallet af dage fra starten af kuponperioden til afregningsdatoen +COUPDAYS = KUPONDAGE.A ## Returnerer antallet af dage fra begyndelsen af kuponperioden til afregningsdatoen +COUPDAYSNC = KUPONDAGE.ANK ## Returnerer antallet af dage i den kuponperiode, der indeholder afregningsdatoen +COUPNCD = KUPONDAG.NÆSTE ## Returnerer den næste kupondato efter afregningsdatoen +COUPNUM = KUPONBETALINGER ## Returnerer antallet af kuponudbetalinger mellem afregnings- og udløbsdatoen +COUPPCD = KUPONDAG.FORRIGE ## Returnerer den forrige kupondato før afregningsdatoen +CUMIPMT = AKKUM.RENTE ## Returnerer den akkumulerede rente, der betales på et lån mellem to perioder +CUMPRINC = AKKUM.HOVEDSTOL ## Returnerer den akkumulerede nedbringelse af hovedstol mellem to perioder +DB = DB ## Returnerer afskrivningen på et aktiv i en angivet periode ved anvendelse af saldometoden +DDB = DSA ## Returnerer afskrivningsbeløbet for et aktiv over en bestemt periode ved anvendelse af dobbeltsaldometoden eller en anden afskrivningsmetode, som du angiver +DISC = DISKONTO ## Returnerer et værdipapirs diskonto +DOLLARDE = KR.DECIMAL ## Konverterer en kronepris udtrykt som brøk til en kronepris udtrykt som decimaltal +DOLLARFR = KR.BRØK ## Konverterer en kronepris udtrykt som decimaltal til en kronepris udtrykt som brøk +DURATION = VARIGHED ## Returnerer den årlige løbetid for et værdipapir med periodiske renteudbetalinger +EFFECT = EFFEKTIV.RENTE ## Returnerer den årlige effektive rente +FV = FV ## Returnerer fremtidsværdien af en investering +FVSCHEDULE = FVTABEL ## Returnerer den fremtidige værdi af en hovedstol, når der er tilskrevet rente og rentes rente efter forskellige rentesatser +INTRATE = RENTEFOD ## Returnerer renten på et fuldt ud investeret værdipapir +IPMT = R.YDELSE ## Returnerer renten fra en investering for en given periode +IRR = IA ## Returnerer den interne rente for en række pengestrømme +ISPMT = ISPMT ## Beregner den betalte rente i løbet af en bestemt investeringsperiode +MDURATION = MVARIGHED ## Returnerer Macauleys modificerede løbetid for et værdipapir med en formodet pari på kr. 100 +MIRR = MIA ## Returnerer den interne forrentning, hvor positive og negative pengestrømme finansieres til forskellig rente +NOMINAL = NOMINEL ## Returnerer den årlige nominelle rente +NPER = NPER ## Returnerer antallet af perioder for en investering +NPV = NUTIDSVÆRDI ## Returnerer nettonutidsværdien for en investering baseret på en række periodiske pengestrømme og en diskonteringssats +ODDFPRICE = ULIGE.KURS.PÅLYDENDE ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med en ulige (kort eller lang) første periode +ODDFYIELD = ULIGE.FØRSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige første periode +ODDLPRICE = ULIGE.SIDSTE.KURS ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med ulige sidste periode +ODDLYIELD = ULIGE.SIDSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige sidste periode +PMT = YDELSE ## Returnerer renten fra en investering for en given periode +PPMT = H.YDELSE ## Returnerer ydelsen på hovedstolen for en investering i en given periode +PRICE = KURS ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir med periodiske renteudbetalinger +PRICEDISC = KURS.DISKONTO ## Returnerer kursen pr. kr 100 nominel værdi for et diskonteret værdipapir +PRICEMAT = KURS.UDLØB ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir, hvor renten udbetales ved papirets udløb +PV = NV ## Returnerer den nuværende værdi af en investering +RATE = RENTE ## Returnerer renten i hver periode for en annuitet +RECEIVED = MODTAGET.VED.UDLØB ## Returnerer det beløb, der modtages ved udløbet af et fuldt ud investeret værdipapir +SLN = LA ## Returnerer den lineære afskrivning for et aktiv i en enkelt periode +SYD = ÅRSAFSKRIVNING ## Returnerer den årlige afskrivning på et aktiv i en bestemt periode +TBILLEQ = STATSOBLIGATION ## Returnerer det obligationsækvivalente afkast for en statsobligation +TBILLPRICE = STATSOBLIGATION.KURS ## Returnerer kursen pr. kr 100 nominel værdi for en statsobligation +TBILLYIELD = STATSOBLIGATION.AFKAST ## Returnerer en afkastet på en statsobligation +VDB = VSA ## Returnerer afskrivningen på et aktiv i en angivet periode, herunder delperioder, ved brug af dobbeltsaldometoden +XIRR = INTERN.RENTE ## Returnerer den interne rente for en plan over pengestrømme, der ikke behøver at være periodiske +XNPV = NETTO.NUTIDSVÆRDI ## Returnerer nutidsværdien for en plan over pengestrømme, der ikke behøver at være periodiske +YIELD = AFKAST ## Returnerer afkastet for et værdipapir med periodiske renteudbetalinger +YIELDDISC = AFKAST.DISKONTO ## Returnerer det årlige afkast for et diskonteret værdipapir, f.eks. en statsobligation +YIELDMAT = AFKAST.UDLØBSDATO ## Returnerer det årlige afkast for et værdipapir, hvor renten udbetales ved papirets udløb + + +## +## Information functions Informationsfunktioner +## +CELL = CELLE ## Returnerer oplysninger om formatering, placering eller indhold af en celle +ERROR.TYPE = FEJLTYPE ## Returnerer et tal, der svarer til en fejltype +INFO = INFO ## Returnerer oplysninger om det aktuelle operativmiljø +ISBLANK = ER.TOM ## Returnerer SAND, hvis værdien er tom +ISERR = ER.FJL ## Returnerer SAND, hvis værdien er en fejlværdi undtagen #I/T +ISERROR = ER.FEJL ## Returnerer SAND, hvis værdien er en fejlværdi +ISEVEN = ER.LIGE ## Returnerer SAND, hvis tallet er lige +ISLOGICAL = ER.LOGISK ## Returnerer SAND, hvis værdien er en logisk værdi +ISNA = ER.IKKE.TILGÆNGELIG ## Returnerer SAND, hvis værdien er fejlværdien #I/T +ISNONTEXT = ER.IKKE.TEKST ## Returnerer SAND, hvis værdien ikke er tekst +ISNUMBER = ER.TAL ## Returnerer SAND, hvis værdien er et tal +ISODD = ER.ULIGE ## Returnerer SAND, hvis tallet er ulige +ISREF = ER.REFERENCE ## Returnerer SAND, hvis værdien er en reference +ISTEXT = ER.TEKST ## Returnerer SAND, hvis værdien er tekst +N = TAL ## Returnerer en værdi konverteret til et tal +NA = IKKE.TILGÆNGELIG ## Returnerer fejlværdien #I/T +TYPE = VÆRDITYPE ## Returnerer et tal, der angiver datatypen for en værdi + + +## +## Logical functions Logiske funktioner +## +AND = OG ## Returnerer SAND, hvis alle argumenterne er sande +FALSE = FALSK ## Returnerer den logiske værdi FALSK +IF = HVIS ## Angiver en logisk test, der skal udføres +IFERROR = HVIS.FEJL ## Returnerer en værdi, du angiver, hvis en formel evauleres som en fejl. Returnerer i modsat fald resultatet af formlen +NOT = IKKE ## Vender argumentets logik om +OR = ELLER ## Returneret værdien SAND, hvis mindst ét argument er sandt +TRUE = SAND ## Returnerer den logiske værdi SAND + + +## +## Lookup and reference functions Opslags- og referencefunktioner +## +ADDRESS = ADRESSE ## Returnerer en reference som tekst til en enkelt celle i et regneark +AREAS = OMRÅDER ## Returnerer antallet af områder i en reference +CHOOSE = VÆLG ## Vælger en værdi på en liste med værdier +COLUMN = KOLONNE ## Returnerer kolonnenummeret i en reference +COLUMNS = KOLONNER ## Returnerer antallet af kolonner i en reference +HLOOKUP = VOPSLAG ## Søger i den øverste række af en matrix og returnerer værdien af den angivne celle +HYPERLINK = HYPERLINK ## Opretter en genvej kaldet et hyperlink, der åbner et dokument, som er lagret på en netværksserver, på et intranet eller på internettet +INDEX = INDEKS ## Anvender et indeks til at vælge en værdi fra en reference eller en matrix +INDIRECT = INDIREKTE ## Returnerer en reference, der er angivet af en tekstværdi +LOOKUP = SLÅ.OP ## Søger værdier i en vektor eller en matrix +MATCH = SAMMENLIGN ## Søger værdier i en reference eller en matrix +OFFSET = FORSKYDNING ## Returnerer en reference forskudt i forhold til en given reference +ROW = RÆKKE ## Returnerer rækkenummeret for en reference +ROWS = RÆKKER ## Returnerer antallet af rækker i en reference +RTD = RTD ## Henter realtidsdata fra et program, der understøtter COM-automatisering (Automation: En metode til at arbejde med objekter fra et andet program eller udviklingsværktøj. Automation, som tidligere blev kaldt OLE Automation, er en industristandard og en funktion i COM (Component Object Model).) +TRANSPOSE = TRANSPONER ## Returnerer en transponeret matrix +VLOOKUP = LOPSLAG ## Søger i øverste række af en matrix og flytter på tværs af rækken for at returnere en celleværdi + + +## +## Math and trigonometry functions Matematiske og trigonometriske funktioner +## +ABS = ABS ## Returnerer den absolutte værdi af et tal +ACOS = ARCCOS ## Returnerer et tals arcus cosinus +ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus af tal +ASIN = ARCSIN ## Returnerer et tals arcus sinus +ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus for tal +ATAN = ARCTAN ## Returnerer et tals arcus tangens +ATAN2 = ARCTAN2 ## Returnerer de angivne x- og y-koordinaters arcus tangens +ATANH = ARCTANH ## Returnerer et tals inverse hyperbolske tangens +CEILING = AFRUND.LOFT ## Afrunder et tal til nærmeste heltal eller til nærmeste multiplum af betydning +COMBIN = KOMBIN ## Returnerer antallet af kombinationer for et givet antal objekter +COS = COS ## Returnerer et tals cosinus +COSH = COSH ## Returnerer den inverse hyperbolske cosinus af et tal +DEGREES = GRADER ## Konverterer radianer til grader +EVEN = LIGE ## Runder et tal op til nærmeste lige heltal +EXP = EKSP ## Returnerer e opløftet til en potens af et angivet tal +FACT = FAKULTET ## Returnerer et tals fakultet +FACTDOUBLE = DOBBELT.FAKULTET ## Returnerer et tals dobbelte fakultet +FLOOR = AFRUND.GULV ## Runder et tal ned mod nul +GCD = STØRSTE.FÆLLES.DIVISOR ## Returnerer den største fælles divisor +INT = HELTAL ## Nedrunder et tal til det nærmeste heltal +LCM = MINDSTE.FÆLLES.MULTIPLUM ## Returnerer det mindste fælles multiplum +LN = LN ## Returnerer et tals naturlige logaritme +LOG = LOG ## Returnerer logaritmen for et tal på grundlag af et angivet grundtal +LOG10 = LOG10 ## Returnerer titalslogaritmen af et tal +MDETERM = MDETERM ## Returnerer determinanten for en matrix +MINVERSE = MINVERT ## Returnerer den inverse matrix for en matrix +MMULT = MPRODUKT ## Returnerer matrixproduktet af to matrixer +MOD = REST ## Returnerer restværdien fra division +MROUND = MAFRUND ## Returnerer et tal afrundet til det ønskede multiplum +MULTINOMIAL = MULTINOMIAL ## Returnerer et multinomialt talsæt +ODD = ULIGE ## Runder et tal op til nærmeste ulige heltal +PI = PI ## Returnerer værdien af pi +POWER = POTENS ## Returnerer resultatet af et tal opløftet til en potens +PRODUCT = PRODUKT ## Multiplicerer argumenterne +QUOTIENT = KVOTIENT ## Returnerer heltalsdelen ved division +RADIANS = RADIANER ## Konverterer grader til radianer +RAND = SLUMP ## Returnerer et tilfældigt tal mellem 0 og 1 +RANDBETWEEN = SLUMP.MELLEM ## Returnerer et tilfældigt tal mellem de tal, der angives +ROMAN = ROMERTAL ## Konverterer et arabertal til romertal som tekst +ROUND = AFRUND ## Afrunder et tal til et angivet antal decimaler +ROUNDDOWN = RUND.NED ## Runder et tal ned mod nul +ROUNDUP = RUND.OP ## Runder et tal op, væk fra 0 (nul) +SERIESSUM = SERIESUM ## Returnerer summen af en potensserie baseret på en formel +SIGN = FORTEGN ## Returnerer et tals fortegn +SIN = SIN ## Returnerer en given vinkels sinusværdi +SINH = SINH ## Returnerer den hyperbolske sinus af et tal +SQRT = KVROD ## Returnerer en positiv kvadratrod +SQRTPI = KVRODPI ## Returnerer kvadratroden af (tal * pi;) +SUBTOTAL = SUBTOTAL ## Returnerer en subtotal på en liste eller i en database +SUM = SUM ## Lægger argumenterne sammen +SUMIF = SUM.HVIS ## Lægger de celler sammen, der er specificeret af et givet kriterium. +SUMIFS = SUM.HVISER ## Lægger de celler i et område sammen, der opfylder flere kriterier. +SUMPRODUCT = SUMPRODUKT ## Returnerer summen af produkter af ens matrixkomponenter +SUMSQ = SUMKV ## Returnerer summen af argumenternes kvadrater +SUMX2MY2 = SUMX2MY2 ## Returnerer summen af differensen mellem kvadrater af ens værdier i to matrixer +SUMX2PY2 = SUMX2PY2 ## Returnerer summen af summen af kvadrater af tilsvarende værdier i to matrixer +SUMXMY2 = SUMXMY2 ## Returnerer summen af kvadrater af differenser mellem ens værdier i to matrixer +TAN = TAN ## Returnerer et tals tangens +TANH = TANH ## Returnerer et tals hyperbolske tangens +TRUNC = AFKORT ## Afkorter et tal til et heltal + + +## +## Statistical functions Statistiske funktioner +## +AVEDEV = MAD ## Returnerer den gennemsnitlige numeriske afvigelse fra stikprøvens middelværdi +AVERAGE = MIDDEL ## Returnerer middelværdien af argumenterne +AVERAGEA = MIDDELV ## Returnerer middelværdien af argumenterne og medtager tal, tekst og logiske værdier +AVERAGEIF = MIDDEL.HVIS ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder et givet kriterium, i et område +AVERAGEIFS = MIDDEL.HVISER ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder flere kriterier. +BETADIST = BETAFORDELING ## Returnerer den kumulative betafordelingsfunktion +BETAINV = BETAINV ## Returnerer den inverse kumulative fordelingsfunktion for en angivet betafordeling +BINOMDIST = BINOMIALFORDELING ## Returnerer punktsandsynligheden for binomialfordelingen +CHIDIST = CHIFORDELING ## Returnerer fraktilsandsynligheden for en chi2-fordeling +CHIINV = CHIINV ## Returnerer den inverse fraktilsandsynlighed for en chi2-fordeling +CHITEST = CHITEST ## Foretager en test for uafhængighed +CONFIDENCE = KONFIDENSINTERVAL ## Returnerer et konfidensinterval for en population +CORREL = KORRELATION ## Returnerer korrelationskoefficienten mellem to datasæt +COUNT = TÆL ## Tæller antallet af tal på en liste med argumenter +COUNTA = TÆLV ## Tæller antallet af værdier på en liste med argumenter +COUNTBLANK = ANTAL.BLANKE ## Tæller antallet af tomme celler i et område +COUNTIF = TÆLHVIS ## Tæller antallet af celler, som opfylder de givne kriterier, i et område +COUNTIFS = TÆL.HVISER ## Tæller antallet af de celler, som opfylder flere kriterier, i et område +COVAR = KOVARIANS ## Beregner kovariansen mellem to stokastiske variabler +CRITBINOM = KRITBINOM ## Returnerer den mindste værdi for x, for hvilken det gælder, at fordelingsfunktionen er mindre end eller lig med kriterieværdien. +DEVSQ = SAK ## Returnerer summen af de kvadrerede afvigelser fra middelværdien +EXPONDIST = EKSPFORDELING ## Returnerer eksponentialfordelingen +FDIST = FFORDELING ## Returnerer fraktilsandsynligheden for F-fordelingen +FINV = FINV ## Returnerer den inverse fraktilsandsynlighed for F-fordelingen +FISHER = FISHER ## Returnerer Fisher-transformationen +FISHERINV = FISHERINV ## Returnerer den inverse Fisher-transformation +FORECAST = PROGNOSE ## Returnerer en prognoseværdi baseret på lineær tendens +FREQUENCY = FREKVENS ## Returnerer en frekvensfordeling i en søjlevektor +FTEST = FTEST ## Returnerer resultatet af en F-test til sammenligning af varians +GAMMADIST = GAMMAFORDELING ## Returnerer fordelingsfunktionen for gammafordelingen +GAMMAINV = GAMMAINV ## Returnerer den inverse fordelingsfunktion for gammafordelingen +GAMMALN = GAMMALN ## Returnerer den naturlige logaritme til gammafordelingen, G(x) +GEOMEAN = GEOMIDDELVÆRDI ## Returnerer det geometriske gennemsnit +GROWTH = FORØGELSE ## Returnerer værdier langs en eksponentiel tendens +HARMEAN = HARMIDDELVÆRDI ## Returnerer det harmoniske gennemsnit +HYPGEOMDIST = HYPGEOFORDELING ## Returnerer punktsandsynligheden i en hypergeometrisk fordeling +INTERCEPT = SKÆRING ## Returnerer afskæringsværdien på y-aksen i en lineær regression +KURT = TOPSTEJL ## Returnerer kurtosisværdien for en stokastisk variabel +LARGE = STOR ## Returnerer den k'te største værdi i et datasæt +LINEST = LINREGR ## Returnerer parameterestimaterne for en lineær tendens +LOGEST = LOGREGR ## Returnerer parameterestimaterne for en eksponentiel tendens +LOGINV = LOGINV ## Returnerer den inverse fordelingsfunktion for lognormalfordelingen +LOGNORMDIST = LOGNORMFORDELING ## Returnerer fordelingsfunktionen for lognormalfordelingen +MAX = MAKS ## Returnerer den maksimale værdi på en liste med argumenter. +MAXA = MAKSV ## Returnerer den maksimale værdi på en liste med argumenter og medtager tal, tekst og logiske værdier +MEDIAN = MEDIAN ## Returnerer medianen for de angivne tal +MIN = MIN ## Returnerer den mindste værdi på en liste med argumenter. +MINA = MINV ## Returnerer den mindste værdi på en liste med argumenter og medtager tal, tekst og logiske værdier +MODE = HYPPIGST ## Returnerer den hyppigste værdi i et datasæt +NEGBINOMDIST = NEGBINOMFORDELING ## Returnerer den negative binomialfordeling +NORMDIST = NORMFORDELING ## Returnerer fordelingsfunktionen for normalfordelingen +NORMINV = NORMINV ## Returnerer den inverse fordelingsfunktion for normalfordelingen +NORMSDIST = STANDARDNORMFORDELING ## Returnerer fordelingsfunktionen for standardnormalfordelingen +NORMSINV = STANDARDNORMINV ## Returnerer den inverse fordelingsfunktion for standardnormalfordelingen +PEARSON = PEARSON ## Returnerer Pearsons korrelationskoefficient +PERCENTILE = FRAKTIL ## Returnerer den k'te fraktil for datasættet +PERCENTRANK = PROCENTPLADS ## Returnerer den procentuelle rang for en given værdi i et datasæt +PERMUT = PERMUT ## Returnerer antallet af permutationer for et givet sæt objekter +POISSON = POISSON ## Returnerer fordelingsfunktionen for en Poisson-fordeling +PROB = SANDSYNLIGHED ## Returnerer intervalsandsynligheden +QUARTILE = KVARTIL ## Returnerer kvartilen i et givet datasæt +RANK = PLADS ## Returnerer rangen for et tal på en liste med tal +RSQ = FORKLARINGSGRAD ## Returnerer R2-værdien fra en simpel lineær regression +SKEW = SKÆVHED ## Returnerer skævheden for en stokastisk variabel +SLOPE = HÆLDNING ## Returnerer estimatet på hældningen fra en simpel lineær regression +SMALL = MINDSTE ## Returnerer den k'te mindste værdi i datasættet +STANDARDIZE = STANDARDISER ## Returnerer en standardiseret værdi +STDEV = STDAFV ## Estimerer standardafvigelsen på basis af en stikprøve +STDEVA = STDAFVV ## Beregner standardafvigelsen på basis af en prøve og medtager tal, tekst og logiske værdier +STDEVP = STDAFVP ## Beregner standardafvigelsen på basis af en hel population +STDEVPA = STDAFVPV ## Beregner standardafvigelsen på basis af en hel population og medtager tal, tekst og logiske værdier +STEYX = STFYX ## Returnerer standardafvigelsen for de estimerede y-værdier i den simple lineære regression +TDIST = TFORDELING ## Returnerer fordelingsfunktionen for Student's t-fordeling +TINV = TINV ## Returnerer den inverse fordelingsfunktion for Student's t-fordeling +TREND = TENDENS ## Returnerer værdi under antagelse af en lineær tendens +TRIMMEAN = TRIMMIDDELVÆRDI ## Returnerer den trimmede middelværdi for datasættet +TTEST = TTEST ## Returnerer den sandsynlighed, der er forbundet med Student's t-test +VAR = VARIANS ## Beregner variansen på basis af en prøve +VARA = VARIANSV ## Beregner variansen på basis af en prøve og medtager tal, tekst og logiske værdier +VARP = VARIANSP ## Beregner variansen på basis af hele populationen +VARPA = VARIANSPV ## Beregner variansen på basis af hele populationen og medtager tal, tekst og logiske værdier +WEIBULL = WEIBULL ## Returnerer fordelingsfunktionen for Weibull-fordelingen +ZTEST = ZTEST ## Returnerer sandsynlighedsværdien ved en en-sidet z-test + + +## +## Text functions Tekstfunktioner +## +ASC = ASC ## Ændrer engelske tegn i fuld bredde (dobbelt-byte) eller katakana i en tegnstreng til tegn i halv bredde (enkelt-byte) +BAHTTEXT = BAHTTEKST ## Konverterer et tal til tekst ved hjælp af valutaformatet ß (baht) +CHAR = TEGN ## Returnerer det tegn, der svarer til kodenummeret +CLEAN = RENS ## Fjerner alle tegn, der ikke kan udskrives, fra tekst +CODE = KODE ## Returnerer en numerisk kode for det første tegn i en tekststreng +CONCATENATE = SAMMENKÆDNING ## Sammenkæder adskillige tekstelementer til ét tekstelement +DOLLAR = KR ## Konverterer et tal til tekst ved hjælp af valutaformatet kr. (kroner) +EXACT = EKSAKT ## Kontrollerer, om to tekstværdier er identiske +FIND = FIND ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) +FINDB = FINDB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) +FIXED = FAST ## Formaterer et tal som tekst med et fast antal decimaler +JIS = JIS ## Ændrer engelske tegn i halv bredde (enkelt-byte) eller katakana i en tegnstreng til tegn i fuld bredde (dobbelt-byte) +LEFT = VENSTRE ## Returnerer tegnet længst til venstre i en tekstværdi +LEFTB = VENSTREB ## Returnerer tegnet længst til venstre i en tekstværdi +LEN = LÆNGDE ## Returnerer antallet af tegn i en tekststreng +LENB = LÆNGDEB ## Returnerer antallet af tegn i en tekststreng +LOWER = SMÅ.BOGSTAVER ## Konverterer tekst til små bogstaver +MID = MIDT ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition +MIDB = MIDTB ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition +PHONETIC = FONETISK ## Uddrager de fonetiske (furigana) tegn fra en tekststreng +PROPER = STORT.FORBOGSTAV ## Konverterer første bogstav i hvert ord i teksten til stort bogstav +REPLACE = ERSTAT ## Erstatter tegn i tekst +REPLACEB = ERSTATB ## Erstatter tegn i tekst +REPT = GENTAG ## Gentager tekst et givet antal gange +RIGHT = HØJRE ## Returnerer tegnet længste til højre i en tekstværdi +RIGHTB = HØJREB ## Returnerer tegnet længste til højre i en tekstværdi +SEARCH = SØG ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) +SEARCHB = SØGB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) +SUBSTITUTE = UDSKIFT ## Udskifter gammel tekst med ny tekst i en tekststreng +T = T ## Konverterer argumenterne til tekst +TEXT = TEKST ## Formaterer et tal og konverterer det til tekst +TRIM = FJERN.OVERFLØDIGE.BLANKE ## Fjerner mellemrum fra tekst +UPPER = STORE.BOGSTAVER ## Konverterer tekst til store bogstaver +VALUE = VÆRDI ## Konverterer et tekstargument til et tal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config new file mode 100755 index 0000000..9751c4b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #WERT! +REF = #BEZUG! +NAME = #NAME? +NUM = #ZAHL! +NA = #NV diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions new file mode 100755 index 0000000..01df42f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/de/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Add-In- und Automatisierungsfunktionen +## +GETPIVOTDATA = PIVOTDATENZUORDNEN ## In einem PivotTable-Bericht gespeicherte Daten werden zurückgegeben. + + +## +## Cube functions Cubefunktionen +## +CUBEKPIMEMBER = CUBEKPIELEMENT ## Gibt Name, Eigenschaft und Measure eines Key Performance Indicators (KPI) zurück und zeigt den Namen und die Eigenschaft in der Zelle an. Ein KPI ist ein quantifizierbares Maß, wie z. B. der monatliche Bruttogewinn oder die vierteljährliche Mitarbeiterfluktuation, mit dessen Hilfe das Leistungsverhalten eines Unternehmens überwacht werden kann. +CUBEMEMBER = CUBEELEMENT ## Gibt ein Element oder ein Tuple in einer Cubehierarchie zurück. Wird verwendet, um zu überprüfen, ob das Element oder Tuple im Cube vorhanden ist. +CUBEMEMBERPROPERTY = CUBEELEMENTEIGENSCHAFT ## Gibt den Wert einer Elementeigenschaft im Cube zurück. Wird verwendet, um zu überprüfen, ob ein Elementname im Cube vorhanden ist, und um die für dieses Element angegebene Eigenschaft zurückzugeben. +CUBERANKEDMEMBER = CUBERANGELEMENT ## Gibt das n-te oder n-rangige Element in einer Menge zurück. Wird verwendet, um mindestens ein Element in einer Menge zurückzugeben, wie z. B. bester Vertriebsmitarbeiter oder 10 beste Kursteilnehmer. +CUBESET = CUBEMENGE ## Definiert eine berechnete Menge Elemente oder Tuples durch Senden eines Mengenausdrucks an den Cube auf dem Server, der die Menge erstellt und an Microsoft Office Excel zurückgibt. +CUBESETCOUNT = CUBEMENGENANZAHL ## Gibt die Anzahl der Elemente in einer Menge zurück. +CUBEVALUE = CUBEWERT ## Gibt einen Aggregatwert aus einem Cube zurück. + + +## +## Database functions Datenbankfunktionen +## +DAVERAGE = DBMITTELWERT ## Gibt den Mittelwert der ausgewählten Datenbankeinträge zurück +DCOUNT = DBANZAHL ## Zählt die Zellen mit Zahlen in einer Datenbank +DCOUNTA = DBANZAHL2 ## Zählt nicht leere Zellen in einer Datenbank +DGET = DBAUSZUG ## Extrahiert aus einer Datenbank einen einzelnen Datensatz, der den angegebenen Kriterien entspricht +DMAX = DBMAX ## Gibt den größten Wert aus ausgewählten Datenbankeinträgen zurück +DMIN = DBMIN ## Gibt den kleinsten Wert aus ausgewählten Datenbankeinträgen zurück +DPRODUCT = DBPRODUKT ## Multipliziert die Werte in einem bestimmten Feld mit Datensätzen, die den Kriterien in einer Datenbank entsprechen +DSTDEV = DBSTDABW ## Schätzt die Standardabweichung auf der Grundlage einer Stichprobe aus ausgewählten Datenbankeinträgen +DSTDEVP = DBSTDABWN ## Berechnet die Standardabweichung auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge +DSUM = DBSUMME ## Addiert die Zahlen in der Feldspalte mit Datensätzen in der Datenbank, die den Kriterien entsprechen +DVAR = DBVARIANZ ## Schätzt die Varianz auf der Grundlage ausgewählter Datenbankeinträge +DVARP = DBVARIANZEN ## Berechnet die Varianz auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge + + +## +## Date and time functions Datums- und Zeitfunktionen +## +DATE = DATUM ## Gibt die fortlaufende Zahl eines bestimmten Datums zurück +DATEVALUE = DATWERT ## Wandelt ein Datum in Form von Text in eine fortlaufende Zahl um +DAY = TAG ## Wandelt eine fortlaufende Zahl in den Tag des Monats um +DAYS360 = TAGE360 ## Berechnet die Anzahl der Tage zwischen zwei Datumsangaben ausgehend von einem Jahr, das 360 Tage hat +EDATE = EDATUM ## Gibt die fortlaufende Zahl des Datums zurück, bei dem es sich um die angegebene Anzahl von Monaten vor oder nach dem Anfangstermin handelt +EOMONTH = MONATSENDE ## Gibt die fortlaufende Zahl des letzten Tags des Monats vor oder nach einer festgelegten Anzahl von Monaten zurück +HOUR = STUNDE ## Wandelt eine fortlaufende Zahl in eine Stunde um +MINUTE = MINUTE ## Wandelt eine fortlaufende Zahl in eine Minute um +MONTH = MONAT ## Wandelt eine fortlaufende Zahl in einen Monat um +NETWORKDAYS = NETTOARBEITSTAGE ## Gibt die Anzahl von ganzen Arbeitstagen zwischen zwei Datumswerten zurück +NOW = JETZT ## Gibt die fortlaufende Zahl des aktuellen Datums und der aktuellen Uhrzeit zurück +SECOND = SEKUNDE ## Wandelt eine fortlaufende Zahl in eine Sekunde um +TIME = ZEIT ## Gibt die fortlaufende Zahl einer bestimmten Uhrzeit zurück +TIMEVALUE = ZEITWERT ## Wandelt eine Uhrzeit in Form von Text in eine fortlaufende Zahl um +TODAY = HEUTE ## Gibt die fortlaufende Zahl des heutigen Datums zurück +WEEKDAY = WOCHENTAG ## Wandelt eine fortlaufende Zahl in den Wochentag um +WEEKNUM = KALENDERWOCHE ## Wandelt eine fortlaufende Zahl in eine Zahl um, die angibt, in welche Woche eines Jahres das angegebene Datum fällt +WORKDAY = ARBEITSTAG ## Gibt die fortlaufende Zahl des Datums vor oder nach einer bestimmten Anzahl von Arbeitstagen zurück +YEAR = JAHR ## Wandelt eine fortlaufende Zahl in ein Jahr um +YEARFRAC = BRTEILJAHRE ## Gibt die Anzahl der ganzen Tage zwischen Ausgangsdatum und Enddatum in Bruchteilen von Jahren zurück + + +## +## Engineering functions Konstruktionsfunktionen +## +BESSELI = BESSELI ## Gibt die geänderte Besselfunktion In(x) zurück +BESSELJ = BESSELJ ## Gibt die Besselfunktion Jn(x) zurück +BESSELK = BESSELK ## Gibt die geänderte Besselfunktion Kn(x) zurück +BESSELY = BESSELY ## Gibt die Besselfunktion Yn(x) zurück +BIN2DEC = BININDEZ ## Wandelt eine binäre Zahl (Dualzahl) in eine dezimale Zahl um +BIN2HEX = BININHEX ## Wandelt eine binäre Zahl (Dualzahl) in eine hexadezimale Zahl um +BIN2OCT = BININOKT ## Wandelt eine binäre Zahl (Dualzahl) in eine oktale Zahl um +COMPLEX = KOMPLEXE ## Wandelt den Real- und Imaginärteil in eine komplexe Zahl um +CONVERT = UMWANDELN ## Wandelt eine Zahl von einem Maßsystem in ein anderes um +DEC2BIN = DEZINBIN ## Wandelt eine dezimale Zahl in eine binäre Zahl (Dualzahl) um +DEC2HEX = DEZINHEX ## Wandelt eine dezimale Zahl in eine hexadezimale Zahl um +DEC2OCT = DEZINOKT ## Wandelt eine dezimale Zahl in eine oktale Zahl um +DELTA = DELTA ## Überprüft, ob zwei Werte gleich sind +ERF = GAUSSFEHLER ## Gibt die Gauss'sche Fehlerfunktion zurück +ERFC = GAUSSFKOMPL ## Gibt das Komplement zur Gauss'schen Fehlerfunktion zurück +GESTEP = GGANZZAHL ## Überprüft, ob eine Zahl größer als ein gegebener Schwellenwert ist +HEX2BIN = HEXINBIN ## Wandelt eine hexadezimale Zahl in eine Binärzahl um +HEX2DEC = HEXINDEZ ## Wandelt eine hexadezimale Zahl in eine dezimale Zahl um +HEX2OCT = HEXINOKT ## Wandelt eine hexadezimale Zahl in eine Oktalzahl um +IMABS = IMABS ## Gibt den Absolutbetrag (Modulo) einer komplexen Zahl zurück +IMAGINARY = IMAGINÄRTEIL ## Gibt den Imaginärteil einer komplexen Zahl zurück +IMARGUMENT = IMARGUMENT ## Gibt das Argument Theta zurück, einen Winkel, der als Bogenmaß ausgedrückt wird +IMCONJUGATE = IMKONJUGIERTE ## Gibt die konjugierte komplexe Zahl zu einer komplexen Zahl zurück +IMCOS = IMCOS ## Gibt den Kosinus einer komplexen Zahl zurück +IMDIV = IMDIV ## Gibt den Quotienten zweier komplexer Zahlen zurück +IMEXP = IMEXP ## Gibt die algebraische Form einer in exponentieller Schreibweise vorliegenden komplexen Zahl zurück +IMLN = IMLN ## Gibt den natürlichen Logarithmus einer komplexen Zahl zurück +IMLOG10 = IMLOG10 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 10 zurück +IMLOG2 = IMLOG2 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 2 zurück +IMPOWER = IMAPOTENZ ## Potenziert eine komplexe Zahl mit einer ganzen Zahl +IMPRODUCT = IMPRODUKT ## Gibt das Produkt von komplexen Zahlen zurück +IMREAL = IMREALTEIL ## Gibt den Realteil einer komplexen Zahl zurück +IMSIN = IMSIN ## Gibt den Sinus einer komplexen Zahl zurück +IMSQRT = IMWURZEL ## Gibt die Quadratwurzel einer komplexen Zahl zurück +IMSUB = IMSUB ## Gibt die Differenz zwischen zwei komplexen Zahlen zurück +IMSUM = IMSUMME ## Gibt die Summe von komplexen Zahlen zurück +OCT2BIN = OKTINBIN ## Wandelt eine oktale Zahl in eine binäre Zahl (Dualzahl) um +OCT2DEC = OKTINDEZ ## Wandelt eine oktale Zahl in eine dezimale Zahl um +OCT2HEX = OKTINHEX ## Wandelt eine oktale Zahl in eine hexadezimale Zahl um + + +## +## Financial functions Finanzmathematische Funktionen +## +ACCRINT = AUFGELZINS ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers mit periodischen Zinszahlungen zurück +ACCRINTM = AUFGELZINSF ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers zurück, die bei Fälligkeit ausgezahlt werden +AMORDEGRC = AMORDEGRK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume mithilfe eines Abschreibungskoeffizienten zurück +AMORLINC = AMORLINEARK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume zurück +COUPDAYBS = ZINSTERMTAGVA ## Gibt die Anzahl der Tage vom Anfang des Zinstermins bis zum Abrechnungstermin zurück +COUPDAYS = ZINSTERMTAGE ## Gibt die Anzahl der Tage der Zinsperiode zurück, die den Abrechnungstermin einschließt +COUPDAYSNC = ZINSTERMTAGNZ ## Gibt die Anzahl der Tage vom Abrechnungstermin bis zum nächsten Zinstermin zurück +COUPNCD = ZINSTERMNZ ## Gibt das Datum des ersten Zinstermins nach dem Abrechnungstermin zurück +COUPNUM = ZINSTERMZAHL ## Gibt die Anzahl der Zinstermine zwischen Abrechnungs- und Fälligkeitsdatum zurück +COUPPCD = ZINSTERMVZ ## Gibt das Datum des letzten Zinstermins vor dem Abrechnungstermin zurück +CUMIPMT = KUMZINSZ ## Berechnet die kumulierten Zinsen, die zwischen zwei Perioden zu zahlen sind +CUMPRINC = KUMKAPITAL ## Berechnet die aufgelaufene Tilgung eines Darlehens, die zwischen zwei Perioden zu zahlen ist +DB = GDA2 ## Gibt die geometrisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück +DDB = GDA ## Gibt die Abschreibung eines Anlageguts für einen angegebenen Zeitraum unter Verwendung der degressiven Doppelraten-Abschreibung oder eines anderen von Ihnen angegebenen Abschreibungsverfahrens zurück +DISC = DISAGIO ## Gibt den in Prozent ausgedrückten Abzinsungssatz eines Wertpapiers zurück +DOLLARDE = NOTIERUNGDEZ ## Wandelt eine Notierung, die als Dezimalbruch ausgedrückt wurde, in eine Dezimalzahl um +DOLLARFR = NOTIERUNGBRU ## Wandelt eine Notierung, die als Dezimalzahl ausgedrückt wurde, in einen Dezimalbruch um +DURATION = DURATION ## Gibt die jährliche Duration eines Wertpapiers mit periodischen Zinszahlungen zurück +EFFECT = EFFEKTIV ## Gibt die jährliche Effektivverzinsung zurück +FV = ZW ## Gibt den zukünftigen Wert (Endwert) einer Investition zurück +FVSCHEDULE = ZW2 ## Gibt den aufgezinsten Wert des Anfangskapitals für eine Reihe periodisch unterschiedlicher Zinssätze zurück +INTRATE = ZINSSATZ ## Gibt den Zinssatz eines voll investierten Wertpapiers zurück +IPMT = ZINSZ ## Gibt die Zinszahlung einer Investition für die angegebene Periode zurück +IRR = IKV ## Gibt den internen Zinsfuß einer Investition ohne Finanzierungskosten oder Reinvestitionsgewinne zurück +ISPMT = ISPMT ## Berechnet die während eines bestimmten Zeitraums für eine Investition gezahlten Zinsen +MDURATION = MDURATION ## Gibt die geänderte Dauer für ein Wertpapier mit einem angenommenen Nennwert von 100 € zurück +MIRR = QIKV ## Gibt den internen Zinsfuß zurück, wobei positive und negative Zahlungen zu unterschiedlichen Sätzen finanziert werden +NOMINAL = NOMINAL ## Gibt die jährliche Nominalverzinsung zurück +NPER = ZZR ## Gibt die Anzahl der Zahlungsperioden einer Investition zurück +NPV = NBW ## Gibt den Nettobarwert einer Investition auf Basis periodisch anfallender Zahlungen und eines Abzinsungsfaktors zurück +ODDFPRICE = UNREGER.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück +ODDFYIELD = UNREGER.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück +ODDLPRICE = UNREGLE.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück +ODDLYIELD = UNREGLE.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück +PMT = RMZ ## Gibt die periodische Zahlung für eine Annuität zurück +PPMT = KAPZ ## Gibt die Kapitalrückzahlung einer Investition für eine angegebene Periode zurück +PRICE = KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das periodisch Zinsen auszahlt +PRICEDISC = KURSDISAGIO ## Gibt den Kurs pro 100 € Nennwert eines unverzinslichen Wertpapiers zurück +PRICEMAT = KURSFÄLLIG ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt +PV = BW ## Gibt den Barwert einer Investition zurück +RATE = ZINS ## Gibt den Zinssatz pro Zeitraum einer Annuität zurück +RECEIVED = AUSZAHLUNG ## Gibt den Auszahlungsbetrag eines voll investierten Wertpapiers am Fälligkeitstermin zurück +SLN = LIA ## Gibt die lineare Abschreibung eines Wirtschaftsguts pro Periode zurück +SYD = DIA ## Gibt die arithmetisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück +TBILLEQ = TBILLÄQUIV ## Gibt die Rendite für ein Wertpapier zurück +TBILLPRICE = TBILLKURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück +TBILLYIELD = TBILLRENDITE ## Gibt die Rendite für ein Wertpapier zurück +VDB = VDB ## Gibt die degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode oder Teilperiode zurück +XIRR = XINTZINSFUSS ## Gibt den internen Zinsfuß einer Reihe nicht periodisch anfallender Zahlungen zurück +XNPV = XKAPITALWERT ## Gibt den Nettobarwert (Kapitalwert) einer Reihe nicht periodisch anfallender Zahlungen zurück +YIELD = RENDITE ## Gibt die Rendite eines Wertpapiers zurück, das periodisch Zinsen auszahlt +YIELDDISC = RENDITEDIS ## Gibt die jährliche Rendite eines unverzinslichen Wertpapiers zurück +YIELDMAT = RENDITEFÄLL ## Gibt die jährliche Rendite eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt + + +## +## Information functions Informationsfunktionen +## +CELL = ZELLE ## Gibt Informationen zu Formatierung, Position oder Inhalt einer Zelle zurück +ERROR.TYPE = FEHLER.TYP ## Gibt eine Zahl zurück, die einem Fehlertyp entspricht +INFO = INFO ## Gibt Informationen zur aktuellen Betriebssystemumgebung zurück +ISBLANK = ISTLEER ## Gibt WAHR zurück, wenn der Wert leer ist +ISERR = ISTFEHL ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert außer #N/V ist +ISERROR = ISTFEHLER ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert ist +ISEVEN = ISTGERADE ## Gibt WAHR zurück, wenn es sich um eine gerade Zahl handelt +ISLOGICAL = ISTLOG ## Gibt WAHR zurück, wenn der Wert ein Wahrheitswert ist +ISNA = ISTNV ## Gibt WAHR zurück, wenn der Wert der Fehlerwert #N/V ist +ISNONTEXT = ISTKTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das keinen Text enthält +ISNUMBER = ISTZAHL ## Gibt WAHR zurück, wenn der Wert eine Zahl ist +ISODD = ISTUNGERADE ## Gibt WAHR zurück, wenn es sich um eine ungerade Zahl handelt +ISREF = ISTBEZUG ## Gibt WAHR zurück, wenn der Wert ein Bezug ist +ISTEXT = ISTTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das Text enthält +N = N ## Gibt den in eine Zahl umgewandelten Wert zurück +NA = NV ## Gibt den Fehlerwert #NV zurück +TYPE = TYP ## Gibt eine Zahl zurück, die den Datentyp des angegebenen Werts anzeigt + + +## +## Logical functions Logische Funktionen +## +AND = UND ## Gibt WAHR zurück, wenn alle zugehörigen Argumente WAHR sind +FALSE = FALSCH ## Gibt den Wahrheitswert FALSCH zurück +IF = WENN ## Gibt einen logischen Test zum Ausführen an +IFERROR = WENNFEHLER ## Gibt einen von Ihnen festgelegten Wert zurück, wenn die Auswertung der Formel zu einem Fehler führt; andernfalls wird das Ergebnis der Formel zurückgegeben +NOT = NICHT ## Kehrt den Wahrheitswert der zugehörigen Argumente um +OR = ODER ## Gibt WAHR zurück, wenn ein Argument WAHR ist +TRUE = WAHR ## Gibt den Wahrheitswert WAHR zurück + + +## +## Lookup and reference functions Nachschlage- und Verweisfunktionen +## +ADDRESS = ADRESSE ## Gibt einen Bezug auf eine einzelne Zelle in einem Tabellenblatt als Text zurück +AREAS = BEREICHE ## Gibt die Anzahl der innerhalb eines Bezugs aufgeführten Bereiche zurück +CHOOSE = WAHL ## Wählt einen Wert aus eine Liste mit Werten aus +COLUMN = SPALTE ## Gibt die Spaltennummer eines Bezugs zurück +COLUMNS = SPALTEN ## Gibt die Anzahl der Spalten in einem Bezug zurück +HLOOKUP = HVERWEIS ## Sucht in der obersten Zeile einer Matrix und gibt den Wert der angegebenen Zelle zurück +HYPERLINK = HYPERLINK ## Erstellt eine Verknüpfung, über die ein auf einem Netzwerkserver, in einem Intranet oder im Internet gespeichertes Dokument geöffnet wird +INDEX = INDEX ## Verwendet einen Index, um einen Wert aus einem Bezug oder einer Matrix auszuwählen +INDIRECT = INDIREKT ## Gibt einen Bezug zurück, der von einem Textwert angegeben wird +LOOKUP = LOOKUP ## Sucht Werte in einem Vektor oder einer Matrix +MATCH = VERGLEICH ## Sucht Werte in einem Bezug oder einer Matrix +OFFSET = BEREICH.VERSCHIEBEN ## Gibt einen Bezugoffset aus einem gegebenen Bezug zurück +ROW = ZEILE ## Gibt die Zeilennummer eines Bezugs zurück +ROWS = ZEILEN ## Gibt die Anzahl der Zeilen in einem Bezug zurück +RTD = RTD ## Ruft Echtzeitdaten von einem Programm ab, das die COM-Automatisierung (Automatisierung: Ein Verfahren, bei dem aus einer Anwendung oder einem Entwicklungstool heraus mit den Objekten einer anderen Anwendung gearbeitet wird. Die früher als OLE-Automatisierung bezeichnete Automatisierung ist ein Industriestandard und eine Funktion von COM (Component Object Model).) unterstützt +TRANSPOSE = MTRANS ## Gibt die transponierte Matrix einer Matrix zurück +VLOOKUP = SVERWEIS ## Sucht in der ersten Spalte einer Matrix und arbeitet sich durch die Zeile, um den Wert einer Zelle zurückzugeben + + +## +## Math and trigonometry functions Mathematische und trigonometrische Funktionen +## +ABS = ABS ## Gibt den Absolutwert einer Zahl zurück +ACOS = ARCCOS ## Gibt den Arkuskosinus einer Zahl zurück +ACOSH = ARCCOSHYP ## Gibt den umgekehrten hyperbolischen Kosinus einer Zahl zurück +ASIN = ARCSIN ## Gibt den Arkussinus einer Zahl zurück +ASINH = ARCSINHYP ## Gibt den umgekehrten hyperbolischen Sinus einer Zahl zurück +ATAN = ARCTAN ## Gibt den Arkustangens einer Zahl zurück +ATAN2 = ARCTAN2 ## Gibt den Arkustangens einer x- und einer y-Koordinate zurück +ATANH = ARCTANHYP ## Gibt den umgekehrten hyperbolischen Tangens einer Zahl zurück +CEILING = OBERGRENZE ## Rundet eine Zahl auf die nächste ganze Zahl oder das nächste Vielfache von Schritt +COMBIN = KOMBINATIONEN ## Gibt die Anzahl der Kombinationen für eine bestimmte Anzahl von Objekten zurück +COS = COS ## Gibt den Kosinus einer Zahl zurück +COSH = COSHYP ## Gibt den hyperbolischen Kosinus einer Zahl zurück +DEGREES = GRAD ## Wandelt Bogenmaß (Radiant) in Grad um +EVEN = GERADE ## Rundet eine Zahl auf die nächste gerade ganze Zahl auf +EXP = EXP ## Potenziert die Basis e mit der als Argument angegebenen Zahl +FACT = FAKULTÄT ## Gibt die Fakultät einer Zahl zurück +FACTDOUBLE = ZWEIFAKULTÄT ## Gibt die Fakultät zu Zahl mit Schrittlänge 2 zurück +FLOOR = UNTERGRENZE ## Rundet die Zahl auf Anzahl_Stellen ab +GCD = GGT ## Gibt den größten gemeinsamen Teiler zurück +INT = GANZZAHL ## Rundet eine Zahl auf die nächstkleinere ganze Zahl ab +LCM = KGV ## Gibt das kleinste gemeinsame Vielfache zurück +LN = LN ## Gibt den natürlichen Logarithmus einer Zahl zurück +LOG = LOG ## Gibt den Logarithmus einer Zahl zu der angegebenen Basis zurück +LOG10 = LOG10 ## Gibt den Logarithmus einer Zahl zur Basis 10 zurück +MDETERM = MDET ## Gibt die Determinante einer Matrix zurück +MINVERSE = MINV ## Gibt die inverse Matrix einer Matrix zurück +MMULT = MMULT ## Gibt das Produkt zweier Matrizen zurück +MOD = REST ## Gibt den Rest einer Division zurück +MROUND = VRUNDEN ## Gibt eine auf das gewünschte Vielfache gerundete Zahl zurück +MULTINOMIAL = POLYNOMIAL ## Gibt den Polynomialkoeffizienten einer Gruppe von Zahlen zurück +ODD = UNGERADE ## Rundet eine Zahl auf die nächste ungerade ganze Zahl auf +PI = PI ## Gibt den Wert Pi zurück +POWER = POTENZ ## Gibt als Ergebnis eine potenzierte Zahl zurück +PRODUCT = PRODUKT ## Multipliziert die zugehörigen Argumente +QUOTIENT = QUOTIENT ## Gibt den ganzzahligen Anteil einer Division zurück +RADIANS = BOGENMASS ## Wandelt Grad in Bogenmaß (Radiant) um +RAND = ZUFALLSZAHL ## Gibt eine Zufallszahl zwischen 0 und 1 zurück +RANDBETWEEN = ZUFALLSBEREICH ## Gibt eine Zufallszahl aus dem festgelegten Bereich zurück +ROMAN = RÖMISCH ## Wandelt eine arabische Zahl in eine römische Zahl als Text um +ROUND = RUNDEN ## Rundet eine Zahl auf eine bestimmte Anzahl von Dezimalstellen +ROUNDDOWN = ABRUNDEN ## Rundet die Zahl auf Anzahl_Stellen ab +ROUNDUP = AUFRUNDEN ## Rundet die Zahl auf Anzahl_Stellen auf +SERIESSUM = POTENZREIHE ## Gibt die Summe von Potenzen (zur Berechnung von Potenzreihen und dichotomen Wahrscheinlichkeiten) zurück +SIGN = VORZEICHEN ## Gibt das Vorzeichen einer Zahl zurück +SIN = SIN ## Gibt den Sinus einer Zahl zurück +SINH = SINHYP ## Gibt den hyperbolischen Sinus einer Zahl zurück +SQRT = WURZEL ## Gibt die Quadratwurzel einer Zahl zurück +SQRTPI = WURZELPI ## Gibt die Wurzel aus der mit Pi (pi) multiplizierten Zahl zurück +SUBTOTAL = TEILERGEBNIS ## Gibt ein Teilergebnis in einer Liste oder Datenbank zurück +SUM = SUMME ## Addiert die zugehörigen Argumente +SUMIF = SUMMEWENN ## Addiert Zahlen, die mit den Suchkriterien übereinstimmen +SUMIFS = SUMMEWENNS ## Die Zellen, die mehrere Kriterien erfüllen, werden in einem Bereich hinzugefügt +SUMPRODUCT = SUMMENPRODUKT ## Gibt die Summe der Produkte zusammengehöriger Matrixkomponenten zurück +SUMSQ = QUADRATESUMME ## Gibt die Summe der quadrierten Argumente zurück +SUMX2MY2 = SUMMEX2MY2 ## Gibt die Summe der Differenzen der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück +SUMX2PY2 = SUMMEX2PY2 ## Gibt die Summe der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück +SUMXMY2 = SUMMEXMY2 ## Gibt die Summe der quadrierten Differenzen für zusammengehörige Komponenten zweier Matrizen zurück +TAN = TAN ## Gibt den Tangens einer Zahl zurück +TANH = TANHYP ## Gibt den hyperbolischen Tangens einer Zahl zurück +TRUNC = KÜRZEN ## Schneidet die Kommastellen einer Zahl ab und gibt als Ergebnis eine ganze Zahl zurück + + +## +## Statistical functions Statistische Funktionen +## +AVEDEV = MITTELABW ## Gibt die durchschnittliche absolute Abweichung einer Reihe von Merkmalsausprägungen und ihrem Mittelwert zurück +AVERAGE = MITTELWERT ## Gibt den Mittelwert der zugehörigen Argumente zurück +AVERAGEA = MITTELWERTA ## Gibt den Mittelwert der zugehörigen Argumente, die Zahlen, Text und Wahrheitswerte enthalten, zurück +AVERAGEIF = MITTELWERTWENN ## Der Durchschnittswert (arithmetisches Mittel) für alle Zellen in einem Bereich, die einem angegebenen Kriterium entsprechen, wird zurückgegeben +AVERAGEIFS = MITTELWERTWENNS ## Gibt den Durchschnittswert (arithmetisches Mittel) aller Zellen zurück, die mehreren Kriterien entsprechen +BETADIST = BETAVERT ## Gibt die Werte der kumulierten Betaverteilungsfunktion zurück +BETAINV = BETAINV ## Gibt das Quantil der angegebenen Betaverteilung zurück +BINOMDIST = BINOMVERT ## Gibt Wahrscheinlichkeiten einer binomialverteilten Zufallsvariablen zurück +CHIDIST = CHIVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer Chi-Quadrat-verteilten Zufallsgröße zurück +CHIINV = CHIINV ## Gibt Quantile der Verteilungsfunktion (1-Alpha) der Chi-Quadrat-Verteilung zurück +CHITEST = CHITEST ## Gibt die Teststatistik eines Unabhängigkeitstests zurück +CONFIDENCE = KONFIDENZ ## Ermöglicht die Berechnung des 1-Alpha Konfidenzintervalls für den Erwartungswert einer Zufallsvariablen +CORREL = KORREL ## Gibt den Korrelationskoeffizienten zweier Reihen von Merkmalsausprägungen zurück +COUNT = ANZAHL ## Gibt die Anzahl der Zahlen in der Liste mit Argumenten an +COUNTA = ANZAHL2 ## Gibt die Anzahl der Werte in der Liste mit Argumenten an +COUNTBLANK = ANZAHLLEEREZELLEN ## Gibt die Anzahl der leeren Zellen in einem Bereich an +COUNTIF = ZÄHLENWENN ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit den Suchkriterien übereinstimmen +COUNTIFS = ZÄHLENWENNS ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit mehreren Suchkriterien übereinstimmen +COVAR = KOVAR ## Gibt die Kovarianz zurück, den Mittelwert der für alle Datenpunktpaare gebildeten Produkte der Abweichungen +CRITBINOM = KRITBINOM ## Gibt den kleinsten Wert zurück, für den die kumulierten Wahrscheinlichkeiten der Binomialverteilung kleiner oder gleich einer Grenzwahrscheinlichkeit sind +DEVSQ = SUMQUADABW ## Gibt die Summe der quadrierten Abweichungen der Datenpunkte von ihrem Stichprobenmittelwert zurück +EXPONDIST = EXPONVERT ## Gibt Wahrscheinlichkeiten einer exponential verteilten Zufallsvariablen zurück +FDIST = FVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer F-verteilten Zufallsvariablen zurück +FINV = FINV ## Gibt Quantile der F-Verteilung zurück +FISHER = FISHER ## Gibt die Fisher-Transformation zurück +FISHERINV = FISHERINV ## Gibt die Umkehrung der Fisher-Transformation zurück +FORECAST = PROGNOSE ## Gibt einen Wert zurück, der sich aus einem linearen Trend ergibt +FREQUENCY = HÄUFIGKEIT ## Gibt eine Häufigkeitsverteilung als vertikale Matrix zurück +FTEST = FTEST ## Gibt die Teststatistik eines F-Tests zurück +GAMMADIST = GAMMAVERT ## Gibt Wahrscheinlichkeiten einer gammaverteilten Zufallsvariablen zurück +GAMMAINV = GAMMAINV ## Gibt Quantile der Gammaverteilung zurück +GAMMALN = GAMMALN ## Gibt den natürlichen Logarithmus der Gammafunktion zurück, Γ(x) +GEOMEAN = GEOMITTEL ## Gibt das geometrische Mittel zurück +GROWTH = VARIATION ## Gibt Werte zurück, die sich aus einem exponentiellen Trend ergeben +HARMEAN = HARMITTEL ## Gibt das harmonische Mittel zurück +HYPGEOMDIST = HYPGEOMVERT ## Gibt Wahrscheinlichkeiten einer hypergeometrisch-verteilten Zufallsvariablen zurück +INTERCEPT = ACHSENABSCHNITT ## Gibt den Schnittpunkt der Regressionsgeraden zurück +KURT = KURT ## Gibt die Kurtosis (Exzess) einer Datengruppe zurück +LARGE = KGRÖSSTE ## Gibt den k-größten Wert einer Datengruppe zurück +LINEST = RGP ## Gibt die Parameter eines linearen Trends zurück +LOGEST = RKP ## Gibt die Parameter eines exponentiellen Trends zurück +LOGINV = LOGINV ## Gibt Quantile der Lognormalverteilung zurück +LOGNORMDIST = LOGNORMVERT ## Gibt Werte der Verteilungsfunktion einer lognormalverteilten Zufallsvariablen zurück +MAX = MAX ## Gibt den Maximalwert einer Liste mit Argumenten zurück +MAXA = MAXA ## Gibt den Maximalwert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten +MEDIAN = MEDIAN ## Gibt den Median der angegebenen Zahlen zurück +MIN = MIN ## Gibt den Minimalwert einer Liste mit Argumenten zurück +MINA = MINA ## Gibt den kleinsten Wert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten +MODE = MODALWERT ## Gibt den am häufigsten vorkommenden Wert in einer Datengruppe zurück +NEGBINOMDIST = NEGBINOMVERT ## Gibt Wahrscheinlichkeiten einer negativen, binominal verteilten Zufallsvariablen zurück +NORMDIST = NORMVERT ## Gibt Wahrscheinlichkeiten einer normal verteilten Zufallsvariablen zurück +NORMINV = NORMINV ## Gibt Quantile der Normalverteilung zurück +NORMSDIST = STANDNORMVERT ## Gibt Werte der Verteilungsfunktion einer standardnormalverteilten Zufallsvariablen zurück +NORMSINV = STANDNORMINV ## Gibt Quantile der Standardnormalverteilung zurück +PEARSON = PEARSON ## Gibt den Pearsonschen Korrelationskoeffizienten zurück +PERCENTILE = QUANTIL ## Gibt das Alpha-Quantil einer Gruppe von Daten zurück +PERCENTRANK = QUANTILSRANG ## Gibt den prozentualen Rang (Alpha) eines Werts in einer Datengruppe zurück +PERMUT = VARIATIONEN ## Gibt die Anzahl der Möglichkeiten zurück, um k Elemente aus einer Menge von n Elementen ohne Zurücklegen zu ziehen +POISSON = POISSON ## Gibt Wahrscheinlichkeiten einer poissonverteilten Zufallsvariablen zurück +PROB = WAHRSCHBEREICH ## Gibt die Wahrscheinlichkeit für ein von zwei Werten eingeschlossenes Intervall zurück +QUARTILE = QUARTILE ## Gibt die Quartile der Datengruppe zurück +RANK = RANG ## Gibt den Rang zurück, den eine Zahl innerhalb einer Liste von Zahlen einnimmt +RSQ = BESTIMMTHEITSMASS ## Gibt das Quadrat des Pearsonschen Korrelationskoeffizienten zurück +SKEW = SCHIEFE ## Gibt die Schiefe einer Verteilung zurück +SLOPE = STEIGUNG ## Gibt die Steigung der Regressionsgeraden zurück +SMALL = KKLEINSTE ## Gibt den k-kleinsten Wert einer Datengruppe zurück +STANDARDIZE = STANDARDISIERUNG ## Gibt den standardisierten Wert zurück +STDEV = STABW ## Schätzt die Standardabweichung ausgehend von einer Stichprobe +STDEVA = STABWA ## Schätzt die Standardabweichung ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält +STDEVP = STABWN ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit +STDEVPA = STABWNA ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält +STEYX = STFEHLERYX ## Gibt den Standardfehler der geschätzten y-Werte für alle x-Werte der Regression zurück +TDIST = TVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer (Student) t-verteilten Zufallsvariablen zurück +TINV = TINV ## Gibt Quantile der t-Verteilung zurück +TREND = TREND ## Gibt Werte zurück, die sich aus einem linearen Trend ergeben +TRIMMEAN = GESTUTZTMITTEL ## Gibt den Mittelwert einer Datengruppe zurück, ohne die Randwerte zu berücksichtigen +TTEST = TTEST ## Gibt die Teststatistik eines Student'schen t-Tests zurück +VAR = VARIANZ ## Schätzt die Varianz ausgehend von einer Stichprobe +VARA = VARIANZA ## Schätzt die Varianz ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält +VARP = VARIANZEN ## Berechnet die Varianz ausgehend von der Grundgesamtheit +VARPA = VARIANZENA ## Berechnet die Varianz ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält +WEIBULL = WEIBULL ## Gibt Wahrscheinlichkeiten einer weibullverteilten Zufallsvariablen zurück +ZTEST = GTEST ## Gibt den einseitigen Wahrscheinlichkeitswert für einen Gausstest (Normalverteilung) zurück + + +## +## Text functions Textfunktionen +## +ASC = ASC ## Konvertiert DB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in SB-Text +BAHTTEXT = BAHTTEXT ## Wandelt eine Zahl in Text im Währungsformat ß (Baht) um +CHAR = ZEICHEN ## Gibt das der Codezahl entsprechende Zeichen zurück +CLEAN = SÄUBERN ## Löscht alle nicht druckbaren Zeichen aus einem Text +CODE = CODE ## Gibt die Codezahl des ersten Zeichens in einem Text zurück +CONCATENATE = VERKETTEN ## Verknüpft mehrere Textelemente zu einem Textelement +DOLLAR = DM ## Wandelt eine Zahl in Text im Währungsformat € (Euro) um +EXACT = IDENTISCH ## Prüft, ob zwei Textwerte identisch sind +FIND = FINDEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) +FINDB = FINDENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) +FIXED = FEST ## Formatiert eine Zahl als Text mit einer festen Anzahl von Dezimalstellen +JIS = JIS ## Konvertiert SB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in DB-Text +LEFT = LINKS ## Gibt die Zeichen ganz links in einem Textwert zurück +LEFTB = LINKSB ## Gibt die Zeichen ganz links in einem Textwert zurück +LEN = LÄNGE ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück +LENB = LÄNGEB ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück +LOWER = KLEIN ## Wandelt Text in Kleinbuchstaben um +MID = TEIL ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück +MIDB = TEILB ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück +PHONETIC = PHONETIC ## Extrahiert die phonetischen (Furigana-)Zeichen aus einer Textzeichenfolge +PROPER = GROSS2 ## Wandelt den ersten Buchstaben aller Wörter eines Textwerts in Großbuchstaben um +REPLACE = ERSETZEN ## Ersetzt Zeichen in Text +REPLACEB = ERSETZENB ## Ersetzt Zeichen in Text +REPT = WIEDERHOLEN ## Wiederholt einen Text so oft wie angegeben +RIGHT = RECHTS ## Gibt die Zeichen ganz rechts in einem Textwert zurück +RIGHTB = RECHTSB ## Gibt die Zeichen ganz rechts in einem Textwert zurück +SEARCH = SUCHEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) +SEARCHB = SUCHENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) +SUBSTITUTE = WECHSELN ## Ersetzt in einer Zeichenfolge neuen Text gegen alten +T = T ## Wandelt die zugehörigen Argumente in Text um +TEXT = TEXT ## Formatiert eine Zahl und wandelt sie in Text um +TRIM = GLÄTTEN ## Entfernt Leerzeichen aus Text +UPPER = GROSS ## Wandelt Text in Großbuchstaben um +VALUE = WERT ## Wandelt ein Textargument in eine Zahl um diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config new file mode 100755 index 0000000..859e4be --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/en/uk/config @@ -0,0 +1,8 @@ +## +## PhpSpreadsheet +## + +## +## (For future use) +## +currencySymbol = £ diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config new file mode 100755 index 0000000..5b9b948 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € + + +## +## Excel Error Codes (For future use) + +## +NULL = #¡NULO! +DIV0 = #¡DIV/0! +VALUE = #¡VALOR! +REF = #¡REF! +NAME = #¿NOMBRE? +NUM = #¡NÚM! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions new file mode 100755 index 0000000..ac1ac86 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/es/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funciones de complementos y automatización +## +GETPIVOTDATA = IMPORTARDATOSDINAMICOS ## Devuelve los datos almacenados en un informe de tabla dinámica. + + +## +## Cube functions Funciones de cubo +## +CUBEKPIMEMBER = MIEMBROKPICUBO ## Devuelve un nombre, propiedad y medida de indicador de rendimiento clave (KPI) y muestra el nombre y la propiedad en la celda. Un KPI es una medida cuantificable, como los beneficios brutos mensuales o la facturación trimestral por empleado, que se usa para supervisar el rendimiento de una organización. +CUBEMEMBER = MIEMBROCUBO ## Devuelve un miembro o tupla en una jerarquía de cubo. Se usa para validar la existencia del miembro o la tupla en el cubo. +CUBEMEMBERPROPERTY = PROPIEDADMIEMBROCUBO ## Devuelve el valor de una propiedad de miembro del cubo Se usa para validar la existencia de un nombre de miembro en el cubo y para devolver la propiedad especificada para este miembro. +CUBERANKEDMEMBER = MIEMBRORANGOCUBO ## Devuelve el miembro n, o clasificado, de un conjunto. Se usa para devolver uno o más elementos de un conjunto, por ejemplo, el representante con mejores ventas o los diez mejores alumnos. +CUBESET = CONJUNTOCUBO ## Define un conjunto calculado de miembros o tuplas mediante el envío de una expresión de conjunto al cubo en el servidor, lo que crea el conjunto y, después, devuelve dicho conjunto a Microsoft Office Excel. +CUBESETCOUNT = RECUENTOCONJUNTOCUBO ## Devuelve el número de elementos de un conjunto. +CUBEVALUE = VALORCUBO ## Devuelve un valor agregado de un cubo. + + +## +## Database functions Funciones de base de datos +## +DAVERAGE = BDPROMEDIO ## Devuelve el promedio de las entradas seleccionadas en la base de datos. +DCOUNT = BDCONTAR ## Cuenta el número de celdas que contienen números en una base de datos. +DCOUNTA = BDCONTARA ## Cuenta el número de celdas no vacías en una base de datos. +DGET = BDEXTRAER ## Extrae de una base de datos un único registro que cumple los criterios especificados. +DMAX = BDMAX ## Devuelve el valor máximo de las entradas seleccionadas de la base de datos. +DMIN = BDMIN ## Devuelve el valor mínimo de las entradas seleccionadas de la base de datos. +DPRODUCT = BDPRODUCTO ## Multiplica los valores de un campo concreto de registros de una base de datos que cumplen los criterios especificados. +DSTDEV = BDDESVEST ## Calcula la desviación estándar a partir de una muestra de entradas seleccionadas en la base de datos. +DSTDEVP = BDDESVESTP ## Calcula la desviación estándar en función de la población total de las entradas seleccionadas de la base de datos. +DSUM = BDSUMA ## Suma los números de la columna de campo de los registros de la base de datos que cumplen los criterios. +DVAR = BDVAR ## Calcula la varianza a partir de una muestra de entradas seleccionadas de la base de datos. +DVARP = BDVARP ## Calcula la varianza a partir de la población total de entradas seleccionadas de la base de datos. + + +## +## Date and time functions Funciones de fecha y hora +## +DATE = FECHA ## Devuelve el número de serie correspondiente a una fecha determinada. +DATEVALUE = FECHANUMERO ## Convierte una fecha con formato de texto en un valor de número de serie. +DAY = DIA ## Convierte un número de serie en un valor de día del mes. +DAYS360 = DIAS360 ## Calcula el número de días entre dos fechas a partir de un año de 360 días. +EDATE = FECHA.MES ## Devuelve el número de serie de la fecha equivalente al número indicado de meses anteriores o posteriores a la fecha inicial. +EOMONTH = FIN.MES ## Devuelve el número de serie correspondiente al último día del mes anterior o posterior a un número de meses especificado. +HOUR = HORA ## Convierte un número de serie en un valor de hora. +MINUTE = MINUTO ## Convierte un número de serie en un valor de minuto. +MONTH = MES ## Convierte un número de serie en un valor de mes. +NETWORKDAYS = DIAS.LAB ## Devuelve el número de todos los días laborables existentes entre dos fechas. +NOW = AHORA ## Devuelve el número de serie correspondiente a la fecha y hora actuales. +SECOND = SEGUNDO ## Convierte un número de serie en un valor de segundo. +TIME = HORA ## Devuelve el número de serie correspondiente a una hora determinada. +TIMEVALUE = HORANUMERO ## Convierte una hora con formato de texto en un valor de número de serie. +TODAY = HOY ## Devuelve el número de serie correspondiente al día actual. +WEEKDAY = DIASEM ## Convierte un número de serie en un valor de día de la semana. +WEEKNUM = NUM.DE.SEMANA ## Convierte un número de serie en un número que representa el lugar numérico correspondiente a una semana de un año. +WORKDAY = DIA.LAB ## Devuelve el número de serie de la fecha que tiene lugar antes o después de un número determinado de días laborables. +YEAR = AÑO ## Convierte un número de serie en un valor de año. +YEARFRAC = FRAC.AÑO ## Devuelve la fracción de año que representa el número total de días existentes entre el valor de fecha_inicial y el de fecha_final. + + +## +## Engineering functions Funciones de ingeniería +## +BESSELI = BESSELI ## Devuelve la función Bessel In(x) modificada. +BESSELJ = BESSELJ ## Devuelve la función Bessel Jn(x). +BESSELK = BESSELK ## Devuelve la función Bessel Kn(x) modificada. +BESSELY = BESSELY ## Devuelve la función Bessel Yn(x). +BIN2DEC = BIN.A.DEC ## Convierte un número binario en decimal. +BIN2HEX = BIN.A.HEX ## Convierte un número binario en hexadecimal. +BIN2OCT = BIN.A.OCT ## Convierte un número binario en octal. +COMPLEX = COMPLEJO ## Convierte coeficientes reales e imaginarios en un número complejo. +CONVERT = CONVERTIR ## Convierte un número de un sistema de medida a otro. +DEC2BIN = DEC.A.BIN ## Convierte un número decimal en binario. +DEC2HEX = DEC.A.HEX ## Convierte un número decimal en hexadecimal. +DEC2OCT = DEC.A.OCT ## Convierte un número decimal en octal. +DELTA = DELTA ## Comprueba si dos valores son iguales. +ERF = FUN.ERROR ## Devuelve la función de error. +ERFC = FUN.ERROR.COMPL ## Devuelve la función de error complementario. +GESTEP = MAYOR.O.IGUAL ## Comprueba si un número es mayor que un valor de umbral. +HEX2BIN = HEX.A.BIN ## Convierte un número hexadecimal en binario. +HEX2DEC = HEX.A.DEC ## Convierte un número hexadecimal en decimal. +HEX2OCT = HEX.A.OCT ## Convierte un número hexadecimal en octal. +IMABS = IM.ABS ## Devuelve el valor absoluto (módulo) de un número complejo. +IMAGINARY = IMAGINARIO ## Devuelve el coeficiente imaginario de un número complejo. +IMARGUMENT = IM.ANGULO ## Devuelve el argumento theta, un ángulo expresado en radianes. +IMCONJUGATE = IM.CONJUGADA ## Devuelve la conjugada compleja de un número complejo. +IMCOS = IM.COS ## Devuelve el coseno de un número complejo. +IMDIV = IM.DIV ## Devuelve el cociente de dos números complejos. +IMEXP = IM.EXP ## Devuelve el valor exponencial de un número complejo. +IMLN = IM.LN ## Devuelve el logaritmo natural (neperiano) de un número complejo. +IMLOG10 = IM.LOG10 ## Devuelve el logaritmo en base 10 de un número complejo. +IMLOG2 = IM.LOG2 ## Devuelve el logaritmo en base 2 de un número complejo. +IMPOWER = IM.POT ## Devuelve un número complejo elevado a una potencia entera. +IMPRODUCT = IM.PRODUCT ## Devuelve el producto de números complejos. +IMREAL = IM.REAL ## Devuelve el coeficiente real de un número complejo. +IMSIN = IM.SENO ## Devuelve el seno de un número complejo. +IMSQRT = IM.RAIZ2 ## Devuelve la raíz cuadrada de un número complejo. +IMSUB = IM.SUSTR ## Devuelve la diferencia entre dos números complejos. +IMSUM = IM.SUM ## Devuelve la suma de números complejos. +OCT2BIN = OCT.A.BIN ## Convierte un número octal en binario. +OCT2DEC = OCT.A.DEC ## Convierte un número octal en decimal. +OCT2HEX = OCT.A.HEX ## Convierte un número octal en hexadecimal. + + +## +## Financial functions Funciones financieras +## +ACCRINT = INT.ACUM ## Devuelve el interés acumulado de un valor bursátil con pagos de interés periódicos. +ACCRINTM = INT.ACUM.V ## Devuelve el interés acumulado de un valor bursátil con pagos de interés al vencimiento. +AMORDEGRC = AMORTIZ.PROGRE ## Devuelve la amortización de cada período contable mediante el uso de un coeficiente de amortización. +AMORLINC = AMORTIZ.LIN ## Devuelve la amortización de cada uno de los períodos contables. +COUPDAYBS = CUPON.DIAS.L1 ## Devuelve el número de días desde el principio del período de un cupón hasta la fecha de liquidación. +COUPDAYS = CUPON.DIAS ## Devuelve el número de días del período (entre dos cupones) donde se encuentra la fecha de liquidación. +COUPDAYSNC = CUPON.DIAS.L2 ## Devuelve el número de días desde la fecha de liquidación hasta la fecha del próximo cupón. +COUPNCD = CUPON.FECHA.L2 ## Devuelve la fecha del próximo cupón después de la fecha de liquidación. +COUPNUM = CUPON.NUM ## Devuelve el número de pagos de cupón entre la fecha de liquidación y la fecha de vencimiento. +COUPPCD = CUPON.FECHA.L1 ## Devuelve la fecha de cupón anterior a la fecha de liquidación. +CUMIPMT = PAGO.INT.ENTRE ## Devuelve el interés acumulado pagado entre dos períodos. +CUMPRINC = PAGO.PRINC.ENTRE ## Devuelve el capital acumulado pagado de un préstamo entre dos períodos. +DB = DB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización de saldo fijo. +DDB = DDB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización por doble disminución de saldo u otro método que se especifique. +DISC = TASA.DESC ## Devuelve la tasa de descuento de un valor bursátil. +DOLLARDE = MONEDA.DEC ## Convierte una cotización de un valor bursátil expresada en forma fraccionaria en una cotización de un valor bursátil expresada en forma decimal. +DOLLARFR = MONEDA.FRAC ## Convierte una cotización de un valor bursátil expresada en forma decimal en una cotización de un valor bursátil expresada en forma fraccionaria. +DURATION = DURACION ## Devuelve la duración anual de un valor bursátil con pagos de interés periódico. +EFFECT = INT.EFECTIVO ## Devuelve la tasa de interés anual efectiva. +FV = VF ## Devuelve el valor futuro de una inversión. +FVSCHEDULE = VF.PLAN ## Devuelve el valor futuro de un capital inicial después de aplicar una serie de tasas de interés compuesto. +INTRATE = TASA.INT ## Devuelve la tasa de interés para la inversión total de un valor bursátil. +IPMT = PAGOINT ## Devuelve el pago de intereses de una inversión durante un período determinado. +IRR = TIR ## Devuelve la tasa interna de retorno para una serie de flujos de efectivo periódicos. +ISPMT = INT.PAGO.DIR ## Calcula el interés pagado durante un período específico de una inversión. +MDURATION = DURACION.MODIF ## Devuelve la duración de Macauley modificada de un valor bursátil con un valor nominal supuesto de 100 $. +MIRR = TIRM ## Devuelve la tasa interna de retorno donde se financian flujos de efectivo positivos y negativos a tasas diferentes. +NOMINAL = TASA.NOMINAL ## Devuelve la tasa nominal de interés anual. +NPER = NPER ## Devuelve el número de períodos de una inversión. +NPV = VNA ## Devuelve el valor neto actual de una inversión en función de una serie de flujos periódicos de efectivo y una tasa de descuento. +ODDFPRICE = PRECIO.PER.IRREGULAR.1 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un primer período impar. +ODDFYIELD = RENDTO.PER.IRREGULAR.1 ## Devuelve el rendimiento de un valor bursátil con un primer período impar. +ODDLPRICE = PRECIO.PER.IRREGULAR.2 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un último período impar. +ODDLYIELD = RENDTO.PER.IRREGULAR.2 ## Devuelve el rendimiento de un valor bursátil con un último período impar. +PMT = PAGO ## Devuelve el pago periódico de una anualidad. +PPMT = PAGOPRIN ## Devuelve el pago de capital de una inversión durante un período determinado. +PRICE = PRECIO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga una tasa de interés periódico. +PRICEDISC = PRECIO.DESCUENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con descuento. +PRICEMAT = PRECIO.VENCIMIENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga interés a su vencimiento. +PV = VALACT ## Devuelve el valor actual de una inversión. +RATE = TASA ## Devuelve la tasa de interés por período de una anualidad. +RECEIVED = CANTIDAD.RECIBIDA ## Devuelve la cantidad recibida al vencimiento de un valor bursátil completamente invertido. +SLN = SLN ## Devuelve la amortización por método directo de un bien en un período dado. +SYD = SYD ## Devuelve la amortización por suma de dígitos de los años de un bien durante un período especificado. +TBILLEQ = LETRA.DE.TES.EQV.A.BONO ## Devuelve el rendimiento de un bono equivalente a una letra del Tesoro (de EE.UU.) +TBILLPRICE = LETRA.DE.TES.PRECIO ## Devuelve el precio por un valor nominal de 100 $ de una letra del Tesoro (de EE.UU.) +TBILLYIELD = LETRA.DE.TES.RENDTO ## Devuelve el rendimiento de una letra del Tesoro (de EE.UU.) +VDB = DVS ## Devuelve la amortización de un bien durante un período específico o parcial a través del método de cálculo del saldo en disminución. +XIRR = TIR.NO.PER ## Devuelve la tasa interna de retorno para un flujo de efectivo que no es necesariamente periódico. +XNPV = VNA.NO.PER ## Devuelve el valor neto actual para un flujo de efectivo que no es necesariamente periódico. +YIELD = RENDTO ## Devuelve el rendimiento de un valor bursátil que paga intereses periódicos. +YIELDDISC = RENDTO.DESC ## Devuelve el rendimiento anual de un valor bursátil con descuento; por ejemplo, una letra del Tesoro (de EE.UU.) +YIELDMAT = RENDTO.VENCTO ## Devuelve el rendimiento anual de un valor bursátil que paga intereses al vencimiento. + + +## +## Information functions Funciones de información +## +CELL = CELDA ## Devuelve información acerca del formato, la ubicación o el contenido de una celda. +ERROR.TYPE = TIPO.DE.ERROR ## Devuelve un número que corresponde a un tipo de error. +INFO = INFO ## Devuelve información acerca del entorno operativo en uso. +ISBLANK = ESBLANCO ## Devuelve VERDADERO si el valor está en blanco. +ISERR = ESERR ## Devuelve VERDADERO si el valor es cualquier valor de error excepto #N/A. +ISERROR = ESERROR ## Devuelve VERDADERO si el valor es cualquier valor de error. +ISEVEN = ES.PAR ## Devuelve VERDADERO si el número es par. +ISLOGICAL = ESLOGICO ## Devuelve VERDADERO si el valor es un valor lógico. +ISNA = ESNOD ## Devuelve VERDADERO si el valor es el valor de error #N/A. +ISNONTEXT = ESNOTEXTO ## Devuelve VERDADERO si el valor no es texto. +ISNUMBER = ESNUMERO ## Devuelve VERDADERO si el valor es un número. +ISODD = ES.IMPAR ## Devuelve VERDADERO si el número es impar. +ISREF = ESREF ## Devuelve VERDADERO si el valor es una referencia. +ISTEXT = ESTEXTO ## Devuelve VERDADERO si el valor es texto. +N = N ## Devuelve un valor convertido en un número. +NA = ND ## Devuelve el valor de error #N/A. +TYPE = TIPO ## Devuelve un número que indica el tipo de datos de un valor. + + +## +## Logical functions Funciones lógicas +## +AND = Y ## Devuelve VERDADERO si todos sus argumentos son VERDADERO. +FALSE = FALSO ## Devuelve el valor lógico FALSO. +IF = SI ## Especifica una prueba lógica que realizar. +IFERROR = SI.ERROR ## Devuelve un valor que se especifica si una fórmula lo evalúa como un error; de lo contrario, devuelve el resultado de la fórmula. +NOT = NO ## Invierte el valor lógico del argumento. +OR = O ## Devuelve VERDADERO si cualquier argumento es VERDADERO. +TRUE = VERDADERO ## Devuelve el valor lógico VERDADERO. + + +## +## Lookup and reference functions Funciones de búsqueda y referencia +## +ADDRESS = DIRECCION ## Devuelve una referencia como texto a una sola celda de una hoja de cálculo. +AREAS = AREAS ## Devuelve el número de áreas de una referencia. +CHOOSE = ELEGIR ## Elige un valor de una lista de valores. +COLUMN = COLUMNA ## Devuelve el número de columna de una referencia. +COLUMNS = COLUMNAS ## Devuelve el número de columnas de una referencia. +HLOOKUP = BUSCARH ## Busca en la fila superior de una matriz y devuelve el valor de la celda indicada. +HYPERLINK = HIPERVINCULO ## Crea un acceso directo o un salto que abre un documento almacenado en un servidor de red, en una intranet o en Internet. +INDEX = INDICE ## Usa un índice para elegir un valor de una referencia o matriz. +INDIRECT = INDIRECTO ## Devuelve una referencia indicada por un valor de texto. +LOOKUP = BUSCAR ## Busca valores de un vector o una matriz. +MATCH = COINCIDIR ## Busca valores de una referencia o matriz. +OFFSET = DESREF ## Devuelve un desplazamiento de referencia respecto a una referencia dada. +ROW = FILA ## Devuelve el número de fila de una referencia. +ROWS = FILAS ## Devuelve el número de filas de una referencia. +RTD = RDTR ## Recupera datos en tiempo real desde un programa compatible con la automatización COM (automatización: modo de trabajar con los objetos de una aplicación desde otra aplicación o herramienta de entorno. La automatización, antes denominada automatización OLE, es un estándar de la industria y una función del Modelo de objetos componentes (COM).). +TRANSPOSE = TRANSPONER ## Devuelve la transposición de una matriz. +VLOOKUP = BUSCARV ## Busca en la primera columna de una matriz y se mueve en horizontal por la fila para devolver el valor de una celda. + + +## +## Math and trigonometry functions Funciones matemáticas y trigonométricas +## +ABS = ABS ## Devuelve el valor absoluto de un número. +ACOS = ACOS ## Devuelve el arcocoseno de un número. +ACOSH = ACOSH ## Devuelve el coseno hiperbólico inverso de un número. +ASIN = ASENO ## Devuelve el arcoseno de un número. +ASINH = ASENOH ## Devuelve el seno hiperbólico inverso de un número. +ATAN = ATAN ## Devuelve la arcotangente de un número. +ATAN2 = ATAN2 ## Devuelve la arcotangente de las coordenadas "x" e "y". +ATANH = ATANH ## Devuelve la tangente hiperbólica inversa de un número. +CEILING = MULTIPLO.SUPERIOR ## Redondea un número al entero más próximo o al múltiplo significativo más cercano. +COMBIN = COMBINAT ## Devuelve el número de combinaciones para un número determinado de objetos. +COS = COS ## Devuelve el coseno de un número. +COSH = COSH ## Devuelve el coseno hiperbólico de un número. +DEGREES = GRADOS ## Convierte radianes en grados. +EVEN = REDONDEA.PAR ## Redondea un número hasta el entero par más próximo. +EXP = EXP ## Devuelve e elevado a la potencia de un número dado. +FACT = FACT ## Devuelve el factorial de un número. +FACTDOUBLE = FACT.DOBLE ## Devuelve el factorial doble de un número. +FLOOR = MULTIPLO.INFERIOR ## Redondea un número hacia abajo, en dirección hacia cero. +GCD = M.C.D ## Devuelve el máximo común divisor. +INT = ENTERO ## Redondea un número hacia abajo hasta el entero más próximo. +LCM = M.C.M ## Devuelve el mínimo común múltiplo. +LN = LN ## Devuelve el logaritmo natural (neperiano) de un número. +LOG = LOG ## Devuelve el logaritmo de un número en una base especificada. +LOG10 = LOG10 ## Devuelve el logaritmo en base 10 de un número. +MDETERM = MDETERM ## Devuelve la determinante matricial de una matriz. +MINVERSE = MINVERSA ## Devuelve la matriz inversa de una matriz. +MMULT = MMULT ## Devuelve el producto de matriz de dos matrices. +MOD = RESIDUO ## Devuelve el resto de la división. +MROUND = REDOND.MULT ## Devuelve un número redondeado al múltiplo deseado. +MULTINOMIAL = MULTINOMIAL ## Devuelve el polinomio de un conjunto de números. +ODD = REDONDEA.IMPAR ## Redondea un número hacia arriba hasta el entero impar más próximo. +PI = PI ## Devuelve el valor de pi. +POWER = POTENCIA ## Devuelve el resultado de elevar un número a una potencia. +PRODUCT = PRODUCTO ## Multiplica sus argumentos. +QUOTIENT = COCIENTE ## Devuelve la parte entera de una división. +RADIANS = RADIANES ## Convierte grados en radianes. +RAND = ALEATORIO ## Devuelve un número aleatorio entre 0 y 1. +RANDBETWEEN = ALEATORIO.ENTRE ## Devuelve un número aleatorio entre los números que especifique. +ROMAN = NUMERO.ROMANO ## Convierte un número arábigo en número romano, con formato de texto. +ROUND = REDONDEAR ## Redondea un número al número de decimales especificado. +ROUNDDOWN = REDONDEAR.MENOS ## Redondea un número hacia abajo, en dirección hacia cero. +ROUNDUP = REDONDEAR.MAS ## Redondea un número hacia arriba, en dirección contraria a cero. +SERIESSUM = SUMA.SERIES ## Devuelve la suma de una serie de potencias en función de la fórmula. +SIGN = SIGNO ## Devuelve el signo de un número. +SIN = SENO ## Devuelve el seno de un ángulo determinado. +SINH = SENOH ## Devuelve el seno hiperbólico de un número. +SQRT = RAIZ ## Devuelve la raíz cuadrada positiva de un número. +SQRTPI = RAIZ2PI ## Devuelve la raíz cuadrada de un número multiplicado por PI (número * pi). +SUBTOTAL = SUBTOTALES ## Devuelve un subtotal en una lista o base de datos. +SUM = SUMA ## Suma sus argumentos. +SUMIF = SUMAR.SI ## Suma las celdas especificadas que cumplen unos criterios determinados. +SUMIFS = SUMAR.SI.CONJUNTO ## Suma las celdas de un rango que cumplen varios criterios. +SUMPRODUCT = SUMAPRODUCTO ## Devuelve la suma de los productos de los correspondientes componentes de matriz. +SUMSQ = SUMA.CUADRADOS ## Devuelve la suma de los cuadrados de los argumentos. +SUMX2MY2 = SUMAX2MENOSY2 ## Devuelve la suma de la diferencia de los cuadrados de los valores correspondientes de dos matrices. +SUMX2PY2 = SUMAX2MASY2 ## Devuelve la suma de la suma de los cuadrados de los valores correspondientes de dos matrices. +SUMXMY2 = SUMAXMENOSY2 ## Devuelve la suma de los cuadrados de las diferencias de los valores correspondientes de dos matrices. +TAN = TAN ## Devuelve la tangente de un número. +TANH = TANH ## Devuelve la tangente hiperbólica de un número. +TRUNC = TRUNCAR ## Trunca un número a un entero. + + +## +## Statistical functions Funciones estadísticas +## +AVEDEV = DESVPROM ## Devuelve el promedio de las desviaciones absolutas de la media de los puntos de datos. +AVERAGE = PROMEDIO ## Devuelve el promedio de sus argumentos. +AVERAGEA = PROMEDIOA ## Devuelve el promedio de sus argumentos, incluidos números, texto y valores lógicos. +AVERAGEIF = PROMEDIO.SI ## Devuelve el promedio (media aritmética) de todas las celdas de un rango que cumplen unos criterios determinados. +AVERAGEIFS = PROMEDIO.SI.CONJUNTO ## Devuelve el promedio (media aritmética) de todas las celdas que cumplen múltiples criterios. +BETADIST = DISTR.BETA ## Devuelve la función de distribución beta acumulativa. +BETAINV = DISTR.BETA.INV ## Devuelve la función inversa de la función de distribución acumulativa de una distribución beta especificada. +BINOMDIST = DISTR.BINOM ## Devuelve la probabilidad de una variable aleatoria discreta siguiendo una distribución binomial. +CHIDIST = DISTR.CHI ## Devuelve la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. +CHIINV = PRUEBA.CHI.INV ## Devuelve la función inversa de la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. +CHITEST = PRUEBA.CHI ## Devuelve la prueba de independencia. +CONFIDENCE = INTERVALO.CONFIANZA ## Devuelve el intervalo de confianza de la media de una población. +CORREL = COEF.DE.CORREL ## Devuelve el coeficiente de correlación entre dos conjuntos de datos. +COUNT = CONTAR ## Cuenta cuántos números hay en la lista de argumentos. +COUNTA = CONTARA ## Cuenta cuántos valores hay en la lista de argumentos. +COUNTBLANK = CONTAR.BLANCO ## Cuenta el número de celdas en blanco de un rango. +COUNTIF = CONTAR.SI ## Cuenta el número de celdas, dentro del rango, que cumplen el criterio especificado. +COUNTIFS = CONTAR.SI.CONJUNTO ## Cuenta el número de celdas, dentro del rango, que cumplen varios criterios. +COVAR = COVAR ## Devuelve la covarianza, que es el promedio de los productos de las desviaciones para cada pareja de puntos de datos. +CRITBINOM = BINOM.CRIT ## Devuelve el menor valor cuya distribución binomial acumulativa es menor o igual a un valor de criterio. +DEVSQ = DESVIA2 ## Devuelve la suma de los cuadrados de las desviaciones. +EXPONDIST = DISTR.EXP ## Devuelve la distribución exponencial. +FDIST = DISTR.F ## Devuelve la distribución de probabilidad F. +FINV = DISTR.F.INV ## Devuelve la función inversa de la distribución de probabilidad F. +FISHER = FISHER ## Devuelve la transformación Fisher. +FISHERINV = PRUEBA.FISHER.INV ## Devuelve la función inversa de la transformación Fisher. +FORECAST = PRONOSTICO ## Devuelve un valor en una tendencia lineal. +FREQUENCY = FRECUENCIA ## Devuelve una distribución de frecuencia como una matriz vertical. +FTEST = PRUEBA.F ## Devuelve el resultado de una prueba F. +GAMMADIST = DISTR.GAMMA ## Devuelve la distribución gamma. +GAMMAINV = DISTR.GAMMA.INV ## Devuelve la función inversa de la distribución gamma acumulativa. +GAMMALN = GAMMA.LN ## Devuelve el logaritmo natural de la función gamma, G(x). +GEOMEAN = MEDIA.GEOM ## Devuelve la media geométrica. +GROWTH = CRECIMIENTO ## Devuelve valores en una tendencia exponencial. +HARMEAN = MEDIA.ARMO ## Devuelve la media armónica. +HYPGEOMDIST = DISTR.HIPERGEOM ## Devuelve la distribución hipergeométrica. +INTERCEPT = INTERSECCION.EJE ## Devuelve la intersección de la línea de regresión lineal. +KURT = CURTOSIS ## Devuelve la curtosis de un conjunto de datos. +LARGE = K.ESIMO.MAYOR ## Devuelve el k-ésimo mayor valor de un conjunto de datos. +LINEST = ESTIMACION.LINEAL ## Devuelve los parámetros de una tendencia lineal. +LOGEST = ESTIMACION.LOGARITMICA ## Devuelve los parámetros de una tendencia exponencial. +LOGINV = DISTR.LOG.INV ## Devuelve la función inversa de la distribución logarítmico-normal. +LOGNORMDIST = DISTR.LOG.NORM ## Devuelve la distribución logarítmico-normal acumulativa. +MAX = MAX ## Devuelve el valor máximo de una lista de argumentos. +MAXA = MAXA ## Devuelve el valor máximo de una lista de argumentos, incluidos números, texto y valores lógicos. +MEDIAN = MEDIANA ## Devuelve la mediana de los números dados. +MIN = MIN ## Devuelve el valor mínimo de una lista de argumentos. +MINA = MINA ## Devuelve el valor mínimo de una lista de argumentos, incluidos números, texto y valores lógicos. +MODE = MODA ## Devuelve el valor más común de un conjunto de datos. +NEGBINOMDIST = NEGBINOMDIST ## Devuelve la distribución binomial negativa. +NORMDIST = DISTR.NORM ## Devuelve la distribución normal acumulativa. +NORMINV = DISTR.NORM.INV ## Devuelve la función inversa de la distribución normal acumulativa. +NORMSDIST = DISTR.NORM.ESTAND ## Devuelve la distribución normal estándar acumulativa. +NORMSINV = DISTR.NORM.ESTAND.INV ## Devuelve la función inversa de la distribución normal estándar acumulativa. +PEARSON = PEARSON ## Devuelve el coeficiente de momento de correlación de producto Pearson. +PERCENTILE = PERCENTIL ## Devuelve el k-ésimo percentil de los valores de un rango. +PERCENTRANK = RANGO.PERCENTIL ## Devuelve el rango porcentual de un valor de un conjunto de datos. +PERMUT = PERMUTACIONES ## Devuelve el número de permutaciones de un número determinado de objetos. +POISSON = POISSON ## Devuelve la distribución de Poisson. +PROB = PROBABILIDAD ## Devuelve la probabilidad de que los valores de un rango se encuentren entre dos límites. +QUARTILE = CUARTIL ## Devuelve el cuartil de un conjunto de datos. +RANK = JERARQUIA ## Devuelve la jerarquía de un número en una lista de números. +RSQ = COEFICIENTE.R2 ## Devuelve el cuadrado del coeficiente de momento de correlación de producto Pearson. +SKEW = COEFICIENTE.ASIMETRIA ## Devuelve la asimetría de una distribución. +SLOPE = PENDIENTE ## Devuelve la pendiente de la línea de regresión lineal. +SMALL = K.ESIMO.MENOR ## Devuelve el k-ésimo menor valor de un conjunto de datos. +STANDARDIZE = NORMALIZACION ## Devuelve un valor normalizado. +STDEV = DESVEST ## Calcula la desviación estándar a partir de una muestra. +STDEVA = DESVESTA ## Calcula la desviación estándar a partir de una muestra, incluidos números, texto y valores lógicos. +STDEVP = DESVESTP ## Calcula la desviación estándar en función de toda la población. +STDEVPA = DESVESTPA ## Calcula la desviación estándar en función de toda la población, incluidos números, texto y valores lógicos. +STEYX = ERROR.TIPICO.XY ## Devuelve el error estándar del valor de "y" previsto para cada "x" de la regresión. +TDIST = DISTR.T ## Devuelve la distribución de t de Student. +TINV = DISTR.T.INV ## Devuelve la función inversa de la distribución de t de Student. +TREND = TENDENCIA ## Devuelve valores en una tendencia lineal. +TRIMMEAN = MEDIA.ACOTADA ## Devuelve la media del interior de un conjunto de datos. +TTEST = PRUEBA.T ## Devuelve la probabilidad asociada a una prueba t de Student. +VAR = VAR ## Calcula la varianza en función de una muestra. +VARA = VARA ## Calcula la varianza en función de una muestra, incluidos números, texto y valores lógicos. +VARP = VARP ## Calcula la varianza en función de toda la población. +VARPA = VARPA ## Calcula la varianza en función de toda la población, incluidos números, texto y valores lógicos. +WEIBULL = DIST.WEIBULL ## Devuelve la distribución de Weibull. +ZTEST = PRUEBA.Z ## Devuelve el valor de una probabilidad de una cola de una prueba z. + + +## +## Text functions Funciones de texto +## +ASC = ASC ## Convierte las letras inglesas o katakana de ancho completo (de dos bytes) dentro de una cadena de caracteres en caracteres de ancho medio (de un byte). +BAHTTEXT = TEXTOBAHT ## Convierte un número en texto, con el formato de moneda ß (Baht). +CHAR = CARACTER ## Devuelve el carácter especificado por el número de código. +CLEAN = LIMPIAR ## Quita del texto todos los caracteres no imprimibles. +CODE = CODIGO ## Devuelve un código numérico del primer carácter de una cadena de texto. +CONCATENATE = CONCATENAR ## Concatena varios elementos de texto en uno solo. +DOLLAR = MONEDA ## Convierte un número en texto, con el formato de moneda $ (dólar). +EXACT = IGUAL ## Comprueba si dos valores de texto son idénticos. +FIND = ENCONTRAR ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). +FINDB = ENCONTRARB ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). +FIXED = DECIMAL ## Da formato a un número como texto con un número fijo de decimales. +JIS = JIS ## Convierte las letras inglesas o katakana de ancho medio (de un byte) dentro de una cadena de caracteres en caracteres de ancho completo (de dos bytes). +LEFT = IZQUIERDA ## Devuelve los caracteres del lado izquierdo de un valor de texto. +LEFTB = IZQUIERDAB ## Devuelve los caracteres del lado izquierdo de un valor de texto. +LEN = LARGO ## Devuelve el número de caracteres de una cadena de texto. +LENB = LARGOB ## Devuelve el número de caracteres de una cadena de texto. +LOWER = MINUSC ## Pone el texto en minúsculas. +MID = EXTRAE ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. +MIDB = EXTRAEB ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. +PHONETIC = FONETICO ## Extrae los caracteres fonéticos (furigana) de una cadena de texto. +PROPER = NOMPROPIO ## Pone en mayúscula la primera letra de cada palabra de un valor de texto. +REPLACE = REEMPLAZAR ## Reemplaza caracteres de texto. +REPLACEB = REEMPLAZARB ## Reemplaza caracteres de texto. +REPT = REPETIR ## Repite el texto un número determinado de veces. +RIGHT = DERECHA ## Devuelve los caracteres del lado derecho de un valor de texto. +RIGHTB = DERECHAB ## Devuelve los caracteres del lado derecho de un valor de texto. +SEARCH = HALLAR ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). +SEARCHB = HALLARB ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). +SUBSTITUTE = SUSTITUIR ## Sustituye texto nuevo por texto antiguo en una cadena de texto. +T = T ## Convierte sus argumentos a texto. +TEXT = TEXTO ## Da formato a un número y lo convierte en texto. +TRIM = ESPACIOS ## Quita los espacios del texto. +UPPER = MAYUSC ## Pone el texto en mayúsculas. +VALUE = VALOR ## Convierte un argumento de texto en un número. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config new file mode 100755 index 0000000..22aaf58 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = $ # Symbol not known, should it be a € (Euro)? + + +## +## Excel Error Codes (For future use) + +## +NULL = #TYHJÄ! +DIV0 = #JAKO/0! +VALUE = #ARVO! +REF = #VIITTAUS! +NAME = #NIMI? +NUM = #LUKU! +NA = #PUUTTUU diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions new file mode 100755 index 0000000..289e0ea --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fi/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Apuohjelma- ja automaatiofunktiot +## +GETPIVOTDATA = NOUDA.PIVOT.TIEDOT ## Palauttaa pivot-taulukkoraporttiin tallennettuja tietoja. + + +## +## Cube functions Kuutiofunktiot +## +CUBEKPIMEMBER = KUUTIOKPIJÄSEN ## Palauttaa suorituskykyilmaisimen (KPI) nimen, ominaisuuden sekä mitan ja näyttää nimen sekä ominaisuuden solussa. KPI on mitattavissa oleva suure, kuten kuukauden bruttotuotto tai vuosineljänneksen työntekijäkohtainen liikevaihto, joiden avulla tarkkaillaan organisaation suorituskykyä. +CUBEMEMBER = KUUTIONJÄSEN ## Palauttaa kuutiohierarkian jäsenen tai monikon. Tällä funktiolla voit tarkistaa, että jäsen tai monikko on olemassa kuutiossa. +CUBEMEMBERPROPERTY = KUUTIONJÄSENENOMINAISUUS ## Palauttaa kuution jäsenominaisuuden arvon. Tällä funktiolla voit tarkistaa, että nimi on olemassa kuutiossa, ja palauttaa tämän jäsenen määritetyn ominaisuuden. +CUBERANKEDMEMBER = KUUTIONLUOKITELTUJÄSEN ## Palauttaa joukon n:nnen jäsenen. Tällä funktiolla voit palauttaa joukosta elementtejä, kuten parhaan myyjän tai 10 parasta opiskelijaa. +CUBESET = KUUTIOJOUKKO ## Määrittää lasketun jäsen- tai monikkojoukon lähettämällä joukon lausekkeita palvelimessa olevalle kuutiolle. Palvelin luo joukon ja palauttaa sen Microsoft Office Excelille. +CUBESETCOUNT = KUUTIOJOUKKOJENMÄÄRÄ ## Palauttaa joukon kohteiden määrän. +CUBEVALUE = KUUTIONARVO ## Palauttaa koostetun arvon kuutiosta. + + +## +## Database functions Tietokantafunktiot +## +DAVERAGE = TKESKIARVO ## Palauttaa valittujen tietokantamerkintöjen keskiarvon. +DCOUNT = TLASKE ## Laskee tietokannan lukuja sisältävien solujen määrän. +DCOUNTA = TLASKEA ## Laskee tietokannan tietoja sisältävien solujen määrän. +DGET = TNOUDA ## Hakee määritettyjä ehtoja vastaavan tietueen tietokannasta. +DMAX = TMAKS ## Palauttaa suurimman arvon tietokannasta valittujen arvojen joukosta. +DMIN = TMIN ## Palauttaa pienimmän arvon tietokannasta valittujen arvojen joukosta. +DPRODUCT = TTULO ## Kertoo määritetyn ehdon täyttävien tietokannan tietueiden tietyssä kentässä olevat arvot. +DSTDEV = TKESKIHAJONTA ## Laskee keskihajonnan tietokannasta valituista arvoista muodostuvan otoksen perusteella. +DSTDEVP = TKESKIHAJONTAP ## Laskee keskihajonnan tietokannasta valittujen arvojen koko populaation perusteella. +DSUM = TSUMMA ## Lisää luvut määritetyn ehdon täyttävien tietokannan tietueiden kenttäsarakkeeseen. +DVAR = TVARIANSSI ## Laskee varianssin tietokannasta valittujen arvojen otoksen perusteella. +DVARP = TVARIANSSIP ## Laskee varianssin tietokannasta valittujen arvojen koko populaation perusteella. + + +## +## Date and time functions Päivämäärä- ja aikafunktiot +## +DATE = PÄIVÄYS ## Palauttaa annetun päivämäärän järjestysluvun. +DATEVALUE = PÄIVÄYSARVO ## Muuntaa tekstimuodossa olevan päivämäärän järjestysluvuksi. +DAY = PÄIVÄ ## Muuntaa järjestysluvun kuukauden päiväksi. +DAYS360 = PÄIVÄT360 ## Laskee kahden päivämäärän välisten päivien määrän käyttäen perustana 360-päiväistä vuotta. +EDATE = PÄIVÄ.KUUKAUSI ## Palauttaa järjestyslukuna päivämäärän, joka poikkeaa aloituspäivän päivämäärästä annetun kuukausimäärän verran joko eteen- tai taaksepäin. +EOMONTH = KUUKAUSI.LOPPU ## Palauttaa järjestyslukuna sen kuukauden viimeisen päivämäärän, joka poikkeaa annetun kuukausimäärän verran eteen- tai taaksepäin. +HOUR = TUNNIT ## Muuntaa järjestysluvun tunneiksi. +MINUTE = MINUUTIT ## Muuntaa järjestysluvun minuuteiksi. +MONTH = KUUKAUSI ## Muuntaa järjestysluvun kuukausiksi. +NETWORKDAYS = TYÖPÄIVÄT ## Palauttaa kahden päivämäärän välissä olevien täysien työpäivien määrän. +NOW = NYT ## Palauttaa kuluvan päivämäärän ja ajan järjestysnumeron. +SECOND = SEKUNNIT ## Muuntaa järjestysluvun sekunneiksi. +TIME = AIKA ## Palauttaa annetun kellonajan järjestysluvun. +TIMEVALUE = AIKA_ARVO ## Muuntaa tekstimuodossa olevan kellonajan järjestysluvuksi. +TODAY = TÄMÄ.PÄIVÄ ## Palauttaa kuluvan päivän päivämäärän järjestysluvun. +WEEKDAY = VIIKONPÄIVÄ ## Muuntaa järjestysluvun viikonpäiväksi. +WEEKNUM = VIIKKO.NRO ## Muuntaa järjestysluvun luvuksi, joka ilmaisee viikon järjestysluvun vuoden alusta laskettuna. +WORKDAY = TYÖPÄIVÄ ## Palauttaa järjestysluvun päivämäärälle, joka sijaitsee annettujen työpäivien verran eteen tai taaksepäin. +YEAR = VUOSI ## Muuntaa järjestysluvun vuosiksi. +YEARFRAC = VUOSI.OSA ## Palauttaa määritettyjen päivämäärien (aloituspäivä ja lopetuspäivä) välisen osan vuodesta. + + +## +## Engineering functions Tekniset funktiot +## +BESSELI = BESSELI ## Palauttaa muunnetun Bessel-funktion In(x). +BESSELJ = BESSELJ ## Palauttaa Bessel-funktion Jn(x). +BESSELK = BESSELK ## Palauttaa muunnetun Bessel-funktion Kn(x). +BESSELY = BESSELY ## Palauttaa Bessel-funktion Yn(x). +BIN2DEC = BINDES ## Muuntaa binaariluvun desimaaliluvuksi. +BIN2HEX = BINHEKSA ## Muuntaa binaariluvun heksadesimaaliluvuksi. +BIN2OCT = BINOKT ## Muuntaa binaariluvun oktaaliluvuksi. +COMPLEX = KOMPLEKSI ## Muuntaa reaali- ja imaginaariosien kertoimet kompleksiluvuksi. +CONVERT = MUUNNA ## Muuntaa luvun toisen mittajärjestelmän mukaiseksi. +DEC2BIN = DESBIN ## Muuntaa desimaaliluvun binaariluvuksi. +DEC2HEX = DESHEKSA ## Muuntaa kymmenjärjestelmän luvun heksadesimaaliluvuksi. +DEC2OCT = DESOKT ## Muuntaa kymmenjärjestelmän luvun oktaaliluvuksi. +DELTA = SAMA.ARVO ## Tarkistaa, ovatko kaksi arvoa yhtä suuria. +ERF = VIRHEFUNKTIO ## Palauttaa virhefunktion. +ERFC = VIRHEFUNKTIO.KOMPLEMENTTI ## Palauttaa komplementtivirhefunktion. +GESTEP = RAJA ## Testaa, onko luku suurempi kuin kynnysarvo. +HEX2BIN = HEKSABIN ## Muuntaa heksadesimaaliluvun binaariluvuksi. +HEX2DEC = HEKSADES ## Muuntaa heksadesimaaliluvun desimaaliluvuksi. +HEX2OCT = HEKSAOKT ## Muuntaa heksadesimaaliluvun oktaaliluvuksi. +IMABS = KOMPLEKSI.ITSEISARVO ## Palauttaa kompleksiluvun itseisarvon (moduluksen). +IMAGINARY = KOMPLEKSI.IMAG ## Palauttaa kompleksiluvun imaginaariosan kertoimen. +IMARGUMENT = KOMPLEKSI.ARG ## Palauttaa theeta-argumentin, joka on radiaaneina annettu kulma. +IMCONJUGATE = KOMPLEKSI.KONJ ## Palauttaa kompleksiluvun konjugaattiluvun. +IMCOS = KOMPLEKSI.COS ## Palauttaa kompleksiluvun kosinin. +IMDIV = KOMPLEKSI.OSAM ## Palauttaa kahden kompleksiluvun osamäärän. +IMEXP = KOMPLEKSI.EKSP ## Palauttaa kompleksiluvun eksponentin. +IMLN = KOMPLEKSI.LN ## Palauttaa kompleksiluvun luonnollisen logaritmin. +IMLOG10 = KOMPLEKSI.LOG10 ## Palauttaa kompleksiluvun kymmenkantaisen logaritmin. +IMLOG2 = KOMPLEKSI.LOG2 ## Palauttaa kompleksiluvun kaksikantaisen logaritmin. +IMPOWER = KOMPLEKSI.POT ## Palauttaa kokonaislukupotenssiin korotetun kompleksiluvun. +IMPRODUCT = KOMPLEKSI.TULO ## Palauttaa kompleksilukujen tulon. +IMREAL = KOMPLEKSI.REAALI ## Palauttaa kompleksiluvun reaaliosan kertoimen. +IMSIN = KOMPLEKSI.SIN ## Palauttaa kompleksiluvun sinin. +IMSQRT = KOMPLEKSI.NELIÖJ ## Palauttaa kompleksiluvun neliöjuuren. +IMSUB = KOMPLEKSI.EROTUS ## Palauttaa kahden kompleksiluvun erotuksen. +IMSUM = KOMPLEKSI.SUM ## Palauttaa kompleksilukujen summan. +OCT2BIN = OKTBIN ## Muuntaa oktaaliluvun binaariluvuksi. +OCT2DEC = OKTDES ## Muuntaa oktaaliluvun desimaaliluvuksi. +OCT2HEX = OKTHEKSA ## Muuntaa oktaaliluvun heksadesimaaliluvuksi. + + +## +## Financial functions Rahoitusfunktiot +## +ACCRINT = KERTYNYT.KORKO ## Laskee arvopaperille kertyneen koron, kun korko kertyy säännöllisin väliajoin. +ACCRINTM = KERTYNYT.KORKO.LOPUSSA ## Laskee arvopaperille kertyneen koron, kun korko maksetaan eräpäivänä. +AMORDEGRC = AMORDEGRC ## Laskee kunkin laskentakauden poiston poistokerrointa käyttämällä. +AMORLINC = AMORLINC ## Palauttaa kunkin laskentakauden poiston. +COUPDAYBS = KORKOPÄIVÄT.ALUSTA ## Palauttaa koronmaksukauden aloituspäivän ja tilityspäivän välisen ajanjakson päivien määrän. +COUPDAYS = KORKOPÄIVÄT ## Palauttaa päivien määrän koronmaksukaudelta, johon tilityspäivä kuuluu. +COUPDAYSNC = KORKOPÄIVÄT.SEURAAVA ## Palauttaa tilityspäivän ja seuraavan koronmaksupäivän välisen ajanjakson päivien määrän. +COUPNCD = KORKOMAKSU.SEURAAVA ## Palauttaa tilityspäivän jälkeisen seuraavan koronmaksupäivän. +COUPNUM = KORKOPÄIVÄJAKSOT ## Palauttaa arvopaperin ostopäivän ja erääntymispäivän välisten koronmaksupäivien määrän. +COUPPCD = KORKOPÄIVÄ.EDELLINEN ## Palauttaa tilityspäivää edeltävän koronmaksupäivän. +CUMIPMT = MAKSETTU.KORKO ## Palauttaa kahden jakson välisenä aikana kertyneen koron. +CUMPRINC = MAKSETTU.LYHENNYS ## Palauttaa lainalle kahden jakson välisenä aikana kertyneen lyhennyksen. +DB = DB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. +DDB = DDB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DDB-menetelmän (Double-Declining Balance) tai jonkin muun määrittämäsi menetelmän mukaan. +DISC = DISKONTTOKORKO ## Palauttaa arvopaperin diskonttokoron. +DOLLARDE = VALUUTTA.DES ## Muuntaa murtolukuna ilmoitetun valuuttamäärän desimaaliluvuksi. +DOLLARFR = VALUUTTA.MURTO ## Muuntaa desimaalilukuna ilmaistun valuuttamäärän murtoluvuksi. +DURATION = KESTO ## Palauttaa keston arvopaperille, jonka koronmaksu tapahtuu säännöllisesti. +EFFECT = KORKO.EFEKT ## Palauttaa todellisen vuosikoron. +FV = TULEVA.ARVO ## Palauttaa sijoituksen tulevan arvon. +FVSCHEDULE = TULEVA.ARVO.ERIKORKO ## Palauttaa pääoman tulevan arvon, kun pääomalle on kertynyt korkoa vaihtelevasti. +INTRATE = KORKO.ARVOPAPERI ## Palauttaa arvopaperin korkokannan täysin sijoitetulle arvopaperille. +IPMT = IPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona kertyvän koron. +IRR = SISÄINEN.KORKO ## Laskee sisäisen korkokannan kassavirrasta muodostuvalle sarjalle. +ISPMT = ONMAKSU ## Laskee sijoituksen maksetun koron tietyllä jaksolla. +MDURATION = KESTO.MUUNN ## Palauttaa muunnetun Macauley-keston arvopaperille, jonka oletettu nimellisarvo on 100 euroa. +MIRR = MSISÄINEN ## Palauttaa sisäisen korkokannan, kun positiivisten ja negatiivisten kassavirtojen rahoituskorko on erilainen. +NOMINAL = KORKO.VUOSI ## Palauttaa vuosittaisen nimelliskoron. +NPER = NJAKSO ## Palauttaa sijoituksen jaksojen määrän. +NPV = NNA ## Palauttaa sijoituksen nykyarvon toistuvista kassavirroista muodostuvan sarjan ja diskonttokoron perusteella. +ODDFPRICE = PARITON.ENS.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa ensimmäinen jakso on pariton. +ODDFYIELD = PARITON.ENS.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa ensimmäinen jakso on pariton. +ODDLPRICE = PARITON.VIIM.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa viimeinen jakso on pariton. +ODDLYIELD = PARITON.VIIM.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa viimeinen jakso on pariton. +PMT = MAKSU ## Palauttaa annuiteetin kausittaisen maksuerän. +PPMT = PPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona maksettavan lyhennyksen. +PRICE = HINTA ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan säännöllisin väliajoin. +PRICEDISC = HINTA.DISK ## Palauttaa diskontatun arvopaperin hinnan 100 euron nimellisarvoa kohden. +PRICEMAT = HINTA.LUNASTUS ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan erääntymispäivänä. +PV = NA ## Palauttaa sijoituksen nykyarvon. +RATE = KORKO ## Palauttaa annuiteetin kausittaisen korkokannan. +RECEIVED = SAATU.HINTA ## Palauttaa arvopaperin tuoton erääntymispäivänä kokonaan maksetulle sijoitukselle. +SLN = STP ## Palauttaa sijoituksen tasapoiston yhdeltä jaksolta. +SYD = VUOSIPOISTO ## Palauttaa sijoituksen vuosipoiston annettuna kautena amerikkalaisen SYD-menetelmän (Sum-of-Year's Digits) avulla. +TBILLEQ = OBLIG.TUOTTOPROS ## Palauttaa valtion obligaation tuoton vastaavana joukkovelkakirjan tuottona. +TBILLPRICE = OBLIG.HINTA ## Palauttaa obligaation hinnan 100 euron nimellisarvoa kohden. +TBILLYIELD = OBLIG.TUOTTO ## Palauttaa obligaation tuoton. +VDB = VDB ## Palauttaa annetun kauden tai kauden osan kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. +XIRR = SISÄINEN.KORKO.JAKSOTON ## Palauttaa sisäisen korkokannan kassavirtojen sarjoille, jotka eivät välttämättä ole säännöllisiä. +XNPV = NNA.JAKSOTON ## Palauttaa nettonykyarvon kassavirtasarjalle, joka ei välttämättä ole kausittainen. +YIELD = TUOTTO ## Palauttaa tuoton arvopaperille, jonka korko maksetaan säännöllisin väliajoin. +YIELDDISC = TUOTTO.DISK ## Palauttaa diskontatun arvopaperin, kuten obligaation, vuosittaisen tuoton. +YIELDMAT = TUOTTO.ERÄP ## Palauttaa erääntymispäivänään korkoa tuottavan arvopaperin vuosittaisen tuoton. + + +## +## Information functions Erikoisfunktiot +## +CELL = SOLU ## Palauttaa tietoja solun muotoilusta, sijainnista ja sisällöstä. +ERROR.TYPE = VIRHEEN.LAJI ## Palauttaa virhetyyppiä vastaavan luvun. +INFO = KUVAUS ## Palauttaa tietoja nykyisestä käyttöympäristöstä. +ISBLANK = ONTYHJÄ ## Palauttaa arvon TOSI, jos arvo on tyhjä. +ISERR = ONVIRH ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo paitsi arvo #PUUTTUU!. +ISERROR = ONVIRHE ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo. +ISEVEN = ONPARILLINEN ## Palauttaa arvon TOSI, jos arvo on parillinen. +ISLOGICAL = ONTOTUUS ## Palauttaa arvon TOSI, jos arvo on mikä tahansa looginen arvo. +ISNA = ONPUUTTUU ## Palauttaa arvon TOSI, jos virhearvo on #PUUTTUU!. +ISNONTEXT = ONEI_TEKSTI ## Palauttaa arvon TOSI, jos arvo ei ole teksti. +ISNUMBER = ONLUKU ## Palauttaa arvon TOSI, jos arvo on luku. +ISODD = ONPARITON ## Palauttaa arvon TOSI, jos arvo on pariton. +ISREF = ONVIITT ## Palauttaa arvon TOSI, jos arvo on viittaus. +ISTEXT = ONTEKSTI ## Palauttaa arvon TOSI, jos arvo on teksti. +N = N ## Palauttaa arvon luvuksi muunnettuna. +NA = PUUTTUU ## Palauttaa virhearvon #PUUTTUU!. +TYPE = TYYPPI ## Palauttaa luvun, joka ilmaisee arvon tietotyypin. + + +## +## Logical functions Loogiset funktiot +## +AND = JA ## Palauttaa arvon TOSI, jos kaikkien argumenttien arvo on TOSI. +FALSE = EPÄTOSI ## Palauttaa totuusarvon EPÄTOSI. +IF = JOS ## Määrittää suoritettavan loogisen testin. +IFERROR = JOSVIRHE ## Palauttaa määrittämäsi arvon, jos kaavan tulos on virhe; muussa tapauksessa palauttaa kaavan tuloksen. +NOT = EI ## Kääntää argumentin loogisen arvon. +OR = TAI ## Palauttaa arvon TOSI, jos minkä tahansa argumentin arvo on TOSI. +TRUE = TOSI ## Palauttaa totuusarvon TOSI. + + +## +## Lookup and reference functions Haku- ja viitefunktiot +## +ADDRESS = OSOITE ## Palauttaa laskentataulukon soluun osoittavan viittauksen tekstinä. +AREAS = ALUEET ## Palauttaa viittauksessa olevien alueiden määrän. +CHOOSE = VALITSE.INDEKSI ## Valitsee arvon arvoluettelosta. +COLUMN = SARAKE ## Palauttaa viittauksen sarakenumeron. +COLUMNS = SARAKKEET ## Palauttaa viittauksessa olevien sarakkeiden määrän. +HLOOKUP = VHAKU ## Suorittaa haun matriisin ylimmältä riviltä ja palauttaa määritetyn solun arvon. +HYPERLINK = HYPERLINKKI ## Luo pikakuvakkeen tai tekstin, joka avaa verkkopalvelimeen, intranetiin tai Internetiin tallennetun tiedoston. +INDEX = INDEKSI ## Valitsee arvon viittauksesta tai matriisista indeksin mukaan. +INDIRECT = EPÄSUORA ## Palauttaa tekstiarvona ilmaistun viittauksen. +LOOKUP = HAKU ## Etsii arvoja vektorista tai matriisista. +MATCH = VASTINE ## Etsii arvoja viittauksesta tai matriisista. +OFFSET = SIIRTYMÄ ## Palauttaa annetun viittauksen siirtymän. +ROW = RIVI ## Palauttaa viittauksen rivinumeron. +ROWS = RIVIT ## Palauttaa viittauksessa olevien rivien määrän. +RTD = RTD ## Noutaa COM-automaatiota (automaatio: Tapa käsitellä sovelluksen objekteja toisesta sovelluksesta tai kehitystyökalusta. Automaatio, jota aiemmin kutsuttiin OLE-automaatioksi, on teollisuusstandardi ja COM-mallin (Component Object Model) ominaisuus.) tukevasta ohjelmasta reaaliaikaisia tietoja. +TRANSPOSE = TRANSPONOI ## Palauttaa matriisin käänteismatriisin. +VLOOKUP = PHAKU ## Suorittaa haun matriisin ensimmäisestä sarakkeesta ja palauttaa rivillä olevan solun arvon. + + +## +## Math and trigonometry functions Matemaattiset ja trigonometriset funktiot +## +ABS = ITSEISARVO ## Palauttaa luvun itseisarvon. +ACOS = ACOS ## Palauttaa luvun arkuskosinin. +ACOSH = ACOSH ## Palauttaa luvun käänteisen hyperbolisen kosinin. +ASIN = ASIN ## Palauttaa luvun arkussinin. +ASINH = ASINH ## Palauttaa luvun käänteisen hyperbolisen sinin. +ATAN = ATAN ## Palauttaa luvun arkustangentin. +ATAN2 = ATAN2 ## Palauttaa arkustangentin x- ja y-koordinaatin perusteella. +ATANH = ATANH ## Palauttaa luvun käänteisen hyperbolisen tangentin. +CEILING = PYÖRISTÄ.KERR.YLÖS ## Pyöristää luvun lähimpään kokonaislukuun tai tarkkuusargumentin lähimpään kerrannaiseen. +COMBIN = KOMBINAATIO ## Palauttaa mahdollisten kombinaatioiden määrän annetulle objektien määrälle. +COS = COS ## Palauttaa luvun kosinin. +COSH = COSH ## Palauttaa luvun hyperbolisen kosinin. +DEGREES = ASTEET ## Muuntaa radiaanit asteiksi. +EVEN = PARILLINEN ## Pyöristää luvun ylöspäin lähimpään parilliseen kokonaislukuun. +EXP = EKSPONENTTI ## Palauttaa e:n korotettuna annetun luvun osoittamaan potenssiin. +FACT = KERTOMA ## Palauttaa luvun kertoman. +FACTDOUBLE = KERTOMA.OSA ## Palauttaa luvun osakertoman. +FLOOR = PYÖRISTÄ.KERR.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). +GCD = SUURIN.YHT.TEKIJÄ ## Palauttaa suurimman yhteisen tekijän. +INT = KOKONAISLUKU ## Pyöristää luvun alaspäin lähimpään kokonaislukuun. +LCM = PIENIN.YHT.JAETTAVA ## Palauttaa pienimmän yhteisen tekijän. +LN = LUONNLOG ## Palauttaa luvun luonnollisen logaritmin. +LOG = LOG ## Laskee luvun logaritmin käyttämällä annettua kantalukua. +LOG10 = LOG10 ## Palauttaa luvun kymmenkantaisen logaritmin. +MDETERM = MDETERM ## Palauttaa matriisin matriisideterminantin. +MINVERSE = MKÄÄNTEINEN ## Palauttaa matriisin käänteismatriisin. +MMULT = MKERRO ## Palauttaa kahden matriisin tulon. +MOD = JAKOJ ## Palauttaa jakolaskun jäännöksen. +MROUND = PYÖRISTÄ.KERR ## Palauttaa luvun pyöristettynä annetun luvun kerrannaiseen. +MULTINOMIAL = MULTINOMI ## Palauttaa lukujoukon multinomin. +ODD = PARITON ## Pyöristää luvun ylöspäin lähimpään parittomaan kokonaislukuun. +PI = PII ## Palauttaa piin arvon. +POWER = POTENSSI ## Palauttaa luvun korotettuna haluttuun potenssiin. +PRODUCT = TULO ## Kertoo annetut argumentit. +QUOTIENT = OSAMÄÄRÄ ## Palauttaa osamäärän kokonaislukuosan. +RADIANS = RADIAANIT ## Muuntaa asteet radiaaneiksi. +RAND = SATUNNAISLUKU ## Palauttaa satunnaisluvun väliltä 0–1. +RANDBETWEEN = SATUNNAISLUKU.VÄLILTÄ ## Palauttaa satunnaisluvun määritettyjen lukujen väliltä. +ROMAN = ROMAN ## Muuntaa arabialaisen numeron tekstimuotoiseksi roomalaiseksi numeroksi. +ROUND = PYÖRISTÄ ## Pyöristää luvun annettuun määrään desimaaleja. +ROUNDDOWN = PYÖRISTÄ.DES.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). +ROUNDUP = PYÖRISTÄ.DES.YLÖS ## Pyöristää luvun ylöspäin (poispäin nollasta). +SERIESSUM = SARJA.SUMMA ## Palauttaa kaavaan perustuvan potenssisarjan arvon. +SIGN = ETUMERKKI ## Palauttaa luvun etumerkin. +SIN = SIN ## Palauttaa annetun kulman sinin. +SINH = SINH ## Palauttaa luvun hyperbolisen sinin. +SQRT = NELIÖJUURI ## Palauttaa positiivisen neliöjuuren. +SQRTPI = NELIÖJUURI.PII ## Palauttaa tulon (luku * pii) neliöjuuren. +SUBTOTAL = VÄLISUMMA ## Palauttaa luettelon tai tietokannan välisumman. +SUM = SUMMA ## Laskee yhteen annetut argumentit. +SUMIF = SUMMA.JOS ## Laskee ehdot täyttävien solujen summan. +SUMIFS = SUMMA.JOS.JOUKKO ## Laskee yhteen solualueen useita ehtoja vastaavat solut. +SUMPRODUCT = TULOJEN.SUMMA ## Palauttaa matriisin toisiaan vastaavien osien tulojen summan. +SUMSQ = NELIÖSUMMA ## Palauttaa argumenttien neliöiden summan. +SUMX2MY2 = NELIÖSUMMIEN.EROTUS ## Palauttaa kahden matriisin toisiaan vastaavien arvojen laskettujen neliösummien erotuksen. +SUMX2PY2 = NELIÖSUMMIEN.SUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen neliösummien summan. +SUMXMY2 = EROTUSTEN.NELIÖSUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen erotusten neliösumman. +TAN = TAN ## Palauttaa luvun tangentin. +TANH = TANH ## Palauttaa luvun hyperbolisen tangentin. +TRUNC = KATKAISE ## Katkaisee luvun kokonaisluvuksi. + + +## +## Statistical functions Tilastolliset funktiot +## +AVEDEV = KESKIPOIKKEAMA ## Palauttaa hajontojen itseisarvojen keskiarvon. +AVERAGE = KESKIARVO ## Palauttaa argumenttien keskiarvon. +AVERAGEA = KESKIARVOA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, keskiarvon. +AVERAGEIF = KESKIARVO.JOS ## Palauttaa alueen niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka täyttävät annetut ehdot. +AVERAGEIFS = KESKIARVO.JOS.JOUKKO ## Palauttaa niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka vastaavat useita ehtoja. +BETADIST = BEETAJAKAUMA ## Palauttaa kumulatiivisen beetajakaumafunktion arvon. +BETAINV = BEETAJAKAUMA.KÄÄNT ## Palauttaa määritetyn beetajakauman käänteisen kumulatiivisen jakaumafunktion arvon. +BINOMDIST = BINOMIJAKAUMA ## Palauttaa yksittäisen termin binomijakaumatodennäköisyyden. +CHIDIST = CHIJAKAUMA ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden. +CHIINV = CHIJAKAUMA.KÄÄNT ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden käänteisarvon. +CHITEST = CHITESTI ## Palauttaa riippumattomuustestin tuloksen. +CONFIDENCE = LUOTTAMUSVÄLI ## Palauttaa luottamusvälin populaation keskiarvolle. +CORREL = KORRELAATIO ## Palauttaa kahden arvojoukon korrelaatiokertoimen. +COUNT = LASKE ## Laskee argumenttiluettelossa olevien lukujen määrän. +COUNTA = LASKE.A ## Laskee argumenttiluettelossa olevien arvojen määrän. +COUNTBLANK = LASKE.TYHJÄT ## Laskee alueella olevien tyhjien solujen määrän. +COUNTIF = LASKE.JOS ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa annettuja ehtoja. +COUNTIFS = LASKE.JOS.JOUKKO ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa useita ehtoja. +COVAR = KOVARIANSSI ## Palauttaa kovarianssin, joka on keskiarvo havaintoaineiston kunkin pisteparin poikkeamien tuloista. +CRITBINOM = BINOMIJAKAUMA.KRIT ## Palauttaa pienimmän arvon, jossa binomijakauman kertymäfunktion arvo on pienempi tai yhtä suuri kuin vertailuarvo. +DEVSQ = OIKAISTU.NELIÖSUMMA ## Palauttaa keskipoikkeamien neliösumman. +EXPONDIST = EKSPONENTIAALIJAKAUMA ## Palauttaa eksponentiaalijakauman. +FDIST = FJAKAUMA ## Palauttaa F-todennäköisyysjakauman. +FINV = FJAKAUMA.KÄÄNT ## Palauttaa F-todennäköisyysjakauman käänteisfunktion. +FISHER = FISHER ## Palauttaa Fisher-muunnoksen. +FISHERINV = FISHER.KÄÄNT ## Palauttaa käänteisen Fisher-muunnoksen. +FORECAST = ENNUSTE ## Palauttaa lineaarisen trendin arvon. +FREQUENCY = TAAJUUS ## Palauttaa frekvenssijakautuman pystysuuntaisena matriisina. +FTEST = FTESTI ## Palauttaa F-testin tuloksen. +GAMMADIST = GAMMAJAKAUMA ## Palauttaa gammajakauman. +GAMMAINV = GAMMAJAKAUMA.KÄÄNT ## Palauttaa käänteisen gammajakauman kertymäfunktion. +GAMMALN = GAMMALN ## Palauttaa gammafunktion luonnollisen logaritmin G(x). +GEOMEAN = KESKIARVO.GEOM ## Palauttaa geometrisen keskiarvon. +GROWTH = KASVU ## Palauttaa eksponentiaalisen trendin arvon. +HARMEAN = KESKIARVO.HARM ## Palauttaa harmonisen keskiarvon. +HYPGEOMDIST = HYPERGEOM.JAKAUMA ## Palauttaa hypergeometrisen jakauman. +INTERCEPT = LEIKKAUSPISTE ## Palauttaa lineaarisen regressiosuoran leikkauspisteen. +KURT = KURT ## Palauttaa tietoalueen vinous-arvon eli huipukkuuden. +LARGE = SUURI ## Palauttaa tietojoukon k:nneksi suurimman arvon. +LINEST = LINREGR ## Palauttaa lineaarisen trendin parametrit. +LOGEST = LOGREGR ## Palauttaa eksponentiaalisen trendin parametrit. +LOGINV = LOGNORM.JAKAUMA.KÄÄNT ## Palauttaa lognormeeratun jakauman käänteisfunktion. +LOGNORMDIST = LOGNORM.JAKAUMA ## Palauttaa lognormaalisen jakauman kertymäfunktion. +MAX = MAKS ## Palauttaa suurimman arvon argumenttiluettelosta. +MAXA = MAKSA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, suurimman arvon. +MEDIAN = MEDIAANI ## Palauttaa annettujen lukujen mediaanin. +MIN = MIN ## Palauttaa pienimmän arvon argumenttiluettelosta. +MINA = MINA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, pienimmän arvon. +MODE = MOODI ## Palauttaa tietojoukossa useimmin esiintyvän arvon. +NEGBINOMDIST = BINOMIJAKAUMA.NEG ## Palauttaa negatiivisen binomijakauman. +NORMDIST = NORM.JAKAUMA ## Palauttaa normaalijakauman kertymäfunktion. +NORMINV = NORM.JAKAUMA.KÄÄNT ## Palauttaa käänteisen normaalijakauman kertymäfunktion. +NORMSDIST = NORM.JAKAUMA.NORMIT ## Palauttaa normitetun normaalijakauman kertymäfunktion. +NORMSINV = NORM.JAKAUMA.NORMIT.KÄÄNT ## Palauttaa normitetun normaalijakauman kertymäfunktion käänteisarvon. +PEARSON = PEARSON ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen. +PERCENTILE = PROSENTTIPISTE ## Palauttaa alueen arvojen k:nnen prosenttipisteen. +PERCENTRANK = PROSENTTIJÄRJESTYS ## Palauttaa tietojoukon arvon prosentuaalisen järjestysluvun. +PERMUT = PERMUTAATIO ## Palauttaa mahdollisten permutaatioiden määrän annetulle objektien määrälle. +POISSON = POISSON ## Palauttaa Poissonin todennäköisyysjakauman. +PROB = TODENNÄKÖISYYS ## Palauttaa todennäköisyyden sille, että arvot ovat tietyltä väliltä. +QUARTILE = NELJÄNNES ## Palauttaa tietoalueen neljänneksen. +RANK = ARVON.MUKAAN ## Palauttaa luvun paikan lukuarvoluettelossa. +RSQ = PEARSON.NELIÖ ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen neliön. +SKEW = JAKAUMAN.VINOUS ## Palauttaa jakauman vinouden. +SLOPE = KULMAKERROIN ## Palauttaa lineaarisen regressiosuoran kulmakertoimen. +SMALL = PIENI ## Palauttaa tietojoukon k:nneksi pienimmän arvon. +STANDARDIZE = NORMITA ## Palauttaa normitetun arvon. +STDEV = KESKIHAJONTA ## Laskee populaation keskihajonnan otoksen perusteella. +STDEVA = KESKIHAJONTAA ## Laskee populaation keskihajonnan otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. +STDEVP = KESKIHAJONTAP ## Laskee normaalijakautuman koko populaation perusteella. +STDEVPA = KESKIHAJONTAPA ## Laskee populaation keskihajonnan koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. +STEYX = KESKIVIRHE ## Palauttaa regression kutakin x-arvoa vastaavan ennustetun y-arvon keskivirheen. +TDIST = TJAKAUMA ## Palauttaa t-jakautuman. +TINV = TJAKAUMA.KÄÄNT ## Palauttaa käänteisen t-jakauman. +TREND = SUUNTAUS ## Palauttaa lineaarisen trendin arvoja. +TRIMMEAN = KESKIARVO.TASATTU ## Palauttaa tietojoukon tasatun keskiarvon. +TTEST = TTESTI ## Palauttaa t-testiin liittyvän todennäköisyyden. +VAR = VAR ## Arvioi populaation varianssia otoksen perusteella. +VARA = VARA ## Laskee populaation varianssin otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. +VARP = VARP ## Laskee varianssin koko populaation perusteella. +VARPA = VARPA ## Laskee populaation varianssin koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. +WEIBULL = WEIBULL ## Palauttaa Weibullin jakauman. +ZTEST = ZTESTI ## Palauttaa z-testin yksisuuntaisen todennäköisyysarvon. + + +## +## Text functions Tekstifunktiot +## +ASC = ASC ## Muuntaa merkkijonossa olevat englanninkieliset DBCS- tai katakana-merkit SBCS-merkeiksi. +BAHTTEXT = BAHTTEKSTI ## Muuntaa luvun tekstiksi ß (baht) -valuuttamuotoa käyttämällä. +CHAR = MERKKI ## Palauttaa koodin lukua vastaavan merkin. +CLEAN = SIIVOA ## Poistaa tekstistä kaikki tulostumattomat merkit. +CODE = KOODI ## Palauttaa tekstimerkkijonon ensimmäisen merkin numerokoodin. +CONCATENATE = KETJUTA ## Yhdistää useat merkkijonot yhdeksi merkkijonoksi. +DOLLAR = VALUUTTA ## Muuntaa luvun tekstiksi $ (dollari) -valuuttamuotoa käyttämällä. +EXACT = VERTAA ## Tarkistaa, ovatko kaksi tekstiarvoa samanlaiset. +FIND = ETSI ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). +FINDB = ETSIB ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). +FIXED = KIINTEÄ ## Muotoilee luvun tekstiksi, jossa on kiinteä määrä desimaaleja. +JIS = JIS ## Muuntaa merkkijonossa olevat englanninkieliset SBCS- tai katakana-merkit DBCS-merkeiksi. +LEFT = VASEN ## Palauttaa tekstiarvon vasemmanpuoliset merkit. +LEFTB = VASENB ## Palauttaa tekstiarvon vasemmanpuoliset merkit. +LEN = PITUUS ## Palauttaa tekstimerkkijonon merkkien määrän. +LENB = PITUUSB ## Palauttaa tekstimerkkijonon merkkien määrän. +LOWER = PIENET ## Muuntaa tekstin pieniksi kirjaimiksi. +MID = POIMI.TEKSTI ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. +MIDB = POIMI.TEKSTIB ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. +PHONETIC = FONEETTINEN ## Hakee foneettiset (furigana) merkit merkkijonosta. +PROPER = ERISNIMI ## Muuttaa merkkijonon kunkin sanan ensimmäisen kirjaimen isoksi. +REPLACE = KORVAA ## Korvaa tekstissä olevat merkit. +REPLACEB = KORVAAB ## Korvaa tekstissä olevat merkit. +REPT = TOISTA ## Toistaa tekstin annetun määrän kertoja. +RIGHT = OIKEA ## Palauttaa tekstiarvon oikeanpuoliset merkit. +RIGHTB = OIKEAB ## Palauttaa tekstiarvon oikeanpuoliset merkit. +SEARCH = KÄY.LÄPI ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). +SEARCHB = KÄY.LÄPIB ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). +SUBSTITUTE = VAIHDA ## Korvaa merkkijonossa olevan tekstin toisella. +T = T ## Muuntaa argumentit tekstiksi. +TEXT = TEKSTI ## Muotoilee luvun ja muuntaa sen tekstiksi. +TRIM = POISTA.VÄLIT ## Poistaa välilyönnit tekstistä. +UPPER = ISOT ## Muuntaa tekstin isoiksi kirjaimiksi. +VALUE = ARVO ## Muuntaa tekstiargumentin luvuksi. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config new file mode 100755 index 0000000..8189598 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NUL! +DIV0 = #DIV/0! +VALUE = #VALEUR! +REF = #REF! +NAME = #NOM? +NUM = #NOMBRE! +NA = #N/A diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions new file mode 100755 index 0000000..7f40d5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/fr/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Fonctions de complément et d’automatisation +## +GETPIVOTDATA = LIREDONNEESTABCROISDYNAMIQUE ## Renvoie les données stockées dans un rapport de tableau croisé dynamique. + + +## +## Cube functions Fonctions Cube +## +CUBEKPIMEMBER = MEMBREKPICUBE ## Renvoie un nom, une propriété et une mesure d’indicateur de performance clé et affiche le nom et la propriété dans la cellule. Un indicateur de performance clé est une mesure quantifiable, telle que la marge bénéficiaire brute mensuelle ou la rotation trimestrielle du personnel, utilisée pour évaluer les performances d’une entreprise. +CUBEMEMBER = MEMBRECUBE ## Renvoie un membre ou un uplet dans une hiérarchie de cubes. Utilisez cette fonction pour valider l’existence du membre ou de l’uplet dans le cube. +CUBEMEMBERPROPERTY = PROPRIETEMEMBRECUBE ## Renvoie la valeur d’une propriété de membre du cube. Utilisez cette fonction pour valider l’existence d’un nom de membre dans le cube et pour renvoyer la propriété spécifiée pour ce membre. +CUBERANKEDMEMBER = RANGMEMBRECUBE ## Renvoie le nième membre ou le membre placé à un certain rang dans un ensemble. Utilisez cette fonction pour renvoyer un ou plusieurs éléments d’un ensemble, tels que les meilleurs vendeurs ou les 10 meilleurs étudiants. +CUBESET = JEUCUBE ## Définit un ensemble calculé de membres ou d’uplets en envoyant une expression définie au cube sur le serveur qui crée l’ensemble et le renvoie à Microsoft Office Excel. +CUBESETCOUNT = NBJEUCUBE ## Renvoie le nombre d’éléments dans un jeu. +CUBEVALUE = VALEURCUBE ## Renvoie une valeur d’agrégation issue d’un cube. + + +## +## Database functions Fonctions de base de données +## +DAVERAGE = BDMOYENNE ## Renvoie la moyenne des entrées de base de données sélectionnées. +DCOUNT = BCOMPTE ## Compte le nombre de cellules d’une base de données qui contiennent des nombres. +DCOUNTA = BDNBVAL ## Compte les cellules non vides d’une base de données. +DGET = BDLIRE ## Extrait d’une base de données un enregistrement unique répondant aux critères spécifiés. +DMAX = BDMAX ## Renvoie la valeur maximale des entrées de base de données sélectionnées. +DMIN = BDMIN ## Renvoie la valeur minimale des entrées de base de données sélectionnées. +DPRODUCT = BDPRODUIT ## Multiplie les valeurs d’un champ particulier des enregistrements d’une base de données, qui répondent aux critères spécifiés. +DSTDEV = BDECARTYPE ## Calcule l’écart type pour un échantillon d’entrées de base de données sélectionnées. +DSTDEVP = BDECARTYPEP ## Calcule l’écart type pour l’ensemble d’une population d’entrées de base de données sélectionnées. +DSUM = BDSOMME ## Ajoute les nombres dans la colonne de champ des enregistrements de la base de données, qui répondent aux critères. +DVAR = BDVAR ## Calcule la variance pour un échantillon d’entrées de base de données sélectionnées. +DVARP = BDVARP ## Calcule la variance pour l’ensemble d’une population d’entrées de base de données sélectionnées. + + +## +## Date and time functions Fonctions de date et d’heure +## +DATE = DATE ## Renvoie le numéro de série d’une date précise. +DATEVALUE = DATEVAL ## Convertit une date représentée sous forme de texte en numéro de série. +DAY = JOUR ## Convertit un numéro de série en jour du mois. +DAYS360 = JOURS360 ## Calcule le nombre de jours qui séparent deux dates sur la base d’une année de 360 jours. +EDATE = MOIS.DECALER ## Renvoie le numéro séquentiel de la date qui représente une date spécifiée (l’argument date_départ), corrigée en plus ou en moins du nombre de mois indiqué. +EOMONTH = FIN.MOIS ## Renvoie le numéro séquentiel de la date du dernier jour du mois précédant ou suivant la date_départ du nombre de mois indiqué. +HOUR = HEURE ## Convertit un numéro de série en heure. +MINUTE = MINUTE ## Convertit un numéro de série en minute. +MONTH = MOIS ## Convertit un numéro de série en mois. +NETWORKDAYS = NB.JOURS.OUVRES ## Renvoie le nombre de jours ouvrés entiers compris entre deux dates. +NOW = MAINTENANT ## Renvoie le numéro de série de la date et de l’heure du jour. +SECOND = SECONDE ## Convertit un numéro de série en seconde. +TIME = TEMPS ## Renvoie le numéro de série d’une heure précise. +TIMEVALUE = TEMPSVAL ## Convertit une date représentée sous forme de texte en numéro de série. +TODAY = AUJOURDHUI ## Renvoie le numéro de série de la date du jour. +WEEKDAY = JOURSEM ## Convertit un numéro de série en jour de la semaine. +WEEKNUM = NO.SEMAINE ## Convertit un numéro de série en un numéro représentant l’ordre de la semaine dans l’année. +WORKDAY = SERIE.JOUR.OUVRE ## Renvoie le numéro de série de la date avant ou après le nombre de jours ouvrés spécifiés. +YEAR = ANNEE ## Convertit un numéro de série en année. +YEARFRAC = FRACTION.ANNEE ## Renvoie la fraction de l’année représentant le nombre de jours entre la date de début et la date de fin. + + +## +## Engineering functions Fonctions d’ingénierie +## +BESSELI = BESSELI ## Renvoie la fonction Bessel modifiée In(x). +BESSELJ = BESSELJ ## Renvoie la fonction Bessel Jn(x). +BESSELK = BESSELK ## Renvoie la fonction Bessel modifiée Kn(x). +BESSELY = BESSELY ## Renvoie la fonction Bessel Yn(x). +BIN2DEC = BINDEC ## Convertit un nombre binaire en nombre décimal. +BIN2HEX = BINHEX ## Convertit un nombre binaire en nombre hexadécimal. +BIN2OCT = BINOCT ## Convertit un nombre binaire en nombre octal. +COMPLEX = COMPLEXE ## Convertit des coefficients réel et imaginaire en un nombre complexe. +CONVERT = CONVERT ## Convertit un nombre d’une unité de mesure à une autre. +DEC2BIN = DECBIN ## Convertit un nombre décimal en nombre binaire. +DEC2HEX = DECHEX ## Convertit un nombre décimal en nombre hexadécimal. +DEC2OCT = DECOCT ## Convertit un nombre décimal en nombre octal. +DELTA = DELTA ## Teste l’égalité de deux nombres. +ERF = ERF ## Renvoie la valeur de la fonction d’erreur. +ERFC = ERFC ## Renvoie la valeur de la fonction d’erreur complémentaire. +GESTEP = SUP.SEUIL ## Teste si un nombre est supérieur à une valeur de seuil. +HEX2BIN = HEXBIN ## Convertit un nombre hexadécimal en nombre binaire. +HEX2DEC = HEXDEC ## Convertit un nombre hexadécimal en nombre décimal. +HEX2OCT = HEXOCT ## Convertit un nombre hexadécimal en nombre octal. +IMABS = COMPLEXE.MODULE ## Renvoie la valeur absolue (module) d’un nombre complexe. +IMAGINARY = COMPLEXE.IMAGINAIRE ## Renvoie le coefficient imaginaire d’un nombre complexe. +IMARGUMENT = COMPLEXE.ARGUMENT ## Renvoie l’argument thêta, un angle exprimé en radians. +IMCONJUGATE = COMPLEXE.CONJUGUE ## Renvoie le nombre complexe conjugué d’un nombre complexe. +IMCOS = IMCOS ## Renvoie le cosinus d’un nombre complexe. +IMDIV = COMPLEXE.DIV ## Renvoie le quotient de deux nombres complexes. +IMEXP = COMPLEXE.EXP ## Renvoie la fonction exponentielle d’un nombre complexe. +IMLN = COMPLEXE.LN ## Renvoie le logarithme népérien d’un nombre complexe. +IMLOG10 = COMPLEXE.LOG10 ## Calcule le logarithme en base 10 d’un nombre complexe. +IMLOG2 = COMPLEXE.LOG2 ## Calcule le logarithme en base 2 d’un nombre complexe. +IMPOWER = COMPLEXE.PUISSANCE ## Renvoie un nombre complexe élevé à une puissance entière. +IMPRODUCT = COMPLEXE.PRODUIT ## Renvoie le produit de plusieurs nombres complexes. +IMREAL = COMPLEXE.REEL ## Renvoie le coefficient réel d’un nombre complexe. +IMSIN = COMPLEXE.SIN ## Renvoie le sinus d’un nombre complexe. +IMSQRT = COMPLEXE.RACINE ## Renvoie la racine carrée d’un nombre complexe. +IMSUB = COMPLEXE.DIFFERENCE ## Renvoie la différence entre deux nombres complexes. +IMSUM = COMPLEXE.SOMME ## Renvoie la somme de plusieurs nombres complexes. +OCT2BIN = OCTBIN ## Convertit un nombre octal en nombre binaire. +OCT2DEC = OCTDEC ## Convertit un nombre octal en nombre décimal. +OCT2HEX = OCTHEX ## Convertit un nombre octal en nombre hexadécimal. + + +## +## Financial functions Fonctions financières +## +ACCRINT = INTERET.ACC ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu périodiquement. +ACCRINTM = INTERET.ACC.MAT ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu à l’échéance. +AMORDEGRC = AMORDEGRC ## Renvoie l’amortissement correspondant à chaque période comptable en utilisant un coefficient d’amortissement. +AMORLINC = AMORLINC ## Renvoie l’amortissement d’un bien à la fin d’une période fiscale donnée. +COUPDAYBS = NB.JOURS.COUPON.PREC ## Renvoie le nombre de jours entre le début de la période de coupon et la date de liquidation. +COUPDAYS = NB.JOURS.COUPONS ## Renvoie le nombre de jours pour la période du coupon contenant la date de liquidation. +COUPDAYSNC = NB.JOURS.COUPON.SUIV ## Renvoie le nombre de jours entre la date de liquidation et la date du coupon suivant la date de liquidation. +COUPNCD = DATE.COUPON.SUIV ## Renvoie la première date de coupon ultérieure à la date de règlement. +COUPNUM = NB.COUPONS ## Renvoie le nombre de coupons dus entre la date de règlement et la date d’échéance. +COUPPCD = DATE.COUPON.PREC ## Renvoie la date de coupon précédant la date de règlement. +CUMIPMT = CUMUL.INTER ## Renvoie l’intérêt cumulé payé sur un emprunt entre deux périodes. +CUMPRINC = CUMUL.PRINCPER ## Renvoie le montant cumulé des remboursements du capital d’un emprunt effectués entre deux périodes. +DB = DB ## Renvoie l’amortissement d’un bien pour une période spécifiée en utilisant la méthode de l’amortissement dégressif à taux fixe. +DDB = DDB ## Renvoie l’amortissement d’un bien pour toute période spécifiée, en utilisant la méthode de l’amortissement dégressif à taux double ou selon un coefficient à spécifier. +DISC = TAUX.ESCOMPTE ## Calcule le taux d’escompte d’une transaction. +DOLLARDE = PRIX.DEC ## Convertit un prix en euros, exprimé sous forme de fraction, en un prix en euros exprimé sous forme de nombre décimal. +DOLLARFR = PRIX.FRAC ## Convertit un prix en euros, exprimé sous forme de nombre décimal, en un prix en euros exprimé sous forme de fraction. +DURATION = DUREE ## Renvoie la durée, en années, d’un titre dont l’intérêt est perçu périodiquement. +EFFECT = TAUX.EFFECTIF ## Renvoie le taux d’intérêt annuel effectif. +FV = VC ## Renvoie la valeur future d’un investissement. +FVSCHEDULE = VC.PAIEMENTS ## Calcule la valeur future d’un investissement en appliquant une série de taux d’intérêt composites. +INTRATE = TAUX.INTERET ## Affiche le taux d’intérêt d’un titre totalement investi. +IPMT = INTPER ## Calcule le montant des intérêts d’un investissement pour une période donnée. +IRR = TRI ## Calcule le taux de rentabilité interne d’un investissement pour une succession de trésoreries. +ISPMT = ISPMT ## Calcule le montant des intérêts d’un investissement pour une période donnée. +MDURATION = DUREE.MODIFIEE ## Renvoie la durée de Macauley modifiée pour un titre ayant une valeur nominale hypothétique de 100_euros. +MIRR = TRIM ## Calcule le taux de rentabilité interne lorsque les paiements positifs et négatifs sont financés à des taux différents. +NOMINAL = TAUX.NOMINAL ## Calcule le taux d’intérêt nominal annuel. +NPER = NPM ## Renvoie le nombre de versements nécessaires pour rembourser un emprunt. +NPV = VAN ## Calcule la valeur actuelle nette d’un investissement basé sur une série de décaissements et un taux d’escompte. +ODDFPRICE = PRIX.PCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. +ODDFYIELD = REND.PCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la première période de coupon est irrégulière. +ODDLPRICE = PRIX.DCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. +ODDLYIELD = REND.DCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la dernière période de coupon est irrégulière. +PMT = VPM ## Calcule le paiement périodique d’un investissement donné. +PPMT = PRINCPER ## Calcule, pour une période donnée, la part de remboursement du principal d’un investissement. +PRICE = PRIX.TITRE ## Renvoie le prix d’un titre rapportant des intérêts périodiques, pour une valeur nominale de 100 euros. +PRICEDISC = VALEUR.ENCAISSEMENT ## Renvoie la valeur d’encaissement d’un escompte commercial, pour une valeur nominale de 100 euros. +PRICEMAT = PRIX.TITRE.ECHEANCE ## Renvoie le prix d’un titre dont la valeur nominale est 100 euros et qui rapporte des intérêts à l’échéance. +PV = PV ## Calcule la valeur actuelle d’un investissement. +RATE = TAUX ## Calcule le taux d’intérêt par période pour une annuité. +RECEIVED = VALEUR.NOMINALE ## Renvoie la valeur nominale à échéance d’un effet de commerce. +SLN = AMORLIN ## Calcule l’amortissement linéaire d’un bien pour une période donnée. +SYD = SYD ## Calcule l’amortissement d’un bien pour une période donnée sur la base de la méthode américaine Sum-of-Years Digits (amortissement dégressif à taux décroissant appliqué à une valeur constante). +TBILLEQ = TAUX.ESCOMPTE.R ## Renvoie le taux d’escompte rationnel d’un bon du Trésor. +TBILLPRICE = PRIX.BON.TRESOR ## Renvoie le prix d’un bon du Trésor d’une valeur nominale de 100 euros. +TBILLYIELD = RENDEMENT.BON.TRESOR ## Calcule le taux de rendement d’un bon du Trésor. +VDB = VDB ## Renvoie l’amortissement d’un bien pour une période spécifiée ou partielle en utilisant une méthode de l’amortissement dégressif à taux fixe. +XIRR = TRI.PAIEMENTS ## Calcule le taux de rentabilité interne d’un ensemble de paiements non périodiques. +XNPV = VAN.PAIEMENTS ## Renvoie la valeur actuelle nette d’un ensemble de paiements non périodiques. +YIELD = RENDEMENT.TITRE ## Calcule le rendement d’un titre rapportant des intérêts périodiquement. +YIELDDISC = RENDEMENT.SIMPLE ## Calcule le taux de rendement d’un emprunt à intérêt simple (par exemple, un bon du Trésor). +YIELDMAT = RENDEMENT.TITRE.ECHEANCE ## Renvoie le rendement annuel d’un titre qui rapporte des intérêts à l’échéance. + + +## +## Information functions Fonctions d’information +## +CELL = CELLULE ## Renvoie des informations sur la mise en forme, l’emplacement et le contenu d’une cellule. +ERROR.TYPE = TYPE.ERREUR ## Renvoie un nombre correspondant à un type d’erreur. +INFO = INFORMATIONS ## Renvoie des informations sur l’environnement d’exploitation actuel. +ISBLANK = ESTVIDE ## Renvoie VRAI si l’argument valeur est vide. +ISERR = ESTERR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur, sauf #N/A. +ISERROR = ESTERREUR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur. +ISEVEN = EST.PAIR ## Renvoie VRAI si le chiffre est pair. +ISLOGICAL = ESTLOGIQUE ## Renvoie VRAI si l’argument valeur fait référence à une valeur logique. +ISNA = ESTNA ## Renvoie VRAI si l’argument valeur fait référence à la valeur d’erreur #N/A. +ISNONTEXT = ESTNONTEXTE ## Renvoie VRAI si l’argument valeur ne se présente pas sous forme de texte. +ISNUMBER = ESTNUM ## Renvoie VRAI si l’argument valeur représente un nombre. +ISODD = EST.IMPAIR ## Renvoie VRAI si le chiffre est impair. +ISREF = ESTREF ## Renvoie VRAI si l’argument valeur est une référence. +ISTEXT = ESTTEXTE ## Renvoie VRAI si l’argument valeur se présente sous forme de texte. +N = N ## Renvoie une valeur convertie en nombre. +NA = NA ## Renvoie la valeur d’erreur #N/A. +TYPE = TYPE ## Renvoie un nombre indiquant le type de données d’une valeur. + + +## +## Logical functions Fonctions logiques +## +AND = ET ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = FAUX ## Renvoie la valeur logique FAUX. +IF = SI ## Spécifie un test logique à effectuer. +IFERROR = SIERREUR ## Renvoie une valeur que vous spécifiez si une formule génère une erreur ; sinon, elle renvoie le résultat de la formule. +NOT = NON ## Inverse la logique de cet argument. +OR = OU ## Renvoie VRAI si un des arguments est VRAI. +TRUE = VRAI ## Renvoie la valeur logique VRAI. + + +## +## Lookup and reference functions Fonctions de recherche et de référence +## +ADDRESS = ADRESSE ## Renvoie une référence sous forme de texte à une seule cellule d’une feuille de calcul. +AREAS = ZONES ## Renvoie le nombre de zones dans une référence. +CHOOSE = CHOISIR ## Choisit une valeur dans une liste. +COLUMN = COLONNE ## Renvoie le numéro de colonne d’une référence. +COLUMNS = COLONNES ## Renvoie le nombre de colonnes dans une référence. +HLOOKUP = RECHERCHEH ## Effectue une recherche dans la première ligne d’une matrice et renvoie la valeur de la cellule indiquée. +HYPERLINK = LIEN_HYPERTEXTE ## Crée un raccourci ou un renvoi qui ouvre un document stocké sur un serveur réseau, sur un réseau Intranet ou sur Internet. +INDEX = INDEX ## Utilise un index pour choisir une valeur provenant d’une référence ou d’une matrice. +INDIRECT = INDIRECT ## Renvoie une référence indiquée par une valeur de texte. +LOOKUP = RECHERCHE ## Recherche des valeurs dans un vecteur ou une matrice. +MATCH = EQUIV ## Recherche des valeurs dans une référence ou une matrice. +OFFSET = DECALER ## Renvoie une référence décalée par rapport à une référence donnée. +ROW = LIGNE ## Renvoie le numéro de ligne d’une référence. +ROWS = LIGNES ## Renvoie le nombre de lignes dans une référence. +RTD = RTD ## Extrait les données en temps réel à partir d’un programme prenant en charge l’automation COM (Automation : utilisation des objets d'une application à partir d'une autre application ou d'un autre outil de développement. Autrefois appelée OLE Automation, Automation est une norme industrielle et une fonctionnalité du modèle d'objet COM (Component Object Model).). +TRANSPOSE = TRANSPOSE ## Renvoie la transposition d’une matrice. +VLOOKUP = RECHERCHEV ## Effectue une recherche dans la première colonne d’une matrice et se déplace sur la ligne pour renvoyer la valeur d’une cellule. + + +## +## Math and trigonometry functions Fonctions mathématiques et trigonométriques +## +ABS = ABS ## Renvoie la valeur absolue d’un nombre. +ACOS = ACOS ## Renvoie l’arccosinus d’un nombre. +ACOSH = ACOSH ## Renvoie le cosinus hyperbolique inverse d’un nombre. +ASIN = ASIN ## Renvoie l’arcsinus d’un nombre. +ASINH = ASINH ## Renvoie le sinus hyperbolique inverse d’un nombre. +ATAN = ATAN ## Renvoie l’arctangente d’un nombre. +ATAN2 = ATAN2 ## Renvoie l’arctangente des coordonnées x et y. +ATANH = ATANH ## Renvoie la tangente hyperbolique inverse d’un nombre. +CEILING = PLAFOND ## Arrondit un nombre au nombre entier le plus proche ou au multiple le plus proche de l’argument précision en s’éloignant de zéro. +COMBIN = COMBIN ## Renvoie le nombre de combinaisons que l’on peut former avec un nombre donné d’objets. +COS = COS ## Renvoie le cosinus d’un nombre. +COSH = COSH ## Renvoie le cosinus hyperbolique d’un nombre. +DEGREES = DEGRES ## Convertit des radians en degrés. +EVEN = PAIR ## Arrondit un nombre au nombre entier pair le plus proche en s’éloignant de zéro. +EXP = EXP ## Renvoie e élevé à la puissance d’un nombre donné. +FACT = FACT ## Renvoie la factorielle d’un nombre. +FACTDOUBLE = FACTDOUBLE ## Renvoie la factorielle double d’un nombre. +FLOOR = PLANCHER ## Arrondit un nombre en tendant vers 0 (zéro). +GCD = PGCD ## Renvoie le plus grand commun diviseur. +INT = ENT ## Arrondit un nombre à l’entier immédiatement inférieur. +LCM = PPCM ## Renvoie le plus petit commun multiple. +LN = LN ## Renvoie le logarithme népérien d’un nombre. +LOG = LOG ## Renvoie le logarithme d’un nombre dans la base spécifiée. +LOG10 = LOG10 ## Calcule le logarithme en base 10 d’un nombre. +MDETERM = DETERMAT ## Renvoie le déterminant d’une matrice. +MINVERSE = INVERSEMAT ## Renvoie la matrice inverse d’une matrice. +MMULT = PRODUITMAT ## Renvoie le produit de deux matrices. +MOD = MOD ## Renvoie le reste d’une division. +MROUND = ARRONDI.AU.MULTIPLE ## Donne l’arrondi d’un nombre au multiple spécifié. +MULTINOMIAL = MULTINOMIALE ## Calcule la multinomiale d’un ensemble de nombres. +ODD = IMPAIR ## Renvoie le nombre, arrondi à la valeur du nombre entier impair le plus proche en s’éloignant de zéro. +PI = PI ## Renvoie la valeur de pi. +POWER = PUISSANCE ## Renvoie la valeur du nombre élevé à une puissance. +PRODUCT = PRODUIT ## Multiplie ses arguments. +QUOTIENT = QUOTIENT ## Renvoie la partie entière du résultat d’une division. +RADIANS = RADIANS ## Convertit des degrés en radians. +RAND = ALEA ## Renvoie un nombre aléatoire compris entre 0 et 1. +RANDBETWEEN = ALEA.ENTRE.BORNES ## Renvoie un nombre aléatoire entre les nombres que vous spécifiez. +ROMAN = ROMAIN ## Convertit des chiffres arabes en chiffres romains, sous forme de texte. +ROUND = ARRONDI ## Arrondit un nombre au nombre de chiffres indiqué. +ROUNDDOWN = ARRONDI.INF ## Arrondit un nombre en tendant vers 0 (zéro). +ROUNDUP = ARRONDI.SUP ## Arrondit un nombre à l’entier supérieur, en s’éloignant de zéro. +SERIESSUM = SOMME.SERIES ## Renvoie la somme d’une série géométrique en s’appuyant sur la formule suivante : +SIGN = SIGNE ## Renvoie le signe d’un nombre. +SIN = SIN ## Renvoie le sinus d’un angle donné. +SINH = SINH ## Renvoie le sinus hyperbolique d’un nombre. +SQRT = RACINE ## Renvoie la racine carrée d’un nombre. +SQRTPI = RACINE.PI ## Renvoie la racine carrée de (nombre * pi). +SUBTOTAL = SOUS.TOTAL ## Renvoie un sous-total dans une liste ou une base de données. +SUM = SOMME ## Calcule la somme de ses arguments. +SUMIF = SOMME.SI ## Additionne les cellules spécifiées si elles répondent à un critère donné. +SUMIFS = SOMME.SI.ENS ## Ajoute les cellules d’une plage qui répondent à plusieurs critères. +SUMPRODUCT = SOMMEPROD ## Multiplie les valeurs correspondantes des matrices spécifiées et calcule la somme de ces produits. +SUMSQ = SOMME.CARRES ## Renvoie la somme des carrés des arguments. +SUMX2MY2 = SOMME.X2MY2 ## Renvoie la somme de la différence des carrés des valeurs correspondantes de deux matrices. +SUMX2PY2 = SOMME.X2PY2 ## Renvoie la somme de la somme des carrés des valeurs correspondantes de deux matrices. +SUMXMY2 = SOMME.XMY2 ## Renvoie la somme des carrés des différences entre les valeurs correspondantes de deux matrices. +TAN = TAN ## Renvoie la tangente d’un nombre. +TANH = TANH ## Renvoie la tangente hyperbolique d’un nombre. +TRUNC = TRONQUE ## Renvoie la partie entière d’un nombre. + + +## +## Statistical functions Fonctions statistiques +## +AVEDEV = ECART.MOYEN ## Renvoie la moyenne des écarts absolus observés dans la moyenne des points de données. +AVERAGE = MOYENNE ## Renvoie la moyenne de ses arguments. +AVERAGEA = AVERAGEA ## Renvoie la moyenne de ses arguments, nombres, texte et valeurs logiques inclus. +AVERAGEIF = MOYENNE.SI ## Renvoie la moyenne (arithmétique) de toutes les cellules d’une plage qui répondent à des critères donnés. +AVERAGEIFS = MOYENNE.SI.ENS ## Renvoie la moyenne (arithmétique) de toutes les cellules qui répondent à plusieurs critères. +BETADIST = LOI.BETA ## Renvoie la fonction de distribution cumulée. +BETAINV = BETA.INVERSE ## Renvoie l’inverse de la fonction de distribution cumulée pour une distribution bêta spécifiée. +BINOMDIST = LOI.BINOMIALE ## Renvoie la probabilité d’une variable aléatoire discrète suivant la loi binomiale. +CHIDIST = LOI.KHIDEUX ## Renvoie la probabilité unilatérale de la distribution khi-deux. +CHIINV = KHIDEUX.INVERSE ## Renvoie l’inverse de la probabilité unilatérale de la distribution khi-deux. +CHITEST = TEST.KHIDEUX ## Renvoie le test d’indépendance. +CONFIDENCE = INTERVALLE.CONFIANCE ## Renvoie l’intervalle de confiance pour une moyenne de population. +CORREL = COEFFICIENT.CORRELATION ## Renvoie le coefficient de corrélation entre deux séries de données. +COUNT = NB ## Détermine les nombres compris dans la liste des arguments. +COUNTA = NBVAL ## Détermine le nombre de valeurs comprises dans la liste des arguments. +COUNTBLANK = NB.VIDE ## Compte le nombre de cellules vides dans une plage. +COUNTIF = NB.SI ## Compte le nombre de cellules qui répondent à un critère donné dans une plage. +COUNTIFS = NB.SI.ENS ## Compte le nombre de cellules à l’intérieur d’une plage qui répondent à plusieurs critères. +COVAR = COVARIANCE ## Renvoie la covariance, moyenne des produits des écarts pour chaque série d’observations. +CRITBINOM = CRITERE.LOI.BINOMIALE ## Renvoie la plus petite valeur pour laquelle la distribution binomiale cumulée est inférieure ou égale à une valeur de critère. +DEVSQ = SOMME.CARRES.ECARTS ## Renvoie la somme des carrés des écarts. +EXPONDIST = LOI.EXPONENTIELLE ## Renvoie la distribution exponentielle. +FDIST = LOI.F ## Renvoie la distribution de probabilité F. +FINV = INVERSE.LOI.F ## Renvoie l’inverse de la distribution de probabilité F. +FISHER = FISHER ## Renvoie la transformation de Fisher. +FISHERINV = FISHER.INVERSE ## Renvoie l’inverse de la transformation de Fisher. +FORECAST = PREVISION ## Calcule une valeur par rapport à une tendance linéaire. +FREQUENCY = FREQUENCE ## Calcule la fréquence d’apparition des valeurs dans une plage de valeurs, puis renvoie des nombres sous forme de matrice verticale. +FTEST = TEST.F ## Renvoie le résultat d’un test F. +GAMMADIST = LOI.GAMMA ## Renvoie la probabilité d’une variable aléatoire suivant une loi Gamma. +GAMMAINV = LOI.GAMMA.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi Gamma. +GAMMALN = LNGAMMA ## Renvoie le logarithme népérien de la fonction Gamma, G(x) +GEOMEAN = MOYENNE.GEOMETRIQUE ## Renvoie la moyenne géométrique. +GROWTH = CROISSANCE ## Calcule des valeurs par rapport à une tendance exponentielle. +HARMEAN = MOYENNE.HARMONIQUE ## Renvoie la moyenne harmonique. +HYPGEOMDIST = LOI.HYPERGEOMETRIQUE ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi hypergéométrique. +INTERCEPT = ORDONNEE.ORIGINE ## Renvoie l’ordonnée à l’origine d’une droite de régression linéaire. +KURT = KURTOSIS ## Renvoie le kurtosis d’une série de données. +LARGE = GRANDE.VALEUR ## Renvoie la k-ième plus grande valeur d’une série de données. +LINEST = DROITEREG ## Renvoie les paramètres d’une tendance linéaire. +LOGEST = LOGREG ## Renvoie les paramètres d’une tendance exponentielle. +LOGINV = LOI.LOGNORMALE.INVERSE ## Renvoie l’inverse de la probabilité pour une variable aléatoire suivant la loi lognormale. +LOGNORMDIST = LOI.LOGNORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi lognormale. +MAX = MAX ## Renvoie la valeur maximale contenue dans une liste d’arguments. +MAXA = MAXA ## Renvoie la valeur maximale d’une liste d’arguments, nombres, texte et valeurs logiques inclus. +MEDIAN = MEDIANE ## Renvoie la valeur médiane des nombres donnés. +MIN = MIN ## Renvoie la valeur minimale contenue dans une liste d’arguments. +MINA = MINA ## Renvoie la plus petite valeur d’une liste d’arguments, nombres, texte et valeurs logiques inclus. +MODE = MODE ## Renvoie la valeur la plus courante d’une série de données. +NEGBINOMDIST = LOI.BINOMIALE.NEG ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi binomiale négative. +NORMDIST = LOI.NORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale. +NORMINV = LOI.NORMALE.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi normale standard. +NORMSDIST = LOI.NORMALE.STANDARD ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale standard. +NORMSINV = LOI.NORMALE.STANDARD.INVERSE ## Renvoie l’inverse de la distribution cumulée normale standard. +PEARSON = PEARSON ## Renvoie le coefficient de corrélation d’échantillonnage de Pearson. +PERCENTILE = CENTILE ## Renvoie le k-ième centile des valeurs d’une plage. +PERCENTRANK = RANG.POURCENTAGE ## Renvoie le rang en pourcentage d’une valeur d’une série de données. +PERMUT = PERMUTATION ## Renvoie le nombre de permutations pour un nombre donné d’objets. +POISSON = LOI.POISSON ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Poisson. +PROB = PROBABILITE ## Renvoie la probabilité que des valeurs d’une plage soient comprises entre deux limites. +QUARTILE = QUARTILE ## Renvoie le quartile d’une série de données. +RANK = RANG ## Renvoie le rang d’un nombre contenu dans une liste. +RSQ = COEFFICIENT.DETERMINATION ## Renvoie la valeur du coefficient de détermination R^2 d’une régression linéaire. +SKEW = COEFFICIENT.ASYMETRIE ## Renvoie l’asymétrie d’une distribution. +SLOPE = PENTE ## Renvoie la pente d’une droite de régression linéaire. +SMALL = PETITE.VALEUR ## Renvoie la k-ième plus petite valeur d’une série de données. +STANDARDIZE = CENTREE.REDUITE ## Renvoie une valeur centrée réduite. +STDEV = ECARTYPE ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population. +STDEVA = STDEVA ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques inclus. +STDEVP = ECARTYPEP ## Calcule l’écart type d’une population à partir de la population entière. +STDEVPA = STDEVPA ## Calcule l’écart type d’une population à partir de l’ensemble de la population, nombres, texte et valeurs logiques inclus. +STEYX = ERREUR.TYPE.XY ## Renvoie l’erreur type de la valeur y prévue pour chaque x de la régression. +TDIST = LOI.STUDENT ## Renvoie la probabilité d’une variable aléatoire suivant une loi T de Student. +TINV = LOI.STUDENT.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi T de Student. +TREND = TENDANCE ## Renvoie des valeurs par rapport à une tendance linéaire. +TRIMMEAN = MOYENNE.REDUITE ## Renvoie la moyenne de l’intérieur d’une série de données. +TTEST = TEST.STUDENT ## Renvoie la probabilité associée à un test T de Student. +VAR = VAR ## Calcule la variance sur la base d’un échantillon. +VARA = VARA ## Estime la variance d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques incluses. +VARP = VAR.P ## Calcule la variance sur la base de l’ensemble de la population. +VARPA = VARPA ## Calcule la variance d’une population en se basant sur la population entière, nombres, texte et valeurs logiques inclus. +WEIBULL = LOI.WEIBULL ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Weibull. +ZTEST = TEST.Z ## Renvoie la valeur de probabilité unilatérale d’un test z. + + +## +## Text functions Fonctions de texte +## +ASC = ASC ## Change les caractères anglais ou katakana à pleine chasse (codés sur deux octets) à l’intérieur d’une chaîne de caractères en caractères à demi-chasse (codés sur un octet). +BAHTTEXT = BAHTTEXT ## Convertit un nombre en texte en utilisant le format monétaire ß (baht). +CHAR = CAR ## Renvoie le caractère spécifié par le code numérique. +CLEAN = EPURAGE ## Supprime tous les caractères de contrôle du texte. +CODE = CODE ## Renvoie le numéro de code du premier caractère du texte. +CONCATENATE = CONCATENER ## Assemble plusieurs éléments textuels de façon à n’en former qu’un seul. +DOLLAR = EURO ## Convertit un nombre en texte en utilisant le format monétaire € (euro). +EXACT = EXACT ## Vérifie si deux valeurs de texte sont identiques. +FIND = TROUVE ## Trouve un valeur textuelle dans une autre, en respectant la casse. +FINDB = TROUVERB ## Trouve un valeur textuelle dans une autre, en respectant la casse. +FIXED = CTXT ## Convertit un nombre au format texte avec un nombre de décimales spécifié. +JIS = JIS ## Change les caractères anglais ou katakana à demi-chasse (codés sur un octet) à l’intérieur d’une chaîne de caractères en caractères à à pleine chasse (codés sur deux octets). +LEFT = GAUCHE ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. +LEFTB = GAUCHEB ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. +LEN = NBCAR ## Renvoie le nombre de caractères contenus dans une chaîne de texte. +LENB = LENB ## Renvoie le nombre de caractères contenus dans une chaîne de texte. +LOWER = MINUSCULE ## Convertit le texte en minuscules. +MID = STXT ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. +MIDB = STXTB ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. +PHONETIC = PHONETIQUE ## Extrait les caractères phonétiques (furigana) d’une chaîne de texte. +PROPER = NOMPROPRE ## Met en majuscules la première lettre de chaque mot dans une chaîne textuelle. +REPLACE = REMPLACER ## Remplace des caractères dans un texte. +REPLACEB = REMPLACERB ## Remplace des caractères dans un texte. +REPT = REPT ## Répète un texte un certain nombre de fois. +RIGHT = DROITE ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. +RIGHTB = DROITEB ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. +SEARCH = CHERCHE ## Trouve un texte dans un autre texte (sans respecter la casse). +SEARCHB = CHERCHERB ## Trouve un texte dans un autre texte (sans respecter la casse). +SUBSTITUTE = SUBSTITUE ## Remplace l’ancien texte d’une chaîne de caractères par un nouveau. +T = T ## Convertit ses arguments en texte. +TEXT = TEXTE ## Convertit un nombre au format texte. +TRIM = SUPPRESPACE ## Supprime les espaces du texte. +UPPER = MAJUSCULE ## Convertit le texte en majuscules. +VALUE = CNUM ## Convertit un argument textuel en nombre diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config new file mode 100755 index 0000000..db61436 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/config @@ -0,0 +1,23 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = Ft + + +## +## Excel Error Codes (For future use) +## +NULL = #NULLA! +DIV0 = #ZÉRÓOSZTÓ! +VALUE = #ÉRTÉK! +REF = #HIV! +NAME = #NÉV? +NUM = #SZÁM! +NA = #HIÁNYZIK diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions new file mode 100755 index 0000000..3adffeb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/hu/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Bővítmények és automatizálási függvények +## +GETPIVOTDATA = KIMUTATÁSADATOT.VESZ ## A kimutatásokban tárolt adatok visszaadására használható. + + +## +## Cube functions Kockafüggvények +## +CUBEKPIMEMBER = KOCKA.FŐTELJMUT ## Egy fő teljesítménymutató (KPI) nevét, tulajdonságát és mértékegységét adja eredményül, a nevet és a tulajdonságot megjeleníti a cellában. A KPI-k számszerűsíthető mérési lehetőséget jelentenek – ilyen mutató például a havi bruttó nyereség vagy az egy alkalmazottra jutó negyedéves forgalom –, egy szervezet teljesítményének nyomonkövetésére használhatók. +CUBEMEMBER = KOCKA.TAG ## Kockahierachia tagját vagy rekordját adja eredményül. Ellenőrizhető vele, hogy szerepel-e a kockában az adott tag vagy rekord. +CUBEMEMBERPROPERTY = KOCKA.TAG.TUL ## A kocka egyik tagtulajdonságának értékét adja eredményül. Használatával ellenőrizhető, hogy szerepel-e egy tagnév a kockában, eredménye pedig az erre a tagra vonatkozó, megadott tulajdonság. +CUBERANKEDMEMBER = KOCKA.HALM.ELEM ## Egy halmaz rangsor szerinti n-edik tagját adja eredményül. Használatával egy halmaz egy vagy több elemét kaphatja meg, például a legnagyobb teljesítményű üzletkötőt vagy a 10 legjobb tanulót. +CUBESET = KOCKA.HALM ## Számított tagok vagy rekordok halmazát adja eredményül, ehhez egy beállított kifejezést elküld a kiszolgálón található kockának, majd ezt a halmazt adja vissza a Microsoft Office Excel alkalmazásnak. +CUBESETCOUNT = KOCKA.HALM.DB ## Egy halmaz elemszámát adja eredményül. +CUBEVALUE = KOCKA.ÉRTÉK ## Kockából összesített értéket ad eredményül. + + +## +## Database functions Adatbázis-kezelő függvények +## +DAVERAGE = AB.ÁTLAG ## A kijelölt adatbáziselemek átlagát számítja ki. +DCOUNT = AB.DARAB ## Megszámolja, hogy az adatbázisban hány cella tartalmaz számokat. +DCOUNTA = AB.DARAB2 ## Megszámolja az adatbázisban lévő nem üres cellákat. +DGET = AB.MEZŐ ## Egy adatbázisból egyetlen olyan rekordot ad vissza, amely megfelel a megadott feltételeknek. +DMAX = AB.MAX ## A kiválasztott adatbáziselemek közül a legnagyobb értéket adja eredményül. +DMIN = AB.MIN ## A kijelölt adatbáziselemek közül a legkisebb értéket adja eredményül. +DPRODUCT = AB.SZORZAT ## Az adatbázis megadott feltételeknek eleget tevő rekordjaira összeszorozza a megadott mezőben található számértékeket, és eredményül ezt a szorzatot adja. +DSTDEV = AB.SZÓRÁS ## A kijelölt adatbáziselemek egy mintája alapján megbecsüli a szórást. +DSTDEVP = AB.SZÓRÁS2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórást. +DSUM = AB.SZUM ## Összeadja a feltételnek megfelelő adatbázisrekordok mezőoszlopában a számokat. +DVAR = AB.VAR ## A kijelölt adatbáziselemek mintája alapján becslést ad a szórásnégyzetre. +DVARP = AB.VAR2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórásnégyzetet. + + +## +## Date and time functions Dátumfüggvények +## +DATE = DÁTUM ## Adott dátum dátumértékét adja eredményül. +DATEVALUE = DÁTUMÉRTÉK ## Szövegként megadott dátumot dátumértékké alakít át. +DAY = NAP ## Dátumértéket a hónap egy napjává (0-31) alakít. +DAYS360 = NAP360 ## Két dátum közé eső napok számát számítja ki a 360 napos év alapján. +EDATE = EDATE ## Adott dátumnál adott számú hónappal korábbi vagy későbbi dátum dátumértékét adja eredményül. +EOMONTH = EOMONTH ## Adott dátumnál adott számú hónappal korábbi vagy későbbi hónap utolsó napjának dátumértékét adja eredményül. +HOUR = ÓRA ## Időértéket órákká alakít. +MINUTE = PERC ## Időértéket percekké alakít. +MONTH = HÓNAP ## Időértéket hónapokká alakít. +NETWORKDAYS = NETWORKDAYS ## Két dátum között a teljes munkanapok számát adja meg. +NOW = MOST ## A napi dátum dátumértékét és a pontos idő időértékét adja eredményül. +SECOND = MPERC ## Időértéket másodpercekké alakít át. +TIME = IDŐ ## Adott időpont időértékét adja meg. +TIMEVALUE = IDŐÉRTÉK ## Szövegként megadott időpontot időértékké alakít át. +TODAY = MA ## A napi dátum dátumértékét adja eredményül. +WEEKDAY = HÉT.NAPJA ## Dátumértéket a hét napjává alakítja át. +WEEKNUM = WEEKNUM ## Visszatérési értéke egy szám, amely azt mutatja meg, hogy a megadott dátum az év hányadik hetére esik. +WORKDAY = WORKDAY ## Adott dátumnál adott munkanappal korábbi vagy későbbi dátum dátumértékét adja eredményül. +YEAR = ÉV ## Sorszámot évvé alakít át. +YEARFRAC = YEARFRAC ## Az adott dátumok közötti teljes napok számát törtévként adja meg. + + +## +## Engineering functions Mérnöki függvények +## +BESSELI = BESSELI ## Az In(x) módosított Bessel-függvény értékét adja eredményül. +BESSELJ = BESSELJ ## A Jn(x) Bessel-függvény értékét adja eredményül. +BESSELK = BESSELK ## A Kn(x) módosított Bessel-függvény értékét adja eredményül. +BESSELY = BESSELY ## Az Yn(x) módosított Bessel-függvény értékét adja eredményül. +BIN2DEC = BIN2DEC ## Bináris számot decimálissá alakít át. +BIN2HEX = BIN2HEX ## Bináris számot hexadecimálissá alakít át. +BIN2OCT = BIN2OCT ## Bináris számot oktálissá alakít át. +COMPLEX = COMPLEX ## Valós és képzetes részből komplex számot képez. +CONVERT = CONVERT ## Mértékegységeket vált át. +DEC2BIN = DEC2BIN ## Decimális számot binárissá alakít át. +DEC2HEX = DEC2HEX ## Decimális számot hexadecimálissá alakít át. +DEC2OCT = DEC2OCT ## Decimális számot oktálissá alakít át. +DELTA = DELTA ## Azt vizsgálja, hogy két érték egyenlő-e. +ERF = ERF ## A hibafüggvény értékét adja eredményül. +ERFC = ERFC ## A kiegészített hibafüggvény értékét adja eredményül. +GESTEP = GESTEP ## Azt vizsgálja, hogy egy szám nagyobb-e adott küszöbértéknél. +HEX2BIN = HEX2BIN ## Hexadecimális számot binárissá alakít át. +HEX2DEC = HEX2DEC ## Hexadecimális számot decimálissá alakít át. +HEX2OCT = HEX2OCT ## Hexadecimális számot oktálissá alakít át. +IMABS = IMABS ## Komplex szám abszolút értékét (modulusát) adja eredményül. +IMAGINARY = IMAGINARY ## Komplex szám képzetes részét adja eredményül. +IMARGUMENT = IMARGUMENT ## A komplex szám radiánban kifejezett théta argumentumát adja eredményül. +IMCONJUGATE = IMCONJUGATE ## Komplex szám komplex konjugáltját adja eredményül. +IMCOS = IMCOS ## Komplex szám koszinuszát adja eredményül. +IMDIV = IMDIV ## Két komplex szám hányadosát adja eredményül. +IMEXP = IMEXP ## Az e szám komplex kitevőjű hatványát adja eredményül. +IMLN = IMLN ## Komplex szám természetes logaritmusát adja eredményül. +IMLOG10 = IMLOG10 ## Komplex szám tízes alapú logaritmusát adja eredményül. +IMLOG2 = IMLOG2 ## Komplex szám kettes alapú logaritmusát adja eredményül. +IMPOWER = IMPOWER ## Komplex szám hatványát adja eredményül. +IMPRODUCT = IMPRODUCT ## Komplex számok szorzatát adja eredményül. +IMREAL = IMREAL ## Komplex szám valós részét adja eredményül. +IMSIN = IMSIN ## Komplex szám szinuszát adja eredményül. +IMSQRT = IMSQRT ## Komplex szám négyzetgyökét adja eredményül. +IMSUB = IMSUB ## Két komplex szám különbségét adja eredményül. +IMSUM = IMSUM ## Komplex számok összegét adja eredményül. +OCT2BIN = OCT2BIN ## Oktális számot binárissá alakít át. +OCT2DEC = OCT2DEC ## Oktális számot decimálissá alakít át. +OCT2HEX = OCT2HEX ## Oktális számot hexadecimálissá alakít át. + + +## +## Financial functions Pénzügyi függvények +## +ACCRINT = ACCRINT ## Periodikusan kamatozó értékpapír felszaporodott kamatát adja eredményül. +ACCRINTM = ACCRINTM ## Lejáratkor kamatozó értékpapír felszaporodott kamatát adja eredményül. +AMORDEGRC = AMORDEGRC ## Állóeszköz lineáris értékcsökkenését adja meg az egyes könyvelési időszakokra vonatkozóan. +AMORLINC = AMORLINC ## Az egyes könyvelési időszakokban az értékcsökkenést adja meg. +COUPDAYBS = COUPDAYBS ## A szelvényidőszak kezdetétől a kifizetés időpontjáig eltelt napokat adja vissza. +COUPDAYS = COUPDAYS ## A kifizetés időpontját magában foglaló szelvényperiódus hosszát adja meg napokban. +COUPDAYSNC = COUPDAYSNC ## A kifizetés időpontja és a legközelebbi szelvénydátum közötti napok számát adja meg. +COUPNCD = COUPNCD ## A kifizetést követő legelső szelvénydátumot adja eredményül. +COUPNUM = COUPNUM ## A kifizetés és a lejárat időpontja között kifizetendő szelvények számát adja eredményül. +COUPPCD = COUPPCD ## A kifizetés előtti utolsó szelvénydátumot adja eredményül. +CUMIPMT = CUMIPMT ## Két fizetési időszak között kifizetett kamat halmozott értékét adja eredményül. +CUMPRINC = CUMPRINC ## Két fizetési időszak között kifizetett részletek halmozott (kamatot nem tartalmazó) értékét adja eredményül. +DB = KCS2 ## Eszköz adott időszak alatti értékcsökkenését számítja ki a lineáris leírási modell alkalmazásával. +DDB = KCSA ## Eszköz értékcsökkenését számítja ki adott időszakra vonatkozóan a progresszív vagy egyéb megadott leírási modell alkalmazásával. +DISC = DISC ## Értékpapír leszámítolási kamatlábát adja eredményül. +DOLLARDE = DOLLARDE ## Egy közönséges törtként megadott számot tizedes törtté alakít át. +DOLLARFR = DOLLARFR ## Tizedes törtként megadott számot közönséges törtté alakít át. +DURATION = DURATION ## Periodikus kamatfizetésű értékpapír éves kamatérzékenységét adja eredményül. +EFFECT = EFFECT ## Az éves tényleges kamatláb értékét adja eredményül. +FV = JBÉ ## Befektetés jövőbeli értékét számítja ki. +FVSCHEDULE = FVSCHEDULE ## A kezdőtőke adott kamatlábak szerint megnövelt jövőbeli értékét adja eredményül. +INTRATE = INTRATE ## A lejáratig teljesen lekötött értékpapír kamatrátáját adja eredményül. +IPMT = RRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. +IRR = BMR ## A befektetés belső megtérülési rátáját számítja ki pénzáramláshoz. +ISPMT = LRÉSZLETKAMAT ## A befektetés adott időszakára fizetett kamatot számítja ki. +MDURATION = MDURATION ## Egy 100 Ft névértékű értékpapír Macauley-féle módosított kamatérzékenységét adja eredményül. +MIRR = MEGTÉRÜLÉS ## A befektetés belső megtérülési rátáját számítja ki a költségek és a bevételek különböző kamatlába mellett. +NOMINAL = NOMINAL ## Az éves névleges kamatláb értékét adja eredményül. +NPER = PER.SZÁM ## A törlesztési időszakok számát adja meg. +NPV = NMÉ ## Befektetéshez kapcsolódó pénzáramlás nettó jelenértékét számítja ki ismert pénzáramlás és kamatláb mellett. +ODDFPRICE = ODDFPRICE ## Egy 100 Ft névértékű, a futamidő elején töredék-időszakos értékpapír árát adja eredményül. +ODDFYIELD = ODDFYIELD ## A futamidő elején töredék-időszakos értékpapír hozamát adja eredményül. +ODDLPRICE = ODDLPRICE ## Egy 100 Ft névértékű, a futamidő végén töredék-időszakos értékpapír árát adja eredményül. +ODDLYIELD = ODDLYIELD ## A futamidő végén töredék-időszakos értékpapír hozamát adja eredményül. +PMT = RÉSZLET ## A törlesztési időszakra vonatkozó törlesztési összeget számítja ki. +PPMT = PRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. +PRICE = PRICE ## Egy 100 Ft névértékű, periodikusan kamatozó értékpapír árát adja eredményül. +PRICEDISC = PRICEDISC ## Egy 100 Ft névértékű leszámítolt értékpapír árát adja eredményül. +PRICEMAT = PRICEMAT ## Egy 100 Ft névértékű, a lejáratkor kamatozó értékpapír árát adja eredményül. +PV = MÉ ## Befektetés jelenlegi értékét számítja ki. +RATE = RÁTA ## Egy törlesztési időszakban az egy időszakra eső kamatláb nagyságát számítja ki. +RECEIVED = RECEIVED ## A lejáratig teljesen lekötött értékpapír lejáratakor kapott összegét adja eredményül. +SLN = LCSA ## Tárgyi eszköz egy időszakra eső amortizációját adja meg bruttó érték szerinti lineáris leírási kulcsot alkalmazva. +SYD = SYD ## Tárgyi eszköz értékcsökkenését számítja ki adott időszakra az évek számjegyösszegével dolgozó módszer alapján. +TBILLEQ = TBILLEQ ## Kincstárjegy kötvény-egyenértékű hozamát adja eredményül. +TBILLPRICE = TBILLPRICE ## Egy 100 Ft névértékű kincstárjegy árát adja eredményül. +TBILLYIELD = TBILLYIELD ## Kincstárjegy hozamát adja eredményül. +VDB = ÉCSRI ## Tárgyi eszköz amortizációját számítja ki megadott vagy részidőszakra a csökkenő egyenleg módszerének alkalmazásával. +XIRR = XIRR ## Ütemezett készpénzforgalom (cash flow) belső megtérülési kamatrátáját adja eredményül. +XNPV = XNPV ## Ütemezett készpénzforgalom (cash flow) nettó jelenlegi értékét adja eredményül. +YIELD = YIELD ## Periodikusan kamatozó értékpapír hozamát adja eredményül. +YIELDDISC = YIELDDISC ## Leszámítolt értékpapír (például kincstárjegy) éves hozamát adja eredményül. +YIELDMAT = YIELDMAT ## Lejáratkor kamatozó értékpapír éves hozamát adja eredményül. + + +## +## Information functions Információs függvények +## +CELL = CELLA ## Egy cella formátumára, elhelyezkedésére vagy tartalmára vonatkozó adatokat ad eredményül. +ERROR.TYPE = HIBA.TÍPUS ## Egy hibatípushoz tartozó számot ad eredményül. +INFO = INFÓ ## A rendszer- és munkakörnyezet pillanatnyi állapotáról ad felvilágosítást. +ISBLANK = ÜRES ## Eredménye IGAZ, ha az érték üres. +ISERR = HIBA ## Eredménye IGAZ, ha az érték valamelyik hibaérték a #HIÁNYZIK kivételével. +ISERROR = HIBÁS ## Eredménye IGAZ, ha az érték valamelyik hibaérték. +ISEVEN = ISEVEN ## Eredménye IGAZ, ha argumentuma páros szám. +ISLOGICAL = LOGIKAI ## Eredménye IGAZ, ha az érték logikai érték. +ISNA = NINCS ## Eredménye IGAZ, ha az érték a #HIÁNYZIK hibaérték. +ISNONTEXT = NEM.SZÖVEG ## Eredménye IGAZ, ha az érték nem szöveg. +ISNUMBER = SZÁM ## Eredménye IGAZ, ha az érték szám. +ISODD = ISODD ## Eredménye IGAZ, ha argumentuma páratlan szám. +ISREF = HIVATKOZÁS ## Eredménye IGAZ, ha az érték hivatkozás. +ISTEXT = SZÖVEG.E ## Eredménye IGAZ, ha az érték szöveg. +N = N ## Argumentumának értékét számmá alakítja. +NA = HIÁNYZIK ## Eredménye a #HIÁNYZIK hibaérték. +TYPE = TÍPUS ## Érték adattípusának azonosítószámát adja eredményül. + + +## +## Logical functions Logikai függvények +## +AND = ÉS ## Eredménye IGAZ, ha minden argumentuma IGAZ. +FALSE = HAMIS ## A HAMIS logikai értéket adja eredményül. +IF = HA ## Logikai vizsgálatot hajt végre. +IFERROR = HAHIBA ## A megadott értéket adja vissza, ha egy képlet hibához vezet; más esetben a képlet értékét adja eredményül. +NOT = NEM ## Argumentuma értékének ellentettjét adja eredményül. +OR = VAGY ## Eredménye IGAZ, ha bármely argumentuma IGAZ. +TRUE = IGAZ ## Az IGAZ logikai értéket adja eredményül. + + +## +## Lookup and reference functions Keresési és hivatkozási függvények +## +ADDRESS = CÍM ## A munkalap egy cellájára való hivatkozást adja szövegként eredményül. +AREAS = TERÜLET ## Hivatkozásban a területek számát adja eredményül. +CHOOSE = VÁLASZT ## Értékek listájából választ ki egy elemet. +COLUMN = OSZLOP ## Egy hivatkozás oszlopszámát adja eredményül. +COLUMNS = OSZLOPOK ## A hivatkozásban található oszlopok számát adja eredményül. +HLOOKUP = VKERES ## A megadott tömb felső sorában adott értékű elemet keres, és a megtalált elem oszlopából adott sorban elhelyezkedő értékkel tér vissza. +HYPERLINK = HIPERHIVATKOZÁS ## Hálózati kiszolgálón, intraneten vagy az interneten tárolt dokumentumot megnyitó parancsikont vagy hivatkozást hoz létre. +INDEX = INDEX ## Tömb- vagy hivatkozás indexszel megadott értékét adja vissza. +INDIRECT = INDIREKT ## Szöveg megadott hivatkozást ad eredményül. +LOOKUP = KERES ## Vektorban vagy tömbben keres meg értékeket. +MATCH = HOL.VAN ## Hivatkozásban vagy tömbben értékeket keres. +OFFSET = OFSZET ## Hivatkozás egy másik hivatkozástól számított távolságát adja meg. +ROW = SOR ## Egy hivatkozás sorának számát adja meg. +ROWS = SOROK ## Egy hivatkozás sorainak számát adja meg. +RTD = RTD ## Valós idejű adatokat keres vissza a COM automatizmust (automatizálás: Egy alkalmazás objektumaival való munka másik alkalmazásból vagy fejlesztőeszközből. A korábban OLE automatizmusnak nevezett automatizálás iparági szabvány, a Component Object Model (COM) szolgáltatása.) támogató programból. +TRANSPOSE = TRANSZPONÁLÁS ## Egy tömb transzponáltját adja eredményül. +VLOOKUP = FKERES ## A megadott tömb bal szélső oszlopában megkeres egy értéket, majd annak sora és a megadott oszlop metszéspontjában levő értéked adja eredményül. + + +## +## Math and trigonometry functions Matematikai és trigonometrikus függvények +## +ABS = ABS ## Egy szám abszolút értékét adja eredményül. +ACOS = ARCCOS ## Egy szám arkusz koszinuszát számítja ki. +ACOSH = ACOSH ## Egy szám inverz koszinusz hiperbolikuszát számítja ki. +ASIN = ARCSIN ## Egy szám arkusz szinuszát számítja ki. +ASINH = ASINH ## Egy szám inverz szinusz hiperbolikuszát számítja ki. +ATAN = ARCTAN ## Egy szám arkusz tangensét számítja ki. +ATAN2 = ARCTAN2 ## X és y koordináták alapján számítja ki az arkusz tangens értéket. +ATANH = ATANH ## A szám inverz tangens hiperbolikuszát számítja ki. +CEILING = PLAFON ## Egy számot a legközelebbi egészre vagy a pontosságként megadott érték legközelebb eső többszörösére kerekít. +COMBIN = KOMBINÁCIÓK ## Adott számú objektum összes lehetséges kombinációinak számát számítja ki. +COS = COS ## Egy szám koszinuszát számítja ki. +COSH = COSH ## Egy szám koszinusz hiperbolikuszát számítja ki. +DEGREES = FOK ## Radiánt fokká alakít át. +EVEN = PÁROS ## Egy számot a legközelebbi páros egész számra kerekít. +EXP = KITEVŐ ## Az e adott kitevőjű hatványát adja eredményül. +FACT = FAKT ## Egy szám faktoriálisát számítja ki. +FACTDOUBLE = FACTDOUBLE ## Egy szám dupla faktoriálisát adja eredményül. +FLOOR = PADLÓ ## Egy számot lefelé, a nulla felé kerekít. +GCD = GCD ## A legnagyobb közös osztót adja eredményül. +INT = INT ## Egy számot lefelé kerekít a legközelebbi egészre. +LCM = LCM ## A legkisebb közös többszöröst adja eredményül. +LN = LN ## Egy szám természetes logaritmusát számítja ki. +LOG = LOG ## Egy szám adott alapú logaritmusát számítja ki. +LOG10 = LOG10 ## Egy szám 10-es alapú logaritmusát számítja ki. +MDETERM = MDETERM ## Egy tömb mátrix-determinánsát számítja ki. +MINVERSE = INVERZ.MÁTRIX ## Egy tömb mátrix inverzét adja eredményül. +MMULT = MSZORZAT ## Két tömb mátrix-szorzatát adja meg. +MOD = MARADÉK ## Egy szám osztási maradékát adja eredményül. +MROUND = MROUND ## A kívánt többszörösére kerekített értéket ad eredményül. +MULTINOMIAL = MULTINOMIAL ## Számhalmaz multinomiálisát adja eredményül. +ODD = PÁRATLAN ## Egy számot a legközelebbi páratlan számra kerekít. +PI = PI ## A pi matematikai állandót adja vissza. +POWER = HATVÁNY ## Egy szám adott kitevőjű hatványát számítja ki. +PRODUCT = SZORZAT ## Argumentumai szorzatát számítja ki. +QUOTIENT = QUOTIENT ## Egy hányados egész részét adja eredményül. +RADIANS = RADIÁN ## Fokot radiánná alakít át. +RAND = VÉL ## Egy 0 és 1 közötti véletlen számot ad eredményül. +RANDBETWEEN = RANDBETWEEN ## Megadott számok közé eső véletlen számot állít elő. +ROMAN = RÓMAI ## Egy számot római számokkal kifejezve szövegként ad eredményül. +ROUND = KEREKÍTÉS ## Egy számot adott számú számjegyre kerekít. +ROUNDDOWN = KEREKÍTÉS.LE ## Egy számot lefelé, a nulla felé kerekít. +ROUNDUP = KEREKÍTÉS.FEL ## Egy számot felfelé, a nullától távolabbra kerekít. +SERIESSUM = SERIESSUM ## Hatványsor összegét adja eredményül. +SIGN = ELŐJEL ## Egy szám előjelét adja meg. +SIN = SIN ## Egy szög szinuszát számítja ki. +SINH = SINH ## Egy szám szinusz hiperbolikuszát számítja ki. +SQRT = GYÖK ## Egy szám pozitív négyzetgyökét számítja ki. +SQRTPI = SQRTPI ## A (szám*pi) négyzetgyökét adja eredményül. +SUBTOTAL = RÉSZÖSSZEG ## Lista vagy adatbázis részösszegét adja eredményül. +SUM = SZUM ## Összeadja az argumentumlistájában lévő számokat. +SUMIF = SZUMHA ## A megadott feltételeknek eleget tevő cellákban található értékeket adja össze. +SUMIFS = SZUMHATÖBB ## Több megadott feltételnek eleget tévő tartománycellák összegét adja eredményül. +SUMPRODUCT = SZORZATÖSSZEG ## A megfelelő tömbelemek szorzatának összegét számítja ki. +SUMSQ = NÉGYZETÖSSZEG ## Argumentumai négyzetének összegét számítja ki. +SUMX2MY2 = SZUMX2BŐLY2 ## Két tömb megfelelő elemei négyzetének különbségét összegzi. +SUMX2PY2 = SZUMX2MEGY2 ## Két tömb megfelelő elemei négyzetének összegét összegzi. +SUMXMY2 = SZUMXBŐLY2 ## Két tömb megfelelő elemei különbségének négyzetösszegét számítja ki. +TAN = TAN ## Egy szám tangensét számítja ki. +TANH = TANH ## Egy szám tangens hiperbolikuszát számítja ki. +TRUNC = CSONK ## Egy számot egésszé csonkít. + + +## +## Statistical functions Statisztikai függvények +## +AVEDEV = ÁTL.ELTÉRÉS ## Az adatpontoknak átlaguktól való átlagos abszolút eltérését számítja ki. +AVERAGE = ÁTLAG ## Argumentumai átlagát számítja ki. +AVERAGEA = ÁTLAGA ## Argumentumai átlagát számítja ki (beleértve a számokat, szöveget és logikai értékeket). +AVERAGEIF = ÁTLAGHA ## A megadott feltételnek eleget tévő tartomány celláinak átlagát (számtani közepét) adja eredményül. +AVERAGEIFS = ÁTLAGHATÖBB ## A megadott feltételeknek eleget tévő cellák átlagát (számtani közepét) adja eredményül. +BETADIST = BÉTA.ELOSZLÁS ## A béta-eloszlás függvényt számítja ki. +BETAINV = INVERZ.BÉTA ## Adott béta-eloszláshoz kiszámítja a béta eloszlásfüggvény inverzét. +BINOMDIST = BINOM.ELOSZLÁS ## A diszkrét binomiális eloszlás valószínűségértékét számítja ki. +CHIDIST = KHI.ELOSZLÁS ## A khi-négyzet-eloszlás egyszélű valószínűségértékét számítja ki. +CHIINV = INVERZ.KHI ## A khi-négyzet-eloszlás egyszélű valószínűségértékének inverzét számítja ki. +CHITEST = KHI.PRÓBA ## Függetlenségvizsgálatot hajt végre. +CONFIDENCE = MEGBÍZHATÓSÁG ## Egy statisztikai sokaság várható értékének megbízhatósági intervallumát adja eredményül. +CORREL = KORREL ## Két adathalmaz korrelációs együtthatóját számítja ki. +COUNT = DARAB ## Megszámolja, hogy argumentumlistájában hány szám található. +COUNTA = DARAB2 ## Megszámolja, hogy argumentumlistájában hány érték található. +COUNTBLANK = DARABÜRES ## Egy tartományban összeszámolja az üres cellákat. +COUNTIF = DARABTELI ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek a megadott feltételnek. +COUNTIFS = DARABHATÖBB ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek több feltételnek. +COVAR = KOVAR ## A kovarianciát, azaz a páronkénti eltérések szorzatának átlagát számítja ki. +CRITBINOM = KRITBINOM ## Azt a legkisebb számot adja eredményül, amelyre a binomiális eloszlásfüggvény értéke nem kisebb egy adott határértéknél. +DEVSQ = SQ ## Az átlagtól való eltérések négyzetének összegét számítja ki. +EXPONDIST = EXP.ELOSZLÁS ## Az exponenciális eloszlás értékét számítja ki. +FDIST = F.ELOSZLÁS ## Az F-eloszlás értékét számítja ki. +FINV = INVERZ.F ## Az F-eloszlás inverzének értékét számítja ki. +FISHER = FISHER ## Fisher-transzformációt hajt végre. +FISHERINV = INVERZ.FISHER ## A Fisher-transzformáció inverzét hajtja végre. +FORECAST = ELŐREJELZÉS ## Az ismert értékek alapján lineáris regresszióval becsült értéket ad eredményül. +FREQUENCY = GYAKORISÁG ## A gyakorisági vagy empirikus eloszlás értékét függőleges tömbként adja eredményül. +FTEST = F.PRÓBA ## Az F-próba értékét adja eredményül. +GAMMADIST = GAMMA.ELOSZLÁS ## A gamma-eloszlás értékét számítja ki. +GAMMAINV = INVERZ.GAMMA ## A gamma-eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +GAMMALN = GAMMALN ## A gamma-függvény természetes logaritmusát számítja ki. +GEOMEAN = MÉRTANI.KÖZÉP ## Argumentumai mértani középértékét számítja ki. +GROWTH = NÖV ## Exponenciális regresszió alapján ad becslést. +HARMEAN = HARM.KÖZÉP ## Argumentumai harmonikus átlagát számítja ki. +HYPGEOMDIST = HIPERGEOM.ELOSZLÁS ## A hipergeometriai eloszlás értékét számítja ki. +INTERCEPT = METSZ ## A regressziós egyenes y tengellyel való metszéspontját határozza meg. +KURT = CSÚCSOSSÁG ## Egy adathalmaz csúcsosságát számítja ki. +LARGE = NAGY ## Egy adathalmaz k-adik legnagyobb elemét adja eredményül. +LINEST = LIN.ILL ## A legkisebb négyzetek módszerével az adatokra illesztett egyenes paramétereit határozza meg. +LOGEST = LOG.ILL ## Az adatokra illesztett exponenciális görbe paramétereit határozza meg. +LOGINV = INVERZ.LOG.ELOSZLÁS ## A lognormális eloszlás inverzét számítja ki. +LOGNORMDIST = LOG.ELOSZLÁS ## A lognormális eloszlásfüggvény értékét számítja ki. +MAX = MAX ## Az argumentumai között szereplő legnagyobb számot adja meg. +MAXA = MAX2 ## Az argumentumai között szereplő legnagyobb számot adja meg (beleértve a számokat, szöveget és logikai értékeket). +MEDIAN = MEDIÁN ## Adott számhalmaz mediánját számítja ki. +MIN = MIN ## Az argumentumai között szereplő legkisebb számot adja meg. +MINA = MIN2 ## Az argumentumai között szereplő legkisebb számot adja meg, beleértve a számokat, szöveget és logikai értékeket. +MODE = MÓDUSZ ## Egy adathalmazból kiválasztja a leggyakrabban előforduló számot. +NEGBINOMDIST = NEGBINOM.ELOSZL ## A negatív binomiális eloszlás értékét számítja ki. +NORMDIST = NORM.ELOSZL ## A normális eloszlás értékét számítja ki. +NORMINV = INVERZ.NORM ## A normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +NORMSDIST = STNORMELOSZL ## A standard normális eloszlás eloszlásfüggvényének értékét számítja ki. +NORMSINV = INVERZ.STNORM ## A standard normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. +PEARSON = PEARSON ## A Pearson-féle korrelációs együtthatót számítja ki. +PERCENTILE = PERCENTILIS ## Egy tartományban található értékek k-adik percentilisét, azaz százalékosztályát adja eredményül. +PERCENTRANK = SZÁZALÉKRANG ## Egy értéknek egy adathalmazon belül vett százalékos rangját (elhelyezkedését) számítja ki. +PERMUT = VARIÁCIÓK ## Adott számú objektum k-ad osztályú ismétlés nélküli variációinak számát számítja ki. +POISSON = POISSON ## A Poisson-eloszlás értékét számítja ki. +PROB = VALÓSZÍNŰSÉG ## Annak valószínűségét számítja ki, hogy adott értékek két határérték közé esnek. +QUARTILE = KVARTILIS ## Egy adathalmaz kvartilisét (negyedszintjét) számítja ki. +RANK = SORSZÁM ## Kiszámítja, hogy egy szám hányadik egy számsorozatban. +RSQ = RNÉGYZET ## Kiszámítja a Pearson-féle szorzatmomentum korrelációs együtthatójának négyzetét. +SKEW = FERDESÉG ## Egy eloszlás ferdeségét határozza meg. +SLOPE = MEREDEKSÉG ## Egy lineáris regressziós egyenes meredekségét számítja ki. +SMALL = KICSI ## Egy adathalmaz k-adik legkisebb elemét adja meg. +STANDARDIZE = NORMALIZÁLÁS ## Normalizált értéket ad eredményül. +STDEV = SZÓRÁS ## Egy statisztikai sokaság mintájából kiszámítja annak szórását. +STDEVA = SZÓRÁSA ## Egy statisztikai sokaság mintájából kiszámítja annak szórását (beleértve a számokat, szöveget és logikai értékeket). +STDEVP = SZÓRÁSP ## Egy statisztikai sokaság egészéből kiszámítja annak szórását. +STDEVPA = SZÓRÁSPA ## Egy statisztikai sokaság egészéből kiszámítja annak szórását (beleértve számokat, szöveget és logikai értékeket). +STEYX = STHIBAYX ## Egy regresszió esetén az egyes x-értékek alapján meghatározott y-értékek standard hibáját számítja ki. +TDIST = T.ELOSZLÁS ## A Student-féle t-eloszlás értékét számítja ki. +TINV = INVERZ.T ## A Student-féle t-eloszlás inverzét számítja ki. +TREND = TREND ## Lineáris trend értékeit számítja ki. +TRIMMEAN = RÉSZÁTLAG ## Egy adathalmaz középső részének átlagát számítja ki. +TTEST = T.PRÓBA ## A Student-féle t-próbához tartozó valószínűséget számítja ki. +VAR = VAR ## Minta alapján becslést ad a varianciára. +VARA = VARA ## Minta alapján becslést ad a varianciára (beleértve számokat, szöveget és logikai értékeket). +VARP = VARP ## Egy statisztikai sokaság varianciáját számítja ki. +VARPA = VARPA ## Egy statisztikai sokaság varianciáját számítja ki (beleértve számokat, szöveget és logikai értékeket). +WEIBULL = WEIBULL ## A Weibull-féle eloszlás értékét számítja ki. +ZTEST = Z.PRÓBA ## Az egyszélű z-próbával kapott valószínűségértéket számítja ki. + + +## +## Text functions Szövegműveletekhez használható függvények +## +ASC = ASC ## Szöveg teljes szélességű (kétbájtos) latin és katakana karaktereit félszélességű (egybájtos) karakterekké alakítja. +BAHTTEXT = BAHTSZÖVEG ## Számot szöveggé alakít a ß (baht) pénznemformátum használatával. +CHAR = KARAKTER ## A kódszámmal meghatározott karaktert adja eredményül. +CLEAN = TISZTÍT ## A szövegből eltávolítja az összes nem nyomtatható karaktert. +CODE = KÓD ## Karaktersorozat első karakterének numerikus kódját adja eredményül. +CONCATENATE = ÖSSZEFŰZ ## Több szövegelemet egyetlen szöveges elemmé fűz össze. +DOLLAR = FORINT ## Számot pénznem formátumú szöveggé alakít át. +EXACT = AZONOS ## Megvizsgálja, hogy két érték azonos-e. +FIND = SZÖVEG.TALÁL ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). +FINDB = SZÖVEG.TALÁL2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). +FIXED = FIX ## Számot szöveges formátumúra alakít adott számú tizedesjegyre kerekítve. +JIS = JIS ## A félszélességű (egybájtos) latin és a katakana karaktereket teljes szélességű (kétbájtos) karakterekké alakítja. +LEFT = BAL ## Szöveg bal szélső karaktereit adja eredményül. +LEFTB = BAL2 ## Szöveg bal szélső karaktereit adja eredményül. +LEN = HOSSZ ## Szöveg karakterekben mért hosszát adja eredményül. +LENB = HOSSZ2 ## Szöveg karakterekben mért hosszát adja eredményül. +LOWER = KISBETŰ ## Szöveget kisbetűssé alakít át. +MID = KÖZÉP ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. +MIDB = KÖZÉP2 ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. +PHONETIC = PHONETIC ## Szöveg furigana (fonetikus) karaktereit adja vissza. +PROPER = TNÉV ## Szöveg minden szavának kezdőbetűjét nagybetűsre cseréli. +REPLACE = CSERE ## A szövegen belül karaktereket cserél. +REPLACEB = CSERE2 ## A szövegen belül karaktereket cserél. +REPT = SOKSZOR ## Megadott számú alkalommal megismétel egy szövegrészt. +RIGHT = JOBB ## Szövegrész jobb szélső karaktereit adja eredményül. +RIGHTB = JOBB2 ## Szövegrész jobb szélső karaktereit adja eredményül. +SEARCH = SZÖVEG.KERES ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). +SEARCHB = SZÖVEG.KERES2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). +SUBSTITUTE = HELYETTE ## Szövegben adott karaktereket másikra cserél. +T = T ## Argumentumát szöveggé alakítja át. +TEXT = SZÖVEG ## Számértéket alakít át adott számformátumú szöveggé. +TRIM = TRIM ## A szövegből eltávolítja a szóközöket. +UPPER = NAGYBETŰS ## Szöveget nagybetűssé alakít át. +VALUE = ÉRTÉK ## Szöveget számmá alakít át. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config new file mode 100755 index 0000000..6cc013a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULLO! +DIV0 = #DIV/0! +VALUE = #VALORE! +REF = #RIF! +NAME = #NOME? +NUM = #NUM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions new file mode 100755 index 0000000..1901baf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/it/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funzioni di automazione e dei componenti aggiuntivi +## +GETPIVOTDATA = INFO.DATI.TAB.PIVOT ## Restituisce i dati memorizzati in un rapporto di tabella pivot + + +## +## Cube functions Funzioni cubo +## +CUBEKPIMEMBER = MEMBRO.KPI.CUBO ## Restituisce il nome, la proprietà e la misura di un indicatore di prestazioni chiave (KPI) e visualizza il nome e la proprietà nella cella. Un KPI è una misura quantificabile, ad esempio l'utile lordo mensile o il fatturato trimestrale dei dipendenti, utilizzata per il monitoraggio delle prestazioni di un'organizzazione. +CUBEMEMBER = MEMBRO.CUBO ## Restituisce un membro o una tupla in una gerarchia di cubi. Consente di verificare l'esistenza del membro o della tupla nel cubo. +CUBEMEMBERPROPERTY = PROPRIETÀ.MEMBRO.CUBO ## Restituisce il valore di una proprietà di un membro del cubo. Consente di verificare l'esistenza di un nome di membro all'interno del cubo e di restituire la proprietà specificata per tale membro. +CUBERANKEDMEMBER = MEMBRO.CUBO.CON.RANGO ## Restituisce l'n-esimo membro o il membro ordinato di un insieme. Consente di restituire uno o più elementi in un insieme, ad esempio l'agente di vendita migliore o i primi 10 studenti. +CUBESET = SET.CUBO ## Definisce un insieme di tuple o membri calcolati mediante l'invio di un'espressione di insieme al cubo sul server. In questo modo l'insieme viene creato e restituito a Microsoft Office Excel. +CUBESETCOUNT = CONTA.SET.CUBO ## Restituisce il numero di elementi di un insieme. +CUBEVALUE = VALORE.CUBO ## Restituisce un valore aggregato da un cubo. + + +## +## Database functions Funzioni di database +## +DAVERAGE = DB.MEDIA ## Restituisce la media di voci del database selezionate +DCOUNT = DB.CONTA.NUMERI ## Conta le celle di un database contenenti numeri +DCOUNTA = DB.CONTA.VALORI ## Conta le celle non vuote in un database +DGET = DB.VALORI ## Estrae da un database un singolo record che soddisfa i criteri specificati +DMAX = DB.MAX ## Restituisce il valore massimo dalle voci selezionate in un database +DMIN = DB.MIN ## Restituisce il valore minimo dalle voci di un database selezionate +DPRODUCT = DB.PRODOTTO ## Moltiplica i valori in un determinato campo di record che soddisfano i criteri del database +DSTDEV = DB.DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione di voci di un database selezionate +DSTDEVP = DB.DEV.ST.POP ## Calcola la deviazione standard sulla base di tutte le voci di un database selezionate +DSUM = DB.SOMMA ## Aggiunge i numeri nel campo colonna di record del database che soddisfa determinati criteri +DVAR = DB.VAR ## Restituisce una stima della varianza sulla base di un campione da voci di un database selezionate +DVARP = DB.VAR.POP ## Calcola la varianza sulla base di tutte le voci di un database selezionate + + +## +## Date and time functions Funzioni data e ora +## +DATE = DATA ## Restituisce il numero seriale di una determinata data +DATEVALUE = DATA.VALORE ## Converte una data sotto forma di testo in un numero seriale +DAY = GIORNO ## Converte un numero seriale in un giorno del mese +DAYS360 = GIORNO360 ## Calcola il numero di giorni compreso tra due date basandosi su un anno di 360 giorni +EDATE = DATA.MESE ## Restituisce il numero seriale della data che rappresenta il numero di mesi prima o dopo la data di inizio +EOMONTH = FINE.MESE ## Restituisce il numero seriale dell'ultimo giorno del mese, prima o dopo un determinato numero di mesi +HOUR = ORA ## Converte un numero seriale in un'ora +MINUTE = MINUTO ## Converte un numero seriale in un minuto +MONTH = MESE ## Converte un numero seriale in un mese +NETWORKDAYS = GIORNI.LAVORATIVI.TOT ## Restituisce il numero di tutti i giorni lavorativi compresi fra due date +NOW = ADESSO ## Restituisce il numero seriale della data e dell'ora corrente +SECOND = SECONDO ## Converte un numero seriale in un secondo +TIME = ORARIO ## Restituisce il numero seriale di una determinata ora +TIMEVALUE = ORARIO.VALORE ## Converte un orario in forma di testo in un numero seriale +TODAY = OGGI ## Restituisce il numero seriale relativo alla data odierna +WEEKDAY = GIORNO.SETTIMANA ## Converte un numero seriale in un giorno della settimana +WEEKNUM = NUM.SETTIMANA ## Converte un numero seriale in un numero che rappresenta la posizione numerica di una settimana nell'anno +WORKDAY = GIORNO.LAVORATIVO ## Restituisce il numero della data prima o dopo un determinato numero di giorni lavorativi +YEAR = ANNO ## Converte un numero seriale in un anno +YEARFRAC = FRAZIONE.ANNO ## Restituisce la frazione dell'anno che rappresenta il numero dei giorni compresi tra una data_ iniziale e una data_finale + + +## +## Engineering functions Funzioni ingegneristiche +## +BESSELI = BESSEL.I ## Restituisce la funzione di Bessel modificata In(x) +BESSELJ = BESSEL.J ## Restituisce la funzione di Bessel Jn(x) +BESSELK = BESSEL.K ## Restituisce la funzione di Bessel modificata Kn(x) +BESSELY = BESSEL.Y ## Restituisce la funzione di Bessel Yn(x) +BIN2DEC = BINARIO.DECIMALE ## Converte un numero binario in decimale +BIN2HEX = BINARIO.HEX ## Converte un numero binario in esadecimale +BIN2OCT = BINARIO.OCT ## Converte un numero binario in ottale +COMPLEX = COMPLESSO ## Converte i coefficienti reali e immaginari in numeri complessi +CONVERT = CONVERTI ## Converte un numero da un sistema di misura in un altro +DEC2BIN = DECIMALE.BINARIO ## Converte un numero decimale in binario +DEC2HEX = DECIMALE.HEX ## Converte un numero decimale in esadecimale +DEC2OCT = DECIMALE.OCT ## Converte un numero decimale in ottale +DELTA = DELTA ## Verifica se due valori sono uguali +ERF = FUNZ.ERRORE ## Restituisce la funzione di errore +ERFC = FUNZ.ERRORE.COMP ## Restituisce la funzione di errore complementare +GESTEP = SOGLIA ## Verifica se un numero è maggiore del valore di soglia +HEX2BIN = HEX.BINARIO ## Converte un numero esadecimale in binario +HEX2DEC = HEX.DECIMALE ## Converte un numero esadecimale in decimale +HEX2OCT = HEX.OCT ## Converte un numero esadecimale in ottale +IMABS = COMP.MODULO ## Restituisce il valore assoluto (modulo) di un numero complesso +IMAGINARY = COMP.IMMAGINARIO ## Restituisce il coefficiente immaginario di un numero complesso +IMARGUMENT = COMP.ARGOMENTO ## Restituisce l'argomento theta, un angolo espresso in radianti +IMCONJUGATE = COMP.CONIUGATO ## Restituisce il complesso coniugato del numero complesso +IMCOS = COMP.COS ## Restituisce il coseno di un numero complesso +IMDIV = COMP.DIV ## Restituisce il quoziente di due numeri complessi +IMEXP = COMP.EXP ## Restituisce il valore esponenziale di un numero complesso +IMLN = COMP.LN ## Restituisce il logaritmo naturale di un numero complesso +IMLOG10 = COMP.LOG10 ## Restituisce il logaritmo in base 10 di un numero complesso +IMLOG2 = COMP.LOG2 ## Restituisce un logaritmo in base 2 di un numero complesso +IMPOWER = COMP.POTENZA ## Restituisce il numero complesso elevato a una potenza intera +IMPRODUCT = COMP.PRODOTTO ## Restituisce il prodotto di numeri complessi compresi tra 2 e 29 +IMREAL = COMP.PARTE.REALE ## Restituisce il coefficiente reale di un numero complesso +IMSIN = COMP.SEN ## Restituisce il seno di un numero complesso +IMSQRT = COMP.RADQ ## Restituisce la radice quadrata di un numero complesso +IMSUB = COMP.DIFF ## Restituisce la differenza fra due numeri complessi +IMSUM = COMP.SOMMA ## Restituisce la somma di numeri complessi +OCT2BIN = OCT.BINARIO ## Converte un numero ottale in binario +OCT2DEC = OCT.DECIMALE ## Converte un numero ottale in decimale +OCT2HEX = OCT.HEX ## Converte un numero ottale in esadecimale + + +## +## Financial functions Funzioni finanziarie +## +ACCRINT = INT.MATURATO.PER ## Restituisce l'interesse maturato di un titolo che paga interessi periodici +ACCRINTM = INT.MATURATO.SCAD ## Restituisce l'interesse maturato di un titolo che paga interessi alla scadenza +AMORDEGRC = AMMORT.DEGR ## Restituisce l'ammortamento per ogni periodo contabile utilizzando un coefficiente di ammortamento +AMORLINC = AMMORT.PER ## Restituisce l'ammortamento per ogni periodo contabile +COUPDAYBS = GIORNI.CED.INIZ.LIQ ## Restituisce il numero dei giorni che vanno dall'inizio del periodo di durata della cedola alla data di liquidazione +COUPDAYS = GIORNI.CED ## Restituisce il numero dei giorni relativi al periodo della cedola che contiene la data di liquidazione +COUPDAYSNC = GIORNI.CED.NUOVA ## Restituisce il numero di giorni che vanno dalla data di liquidazione alla data della cedola successiva +COUPNCD = DATA.CED.SUCC ## Restituisce un numero che rappresenta la data della cedola successiva alla data di liquidazione +COUPNUM = NUM.CED ## Restituisce il numero di cedole pagabili fra la data di liquidazione e la data di scadenza +COUPPCD = DATA.CED.PREC ## Restituisce un numero che rappresenta la data della cedola precedente alla data di liquidazione +CUMIPMT = INT.CUMUL ## Restituisce l'interesse cumulativo pagato fra due periodi +CUMPRINC = CAP.CUM ## Restituisce il capitale cumulativo pagato per estinguere un debito fra due periodi +DB = DB ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a quote fisse decrescenti +DDB = AMMORT ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a doppie quote decrescenti o altri metodi specificati +DISC = TASSO.SCONTO ## Restituisce il tasso di sconto per un titolo +DOLLARDE = VALUTA.DEC ## Converte un prezzo valuta, espresso come frazione, in prezzo valuta, espresso come numero decimale +DOLLARFR = VALUTA.FRAZ ## Converte un prezzo valuta, espresso come numero decimale, in prezzo valuta, espresso come frazione +DURATION = DURATA ## Restituisce la durata annuale di un titolo con i pagamenti di interesse periodico +EFFECT = EFFETTIVO ## Restituisce l'effettivo tasso di interesse annuo +FV = VAL.FUT ## Restituisce il valore futuro di un investimento +FVSCHEDULE = VAL.FUT.CAPITALE ## Restituisce il valore futuro di un capitale iniziale dopo aver applicato una serie di tassi di interesse composti +INTRATE = TASSO.INT ## Restituisce il tasso di interesse per un titolo interamente investito +IPMT = INTERESSI ## Restituisce il valore degli interessi per un investimento relativo a un periodo specifico +IRR = TIR.COST ## Restituisce il tasso di rendimento interno per una serie di flussi di cassa +ISPMT = INTERESSE.RATA ## Calcola l'interesse di un investimento pagato durante un periodo specifico +MDURATION = DURATA.M ## Restituisce la durata Macauley modificata per un titolo con un valore presunto di € 100 +MIRR = TIR.VAR ## Restituisce il tasso di rendimento interno in cui i flussi di cassa positivi e negativi sono finanziati a tassi differenti +NOMINAL = NOMINALE ## Restituisce il tasso di interesse nominale annuale +NPER = NUM.RATE ## Restituisce un numero di periodi relativi a un investimento +NPV = VAN ## Restituisce il valore attuale netto di un investimento basato su una serie di flussi di cassa periodici e sul tasso di sconto +ODDFPRICE = PREZZO.PRIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente il primo periodo di durata irregolare +ODDFYIELD = REND.PRIMO.IRR ## Restituisce il rendimento di un titolo avente il primo periodo di durata irregolare +ODDLPRICE = PREZZO.ULTIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente l'ultimo periodo di durata irregolare +ODDLYIELD = REND.ULTIMO.IRR ## Restituisce il rendimento di un titolo avente l'ultimo periodo di durata irregolare +PMT = RATA ## Restituisce il pagamento periodico di una rendita annua +PPMT = P.RATA ## Restituisce il pagamento sul capitale di un investimento per un dato periodo +PRICE = PREZZO ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga interessi periodici +PRICEDISC = PREZZO.SCONT ## Restituisce il prezzo di un titolo scontato dal valore nominale di € 100 +PRICEMAT = PREZZO.SCAD ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga gli interessi alla scadenza +PV = VA ## Restituisce il valore attuale di un investimento +RATE = TASSO ## Restituisce il tasso di interesse per un periodo di un'annualità +RECEIVED = RICEV.SCAD ## Restituisce l'ammontare ricevuto alla scadenza di un titolo interamente investito +SLN = AMMORT.COST ## Restituisce l'ammortamento a quote costanti di un bene per un singolo periodo +SYD = AMMORT.ANNUO ## Restituisce l'ammortamento a somma degli anni di un bene per un periodo specificato +TBILLEQ = BOT.EQUIV ## Restituisce il rendimento equivalente ad un'obbligazione per un Buono ordinario del Tesoro +TBILLPRICE = BOT.PREZZO ## Restituisce il prezzo di un Buono del Tesoro dal valore nominale di € 100 +TBILLYIELD = BOT.REND ## Restituisce il rendimento di un Buono del Tesoro +VDB = AMMORT.VAR ## Restituisce l'ammortamento di un bene per un periodo specificato o parziale utilizzando il metodo a doppie quote proporzionali ai valori residui +XIRR = TIR.X ## Restituisce il tasso di rendimento interno di un impiego di flussi di cassa +XNPV = VAN.X ## Restituisce il valore attuale netto di un impiego di flussi di cassa non necessariamente periodici +YIELD = REND ## Restituisce il rendimento di un titolo che frutta interessi periodici +YIELDDISC = REND.TITOLI.SCONT ## Restituisce il rendimento annuale di un titolo scontato, ad esempio un Buono del Tesoro +YIELDMAT = REND.SCAD ## Restituisce il rendimento annuo di un titolo che paga interessi alla scadenza + + +## +## Information functions Funzioni relative alle informazioni +## +CELL = CELLA ## Restituisce le informazioni sulla formattazione, la posizione o i contenuti di una cella +ERROR.TYPE = ERRORE.TIPO ## Restituisce un numero che corrisponde a un tipo di errore +INFO = INFO ## Restituisce le informazioni sull'ambiente operativo corrente +ISBLANK = VAL.VUOTO ## Restituisce VERO se il valore è vuoto +ISERR = VAL.ERR ## Restituisce VERO se il valore è un valore di errore qualsiasi tranne #N/D +ISERROR = VAL.ERRORE ## Restituisce VERO se il valore è un valore di errore qualsiasi +ISEVEN = VAL.PARI ## Restituisce VERO se il numero è pari +ISLOGICAL = VAL.LOGICO ## Restituisce VERO se il valore è un valore logico +ISNA = VAL.NON.DISP ## Restituisce VERO se il valore è un valore di errore #N/D +ISNONTEXT = VAL.NON.TESTO ## Restituisce VERO se il valore non è in formato testo +ISNUMBER = VAL.NUMERO ## Restituisce VERO se il valore è un numero +ISODD = VAL.DISPARI ## Restituisce VERO se il numero è dispari +ISREF = VAL.RIF ## Restituisce VERO se il valore è un riferimento +ISTEXT = VAL.TESTO ## Restituisce VERO se il valore è in formato testo +N = NUM ## Restituisce un valore convertito in numero +NA = NON.DISP ## Restituisce il valore di errore #N/D +TYPE = TIPO ## Restituisce un numero che indica il tipo di dati relativi a un valore + + +## +## Logical functions Funzioni logiche +## +AND = E ## Restituisce VERO se tutti gli argomenti sono VERO +FALSE = FALSO ## Restituisce il valore logico FALSO +IF = SE ## Specifica un test logico da eseguire +IFERROR = SE.ERRORE ## Restituisce un valore specificato se una formula fornisce un errore come risultato; in caso contrario, restituisce il risultato della formula +NOT = NON ## Inverte la logica degli argomenti +OR = O ## Restituisce VERO se un argomento qualsiasi è VERO +TRUE = VERO ## Restituisce il valore logico VERO + + +## +## Lookup and reference functions Funzioni di ricerca e di riferimento +## +ADDRESS = INDIRIZZO ## Restituisce un riferimento come testo in una singola cella di un foglio di lavoro +AREAS = AREE ## Restituisce il numero di aree in un riferimento +CHOOSE = SCEGLI ## Sceglie un valore da un elenco di valori +COLUMN = RIF.COLONNA ## Restituisce il numero di colonna di un riferimento +COLUMNS = COLONNE ## Restituisce il numero di colonne in un riferimento +HLOOKUP = CERCA.ORIZZ ## Effettua una ricerca nella riga superiore di una matrice e restituisce il valore della cella specificata +HYPERLINK = COLLEG.IPERTESTUALE ## Crea un collegamento che apre un documento memorizzato in un server di rete, una rete Intranet o Internet +INDEX = INDICE ## Utilizza un indice per scegliere un valore da un riferimento o da una matrice +INDIRECT = INDIRETTO ## Restituisce un riferimento specificato da un valore testo +LOOKUP = CERCA ## Ricerca i valori in un vettore o in una matrice +MATCH = CONFRONTA ## Ricerca i valori in un riferimento o in una matrice +OFFSET = SCARTO ## Restituisce uno scarto di riferimento da un riferimento dato +ROW = RIF.RIGA ## Restituisce il numero di riga di un riferimento +ROWS = RIGHE ## Restituisce il numero delle righe in un riferimento +RTD = DATITEMPOREALE ## Recupera dati in tempo reale da un programma che supporta l'automazione COM (automazione: Metodo per utilizzare gli oggetti di un'applicazione da un'altra applicazione o da un altro strumento di sviluppo. Precedentemente nota come automazione OLE, l'automazione è uno standard del settore e una caratteristica del modello COM (Component Object Model).) +TRANSPOSE = MATR.TRASPOSTA ## Restituisce la trasposizione di una matrice +VLOOKUP = CERCA.VERT ## Effettua una ricerca nella prima colonna di una matrice e si sposta attraverso la riga per restituire il valore di una cella + + +## +## Math and trigonometry functions Funzioni matematiche e trigonometriche +## +ABS = ASS ## Restituisce il valore assoluto di un numero. +ACOS = ARCCOS ## Restituisce l'arcocoseno di un numero +ACOSH = ARCCOSH ## Restituisce l'inverso del coseno iperbolico di un numero +ASIN = ARCSEN ## Restituisce l'arcoseno di un numero +ASINH = ARCSENH ## Restituisce l'inverso del seno iperbolico di un numero +ATAN = ARCTAN ## Restituisce l'arcotangente di un numero +ATAN2 = ARCTAN.2 ## Restituisce l'arcotangente delle coordinate x e y specificate +ATANH = ARCTANH ## Restituisce l'inverso della tangente iperbolica di un numero +CEILING = ARROTONDA.ECCESSO ## Arrotonda un numero per eccesso all'intero più vicino o al multiplo più vicino a peso +COMBIN = COMBINAZIONE ## Restituisce il numero di combinazioni possibili per un numero assegnato di elementi +COS = COS ## Restituisce il coseno dell'angolo specificato +COSH = COSH ## Restituisce il coseno iperbolico di un numero +DEGREES = GRADI ## Converte i radianti in gradi +EVEN = PARI ## Arrotonda il valore assoluto di un numero per eccesso al più vicino intero pari +EXP = ESP ## Restituisce il numero e elevato alla potenza di num +FACT = FATTORIALE ## Restituisce il fattoriale di un numero +FACTDOUBLE = FATT.DOPPIO ## Restituisce il fattoriale doppio di un numero +FLOOR = ARROTONDA.DIFETTO ## Arrotonda un numero per difetto al multiplo più vicino a zero +GCD = MCD ## Restituisce il massimo comune divisore +INT = INT ## Arrotonda un numero per difetto al numero intero più vicino +LCM = MCM ## Restituisce il minimo comune multiplo +LN = LN ## Restituisce il logaritmo naturale di un numero +LOG = LOG ## Restituisce il logaritmo di un numero in una specificata base +LOG10 = LOG10 ## Restituisce il logaritmo in base 10 di un numero +MDETERM = MATR.DETERM ## Restituisce il determinante di una matrice +MINVERSE = MATR.INVERSA ## Restituisce l'inverso di una matrice +MMULT = MATR.PRODOTTO ## Restituisce il prodotto di due matrici +MOD = RESTO ## Restituisce il resto della divisione +MROUND = ARROTONDA.MULTIPLO ## Restituisce un numero arrotondato al multiplo desiderato +MULTINOMIAL = MULTINOMIALE ## Restituisce il multinomiale di un insieme di numeri +ODD = DISPARI ## Arrotonda un numero per eccesso al più vicino intero dispari +PI = PI.GRECO ## Restituisce il valore di pi greco +POWER = POTENZA ## Restituisce il risultato di un numero elevato a potenza +PRODUCT = PRODOTTO ## Moltiplica i suoi argomenti +QUOTIENT = QUOZIENTE ## Restituisce la parte intera di una divisione +RADIANS = RADIANTI ## Converte i gradi in radianti +RAND = CASUALE ## Restituisce un numero casuale compreso tra 0 e 1 +RANDBETWEEN = CASUALE.TRA ## Restituisce un numero casuale compreso tra i numeri specificati +ROMAN = ROMANO ## Restituisce il numero come numero romano sotto forma di testo +ROUND = ARROTONDA ## Arrotonda il numero al numero di cifre specificato +ROUNDDOWN = ARROTONDA.PER.DIF ## Arrotonda il valore assoluto di un numero per difetto +ROUNDUP = ARROTONDA.PER.ECC ## Arrotonda il valore assoluto di un numero per eccesso +SERIESSUM = SOMMA.SERIE ## Restituisce la somma di una serie di potenze in base alla formula +SIGN = SEGNO ## Restituisce il segno di un numero +SIN = SEN ## Restituisce il seno di un dato angolo +SINH = SENH ## Restituisce il seno iperbolico di un numero +SQRT = RADQ ## Restituisce una radice quadrata +SQRTPI = RADQ.PI.GRECO ## Restituisce la radice quadrata di un numero (numero * pi greco) +SUBTOTAL = SUBTOTALE ## Restituisce un subtotale in un elenco o in un database +SUM = SOMMA ## Somma i suoi argomenti +SUMIF = SOMMA.SE ## Somma le celle specificate da un dato criterio +SUMIFS = SOMMA.PIÙ.SE ## Somma le celle in un intervallo che soddisfano più criteri +SUMPRODUCT = MATR.SOMMA.PRODOTTO ## Restituisce la somma dei prodotti dei componenti corrispondenti della matrice +SUMSQ = SOMMA.Q ## Restituisce la somma dei quadrati degli argomenti +SUMX2MY2 = SOMMA.DIFF.Q ## Restituisce la somma della differenza dei quadrati dei corrispondenti elementi in due matrici +SUMX2PY2 = SOMMA.SOMMA.Q ## Restituisce la somma della somma dei quadrati dei corrispondenti elementi in due matrici +SUMXMY2 = SOMMA.Q.DIFF ## Restituisce la somma dei quadrati delle differenze dei corrispondenti elementi in due matrici +TAN = TAN ## Restituisce la tangente di un numero +TANH = TANH ## Restituisce la tangente iperbolica di un numero +TRUNC = TRONCA ## Tronca la parte decimale di un numero + + +## +## Statistical functions Funzioni statistiche +## +AVEDEV = MEDIA.DEV ## Restituisce la media delle deviazioni assolute delle coordinate rispetto alla loro media +AVERAGE = MEDIA ## Restituisce la media degli argomenti +AVERAGEA = MEDIA.VALORI ## Restituisce la media degli argomenti, inclusi i numeri, il testo e i valori logici +AVERAGEIF = MEDIA.SE ## Restituisce la media aritmetica di tutte le celle in un intervallo che soddisfano un determinato criterio +AVERAGEIFS = MEDIA.PIÙ.SE ## Restituisce la media aritmetica di tutte le celle che soddisfano più criteri +BETADIST = DISTRIB.BETA ## Restituisce la funzione di distribuzione cumulativa beta +BETAINV = INV.BETA ## Restituisce l'inverso della funzione di distribuzione cumulativa per una distribuzione beta specificata +BINOMDIST = DISTRIB.BINOM ## Restituisce la distribuzione binomiale per il termine individuale +CHIDIST = DISTRIB.CHI ## Restituisce la probabilità a una coda per la distribuzione del chi quadrato +CHIINV = INV.CHI ## Restituisce l'inverso della probabilità ad una coda per la distribuzione del chi quadrato +CHITEST = TEST.CHI ## Restituisce il test per l'indipendenza +CONFIDENCE = CONFIDENZA ## Restituisce l'intervallo di confidenza per una popolazione +CORREL = CORRELAZIONE ## Restituisce il coefficiente di correlazione tra due insiemi di dati +COUNT = CONTA.NUMERI ## Conta la quantità di numeri nell'elenco di argomenti +COUNTA = CONTA.VALORI ## Conta il numero di valori nell'elenco di argomenti +COUNTBLANK = CONTA.VUOTE ## Conta il numero di celle vuote all'interno di un intervallo +COUNTIF = CONTA.SE ## Conta il numero di celle all'interno di un intervallo che soddisfa i criteri specificati +COUNTIFS = CONTA.PIÙ.SE ## Conta il numero di celle in un intervallo che soddisfano più criteri. +COVAR = COVARIANZA ## Calcola la covarianza, la media dei prodotti delle deviazioni accoppiate +CRITBINOM = CRIT.BINOM ## Restituisce il più piccolo valore per il quale la distribuzione cumulativa binomiale risulta maggiore o uguale ad un valore di criterio +DEVSQ = DEV.Q ## Restituisce la somma dei quadrati delle deviazioni +EXPONDIST = DISTRIB.EXP ## Restituisce la distribuzione esponenziale +FDIST = DISTRIB.F ## Restituisce la distribuzione di probabilità F +FINV = INV.F ## Restituisce l'inverso della distribuzione della probabilità F +FISHER = FISHER ## Restituisce la trasformazione di Fisher +FISHERINV = INV.FISHER ## Restituisce l'inverso della trasformazione di Fisher +FORECAST = PREVISIONE ## Restituisce i valori lungo una tendenza lineare +FREQUENCY = FREQUENZA ## Restituisce la distribuzione di frequenza come matrice verticale +FTEST = TEST.F ## Restituisce il risultato di un test F +GAMMADIST = DISTRIB.GAMMA ## Restituisce la distribuzione gamma +GAMMAINV = INV.GAMMA ## Restituisce l'inverso della distribuzione cumulativa gamma +GAMMALN = LN.GAMMA ## Restituisce il logaritmo naturale della funzione gamma, G(x) +GEOMEAN = MEDIA.GEOMETRICA ## Restituisce la media geometrica +GROWTH = CRESCITA ## Restituisce i valori lungo una linea di tendenza esponenziale +HARMEAN = MEDIA.ARMONICA ## Restituisce la media armonica +HYPGEOMDIST = DISTRIB.IPERGEOM ## Restituisce la distribuzione ipergeometrica +INTERCEPT = INTERCETTA ## Restituisce l'intercetta della retta di regressione lineare +KURT = CURTOSI ## Restituisce la curtosi di un insieme di dati +LARGE = GRANDE ## Restituisce il k-esimo valore più grande in un insieme di dati +LINEST = REGR.LIN ## Restituisce i parametri di una tendenza lineare +LOGEST = REGR.LOG ## Restituisce i parametri di una linea di tendenza esponenziale +LOGINV = INV.LOGNORM ## Restituisce l'inverso di una distribuzione lognormale +LOGNORMDIST = DISTRIB.LOGNORM ## Restituisce la distribuzione lognormale cumulativa +MAX = MAX ## Restituisce il valore massimo in un elenco di argomenti +MAXA = MAX.VALORI ## Restituisce il valore massimo in un elenco di argomenti, inclusi i numeri, il testo e i valori logici +MEDIAN = MEDIANA ## Restituisce la mediana dei numeri specificati +MIN = MIN ## Restituisce il valore minimo in un elenco di argomenti +MINA = MIN.VALORI ## Restituisce il più piccolo valore in un elenco di argomenti, inclusi i numeri, il testo e i valori logici +MODE = MODA ## Restituisce il valore più comune in un insieme di dati +NEGBINOMDIST = DISTRIB.BINOM.NEG ## Restituisce la distribuzione binomiale negativa +NORMDIST = DISTRIB.NORM ## Restituisce la distribuzione cumulativa normale +NORMINV = INV.NORM ## Restituisce l'inverso della distribuzione cumulativa normale standard +NORMSDIST = DISTRIB.NORM.ST ## Restituisce la distribuzione cumulativa normale standard +NORMSINV = INV.NORM.ST ## Restituisce l'inverso della distribuzione cumulativa normale +PEARSON = PEARSON ## Restituisce il coefficiente del momento di correlazione di Pearson +PERCENTILE = PERCENTILE ## Restituisce il k-esimo dato percentile di valori in un intervallo +PERCENTRANK = PERCENT.RANGO ## Restituisce il rango di un valore in un insieme di dati come percentuale +PERMUT = PERMUTAZIONE ## Restituisce il numero delle permutazioni per un determinato numero di oggetti +POISSON = POISSON ## Restituisce la distribuzione di Poisson +PROB = PROBABILITÀ ## Calcola la probabilità che dei valori in un intervallo siano compresi tra due limiti +QUARTILE = QUARTILE ## Restituisce il quartile di un insieme di dati +RANK = RANGO ## Restituisce il rango di un numero in un elenco di numeri +RSQ = RQ ## Restituisce la radice quadrata del coefficiente di momento di correlazione di Pearson +SKEW = ASIMMETRIA ## Restituisce il grado di asimmetria di una distribuzione +SLOPE = PENDENZA ## Restituisce la pendenza di una retta di regressione lineare +SMALL = PICCOLO ## Restituisce il k-esimo valore più piccolo in un insieme di dati +STANDARDIZE = NORMALIZZA ## Restituisce un valore normalizzato +STDEV = DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione +STDEVA = DEV.ST.VALORI ## Restituisce una stima della deviazione standard sulla base di un campione, inclusi i numeri, il testo e i valori logici +STDEVP = DEV.ST.POP ## Calcola la deviazione standard sulla base di un'intera popolazione +STDEVPA = DEV.ST.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici +STEYX = ERR.STD.YX ## Restituisce l'errore standard del valore previsto per y per ogni valore x nella regressione +TDIST = DISTRIB.T ## Restituisce la distribuzione t di Student +TINV = INV.T ## Restituisce l'inversa della distribuzione t di Student +TREND = TENDENZA ## Restituisce i valori lungo una linea di tendenza lineare +TRIMMEAN = MEDIA.TRONCATA ## Restituisce la media della parte interna di un insieme di dati +TTEST = TEST.T ## Restituisce la probabilità associata ad un test t di Student +VAR = VAR ## Stima la varianza sulla base di un campione +VARA = VAR.VALORI ## Stima la varianza sulla base di un campione, inclusi i numeri, il testo e i valori logici +VARP = VAR.POP ## Calcola la varianza sulla base dell'intera popolazione +VARPA = VAR.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici +WEIBULL = WEIBULL ## Restituisce la distribuzione di Weibull +ZTEST = TEST.Z ## Restituisce il valore di probabilità a una coda per un test z + + +## +## Text functions Funzioni di testo +## +ASC = ASC ## Modifica le lettere inglesi o il katakana a doppio byte all'interno di una stringa di caratteri in caratteri a singolo byte +BAHTTEXT = BAHTTESTO ## Converte un numero in testo, utilizzando il formato valuta ß (baht) +CHAR = CODICE.CARATT ## Restituisce il carattere specificato dal numero di codice +CLEAN = LIBERA ## Elimina dal testo tutti i caratteri che non è possibile stampare +CODE = CODICE ## Restituisce il codice numerico del primo carattere di una stringa di testo +CONCATENATE = CONCATENA ## Unisce diversi elementi di testo in un unico elemento di testo +DOLLAR = VALUTA ## Converte un numero in testo, utilizzando il formato valuta € (euro) +EXACT = IDENTICO ## Verifica se due valori di testo sono uguali +FIND = TROVA ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) +FINDB = TROVA.B ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) +FIXED = FISSO ## Formatta un numero come testo con un numero fisso di decimali +JIS = ORDINAMENTO.JIS ## Modifica le lettere inglesi o i caratteri katakana a byte singolo all'interno di una stringa di caratteri in caratteri a byte doppio. +LEFT = SINISTRA ## Restituisce il carattere più a sinistra di un valore di testo +LEFTB = SINISTRA.B ## Restituisce il carattere più a sinistra di un valore di testo +LEN = LUNGHEZZA ## Restituisce il numero di caratteri di una stringa di testo +LENB = LUNB ## Restituisce il numero di caratteri di una stringa di testo +LOWER = MINUSC ## Converte il testo in lettere minuscole +MID = MEDIA ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata +MIDB = MEDIA.B ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata +PHONETIC = FURIGANA ## Estrae i caratteri fonetici (furigana) da una stringa di testo. +PROPER = MAIUSC.INIZ ## Converte in maiuscolo la prima lettera di ogni parola di un valore di testo +REPLACE = RIMPIAZZA ## Sostituisce i caratteri all'interno di un testo +REPLACEB = SOSTITUISCI.B ## Sostituisce i caratteri all'interno di un testo +REPT = RIPETI ## Ripete un testo per un dato numero di volte +RIGHT = DESTRA ## Restituisce il carattere più a destra di un valore di testo +RIGHTB = DESTRA.B ## Restituisce il carattere più a destra di un valore di testo +SEARCH = RICERCA ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) +SEARCHB = CERCA.B ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) +SUBSTITUTE = SOSTITUISCI ## Sostituisce il nuovo testo al testo contenuto in una stringa +T = T ## Converte gli argomenti in testo +TEXT = TESTO ## Formatta un numero e lo converte in testo +TRIM = ANNULLA.SPAZI ## Elimina gli spazi dal testo +UPPER = MAIUSC ## Converte il testo in lettere maiuscole +VALUE = VALORE ## Converte un argomento di testo in numero diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config new file mode 100755 index 0000000..8376022 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #LEEG! +DIV0 = #DEEL/0! +VALUE = #WAARDE! +REF = #VERW! +NAME = #NAAM? +NUM = #GETAL! +NA = #N/B diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions new file mode 100755 index 0000000..2518f42 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nl/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Automatiseringsfuncties en functies in invoegtoepassingen +## +GETPIVOTDATA = DRAAITABEL.OPHALEN ## Geeft gegevens uit een draaitabelrapport als resultaat + + +## +## Cube functions Kubusfuncties +## +CUBEKPIMEMBER = KUBUSKPILID ## Retourneert de naam, eigenschap en waarde van een KPI (prestatie-indicator) en geeft de naam en de eigenschap in de cel weer. Een KPI is een meetbare waarde, zoals de maandelijkse brutowinst of de omzet per kwartaal per werknemer, die wordt gebruikt om de prestaties van een organisatie te bewaken +CUBEMEMBER = KUBUSLID ## Retourneert een lid of tupel in een kubushiërarchie. Wordt gebruikt om te controleren of het lid of de tupel in de kubus aanwezig is +CUBEMEMBERPROPERTY = KUBUSLIDEIGENSCHAP ## Retourneert de waarde van een lideigenschap in de kubus. Wordt gebruikt om te controleren of de lidnaam in de kubus bestaat en retourneert de opgegeven eigenschap voor dit lid +CUBERANKEDMEMBER = KUBUSGERANGCHIKTLID ## Retourneert het zoveelste, gerangschikte lid in een set. Wordt gebruikt om een of meer elementen in een set te retourneren, zoals de tien beste verkopers of de tien beste studenten +CUBESET = KUBUSSET ## Definieert een berekende set leden of tupels door een ingestelde expressie naar de kubus op de server te sturen, alwaar de set wordt gemaakt en vervolgens wordt geretourneerd naar Microsoft Office Excel +CUBESETCOUNT = KUBUSSETAANTAL ## Retourneert het aantal onderdelen in een set +CUBEVALUE = KUBUSWAARDE ## Retourneert een samengestelde waarde van een kubus + + +## +## Database functions Databasefuncties +## +DAVERAGE = DBGEMIDDELDE ## Berekent de gemiddelde waarde in geselecteerde databasegegevens +DCOUNT = DBAANTAL ## Telt de cellen met getallen in een database +DCOUNTA = DBAANTALC ## Telt de niet-lege cellen in een database +DGET = DBLEZEN ## Retourneert één record dat voldoet aan de opgegeven criteria uit een database +DMAX = DBMAX ## Retourneert de maximumwaarde in de geselecteerde databasegegevens +DMIN = DBMIN ## Retourneert de minimumwaarde in de geselecteerde databasegegevens +DPRODUCT = DBPRODUCT ## Vermenigvuldigt de waarden in een bepaald veld van de records die voldoen aan de criteria in een database +DSTDEV = DBSTDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef uit geselecteerde databasegegevens +DSTDEVP = DBSTDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie van geselecteerde databasegegevens +DSUM = DBSOM ## Telt de getallen uit een kolom records in de database op die voldoen aan de criteria +DVAR = DBVAR ## Maakt een schatting van de variantie op basis van een steekproef uit geselecteerde databasegegevens +DVARP = DBVARP ## Berekent de variantie op basis van de volledige populatie van geselecteerde databasegegevens + + +## +## Date and time functions Datum- en tijdfuncties +## +DATE = DATUM ## Geeft als resultaat het seriële getal van een opgegeven datum +DATEVALUE = DATUMWAARDE ## Converteert een datum in de vorm van tekst naar een serieel getal +DAY = DAG ## Converteert een serieel getal naar een dag van de maand +DAYS360 = DAGEN360 ## Berekent het aantal dagen tussen twee datums op basis van een jaar met 360 dagen +EDATE = ZELFDE.DAG ## Geeft als resultaat het seriële getal van een datum die het opgegeven aantal maanden voor of na de begindatum ligt +EOMONTH = LAATSTE.DAG ## Geeft als resultaat het seriële getal van de laatste dag van de maand voor of na het opgegeven aantal maanden +HOUR = UUR ## Converteert een serieel getal naar uren +MINUTE = MINUUT ## Converteert een serieel naar getal minuten +MONTH = MAAND ## Converteert een serieel getal naar een maand +NETWORKDAYS = NETTO.WERKDAGEN ## Geeft als resultaat het aantal hele werkdagen tussen twee datums +NOW = NU ## Geeft als resultaat het seriële getal van de huidige datum en tijd +SECOND = SECONDE ## Converteert een serieel getal naar seconden +TIME = TIJD ## Geeft als resultaat het seriële getal van een bepaald tijdstip +TIMEVALUE = TIJDWAARDE ## Converteert de tijd in de vorm van tekst naar een serieel getal +TODAY = VANDAAG ## Geeft als resultaat het seriële getal van de huidige datum +WEEKDAY = WEEKDAG ## Converteert een serieel getal naar een weekdag +WEEKNUM = WEEKNUMMER ## Converteert een serieel getal naar een weeknummer +WORKDAY = WERKDAG ## Geeft als resultaat het seriële getal van de datum voor of na een bepaald aantal werkdagen +YEAR = JAAR ## Converteert een serieel getal naar een jaar +YEARFRAC = JAAR.DEEL ## Geeft als resultaat het gedeelte van het jaar, uitgedrukt in het aantal hele dagen tussen begindatum en einddatum + + +## +## Engineering functions Technische functies +## +BESSELI = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie In(x) +BESSELJ = BESSEL.J ## Geeft als resultaat de Bessel-functie Jn(x) +BESSELK = BESSEL.K ## Geeft als resultaat de gewijzigde Bessel-functie Kn(x) +BESSELY = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie Yn(x) +BIN2DEC = BIN.N.DEC ## Converteert een binair getal naar een decimaal getal +BIN2HEX = BIN.N.HEX ## Converteert een binair getal naar een hexadecimaal getal +BIN2OCT = BIN.N.OCT ## Converteert een binair getal naar een octaal getal +COMPLEX = COMPLEX ## Converteert reële en imaginaire coëfficiënten naar een complex getal +CONVERT = CONVERTEREN ## Converteert een getal in de ene maateenheid naar een getal in een andere maateenheid +DEC2BIN = DEC.N.BIN ## Converteert een decimaal getal naar een binair getal +DEC2HEX = DEC.N.HEX ## Converteert een decimaal getal naar een hexadecimaal getal +DEC2OCT = DEC.N.OCT ## Converteert een decimaal getal naar een octaal getal +DELTA = DELTA ## Test of twee waarden gelijk zijn +ERF = FOUTFUNCTIE ## Geeft als resultaat de foutfunctie +ERFC = FOUT.COMPLEMENT ## Geeft als resultaat de complementaire foutfunctie +GESTEP = GROTER.DAN ## Test of een getal groter is dan de drempelwaarde +HEX2BIN = HEX.N.BIN ## Converteert een hexadecimaal getal naar een binair getal +HEX2DEC = HEX.N.DEC ## Converteert een hexadecimaal getal naar een decimaal getal +HEX2OCT = HEX.N.OCT ## Converteert een hexadecimaal getal naar een octaal getal +IMABS = C.ABS ## Geeft als resultaat de absolute waarde (modulus) van een complex getal +IMAGINARY = C.IM.DEEL ## Geeft als resultaat de imaginaire coëfficiënt van een complex getal +IMARGUMENT = C.ARGUMENT ## Geeft als resultaat het argument thèta, een hoek uitgedrukt in radialen +IMCONJUGATE = C.TOEGEVOEGD ## Geeft als resultaat het complexe toegevoegde getal van een complex getal +IMCOS = C.COS ## Geeft als resultaat de cosinus van een complex getal +IMDIV = C.QUOTIENT ## Geeft als resultaat het quotiënt van twee complexe getallen +IMEXP = C.EXP ## Geeft als resultaat de exponent van een complex getal +IMLN = C.LN ## Geeft als resultaat de natuurlijke logaritme van een complex getal +IMLOG10 = C.LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een complex getal +IMLOG2 = C.LOG2 ## Geeft als resultaat de logaritme met grondtal 2 van een complex getal +IMPOWER = C.MACHT ## Geeft als resultaat een complex getal dat is verheven tot de macht van een geheel getal +IMPRODUCT = C.PRODUCT ## Geeft als resultaat het product van complexe getallen +IMREAL = C.REEEL.DEEL ## Geeft als resultaat de reële coëfficiënt van een complex getal +IMSIN = C.SIN ## Geeft als resultaat de sinus van een complex getal +IMSQRT = C.WORTEL ## Geeft als resultaat de vierkantswortel van een complex getal +IMSUB = C.VERSCHIL ## Geeft als resultaat het verschil tussen twee complexe getallen +IMSUM = C.SOM ## Geeft als resultaat de som van complexe getallen +OCT2BIN = OCT.N.BIN ## Converteert een octaal getal naar een binair getal +OCT2DEC = OCT.N.DEC ## Converteert een octaal getal naar een decimaal getal +OCT2HEX = OCT.N.HEX ## Converteert een octaal getal naar een hexadecimaal getal + + +## +## Financial functions Financiële functies +## +ACCRINT = SAMENG.RENTE ## Berekent de opgelopen rente voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +ACCRINTM = SAMENG.RENTE.V ## Berekent de opgelopen rente voor een waardepapier waarvan de rente op de vervaldatum wordt uitgekeerd +AMORDEGRC = AMORDEGRC ## Geeft als resultaat de afschrijving voor elke boekingsperiode door een afschrijvingscoëfficiënt toe te passen +AMORLINC = AMORLINC ## Berekent de afschrijving voor elke boekingsperiode +COUPDAYBS = COUP.DAGEN.BB ## Berekent het aantal dagen vanaf het begin van de coupontermijn tot de stortingsdatum +COUPDAYS = COUP.DAGEN ## Geeft als resultaat het aantal dagen in de coupontermijn waarin de stortingsdatum valt +COUPDAYSNC = COUP.DAGEN.VV ## Geeft als resultaat het aantal dagen vanaf de stortingsdatum tot de volgende couponvervaldatum +COUPNCD = COUP.DATUM.NB ## Geeft als resultaat de volgende coupondatum na de stortingsdatum +COUPNUM = COUP.AANTAL ## Geeft als resultaat het aantal coupons dat nog moet worden uitbetaald tussen de stortingsdatum en de vervaldatum +COUPPCD = COUP.DATUM.VB ## Geeft als resultaat de vorige couponvervaldatum vóór de stortingsdatum +CUMIPMT = CUM.RENTE ## Geeft als resultaat de cumulatieve rente die tussen twee termijnen is uitgekeerd +CUMPRINC = CUM.HOOFDSOM ## Geeft als resultaat de cumulatieve hoofdsom van een lening die tussen twee termijnen is terugbetaald +DB = DB ## Geeft als resultaat de afschrijving van activa voor een bepaalde periode met behulp van de 'fixed declining balance'-methode +DDB = DDB ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'double declining balance'-methode of een andere methode die u opgeeft +DISC = DISCONTO ## Geeft als resultaat het discontopercentage voor een waardepapier +DOLLARDE = EURO.DE ## Converteert een prijs in euro's, uitgedrukt in een breuk, naar een prijs in euro's, uitgedrukt in een decimaal getal +DOLLARFR = EURO.BR ## Converteert een prijs in euro's, uitgedrukt in een decimaal getal, naar een prijs in euro's, uitgedrukt in een breuk +DURATION = DUUR ## Geeft als resultaat de gewogen gemiddelde looptijd voor een waardepapier met periodieke rentebetalingen +EFFECT = EFFECT.RENTE ## Geeft als resultaat het effectieve jaarlijkse rentepercentage +FV = TW ## Geeft als resultaat de toekomstige waarde van een investering +FVSCHEDULE = TOEK.WAARDE2 ## Geeft als resultaat de toekomstige waarde van een bepaalde hoofdsom na het toepassen van een reeks samengestelde rentepercentages +INTRATE = RENTEPERCENTAGE ## Geeft als resultaat het rentepercentage voor een volgestort waardepapier +IPMT = IBET ## Geeft als resultaat de te betalen rente voor een investering over een bepaalde termijn +IRR = IR ## Geeft als resultaat de interne rentabiliteit voor een reeks cashflows +ISPMT = ISBET ## Geeft als resultaat de rente die is betaald tijdens een bepaalde termijn van een investering +MDURATION = AANG.DUUR ## Geeft als resultaat de aangepaste Macauley-looptijd voor een waardepapier, aangenomen dat de nominale waarde € 100 bedraagt +MIRR = GIR ## Geeft als resultaat de interne rentabiliteit voor een serie cashflows, waarbij voor betalingen een ander rentepercentage geldt dan voor inkomsten +NOMINAL = NOMINALE.RENTE ## Geeft als resultaat het nominale jaarlijkse rentepercentage +NPER = NPER ## Geeft als resultaat het aantal termijnen van een investering +NPV = NHW ## Geeft als resultaat de netto huidige waarde van een investering op basis van een reeks periodieke cashflows en een discontopercentage +ODDFPRICE = AFW.ET.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende eerste termijn +ODDFYIELD = AFW.ET.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende eerste termijn +ODDLPRICE = AFW.LT.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende laatste termijn +ODDLYIELD = AFW.LT.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende laatste termijn +PMT = BET ## Geeft als resultaat de periodieke betaling voor een annuïteit +PPMT = PBET ## Geeft als resultaat de afbetaling op de hoofdsom voor een bepaalde termijn +PRICE = PRIJS.NOM ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +PRICEDISC = PRIJS.DISCONTO ## Geeft als resultaat de prijs per € 100 nominale waarde voor een verdisconteerd waardepapier +PRICEMAT = PRIJS.VERVALDAG ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum +PV = HW ## Geeft als resultaat de huidige waarde van een investering +RATE = RENTE ## Geeft als resultaat het periodieke rentepercentage voor een annuïteit +RECEIVED = OPBRENGST ## Geeft als resultaat het bedrag dat op de vervaldatum wordt uitgekeerd voor een volgestort waardepapier +SLN = LIN.AFSCHR ## Geeft als resultaat de lineaire afschrijving van activa over één termijn +SYD = SYD ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'Sum-Of-Years-Digits'-methode +TBILLEQ = SCHATK.OBL ## Geeft als resultaat het rendement op schatkistpapier, dat op dezelfde manier wordt berekend als het rendement op obligaties +TBILLPRICE = SCHATK.PRIJS ## Bepaalt de prijs per € 100 nominale waarde voor schatkistpapier +TBILLYIELD = SCHATK.REND ## Berekent het rendement voor schatkistpapier +VDB = VDB ## Geeft als resultaat de afschrijving van activa over een gehele of gedeeltelijke termijn met behulp van de 'declining balance'-methode +XIRR = IR.SCHEMA ## Berekent de interne rentabiliteit voor een betalingsschema van cashflows +XNPV = NHW2 ## Berekent de huidige nettowaarde voor een betalingsschema van cashflows +YIELD = RENDEMENT ## Geeft als resultaat het rendement voor een waardepapier waarvan de rente periodiek wordt uitgekeerd +YIELDDISC = REND.DISCONTO ## Geeft als resultaat het jaarlijkse rendement voor een verdisconteerd waardepapier, bijvoorbeeld schatkistpapier +YIELDMAT = REND.VERVAL ## Geeft als resultaat het jaarlijkse rendement voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum + + +## +## Information functions Informatiefuncties +## +CELL = CEL ## Geeft als resultaat informatie over de opmaak, locatie of inhoud van een cel +ERROR.TYPE = TYPE.FOUT ## Geeft als resultaat een getal dat overeenkomt met een van de foutwaarden van Microsoft Excel +INFO = INFO ## Geeft als resultaat informatie over de huidige besturingsomgeving +ISBLANK = ISLEEG ## Geeft als resultaat WAAR als de waarde leeg is +ISERR = ISFOUT2 ## Geeft als resultaat WAAR als de waarde een foutwaarde is, met uitzondering van #N/B +ISERROR = ISFOUT ## Geeft als resultaat WAAR als de waarde een foutwaarde is +ISEVEN = IS.EVEN ## Geeft als resultaat WAAR als het getal even is +ISLOGICAL = ISLOGISCH ## Geeft als resultaat WAAR als de waarde een logische waarde is +ISNA = ISNB ## Geeft als resultaat WAAR als de waarde de foutwaarde #N/B is +ISNONTEXT = ISGEENTEKST ## Geeft als resultaat WAAR als de waarde geen tekst is +ISNUMBER = ISGETAL ## Geeft als resultaat WAAR als de waarde een getal is +ISODD = IS.ONEVEN ## Geeft als resultaat WAAR als het getal oneven is +ISREF = ISVERWIJZING ## Geeft als resultaat WAAR als de waarde een verwijzing is +ISTEXT = ISTEKST ## Geeft als resultaat WAAR als de waarde tekst is +N = N ## Geeft als resultaat een waarde die is geconverteerd naar een getal +NA = NB ## Geeft als resultaat de foutwaarde #N/B +TYPE = TYPE ## Geeft als resultaat een getal dat het gegevenstype van een waarde aangeeft + + +## +## Logical functions Logische functies +## +AND = EN ## Geeft als resultaat WAAR als alle argumenten WAAR zijn +FALSE = ONWAAR ## Geeft als resultaat de logische waarde ONWAAR +IF = ALS ## Geeft een logische test aan +IFERROR = ALS.FOUT ## Retourneert een waarde die u opgeeft als een formule een fout oplevert, anders wordt het resultaat van de formule geretourneerd +NOT = NIET ## Keert de logische waarde van het argument om +OR = OF ## Geeft als resultaat WAAR als minimaal een van de argumenten WAAR is +TRUE = WAAR ## Geeft als resultaat de logische waarde WAAR + + +## +## Lookup and reference functions Zoek- en verwijzingsfuncties +## +ADDRESS = ADRES ## Geeft als resultaat een verwijzing, in de vorm van tekst, naar één bepaalde cel in een werkblad +AREAS = BEREIKEN ## Geeft als resultaat het aantal bereiken in een verwijzing +CHOOSE = KIEZEN ## Kiest een waarde uit een lijst met waarden +COLUMN = KOLOM ## Geeft als resultaat het kolomnummer van een verwijzing +COLUMNS = KOLOMMEN ## Geeft als resultaat het aantal kolommen in een verwijzing +HLOOKUP = HORIZ.ZOEKEN ## Zoekt in de bovenste rij van een matrix naar een bepaalde waarde en geeft als resultaat de gevonden waarde in de opgegeven cel +HYPERLINK = HYPERLINK ## Maakt een snelkoppeling of een sprong waarmee een document wordt geopend dat is opgeslagen op een netwerkserver, een intranet of op internet +INDEX = INDEX ## Kiest met een index een waarde uit een verwijzing of een matrix +INDIRECT = INDIRECT ## Geeft als resultaat een verwijzing die wordt aangegeven met een tekstwaarde +LOOKUP = ZOEKEN ## Zoekt naar bepaalde waarden in een vector of een matrix +MATCH = VERGELIJKEN ## Zoekt naar bepaalde waarden in een verwijzing of een matrix +OFFSET = VERSCHUIVING ## Geeft als resultaat een nieuwe verwijzing die is verschoven ten opzichte van een bepaalde verwijzing +ROW = RIJ ## Geeft als resultaat het rijnummer van een verwijzing +ROWS = RIJEN ## Geeft als resultaat het aantal rijen in een verwijzing +RTD = RTG ## Haalt realtimegegevens op uit een programma dat COM-automatisering (automatisering: een methode waarmee de ene toepassing objecten van een andere toepassing of ontwikkelprogramma kan besturen. Automatisering werd vroeger OLE-automatisering genoemd. Automatisering is een industrienorm die deel uitmaakt van het Component Object Model (COM).) ondersteunt +TRANSPOSE = TRANSPONEREN ## Geeft als resultaat de getransponeerde van een matrix +VLOOKUP = VERT.ZOEKEN ## Zoekt in de meest linkse kolom van een matrix naar een bepaalde waarde en geeft als resultaat de waarde in de opgegeven cel + + +## +## Math and trigonometry functions Wiskundige en trigonometrische functies +## +ABS = ABS ## Geeft als resultaat de absolute waarde van een getal +ACOS = BOOGCOS ## Geeft als resultaat de boogcosinus van een getal +ACOSH = BOOGCOSH ## Geeft als resultaat de inverse cosinus hyperbolicus van een getal +ASIN = BOOGSIN ## Geeft als resultaat de boogsinus van een getal +ASINH = BOOGSINH ## Geeft als resultaat de inverse sinus hyperbolicus van een getal +ATAN = BOOGTAN ## Geeft als resultaat de boogtangens van een getal +ATAN2 = BOOGTAN2 ## Geeft als resultaat de boogtangens van de x- en y-coördinaten +ATANH = BOOGTANH ## Geeft als resultaat de inverse tangens hyperbolicus van een getal +CEILING = AFRONDEN.BOVEN ## Rondt de absolute waarde van een getal naar boven af op het dichtstbijzijnde gehele getal of het dichtstbijzijnde significante veelvoud +COMBIN = COMBINATIES ## Geeft als resultaat het aantal combinaties voor een bepaald aantal objecten +COS = COS ## Geeft als resultaat de cosinus van een getal +COSH = COSH ## Geeft als resultaat de cosinus hyperbolicus van een getal +DEGREES = GRADEN ## Converteert radialen naar graden +EVEN = EVEN ## Rondt het getal af op het dichtstbijzijnde gehele even getal +EXP = EXP ## Verheft e tot de macht van een bepaald getal +FACT = FACULTEIT ## Geeft als resultaat de faculteit van een getal +FACTDOUBLE = DUBBELE.FACULTEIT ## Geeft als resultaat de dubbele faculteit van een getal +FLOOR = AFRONDEN.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af +GCD = GGD ## Geeft als resultaat de grootste gemene deler +INT = INTEGER ## Rondt een getal naar beneden af op het dichtstbijzijnde gehele getal +LCM = KGV ## Geeft als resultaat het kleinste gemene veelvoud +LN = LN ## Geeft als resultaat de natuurlijke logaritme van een getal +LOG = LOG ## Geeft als resultaat de logaritme met het opgegeven grondtal van een getal +LOG10 = LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een getal +MDETERM = DETERMINANTMAT ## Geeft als resultaat de determinant van een matrix +MINVERSE = INVERSEMAT ## Geeft als resultaat de inverse van een matrix +MMULT = PRODUCTMAT ## Geeft als resultaat het product van twee matrices +MOD = REST ## Geeft als resultaat het restgetal van een deling +MROUND = AFRONDEN.N.VEELVOUD ## Geeft als resultaat een getal afgerond op het gewenste veelvoud +MULTINOMIAL = MULTINOMIAAL ## Geeft als resultaat de multinomiaalcoëfficiënt van een reeks getallen +ODD = ONEVEN ## Rondt de absolute waarde van het getal naar boven af op het dichtstbijzijnde gehele oneven getal +PI = PI ## Geeft als resultaat de waarde van pi +POWER = MACHT ## Verheft een getal tot een macht +PRODUCT = PRODUCT ## Vermenigvuldigt de argumenten met elkaar +QUOTIENT = QUOTIENT ## Geeft als resultaat de uitkomst van een deling als geheel getal +RADIANS = RADIALEN ## Converteert graden naar radialen +RAND = ASELECT ## Geeft als resultaat een willekeurig getal tussen 0 en 1 +RANDBETWEEN = ASELECTTUSSEN ## Geeft een willekeurig getal tussen de getallen die u hebt opgegeven +ROMAN = ROMEINS ## Converteert een Arabisch getal naar een Romeins getal en geeft het resultaat weer in de vorm van tekst +ROUND = AFRONDEN ## Rondt een getal af op het opgegeven aantal decimalen +ROUNDDOWN = AFRONDEN.NAAR.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af +ROUNDUP = AFRONDEN.NAAR.BOVEN ## Rondt de absolute waarde van een getal naar boven af +SERIESSUM = SOM.MACHTREEKS ## Geeft als resultaat de som van een machtreeks die is gebaseerd op de formule +SIGN = POS.NEG ## Geeft als resultaat het teken van een getal +SIN = SIN ## Geeft als resultaat de sinus van de opgegeven hoek +SINH = SINH ## Geeft als resultaat de sinus hyperbolicus van een getal +SQRT = WORTEL ## Geeft als resultaat de positieve vierkantswortel van een getal +SQRTPI = WORTEL.PI ## Geeft als resultaat de vierkantswortel van (getal * pi) +SUBTOTAL = SUBTOTAAL ## Geeft als resultaat een subtotaal voor een bereik +SUM = SOM ## Telt de argumenten op +SUMIF = SOM.ALS ## Telt de getallen bij elkaar op die voldoen aan een bepaald criterium +SUMIFS = SOMMEN.ALS ## Telt de cellen in een bereik op die aan meerdere criteria voldoen +SUMPRODUCT = SOMPRODUCT ## Geeft als resultaat de som van de producten van de corresponderende matrixelementen +SUMSQ = KWADRATENSOM ## Geeft als resultaat de som van de kwadraten van de argumenten +SUMX2MY2 = SOM.X2MINY2 ## Geeft als resultaat de som van het verschil tussen de kwadraten van corresponderende waarden in twee matrices +SUMX2PY2 = SOM.X2PLUSY2 ## Geeft als resultaat de som van de kwadratensom van corresponderende waarden in twee matrices +SUMXMY2 = SOM.XMINY.2 ## Geeft als resultaat de som van de kwadraten van de verschillen tussen de corresponderende waarden in twee matrices +TAN = TAN ## Geeft als resultaat de tangens van een getal +TANH = TANH ## Geeft als resultaat de tangens hyperbolicus van een getal +TRUNC = GEHEEL ## Kapt een getal af tot een geheel getal + + +## +## Statistical functions Statistische functies +## +AVEDEV = GEM.DEVIATIE ## Geeft als resultaat het gemiddelde van de absolute deviaties van gegevenspunten ten opzichte van hun gemiddelde waarde +AVERAGE = GEMIDDELDE ## Geeft als resultaat het gemiddelde van de argumenten +AVERAGEA = GEMIDDELDEA ## Geeft als resultaat het gemiddelde van de argumenten, inclusief getallen, tekst en logische waarden +AVERAGEIF = GEMIDDELDE.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen in een bereik die voldoen aan de opgegeven criteria +AVERAGEIFS = GEMIDDELDEN.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen die aan meerdere criteria voldoen +BETADIST = BETA.VERD ## Geeft als resultaat de cumulatieve bèta-verdelingsfunctie +BETAINV = BETA.INV ## Geeft als resultaat de inverse van de cumulatieve verdelingsfunctie voor een gegeven bèta-verdeling +BINOMDIST = BINOMIALE.VERD ## Geeft als resultaat de binomiale verdeling +CHIDIST = CHI.KWADRAAT ## Geeft als resultaat de eenzijdige kans van de chi-kwadraatverdeling +CHIINV = CHI.KWADRAAT.INV ## Geeft als resultaat de inverse van een eenzijdige kans van de chi-kwadraatverdeling +CHITEST = CHI.TOETS ## Geeft als resultaat de onafhankelijkheidstoets +CONFIDENCE = BETROUWBAARHEID ## Geeft als resultaat het betrouwbaarheidsinterval van een gemiddelde waarde voor de elementen van een populatie +CORREL = CORRELATIE ## Geeft als resultaat de correlatiecoëfficiënt van twee gegevensverzamelingen +COUNT = AANTAL ## Telt het aantal getallen in de argumentenlijst +COUNTA = AANTALARG ## Telt het aantal waarden in de argumentenlijst +COUNTBLANK = AANTAL.LEGE.CELLEN ## Telt het aantal lege cellen in een bereik +COUNTIF = AANTAL.ALS ## Telt in een bereik het aantal cellen die voldoen aan een bepaald criterium +COUNTIFS = AANTALLEN.ALS ## Telt in een bereik het aantal cellen die voldoen aan meerdere criteria +COVAR = COVARIANTIE ## Geeft als resultaat de covariantie, het gemiddelde van de producten van de gepaarde deviaties +CRITBINOM = CRIT.BINOM ## Geeft als resultaat de kleinste waarde waarvoor de binomiale verdeling kleiner is dan of gelijk is aan het criterium +DEVSQ = DEV.KWAD ## Geeft als resultaat de som van de deviaties in het kwadraat +EXPONDIST = EXPON.VERD ## Geeft als resultaat de exponentiële verdeling +FDIST = F.VERDELING ## Geeft als resultaat de F-verdeling +FINV = F.INVERSE ## Geeft als resultaat de inverse van de F-verdeling +FISHER = FISHER ## Geeft als resultaat de Fisher-transformatie +FISHERINV = FISHER.INV ## Geeft als resultaat de inverse van de Fisher-transformatie +FORECAST = VOORSPELLEN ## Geeft als resultaat een waarde op basis van een lineaire trend +FREQUENCY = FREQUENTIE ## Geeft als resultaat een frequentieverdeling in de vorm van een verticale matrix +FTEST = F.TOETS ## Geeft als resultaat een F-toets +GAMMADIST = GAMMA.VERD ## Geeft als resultaat de gamma-verdeling +GAMMAINV = GAMMA.INV ## Geeft als resultaat de inverse van de cumulatieve gamma-verdeling +GAMMALN = GAMMA.LN ## Geeft als resultaat de natuurlijke logaritme van de gamma-functie, G(x) +GEOMEAN = MEETK.GEM ## Geeft als resultaat het meetkundige gemiddelde +GROWTH = GROEI ## Geeft als resultaat de waarden voor een exponentiële trend +HARMEAN = HARM.GEM ## Geeft als resultaat het harmonische gemiddelde +HYPGEOMDIST = HYPERGEO.VERD ## Geeft als resultaat de hypergeometrische verdeling +INTERCEPT = SNIJPUNT ## Geeft als resultaat het snijpunt van de lineaire regressielijn met de y-as +KURT = KURTOSIS ## Geeft als resultaat de kurtosis van een gegevensverzameling +LARGE = GROOTSTE ## Geeft als resultaat de op k-1 na grootste waarde in een gegevensverzameling +LINEST = LIJNSCH ## Geeft als resultaat de parameters van een lineaire trend +LOGEST = LOGSCH ## Geeft als resultaat de parameters van een exponentiële trend +LOGINV = LOG.NORM.INV ## Geeft als resultaat de inverse van de logaritmische normale verdeling +LOGNORMDIST = LOG.NORM.VERD ## Geeft als resultaat de cumulatieve logaritmische normale verdeling +MAX = MAX ## Geeft als resultaat de maximumwaarde in een lijst met argumenten +MAXA = MAXA ## Geeft als resultaat de maximumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden +MEDIAN = MEDIAAN ## Geeft als resultaat de mediaan van de opgegeven getallen +MIN = MIN ## Geeft als resultaat de minimumwaarde in een lijst met argumenten +MINA = MINA ## Geeft als resultaat de minimumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden +MODE = MODUS ## Geeft als resultaat de meest voorkomende waarde in een gegevensverzameling +NEGBINOMDIST = NEG.BINOM.VERD ## Geeft als resultaat de negatieve binomiaalverdeling +NORMDIST = NORM.VERD ## Geeft als resultaat de cumulatieve normale verdeling +NORMINV = NORM.INV ## Geeft als resultaat de inverse van de cumulatieve standaardnormale verdeling +NORMSDIST = STAND.NORM.VERD ## Geeft als resultaat de cumulatieve standaardnormale verdeling +NORMSINV = STAND.NORM.INV ## Geeft als resultaat de inverse van de cumulatieve normale verdeling +PEARSON = PEARSON ## Geeft als resultaat de correlatiecoëfficiënt van Pearson +PERCENTILE = PERCENTIEL ## Geeft als resultaat het k-de percentiel van waarden in een bereik +PERCENTRANK = PERCENT.RANG ## Geeft als resultaat de positie, in procenten uitgedrukt, van een waarde in de rangorde van een gegevensverzameling +PERMUT = PERMUTATIES ## Geeft als resultaat het aantal permutaties voor een gegeven aantal objecten +POISSON = POISSON ## Geeft als resultaat de Poisson-verdeling +PROB = KANS ## Geeft als resultaat de kans dat waarden zich tussen twee grenzen bevinden +QUARTILE = KWARTIEL ## Geeft als resultaat het kwartiel van een gegevensverzameling +RANK = RANG ## Geeft als resultaat het rangnummer van een getal in een lijst getallen +RSQ = R.KWADRAAT ## Geeft als resultaat het kwadraat van de Pearson-correlatiecoëfficiënt +SKEW = SCHEEFHEID ## Geeft als resultaat de mate van asymmetrie van een verdeling +SLOPE = RICHTING ## Geeft als resultaat de richtingscoëfficiënt van een lineaire regressielijn +SMALL = KLEINSTE ## Geeft als resultaat de op k-1 na kleinste waarde in een gegevensverzameling +STANDARDIZE = NORMALISEREN ## Geeft als resultaat een genormaliseerde waarde +STDEV = STDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef +STDEVA = STDEVA ## Maakt een schatting van de standaarddeviatie op basis van een steekproef, inclusief getallen, tekst en logische waarden +STDEVP = STDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie +STDEVPA = STDEVPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden +STEYX = STAND.FOUT.YX ## Geeft als resultaat de standaardfout in de voorspelde y-waarde voor elke x in een regressie +TDIST = T.VERD ## Geeft als resultaat de Student T-verdeling +TINV = T.INV ## Geeft als resultaat de inverse van de Student T-verdeling +TREND = TREND ## Geeft als resultaat de waarden voor een lineaire trend +TRIMMEAN = GETRIMD.GEM ## Geeft als resultaat het gemiddelde van waarden in een gegevensverzameling +TTEST = T.TOETS ## Geeft als resultaat de kans met behulp van de Student T-toets +VAR = VAR ## Maakt een schatting van de variantie op basis van een steekproef +VARA = VARA ## Maakt een schatting van de variantie op basis van een steekproef, inclusief getallen, tekst en logische waarden +VARP = VARP ## Berekent de variantie op basis van de volledige populatie +VARPA = VARPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden +WEIBULL = WEIBULL ## Geeft als resultaat de Weibull-verdeling +ZTEST = Z.TOETS ## Geeft als resultaat de eenzijdige kanswaarde van een Z-toets + + +## +## Text functions Tekstfuncties +## +ASC = ASC ## Wijzigt Nederlandse letters of katakanatekens over de volle breedte (dubbel-bytetekens) binnen een tekenreeks in tekens over de halve breedte (enkel-bytetekens) +BAHTTEXT = BAHT.TEKST ## Converteert een getal naar tekst met de valutanotatie ß (baht) +CHAR = TEKEN ## Geeft als resultaat het teken dat hoort bij de opgegeven code +CLEAN = WISSEN.CONTROL ## Verwijdert alle niet-afdrukbare tekens uit een tekst +CODE = CODE ## Geeft als resultaat de numerieke code voor het eerste teken in een tekenreeks +CONCATENATE = TEKST.SAMENVOEGEN ## Voegt verschillende tekstfragmenten samen tot één tekstfragment +DOLLAR = EURO ## Converteert een getal naar tekst met de valutanotatie € (euro) +EXACT = GELIJK ## Controleert of twee tekenreeksen identiek zijn +FIND = VIND.ALLES ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +FINDB = VIND.ALLES.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +FIXED = VAST ## Maakt een getal als tekst met een vast aantal decimalen op +JIS = JIS ## Wijzigt Nederlandse letters of katakanatekens over de halve breedte (enkel-bytetekens) binnen een tekenreeks in tekens over de volle breedte (dubbel-bytetekens) +LEFT = LINKS ## Geeft als resultaat de meest linkse tekens in een tekenreeks +LEFTB = LINKSB ## Geeft als resultaat de meest linkse tekens in een tekenreeks +LEN = LENGTE ## Geeft als resultaat het aantal tekens in een tekenreeks +LENB = LENGTEB ## Geeft als resultaat het aantal tekens in een tekenreeks +LOWER = KLEINE.LETTERS ## Zet tekst om in kleine letters +MID = MIDDEN ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft +MIDB = DEELB ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft +PHONETIC = FONETISCH ## Haalt de fonetische tekens (furigana) uit een tekenreeks op +PROPER = BEGINLETTERS ## Zet de eerste letter van elk woord in een tekst om in een hoofdletter +REPLACE = VERVANG ## Vervangt tekens binnen een tekst +REPLACEB = VERVANGENB ## Vervangt tekens binnen een tekst +REPT = HERHALING ## Herhaalt een tekst een aantal malen +RIGHT = RECHTS ## Geeft als resultaat de meest rechtse tekens in een tekenreeks +RIGHTB = RECHTSB ## Geeft als resultaat de meest rechtse tekens in een tekenreeks +SEARCH = VIND.SPEC ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +SEARCHB = VIND.SPEC.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) +SUBSTITUTE = SUBSTITUEREN ## Vervangt oude tekst door nieuwe tekst in een tekenreeks +T = T ## Converteert de argumenten naar tekst +TEXT = TEKST ## Maakt een getal op en converteert het getal naar tekst +TRIM = SPATIES.WISSEN ## Verwijdert de spaties uit een tekst +UPPER = HOOFDLETTERS ## Zet tekst om in hoofdletters +VALUE = WAARDE ## Converteert tekst naar een getal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config new file mode 100755 index 0000000..c7f4152 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULL! +DIV0 = #DIV/0! +VALUE = #VERDI! +REF = #REF! +NAME = #NAVN? +NUM = #NUM! +NA = #I/T diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions new file mode 100755 index 0000000..ab2a379 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funksjonene Tillegg og Automatisering +## +GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data som er lagret i en pivottabellrapport + + +## +## Cube functions Kubefunksjoner +## +CUBEKPIMEMBER = KUBEKPIMEDLEM ## Returnerer navnet, egenskapen og målet for en viktig ytelsesindikator (KPI), og viser navnet og egenskapen i cellen. En KPI er en målbar enhet, for eksempel månedlig bruttoinntjening eller kvartalsvis inntjening per ansatt, og brukes til å overvåke ytelsen i en organisasjon. +CUBEMEMBER = KUBEMEDLEM ## Returnerer et medlem eller en tuppel i et kubehierarki. Brukes til å validere at medlemmet eller tuppelen finnes i kuben. +CUBEMEMBERPROPERTY = KUBEMEDLEMEGENSKAP ## Returnerer verdien til en medlemsegenskap i kuben. Brukes til å validere at et medlemsnavn finnes i kuben, og til å returnere den angitte egenskapen for dette medlemmet. +CUBERANKEDMEMBER = KUBERANGERTMEDLEM ## Returnerer det n-te, eller rangerte, medlemmet i et sett. Brukes til å returnere ett eller flere elementer i et sett, for eksempel de 10 beste studentene. +CUBESET = KUBESETT ## Definerer et beregnet sett av medlemmer eller tuppeler ved å sende et settuttrykk til kuben på serveren, noe som oppretter settet og deretter returnerer dette settet til Microsoft Office Excel. +CUBESETCOUNT = KUBESETTANTALL ## Returnerer antallet elementer i et sett. +CUBEVALUE = KUBEVERDI ## Returnerer en aggregert verdi fra en kube. + + +## +## Database functions Databasefunksjoner +## +DAVERAGE = DGJENNOMSNITT ## Returnerer gjennomsnittet av merkede databaseposter +DCOUNT = DANTALL ## Teller celler som inneholder tall i en database +DCOUNTA = DANTALLA ## Teller celler som ikke er tomme i en database +DGET = DHENT ## Trekker ut fra en database en post som oppfyller angitte vilkår +DMAX = DMAKS ## Returnerer maksimumsverdien fra merkede databaseposter +DMIN = DMIN ## Returnerer minimumsverdien fra merkede databaseposter +DPRODUCT = DPRODUKT ## Multipliserer verdiene i et bestemt felt med poster som oppfyller vilkårene i en database +DSTDEV = DSTDAV ## Estimerer standardavviket basert på et utvalg av merkede databaseposter +DSTDEVP = DSTAVP ## Beregner standardavviket basert på at merkede databaseposter utgjør hele populasjonen +DSUM = DSUMMER ## Legger til tallene i feltkolonnen med poster, i databasen som oppfyller vilkårene +DVAR = DVARIANS ## Estimerer variansen basert på et utvalg av merkede databaseposter +DVARP = DVARIANSP ## Beregner variansen basert på at merkede databaseposter utgjør hele populasjonen + + +## +## Date and time functions Dato- og tidsfunksjoner +## +DATE = DATO ## Returnerer serienummeret som svarer til en bestemt dato +DATEVALUE = DATOVERDI ## Konverterer en dato med tekstformat til et serienummer +DAY = DAG ## Konverterer et serienummer til en dag i måneden +DAYS360 = DAGER360 ## Beregner antall dager mellom to datoer basert på et år med 360 dager +EDATE = DAG.ETTER ## Returnerer serienummeret som svarer til datoen som er det indikerte antall måneder før eller etter startdatoen +EOMONTH = MÅNEDSSLUTT ## Returnerer serienummeret som svarer til siste dag i måneden, før eller etter et angitt antall måneder +HOUR = TIME ## Konverterer et serienummer til en time +MINUTE = MINUTT ## Konverterer et serienummer til et minutt +MONTH = MÅNED ## Konverterer et serienummer til en måned +NETWORKDAYS = NETT.ARBEIDSDAGER ## Returnerer antall hele arbeidsdager mellom to datoer +NOW = NÅ ## Returnerer serienummeret som svarer til gjeldende dato og klokkeslett +SECOND = SEKUND ## Konverterer et serienummer til et sekund +TIME = TID ## Returnerer serienummeret som svarer til et bestemt klokkeslett +TIMEVALUE = TIDSVERDI ## Konverterer et klokkeslett i tekstformat til et serienummer +TODAY = IDAG ## Returnerer serienummeret som svarer til dagens dato +WEEKDAY = UKEDAG ## Konverterer et serienummer til en ukedag +WEEKNUM = UKENR ## Konverterer et serienummer til et tall som representerer hvilket nummer uken har i et år +WORKDAY = ARBEIDSDAG ## Returnerer serienummeret som svarer til datoen før eller etter et angitt antall arbeidsdager +YEAR = ÅR ## Konverterer et serienummer til et år +YEARFRAC = ÅRDEL ## Returnerer brøkdelen for året, som svarer til antall hele dager mellom startdato og sluttdato + + +## +## Engineering functions Tekniske funksjoner +## +BESSELI = BESSELI ## Returnerer den endrede Bessel-funksjonen In(x) +BESSELJ = BESSELJ ## Returnerer Bessel-funksjonen Jn(x) +BESSELK = BESSELK ## Returnerer den endrede Bessel-funksjonen Kn(x) +BESSELY = BESSELY ## Returnerer Bessel-funksjonen Yn(x) +BIN2DEC = BINTILDES ## Konverterer et binært tall til et desimaltall +BIN2HEX = BINTILHEKS ## Konverterer et binært tall til et heksadesimaltall +BIN2OCT = BINTILOKT ## Konverterer et binært tall til et oktaltall +COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koeffisienter til et komplekst tall +CONVERT = KONVERTER ## Konverterer et tall fra ett målsystem til et annet +DEC2BIN = DESTILBIN ## Konverterer et desimaltall til et binærtall +DEC2HEX = DESTILHEKS ## Konverterer et heltall i 10-tallsystemet til et heksadesimalt tall +DEC2OCT = DESTILOKT ## Konverterer et heltall i 10-tallsystemet til et oktaltall +DELTA = DELTA ## Undersøker om to verdier er like +ERF = FEILF ## Returnerer feilfunksjonen +ERFC = FEILFK ## Returnerer den komplementære feilfunksjonen +GESTEP = GRENSEVERDI ## Tester om et tall er større enn en terskelverdi +HEX2BIN = HEKSTILBIN ## Konverterer et heksadesimaltall til et binært tall +HEX2DEC = HEKSTILDES ## Konverterer et heksadesimalt tall til et heltall i 10-tallsystemet +HEX2OCT = HEKSTILOKT ## Konverterer et heksadesimalt tall til et oktaltall +IMABS = IMABS ## Returnerer absoluttverdien (koeffisienten) til et komplekst tall +IMAGINARY = IMAGINÆR ## Returnerer den imaginære koeffisienten til et komplekst tall +IMARGUMENT = IMARGUMENT ## Returnerer argumentet theta, som er en vinkel uttrykt i radianer +IMCONJUGATE = IMKONJUGERT ## Returnerer den komplekse konjugaten til et komplekst tall +IMCOS = IMCOS ## Returnerer cosinus til et komplekst tall +IMDIV = IMDIV ## Returnerer kvotienten til to komplekse tall +IMEXP = IMEKSP ## Returnerer eksponenten til et komplekst tall +IMLN = IMLN ## Returnerer den naturlige logaritmen for et komplekst tall +IMLOG10 = IMLOG10 ## Returnerer logaritmen med grunntall 10 for et komplekst tall +IMLOG2 = IMLOG2 ## Returnerer logaritmen med grunntall 2 for et komplekst tall +IMPOWER = IMOPPHØY ## Returnerer et komplekst tall opphøyd til en heltallspotens +IMPRODUCT = IMPRODUKT ## Returnerer produktet av komplekse tall +IMREAL = IMREELL ## Returnerer den reelle koeffisienten til et komplekst tall +IMSIN = IMSIN ## Returnerer sinus til et komplekst tall +IMSQRT = IMROT ## Returnerer kvadratroten av et komplekst tall +IMSUB = IMSUB ## Returnerer differansen mellom to komplekse tall +IMSUM = IMSUMMER ## Returnerer summen av komplekse tall +OCT2BIN = OKTTILBIN ## Konverterer et oktaltall til et binært tall +OCT2DEC = OKTTILDES ## Konverterer et oktaltall til et desimaltall +OCT2HEX = OKTTILHEKS ## Konverterer et oktaltall til et heksadesimaltall + + +## +## Financial functions Økonomiske funksjoner +## +ACCRINT = PÅLØPT.PERIODISK.RENTE ## Returnerer påløpte renter for et verdipapir som betaler periodisk rente +ACCRINTM = PÅLØPT.FORFALLSRENTE ## Returnerer den påløpte renten for et verdipapir som betaler rente ved forfall +AMORDEGRC = AMORDEGRC ## Returnerer avskrivningen for hver regnskapsperiode ved hjelp av en avskrivingskoeffisient +AMORLINC = AMORLINC ## Returnerer avskrivingen for hver regnskapsperiode +COUPDAYBS = OBLIG.DAGER.FF ## Returnerer antall dager fra begynnelsen av den rentebærende perioden til innløsningsdatoen +COUPDAYS = OBLIG.DAGER ## Returnerer antall dager i den rentebærende perioden som inneholder innløsningsdatoen +COUPDAYSNC = OBLIG.DAGER.NF ## Returnerer antall dager fra betalingsdato til neste renteinnbetalingsdato +COUPNCD = OBLIG.DAGER.EF ## Returnerer obligasjonsdatoen som kommer etter oppgjørsdatoen +COUPNUM = OBLIG.ANTALL ## Returnerer antall obligasjoner som skal betales mellom oppgjørsdatoen og forfallsdatoen +COUPPCD = OBLIG.DAG.FORRIGE ## Returnerer obligasjonsdatoen som kommer før oppgjørsdatoen +CUMIPMT = SAMLET.RENTE ## Returnerer den kumulative renten som er betalt mellom to perioder +CUMPRINC = SAMLET.HOVEDSTOL ## Returnerer den kumulative hovedstolen som er betalt for et lån mellom to perioder +DB = DAVSKR ## Returnerer avskrivningen for et aktivum i en angitt periode, foretatt med fast degressiv avskrivning +DDB = DEGRAVS ## Returnerer avskrivningen for et aktivum for en gitt periode, ved hjelp av dobbel degressiv avskrivning eller en metode som du selv angir +DISC = DISKONTERT ## Returnerer diskonteringsraten for et verdipapir +DOLLARDE = DOLLARDE ## Konverterer en valutapris uttrykt som en brøk, til en valutapris uttrykt som et desimaltall +DOLLARFR = DOLLARBR ## Konverterer en valutapris uttrykt som et desimaltall, til en valutapris uttrykt som en brøk +DURATION = VARIGHET ## Returnerer årlig varighet for et verdipapir med renter som betales periodisk +EFFECT = EFFEKTIV.RENTE ## Returnerer den effektive årlige rentesatsen +FV = SLUTTVERDI ## Returnerer fremtidig verdi for en investering +FVSCHEDULE = SVPLAN ## Returnerer den fremtidige verdien av en inngående hovedstol etter å ha anvendt en serie med sammensatte rentesatser +INTRATE = RENTESATS ## Returnerer rentefoten av et fullfinansiert verdipapir +IPMT = RAVDRAG ## Returnerer betalte renter på en investering for en gitt periode +IRR = IR ## Returnerer internrenten for en serie kontantstrømmer +ISPMT = ER.AVDRAG ## Beregner renten som er betalt for en investering i løpet av en bestemt periode +MDURATION = MVARIGHET ## Returnerer Macauleys modifiserte varighet for et verdipapir med en antatt pålydende verdi på kr 100,00 +MIRR = MODIR ## Returnerer internrenten der positive og negative kontantstrømmer finansieres med forskjellige satser +NOMINAL = NOMINELL ## Returnerer årlig nominell rentesats +NPER = PERIODER ## Returnerer antall perioder for en investering +NPV = NNV ## Returnerer netto nåverdi for en investering, basert på en serie periodiske kontantstrømmer og en rentesats +ODDFPRICE = AVVIKFP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde første periode +ODDFYIELD = AVVIKFP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde første periode +ODDLPRICE = AVVIKSP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde siste periode +ODDLYIELD = AVVIKSP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde siste periode +PMT = AVDRAG ## Returnerer periodisk betaling for en annuitet +PPMT = AMORT ## Returnerer betalingen på hovedstolen for en investering i en gitt periode +PRICE = PRIS ## Returnerer prisen per pålydende kr 100 for et verdipapir som gir periodisk avkastning +PRICEDISC = PRIS.DISKONTERT ## Returnerer prisen per pålydende kr 100 for et diskontert verdipapir +PRICEMAT = PRIS.FORFALL ## Returnerer prisen per pålydende kr 100 av et verdipapir som betaler rente ved forfall +PV = NÅVERDI ## Returnerer nåverdien av en investering +RATE = RENTE ## Returnerer rentesatsen per periode for en annuitet +RECEIVED = MOTTATT.AVKAST ## Returnerer summen som mottas ved forfallsdato for et fullinvestert verdipapir +SLN = LINAVS ## Returnerer den lineære avskrivningen for et aktivum i én periode +SYD = ÅRSAVS ## Returnerer årsavskrivningen for et aktivum i en angitt periode +TBILLEQ = TBILLEKV ## Returnerer den obligasjonsekvivalente avkastningen for en statsobligasjon +TBILLPRICE = TBILLPRIS ## Returnerer prisen per pålydende kr 100 for en statsobligasjon +TBILLYIELD = TBILLAVKASTNING ## Returnerer avkastningen til en statsobligasjon +VDB = VERDIAVS ## Returnerer avskrivningen for et aktivum i en angitt periode eller delperiode, ved hjelp av degressiv avskrivning +XIRR = XIR ## Returnerer internrenten for en serie kontantstrømmer som ikke nødvendigvis er periodiske +XNPV = XNNV ## Returnerer netto nåverdi for en serie kontantstrømmer som ikke nødvendigvis er periodiske +YIELD = AVKAST ## Returnerer avkastningen på et verdipapir som betaler periodisk rente +YIELDDISC = AVKAST.DISKONTERT ## Returnerer årlig avkastning for et diskontert verdipapir, for eksempel en statskasseveksel +YIELDMAT = AVKAST.FORFALL ## Returnerer den årlige avkastningen for et verdipapir som betaler rente ved forfallsdato + + +## +## Information functions Informasjonsfunksjoner +## +CELL = CELLE ## Returnerer informasjon om formatering, plassering eller innholdet til en celle +ERROR.TYPE = FEIL.TYPE ## Returnerer et tall som svarer til en feiltype +INFO = INFO ## Returnerer informasjon om gjeldende operativmiljø +ISBLANK = ERTOM ## Returnerer SANN hvis verdien er tom +ISERR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst annen feilverdi enn #I/T +ISERROR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst feilverdi +ISEVEN = ERPARTALL ## Returnerer SANN hvis tallet er et partall +ISLOGICAL = ERLOGISK ## Returnerer SANN hvis verdien er en logisk verdi +ISNA = ERIT ## Returnerer SANN hvis verdien er feilverdien #I/T +ISNONTEXT = ERIKKETEKST ## Returnerer SANN hvis verdien ikke er tekst +ISNUMBER = ERTALL ## Returnerer SANN hvis verdien er et tall +ISODD = ERODDETALL ## Returnerer SANN hvis tallet er et oddetall +ISREF = ERREF ## Returnerer SANN hvis verdien er en referanse +ISTEXT = ERTEKST ## Returnerer SANN hvis verdien er tekst +N = N ## Returnerer en verdi som er konvertert til et tall +NA = IT ## Returnerer feilverdien #I/T +TYPE = VERDITYPE ## Returnerer et tall som indikerer datatypen til en verdi + + +## +## Logical functions Logiske funksjoner +## +AND = OG ## Returnerer SANN hvis alle argumentene er lik SANN +FALSE = USANN ## Returnerer den logiske verdien USANN +IF = HVIS ## Angir en logisk test som skal utføres +IFERROR = HVISFEIL ## Returnerer en verdi du angir hvis en formel evaluerer til en feil. Ellers returnerer den resultatet av formelen. +NOT = IKKE ## Reverserer logikken til argumentet +OR = ELLER ## Returnerer SANN hvis ett eller flere argumenter er lik SANN +TRUE = SANN ## Returnerer den logiske verdien SANN + + +## +## Lookup and reference functions Oppslag- og referansefunksjoner +## +ADDRESS = ADRESSE ## Returnerer en referanse som tekst til en enkelt celle i et regneark +AREAS = OMRÅDER ## Returnerer antall områder i en referanse +CHOOSE = VELG ## Velger en verdi fra en liste med verdier +COLUMN = KOLONNE ## Returnerer kolonnenummeret for en referanse +COLUMNS = KOLONNER ## Returnerer antall kolonner i en referanse +HLOOKUP = FINN.KOLONNE ## Leter i den øverste raden i en matrise og returnerer verdien for den angitte cellen +HYPERLINK = HYPERKOBLING ## Oppretter en snarvei eller et hopp som åpner et dokument som er lagret på en nettverksserver, et intranett eller Internett +INDEX = INDEKS ## Bruker en indeks til å velge en verdi fra en referanse eller matrise +INDIRECT = INDIREKTE ## Returnerer en referanse angitt av en tekstverdi +LOOKUP = SLÅ.OPP ## Slår opp verdier i en vektor eller matrise +MATCH = SAMMENLIGNE ## Slår opp verdier i en referanse eller matrise +OFFSET = FORSKYVNING ## Returnerer en referanseforskyvning fra en gitt referanse +ROW = RAD ## Returnerer radnummeret for en referanse +ROWS = RADER ## Returnerer antall rader i en referanse +RTD = RTD ## Henter sanntidsdata fra et program som støtter COM-automatisering (automatisering: En måte å arbeide på med programobjekter fra et annet program- eller utviklingsverktøy. Tidligere kalt OLE-automatisering. Automatisering er en bransjestandard og en funksjon i Component Object Model (COM).) +TRANSPOSE = TRANSPONER ## Returnerer transponeringen av en matrise +VLOOKUP = FINN.RAD ## Leter i den første kolonnen i en matrise og flytter bortover raden for å returnere verdien til en celle + + +## +## Math and trigonometry functions Matematikk- og trigonometrifunksjoner +## +ABS = ABS ## Returnerer absoluttverdien til et tall +ACOS = ARCCOS ## Returnerer arcus cosinus til et tall +ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus til et tall +ASIN = ARCSIN ## Returnerer arcus sinus til et tall +ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus til et tall +ATAN = ARCTAN ## Returnerer arcus tangens til et tall +ATAN2 = ARCTAN2 ## Returnerer arcus tangens fra x- og y-koordinater +ATANH = ARCTANH ## Returnerer den inverse hyperbolske tangens til et tall +CEILING = AVRUND.GJELDENDE.MULTIPLUM ## Runder av et tall til nærmeste heltall eller til nærmeste signifikante multiplum +COMBIN = KOMBINASJON ## Returnerer antall kombinasjoner for ett gitt antall objekter +COS = COS ## Returnerer cosinus til et tall +COSH = COSH ## Returnerer den hyperbolske cosinus til et tall +DEGREES = GRADER ## Konverterer radianer til grader +EVEN = AVRUND.TIL.PARTALL ## Runder av et tall oppover til nærmeste heltall som er et partall +EXP = EKSP ## Returnerer e opphøyd i en angitt potens +FACT = FAKULTET ## Returnerer fakultet til et tall +FACTDOUBLE = DOBBELFAKT ## Returnerer et talls doble fakultet +FLOOR = AVRUND.GJELDENDE.MULTIPLUM.NED ## Avrunder et tall nedover, mot null +GCD = SFF ## Returnerer høyeste felles divisor +INT = HELTALL ## Avrunder et tall nedover til nærmeste heltall +LCM = MFM ## Returnerer minste felles multiplum +LN = LN ## Returnerer den naturlige logaritmen til et tall +LOG = LOG ## Returnerer logaritmen for et tall til et angitt grunntall +LOG10 = LOG10 ## Returnerer logaritmen med grunntall 10 for et tall +MDETERM = MDETERM ## Returnerer matrisedeterminanten til en matrise +MINVERSE = MINVERS ## Returnerer den inverse matrisen til en matrise +MMULT = MMULT ## Returnerer matriseproduktet av to matriser +MOD = REST ## Returnerer resten fra en divisjon +MROUND = MRUND ## Returnerer et tall avrundet til det ønskede multiplum +MULTINOMIAL = MULTINOMINELL ## Returnerer det multinominelle for et sett med tall +ODD = AVRUND.TIL.ODDETALL ## Runder av et tall oppover til nærmeste heltall som er et oddetall +PI = PI ## Returnerer verdien av pi +POWER = OPPHØYD.I ## Returnerer resultatet av et tall opphøyd i en potens +PRODUCT = PRODUKT ## Multipliserer argumentene +QUOTIENT = KVOTIENT ## Returnerer heltallsdelen av en divisjon +RADIANS = RADIANER ## Konverterer grader til radianer +RAND = TILFELDIG ## Returnerer et tilfeldig tall mellom 0 og 1 +RANDBETWEEN = TILFELDIGMELLOM ## Returnerer et tilfeldig tall innenfor et angitt område +ROMAN = ROMERTALL ## Konverterer vanlige tall til romertall, som tekst +ROUND = AVRUND ## Avrunder et tall til et angitt antall sifre +ROUNDDOWN = AVRUND.NED ## Avrunder et tall nedover, mot null +ROUNDUP = AVRUND.OPP ## Runder av et tall oppover, bort fra null +SERIESSUM = SUMMER.REKKE ## Returnerer summen av en geometrisk rekke, basert på formelen +SIGN = FORTEGN ## Returnerer fortegnet for et tall +SIN = SIN ## Returnerer sinus til en gitt vinkel +SINH = SINH ## Returnerer den hyperbolske sinus til et tall +SQRT = ROT ## Returnerer en positiv kvadratrot +SQRTPI = ROTPI ## Returnerer kvadratroten av (tall * pi) +SUBTOTAL = DELSUM ## Returnerer en delsum i en liste eller database +SUM = SUMMER ## Legger sammen argumentene +SUMIF = SUMMERHVIS ## Legger sammen cellene angitt ved et gitt vilkår +SUMIFS = SUMMER.HVIS.SETT ## Legger sammen cellene i et område som oppfyller flere vilkår +SUMPRODUCT = SUMMERPRODUKT ## Returnerer summen av produktene av tilsvarende matrisekomponenter +SUMSQ = SUMMERKVADRAT ## Returnerer kvadratsummen av argumentene +SUMX2MY2 = SUMMERX2MY2 ## Returnerer summen av differansen av kvadratene for tilsvarende verdier i to matriser +SUMX2PY2 = SUMMERX2PY2 ## Returnerer summen av kvadratsummene for tilsvarende verdier i to matriser +SUMXMY2 = SUMMERXMY2 ## Returnerer summen av kvadratene av differansen for tilsvarende verdier i to matriser +TAN = TAN ## Returnerer tangens for et tall +TANH = TANH ## Returnerer den hyperbolske tangens for et tall +TRUNC = AVKORT ## Korter av et tall til et heltall + + +## +## Statistical functions Statistiske funksjoner +## +AVEDEV = GJENNOMSNITTSAVVIK ## Returnerer datapunktenes gjennomsnittlige absoluttavvik fra middelverdien +AVERAGE = GJENNOMSNITT ## Returnerer gjennomsnittet for argumentene +AVERAGEA = GJENNOMSNITTA ## Returnerer gjennomsnittet for argumentene, inkludert tall, tekst og logiske verdier +AVERAGEIF = GJENNOMSNITTHVIS ## Returnerer gjennomsnittet (aritmetisk gjennomsnitt) av alle cellene i et område som oppfyller et bestemt vilkår +AVERAGEIFS = GJENNOMSNITT.HVIS.SETT ## Returnerer gjennomsnittet (aritmetisk middelverdi) av alle celler som oppfyller flere vilkår. +BETADIST = BETA.FORDELING ## Returnerer den kumulative betafordelingsfunksjonen +BETAINV = INVERS.BETA.FORDELING ## Returnerer den inverse verdien til fordelingsfunksjonen for en angitt betafordeling +BINOMDIST = BINOM.FORDELING ## Returnerer den individuelle binomiske sannsynlighetsfordelingen +CHIDIST = KJI.FORDELING ## Returnerer den ensidige sannsynligheten for en kjikvadrert fordeling +CHIINV = INVERS.KJI.FORDELING ## Returnerer den inverse av den ensidige sannsynligheten for den kjikvadrerte fordelingen +CHITEST = KJI.TEST ## Utfører testen for uavhengighet +CONFIDENCE = KONFIDENS ## Returnerer konfidensintervallet til gjennomsnittet for en populasjon +CORREL = KORRELASJON ## Returnerer korrelasjonskoeffisienten mellom to datasett +COUNT = ANTALL ## Teller hvor mange tall som er i argumentlisten +COUNTA = ANTALLA ## Teller hvor mange verdier som er i argumentlisten +COUNTBLANK = TELLBLANKE ## Teller antall tomme celler i et område. +COUNTIF = ANTALL.HVIS ## Teller antall celler i et område som oppfyller gitte vilkår +COUNTIFS = ANTALL.HVIS.SETT ## Teller antallet ikke-tomme celler i et område som oppfyller flere vilkår +COVAR = KOVARIANS ## Returnerer kovariansen, gjennomsnittet av produktene av parvise avvik +CRITBINOM = GRENSE.BINOM ## Returnerer den minste verdien der den kumulative binomiske fordelingen er mindre enn eller lik en vilkårsverdi +DEVSQ = AVVIK.KVADRERT ## Returnerer summen av kvadrerte avvik +EXPONDIST = EKSP.FORDELING ## Returnerer eksponentialfordelingen +FDIST = FFORDELING ## Returnerer F-sannsynlighetsfordelingen +FINV = FFORDELING.INVERS ## Returnerer den inverse av den sannsynlige F-fordelingen +FISHER = FISHER ## Returnerer Fisher-transformasjonen +FISHERINV = FISHERINV ## Returnerer den inverse av Fisher-transformasjonen +FORECAST = PROGNOSE ## Returnerer en verdi langs en lineær trend +FREQUENCY = FREKVENS ## Returnerer en frekvensdistribusjon som en loddrett matrise +FTEST = FTEST ## Returnerer resultatet av en F-test +GAMMADIST = GAMMAFORDELING ## Returnerer gammafordelingen +GAMMAINV = GAMMAINV ## Returnerer den inverse av den gammakumulative fordelingen +GAMMALN = GAMMALN ## Returnerer den naturlige logaritmen til gammafunksjonen G(x) +GEOMEAN = GJENNOMSNITT.GEOMETRISK ## Returnerer den geometriske middelverdien +GROWTH = VEKST ## Returnerer verdier langs en eksponentiell trend +HARMEAN = GJENNOMSNITT.HARMONISK ## Returnerer den harmoniske middelverdien +HYPGEOMDIST = HYPGEOM.FORDELING ## Returnerer den hypergeometriske fordelingen +INTERCEPT = SKJÆRINGSPUNKT ## Returnerer skjæringspunktet til den lineære regresjonslinjen +KURT = KURT ## Returnerer kurtosen til et datasett +LARGE = N.STØRST ## Returnerer den n-te største verdien i et datasett +LINEST = RETTLINJE ## Returnerer parameterne til en lineær trend +LOGEST = KURVE ## Returnerer parameterne til en eksponentiell trend +LOGINV = LOGINV ## Returnerer den inverse lognormale fordelingen +LOGNORMDIST = LOGNORMFORD ## Returnerer den kumulative lognormale fordelingen +MAX = STØRST ## Returnerer maksimumsverdien i en argumentliste +MAXA = MAKSA ## Returnerer maksimumsverdien i en argumentliste, inkludert tall, tekst og logiske verdier +MEDIAN = MEDIAN ## Returnerer medianen til tallene som er gitt +MIN = MIN ## Returnerer minimumsverdien i en argumentliste +MINA = MINA ## Returnerer den minste verdien i en argumentliste, inkludert tall, tekst og logiske verdier +MODE = MODUS ## Returnerer den vanligste verdien i et datasett +NEGBINOMDIST = NEGBINOM.FORDELING ## Returnerer den negative binomiske fordelingen +NORMDIST = NORMALFORDELING ## Returnerer den kumulative normalfordelingen +NORMINV = NORMINV ## Returnerer den inverse kumulative normalfordelingen +NORMSDIST = NORMSFORDELING ## Returnerer standard kumulativ normalfordeling +NORMSINV = NORMSINV ## Returnerer den inverse av den den kumulative standard normalfordelingen +PEARSON = PEARSON ## Returnerer produktmomentkorrelasjonskoeffisienten, Pearson +PERCENTILE = PERSENTIL ## Returnerer den n-te persentil av verdiene i et område +PERCENTRANK = PROSENTDEL ## Returnerer prosentrangeringen av en verdi i et datasett +PERMUT = PERMUTER ## Returnerer antall permutasjoner for et gitt antall objekter +POISSON = POISSON ## Returnerer Poissons sannsynlighetsfordeling +PROB = SANNSYNLIG ## Returnerer sannsynligheten for at verdier i et område ligger mellom to grenser +QUARTILE = KVARTIL ## Returnerer kvartilen til et datasett +RANK = RANG ## Returnerer rangeringen av et tall, eller plassen tallet har i en rekke +RSQ = RKVADRAT ## Returnerer kvadratet av produktmomentkorrelasjonskoeffisienten (Pearsons r) +SKEW = SKJEVFORDELING ## Returnerer skjevheten i en fordeling +SLOPE = STIGNINGSTALL ## Returnerer stigningtallet for den lineære regresjonslinjen +SMALL = N.MINST ## Returnerer den n-te minste verdien i et datasett +STANDARDIZE = NORMALISER ## Returnerer en normalisert verdi +STDEV = STDAV ## Estimere standardavvik på grunnlag av et utvalg +STDEVA = STDAVVIKA ## Estimerer standardavvik basert på et utvalg, inkludert tall, tekst og logiske verdier +STDEVP = STDAVP ## Beregner standardavvik basert på hele populasjonen +STDEVPA = STDAVVIKPA ## Beregner standardavvik basert på hele populasjonen, inkludert tall, tekst og logiske verdier +STEYX = STANDARDFEIL ## Returnerer standardfeilen for den predikerte y-verdien for hver x i regresjonen +TDIST = TFORDELING ## Returnerer en Student t-fordeling +TINV = TINV ## Returnerer den inverse Student t-fordelingen +TREND = TREND ## Returnerer verdier langs en lineær trend +TRIMMEAN = TRIMMET.GJENNOMSNITT ## Returnerer den interne middelverdien til et datasett +TTEST = TTEST ## Returnerer sannsynligheten assosiert med en Student t-test +VAR = VARIANS ## Estimerer varians basert på et utvalg +VARA = VARIANSA ## Estimerer varians basert på et utvalg, inkludert tall, tekst og logiske verdier +VARP = VARIANSP ## Beregner varians basert på hele populasjonen +VARPA = VARIANSPA ## Beregner varians basert på hele populasjonen, inkludert tall, tekst og logiske verdier +WEIBULL = WEIBULL.FORDELING ## Returnerer Weibull-fordelingen +ZTEST = ZTEST ## Returnerer den ensidige sannsynlighetsverdien for en z-test + + +## +## Text functions Tekstfunksjoner +## +ASC = STIGENDE ## Endrer fullbreddes (dobbeltbyte) engelske bokstaver eller katakana i en tegnstreng, til halvbreddes (enkeltbyte) tegn +BAHTTEXT = BAHTTEKST ## Konverterer et tall til tekst, og bruker valutaformatet ß (baht) +CHAR = TEGNKODE ## Returnerer tegnet som svarer til kodenummeret +CLEAN = RENSK ## Fjerner alle tegn som ikke kan skrives ut, fra teksten +CODE = KODE ## Returnerer en numerisk kode for det første tegnet i en tekststreng +CONCATENATE = KJEDE.SAMMEN ## Slår sammen flere tekstelementer til ett tekstelement +DOLLAR = VALUTA ## Konverterer et tall til tekst, og bruker valutaformatet $ (dollar) +EXACT = EKSAKT ## Kontrollerer om to tekstverdier er like +FIND = FINN ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) +FINDB = FINNB ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) +FIXED = FASTSATT ## Formaterer et tall som tekst med et bestemt antall desimaler +JIS = JIS ## Endrer halvbreddes (enkeltbyte) engelske bokstaver eller katakana i en tegnstreng, til fullbreddes (dobbeltbyte) tegn +LEFT = VENSTRE ## Returnerer tegnene lengst til venstre i en tekstverdi +LEFTB = VENSTREB ## Returnerer tegnene lengst til venstre i en tekstverdi +LEN = LENGDE ## Returnerer antall tegn i en tekststreng +LENB = LENGDEB ## Returnerer antall tegn i en tekststreng +LOWER = SMÅ ## Konverterer tekst til små bokstaver +MID = DELTEKST ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir +MIDB = DELTEKSTB ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir +PHONETIC = FURIGANA ## Trekker ut fonetiske tegn (furigana) fra en tekststreng +PROPER = STOR.FORBOKSTAV ## Gir den første bokstaven i hvert ord i en tekstverdi stor forbokstav +REPLACE = ERSTATT ## Erstatter tegn i en tekst +REPLACEB = ERSTATTB ## Erstatter tegn i en tekst +REPT = GJENTA ## Gjentar tekst et gitt antall ganger +RIGHT = HØYRE ## Returnerer tegnene lengst til høyre i en tekstverdi +RIGHTB = HØYREB ## Returnerer tegnene lengst til høyre i en tekstverdi +SEARCH = SØK ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) +SEARCHB = SØKB ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) +SUBSTITUTE = BYTT.UT ## Bytter ut gammel tekst med ny tekst i en tekststreng +T = T ## Konverterer argumentene til tekst +TEXT = TEKST ## Formaterer et tall og konverterer det til tekst +TRIM = TRIMME ## Fjerner mellomrom fra tekst +UPPER = STORE ## Konverterer tekst til store bokstaver +VALUE = VERDI ## Konverterer et tekstargument til et tall diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config new file mode 100755 index 0000000..00f8b9a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = zł + + +## +## Excel Error Codes (For future use) + +## +NULL = #ZERO! +DIV0 = #DZIEL/0! +VALUE = #ARG! +REF = #ADR! +NAME = #NAZWA? +NUM = #LICZBA! +NA = #N/D! diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions new file mode 100755 index 0000000..907a4ff --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pl/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Funkcje dodatków i automatyzacji +## +GETPIVOTDATA = WEŹDANETABELI ## Zwraca dane przechowywane w raporcie tabeli przestawnej. + + +## +## Cube functions Funkcje modułów +## +CUBEKPIMEMBER = ELEMENT.KPI.MODUŁU ## Zwraca nazwę, właściwość i miarę kluczowego wskaźnika wydajności (KPI) oraz wyświetla nazwę i właściwość w komórce. Wskaźnik KPI jest miarą ilościową, taką jak miesięczny zysk brutto lub kwartalna fluktuacja pracowników, używaną do monitorowania wydajności organizacji. +CUBEMEMBER = ELEMENT.MODUŁU ## Zwraca element lub krotkę z hierarchii modułu. Służy do sprawdzania, czy element lub krotka istnieje w module. +CUBEMEMBERPROPERTY = WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU ## Zwraca wartość właściwości elementu w module. Służy do sprawdzania, czy nazwa elementu istnieje w module, i zwracania określonej właściwości dla tego elementu. +CUBERANKEDMEMBER = USZEREGOWANY.ELEMENT.MODUŁU ## Zwraca n-ty (albo uszeregowany) element zestawu. Służy do zwracania elementu lub elementów zestawu, na przykład najlepszego sprzedawcy lub 10 najlepszych studentów. +CUBESET = ZESTAW.MODUŁÓW ## Definiuje obliczony zestaw elementów lub krotek, wysyłając wyrażenie zestawu do serwera modułu, który tworzy zestaw i zwraca go do programu Microsoft Office Excel. +CUBESETCOUNT = LICZNIK.MODUŁÓW.ZESTAWU ## Zwraca liczbę elementów zestawu. +CUBEVALUE = WARTOŚĆ.MODUŁU ## Zwraca zagregowaną wartość z modułu. + + +## +## Database functions Funkcje baz danych +## +DAVERAGE = BD.ŚREDNIA ## Zwraca wartość średniej wybranych wpisów bazy danych. +DCOUNT = BD.ILE.REKORDÓW ## Zlicza komórki zawierające liczby w bazie danych. +DCOUNTA = BD.ILE.REKORDÓW.A ## Zlicza niepuste komórki w bazie danych. +DGET = BD.POLE ## Wyodrębnia z bazy danych jeden rekord spełniający określone kryteria. +DMAX = BD.MAX ## Zwraca wartość maksymalną z wybranych wpisów bazy danych. +DMIN = BD.MIN ## Zwraca wartość minimalną z wybranych wpisów bazy danych. +DPRODUCT = BD.ILOCZYN ## Mnoży wartości w konkretnym, spełniającym kryteria polu rekordów bazy danych. +DSTDEV = BD.ODCH.STANDARD ## Szacuje odchylenie standardowe na podstawie próbki z wybranych wpisów bazy danych. +DSTDEVP = BD.ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji wybranych wpisów bazy danych. +DSUM = BD.SUMA ## Dodaje liczby w kolumnie pól rekordów bazy danych, które spełniają kryteria. +DVAR = BD.WARIANCJA ## Szacuje wariancję na podstawie próbki z wybranych wpisów bazy danych. +DVARP = BD.WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji wybranych wpisów bazy danych. + + +## +## Date and time functions Funkcje dat, godzin i czasu +## +DATE = DATA ## Zwraca liczbę seryjną dla wybranej daty. +DATEVALUE = DATA.WARTOŚĆ ## Konwertuje datę w formie tekstu na liczbę seryjną. +DAY = DZIEŃ ## Konwertuje liczbę seryjną na dzień miesiąca. +DAYS360 = DNI.360 ## Oblicza liczbę dni między dwiema datami na podstawie roku 360-dniowego. +EDATE = UPŁDNI ## Zwraca liczbę seryjną daty jako wskazaną liczbę miesięcy przed określoną datą początkową lub po niej. +EOMONTH = EOMONTH ## Zwraca liczbę seryjną ostatniego dnia miesiąca przed określoną liczbą miesięcy lub po niej. +HOUR = GODZINA ## Konwertuje liczbę seryjną na godzinę. +MINUTE = MINUTA ## Konwertuje liczbę seryjną na minutę. +MONTH = MIESIĄC ## Konwertuje liczbę seryjną na miesiąc. +NETWORKDAYS = NETWORKDAYS ## Zwraca liczbę pełnych dni roboczych między dwiema datami. +NOW = TERAZ ## Zwraca liczbę seryjną bieżącej daty i godziny. +SECOND = SEKUNDA ## Konwertuje liczbę seryjną na sekundę. +TIME = CZAS ## Zwraca liczbę seryjną określonego czasu. +TIMEVALUE = CZAS.WARTOŚĆ ## Konwertuje czas w formie tekstu na liczbę seryjną. +TODAY = DZIŚ ## Zwraca liczbę seryjną dla daty bieżącej. +WEEKDAY = DZIEŃ.TYG ## Konwertuje liczbę seryjną na dzień tygodnia. +WEEKNUM = WEEKNUM ## Konwertuje liczbę seryjną na liczbę reprezentującą numer tygodnia w roku. +WORKDAY = WORKDAY ## Zwraca liczbę seryjną dla daty przed określoną liczbą dni roboczych lub po niej. +YEAR = ROK ## Konwertuje liczbę seryjną na rok. +YEARFRAC = YEARFRAC ## Zwraca część roku reprezentowaną przez pełną liczbę dni między datą początkową a datą końcową. + + +## +## Engineering functions Funkcje inżynierskie +## +BESSELI = BESSELI ## Zwraca wartość zmodyfikowanej funkcji Bessela In(x). +BESSELJ = BESSELJ ## Zwraca wartość funkcji Bessela Jn(x). +BESSELK = BESSELK ## Zwraca wartość zmodyfikowanej funkcji Bessela Kn(x). +BESSELY = BESSELY ## Zwraca wartość funkcji Bessela Yn(x). +BIN2DEC = BIN2DEC ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci dziesiętnej. +BIN2HEX = BIN2HEX ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci szesnastkowej. +BIN2OCT = BIN2OCT ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci ósemkowej. +COMPLEX = COMPLEX ## Konwertuje część rzeczywistą i urojoną na liczbę zespoloną. +CONVERT = CONVERT ## Konwertuje liczbę z jednego systemu miar na inny. +DEC2BIN = DEC2BIN ## Konwertuje liczbę w postaci dziesiętnej na postać dwójkową. +DEC2HEX = DEC2HEX ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci szesnastkowej. +DEC2OCT = DEC2OCT ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci ósemkowej. +DELTA = DELTA ## Sprawdza, czy dwie wartości są równe. +ERF = ERF ## Zwraca wartość funkcji błędu. +ERFC = ERFC ## Zwraca wartość komplementarnej funkcji błędu. +GESTEP = GESTEP ## Sprawdza, czy liczba jest większa niż wartość progowa. +HEX2BIN = HEX2BIN ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dwójkowej. +HEX2DEC = HEX2DEC ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dziesiętnej. +HEX2OCT = HEX2OCT ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci ósemkowej. +IMABS = IMABS ## Zwraca wartość bezwzględną (moduł) liczby zespolonej. +IMAGINARY = IMAGINARY ## Zwraca wartość części urojonej liczby zespolonej. +IMARGUMENT = IMARGUMENT ## Zwraca wartość argumentu liczby zespolonej, przy czym kąt wyrażony jest w radianach. +IMCONJUGATE = IMCONJUGATE ## Zwraca wartość liczby sprzężonej danej liczby zespolonej. +IMCOS = IMCOS ## Zwraca wartość cosinusa liczby zespolonej. +IMDIV = IMDIV ## Zwraca wartość ilorazu dwóch liczb zespolonych. +IMEXP = IMEXP ## Zwraca postać wykładniczą liczby zespolonej. +IMLN = IMLN ## Zwraca wartość logarytmu naturalnego liczby zespolonej. +IMLOG10 = IMLOG10 ## Zwraca wartość logarytmu dziesiętnego liczby zespolonej. +IMLOG2 = IMLOG2 ## Zwraca wartość logarytmu liczby zespolonej przy podstawie 2. +IMPOWER = IMPOWER ## Zwraca wartość liczby zespolonej podniesionej do potęgi całkowitej. +IMPRODUCT = IMPRODUCT ## Zwraca wartość iloczynu liczb zespolonych. +IMREAL = IMREAL ## Zwraca wartość części rzeczywistej liczby zespolonej. +IMSIN = IMSIN ## Zwraca wartość sinusa liczby zespolonej. +IMSQRT = IMSQRT ## Zwraca wartość pierwiastka kwadratowego z liczby zespolonej. +IMSUB = IMSUB ## Zwraca wartość różnicy dwóch liczb zespolonych. +IMSUM = IMSUM ## Zwraca wartość sumy liczb zespolonych. +OCT2BIN = OCT2BIN ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dwójkowej. +OCT2DEC = OCT2DEC ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dziesiętnej. +OCT2HEX = OCT2HEX ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci szesnastkowej. + + +## +## Financial functions Funkcje finansowe +## +ACCRINT = ACCRINT ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem okresowym. +ACCRINTM = ACCRINTM ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem w terminie wykupu. +AMORDEGRC = AMORDEGRC ## Zwraca amortyzację dla każdego okresu rozliczeniowego z wykorzystaniem współczynnika amortyzacji. +AMORLINC = AMORLINC ## Zwraca amortyzację dla każdego okresu rozliczeniowego. +COUPDAYBS = COUPDAYBS ## Zwraca liczbę dni od początku okresu dywidendy do dnia rozliczeniowego. +COUPDAYS = COUPDAYS ## Zwraca liczbę dni w okresie dywidendy, z uwzględnieniem dnia rozliczeniowego. +COUPDAYSNC = COUPDAYSNC ## Zwraca liczbę dni od dnia rozliczeniowego do daty następnego dnia dywidendy. +COUPNCD = COUPNCD ## Zwraca dzień następnej dywidendy po dniu rozliczeniowym. +COUPNUM = COUPNUM ## Zwraca liczbę dywidend płatnych między dniem rozliczeniowym a dniem wykupu. +COUPPCD = COUPPCD ## Zwraca dzień poprzedniej dywidendy przed dniem rozliczeniowym. +CUMIPMT = CUMIPMT ## Zwraca wartość procentu składanego płatnego między dwoma okresami. +CUMPRINC = CUMPRINC ## Zwraca wartość kapitału skumulowanego spłaty pożyczki między dwoma okresami. +DB = DB ## Zwraca amortyzację środka trwałego w danym okresie metodą degresywną z zastosowaniem stałej bazowej. +DDB = DDB ## Zwraca amortyzację środka trwałego za podany okres metodą degresywną z zastosowaniem podwójnej bazowej lub metodą określoną przez użytkownika. +DISC = DISC ## Zwraca wartość stopy dyskontowej papieru wartościowego. +DOLLARDE = DOLLARDE ## Konwertuje cenę w postaci ułamkowej na cenę wyrażoną w postaci dziesiętnej. +DOLLARFR = DOLLARFR ## Konwertuje cenę wyrażoną w postaci dziesiętnej na cenę wyrażoną w postaci ułamkowej. +DURATION = DURATION ## Zwraca wartość rocznego przychodu z papieru wartościowego o okresowych wypłatach oprocentowania. +EFFECT = EFFECT ## Zwraca wartość efektywnej rocznej stopy procentowej. +FV = FV ## Zwraca przyszłą wartość lokaty. +FVSCHEDULE = FVSCHEDULE ## Zwraca przyszłą wartość kapitału początkowego wraz z szeregiem procentów składanych. +INTRATE = INTRATE ## Zwraca wartość stopy procentowej papieru wartościowego całkowicie ulokowanego. +IPMT = IPMT ## Zwraca wysokość spłaty oprocentowania lokaty za dany okres. +IRR = IRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii przepływów gotówkowych. +ISPMT = ISPMT ## Oblicza wysokość spłaty oprocentowania za dany okres lokaty. +MDURATION = MDURATION ## Zwraca wartość zmodyfikowanego okresu Macauleya dla papieru wartościowego o założonej wartości nominalnej 100 zł. +MIRR = MIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla przypadku, gdy dodatnie i ujemne przepływy gotówkowe mają różne stopy. +NOMINAL = NOMINAL ## Zwraca wysokość nominalnej rocznej stopy procentowej. +NPER = NPER ## Zwraca liczbę okresów dla lokaty. +NPV = NPV ## Zwraca wartość bieżącą netto lokaty na podstawie szeregu okresowych przepływów gotówkowych i stopy dyskontowej. +ODDFPRICE = ODDFPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym pierwszym okresem. +ODDFYIELD = ODDFYIELD ## Zwraca rentowność papieru wartościowego z nietypowym pierwszym okresem. +ODDLPRICE = ODDLPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym ostatnim okresem. +ODDLYIELD = ODDLYIELD ## Zwraca rentowność papieru wartościowego z nietypowym ostatnim okresem. +PMT = PMT ## Zwraca wartość okresowej płatności raty rocznej. +PPMT = PPMT ## Zwraca wysokość spłaty kapitału w przypadku lokaty dla danego okresu. +PRICE = PRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem okresowym. +PRICEDISC = PRICEDISC ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego zdyskontowanego. +PRICEMAT = PRICEMAT ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem w terminie wykupu. +PV = PV ## Zwraca wartość bieżącą lokaty. +RATE = RATE ## Zwraca wysokość stopy procentowej w okresie raty rocznej. +RECEIVED = RECEIVED ## Zwraca wartość kapitału otrzymanego przy wykupie papieru wartościowego całkowicie ulokowanego. +SLN = SLN ## Zwraca amortyzację środka trwałego za jeden okres metodą liniową. +SYD = SYD ## Zwraca amortyzację środka trwałego za dany okres metodą sumy cyfr lat amortyzacji. +TBILLEQ = TBILLEQ ## Zwraca rentowność ekwiwalentu obligacji dla bonu skarbowego. +TBILLPRICE = TBILLPRICE ## Zwraca cenę za 100 zł wartości nominalnej bonu skarbowego. +TBILLYIELD = TBILLYIELD ## Zwraca rentowność bonu skarbowego. +VDB = VDB ## Oblicza amortyzację środka trwałego w danym okresie lub jego części metodą degresywną. +XIRR = XIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. +XNPV = XNPV ## Zwraca wartość bieżącą netto dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. +YIELD = YIELD ## Zwraca rentowność papieru wartościowego z oprocentowaniem okresowym. +YIELDDISC = YIELDDISC ## Zwraca roczną rentowność zdyskontowanego papieru wartościowego, na przykład bonu skarbowego. +YIELDMAT = YIELDMAT ## Zwraca roczną rentowność papieru wartościowego oprocentowanego przy wykupie. + + +## +## Information functions Funkcje informacyjne +## +CELL = KOMÓRKA ## Zwraca informacje o formacie, położeniu lub zawartości komórki. +ERROR.TYPE = NR.BŁĘDU ## Zwraca liczbę odpowiadającą typowi błędu. +INFO = INFO ## Zwraca informację o aktualnym środowisku pracy. +ISBLANK = CZY.PUSTA ## Zwraca wartość PRAWDA, jeśli wartość jest pusta. +ISERR = CZY.BŁ ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu, z wyjątkiem #N/D!. +ISERROR = CZY.BŁĄD ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu. +ISEVEN = ISEVEN ## Zwraca wartość PRAWDA, jeśli liczba jest parzysta. +ISLOGICAL = CZY.LOGICZNA ## Zwraca wartość PRAWDA, jeśli wartość jest wartością logiczną. +ISNA = CZY.BRAK ## Zwraca wartość PRAWDA, jeśli wartość jest wartością błędu #N/D!. +ISNONTEXT = CZY.NIE.TEKST ## Zwraca wartość PRAWDA, jeśli wartość nie jest tekstem. +ISNUMBER = CZY.LICZBA ## Zwraca wartość PRAWDA, jeśli wartość jest liczbą. +ISODD = ISODD ## Zwraca wartość PRAWDA, jeśli liczba jest nieparzysta. +ISREF = CZY.ADR ## Zwraca wartość PRAWDA, jeśli wartość jest odwołaniem. +ISTEXT = CZY.TEKST ## Zwraca wartość PRAWDA, jeśli wartość jest tekstem. +N = L ## Zwraca wartość przekonwertowaną na postać liczbową. +NA = BRAK ## Zwraca wartość błędu #N/D!. +TYPE = TYP ## Zwraca liczbę wskazującą typ danych wartości. + + +## +## Logical functions Funkcje logiczne +## +AND = ORAZ ## Zwraca wartość PRAWDA, jeśli wszystkie argumenty mają wartość PRAWDA. +FALSE = FAŁSZ ## Zwraca wartość logiczną FAŁSZ. +IF = JEŻELI ## Określa warunek logiczny do sprawdzenia. +IFERROR = JEŻELI.BŁĄD ## Zwraca określoną wartość, jeśli wynikiem obliczenia formuły jest błąd; w przeciwnym przypadku zwraca wynik formuły. +NOT = NIE ## Odwraca wartość logiczną argumentu. +OR = LUB ## Zwraca wartość PRAWDA, jeśli co najmniej jeden z argumentów ma wartość PRAWDA. +TRUE = PRAWDA ## Zwraca wartość logiczną PRAWDA. + + +## +## Lookup and reference functions Funkcje wyszukiwania i odwołań +## +ADDRESS = ADRES ## Zwraca odwołanie do jednej komórki w arkuszu jako wartość tekstową. +AREAS = OBSZARY ## Zwraca liczbę obszarów występujących w odwołaniu. +CHOOSE = WYBIERZ ## Wybiera wartość z listy wartości. +COLUMN = NR.KOLUMNY ## Zwraca numer kolumny z odwołania. +COLUMNS = LICZBA.KOLUMN ## Zwraca liczbę kolumn dla danego odwołania. +HLOOKUP = WYSZUKAJ.POZIOMO ## Przegląda górny wiersz tablicy i zwraca wartość wskazanej komórki. +HYPERLINK = HIPERŁĄCZE ## Tworzy skrót lub skok, który pozwala otwierać dokument przechowywany na serwerze sieciowym, w sieci intranet lub w Internecie. +INDEX = INDEKS ## Używa indeksu do wybierania wartości z odwołania lub tablicy. +INDIRECT = ADR.POŚR ## Zwraca odwołanie określone przez wartość tekstową. +LOOKUP = WYSZUKAJ ## Wyszukuje wartości w wektorze lub tablicy. +MATCH = PODAJ.POZYCJĘ ## Wyszukuje wartości w odwołaniu lub w tablicy. +OFFSET = PRZESUNIĘCIE ## Zwraca adres przesunięty od danego odwołania. +ROW = WIERSZ ## Zwraca numer wiersza odwołania. +ROWS = ILE.WIERSZY ## Zwraca liczbę wierszy dla danego odwołania. +RTD = RTD ## Pobiera dane w czasie rzeczywistym z programu obsługującego automatyzację COM (Automatyzacja: Sposób pracy z obiektami aplikacji pochodzącymi z innej aplikacji lub narzędzia projektowania. Nazywana wcześniej Automatyzacją OLE, Automatyzacja jest standardem przemysłowym i funkcją obiektowego modelu składników (COM, Component Object Model).). +TRANSPOSE = TRANSPONUJ ## Zwraca transponowaną tablicę. +VLOOKUP = WYSZUKAJ.PIONOWO ## Przeszukuje pierwszą kolumnę tablicy i przechodzi wzdłuż wiersza, aby zwrócić wartość komórki. + + +## +## Math and trigonometry functions Funkcje matematyczne i trygonometryczne +## +ABS = MODUŁ.LICZBY ## Zwraca wartość absolutną liczby. +ACOS = ACOS ## Zwraca arcus cosinus liczby. +ACOSH = ACOSH ## Zwraca arcus cosinus hiperboliczny liczby. +ASIN = ASIN ## Zwraca arcus sinus liczby. +ASINH = ASINH ## Zwraca arcus sinus hiperboliczny liczby. +ATAN = ATAN ## Zwraca arcus tangens liczby. +ATAN2 = ATAN2 ## Zwraca arcus tangens liczby na podstawie współrzędnych x i y. +ATANH = ATANH ## Zwraca arcus tangens hiperboliczny liczby. +CEILING = ZAOKR.W.GÓRĘ ## Zaokrągla liczbę do najbliższej liczby całkowitej lub do najbliższej wielokrotności dokładności. +COMBIN = KOMBINACJE ## Zwraca liczbę kombinacji dla danej liczby obiektów. +COS = COS ## Zwraca cosinus liczby. +COSH = COSH ## Zwraca cosinus hiperboliczny liczby. +DEGREES = STOPNIE ## Konwertuje radiany na stopnie. +EVEN = ZAOKR.DO.PARZ ## Zaokrągla liczbę w górę do najbliższej liczby parzystej. +EXP = EXP ## Zwraca wartość liczby e podniesionej do potęgi określonej przez podaną liczbę. +FACT = SILNIA ## Zwraca silnię liczby. +FACTDOUBLE = FACTDOUBLE ## Zwraca podwójną silnię liczby. +FLOOR = ZAOKR.W.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. +GCD = GCD ## Zwraca największy wspólny dzielnik. +INT = ZAOKR.DO.CAŁK ## Zaokrągla liczbę w dół do najbliższej liczby całkowitej. +LCM = LCM ## Zwraca najmniejszą wspólną wielokrotność. +LN = LN ## Zwraca logarytm naturalny podanej liczby. +LOG = LOG ## Zwraca logarytm danej liczby przy zadanej podstawie. +LOG10 = LOG10 ## Zwraca logarytm dziesiętny liczby. +MDETERM = WYZNACZNIK.MACIERZY ## Zwraca wyznacznik macierzy tablicy. +MINVERSE = MACIERZ.ODW ## Zwraca odwrotność macierzy tablicy. +MMULT = MACIERZ.ILOCZYN ## Zwraca iloczyn macierzy dwóch tablic. +MOD = MOD ## Zwraca resztę z dzielenia. +MROUND = MROUND ## Zwraca liczbę zaokrągloną do żądanej wielokrotności. +MULTINOMIAL = MULTINOMIAL ## Zwraca wielomian dla zbioru liczb. +ODD = ZAOKR.DO.NPARZ ## Zaokrągla liczbę w górę do najbliższej liczby nieparzystej. +PI = PI ## Zwraca wartość liczby Pi. +POWER = POTĘGA ## Zwraca liczbę podniesioną do potęgi. +PRODUCT = ILOCZYN ## Mnoży argumenty. +QUOTIENT = QUOTIENT ## Zwraca iloraz (całkowity). +RADIANS = RADIANY ## Konwertuje stopnie na radiany. +RAND = LOS ## Zwraca liczbę pseudolosową z zakresu od 0 do 1. +RANDBETWEEN = RANDBETWEEN ## Zwraca liczbę pseudolosową z zakresu określonego przez podane argumenty. +ROMAN = RZYMSKIE ## Konwertuje liczbę arabską na rzymską jako tekst. +ROUND = ZAOKR ## Zaokrągla liczbę do określonej liczby cyfr. +ROUNDDOWN = ZAOKR.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. +ROUNDUP = ZAOKR.GÓRA ## Zaokrągla liczbę w górę, w kierunku od zera. +SERIESSUM = SERIESSUM ## Zwraca sumę szeregu potęgowego na podstawie wzoru. +SIGN = ZNAK.LICZBY ## Zwraca znak liczby. +SIN = SIN ## Zwraca sinus danego kąta. +SINH = SINH ## Zwraca sinus hiperboliczny liczby. +SQRT = PIERWIASTEK ## Zwraca dodatni pierwiastek kwadratowy. +SQRTPI = SQRTPI ## Zwraca pierwiastek kwadratowy iloczynu (liczba * Pi). +SUBTOTAL = SUMY.POŚREDNIE ## Zwraca sumę częściową listy lub bazy danych. +SUM = SUMA ## Dodaje argumenty. +SUMIF = SUMA.JEŻELI ## Dodaje komórki określone przez podane kryterium. +SUMIFS = SUMA.WARUNKÓW ## Dodaje komórki w zakresie, które spełniają wiele kryteriów. +SUMPRODUCT = SUMA.ILOCZYNÓW ## Zwraca sumę iloczynów odpowiednich elementów tablicy. +SUMSQ = SUMA.KWADRATÓW ## Zwraca sumę kwadratów argumentów. +SUMX2MY2 = SUMA.X2.M.Y2 ## Zwraca sumę różnic kwadratów odpowiednich wartości w dwóch tablicach. +SUMX2PY2 = SUMA.X2.P.Y2 ## Zwraca sumę sum kwadratów odpowiednich wartości w dwóch tablicach. +SUMXMY2 = SUMA.XMY.2 ## Zwraca sumę kwadratów różnic odpowiednich wartości w dwóch tablicach. +TAN = TAN ## Zwraca tangens liczby. +TANH = TANH ## Zwraca tangens hiperboliczny liczby. +TRUNC = LICZBA.CAŁK ## Przycina liczbę do wartości całkowitej. + + +## +## Statistical functions Funkcje statystyczne +## +AVEDEV = ODCH.ŚREDNIE ## Zwraca średnią wartość odchyleń absolutnych punktów danych od ich wartości średniej. +AVERAGE = ŚREDNIA ## Zwraca wartość średnią argumentów. +AVERAGEA = ŚREDNIA.A ## Zwraca wartość średnią argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +AVERAGEIF = ŚREDNIA.JEŻELI ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek w zakresie, które spełniają podane kryteria. +AVERAGEIFS = ŚREDNIA.WARUNKÓW ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek, które spełniają jedno lub więcej kryteriów. +BETADIST = ROZKŁAD.BETA ## Zwraca skumulowaną funkcję gęstości prawdopodobieństwa beta. +BETAINV = ROZKŁAD.BETA.ODW ## Zwraca odwrotność skumulowanej funkcji gęstości prawdopodobieństwa beta. +BINOMDIST = ROZKŁAD.DWUM ## Zwraca pojedynczy składnik dwumianowego rozkładu prawdopodobieństwa. +CHIDIST = ROZKŁAD.CHI ## Zwraca wartość jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. +CHIINV = ROZKŁAD.CHI.ODW ## Zwraca odwrotność wartości jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. +CHITEST = TEST.CHI ## Zwraca test niezależności. +CONFIDENCE = UFNOŚĆ ## Zwraca interwał ufności dla średniej populacji. +CORREL = WSP.KORELACJI ## Zwraca współczynnik korelacji dwóch zbiorów danych. +COUNT = ILE.LICZB ## Zlicza liczby znajdujące się na liście argumentów. +COUNTA = ILE.NIEPUSTYCH ## Zlicza wartości znajdujące się na liście argumentów. +COUNTBLANK = LICZ.PUSTE ## Zwraca liczbę pustych komórek w pewnym zakresie. +COUNTIF = LICZ.JEŻELI ## Zlicza komórki wewnątrz zakresu, które spełniają podane kryteria. +COUNTIFS = LICZ.WARUNKI ## Zlicza komórki wewnątrz zakresu, które spełniają wiele kryteriów. +COVAR = KOWARIANCJA ## Zwraca kowariancję, czyli średnią wartość iloczynów odpowiednich odchyleń. +CRITBINOM = PRÓG.ROZKŁAD.DWUM ## Zwraca najmniejszą wartość, dla której skumulowany rozkład dwumianowy jest mniejszy niż wartość kryterium lub równy jej. +DEVSQ = ODCH.KWADRATOWE ## Zwraca sumę kwadratów odchyleń. +EXPONDIST = ROZKŁAD.EXP ## Zwraca rozkład wykładniczy. +FDIST = ROZKŁAD.F ## Zwraca rozkład prawdopodobieństwa F. +FINV = ROZKŁAD.F.ODW ## Zwraca odwrotność rozkładu prawdopodobieństwa F. +FISHER = ROZKŁAD.FISHER ## Zwraca transformację Fishera. +FISHERINV = ROZKŁAD.FISHER.ODW ## Zwraca odwrotność transformacji Fishera. +FORECAST = REGLINX ## Zwraca wartość trendu liniowego. +FREQUENCY = CZĘSTOŚĆ ## Zwraca rozkład częstotliwości jako tablicę pionową. +FTEST = TEST.F ## Zwraca wynik testu F. +GAMMADIST = ROZKŁAD.GAMMA ## Zwraca rozkład gamma. +GAMMAINV = ROZKŁAD.GAMMA.ODW ## Zwraca odwrotność skumulowanego rozkładu gamma. +GAMMALN = ROZKŁAD.LIN.GAMMA ## Zwraca logarytm naturalny funkcji gamma, Γ(x). +GEOMEAN = ŚREDNIA.GEOMETRYCZNA ## Zwraca średnią geometryczną. +GROWTH = REGEXPW ## Zwraca wartości trendu wykładniczego. +HARMEAN = ŚREDNIA.HARMONICZNA ## Zwraca średnią harmoniczną. +HYPGEOMDIST = ROZKŁAD.HIPERGEOM ## Zwraca rozkład hipergeometryczny. +INTERCEPT = ODCIĘTA ## Zwraca punkt przecięcia osi pionowej z linią regresji liniowej. +KURT = KURTOZA ## Zwraca kurtozę zbioru danych. +LARGE = MAX.K ## Zwraca k-tą największą wartość ze zbioru danych. +LINEST = REGLINP ## Zwraca parametry trendu liniowego. +LOGEST = REGEXPP ## Zwraca parametry trendu wykładniczego. +LOGINV = ROZKŁAD.LOG.ODW ## Zwraca odwrotność rozkładu logarytmu naturalnego. +LOGNORMDIST = ROZKŁAD.LOG ## Zwraca skumulowany rozkład logarytmu naturalnego. +MAX = MAX ## Zwraca maksymalną wartość listy argumentów. +MAXA = MAX.A ## Zwraca maksymalną wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +MEDIAN = MEDIANA ## Zwraca medianę podanych liczb. +MIN = MIN ## Zwraca minimalną wartość listy argumentów. +MINA = MIN.A ## Zwraca najmniejszą wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. +MODE = WYST.NAJCZĘŚCIEJ ## Zwraca wartość najczęściej występującą w zbiorze danych. +NEGBINOMDIST = ROZKŁAD.DWUM.PRZEC ## Zwraca ujemny rozkład dwumianowy. +NORMDIST = ROZKŁAD.NORMALNY ## Zwraca rozkład normalny skumulowany. +NORMINV = ROZKŁAD.NORMALNY.ODW ## Zwraca odwrotność rozkładu normalnego skumulowanego. +NORMSDIST = ROZKŁAD.NORMALNY.S ## Zwraca standardowy rozkład normalny skumulowany. +NORMSINV = ROZKŁAD.NORMALNY.S.ODW ## Zwraca odwrotność standardowego rozkładu normalnego skumulowanego. +PEARSON = PEARSON ## Zwraca współczynnik korelacji momentu iloczynu Pearsona. +PERCENTILE = PERCENTYL ## Wyznacza k-ty percentyl wartości w zakresie. +PERCENTRANK = PROCENT.POZYCJA ## Zwraca procentową pozycję wartości w zbiorze danych. +PERMUT = PERMUTACJE ## Zwraca liczbę permutacji dla danej liczby obiektów. +POISSON = ROZKŁAD.POISSON ## Zwraca rozkład Poissona. +PROB = PRAWDPD ## Zwraca prawdopodobieństwo, że wartości w zakresie leżą pomiędzy dwiema granicami. +QUARTILE = KWARTYL ## Wyznacza kwartyl zbioru danych. +RANK = POZYCJA ## Zwraca pozycję liczby na liście liczb. +RSQ = R.KWADRAT ## Zwraca kwadrat współczynnika korelacji momentu iloczynu Pearsona. +SKEW = SKOŚNOŚĆ ## Zwraca skośność rozkładu. +SLOPE = NACHYLENIE ## Zwraca nachylenie linii regresji liniowej. +SMALL = MIN.K ## Zwraca k-tą najmniejszą wartość ze zbioru danych. +STANDARDIZE = NORMALIZUJ ## Zwraca wartość znormalizowaną. +STDEV = ODCH.STANDARDOWE ## Szacuje odchylenie standardowe na podstawie próbki. +STDEVA = ODCH.STANDARDOWE.A ## Szacuje odchylenie standardowe na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. +STDEVP = ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji. +STDEVPA = ODCH.STANDARD.POPUL.A ## Oblicza odchylenie standardowe na podstawie całej populacji, z uwzględnieniem liczb, teksów i wartości logicznych. +STEYX = REGBŁSTD ## Zwraca błąd standardowy przewidzianej wartości y dla każdej wartości x w regresji. +TDIST = ROZKŁAD.T ## Zwraca rozkład t-Studenta. +TINV = ROZKŁAD.T.ODW ## Zwraca odwrotność rozkładu t-Studenta. +TREND = REGLINW ## Zwraca wartości trendu liniowego. +TRIMMEAN = ŚREDNIA.WEWN ## Zwraca średnią wartość dla wnętrza zbioru danych. +TTEST = TEST.T ## Zwraca prawdopodobieństwo związane z testem t-Studenta. +VAR = WARIANCJA ## Szacuje wariancję na podstawie próbki. +VARA = WARIANCJA.A ## Szacuje wariancję na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. +VARP = WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji. +VARPA = WARIANCJA.POPUL.A ## Oblicza wariancję na podstawie całej populacji, z uwzględnieniem liczb, tekstów i wartości logicznych. +WEIBULL = ROZKŁAD.WEIBULL ## Zwraca rozkład Weibulla. +ZTEST = TEST.Z ## Zwraca wartość jednostronnego prawdopodobieństwa testu z. + + +## +## Text functions Funkcje tekstowe +## +ASC = ASC ## Zamienia litery angielskie lub katakana o pełnej szerokości (dwubajtowe) w ciągu znaków na znaki o szerokości połówkowej (jednobajtowe). +BAHTTEXT = BAHTTEXT ## Konwertuje liczbę na tekst, stosując format walutowy ß (baht). +CHAR = ZNAK ## Zwraca znak o podanym numerze kodu. +CLEAN = OCZYŚĆ ## Usuwa z tekstu wszystkie znaki, które nie mogą być drukowane. +CODE = KOD ## Zwraca kod numeryczny pierwszego znaku w ciągu tekstowym. +CONCATENATE = ZŁĄCZ.TEKSTY ## Łączy kilka oddzielnych tekstów w jeden tekst. +DOLLAR = KWOTA ## Konwertuje liczbę na tekst, stosując format walutowy $ (dolar). +EXACT = PORÓWNAJ ## Sprawdza identyczność dwóch wartości tekstowych. +FIND = ZNAJDŹ ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). +FINDB = ZNAJDŹB ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). +FIXED = ZAOKR.DO.TEKST ## Formatuje liczbę jako tekst przy stałej liczbie miejsc dziesiętnych. +JIS = JIS ## Zmienia litery angielskie lub katakana o szerokości połówkowej (jednobajtowe) w ciągu znaków na znaki o pełnej szerokości (dwubajtowe). +LEFT = LEWY ## Zwraca skrajne lewe znaki z wartości tekstowej. +LEFTB = LEWYB ## Zwraca skrajne lewe znaki z wartości tekstowej. +LEN = DŁ ## Zwraca liczbę znaków ciągu tekstowego. +LENB = DŁ.B ## Zwraca liczbę znaków ciągu tekstowego. +LOWER = LITERY.MAŁE ## Konwertuje wielkie litery tekstu na małe litery. +MID = FRAGMENT.TEKSTU ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. +MIDB = FRAGMENT.TEKSTU.B ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. +PHONETIC = PHONETIC ## Wybiera znaki fonetyczne (furigana) z ciągu tekstowego. +PROPER = Z.WIELKIEJ.LITERY ## Zastępuje pierwszą literę każdego wyrazu tekstu wielką literą. +REPLACE = ZASTĄP ## Zastępuje znaki w tekście. +REPLACEB = ZASTĄP.B ## Zastępuje znaki w tekście. +REPT = POWT ## Powiela tekst daną liczbę razy. +RIGHT = PRAWY ## Zwraca skrajne prawe znaki z wartości tekstowej. +RIGHTB = PRAWYB ## Zwraca skrajne prawe znaki z wartości tekstowej. +SEARCH = SZUKAJ.TEKST ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). +SEARCHB = SZUKAJ.TEKST.B ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). +SUBSTITUTE = PODSTAW ## Podstawia nowy tekst w miejsce poprzedniego tekstu w ciągu tekstowym. +T = T ## Konwertuje argumenty na tekst. +TEXT = TEKST ## Formatuje liczbę i konwertuje ją na tekst. +TRIM = USUŃ.ZBĘDNE.ODSTĘPY ## Usuwa spacje z tekstu. +UPPER = LITERY.WIELKIE ## Konwertuje znaki tekstu na wielkie litery. +VALUE = WARTOŚĆ ## Konwertuje argument tekstowy na liczbę. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config new file mode 100755 index 0000000..904f99f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = R$ + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULO! +DIV0 = #DIV/0! +VALUE = #VALOR! +REF = #REF! +NAME = #NOME? +NUM = #NÚM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions new file mode 100755 index 0000000..a062a7f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/br/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Funções Suplemento e Automação +## +GETPIVOTDATA = INFODADOSTABELADINÂMICA ## Retorna os dados armazenados em um relatório de tabela dinâmica + + +## +## Cube functions Funções de Cubo +## +CUBEKPIMEMBER = MEMBROKPICUBO ## Retorna o nome de um KPI (indicador de desempenho-chave), uma propriedade e uma medida e exibe o nome e a propriedade na célula. Um KPI é uma medida quantificável, como o lucro bruto mensal ou a rotatividade trimestral dos funcionários, usada para monitorar o desempenho de uma organização. +CUBEMEMBER = MEMBROCUBO ## Retorna um membro ou tupla em uma hierarquia de cubo. Use para validar se o membro ou tupla existe no cubo. +CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Retorna o valor da propriedade de um membro no cubo. Usada para validar a existência do nome do membro no cubo e para retornar a propriedade especificada para esse membro. +CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Retorna o enésimo membro, ou o membro ordenado, em um conjunto. Use para retornar um ou mais elementos em um conjunto, assim como o melhor vendedor ou os dez melhores alunos. +CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou tuplas enviando uma expressão do conjunto para o cubo no servidor, que cria o conjunto e o retorna para o Microsoft Office Excel. +CUBESETCOUNT = CONTAGEMCONJUNTOCUBO ## Retorna o número de itens em um conjunto. +CUBEVALUE = VALORCUBO ## Retorna um valor agregado de um cubo. + + +## +## Database functions Funções de banco de dados +## +DAVERAGE = BDMÉDIA ## Retorna a média das entradas selecionadas de um banco de dados +DCOUNT = BDCONTAR ## Conta as células que contêm números em um banco de dados +DCOUNTA = BDCONTARA ## Conta células não vazias em um banco de dados +DGET = BDEXTRAIR ## Extrai de um banco de dados um único registro que corresponde a um critério específico +DMAX = BDMÁX ## Retorna o valor máximo de entradas selecionadas de um banco de dados +DMIN = BDMÍN ## Retorna o valor mínimo de entradas selecionadas de um banco de dados +DPRODUCT = BDMULTIPL ## Multiplica os valores em um campo específico de registros que correspondem ao critério em um banco de dados +DSTDEV = BDEST ## Estima o desvio padrão com base em uma amostra de entradas selecionadas de um banco de dados +DSTDEVP = BDDESVPA ## Calcula o desvio padrão com base na população inteira de entradas selecionadas de um banco de dados +DSUM = BDSOMA ## Adiciona os números à coluna de campos de registros do banco de dados que correspondem ao critério +DVAR = BDVAREST ## Estima a variância com base em uma amostra de entradas selecionadas de um banco de dados +DVARP = BDVARP ## Calcula a variância com base na população inteira de entradas selecionadas de um banco de dados + + +## +## Date and time functions Funções de data e hora +## +DATE = DATA ## Retorna o número de série de uma data específica +DATEVALUE = DATA.VALOR ## Converte uma data na forma de texto para um número de série +DAY = DIA ## Converte um número de série em um dia do mês +DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base em um ano de 360 dias +EDATE = DATAM ## Retorna o número de série da data que é o número indicado de meses antes ou depois da data inicial +EOMONTH = FIMMÊS ## Retorna o número de série do último dia do mês antes ou depois de um número especificado de meses +HOUR = HORA ## Converte um número de série em uma hora +MINUTE = MINUTO ## Converte um número de série em um minuto +MONTH = MÊS ## Converte um número de série em um mês +NETWORKDAYS = DIATRABALHOTOTAL ## Retorna o número de dias úteis inteiros entre duas datas +NOW = AGORA ## Retorna o número de série seqüencial da data e hora atuais +SECOND = SEGUNDO ## Converte um número de série em um segundo +TIME = HORA ## Retorna o número de série de uma hora específica +TIMEVALUE = VALOR.TEMPO ## Converte um horário na forma de texto para um número de série +TODAY = HOJE ## Retorna o número de série da data de hoje +WEEKDAY = DIA.DA.SEMANA ## Converte um número de série em um dia da semana +WEEKNUM = NÚMSEMANA ## Converte um número de série em um número que representa onde a semana cai numericamente em um ano +WORKDAY = DIATRABALHO ## Retorna o número de série da data antes ou depois de um número específico de dias úteis +YEAR = ANO ## Converte um número de série em um ano +YEARFRAC = FRAÇÃOANO ## Retorna a fração do ano que representa o número de dias entre data_inicial e data_final + + +## +## Engineering functions Funções de engenharia +## +BESSELI = BESSELI ## Retorna a função de Bessel In(x) modificada +BESSELJ = BESSELJ ## Retorna a função de Bessel Jn(x) +BESSELK = BESSELK ## Retorna a função de Bessel Kn(x) modificada +BESSELY = BESSELY ## Retorna a função de Bessel Yn(x) +BIN2DEC = BIN2DEC ## Converte um número binário em decimal +BIN2HEX = BIN2HEX ## Converte um número binário em hexadecimal +BIN2OCT = BIN2OCT ## Converte um número binário em octal +COMPLEX = COMPLEX ## Converte coeficientes reais e imaginários e um número complexo +CONVERT = CONVERTER ## Converte um número de um sistema de medida para outro +DEC2BIN = DECABIN ## Converte um número decimal em binário +DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal +DEC2OCT = DECAOCT ## Converte um número decimal em octal +DELTA = DELTA ## Testa se dois valores são iguais +ERF = FUNERRO ## Retorna a função de erro +ERFC = FUNERROCOMPL ## Retorna a função de erro complementar +GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite +HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário +HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal +HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal +IMABS = IMABS ## Retorna o valor absoluto (módulo) de um número complexo +IMAGINARY = IMAGINÁRIO ## Retorna o coeficiente imaginário de um número complexo +IMARGUMENT = IMARG ## Retorna o argumento teta, um ângulo expresso em radianos +IMCONJUGATE = IMCONJ ## Retorna o conjugado complexo de um número complexo +IMCOS = IMCOS ## Retorna o cosseno de um número complexo +IMDIV = IMDIV ## Retorna o quociente de dois números complexos +IMEXP = IMEXP ## Retorna o exponencial de um número complexo +IMLN = IMLN ## Retorna o logaritmo natural de um número complexo +IMLOG10 = IMLOG10 ## Retorna o logaritmo de base 10 de um número complexo +IMLOG2 = IMLOG2 ## Retorna o logaritmo de base 2 de um número complexo +IMPOWER = IMPOT ## Retorna um número complexo elevado a uma potência inteira +IMPRODUCT = IMPROD ## Retorna o produto de números complexos +IMREAL = IMREAL ## Retorna o coeficiente real de um número complexo +IMSIN = IMSENO ## Retorna o seno de um número complexo +IMSQRT = IMRAIZ ## Retorna a raiz quadrada de um número complexo +IMSUB = IMSUBTR ## Retorna a diferença entre dois números complexos +IMSUM = IMSOMA ## Retorna a soma de números complexos +OCT2BIN = OCTABIN ## Converte um número octal em binário +OCT2DEC = OCTADEC ## Converte um número octal em decimal +OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal + + +## +## Financial functions Funções financeiras +## +ACCRINT = JUROSACUM ## Retorna a taxa de juros acumulados de um título que paga uma taxa periódica de juros +ACCRINTM = JUROSACUMV ## Retorna os juros acumulados de um título que paga juros no vencimento +AMORDEGRC = AMORDEGRC ## Retorna a depreciação para cada período contábil usando o coeficiente de depreciação +AMORLINC = AMORLINC ## Retorna a depreciação para cada período contábil +COUPDAYBS = CUPDIASINLIQ ## Retorna o número de dias do início do período de cupom até a data de liquidação +COUPDAYS = CUPDIAS ## Retorna o número de dias no período de cupom que contém a data de quitação +COUPDAYSNC = CUPDIASPRÓX ## Retorna o número de dias da data de liquidação até a data do próximo cupom +COUPNCD = CUPDATAPRÓX ## Retorna a próxima data de cupom após a data de quitação +COUPNUM = CUPNÚM ## Retorna o número de cupons pagáveis entre as datas de quitação e vencimento +COUPPCD = CUPDATAANT ## Retorna a data de cupom anterior à data de quitação +CUMIPMT = PGTOJURACUM ## Retorna os juros acumulados pagos entre dois períodos +CUMPRINC = PGTOCAPACUM ## Retorna o capital acumulado pago sobre um empréstimo entre dois períodos +DB = BD ## Retorna a depreciação de um ativo para um período especificado, usando o método de balanço de declínio fixo +DDB = BDD ## Retorna a depreciação de um ativo com relação a um período especificado usando o método de saldos decrescentes duplos ou qualquer outro método especificado por você +DISC = DESC ## Retorna a taxa de desconto de um título +DOLLARDE = MOEDADEC ## Converte um preço em formato de moeda, na forma fracionária, em um preço na forma decimal +DOLLARFR = MOEDAFRA ## Converte um preço, apresentado na forma decimal, em um preço apresentado na forma fracionária +DURATION = DURAÇÃO ## Retorna a duração anual de um título com pagamentos de juros periódicos +EFFECT = EFETIVA ## Retorna a taxa de juros anual efetiva +FV = VF ## Retorna o valor futuro de um investimento +FVSCHEDULE = VFPLANO ## Retorna o valor futuro de um capital inicial após a aplicação de uma série de taxas de juros compostas +INTRATE = TAXAJUROS ## Retorna a taxa de juros de um título totalmente investido +IPMT = IPGTO ## Retorna o pagamento de juros para um investimento em um determinado período +IRR = TIR ## Retorna a taxa interna de retorno de uma série de fluxos de caixa +ISPMT = ÉPGTO ## Calcula os juros pagos durante um período específico de um investimento +MDURATION = MDURAÇÃO ## Retorna a duração de Macauley modificada para um título com um valor de paridade equivalente a R$ 100 +MIRR = MTIR ## Calcula a taxa interna de retorno em que fluxos de caixa positivos e negativos são financiados com diferentes taxas +NOMINAL = NOMINAL ## Retorna a taxa de juros nominal anual +NPER = NPER ## Retorna o número de períodos de um investimento +NPV = VPL ## Retorna o valor líquido atual de um investimento com base em uma série de fluxos de caixa periódicos e em uma taxa de desconto +ODDFPRICE = PREÇOPRIMINC ## Retorna o preço por R$ 100 de valor nominal de um título com um primeiro período indefinido +ODDFYIELD = LUCROPRIMINC ## Retorna o rendimento de um título com um primeiro período indefinido +ODDLPRICE = PREÇOÚLTINC ## Retorna o preço por R$ 100 de valor nominal de um título com um último período de cupom indefinido +ODDLYIELD = LUCROÚLTINC ## Retorna o rendimento de um título com um último período indefinido +PMT = PGTO ## Retorna o pagamento periódico de uma anuidade +PPMT = PPGTO ## Retorna o pagamento de capital para determinado período de investimento +PRICE = PREÇO ## Retorna a preço por R$ 100,00 de valor nominal de um título que paga juros periódicos +PRICEDISC = PREÇODESC ## Retorna o preço por R$ 100,00 de valor nominal de um título descontado +PRICEMAT = PREÇOVENC ## Retorna o preço por R$ 100,00 de valor nominal de um título que paga juros no vencimento +PV = VP ## Retorna o valor presente de um investimento +RATE = TAXA ## Retorna a taxa de juros por período de uma anuidade +RECEIVED = RECEBER ## Retorna a quantia recebida no vencimento de um título totalmente investido +SLN = DPD ## Retorna a depreciação em linha reta de um ativo durante um período +SYD = SDA ## Retorna a depreciação dos dígitos da soma dos anos de um ativo para um período especificado +TBILLEQ = OTN ## Retorna o rendimento de um título equivalente a uma obrigação do Tesouro +TBILLPRICE = OTNVALOR ## Retorna o preço por R$ 100,00 de valor nominal de uma obrigação do Tesouro +TBILLYIELD = OTNLUCRO ## Retorna o rendimento de uma obrigação do Tesouro +VDB = BDV ## Retorna a depreciação de um ativo para um período especificado ou parcial usando um método de balanço declinante +XIRR = XTIR ## Fornece a taxa interna de retorno para um programa de fluxos de caixa que não é necessariamente periódico +XNPV = XVPL ## Retorna o valor presente líquido de um programa de fluxos de caixa que não é necessariamente periódico +YIELD = LUCRO ## Retorna o lucro de um título que paga juros periódicos +YIELDDISC = LUCRODESC ## Retorna o rendimento anual de um título descontado. Por exemplo, uma obrigação do Tesouro +YIELDMAT = LUCROVENC ## Retorna o lucro anual de um título que paga juros no vencimento + + +## +## Information functions Funções de informação +## +CELL = CÉL ## Retorna informações sobre formatação, localização ou conteúdo de uma célula +ERROR.TYPE = TIPO.ERRO ## Retorna um número correspondente a um tipo de erro +INFO = INFORMAÇÃO ## Retorna informações sobre o ambiente operacional atual +ISBLANK = ÉCÉL.VAZIA ## Retorna VERDADEIRO se o valor for vazio +ISERR = ÉERRO ## Retorna VERDADEIRO se o valor for um valor de erro diferente de #N/D +ISERROR = ÉERROS ## Retorna VERDADEIRO se o valor for um valor de erro +ISEVEN = ÉPAR ## Retorna VERDADEIRO se o número for par +ISLOGICAL = ÉLÓGICO ## Retorna VERDADEIRO se o valor for um valor lógico +ISNA = É.NÃO.DISP ## Retorna VERDADEIRO se o valor for o valor de erro #N/D +ISNONTEXT = É.NÃO.TEXTO ## Retorna VERDADEIRO se o valor for diferente de texto +ISNUMBER = ÉNÚM ## Retorna VERDADEIRO se o valor for um número +ISODD = ÉIMPAR ## Retorna VERDADEIRO se o número for ímpar +ISREF = ÉREF ## Retorna VERDADEIRO se o valor for uma referência +ISTEXT = ÉTEXTO ## Retorna VERDADEIRO se o valor for texto +N = N ## Retorna um valor convertido em um número +NA = NÃO.DISP ## Retorna o valor de erro #N/D +TYPE = TIPO ## Retorna um número indicando o tipo de dados de um valor + + +## +## Logical functions Funções lógicas +## +AND = E ## Retorna VERDADEIRO se todos os seus argumentos forem VERDADEIROS +FALSE = FALSO ## Retorna o valor lógico FALSO +IF = SE ## Especifica um teste lógico a ser executado +IFERROR = SEERRO ## Retornará um valor que você especifica se uma fórmula for avaliada para um erro; do contrário, retornará o resultado da fórmula +NOT = NÃO ## Inverte o valor lógico do argumento +OR = OU ## Retorna VERDADEIRO se um dos argumentos for VERDADEIRO +TRUE = VERDADEIRO ## Retorna o valor lógico VERDADEIRO + + +## +## Lookup and reference functions Funções de pesquisa e referência +## +ADDRESS = ENDEREÇO ## Retorna uma referência como texto para uma única célula em uma planilha +AREAS = ÁREAS ## Retorna o número de áreas em uma referência +CHOOSE = ESCOLHER ## Escolhe um valor a partir de uma lista de valores +COLUMN = COL ## Retorna o número da coluna de uma referência +COLUMNS = COLS ## Retorna o número de colunas em uma referência +HLOOKUP = PROCH ## Procura na linha superior de uma matriz e retorna o valor da célula especificada +HYPERLINK = HYPERLINK ## Cria um atalho ou salto que abre um documento armazenado em um servidor de rede, uma intranet ou na Internet +INDEX = ÍNDICE ## Usa um índice para escolher um valor de uma referência ou matriz +INDIRECT = INDIRETO ## Retorna uma referência indicada por um valor de texto +LOOKUP = PROC ## Procura valores em um vetor ou em uma matriz +MATCH = CORRESP ## Procura valores em uma referência ou em uma matriz +OFFSET = DESLOC ## Retorna um deslocamento de referência com base em uma determinada referência +ROW = LIN ## Retorna o número da linha de uma referência +ROWS = LINS ## Retorna o número de linhas em uma referência +RTD = RTD ## Recupera dados em tempo real de um programa que ofereça suporte a automação COM (automação: uma forma de trabalhar com objetos de um aplicativo a partir de outro aplicativo ou ferramenta de desenvolvimento. Chamada inicialmente de automação OLE, a automação é um padrão industrial e um recurso do modelo de objeto componente (COM).) +TRANSPOSE = TRANSPOR ## Retorna a transposição de uma matriz +VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e move ao longo da linha para retornar o valor de uma célula + + +## +## Math and trigonometry functions Funções matemáticas e trigonométricas +## +ABS = ABS ## Retorna o valor absoluto de um número +ACOS = ACOS ## Retorna o arco cosseno de um número +ACOSH = ACOSH ## Retorna o cosseno hiperbólico inverso de um número +ASIN = ASEN ## Retorna o arco seno de um número +ASINH = ASENH ## Retorna o seno hiperbólico inverso de um número +ATAN = ATAN ## Retorna o arco tangente de um número +ATAN2 = ATAN2 ## Retorna o arco tangente das coordenadas x e y especificadas +ATANH = ATANH ## Retorna a tangente hiperbólica inversa de um número +CEILING = TETO ## Arredonda um número para o inteiro mais próximo ou para o múltiplo mais próximo de significância +COMBIN = COMBIN ## Retorna o número de combinações de um determinado número de objetos +COS = COS ## Retorna o cosseno de um número +COSH = COSH ## Retorna o cosseno hiperbólico de um número +DEGREES = GRAUS ## Converte radianos em graus +EVEN = PAR ## Arredonda um número para cima até o inteiro par mais próximo +EXP = EXP ## Retorna e elevado à potência de um número especificado +FACT = FATORIAL ## Retorna o fatorial de um número +FACTDOUBLE = FATDUPLO ## Retorna o fatorial duplo de um número +FLOOR = ARREDMULTB ## Arredonda um número para baixo até zero +GCD = MDC ## Retorna o máximo divisor comum +INT = INT ## Arredonda um número para baixo até o número inteiro mais próximo +LCM = MMC ## Retorna o mínimo múltiplo comum +LN = LN ## Retorna o logaritmo natural de um número +LOG = LOG ## Retorna o logaritmo de um número de uma base especificada +LOG10 = LOG10 ## Retorna o logaritmo de base 10 de um número +MDETERM = MATRIZ.DETERM ## Retorna o determinante de uma matriz de uma variável do tipo matriz +MINVERSE = MATRIZ.INVERSO ## Retorna a matriz inversa de uma matriz +MMULT = MATRIZ.MULT ## Retorna o produto de duas matrizes +MOD = RESTO ## Retorna o resto da divisão +MROUND = MARRED ## Retorna um número arredondado ao múltiplo desejado +MULTINOMIAL = MULTINOMIAL ## Retorna o multinomial de um conjunto de números +ODD = ÍMPAR ## Arredonda um número para cima até o inteiro ímpar mais próximo +PI = PI ## Retorna o valor de Pi +POWER = POTÊNCIA ## Fornece o resultado de um número elevado a uma potência +PRODUCT = MULT ## Multiplica seus argumentos +QUOTIENT = QUOCIENTE ## Retorna a parte inteira de uma divisão +RADIANS = RADIANOS ## Converte graus em radianos +RAND = ALEATÓRIO ## Retorna um número aleatório entre 0 e 1 +RANDBETWEEN = ALEATÓRIOENTRE ## Retorna um número aleatório entre os números especificados +ROMAN = ROMANO ## Converte um algarismo arábico em romano, como texto +ROUND = ARRED ## Arredonda um número até uma quantidade especificada de dígitos +ROUNDDOWN = ARREDONDAR.PARA.BAIXO ## Arredonda um número para baixo até zero +ROUNDUP = ARREDONDAR.PARA.CIMA ## Arredonda um número para cima, afastando-o de zero +SERIESSUM = SOMASEQÜÊNCIA ## Retorna a soma de uma série polinomial baseada na fórmula +SIGN = SINAL ## Retorna o sinal de um número +SIN = SEN ## Retorna o seno de um ângulo dado +SINH = SENH ## Retorna o seno hiperbólico de um número +SQRT = RAIZ ## Retorna uma raiz quadrada positiva +SQRTPI = RAIZPI ## Retorna a raiz quadrada de (núm* pi) +SUBTOTAL = SUBTOTAL ## Retorna um subtotal em uma lista ou em um banco de dados +SUM = SOMA ## Soma seus argumentos +SUMIF = SOMASE ## Adiciona as células especificadas por um determinado critério +SUMIFS = SOMASE ## Adiciona as células em um intervalo que atende a vários critérios +SUMPRODUCT = SOMARPRODUTO ## Retorna a soma dos produtos de componentes correspondentes de matrizes +SUMSQ = SOMAQUAD ## Retorna a soma dos quadrados dos argumentos +SUMX2MY2 = SOMAX2DY2 ## Retorna a soma da diferença dos quadrados dos valores correspondentes em duas matrizes +SUMX2PY2 = SOMAX2SY2 ## Retorna a soma da soma dos quadrados dos valores correspondentes em duas matrizes +SUMXMY2 = SOMAXMY2 ## Retorna a soma dos quadrados das diferenças dos valores correspondentes em duas matrizes +TAN = TAN ## Retorna a tangente de um número +TANH = TANH ## Retorna a tangente hiperbólica de um número +TRUNC = TRUNCAR ## Trunca um número para um inteiro + + +## +## Statistical functions Funções estatísticas +## +AVEDEV = DESV.MÉDIO ## Retorna a média aritmética dos desvios médios dos pontos de dados a partir de sua média +AVERAGE = MÉDIA ## Retorna a média dos argumentos +AVERAGEA = MÉDIAA ## Retorna a média dos argumentos, inclusive números, texto e valores lógicos +AVERAGEIF = MÉDIASE ## Retorna a média (média aritmética) de todas as células em um intervalo que atendem a um determinado critério +AVERAGEIFS = MÉDIASES ## Retorna a média (média aritmética) de todas as células que atendem a múltiplos critérios. +BETADIST = DISTBETA ## Retorna a função de distribuição cumulativa beta +BETAINV = BETA.ACUM.INV ## Retorna o inverso da função de distribuição cumulativa para uma distribuição beta especificada +BINOMDIST = DISTRBINOM ## Retorna a probabilidade de distribuição binomial do termo individual +CHIDIST = DIST.QUI ## Retorna a probabilidade unicaudal da distribuição qui-quadrada +CHIINV = INV.QUI ## Retorna o inverso da probabilidade uni-caudal da distribuição qui-quadrada +CHITEST = TESTE.QUI ## Retorna o teste para independência +CONFIDENCE = INT.CONFIANÇA ## Retorna o intervalo de confiança para uma média da população +CORREL = CORREL ## Retorna o coeficiente de correlação entre dois conjuntos de dados +COUNT = CONT.NÚM ## Calcula quantos números há na lista de argumentos +COUNTA = CONT.VALORES ## Calcula quantos valores há na lista de argumentos +COUNTBLANK = CONTAR.VAZIO ## Conta o número de células vazias no intervalo especificado +COUNTIF = CONT.SE ## Calcula o número de células não vazias em um intervalo que corresponde a determinados critérios +COUNTIFS = CONT.SES ## Conta o número de células dentro de um intervalo que atende a múltiplos critérios +COVAR = COVAR ## Retorna a covariância, a média dos produtos dos desvios pares +CRITBINOM = CRIT.BINOM ## Retorna o menor valor para o qual a distribuição binomial cumulativa é menor ou igual ao valor padrão +DEVSQ = DESVQ ## Retorna a soma dos quadrados dos desvios +EXPONDIST = DISTEXPON ## Retorna a distribuição exponencial +FDIST = DISTF ## Retorna a distribuição de probabilidade F +FINV = INVF ## Retorna o inverso da distribuição de probabilidades F +FISHER = FISHER ## Retorna a transformação Fisher +FISHERINV = FISHERINV ## Retorna o inverso da transformação Fisher +FORECAST = PREVISÃO ## Retorna um valor ao longo de uma linha reta +FREQUENCY = FREQÜÊNCIA ## Retorna uma distribuição de freqüência como uma matriz vertical +FTEST = TESTEF ## Retorna o resultado de um teste F +GAMMADIST = DISTGAMA ## Retorna a distribuição gama +GAMMAINV = INVGAMA ## Retorna o inverso da distribuição cumulativa gama +GAMMALN = LNGAMA ## Retorna o logaritmo natural da função gama, G(x) +GEOMEAN = MÉDIA.GEOMÉTRICA ## Retorna a média geométrica +GROWTH = CRESCIMENTO ## Retorna valores ao longo de uma tendência exponencial +HARMEAN = MÉDIA.HARMÔNICA ## Retorna a média harmônica +HYPGEOMDIST = DIST.HIPERGEOM ## Retorna a distribuição hipergeométrica +INTERCEPT = INTERCEPÇÃO ## Retorna a intercepção da linha de regressão linear +KURT = CURT ## Retorna a curtose de um conjunto de dados +LARGE = MAIOR ## Retorna o maior valor k-ésimo de um conjunto de dados +LINEST = PROJ.LIN ## Retorna os parâmetros de uma tendência linear +LOGEST = PROJ.LOG ## Retorna os parâmetros de uma tendência exponencial +LOGINV = INVLOG ## Retorna o inverso da distribuição lognormal +LOGNORMDIST = DIST.LOGNORMAL ## Retorna a distribuição lognormal cumulativa +MAX = MÁXIMO ## Retorna o valor máximo em uma lista de argumentos +MAXA = MÁXIMOA ## Retorna o maior valor em uma lista de argumentos, inclusive números, texto e valores lógicos +MEDIAN = MED ## Retorna a mediana dos números indicados +MIN = MÍNIMO ## Retorna o valor mínimo em uma lista de argumentos +MINA = MÍNIMOA ## Retorna o menor valor em uma lista de argumentos, inclusive números, texto e valores lógicos +MODE = MODO ## Retorna o valor mais comum em um conjunto de dados +NEGBINOMDIST = DIST.BIN.NEG ## Retorna a distribuição binomial negativa +NORMDIST = DIST.NORM ## Retorna a distribuição cumulativa normal +NORMINV = INV.NORM ## Retorna o inverso da distribuição cumulativa normal +NORMSDIST = DIST.NORMP ## Retorna a distribuição cumulativa normal padrão +NORMSINV = INV.NORMP ## Retorna o inverso da distribuição cumulativa normal padrão +PEARSON = PEARSON ## Retorna o coeficiente de correlação do momento do produto Pearson +PERCENTILE = PERCENTIL ## Retorna o k-ésimo percentil de valores em um intervalo +PERCENTRANK = ORDEM.PORCENTUAL ## Retorna a ordem percentual de um valor em um conjunto de dados +PERMUT = PERMUT ## Retorna o número de permutações de um determinado número de objetos +POISSON = POISSON ## Retorna a distribuição Poisson +PROB = PROB ## Retorna a probabilidade de valores em um intervalo estarem entre dois limites +QUARTILE = QUARTIL ## Retorna o quartil do conjunto de dados +RANK = ORDEM ## Retorna a posição de um número em uma lista de números +RSQ = RQUAD ## Retorna o quadrado do coeficiente de correlação do momento do produto de Pearson +SKEW = DISTORÇÃO ## Retorna a distorção de uma distribuição +SLOPE = INCLINAÇÃO ## Retorna a inclinação da linha de regressão linear +SMALL = MENOR ## Retorna o menor valor k-ésimo do conjunto de dados +STANDARDIZE = PADRONIZAR ## Retorna um valor normalizado +STDEV = DESVPAD ## Estima o desvio padrão com base em uma amostra +STDEVA = DESVPADA ## Estima o desvio padrão com base em uma amostra, inclusive números, texto e valores lógicos +STDEVP = DESVPADP ## Calcula o desvio padrão com base na população total +STDEVPA = DESVPADPA ## Calcula o desvio padrão com base na população total, inclusive números, texto e valores lógicos +STEYX = EPADYX ## Retorna o erro padrão do valor-y previsto para cada x da regressão +TDIST = DISTT ## Retorna a distribuição t de Student +TINV = INVT ## Retorna o inverso da distribuição t de Student +TREND = TENDÊNCIA ## Retorna valores ao longo de uma tendência linear +TRIMMEAN = MÉDIA.INTERNA ## Retorna a média do interior de um conjunto de dados +TTEST = TESTET ## Retorna a probabilidade associada ao teste t de Student +VAR = VAR ## Estima a variância com base em uma amostra +VARA = VARA ## Estima a variância com base em uma amostra, inclusive números, texto e valores lógicos +VARP = VARP ## Calcula a variância com base na população inteira +VARPA = VARPA ## Calcula a variância com base na população total, inclusive números, texto e valores lógicos +WEIBULL = WEIBULL ## Retorna a distribuição Weibull +ZTEST = TESTEZ ## Retorna o valor de probabilidade uni-caudal de um teste-z + + +## +## Text functions Funções de texto +## +ASC = ASC ## Altera letras do inglês ou katakana de largura total (bytes duplos) dentro de uma seqüência de caracteres para caracteres de meia largura (byte único) +BAHTTEXT = BAHTTEXT ## Converte um número em um texto, usando o formato de moeda ß (baht) +CHAR = CARACT ## Retorna o caractere especificado pelo número de código +CLEAN = TIRAR ## Remove todos os caracteres do texto que não podem ser impressos +CODE = CÓDIGO ## Retorna um código numérico para o primeiro caractere de uma seqüência de caracteres de texto +CONCATENATE = CONCATENAR ## Agrupa vários itens de texto em um único item de texto +DOLLAR = MOEDA ## Converte um número em texto, usando o formato de moeda $ (dólar) +EXACT = EXATO ## Verifica se dois valores de texto são idênticos +FIND = PROCURAR ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) +FINDB = PROCURARB ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) +FIXED = DEF.NÚM.DEC ## Formata um número como texto com um número fixo de decimais +JIS = JIS ## Altera letras do inglês ou katakana de meia largura (byte único) dentro de uma seqüência de caracteres para caracteres de largura total (bytes duplos) +LEFT = ESQUERDA ## Retorna os caracteres mais à esquerda de um valor de texto +LEFTB = ESQUERDAB ## Retorna os caracteres mais à esquerda de um valor de texto +LEN = NÚM.CARACT ## Retorna o número de caracteres em uma seqüência de texto +LENB = NÚM.CARACTB ## Retorna o número de caracteres em uma seqüência de texto +LOWER = MINÚSCULA ## Converte texto para minúsculas +MID = EXT.TEXTO ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada +MIDB = EXT.TEXTOB ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada +PHONETIC = FONÉTICA ## Extrai os caracteres fonéticos (furigana) de uma seqüência de caracteres de texto +PROPER = PRI.MAIÚSCULA ## Coloca a primeira letra de cada palavra em maiúscula em um valor de texto +REPLACE = MUDAR ## Muda os caracteres dentro do texto +REPLACEB = MUDARB ## Muda os caracteres dentro do texto +REPT = REPT ## Repete o texto um determinado número de vezes +RIGHT = DIREITA ## Retorna os caracteres mais à direita de um valor de texto +RIGHTB = DIREITAB ## Retorna os caracteres mais à direita de um valor de texto +SEARCH = LOCALIZAR ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) +SEARCHB = LOCALIZARB ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) +SUBSTITUTE = SUBSTITUIR ## Substitui um novo texto por um texto antigo em uma seqüência de texto +T = T ## Converte os argumentos em texto +TEXT = TEXTO ## Formata um número e o converte em texto +TRIM = ARRUMAR ## Remove espaços do texto +UPPER = MAIÚSCULA ## Converte o texto em maiúsculas +VALUE = VALOR ## Converte um argumento de texto em um número diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config new file mode 100755 index 0000000..cd85c17 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = € + + +## +## Excel Error Codes (For future use) + +## +NULL = #NULO! +DIV0 = #DIV/0! +VALUE = #VALOR! +REF = #REF! +NAME = #NOME? +NUM = #NÚM! +NA = #N/D diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions new file mode 100755 index 0000000..ba4eb47 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/pt/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Funções de Suplemento e Automatização +## +GETPIVOTDATA = OBTERDADOSDIN ## Devolve dados armazenados num relatório de Tabela Dinâmica + + +## +## Cube functions Funções de cubo +## +CUBEKPIMEMBER = MEMBROKPICUBO ## Devolve o nome, propriedade e medição de um KPI (key performance indicator) e apresenta o nome e a propriedade na célula. Um KPI é uma medida quantificável, como, por exemplo, o lucro mensal bruto ou a rotatividade trimestral de pessoal, utilizada para monitorizar o desempenho de uma organização. +CUBEMEMBER = MEMBROCUBO ## Devolve um membro ou cadeia de identificação numa hierarquia de cubo. Utilizada para validar a existência do membro ou cadeia de identificação no cubo. +CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Devolve o valor de uma propriedade de membro no cubo. Utilizada para validar a existência de um nome de membro no cubo e para devolver a propriedade especificada para esse membro. +CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Devolve o enésimo ou a classificação mais alta num conjunto. Utilizada para devolver um ou mais elementos num conjunto, tal como o melhor vendedor ou os 10 melhores alunos. +CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou cadeias de identificação enviando uma expressão de conjunto para o cubo no servidor, que cria o conjunto e, em seguida, devolve o conjunto ao Microsoft Office Excel. +CUBESETCOUNT = CONTARCONJUNTOCUBO ## Devolve o número de itens num conjunto. +CUBEVALUE = VALORCUBO ## Devolve um valor agregado do cubo. + + +## +## Database functions Funções de base de dados +## +DAVERAGE = BDMÉDIA ## Devolve a média das entradas da base de dados seleccionadas +DCOUNT = BDCONTAR ## Conta as células que contêm números numa base de dados +DCOUNTA = BDCONTAR.VAL ## Conta as células que não estejam em branco numa base de dados +DGET = BDOBTER ## Extrai de uma base de dados um único registo que corresponde aos critérios especificados +DMAX = BDMÁX ## Devolve o valor máximo das entradas da base de dados seleccionadas +DMIN = BDMÍN ## Devolve o valor mínimo das entradas da base de dados seleccionadas +DPRODUCT = BDMULTIPL ## Multiplica os valores de um determinado campo de registos que correspondem aos critérios numa base de dados +DSTDEV = BDDESVPAD ## Calcula o desvio-padrão com base numa amostra de entradas da base de dados seleccionadas +DSTDEVP = BDDESVPADP ## Calcula o desvio-padrão com base na população total das entradas da base de dados seleccionadas +DSUM = BDSOMA ## Adiciona os números na coluna de campo dos registos de base de dados que correspondem aos critérios +DVAR = BDVAR ## Calcula a variância com base numa amostra das entradas de base de dados seleccionadas +DVARP = BDVARP ## Calcula a variância com base na população total das entradas de base de dados seleccionadas + + +## +## Date and time functions Funções de data e hora +## +DATE = DATA ## Devolve o número de série de uma determinada data +DATEVALUE = DATA.VALOR ## Converte uma data em forma de texto num número de série +DAY = DIA ## Converte um número de série num dia do mês +DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base num ano com 360 dias +EDATE = DATAM ## Devolve um número de série de data que corresponde ao número de meses indicado antes ou depois da data de início +EOMONTH = FIMMÊS ## Devolve o número de série do último dia do mês antes ou depois de um número de meses especificado +HOUR = HORA ## Converte um número de série numa hora +MINUTE = MINUTO ## Converte um número de série num minuto +MONTH = MÊS ## Converte um número de série num mês +NETWORKDAYS = DIATRABALHOTOTAL ## Devolve o número total de dias úteis entre duas datas +NOW = AGORA ## Devolve o número de série da data e hora actuais +SECOND = SEGUNDO ## Converte um número de série num segundo +TIME = TEMPO ## Devolve o número de série de um determinado tempo +TIMEVALUE = VALOR.TEMPO ## Converte um tempo em forma de texto num número de série +TODAY = HOJE ## Devolve o número de série da data actual +WEEKDAY = DIA.SEMANA ## Converte um número de série num dia da semana +WEEKNUM = NÚMSEMANA ## Converte um número de série num número que representa o número da semana num determinado ano +WORKDAY = DIA.TRABALHO ## Devolve o número de série da data antes ou depois de um número de dias úteis especificado +YEAR = ANO ## Converte um número de série num ano +YEARFRAC = FRACÇÃOANO ## Devolve a fracção de ano que representa o número de dias inteiros entre a data_de_início e a data_de_fim + + +## +## Engineering functions Funções de engenharia +## +BESSELI = BESSELI ## Devolve a função de Bessel modificada In(x) +BESSELJ = BESSELJ ## Devolve a função de Bessel Jn(x) +BESSELK = BESSELK ## Devolve a função de Bessel modificada Kn(x) +BESSELY = BESSELY ## Devolve a função de Bessel Yn(x) +BIN2DEC = BINADEC ## Converte um número binário em decimal +BIN2HEX = BINAHEX ## Converte um número binário em hexadecimal +BIN2OCT = BINAOCT ## Converte um número binário em octal +COMPLEX = COMPLEXO ## Converte coeficientes reais e imaginários num número complexo +CONVERT = CONVERTER ## Converte um número de um sistema de medida noutro +DEC2BIN = DECABIN ## Converte um número decimal em binário +DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal +DEC2OCT = DECAOCT ## Converte um número decimal em octal +DELTA = DELTA ## Testa se dois valores são iguais +ERF = FUNCERRO ## Devolve a função de erro +ERFC = FUNCERROCOMPL ## Devolve a função de erro complementar +GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite +HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário +HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal +HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal +IMABS = IMABS ## Devolve o valor absoluto (módulo) de um número complexo +IMAGINARY = IMAGINÁRIO ## Devolve o coeficiente imaginário de um número complexo +IMARGUMENT = IMARG ## Devolve o argumento Teta, um ângulo expresso em radianos +IMCONJUGATE = IMCONJ ## Devolve o conjugado complexo de um número complexo +IMCOS = IMCOS ## Devolve o co-seno de um número complexo +IMDIV = IMDIV ## Devolve o quociente de dois números complexos +IMEXP = IMEXP ## Devolve o exponencial de um número complexo +IMLN = IMLN ## Devolve o logaritmo natural de um número complexo +IMLOG10 = IMLOG10 ## Devolve o logaritmo de base 10 de um número complexo +IMLOG2 = IMLOG2 ## Devolve o logaritmo de base 2 de um número complexo +IMPOWER = IMPOT ## Devolve um número complexo elevado a uma potência inteira +IMPRODUCT = IMPROD ## Devolve o produto de números complexos +IMREAL = IMREAL ## Devolve o coeficiente real de um número complexo +IMSIN = IMSENO ## Devolve o seno de um número complexo +IMSQRT = IMRAIZ ## Devolve a raiz quadrada de um número complexo +IMSUB = IMSUBTR ## Devolve a diferença entre dois números complexos +IMSUM = IMSOMA ## Devolve a soma de números complexos +OCT2BIN = OCTABIN ## Converte um número octal em binário +OCT2DEC = OCTADEC ## Converte um número octal em decimal +OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal + + +## +## Financial functions Funções financeiras +## +ACCRINT = JUROSACUM ## Devolve os juros acumulados de um título que paga juros periódicos +ACCRINTM = JUROSACUMV ## Devolve os juros acumulados de um título que paga juros no vencimento +AMORDEGRC = AMORDEGRC ## Devolve a depreciação correspondente a cada período contabilístico utilizando um coeficiente de depreciação +AMORLINC = AMORLINC ## Devolve a depreciação correspondente a cada período contabilístico +COUPDAYBS = CUPDIASINLIQ ## Devolve o número de dias entre o início do período do cupão e a data de regularização +COUPDAYS = CUPDIAS ## Devolve o número de dias no período do cupão que contém a data de regularização +COUPDAYSNC = CUPDIASPRÓX ## Devolve o número de dias entre a data de regularização e a data do cupão seguinte +COUPNCD = CUPDATAPRÓX ## Devolve a data do cupão seguinte após a data de regularização +COUPNUM = CUPNÚM ## Devolve o número de cupões a serem pagos entre a data de regularização e a data de vencimento +COUPPCD = CUPDATAANT ## Devolve a data do cupão anterior antes da data de regularização +CUMIPMT = PGTOJURACUM ## Devolve os juros cumulativos pagos entre dois períodos +CUMPRINC = PGTOCAPACUM ## Devolve o capital cumulativo pago a título de empréstimo entre dois períodos +DB = BD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas fixas +DDB = BDD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas duplas ou qualquer outro método especificado +DISC = DESC ## Devolve a taxa de desconto de um título +DOLLARDE = MOEDADEC ## Converte um preço em unidade monetária, expresso como uma fracção, num preço em unidade monetária, expresso como um número decimal +DOLLARFR = MOEDAFRA ## Converte um preço em unidade monetária, expresso como um número decimal, num preço em unidade monetária, expresso como uma fracção +DURATION = DURAÇÃO ## Devolve a duração anual de um título com pagamentos de juros periódicos +EFFECT = EFECTIVA ## Devolve a taxa de juros anual efectiva +FV = VF ## Devolve o valor futuro de um investimento +FVSCHEDULE = VFPLANO ## Devolve o valor futuro de um capital inicial após a aplicação de uma série de taxas de juro compostas +INTRATE = TAXAJUROS ## Devolve a taxa de juros de um título investido na totalidade +IPMT = IPGTO ## Devolve o pagamento dos juros de um investimento durante um determinado período +IRR = TIR ## Devolve a taxa de rentabilidade interna para uma série de fluxos monetários +ISPMT = É.PGTO ## Calcula os juros pagos durante um período específico de um investimento +MDURATION = MDURAÇÃO ## Devolve a duração modificada de Macauley de um título com um valor de paridade equivalente a € 100 +MIRR = MTIR ## Devolve a taxa interna de rentabilidade em que os fluxos monetários positivos e negativos são financiados com taxas diferentes +NOMINAL = NOMINAL ## Devolve a taxa de juros nominal anual +NPER = NPER ## Devolve o número de períodos de um investimento +NPV = VAL ## Devolve o valor actual líquido de um investimento com base numa série de fluxos monetários periódicos e numa taxa de desconto +ODDFPRICE = PREÇOPRIMINC ## Devolve o preço por € 100 do valor nominal de um título com um período inicial incompleto +ODDFYIELD = LUCROPRIMINC ## Devolve o lucro de um título com um período inicial incompleto +ODDLPRICE = PREÇOÚLTINC ## Devolve o preço por € 100 do valor nominal de um título com um período final incompleto +ODDLYIELD = LUCROÚLTINC ## Devolve o lucro de um título com um período final incompleto +PMT = PGTO ## Devolve o pagamento periódico de uma anuidade +PPMT = PPGTO ## Devolve o pagamento sobre o capital de um investimento num determinado período +PRICE = PREÇO ## Devolve o preço por € 100 do valor nominal de um título que paga juros periódicos +PRICEDISC = PREÇODESC ## Devolve o preço por € 100 do valor nominal de um título descontado +PRICEMAT = PREÇOVENC ## Devolve o preço por € 100 do valor nominal de um título que paga juros no vencimento +PV = VA ## Devolve o valor actual de um investimento +RATE = TAXA ## Devolve a taxa de juros por período de uma anuidade +RECEIVED = RECEBER ## Devolve o montante recebido no vencimento de um título investido na totalidade +SLN = AMORT ## Devolve uma depreciação linear de um activo durante um período +SYD = AMORTD ## Devolve a depreciação por algarismos da soma dos anos de um activo durante um período especificado +TBILLEQ = OTN ## Devolve o lucro de um título equivalente a uma Obrigação do Tesouro +TBILLPRICE = OTNVALOR ## Devolve o preço por € 100 de valor nominal de uma Obrigação do Tesouro +TBILLYIELD = OTNLUCRO ## Devolve o lucro de uma Obrigação do Tesouro +VDB = BDV ## Devolve a depreciação de um activo relativo a um período específico ou parcial utilizando um método de quotas degressivas +XIRR = XTIR ## Devolve a taxa interna de rentabilidade de um plano de fluxos monetários que não seja necessariamente periódica +XNPV = XVAL ## Devolve o valor actual líquido de um plano de fluxos monetários que não seja necessariamente periódico +YIELD = LUCRO ## Devolve o lucro de um título que paga juros periódicos +YIELDDISC = LUCRODESC ## Devolve o lucro anual de um título emitido abaixo do valor nominal, por exemplo, uma Obrigação do Tesouro +YIELDMAT = LUCROVENC ## Devolve o lucro anual de um título que paga juros na data de vencimento + + +## +## Information functions Funções de informação +## +CELL = CÉL ## Devolve informações sobre a formatação, localização ou conteúdo de uma célula +ERROR.TYPE = TIPO.ERRO ## Devolve um número correspondente a um tipo de erro +INFO = INFORMAÇÃO ## Devolve informações sobre o ambiente de funcionamento actual +ISBLANK = É.CÉL.VAZIA ## Devolve VERDADEIRO se o valor estiver em branco +ISERR = É.ERROS ## Devolve VERDADEIRO se o valor for um valor de erro diferente de #N/D +ISERROR = É.ERRO ## Devolve VERDADEIRO se o valor for um valor de erro +ISEVEN = ÉPAR ## Devolve VERDADEIRO se o número for par +ISLOGICAL = É.LÓGICO ## Devolve VERDADEIRO se o valor for lógico +ISNA = É.NÃO.DISP ## Devolve VERDADEIRO se o valor for o valor de erro #N/D +ISNONTEXT = É.NÃO.TEXTO ## Devolve VERDADEIRO se o valor não for texto +ISNUMBER = É.NÚM ## Devolve VERDADEIRO se o valor for um número +ISODD = ÉÍMPAR ## Devolve VERDADEIRO se o número for ímpar +ISREF = É.REF ## Devolve VERDADEIRO se o valor for uma referência +ISTEXT = É.TEXTO ## Devolve VERDADEIRO se o valor for texto +N = N ## Devolve um valor convertido num número +NA = NÃO.DISP ## Devolve o valor de erro #N/D +TYPE = TIPO ## Devolve um número que indica o tipo de dados de um valor + + +## +## Logical functions Funções lógicas +## +AND = E ## Devolve VERDADEIRO se todos os respectivos argumentos corresponderem a VERDADEIRO +FALSE = FALSO ## Devolve o valor lógico FALSO +IF = SE ## Especifica um teste lógico a ser executado +IFERROR = SE.ERRO ## Devolve um valor definido pelo utilizador se ocorrer um erro na fórmula, e devolve o resultado da fórmula se não ocorrer nenhum erro +NOT = NÃO ## Inverte a lógica do respectivo argumento +OR = OU ## Devolve VERDADEIRO se qualquer argumento for VERDADEIRO +TRUE = VERDADEIRO ## Devolve o valor lógico VERDADEIRO + + +## +## Lookup and reference functions Funções de pesquisa e referência +## +ADDRESS = ENDEREÇO ## Devolve uma referência a uma única célula numa folha de cálculo como texto +AREAS = ÁREAS ## Devolve o número de áreas numa referência +CHOOSE = SELECCIONAR ## Selecciona um valor a partir de uma lista de valores +COLUMN = COL ## Devolve o número da coluna de uma referência +COLUMNS = COLS ## Devolve o número de colunas numa referência +HLOOKUP = PROCH ## Procura na linha superior de uma matriz e devolve o valor da célula indicada +HYPERLINK = HIPERLIGAÇÃO ## Cria um atalho ou hiperligação que abre um documento armazenado num servidor de rede, numa intranet ou na Internet +INDEX = ÍNDICE ## Utiliza um índice para escolher um valor de uma referência ou de uma matriz +INDIRECT = INDIRECTO ## Devolve uma referência indicada por um valor de texto +LOOKUP = PROC ## Procura valores num vector ou numa matriz +MATCH = CORRESP ## Procura valores numa referência ou numa matriz +OFFSET = DESLOCAMENTO ## Devolve o deslocamento de referência de uma determinada referência +ROW = LIN ## Devolve o número da linha de uma referência +ROWS = LINS ## Devolve o número de linhas numa referência +RTD = RTD ## Obtém dados em tempo real a partir de um programa que suporte automatização COM (automatização: modo de trabalhar com objectos de uma aplicação a partir de outra aplicação ou ferramenta de desenvolvimento. Anteriormente conhecida como automatização OLE, a automatização é uma norma da indústria de software e uma funcionalidade COM (Component Object Model).) +TRANSPOSE = TRANSPOR ## Devolve a transposição de uma matriz +VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e percorre a linha para devolver o valor de uma célula + + +## +## Math and trigonometry functions Funções matemáticas e trigonométricas +## +ABS = ABS ## Devolve o valor absoluto de um número +ACOS = ACOS ## Devolve o arco de co-seno de um número +ACOSH = ACOSH ## Devolve o co-seno hiperbólico inverso de um número +ASIN = ASEN ## Devolve o arco de seno de um número +ASINH = ASENH ## Devolve o seno hiperbólico inverso de um número +ATAN = ATAN ## Devolve o arco de tangente de um número +ATAN2 = ATAN2 ## Devolve o arco de tangente das coordenadas x e y +ATANH = ATANH ## Devolve a tangente hiperbólica inversa de um número +CEILING = ARRED.EXCESSO ## Arredonda um número para o número inteiro mais próximo ou para o múltiplo de significância mais próximo +COMBIN = COMBIN ## Devolve o número de combinações de um determinado número de objectos +COS = COS ## Devolve o co-seno de um número +COSH = COSH ## Devolve o co-seno hiperbólico de um número +DEGREES = GRAUS ## Converte radianos em graus +EVEN = PAR ## Arredonda um número por excesso para o número inteiro mais próximo +EXP = EXP ## Devolve e elevado à potência de um determinado número +FACT = FACTORIAL ## Devolve o factorial de um número +FACTDOUBLE = FACTDUPLO ## Devolve o factorial duplo de um número +FLOOR = ARRED.DEFEITO ## Arredonda um número por defeito até zero +GCD = MDC ## Devolve o maior divisor comum +INT = INT ## Arredonda um número por defeito para o número inteiro mais próximo +LCM = MMC ## Devolve o mínimo múltiplo comum +LN = LN ## Devolve o logaritmo natural de um número +LOG = LOG ## Devolve o logaritmo de um número com uma base especificada +LOG10 = LOG10 ## Devolve o logaritmo de base 10 de um número +MDETERM = MATRIZ.DETERM ## Devolve o determinante matricial de uma matriz +MINVERSE = MATRIZ.INVERSA ## Devolve o inverso matricial de uma matriz +MMULT = MATRIZ.MULT ## Devolve o produto matricial de duas matrizes +MOD = RESTO ## Devolve o resto da divisão +MROUND = MARRED ## Devolve um número arredondado para o múltiplo pretendido +MULTINOMIAL = POLINOMIAL ## Devolve o polinomial de um conjunto de números +ODD = ÍMPAR ## Arredonda por excesso um número para o número inteiro ímpar mais próximo +PI = PI ## Devolve o valor de pi +POWER = POTÊNCIA ## Devolve o resultado de um número elevado a uma potência +PRODUCT = PRODUTO ## Multiplica os respectivos argumentos +QUOTIENT = QUOCIENTE ## Devolve a parte inteira de uma divisão +RADIANS = RADIANOS ## Converte graus em radianos +RAND = ALEATÓRIO ## Devolve um número aleatório entre 0 e 1 +RANDBETWEEN = ALEATÓRIOENTRE ## Devolve um número aleatório entre os números especificados +ROMAN = ROMANO ## Converte um número árabe em romano, como texto +ROUND = ARRED ## Arredonda um número para um número de dígitos especificado +ROUNDDOWN = ARRED.PARA.BAIXO ## Arredonda um número por defeito até zero +ROUNDUP = ARRED.PARA.CIMA ## Arredonda um número por excesso, afastando-o de zero +SERIESSUM = SOMASÉRIE ## Devolve a soma de uma série de potências baseada na fórmula +SIGN = SINAL ## Devolve o sinal de um número +SIN = SEN ## Devolve o seno de um determinado ângulo +SINH = SENH ## Devolve o seno hiperbólico de um número +SQRT = RAIZQ ## Devolve uma raiz quadrada positiva +SQRTPI = RAIZPI ## Devolve a raiz quadrada de (núm * pi) +SUBTOTAL = SUBTOTAL ## Devolve um subtotal numa lista ou base de dados +SUM = SOMA ## Adiciona os respectivos argumentos +SUMIF = SOMA.SE ## Adiciona as células especificadas por um determinado critério +SUMIFS = SOMA.SE.S ## Adiciona as células num intervalo que cumpre vários critérios +SUMPRODUCT = SOMARPRODUTO ## Devolve a soma dos produtos de componentes de matrizes correspondentes +SUMSQ = SOMARQUAD ## Devolve a soma dos quadrados dos argumentos +SUMX2MY2 = SOMAX2DY2 ## Devolve a soma da diferença dos quadrados dos valores correspondentes em duas matrizes +SUMX2PY2 = SOMAX2SY2 ## Devolve a soma da soma dos quadrados dos valores correspondentes em duas matrizes +SUMXMY2 = SOMAXMY2 ## Devolve a soma dos quadrados da diferença dos valores correspondentes em duas matrizes +TAN = TAN ## Devolve a tangente de um número +TANH = TANH ## Devolve a tangente hiperbólica de um número +TRUNC = TRUNCAR ## Trunca um número para um número inteiro + + +## +## Statistical functions Funções estatísticas +## +AVEDEV = DESV.MÉDIO ## Devolve a média aritmética dos desvios absolutos à média dos pontos de dados +AVERAGE = MÉDIA ## Devolve a média dos respectivos argumentos +AVERAGEA = MÉDIAA ## Devolve uma média dos respectivos argumentos, incluindo números, texto e valores lógicos +AVERAGEIF = MÉDIA.SE ## Devolve a média aritmética de todas as células num intervalo que cumprem determinado critério +AVERAGEIFS = MÉDIA.SE.S ## Devolve a média aritmética de todas as células que cumprem múltiplos critérios +BETADIST = DISTBETA ## Devolve a função de distribuição cumulativa beta +BETAINV = BETA.ACUM.INV ## Devolve o inverso da função de distribuição cumulativa relativamente a uma distribuição beta específica +BINOMDIST = DISTRBINOM ## Devolve a probabilidade de distribuição binomial de termo individual +CHIDIST = DIST.CHI ## Devolve a probabilidade unicaudal da distribuição qui-quadrada +CHIINV = INV.CHI ## Devolve o inverso da probabilidade unicaudal da distribuição qui-quadrada +CHITEST = TESTE.CHI ## Devolve o teste para independência +CONFIDENCE = INT.CONFIANÇA ## Devolve o intervalo de confiança correspondente a uma média de população +CORREL = CORREL ## Devolve o coeficiente de correlação entre dois conjuntos de dados +COUNT = CONTAR ## Conta os números que existem na lista de argumentos +COUNTA = CONTAR.VAL ## Conta os valores que existem na lista de argumentos +COUNTBLANK = CONTAR.VAZIO ## Conta o número de células em branco num intervalo +COUNTIF = CONTAR.SE ## Calcula o número de células num intervalo que corresponde aos critérios determinados +COUNTIFS = CONTAR.SE.S ## Conta o número de células num intervalo que cumprem múltiplos critérios +COVAR = COVAR ## Devolve a covariância, que é a média dos produtos de desvios de pares +CRITBINOM = CRIT.BINOM ## Devolve o menor valor em que a distribuição binomial cumulativa é inferior ou igual a um valor de critério +DEVSQ = DESVQ ## Devolve a soma dos quadrados dos desvios +EXPONDIST = DISTEXPON ## Devolve a distribuição exponencial +FDIST = DISTF ## Devolve a distribuição da probabilidade F +FINV = INVF ## Devolve o inverso da distribuição da probabilidade F +FISHER = FISHER ## Devolve a transformação Fisher +FISHERINV = FISHERINV ## Devolve o inverso da transformação Fisher +FORECAST = PREVISÃO ## Devolve um valor ao longo de uma tendência linear +FREQUENCY = FREQUÊNCIA ## Devolve uma distribuição de frequência como uma matriz vertical +FTEST = TESTEF ## Devolve o resultado de um teste F +GAMMADIST = DISTGAMA ## Devolve a distribuição gama +GAMMAINV = INVGAMA ## Devolve o inverso da distribuição gama cumulativa +GAMMALN = LNGAMA ## Devolve o logaritmo natural da função gama, Γ(x) +GEOMEAN = MÉDIA.GEOMÉTRICA ## Devolve a média geométrica +GROWTH = CRESCIMENTO ## Devolve valores ao longo de uma tendência exponencial +HARMEAN = MÉDIA.HARMÓNICA ## Devolve a média harmónica +HYPGEOMDIST = DIST.HIPERGEOM ## Devolve a distribuição hipergeométrica +INTERCEPT = INTERCEPTAR ## Devolve a intercepção da linha de regressão linear +KURT = CURT ## Devolve a curtose de um conjunto de dados +LARGE = MAIOR ## Devolve o maior valor k-ésimo de um conjunto de dados +LINEST = PROJ.LIN ## Devolve os parâmetros de uma tendência linear +LOGEST = PROJ.LOG ## Devolve os parâmetros de uma tendência exponencial +LOGINV = INVLOG ## Devolve o inverso da distribuição normal logarítmica +LOGNORMDIST = DIST.NORMALLOG ## Devolve a distribuição normal logarítmica cumulativa +MAX = MÁXIMO ## Devolve o valor máximo numa lista de argumentos +MAXA = MÁXIMOA ## Devolve o valor máximo numa lista de argumentos, incluindo números, texto e valores lógicos +MEDIAN = MED ## Devolve a mediana dos números indicados +MIN = MÍNIMO ## Devolve o valor mínimo numa lista de argumentos +MINA = MÍNIMOA ## Devolve o valor mínimo numa lista de argumentos, incluindo números, texto e valores lógicos +MODE = MODA ## Devolve o valor mais comum num conjunto de dados +NEGBINOMDIST = DIST.BIN.NEG ## Devolve a distribuição binominal negativa +NORMDIST = DIST.NORM ## Devolve a distribuição cumulativa normal +NORMINV = INV.NORM ## Devolve o inverso da distribuição cumulativa normal +NORMSDIST = DIST.NORMP ## Devolve a distribuição cumulativa normal padrão +NORMSINV = INV.NORMP ## Devolve o inverso da distribuição cumulativa normal padrão +PEARSON = PEARSON ## Devolve o coeficiente de correlação momento/produto de Pearson +PERCENTILE = PERCENTIL ## Devolve o k-ésimo percentil de valores num intervalo +PERCENTRANK = ORDEM.PERCENTUAL ## Devolve a ordem percentual de um valor num conjunto de dados +PERMUT = PERMUTAR ## Devolve o número de permutações de um determinado número de objectos +POISSON = POISSON ## Devolve a distribuição de Poisson +PROB = PROB ## Devolve a probabilidade dos valores num intervalo se encontrarem entre dois limites +QUARTILE = QUARTIL ## Devolve o quartil de um conjunto de dados +RANK = ORDEM ## Devolve a ordem de um número numa lista numérica +RSQ = RQUAD ## Devolve o quadrado do coeficiente de correlação momento/produto de Pearson +SKEW = DISTORÇÃO ## Devolve a distorção de uma distribuição +SLOPE = DECLIVE ## Devolve o declive da linha de regressão linear +SMALL = MENOR ## Devolve o menor valor de k-ésimo de um conjunto de dados +STANDARDIZE = NORMALIZAR ## Devolve um valor normalizado +STDEV = DESVPAD ## Calcula o desvio-padrão com base numa amostra +STDEVA = DESVPADA ## Calcula o desvio-padrão com base numa amostra, incluindo números, texto e valores lógicos +STDEVP = DESVPADP ## Calcula o desvio-padrão com base na população total +STDEVPA = DESVPADPA ## Calcula o desvio-padrão com base na população total, incluindo números, texto e valores lógicos +STEYX = EPADYX ## Devolve o erro-padrão do valor de y previsto para cada x na regressão +TDIST = DISTT ## Devolve a distribuição t de Student +TINV = INVT ## Devolve o inverso da distribuição t de Student +TREND = TENDÊNCIA ## Devolve valores ao longo de uma tendência linear +TRIMMEAN = MÉDIA.INTERNA ## Devolve a média do interior de um conjunto de dados +TTEST = TESTET ## Devolve a probabilidade associada ao teste t de Student +VAR = VAR ## Calcula a variância com base numa amostra +VARA = VARA ## Calcula a variância com base numa amostra, incluindo números, texto e valores lógicos +VARP = VARP ## Calcula a variância com base na população total +VARPA = VARPA ## Calcula a variância com base na população total, incluindo números, texto e valores lógicos +WEIBULL = WEIBULL ## Devolve a distribuição Weibull +ZTEST = TESTEZ ## Devolve o valor de probabilidade unicaudal de um teste-z + + +## +## Text functions Funções de texto +## +ASC = ASC ## Altera letras ou katakana de largura total (byte duplo) numa cadeia de caracteres para caracteres de largura média (byte único) +BAHTTEXT = TEXTO.BAHT ## Converte um número em texto, utilizando o formato monetário ß (baht) +CHAR = CARÁCT ## Devolve o carácter especificado pelo número de código +CLEAN = LIMPAR ## Remove do texto todos os caracteres não imprimíveis +CODE = CÓDIGO ## Devolve um código numérico correspondente ao primeiro carácter numa cadeia de texto +CONCATENATE = CONCATENAR ## Agrupa vários itens de texto num único item de texto +DOLLAR = MOEDA ## Converte um número em texto, utilizando o formato monetário € (Euro) +EXACT = EXACTO ## Verifica se dois valores de texto são idênticos +FIND = LOCALIZAR ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) +FINDB = LOCALIZARB ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) +FIXED = FIXA ## Formata um número como texto com um número fixo de decimais +JIS = JIS ## Altera letras ou katakana de largura média (byte único) numa cadeia de caracteres para caracteres de largura total (byte duplo) +LEFT = ESQUERDA ## Devolve os caracteres mais à esquerda de um valor de texto +LEFTB = ESQUERDAB ## Devolve os caracteres mais à esquerda de um valor de texto +LEN = NÚM.CARACT ## Devolve o número de caracteres de uma cadeia de texto +LENB = NÚM.CARACTB ## Devolve o número de caracteres de uma cadeia de texto +LOWER = MINÚSCULAS ## Converte o texto em minúsculas +MID = SEG.TEXTO ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada +MIDB = SEG.TEXTOB ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada +PHONETIC = FONÉTICA ## Retira os caracteres fonéticos (furigana) de uma cadeia de texto +PROPER = INICIAL.MAIÚSCULA ## Coloca em maiúsculas a primeira letra de cada palavra de um valor de texto +REPLACE = SUBSTITUIR ## Substitui caracteres no texto +REPLACEB = SUBSTITUIRB ## Substitui caracteres no texto +REPT = REPETIR ## Repete texto um determinado número de vezes +RIGHT = DIREITA ## Devolve os caracteres mais à direita de um valor de texto +RIGHTB = DIREITAB ## Devolve os caracteres mais à direita de um valor de texto +SEARCH = PROCURAR ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) +SEARCHB = PROCURARB ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) +SUBSTITUTE = SUBST ## Substitui texto novo por texto antigo numa cadeia de texto +T = T ## Converte os respectivos argumentos em texto +TEXT = TEXTO ## Formata um número e converte-o em texto +TRIM = COMPACTAR ## Remove espaços do texto +UPPER = MAIÚSCULAS ## Converte texto em maiúsculas +VALUE = VALOR ## Converte um argumento de texto num número diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config new file mode 100755 index 0000000..9ee9e6c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = р + + +## +## Excel Error Codes (For future use) + +## +NULL = #ПУСТО! +DIV0 = #ДЕЛ/0! +VALUE = #ЗНАЧ! +REF = #ССЫЛ! +NAME = #ИМЯ? +NUM = #ЧИСЛО! +NA = #Н/Д diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions new file mode 100755 index 0000000..3597dbf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/ru/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from information provided by web-junior (http://www.web-junior.net/) +## +## + + +## +## Add-in and Automation functions Функции надстроек и автоматизации +## +GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы. + + +## +## Cube functions Функции Куб +## +CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации. +CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе. +CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента. +CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов. +CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel. +CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества. +CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба. + + +## +## Database functions Функции для работы с базами данных +## +DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных. +DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных. +DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных. +DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию. +DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных. +DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных. +DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию. +DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных. +DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных +DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию. +DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных +DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных + + +## +## Date and time functions Функции даты и времени +## +DATE = ДАТА ## Возвращает заданную дату в числовом формате. +DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат. +DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца. +DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года. +EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты. +EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев. +HOUR = ЧАС ## Преобразует дату в числовом формате в часы. +MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты. +MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы. +NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами. +NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате. +SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды. +TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате. +TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат. +TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате. +WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели. +WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата. +WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней. +YEAR = ГОД ## Преобразует дату в числовом формате в год. +YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами. + + +## +## Engineering functions Инженерные функции +## +BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x). +BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x). +BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x). +BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x). +BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное. +BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное. +BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное. +COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число. +CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую. +DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное. +DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное. +DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное. +DELTA = ДЕЛЬТА ## Проверяет равенство двух значений. +ERF = ФОШ ## Возвращает функцию ошибки. +ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки. +GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения. +HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное. +HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное. +HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное. +IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа. +IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа. +IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах. +IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число. +IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа. +IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел. +IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа. +IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа. +IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа. +IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа. +IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень. +IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел. +IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа. +IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа. +IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа. +IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел. +IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел. +OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное. +OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное. +OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное. + + +## +## Financial functions Финансовые функции +## +ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов. +ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения. +AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации. +AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода. +COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения. +COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения. +COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона. +COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения. +COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу. +COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения. +CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами. +CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами. +DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка. +DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод. +DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг. +DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом. +DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби. +DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам. +EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки. +FV = БС ## Возвращает будущую стоимость инвестиции. +FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов. +INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг. +IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период. +IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств. +ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции. +MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей. +MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки. +NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку. +NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада. +NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования. +ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом. +ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом. +ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом. +ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом. +PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета. +PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период. +PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов. +PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка. +PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения. +PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции. +RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период. +RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг. +SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период. +SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел. +TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку. +TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека. +TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку. +VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса. +XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер. +XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими. +YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов. +YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки). +YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения. + + +## +## Information functions Информационные функции +## +CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки. +ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки. +INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде. +ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку. +ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д. +ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки. +ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом. +ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение. +ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д. +ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом. +ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число. +ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом. +ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой. +ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом. +N = Ч ## Возвращает значение, преобразованное в число. +NA = НД ## Возвращает значение ошибки #Н/Д. +TYPE = ТИП ## Возвращает число, обозначающее тип данных значения. + + +## +## Logical functions Логические функции +## +AND = И ## Renvoie VRAI si tous ses arguments sont VRAI. +FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ. +IF = ЕСЛИ ## Выполняет проверку условия. +IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления. +NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное. +OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА. +TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА. + + +## +## Lookup and reference functions Функции ссылки и поиска +## +ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста. +AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке. +CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу. +COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка. +COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке. +HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки +HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете. +INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива. +INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением. +LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве. +MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве. +OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки. +ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой. +ROWS = ЧСТРОК ## Возвращает количество строк в ссылке. +RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).). +TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив. +VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце. + + +## +## Math and trigonometry functions Математические и тригонометрические функции +## +ABS = ABS ## Возвращает модуль (абсолютную величину) числа. +ACOS = ACOS ## Возвращает арккосинус числа. +ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа. +ASIN = ASIN ## Возвращает арксинус числа. +ASINH = ASINH ## Возвращает гиперболический арксинус числа. +ATAN = ATAN ## Возвращает арктангенс числа. +ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y. +ATANH = ATANH ## Возвращает гиперболический арктангенс числа. +CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению. +COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов. +COS = COS ## Возвращает косинус числа. +COSH = COSH ## Возвращает гиперболический косинус числа. +DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы. +EVEN = ЧЁТН ## Округляет число до ближайшего четного целого. +EXP = EXP ## Возвращает число e, возведенное в указанную степень. +FACT = ФАКТР ## Возвращает факториал числа. +FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа. +FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +GCD = НОД ## Возвращает наибольший общий делитель. +INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого. +LCM = НОК ## Возвращает наименьшее общее кратное. +LN = LN ## Возвращает натуральный логарифм числа. +LOG = LOG ## Возвращает логарифм числа по заданному основанию. +LOG10 = LOG10 ## Возвращает десятичный логарифм числа. +MDETERM = МОПРЕД ## Возвращает определитель матрицы массива. +MINVERSE = МОБР ## Возвращает обратную матрицу массива. +MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов. +MOD = ОСТАТ ## Возвращает остаток от деления. +MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью. +MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел. +ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого. +PI = ПИ ## Возвращает число пи. +POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень. +PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов. +QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении. +RADIANS = РАДИАНЫ ## Преобразует градусы в радианы. +RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1. +RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами. +ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста. +ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов. +ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. +ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения. +SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле. +SIGN = ЗНАК ## Возвращает знак числа. +SIN = SIN ## Возвращает синус заданного угла. +SINH = SINH ## Возвращает гиперболический синус числа. +SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня. +SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ). +SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных. +SUM = СУММ ## Суммирует аргументы. +SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию. +SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям. +SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов. +SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов. +SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах. +SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов. +SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах. +TAN = TAN ## Возвращает тангенс числа. +TANH = TANH ## Возвращает гиперболический тангенс числа. +TRUNC = ОТБР ## Отбрасывает дробную часть числа. + + +## +## Statistical functions Статистические функции +## +AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего. +AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов. +AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения. +AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию. +AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям. +BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения. +BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения. +BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения. +CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат. +CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат. +CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость. +CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности. +CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных. +COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов. +COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов. +COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне +COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию +COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям. +COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений +CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию. +DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений. +EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение. +FDIST = FРАСП ## Возвращает F-распределение вероятности. +FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности. +FISHER = ФИШЕР ## Возвращает преобразование Фишера. +FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера. +FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда. +FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива. +FTEST = ФТЕСТ ## Возвращает результат F-теста. +GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение. +GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение. +GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x). +GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое. +GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом. +HARMEAN = СРГАРМ ## Возвращает среднее гармоническое. +HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение. +INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии. +KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных. +LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных. +LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда. +LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда. +LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение. +LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение. +MAX = МАКС ## Возвращает наибольшее значение в списке аргументов. +MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения. +MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел. +MIN = МИН ## Возвращает наименьшее значение в списке аргументов. +MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения. +MODE = МОДА ## Возвращает значение моды множества данных. +NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение. +NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения. +NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение. +NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение. +NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения. +PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона. +PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона. +PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных. +PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов. +POISSON = ПУАССОН ## Возвращает распределение Пуассона. +PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов. +QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных. +RANK = РАНГ ## Возвращает ранг числа в списке чисел. +RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона. +SKEW = СКОС ## Возвращает асимметрию распределения. +SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии. +SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных. +STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение. +STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке. +STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения. +STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности. +STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения. +STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии. +TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента. +TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента. +TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом. +TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных. +TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента. +VAR = ДИСП ## Оценивает дисперсию по выборке. +VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения. +VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности. +VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения. +WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла. +ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста. + + +## +## Text functions Текстовые функции +## +ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые). +BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ). +CHAR = СИМВОЛ ## Возвращает знак с заданным кодом. +CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста. +CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке. +CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один. +DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат. +EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений. +FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). +FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков. +JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые). +LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения. +LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения. +LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке. +LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке. +LOWER = СТРОЧН ## Преобразует все буквы текста в строчные. +MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. +PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки. +PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную. +REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте. +REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте. +REPT = ПОВТОР ## Повторяет текст заданное число раз. +RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки. +RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки. +SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра). +SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым. +T = Т ## Преобразует аргументы в текст. +TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст. +TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы. +UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные. +VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config new file mode 100755 index 0000000..bf72cc4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = kr + + +## +## Excel Error Codes (For future use) + +## +NULL = #Skärning! +DIV0 = #Division/0! +VALUE = #Värdefel! +REF = #Referens! +NAME = #Namn? +NUM = #Ogiltigt! +NA = #Saknas! diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions new file mode 100755 index 0000000..73b2deb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/sv/functions @@ -0,0 +1,408 @@ +## +## Add-in and Automation functions Tilläggs- och automatiseringsfunktioner +## +GETPIVOTDATA = HÄMTA.PIVOTDATA ## Returnerar data som lagrats i en pivottabellrapport + + +## +## Cube functions Kubfunktioner +## +CUBEKPIMEMBER = KUBKPIMEDLEM ## Returnerar namn, egenskap och mått för en KPI och visar namnet och egenskapen i cellen. En KPI, eller prestandaindikator, är ett kvantifierbart mått, t.ex. månatlig bruttovinst eller personalomsättning per kvartal, som används för att analysera ett företags resultat. +CUBEMEMBER = KUBMEDLEM ## Returnerar en medlem eller ett par i en kubhierarki. Används för att verifiera att medlemmen eller paret finns i kuben. +CUBEMEMBERPROPERTY = KUBMEDLEMSEGENSKAP ## Returnerar värdet för en medlemsegenskap i kuben. Används för att verifiera att ett medlemsnamn finns i kuben, samt för att returnera den angivna egenskapen för medlemmen. +CUBERANKEDMEMBER = KUBRANGORDNADMEDLEM ## Returnerar den n:te, eller rangordnade, medlemmen i en uppsättning. Används för att returnera ett eller flera element i en uppsättning, till exempelvis den bästa försäljaren eller de tio bästa eleverna. +CUBESET = KUBINSTÄLLNING ## Definierar en beräknad uppsättning medlemmar eller par genom att skicka ett bestämt uttryck till kuben på servern, som skapar uppsättningen och sedan returnerar den till Microsoft Office Excel. +CUBESETCOUNT = KUBINSTÄLLNINGANTAL ## Returnerar antalet objekt i en uppsättning. +CUBEVALUE = KUBVÄRDE ## Returnerar ett mängdvärde från en kub. + + +## +## Database functions Databasfunktioner +## +DAVERAGE = DMEDEL ## Returnerar medelvärdet av databasposterna +DCOUNT = DANTAL ## Räknar antalet celler som innehåller tal i en databas +DCOUNTA = DANTALV ## Räknar ifyllda celler i en databas +DGET = DHÄMTA ## Hämtar en enstaka post från en databas som uppfyller de angivna villkoren +DMAX = DMAX ## Returnerar det största värdet från databasposterna +DMIN = DMIN ## Returnerar det minsta värdet från databasposterna +DPRODUCT = DPRODUKT ## Multiplicerar värdena i ett visst fält i poster som uppfyller villkoret +DSTDEV = DSTDAV ## Uppskattar standardavvikelsen baserat på ett urval av databasposterna +DSTDEVP = DSTDAVP ## Beräknar standardavvikelsen utifrån hela populationen av valda databasposter +DSUM = DSUMMA ## Summerar talen i kolumnfält i databasposter som uppfyller villkoret +DVAR = DVARIANS ## Uppskattar variansen baserat på ett urval av databasposterna +DVARP = DVARIANSP ## Beräknar variansen utifrån hela populationen av valda databasposter + + +## +## Date and time functions Tid- och datumfunktioner +## +DATE = DATUM ## Returnerar ett serienummer för ett visst datum +DATEVALUE = DATUMVÄRDE ## Konverterar ett datum i textformat till ett serienummer +DAY = DAG ## Konverterar ett serienummer till dag i månaden +DAYS360 = DAGAR360 ## Beräknar antalet dagar mellan två datum baserat på ett 360-dagarsår +EDATE = EDATUM ## Returnerar serienumret för ett datum som infaller ett visst antal månader före eller efter startdatumet +EOMONTH = SLUTMÅNAD ## Returnerar serienumret för sista dagen i månaden ett visst antal månader tidigare eller senare +HOUR = TIMME ## Konverterar ett serienummer till en timme +MINUTE = MINUT ## Konverterar ett serienummer till en minut +MONTH = MÅNAD ## Konverterar ett serienummer till en månad +NETWORKDAYS = NETTOARBETSDAGAR ## Returnerar antalet hela arbetsdagar mellan två datum +NOW = NU ## Returnerar serienumret för dagens datum och aktuell tid +SECOND = SEKUND ## Konverterar ett serienummer till en sekund +TIME = KLOCKSLAG ## Returnerar serienumret för en viss tid +TIMEVALUE = TIDVÄRDE ## Konverterar en tid i textformat till ett serienummer +TODAY = IDAG ## Returnerar serienumret för dagens datum +WEEKDAY = VECKODAG ## Konverterar ett serienummer till en dag i veckan +WEEKNUM = VECKONR ## Konverterar ett serienummer till ett veckonummer +WORKDAY = ARBETSDAGAR ## Returnerar serienumret för ett datum ett visst antal arbetsdagar tidigare eller senare +YEAR = ÅR ## Konverterar ett serienummer till ett år +YEARFRAC = ÅRDEL ## Returnerar en del av ett år som representerar antalet hela dagar mellan start- och slutdatum + + +## +## Engineering functions Tekniska funktioner +## +BESSELI = BESSELI ## Returnerar den modifierade Bessel-funktionen In(x) +BESSELJ = BESSELJ ## Returnerar Bessel-funktionen Jn(x) +BESSELK = BESSELK ## Returnerar den modifierade Bessel-funktionen Kn(x) +BESSELY = BESSELY ## Returnerar Bessel-funktionen Yn(x) +BIN2DEC = BIN.TILL.DEC ## Omvandlar ett binärt tal till decimalt +BIN2HEX = BIN.TILL.HEX ## Omvandlar ett binärt tal till hexadecimalt +BIN2OCT = BIN.TILL.OKT ## Omvandlar ett binärt tal till oktalt +COMPLEX = KOMPLEX ## Omvandlar reella och imaginära koefficienter till ett komplext tal +CONVERT = KONVERTERA ## Omvandlar ett tal från ett måttsystem till ett annat +DEC2BIN = DEC.TILL.BIN ## Omvandlar ett decimalt tal till binärt +DEC2HEX = DEC.TILL.HEX ## Omvandlar ett decimalt tal till hexadecimalt +DEC2OCT = DEC.TILL.OKT ## Omvandlar ett decimalt tal till oktalt +DELTA = DELTA ## Testar om två värden är lika +ERF = FELF ## Returnerar felfunktionen +ERFC = FELFK ## Returnerar den komplementära felfunktionen +GESTEP = SLSTEG ## Testar om ett tal är större än ett tröskelvärde +HEX2BIN = HEX.TILL.BIN ## Omvandlar ett hexadecimalt tal till binärt +HEX2DEC = HEX.TILL.DEC ## Omvandlar ett hexadecimalt tal till decimalt +HEX2OCT = HEX.TILL.OKT ## Omvandlar ett hexadecimalt tal till oktalt +IMABS = IMABS ## Returnerar absolutvärdet (modulus) för ett komplext tal +IMAGINARY = IMAGINÄR ## Returnerar den imaginära koefficienten för ett komplext tal +IMARGUMENT = IMARGUMENT ## Returnerar det komplexa talets argument, en vinkel uttryckt i radianer +IMCONJUGATE = IMKONJUGAT ## Returnerar det komplexa talets konjugat +IMCOS = IMCOS ## Returnerar cosinus för ett komplext tal +IMDIV = IMDIV ## Returnerar kvoten för två komplexa tal +IMEXP = IMEUPPHÖJT ## Returnerar exponenten för ett komplext tal +IMLN = IMLN ## Returnerar den naturliga logaritmen för ett komplext tal +IMLOG10 = IMLOG10 ## Returnerar 10-logaritmen för ett komplext tal +IMLOG2 = IMLOG2 ## Returnerar 2-logaritmen för ett komplext tal +IMPOWER = IMUPPHÖJT ## Returnerar ett komplext tal upphöjt till en exponent +IMPRODUCT = IMPRODUKT ## Returnerar produkten av komplexa tal +IMREAL = IMREAL ## Returnerar den reella koefficienten för ett komplext tal +IMSIN = IMSIN ## Returnerar sinus för ett komplext tal +IMSQRT = IMROT ## Returnerar kvadratroten av ett komplext tal +IMSUB = IMDIFF ## Returnerar differensen mellan två komplexa tal +IMSUM = IMSUM ## Returnerar summan av komplexa tal +OCT2BIN = OKT.TILL.BIN ## Omvandlar ett oktalt tal till binärt +OCT2DEC = OKT.TILL.DEC ## Omvandlar ett oktalt tal till decimalt +OCT2HEX = OKT.TILL.HEX ## Omvandlar ett oktalt tal till hexadecimalt + + +## +## Financial functions Finansiella funktioner +## +ACCRINT = UPPLRÄNTA ## Returnerar den upplupna räntan för värdepapper med periodisk ränta +ACCRINTM = UPPLOBLRÄNTA ## Returnerar den upplupna räntan för ett värdepapper som ger avkastning på förfallodagen +AMORDEGRC = AMORDEGRC ## Returnerar avskrivningen för varje redovisningsperiod med hjälp av en avskrivningskoefficient +AMORLINC = AMORLINC ## Returnerar avskrivningen för varje redovisningsperiod +COUPDAYBS = KUPDAGBB ## Returnerar antal dagar från början av kupongperioden till likviddagen +COUPDAYS = KUPDAGARS ## Returnerar antalet dagar i kupongperioden som innehåller betalningsdatumet +COUPDAYSNC = KUPDAGNK ## Returnerar antalet dagar från betalningsdatumet till nästa kupongdatum +COUPNCD = KUPNKD ## Returnerar nästa kupongdatum efter likviddagen +COUPNUM = KUPANT ## Returnerar kuponger som förfaller till betalning mellan likviddagen och förfallodagen +COUPPCD = KUPFKD ## Returnerar föregående kupongdatum före likviddagen +CUMIPMT = KUMRÄNTA ## Returnerar den ackumulerade räntan som betalats mellan två perioder +CUMPRINC = KUMPRIS ## Returnerar det ackumulerade kapitalbeloppet som betalats på ett lån mellan två perioder +DB = DB ## Returnerar avskrivningen för en tillgång under en angiven tid enligt metoden för fast degressiv avskrivning +DDB = DEGAVSKR ## Returnerar en tillgångs värdeminskning under en viss period med hjälp av dubbel degressiv avskrivning eller någon annan metod som du anger +DISC = DISK ## Returnerar diskonteringsräntan för ett värdepapper +DOLLARDE = DECTAL ## Omvandlar ett pris uttryckt som ett bråk till ett decimaltal +DOLLARFR = BRÅK ## Omvandlar ett pris i kronor uttryckt som ett decimaltal till ett bråk +DURATION = LÖPTID ## Returnerar den årliga löptiden för en säkerhet med periodiska räntebetalningar +EFFECT = EFFRÄNTA ## Returnerar den årliga effektiva räntesatsen +FV = SLUTVÄRDE ## Returnerar det framtida värdet på en investering +FVSCHEDULE = FÖRRÄNTNING ## Returnerar det framtida värdet av ett begynnelsekapital beräknat på olika räntenivåer +INTRATE = ÅRSRÄNTA ## Returnerar räntesatsen för ett betalt värdepapper +IPMT = RBETALNING ## Returnerar räntedelen av en betalning för en given period +IRR = IR ## Returnerar internräntan för en serie betalningar +ISPMT = RALÅN ## Beräknar räntan som har betalats under en specifik betalningsperiod +MDURATION = MLÖPTID ## Returnerar den modifierade Macauley-löptiden för ett värdepapper med det antagna nominella värdet 100 kr +MIRR = MODIR ## Returnerar internräntan där positiva och negativa betalningar finansieras med olika räntor +NOMINAL = NOMRÄNTA ## Returnerar den årliga nominella räntesatsen +NPER = PERIODER ## Returnerar antalet perioder för en investering +NPV = NETNUVÄRDE ## Returnerar nuvärdet av en serie periodiska betalningar vid en given diskonteringsränta +ODDFPRICE = UDDAFPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda första period +ODDFYIELD = UDDAFAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda första period +ODDLPRICE = UDDASPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda sista period +ODDLYIELD = UDDASAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda sista period +PMT = BETALNING ## Returnerar den periodiska betalningen för en annuitet +PPMT = AMORT ## Returnerar amorteringsdelen av en annuitetsbetalning för en given period +PRICE = PRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger periodisk ränta +PRICEDISC = PRISDISK ## Returnerar priset per 100 kr nominellt värde för ett diskonterat värdepapper +PRICEMAT = PRISFÖRF ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger ränta på förfallodagen +PV = PV ## Returnerar nuvärdet av en serie lika stora periodiska betalningar +RATE = RÄNTA ## Returnerar räntesatsen per period i en annuitet +RECEIVED = BELOPP ## Returnerar beloppet som utdelas på förfallodagen för ett betalat värdepapper +SLN = LINAVSKR ## Returnerar den linjära avskrivningen för en tillgång under en period +SYD = ÅRSAVSKR ## Returnerar den årliga avskrivningssumman för en tillgång under en angiven period +TBILLEQ = SSVXEKV ## Returnerar avkastningen motsvarande en obligation för en statsskuldväxel +TBILLPRICE = SSVXPRIS ## Returnerar priset per 100 kr nominellt värde för en statsskuldväxel +TBILLYIELD = SSVXRÄNTA ## Returnerar avkastningen för en statsskuldväxel +VDB = VDEGRAVSKR ## Returnerar avskrivningen för en tillgång under en angiven period (med degressiv avskrivning) +XIRR = XIRR ## Returnerar internräntan för en serie betalningar som inte nödvändigtvis är periodiska +XNPV = XNUVÄRDE ## Returnerar det nuvarande nettovärdet för en serie betalningar som inte nödvändigtvis är periodiska +YIELD = NOMAVK ## Returnerar avkastningen för ett värdepapper som ger periodisk ränta +YIELDDISC = NOMAVKDISK ## Returnerar den årliga avkastningen för diskonterade värdepapper, exempelvis en statsskuldväxel +YIELDMAT = NOMAVKFÖRF ## Returnerar den årliga avkastningen för ett värdepapper som ger ränta på förfallodagen + + +## +## Information functions Informationsfunktioner +## +CELL = CELL ## Returnerar information om formatering, plats och innehåll i en cell +ERROR.TYPE = FEL.TYP ## Returnerar ett tal som motsvarar ett felvärde +INFO = INFO ## Returnerar information om operativsystemet +ISBLANK = ÄRREF ## Returnerar SANT om värdet är tomt +ISERR = Ä ## Returnerar SANT om värdet är ett felvärde annat än #SAKNAS! +ISERROR = ÄRFEL ## Returnerar SANT om värdet är ett felvärde +ISEVEN = ÄRJÄMN ## Returnerar SANT om talet är jämnt +ISLOGICAL = ÄREJTEXT ## Returnerar SANT om värdet är ett logiskt värde +ISNA = ÄRLOGISK ## Returnerar SANT om värdet är felvärdet #SAKNAS! +ISNONTEXT = ÄRSAKNAD ## Returnerar SANT om värdet inte är text +ISNUMBER = ÄRTAL ## Returnerar SANT om värdet är ett tal +ISODD = ÄRUDDA ## Returnerar SANT om talet är udda +ISREF = ÄRTOM ## Returnerar SANT om värdet är en referens +ISTEXT = ÄRTEXT ## Returnerar SANT om värdet är text +N = N ## Returnerar ett värde omvandlat till ett tal +NA = SAKNAS ## Returnerar felvärdet #SAKNAS! +TYPE = VÄRDETYP ## Returnerar ett tal som anger värdets datatyp + + +## +## Logical functions Logiska funktioner +## +AND = OCH ## Returnerar SANT om alla argument är sanna +FALSE = FALSKT ## Returnerar det logiska värdet FALSKT +IF = OM ## Anger vilket logiskt test som ska utföras +IFERROR = OMFEL ## Returnerar ett värde som du anger om en formel utvärderar till ett fel; annars returneras resultatet av formeln +NOT = ICKE ## Inverterar logiken för argumenten +OR = ELLER ## Returnerar SANT om något argument är SANT +TRUE = SANT ## Returnerar det logiska värdet SANT + + +## +## Lookup and reference functions Sök- och referensfunktioner +## +ADDRESS = ADRESS ## Returnerar en referens som text till en enstaka cell i ett kalkylblad +AREAS = OMRÅDEN ## Returnerar antalet områden i en referens +CHOOSE = VÄLJ ## Väljer ett värde i en lista över värden +COLUMN = KOLUMN ## Returnerar kolumnnumret för en referens +COLUMNS = KOLUMNER ## Returnerar antalet kolumner i en referens +HLOOKUP = LETAKOLUMN ## Söker i den översta raden i en matris och returnerar värdet för angiven cell +HYPERLINK = HYPERLÄNK ## Skapar en genväg eller ett hopp till ett dokument i nätverket, i ett intranät eller på Internet +INDEX = INDEX ## Använder ett index för ett välja ett värde i en referens eller matris +INDIRECT = INDIREKT ## Returnerar en referens som anges av ett textvärde +LOOKUP = LETAUPP ## Letar upp värden i en vektor eller matris +MATCH = PASSA ## Letar upp värden i en referens eller matris +OFFSET = FÖRSKJUTNING ## Returnerar en referens förskjuten i förhållande till en given referens +ROW = RAD ## Returnerar radnumret för en referens +ROWS = RADER ## Returnerar antalet rader i en referens +RTD = RTD ## Hämtar realtidsdata från ett program som stöder COM-automation (Automation: Ett sätt att arbeta med ett programs objekt från ett annat program eller utvecklingsverktyg. Detta kallades tidigare för OLE Automation, och är en branschstandard och ingår i Component Object Model (COM).) +TRANSPOSE = TRANSPONERA ## Transponerar en matris +VLOOKUP = LETARAD ## Letar i den första kolumnen i en matris och flyttar över raden för att returnera värdet för en cell + + +## +## Math and trigonometry functions Matematiska och trigonometriska funktioner +## +ABS = ABS ## Returnerar absolutvärdet av ett tal +ACOS = ARCCOS ## Returnerar arcus cosinus för ett tal +ACOSH = ARCCOSH ## Returnerar inverterad hyperbolisk cosinus för ett tal +ASIN = ARCSIN ## Returnerar arcus cosinus för ett tal +ASINH = ARCSINH ## Returnerar hyperbolisk arcus sinus för ett tal +ATAN = ARCTAN ## Returnerar arcus tangens för ett tal +ATAN2 = ARCTAN2 ## Returnerar arcus tangens för en x- och en y- koordinat +ATANH = ARCTANH ## Returnerar hyperbolisk arcus tangens för ett tal +CEILING = RUNDA.UPP ## Avrundar ett tal till närmaste heltal eller närmaste signifikanta multipel +COMBIN = KOMBIN ## Returnerar antalet kombinationer för ett givet antal objekt +COS = COS ## Returnerar cosinus för ett tal +COSH = COSH ## Returnerar hyperboliskt cosinus för ett tal +DEGREES = GRADER ## Omvandlar radianer till grader +EVEN = JÄMN ## Avrundar ett tal uppåt till närmaste heltal +EXP = EXP ## Returnerar e upphöjt till ett givet tal +FACT = FAKULTET ## Returnerar fakulteten för ett tal +FACTDOUBLE = DUBBELFAKULTET ## Returnerar dubbelfakulteten för ett tal +FLOOR = RUNDA.NED ## Avrundar ett tal nedåt mot noll +GCD = SGD ## Returnerar den största gemensamma nämnaren +INT = HELTAL ## Avrundar ett tal nedåt till närmaste heltal +LCM = MGM ## Returnerar den minsta gemensamma multipeln +LN = LN ## Returnerar den naturliga logaritmen för ett tal +LOG = LOG ## Returnerar logaritmen för ett tal för en given bas +LOG10 = LOG10 ## Returnerar 10-logaritmen för ett tal +MDETERM = MDETERM ## Returnerar matrisen som är avgörandet av en matris +MINVERSE = MINVERT ## Returnerar matrisinversen av en matris +MMULT = MMULT ## Returnerar matrisprodukten av två matriser +MOD = REST ## Returnerar resten vid en division +MROUND = MAVRUNDA ## Returnerar ett tal avrundat till en given multipel +MULTINOMIAL = MULTINOMIAL ## Returnerar multinomialen för en uppsättning tal +ODD = UDDA ## Avrundar ett tal uppåt till närmaste udda heltal +PI = PI ## Returnerar värdet pi +POWER = UPPHÖJT.TILL ## Returnerar resultatet av ett tal upphöjt till en exponent +PRODUCT = PRODUKT ## Multiplicerar argumenten +QUOTIENT = KVOT ## Returnerar heltalsdelen av en division +RADIANS = RADIANER ## Omvandlar grader till radianer +RAND = SLUMP ## Returnerar ett slumptal mellan 0 och 1 +RANDBETWEEN = SLUMP.MELLAN ## Returnerar ett slumptal mellan de tal som du anger +ROMAN = ROMERSK ## Omvandlar vanliga (arabiska) siffror till romerska som text +ROUND = AVRUNDA ## Avrundar ett tal till ett angivet antal siffror +ROUNDDOWN = AVRUNDA.NEDÅT ## Avrundar ett tal nedåt mot noll +ROUNDUP = AVRUNDA.UPPÅT ## Avrundar ett tal uppåt, från noll +SERIESSUM = SERIESUMMA ## Returnerar summan av en potensserie baserat på formeln +SIGN = TECKEN ## Returnerar tecknet för ett tal +SIN = SIN ## Returnerar sinus för en given vinkel +SINH = SINH ## Returnerar hyperbolisk sinus för ett tal +SQRT = ROT ## Returnerar den positiva kvadratroten +SQRTPI = ROTPI ## Returnerar kvadratroten för (tal * pi) +SUBTOTAL = DELSUMMA ## Returnerar en delsumma i en lista eller databas +SUM = SUMMA ## Summerar argumenten +SUMIF = SUMMA.OM ## Summerar celler enligt ett angivet villkor +SUMIFS = SUMMA.OMF ## Lägger till cellerna i ett område som uppfyller flera kriterier +SUMPRODUCT = PRODUKTSUMMA ## Returnerar summan av produkterna i motsvarande matriskomponenter +SUMSQ = KVADRATSUMMA ## Returnerar summan av argumentens kvadrater +SUMX2MY2 = SUMMAX2MY2 ## Returnerar summan av differensen mellan kvadraterna för motsvarande värden i två matriser +SUMX2PY2 = SUMMAX2PY2 ## Returnerar summan av summan av kvadraterna av motsvarande värden i två matriser +SUMXMY2 = SUMMAXMY2 ## Returnerar summan av kvadraten av skillnaden mellan motsvarande värden i två matriser +TAN = TAN ## Returnerar tangens för ett tal +TANH = TANH ## Returnerar hyperbolisk tangens för ett tal +TRUNC = AVKORTA ## Avkortar ett tal till ett heltal + + +## +## Statistical functions Statistiska funktioner +## +AVEDEV = MEDELAVV ## Returnerar medelvärdet för datapunkters absoluta avvikelse från deras medelvärde +AVERAGE = MEDEL ## Returnerar medelvärdet av argumenten +AVERAGEA = AVERAGEA ## Returnerar medelvärdet av argumenten, inklusive tal, text och logiska värden +AVERAGEIF = MEDELOM ## Returnerar medelvärdet (aritmetiskt medelvärde) för alla celler i ett område som uppfyller ett givet kriterium +AVERAGEIFS = MEDELOMF ## Returnerar medelvärdet (det aritmetiska medelvärdet) för alla celler som uppfyller flera villkor. +BETADIST = BETAFÖRD ## Returnerar den kumulativa betafördelningsfunktionen +BETAINV = BETAINV ## Returnerar inversen till den kumulativa fördelningsfunktionen för en viss betafördelning +BINOMDIST = BINOMFÖRD ## Returnerar den individuella binomialfördelningen +CHIDIST = CHI2FÖRD ## Returnerar den ensidiga sannolikheten av c2-fördelningen +CHIINV = CHI2INV ## Returnerar inversen av chi2-fördelningen +CHITEST = CHI2TEST ## Returnerar oberoendetesten +CONFIDENCE = KONFIDENS ## Returnerar konfidensintervallet för en populations medelvärde +CORREL = KORREL ## Returnerar korrelationskoefficienten mellan två datamängder +COUNT = ANTAL ## Räknar hur många tal som finns bland argumenten +COUNTA = ANTALV ## Räknar hur många värden som finns bland argumenten +COUNTBLANK = ANTAL.TOMMA ## Räknar antalet tomma celler i ett område +COUNTIF = ANTAL.OM ## Räknar antalet celler i ett område som uppfyller angivna villkor. +COUNTIFS = ANTAL.OMF ## Räknar antalet celler i ett område som uppfyller flera villkor. +COVAR = KOVAR ## Returnerar kovariansen, d.v.s. medelvärdet av produkterna för parade avvikelser +CRITBINOM = KRITBINOM ## Returnerar det minsta värdet för vilket den kumulativa binomialfördelningen är mindre än eller lika med ett villkorsvärde +DEVSQ = KVADAVV ## Returnerar summan av kvadrater på avvikelser +EXPONDIST = EXPONFÖRD ## Returnerar exponentialfördelningen +FDIST = FFÖRD ## Returnerar F-sannolikhetsfördelningen +FINV = FINV ## Returnerar inversen till F-sannolikhetsfördelningen +FISHER = FISHER ## Returnerar Fisher-transformationen +FISHERINV = FISHERINV ## Returnerar inversen till Fisher-transformationen +FORECAST = PREDIKTION ## Returnerar ett värde längs en linjär trendlinje +FREQUENCY = FREKVENS ## Returnerar en frekvensfördelning som en lodrät matris +FTEST = FTEST ## Returnerar resultatet av en F-test +GAMMADIST = GAMMAFÖRD ## Returnerar gammafördelningen +GAMMAINV = GAMMAINV ## Returnerar inversen till den kumulativa gammafördelningen +GAMMALN = GAMMALN ## Returnerar den naturliga logaritmen för gammafunktionen, G(x) +GEOMEAN = GEOMEDEL ## Returnerar det geometriska medelvärdet +GROWTH = EXPTREND ## Returnerar värden längs en exponentiell trend +HARMEAN = HARMMEDEL ## Returnerar det harmoniska medelvärdet +HYPGEOMDIST = HYPGEOMFÖRD ## Returnerar den hypergeometriska fördelningen +INTERCEPT = SKÄRNINGSPUNKT ## Returnerar skärningspunkten för en linjär regressionslinje +KURT = TOPPIGHET ## Returnerar toppigheten av en mängd data +LARGE = STÖRSTA ## Returnerar det n:te största värdet i en mängd data +LINEST = REGR ## Returnerar parametrar till en linjär trendlinje +LOGEST = EXPREGR ## Returnerar parametrarna i en exponentiell trend +LOGINV = LOGINV ## Returnerar inversen till den lognormala fördelningen +LOGNORMDIST = LOGNORMFÖRD ## Returnerar den kumulativa lognormala fördelningen +MAX = MAX ## Returnerar det största värdet i en lista av argument +MAXA = MAXA ## Returnerar det största värdet i en lista av argument, inklusive tal, text och logiska värden +MEDIAN = MEDIAN ## Returnerar medianen för angivna tal +MIN = MIN ## Returnerar det minsta värdet i en lista med argument +MINA = MINA ## Returnerar det minsta värdet i en lista över argument, inklusive tal, text och logiska värden +MODE = TYPVÄRDE ## Returnerar det vanligaste värdet i en datamängd +NEGBINOMDIST = NEGBINOMFÖRD ## Returnerar den negativa binomialfördelningen +NORMDIST = NORMFÖRD ## Returnerar den kumulativa normalfördelningen +NORMINV = NORMINV ## Returnerar inversen till den kumulativa normalfördelningen +NORMSDIST = NORMSFÖRD ## Returnerar den kumulativa standardnormalfördelningen +NORMSINV = NORMSINV ## Returnerar inversen till den kumulativa standardnormalfördelningen +PEARSON = PEARSON ## Returnerar korrelationskoefficienten till Pearsons momentprodukt +PERCENTILE = PERCENTIL ## Returnerar den n:te percentilen av värden i ett område +PERCENTRANK = PROCENTRANG ## Returnerar procentrangen för ett värde i en datamängd +PERMUT = PERMUT ## Returnerar antal permutationer för ett givet antal objekt +POISSON = POISSON ## Returnerar Poisson-fördelningen +PROB = SANNOLIKHET ## Returnerar sannolikheten att värden i ett område ligger mellan två gränser +QUARTILE = KVARTIL ## Returnerar kvartilen av en mängd data +RANK = RANG ## Returnerar rangordningen för ett tal i en lista med tal +RSQ = RKV ## Returnerar kvadraten av Pearsons produktmomentkorrelationskoefficient +SKEW = SNEDHET ## Returnerar snedheten för en fördelning +SLOPE = LUTNING ## Returnerar lutningen på en linjär regressionslinje +SMALL = MINSTA ## Returnerar det n:te minsta värdet i en mängd data +STANDARDIZE = STANDARDISERA ## Returnerar ett normaliserat värde +STDEV = STDAV ## Uppskattar standardavvikelsen baserat på ett urval +STDEVA = STDEVA ## Uppskattar standardavvikelsen baserat på ett urval, inklusive tal, text och logiska värden +STDEVP = STDAVP ## Beräknar standardavvikelsen baserat på hela populationen +STDEVPA = STDEVPA ## Beräknar standardavvikelsen baserat på hela populationen, inklusive tal, text och logiska värden +STEYX = STDFELYX ## Returnerar standardfelet för ett förutspått y-värde för varje x-värde i regressionen +TDIST = TFÖRD ## Returnerar Students t-fördelning +TINV = TINV ## Returnerar inversen till Students t-fördelning +TREND = TREND ## Returnerar värden längs en linjär trend +TRIMMEAN = TRIMMEDEL ## Returnerar medelvärdet av mittpunkterna i en datamängd +TTEST = TTEST ## Returnerar sannolikheten beräknad ur Students t-test +VAR = VARIANS ## Uppskattar variansen baserat på ett urval +VARA = VARA ## Uppskattar variansen baserat på ett urval, inklusive tal, text och logiska värden +VARP = VARIANSP ## Beräknar variansen baserat på hela populationen +VARPA = VARPA ## Beräknar variansen baserat på hela populationen, inklusive tal, text och logiska värden +WEIBULL = WEIBULL ## Returnerar Weibull-fördelningen +ZTEST = ZTEST ## Returnerar det ensidiga sannolikhetsvärdet av ett z-test + + +## +## Text functions Textfunktioner +## +ASC = ASC ## Ändrar helbredds (dubbel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med halvt breddsteg (enkel byte) +BAHTTEXT = BAHTTEXT ## Omvandlar ett tal till text med valutaformatet ß (baht) +CHAR = TECKENKOD ## Returnerar tecknet som anges av kod +CLEAN = STÄDA ## Tar bort alla icke utskrivbara tecken i en text +CODE = KOD ## Returnerar en numerisk kod för det första tecknet i en textsträng +CONCATENATE = SAMMANFOGA ## Sammanfogar flera textdelar till en textsträng +DOLLAR = VALUTA ## Omvandlar ett tal till text med valutaformat +EXACT = EXAKT ## Kontrollerar om två textvärden är identiska +FIND = HITTA ## Hittar en text i en annan (skiljer på gemener och versaler) +FINDB = HITTAB ## Hittar en text i en annan (skiljer på gemener och versaler) +FIXED = FASTTAL ## Formaterar ett tal som text med ett fast antal decimaler +JIS = JIS ## Ändrar halvbredds (enkel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med helt breddsteg (dubbel byte) +LEFT = VÄNSTER ## Returnerar tecken längst till vänster i en sträng +LEFTB = VÄNSTERB ## Returnerar tecken längst till vänster i en sträng +LEN = LÄNGD ## Returnerar antalet tecken i en textsträng +LENB = LÄNGDB ## Returnerar antalet tecken i en textsträng +LOWER = GEMENER ## Omvandlar text till gemener +MID = EXTEXT ## Returnerar angivet antal tecken från en text med början vid den position som du anger +MIDB = EXTEXTB ## Returnerar angivet antal tecken från en text med början vid den position som du anger +PHONETIC = PHONETIC ## Returnerar de fonetiska (furigana) tecknen i en textsträng +PROPER = INITIAL ## Ändrar första bokstaven i varje ord i ett textvärde till versal +REPLACE = ERSÄTT ## Ersätter tecken i text +REPLACEB = ERSÄTTB ## Ersätter tecken i text +REPT = REP ## Upprepar en text ett bestämt antal gånger +RIGHT = HÖGER ## Returnerar tecken längst till höger i en sträng +RIGHTB = HÖGERB ## Returnerar tecken längst till höger i en sträng +SEARCH = SÖK ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) +SEARCHB = SÖKB ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) +SUBSTITUTE = BYT.UT ## Ersätter gammal text med ny text i en textsträng +T = T ## Omvandlar argumenten till text +TEXT = TEXT ## Formaterar ett tal och omvandlar det till text +TRIM = RENSA ## Tar bort blanksteg från text +UPPER = VERSALER ## Omvandlar text till versaler +VALUE = TEXTNUM ## Omvandlar ett textargument till ett tal diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config new file mode 100755 index 0000000..266e000 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/config @@ -0,0 +1,24 @@ +## +## PhpSpreadsheet +## + +ArgumentSeparator = ; + + +## +## (For future use) +## +currencySymbol = YTL + + +## +## Excel Error Codes (For future use) + +## +NULL = #BOŞ! +DIV0 = #SAYI/0! +VALUE = #DEĞER! +REF = #BAŞV! +NAME = #AD? +NUM = #SAYI! +NA = #YOK diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions new file mode 100755 index 0000000..f03563a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/tr/functions @@ -0,0 +1,416 @@ +## +## PhpSpreadsheet +## +## Data in this file derived from https://www.excel-function-translation.com/ +## +## + + +## +## Add-in and Automation functions Eklenti ve Otomasyon fonksiyonları +## +GETPIVOTDATA = ÖZETVERİAL ## Bir Özet Tablo raporunda saklanan verileri verir. + + +## +## Cube functions Küp işlevleri +## +CUBEKPIMEMBER = KÜPKPIÜYE ## Kilit performans göstergesi (KPI-Key Performance Indicator) adını, özelliğini ve ölçüsünü verir ve hücredeki ad ve özelliği gösterir. KPI, bir kurumun performansını izlemek için kullanılan aylık brüt kâr ya da üç aylık çalışan giriş çıkışları gibi ölçülebilen bir birimdir. +CUBEMEMBER = KÜPÜYE ## Bir küp hiyerarşisinde bir üyeyi veya kaydı verir. Üye veya kaydın küpte varolduğunu doğrulamak için kullanılır. +CUBEMEMBERPROPERTY = KÜPÜYEÖZELLİĞİ ## Bir küpte bir üyenin özelliğinin değerini verir. Küp içinde üye adının varlığını doğrulamak ve bu üyenin belli özelliklerini getirmek için kullanılır. +CUBERANKEDMEMBER = KÜPÜYESIRASI ## Bir küme içindeki üyenin derecesini veya kaçıncı olduğunu verir. En iyi satış elemanı, veya en iyi on öğrenci gibi bir kümedeki bir veya daha fazla öğeyi getirmek için kullanılır. +CUBESET = KÜPKÜME ## Kümeyi oluşturan ve ardından bu kümeyi Microsoft Office Excel'e getiren sunucudaki küpe küme ifadelerini göndererek hesaplanan üye veya kayıt kümesini tanımlar. +CUBESETCOUNT = KÜPKÜMESAY ## Bir kümedeki öğelerin sayısını getirir. +CUBEVALUE = KÜPDEĞER ## Bir küpten toplam değeri getirir. + + +## +## Database functions Veritabanı işlevleri +## +DAVERAGE = VSEÇORT ## Seçili veritabanı girdilerinin ortalamasını verir. +DCOUNT = VSEÇSAY ## Veritabanında sayı içeren hücre sayısını hesaplar. +DCOUNTA = VSEÇSAYDOLU ## Veritabanındaki boş olmayan hücreleri sayar. +DGET = VAL ## Veritabanından, belirtilen ölçütlerle eşleşen tek bir rapor çıkarır. +DMAX = VSEÇMAK ## Seçili veritabanı girişlerinin en yüksek değerini verir. +DMIN = VSEÇMİN ## Seçili veritabanı girişlerinin en düşük değerini verir. +DPRODUCT = VSEÇÇARP ## Kayıtların belli bir alanında bulunan, bir veritabanındaki ölçütlerle eşleşen değerleri çarpar. +DSTDEV = VSEÇSTDSAPMA ## Seçili veritabanı girişlerinden oluşan bir örneğe dayanarak, standart sapmayı tahmin eder. +DSTDEVP = VSEÇSTDSAPMAS ## Standart sapmayı, seçili veritabanı girişlerinin tüm popülasyonunu esas alarak hesaplar. +DSUM = VSEÇTOPLA ## Kayıtların alan sütununda bulunan, ölçütle eşleşen sayıları toplar. +DVAR = VSEÇVAR ## Seçili veritabanı girişlerinden oluşan bir örneği esas alarak farkı tahmin eder. +DVARP = VSEÇVARS ## Seçili veritabanı girişlerinin tüm popülasyonunu esas alarak farkı hesaplar. + + +## +## Date and time functions Tarih ve saat işlevleri +## +DATE = TARİH ## Belirli bir tarihin seri numarasını verir. +DATEVALUE = TARİHSAYISI ## Metin biçimindeki bir tarihi seri numarasına dönüştürür. +DAY = GÜN ## Seri numarasını, ayın bir gününe dönüştürür. +DAYS360 = GÜN360 ## İki tarih arasındaki gün sayısını, 360 günlük yılı esas alarak hesaplar. +EDATE = SERİTARİH ## Başlangıç tarihinden itibaren, belirtilen ay sayısından önce veya sonraki tarihin seri numarasını verir. +EOMONTH = SERİAY ## Belirtilen sayıda ay önce veya sonraki ayın son gününün seri numarasını verir. +HOUR = SAAT ## Bir seri numarasını saate dönüştürür. +MINUTE = DAKİKA ## Bir seri numarasını dakikaya dönüştürür. +MONTH = AY ## Bir seri numarasını aya dönüştürür. +NETWORKDAYS = TAMİŞGÜNÜ ## İki tarih arasındaki tam çalışma günlerinin sayısını verir. +NOW = ŞİMDİ ## Geçerli tarihin ve saatin seri numarasını verir. +SECOND = SANİYE ## Bir seri numarasını saniyeye dönüştürür. +TIME = ZAMAN ## Belirli bir zamanın seri numarasını verir. +TIMEVALUE = ZAMANSAYISI ## Metin biçimindeki zamanı seri numarasına dönüştürür. +TODAY = BUGÜN ## Bugünün tarihini seri numarasına dönüştürür. +WEEKDAY = HAFTANINGÜNÜ ## Bir seri numarasını, haftanın gününe dönüştürür. +WEEKNUM = HAFTASAY ## Dizisel değerini, haftanın yıl içinde bulunduğu konumu sayısal olarak gösteren sayıya dönüştürür. +WORKDAY = İŞGÜNÜ ## Belirtilen sayıda çalışma günü öncesinin ya da sonrasının tarihinin seri numarasını verir. +YEAR = YIL ## Bir seri numarasını yıla dönüştürür. +YEARFRAC = YILORAN ## Başlangıç_tarihi ve bitiş_tarihi arasındaki tam günleri gösteren yıl kesrini verir. + + +## +## Engineering functions Mühendislik işlevleri +## +BESSELI = BESSELI ## Değiştirilmiş Bessel fonksiyonu In(x)'i verir. +BESSELJ = BESSELJ ## Bessel fonksiyonu Jn(x)'i verir. +BESSELK = BESSELK ## Değiştirilmiş Bessel fonksiyonu Kn(x)'i verir. +BESSELY = BESSELY ## Bessel fonksiyonu Yn(x)'i verir. +BIN2DEC = BIN2DEC ## İkili bir sayıyı, ondalık sayıya dönüştürür. +BIN2HEX = BIN2HEX ## İkili bir sayıyı, onaltılıya dönüştürür. +BIN2OCT = BIN2OCT ## İkili bir sayıyı, sekizliye dönüştürür. +COMPLEX = KARMAŞIK ## Gerçek ve sanal katsayıları, karmaşık sayıya dönüştürür. +CONVERT = ÇEVİR ## Bir sayıyı, bir ölçüm sisteminden bir başka ölçüm sistemine dönüştürür. +DEC2BIN = DEC2BIN ## Ondalık bir sayıyı, ikiliye dönüştürür. +DEC2HEX = DEC2HEX ## Ondalık bir sayıyı, onaltılıya dönüştürür. +DEC2OCT = DEC2OCT ## Ondalık bir sayıyı sekizliğe dönüştürür. +DELTA = DELTA ## İki değerin eşit olup olmadığını sınar. +ERF = HATAİŞLEV ## Hata işlevini verir. +ERFC = TÜMHATAİŞLEV ## Tümleyici hata işlevini verir. +GESTEP = BESINIR ## Bir sayının eşik değerinden büyük olup olmadığını sınar. +HEX2BIN = HEX2BIN ## Onaltılı bir sayıyı ikiliye dönüştürür. +HEX2DEC = HEX2DEC ## Onaltılı bir sayıyı ondalığa dönüştürür. +HEX2OCT = HEX2OCT ## Onaltılı bir sayıyı sekizliğe dönüştürür. +IMABS = SANMUTLAK ## Karmaşık bir sayının mutlak değerini (modül) verir. +IMAGINARY = SANAL ## Karmaşık bir sayının sanal katsayısını verir. +IMARGUMENT = SANBAĞ_DEĞİŞKEN ## Radyanlarla belirtilen bir açı olan teta bağımsız değişkenini verir. +IMCONJUGATE = SANEŞLENEK ## Karmaşık bir sayının karmaşık eşleniğini verir. +IMCOS = SANCOS ## Karmaşık bir sayının kosinüsünü verir. +IMDIV = SANBÖL ## İki karmaşık sayının bölümünü verir. +IMEXP = SANÜS ## Karmaşık bir sayının üssünü verir. +IMLN = SANLN ## Karmaşık bir sayının doğal logaritmasını verir. +IMLOG10 = SANLOG10 ## Karmaşık bir sayının, 10 tabanında logaritmasını verir. +IMLOG2 = SANLOG2 ## Karmaşık bir sayının 2 tabanında logaritmasını verir. +IMPOWER = SANÜSSÜ ## Karmaşık bir sayıyı, bir tamsayı üssüne yükseltilmiş olarak verir. +IMPRODUCT = SANÇARP ## Karmaşık sayıların çarpımını verir. +IMREAL = SANGERÇEK ## Karmaşık bir sayının, gerçek katsayısını verir. +IMSIN = SANSIN ## Karmaşık bir sayının sinüsünü verir. +IMSQRT = SANKAREKÖK ## Karmaşık bir sayının karekökünü verir. +IMSUB = SANÇIKAR ## İki karmaşık sayının farkını verir. +IMSUM = SANTOPLA ## Karmaşık sayıların toplamını verir. +OCT2BIN = OCT2BIN ## Sekizli bir sayıyı ikiliye dönüştürür. +OCT2DEC = OCT2DEC ## Sekizli bir sayıyı ondalığa dönüştürür. +OCT2HEX = OCT2HEX ## Sekizli bir sayıyı onaltılıya dönüştürür. + + +## +## Financial functions Finansal fonksiyonlar +## +ACCRINT = GERÇEKFAİZ ## Dönemsel faiz ödeyen hisse senedine ilişkin tahakkuk eden faizi getirir. +ACCRINTM = GERÇEKFAİZV ## Vadesinde ödeme yapan bir tahvilin tahakkuk etmiş faizini verir. +AMORDEGRC = AMORDEGRC ## Yıpranma katsayısı kullanarak her hesap döneminin değer kaybını verir. +AMORLINC = AMORLINC ## Her hesap dönemi içindeki yıpranmayı verir. +COUPDAYBS = KUPONGÜNBD ## Kupon süresinin başlangıcından alış tarihine kadar olan süredeki gün sayısını verir. +COUPDAYS = KUPONGÜN ## Kupon süresindeki, gün sayısını, alış tarihini de içermek üzere, verir. +COUPDAYSNC = KUPONGÜNDSK ## Alış tarihinden bir sonraki kupon tarihine kadar olan gün sayısını verir. +COUPNCD = KUPONGÜNSKT ## Alış tarihinden bir sonraki kupon tarihini verir. +COUPNUM = KUPONSAYI ## Alış tarihiyle vade tarihi arasında ödenecek kuponların sayısını verir. +COUPPCD = KUPONGÜNÖKT ## Alış tarihinden bir önceki kupon tarihini verir. +CUMIPMT = AİÇVERİMORANI ## İki dönem arasında ödenen kümülatif faizi verir. +CUMPRINC = ANA_PARA_ÖDEMESİ ## İki dönem arasında bir borç üzerine ödenen birikimli temeli verir. +DB = AZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, sabit azalan bakiye yöntemini kullanarak verir. +DDB = ÇİFTAZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, çift azalan bakiye yöntemi ya da sizin belirttiğiniz başka bir yöntemi kullanarak verir. +DISC = İNDİRİM ## Bir tahvilin indirim oranını verir. +DOLLARDE = LİRAON ## Kesir olarak tanımlanmış lira fiyatını, ondalık sayı olarak tanımlanmış lira fiyatına dönüştürür. +DOLLARFR = LİRAKES ## Ondalık sayı olarak tanımlanmış lira fiyatını, kesir olarak tanımlanmış lira fiyatına dönüştürür. +DURATION = SÜRE ## Belli aralıklarla faiz ödemesi yapan bir tahvilin yıllık süresini verir. +EFFECT = ETKİN ## Efektif yıllık faiz oranını verir. +FV = ANBD ## Bir yatırımın gelecekteki değerini verir. +FVSCHEDULE = GDPROGRAM ## Bir seri birleşik faiz oranı uyguladıktan sonra, bir başlangıçtaki anaparanın gelecekteki değerini verir. +INTRATE = FAİZORANI ## Tam olarak yatırım yapılmış bir tahvilin faiz oranını verir. +IPMT = FAİZTUTARI ## Bir yatırımın verilen bir süre için faiz ödemesini verir. +IRR = İÇ_VERİM_ORANI ## Bir para akışı serisi için, iç verim oranını verir. +ISPMT = ISPMT ## Yatırımın belirli bir dönemi boyunca ödenen faizi hesaplar. +MDURATION = MSÜRE ## Varsayılan par değeri 10.000.000 lira olan bir tahvil için Macauley değiştirilmiş süreyi verir. +MIRR = D_İÇ_VERİM_ORANI ## Pozitif ve negatif para akışlarının farklı oranlarda finanse edildiği durumlarda, iç verim oranını verir. +NOMINAL = NOMİNAL ## Yıllık nominal faiz oranını verir. +NPER = DÖNEM_SAYISI ## Bir yatırımın dönem sayısını verir. +NPV = NBD ## Bir yatırımın bugünkü net değerini, bir dönemsel para akışları serisine ve bir indirim oranına bağlı olarak verir. +ODDFPRICE = TEKYDEĞER ## Tek bir ilk dönemi olan bir tahvilin değerini, her 100.000.000 lirada bir verir. +ODDFYIELD = TEKYÖDEME ## Tek bir ilk dönemi olan bir tahvilin ödemesini verir. +ODDLPRICE = TEKSDEĞER ## Tek bir son dönemi olan bir tahvilin fiyatını her 10.000.000 lirada bir verir. +ODDLYIELD = TEKSÖDEME ## Tek bir son dönemi olan bir tahvilin ödemesini verir. +PMT = DEVRESEL_ÖDEME ## Bir yıllık dönemsel ödemeyi verir. +PPMT = ANA_PARA_ÖDEMESİ ## Verilen bir süre için, bir yatırımın anaparasına dayanan ödemeyi verir. +PRICE = DEĞER ## Dönemsel faiz ödeyen bir tahvilin fiyatını 10.000.00 liralık değer başına verir. +PRICEDISC = DEĞERİND ## İndirimli bir tahvilin fiyatını 10.000.000 liralık nominal değer başına verir. +PRICEMAT = DEĞERVADE ## Faizini vade sonunda ödeyen bir tahvilin fiyatını 10.000.000 nominal değer başına verir. +PV = BD ## Bir yatırımın bugünkü değerini verir. +RATE = FAİZ_ORANI ## Bir yıllık dönem başına düşen faiz oranını verir. +RECEIVED = GETİRİ ## Tam olarak yatırılmış bir tahvilin vadesinin bitiminde alınan miktarı verir. +SLN = DA ## Bir malın bir dönem içindeki doğrusal yıpranmasını verir. +SYD = YAT ## Bir malın belirli bir dönem için olan amortismanını verir. +TBILLEQ = HTAHEŞ ## Bir Hazine bonosunun bono eşdeğeri ödemesini verir. +TBILLPRICE = HTAHDEĞER ## Bir Hazine bonosunun değerini, 10.000.000 liralık nominal değer başına verir. +TBILLYIELD = HTAHÖDEME ## Bir Hazine bonosunun ödemesini verir. +VDB = DAB ## Bir malın amortismanını, belirlenmiş ya da kısmi bir dönem için, bir azalan bakiye yöntemi kullanarak verir. +XIRR = AİÇVERİMORANI ## Dönemsel olması gerekmeyen bir para akışları programı için, iç verim oranını verir. +XNPV = ANBD ## Dönemsel olması gerekmeyen bir para akışları programı için, bugünkü net değeri verir. +YIELD = ÖDEME ## Belirli aralıklarla faiz ödeyen bir tahvilin ödemesini verir. +YIELDDISC = ÖDEMEİND ## İndirimli bir tahvilin yıllık ödemesini verir; örneğin, bir Hazine bonosunun. +YIELDMAT = ÖDEMEVADE ## Vadesinin bitiminde faiz ödeyen bir tahvilin yıllık ödemesini verir. + + +## +## Information functions Bilgi fonksiyonları +## +CELL = HÜCRE ## Bir hücrenin biçimlendirmesi, konumu ya da içeriği hakkında bilgi verir. +ERROR.TYPE = HATA.TİPİ ## Bir hata türüne ilişkin sayıları verir. +INFO = BİLGİ ## Geçerli işletim ortamı hakkında bilgi verir. +ISBLANK = EBOŞSA ## Değer boşsa, DOĞRU verir. +ISERR = EHATA ## Değer, #YOK dışındaki bir hata değeriyse, DOĞRU verir. +ISERROR = EHATALIYSA ## Değer, herhangi bir hata değeriyse, DOĞRU verir. +ISEVEN = ÇİFTTİR ## Sayı çiftse, DOĞRU verir. +ISLOGICAL = EMANTIKSALSA ## Değer, mantıksal bir değerse, DOĞRU verir. +ISNA = EYOKSA ## Değer, #YOK hata değeriyse, DOĞRU verir. +ISNONTEXT = EMETİNDEĞİLSE ## Değer, metin değilse, DOĞRU verir. +ISNUMBER = ESAYIYSA ## Değer, bir sayıysa, DOĞRU verir. +ISODD = TEKTİR ## Sayı tekse, DOĞRU verir. +ISREF = EREFSE ## Değer bir başvuruysa, DOĞRU verir. +ISTEXT = EMETİNSE ## Değer bir metinse DOĞRU verir. +N = N ## Sayıya dönüştürülmüş bir değer verir. +NA = YOKSAY ## #YOK hata değerini verir. +TYPE = TİP ## Bir değerin veri türünü belirten bir sayı verir. + + +## +## Logical functions Mantıksal fonksiyonlar +## +AND = VE ## Bütün bağımsız değişkenleri DOĞRU ise, DOĞRU verir. +FALSE = YANLIŞ ## YANLIŞ mantıksal değerini verir. +IF = EĞER ## Gerçekleştirilecek bir mantıksal sınama belirtir. +IFERROR = EĞERHATA ## Formül hatalıysa belirttiğiniz değeri verir; bunun dışındaki durumlarda formülün sonucunu verir. +NOT = DEĞİL ## Bağımsız değişkeninin mantığını tersine çevirir. +OR = YADA ## Bağımsız değişkenlerden herhangi birisi DOĞRU ise, DOĞRU verir. +TRUE = DOĞRU ## DOĞRU mantıksal değerini verir. + + +## +## Lookup and reference functions Arama ve Başvuru fonksiyonları +## +ADDRESS = ADRES ## Bir başvuruyu, çalışma sayfasındaki tek bir hücreye metin olarak verir. +AREAS = ALANSAY ## Renvoie le nombre de zones dans une référence. +CHOOSE = ELEMAN ## Değerler listesinden bir değer seçer. +COLUMN = SÜTUN ## Bir başvurunun sütun sayısını verir. +COLUMNS = SÜTUNSAY ## Bir başvurudaki sütunların sayısını verir. +HLOOKUP = YATAYARA ## Bir dizinin en üst satırına bakar ve belirtilen hücrenin değerini verir. +HYPERLINK = KÖPRÜ ## Bir ağ sunucusunda, bir intranette ya da Internet'te depolanan bir belgeyi açan bir kısayol ya da atlama oluşturur. +INDEX = İNDİS ## Başvurudan veya diziden bir değer seçmek için, bir dizin kullanır. +INDIRECT = DOLAYLI ## Metin değeriyle belirtilen bir başvuru verir. +LOOKUP = ARA ## Bir vektördeki veya dizideki değerleri arar. +MATCH = KAÇINCI ## Bir başvurudaki veya dizideki değerleri arar. +OFFSET = KAYDIR ## Verilen bir başvurudan, bir başvuru kaydırmayı verir. +ROW = SATIR ## Bir başvurunun satır sayısını verir. +ROWS = SATIRSAY ## Bir başvurudaki satırların sayısını verir. +RTD = RTD ## COM otomasyonunu destekleyen programdan gerçek zaman verileri alır. +TRANSPOSE = DEVRİK_DÖNÜŞÜM ## Bir dizinin devrik dönüşümünü verir. +VLOOKUP = DÜŞEYARA ## Bir dizinin ilk sütununa bakar ve bir hücrenin değerini vermek için satır boyunca hareket eder. + + +## +## Math and trigonometry functions Matematik ve trigonometri fonksiyonları +## +ABS = MUTLAK ## Bir sayının mutlak değerini verir. +ACOS = ACOS ## Bir sayının ark kosinüsünü verir. +ACOSH = ACOSH ## Bir sayının ters hiperbolik kosinüsünü verir. +ASIN = ASİN ## Bir sayının ark sinüsünü verir. +ASINH = ASİNH ## Bir sayının ters hiperbolik sinüsünü verir. +ATAN = ATAN ## Bir sayının ark tanjantını verir. +ATAN2 = ATAN2 ## Ark tanjantı, x- ve y- koordinatlarından verir. +ATANH = ATANH ## Bir sayının ters hiperbolik tanjantını verir. +CEILING = TAVANAYUVARLA ## Bir sayıyı, en yakın tamsayıya ya da en yakın katına yuvarlar. +COMBIN = KOMBİNASYON ## Verilen sayıda öğenin kombinasyon sayısını verir. +COS = COS ## Bir sayının kosinüsünü verir. +COSH = COSH ## Bir sayının hiperbolik kosinüsünü verir. +DEGREES = DERECE ## Radyanları dereceye dönüştürür. +EVEN = ÇİFT ## Bir sayıyı, en yakın daha büyük çift tamsayıya yuvarlar. +EXP = ÜS ## e'yi, verilen bir sayının üssüne yükseltilmiş olarak verir. +FACT = ÇARPINIM ## Bir sayının faktörünü verir. +FACTDOUBLE = ÇİFTFAKTÖR ## Bir sayının çift çarpınımını verir. +FLOOR = TABANAYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. +GCD = OBEB ## En büyük ortak böleni verir. +INT = TAMSAYI ## Bir sayıyı aşağıya doğru en yakın tamsayıya yuvarlar. +LCM = OKEK ## En küçük ortak katı verir. +LN = LN ## Bir sayının doğal logaritmasını verir. +LOG = LOG ## Bir sayının, belirtilen bir tabandaki logaritmasını verir. +LOG10 = LOG10 ## Bir sayının 10 tabanında logaritmasını verir. +MDETERM = DETERMİNANT ## Bir dizinin dizey determinantını verir. +MINVERSE = DİZEY_TERS ## Bir dizinin dizey tersini verir. +MMULT = DÇARP ## İki dizinin dizey çarpımını verir. +MOD = MODÜLO ## Bölmeden kalanı verir. +MROUND = KYUVARLA ## İstenen kata yuvarlanmış bir sayı verir. +MULTINOMIAL = ÇOKTERİMLİ ## Bir sayılar kümesinin çok terimlisini verir. +ODD = TEK ## Bir sayıyı en yakın daha büyük tek sayıya yuvarlar. +PI = Pİ ## Pi değerini verir. +POWER = KUVVET ## Bir üsse yükseltilmiş sayının sonucunu verir. +PRODUCT = ÇARPIM ## Bağımsız değişkenlerini çarpar. +QUOTIENT = BÖLÜM ## Bir bölme işleminin tamsayı kısmını verir. +RADIANS = RADYAN ## Dereceleri radyanlara dönüştürür. +RAND = S_SAYI_ÜRET ## 0 ile 1 arasında rastgele bir sayı verir. +RANDBETWEEN = RASTGELEARALIK ## Belirttiğiniz sayılar arasında rastgele bir sayı verir. +ROMAN = ROMEN ## Bir normal rakamı, metin olarak, romen rakamına çevirir. +ROUND = YUVARLA ## Bir sayıyı, belirtilen basamak sayısına yuvarlar. +ROUNDDOWN = AŞAĞIYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. +ROUNDUP = YUKARIYUVARLA ## Bir sayıyı daha büyük sayıya, sıfırdan ıraksayarak yuvarlar. +SERIESSUM = SERİTOPLA ## Bir üs serisinin toplamını, formüle bağlı olarak verir. +SIGN = İŞARET ## Bir sayının işaretini verir. +SIN = SİN ## Verilen bir açının sinüsünü verir. +SINH = SİNH ## Bir sayının hiperbolik sinüsünü verir. +SQRT = KAREKÖK ## Pozitif bir karekök verir. +SQRTPI = KAREKÖKPİ ## (* Pi sayısının) kare kökünü verir. +SUBTOTAL = ALTTOPLAM ## Bir listedeki ya da veritabanındaki bir alt toplamı verir. +SUM = TOPLA ## Bağımsız değişkenlerini toplar. +SUMIF = ETOPLA ## Verilen ölçütle belirlenen hücreleri toplar. +SUMIFS = SUMIFS ## Bir aralıktaki, birden fazla ölçüte uyan hücreleri ekler. +SUMPRODUCT = TOPLA.ÇARPIM ## İlişkili dizi bileşenlerinin çarpımlarının toplamını verir. +SUMSQ = TOPKARE ## Bağımsız değişkenlerin karelerinin toplamını verir. +SUMX2MY2 = TOPX2EY2 ## İki dizideki ilişkili değerlerin farkının toplamını verir. +SUMX2PY2 = TOPX2AY2 ## İki dizideki ilişkili değerlerin karelerinin toplamının toplamını verir. +SUMXMY2 = TOPXEY2 ## İki dizideki ilişkili değerlerin farklarının karelerinin toplamını verir. +TAN = TAN ## Bir sayının tanjantını verir. +TANH = TANH ## Bir sayının hiperbolik tanjantını verir. +TRUNC = NSAT ## Bir sayının, tamsayı durumuna gelecek şekilde, fazlalıklarını atar. + + +## +## Statistical functions İstatistiksel fonksiyonlar +## +AVEDEV = ORTSAP ## Veri noktalarının ortalamalarından mutlak sapmalarının ortalamasını verir. +AVERAGE = ORTALAMA ## Bağımsız değişkenlerinin ortalamasını verir. +AVERAGEA = ORTALAMAA ## Bağımsız değişkenlerinin, sayılar, metin ve mantıksal değerleri içermek üzere ortalamasını verir. +AVERAGEIF = EĞERORTALAMA ## Verili ölçütü karşılayan bir aralıktaki bütün hücrelerin ortalamasını (aritmetik ortalama) hesaplar. +AVERAGEIFS = EĞERLERORTALAMA ## Birden çok ölçüte uyan tüm hücrelerin ortalamasını (aritmetik ortalama) hesaplar. +BETADIST = BETADAĞ ## Beta birikimli dağılım fonksiyonunu verir. +BETAINV = BETATERS ## Belirli bir beta dağılımı için birikimli dağılım fonksiyonunun tersini verir. +BINOMDIST = BİNOMDAĞ ## Tek terimli binom dağılımı olasılığını verir. +CHIDIST = KİKAREDAĞ ## Kikare dağılımın tek kuyruklu olasılığını verir. +CHIINV = KİKARETERS ## Kikare dağılımın kuyruklu olasılığının tersini verir. +CHITEST = KİKARETEST ## Bağımsızlık sınamalarını verir. +CONFIDENCE = GÜVENİRLİK ## Bir popülasyon ortalaması için güvenirlik aralığını verir. +CORREL = KORELASYON ## İki veri kümesi arasındaki bağlantı katsayısını verir. +COUNT = BAĞ_DEĞ_SAY ## Bağımsız değişkenler listesinde kaç tane sayı bulunduğunu sayar. +COUNTA = BAĞ_DEĞ_DOLU_SAY ## Bağımsız değişkenler listesinde kaç tane değer bulunduğunu sayar. +COUNTBLANK = BOŞLUKSAY ## Aralıktaki boş hücre sayısını hesaplar. +COUNTIF = EĞERSAY ## Verilen ölçütlere uyan bir aralık içindeki hücreleri sayar. +COUNTIFS = ÇOKEĞERSAY ## Birden çok ölçüte uyan bir aralık içindeki hücreleri sayar. +COVAR = KOVARYANS ## Eşleştirilmiş sapmaların ortalaması olan kovaryansı verir. +CRITBINOM = KRİTİKBİNOM ## Birikimli binom dağılımının bir ölçüt değerinden küçük veya ölçüt değerine eşit olduğu en küçük değeri verir. +DEVSQ = SAPKARE ## Sapmaların karelerinin toplamını verir. +EXPONDIST = ÜSTELDAĞ ## Üstel dağılımı verir. +FDIST = FDAĞ ## F olasılık dağılımını verir. +FINV = FTERS ## F olasılık dağılımının tersini verir. +FISHER = FISHER ## Fisher dönüşümünü verir. +FISHERINV = FISHERTERS ## Fisher dönüşümünün tersini verir. +FORECAST = TAHMİN ## Bir doğrusal eğilim boyunca bir değer verir. +FREQUENCY = SIKLIK ## Bir sıklık dağılımını, dikey bir dizi olarak verir. +FTEST = FTEST ## Bir F-test'in sonucunu verir. +GAMMADIST = GAMADAĞ ## Gama dağılımını verir. +GAMMAINV = GAMATERS ## Gama kümülatif dağılımının tersini verir. +GAMMALN = GAMALN ## Gama fonksiyonunun (?(x)) doğal logaritmasını verir. +GEOMEAN = GEOORT ## Geometrik ortayı verir. +GROWTH = BÜYÜME ## Üstel bir eğilim boyunca değerler verir. +HARMEAN = HARORT ## Harmonik ortayı verir. +HYPGEOMDIST = HİPERGEOMDAĞ ## Hipergeometrik dağılımı verir. +INTERCEPT = KESMENOKTASI ## Doğrusal çakıştırma çizgisinin kesişme noktasını verir. +KURT = BASIKLIK ## Bir veri kümesinin basıklığını verir. +LARGE = BÜYÜK ## Bir veri kümesinde k. en büyük değeri verir. +LINEST = DOT ## Doğrusal bir eğilimin parametrelerini verir. +LOGEST = LOT ## Üstel bir eğilimin parametrelerini verir. +LOGINV = LOGTERS ## Bir lognormal dağılımının tersini verir. +LOGNORMDIST = LOGNORMDAĞ ## Birikimli lognormal dağılımını verir. +MAX = MAK ## Bir bağımsız değişkenler listesindeki en büyük değeri verir. +MAXA = MAKA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri içermek üzere, en büyük değeri verir. +MEDIAN = ORTANCA ## Belirtilen sayıların orta değerini verir. +MIN = MİN ## Bir bağımsız değişkenler listesindeki en küçük değeri verir. +MINA = MİNA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri de içermek üzere, en küçük değeri verir. +MODE = ENÇOK_OLAN ## Bir veri kümesindeki en sık rastlanan değeri verir. +NEGBINOMDIST = NEGBİNOMDAĞ ## Negatif binom dağılımını verir. +NORMDIST = NORMDAĞ ## Normal birikimli dağılımı verir. +NORMINV = NORMTERS ## Normal kümülatif dağılımın tersini verir. +NORMSDIST = NORMSDAĞ ## Standart normal birikimli dağılımı verir. +NORMSINV = NORMSTERS ## Standart normal birikimli dağılımın tersini verir. +PEARSON = PEARSON ## Pearson çarpım moment korelasyon katsayısını verir. +PERCENTILE = YÜZDEBİRLİK ## Bir aralık içerisinde bulunan değerlerin k. frekans toplamını verir. +PERCENTRANK = YÜZDERANK ## Bir veri kümesindeki bir değerin yüzde mertebesini verir. +PERMUT = PERMÜTASYON ## Verilen sayıda nesne için permütasyon sayısını verir. +POISSON = POISSON ## Poisson dağılımını verir. +PROB = OLASILIK ## Bir aralıktaki değerlerin iki sınır arasında olması olasılığını verir. +QUARTILE = DÖRTTEBİRLİK ## Bir veri kümesinin dörtte birliğini verir. +RANK = RANK ## Bir sayılar listesinde bir sayının mertebesini verir. +RSQ = RKARE ## Pearson çarpım moment korelasyon katsayısının karesini verir. +SKEW = ÇARPIKLIK ## Bir dağılımın çarpıklığını verir. +SLOPE = EĞİM ## Doğrusal çakışma çizgisinin eğimini verir. +SMALL = KÜÇÜK ## Bir veri kümesinde k. en küçük değeri verir. +STANDARDIZE = STANDARTLAŞTIRMA ## Normalleştirilmiş bir değer verir. +STDEV = STDSAPMA ## Bir örneğe dayanarak standart sapmayı tahmin eder. +STDEVA = STDSAPMAA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. +STDEVP = STDSAPMAS ## Standart sapmayı, tüm popülasyona bağlı olarak hesaplar. +STDEVPA = STDSAPMASA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. +STEYX = STHYX ## Regresyondaki her x için tahmini y değerinin standart hatasını verir. +TDIST = TDAĞ ## T-dağılımını verir. +TINV = TTERS ## T-dağılımının tersini verir. +TREND = EĞİLİM ## Doğrusal bir eğilim boyunca değerler verir. +TRIMMEAN = KIRPORTALAMA ## Bir veri kümesinin içinin ortalamasını verir. +TTEST = TTEST ## T-test'le ilişkilendirilmiş olasılığı verir. +VAR = VAR ## Varyansı, bir örneğe bağlı olarak tahmin eder. +VARA = VARA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. +VARP = VARS ## Varyansı, tüm popülasyona dayanarak hesaplar. +VARPA = VARSA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. +WEIBULL = WEIBULL ## Weibull dağılımını hesaplar. +ZTEST = ZTEST ## Z-testinin tek kuyruklu olasılık değerini hesaplar. + + +## +## Text functions Metin fonksiyonları +## +ASC = ASC ## Bir karakter dizesindeki çift enli (iki bayt) İngilizce harfleri veya katakanayı yarım enli (tek bayt) karakterlerle değiştirir. +BAHTTEXT = BAHTTEXT ## Sayıyı, ß (baht) para birimi biçimini kullanarak metne dönüştürür. +CHAR = DAMGA ## Kod sayısıyla belirtilen karakteri verir. +CLEAN = TEMİZ ## Metindeki bütün yazdırılamaz karakterleri kaldırır. +CODE = KOD ## Bir metin dizesindeki ilk karakter için sayısal bir kod verir. +CONCATENATE = BİRLEŞTİR ## Pek çok metin öğesini bir metin öğesi olarak birleştirir. +DOLLAR = LİRA ## Bir sayıyı YTL (yeni Türk lirası) para birimi biçimini kullanarak metne dönüştürür. +EXACT = ÖZDEŞ ## İki metin değerinin özdeş olup olmadığını anlamak için, değerleri denetler. +FIND = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). +FINDB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). +FIXED = SAYIDÜZENLE ## Bir sayıyı, sabit sayıda ondalıkla, metin olarak biçimlendirir. +JIS = JIS ## Bir karakter dizesindeki tek enli (tek bayt) İngilizce harfleri veya katakanayı çift enli (iki bayt) karakterlerle değiştirir. +LEFT = SOL ## Bir metin değerinden en soldaki karakterleri verir. +LEFTB = SOLB ## Bir metin değerinden en soldaki karakterleri verir. +LEN = UZUNLUK ## Bir metin dizesindeki karakter sayısını verir. +LENB = UZUNLUKB ## Bir metin dizesindeki karakter sayısını verir. +LOWER = KÜÇÜKHARF ## Metni küçük harfe çevirir. +MID = ORTA ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. +MIDB = ORTAB ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. +PHONETIC = SES ## Metin dizesinden ses (furigana) karakterlerini ayıklar. +PROPER = YAZIM.DÜZENİ ## Bir metin değerinin her bir sözcüğünün ilk harfini büyük harfe çevirir. +REPLACE = DEĞİŞTİR ## Metnin içindeki karakterleri değiştirir. +REPLACEB = DEĞİŞTİRB ## Metnin içindeki karakterleri değiştirir. +REPT = YİNELE ## Metni belirtilen sayıda yineler. +RIGHT = SAĞ ## Bir metin değerinden en sağdaki karakterleri verir. +RIGHTB = SAĞB ## Bir metin değerinden en sağdaki karakterleri verir. +SEARCH = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). +SEARCHB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). +SUBSTITUTE = YERİNEKOY ## Bir metin dizesinde, eski metnin yerine yeni metin koyar. +T = M ## Bağımsız değerlerini metne dönüştürür. +TEXT = METNEÇEVİR ## Bir sayıyı biçimlendirir ve metne dönüştürür. +TRIM = KIRP ## Metindeki boşlukları kaldırır. +UPPER = BÜYÜKHARF ## Metni büyük harfe çevirir. +VALUE = SAYIYAÇEVİR ## Bir metin bağımsız değişkenini sayıya dönüştürür. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php new file mode 100755 index 0000000..4052c23 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php @@ -0,0 +1,176 @@ +setValueExplicit(true, DataType::TYPE_BOOL); + + return true; + } elseif ($value == Calculation::getFALSE()) { + $cell->setValueExplicit(false, DataType::TYPE_BOOL); + + return true; + } + + // Check for number in scientific format + if (preg_match('/^' . Calculation::CALCULATION_REGEXP_NUMBER . '$/', $value)) { + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + + return true; + } + + // Check for fraction + if (preg_match('/^([+-]?)\s*(\d+)\s?\/\s*(\d+)$/', $value, $matches)) { + // Convert value to number + $value = $matches[2] / $matches[3]; + if ($matches[1] == '-') { + $value = 0 - $value; + } + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode('??/??'); + + return true; + } elseif (preg_match('/^([+-]?)(\d*) +(\d*)\s?\/\s*(\d*)$/', $value, $matches)) { + // Convert value to number + $value = $matches[2] + ($matches[3] / $matches[4]); + if ($matches[1] == '-') { + $value = 0 - $value; + } + $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode('# ??/??'); + + return true; + } + + // Check for percentage + if (preg_match('/^\-?\d*\.?\d*\s?\%$/', $value)) { + // Convert value to number + $value = (float) str_replace('%', '', $value) / 100; + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_PERCENTAGE_00); + + return true; + } + + // Check for currency + $currencyCode = StringHelper::getCurrencyCode(); + $decimalSeparator = StringHelper::getDecimalSeparator(); + $thousandsSeparator = StringHelper::getThousandsSeparator(); + if (preg_match('/^' . preg_quote($currencyCode, '/') . ' *(\d{1,3}(' . preg_quote($thousandsSeparator, '/') . '\d{3})*|(\d+))(' . preg_quote($decimalSeparator, '/') . '\d{2})?$/', $value)) { + // Convert value to number + $value = (float) trim(str_replace([$currencyCode, $thousandsSeparator, $decimalSeparator], ['', '', '.'], $value)); + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode( + str_replace('$', $currencyCode, NumberFormat::FORMAT_CURRENCY_USD_SIMPLE) + ); + + return true; + } elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) { + // Convert value to number + $value = (float) trim(str_replace(['$', ','], '', $value)); + $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); + + return true; + } + + // Check for time without seconds e.g. '9:45', '09:45' + if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) { + // Convert value to number + list($h, $m) = explode(':', $value); + $days = $h / 24 + $m / 1440; + $cell->setValueExplicit($days, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME3); + + return true; + } + + // Check for time with seconds '9:45:59', '09:45:59' + if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$/', $value)) { + // Convert value to number + list($h, $m, $s) = explode(':', $value); + $days = $h / 24 + $m / 1440 + $s / 86400; + // Convert value to number + $cell->setValueExplicit($days, DataType::TYPE_NUMERIC); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode(NumberFormat::FORMAT_DATE_TIME4); + + return true; + } + + // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10' + if (($d = Date::stringToExcel($value)) !== false) { + // Convert value to number + $cell->setValueExplicit($d, DataType::TYPE_NUMERIC); + // Determine style. Either there is a time part or not. Look for ':' + if (strpos($value, ':') !== false) { + $formatCode = 'yyyy-mm-dd h:mm'; + } else { + $formatCode = 'yyyy-mm-dd'; + } + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getNumberFormat()->setFormatCode($formatCode); + + return true; + } + + // Check for newline character "\n" + if (strpos($value, "\n") !== false) { + $value = StringHelper::sanitizeUTF8($value); + $cell->setValueExplicit($value, DataType::TYPE_STRING); + // Set style + $cell->getWorksheet()->getStyle($cell->getCoordinate()) + ->getAlignment()->setWrapText(true); + + return true; + } + } + + // Not bound yet? Use parent... + return parent::bindValue($cell, $value); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php new file mode 100755 index 0000000..813eee4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php @@ -0,0 +1,698 @@ +parent->update($this); + + return $this; + } + + public function detach() + { + $this->parent = null; + } + + public function attach(Cells $parent) + { + $this->parent = $parent; + } + + /** + * Create a new Cell. + * + * @param mixed $pValue + * @param string $pDataType + * @param Worksheet $pSheet + * + * @throws Exception + */ + public function __construct($pValue, $pDataType, Worksheet $pSheet) + { + // Initialise cell value + $this->value = $pValue; + + // Set worksheet cache + $this->parent = $pSheet->getCellCollection(); + + // Set datatype? + if ($pDataType !== null) { + if ($pDataType == DataType::TYPE_STRING2) { + $pDataType = DataType::TYPE_STRING; + } + $this->dataType = $pDataType; + } elseif (!self::getValueBinder()->bindValue($this, $pValue)) { + throw new Exception('Value could not be bound to cell.'); + } + } + + /** + * Get cell coordinate column. + * + * @return string + */ + public function getColumn() + { + return $this->parent->getCurrentColumn(); + } + + /** + * Get cell coordinate row. + * + * @return int + */ + public function getRow() + { + return $this->parent->getCurrentRow(); + } + + /** + * Get cell coordinate. + * + * @return string + */ + public function getCoordinate() + { + return $this->parent->getCurrentCoordinate(); + } + + /** + * Get cell value. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Get cell value with formatting. + * + * @return string + */ + public function getFormattedValue() + { + return (string) NumberFormat::toFormattedString( + $this->getCalculatedValue(), + $this->getStyle() + ->getNumberFormat()->getFormatCode() + ); + } + + /** + * Set cell value. + * + * Sets the value for a cell, automatically determining the datatype using the value binder + * + * @param mixed $pValue Value + * + * @throws Exception + * + * @return Cell + */ + public function setValue($pValue) + { + if (!self::getValueBinder()->bindValue($this, $pValue)) { + throw new Exception('Value could not be bound to cell.'); + } + + return $this; + } + + /** + * Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder). + * + * @param mixed $pValue Value + * @param string $pDataType Explicit data type, see DataType::TYPE_* + * + * @throws Exception + * + * @return Cell + */ + public function setValueExplicit($pValue, $pDataType) + { + // set the value according to data type + switch ($pDataType) { + case DataType::TYPE_NULL: + $this->value = $pValue; + + break; + case DataType::TYPE_STRING2: + $pDataType = DataType::TYPE_STRING; + // no break + case DataType::TYPE_STRING: + // Synonym for string + case DataType::TYPE_INLINE: + // Rich text + $this->value = DataType::checkString($pValue); + + break; + case DataType::TYPE_NUMERIC: + $this->value = (float) $pValue; + + break; + case DataType::TYPE_FORMULA: + $this->value = (string) $pValue; + + break; + case DataType::TYPE_BOOL: + $this->value = (bool) $pValue; + + break; + case DataType::TYPE_ERROR: + $this->value = DataType::checkErrorCode($pValue); + + break; + default: + throw new Exception('Invalid datatype: ' . $pDataType); + + break; + } + + // set the datatype + $this->dataType = $pDataType; + + return $this->updateInCollection(); + } + + /** + * Get calculated cell value. + * + * @param bool $resetLog Whether the calculation engine logger should be reset or not + * + * @throws Exception + * + * @return mixed + */ + public function getCalculatedValue($resetLog = true) + { + if ($this->dataType == DataType::TYPE_FORMULA) { + try { + $result = Calculation::getInstance( + $this->getWorksheet()->getParent() + )->calculateCellValue($this, $resetLog); + // We don't yet handle array returns + if (is_array($result)) { + while (is_array($result)) { + $result = array_pop($result); + } + } + } catch (Exception $ex) { + if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) { + return $this->calculatedValue; // Fallback for calculations referencing external files. + } + + throw new \PhpOffice\PhpSpreadsheet\Calculation\Exception( + $this->getWorksheet()->getTitle() . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage() + ); + } + + if ($result === '#Not Yet Implemented') { + return $this->calculatedValue; // Fallback if calculation engine does not support the formula. + } + + return $result; + } elseif ($this->value instanceof RichText) { + return $this->value->getPlainText(); + } + + return $this->value; + } + + /** + * Set old calculated value (cached). + * + * @param mixed $pValue Value + * + * @return Cell + */ + public function setCalculatedValue($pValue) + { + if ($pValue !== null) { + $this->calculatedValue = (is_numeric($pValue)) ? (float) $pValue : $pValue; + } + + return $this->updateInCollection(); + } + + /** + * Get old calculated value (cached) + * This returns the value last calculated by MS Excel or whichever spreadsheet program was used to + * create the original spreadsheet file. + * Note that this value is not guaranteed to reflect the actual calculated value because it is + * possible that auto-calculation was disabled in the original spreadsheet, and underlying data + * values used by the formula have changed since it was last calculated. + * + * @return mixed + */ + public function getOldCalculatedValue() + { + return $this->calculatedValue; + } + + /** + * Get cell data type. + * + * @return string + */ + public function getDataType() + { + return $this->dataType; + } + + /** + * Set cell data type. + * + * @param string $pDataType see DataType::TYPE_* + * + * @return Cell + */ + public function setDataType($pDataType) + { + if ($pDataType == DataType::TYPE_STRING2) { + $pDataType = DataType::TYPE_STRING; + } + $this->dataType = $pDataType; + + return $this->updateInCollection(); + } + + /** + * Identify if the cell contains a formula. + * + * @return bool + */ + public function isFormula() + { + return $this->dataType == DataType::TYPE_FORMULA; + } + + /** + * Does this cell contain Data validation rules? + * + * @throws Exception + * + * @return bool + */ + public function hasDataValidation() + { + if (!isset($this->parent)) { + throw new Exception('Cannot check for data validation when cell is not bound to a worksheet'); + } + + return $this->getWorksheet()->dataValidationExists($this->getCoordinate()); + } + + /** + * Get Data validation rules. + * + * @throws Exception + * + * @return DataValidation + */ + public function getDataValidation() + { + if (!isset($this->parent)) { + throw new Exception('Cannot get data validation for cell that is not bound to a worksheet'); + } + + return $this->getWorksheet()->getDataValidation($this->getCoordinate()); + } + + /** + * Set Data validation rules. + * + * @param DataValidation $pDataValidation + * + * @throws Exception + * + * @return Cell + */ + public function setDataValidation(DataValidation $pDataValidation = null) + { + if (!isset($this->parent)) { + throw new Exception('Cannot set data validation for cell that is not bound to a worksheet'); + } + + $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation); + + return $this->updateInCollection(); + } + + /** + * Does this cell contain valid value? + * + * @return bool + */ + public function hasValidValue() + { + $validator = new DataValidator(); + + return $validator->isValid($this); + } + + /** + * Does this cell contain a Hyperlink? + * + * @throws Exception + * + * @return bool + */ + public function hasHyperlink() + { + if (!isset($this->parent)) { + throw new Exception('Cannot check for hyperlink when cell is not bound to a worksheet'); + } + + return $this->getWorksheet()->hyperlinkExists($this->getCoordinate()); + } + + /** + * Get Hyperlink. + * + * @throws Exception + * + * @return Hyperlink + */ + public function getHyperlink() + { + if (!isset($this->parent)) { + throw new Exception('Cannot get hyperlink for cell that is not bound to a worksheet'); + } + + return $this->getWorksheet()->getHyperlink($this->getCoordinate()); + } + + /** + * Set Hyperlink. + * + * @param Hyperlink $pHyperlink + * + * @throws Exception + * + * @return Cell + */ + public function setHyperlink(Hyperlink $pHyperlink = null) + { + if (!isset($this->parent)) { + throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet'); + } + + $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink); + + return $this->updateInCollection(); + } + + /** + * Get cell collection. + * + * @return Cells + */ + public function getParent() + { + return $this->parent; + } + + /** + * Get parent worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->parent->getParent(); + } + + /** + * Is this cell in a merge range. + * + * @return bool + */ + public function isInMergeRange() + { + return (bool) $this->getMergeRange(); + } + + /** + * Is this cell the master (top left cell) in a merge range (that holds the actual data value). + * + * @return bool + */ + public function isMergeRangeValueCell() + { + if ($mergeRange = $this->getMergeRange()) { + $mergeRange = Coordinate::splitRange($mergeRange); + list($startCell) = $mergeRange[0]; + if ($this->getCoordinate() === $startCell) { + return true; + } + } + + return false; + } + + /** + * If this cell is in a merge range, then return the range. + * + * @return false|string + */ + public function getMergeRange() + { + foreach ($this->getWorksheet()->getMergeCells() as $mergeRange) { + if ($this->isInRange($mergeRange)) { + return $mergeRange; + } + } + + return false; + } + + /** + * Get cell style. + * + * @return Style + */ + public function getStyle() + { + return $this->getWorksheet()->getStyle($this->getCoordinate()); + } + + /** + * Re-bind parent. + * + * @param Worksheet $parent + * + * @return Cell + */ + public function rebindParent(Worksheet $parent) + { + $this->parent = $parent->getCellCollection(); + + return $this->updateInCollection(); + } + + /** + * Is cell in a specific range? + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return bool + */ + public function isInRange($pRange) + { + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange); + + // Translate properties + $myColumn = Coordinate::columnIndexFromString($this->getColumn()); + $myRow = $this->getRow(); + + // Verify if cell is in range + return ($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn) && + ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow); + } + + /** + * Compare 2 cells. + * + * @param Cell $a Cell a + * @param Cell $b Cell b + * + * @return int Result of comparison (always -1 or 1, never zero!) + */ + public static function compareCells(self $a, self $b) + { + if ($a->getRow() < $b->getRow()) { + return -1; + } elseif ($a->getRow() > $b->getRow()) { + return 1; + } elseif (Coordinate::columnIndexFromString($a->getColumn()) < Coordinate::columnIndexFromString($b->getColumn())) { + return -1; + } + + return 1; + } + + /** + * Get value binder to use. + * + * @return IValueBinder + */ + public static function getValueBinder() + { + if (self::$valueBinder === null) { + self::$valueBinder = new DefaultValueBinder(); + } + + return self::$valueBinder; + } + + /** + * Set value binder to use. + * + * @param IValueBinder $binder + */ + public static function setValueBinder(IValueBinder $binder) + { + self::$valueBinder = $binder; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != 'parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + /** + * Get index to cellXf. + * + * @return int + */ + public function getXfIndex() + { + return $this->xfIndex; + } + + /** + * Set index to cellXf. + * + * @param int $pValue + * + * @return Cell + */ + public function setXfIndex($pValue) + { + $this->xfIndex = $pValue; + + return $this->updateInCollection(); + } + + /** + * Set the formula attributes. + * + * @param mixed $pAttributes + * + * @return Cell + */ + public function setFormulaAttributes($pAttributes) + { + $this->formulaAttributes = $pAttributes; + + return $this; + } + + /** + * Get the formula attributes. + */ + public function getFormulaAttributes() + { + return $this->formulaAttributes; + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return (string) $this->getValue(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php new file mode 100755 index 0000000..5e20ec6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Coordinate.php @@ -0,0 +1,520 @@ + '') { + $worksheet .= '!'; + } + + // Create absolute coordinate + if (ctype_digit($pCoordinateString)) { + return $worksheet . '$' . $pCoordinateString; + } elseif (ctype_alpha($pCoordinateString)) { + return $worksheet . '$' . strtoupper($pCoordinateString); + } + + return $worksheet . self::absoluteCoordinate($pCoordinateString); + } + + /** + * Make string coordinate absolute. + * + * @param string $pCoordinateString e.g. 'A1' + * + * @throws Exception + * + * @return string Absolute coordinate e.g. '$A$1' + */ + public static function absoluteCoordinate($pCoordinateString) + { + if (self::coordinateIsRange($pCoordinateString)) { + throw new Exception('Cell coordinate string can not be a range of cells'); + } + + // Split out any worksheet name from the coordinate + list($worksheet, $pCoordinateString) = Worksheet::extractSheetTitle($pCoordinateString, true); + if ($worksheet > '') { + $worksheet .= '!'; + } + + // Create absolute coordinate + list($column, $row) = self::coordinateFromString($pCoordinateString); + $column = ltrim($column, '$'); + $row = ltrim($row, '$'); + + return $worksheet . '$' . $column . '$' . $row; + } + + /** + * Split range into coordinate strings. + * + * @param string $pRange e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4' + * + * @return array Array containing one or more arrays containing one or two coordinate strings + * e.g. ['B4','D9'] or [['B4','D9'], ['H2','O11']] + * or ['B4'] + */ + public static function splitRange($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + $exploded = explode(',', $pRange); + $counter = count($exploded); + for ($i = 0; $i < $counter; ++$i) { + $exploded[$i] = explode(':', $exploded[$i]); + } + + return $exploded; + } + + /** + * Build range from coordinate strings. + * + * @param array $pRange Array containg one or more arrays containing one or two coordinate strings + * + * @throws Exception + * + * @return string String representation of $pRange + */ + public static function buildRange(array $pRange) + { + // Verify range + if (empty($pRange) || !is_array($pRange[0])) { + throw new Exception('Range does not contain any information'); + } + + // Build range + $counter = count($pRange); + for ($i = 0; $i < $counter; ++$i) { + $pRange[$i] = implode(':', $pRange[$i]); + } + + return implode(',', $pRange); + } + + /** + * Calculate range boundaries. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range coordinates [Start Cell, End Cell] + * where Start Cell and End Cell are arrays (Column Number, Row Number) + */ + public static function rangeBoundaries($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Extract range + if (strpos($pRange, ':') === false) { + $rangeA = $rangeB = $pRange; + } else { + list($rangeA, $rangeB) = explode(':', $pRange); + } + + // Calculate range outer borders + $rangeStart = self::coordinateFromString($rangeA); + $rangeEnd = self::coordinateFromString($rangeB); + + // Translate column into index + $rangeStart[0] = self::columnIndexFromString($rangeStart[0]); + $rangeEnd[0] = self::columnIndexFromString($rangeEnd[0]); + + return [$rangeStart, $rangeEnd]; + } + + /** + * Calculate range dimension. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range dimension (width, height) + */ + public static function rangeDimension($pRange) + { + // Calculate range outer borders + list($rangeStart, $rangeEnd) = self::rangeBoundaries($pRange); + + return [($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1)]; + } + + /** + * Calculate range boundaries. + * + * @param string $pRange Cell range (e.g. A1:A1) + * + * @return array Range coordinates [Start Cell, End Cell] + * where Start Cell and End Cell are arrays [Column ID, Row Number] + */ + public static function getRangeBoundaries($pRange) + { + // Ensure $pRange is a valid range + if (empty($pRange)) { + $pRange = self::DEFAULT_RANGE; + } + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Extract range + if (strpos($pRange, ':') === false) { + $rangeA = $rangeB = $pRange; + } else { + list($rangeA, $rangeB) = explode(':', $pRange); + } + + return [self::coordinateFromString($rangeA), self::coordinateFromString($rangeB)]; + } + + /** + * Column index from string. + * + * @param string $pString eg 'A' + * + * @return int Column index (A = 1) + */ + public static function columnIndexFromString($pString) + { + // Using a lookup cache adds a slight memory overhead, but boosts speed + // caching using a static within the method is faster than a class static, + // though it's additional memory overhead + static $indexCache = []; + + if (isset($indexCache[$pString])) { + return $indexCache[$pString]; + } + // It's surprising how costly the strtoupper() and ord() calls actually are, so we use a lookup array rather than use ord() + // and make it case insensitive to get rid of the strtoupper() as well. Because it's a static, there's no significant + // memory overhead either + static $columnLookup = [ + 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8, 'I' => 9, 'J' => 10, 'K' => 11, 'L' => 12, 'M' => 13, + 'N' => 14, 'O' => 15, 'P' => 16, 'Q' => 17, 'R' => 18, 'S' => 19, 'T' => 20, 'U' => 21, 'V' => 22, 'W' => 23, 'X' => 24, 'Y' => 25, 'Z' => 26, + 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, 'g' => 7, 'h' => 8, 'i' => 9, 'j' => 10, 'k' => 11, 'l' => 12, 'm' => 13, + 'n' => 14, 'o' => 15, 'p' => 16, 'q' => 17, 'r' => 18, 's' => 19, 't' => 20, 'u' => 21, 'v' => 22, 'w' => 23, 'x' => 24, 'y' => 25, 'z' => 26, + ]; + + // We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString + // for improved performance + if (isset($pString[0])) { + if (!isset($pString[1])) { + $indexCache[$pString] = $columnLookup[$pString]; + + return $indexCache[$pString]; + } elseif (!isset($pString[2])) { + $indexCache[$pString] = $columnLookup[$pString[0]] * 26 + $columnLookup[$pString[1]]; + + return $indexCache[$pString]; + } elseif (!isset($pString[3])) { + $indexCache[$pString] = $columnLookup[$pString[0]] * 676 + $columnLookup[$pString[1]] * 26 + $columnLookup[$pString[2]]; + + return $indexCache[$pString]; + } + } + + throw new Exception('Column string index can not be ' . ((isset($pString[0])) ? 'longer than 3 characters' : 'empty')); + } + + /** + * String from column index. + * + * @param int $columnIndex Column index (A = 1) + * + * @return string + */ + public static function stringFromColumnIndex($columnIndex) + { + static $indexCache = []; + + if (!isset($indexCache[$columnIndex])) { + $indexValue = $columnIndex; + $base26 = null; + do { + $characterValue = ($indexValue % 26) ?: 26; + $indexValue = ($indexValue - $characterValue) / 26; + $base26 = chr($characterValue + 64) . ($base26 ?: ''); + } while ($indexValue > 0); + $indexCache[$columnIndex] = $base26; + } + + return $indexCache[$columnIndex]; + } + + /** + * Extract all cell references in range, which may be comprised of multiple cell ranges. + * + * @param string $pRange Range (e.g. A1 or A1:C10 or A1:E10 A20:E25) + * + * @return array Array containing single cell references + */ + public static function extractAllCellReferencesInRange($pRange) + { + $returnValue = []; + + // Explode spaces + $cellBlocks = self::getCellBlocksFromRangeString($pRange); + foreach ($cellBlocks as $cellBlock) { + $returnValue = array_merge($returnValue, self::getReferencesForCellBlock($cellBlock)); + } + + // Sort the result by column and row + $sortKeys = []; + foreach (array_unique($returnValue) as $coord) { + $column = ''; + $row = 0; + + sscanf($coord, '%[A-Z]%d', $column, $row); + $sortKeys[sprintf('%3s%09d', $column, $row)] = $coord; + } + ksort($sortKeys); + + // Return value + return array_values($sortKeys); + } + + /** + * Get all cell references for an individual cell block. + * + * @param string $cellBlock A cell range e.g. A4:B5 + * + * @return array All individual cells in that range + */ + private static function getReferencesForCellBlock($cellBlock) + { + $returnValue = []; + + // Single cell? + if (!self::coordinateIsRange($cellBlock)) { + return (array) $cellBlock; + } + + // Range... + $ranges = self::splitRange($cellBlock); + foreach ($ranges as $range) { + // Single cell? + if (!isset($range[1])) { + $returnValue[] = $range[0]; + + continue; + } + + // Range... + list($rangeStart, $rangeEnd) = $range; + list($startColumn, $startRow) = self::coordinateFromString($rangeStart); + list($endColumn, $endRow) = self::coordinateFromString($rangeEnd); + $startColumnIndex = self::columnIndexFromString($startColumn); + $endColumnIndex = self::columnIndexFromString($endColumn); + ++$endColumnIndex; + + // Current data + $currentColumnIndex = $startColumnIndex; + $currentRow = $startRow; + + self::validateRange($cellBlock, $startColumnIndex, $endColumnIndex, $currentRow, $endRow); + + // Loop cells + while ($currentColumnIndex < $endColumnIndex) { + while ($currentRow <= $endRow) { + $returnValue[] = self::stringFromColumnIndex($currentColumnIndex) . $currentRow; + ++$currentRow; + } + ++$currentColumnIndex; + $currentRow = $startRow; + } + } + + return $returnValue; + } + + /** + * Convert an associative array of single cell coordinates to values to an associative array + * of cell ranges to values. Only adjacent cell coordinates with the same + * value will be merged. If the value is an object, it must implement the method getHashCode(). + * + * For example, this function converts: + * + * [ 'A1' => 'x', 'A2' => 'x', 'A3' => 'x', 'A4' => 'y' ] + * + * to: + * + * [ 'A1:A3' => 'x', 'A4' => 'y' ] + * + * @param array $pCoordCollection associative array mapping coordinates to values + * + * @return array associative array mapping coordinate ranges to valuea + */ + public static function mergeRangesInCollection(array $pCoordCollection) + { + $hashedValues = []; + $mergedCoordCollection = []; + + foreach ($pCoordCollection as $coord => $value) { + if (self::coordinateIsRange($coord)) { + $mergedCoordCollection[$coord] = $value; + + continue; + } + + list($column, $row) = self::coordinateFromString($coord); + $row = (int) (ltrim($row, '$')); + $hashCode = $column . '-' . (is_object($value) ? $value->getHashCode() : $value); + + if (!isset($hashedValues[$hashCode])) { + $hashedValues[$hashCode] = (object) [ + 'value' => $value, + 'col' => $column, + 'rows' => [$row], + ]; + } else { + $hashedValues[$hashCode]->rows[] = $row; + } + } + + ksort($hashedValues); + + foreach ($hashedValues as $hashedValue) { + sort($hashedValue->rows); + $rowStart = null; + $rowEnd = null; + $ranges = []; + + foreach ($hashedValue->rows as $row) { + if ($rowStart === null) { + $rowStart = $row; + $rowEnd = $row; + } elseif ($rowEnd === $row - 1) { + $rowEnd = $row; + } else { + if ($rowStart == $rowEnd) { + $ranges[] = $hashedValue->col . $rowStart; + } else { + $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; + } + + $rowStart = $row; + $rowEnd = $row; + } + } + + if ($rowStart !== null) { + if ($rowStart == $rowEnd) { + $ranges[] = $hashedValue->col . $rowStart; + } else { + $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; + } + } + + foreach ($ranges as $range) { + $mergedCoordCollection[$range] = $hashedValue->value; + } + } + + return $mergedCoordCollection; + } + + /** + * Get the individual cell blocks from a range string, splitting by space and removing any $ characters. + * + * @param string $pRange + * + * @return string[] + */ + private static function getCellBlocksFromRangeString($pRange) + { + return explode(' ', str_replace('$', '', strtoupper($pRange))); + } + + /** + * Check that the given range is valid, i.e. that the start column and row are not greater than the end column and + * row. + * + * @param string $cellBlock The original range, for displaying a meaningful error message + * @param int $startColumnIndex + * @param int $endColumnIndex + * @param int $currentRow + * @param int $endRow + */ + private static function validateRange($cellBlock, $startColumnIndex, $endColumnIndex, $currentRow, $endRow) + { + if ($startColumnIndex >= $endColumnIndex || $currentRow > $endRow) { + throw new Exception('Invalid range: "' . $cellBlock . '"'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataType.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataType.php new file mode 100755 index 0000000..ba03579 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataType.php @@ -0,0 +1,85 @@ + 0, + '#DIV/0!' => 1, + '#VALUE!' => 2, + '#REF!' => 3, + '#NAME?' => 4, + '#NUM!' => 5, + '#N/A' => 6, + ]; + + /** + * Get list of error codes. + * + * @return array + */ + public static function getErrorCodes() + { + return self::$errorCodes; + } + + /** + * Check a string that it satisfies Excel requirements. + * + * @param null|RichText|string $pValue Value to sanitize to an Excel string + * + * @return null|RichText|string Sanitized value + */ + public static function checkString($pValue) + { + if ($pValue instanceof RichText) { + // TODO: Sanitize Rich-Text string (max. character count is 32,767) + return $pValue; + } + + // string must never be longer than 32,767 characters, truncate if necessary + $pValue = StringHelper::substring($pValue, 0, 32767); + + // we require that newline is represented as "\n" in core, not as "\r\n" or "\r" + $pValue = str_replace(["\r\n", "\r"], "\n", $pValue); + + return $pValue; + } + + /** + * Check a value that it is a valid error code. + * + * @param mixed $pValue Value to sanitize to an Excel error code + * + * @return string Sanitized value + */ + public static function checkErrorCode($pValue) + { + $pValue = (string) $pValue; + + if (!isset(self::$errorCodes[$pValue])) { + $pValue = '#NULL!'; + } + + return $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidation.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidation.php new file mode 100755 index 0000000..a041ea0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidation.php @@ -0,0 +1,481 @@ +formula1; + } + + /** + * Set Formula 1. + * + * @param string $value + * + * @return DataValidation + */ + public function setFormula1($value) + { + $this->formula1 = $value; + + return $this; + } + + /** + * Get Formula 2. + * + * @return string + */ + public function getFormula2() + { + return $this->formula2; + } + + /** + * Set Formula 2. + * + * @param string $value + * + * @return DataValidation + */ + public function setFormula2($value) + { + $this->formula2 = $value; + + return $this; + } + + /** + * Get Type. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Set Type. + * + * @param string $value + * + * @return DataValidation + */ + public function setType($value) + { + $this->type = $value; + + return $this; + } + + /** + * Get Error style. + * + * @return string + */ + public function getErrorStyle() + { + return $this->errorStyle; + } + + /** + * Set Error style. + * + * @param string $value see self::STYLE_* + * + * @return DataValidation + */ + public function setErrorStyle($value) + { + $this->errorStyle = $value; + + return $this; + } + + /** + * Get Operator. + * + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Set Operator. + * + * @param string $value + * + * @return DataValidation + */ + public function setOperator($value) + { + $this->operator = $value; + + return $this; + } + + /** + * Get Allow Blank. + * + * @return bool + */ + public function getAllowBlank() + { + return $this->allowBlank; + } + + /** + * Set Allow Blank. + * + * @param bool $value + * + * @return DataValidation + */ + public function setAllowBlank($value) + { + $this->allowBlank = $value; + + return $this; + } + + /** + * Get Show DropDown. + * + * @return bool + */ + public function getShowDropDown() + { + return $this->showDropDown; + } + + /** + * Set Show DropDown. + * + * @param bool $value + * + * @return DataValidation + */ + public function setShowDropDown($value) + { + $this->showDropDown = $value; + + return $this; + } + + /** + * Get Show InputMessage. + * + * @return bool + */ + public function getShowInputMessage() + { + return $this->showInputMessage; + } + + /** + * Set Show InputMessage. + * + * @param bool $value + * + * @return DataValidation + */ + public function setShowInputMessage($value) + { + $this->showInputMessage = $value; + + return $this; + } + + /** + * Get Show ErrorMessage. + * + * @return bool + */ + public function getShowErrorMessage() + { + return $this->showErrorMessage; + } + + /** + * Set Show ErrorMessage. + * + * @param bool $value + * + * @return DataValidation + */ + public function setShowErrorMessage($value) + { + $this->showErrorMessage = $value; + + return $this; + } + + /** + * Get Error title. + * + * @return string + */ + public function getErrorTitle() + { + return $this->errorTitle; + } + + /** + * Set Error title. + * + * @param string $value + * + * @return DataValidation + */ + public function setErrorTitle($value) + { + $this->errorTitle = $value; + + return $this; + } + + /** + * Get Error. + * + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Set Error. + * + * @param string $value + * + * @return DataValidation + */ + public function setError($value) + { + $this->error = $value; + + return $this; + } + + /** + * Get Prompt title. + * + * @return string + */ + public function getPromptTitle() + { + return $this->promptTitle; + } + + /** + * Set Prompt title. + * + * @param string $value + * + * @return DataValidation + */ + public function setPromptTitle($value) + { + $this->promptTitle = $value; + + return $this; + } + + /** + * Get Prompt. + * + * @return string + */ + public function getPrompt() + { + return $this->prompt; + } + + /** + * Set Prompt. + * + * @param string $value + * + * @return DataValidation + */ + public function setPrompt($value) + { + $this->prompt = $value; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->formula1 . + $this->formula2 . + $this->type . + $this->errorStyle . + $this->operator . + ($this->allowBlank ? 't' : 'f') . + ($this->showDropDown ? 't' : 'f') . + ($this->showInputMessage ? 't' : 'f') . + ($this->showErrorMessage ? 't' : 'f') . + $this->errorTitle . + $this->error . + $this->promptTitle . + $this->prompt . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php new file mode 100755 index 0000000..430d81b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php @@ -0,0 +1,77 @@ +hasDataValidation()) { + return true; + } + + $cellValue = $cell->getValue(); + $dataValidation = $cell->getDataValidation(); + + if (!$dataValidation->getAllowBlank() && ($cellValue === null || $cellValue === '')) { + return false; + } + + // TODO: write check on all cases + switch ($dataValidation->getType()) { + case DataValidation::TYPE_LIST: + return $this->isValueInList($cell); + } + + return false; + } + + /** + * Does this cell contain valid value, based on list? + * + * @param Cell $cell Cell to check the value + * + * @return bool + */ + private function isValueInList(Cell $cell) + { + $cellValue = $cell->getValue(); + $dataValidation = $cell->getDataValidation(); + + $formula1 = $dataValidation->getFormula1(); + if (!empty($formula1)) { + // inline values list + if ($formula1[0] === '"') { + return in_array(strtolower($cellValue), explode(',', strtolower(trim($formula1, '"'))), true); + } elseif (strpos($formula1, ':') > 0) { + // values list cells + $matchFormula = '=MATCH(' . $cell->getCoordinate() . ', ' . $formula1 . ', 0)'; + $calculation = Calculation::getInstance($cell->getWorksheet()->getParent()); + + try { + $result = $calculation->calculateFormula($matchFormula, $cell->getCoordinate(), $cell); + + return $result !== Functions::NA(); + } catch (Exception $ex) { + return false; + } + } + } + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php new file mode 100755 index 0000000..0e6433a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php @@ -0,0 +1,82 @@ +format('Y-m-d H:i:s'); + } elseif (!($value instanceof RichText)) { + $value = (string) $value; + } + } + + // Set value explicit + $cell->setValueExplicit($value, static::dataTypeForValue($value)); + + // Done! + return true; + } + + /** + * DataType for value. + * + * @param mixed $pValue + * + * @return string + */ + public static function dataTypeForValue($pValue) + { + // Match the value against a few data types + if ($pValue === null) { + return DataType::TYPE_NULL; + } elseif ($pValue === '') { + return DataType::TYPE_STRING; + } elseif ($pValue instanceof RichText) { + return DataType::TYPE_INLINE; + } elseif ($pValue[0] === '=' && strlen($pValue) > 1) { + return DataType::TYPE_FORMULA; + } elseif (is_bool($pValue)) { + return DataType::TYPE_BOOL; + } elseif (is_float($pValue) || is_int($pValue)) { + return DataType::TYPE_NUMERIC; + } elseif (preg_match('/^[\+\-]?(\d+\\.?\d*|\d*\\.?\d+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) { + $tValue = ltrim($pValue, '+-'); + if (is_string($pValue) && $tValue[0] === '0' && strlen($tValue) > 1 && $tValue[1] !== '.') { + return DataType::TYPE_STRING; + } elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) { + return DataType::TYPE_STRING; + } + + return DataType::TYPE_NUMERIC; + } elseif (is_string($pValue)) { + $errorCodes = DataType::getErrorCodes(); + if (isset($errorCodes[$pValue])) { + return DataType::TYPE_ERROR; + } + } + + return DataType::TYPE_STRING; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php new file mode 100755 index 0000000..e17c20d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Hyperlink.php @@ -0,0 +1,113 @@ +url = $pUrl; + $this->tooltip = $pTooltip; + } + + /** + * Get URL. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set URL. + * + * @param string $value + * + * @return Hyperlink + */ + public function setUrl($value) + { + $this->url = $value; + + return $this; + } + + /** + * Get tooltip. + * + * @return string + */ + public function getTooltip() + { + return $this->tooltip; + } + + /** + * Set tooltip. + * + * @param string $value + * + * @return Hyperlink + */ + public function setTooltip($value) + { + $this->tooltip = $value; + + return $this; + } + + /** + * Is this hyperlink internal? (to another worksheet). + * + * @return bool + */ + public function isInternal() + { + return strpos($this->url, 'sheet://') !== false; + } + + /** + * @return string + */ + public function getTypeHyperlink() + { + return $this->isInternal() ? '' : 'External'; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->url . + $this->tooltip . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IValueBinder.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IValueBinder.php new file mode 100755 index 0000000..5af9f5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IValueBinder.php @@ -0,0 +1,16 @@ +setValueExplicit((string) $value, DataType::TYPE_STRING); + + // Done! + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php new file mode 100755 index 0000000..3d1dd22 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php @@ -0,0 +1,557 @@ + self::FORMAT_CODE_GENERAL, + 'source_linked' => 1, + ]; + + /** + * Axis Options. + * + * @var array of mixed + */ + private $axisOptions = [ + 'minimum' => null, + 'maximum' => null, + 'major_unit' => null, + 'minor_unit' => null, + 'orientation' => self::ORIENTATION_NORMAL, + 'minor_tick_mark' => self::TICK_MARK_NONE, + 'major_tick_mark' => self::TICK_MARK_NONE, + 'axis_labels' => self::AXIS_LABELS_NEXT_TO, + 'horizontal_crosses' => self::HORIZONTAL_CROSSES_AUTOZERO, + 'horizontal_crosses_value' => null, + ]; + + /** + * Fill Properties. + * + * @var array of mixed + */ + private $fillProperties = [ + 'type' => self::EXCEL_COLOR_TYPE_ARGB, + 'value' => null, + 'alpha' => 0, + ]; + + /** + * Line Properties. + * + * @var array of mixed + */ + private $lineProperties = [ + 'type' => self::EXCEL_COLOR_TYPE_ARGB, + 'value' => null, + 'alpha' => 0, + ]; + + /** + * Line Style Properties. + * + * @var array of mixed + */ + private $lineStyleProperties = [ + 'width' => '9525', + 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, + 'dash' => self::LINE_STYLE_DASH_SOLID, + 'cap' => self::LINE_STYLE_CAP_FLAT, + 'join' => self::LINE_STYLE_JOIN_BEVEL, + 'arrow' => [ + 'head' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_5, + ], + 'end' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_8, + ], + ], + ]; + + /** + * Shadow Properties. + * + * @var array of mixed + */ + private $shadowProperties = [ + 'presets' => self::SHADOW_PRESETS_NOSHADOW, + 'effect' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + 'size' => [ + 'sx' => null, + 'sy' => null, + 'kx' => null, + ], + 'blur' => null, + 'direction' => null, + 'distance' => null, + 'algn' => null, + 'rotWithShape' => null, + ]; + + /** + * Glow Properties. + * + * @var array of mixed + */ + private $glowProperties = [ + 'size' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + ]; + + /** + * Soft Edge Properties. + * + * @var array of mixed + */ + private $softEdges = [ + 'size' => null, + ]; + + /** + * Get Series Data Type. + * + * @param mixed $format_code + * + * @return string + */ + public function setAxisNumberProperties($format_code) + { + $this->axisNumber['format'] = (string) $format_code; + $this->axisNumber['source_linked'] = 0; + } + + /** + * Get Axis Number Format Data Type. + * + * @return string + */ + public function getAxisNumberFormat() + { + return $this->axisNumber['format']; + } + + /** + * Get Axis Number Source Linked. + * + * @return string + */ + public function getAxisNumberSourceLinked() + { + return (string) $this->axisNumber['source_linked']; + } + + /** + * Set Axis Options Properties. + * + * @param string $axis_labels + * @param string $horizontal_crosses_value + * @param string $horizontal_crosses + * @param string $axis_orientation + * @param string $major_tmt + * @param string $minor_tmt + * @param string $minimum + * @param string $maximum + * @param string $major_unit + * @param string $minor_unit + */ + public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null, $axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null, $minor_unit = null) + { + $this->axisOptions['axis_labels'] = (string) $axis_labels; + ($horizontal_crosses_value !== null) ? $this->axisOptions['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null; + ($horizontal_crosses !== null) ? $this->axisOptions['horizontal_crosses'] = (string) $horizontal_crosses : null; + ($axis_orientation !== null) ? $this->axisOptions['orientation'] = (string) $axis_orientation : null; + ($major_tmt !== null) ? $this->axisOptions['major_tick_mark'] = (string) $major_tmt : null; + ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; + ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; + ($minimum !== null) ? $this->axisOptions['minimum'] = (string) $minimum : null; + ($maximum !== null) ? $this->axisOptions['maximum'] = (string) $maximum : null; + ($major_unit !== null) ? $this->axisOptions['major_unit'] = (string) $major_unit : null; + ($minor_unit !== null) ? $this->axisOptions['minor_unit'] = (string) $minor_unit : null; + } + + /** + * Get Axis Options Property. + * + * @param string $property + * + * @return string + */ + public function getAxisOptionsProperty($property) + { + return $this->axisOptions[$property]; + } + + /** + * Set Axis Orientation Property. + * + * @param string $orientation + */ + public function setAxisOrientation($orientation) + { + $this->axisOptions['orientation'] = (string) $orientation; + } + + /** + * Set Fill Property. + * + * @param string $color + * @param int $alpha + * @param string $type + */ + public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) + { + $this->fillProperties = $this->setColorProperties($color, $alpha, $type); + } + + /** + * Set Line Property. + * + * @param string $color + * @param int $alpha + * @param string $type + */ + public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) + { + $this->lineProperties = $this->setColorProperties($color, $alpha, $type); + } + + /** + * Get Fill Property. + * + * @param string $property + * + * @return string + */ + public function getFillProperty($property) + { + return $this->fillProperties[$property]; + } + + /** + * Get Line Property. + * + * @param string $property + * + * @return string + */ + public function getLineProperty($property) + { + return $this->lineProperties[$property]; + } + + /** + * Set Line Style Properties. + * + * @param float $line_width + * @param string $compound_type + * @param string $dash_type + * @param string $cap_type + * @param string $join_type + * @param string $head_arrow_type + * @param string $head_arrow_size + * @param string $end_arrow_type + * @param string $end_arrow_size + */ + public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) + { + ($line_width !== null) ? $this->lineStyleProperties['width'] = $this->getExcelPointsWidth((float) $line_width) : null; + ($compound_type !== null) ? $this->lineStyleProperties['compound'] = (string) $compound_type : null; + ($dash_type !== null) ? $this->lineStyleProperties['dash'] = (string) $dash_type : null; + ($cap_type !== null) ? $this->lineStyleProperties['cap'] = (string) $cap_type : null; + ($join_type !== null) ? $this->lineStyleProperties['join'] = (string) $join_type : null; + ($head_arrow_type !== null) ? $this->lineStyleProperties['arrow']['head']['type'] = (string) $head_arrow_type : null; + ($head_arrow_size !== null) ? $this->lineStyleProperties['arrow']['head']['size'] = (string) $head_arrow_size : null; + ($end_arrow_type !== null) ? $this->lineStyleProperties['arrow']['end']['type'] = (string) $end_arrow_type : null; + ($end_arrow_size !== null) ? $this->lineStyleProperties['arrow']['end']['size'] = (string) $end_arrow_size : null; + } + + /** + * Get Line Style Property. + * + * @param array|string $elements + * + * @return string + */ + public function getLineStyleProperty($elements) + { + return $this->getArrayElementsValue($this->lineStyleProperties, $elements); + } + + /** + * Get Line Style Arrow Excel Width. + * + * @param string $arrow + * + * @return string + */ + public function getLineStyleArrowWidth($arrow) + { + return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'w'); + } + + /** + * Get Line Style Arrow Excel Length. + * + * @param string $arrow + * + * @return string + */ + public function getLineStyleArrowLength($arrow) + { + return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'len'); + } + + /** + * Set Shadow Properties. + * + * @param int $sh_presets + * @param string $sh_color_value + * @param string $sh_color_type + * @param string $sh_color_alpha + * @param float $sh_blur + * @param int $sh_angle + * @param float $sh_distance + */ + public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) + { + $this->setShadowPresetsProperties((int) $sh_presets) + ->setShadowColor( + $sh_color_value === null ? $this->shadowProperties['color']['value'] : $sh_color_value, + $sh_color_alpha === null ? (int) $this->shadowProperties['color']['alpha'] : $sh_color_alpha, + $sh_color_type === null ? $this->shadowProperties['color']['type'] : $sh_color_type + ) + ->setShadowBlur($sh_blur) + ->setShadowAngle($sh_angle) + ->setShadowDistance($sh_distance); + } + + /** + * Set Shadow Color. + * + * @param int $shadow_presets + * + * @return Axis + */ + private function setShadowPresetsProperties($shadow_presets) + { + $this->shadowProperties['presets'] = $shadow_presets; + $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); + + return $this; + } + + /** + * Set Shadow Properties from Mapped Values. + * + * @param array $properties_map + * @param mixed &$reference + * + * @return Axis + */ + private function setShadowProperiesMapValues(array $properties_map, &$reference = null) + { + $base_reference = $reference; + foreach ($properties_map as $property_key => $property_val) { + if (is_array($property_val)) { + if ($reference === null) { + $reference = &$this->shadowProperties[$property_key]; + } else { + $reference = &$reference[$property_key]; + } + $this->setShadowProperiesMapValues($property_val, $reference); + } else { + if ($base_reference === null) { + $this->shadowProperties[$property_key] = $property_val; + } else { + $reference[$property_key] = $property_val; + } + } + } + + return $this; + } + + /** + * Set Shadow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return Axis + */ + private function setShadowColor($color, $alpha, $type) + { + $this->shadowProperties['color'] = $this->setColorProperties($color, $alpha, $type); + + return $this; + } + + /** + * Set Shadow Blur. + * + * @param float $blur + * + * @return Axis + */ + private function setShadowBlur($blur) + { + if ($blur !== null) { + $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); + } + + return $this; + } + + /** + * Set Shadow Angle. + * + * @param int $angle + * + * @return Axis + */ + private function setShadowAngle($angle) + { + if ($angle !== null) { + $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); + } + + return $this; + } + + /** + * Set Shadow Distance. + * + * @param float $distance + * + * @return Axis + */ + private function setShadowDistance($distance) + { + if ($distance !== null) { + $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); + } + + return $this; + } + + /** + * Get Shadow Property. + * + * @param string|string[] $elements + * + * @return null|array|int|string + */ + public function getShadowProperty($elements) + { + return $this->getArrayElementsValue($this->shadowProperties, $elements); + } + + /** + * Set Glow Properties. + * + * @param float $size + * @param string $color_value + * @param int $color_alpha + * @param string $color_type + */ + public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) + { + $this->setGlowSize($size) + ->setGlowColor( + $color_value === null ? $this->glowProperties['color']['value'] : $color_value, + $color_alpha === null ? (int) $this->glowProperties['color']['alpha'] : $color_alpha, + $color_type === null ? $this->glowProperties['color']['type'] : $color_type + ); + } + + /** + * Get Glow Property. + * + * @param array|string $property + * + * @return string + */ + public function getGlowProperty($property) + { + return $this->getArrayElementsValue($this->glowProperties, $property); + } + + /** + * Set Glow Color. + * + * @param float $size + * + * @return Axis + */ + private function setGlowSize($size) + { + if ($size !== null) { + $this->glowProperties['size'] = $this->getExcelPointsWidth($size); + } + + return $this; + } + + /** + * Set Glow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return Axis + */ + private function setGlowColor($color, $alpha, $type) + { + $this->glowProperties['color'] = $this->setColorProperties($color, $alpha, $type); + + return $this; + } + + /** + * Set Soft Edges Size. + * + * @param float $size + */ + public function setSoftEdges($size) + { + if ($size !== null) { + $softEdges['size'] = (string) $this->getExcelPointsWidth($size); + } + } + + /** + * Get Soft Edges Size. + * + * @return string + */ + public function getSoftEdgesSize() + { + return $this->softEdges['size']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php new file mode 100755 index 0000000..3d09a04 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php @@ -0,0 +1,680 @@ +name = $name; + $this->title = $title; + $this->legend = $legend; + $this->xAxisLabel = $xAxisLabel; + $this->yAxisLabel = $yAxisLabel; + $this->plotArea = $plotArea; + $this->plotVisibleOnly = $plotVisibleOnly; + $this->displayBlanksAs = $displayBlanksAs; + $this->xAxis = $xAxis; + $this->yAxis = $yAxis; + $this->majorGridlines = $majorGridlines; + $this->minorGridlines = $minorGridlines; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Get Worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set Worksheet. + * + * @param Worksheet $pValue + * + * @return Chart + */ + public function setWorksheet(Worksheet $pValue = null) + { + $this->worksheet = $pValue; + + return $this; + } + + /** + * Get Title. + * + * @return Title + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set Title. + * + * @param Title $title + * + * @return Chart + */ + public function setTitle(Title $title) + { + $this->title = $title; + + return $this; + } + + /** + * Get Legend. + * + * @return Legend + */ + public function getLegend() + { + return $this->legend; + } + + /** + * Set Legend. + * + * @param Legend $legend + * + * @return Chart + */ + public function setLegend(Legend $legend) + { + $this->legend = $legend; + + return $this; + } + + /** + * Get X-Axis Label. + * + * @return Title + */ + public function getXAxisLabel() + { + return $this->xAxisLabel; + } + + /** + * Set X-Axis Label. + * + * @param Title $label + * + * @return Chart + */ + public function setXAxisLabel(Title $label) + { + $this->xAxisLabel = $label; + + return $this; + } + + /** + * Get Y-Axis Label. + * + * @return Title + */ + public function getYAxisLabel() + { + return $this->yAxisLabel; + } + + /** + * Set Y-Axis Label. + * + * @param Title $label + * + * @return Chart + */ + public function setYAxisLabel(Title $label) + { + $this->yAxisLabel = $label; + + return $this; + } + + /** + * Get Plot Area. + * + * @return PlotArea + */ + public function getPlotArea() + { + return $this->plotArea; + } + + /** + * Get Plot Visible Only. + * + * @return bool + */ + public function getPlotVisibleOnly() + { + return $this->plotVisibleOnly; + } + + /** + * Set Plot Visible Only. + * + * @param bool $plotVisibleOnly + * + * @return Chart + */ + public function setPlotVisibleOnly($plotVisibleOnly) + { + $this->plotVisibleOnly = $plotVisibleOnly; + + return $this; + } + + /** + * Get Display Blanks as. + * + * @return string + */ + public function getDisplayBlanksAs() + { + return $this->displayBlanksAs; + } + + /** + * Set Display Blanks as. + * + * @param string $displayBlanksAs + * + * @return Chart + */ + public function setDisplayBlanksAs($displayBlanksAs) + { + $this->displayBlanksAs = $displayBlanksAs; + + return $this; + } + + /** + * Get yAxis. + * + * @return Axis + */ + public function getChartAxisY() + { + if ($this->yAxis !== null) { + return $this->yAxis; + } + + return new Axis(); + } + + /** + * Get xAxis. + * + * @return Axis + */ + public function getChartAxisX() + { + if ($this->xAxis !== null) { + return $this->xAxis; + } + + return new Axis(); + } + + /** + * Get Major Gridlines. + * + * @return GridLines + */ + public function getMajorGridlines() + { + if ($this->majorGridlines !== null) { + return $this->majorGridlines; + } + + return new GridLines(); + } + + /** + * Get Minor Gridlines. + * + * @return GridLines + */ + public function getMinorGridlines() + { + if ($this->minorGridlines !== null) { + return $this->minorGridlines; + } + + return new GridLines(); + } + + /** + * Set the Top Left position for the chart. + * + * @param string $cell + * @param int $xOffset + * @param int $yOffset + * + * @return Chart + */ + public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null) + { + $this->topLeftCellRef = $cell; + if ($xOffset !== null) { + $this->setTopLeftXOffset($xOffset); + } + if ($yOffset !== null) { + $this->setTopLeftYOffset($yOffset); + } + + return $this; + } + + /** + * Get the top left position of the chart. + * + * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell + */ + public function getTopLeftPosition() + { + return [ + 'cell' => $this->topLeftCellRef, + 'xOffset' => $this->topLeftXOffset, + 'yOffset' => $this->topLeftYOffset, + ]; + } + + /** + * Get the cell address where the top left of the chart is fixed. + * + * @return string + */ + public function getTopLeftCell() + { + return $this->topLeftCellRef; + } + + /** + * Set the Top Left cell position for the chart. + * + * @param string $cell + * + * @return Chart + */ + public function setTopLeftCell($cell) + { + $this->topLeftCellRef = $cell; + + return $this; + } + + /** + * Set the offset position within the Top Left cell for the chart. + * + * @param int $xOffset + * @param int $yOffset + * + * @return Chart + */ + public function setTopLeftOffset($xOffset, $yOffset) + { + if ($xOffset !== null) { + $this->setTopLeftXOffset($xOffset); + } + + if ($yOffset !== null) { + $this->setTopLeftYOffset($yOffset); + } + + return $this; + } + + /** + * Get the offset position within the Top Left cell for the chart. + * + * @return int[] + */ + public function getTopLeftOffset() + { + return [ + 'X' => $this->topLeftXOffset, + 'Y' => $this->topLeftYOffset, + ]; + } + + public function setTopLeftXOffset($xOffset) + { + $this->topLeftXOffset = $xOffset; + + return $this; + } + + public function getTopLeftXOffset() + { + return $this->topLeftXOffset; + } + + public function setTopLeftYOffset($yOffset) + { + $this->topLeftYOffset = $yOffset; + + return $this; + } + + public function getTopLeftYOffset() + { + return $this->topLeftYOffset; + } + + /** + * Set the Bottom Right position of the chart. + * + * @param string $cell + * @param int $xOffset + * @param int $yOffset + * + * @return Chart + */ + public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null) + { + $this->bottomRightCellRef = $cell; + if ($xOffset !== null) { + $this->setBottomRightXOffset($xOffset); + } + if ($yOffset !== null) { + $this->setBottomRightYOffset($yOffset); + } + + return $this; + } + + /** + * Get the bottom right position of the chart. + * + * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell + */ + public function getBottomRightPosition() + { + return [ + 'cell' => $this->bottomRightCellRef, + 'xOffset' => $this->bottomRightXOffset, + 'yOffset' => $this->bottomRightYOffset, + ]; + } + + public function setBottomRightCell($cell) + { + $this->bottomRightCellRef = $cell; + + return $this; + } + + /** + * Get the cell address where the bottom right of the chart is fixed. + * + * @return string + */ + public function getBottomRightCell() + { + return $this->bottomRightCellRef; + } + + /** + * Set the offset position within the Bottom Right cell for the chart. + * + * @param int $xOffset + * @param int $yOffset + * + * @return Chart + */ + public function setBottomRightOffset($xOffset, $yOffset) + { + if ($xOffset !== null) { + $this->setBottomRightXOffset($xOffset); + } + + if ($yOffset !== null) { + $this->setBottomRightYOffset($yOffset); + } + + return $this; + } + + /** + * Get the offset position within the Bottom Right cell for the chart. + * + * @return int[] + */ + public function getBottomRightOffset() + { + return [ + 'X' => $this->bottomRightXOffset, + 'Y' => $this->bottomRightYOffset, + ]; + } + + public function setBottomRightXOffset($xOffset) + { + $this->bottomRightXOffset = $xOffset; + + return $this; + } + + public function getBottomRightXOffset() + { + return $this->bottomRightXOffset; + } + + public function setBottomRightYOffset($yOffset) + { + $this->bottomRightYOffset = $yOffset; + + return $this; + } + + public function getBottomRightYOffset() + { + return $this->bottomRightYOffset; + } + + public function refresh() + { + if ($this->worksheet !== null) { + $this->plotArea->refresh($this->worksheet); + } + } + + /** + * Render the chart to given file (or stream). + * + * @param string $outputDestination Name of the file render to + * + * @return bool true on success + */ + public function render($outputDestination = null) + { + if ($outputDestination == 'php://output') { + $outputDestination = null; + } + + $libraryName = Settings::getChartRenderer(); + if ($libraryName === null) { + return false; + } + + // Ensure that data series values are up-to-date before we render + $this->refresh(); + + $renderer = new $libraryName($this); + + return $renderer->render($outputDestination); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeries.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeries.php new file mode 100755 index 0000000..8056bbe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeries.php @@ -0,0 +1,390 @@ +plotType = $plotType; + $this->plotGrouping = $plotGrouping; + $this->plotOrder = $plotOrder; + $keys = array_keys($plotValues); + $this->plotValues = $plotValues; + if ((count($plotLabel) == 0) || ($plotLabel[$keys[0]] === null)) { + $plotLabel[$keys[0]] = new DataSeriesValues(); + } + $this->plotLabel = $plotLabel; + + if ((count($plotCategory) == 0) || ($plotCategory[$keys[0]] === null)) { + $plotCategory[$keys[0]] = new DataSeriesValues(); + } + $this->plotCategory = $plotCategory; + + $this->smoothLine = $smoothLine; + $this->plotStyle = $plotStyle; + + if ($plotDirection === null) { + $plotDirection = self::DIRECTION_COL; + } + $this->plotDirection = $plotDirection; + } + + /** + * Get Plot Type. + * + * @return string + */ + public function getPlotType() + { + return $this->plotType; + } + + /** + * Set Plot Type. + * + * @param string $plotType + * + * @return DataSeries + */ + public function setPlotType($plotType) + { + $this->plotType = $plotType; + + return $this; + } + + /** + * Get Plot Grouping Type. + * + * @return string + */ + public function getPlotGrouping() + { + return $this->plotGrouping; + } + + /** + * Set Plot Grouping Type. + * + * @param string $groupingType + * + * @return DataSeries + */ + public function setPlotGrouping($groupingType) + { + $this->plotGrouping = $groupingType; + + return $this; + } + + /** + * Get Plot Direction. + * + * @return string + */ + public function getPlotDirection() + { + return $this->plotDirection; + } + + /** + * Set Plot Direction. + * + * @param string $plotDirection + * + * @return DataSeries + */ + public function setPlotDirection($plotDirection) + { + $this->plotDirection = $plotDirection; + + return $this; + } + + /** + * Get Plot Order. + * + * @return int[] + */ + public function getPlotOrder() + { + return $this->plotOrder; + } + + /** + * Get Plot Labels. + * + * @return array of DataSeriesValues + */ + public function getPlotLabels() + { + return $this->plotLabel; + } + + /** + * Get Plot Label by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotLabelByIndex($index) + { + $keys = array_keys($this->plotLabel); + if (in_array($index, $keys)) { + return $this->plotLabel[$index]; + } elseif (isset($keys[$index])) { + return $this->plotLabel[$keys[$index]]; + } + + return false; + } + + /** + * Get Plot Categories. + * + * @return array of DataSeriesValues + */ + public function getPlotCategories() + { + return $this->plotCategory; + } + + /** + * Get Plot Category by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotCategoryByIndex($index) + { + $keys = array_keys($this->plotCategory); + if (in_array($index, $keys)) { + return $this->plotCategory[$index]; + } elseif (isset($keys[$index])) { + return $this->plotCategory[$keys[$index]]; + } + + return false; + } + + /** + * Get Plot Style. + * + * @return null|string + */ + public function getPlotStyle() + { + return $this->plotStyle; + } + + /** + * Set Plot Style. + * + * @param null|string $plotStyle + * + * @return DataSeries + */ + public function setPlotStyle($plotStyle) + { + $this->plotStyle = $plotStyle; + + return $this; + } + + /** + * Get Plot Values. + * + * @return array of DataSeriesValues + */ + public function getPlotValues() + { + return $this->plotValues; + } + + /** + * Get Plot Values by Index. + * + * @param mixed $index + * + * @return DataSeriesValues + */ + public function getPlotValuesByIndex($index) + { + $keys = array_keys($this->plotValues); + if (in_array($index, $keys)) { + return $this->plotValues[$index]; + } elseif (isset($keys[$index])) { + return $this->plotValues[$keys[$index]]; + } + + return false; + } + + /** + * Get Number of Plot Series. + * + * @return int + */ + public function getPlotSeriesCount() + { + return count($this->plotValues); + } + + /** + * Get Smooth Line. + * + * @return bool + */ + public function getSmoothLine() + { + return $this->smoothLine; + } + + /** + * Set Smooth Line. + * + * @param bool $smoothLine + * + * @return DataSeries + */ + public function setSmoothLine($smoothLine) + { + $this->smoothLine = $smoothLine; + + return $this; + } + + public function refresh(Worksheet $worksheet) + { + foreach ($this->plotValues as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, true); + } + } + foreach ($this->plotLabel as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, true); + } + } + foreach ($this->plotCategory as $plotValues) { + if ($plotValues !== null) { + $plotValues->refresh($worksheet, false); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php new file mode 100755 index 0000000..e82b7ef --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -0,0 +1,401 @@ +setDataType($dataType); + $this->dataSource = $dataSource; + $this->formatCode = $formatCode; + $this->pointCount = $pointCount; + $this->dataValues = $dataValues; + $this->pointMarker = $marker; + $this->fillColor = $fillColor; + } + + /** + * Get Series Data Type. + * + * @return string + */ + public function getDataType() + { + return $this->dataType; + } + + /** + * Set Series Data Type. + * + * @param string $dataType Datatype of this data series + * Typical values are: + * DataSeriesValues::DATASERIES_TYPE_STRING + * Normally used for axis point values + * DataSeriesValues::DATASERIES_TYPE_NUMBER + * Normally used for chart data values + * + * @throws Exception + * + * @return DataSeriesValues + */ + public function setDataType($dataType) + { + if (!in_array($dataType, self::$dataTypeValues)) { + throw new Exception('Invalid datatype for chart data series values'); + } + $this->dataType = $dataType; + + return $this; + } + + /** + * Get Series Data Source (formula). + * + * @return string + */ + public function getDataSource() + { + return $this->dataSource; + } + + /** + * Set Series Data Source (formula). + * + * @param string $dataSource + * + * @return DataSeriesValues + */ + public function setDataSource($dataSource) + { + $this->dataSource = $dataSource; + + return $this; + } + + /** + * Get Point Marker. + * + * @return string + */ + public function getPointMarker() + { + return $this->pointMarker; + } + + /** + * Set Point Marker. + * + * @param string $marker + * + * @return DataSeriesValues + */ + public function setPointMarker($marker) + { + $this->pointMarker = $marker; + + return $this; + } + + /** + * Get Series Format Code. + * + * @return string + */ + public function getFormatCode() + { + return $this->formatCode; + } + + /** + * Set Series Format Code. + * + * @param string $formatCode + * + * @return DataSeriesValues + */ + public function setFormatCode($formatCode) + { + $this->formatCode = $formatCode; + + return $this; + } + + /** + * Get Series Point Count. + * + * @return int + */ + public function getPointCount() + { + return $this->pointCount; + } + + /** + * Get fill color. + * + * @return string|string[] HEX color or array with HEX colors + */ + public function getFillColor() + { + return $this->fillColor; + } + + /** + * Set fill color for series. + * + * @param string|string[] $color HEX color or array with HEX colors + * + * @return DataSeriesValues + */ + public function setFillColor($color) + { + if (is_array($color)) { + foreach ($color as $colorValue) { + $this->validateColor($colorValue); + } + } else { + $this->validateColor($color); + } + $this->fillColor = $color; + + return $this; + } + + /** + * Method for validating hex color. + * + * @param string $color value for color + * + * @throws \Exception thrown if color is invalid + * + * @return bool true if validation was successful + */ + private function validateColor($color) + { + if (!preg_match('/^[a-f0-9]{6}$/i', $color)) { + throw new Exception(sprintf('Invalid hex color for chart series (color: "%s")', $color)); + } + + return true; + } + + /** + * Get line width for series. + * + * @return int + */ + public function getLineWidth() + { + return $this->lineWidth; + } + + /** + * Set line width for the series. + * + * @param int $width + * + * @return DataSeriesValues + */ + public function setLineWidth($width) + { + $minWidth = 12700; + $this->lineWidth = max($minWidth, $width); + + return $this; + } + + /** + * Identify if the Data Series is a multi-level or a simple series. + * + * @return null|bool + */ + public function isMultiLevelSeries() + { + if (count($this->dataValues) > 0) { + return is_array(array_values($this->dataValues)[0]); + } + + return null; + } + + /** + * Return the level count of a multi-level Data Series. + * + * @return int + */ + public function multiLevelCount() + { + $levelCount = 0; + foreach ($this->dataValues as $dataValueSet) { + $levelCount = max($levelCount, count($dataValueSet)); + } + + return $levelCount; + } + + /** + * Get Series Data Values. + * + * @return array of mixed + */ + public function getDataValues() + { + return $this->dataValues; + } + + /** + * Get the first Series Data value. + * + * @return mixed + */ + public function getDataValue() + { + $count = count($this->dataValues); + if ($count == 0) { + return null; + } elseif ($count == 1) { + return $this->dataValues[0]; + } + + return $this->dataValues; + } + + /** + * Set Series Data Values. + * + * @param array $dataValues + * + * @return DataSeriesValues + */ + public function setDataValues($dataValues) + { + $this->dataValues = Functions::flattenArray($dataValues); + $this->pointCount = count($dataValues); + + return $this; + } + + public function refresh(Worksheet $worksheet, $flatten = true) + { + if ($this->dataSource !== null) { + $calcEngine = Calculation::getInstance($worksheet->getParent()); + $newDataValues = Calculation::unwrapResult( + $calcEngine->_calculateFormulaValue( + '=' . $this->dataSource, + null, + $worksheet->getCell('A1') + ) + ); + if ($flatten) { + $this->dataValues = Functions::flattenArray($newDataValues); + foreach ($this->dataValues as &$dataValue) { + if ((!empty($dataValue)) && ($dataValue[0] == '#')) { + $dataValue = 0.0; + } + } + unset($dataValue); + } else { + list($worksheet, $cellRange) = Worksheet::extractSheetTitle($this->dataSource, true); + $dimensions = Coordinate::rangeDimension(str_replace('$', '', $cellRange)); + if (($dimensions[0] == 1) || ($dimensions[1] == 1)) { + $this->dataValues = Functions::flattenArray($newDataValues); + } else { + $newArray = array_values(array_shift($newDataValues)); + foreach ($newArray as $i => $newDataSet) { + $newArray[$i] = [$newDataSet]; + } + + foreach ($newDataValues as $newDataSet) { + $i = 0; + foreach ($newDataSet as $newDataVal) { + array_unshift($newArray[$i++], $newDataVal); + } + } + $this->dataValues = $newArray; + } + } + $this->pointCount = count($this->dataValues); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php new file mode 100755 index 0000000..3f95b59 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php @@ -0,0 +1,9 @@ + [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => null, + 'alpha' => 0, + ], + 'style' => [ + 'width' => '9525', + 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, + 'dash' => self::LINE_STYLE_DASH_SOLID, + 'cap' => self::LINE_STYLE_CAP_FLAT, + 'join' => self::LINE_STYLE_JOIN_BEVEL, + 'arrow' => [ + 'head' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_5, + ], + 'end' => [ + 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, + 'size' => self::LINE_STYLE_ARROW_SIZE_8, + ], + ], + ], + ]; + + private $shadowProperties = [ + 'presets' => self::SHADOW_PRESETS_NOSHADOW, + 'effect' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 85, + ], + 'size' => [ + 'sx' => null, + 'sy' => null, + 'kx' => null, + ], + 'blur' => null, + 'direction' => null, + 'distance' => null, + 'algn' => null, + 'rotWithShape' => null, + ]; + + private $glowProperties = [ + 'size' => null, + 'color' => [ + 'type' => self::EXCEL_COLOR_TYPE_STANDARD, + 'value' => 'black', + 'alpha' => 40, + ], + ]; + + private $softEdges = [ + 'size' => null, + ]; + + /** + * Get Object State. + * + * @return bool + */ + public function getObjectState() + { + return $this->objectState; + } + + /** + * Change Object State to True. + * + * @return GridLines + */ + private function activateObject() + { + $this->objectState = true; + + return $this; + } + + /** + * Set Line Color Properties. + * + * @param string $value + * @param int $alpha + * @param string $type + */ + public function setLineColorProperties($value, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_STANDARD) + { + $this->activateObject() + ->lineProperties['color'] = $this->setColorProperties( + $value, + $alpha, + $type + ); + } + + /** + * Set Line Color Properties. + * + * @param float $line_width + * @param string $compound_type + * @param string $dash_type + * @param string $cap_type + * @param string $join_type + * @param string $head_arrow_type + * @param string $head_arrow_size + * @param string $end_arrow_type + * @param string $end_arrow_size + */ + public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) + { + $this->activateObject(); + ($line_width !== null) + ? $this->lineProperties['style']['width'] = $this->getExcelPointsWidth((float) $line_width) + : null; + ($compound_type !== null) + ? $this->lineProperties['style']['compound'] = (string) $compound_type + : null; + ($dash_type !== null) + ? $this->lineProperties['style']['dash'] = (string) $dash_type + : null; + ($cap_type !== null) + ? $this->lineProperties['style']['cap'] = (string) $cap_type + : null; + ($join_type !== null) + ? $this->lineProperties['style']['join'] = (string) $join_type + : null; + ($head_arrow_type !== null) + ? $this->lineProperties['style']['arrow']['head']['type'] = (string) $head_arrow_type + : null; + ($head_arrow_size !== null) + ? $this->lineProperties['style']['arrow']['head']['size'] = (string) $head_arrow_size + : null; + ($end_arrow_type !== null) + ? $this->lineProperties['style']['arrow']['end']['type'] = (string) $end_arrow_type + : null; + ($end_arrow_size !== null) + ? $this->lineProperties['style']['arrow']['end']['size'] = (string) $end_arrow_size + : null; + } + + /** + * Get Line Color Property. + * + * @param string $parameter + * + * @return string + */ + public function getLineColorProperty($parameter) + { + return $this->lineProperties['color'][$parameter]; + } + + /** + * Get Line Style Property. + * + * @param array|string $elements + * + * @return string + */ + public function getLineStyleProperty($elements) + { + return $this->getArrayElementsValue($this->lineProperties['style'], $elements); + } + + /** + * Set Glow Properties. + * + * @param float $size + * @param string $color_value + * @param int $color_alpha + * @param string $color_type + */ + public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) + { + $this + ->activateObject() + ->setGlowSize($size) + ->setGlowColor($color_value, $color_alpha, $color_type); + } + + /** + * Get Glow Color Property. + * + * @param string $property + * + * @return string + */ + public function getGlowColor($property) + { + return $this->glowProperties['color'][$property]; + } + + /** + * Get Glow Size. + * + * @return string + */ + public function getGlowSize() + { + return $this->glowProperties['size']; + } + + /** + * Set Glow Size. + * + * @param float $size + * + * @return GridLines + */ + private function setGlowSize($size) + { + $this->glowProperties['size'] = $this->getExcelPointsWidth((float) $size); + + return $this; + } + + /** + * Set Glow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return GridLines + */ + private function setGlowColor($color, $alpha, $type) + { + if ($color !== null) { + $this->glowProperties['color']['value'] = (string) $color; + } + if ($alpha !== null) { + $this->glowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); + } + if ($type !== null) { + $this->glowProperties['color']['type'] = (string) $type; + } + + return $this; + } + + /** + * Get Line Style Arrow Parameters. + * + * @param string $arrow_selector + * @param string $property_selector + * + * @return string + */ + public function getLineStyleArrowParameters($arrow_selector, $property_selector) + { + return $this->getLineStyleArrowSize($this->lineProperties['style']['arrow'][$arrow_selector]['size'], $property_selector); + } + + /** + * Set Shadow Properties. + * + * @param int $sh_presets + * @param string $sh_color_value + * @param string $sh_color_type + * @param int $sh_color_alpha + * @param string $sh_blur + * @param int $sh_angle + * @param float $sh_distance + */ + public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) + { + $this->activateObject() + ->setShadowPresetsProperties((int) $sh_presets) + ->setShadowColor( + $sh_color_value === null ? $this->shadowProperties['color']['value'] : $sh_color_value, + $sh_color_alpha === null ? (int) $this->shadowProperties['color']['alpha'] : $this->getTrueAlpha($sh_color_alpha), + $sh_color_type === null ? $this->shadowProperties['color']['type'] : $sh_color_type + ) + ->setShadowBlur($sh_blur) + ->setShadowAngle($sh_angle) + ->setShadowDistance($sh_distance); + } + + /** + * Set Shadow Presets Properties. + * + * @param int $shadow_presets + * + * @return GridLines + */ + private function setShadowPresetsProperties($shadow_presets) + { + $this->shadowProperties['presets'] = $shadow_presets; + $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); + + return $this; + } + + /** + * Set Shadow Properties Values. + * + * @param array $properties_map + * @param mixed &$reference + * + * @return GridLines + */ + private function setShadowProperiesMapValues(array $properties_map, &$reference = null) + { + $base_reference = $reference; + foreach ($properties_map as $property_key => $property_val) { + if (is_array($property_val)) { + if ($reference === null) { + $reference = &$this->shadowProperties[$property_key]; + } else { + $reference = &$reference[$property_key]; + } + $this->setShadowProperiesMapValues($property_val, $reference); + } else { + if ($base_reference === null) { + $this->shadowProperties[$property_key] = $property_val; + } else { + $reference[$property_key] = $property_val; + } + } + } + + return $this; + } + + /** + * Set Shadow Color. + * + * @param string $color + * @param int $alpha + * @param string $type + * + * @return GridLines + */ + private function setShadowColor($color, $alpha, $type) + { + if ($color !== null) { + $this->shadowProperties['color']['value'] = (string) $color; + } + if ($alpha !== null) { + $this->shadowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); + } + if ($type !== null) { + $this->shadowProperties['color']['type'] = (string) $type; + } + + return $this; + } + + /** + * Set Shadow Blur. + * + * @param float $blur + * + * @return GridLines + */ + private function setShadowBlur($blur) + { + if ($blur !== null) { + $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); + } + + return $this; + } + + /** + * Set Shadow Angle. + * + * @param int $angle + * + * @return GridLines + */ + private function setShadowAngle($angle) + { + if ($angle !== null) { + $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); + } + + return $this; + } + + /** + * Set Shadow Distance. + * + * @param float $distance + * + * @return GridLines + */ + private function setShadowDistance($distance) + { + if ($distance !== null) { + $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); + } + + return $this; + } + + /** + * Get Shadow Property. + * + * @param string|string[] $elements + * + * @return string + */ + public function getShadowProperty($elements) + { + return $this->getArrayElementsValue($this->shadowProperties, $elements); + } + + /** + * Set Soft Edges Size. + * + * @param float $size + */ + public function setSoftEdgesSize($size) + { + if ($size !== null) { + $this->activateObject(); + $this->softEdges['size'] = (string) $this->getExcelPointsWidth($size); + } + } + + /** + * Get Soft Edges Size. + * + * @return string + */ + public function getSoftEdgesSize() + { + return $this->softEdges['size']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php new file mode 100755 index 0000000..a8a96d2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php @@ -0,0 +1,483 @@ +layoutTarget = $layout['layoutTarget']; + } + if (isset($layout['xMode'])) { + $this->xMode = $layout['xMode']; + } + if (isset($layout['yMode'])) { + $this->yMode = $layout['yMode']; + } + if (isset($layout['x'])) { + $this->xPos = (float) $layout['x']; + } + if (isset($layout['y'])) { + $this->yPos = (float) $layout['y']; + } + if (isset($layout['w'])) { + $this->width = (float) $layout['w']; + } + if (isset($layout['h'])) { + $this->height = (float) $layout['h']; + } + } + + /** + * Get Layout Target. + * + * @return string + */ + public function getLayoutTarget() + { + return $this->layoutTarget; + } + + /** + * Set Layout Target. + * + * @param string $value + * + * @return Layout + */ + public function setLayoutTarget($value) + { + $this->layoutTarget = $value; + + return $this; + } + + /** + * Get X-Mode. + * + * @return string + */ + public function getXMode() + { + return $this->xMode; + } + + /** + * Set X-Mode. + * + * @param string $value + * + * @return Layout + */ + public function setXMode($value) + { + $this->xMode = (string) $value; + + return $this; + } + + /** + * Get Y-Mode. + * + * @return string + */ + public function getYMode() + { + return $this->yMode; + } + + /** + * Set Y-Mode. + * + * @param string $value + * + * @return Layout + */ + public function setYMode($value) + { + $this->yMode = (string) $value; + + return $this; + } + + /** + * Get X-Position. + * + * @return number + */ + public function getXPosition() + { + return $this->xPos; + } + + /** + * Set X-Position. + * + * @param float $value + * + * @return Layout + */ + public function setXPosition($value) + { + $this->xPos = (float) $value; + + return $this; + } + + /** + * Get Y-Position. + * + * @return number + */ + public function getYPosition() + { + return $this->yPos; + } + + /** + * Set Y-Position. + * + * @param float $value + * + * @return Layout + */ + public function setYPosition($value) + { + $this->yPos = (float) $value; + + return $this; + } + + /** + * Get Width. + * + * @return number + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param float $value + * + * @return Layout + */ + public function setWidth($value) + { + $this->width = $value; + + return $this; + } + + /** + * Get Height. + * + * @return number + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set Height. + * + * @param float $value + * + * @return Layout + */ + public function setHeight($value) + { + $this->height = $value; + + return $this; + } + + /** + * Get show legend key. + * + * @return bool + */ + public function getShowLegendKey() + { + return $this->showLegendKey; + } + + /** + * Set show legend key + * Specifies that legend keys should be shown in data labels. + * + * @param bool $value Show legend key + * + * @return Layout + */ + public function setShowLegendKey($value) + { + $this->showLegendKey = $value; + + return $this; + } + + /** + * Get show value. + * + * @return bool + */ + public function getShowVal() + { + return $this->showVal; + } + + /** + * Set show val + * Specifies that the value should be shown in data labels. + * + * @param bool $value Show val + * + * @return Layout + */ + public function setShowVal($value) + { + $this->showVal = $value; + + return $this; + } + + /** + * Get show category name. + * + * @return bool + */ + public function getShowCatName() + { + return $this->showCatName; + } + + /** + * Set show cat name + * Specifies that the category name should be shown in data labels. + * + * @param bool $value Show cat name + * + * @return Layout + */ + public function setShowCatName($value) + { + $this->showCatName = $value; + + return $this; + } + + /** + * Get show data series name. + * + * @return bool + */ + public function getShowSerName() + { + return $this->showSerName; + } + + /** + * Set show ser name + * Specifies that the series name should be shown in data labels. + * + * @param bool $value Show series name + * + * @return Layout + */ + public function setShowSerName($value) + { + $this->showSerName = $value; + + return $this; + } + + /** + * Get show percentage. + * + * @return bool + */ + public function getShowPercent() + { + return $this->showPercent; + } + + /** + * Set show percentage + * Specifies that the percentage should be shown in data labels. + * + * @param bool $value Show percentage + * + * @return Layout + */ + public function setShowPercent($value) + { + $this->showPercent = $value; + + return $this; + } + + /** + * Get show bubble size. + * + * @return bool + */ + public function getShowBubbleSize() + { + return $this->showBubbleSize; + } + + /** + * Set show bubble size + * Specifies that the bubble size should be shown in data labels. + * + * @param bool $value Show bubble size + * + * @return Layout + */ + public function setShowBubbleSize($value) + { + $this->showBubbleSize = $value; + + return $this; + } + + /** + * Get show leader lines. + * + * @return bool + */ + public function getShowLeaderLines() + { + return $this->showLeaderLines; + } + + /** + * Set show leader lines + * Specifies that leader lines should be shown in data labels. + * + * @param bool $value Show leader lines + * + * @return Layout + */ + public function setShowLeaderLines($value) + { + $this->showLeaderLines = $value; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php new file mode 100755 index 0000000..d077626 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php @@ -0,0 +1,158 @@ + self::POSITION_BOTTOM, + self::XL_LEGEND_POSITION_CORNER => self::POSITION_TOPRIGHT, + self::XL_LEGEND_POSITION_CUSTOM => '??', + self::XL_LEGEND_POSITION_LEFT => self::POSITION_LEFT, + self::XL_LEGEND_POSITION_RIGHT => self::POSITION_RIGHT, + self::XL_LEGEND_POSITION_TOP => self::POSITION_TOP, + ]; + + /** + * Legend position. + * + * @var string + */ + private $position = self::POSITION_RIGHT; + + /** + * Allow overlay of other elements? + * + * @var bool + */ + private $overlay = true; + + /** + * Legend Layout. + * + * @var Layout + */ + private $layout; + + /** + * Create a new Legend. + * + * @param string $position + * @param null|Layout $layout + * @param bool $overlay + */ + public function __construct($position = self::POSITION_RIGHT, Layout $layout = null, $overlay = false) + { + $this->setPosition($position); + $this->layout = $layout; + $this->setOverlay($overlay); + } + + /** + * Get legend position as an excel string value. + * + * @return string + */ + public function getPosition() + { + return $this->position; + } + + /** + * Get legend position using an excel string value. + * + * @param string $position see self::POSITION_* + * + * @return bool + */ + public function setPosition($position) + { + if (!in_array($position, self::$positionXLref)) { + return false; + } + + $this->position = $position; + + return true; + } + + /** + * Get legend position as an Excel internal numeric value. + * + * @return int + */ + public function getPositionXL() + { + return array_search($this->position, self::$positionXLref); + } + + /** + * Set legend position using an Excel internal numeric value. + * + * @param int $positionXL see self::XL_LEGEND_POSITION_* + * + * @return bool + */ + public function setPositionXL($positionXL) + { + if (!isset(self::$positionXLref[$positionXL])) { + return false; + } + + $this->position = self::$positionXLref[$positionXL]; + + return true; + } + + /** + * Get allow overlay of other elements? + * + * @return bool + */ + public function getOverlay() + { + return $this->overlay; + } + + /** + * Set allow overlay of other elements? + * + * @param bool $overlay + * + * @return bool + */ + public function setOverlay($overlay) + { + if (!is_bool($overlay)) { + return false; + } + + $this->overlay = $overlay; + + return true; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php new file mode 100755 index 0000000..b98c638 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php @@ -0,0 +1,112 @@ +layout = $layout; + $this->plotSeries = $plotSeries; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } + + /** + * Get Number of Plot Groups. + * + * @return array of DataSeries + */ + public function getPlotGroupCount() + { + return count($this->plotSeries); + } + + /** + * Get Number of Plot Series. + * + * @return int + */ + public function getPlotSeriesCount() + { + $seriesCount = 0; + foreach ($this->plotSeries as $plot) { + $seriesCount += $plot->getPlotSeriesCount(); + } + + return $seriesCount; + } + + /** + * Get Plot Series. + * + * @return array of DataSeries + */ + public function getPlotGroup() + { + return $this->plotSeries; + } + + /** + * Get Plot Series by Index. + * + * @param mixed $index + * + * @return DataSeries + */ + public function getPlotGroupByIndex($index) + { + return $this->plotSeries[$index]; + } + + /** + * Set Plot Series. + * + * @param DataSeries[] $plotSeries + * + * @return PlotArea + */ + public function setPlotSeries(array $plotSeries) + { + $this->plotSeries = $plotSeries; + + return $this; + } + + public function refresh(Worksheet $worksheet) + { + foreach ($this->plotSeries as $plotSeries) { + $plotSeries->refresh($worksheet); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Properties.php new file mode 100755 index 0000000..98095f0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Properties.php @@ -0,0 +1,369 @@ + (string) $type, + 'value' => (string) $color, + 'alpha' => (string) $this->getTrueAlpha($alpha), + ]; + } + + protected function getLineStyleArrowSize($array_selector, $array_kay_selector) + { + $sizes = [ + 1 => ['w' => 'sm', 'len' => 'sm'], + 2 => ['w' => 'sm', 'len' => 'med'], + 3 => ['w' => 'sm', 'len' => 'lg'], + 4 => ['w' => 'med', 'len' => 'sm'], + 5 => ['w' => 'med', 'len' => 'med'], + 6 => ['w' => 'med', 'len' => 'lg'], + 7 => ['w' => 'lg', 'len' => 'sm'], + 8 => ['w' => 'lg', 'len' => 'med'], + 9 => ['w' => 'lg', 'len' => 'lg'], + ]; + + return $sizes[$array_selector][$array_kay_selector]; + } + + protected function getShadowPresetsMap($shadow_presets_option) + { + $presets_options = [ + //OUTER + 1 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '2700000', + 'algn' => 'tl', + 'rotWithShape' => '0', + ], + 2 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '5400000', + 'algn' => 't', + 'rotWithShape' => '0', + ], + 3 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '8100000', + 'algn' => 'tr', + 'rotWithShape' => '0', + ], + 4 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'algn' => 'l', + 'rotWithShape' => '0', + ], + 5 => [ + 'effect' => 'outerShdw', + 'size' => [ + 'sx' => '102000', + 'sy' => '102000', + ], + 'blur' => '63500', + 'distance' => '38100', + 'algn' => 'ctr', + 'rotWithShape' => '0', + ], + 6 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '10800000', + 'algn' => 'r', + 'rotWithShape' => '0', + ], + 7 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '18900000', + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 8 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '16200000', + 'rotWithShape' => '0', + ], + 9 => [ + 'effect' => 'outerShdw', + 'blur' => '50800', + 'distance' => '38100', + 'direction' => '13500000', + 'algn' => 'br', + 'rotWithShape' => '0', + ], + //INNER + 10 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '2700000', + ], + 11 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '5400000', + ], + 12 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '8100000', + ], + 13 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + ], + 14 => [ + 'effect' => 'innerShdw', + 'blur' => '114300', + ], + 15 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '10800000', + ], + 16 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '18900000', + ], + 17 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '16200000', + ], + 18 => [ + 'effect' => 'innerShdw', + 'blur' => '63500', + 'distance' => '50800', + 'direction' => '13500000', + ], + //perspective + 19 => [ + 'effect' => 'outerShdw', + 'blur' => '152400', + 'distance' => '317500', + 'size' => [ + 'sx' => '90000', + 'sy' => '-19000', + ], + 'direction' => '5400000', + 'rotWithShape' => '0', + ], + 20 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'direction' => '18900000', + 'size' => [ + 'sy' => '23000', + 'kx' => '-1200000', + ], + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 21 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'direction' => '13500000', + 'size' => [ + 'sy' => '23000', + 'kx' => '1200000', + ], + 'algn' => 'br', + 'rotWithShape' => '0', + ], + 22 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'distance' => '12700', + 'direction' => '2700000', + 'size' => [ + 'sy' => '-23000', + 'kx' => '-800400', + ], + 'algn' => 'bl', + 'rotWithShape' => '0', + ], + 23 => [ + 'effect' => 'outerShdw', + 'blur' => '76200', + 'distance' => '12700', + 'direction' => '8100000', + 'size' => [ + 'sy' => '-23000', + 'kx' => '800400', + ], + 'algn' => 'br', + 'rotWithShape' => '0', + ], + ]; + + return $presets_options[$shadow_presets_option]; + } + + protected function getArrayElementsValue($properties, $elements) + { + $reference = &$properties; + if (!is_array($elements)) { + return $reference[$elements]; + } + + foreach ($elements as $keys) { + $reference = &$reference[$keys]; + } + + return $reference; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/IRenderer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/IRenderer.php new file mode 100755 index 0000000..c6fcfbf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/IRenderer.php @@ -0,0 +1,24 @@ +graph = null; + $this->chart = $chart; + } + + private static function init() + { + static $loaded = false; + if ($loaded) { + return; + } + + \JpGraph\JpGraph::load(); + \JpGraph\JpGraph::module('bar'); + \JpGraph\JpGraph::module('contour'); + \JpGraph\JpGraph::module('line'); + \JpGraph\JpGraph::module('pie'); + \JpGraph\JpGraph::module('pie3d'); + \JpGraph\JpGraph::module('radar'); + \JpGraph\JpGraph::module('regstat'); + \JpGraph\JpGraph::module('scatter'); + \JpGraph\JpGraph::module('stock'); + + self::$markSet = [ + 'diamond' => MARK_DIAMOND, + 'square' => MARK_SQUARE, + 'triangle' => MARK_UTRIANGLE, + 'x' => MARK_X, + 'star' => MARK_STAR, + 'dot' => MARK_FILLEDCIRCLE, + 'dash' => MARK_DTRIANGLE, + 'circle' => MARK_CIRCLE, + 'plus' => MARK_CROSS, + ]; + + $loaded = true; + } + + private function formatPointMarker($seriesPlot, $markerID) + { + $plotMarkKeys = array_keys(self::$markSet); + if ($markerID === null) { + // Use default plot marker (next marker in the series) + self::$plotMark %= count(self::$markSet); + $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); + } elseif ($markerID !== 'none') { + // Use specified plot marker (if it exists) + if (isset(self::$markSet[$markerID])) { + $seriesPlot->mark->SetType(self::$markSet[$markerID]); + } else { + // If the specified plot marker doesn't exist, use default plot marker (next marker in the series) + self::$plotMark %= count(self::$markSet); + $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); + } + } else { + // Hide plot marker + $seriesPlot->mark->Hide(); + } + $seriesPlot->mark->SetColor(self::$colourSet[self::$plotColour]); + $seriesPlot->mark->SetFillColor(self::$colourSet[self::$plotColour]); + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + + return $seriesPlot; + } + + private function formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation = '') + { + $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode(); + if ($datasetLabelFormatCode !== null) { + // Retrieve any label formatting code + $datasetLabelFormatCode = stripslashes($datasetLabelFormatCode); + } + + $testCurrentIndex = 0; + foreach ($datasetLabels as $i => $datasetLabel) { + if (is_array($datasetLabel)) { + if ($rotation == 'bar') { + $datasetLabels[$i] = implode(' ', $datasetLabel); + } else { + $datasetLabel = array_reverse($datasetLabel); + $datasetLabels[$i] = implode("\n", $datasetLabel); + } + } else { + // Format labels according to any formatting code + if ($datasetLabelFormatCode !== null) { + $datasetLabels[$i] = NumberFormat::toFormattedString($datasetLabel, $datasetLabelFormatCode); + } + } + ++$testCurrentIndex; + } + + return $datasetLabels; + } + + private function percentageSumCalculation($groupID, $seriesCount) + { + $sumValues = []; + // Adjust our values to a percentage value across all series in the group + for ($i = 0; $i < $seriesCount; ++$i) { + if ($i == 0) { + $sumValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + } else { + $nextValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + foreach ($nextValues as $k => $value) { + if (isset($sumValues[$k])) { + $sumValues[$k] += $value; + } else { + $sumValues[$k] = $value; + } + } + } + } + + return $sumValues; + } + + private function percentageAdjustValues($dataValues, $sumValues) + { + foreach ($dataValues as $k => $dataValue) { + $dataValues[$k] = $dataValue / $sumValues[$k] * 100; + } + + return $dataValues; + } + + private function getCaption($captionElement) + { + // Read any caption + $caption = ($captionElement !== null) ? $captionElement->getCaption() : null; + // Test if we have a title caption to display + if ($caption !== null) { + // If we do, it could be a plain string or an array + if (is_array($caption)) { + // Implode an array to a plain string + $caption = implode('', $caption); + } + } + + return $caption; + } + + private function renderTitle() + { + $title = $this->getCaption($this->chart->getTitle()); + if ($title !== null) { + $this->graph->title->Set($title); + } + } + + private function renderLegend() + { + $legend = $this->chart->getLegend(); + if ($legend !== null) { + $legendPosition = $legend->getPosition(); + switch ($legendPosition) { + case 'r': + $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right + $this->graph->legend->SetColumns(1); + + break; + case 'l': + $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left + $this->graph->legend->SetColumns(1); + + break; + case 't': + $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top + break; + case 'b': + $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom + break; + default: + $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right + $this->graph->legend->SetColumns(1); + + break; + } + } else { + $this->graph->legend->Hide(); + } + } + + private function renderCartesianPlotArea($type = 'textlin') + { + $this->graph = new \Graph(self::$width, self::$height); + $this->graph->SetScale($type); + + $this->renderTitle(); + + // Rotate for bar rather than column chart + $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotDirection(); + $reverse = $rotation == 'bar'; + + $xAxisLabel = $this->chart->getXAxisLabel(); + if ($xAxisLabel !== null) { + $title = $this->getCaption($xAxisLabel); + if ($title !== null) { + $this->graph->xaxis->SetTitle($title, 'center'); + $this->graph->xaxis->title->SetMargin(35); + if ($reverse) { + $this->graph->xaxis->title->SetAngle(90); + $this->graph->xaxis->title->SetMargin(90); + } + } + } + + $yAxisLabel = $this->chart->getYAxisLabel(); + if ($yAxisLabel !== null) { + $title = $this->getCaption($yAxisLabel); + if ($title !== null) { + $this->graph->yaxis->SetTitle($title, 'center'); + if ($reverse) { + $this->graph->yaxis->title->SetAngle(0); + $this->graph->yaxis->title->SetMargin(-55); + } + } + } + } + + private function renderPiePlotArea() + { + $this->graph = new \PieGraph(self::$width, self::$height); + + $this->renderTitle(); + } + + private function renderRadarPlotArea() + { + $this->graph = new \RadarGraph(self::$width, self::$height); + $this->graph->SetScale('lin'); + + $this->renderTitle(); + } + + private function renderPlotLine($groupID, $filled = false, $combination = false, $dimensions = '2d') + { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + if ($grouping == 'percentStacked') { + $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); + } + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + + if ($grouping == 'percentStacked') { + $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); + } + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + $seriesPlot = new \LinePlot($dataValues); + if ($combination) { + $seriesPlot->SetBarCenter(); + } + + if ($filled) { + $seriesPlot->SetFilled(true); + $seriesPlot->SetColor('black'); + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); + } else { + // Set the appropriate plot marker + $this->formatPointMarker($seriesPlot, $marker); + } + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetLegend($dataLabel); + + $seriesPlots[] = $seriesPlot; + } + + if ($grouping == 'standard') { + $groupPlot = $seriesPlots; + } else { + $groupPlot = new \AccLinePlot($seriesPlots); + } + $this->graph->Add($groupPlot); + } + + private function renderPlotBar($groupID, $dimensions = '2d') + { + $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection(); + // Rotate for bar rather than column chart + if (($groupID == 0) && ($rotation == 'bar')) { + $this->graph->Set90AndMargin(); + } + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation); + // Rotate for bar rather than column chart + if ($rotation == 'bar') { + $datasetLabels = array_reverse($datasetLabels); + $this->graph->yaxis->SetPos('max'); + $this->graph->yaxis->SetLabelAlign('center', 'top'); + $this->graph->yaxis->SetLabelSide(SIDE_RIGHT); + } + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + if ($grouping == 'percentStacked') { + $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); + } + + // Loop through each data series in turn + for ($j = 0; $j < $seriesCount; ++$j) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); + if ($grouping == 'percentStacked') { + $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); + } + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + // Reverse the $dataValues order for bar rather than column chart + if ($rotation == 'bar') { + $dataValues = array_reverse($dataValues); + } + $seriesPlot = new \BarPlot($dataValues); + $seriesPlot->SetColor('black'); + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); + if ($dimensions == '3d') { + $seriesPlot->SetShadow(); + } + if (!$this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)) { + $dataLabel = ''; + } else { + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)->getDataValue(); + } + $seriesPlot->SetLegend($dataLabel); + + $seriesPlots[] = $seriesPlot; + } + // Reverse the plot order for bar rather than column chart + if (($rotation == 'bar') && ($grouping != 'percentStacked')) { + $seriesPlots = array_reverse($seriesPlots); + } + + if ($grouping == 'clustered') { + $groupPlot = new \GroupBarPlot($seriesPlots); + } elseif ($grouping == 'standard') { + $groupPlot = new \GroupBarPlot($seriesPlots); + } else { + $groupPlot = new \AccBarPlot($seriesPlots); + if ($dimensions == '3d') { + $groupPlot->SetShadow(); + } + } + + $this->graph->Add($groupPlot); + } + + private function renderPlotScatter($groupID, $bubble) + { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + $scatterStyle = $bubbleSize = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + + foreach ($dataValuesY as $k => $dataValueY) { + $dataValuesY[$k] = $k; + } + + $seriesPlot = new \ScatterPlot($dataValuesX, $dataValuesY); + if ($scatterStyle == 'lineMarker') { + $seriesPlot->SetLinkPoints(); + $seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]); + } elseif ($scatterStyle == 'smoothMarker') { + $spline = new \Spline($dataValuesY, $dataValuesX); + list($splineDataY, $splineDataX) = $spline->Get(count($dataValuesX) * self::$width / 20); + $lplot = new \LinePlot($splineDataX, $splineDataY); + $lplot->SetColor(self::$colourSet[self::$plotColour]); + + $this->graph->Add($lplot); + } + + if ($bubble) { + $this->formatPointMarker($seriesPlot, 'dot'); + $seriesPlot->mark->SetColor('black'); + $seriesPlot->mark->SetSize($bubbleSize); + } else { + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + $this->formatPointMarker($seriesPlot, $marker); + } + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetLegend($dataLabel); + + $this->graph->Add($seriesPlot); + } + } + + private function renderPlotRadar($groupID) + { + $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); + + $dataValues = []; + foreach ($dataValuesY as $k => $dataValueY) { + $dataValues[$k] = implode(' ', array_reverse($dataValueY)); + } + $tmp = array_shift($dataValues); + $dataValues[] = $tmp; + $tmp = array_shift($dataValuesX); + $dataValuesX[] = $tmp; + + $this->graph->SetTitles(array_reverse($dataValues)); + + $seriesPlot = new \RadarPlot(array_reverse($dataValuesX)); + + $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + if ($radarStyle == 'filled') { + $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour]); + } + $this->formatPointMarker($seriesPlot, $marker); + $seriesPlot->SetLegend($dataLabel); + + $this->graph->Add($seriesPlot); + } + } + + private function renderPlotContour($groupID) + { + $contourStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + + $dataValues = []; + // Loop through each data series in turn + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); + + $dataValues[$i] = $dataValuesX; + } + $seriesPlot = new \ContourPlot($dataValues); + + $this->graph->Add($seriesPlot); + } + + private function renderPlotStock($groupID) + { + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $plotOrder = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder(); + + $dataValues = []; + // Loop through each data series in turn and build the plot arrays + foreach ($plotOrder as $i => $v) { + $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v)->getDataValues(); + foreach ($dataValuesX as $j => $dataValueX) { + $dataValues[$plotOrder[$i]][$j] = $dataValueX; + } + } + if (empty($dataValues)) { + return; + } + + $dataValuesPlot = []; + // Flatten the plot arrays to a single dimensional array to work with jpgraph + $jMax = count($dataValues[0]); + for ($j = 0; $j < $jMax; ++$j) { + for ($i = 0; $i < $seriesCount; ++$i) { + $dataValuesPlot[] = $dataValues[$i][$j]; + } + } + + // Set the x-axis labels + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + $this->graph->xaxis->SetTickLabels($datasetLabels); + } + + $seriesPlot = new \StockPlot($dataValuesPlot); + $seriesPlot->SetWidth(20); + + $this->graph->Add($seriesPlot); + } + + private function renderAreaChart($groupCount, $dimensions = '2d') + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotLine($i, true, false, $dimensions); + } + } + + private function renderLineChart($groupCount, $dimensions = '2d') + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotLine($i, false, false, $dimensions); + } + } + + private function renderBarChart($groupCount, $dimensions = '2d') + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotBar($i, $dimensions); + } + } + + private function renderScatterChart($groupCount) + { + $this->renderCartesianPlotArea('linlin'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotScatter($i, false); + } + } + + private function renderBubbleChart($groupCount) + { + $this->renderCartesianPlotArea('linlin'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotScatter($i, true); + } + } + + private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false) + { + $this->renderPiePlotArea(); + + $iLimit = ($multiplePlots) ? $groupCount : 1; + for ($groupID = 0; $groupID < $iLimit; ++$groupID) { + $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); + $exploded = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); + $datasetLabels = []; + if ($groupID == 0) { + $labelCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount(); + if ($labelCount > 0) { + $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); + $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); + } + } + + $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); + $seriesPlots = []; + // For pie charts, we only display the first series: doughnut charts generally display all series + $jLimit = ($multiplePlots) ? $seriesCount : 1; + // Loop through each data series in turn + for ($j = 0; $j < $jLimit; ++$j) { + $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); + + // Fill in any missing values in the $dataValues array + $testCurrentIndex = 0; + foreach ($dataValues as $k => $dataValue) { + while ($k != $testCurrentIndex) { + $dataValues[$testCurrentIndex] = null; + ++$testCurrentIndex; + } + ++$testCurrentIndex; + } + + if ($dimensions == '3d') { + $seriesPlot = new \PiePlot3D($dataValues); + } else { + if ($doughnut) { + $seriesPlot = new \PiePlotC($dataValues); + } else { + $seriesPlot = new \PiePlot($dataValues); + } + } + + if ($multiplePlots) { + $seriesPlot->SetSize(($jLimit - $j) / ($jLimit * 4)); + } + + if ($doughnut) { + $seriesPlot->SetMidColor('white'); + } + + $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); + if (count($datasetLabels) > 0) { + $seriesPlot->SetLabels(array_fill(0, count($datasetLabels), '')); + } + if ($dimensions != '3d') { + $seriesPlot->SetGuideLines(false); + } + if ($j == 0) { + if ($exploded) { + $seriesPlot->ExplodeAll(); + } + $seriesPlot->SetLegends($datasetLabels); + } + + $this->graph->Add($seriesPlot); + } + } + } + + private function renderRadarChart($groupCount) + { + $this->renderRadarPlotArea(); + + for ($groupID = 0; $groupID < $groupCount; ++$groupID) { + $this->renderPlotRadar($groupID); + } + } + + private function renderStockChart($groupCount) + { + $this->renderCartesianPlotArea('intint'); + + for ($groupID = 0; $groupID < $groupCount; ++$groupID) { + $this->renderPlotStock($groupID); + } + } + + private function renderContourChart($groupCount, $dimensions) + { + $this->renderCartesianPlotArea('intint'); + + for ($i = 0; $i < $groupCount; ++$i) { + $this->renderPlotContour($i); + } + } + + private function renderCombinationChart($groupCount, $dimensions, $outputDestination) + { + $this->renderCartesianPlotArea(); + + for ($i = 0; $i < $groupCount; ++$i) { + $dimensions = null; + $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); + switch ($chartType) { + case 'area3DChart': + $dimensions = '3d'; + // no break + case 'areaChart': + $this->renderPlotLine($i, true, true, $dimensions); + + break; + case 'bar3DChart': + $dimensions = '3d'; + // no break + case 'barChart': + $this->renderPlotBar($i, $dimensions); + + break; + case 'line3DChart': + $dimensions = '3d'; + // no break + case 'lineChart': + $this->renderPlotLine($i, false, true, $dimensions); + + break; + case 'scatterChart': + $this->renderPlotScatter($i, false); + + break; + case 'bubbleChart': + $this->renderPlotScatter($i, true); + + break; + default: + $this->graph = null; + + return false; + } + } + + $this->renderLegend(); + + $this->graph->Stroke($outputDestination); + + return true; + } + + public function render($outputDestination) + { + self::$plotColour = 0; + + $groupCount = $this->chart->getPlotArea()->getPlotGroupCount(); + + $dimensions = null; + if ($groupCount == 1) { + $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); + } else { + $chartTypes = []; + for ($i = 0; $i < $groupCount; ++$i) { + $chartTypes[] = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); + } + $chartTypes = array_unique($chartTypes); + if (count($chartTypes) == 1) { + $chartType = array_pop($chartTypes); + } elseif (count($chartTypes) == 0) { + echo 'Chart is not yet implemented
'; + + return false; + } else { + return $this->renderCombinationChart($groupCount, $dimensions, $outputDestination); + } + } + + switch ($chartType) { + case 'area3DChart': + $dimensions = '3d'; + // no break + case 'areaChart': + $this->renderAreaChart($groupCount, $dimensions); + + break; + case 'bar3DChart': + $dimensions = '3d'; + // no break + case 'barChart': + $this->renderBarChart($groupCount, $dimensions); + + break; + case 'line3DChart': + $dimensions = '3d'; + // no break + case 'lineChart': + $this->renderLineChart($groupCount, $dimensions); + + break; + case 'pie3DChart': + $dimensions = '3d'; + // no break + case 'pieChart': + $this->renderPieChart($groupCount, $dimensions, false, false); + + break; + case 'doughnut3DChart': + $dimensions = '3d'; + // no break + case 'doughnutChart': + $this->renderPieChart($groupCount, $dimensions, true, true); + + break; + case 'scatterChart': + $this->renderScatterChart($groupCount); + + break; + case 'bubbleChart': + $this->renderBubbleChart($groupCount); + + break; + case 'radarChart': + $this->renderRadarChart($groupCount); + + break; + case 'surface3DChart': + $dimensions = '3d'; + // no break + case 'surfaceChart': + $this->renderContourChart($groupCount, $dimensions); + + break; + case 'stockChart': + $this->renderStockChart($groupCount); + + break; + default: + echo $chartType . ' is not yet implemented
'; + + return false; + } + $this->renderLegend(); + + $this->graph->Stroke($outputDestination); + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt new file mode 100755 index 0000000..4abab7a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/PHP Charting Libraries.txt @@ -0,0 +1,20 @@ +ChartDirector + https://www.advsofteng.com/cdphp.html + +GraPHPite + http://graphpite.sourceforge.net/ + +JpGraph + http://www.aditus.nu/jpgraph/ + +LibChart + https://naku.dohcrew.com/libchart/pages/introduction/ + +pChart + http://pchart.sourceforge.net/ + +TeeChart + https://www.steema.com/ + +PHPGraphLib + http://www.ebrueggeman.com/phpgraphlib \ No newline at end of file diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/Polyfill.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/Polyfill.php new file mode 100755 index 0000000..7fa3839 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/Polyfill.php @@ -0,0 +1,9 @@ +caption = $caption; + $this->layout = $layout; + } + + /** + * Get caption. + * + * @return string + */ + public function getCaption() + { + return $this->caption; + } + + /** + * Set caption. + * + * @param string $caption + * + * @return Title + */ + public function setCaption($caption) + { + $this->caption = $caption; + + return $this; + } + + /** + * Get Layout. + * + * @return Layout + */ + public function getLayout() + { + return $this->layout; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php new file mode 100755 index 0000000..84c3d30 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/Cells.php @@ -0,0 +1,506 @@ +parent = $parent; + $this->cache = $cache; + $this->cachePrefix = $this->getUniqueID(); + } + + /** + * Return the parent worksheet for this cell collection. + * + * @return Worksheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Whether the collection holds a cell for the given coordinate. + * + * @param string $pCoord Coordinate of the cell to check + * + * @return bool + */ + public function has($pCoord) + { + if ($pCoord === $this->currentCoordinate) { + return true; + } + + // Check if the requested entry exists in the index + return isset($this->index[$pCoord]); + } + + /** + * Add or update a cell in the collection. + * + * @param Cell $cell Cell to update + * + * @throws PhpSpreadsheetException + * + * @return Cell + */ + public function update(Cell $cell) + { + return $this->add($cell->getCoordinate(), $cell); + } + + /** + * Delete a cell in cache identified by coordinate. + * + * @param string $pCoord Coordinate of the cell to delete + */ + public function delete($pCoord) + { + if ($pCoord === $this->currentCoordinate && $this->currentCell !== null) { + $this->currentCell->detach(); + $this->currentCoordinate = null; + $this->currentCell = null; + $this->currentCellIsDirty = false; + } + + unset($this->index[$pCoord]); + + // Delete the entry from cache + $this->cache->delete($this->cachePrefix . $pCoord); + } + + /** + * Get a list of all cell coordinates currently held in the collection. + * + * @return string[] + */ + public function getCoordinates() + { + return array_keys($this->index); + } + + /** + * Get a sorted list of all cell coordinates currently held in the collection by row and column. + * + * @return string[] + */ + public function getSortedCoordinates() + { + $sortKeys = []; + foreach ($this->getCoordinates() as $coord) { + $column = ''; + $row = 0; + sscanf($coord, '%[A-Z]%d', $column, $row); + $sortKeys[sprintf('%09d%3s', $row, $column)] = $coord; + } + ksort($sortKeys); + + return array_values($sortKeys); + } + + /** + * Get highest worksheet column and highest row that have cell records. + * + * @return array Highest column name and highest row number + */ + public function getHighestRowAndColumn() + { + // Lookup highest column and highest row + $col = ['A' => '1A']; + $row = [1]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + sscanf($coord, '%[A-Z]%d', $c, $r); + $row[$r] = $r; + $col[$c] = strlen($c) . $c; + } + + // Determine highest column and row + $highestRow = max($row); + $highestColumn = substr(max($col), 1); + + return [ + 'row' => $highestRow, + 'column' => $highestColumn, + ]; + } + + /** + * Return the cell coordinate of the currently active cell object. + * + * @return string + */ + public function getCurrentCoordinate() + { + return $this->currentCoordinate; + } + + /** + * Return the column coordinate of the currently active cell object. + * + * @return string + */ + public function getCurrentColumn() + { + $column = ''; + $row = 0; + + sscanf($this->currentCoordinate, '%[A-Z]%d', $column, $row); + + return $column; + } + + /** + * Return the row coordinate of the currently active cell object. + * + * @return int + */ + public function getCurrentRow() + { + $column = ''; + $row = 0; + + sscanf($this->currentCoordinate, '%[A-Z]%d', $column, $row); + + return (int) $row; + } + + /** + * Get highest worksheet column. + * + * @param string $row Return the highest column for the specified row, + * or the highest column of any row if no row number is passed + * + * @return string Highest column name + */ + public function getHighestColumn($row = null) + { + if ($row === null) { + $colRow = $this->getHighestRowAndColumn(); + + return $colRow['column']; + } + + $columnList = [1]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($r != $row) { + continue; + } + $columnList[] = Coordinate::columnIndexFromString($c); + } + + return Coordinate::stringFromColumnIndex(max($columnList)); + } + + /** + * Get highest worksheet row. + * + * @param string $column Return the highest row for the specified column, + * or the highest row of any column if no column letter is passed + * + * @return int Highest row number + */ + public function getHighestRow($column = null) + { + if ($column === null) { + $colRow = $this->getHighestRowAndColumn(); + + return $colRow['row']; + } + + $rowList = [0]; + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($c != $column) { + continue; + } + $rowList[] = $r; + } + + return max($rowList); + } + + /** + * Generate a unique ID for cache referencing. + * + * @return string Unique Reference + */ + private function getUniqueID() + { + return uniqid('phpspreadsheet.', true) . '.'; + } + + /** + * Clone the cell collection. + * + * @param Worksheet $parent The new worksheet that we're copying to + * + * @return self + */ + public function cloneCellCollection(Worksheet $parent) + { + $this->storeCurrentCell(); + $newCollection = clone $this; + + $newCollection->parent = $parent; + if (($newCollection->currentCell !== null) && (is_object($newCollection->currentCell))) { + $newCollection->currentCell->attach($this); + } + + // Get old values + $oldKeys = $newCollection->getAllCacheKeys(); + $oldValues = $newCollection->cache->getMultiple($oldKeys); + $newValues = []; + $oldCachePrefix = $newCollection->cachePrefix; + + // Change prefix + $newCollection->cachePrefix = $newCollection->getUniqueID(); + foreach ($oldValues as $oldKey => $value) { + $newValues[str_replace($oldCachePrefix, $newCollection->cachePrefix, $oldKey)] = clone $value; + } + + // Store new values + $stored = $newCollection->cache->setMultiple($newValues); + if (!$stored) { + $newCollection->__destruct(); + + throw new PhpSpreadsheetException('Failed to copy cells in cache'); + } + + return $newCollection; + } + + /** + * Remove a row, deleting all cells in that row. + * + * @param string $row Row number to remove + */ + public function removeRow($row) + { + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($r == $row) { + $this->delete($coord); + } + } + } + + /** + * Remove a column, deleting all cells in that column. + * + * @param string $column Column ID to remove + */ + public function removeColumn($column) + { + foreach ($this->getCoordinates() as $coord) { + $c = ''; + $r = 0; + + sscanf($coord, '%[A-Z]%d', $c, $r); + if ($c == $column) { + $this->delete($coord); + } + } + } + + /** + * Store cell data in cache for the current cell object if it's "dirty", + * and the 'nullify' the current cell object. + * + * @throws PhpSpreadsheetException + */ + private function storeCurrentCell() + { + if ($this->currentCellIsDirty && !empty($this->currentCoordinate)) { + $this->currentCell->detach(); + + $stored = $this->cache->set($this->cachePrefix . $this->currentCoordinate, $this->currentCell); + if (!$stored) { + $this->__destruct(); + + throw new PhpSpreadsheetException("Failed to store cell {$this->currentCoordinate} in cache"); + } + $this->currentCellIsDirty = false; + } + + $this->currentCoordinate = null; + $this->currentCell = null; + } + + /** + * Add or update a cell identified by its coordinate into the collection. + * + * @param string $pCoord Coordinate of the cell to update + * @param Cell $cell Cell to update + * + * @throws PhpSpreadsheetException + * + * @return \PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function add($pCoord, Cell $cell) + { + if ($pCoord !== $this->currentCoordinate) { + $this->storeCurrentCell(); + } + $this->index[$pCoord] = true; + + $this->currentCoordinate = $pCoord; + $this->currentCell = $cell; + $this->currentCellIsDirty = true; + + return $cell; + } + + /** + * Get cell at a specific coordinate. + * + * @param string $pCoord Coordinate of the cell + * + * @throws PhpSpreadsheetException + * + * @return \PhpOffice\PhpSpreadsheet\Cell\Cell Cell that was found, or null if not found + */ + public function get($pCoord) + { + if ($pCoord === $this->currentCoordinate) { + return $this->currentCell; + } + $this->storeCurrentCell(); + + // Return null if requested entry doesn't exist in collection + if (!$this->has($pCoord)) { + return null; + } + + // Check if the entry that has been requested actually exists + $cell = $this->cache->get($this->cachePrefix . $pCoord); + if ($cell === null) { + throw new PhpSpreadsheetException("Cell entry {$pCoord} no longer exists in cache. This probably means that the cache was cleared by someone else."); + } + + // Set current entry to the requested entry + $this->currentCoordinate = $pCoord; + $this->currentCell = $cell; + // Re-attach this as the cell's parent + $this->currentCell->attach($this); + + // Return requested entry + return $this->currentCell; + } + + /** + * Clear the cell collection and disconnect from our parent. + */ + public function unsetWorksheetCells() + { + if ($this->currentCell !== null) { + $this->currentCell->detach(); + $this->currentCell = null; + $this->currentCoordinate = null; + } + + // Flush the cache + $this->__destruct(); + + $this->index = []; + + // detach ourself from the worksheet, so that it can then delete this object successfully + $this->parent = null; + } + + /** + * Destroy this cell collection. + */ + public function __destruct() + { + $this->cache->deleteMultiple($this->getAllCacheKeys()); + } + + /** + * Returns all known cache keys. + * + * @return \Generator|string[] + */ + private function getAllCacheKeys() + { + foreach ($this->getCoordinates() as $coordinate) { + yield $this->cachePrefix . $coordinate; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php new file mode 100755 index 0000000..46d3cf7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Collection/CellsFactory.php @@ -0,0 +1,23 @@ +cache = []; + + return true; + } + + public function delete($key) + { + unset($this->cache[$key]); + + return true; + } + + public function deleteMultiple($keys) + { + foreach ($keys as $key) { + $this->delete($key); + } + + return true; + } + + public function get($key, $default = null) + { + if ($this->has($key)) { + return $this->cache[$key]; + } + + return $default; + } + + public function getMultiple($keys, $default = null) + { + $results = []; + foreach ($keys as $key) { + $results[$key] = $this->get($key, $default); + } + + return $results; + } + + public function has($key) + { + return array_key_exists($key, $this->cache); + } + + public function set($key, $value, $ttl = null) + { + $this->cache[$key] = $value; + + return true; + } + + public function setMultiple($values, $ttl = null) + { + foreach ($values as $key => $value) { + $this->set($key, $value); + } + + return true; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Comment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Comment.php new file mode 100755 index 0000000..1b5ab1f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Comment.php @@ -0,0 +1,331 @@ +author = 'Author'; + $this->text = new RichText(); + $this->fillColor = new Style\Color('FFFFFFE1'); + $this->alignment = Style\Alignment::HORIZONTAL_GENERAL; + } + + /** + * Get Author. + * + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Set Author. + * + * @param string $author + * + * @return Comment + */ + public function setAuthor($author) + { + $this->author = $author; + + return $this; + } + + /** + * Get Rich text comment. + * + * @return RichText + */ + public function getText() + { + return $this->text; + } + + /** + * Set Rich text comment. + * + * @param RichText $pValue + * + * @return Comment + */ + public function setText(RichText $pValue) + { + $this->text = $pValue; + + return $this; + } + + /** + * Get comment width (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set comment width (CSS style, i.e. XXpx or YYpt). + * + * @param string $width + * + * @return Comment + */ + public function setWidth($width) + { + $this->width = $width; + + return $this; + } + + /** + * Get comment height (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set comment height (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return Comment + */ + public function setHeight($value) + { + $this->height = $value; + + return $this; + } + + /** + * Get left margin (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getMarginLeft() + { + return $this->marginLeft; + } + + /** + * Set left margin (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return Comment + */ + public function setMarginLeft($value) + { + $this->marginLeft = $value; + + return $this; + } + + /** + * Get top margin (CSS style, i.e. XXpx or YYpt). + * + * @return string + */ + public function getMarginTop() + { + return $this->marginTop; + } + + /** + * Set top margin (CSS style, i.e. XXpx or YYpt). + * + * @param string $value + * + * @return Comment + */ + public function setMarginTop($value) + { + $this->marginTop = $value; + + return $this; + } + + /** + * Is the comment visible by default? + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set comment default visibility. + * + * @param bool $value + * + * @return Comment + */ + public function setVisible($value) + { + $this->visible = $value; + + return $this; + } + + /** + * Get fill color. + * + * @return Style\Color + */ + public function getFillColor() + { + return $this->fillColor; + } + + /** + * Set Alignment. + * + * @param string $alignment see Style\Alignment::HORIZONTAL_* + * + * @return Comment + */ + public function setAlignment($alignment) + { + $this->alignment = $alignment; + + return $this; + } + + /** + * Get Alignment. + * + * @return string + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->author . + $this->text->getHashCode() . + $this->width . + $this->height . + $this->marginLeft . + $this->marginTop . + ($this->visible ? 1 : 0) . + $this->fillColor->getHashCode() . + $this->alignment . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return $this->text->getPlainText(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php new file mode 100755 index 0000000..1a432db --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php @@ -0,0 +1,629 @@ +lastModifiedBy = $this->creator; + $this->created = time(); + $this->modified = time(); + } + + /** + * Get Creator. + * + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Set Creator. + * + * @param string $creator + * + * @return Properties + */ + public function setCreator($creator) + { + $this->creator = $creator; + + return $this; + } + + /** + * Get Last Modified By. + * + * @return string + */ + public function getLastModifiedBy() + { + return $this->lastModifiedBy; + } + + /** + * Set Last Modified By. + * + * @param string $pValue + * + * @return Properties + */ + public function setLastModifiedBy($pValue) + { + $this->lastModifiedBy = $pValue; + + return $this; + } + + /** + * Get Created. + * + * @return int + */ + public function getCreated() + { + return $this->created; + } + + /** + * Set Created. + * + * @param int|string $time + * + * @return Properties + */ + public function setCreated($time) + { + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; + } else { + $time = strtotime($time); + } + } + + $this->created = $time; + + return $this; + } + + /** + * Get Modified. + * + * @return int + */ + public function getModified() + { + return $this->modified; + } + + /** + * Set Modified. + * + * @param int|string $time + * + * @return Properties + */ + public function setModified($time) + { + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; + } else { + $time = strtotime($time); + } + } + + $this->modified = $time; + + return $this; + } + + /** + * Get Title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set Title. + * + * @param string $title + * + * @return Properties + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get Description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set Description. + * + * @param string $description + * + * @return Properties + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get Subject. + * + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Set Subject. + * + * @param string $subject + * + * @return Properties + */ + public function setSubject($subject) + { + $this->subject = $subject; + + return $this; + } + + /** + * Get Keywords. + * + * @return string + */ + public function getKeywords() + { + return $this->keywords; + } + + /** + * Set Keywords. + * + * @param string $keywords + * + * @return Properties + */ + public function setKeywords($keywords) + { + $this->keywords = $keywords; + + return $this; + } + + /** + * Get Category. + * + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * Set Category. + * + * @param string $category + * + * @return Properties + */ + public function setCategory($category) + { + $this->category = $category; + + return $this; + } + + /** + * Get Company. + * + * @return string + */ + public function getCompany() + { + return $this->company; + } + + /** + * Set Company. + * + * @param string $company + * + * @return Properties + */ + public function setCompany($company) + { + $this->company = $company; + + return $this; + } + + /** + * Get Manager. + * + * @return string + */ + public function getManager() + { + return $this->manager; + } + + /** + * Set Manager. + * + * @param string $manager + * + * @return Properties + */ + public function setManager($manager) + { + $this->manager = $manager; + + return $this; + } + + /** + * Get a List of Custom Property Names. + * + * @return array of string + */ + public function getCustomProperties() + { + return array_keys($this->customProperties); + } + + /** + * Check if a Custom Property is defined. + * + * @param string $propertyName + * + * @return bool + */ + public function isCustomPropertySet($propertyName) + { + return isset($this->customProperties[$propertyName]); + } + + /** + * Get a Custom Property Value. + * + * @param string $propertyName + * + * @return mixed + */ + public function getCustomPropertyValue($propertyName) + { + if (isset($this->customProperties[$propertyName])) { + return $this->customProperties[$propertyName]['value']; + } + } + + /** + * Get a Custom Property Type. + * + * @param string $propertyName + * + * @return string + */ + public function getCustomPropertyType($propertyName) + { + if (isset($this->customProperties[$propertyName])) { + return $this->customProperties[$propertyName]['type']; + } + } + + /** + * Set a Custom Property. + * + * @param string $propertyName + * @param mixed $propertyValue + * @param string $propertyType + * 'i' : Integer + * 'f' : Floating Point + * 's' : String + * 'd' : Date/Time + * 'b' : Boolean + * + * @return Properties + */ + public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null) + { + if (($propertyType === null) || (!in_array($propertyType, [self::PROPERTY_TYPE_INTEGER, + self::PROPERTY_TYPE_FLOAT, + self::PROPERTY_TYPE_STRING, + self::PROPERTY_TYPE_DATE, + self::PROPERTY_TYPE_BOOLEAN, ]))) { + if ($propertyValue === null) { + $propertyType = self::PROPERTY_TYPE_STRING; + } elseif (is_float($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_FLOAT; + } elseif (is_int($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_INTEGER; + } elseif (is_bool($propertyValue)) { + $propertyType = self::PROPERTY_TYPE_BOOLEAN; + } else { + $propertyType = self::PROPERTY_TYPE_STRING; + } + } + + $this->customProperties[$propertyName] = [ + 'value' => $propertyValue, + 'type' => $propertyType, + ]; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + public static function convertProperty($propertyValue, $propertyType) + { + switch ($propertyType) { + case 'empty': // Empty + return ''; + + break; + case 'null': // Null + return null; + + break; + case 'i1': // 1-Byte Signed Integer + case 'i2': // 2-Byte Signed Integer + case 'i4': // 4-Byte Signed Integer + case 'i8': // 8-Byte Signed Integer + case 'int': // Integer + return (int) $propertyValue; + + break; + case 'ui1': // 1-Byte Unsigned Integer + case 'ui2': // 2-Byte Unsigned Integer + case 'ui4': // 4-Byte Unsigned Integer + case 'ui8': // 8-Byte Unsigned Integer + case 'uint': // Unsigned Integer + return abs((int) $propertyValue); + + break; + case 'r4': // 4-Byte Real Number + case 'r8': // 8-Byte Real Number + case 'decimal': // Decimal + return (float) $propertyValue; + + break; + case 'lpstr': // LPSTR + case 'lpwstr': // LPWSTR + case 'bstr': // Basic String + return $propertyValue; + + break; + case 'date': // Date and Time + case 'filetime': // File Time + return strtotime($propertyValue); + + break; + case 'bool': // Boolean + return $propertyValue == 'true'; + + break; + case 'cy': // Currency + case 'error': // Error Status Code + case 'vector': // Vector + case 'array': // Array + case 'blob': // Binary Blob + case 'oblob': // Binary Blob Object + case 'stream': // Binary Stream + case 'ostream': // Binary Stream Object + case 'storage': // Binary Storage + case 'ostorage': // Binary Storage Object + case 'vstream': // Binary Versioned Stream + case 'clsid': // Class ID + case 'cf': // Clipboard Data + return $propertyValue; + + break; + } + + return $propertyValue; + } + + public static function convertPropertyType($propertyType) + { + switch ($propertyType) { + case 'i1': // 1-Byte Signed Integer + case 'i2': // 2-Byte Signed Integer + case 'i4': // 4-Byte Signed Integer + case 'i8': // 8-Byte Signed Integer + case 'int': // Integer + case 'ui1': // 1-Byte Unsigned Integer + case 'ui2': // 2-Byte Unsigned Integer + case 'ui4': // 4-Byte Unsigned Integer + case 'ui8': // 8-Byte Unsigned Integer + case 'uint': // Unsigned Integer + return self::PROPERTY_TYPE_INTEGER; + + break; + case 'r4': // 4-Byte Real Number + case 'r8': // 8-Byte Real Number + case 'decimal': // Decimal + return self::PROPERTY_TYPE_FLOAT; + + break; + case 'empty': // Empty + case 'null': // Null + case 'lpstr': // LPSTR + case 'lpwstr': // LPWSTR + case 'bstr': // Basic String + return self::PROPERTY_TYPE_STRING; + + break; + case 'date': // Date and Time + case 'filetime': // File Time + return self::PROPERTY_TYPE_DATE; + + break; + case 'bool': // Boolean + return self::PROPERTY_TYPE_BOOLEAN; + + break; + case 'cy': // Currency + case 'error': // Error Status Code + case 'vector': // Vector + case 'array': // Array + case 'blob': // Binary Blob + case 'oblob': // Binary Blob Object + case 'stream': // Binary Stream + case 'ostream': // Binary Stream Object + case 'storage': // Binary Storage + case 'ostorage': // Binary Storage Object + case 'vstream': // Binary Versioned Stream + case 'clsid': // Class ID + case 'cf': // Clipboard Data + return self::PROPERTY_TYPE_UNKNOWN; + + break; + } + + return self::PROPERTY_TYPE_UNKNOWN; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Security.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Security.php new file mode 100755 index 0000000..1682678 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Security.php @@ -0,0 +1,205 @@ +lockRevision || + $this->lockStructure || + $this->lockWindows; + } + + /** + * Get LockRevision. + * + * @return bool + */ + public function getLockRevision() + { + return $this->lockRevision; + } + + /** + * Set LockRevision. + * + * @param bool $pValue + * + * @return Security + */ + public function setLockRevision($pValue) + { + $this->lockRevision = $pValue; + + return $this; + } + + /** + * Get LockStructure. + * + * @return bool + */ + public function getLockStructure() + { + return $this->lockStructure; + } + + /** + * Set LockStructure. + * + * @param bool $pValue + * + * @return Security + */ + public function setLockStructure($pValue) + { + $this->lockStructure = $pValue; + + return $this; + } + + /** + * Get LockWindows. + * + * @return bool + */ + public function getLockWindows() + { + return $this->lockWindows; + } + + /** + * Set LockWindows. + * + * @param bool $pValue + * + * @return Security + */ + public function setLockWindows($pValue) + { + $this->lockWindows = $pValue; + + return $this; + } + + /** + * Get RevisionsPassword (hashed). + * + * @return string + */ + public function getRevisionsPassword() + { + return $this->revisionsPassword; + } + + /** + * Set RevisionsPassword. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return Security + */ + public function setRevisionsPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $pValue = PasswordHasher::hashPassword($pValue); + } + $this->revisionsPassword = $pValue; + + return $this; + } + + /** + * Get WorkbookPassword (hashed). + * + * @return string + */ + public function getWorkbookPassword() + { + return $this->workbookPassword; + } + + /** + * Set WorkbookPassword. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return Security + */ + public function setWorkbookPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $pValue = PasswordHasher::hashPassword($pValue); + } + $this->workbookPassword = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Exception.php new file mode 100755 index 0000000..9c5ab30 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Exception.php @@ -0,0 +1,7 @@ +addFromSource($pSource); + } + } + + /** + * Add HashTable items from source. + * + * @param IComparable[] $pSource Source array to create HashTable from + * + * @throws Exception + */ + public function addFromSource(array $pSource = null) + { + // Check if an array was passed + if ($pSource == null) { + return; + } + + foreach ($pSource as $item) { + $this->add($item); + } + } + + /** + * Add HashTable item. + * + * @param IComparable $pSource Item to add + */ + public function add(IComparable $pSource) + { + $hash = $pSource->getHashCode(); + if (!isset($this->items[$hash])) { + $this->items[$hash] = $pSource; + $this->keyMap[count($this->items) - 1] = $hash; + } + } + + /** + * Remove HashTable item. + * + * @param IComparable $pSource Item to remove + */ + public function remove(IComparable $pSource) + { + $hash = $pSource->getHashCode(); + if (isset($this->items[$hash])) { + unset($this->items[$hash]); + + $deleteKey = -1; + foreach ($this->keyMap as $key => $value) { + if ($deleteKey >= 0) { + $this->keyMap[$key - 1] = $value; + } + + if ($value == $hash) { + $deleteKey = $key; + } + } + unset($this->keyMap[count($this->keyMap) - 1]); + } + } + + /** + * Clear HashTable. + */ + public function clear() + { + $this->items = []; + $this->keyMap = []; + } + + /** + * Count. + * + * @return int + */ + public function count() + { + return count($this->items); + } + + /** + * Get index for hash code. + * + * @param string $pHashCode + * + * @return int Index + */ + public function getIndexForHashCode($pHashCode) + { + return array_search($pHashCode, $this->keyMap); + } + + /** + * Get by index. + * + * @param int $pIndex + * + * @return IComparable + */ + public function getByIndex($pIndex) + { + if (isset($this->keyMap[$pIndex])) { + return $this->getByHashCode($this->keyMap[$pIndex]); + } + + return null; + } + + /** + * Get by hashcode. + * + * @param string $pHashCode + * + * @return IComparable + */ + public function getByHashCode($pHashCode) + { + if (isset($this->items[$pHashCode])) { + return $this->items[$pHashCode]; + } + + return null; + } + + /** + * HashTable to array. + * + * @return IComparable[] + */ + public function toArray() + { + return $this->items; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php new file mode 100755 index 0000000..eaf7302 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php @@ -0,0 +1,841 @@ + 'f0f8ff', + 'antiquewhite' => 'faebd7', + 'antiquewhite1' => 'ffefdb', + 'antiquewhite2' => 'eedfcc', + 'antiquewhite3' => 'cdc0b0', + 'antiquewhite4' => '8b8378', + 'aqua' => '00ffff', + 'aquamarine1' => '7fffd4', + 'aquamarine2' => '76eec6', + 'aquamarine4' => '458b74', + 'azure1' => 'f0ffff', + 'azure2' => 'e0eeee', + 'azure3' => 'c1cdcd', + 'azure4' => '838b8b', + 'beige' => 'f5f5dc', + 'bisque1' => 'ffe4c4', + 'bisque2' => 'eed5b7', + 'bisque3' => 'cdb79e', + 'bisque4' => '8b7d6b', + 'black' => '000000', + 'blanchedalmond' => 'ffebcd', + 'blue' => '0000ff', + 'blue1' => '0000ff', + 'blue2' => '0000ee', + 'blue4' => '00008b', + 'blueviolet' => '8a2be2', + 'brown' => 'a52a2a', + 'brown1' => 'ff4040', + 'brown2' => 'ee3b3b', + 'brown3' => 'cd3333', + 'brown4' => '8b2323', + 'burlywood' => 'deb887', + 'burlywood1' => 'ffd39b', + 'burlywood2' => 'eec591', + 'burlywood3' => 'cdaa7d', + 'burlywood4' => '8b7355', + 'cadetblue' => '5f9ea0', + 'cadetblue1' => '98f5ff', + 'cadetblue2' => '8ee5ee', + 'cadetblue3' => '7ac5cd', + 'cadetblue4' => '53868b', + 'chartreuse1' => '7fff00', + 'chartreuse2' => '76ee00', + 'chartreuse3' => '66cd00', + 'chartreuse4' => '458b00', + 'chocolate' => 'd2691e', + 'chocolate1' => 'ff7f24', + 'chocolate2' => 'ee7621', + 'chocolate3' => 'cd661d', + 'coral' => 'ff7f50', + 'coral1' => 'ff7256', + 'coral2' => 'ee6a50', + 'coral3' => 'cd5b45', + 'coral4' => '8b3e2f', + 'cornflowerblue' => '6495ed', + 'cornsilk1' => 'fff8dc', + 'cornsilk2' => 'eee8cd', + 'cornsilk3' => 'cdc8b1', + 'cornsilk4' => '8b8878', + 'cyan1' => '00ffff', + 'cyan2' => '00eeee', + 'cyan3' => '00cdcd', + 'cyan4' => '008b8b', + 'darkgoldenrod' => 'b8860b', + 'darkgoldenrod1' => 'ffb90f', + 'darkgoldenrod2' => 'eead0e', + 'darkgoldenrod3' => 'cd950c', + 'darkgoldenrod4' => '8b6508', + 'darkgreen' => '006400', + 'darkkhaki' => 'bdb76b', + 'darkolivegreen' => '556b2f', + 'darkolivegreen1' => 'caff70', + 'darkolivegreen2' => 'bcee68', + 'darkolivegreen3' => 'a2cd5a', + 'darkolivegreen4' => '6e8b3d', + 'darkorange' => 'ff8c00', + 'darkorange1' => 'ff7f00', + 'darkorange2' => 'ee7600', + 'darkorange3' => 'cd6600', + 'darkorange4' => '8b4500', + 'darkorchid' => '9932cc', + 'darkorchid1' => 'bf3eff', + 'darkorchid2' => 'b23aee', + 'darkorchid3' => '9a32cd', + 'darkorchid4' => '68228b', + 'darksalmon' => 'e9967a', + 'darkseagreen' => '8fbc8f', + 'darkseagreen1' => 'c1ffc1', + 'darkseagreen2' => 'b4eeb4', + 'darkseagreen3' => '9bcd9b', + 'darkseagreen4' => '698b69', + 'darkslateblue' => '483d8b', + 'darkslategray' => '2f4f4f', + 'darkslategray1' => '97ffff', + 'darkslategray2' => '8deeee', + 'darkslategray3' => '79cdcd', + 'darkslategray4' => '528b8b', + 'darkturquoise' => '00ced1', + 'darkviolet' => '9400d3', + 'deeppink1' => 'ff1493', + 'deeppink2' => 'ee1289', + 'deeppink3' => 'cd1076', + 'deeppink4' => '8b0a50', + 'deepskyblue1' => '00bfff', + 'deepskyblue2' => '00b2ee', + 'deepskyblue3' => '009acd', + 'deepskyblue4' => '00688b', + 'dimgray' => '696969', + 'dodgerblue1' => '1e90ff', + 'dodgerblue2' => '1c86ee', + 'dodgerblue3' => '1874cd', + 'dodgerblue4' => '104e8b', + 'firebrick' => 'b22222', + 'firebrick1' => 'ff3030', + 'firebrick2' => 'ee2c2c', + 'firebrick3' => 'cd2626', + 'firebrick4' => '8b1a1a', + 'floralwhite' => 'fffaf0', + 'forestgreen' => '228b22', + 'fuchsia' => 'ff00ff', + 'gainsboro' => 'dcdcdc', + 'ghostwhite' => 'f8f8ff', + 'gold1' => 'ffd700', + 'gold2' => 'eec900', + 'gold3' => 'cdad00', + 'gold4' => '8b7500', + 'goldenrod' => 'daa520', + 'goldenrod1' => 'ffc125', + 'goldenrod2' => 'eeb422', + 'goldenrod3' => 'cd9b1d', + 'goldenrod4' => '8b6914', + 'gray' => 'bebebe', + 'gray1' => '030303', + 'gray10' => '1a1a1a', + 'gray11' => '1c1c1c', + 'gray12' => '1f1f1f', + 'gray13' => '212121', + 'gray14' => '242424', + 'gray15' => '262626', + 'gray16' => '292929', + 'gray17' => '2b2b2b', + 'gray18' => '2e2e2e', + 'gray19' => '303030', + 'gray2' => '050505', + 'gray20' => '333333', + 'gray21' => '363636', + 'gray22' => '383838', + 'gray23' => '3b3b3b', + 'gray24' => '3d3d3d', + 'gray25' => '404040', + 'gray26' => '424242', + 'gray27' => '454545', + 'gray28' => '474747', + 'gray29' => '4a4a4a', + 'gray3' => '080808', + 'gray30' => '4d4d4d', + 'gray31' => '4f4f4f', + 'gray32' => '525252', + 'gray33' => '545454', + 'gray34' => '575757', + 'gray35' => '595959', + 'gray36' => '5c5c5c', + 'gray37' => '5e5e5e', + 'gray38' => '616161', + 'gray39' => '636363', + 'gray4' => '0a0a0a', + 'gray40' => '666666', + 'gray41' => '696969', + 'gray42' => '6b6b6b', + 'gray43' => '6e6e6e', + 'gray44' => '707070', + 'gray45' => '737373', + 'gray46' => '757575', + 'gray47' => '787878', + 'gray48' => '7a7a7a', + 'gray49' => '7d7d7d', + 'gray5' => '0d0d0d', + 'gray50' => '7f7f7f', + 'gray51' => '828282', + 'gray52' => '858585', + 'gray53' => '878787', + 'gray54' => '8a8a8a', + 'gray55' => '8c8c8c', + 'gray56' => '8f8f8f', + 'gray57' => '919191', + 'gray58' => '949494', + 'gray59' => '969696', + 'gray6' => '0f0f0f', + 'gray60' => '999999', + 'gray61' => '9c9c9c', + 'gray62' => '9e9e9e', + 'gray63' => 'a1a1a1', + 'gray64' => 'a3a3a3', + 'gray65' => 'a6a6a6', + 'gray66' => 'a8a8a8', + 'gray67' => 'ababab', + 'gray68' => 'adadad', + 'gray69' => 'b0b0b0', + 'gray7' => '121212', + 'gray70' => 'b3b3b3', + 'gray71' => 'b5b5b5', + 'gray72' => 'b8b8b8', + 'gray73' => 'bababa', + 'gray74' => 'bdbdbd', + 'gray75' => 'bfbfbf', + 'gray76' => 'c2c2c2', + 'gray77' => 'c4c4c4', + 'gray78' => 'c7c7c7', + 'gray79' => 'c9c9c9', + 'gray8' => '141414', + 'gray80' => 'cccccc', + 'gray81' => 'cfcfcf', + 'gray82' => 'd1d1d1', + 'gray83' => 'd4d4d4', + 'gray84' => 'd6d6d6', + 'gray85' => 'd9d9d9', + 'gray86' => 'dbdbdb', + 'gray87' => 'dedede', + 'gray88' => 'e0e0e0', + 'gray89' => 'e3e3e3', + 'gray9' => '171717', + 'gray90' => 'e5e5e5', + 'gray91' => 'e8e8e8', + 'gray92' => 'ebebeb', + 'gray93' => 'ededed', + 'gray94' => 'f0f0f0', + 'gray95' => 'f2f2f2', + 'gray97' => 'f7f7f7', + 'gray98' => 'fafafa', + 'gray99' => 'fcfcfc', + 'green' => '00ff00', + 'green1' => '00ff00', + 'green2' => '00ee00', + 'green3' => '00cd00', + 'green4' => '008b00', + 'greenyellow' => 'adff2f', + 'honeydew1' => 'f0fff0', + 'honeydew2' => 'e0eee0', + 'honeydew3' => 'c1cdc1', + 'honeydew4' => '838b83', + 'hotpink' => 'ff69b4', + 'hotpink1' => 'ff6eb4', + 'hotpink2' => 'ee6aa7', + 'hotpink3' => 'cd6090', + 'hotpink4' => '8b3a62', + 'indianred' => 'cd5c5c', + 'indianred1' => 'ff6a6a', + 'indianred2' => 'ee6363', + 'indianred3' => 'cd5555', + 'indianred4' => '8b3a3a', + 'ivory1' => 'fffff0', + 'ivory2' => 'eeeee0', + 'ivory3' => 'cdcdc1', + 'ivory4' => '8b8b83', + 'khaki' => 'f0e68c', + 'khaki1' => 'fff68f', + 'khaki2' => 'eee685', + 'khaki3' => 'cdc673', + 'khaki4' => '8b864e', + 'lavender' => 'e6e6fa', + 'lavenderblush1' => 'fff0f5', + 'lavenderblush2' => 'eee0e5', + 'lavenderblush3' => 'cdc1c5', + 'lavenderblush4' => '8b8386', + 'lawngreen' => '7cfc00', + 'lemonchiffon1' => 'fffacd', + 'lemonchiffon2' => 'eee9bf', + 'lemonchiffon3' => 'cdc9a5', + 'lemonchiffon4' => '8b8970', + 'light' => 'eedd82', + 'lightblue' => 'add8e6', + 'lightblue1' => 'bfefff', + 'lightblue2' => 'b2dfee', + 'lightblue3' => '9ac0cd', + 'lightblue4' => '68838b', + 'lightcoral' => 'f08080', + 'lightcyan1' => 'e0ffff', + 'lightcyan2' => 'd1eeee', + 'lightcyan3' => 'b4cdcd', + 'lightcyan4' => '7a8b8b', + 'lightgoldenrod1' => 'ffec8b', + 'lightgoldenrod2' => 'eedc82', + 'lightgoldenrod3' => 'cdbe70', + 'lightgoldenrod4' => '8b814c', + 'lightgoldenrodyellow' => 'fafad2', + 'lightgray' => 'd3d3d3', + 'lightpink' => 'ffb6c1', + 'lightpink1' => 'ffaeb9', + 'lightpink2' => 'eea2ad', + 'lightpink3' => 'cd8c95', + 'lightpink4' => '8b5f65', + 'lightsalmon1' => 'ffa07a', + 'lightsalmon2' => 'ee9572', + 'lightsalmon3' => 'cd8162', + 'lightsalmon4' => '8b5742', + 'lightseagreen' => '20b2aa', + 'lightskyblue' => '87cefa', + 'lightskyblue1' => 'b0e2ff', + 'lightskyblue2' => 'a4d3ee', + 'lightskyblue3' => '8db6cd', + 'lightskyblue4' => '607b8b', + 'lightslateblue' => '8470ff', + 'lightslategray' => '778899', + 'lightsteelblue' => 'b0c4de', + 'lightsteelblue1' => 'cae1ff', + 'lightsteelblue2' => 'bcd2ee', + 'lightsteelblue3' => 'a2b5cd', + 'lightsteelblue4' => '6e7b8b', + 'lightyellow1' => 'ffffe0', + 'lightyellow2' => 'eeeed1', + 'lightyellow3' => 'cdcdb4', + 'lightyellow4' => '8b8b7a', + 'lime' => '00ff00', + 'limegreen' => '32cd32', + 'linen' => 'faf0e6', + 'magenta' => 'ff00ff', + 'magenta2' => 'ee00ee', + 'magenta3' => 'cd00cd', + 'magenta4' => '8b008b', + 'maroon' => 'b03060', + 'maroon1' => 'ff34b3', + 'maroon2' => 'ee30a7', + 'maroon3' => 'cd2990', + 'maroon4' => '8b1c62', + 'medium' => '66cdaa', + 'mediumaquamarine' => '66cdaa', + 'mediumblue' => '0000cd', + 'mediumorchid' => 'ba55d3', + 'mediumorchid1' => 'e066ff', + 'mediumorchid2' => 'd15fee', + 'mediumorchid3' => 'b452cd', + 'mediumorchid4' => '7a378b', + 'mediumpurple' => '9370db', + 'mediumpurple1' => 'ab82ff', + 'mediumpurple2' => '9f79ee', + 'mediumpurple3' => '8968cd', + 'mediumpurple4' => '5d478b', + 'mediumseagreen' => '3cb371', + 'mediumslateblue' => '7b68ee', + 'mediumspringgreen' => '00fa9a', + 'mediumturquoise' => '48d1cc', + 'mediumvioletred' => 'c71585', + 'midnightblue' => '191970', + 'mintcream' => 'f5fffa', + 'mistyrose1' => 'ffe4e1', + 'mistyrose2' => 'eed5d2', + 'mistyrose3' => 'cdb7b5', + 'mistyrose4' => '8b7d7b', + 'moccasin' => 'ffe4b5', + 'navajowhite1' => 'ffdead', + 'navajowhite2' => 'eecfa1', + 'navajowhite3' => 'cdb38b', + 'navajowhite4' => '8b795e', + 'navy' => '000080', + 'navyblue' => '000080', + 'oldlace' => 'fdf5e6', + 'olive' => '808000', + 'olivedrab' => '6b8e23', + 'olivedrab1' => 'c0ff3e', + 'olivedrab2' => 'b3ee3a', + 'olivedrab4' => '698b22', + 'orange' => 'ffa500', + 'orange1' => 'ffa500', + 'orange2' => 'ee9a00', + 'orange3' => 'cd8500', + 'orange4' => '8b5a00', + 'orangered1' => 'ff4500', + 'orangered2' => 'ee4000', + 'orangered3' => 'cd3700', + 'orangered4' => '8b2500', + 'orchid' => 'da70d6', + 'orchid1' => 'ff83fa', + 'orchid2' => 'ee7ae9', + 'orchid3' => 'cd69c9', + 'orchid4' => '8b4789', + 'pale' => 'db7093', + 'palegoldenrod' => 'eee8aa', + 'palegreen' => '98fb98', + 'palegreen1' => '9aff9a', + 'palegreen2' => '90ee90', + 'palegreen3' => '7ccd7c', + 'palegreen4' => '548b54', + 'paleturquoise' => 'afeeee', + 'paleturquoise1' => 'bbffff', + 'paleturquoise2' => 'aeeeee', + 'paleturquoise3' => '96cdcd', + 'paleturquoise4' => '668b8b', + 'palevioletred' => 'db7093', + 'palevioletred1' => 'ff82ab', + 'palevioletred2' => 'ee799f', + 'palevioletred3' => 'cd6889', + 'palevioletred4' => '8b475d', + 'papayawhip' => 'ffefd5', + 'peachpuff1' => 'ffdab9', + 'peachpuff2' => 'eecbad', + 'peachpuff3' => 'cdaf95', + 'peachpuff4' => '8b7765', + 'pink' => 'ffc0cb', + 'pink1' => 'ffb5c5', + 'pink2' => 'eea9b8', + 'pink3' => 'cd919e', + 'pink4' => '8b636c', + 'plum' => 'dda0dd', + 'plum1' => 'ffbbff', + 'plum2' => 'eeaeee', + 'plum3' => 'cd96cd', + 'plum4' => '8b668b', + 'powderblue' => 'b0e0e6', + 'purple' => 'a020f0', + 'rebeccapurple' => '663399', + 'purple1' => '9b30ff', + 'purple2' => '912cee', + 'purple3' => '7d26cd', + 'purple4' => '551a8b', + 'red' => 'ff0000', + 'red1' => 'ff0000', + 'red2' => 'ee0000', + 'red3' => 'cd0000', + 'red4' => '8b0000', + 'rosybrown' => 'bc8f8f', + 'rosybrown1' => 'ffc1c1', + 'rosybrown2' => 'eeb4b4', + 'rosybrown3' => 'cd9b9b', + 'rosybrown4' => '8b6969', + 'royalblue' => '4169e1', + 'royalblue1' => '4876ff', + 'royalblue2' => '436eee', + 'royalblue3' => '3a5fcd', + 'royalblue4' => '27408b', + 'saddlebrown' => '8b4513', + 'salmon' => 'fa8072', + 'salmon1' => 'ff8c69', + 'salmon2' => 'ee8262', + 'salmon3' => 'cd7054', + 'salmon4' => '8b4c39', + 'sandybrown' => 'f4a460', + 'seagreen1' => '54ff9f', + 'seagreen2' => '4eee94', + 'seagreen3' => '43cd80', + 'seagreen4' => '2e8b57', + 'seashell1' => 'fff5ee', + 'seashell2' => 'eee5de', + 'seashell3' => 'cdc5bf', + 'seashell4' => '8b8682', + 'sienna' => 'a0522d', + 'sienna1' => 'ff8247', + 'sienna2' => 'ee7942', + 'sienna3' => 'cd6839', + 'sienna4' => '8b4726', + 'silver' => 'c0c0c0', + 'skyblue' => '87ceeb', + 'skyblue1' => '87ceff', + 'skyblue2' => '7ec0ee', + 'skyblue3' => '6ca6cd', + 'skyblue4' => '4a708b', + 'slateblue' => '6a5acd', + 'slateblue1' => '836fff', + 'slateblue2' => '7a67ee', + 'slateblue3' => '6959cd', + 'slateblue4' => '473c8b', + 'slategray' => '708090', + 'slategray1' => 'c6e2ff', + 'slategray2' => 'b9d3ee', + 'slategray3' => '9fb6cd', + 'slategray4' => '6c7b8b', + 'snow1' => 'fffafa', + 'snow2' => 'eee9e9', + 'snow3' => 'cdc9c9', + 'snow4' => '8b8989', + 'springgreen1' => '00ff7f', + 'springgreen2' => '00ee76', + 'springgreen3' => '00cd66', + 'springgreen4' => '008b45', + 'steelblue' => '4682b4', + 'steelblue1' => '63b8ff', + 'steelblue2' => '5cacee', + 'steelblue3' => '4f94cd', + 'steelblue4' => '36648b', + 'tan' => 'd2b48c', + 'tan1' => 'ffa54f', + 'tan2' => 'ee9a49', + 'tan3' => 'cd853f', + 'tan4' => '8b5a2b', + 'teal' => '008080', + 'thistle' => 'd8bfd8', + 'thistle1' => 'ffe1ff', + 'thistle2' => 'eed2ee', + 'thistle3' => 'cdb5cd', + 'thistle4' => '8b7b8b', + 'tomato1' => 'ff6347', + 'tomato2' => 'ee5c42', + 'tomato3' => 'cd4f39', + 'tomato4' => '8b3626', + 'turquoise' => '40e0d0', + 'turquoise1' => '00f5ff', + 'turquoise2' => '00e5ee', + 'turquoise3' => '00c5cd', + 'turquoise4' => '00868b', + 'violet' => 'ee82ee', + 'violetred' => 'd02090', + 'violetred1' => 'ff3e96', + 'violetred2' => 'ee3a8c', + 'violetred3' => 'cd3278', + 'violetred4' => '8b2252', + 'wheat' => 'f5deb3', + 'wheat1' => 'ffe7ba', + 'wheat2' => 'eed8ae', + 'wheat3' => 'cdba96', + 'wheat4' => '8b7e66', + 'white' => 'ffffff', + 'whitesmoke' => 'f5f5f5', + 'yellow' => 'ffff00', + 'yellow1' => 'ffff00', + 'yellow2' => 'eeee00', + 'yellow3' => 'cdcd00', + 'yellow4' => '8b8b00', + 'yellowgreen' => '9acd32', + ]; + + protected $face; + + protected $size; + + protected $color; + + protected $bold = false; + + protected $italic = false; + + protected $underline = false; + + protected $superscript = false; + + protected $subscript = false; + + protected $strikethrough = false; + + protected $startTagCallbacks = [ + 'font' => 'startFontTag', + 'b' => 'startBoldTag', + 'strong' => 'startBoldTag', + 'i' => 'startItalicTag', + 'em' => 'startItalicTag', + 'u' => 'startUnderlineTag', + 'ins' => 'startUnderlineTag', + 'del' => 'startStrikethruTag', + 'sup' => 'startSuperscriptTag', + 'sub' => 'startSubscriptTag', + ]; + + protected $endTagCallbacks = [ + 'font' => 'endFontTag', + 'b' => 'endBoldTag', + 'strong' => 'endBoldTag', + 'i' => 'endItalicTag', + 'em' => 'endItalicTag', + 'u' => 'endUnderlineTag', + 'ins' => 'endUnderlineTag', + 'del' => 'endStrikethruTag', + 'sup' => 'endSuperscriptTag', + 'sub' => 'endSubscriptTag', + 'br' => 'breakTag', + 'p' => 'breakTag', + 'h1' => 'breakTag', + 'h2' => 'breakTag', + 'h3' => 'breakTag', + 'h4' => 'breakTag', + 'h5' => 'breakTag', + 'h6' => 'breakTag', + ]; + + protected $stack = []; + + protected $stringData = ''; + + /** + * @var RichText + */ + protected $richTextObject; + + protected function initialise() + { + $this->face = $this->size = $this->color = null; + $this->bold = $this->italic = $this->underline = $this->superscript = $this->subscript = $this->strikethrough = false; + + $this->stack = []; + + $this->stringData = ''; + } + + /** + * Parse HTML formatting and return the resulting RichText. + * + * @param string $html + * + * @return RichText + */ + public function toRichTextObject($html) + { + $this->initialise(); + + // Create a new DOM object + $dom = new DOMDocument(); + // Load the HTML file into the DOM object + // Note the use of error suppression, because typically this will be an html fragment, so not fully valid markup + $prefix = ''; + @$dom->loadHTML($prefix . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); + // Discard excess white space + $dom->preserveWhiteSpace = false; + + $this->richTextObject = new RichText(); + $this->parseElements($dom); + + // Clean any further spurious whitespace + $this->cleanWhitespace(); + + return $this->richTextObject; + } + + protected function cleanWhitespace() + { + foreach ($this->richTextObject->getRichTextElements() as $key => $element) { + $text = $element->getText(); + // Trim any leading spaces on the first run + if ($key == 0) { + $text = ltrim($text); + } + // Trim any spaces immediately after a line break + $text = preg_replace('/\n */mu', "\n", $text); + $element->setText($text); + } + } + + protected function buildTextRun() + { + $text = $this->stringData; + if (trim($text) === '') { + return; + } + + $richtextRun = $this->richTextObject->createTextRun($this->stringData); + if ($this->face) { + $richtextRun->getFont()->setName($this->face); + } + if ($this->size) { + $richtextRun->getFont()->setSize($this->size); + } + if ($this->color) { + $richtextRun->getFont()->setColor(new Color('ff' . $this->color)); + } + if ($this->bold) { + $richtextRun->getFont()->setBold(true); + } + if ($this->italic) { + $richtextRun->getFont()->setItalic(true); + } + if ($this->underline) { + $richtextRun->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + } + if ($this->superscript) { + $richtextRun->getFont()->setSuperscript(true); + } + if ($this->subscript) { + $richtextRun->getFont()->setSubscript(true); + } + if ($this->strikethrough) { + $richtextRun->getFont()->setStrikethrough(true); + } + $this->stringData = ''; + } + + protected function rgbToColour($rgb) + { + preg_match_all('/\d+/', $rgb, $values); + foreach ($values[0] as &$value) { + $value = str_pad(dechex($value), 2, '0', STR_PAD_LEFT); + } + + return implode($values[0]); + } + + protected function colourNameLookup($rgb) + { + return self::$colourMap[$rgb]; + } + + protected function startFontTag($tag) + { + foreach ($tag->attributes as $attribute) { + $attributeName = strtolower($attribute->name); + $attributeValue = $attribute->value; + + if ($attributeName == 'color') { + if (preg_match('/rgb\s*\(/', $attributeValue)) { + $this->$attributeName = $this->rgbToColour($attributeValue); + } elseif (strpos(trim($attributeValue), '#') === 0) { + $this->$attributeName = ltrim($attributeValue, '#'); + } else { + $this->$attributeName = $this->colourNameLookup($attributeValue); + } + } else { + $this->$attributeName = $attributeValue; + } + } + } + + protected function endFontTag() + { + $this->face = $this->size = $this->color = null; + } + + protected function startBoldTag() + { + $this->bold = true; + } + + protected function endBoldTag() + { + $this->bold = false; + } + + protected function startItalicTag() + { + $this->italic = true; + } + + protected function endItalicTag() + { + $this->italic = false; + } + + protected function startUnderlineTag() + { + $this->underline = true; + } + + protected function endUnderlineTag() + { + $this->underline = false; + } + + protected function startSubscriptTag() + { + $this->subscript = true; + } + + protected function endSubscriptTag() + { + $this->subscript = false; + } + + protected function startSuperscriptTag() + { + $this->superscript = true; + } + + protected function endSuperscriptTag() + { + $this->superscript = false; + } + + protected function startStrikethruTag() + { + $this->strikethrough = true; + } + + protected function endStrikethruTag() + { + $this->strikethrough = false; + } + + protected function breakTag() + { + $this->stringData .= "\n"; + } + + protected function parseTextNode(DOMText $textNode) + { + $domText = preg_replace( + '/\s+/u', + ' ', + str_replace(["\r", "\n"], ' ', $textNode->nodeValue) + ); + $this->stringData .= $domText; + $this->buildTextRun(); + } + + /** + * @param DOMElement $element + * @param string $callbackTag + * @param array $callbacks + */ + protected function handleCallback(DOMElement $element, $callbackTag, array $callbacks) + { + if (isset($callbacks[$callbackTag])) { + $elementHandler = $callbacks[$callbackTag]; + if (method_exists($this, $elementHandler)) { + call_user_func([$this, $elementHandler], $element); + } + } + } + + protected function parseElementNode(DOMElement $element) + { + $callbackTag = strtolower($element->nodeName); + $this->stack[] = $callbackTag; + + $this->handleCallback($element, $callbackTag, $this->startTagCallbacks); + + $this->parseElements($element); + array_pop($this->stack); + + $this->handleCallback($element, $callbackTag, $this->endTagCallbacks); + } + + protected function parseElements(DOMNode $element) + { + foreach ($element->childNodes as $child) { + if ($child instanceof DOMText) { + $this->parseTextNode($child); + } elseif ($child instanceof DOMElement) { + $this->parseElementNode($child); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php new file mode 100755 index 0000000..26d5fce --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php @@ -0,0 +1,333 @@ +from = array_keys($this->getMapping()); + $this->to = array_values($this->getMapping()); + } + + /** + * Return the ordered mapping from old PHPExcel class names to new PhpSpreadsheet one. + * + * @return string[] + */ + public function getMapping() + { + // Order matters here, we should have the deepest namespaces first (the most "unique" strings) + $classes = [ + 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE\Blip::class, + 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer\SpContainer::class, + 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE::class, + 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer::class, + 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer::class, + 'PHPExcel_Shared_OLE_PPS_File' => \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::class, + 'PHPExcel_Shared_OLE_PPS_Root' => \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\Root::class, + 'PHPExcel_Worksheet_AutoFilter_Column_Rule' => \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::class, + 'PHPExcel_Writer_OpenDocument_Cell_Comment' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Cell\Comment::class, + 'PHPExcel_Calculation_Token_Stack' => \PhpOffice\PhpSpreadsheet\Calculation\Token\Stack::class, + 'PHPExcel_Chart_Renderer_jpgraph' => \PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class, + 'PHPExcel_Reader_Excel5_Escher' => \PhpOffice\PhpSpreadsheet\Reader\Xls\Escher::class, + 'PHPExcel_Reader_Excel5_MD5' => \PhpOffice\PhpSpreadsheet\Reader\Xls\MD5::class, + 'PHPExcel_Reader_Excel5_RC4' => \PhpOffice\PhpSpreadsheet\Reader\Xls\RC4::class, + 'PHPExcel_Reader_Excel2007_Chart' => \PhpOffice\PhpSpreadsheet\Reader\Xlsx\Chart::class, + 'PHPExcel_Reader_Excel2007_Theme' => \PhpOffice\PhpSpreadsheet\Reader\Xlsx\Theme::class, + 'PHPExcel_Shared_Escher_DgContainer' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer::class, + 'PHPExcel_Shared_Escher_DggContainer' => \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer::class, + 'CholeskyDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\CholeskyDecomposition::class, + 'EigenvalueDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\EigenvalueDecomposition::class, + 'PHPExcel_Shared_JAMA_LUDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\LUDecomposition::class, + 'PHPExcel_Shared_JAMA_Matrix' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix::class, + 'QRDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\QRDecomposition::class, + 'PHPExcel_Shared_JAMA_QRDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\QRDecomposition::class, + 'SingularValueDecomposition' => \PhpOffice\PhpSpreadsheet\Shared\JAMA\SingularValueDecomposition::class, + 'PHPExcel_Shared_OLE_ChainedBlockStream' => \PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream::class, + 'PHPExcel_Shared_OLE_PPS' => \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS::class, + 'PHPExcel_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\BestFit::class, + 'PHPExcel_Exponential_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\ExponentialBestFit::class, + 'PHPExcel_Linear_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\LinearBestFit::class, + 'PHPExcel_Logarithmic_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\LogarithmicBestFit::class, + 'polynomialBestFit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\PolynomialBestFit::class, + 'PHPExcel_Polynomial_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\PolynomialBestFit::class, + 'powerBestFit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\PowerBestFit::class, + 'PHPExcel_Power_Best_Fit' => \PhpOffice\PhpSpreadsheet\Shared\Trend\PowerBestFit::class, + 'trendClass' => \PhpOffice\PhpSpreadsheet\Shared\Trend\Trend::class, + 'PHPExcel_Worksheet_AutoFilter_Column' => \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::class, + 'PHPExcel_Worksheet_Drawing_Shadow' => \PhpOffice\PhpSpreadsheet\Worksheet\Drawing\Shadow::class, + 'PHPExcel_Writer_OpenDocument_Content' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Content::class, + 'PHPExcel_Writer_OpenDocument_Meta' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Meta::class, + 'PHPExcel_Writer_OpenDocument_MetaInf' => \PhpOffice\PhpSpreadsheet\Writer\Ods\MetaInf::class, + 'PHPExcel_Writer_OpenDocument_Mimetype' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Mimetype::class, + 'PHPExcel_Writer_OpenDocument_Settings' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Settings::class, + 'PHPExcel_Writer_OpenDocument_Styles' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Styles::class, + 'PHPExcel_Writer_OpenDocument_Thumbnails' => \PhpOffice\PhpSpreadsheet\Writer\Ods\Thumbnails::class, + 'PHPExcel_Writer_OpenDocument_WriterPart' => \PhpOffice\PhpSpreadsheet\Writer\Ods\WriterPart::class, + 'PHPExcel_Writer_PDF_Core' => \PhpOffice\PhpSpreadsheet\Writer\Pdf::class, + 'PHPExcel_Writer_PDF_DomPDF' => \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class, + 'PHPExcel_Writer_PDF_mPDF' => \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class, + 'PHPExcel_Writer_PDF_tcPDF' => \PhpOffice\PhpSpreadsheet\Writer\Pdf\Tcpdf::class, + 'PHPExcel_Writer_Excel5_BIFFwriter' => \PhpOffice\PhpSpreadsheet\Writer\Xls\BIFFwriter::class, + 'PHPExcel_Writer_Excel5_Escher' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Escher::class, + 'PHPExcel_Writer_Excel5_Font' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Font::class, + 'PHPExcel_Writer_Excel5_Parser' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser::class, + 'PHPExcel_Writer_Excel5_Workbook' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::class, + 'PHPExcel_Writer_Excel5_Worksheet' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Worksheet::class, + 'PHPExcel_Writer_Excel5_Xf' => \PhpOffice\PhpSpreadsheet\Writer\Xls\Xf::class, + 'PHPExcel_Writer_Excel2007_Chart' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Chart::class, + 'PHPExcel_Writer_Excel2007_Comments' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Comments::class, + 'PHPExcel_Writer_Excel2007_ContentTypes' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\ContentTypes::class, + 'PHPExcel_Writer_Excel2007_DocProps' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps::class, + 'PHPExcel_Writer_Excel2007_Drawing' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Drawing::class, + 'PHPExcel_Writer_Excel2007_Rels' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Rels::class, + 'PHPExcel_Writer_Excel2007_RelsRibbon' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\RelsRibbon::class, + 'PHPExcel_Writer_Excel2007_RelsVBA' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\RelsVBA::class, + 'PHPExcel_Writer_Excel2007_StringTable' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\StringTable::class, + 'PHPExcel_Writer_Excel2007_Style' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Style::class, + 'PHPExcel_Writer_Excel2007_Theme' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Theme::class, + 'PHPExcel_Writer_Excel2007_Workbook' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook::class, + 'PHPExcel_Writer_Excel2007_Worksheet' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet::class, + 'PHPExcel_Writer_Excel2007_WriterPart' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart::class, + 'PHPExcel_CachedObjectStorage_CacheBase' => \PhpOffice\PhpSpreadsheet\Collection\Cells::class, + 'PHPExcel_CalcEngine_CyclicReferenceStack' => \PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack::class, + 'PHPExcel_CalcEngine_Logger' => \PhpOffice\PhpSpreadsheet\Calculation\Engine\Logger::class, + 'PHPExcel_Calculation_Functions' => \PhpOffice\PhpSpreadsheet\Calculation\Functions::class, + 'PHPExcel_Calculation_Function' => \PhpOffice\PhpSpreadsheet\Calculation\Category::class, + 'PHPExcel_Calculation_Database' => \PhpOffice\PhpSpreadsheet\Calculation\Database::class, + 'PHPExcel_Calculation_DateTime' => \PhpOffice\PhpSpreadsheet\Calculation\DateTime::class, + 'PHPExcel_Calculation_Engineering' => \PhpOffice\PhpSpreadsheet\Calculation\Engineering::class, + 'PHPExcel_Calculation_Exception' => \PhpOffice\PhpSpreadsheet\Calculation\Exception::class, + 'PHPExcel_Calculation_ExceptionHandler' => \PhpOffice\PhpSpreadsheet\Calculation\ExceptionHandler::class, + 'PHPExcel_Calculation_Financial' => \PhpOffice\PhpSpreadsheet\Calculation\Financial::class, + 'PHPExcel_Calculation_FormulaParser' => \PhpOffice\PhpSpreadsheet\Calculation\FormulaParser::class, + 'PHPExcel_Calculation_FormulaToken' => \PhpOffice\PhpSpreadsheet\Calculation\FormulaToken::class, + 'PHPExcel_Calculation_Logical' => \PhpOffice\PhpSpreadsheet\Calculation\Logical::class, + 'PHPExcel_Calculation_LookupRef' => \PhpOffice\PhpSpreadsheet\Calculation\LookupRef::class, + 'PHPExcel_Calculation_MathTrig' => \PhpOffice\PhpSpreadsheet\Calculation\MathTrig::class, + 'PHPExcel_Calculation_Statistical' => \PhpOffice\PhpSpreadsheet\Calculation\Statistical::class, + 'PHPExcel_Calculation_TextData' => \PhpOffice\PhpSpreadsheet\Calculation\TextData::class, + 'PHPExcel_Cell_AdvancedValueBinder' => \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class, + 'PHPExcel_Cell_DataType' => \PhpOffice\PhpSpreadsheet\Cell\DataType::class, + 'PHPExcel_Cell_DataValidation' => \PhpOffice\PhpSpreadsheet\Cell\DataValidation::class, + 'PHPExcel_Cell_DefaultValueBinder' => \PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder::class, + 'PHPExcel_Cell_Hyperlink' => \PhpOffice\PhpSpreadsheet\Cell\Hyperlink::class, + 'PHPExcel_Cell_IValueBinder' => \PhpOffice\PhpSpreadsheet\Cell\IValueBinder::class, + 'PHPExcel_Chart_Axis' => \PhpOffice\PhpSpreadsheet\Chart\Axis::class, + 'PHPExcel_Chart_DataSeries' => \PhpOffice\PhpSpreadsheet\Chart\DataSeries::class, + 'PHPExcel_Chart_DataSeriesValues' => \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues::class, + 'PHPExcel_Chart_Exception' => \PhpOffice\PhpSpreadsheet\Chart\Exception::class, + 'PHPExcel_Chart_GridLines' => \PhpOffice\PhpSpreadsheet\Chart\GridLines::class, + 'PHPExcel_Chart_Layout' => \PhpOffice\PhpSpreadsheet\Chart\Layout::class, + 'PHPExcel_Chart_Legend' => \PhpOffice\PhpSpreadsheet\Chart\Legend::class, + 'PHPExcel_Chart_PlotArea' => \PhpOffice\PhpSpreadsheet\Chart\PlotArea::class, + 'PHPExcel_Properties' => \PhpOffice\PhpSpreadsheet\Chart\Properties::class, + 'PHPExcel_Chart_Title' => \PhpOffice\PhpSpreadsheet\Chart\Title::class, + 'PHPExcel_DocumentProperties' => \PhpOffice\PhpSpreadsheet\Document\Properties::class, + 'PHPExcel_DocumentSecurity' => \PhpOffice\PhpSpreadsheet\Document\Security::class, + 'PHPExcel_Helper_HTML' => \PhpOffice\PhpSpreadsheet\Helper\Html::class, + 'PHPExcel_Reader_Abstract' => \PhpOffice\PhpSpreadsheet\Reader\BaseReader::class, + 'PHPExcel_Reader_CSV' => \PhpOffice\PhpSpreadsheet\Reader\Csv::class, + 'PHPExcel_Reader_DefaultReadFilter' => \PhpOffice\PhpSpreadsheet\Reader\DefaultReadFilter::class, + 'PHPExcel_Reader_Excel2003XML' => \PhpOffice\PhpSpreadsheet\Reader\Xml::class, + 'PHPExcel_Reader_Exception' => \PhpOffice\PhpSpreadsheet\Reader\Exception::class, + 'PHPExcel_Reader_Gnumeric' => \PhpOffice\PhpSpreadsheet\Reader\Gnumeric::class, + 'PHPExcel_Reader_HTML' => \PhpOffice\PhpSpreadsheet\Reader\Html::class, + 'PHPExcel_Reader_IReadFilter' => \PhpOffice\PhpSpreadsheet\Reader\IReadFilter::class, + 'PHPExcel_Reader_IReader' => \PhpOffice\PhpSpreadsheet\Reader\IReader::class, + 'PHPExcel_Reader_OOCalc' => \PhpOffice\PhpSpreadsheet\Reader\Ods::class, + 'PHPExcel_Reader_SYLK' => \PhpOffice\PhpSpreadsheet\Reader\Slk::class, + 'PHPExcel_Reader_Excel5' => \PhpOffice\PhpSpreadsheet\Reader\Xls::class, + 'PHPExcel_Reader_Excel2007' => \PhpOffice\PhpSpreadsheet\Reader\Xlsx::class, + 'PHPExcel_RichText_ITextElement' => \PhpOffice\PhpSpreadsheet\RichText\ITextElement::class, + 'PHPExcel_RichText_Run' => \PhpOffice\PhpSpreadsheet\RichText\Run::class, + 'PHPExcel_RichText_TextElement' => \PhpOffice\PhpSpreadsheet\RichText\TextElement::class, + 'PHPExcel_Shared_CodePage' => \PhpOffice\PhpSpreadsheet\Shared\CodePage::class, + 'PHPExcel_Shared_Date' => \PhpOffice\PhpSpreadsheet\Shared\Date::class, + 'PHPExcel_Shared_Drawing' => \PhpOffice\PhpSpreadsheet\Shared\Drawing::class, + 'PHPExcel_Shared_Escher' => \PhpOffice\PhpSpreadsheet\Shared\Escher::class, + 'PHPExcel_Shared_File' => \PhpOffice\PhpSpreadsheet\Shared\File::class, + 'PHPExcel_Shared_Font' => \PhpOffice\PhpSpreadsheet\Shared\Font::class, + 'PHPExcel_Shared_OLE' => \PhpOffice\PhpSpreadsheet\Shared\OLE::class, + 'PHPExcel_Shared_OLERead' => \PhpOffice\PhpSpreadsheet\Shared\OLERead::class, + 'PHPExcel_Shared_PasswordHasher' => \PhpOffice\PhpSpreadsheet\Shared\PasswordHasher::class, + 'PHPExcel_Shared_String' => \PhpOffice\PhpSpreadsheet\Shared\StringHelper::class, + 'PHPExcel_Shared_TimeZone' => \PhpOffice\PhpSpreadsheet\Shared\TimeZone::class, + 'PHPExcel_Shared_XMLWriter' => \PhpOffice\PhpSpreadsheet\Shared\XMLWriter::class, + 'PHPExcel_Shared_Excel5' => \PhpOffice\PhpSpreadsheet\Shared\Xls::class, + 'PHPExcel_Style_Alignment' => \PhpOffice\PhpSpreadsheet\Style\Alignment::class, + 'PHPExcel_Style_Border' => \PhpOffice\PhpSpreadsheet\Style\Border::class, + 'PHPExcel_Style_Borders' => \PhpOffice\PhpSpreadsheet\Style\Borders::class, + 'PHPExcel_Style_Color' => \PhpOffice\PhpSpreadsheet\Style\Color::class, + 'PHPExcel_Style_Conditional' => \PhpOffice\PhpSpreadsheet\Style\Conditional::class, + 'PHPExcel_Style_Fill' => \PhpOffice\PhpSpreadsheet\Style\Fill::class, + 'PHPExcel_Style_Font' => \PhpOffice\PhpSpreadsheet\Style\Font::class, + 'PHPExcel_Style_NumberFormat' => \PhpOffice\PhpSpreadsheet\Style\NumberFormat::class, + 'PHPExcel_Style_Protection' => \PhpOffice\PhpSpreadsheet\Style\Protection::class, + 'PHPExcel_Style_Supervisor' => \PhpOffice\PhpSpreadsheet\Style\Supervisor::class, + 'PHPExcel_Worksheet_AutoFilter' => \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter::class, + 'PHPExcel_Worksheet_BaseDrawing' => \PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::class, + 'PHPExcel_Worksheet_CellIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\CellIterator::class, + 'PHPExcel_Worksheet_Column' => \PhpOffice\PhpSpreadsheet\Worksheet\Column::class, + 'PHPExcel_Worksheet_ColumnCellIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\ColumnCellIterator::class, + 'PHPExcel_Worksheet_ColumnDimension' => \PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension::class, + 'PHPExcel_Worksheet_ColumnIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\ColumnIterator::class, + 'PHPExcel_Worksheet_Drawing' => \PhpOffice\PhpSpreadsheet\Worksheet\Drawing::class, + 'PHPExcel_Worksheet_HeaderFooter' => \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter::class, + 'PHPExcel_Worksheet_HeaderFooterDrawing' => \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing::class, + 'PHPExcel_WorksheetIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\Iterator::class, + 'PHPExcel_Worksheet_MemoryDrawing' => \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing::class, + 'PHPExcel_Worksheet_PageMargins' => \PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::class, + 'PHPExcel_Worksheet_PageSetup' => \PhpOffice\PhpSpreadsheet\Worksheet\PageSetup::class, + 'PHPExcel_Worksheet_Protection' => \PhpOffice\PhpSpreadsheet\Worksheet\Protection::class, + 'PHPExcel_Worksheet_Row' => \PhpOffice\PhpSpreadsheet\Worksheet\Row::class, + 'PHPExcel_Worksheet_RowCellIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator::class, + 'PHPExcel_Worksheet_RowDimension' => \PhpOffice\PhpSpreadsheet\Worksheet\RowDimension::class, + 'PHPExcel_Worksheet_RowIterator' => \PhpOffice\PhpSpreadsheet\Worksheet\RowIterator::class, + 'PHPExcel_Worksheet_SheetView' => \PhpOffice\PhpSpreadsheet\Worksheet\SheetView::class, + 'PHPExcel_Writer_Abstract' => \PhpOffice\PhpSpreadsheet\Writer\BaseWriter::class, + 'PHPExcel_Writer_CSV' => \PhpOffice\PhpSpreadsheet\Writer\Csv::class, + 'PHPExcel_Writer_Exception' => \PhpOffice\PhpSpreadsheet\Writer\Exception::class, + 'PHPExcel_Writer_HTML' => \PhpOffice\PhpSpreadsheet\Writer\Html::class, + 'PHPExcel_Writer_IWriter' => \PhpOffice\PhpSpreadsheet\Writer\IWriter::class, + 'PHPExcel_Writer_OpenDocument' => \PhpOffice\PhpSpreadsheet\Writer\Ods::class, + 'PHPExcel_Writer_PDF' => \PhpOffice\PhpSpreadsheet\Writer\Pdf::class, + 'PHPExcel_Writer_Excel5' => \PhpOffice\PhpSpreadsheet\Writer\Xls::class, + 'PHPExcel_Writer_Excel2007' => \PhpOffice\PhpSpreadsheet\Writer\Xlsx::class, + 'PHPExcel_CachedObjectStorageFactory' => \PhpOffice\PhpSpreadsheet\Collection\CellsFactory::class, + 'PHPExcel_Calculation' => \PhpOffice\PhpSpreadsheet\Calculation\Calculation::class, + 'PHPExcel_Cell' => \PhpOffice\PhpSpreadsheet\Cell\Cell::class, + 'PHPExcel_Chart' => \PhpOffice\PhpSpreadsheet\Chart\Chart::class, + 'PHPExcel_Comment' => \PhpOffice\PhpSpreadsheet\Comment::class, + 'PHPExcel_Exception' => \PhpOffice\PhpSpreadsheet\Exception::class, + 'PHPExcel_HashTable' => \PhpOffice\PhpSpreadsheet\HashTable::class, + 'PHPExcel_IComparable' => \PhpOffice\PhpSpreadsheet\IComparable::class, + 'PHPExcel_IOFactory' => \PhpOffice\PhpSpreadsheet\IOFactory::class, + 'PHPExcel_NamedRange' => \PhpOffice\PhpSpreadsheet\NamedRange::class, + 'PHPExcel_ReferenceHelper' => \PhpOffice\PhpSpreadsheet\ReferenceHelper::class, + 'PHPExcel_RichText' => \PhpOffice\PhpSpreadsheet\RichText\RichText::class, + 'PHPExcel_Settings' => \PhpOffice\PhpSpreadsheet\Settings::class, + 'PHPExcel_Style' => \PhpOffice\PhpSpreadsheet\Style\Style::class, + 'PHPExcel_Worksheet' => \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::class, + ]; + + $methods = [ + 'MINUTEOFHOUR' => 'MINUTE', + 'SECONDOFMINUTE' => 'SECOND', + 'DAYOFWEEK' => 'WEEKDAY', + 'WEEKOFYEAR' => 'WEEKNUM', + 'ExcelToPHPObject' => 'excelToDateTimeObject', + 'ExcelToPHP' => 'excelToTimestamp', + 'FormattedPHPToExcel' => 'formattedPHPToExcel', + 'Cell::absoluteCoordinate' => 'Coordinate::absoluteCoordinate', + 'Cell::absoluteReference' => 'Coordinate::absoluteReference', + 'Cell::buildRange' => 'Coordinate::buildRange', + 'Cell::columnIndexFromString' => 'Coordinate::columnIndexFromString', + 'Cell::coordinateFromString' => 'Coordinate::coordinateFromString', + 'Cell::extractAllCellReferencesInRange' => 'Coordinate::extractAllCellReferencesInRange', + 'Cell::getRangeBoundaries' => 'Coordinate::getRangeBoundaries', + 'Cell::mergeRangesInCollection' => 'Coordinate::mergeRangesInCollection', + 'Cell::rangeBoundaries' => 'Coordinate::rangeBoundaries', + 'Cell::rangeDimension' => 'Coordinate::rangeDimension', + 'Cell::splitRange' => 'Coordinate::splitRange', + 'Cell::stringFromColumnIndex' => 'Coordinate::stringFromColumnIndex', + ]; + + // Keep '\' prefix for class names + $prefixedClasses = []; + foreach ($classes as $key => &$value) { + $value = str_replace('PhpOffice\\', '\\PhpOffice\\', $value); + $prefixedClasses['\\' . $key] = $value; + } + $mapping = $prefixedClasses + $classes + $methods; + + return $mapping; + } + + /** + * Search in all files in given directory. + * + * @param string $path + */ + private function recursiveReplace($path) + { + $patterns = [ + '/*.md', + '/*.txt', + '/*.TXT', + '/*.php', + '/*.phpt', + '/*.php3', + '/*.php4', + '/*.php5', + '/*.phtml', + ]; + + foreach ($patterns as $pattern) { + foreach (glob($path . $pattern) as $file) { + if (strpos($path, '/vendor/') !== false) { + echo $file . " skipped\n"; + + continue; + } + $original = file_get_contents($file); + $converted = $this->replace($original); + + if ($original !== $converted) { + echo $file . " converted\n"; + file_put_contents($file, $converted); + } + } + } + + // Do the recursion in subdirectory + foreach (glob($path . '/*', GLOB_ONLYDIR) as $subpath) { + if (strpos($subpath, $path . '/') === 0) { + $this->recursiveReplace($subpath); + } + } + } + + public function migrate() + { + $path = realpath(getcwd()); + echo 'This will search and replace recursively in ' . $path . PHP_EOL; + echo 'You MUST backup your files first, or you risk losing data.' . PHP_EOL; + echo 'Are you sure ? (y/n)'; + + $confirm = fread(STDIN, 1); + if ($confirm === 'y') { + $this->recursiveReplace($path); + } + } + + /** + * Migrate the given code from PHPExcel to PhpSpreadsheet. + * + * @param string $original + * + * @return string + */ + public function replace($original) + { + $converted = str_replace($this->from, $this->to, $original); + + // The string "PHPExcel" gets special treatment because of how common it might be. + // This regex requires a word boundary around the string, and it can't be + // preceded by $ or -> (goal is to filter out cases where a variable is named $PHPExcel or similar) + $converted = preg_replace('~(?)(\b|\\\\)PHPExcel\b~', '\\' . \PhpOffice\PhpSpreadsheet\Spreadsheet::class, $converted); + + return $converted; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php new file mode 100755 index 0000000..e199c80 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php @@ -0,0 +1,230 @@ +getScriptFilename() === 'index'; + } + + /** + * Return the page title. + * + * @return string + */ + public function getPageTitle() + { + return $this->isIndex() ? 'PHPSpreadsheet' : $this->getScriptFilename(); + } + + /** + * Return the page heading. + * + * @return string + */ + public function getPageHeading() + { + return $this->isIndex() ? '' : '

' . str_replace('_', ' ', $this->getScriptFilename()) . '

'; + } + + /** + * Returns an array of all known samples. + * + * @return string[] [$name => $path] + */ + public function getSamples() + { + // Populate samples + $baseDir = realpath(__DIR__ . '/../../../samples'); + $directory = new RecursiveDirectoryIterator($baseDir); + $iterator = new RecursiveIteratorIterator($directory); + $regex = new RegexIterator($iterator, '/^.+\.php$/', RecursiveRegexIterator::GET_MATCH); + + $files = []; + foreach ($regex as $file) { + $file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0])); + $info = pathinfo($file); + $category = str_replace('_', ' ', $info['dirname']); + $name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename'])); + if (!in_array($category, ['.', 'boostrap', 'templates'])) { + if (!isset($files[$category])) { + $files[$category] = []; + } + $files[$category][$name] = $file; + } + } + + // Sort everything + ksort($files); + foreach ($files as &$f) { + asort($f); + } + + return $files; + } + + /** + * Write documents. + * + * @param Spreadsheet $spreadsheet + * @param string $filename + * @param string[] $writers + */ + public function write(Spreadsheet $spreadsheet, $filename, array $writers = ['Xlsx', 'Xls']) + { + // Set active sheet index to the first sheet, so Excel opens this as the first sheet + $spreadsheet->setActiveSheetIndex(0); + + // Write documents + foreach ($writers as $writerType) { + $path = $this->getFilename($filename, mb_strtolower($writerType)); + $writer = IOFactory::createWriter($spreadsheet, $writerType); + if ($writer instanceof Pdf) { + // PDF writer needs temporary directory + $tempDir = $this->getTemporaryFolder(); + $writer->setTempDir($tempDir); + } + $callStartTime = microtime(true); + $writer->save($path); + $this->logWrite($writer, $path, $callStartTime); + } + + $this->logEndingNotes(); + } + + /** + * Returns the temporary directory and make sure it exists. + * + * @return string + */ + private function getTemporaryFolder() + { + $tempFolder = sys_get_temp_dir() . '/phpspreadsheet'; + if (!is_dir($tempFolder)) { + if (!mkdir($tempFolder) && !is_dir($tempFolder)) { + throw new \RuntimeException(sprintf('Directory "%s" was not created', $tempFolder)); + } + } + + return $tempFolder; + } + + /** + * Returns the filename that should be used for sample output. + * + * @param string $filename + * @param string $extension + * + * @return string + */ + public function getFilename($filename, $extension = 'xlsx') + { + $originalExtension = pathinfo($filename, PATHINFO_EXTENSION); + + return $this->getTemporaryFolder() . '/' . str_replace('.' . $originalExtension, '.' . $extension, basename($filename)); + } + + /** + * Return a random temporary file name. + * + * @param string $extension + * + * @return string + */ + public function getTemporaryFilename($extension = 'xlsx') + { + $temporaryFilename = tempnam($this->getTemporaryFolder(), 'phpspreadsheet-'); + unlink($temporaryFilename); + + return $temporaryFilename . '.' . $extension; + } + + public function log($message) + { + $eol = $this->isCli() ? PHP_EOL : '
'; + echo date('H:i:s ') . $message . $eol; + } + + /** + * Log ending notes. + */ + public function logEndingNotes() + { + // Do not show execution time for index + $this->log('Peak memory usage: ' . (memory_get_peak_usage(true) / 1024 / 1024) . 'MB'); + } + + /** + * Log a line about the write operation. + * + * @param IWriter $writer + * @param string $path + * @param float $callStartTime + */ + public function logWrite(IWriter $writer, $path, $callStartTime) + { + $callEndTime = microtime(true); + $callTime = $callEndTime - $callStartTime; + $reflection = new ReflectionClass($writer); + $format = $reflection->getShortName(); + $message = "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; + + $this->log($message); + } + + /** + * Log a line about the read operation. + * + * @param string $format + * @param string $path + * @param float $callStartTime + */ + public function logRead($format, $path, $callStartTime) + { + $callEndTime = microtime(true); + $callTime = $callEndTime - $callStartTime; + $message = "Read {$format} format from {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; + + $this->log($message); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IComparable.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IComparable.php new file mode 100755 index 0000000..c215847 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IComparable.php @@ -0,0 +1,13 @@ + Reader\Xlsx::class, + 'Xls' => Reader\Xls::class, + 'Xml' => Reader\Xml::class, + 'Ods' => Reader\Ods::class, + 'Slk' => Reader\Slk::class, + 'Gnumeric' => Reader\Gnumeric::class, + 'Html' => Reader\Html::class, + 'Csv' => Reader\Csv::class, + ]; + + private static $writers = [ + 'Xls' => Writer\Xls::class, + 'Xlsx' => Writer\Xlsx::class, + 'Ods' => Writer\Ods::class, + 'Csv' => Writer\Csv::class, + 'Html' => Writer\Html::class, + 'Tcpdf' => Writer\Pdf\Tcpdf::class, + 'Dompdf' => Writer\Pdf\Dompdf::class, + 'Mpdf' => Writer\Pdf\Mpdf::class, + ]; + + /** + * Create Writer\IWriter. + * + * @param Spreadsheet $spreadsheet + * @param string $writerType Example: Xlsx + * + * @throws Writer\Exception + * + * @return Writer\IWriter + */ + public static function createWriter(Spreadsheet $spreadsheet, $writerType) + { + if (!isset(self::$writers[$writerType])) { + throw new Writer\Exception("No writer found for type $writerType"); + } + + // Instantiate writer + $className = self::$writers[$writerType]; + $writer = new $className($spreadsheet); + + return $writer; + } + + /** + * Create Reader\IReader. + * + * @param string $readerType Example: Xlsx + * + * @throws Reader\Exception + * + * @return Reader\IReader + */ + public static function createReader($readerType) + { + if (!isset(self::$readers[$readerType])) { + throw new Reader\Exception("No reader found for type $readerType"); + } + + // Instantiate reader + $className = self::$readers[$readerType]; + $reader = new $className(); + + return $reader; + } + + /** + * Loads Spreadsheet from file using automatic Reader\IReader resolution. + * + * @param string $pFilename The name of the spreadsheet file + * + * @throws Reader\Exception + * + * @return Spreadsheet + */ + public static function load($pFilename) + { + $reader = self::createReaderForFile($pFilename); + + return $reader->load($pFilename); + } + + /** + * Identify file type using automatic Reader\IReader resolution. + * + * @param string $pFilename The name of the spreadsheet file to identify + * + * @throws Reader\Exception + * + * @return string + */ + public static function identify($pFilename) + { + $reader = self::createReaderForFile($pFilename); + $className = get_class($reader); + $classType = explode('\\', $className); + unset($reader); + + return array_pop($classType); + } + + /** + * Create Reader\IReader for file using automatic Reader\IReader resolution. + * + * @param string $filename The name of the spreadsheet file + * + * @throws Reader\Exception + * + * @return Reader\IReader + */ + public static function createReaderForFile($filename) + { + File::assertFile($filename); + + // First, lucky guess by inspecting file extension + $guessedReader = self::getReaderTypeFromExtension($filename); + if ($guessedReader !== null) { + $reader = self::createReader($guessedReader); + + // Let's see if we are lucky + if (isset($reader) && $reader->canRead($filename)) { + return $reader; + } + } + + // If we reach here then "lucky guess" didn't give any result + // Try walking through all the options in self::$autoResolveClasses + foreach (self::$readers as $type => $class) { + // Ignore our original guess, we know that won't work + if ($type !== $guessedReader) { + $reader = self::createReader($type); + if ($reader->canRead($filename)) { + return $reader; + } + } + } + + throw new Reader\Exception('Unable to identify a reader for this file'); + } + + /** + * Guess a reader type from the file extension, if any. + * + * @param string $filename + * + * @return null|string + */ + private static function getReaderTypeFromExtension($filename) + { + $pathinfo = pathinfo($filename); + if (!isset($pathinfo['extension'])) { + return null; + } + + switch (strtolower($pathinfo['extension'])) { + case 'xlsx': // Excel (OfficeOpenXML) Spreadsheet + case 'xlsm': // Excel (OfficeOpenXML) Macro Spreadsheet (macros will be discarded) + case 'xltx': // Excel (OfficeOpenXML) Template + case 'xltm': // Excel (OfficeOpenXML) Macro Template (macros will be discarded) + return 'Xlsx'; + case 'xls': // Excel (BIFF) Spreadsheet + case 'xlt': // Excel (BIFF) Template + return 'Xls'; + case 'ods': // Open/Libre Offic Calc + case 'ots': // Open/Libre Offic Calc Template + return 'Ods'; + case 'slk': + return 'Slk'; + case 'xml': // Excel 2003 SpreadSheetML + return 'Xml'; + case 'gnumeric': + return 'Gnumeric'; + case 'htm': + case 'html': + return 'Html'; + case 'csv': + // Do nothing + // We must not try to use CSV reader since it loads + // all files including Excel files etc. + return null; + default: + return null; + } + } + + /** + * Register a writer with its type and class name. + * + * @param string $writerType + * @param string $writerClass + */ + public static function registerWriter($writerType, $writerClass) + { + if (!is_a($writerClass, Writer\IWriter::class, true)) { + throw new Writer\Exception('Registered writers must implement ' . Writer\IWriter::class); + } + + self::$writers[$writerType] = $writerClass; + } + + /** + * Register a reader with its type and class name. + * + * @param string $readerType + * @param string $readerClass + */ + public static function registerReader($readerType, $readerClass) + { + if (!is_a($readerClass, Reader\IReader::class, true)) { + throw new Reader\Exception('Registered readers must implement ' . Reader\IReader::class); + } + + self::$readers[$readerType] = $readerClass; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedRange.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedRange.php new file mode 100755 index 0000000..1f94d5a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedRange.php @@ -0,0 +1,240 @@ +worksheet). + * + * @var bool + */ + private $localOnly; + + /** + * Scope. + * + * @var Worksheet + */ + private $scope; + + /** + * Create a new NamedRange. + * + * @param string $pName + * @param Worksheet $pWorksheet + * @param string $pRange + * @param bool $pLocalOnly + * @param null|Worksheet $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope. + * + * @throws Exception + */ + public function __construct($pName, Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null) + { + // Validate data + if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) { + throw new Exception('Parameters can not be null.'); + } + + // Set local members + $this->name = $pName; + $this->worksheet = $pWorksheet; + $this->range = $pRange; + $this->localOnly = $pLocalOnly; + $this->scope = ($pLocalOnly == true) ? (($pScope == null) ? $pWorksheet : $pScope) : null; + } + + /** + * Get name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set name. + * + * @param string $value + * + * @return NamedRange + */ + public function setName($value) + { + if ($value !== null) { + // Old title + $oldTitle = $this->name; + + // Re-attach + if ($this->worksheet !== null) { + $this->worksheet->getParent()->removeNamedRange($this->name, $this->worksheet); + } + $this->name = $value; + + if ($this->worksheet !== null) { + $this->worksheet->getParent()->addNamedRange($this); + } + + // New title + $newTitle = $this->name; + ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle); + } + + return $this; + } + + /** + * Get worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set worksheet. + * + * @param Worksheet $value + * + * @return NamedRange + */ + public function setWorksheet(Worksheet $value = null) + { + if ($value !== null) { + $this->worksheet = $value; + } + + return $this; + } + + /** + * Get range. + * + * @return string + */ + public function getRange() + { + return $this->range; + } + + /** + * Set range. + * + * @param string $value + * + * @return NamedRange + */ + public function setRange($value) + { + if ($value !== null) { + $this->range = $value; + } + + return $this; + } + + /** + * Get localOnly. + * + * @return bool + */ + public function getLocalOnly() + { + return $this->localOnly; + } + + /** + * Set localOnly. + * + * @param bool $value + * + * @return NamedRange + */ + public function setLocalOnly($value) + { + $this->localOnly = $value; + $this->scope = $value ? $this->worksheet : null; + + return $this; + } + + /** + * Get scope. + * + * @return null|Worksheet + */ + public function getScope() + { + return $this->scope; + } + + /** + * Set scope. + * + * @param null|Worksheet $value + * + * @return NamedRange + */ + public function setScope(Worksheet $value = null) + { + $this->scope = $value; + $this->localOnly = $value != null; + + return $this; + } + + /** + * Resolve a named range to a regular cell range. + * + * @param string $pNamedRange Named range + * @param null|Worksheet $pSheet Scope. Use null for global scope + * + * @return NamedRange + */ + public static function resolveRange($pNamedRange, Worksheet $pSheet) + { + return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php new file mode 100755 index 0000000..f7af155 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/BaseReader.php @@ -0,0 +1,160 @@ +readFilter = new DefaultReadFilter(); + } + + public function getReadDataOnly() + { + return $this->readDataOnly; + } + + public function setReadDataOnly($pValue) + { + $this->readDataOnly = (bool) $pValue; + + return $this; + } + + public function getReadEmptyCells() + { + return $this->readEmptyCells; + } + + public function setReadEmptyCells($pValue) + { + $this->readEmptyCells = (bool) $pValue; + + return $this; + } + + public function getIncludeCharts() + { + return $this->includeCharts; + } + + public function setIncludeCharts($pValue) + { + $this->includeCharts = (bool) $pValue; + + return $this; + } + + public function getLoadSheetsOnly() + { + return $this->loadSheetsOnly; + } + + public function setLoadSheetsOnly($value) + { + if ($value === null) { + return $this->setLoadAllSheets(); + } + + $this->loadSheetsOnly = is_array($value) ? $value : [$value]; + + return $this; + } + + public function setLoadAllSheets() + { + $this->loadSheetsOnly = null; + + return $this; + } + + public function getReadFilter() + { + return $this->readFilter; + } + + public function setReadFilter(IReadFilter $pValue) + { + $this->readFilter = $pValue; + + return $this; + } + + public function getSecurityScanner() + { + if (property_exists($this, 'securityScanner')) { + return $this->securityScanner; + } + + return null; + } + + /** + * Open file for reading. + * + * @param string $pFilename + * + * @throws Exception + */ + protected function openFile($pFilename) + { + File::assertFile($pFilename); + + // Open file + $this->fileHandle = fopen($pFilename, 'r'); + if ($this->fileHandle === false) { + throw new Exception('Could not open file ' . $pFilename . ' for reading.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php new file mode 100755 index 0000000..81ca1a8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv.php @@ -0,0 +1,564 @@ +inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @return string + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + /** + * Move filepointer past any BOM marker. + */ + protected function skipBOM() + { + rewind($this->fileHandle); + + switch ($this->inputEncoding) { + case 'UTF-8': + fgets($this->fileHandle, 4) == "\xEF\xBB\xBF" ? + fseek($this->fileHandle, 3) : fseek($this->fileHandle, 0); + + break; + case 'UTF-16LE': + fgets($this->fileHandle, 3) == "\xFF\xFE" ? + fseek($this->fileHandle, 2) : fseek($this->fileHandle, 0); + + break; + case 'UTF-16BE': + fgets($this->fileHandle, 3) == "\xFE\xFF" ? + fseek($this->fileHandle, 2) : fseek($this->fileHandle, 0); + + break; + case 'UTF-32LE': + fgets($this->fileHandle, 5) == "\xFF\xFE\x00\x00" ? + fseek($this->fileHandle, 4) : fseek($this->fileHandle, 0); + + break; + case 'UTF-32BE': + fgets($this->fileHandle, 5) == "\x00\x00\xFE\xFF" ? + fseek($this->fileHandle, 4) : fseek($this->fileHandle, 0); + + break; + default: + break; + } + } + + /** + * Identify any separator that is explicitly set in the file. + */ + protected function checkSeparator() + { + $line = fgets($this->fileHandle); + if ($line === false) { + return; + } + + if ((strlen(trim($line, "\r\n")) == 5) && (stripos($line, 'sep=') === 0)) { + $this->delimiter = substr($line, 4, 1); + + return; + } + + $this->skipBOM(); + } + + /** + * Infer the separator if it isn't explicitly set in the file or specified by the user. + */ + protected function inferSeparator() + { + if ($this->delimiter !== null) { + return; + } + + $potentialDelimiters = [',', ';', "\t", '|', ':', ' ', '~']; + $counts = []; + foreach ($potentialDelimiters as $delimiter) { + $counts[$delimiter] = []; + } + + // Count how many times each of the potential delimiters appears in each line + $numberLines = 0; + while (($line = $this->getNextLine()) !== false && (++$numberLines < 1000)) { + $countLine = []; + for ($i = strlen($line) - 1; $i >= 0; --$i) { + $char = $line[$i]; + if (isset($counts[$char])) { + if (!isset($countLine[$char])) { + $countLine[$char] = 0; + } + ++$countLine[$char]; + } + } + foreach ($potentialDelimiters as $delimiter) { + $counts[$delimiter][] = isset($countLine[$delimiter]) + ? $countLine[$delimiter] + : 0; + } + } + + // If number of lines is 0, nothing to infer : fall back to the default + if ($numberLines === 0) { + $this->delimiter = reset($potentialDelimiters); + $this->skipBOM(); + + return; + } + + // Calculate the mean square deviations for each delimiter (ignoring delimiters that haven't been found consistently) + $meanSquareDeviations = []; + $middleIdx = floor(($numberLines - 1) / 2); + + foreach ($potentialDelimiters as $delimiter) { + $series = $counts[$delimiter]; + sort($series); + + $median = ($numberLines % 2) + ? $series[$middleIdx] + : ($series[$middleIdx] + $series[$middleIdx + 1]) / 2; + + if ($median === 0) { + continue; + } + + $meanSquareDeviations[$delimiter] = array_reduce( + $series, + function ($sum, $value) use ($median) { + return $sum + pow($value - $median, 2); + } + ) / count($series); + } + + // ... and pick the delimiter with the smallest mean square deviation (in case of ties, the order in potentialDelimiters is respected) + $min = INF; + foreach ($potentialDelimiters as $delimiter) { + if (!isset($meanSquareDeviations[$delimiter])) { + continue; + } + + if ($meanSquareDeviations[$delimiter] < $min) { + $min = $meanSquareDeviations[$delimiter]; + $this->delimiter = $delimiter; + } + } + + // If no delimiter could be detected, fall back to the default + if ($this->delimiter === null) { + $this->delimiter = reset($potentialDelimiters); + } + + $this->skipBOM(); + } + + /** + * Get the next full line from the file. + * + * @param string $line + * + * @return bool|string + */ + private function getNextLine($line = '') + { + // Get the next line in the file + $newLine = fgets($this->fileHandle); + + // Return false if there is no next line + if ($newLine === false) { + return false; + } + + // Add the new line to the line passed in + $line = $line . $newLine; + + // Drop everything that is enclosed to avoid counting false positives in enclosures + $enclosure = '(?escapeCharacter, '/') . ')' + . preg_quote($this->enclosure, '/'); + $line = preg_replace('/(' . $enclosure . '.*' . $enclosure . ')/Us', '', $line); + + // See if we have any enclosures left in the line + // if we still have an enclosure then we need to read the next line as well + if (preg_match('/(' . $enclosure . ')/', $line) > 0) { + $line = $this->getNextLine($line); + } + + return $line; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + // Open file + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + + // Skip BOM, if any + $this->skipBOM(); + $this->checkSeparator(); + $this->inferSeparator(); + + $worksheetInfo = []; + $worksheetInfo[0]['worksheetName'] = 'Worksheet'; + $worksheetInfo[0]['lastColumnLetter'] = 'A'; + $worksheetInfo[0]['lastColumnIndex'] = 0; + $worksheetInfo[0]['totalRows'] = 0; + $worksheetInfo[0]['totalColumns'] = 0; + + // Loop through each line of the file in turn + while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure, $this->escapeCharacter)) !== false) { + ++$worksheetInfo[0]['totalRows']; + $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], count($rowData) - 1); + } + + $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1); + $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; + + // Close file + fclose($fileHandle); + + return $worksheetInfo; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + $lineEnding = ini_get('auto_detect_line_endings'); + ini_set('auto_detect_line_endings', true); + + // Open file + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + + // Skip BOM, if any + $this->skipBOM(); + $this->checkSeparator(); + $this->inferSeparator(); + + // Create new PhpSpreadsheet object + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $sheet = $spreadsheet->setActiveSheetIndex($this->sheetIndex); + + // Set our starting row based on whether we're in contiguous mode or not + $currentRow = 1; + if ($this->contiguous) { + $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow() : $this->contiguousRow; + } + + // Loop through each line of the file in turn + while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure, $this->escapeCharacter)) !== false) { + $columnLetter = 'A'; + foreach ($rowData as $rowDatum) { + if ($rowDatum != '' && $this->readFilter->readCell($columnLetter, $currentRow)) { + // Convert encoding if necessary + if ($this->inputEncoding !== 'UTF-8') { + $rowDatum = StringHelper::convertEncoding($rowDatum, 'UTF-8', $this->inputEncoding); + } + + // Set cell value + $sheet->getCell($columnLetter . $currentRow)->setValue($rowDatum); + } + ++$columnLetter; + } + ++$currentRow; + } + + // Close file + fclose($fileHandle); + + if ($this->contiguous) { + $this->contiguousRow = $currentRow; + } + + ini_set('auto_detect_line_endings', $lineEnding); + + // Return + return $spreadsheet; + } + + /** + * Get delimiter. + * + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Set delimiter. + * + * @param string $delimiter Delimiter, eg: ',' + * + * @return CSV + */ + public function setDelimiter($delimiter) + { + $this->delimiter = $delimiter; + + return $this; + } + + /** + * Get enclosure. + * + * @return string + */ + public function getEnclosure() + { + return $this->enclosure; + } + + /** + * Set enclosure. + * + * @param string $enclosure Enclosure, defaults to " + * + * @return CSV + */ + public function setEnclosure($enclosure) + { + if ($enclosure == '') { + $enclosure = '"'; + } + $this->enclosure = $enclosure; + + return $this; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return CSV + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Set Contiguous. + * + * @param bool $contiguous + * + * @return Csv + */ + public function setContiguous($contiguous) + { + $this->contiguous = (bool) $contiguous; + if (!$contiguous) { + $this->contiguousRow = -1; + } + + return $this; + } + + /** + * Get Contiguous. + * + * @return bool + */ + public function getContiguous() + { + return $this->contiguous; + } + + /** + * Set escape backslashes. + * + * @param string $escapeCharacter + * + * @return $this + */ + public function setEscapeCharacter($escapeCharacter) + { + $this->escapeCharacter = $escapeCharacter; + + return $this; + } + + /** + * Get escape backslashes. + * + * @return string + */ + public function getEscapeCharacter() + { + return $this->escapeCharacter; + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + // Check if file exists + try { + $this->openFile($pFilename); + } catch (Exception $e) { + return false; + } + + fclose($this->fileHandle); + + // Trust file extension if any + $extension = strtolower(pathinfo($pFilename, PATHINFO_EXTENSION)); + if (in_array($extension, ['csv', 'tsv'])) { + return true; + } + + // Attempt to guess mimetype + $type = mime_content_type($pFilename); + $supportedTypes = [ + 'text/csv', + 'text/plain', + 'inode/x-empty', + ]; + + return in_array($type, $supportedTypes, true); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php new file mode 100755 index 0000000..e104186 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php @@ -0,0 +1,20 @@ +referenceHelper = ReferenceHelper::getInstance(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @throws Exception + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + // Check if gzlib functions are available + if (!function_exists('gzread')) { + throw new Exception('gzlib library is not enabled'); + } + + // Read signature data (first 3 bytes) + $fh = fopen($pFilename, 'r'); + $data = fread($fh, 2); + fclose($fh); + + return $data == chr(0x1F) . chr(0x8B); + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $xml = new XMLReader(); + $xml->xml($this->securityScanner->scanFile('compress.zlib://' . realpath($pFilename)), null, Settings::getLibXmlLoaderOptions()); + $xml->setParserProperty(2, true); + + $worksheetNames = []; + while ($xml->read()) { + if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) { + $xml->read(); // Move onto the value node + $worksheetNames[] = (string) $xml->value; + } elseif ($xml->name == 'gnm:Sheets') { + // break out of the loop once we've got our sheet names rather than parse the entire file + break; + } + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $xml = new XMLReader(); + $xml->xml($this->securityScanner->scanFile('compress.zlib://' . realpath($pFilename)), null, Settings::getLibXmlLoaderOptions()); + $xml->setParserProperty(2, true); + + $worksheetInfo = []; + while ($xml->read()) { + if ($xml->name == 'gnm:Sheet' && $xml->nodeType == XMLReader::ELEMENT) { + $tmpInfo = [ + 'worksheetName' => '', + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + while ($xml->read()) { + if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) { + $xml->read(); // Move onto the value node + $tmpInfo['worksheetName'] = (string) $xml->value; + } elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) { + $xml->read(); // Move onto the value node + $tmpInfo['lastColumnIndex'] = (int) $xml->value; + $tmpInfo['totalColumns'] = (int) $xml->value + 1; + } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) { + $xml->read(); // Move onto the value node + $tmpInfo['totalRows'] = (int) $xml->value + 1; + + break; + } + } + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $worksheetInfo[] = $tmpInfo; + } + } + + return $worksheetInfo; + } + + /** + * @param string $filename + * + * @return string + */ + private function gzfileGetContents($filename) + { + $file = @gzopen($filename, 'rb'); + $data = ''; + if ($file !== false) { + while (!gzeof($file)) { + $data .= gzread($file, 1024); + } + gzclose($file); + } + + return $data; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads from file into Spreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + File::assertFile($pFilename); + + $gFileData = $this->gzfileGetContents($pFilename); + + $xml = simplexml_load_string($this->securityScanner->scan($gFileData), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions()); + $namespacesMeta = $xml->getNamespaces(true); + + $gnmXML = $xml->children($namespacesMeta['gnm']); + + $docProps = $spreadsheet->getProperties(); + // Document Properties are held differently, depending on the version of Gnumeric + if (isset($namespacesMeta['office'])) { + $officeXML = $xml->children($namespacesMeta['office']); + $officeDocXML = $officeXML->{'document-meta'}; + $officeDocMetaXML = $officeDocXML->meta; + + foreach ($officeDocMetaXML as $officePropertyData) { + $officePropertyDC = []; + if (isset($namespacesMeta['dc'])) { + $officePropertyDC = $officePropertyData->children($namespacesMeta['dc']); + } + foreach ($officePropertyDC as $propertyName => $propertyValue) { + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'title': + $docProps->setTitle(trim($propertyValue)); + + break; + case 'subject': + $docProps->setSubject(trim($propertyValue)); + + break; + case 'creator': + $docProps->setCreator(trim($propertyValue)); + $docProps->setLastModifiedBy(trim($propertyValue)); + + break; + case 'date': + $creationDate = strtotime(trim($propertyValue)); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'description': + $docProps->setDescription(trim($propertyValue)); + + break; + } + } + $officePropertyMeta = []; + if (isset($namespacesMeta['meta'])) { + $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); + } + foreach ($officePropertyMeta as $propertyName => $propertyValue) { + $attributes = $propertyValue->attributes($namespacesMeta['meta']); + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'keyword': + $docProps->setKeywords(trim($propertyValue)); + + break; + case 'initial-creator': + $docProps->setCreator(trim($propertyValue)); + $docProps->setLastModifiedBy(trim($propertyValue)); + + break; + case 'creation-date': + $creationDate = strtotime(trim($propertyValue)); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'user-defined': + list(, $attrName) = explode(':', $attributes['name']); + switch ($attrName) { + case 'publisher': + $docProps->setCompany(trim($propertyValue)); + + break; + case 'category': + $docProps->setCategory(trim($propertyValue)); + + break; + case 'manager': + $docProps->setManager(trim($propertyValue)); + + break; + } + + break; + } + } + } + } elseif (isset($gnmXML->Summary)) { + foreach ($gnmXML->Summary->Item as $summaryItem) { + $propertyName = $summaryItem->name; + $propertyValue = $summaryItem->{'val-string'}; + switch ($propertyName) { + case 'title': + $docProps->setTitle(trim($propertyValue)); + + break; + case 'comments': + $docProps->setDescription(trim($propertyValue)); + + break; + case 'keywords': + $docProps->setKeywords(trim($propertyValue)); + + break; + case 'category': + $docProps->setCategory(trim($propertyValue)); + + break; + case 'manager': + $docProps->setManager(trim($propertyValue)); + + break; + case 'author': + $docProps->setCreator(trim($propertyValue)); + $docProps->setLastModifiedBy(trim($propertyValue)); + + break; + case 'company': + $docProps->setCompany(trim($propertyValue)); + + break; + } + } + } + + $worksheetID = 0; + foreach ($gnmXML->Sheets->Sheet as $sheet) { + $worksheetName = (string) $sheet->Name; + if ((isset($this->loadSheetsOnly)) && (!in_array($worksheetName, $this->loadSheetsOnly))) { + continue; + } + + $maxRow = $maxCol = 0; + + // Create new Worksheet + $spreadsheet->createSheet(); + $spreadsheet->setActiveSheetIndex($worksheetID); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula + // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet + // name in line with the formula, not the reverse + $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + + if ((!$this->readDataOnly) && (isset($sheet->PrintInformation))) { + if (isset($sheet->PrintInformation->Margins)) { + foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) { + $marginAttributes = $margin->attributes(); + $marginSize = 72 / 100; // Default + switch ($marginAttributes['PrefUnit']) { + case 'mm': + $marginSize = (int) ($marginAttributes['Points']) / 100; + + break; + } + switch ($key) { + case 'top': + $spreadsheet->getActiveSheet()->getPageMargins()->setTop($marginSize); + + break; + case 'bottom': + $spreadsheet->getActiveSheet()->getPageMargins()->setBottom($marginSize); + + break; + case 'left': + $spreadsheet->getActiveSheet()->getPageMargins()->setLeft($marginSize); + + break; + case 'right': + $spreadsheet->getActiveSheet()->getPageMargins()->setRight($marginSize); + + break; + case 'header': + $spreadsheet->getActiveSheet()->getPageMargins()->setHeader($marginSize); + + break; + case 'footer': + $spreadsheet->getActiveSheet()->getPageMargins()->setFooter($marginSize); + + break; + } + } + } + } + + foreach ($sheet->Cells->Cell as $cell) { + $cellAttributes = $cell->attributes(); + $row = (int) $cellAttributes->Row + 1; + $column = (int) $cellAttributes->Col; + + if ($row > $maxRow) { + $maxRow = $row; + } + if ($column > $maxCol) { + $maxCol = $column; + } + + $column = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($column, $row, $worksheetName)) { + continue; + } + } + + $ValueType = $cellAttributes->ValueType; + $ExprID = (string) $cellAttributes->ExprID; + $type = DataType::TYPE_FORMULA; + if ($ExprID > '') { + if (((string) $cell) > '') { + $this->expressions[$ExprID] = [ + 'column' => $cellAttributes->Col, + 'row' => $cellAttributes->Row, + 'formula' => (string) $cell, + ]; + } else { + $expression = $this->expressions[$ExprID]; + + $cell = $this->referenceHelper->updateFormulaReferences( + $expression['formula'], + 'A1', + $cellAttributes->Col - $expression['column'], + $cellAttributes->Row - $expression['row'], + $worksheetName + ); + } + $type = DataType::TYPE_FORMULA; + } else { + switch ($ValueType) { + case '10': // NULL + $type = DataType::TYPE_NULL; + + break; + case '20': // Boolean + $type = DataType::TYPE_BOOL; + $cell = $cell == 'TRUE'; + + break; + case '30': // Integer + $cell = (int) $cell; + // Excel 2007+ doesn't differentiate between integer and float, so set the value and dropthru to the next (numeric) case + // no break + case '40': // Float + $type = DataType::TYPE_NUMERIC; + + break; + case '50': // Error + $type = DataType::TYPE_ERROR; + + break; + case '60': // String + $type = DataType::TYPE_STRING; + + break; + case '70': // Cell Range + case '80': // Array + } + } + $spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit($cell, $type); + } + + if ((!$this->readDataOnly) && (isset($sheet->Objects))) { + foreach ($sheet->Objects->children('gnm', true) as $key => $comment) { + $commentAttributes = $comment->attributes(); + // Only comment objects are handled at the moment + if ($commentAttributes->Text) { + $spreadsheet->getActiveSheet()->getComment((string) $commentAttributes->ObjectBound)->setAuthor((string) $commentAttributes->Author)->setText($this->parseRichText((string) $commentAttributes->Text)); + } + } + } + foreach ($sheet->Styles->StyleRegion as $styleRegion) { + $styleAttributes = $styleRegion->attributes(); + if (($styleAttributes['startRow'] <= $maxRow) && + ($styleAttributes['startCol'] <= $maxCol)) { + $startColumn = Coordinate::stringFromColumnIndex((int) $styleAttributes['startCol'] + 1); + $startRow = $styleAttributes['startRow'] + 1; + + $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol']; + $endColumn = Coordinate::stringFromColumnIndex($endColumn + 1); + $endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']; + $endRow += 1; + $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow; + + $styleAttributes = $styleRegion->Style->attributes(); + + // We still set the number format mask for date/time values, even if readDataOnly is true + if ((!$this->readDataOnly) || + (Date::isDateTimeFormatCode((string) $styleAttributes['Format']))) { + $styleArray = []; + $styleArray['numberFormat']['formatCode'] = (string) $styleAttributes['Format']; + // If readDataOnly is false, we set all formatting information + if (!$this->readDataOnly) { + switch ($styleAttributes['HAlign']) { + case '1': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_GENERAL; + + break; + case '2': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_LEFT; + + break; + case '4': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_RIGHT; + + break; + case '8': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_CENTER; + + break; + case '16': + case '64': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_CENTER_CONTINUOUS; + + break; + case '32': + $styleArray['alignment']['horizontal'] = Alignment::HORIZONTAL_JUSTIFY; + + break; + } + + switch ($styleAttributes['VAlign']) { + case '1': + $styleArray['alignment']['vertical'] = Alignment::VERTICAL_TOP; + + break; + case '2': + $styleArray['alignment']['vertical'] = Alignment::VERTICAL_BOTTOM; + + break; + case '4': + $styleArray['alignment']['vertical'] = Alignment::VERTICAL_CENTER; + + break; + case '8': + $styleArray['alignment']['vertical'] = Alignment::VERTICAL_JUSTIFY; + + break; + } + + $styleArray['alignment']['wrapText'] = $styleAttributes['WrapText'] == '1'; + $styleArray['alignment']['shrinkToFit'] = $styleAttributes['ShrinkToFit'] == '1'; + $styleArray['alignment']['indent'] = ((int) ($styleAttributes['Indent']) > 0) ? $styleAttributes['indent'] : 0; + + $RGB = self::parseGnumericColour($styleAttributes['Fore']); + $styleArray['font']['color']['rgb'] = $RGB; + $RGB = self::parseGnumericColour($styleAttributes['Back']); + $shade = $styleAttributes['Shade']; + if (($RGB != '000000') || ($shade != '0')) { + $styleArray['fill']['color']['rgb'] = $styleArray['fill']['startColor']['rgb'] = $RGB; + $RGB2 = self::parseGnumericColour($styleAttributes['PatternColor']); + $styleArray['fill']['endColor']['rgb'] = $RGB2; + switch ($shade) { + case '1': + $styleArray['fill']['fillType'] = Fill::FILL_SOLID; + + break; + case '2': + $styleArray['fill']['fillType'] = Fill::FILL_GRADIENT_LINEAR; + + break; + case '3': + $styleArray['fill']['fillType'] = Fill::FILL_GRADIENT_PATH; + + break; + case '4': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKDOWN; + + break; + case '5': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKGRAY; + + break; + case '6': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKGRID; + + break; + case '7': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKHORIZONTAL; + + break; + case '8': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKTRELLIS; + + break; + case '9': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKUP; + + break; + case '10': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_DARKVERTICAL; + + break; + case '11': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_GRAY0625; + + break; + case '12': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_GRAY125; + + break; + case '13': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTDOWN; + + break; + case '14': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTGRAY; + + break; + case '15': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTGRID; + + break; + case '16': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTHORIZONTAL; + + break; + case '17': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTTRELLIS; + + break; + case '18': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTUP; + + break; + case '19': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_LIGHTVERTICAL; + + break; + case '20': + $styleArray['fill']['fillType'] = Fill::FILL_PATTERN_MEDIUMGRAY; + + break; + } + } + + $fontAttributes = $styleRegion->Style->Font->attributes(); + $styleArray['font']['name'] = (string) $styleRegion->Style->Font; + $styleArray['font']['size'] = (int) ($fontAttributes['Unit']); + $styleArray['font']['bold'] = $fontAttributes['Bold'] == '1'; + $styleArray['font']['italic'] = $fontAttributes['Italic'] == '1'; + $styleArray['font']['strikethrough'] = $fontAttributes['StrikeThrough'] == '1'; + switch ($fontAttributes['Underline']) { + case '1': + $styleArray['font']['underline'] = Font::UNDERLINE_SINGLE; + + break; + case '2': + $styleArray['font']['underline'] = Font::UNDERLINE_DOUBLE; + + break; + case '3': + $styleArray['font']['underline'] = Font::UNDERLINE_SINGLEACCOUNTING; + + break; + case '4': + $styleArray['font']['underline'] = Font::UNDERLINE_DOUBLEACCOUNTING; + + break; + default: + $styleArray['font']['underline'] = Font::UNDERLINE_NONE; + + break; + } + switch ($fontAttributes['Script']) { + case '1': + $styleArray['font']['superscript'] = true; + + break; + case '-1': + $styleArray['font']['subscript'] = true; + + break; + } + + if (isset($styleRegion->Style->StyleBorder)) { + if (isset($styleRegion->Style->StyleBorder->Top)) { + $styleArray['borders']['top'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Top->attributes()); + } + if (isset($styleRegion->Style->StyleBorder->Bottom)) { + $styleArray['borders']['bottom'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Bottom->attributes()); + } + if (isset($styleRegion->Style->StyleBorder->Left)) { + $styleArray['borders']['left'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Left->attributes()); + } + if (isset($styleRegion->Style->StyleBorder->Right)) { + $styleArray['borders']['right'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Right->attributes()); + } + if ((isset($styleRegion->Style->StyleBorder->Diagonal)) && (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}))) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_BOTH; + } elseif (isset($styleRegion->Style->StyleBorder->Diagonal)) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_UP; + } elseif (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'})) { + $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}->attributes()); + $styleArray['borders']['diagonalDirection'] = Borders::DIAGONAL_DOWN; + } + } + if (isset($styleRegion->Style->HyperLink)) { + // TO DO + $hyperlink = $styleRegion->Style->HyperLink->attributes(); + } + } + $spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($styleArray); + } + } + } + + if ((!$this->readDataOnly) && (isset($sheet->Cols))) { + // Column Widths + $columnAttributes = $sheet->Cols->attributes(); + $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4; + $c = 0; + foreach ($sheet->Cols->ColInfo as $columnOverride) { + $columnAttributes = $columnOverride->attributes(); + $column = $columnAttributes['No']; + $columnWidth = $columnAttributes['Unit'] / 5.4; + $hidden = (isset($columnAttributes['Hidden'])) && ($columnAttributes['Hidden'] == '1'); + $columnCount = (isset($columnAttributes['Count'])) ? $columnAttributes['Count'] : 1; + while ($c < $column) { + $spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($defaultWidth); + ++$c; + } + while (($c < ($column + $columnCount)) && ($c <= $maxCol)) { + $spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($columnWidth); + if ($hidden) { + $spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setVisible(false); + } + ++$c; + } + } + while ($c <= $maxCol) { + $spreadsheet->getActiveSheet()->getColumnDimension(Coordinate::stringFromColumnIndex($c + 1))->setWidth($defaultWidth); + ++$c; + } + } + + if ((!$this->readDataOnly) && (isset($sheet->Rows))) { + // Row Heights + $rowAttributes = $sheet->Rows->attributes(); + $defaultHeight = $rowAttributes['DefaultSizePts']; + $r = 0; + + foreach ($sheet->Rows->RowInfo as $rowOverride) { + $rowAttributes = $rowOverride->attributes(); + $row = $rowAttributes['No']; + $rowHeight = $rowAttributes['Unit']; + $hidden = (isset($rowAttributes['Hidden'])) && ($rowAttributes['Hidden'] == '1'); + $rowCount = (isset($rowAttributes['Count'])) ? $rowAttributes['Count'] : 1; + while ($r < $row) { + ++$r; + $spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); + } + while (($r < ($row + $rowCount)) && ($r < $maxRow)) { + ++$r; + $spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($rowHeight); + if ($hidden) { + $spreadsheet->getActiveSheet()->getRowDimension($r)->setVisible(false); + } + } + } + while ($r < $maxRow) { + ++$r; + $spreadsheet->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); + } + } + + // Handle Merged Cells in this worksheet + if (isset($sheet->MergedRegions)) { + foreach ($sheet->MergedRegions->Merge as $mergeCells) { + if (strpos($mergeCells, ':') !== false) { + $spreadsheet->getActiveSheet()->mergeCells($mergeCells); + } + } + } + + ++$worksheetID; + } + + // Loop through definedNames (global named ranges) + if (isset($gnmXML->Names)) { + foreach ($gnmXML->Names->Name as $namedRange) { + $name = (string) $namedRange->name; + $range = (string) $namedRange->value; + if (stripos($range, '#REF!') !== false) { + continue; + } + + $range = Worksheet::extractSheetTitle($range, true); + $range[0] = trim($range[0], "'"); + if ($worksheet = $spreadsheet->getSheetByName($range[0])) { + $extractedRange = str_replace('$', '', $range[1]); + $spreadsheet->addNamedRange(new NamedRange($name, $worksheet, $extractedRange)); + } + } + } + + // Return + return $spreadsheet; + } + + private static function parseBorderAttributes($borderAttributes) + { + $styleArray = []; + if (isset($borderAttributes['Color'])) { + $styleArray['color']['rgb'] = self::parseGnumericColour($borderAttributes['Color']); + } + + switch ($borderAttributes['Style']) { + case '0': + $styleArray['borderStyle'] = Border::BORDER_NONE; + + break; + case '1': + $styleArray['borderStyle'] = Border::BORDER_THIN; + + break; + case '2': + $styleArray['borderStyle'] = Border::BORDER_MEDIUM; + + break; + case '3': + $styleArray['borderStyle'] = Border::BORDER_SLANTDASHDOT; + + break; + case '4': + $styleArray['borderStyle'] = Border::BORDER_DASHED; + + break; + case '5': + $styleArray['borderStyle'] = Border::BORDER_THICK; + + break; + case '6': + $styleArray['borderStyle'] = Border::BORDER_DOUBLE; + + break; + case '7': + $styleArray['borderStyle'] = Border::BORDER_DOTTED; + + break; + case '8': + $styleArray['borderStyle'] = Border::BORDER_MEDIUMDASHED; + + break; + case '9': + $styleArray['borderStyle'] = Border::BORDER_DASHDOT; + + break; + case '10': + $styleArray['borderStyle'] = Border::BORDER_MEDIUMDASHDOT; + + break; + case '11': + $styleArray['borderStyle'] = Border::BORDER_DASHDOTDOT; + + break; + case '12': + $styleArray['borderStyle'] = Border::BORDER_MEDIUMDASHDOTDOT; + + break; + case '13': + $styleArray['borderStyle'] = Border::BORDER_MEDIUMDASHDOTDOT; + + break; + } + + return $styleArray; + } + + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } + + private static function parseGnumericColour($gnmColour) + { + list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour); + $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2); + $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2); + $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2); + + return $gnmR . $gnmG . $gnmB; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php new file mode 100755 index 0000000..2e823f0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php @@ -0,0 +1,933 @@ + [ + 'font' => [ + 'bold' => true, + 'size' => 24, + ], + ], // Bold, 24pt + 'h2' => [ + 'font' => [ + 'bold' => true, + 'size' => 18, + ], + ], // Bold, 18pt + 'h3' => [ + 'font' => [ + 'bold' => true, + 'size' => 13.5, + ], + ], // Bold, 13.5pt + 'h4' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ], + ], // Bold, 12pt + 'h5' => [ + 'font' => [ + 'bold' => true, + 'size' => 10, + ], + ], // Bold, 10pt + 'h6' => [ + 'font' => [ + 'bold' => true, + 'size' => 7.5, + ], + ], // Bold, 7.5pt + 'a' => [ + 'font' => [ + 'underline' => true, + 'color' => [ + 'argb' => Color::COLOR_BLUE, + ], + ], + ], // Blue underlined + 'hr' => [ + 'borders' => [ + 'bottom' => [ + 'borderStyle' => Border::BORDER_THIN, + 'color' => [ + Color::COLOR_BLACK, + ], + ], + ], + ], // Bottom border + 'strong' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'b' => [ + 'font' => [ + 'bold' => true, + ], + ], // Bold + 'i' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic + 'em' => [ + 'font' => [ + 'italic' => true, + ], + ], // Italic + ]; + + protected $rowspan = []; + + /** + * Create a new HTML Reader instance. + */ + public function __construct() + { + parent::__construct(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Validate that the current file is an HTML file. + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + // Check if file exists + try { + $this->openFile($pFilename); + } catch (Exception $e) { + return false; + } + + $beginning = $this->readBeginning(); + $startWithTag = self::startsWithTag($beginning); + $containsTags = self::containsTags($beginning); + $endsWithTag = self::endsWithTag($this->readEnding()); + + fclose($this->fileHandle); + + return $startWithTag && $containsTags && $endsWithTag; + } + + private function readBeginning() + { + fseek($this->fileHandle, 0); + + return fread($this->fileHandle, self::TEST_SAMPLE_SIZE); + } + + private function readEnding() + { + $meta = stream_get_meta_data($this->fileHandle); + $filename = $meta['uri']; + + $size = filesize($filename); + if ($size === 0) { + return ''; + } + + $blockSize = self::TEST_SAMPLE_SIZE; + if ($size < $blockSize) { + $blockSize = $size; + } + + fseek($this->fileHandle, $size - $blockSize); + + return fread($this->fileHandle, $blockSize); + } + + private static function startsWithTag($data) + { + return '<' === substr(trim($data), 0, 1); + } + + private static function endsWithTag($data) + { + return '>' === substr(trim($data), -1, 1); + } + + private static function containsTags($data) + { + return strlen($data) !== strlen(strip_tags($data)); + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Set input encoding. + * + * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return Html + */ + public function setInputEncoding($pValue) + { + $this->inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @return string + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + // Data Array used for testing only, should write to Spreadsheet object on completion of tests + protected $dataArray = []; + + protected $tableLevel = 0; + + protected $nestedColumn = ['A']; + + protected function setTableStartColumn($column) + { + if ($this->tableLevel == 0) { + $column = 'A'; + } + ++$this->tableLevel; + $this->nestedColumn[$this->tableLevel] = $column; + + return $this->nestedColumn[$this->tableLevel]; + } + + protected function getTableStartColumn() + { + return $this->nestedColumn[$this->tableLevel]; + } + + protected function releaseTableStartColumn() + { + --$this->tableLevel; + + return array_pop($this->nestedColumn); + } + + protected function flushCell(Worksheet $sheet, $column, $row, &$cellContent) + { + if (is_string($cellContent)) { + // Simple String content + if (trim($cellContent) > '') { + // Only actually write it if there's content in the string + // Write to worksheet to be done here... + // ... we return the cell so we can mess about with styles more easily + $sheet->setCellValue($column . $row, $cellContent); + $this->dataArray[$row][$column] = $cellContent; + } + } else { + // We have a Rich Text run + // TODO + $this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent; + } + $cellContent = (string) ''; + } + + /** + * @param DOMNode $element + * @param Worksheet $sheet + * @param int $row + * @param string $column + * @param string $cellContent + */ + protected function processDomElement(DOMNode $element, Worksheet $sheet, &$row, &$column, &$cellContent) + { + foreach ($element->childNodes as $child) { + if ($child instanceof DOMText) { + $domText = preg_replace('/\s+/u', ' ', trim($child->nodeValue)); + if (is_string($cellContent)) { + // simply append the text if the cell content is a plain text string + $cellContent .= $domText; + } + // but if we have a rich text run instead, we need to append it correctly + // TODO + } elseif ($child instanceof DOMElement) { + $attributeArray = []; + foreach ($child->attributes as $attribute) { + $attributeArray[$attribute->name] = $attribute->value; + } + + switch ($child->nodeName) { + case 'meta': + foreach ($attributeArray as $attributeName => $attributeValue) { + // Extract character set, so we can convert to UTF-8 if required + if ($attributeName === 'charset') { + $this->setInputEncoding($attributeValue); + } + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'title': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $sheet->setTitle($cellContent, true, false); + $cellContent = ''; + + break; + case 'span': + case 'div': + case 'font': + case 'i': + case 'em': + case 'strong': + case 'b': + if (isset($attributeArray['class']) && $attributeArray['class'] === 'comment') { + $sheet->getComment($column . $row) + ->getText() + ->createTextRun($child->textContent); + + break; + } + + if ($cellContent > '') { + $cellContent .= ' '; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + if ($cellContent > '') { + $cellContent .= ' '; + } + + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + break; + case 'hr': + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } else { + $cellContent = '----------'; + $this->flushCell($sheet, $column, $row, $cellContent); + } + ++$row; + // Add a break after a horizontal rule, simply by allowing the code to dropthru + // no break + case 'br': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n + $cellContent .= "\n"; + } else { + // Otherwise flush our existing content and move the row cursor on + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + } + + break; + case 'a': + foreach ($attributeArray as $attributeName => $attributeValue) { + switch ($attributeName) { + case 'href': + $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue); + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + break; + case 'class': + if ($attributeValue === 'comment-indicator') { + break; // Ignore - it's just a red square. + } + } + } + $cellContent .= ' '; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + case 'h6': + case 'ol': + case 'ul': + case 'p': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n + $cellContent .= "\n"; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } else { + if ($cellContent > '') { + $this->flushCell($sheet, $column, $row, $cellContent); + ++$row; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent); + + if (isset($this->formats[$child->nodeName])) { + $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); + } + + ++$row; + $column = 'A'; + } + + break; + case 'li': + if ($this->tableLevel > 0) { + // If we're inside a table, replace with a \n + $cellContent .= "\n"; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } else { + if ($cellContent > '') { + $this->flushCell($sheet, $column, $row, $cellContent); + } + ++$row; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent); + $column = 'A'; + } + + break; + case 'img': + $this->insertImage($sheet, $column, $row, $attributeArray); + + break; + case 'table': + $this->flushCell($sheet, $column, $row, $cellContent); + $column = $this->setTableStartColumn($column); + if ($this->tableLevel > 1) { + --$row; + } + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + $column = $this->releaseTableStartColumn(); + if ($this->tableLevel > 1) { + ++$column; + } else { + ++$row; + } + + break; + case 'thead': + case 'tbody': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + case 'tr': + $column = $this->getTableStartColumn(); + $cellContent = ''; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + + ++$row; + + break; + case 'th': + case 'td': + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + // apply inline style + $this->applyInlineStyle($sheet, $row, $column, $attributeArray); + + while (isset($this->rowspan[$column . $row])) { + ++$column; + } + + $this->flushCell($sheet, $column, $row, $cellContent); + + if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) { + //create merging rowspan and colspan + $columnTo = $column; + for ($i = 0; $i < $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $range = $column . $row . ':' . $columnTo . ($row + $attributeArray['rowspan'] - 1); + foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { + $this->rowspan[$value] = true; + } + $sheet->mergeCells($range); + $column = $columnTo; + } elseif (isset($attributeArray['rowspan'])) { + //create merging rowspan + $range = $column . $row . ':' . $column . ($row + $attributeArray['rowspan'] - 1); + foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { + $this->rowspan[$value] = true; + } + $sheet->mergeCells($range); + } elseif (isset($attributeArray['colspan'])) { + //create merging colspan + $columnTo = $column; + for ($i = 0; $i < $attributeArray['colspan'] - 1; ++$i) { + ++$columnTo; + } + $sheet->mergeCells($column . $row . ':' . $columnTo . $row); + $column = $columnTo; + } elseif (isset($attributeArray['bgcolor'])) { + $sheet->getStyle($column . $row)->applyFromArray( + [ + 'fill' => [ + 'fillType' => Fill::FILL_SOLID, + 'color' => ['rgb' => $attributeArray['bgcolor']], + ], + ] + ); + } + + if (isset($attributeArray['width'])) { + $sheet->getColumnDimension($column)->setWidth($attributeArray['width']); + } + + if (isset($attributeArray['height'])) { + $sheet->getRowDimension($row)->setRowHeight($attributeArray['height']); + } + + if (isset($attributeArray['align'])) { + $sheet->getStyle($column . $row)->getAlignment()->setHorizontal($attributeArray['align']); + } + + if (isset($attributeArray['valign'])) { + $sheet->getStyle($column . $row)->getAlignment()->setVertical($attributeArray['valign']); + } + + if (isset($attributeArray['data-format'])) { + $sheet->getStyle($column . $row)->getNumberFormat()->setFormatCode($attributeArray['data-format']); + } + + ++$column; + + break; + case 'body': + $row = 1; + $column = 'A'; + $cellContent = ''; + $this->tableLevel = 0; + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + + break; + default: + $this->processDomElement($child, $sheet, $row, $column, $cellContent); + } + } + } + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + // Validate + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid HTML file.'); + } + + // Create new sheet + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $spreadsheet->setActiveSheetIndex($this->sheetIndex); + + // Create a new DOM object + $dom = new DOMDocument(); + // Reload the HTML file into the DOM object + $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanner->scanFile($pFilename), 'HTML-ENTITIES', 'UTF-8')); + if ($loaded === false) { + throw new Exception('Failed to load ' . $pFilename . ' as a DOM Document'); + } + + // Discard white space + $dom->preserveWhiteSpace = false; + + $row = 0; + $column = 'A'; + $content = ''; + $this->rowspan = []; + $this->processDomElement($dom, $spreadsheet->getActiveSheet(), $row, $column, $content); + + // Return + return $spreadsheet; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return HTML + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Apply inline css inline style. + * + * NOTES : + * Currently only intended for td & th element, + * and only takes 'background-color' and 'color'; property with HEX color + * + * TODO : + * - Implement to other propertie, such as border + * + * @param Worksheet $sheet + * @param int $row + * @param string $column + * @param array $attributeArray + */ + private function applyInlineStyle(&$sheet, $row, $column, $attributeArray) + { + if (!isset($attributeArray['style'])) { + return; + } + + $cellStyle = $sheet->getStyle($column . $row); + + // add color styles (background & text) from dom element,currently support : td & th, using ONLY inline css style with RGB color + $styles = explode(';', $attributeArray['style']); + foreach ($styles as $st) { + $value = explode(':', $st); + $styleName = isset($value[0]) ? trim($value[0]) : null; + $styleValue = isset($value[1]) ? trim($value[1]) : null; + + if (!$styleName) { + continue; + } + + switch ($styleName) { + case 'background': + case 'background-color': + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['fill' => ['fillType' => Fill::FILL_SOLID, 'color' => ['rgb' => $styleColor]]]); + + break; + case 'color': + $styleColor = $this->getStyleColor($styleValue); + + if (!$styleColor) { + continue 2; + } + + $cellStyle->applyFromArray(['font' => ['color' => ['rgb' => $styleColor]]]); + + break; + + case 'border': + $this->setBorderStyle($cellStyle, $styleValue, 'allBorders'); + + break; + + case 'border-top': + $this->setBorderStyle($cellStyle, $styleValue, 'top'); + + break; + + case 'border-bottom': + $this->setBorderStyle($cellStyle, $styleValue, 'bottom'); + + break; + + case 'border-left': + $this->setBorderStyle($cellStyle, $styleValue, 'left'); + + break; + + case 'border-right': + $this->setBorderStyle($cellStyle, $styleValue, 'right'); + + break; + + case 'font-size': + $cellStyle->getFont()->setSize( + (float) $styleValue + ); + + break; + + case 'font-weight': + if ($styleValue === 'bold' || $styleValue >= 500) { + $cellStyle->getFont()->setBold(true); + } + + break; + + case 'font-style': + if ($styleValue === 'italic') { + $cellStyle->getFont()->setItalic(true); + } + + break; + + case 'font-family': + $cellStyle->getFont()->setName(str_replace('\'', '', $styleValue)); + + break; + + case 'text-decoration': + switch ($styleValue) { + case 'underline': + $cellStyle->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + + break; + case 'line-through': + $cellStyle->getFont()->setStrikethrough(true); + + break; + } + + break; + + case 'text-align': + $cellStyle->getAlignment()->setHorizontal($styleValue); + + break; + + case 'vertical-align': + $cellStyle->getAlignment()->setVertical($styleValue); + + break; + + case 'width': + $sheet->getColumnDimension($column)->setWidth( + str_replace('px', '', $styleValue) + ); + + break; + + case 'height': + $sheet->getRowDimension($row)->setRowHeight( + str_replace('px', '', $styleValue) + ); + + break; + + case 'word-wrap': + $cellStyle->getAlignment()->setWrapText( + $styleValue === 'break-word' + ); + + break; + + case 'text-indent': + $cellStyle->getAlignment()->setIndent( + (int) str_replace(['px'], '', $styleValue) + ); + + break; + } + } + } + + /** + * Check if has #, so we can get clean hex. + * + * @param $value + * + * @return null|string + */ + public function getStyleColor($value) + { + if (strpos($value, '#') === 0) { + return substr($value, 1); + } + + return null; + } + + /** + * @param Worksheet $sheet + * @param string $column + * @param int $row + * @param array $attributes + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + */ + private function insertImage(Worksheet $sheet, $column, $row, array $attributes) + { + if (!isset($attributes['src'])) { + return; + } + + $src = urldecode($attributes['src']); + $width = isset($attributes['width']) ? (float) $attributes['width'] : null; + $height = isset($attributes['height']) ? (float) $attributes['height'] : null; + $name = isset($attributes['alt']) ? (float) $attributes['alt'] : null; + + $drawing = new Drawing(); + $drawing->setPath($src); + $drawing->setWorksheet($sheet); + $drawing->setCoordinates($column . $row); + $drawing->setOffsetX(0); + $drawing->setOffsetY(10); + $drawing->setResizeProportional(true); + + if ($name) { + $drawing->setName($name); + } + + if ($width) { + $drawing->setWidth((int) $width); + } + + if ($height) { + $drawing->setHeight((int) $height); + } + + $sheet->getColumnDimension($column)->setWidth( + $drawing->getWidth() / 6 + ); + + $sheet->getRowDimension($row)->setRowHeight( + $drawing->getHeight() * 0.9 + ); + } + + /** + * Map html border style to PhpSpreadsheet border style. + * + * @param string $style + * + * @return null|string + */ + public function getBorderStyle($style) + { + switch ($style) { + case 'solid': + return Border::BORDER_THIN; + case 'dashed': + return Border::BORDER_DASHED; + case 'dotted': + return Border::BORDER_DOTTED; + case 'medium': + return Border::BORDER_MEDIUM; + case 'thick': + return Border::BORDER_THICK; + case 'none': + return Border::BORDER_NONE; + case 'dash-dot': + return Border::BORDER_DASHDOT; + case 'dash-dot-dot': + return Border::BORDER_DASHDOTDOT; + case 'double': + return Border::BORDER_DOUBLE; + case 'hair': + return Border::BORDER_HAIR; + case 'medium-dash-dot': + return Border::BORDER_MEDIUMDASHDOT; + case 'medium-dash-dot-dot': + return Border::BORDER_MEDIUMDASHDOTDOT; + case 'medium-dashed': + return Border::BORDER_MEDIUMDASHED; + case 'slant-dash-dot': + return Border::BORDER_SLANTDASHDOT; + } + + return null; + } + + /** + * @param Style $cellStyle + * @param string $styleValue + * @param string $type + */ + private function setBorderStyle(Style $cellStyle, $styleValue, $type) + { + list(, $borderStyle, $color) = explode(' ', $styleValue); + + $cellStyle->applyFromArray([ + 'borders' => [ + $type => [ + 'borderStyle' => $this->getBorderStyle($borderStyle), + 'color' => ['rgb' => $this->getStyleColor($color)], + ], + ], + ]); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReadFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReadFilter.php new file mode 100755 index 0000000..ccfe05a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/IReadFilter.php @@ -0,0 +1,17 @@ +securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @throws Exception + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + $mimeType = 'UNKNOWN'; + + // Load file + + $zip = new ZipArchive(); + if ($zip->open($pFilename) === true) { + // check if it is an OOXML archive + $stat = $zip->statName('mimetype'); + if ($stat && ($stat['size'] <= 255)) { + $mimeType = $zip->getFromName($stat['name']); + } elseif ($zip->statName('META-INF/manifest.xml')) { + $xml = simplexml_load_string( + $this->securityScanner->scan($zip->getFromName('META-INF/manifest.xml')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $namespacesContent = $xml->getNamespaces(true); + if (isset($namespacesContent['manifest'])) { + $manifest = $xml->children($namespacesContent['manifest']); + foreach ($manifest as $manifestDataSet) { + $manifestAttributes = $manifestDataSet->attributes($namespacesContent['manifest']); + if ($manifestAttributes->{'full-path'} == '/') { + $mimeType = (string) $manifestAttributes->{'media-type'}; + + break; + } + } + } + } + + $zip->close(); + + return $mimeType === 'application/vnd.oasis.opendocument.spreadsheet'; + } + + return false; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object. + * + * @param string $pFilename + * + * @throws Exception + * + * @return string[] + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); + } + + $worksheetNames = []; + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + // Step into the first level of content of the XML + $xml->read(); + while ($xml->read()) { + // Quickly jump through to the office:body node + while ($xml->name !== 'office:body') { + if ($xml->isEmptyElement) { + $xml->read(); + } else { + $xml->next(); + } + } + // Now read each node until we find our first table:table node + while ($xml->read()) { + if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { + // Loop through each table:table node reading the table:name attribute for each worksheet name + do { + $worksheetNames[] = $xml->getAttribute('table:name'); + $xml->next(); + } while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT); + } + } + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); + } + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + // Step into the first level of content of the XML + $xml->read(); + while ($xml->read()) { + // Quickly jump through to the office:body node + while ($xml->name !== 'office:body') { + if ($xml->isEmptyElement) { + $xml->read(); + } else { + $xml->next(); + } + } + // Now read each node until we find our first table:table node + while ($xml->read()) { + if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { + $worksheetNames[] = $xml->getAttribute('table:name'); + + $tmpInfo = [ + 'worksheetName' => $xml->getAttribute('table:name'), + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + // Loop through each child node of the table:table element reading + $currCells = 0; + do { + $xml->read(); + if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) { + $rowspan = $xml->getAttribute('table:number-rows-repeated'); + $rowspan = empty($rowspan) ? 1 : $rowspan; + $tmpInfo['totalRows'] += $rowspan; + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $currCells = 0; + // Step into the row + $xml->read(); + do { + if ($xml->name == 'table:table-cell' && $xml->nodeType == XMLReader::ELEMENT) { + if (!$xml->isEmptyElement) { + ++$currCells; + $xml->next(); + } else { + $xml->read(); + } + } elseif ($xml->name == 'table:covered-table-cell' && $xml->nodeType == XMLReader::ELEMENT) { + $mergeSize = $xml->getAttribute('table:number-columns-repeated'); + $currCells += (int) $mergeSize; + $xml->read(); + } else { + $xml->read(); + } + } while ($xml->name != 'table:table-row'); + } + } while ($xml->name != 'table:table'); + + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $worksheetInfo[] = $tmpInfo; + } + } + } + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + File::assertFile($pFilename); + + $timezoneObj = new DateTimeZone('Europe/London'); + $GMT = new \DateTimeZone('UTC'); + + $zip = new ZipArchive(); + if (!$zip->open($pFilename)) { + throw new Exception("Could not open {$pFilename} for reading! Error opening file."); + } + + // Meta + + $xml = simplexml_load_string( + $this->securityScanner->scan($zip->getFromName('meta.xml')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($xml === false) { + throw new Exception('Unable to read data from {$pFilename}'); + } + + $namespacesMeta = $xml->getNamespaces(true); + + (new DocumentProperties($spreadsheet))->load($xml, $namespacesMeta); + + // Content + + $dom = new \DOMDocument('1.01', 'UTF-8'); + $dom->loadXML( + $this->securityScanner->scan($zip->getFromName('content.xml')), + Settings::getLibXmlLoaderOptions() + ); + + $officeNs = $dom->lookupNamespaceUri('office'); + $tableNs = $dom->lookupNamespaceUri('table'); + $textNs = $dom->lookupNamespaceUri('text'); + $xlinkNs = $dom->lookupNamespaceUri('xlink'); + + $spreadsheets = $dom->getElementsByTagNameNS($officeNs, 'body') + ->item(0) + ->getElementsByTagNameNS($officeNs, 'spreadsheet'); + + foreach ($spreadsheets as $workbookData) { + /** @var \DOMElement $workbookData */ + $tables = $workbookData->getElementsByTagNameNS($tableNs, 'table'); + + $worksheetID = 0; + foreach ($tables as $worksheetDataSet) { + /** @var \DOMElement $worksheetDataSet */ + $worksheetName = $worksheetDataSet->getAttributeNS($tableNs, 'name'); + + // Check loadSheetsOnly + if (isset($this->loadSheetsOnly) + && $worksheetName + && !in_array($worksheetName, $this->loadSheetsOnly)) { + continue; + } + + // Create sheet + if ($worksheetID > 0) { + $spreadsheet->createSheet(); // First sheet is added by default + } + $spreadsheet->setActiveSheetIndex($worksheetID); + + if ($worksheetName) { + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in + // formula cells... during the load, all formulae should be correct, and we're simply + // bringing the worksheet name in line with the formula, not the reverse + $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + } + + // Go through every child of table element + $rowID = 1; + foreach ($worksheetDataSet->childNodes as $childNode) { + /** @var \DOMElement $childNode */ + + // Filter elements which are not under the "table" ns + if ($childNode->namespaceURI != $tableNs) { + continue; + } + + $key = $childNode->nodeName; + + // Remove ns from node name + if (strpos($key, ':') !== false) { + $keyChunks = explode(':', $key); + $key = array_pop($keyChunks); + } + + switch ($key) { + case 'table-header-rows': + /// TODO :: Figure this out. This is only a partial implementation I guess. + // ($rowData it's not used at all and I'm not sure that PHPExcel + // has an API for this) + +// foreach ($rowData as $keyRowData => $cellData) { +// $rowData = $cellData; +// break; +// } + break; + case 'table-row': + if ($childNode->hasAttributeNS($tableNs, 'number-rows-repeated')) { + $rowRepeats = $childNode->getAttributeNS($tableNs, 'number-rows-repeated'); + } else { + $rowRepeats = 1; + } + + $columnID = 'A'; + foreach ($childNode->childNodes as $key => $cellData) { + // @var \DOMElement $cellData + + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; + + continue; + } + } + + // Initialize variables + $formatting = $hyperlink = null; + $hasCalculatedValue = false; + $cellDataFormula = ''; + + if ($cellData->hasAttributeNS($tableNs, 'formula')) { + $cellDataFormula = $cellData->getAttributeNS($tableNs, 'formula'); + $hasCalculatedValue = true; + } + + // Annotations + $annotation = $cellData->getElementsByTagNameNS($officeNs, 'annotation'); + + if ($annotation->length > 0) { + $textNode = $annotation->item(0)->getElementsByTagNameNS($textNs, 'p'); + + if ($textNode->length > 0) { + $text = $this->scanElementForText($textNode->item(0)); + + $spreadsheet->getActiveSheet() + ->getComment($columnID . $rowID) + ->setText($this->parseRichText($text)); +// ->setAuthor( $author ) + } + } + + // Content + + /** @var \DOMElement[] $paragraphs */ + $paragraphs = []; + + foreach ($cellData->childNodes as $item) { + /** @var \DOMElement $item */ + + // Filter text:p elements + if ($item->nodeName == 'text:p') { + $paragraphs[] = $item; + } + } + + if (count($paragraphs) > 0) { + // Consolidate if there are multiple p records (maybe with spans as well) + $dataArray = []; + + // Text can have multiple text:p and within those, multiple text:span. + // text:p newlines, but text:span does not. + // Also, here we assume there is no text data is span fields are specified, since + // we have no way of knowing proper positioning anyway. + + foreach ($paragraphs as $pData) { + $dataArray[] = $this->scanElementForText($pData); + } + $allCellDataText = implode("\n", $dataArray); + + $type = $cellData->getAttributeNS($officeNs, 'value-type'); + + switch ($type) { + case 'string': + $type = DataType::TYPE_STRING; + $dataValue = $allCellDataText; + + foreach ($paragraphs as $paragraph) { + $link = $paragraph->getElementsByTagNameNS($textNs, 'a'); + if ($link->length > 0) { + $hyperlink = $link->item(0)->getAttributeNS($xlinkNs, 'href'); + } + } + + break; + case 'boolean': + $type = DataType::TYPE_BOOL; + $dataValue = ($allCellDataText == 'TRUE') ? true : false; + + break; + case 'percentage': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + $dataValue = (int) $dataValue; + } + $formatting = NumberFormat::FORMAT_PERCENTAGE_00; + + break; + case 'currency': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + $dataValue = (int) $dataValue; + } + $formatting = NumberFormat::FORMAT_CURRENCY_USD_SIMPLE; + + break; + case 'float': + $type = DataType::TYPE_NUMERIC; + $dataValue = (float) $cellData->getAttributeNS($officeNs, 'value'); + + if (floor($dataValue) == $dataValue) { + if ($dataValue == (int) $dataValue) { + $dataValue = (int) $dataValue; + } else { + $dataValue = (float) $dataValue; + } + } + + break; + case 'date': + $type = DataType::TYPE_NUMERIC; + $value = $cellData->getAttributeNS($officeNs, 'date-value'); + + $dateObj = new DateTime($value, $GMT); + $dateObj->setTimeZone($timezoneObj); + list($year, $month, $day, $hour, $minute, $second) = explode( + ' ', + $dateObj->format('Y m d H i s') + ); + + $dataValue = Date::formattedPHPToExcel( + (int) $year, + (int) $month, + (int) $day, + (int) $hour, + (int) $minute, + (int) $second + ); + + if ($dataValue != floor($dataValue)) { + $formatting = NumberFormat::FORMAT_DATE_XLSX15 + . ' ' + . NumberFormat::FORMAT_DATE_TIME4; + } else { + $formatting = NumberFormat::FORMAT_DATE_XLSX15; + } + + break; + case 'time': + $type = DataType::TYPE_NUMERIC; + + $timeValue = $cellData->getAttributeNS($officeNs, 'time-value'); + + $dataValue = Date::PHPToExcel( + strtotime( + '01-01-1970 ' . implode(':', sscanf($timeValue, 'PT%dH%dM%dS')) + ) + ); + $formatting = NumberFormat::FORMAT_DATE_TIME4; + + break; + default: + $dataValue = null; + } + } else { + $type = DataType::TYPE_NULL; + $dataValue = null; + } + + if ($hasCalculatedValue) { + $type = DataType::TYPE_FORMULA; + $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=') + 1); + $temp = explode('"', $cellDataFormula); + $tKey = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($tKey = !$tKey) { + // Cell range reference in another sheet + $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/U', '$1!$2:$3', $value); + + // Cell reference in another sheet + $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/U', '$1!$2', $value); + + // Cell range reference + $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/U', '$1:$2', $value); + + // Simple cell reference + $value = preg_replace('/\[\.([^\.]+)\]/U', '$1', $value); + + $value = Calculation::translateSeparator(';', ',', $value, $inBraces); + } + } + unset($value); + + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + } + + if ($cellData->hasAttributeNS($tableNs, 'number-columns-repeated')) { + $colRepeats = (int) $cellData->getAttributeNS($tableNs, 'number-columns-repeated'); + } else { + $colRepeats = 1; + } + + if ($type !== null) { + for ($i = 0; $i < $colRepeats; ++$i) { + if ($i > 0) { + ++$columnID; + } + + if ($type !== DataType::TYPE_NULL) { + for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) { + $rID = $rowID + $rowAdjust; + + $cell = $spreadsheet->getActiveSheet() + ->getCell($columnID . $rID); + + // Set value + if ($hasCalculatedValue) { + $cell->setValueExplicit($cellDataFormula, $type); + } else { + $cell->setValueExplicit($dataValue, $type); + } + + if ($hasCalculatedValue) { + $cell->setCalculatedValue($dataValue); + } + + // Set other properties + if ($formatting !== null) { + $spreadsheet->getActiveSheet() + ->getStyle($columnID . $rID) + ->getNumberFormat() + ->setFormatCode($formatting); + } else { + $spreadsheet->getActiveSheet() + ->getStyle($columnID . $rID) + ->getNumberFormat() + ->setFormatCode(NumberFormat::FORMAT_GENERAL); + } + + if ($hyperlink !== null) { + $cell->getHyperlink() + ->setUrl($hyperlink); + } + } + } + } + } + + // Merged cells + if ($cellData->hasAttributeNS($tableNs, 'number-columns-spanned') + || $cellData->hasAttributeNS($tableNs, 'number-rows-spanned') + ) { + if (($type !== DataType::TYPE_NULL) || (!$this->readDataOnly)) { + $columnTo = $columnID; + + if ($cellData->hasAttributeNS($tableNs, 'number-columns-spanned')) { + $columnIndex = Coordinate::columnIndexFromString($columnID); + $columnIndex += (int) $cellData->getAttributeNS($tableNs, 'number-columns-spanned'); + $columnIndex -= 2; + + $columnTo = Coordinate::stringFromColumnIndex($columnIndex + 1); + } + + $rowTo = $rowID; + + if ($cellData->hasAttributeNS($tableNs, 'number-rows-spanned')) { + $rowTo = $rowTo + (int) $cellData->getAttributeNS($tableNs, 'number-rows-spanned') - 1; + } + + $cellRange = $columnID . $rowID . ':' . $columnTo . $rowTo; + $spreadsheet->getActiveSheet()->mergeCells($cellRange); + } + } + + ++$columnID; + } + $rowID += $rowRepeats; + + break; + } + } + ++$worksheetID; + } + } + + // Return + return $spreadsheet; + } + + /** + * Recursively scan element. + * + * @param \DOMNode $element + * + * @return string + */ + protected function scanElementForText(\DOMNode $element) + { + $str = ''; + foreach ($element->childNodes as $child) { + /** @var \DOMNode $child */ + if ($child->nodeType == XML_TEXT_NODE) { + $str .= $child->nodeValue; + } elseif ($child->nodeType == XML_ELEMENT_NODE && $child->nodeName == 'text:s') { + // It's a space + + // Multiple spaces? + /** @var \DOMAttr $cAttr */ + $cAttr = $child->attributes->getNamedItem('c'); + if ($cAttr) { + $multiplier = (int) $cAttr->nodeValue; + } else { + $multiplier = 1; + } + + $str .= str_repeat(' ', $multiplier); + } + + if ($child->hasChildNodes()) { + $str .= $this->scanElementForText($child); + } + } + + return $str; + } + + /** + * @param string $is + * + * @return RichText + */ + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php new file mode 100755 index 0000000..8b6122c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/Properties.php @@ -0,0 +1,136 @@ +spreadsheet = $spreadsheet; + } + + public function load(\SimpleXMLElement $xml, $namespacesMeta) + { + $docProps = $this->spreadsheet->getProperties(); + $officeProperty = $xml->children($namespacesMeta['office']); + foreach ($officeProperty as $officePropertyData) { + /** @var \SimpleXMLElement $officePropertyData */ + $officePropertiesDC = (object) []; + if (isset($namespacesMeta['dc'])) { + $officePropertiesDC = $officePropertyData->children($namespacesMeta['dc']); + } + $this->setCoreProperties($docProps, $officePropertiesDC); + + $officePropertyMeta = (object) []; + if (isset($namespacesMeta['dc'])) { + $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); + } + foreach ($officePropertyMeta as $propertyName => $propertyValue) { + $this->setMetaProperties($namespacesMeta, $propertyValue, $propertyName, $docProps); + } + } + } + + private function setCoreProperties(DocumentProperties $docProps, \SimpleXMLElement $officePropertyDC) + { + foreach ($officePropertyDC as $propertyName => $propertyValue) { + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'title': + $docProps->setTitle($propertyValue); + + break; + case 'subject': + $docProps->setSubject($propertyValue); + + break; + case 'creator': + $docProps->setCreator($propertyValue); + $docProps->setLastModifiedBy($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + $docProps->setModified($creationDate); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'description': + $docProps->setDescription($propertyValue); + + break; + } + } + } + + private function setMetaProperties( + $namespacesMeta, + \SimpleXMLElement $propertyValue, + $propertyName, + DocumentProperties $docProps + ) { + $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']); + $propertyValue = (string) $propertyValue; + switch ($propertyName) { + case 'initial-creator': + $docProps->setCreator($propertyValue); + + break; + case 'keyword': + $docProps->setKeywords($propertyValue); + + break; + case 'creation-date': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + + break; + case 'user-defined': + $this->setUserDefinedProperty($propertyValueAttributes, $propertyValue, $docProps); + + break; + } + } + + private function setUserDefinedProperty($propertyValueAttributes, $propertyValue, DocumentProperties $docProps) + { + $propertyValueName = ''; + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + foreach ($propertyValueAttributes as $key => $value) { + if ($key == 'name') { + $propertyValueName = (string) $value; + } elseif ($key == 'value-type') { + switch ($value) { + case 'date': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'date'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_DATE; + + break; + case 'boolean': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'bool'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_BOOLEAN; + + break; + case 'float': + $propertyValue = DocumentProperties::convertProperty($propertyValue, 'r4'); + $propertyValueType = DocumentProperties::PROPERTY_TYPE_FLOAT; + + break; + default: + $propertyValueType = DocumentProperties::PROPERTY_TYPE_STRING; + } + } + } + + $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php new file mode 100755 index 0000000..732f0bf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -0,0 +1,154 @@ +pattern = $pattern; + + $this->disableEntityLoaderCheck(); + + // A fatal error will bypass the destructor, so we register a shutdown here + register_shutdown_function([__CLASS__, 'shutdown']); + } + + public static function getInstance(Reader\IReader $reader) + { + switch (true) { + case $reader instanceof Reader\Html: + return new self('= 1; + case 1: + return PHP_RELEASE_VERSION >= 13; + case 0: + return PHP_RELEASE_VERSION >= 27; + } + + return true; + } + + return false; + } + + private function disableEntityLoaderCheck() + { + if (Settings::getLibXmlDisableEntityLoader()) { + $libxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); + + if (self::$libxmlDisableEntityLoaderValue === null) { + self::$libxmlDisableEntityLoaderValue = $libxmlDisableEntityLoaderValue; + } + } + } + + public static function shutdown() + { + if (self::$libxmlDisableEntityLoaderValue !== null) { + libxml_disable_entity_loader(self::$libxmlDisableEntityLoaderValue); + self::$libxmlDisableEntityLoaderValue = null; + } + } + + public function __destruct() + { + self::shutdown(); + } + + public function setAdditionalCallback(callable $callback) + { + $this->callback = $callback; + } + + private function toUtf8($xml) + { + $pattern = '/encoding="(.*?)"/'; + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + + if ($charset !== 'UTF-8') { + $xml = mb_convert_encoding($xml, 'UTF-8', $charset); + + $result = preg_match($pattern, $xml, $matches); + $charset = strtoupper($result ? $matches[1] : 'UTF-8'); + if ($charset !== 'UTF-8') { + throw new Reader\Exception('Suspicious Double-encoded XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } + } + + return $xml; + } + + /** + * Scan the XML for use of disableEntityLoaderCheck(); + + $xml = $this->toUtf8($xml); + + // Don't rely purely on libxml_disable_entity_loader() + $pattern = '/\\0?' . implode('\\0?', str_split($this->pattern)) . '\\0?/'; + + if (preg_match($pattern, $xml)) { + throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); + } + + if ($this->callback !== null && is_callable($this->callback)) { + $xml = call_user_func($this->callback, $xml); + } + + return $xml; + } + + /** + * Scan theXML for use of scan(file_get_contents($filestream)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php new file mode 100755 index 0000000..c1013c2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Slk.php @@ -0,0 +1,496 @@ +openFile($pFilename); + } catch (Exception $e) { + return false; + } + + // Read sample data (first 2 KB will do) + $data = fread($this->fileHandle, 2048); + + // Count delimiters in file + $delimiterCount = substr_count($data, ';'); + $hasDelimiter = $delimiterCount > 0; + + // Analyze first line looking for ID; signature + $lines = explode("\n", $data); + $hasId = substr($lines[0], 0, 4) === 'ID;P'; + + fclose($this->fileHandle); + + return $hasDelimiter && $hasId; + } + + /** + * Set input encoding. + * + * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return Slk + */ + public function setInputEncoding($pValue) + { + $this->inputEncoding = $pValue; + + return $this; + } + + /** + * Get input encoding. + * + * @return string + */ + public function getInputEncoding() + { + return $this->inputEncoding; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + // Open file + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + rewind($fileHandle); + + $worksheetInfo = []; + $worksheetInfo[0]['worksheetName'] = 'Worksheet'; + $worksheetInfo[0]['lastColumnLetter'] = 'A'; + $worksheetInfo[0]['lastColumnIndex'] = 0; + $worksheetInfo[0]['totalRows'] = 0; + $worksheetInfo[0]['totalColumns'] = 0; + + // loop through one row (line) at a time in the file + $rowIndex = 0; + while (($rowData = fgets($fileHandle)) !== false) { + $columnIndex = 0; + + // convert SYLK encoded $rowData to UTF-8 + $rowData = StringHelper::SYLKtoUTF8($rowData); + + // explode each row at semicolons while taking into account that literal semicolon (;) + // is escaped like this (;;) + $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowData))))); + + $dataType = array_shift($rowData); + if ($dataType == 'C') { + // Read cell value data + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $columnIndex = substr($rowDatum, 1) - 1; + + break; + case 'R': + case 'Y': + $rowIndex = substr($rowDatum, 1); + + break; + } + + $worksheetInfo[0]['totalRows'] = max($worksheetInfo[0]['totalRows'], $rowIndex); + $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], $columnIndex); + } + } + } + + $worksheetInfo[0]['lastColumnLetter'] = Coordinate::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex'] + 1); + $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; + + // Close file + fclose($fileHandle); + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + /** + * Loads PhpSpreadsheet from file into PhpSpreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + // Open file + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + rewind($fileHandle); + + // Create new Worksheets + while ($spreadsheet->getSheetCount() <= $this->sheetIndex) { + $spreadsheet->createSheet(); + } + $spreadsheet->setActiveSheetIndex($this->sheetIndex); + + $fromFormats = ['\-', '\ ']; + $toFormats = ['-', ' ']; + + // Loop through file + $column = $row = ''; + + // loop through one row (line) at a time in the file + while (($rowData = fgets($fileHandle)) !== false) { + // convert SYLK encoded $rowData to UTF-8 + $rowData = StringHelper::SYLKtoUTF8($rowData); + + // explode each row at semicolons while taking into account that literal semicolon (;) + // is escaped like this (;;) + $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowData))))); + + $dataType = array_shift($rowData); + // Read shared styles + if ($dataType == 'P') { + $formatArray = []; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'P': + $formatArray['numberFormat']['formatCode'] = str_replace($fromFormats, $toFormats, substr($rowDatum, 1)); + + break; + case 'E': + case 'F': + $formatArray['font']['name'] = substr($rowDatum, 1); + + break; + case 'L': + $formatArray['font']['size'] = substr($rowDatum, 1); + + break; + case 'S': + $styleSettings = substr($rowDatum, 1); + $iMax = strlen($styleSettings); + for ($i = 0; $i < $iMax; ++$i) { + switch ($styleSettings[$i]) { + case 'I': + $formatArray['font']['italic'] = true; + + break; + case 'D': + $formatArray['font']['bold'] = true; + + break; + case 'T': + $formatArray['borders']['top']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'B': + $formatArray['borders']['bottom']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'L': + $formatArray['borders']['left']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'R': + $formatArray['borders']['right']['borderStyle'] = Border::BORDER_THIN; + + break; + } + } + + break; + } + } + $this->formats['P' . $this->format++] = $formatArray; + // Read cell value data + } elseif ($dataType == 'C') { + $hasCalculatedValue = false; + $cellData = $cellDataFormula = ''; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $column = substr($rowDatum, 1); + + break; + case 'R': + case 'Y': + $row = substr($rowDatum, 1); + + break; + case 'K': + $cellData = substr($rowDatum, 1); + + break; + case 'E': + $cellDataFormula = '=' . substr($rowDatum, 1); + // Convert R1C1 style references to A1 style references (but only when not quoted) + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only count/replace in alternate array entries + if ($key = !$key) { + preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); + // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way + // through the formula from left to right. Reversing means that we work right to left.through + // the formula + $cellReferences = array_reverse($cellReferences); + // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, + // then modify the formula to use that new reference + foreach ($cellReferences as $cellReference) { + $rowReference = $cellReference[2][0]; + // Empty R reference is the current row + if ($rowReference == '') { + $rowReference = $row; + } + // Bracketed R references are relative to the current row + if ($rowReference[0] == '[') { + $rowReference = $row + trim($rowReference, '[]'); + } + $columnReference = $cellReference[4][0]; + // Empty C reference is the current column + if ($columnReference == '') { + $columnReference = $column; + } + // Bracketed C references are relative to the current column + if ($columnReference[0] == '[') { + $columnReference = $column + trim($columnReference, '[]'); + } + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; + + $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); + } + } + } + unset($value); + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + $hasCalculatedValue = true; + + break; + } + } + $columnLetter = Coordinate::stringFromColumnIndex($column); + $cellData = Calculation::unwrapResult($cellData); + + // Set cell value + $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData); + if ($hasCalculatedValue) { + $cellData = Calculation::unwrapResult($cellData); + $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setCalculatedValue($cellData); + } + // Read cell formatting + } elseif ($dataType == 'F') { + $formatStyle = $columnWidth = $styleSettings = ''; + $styleData = []; + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $column = substr($rowDatum, 1); + + break; + case 'R': + case 'Y': + $row = substr($rowDatum, 1); + + break; + case 'P': + $formatStyle = $rowDatum; + + break; + case 'W': + list($startCol, $endCol, $columnWidth) = explode(' ', substr($rowDatum, 1)); + + break; + case 'S': + $styleSettings = substr($rowDatum, 1); + $iMax = strlen($styleSettings); + for ($i = 0; $i < $iMax; ++$i) { + switch ($styleSettings[$i]) { + case 'I': + $styleData['font']['italic'] = true; + + break; + case 'D': + $styleData['font']['bold'] = true; + + break; + case 'T': + $styleData['borders']['top']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'B': + $styleData['borders']['bottom']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'L': + $styleData['borders']['left']['borderStyle'] = Border::BORDER_THIN; + + break; + case 'R': + $styleData['borders']['right']['borderStyle'] = Border::BORDER_THIN; + + break; + } + } + + break; + } + } + if (($formatStyle > '') && ($column > '') && ($row > '')) { + $columnLetter = Coordinate::stringFromColumnIndex($column); + if (isset($this->formats[$formatStyle])) { + $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->formats[$formatStyle]); + } + } + if ((!empty($styleData)) && ($column > '') && ($row > '')) { + $columnLetter = Coordinate::stringFromColumnIndex($column); + $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($styleData); + } + if ($columnWidth > '') { + if ($startCol == $endCol) { + $startCol = Coordinate::stringFromColumnIndex($startCol); + $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth($columnWidth); + } else { + $startCol = Coordinate::stringFromColumnIndex($startCol); + $endCol = Coordinate::stringFromColumnIndex($endCol); + $spreadsheet->getActiveSheet()->getColumnDimension($startCol)->setWidth($columnWidth); + do { + $spreadsheet->getActiveSheet()->getColumnDimension(++$startCol)->setWidth($columnWidth); + } while ($startCol != $endCol); + } + } + } else { + foreach ($rowData as $rowDatum) { + switch ($rowDatum[0]) { + case 'C': + case 'X': + $column = substr($rowDatum, 1); + + break; + case 'R': + case 'Y': + $row = substr($rowDatum, 1); + + break; + } + } + } + } + + // Close file + fclose($fileHandle); + + // Return + return $spreadsheet; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return Slk + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php new file mode 100755 index 0000000..bd2c9c1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php @@ -0,0 +1,7949 @@ +data. + * + * @var int + */ + private $dataSize; + + /** + * Current position in stream. + * + * @var int + */ + private $pos; + + /** + * Workbook to be returned by the reader. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Worksheet that is currently being built by the reader. + * + * @var Worksheet + */ + private $phpSheet; + + /** + * BIFF version. + * + * @var int + */ + private $version; + + /** + * Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95) + * For BIFF8 (Excel 97 - Excel 2003) this will always have the value 'UTF-16LE'. + * + * @var string + */ + private $codepage; + + /** + * Shared formats. + * + * @var array + */ + private $formats; + + /** + * Shared fonts. + * + * @var array + */ + private $objFonts; + + /** + * Color palette. + * + * @var array + */ + private $palette; + + /** + * Worksheets. + * + * @var array + */ + private $sheets; + + /** + * External books. + * + * @var array + */ + private $externalBooks; + + /** + * REF structures. Only applies to BIFF8. + * + * @var array + */ + private $ref; + + /** + * External names. + * + * @var array + */ + private $externalNames; + + /** + * Defined names. + * + * @var array + */ + private $definedname; + + /** + * Shared strings. Only applies to BIFF8. + * + * @var array + */ + private $sst; + + /** + * Panes are frozen? (in sheet currently being read). See WINDOW2 record. + * + * @var bool + */ + private $frozen; + + /** + * Fit printout to number of pages? (in sheet currently being read). See SHEETPR record. + * + * @var bool + */ + private $isFitToPages; + + /** + * Objects. One OBJ record contributes with one entry. + * + * @var array + */ + private $objs; + + /** + * Text Objects. One TXO record corresponds with one entry. + * + * @var array + */ + private $textObjects; + + /** + * Cell Annotations (BIFF8). + * + * @var array + */ + private $cellNotes; + + /** + * The combined MSODRAWINGGROUP data. + * + * @var string + */ + private $drawingGroupData; + + /** + * The combined MSODRAWING data (per sheet). + * + * @var string + */ + private $drawingData; + + /** + * Keep track of XF index. + * + * @var int + */ + private $xfIndex; + + /** + * Mapping of XF index (that is a cell XF) to final index in cellXf collection. + * + * @var array + */ + private $mapCellXfIndex; + + /** + * Mapping of XF index (that is a style XF) to final index in cellStyleXf collection. + * + * @var array + */ + private $mapCellStyleXfIndex; + + /** + * The shared formulas in a sheet. One SHAREDFMLA record contributes with one value. + * + * @var array + */ + private $sharedFormulas; + + /** + * The shared formula parts in a sheet. One FORMULA record contributes with one value if it + * refers to a shared formula. + * + * @var array + */ + private $sharedFormulaParts; + + /** + * The type of encryption in use. + * + * @var int + */ + private $encryption = 0; + + /** + * The position in the stream after which contents are encrypted. + * + * @var int + */ + private $encryptionStartPos = false; + + /** + * The current RC4 decryption object. + * + * @var Xls\RC4 + */ + private $rc4Key; + + /** + * The position in the stream that the RC4 decryption object was left at. + * + * @var int + */ + private $rc4Pos = 0; + + /** + * The current MD5 context state. + * + * @var string + */ + private $md5Ctxt; + + /** + * @var int + */ + private $textObjRef; + + /** + * @var string + */ + private $baseCell; + + /** + * Create a new Xls Reader instance. + */ + public function __construct() + { + parent::__construct(); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + try { + // Use ParseXL for the hard work. + $ole = new OLERead(); + + // get excel data + $ole->read($pFilename); + + return true; + } catch (PhpSpreadsheetException $e) { + return false; + } + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a PhpSpreadsheet object. + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $worksheetNames = []; + + // Read the OLE file + $this->loadOLE($pFilename); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + $this->pos = 0; + $this->sheets = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module + continue; + } + + $worksheetNames[] = $sheet['name']; + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + // Read the OLE file + $this->loadOLE($pFilename); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + // initialize + $this->pos = 0; + $this->sheets = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // Parse the individual sheets + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet + // 0x02: Chart + // 0x06: Visual Basic module + continue; + } + + $tmpInfo = []; + $tmpInfo['worksheetName'] = $sheet['name']; + $tmpInfo['lastColumnLetter'] = 'A'; + $tmpInfo['lastColumnIndex'] = 0; + $tmpInfo['totalRows'] = 0; + $tmpInfo['totalColumns'] = 0; + + $this->pos = $sheet['offset']; + + while ($this->pos <= $this->dataSize - 4) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_RK: + case self::XLS_TYPE_LABELSST: + case self::XLS_TYPE_NUMBER: + case self::XLS_TYPE_FORMULA: + case self::XLS_TYPE_BOOLERR: + case self::XLS_TYPE_LABEL: + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + $rowIndex = self::getUInt2d($recordData, 0) + 1; + $columnIndex = self::getUInt2d($recordData, 2); + + $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); + $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); + + break; + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; + + $worksheetInfo[] = $tmpInfo; + } + + return $worksheetInfo; + } + + /** + * Loads PhpSpreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Read the OLE file + $this->loadOLE($pFilename); + + // Initialisations + $this->spreadsheet = new Spreadsheet(); + $this->spreadsheet->removeSheetByIndex(0); // remove 1st sheet + if (!$this->readDataOnly) { + $this->spreadsheet->removeCellStyleXfByIndex(0); // remove the default style + $this->spreadsheet->removeCellXfByIndex(0); // remove the default style + } + + // Read the summary information stream (containing meta data) + $this->readSummaryInformation(); + + // Read the Additional document summary information stream (containing application-specific meta data) + $this->readDocumentSummaryInformation(); + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + // initialize + $this->pos = 0; + $this->codepage = 'CP1252'; + $this->formats = []; + $this->objFonts = []; + $this->palette = []; + $this->sheets = []; + $this->externalBooks = []; + $this->ref = []; + $this->definedname = []; + $this->sst = []; + $this->drawingGroupData = ''; + $this->xfIndex = ''; + $this->mapCellXfIndex = []; + $this->mapCellStyleXfIndex = []; + + // Parse Workbook Global Substream + while ($this->pos < $this->dataSize) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_FILEPASS: + $this->readFilepass(); + + break; + case self::XLS_TYPE_CODEPAGE: + $this->readCodepage(); + + break; + case self::XLS_TYPE_DATEMODE: + $this->readDateMode(); + + break; + case self::XLS_TYPE_FONT: + $this->readFont(); + + break; + case self::XLS_TYPE_FORMAT: + $this->readFormat(); + + break; + case self::XLS_TYPE_XF: + $this->readXf(); + + break; + case self::XLS_TYPE_XFEXT: + $this->readXfExt(); + + break; + case self::XLS_TYPE_STYLE: + $this->readStyle(); + + break; + case self::XLS_TYPE_PALETTE: + $this->readPalette(); + + break; + case self::XLS_TYPE_SHEET: + $this->readSheet(); + + break; + case self::XLS_TYPE_EXTERNALBOOK: + $this->readExternalBook(); + + break; + case self::XLS_TYPE_EXTERNNAME: + $this->readExternName(); + + break; + case self::XLS_TYPE_EXTERNSHEET: + $this->readExternSheet(); + + break; + case self::XLS_TYPE_DEFINEDNAME: + $this->readDefinedName(); + + break; + case self::XLS_TYPE_MSODRAWINGGROUP: + $this->readMsoDrawingGroup(); + + break; + case self::XLS_TYPE_SST: + $this->readSst(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // Resolve indexed colors for font, fill, and border colors + // Cannot be resolved already in XF record, because PALETTE record comes afterwards + if (!$this->readDataOnly) { + foreach ($this->objFonts as $objFont) { + if (isset($objFont->colorIndex)) { + $color = Xls\Color::map($objFont->colorIndex, $this->palette, $this->version); + $objFont->getColor()->setRGB($color['rgb']); + } + } + + foreach ($this->spreadsheet->getCellXfCollection() as $objStyle) { + // fill start and end color + $fill = $objStyle->getFill(); + + if (isset($fill->startcolorIndex)) { + $startColor = Xls\Color::map($fill->startcolorIndex, $this->palette, $this->version); + $fill->getStartColor()->setRGB($startColor['rgb']); + } + if (isset($fill->endcolorIndex)) { + $endColor = Xls\Color::map($fill->endcolorIndex, $this->palette, $this->version); + $fill->getEndColor()->setRGB($endColor['rgb']); + } + + // border colors + $top = $objStyle->getBorders()->getTop(); + $right = $objStyle->getBorders()->getRight(); + $bottom = $objStyle->getBorders()->getBottom(); + $left = $objStyle->getBorders()->getLeft(); + $diagonal = $objStyle->getBorders()->getDiagonal(); + + if (isset($top->colorIndex)) { + $borderTopColor = Xls\Color::map($top->colorIndex, $this->palette, $this->version); + $top->getColor()->setRGB($borderTopColor['rgb']); + } + if (isset($right->colorIndex)) { + $borderRightColor = Xls\Color::map($right->colorIndex, $this->palette, $this->version); + $right->getColor()->setRGB($borderRightColor['rgb']); + } + if (isset($bottom->colorIndex)) { + $borderBottomColor = Xls\Color::map($bottom->colorIndex, $this->palette, $this->version); + $bottom->getColor()->setRGB($borderBottomColor['rgb']); + } + if (isset($left->colorIndex)) { + $borderLeftColor = Xls\Color::map($left->colorIndex, $this->palette, $this->version); + $left->getColor()->setRGB($borderLeftColor['rgb']); + } + if (isset($diagonal->colorIndex)) { + $borderDiagonalColor = Xls\Color::map($diagonal->colorIndex, $this->palette, $this->version); + $diagonal->getColor()->setRGB($borderDiagonalColor['rgb']); + } + } + } + + // treat MSODRAWINGGROUP records, workbook-level Escher + if (!$this->readDataOnly && $this->drawingGroupData) { + $escherWorkbook = new Escher(); + $reader = new Xls\Escher($escherWorkbook); + $escherWorkbook = $reader->load($this->drawingGroupData); + } + + // Parse the individual sheets + foreach ($this->sheets as $sheet) { + if ($sheet['sheetType'] != 0x00) { + // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module + continue; + } + + // check if sheet should be skipped + if (isset($this->loadSheetsOnly) && !in_array($sheet['name'], $this->loadSheetsOnly)) { + continue; + } + + // add sheet to PhpSpreadsheet object + $this->phpSheet = $this->spreadsheet->createSheet(); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula + // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet + // name in line with the formula, not the reverse + $this->phpSheet->setTitle($sheet['name'], false, false); + $this->phpSheet->setSheetState($sheet['sheetState']); + + $this->pos = $sheet['offset']; + + // Initialize isFitToPages. May change after reading SHEETPR record. + $this->isFitToPages = false; + + // Initialize drawingData + $this->drawingData = ''; + + // Initialize objs + $this->objs = []; + + // Initialize shared formula parts + $this->sharedFormulaParts = []; + + // Initialize shared formulas + $this->sharedFormulas = []; + + // Initialize text objs + $this->textObjects = []; + + // Initialize cell annotations + $this->cellNotes = []; + $this->textObjRef = -1; + + while ($this->pos <= $this->dataSize - 4) { + $code = self::getUInt2d($this->data, $this->pos); + + switch ($code) { + case self::XLS_TYPE_BOF: + $this->readBof(); + + break; + case self::XLS_TYPE_PRINTGRIDLINES: + $this->readPrintGridlines(); + + break; + case self::XLS_TYPE_DEFAULTROWHEIGHT: + $this->readDefaultRowHeight(); + + break; + case self::XLS_TYPE_SHEETPR: + $this->readSheetPr(); + + break; + case self::XLS_TYPE_HORIZONTALPAGEBREAKS: + $this->readHorizontalPageBreaks(); + + break; + case self::XLS_TYPE_VERTICALPAGEBREAKS: + $this->readVerticalPageBreaks(); + + break; + case self::XLS_TYPE_HEADER: + $this->readHeader(); + + break; + case self::XLS_TYPE_FOOTER: + $this->readFooter(); + + break; + case self::XLS_TYPE_HCENTER: + $this->readHcenter(); + + break; + case self::XLS_TYPE_VCENTER: + $this->readVcenter(); + + break; + case self::XLS_TYPE_LEFTMARGIN: + $this->readLeftMargin(); + + break; + case self::XLS_TYPE_RIGHTMARGIN: + $this->readRightMargin(); + + break; + case self::XLS_TYPE_TOPMARGIN: + $this->readTopMargin(); + + break; + case self::XLS_TYPE_BOTTOMMARGIN: + $this->readBottomMargin(); + + break; + case self::XLS_TYPE_PAGESETUP: + $this->readPageSetup(); + + break; + case self::XLS_TYPE_PROTECT: + $this->readProtect(); + + break; + case self::XLS_TYPE_SCENPROTECT: + $this->readScenProtect(); + + break; + case self::XLS_TYPE_OBJECTPROTECT: + $this->readObjectProtect(); + + break; + case self::XLS_TYPE_PASSWORD: + $this->readPassword(); + + break; + case self::XLS_TYPE_DEFCOLWIDTH: + $this->readDefColWidth(); + + break; + case self::XLS_TYPE_COLINFO: + $this->readColInfo(); + + break; + case self::XLS_TYPE_DIMENSION: + $this->readDefault(); + + break; + case self::XLS_TYPE_ROW: + $this->readRow(); + + break; + case self::XLS_TYPE_DBCELL: + $this->readDefault(); + + break; + case self::XLS_TYPE_RK: + $this->readRk(); + + break; + case self::XLS_TYPE_LABELSST: + $this->readLabelSst(); + + break; + case self::XLS_TYPE_MULRK: + $this->readMulRk(); + + break; + case self::XLS_TYPE_NUMBER: + $this->readNumber(); + + break; + case self::XLS_TYPE_FORMULA: + $this->readFormula(); + + break; + case self::XLS_TYPE_SHAREDFMLA: + $this->readSharedFmla(); + + break; + case self::XLS_TYPE_BOOLERR: + $this->readBoolErr(); + + break; + case self::XLS_TYPE_MULBLANK: + $this->readMulBlank(); + + break; + case self::XLS_TYPE_LABEL: + $this->readLabel(); + + break; + case self::XLS_TYPE_BLANK: + $this->readBlank(); + + break; + case self::XLS_TYPE_MSODRAWING: + $this->readMsoDrawing(); + + break; + case self::XLS_TYPE_OBJ: + $this->readObj(); + + break; + case self::XLS_TYPE_WINDOW2: + $this->readWindow2(); + + break; + case self::XLS_TYPE_PAGELAYOUTVIEW: + $this->readPageLayoutView(); + + break; + case self::XLS_TYPE_SCL: + $this->readScl(); + + break; + case self::XLS_TYPE_PANE: + $this->readPane(); + + break; + case self::XLS_TYPE_SELECTION: + $this->readSelection(); + + break; + case self::XLS_TYPE_MERGEDCELLS: + $this->readMergedCells(); + + break; + case self::XLS_TYPE_HYPERLINK: + $this->readHyperLink(); + + break; + case self::XLS_TYPE_DATAVALIDATIONS: + $this->readDataValidations(); + + break; + case self::XLS_TYPE_DATAVALIDATION: + $this->readDataValidation(); + + break; + case self::XLS_TYPE_SHEETLAYOUT: + $this->readSheetLayout(); + + break; + case self::XLS_TYPE_SHEETPROTECTION: + $this->readSheetProtection(); + + break; + case self::XLS_TYPE_RANGEPROTECTION: + $this->readRangeProtection(); + + break; + case self::XLS_TYPE_NOTE: + $this->readNote(); + + break; + case self::XLS_TYPE_TXO: + $this->readTextObject(); + + break; + case self::XLS_TYPE_CONTINUE: + $this->readContinue(); + + break; + case self::XLS_TYPE_EOF: + $this->readDefault(); + + break 2; + default: + $this->readDefault(); + + break; + } + } + + // treat MSODRAWING records, sheet-level Escher + if (!$this->readDataOnly && $this->drawingData) { + $escherWorksheet = new Escher(); + $reader = new Xls\Escher($escherWorksheet); + $escherWorksheet = $reader->load($this->drawingData); + + // get all spContainers in one long array, so they can be mapped to OBJ records + $allSpContainers = $escherWorksheet->getDgContainer()->getSpgrContainer()->getAllSpContainers(); + } + + // treat OBJ records + foreach ($this->objs as $n => $obj) { + // the first shape container never has a corresponding OBJ record, hence $n + 1 + if (isset($allSpContainers[$n + 1]) && is_object($allSpContainers[$n + 1])) { + $spContainer = $allSpContainers[$n + 1]; + + // we skip all spContainers that are a part of a group shape since we cannot yet handle those + if ($spContainer->getNestingLevel() > 1) { + continue; + } + + // calculate the width and height of the shape + list($startColumn, $startRow) = Coordinate::coordinateFromString($spContainer->getStartCoordinates()); + list($endColumn, $endRow) = Coordinate::coordinateFromString($spContainer->getEndCoordinates()); + + $startOffsetX = $spContainer->getStartOffsetX(); + $startOffsetY = $spContainer->getStartOffsetY(); + $endOffsetX = $spContainer->getEndOffsetX(); + $endOffsetY = $spContainer->getEndOffsetY(); + + $width = \PhpOffice\PhpSpreadsheet\Shared\Xls::getDistanceX($this->phpSheet, $startColumn, $startOffsetX, $endColumn, $endOffsetX); + $height = \PhpOffice\PhpSpreadsheet\Shared\Xls::getDistanceY($this->phpSheet, $startRow, $startOffsetY, $endRow, $endOffsetY); + + // calculate offsetX and offsetY of the shape + $offsetX = $startOffsetX * \PhpOffice\PhpSpreadsheet\Shared\Xls::sizeCol($this->phpSheet, $startColumn) / 1024; + $offsetY = $startOffsetY * \PhpOffice\PhpSpreadsheet\Shared\Xls::sizeRow($this->phpSheet, $startRow) / 256; + + switch ($obj['otObjType']) { + case 0x19: + // Note + if (isset($this->cellNotes[$obj['idObjID']])) { + $cellNote = $this->cellNotes[$obj['idObjID']]; + + if (isset($this->textObjects[$obj['idObjID']])) { + $textObject = $this->textObjects[$obj['idObjID']]; + $this->cellNotes[$obj['idObjID']]['objTextData'] = $textObject; + } + } + + break; + case 0x08: + // picture + // get index to BSE entry (1-based) + $BSEindex = $spContainer->getOPT(0x0104); + + // If there is no BSE Index, we will fail here and other fields are not read. + // Fix by checking here. + // TODO: Why is there no BSE Index? Is this a new Office Version? Password protected field? + // More likely : a uncompatible picture + if (!$BSEindex) { + continue 2; + } + + $BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection(); + $BSE = $BSECollection[$BSEindex - 1]; + $blipType = $BSE->getBlipType(); + + // need check because some blip types are not supported by Escher reader such as EMF + if ($blip = $BSE->getBlip()) { + $ih = imagecreatefromstring($blip->getData()); + $drawing = new MemoryDrawing(); + $drawing->setImageResource($ih); + + // width, height, offsetX, offsetY + $drawing->setResizeProportional(false); + $drawing->setWidth($width); + $drawing->setHeight($height); + $drawing->setOffsetX($offsetX); + $drawing->setOffsetY($offsetY); + + switch ($blipType) { + case BSE::BLIPTYPE_JPEG: + $drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG); + $drawing->setMimeType(MemoryDrawing::MIMETYPE_JPEG); + + break; + case BSE::BLIPTYPE_PNG: + $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG); + $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG); + + break; + } + + $drawing->setWorksheet($this->phpSheet); + $drawing->setCoordinates($spContainer->getStartCoordinates()); + } + + break; + default: + // other object type + break; + } + } + } + + // treat SHAREDFMLA records + if ($this->version == self::XLS_BIFF8) { + foreach ($this->sharedFormulaParts as $cell => $baseCell) { + list($column, $row) = Coordinate::coordinateFromString($cell); + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { + $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); + $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); + } + } + } + + if (!empty($this->cellNotes)) { + foreach ($this->cellNotes as $note => $noteDetails) { + if (!isset($noteDetails['objTextData'])) { + if (isset($this->textObjects[$note])) { + $textObject = $this->textObjects[$note]; + $noteDetails['objTextData'] = $textObject; + } else { + $noteDetails['objTextData']['text'] = ''; + } + } + $cellAddress = str_replace('$', '', $noteDetails['cellRef']); + $this->phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->parseRichText($noteDetails['objTextData']['text'])); + } + } + } + + // add the named ranges (defined names) + foreach ($this->definedname as $definedName) { + if ($definedName['isBuiltInName']) { + switch ($definedName['name']) { + case pack('C', 0x06): + // print area + // in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2 + $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? + + $extractedRanges = []; + foreach ($ranges as $range) { + // $range should look like one of these + // Foo!$C$7:$J$66 + // Bar!$A$1:$IV$2 + $explodes = Worksheet::extractSheetTitle($range, true); + $sheetName = trim($explodes[0], "'"); + if (count($explodes) == 2) { + if (strpos($explodes[1], ':') === false) { + $explodes[1] = $explodes[1] . ':' . $explodes[1]; + } + $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66 + } + } + if ($docSheet = $this->spreadsheet->getSheetByName($sheetName)) { + $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2 + } + + break; + case pack('C', 0x07): + // print titles (repeating rows) + // Assuming BIFF8, there are 3 cases + // 1. repeating rows + // formula looks like this: Sheet!$A$1:$IV$2 + // rows 1-2 repeat + // 2. repeating columns + // formula looks like this: Sheet!$A$1:$B$65536 + // columns A-B repeat + // 3. both repeating rows and repeating columns + // formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2 + $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? + foreach ($ranges as $range) { + // $range should look like this one of these + // Sheet!$A$1:$B$65536 + // Sheet!$A$1:$IV$2 + if (strpos($range, '!') !== false) { + $explodes = Worksheet::extractSheetTitle($range, true); + if ($docSheet = $this->spreadsheet->getSheetByName($explodes[0])) { + $extractedRange = $explodes[1]; + $extractedRange = str_replace('$', '', $extractedRange); + + $coordinateStrings = explode(':', $extractedRange); + if (count($coordinateStrings) == 2) { + list($firstColumn, $firstRow) = Coordinate::coordinateFromString($coordinateStrings[0]); + list($lastColumn, $lastRow) = Coordinate::coordinateFromString($coordinateStrings[1]); + + if ($firstColumn == 'A' and $lastColumn == 'IV') { + // then we have repeating rows + $docSheet->getPageSetup()->setRowsToRepeatAtTop([$firstRow, $lastRow]); + } elseif ($firstRow == 1 and $lastRow == 65536) { + // then we have repeating columns + $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$firstColumn, $lastColumn]); + } + } + } + } + } + + break; + } + } else { + // Extract range + if (strpos($definedName['formula'], '!') !== false) { + $explodes = Worksheet::extractSheetTitle($definedName['formula'], true); + if (($docSheet = $this->spreadsheet->getSheetByName($explodes[0])) || + ($docSheet = $this->spreadsheet->getSheetByName(trim($explodes[0], "'")))) { + $extractedRange = $explodes[1]; + $extractedRange = str_replace('$', '', $extractedRange); + + $localOnly = ($definedName['scope'] == 0) ? false : true; + + $scope = ($definedName['scope'] == 0) ? null : $this->spreadsheet->getSheetByName($this->sheets[$definedName['scope'] - 1]['name']); + + $this->spreadsheet->addNamedRange(new NamedRange((string) $definedName['name'], $docSheet, $extractedRange, $localOnly, $scope)); + } + } + // Named Value + // TODO Provide support for named values + } + } + $this->data = null; + + return $this->spreadsheet; + } + + /** + * Read record data from stream, decrypting as required. + * + * @param string $data Data stream to read from + * @param int $pos Position to start reading from + * @param int $len Record data length + * + * @return string Record data + */ + private function readRecordData($data, $pos, $len) + { + $data = substr($data, $pos, $len); + + // File not encrypted, or record before encryption start point + if ($this->encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->encryptionStartPos) { + return $data; + } + + $recordData = ''; + if ($this->encryption == self::MS_BIFF_CRYPTO_RC4) { + $oldBlock = floor($this->rc4Pos / self::REKEY_BLOCK); + $block = floor($pos / self::REKEY_BLOCK); + $endBlock = floor(($pos + $len) / self::REKEY_BLOCK); + + // Spin an RC4 decryptor to the right spot. If we have a decryptor sitting + // at a point earlier in the current block, re-use it as we can save some time. + if ($block != $oldBlock || $pos < $this->rc4Pos || !$this->rc4Key) { + $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); + $step = $pos % self::REKEY_BLOCK; + } else { + $step = $pos - $this->rc4Pos; + } + $this->rc4Key->RC4(str_repeat("\0", $step)); + + // Decrypt record data (re-keying at the end of every block) + while ($block != $endBlock) { + $step = self::REKEY_BLOCK - ($pos % self::REKEY_BLOCK); + $recordData .= $this->rc4Key->RC4(substr($data, 0, $step)); + $data = substr($data, $step); + $pos += $step; + $len -= $step; + ++$block; + $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); + } + $recordData .= $this->rc4Key->RC4(substr($data, 0, $len)); + + // Keep track of the position of this decryptor. + // We'll try and re-use it later if we can to speed things up + $this->rc4Pos = $pos + $len; + } elseif ($this->encryption == self::MS_BIFF_CRYPTO_XOR) { + throw new Exception('XOr encryption not supported'); + } + + return $recordData; + } + + /** + * Use OLE reader to extract the relevant data streams from the OLE file. + * + * @param string $pFilename + */ + private function loadOLE($pFilename) + { + // OLE reader + $ole = new OLERead(); + // get excel data, + $ole->read($pFilename); + // Get workbook data: workbook stream + sheet streams + $this->data = $ole->getStream($ole->wrkbook); + // Get summary information data + $this->summaryInformation = $ole->getStream($ole->summaryInformation); + // Get additional document summary information data + $this->documentSummaryInformation = $ole->getStream($ole->documentSummaryInformation); + } + + /** + * Read summary information. + */ + private function readSummaryInformation() + { + if (!isset($this->summaryInformation)) { + return; + } + + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + // offset: 2; size: 2; + // offset: 4; size: 2; OS version + // offset: 6; size: 2; OS indicator + // offset: 8; size: 16 + // offset: 24; size: 4; section count + $secCount = self::getInt4d($this->summaryInformation, 24); + + // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 + // offset: 44; size: 4 + $secOffset = self::getInt4d($this->summaryInformation, 44); + + // section header + // offset: $secOffset; size: 4; section length + $secLength = self::getInt4d($this->summaryInformation, $secOffset); + + // offset: $secOffset+4; size: 4; property count + $countProperties = self::getInt4d($this->summaryInformation, $secOffset + 4); + + // initialize code page (used to resolve string values) + $codePage = 'CP1252'; + + // offset: ($secOffset+8); size: var + // loop through property decarations and properties + for ($i = 0; $i < $countProperties; ++$i) { + // offset: ($secOffset+8) + (8 * $i); size: 4; property ID + $id = self::getInt4d($this->summaryInformation, ($secOffset + 8) + (8 * $i)); + + // Use value of property id as appropriate + // offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48) + $offset = self::getInt4d($this->summaryInformation, ($secOffset + 12) + (8 * $i)); + + $type = self::getInt4d($this->summaryInformation, $secOffset + $offset); + + // initialize property value + $value = null; + + // extract property value based on property type + switch ($type) { + case 0x02: // 2 byte signed integer + $value = self::getUInt2d($this->summaryInformation, $secOffset + 4 + $offset); + + break; + case 0x03: // 4 byte signed integer + $value = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); + + break; + case 0x13: // 4 byte unsigned integer + // not needed yet, fix later if necessary + break; + case 0x1E: // null-terminated string prepended by dword string length + $byteLength = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); + $value = substr($this->summaryInformation, $secOffset + 8 + $offset, $byteLength); + $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage); + $value = rtrim($value); + + break; + case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // PHP-time + $value = OLE::OLE2LocalDate(substr($this->summaryInformation, $secOffset + 4 + $offset, 8)); + + break; + case 0x47: // Clipboard format + // not needed yet, fix later if necessary + break; + } + + switch ($id) { + case 0x01: // Code Page + $codePage = CodePage::numberToName($value); + + break; + case 0x02: // Title + $this->spreadsheet->getProperties()->setTitle($value); + + break; + case 0x03: // Subject + $this->spreadsheet->getProperties()->setSubject($value); + + break; + case 0x04: // Author (Creator) + $this->spreadsheet->getProperties()->setCreator($value); + + break; + case 0x05: // Keywords + $this->spreadsheet->getProperties()->setKeywords($value); + + break; + case 0x06: // Comments (Description) + $this->spreadsheet->getProperties()->setDescription($value); + + break; + case 0x07: // Template + // Not supported by PhpSpreadsheet + break; + case 0x08: // Last Saved By (LastModifiedBy) + $this->spreadsheet->getProperties()->setLastModifiedBy($value); + + break; + case 0x09: // Revision + // Not supported by PhpSpreadsheet + break; + case 0x0A: // Total Editing Time + // Not supported by PhpSpreadsheet + break; + case 0x0B: // Last Printed + // Not supported by PhpSpreadsheet + break; + case 0x0C: // Created Date/Time + $this->spreadsheet->getProperties()->setCreated($value); + + break; + case 0x0D: // Modified Date/Time + $this->spreadsheet->getProperties()->setModified($value); + + break; + case 0x0E: // Number of Pages + // Not supported by PhpSpreadsheet + break; + case 0x0F: // Number of Words + // Not supported by PhpSpreadsheet + break; + case 0x10: // Number of Characters + // Not supported by PhpSpreadsheet + break; + case 0x11: // Thumbnail + // Not supported by PhpSpreadsheet + break; + case 0x12: // Name of creating application + // Not supported by PhpSpreadsheet + break; + case 0x13: // Security + // Not supported by PhpSpreadsheet + break; + } + } + } + + /** + * Read additional document summary information. + */ + private function readDocumentSummaryInformation() + { + if (!isset($this->documentSummaryInformation)) { + return; + } + + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + // offset: 2; size: 2; + // offset: 4; size: 2; OS version + // offset: 6; size: 2; OS indicator + // offset: 8; size: 16 + // offset: 24; size: 4; section count + $secCount = self::getInt4d($this->documentSummaryInformation, 24); + + // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae + // offset: 44; size: 4; first section offset + $secOffset = self::getInt4d($this->documentSummaryInformation, 44); + + // section header + // offset: $secOffset; size: 4; section length + $secLength = self::getInt4d($this->documentSummaryInformation, $secOffset); + + // offset: $secOffset+4; size: 4; property count + $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset + 4); + + // initialize code page (used to resolve string values) + $codePage = 'CP1252'; + + // offset: ($secOffset+8); size: var + // loop through property decarations and properties + for ($i = 0; $i < $countProperties; ++$i) { + // offset: ($secOffset+8) + (8 * $i); size: 4; property ID + $id = self::getInt4d($this->documentSummaryInformation, ($secOffset + 8) + (8 * $i)); + + // Use value of property id as appropriate + // offset: 60 + 8 * $i; size: 4; offset from beginning of section (48) + $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset + 12) + (8 * $i)); + + $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset); + + // initialize property value + $value = null; + + // extract property value based on property type + switch ($type) { + case 0x02: // 2 byte signed integer + $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); + + break; + case 0x03: // 4 byte signed integer + $value = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); + + break; + case 0x0B: // Boolean + $value = self::getUInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); + $value = ($value == 0 ? false : true); + + break; + case 0x13: // 4 byte unsigned integer + // not needed yet, fix later if necessary + break; + case 0x1E: // null-terminated string prepended by dword string length + $byteLength = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); + $value = substr($this->documentSummaryInformation, $secOffset + 8 + $offset, $byteLength); + $value = StringHelper::convertEncoding($value, 'UTF-8', $codePage); + $value = rtrim($value); + + break; + case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + // PHP-Time + $value = OLE::OLE2LocalDate(substr($this->documentSummaryInformation, $secOffset + 4 + $offset, 8)); + + break; + case 0x47: // Clipboard format + // not needed yet, fix later if necessary + break; + } + + switch ($id) { + case 0x01: // Code Page + $codePage = CodePage::numberToName($value); + + break; + case 0x02: // Category + $this->spreadsheet->getProperties()->setCategory($value); + + break; + case 0x03: // Presentation Target + // Not supported by PhpSpreadsheet + break; + case 0x04: // Bytes + // Not supported by PhpSpreadsheet + break; + case 0x05: // Lines + // Not supported by PhpSpreadsheet + break; + case 0x06: // Paragraphs + // Not supported by PhpSpreadsheet + break; + case 0x07: // Slides + // Not supported by PhpSpreadsheet + break; + case 0x08: // Notes + // Not supported by PhpSpreadsheet + break; + case 0x09: // Hidden Slides + // Not supported by PhpSpreadsheet + break; + case 0x0A: // MM Clips + // Not supported by PhpSpreadsheet + break; + case 0x0B: // Scale Crop + // Not supported by PhpSpreadsheet + break; + case 0x0C: // Heading Pairs + // Not supported by PhpSpreadsheet + break; + case 0x0D: // Titles of Parts + // Not supported by PhpSpreadsheet + break; + case 0x0E: // Manager + $this->spreadsheet->getProperties()->setManager($value); + + break; + case 0x0F: // Company + $this->spreadsheet->getProperties()->setCompany($value); + + break; + case 0x10: // Links up-to-date + // Not supported by PhpSpreadsheet + break; + } + } + } + + /** + * Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record. + */ + private function readDefault() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // move stream pointer to next record + $this->pos += 4 + $length; + } + + /** + * The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, + * this record stores a note (cell note). This feature was significantly enhanced in Excel 97. + */ + private function readNote() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + $cellAddress = $this->readBIFF8CellAddress(substr($recordData, 0, 4)); + if ($this->version == self::XLS_BIFF8) { + $noteObjID = self::getUInt2d($recordData, 6); + $noteAuthor = self::readUnicodeStringLong(substr($recordData, 8)); + $noteAuthor = $noteAuthor['value']; + $this->cellNotes[$noteObjID] = [ + 'cellRef' => $cellAddress, + 'objectID' => $noteObjID, + 'author' => $noteAuthor, + ]; + } else { + $extension = false; + if ($cellAddress == '$B$65536') { + // If the address row is -1 and the column is 0, (which translates as $B$65536) then this is a continuation + // note from the previous cell annotation. We're not yet handling this, so annotations longer than the + // max 2048 bytes will probably throw a wobbly. + $row = self::getUInt2d($recordData, 0); + $extension = true; + $cellAddress = array_pop(array_keys($this->phpSheet->getComments())); + } + + $cellAddress = str_replace('$', '', $cellAddress); + $noteLength = self::getUInt2d($recordData, 4); + $noteText = trim(substr($recordData, 6)); + + if ($extension) { + // Concatenate this extension with the currently set comment for the cell + $comment = $this->phpSheet->getComment($cellAddress); + $commentText = $comment->getText()->getPlainText(); + $comment->setText($this->parseRichText($commentText . $noteText)); + } else { + // Set comment for the cell + $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText)); +// ->setAuthor($author) + } + } + } + + /** + * The TEXT Object record contains the text associated with a cell annotation. + */ + private function readTextObject() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // recordData consists of an array of subrecords looking like this: + // grbit: 2 bytes; Option Flags + // rot: 2 bytes; rotation + // cchText: 2 bytes; length of the text (in the first continue record) + // cbRuns: 2 bytes; length of the formatting (in the second continue record) + // followed by the continuation records containing the actual text and formatting + $grbitOpts = self::getUInt2d($recordData, 0); + $rot = self::getUInt2d($recordData, 2); + $cchText = self::getUInt2d($recordData, 10); + $cbRuns = self::getUInt2d($recordData, 12); + $text = $this->getSplicedRecordData(); + + $textByte = $text['spliceOffsets'][1] - $text['spliceOffsets'][0] - 1; + $textStr = substr($text['recordData'], $text['spliceOffsets'][0] + 1, $textByte); + // get 1 byte + $is16Bit = ord($text['recordData'][0]); + // it is possible to use a compressed format, + // which omits the high bytes of all characters, if they are all zero + if (($is16Bit & 0x01) === 0) { + $textStr = StringHelper::ConvertEncoding($textStr, 'UTF-8', 'ISO-8859-1'); + } else { + $textStr = $this->decodeCodepage($textStr); + } + + $this->textObjects[$this->textObjRef] = [ + 'text' => $textStr, + 'format' => substr($text['recordData'], $text['spliceOffsets'][1], $cbRuns), + 'alignment' => $grbitOpts, + 'rotation' => $rot, + ]; + } + + /** + * Read BOF. + */ + private function readBof() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = substr($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 2; size: 2; type of the following data + $substreamType = self::getUInt2d($recordData, 2); + + switch ($substreamType) { + case self::XLS_WORKBOOKGLOBALS: + $version = self::getUInt2d($recordData, 0); + if (($version != self::XLS_BIFF8) && ($version != self::XLS_BIFF7)) { + throw new Exception('Cannot read this Excel file. Version is too old.'); + } + $this->version = $version; + + break; + case self::XLS_WORKSHEET: + // do not use this version information for anything + // it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream + break; + default: + // substream, e.g. chart + // just skip the entire substream + do { + $code = self::getUInt2d($this->data, $this->pos); + $this->readDefault(); + } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize); + + break; + } + } + + /** + * FILEPASS. + * + * This record is part of the File Protection Block. It + * contains information about the read/write password of the + * file. All record contents following this record will be + * encrypted. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + * + * The decryption functions and objects used from here on in + * are based on the source of Spreadsheet-ParseExcel: + * https://metacpan.org/release/Spreadsheet-ParseExcel + */ + private function readFilepass() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + if ($length != 54) { + throw new Exception('Unexpected file pass record length'); + } + + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->verifyPassword('VelvetSweatshop', substr($recordData, 6, 16), substr($recordData, 22, 16), substr($recordData, 38, 16), $this->md5Ctxt)) { + throw new Exception('Decryption password incorrect'); + } + + $this->encryption = self::MS_BIFF_CRYPTO_RC4; + + // Decryption required from the record after next onwards + $this->encryptionStartPos = $this->pos + self::getUInt2d($this->data, $this->pos + 2); + } + + /** + * Make an RC4 decryptor for the given block. + * + * @param int $block Block for which to create decrypto + * @param string $valContext MD5 context state + * + * @return Xls\RC4 + */ + private function makeKey($block, $valContext) + { + $pwarray = str_repeat("\0", 64); + + for ($i = 0; $i < 5; ++$i) { + $pwarray[$i] = $valContext[$i]; + } + + $pwarray[5] = chr($block & 0xff); + $pwarray[6] = chr(($block >> 8) & 0xff); + $pwarray[7] = chr(($block >> 16) & 0xff); + $pwarray[8] = chr(($block >> 24) & 0xff); + + $pwarray[9] = "\x80"; + $pwarray[56] = "\x48"; + + $md5 = new Xls\MD5(); + $md5->add($pwarray); + + $s = $md5->getContext(); + + return new Xls\RC4($s); + } + + /** + * Verify RC4 file password. + * + * @param string $password Password to check + * @param string $docid Document id + * @param string $salt_data Salt data + * @param string $hashedsalt_data Hashed salt data + * @param string $valContext Set to the MD5 context of the value + * + * @return bool Success + */ + private function verifyPassword($password, $docid, $salt_data, $hashedsalt_data, &$valContext) + { + $pwarray = str_repeat("\0", 64); + + $iMax = strlen($password); + for ($i = 0; $i < $iMax; ++$i) { + $o = ord(substr($password, $i, 1)); + $pwarray[2 * $i] = chr($o & 0xff); + $pwarray[2 * $i + 1] = chr(($o >> 8) & 0xff); + } + $pwarray[2 * $i] = chr(0x80); + $pwarray[56] = chr(($i << 4) & 0xff); + + $md5 = new Xls\MD5(); + $md5->add($pwarray); + + $mdContext1 = $md5->getContext(); + + $offset = 0; + $keyoffset = 0; + $tocopy = 5; + + $md5->reset(); + + while ($offset != 16) { + if ((64 - $offset) < 5) { + $tocopy = 64 - $offset; + } + for ($i = 0; $i <= $tocopy; ++$i) { + $pwarray[$offset + $i] = $mdContext1[$keyoffset + $i]; + } + $offset += $tocopy; + + if ($offset == 64) { + $md5->add($pwarray); + $keyoffset = $tocopy; + $tocopy = 5 - $tocopy; + $offset = 0; + + continue; + } + + $keyoffset = 0; + $tocopy = 5; + for ($i = 0; $i < 16; ++$i) { + $pwarray[$offset + $i] = $docid[$i]; + } + $offset += 16; + } + + $pwarray[16] = "\x80"; + for ($i = 0; $i < 47; ++$i) { + $pwarray[17 + $i] = "\0"; + } + $pwarray[56] = "\x80"; + $pwarray[57] = "\x0a"; + + $md5->add($pwarray); + $valContext = $md5->getContext(); + + $key = $this->makeKey(0, $valContext); + + $salt = $key->RC4($salt_data); + $hashedsalt = $key->RC4($hashedsalt_data); + + $salt .= "\x80" . str_repeat("\0", 47); + $salt[56] = "\x80"; + + $md5->reset(); + $md5->add($salt); + $mdContext2 = $md5->getContext(); + + return $mdContext2 == $hashedsalt; + } + + /** + * CODEPAGE. + * + * This record stores the text encoding used to write byte + * strings, stored as MS Windows code page identifier. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readCodepage() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; code page identifier + $codepage = self::getUInt2d($recordData, 0); + + $this->codepage = CodePage::numberToName($codepage); + } + + /** + * DATEMODE. + * + * This record specifies the base date for displaying date + * values. All dates are stored as count of days past this + * base date. In BIFF2-BIFF4 this record is part of the + * Calculation Settings Block. In BIFF5-BIFF8 it is + * stored in the Workbook Globals Substream. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readDateMode() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; 0 = base 1900, 1 = base 1904 + Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); + if (ord($recordData[0]) == 1) { + Date::setExcelCalendar(Date::CALENDAR_MAC_1904); + } + } + + /** + * Read a FONT record. + */ + private function readFont() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + $objFont = new Font(); + + // offset: 0; size: 2; height of the font (in twips = 1/20 of a point) + $size = self::getUInt2d($recordData, 0); + $objFont->setSize($size / 20); + + // offset: 2; size: 2; option flags + // bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8) + // bit: 1; mask 0x0002; italic + $isItalic = (0x0002 & self::getUInt2d($recordData, 2)) >> 1; + if ($isItalic) { + $objFont->setItalic(true); + } + + // bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8) + // bit: 3; mask 0x0008; strikethrough + $isStrike = (0x0008 & self::getUInt2d($recordData, 2)) >> 3; + if ($isStrike) { + $objFont->setStrikethrough(true); + } + + // offset: 4; size: 2; colour index + $colorIndex = self::getUInt2d($recordData, 4); + $objFont->colorIndex = $colorIndex; + + // offset: 6; size: 2; font weight + $weight = self::getUInt2d($recordData, 6); + switch ($weight) { + case 0x02BC: + $objFont->setBold(true); + + break; + } + + // offset: 8; size: 2; escapement type + $escapement = self::getUInt2d($recordData, 8); + switch ($escapement) { + case 0x0001: + $objFont->setSuperscript(true); + + break; + case 0x0002: + $objFont->setSubscript(true); + + break; + } + + // offset: 10; size: 1; underline type + $underlineType = ord($recordData[10]); + switch ($underlineType) { + case 0x00: + break; // no underline + case 0x01: + $objFont->setUnderline(Font::UNDERLINE_SINGLE); + + break; + case 0x02: + $objFont->setUnderline(Font::UNDERLINE_DOUBLE); + + break; + case 0x21: + $objFont->setUnderline(Font::UNDERLINE_SINGLEACCOUNTING); + + break; + case 0x22: + $objFont->setUnderline(Font::UNDERLINE_DOUBLEACCOUNTING); + + break; + } + + // offset: 11; size: 1; font family + // offset: 12; size: 1; character set + // offset: 13; size: 1; not used + // offset: 14; size: var; font name + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringShort(substr($recordData, 14)); + } else { + $string = $this->readByteStringShort(substr($recordData, 14)); + } + $objFont->setName($string['value']); + + $this->objFonts[] = $objFont; + } + } + + /** + * FORMAT. + * + * This record contains information about a number format. + * All FORMAT records occur together in a sequential list. + * + * In BIFF2-BIFF4 other records referencing a FORMAT record + * contain a zero-based index into this list. From BIFF5 on + * the FORMAT record contains the index itself that will be + * used by other records. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readFormat() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + $indexCode = self::getUInt2d($recordData, 0); + + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong(substr($recordData, 2)); + } else { + // BIFF7 + $string = $this->readByteStringShort(substr($recordData, 2)); + } + + $formatString = $string['value']; + $this->formats[$indexCode] = $formatString; + } + } + + /** + * XF - Extended Format. + * + * This record contains formatting information for cells, rows, columns or styles. + * According to https://support.microsoft.com/en-us/help/147732 there are always at least 15 cell style XF + * and 1 cell XF. + * Inspection of Excel files generated by MS Office Excel shows that XF records 0-14 are cell style XF + * and XF record 15 is a cell XF + * We only read the first cell style XF and skip the remaining cell style XF records + * We read all cell XF records. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readXf() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + $objStyle = new Style(); + + if (!$this->readDataOnly) { + // offset: 0; size: 2; Index to FONT record + if (self::getUInt2d($recordData, 0) < 4) { + $fontIndex = self::getUInt2d($recordData, 0); + } else { + // this has to do with that index 4 is omitted in all BIFF versions for some strange reason + // check the OpenOffice documentation of the FONT record + $fontIndex = self::getUInt2d($recordData, 0) - 1; + } + $objStyle->setFont($this->objFonts[$fontIndex]); + + // offset: 2; size: 2; Index to FORMAT record + $numberFormatIndex = self::getUInt2d($recordData, 2); + if (isset($this->formats[$numberFormatIndex])) { + // then we have user-defined format code + $numberFormat = ['formatCode' => $this->formats[$numberFormatIndex]]; + } elseif (($code = NumberFormat::builtInFormatCode($numberFormatIndex)) !== '') { + // then we have built-in format code + $numberFormat = ['formatCode' => $code]; + } else { + // we set the general format code + $numberFormat = ['formatCode' => 'General']; + } + $objStyle->getNumberFormat()->setFormatCode($numberFormat['formatCode']); + + // offset: 4; size: 2; XF type, cell protection, and parent style XF + // bit 2-0; mask 0x0007; XF_TYPE_PROT + $xfTypeProt = self::getUInt2d($recordData, 4); + // bit 0; mask 0x01; 1 = cell is locked + $isLocked = (0x01 & $xfTypeProt) >> 0; + $objStyle->getProtection()->setLocked($isLocked ? Protection::PROTECTION_INHERIT : Protection::PROTECTION_UNPROTECTED); + + // bit 1; mask 0x02; 1 = Formula is hidden + $isHidden = (0x02 & $xfTypeProt) >> 1; + $objStyle->getProtection()->setHidden($isHidden ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED); + + // bit 2; mask 0x04; 0 = Cell XF, 1 = Cell Style XF + $isCellStyleXf = (0x04 & $xfTypeProt) >> 2; + + // offset: 6; size: 1; Alignment and text break + // bit 2-0, mask 0x07; horizontal alignment + $horAlign = (0x07 & ord($recordData[6])) >> 0; + switch ($horAlign) { + case 0: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_GENERAL); + + break; + case 1: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT); + + break; + case 2: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER); + + break; + case 3: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_RIGHT); + + break; + case 4: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_FILL); + + break; + case 5: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_JUSTIFY); + + break; + case 6: + $objStyle->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER_CONTINUOUS); + + break; + } + // bit 3, mask 0x08; wrap text + $wrapText = (0x08 & ord($recordData[6])) >> 3; + switch ($wrapText) { + case 0: + $objStyle->getAlignment()->setWrapText(false); + + break; + case 1: + $objStyle->getAlignment()->setWrapText(true); + + break; + } + // bit 6-4, mask 0x70; vertical alignment + $vertAlign = (0x70 & ord($recordData[6])) >> 4; + switch ($vertAlign) { + case 0: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_TOP); + + break; + case 1: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_CENTER); + + break; + case 2: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_BOTTOM); + + break; + case 3: + $objStyle->getAlignment()->setVertical(Alignment::VERTICAL_JUSTIFY); + + break; + } + + if ($this->version == self::XLS_BIFF8) { + // offset: 7; size: 1; XF_ROTATION: Text rotation angle + $angle = ord($recordData[7]); + $rotation = 0; + if ($angle <= 90) { + $rotation = $angle; + } elseif ($angle <= 180) { + $rotation = 90 - $angle; + } elseif ($angle == 255) { + $rotation = -165; + } + $objStyle->getAlignment()->setTextRotation($rotation); + + // offset: 8; size: 1; Indentation, shrink to cell size, and text direction + // bit: 3-0; mask: 0x0F; indent level + $indent = (0x0F & ord($recordData[8])) >> 0; + $objStyle->getAlignment()->setIndent($indent); + + // bit: 4; mask: 0x10; 1 = shrink content to fit into cell + $shrinkToFit = (0x10 & ord($recordData[8])) >> 4; + switch ($shrinkToFit) { + case 0: + $objStyle->getAlignment()->setShrinkToFit(false); + + break; + case 1: + $objStyle->getAlignment()->setShrinkToFit(true); + + break; + } + + // offset: 9; size: 1; Flags used for attribute groups + + // offset: 10; size: 4; Cell border lines and background area + // bit: 3-0; mask: 0x0000000F; left style + if ($bordersLeftStyle = Xls\Style\Border::lookup((0x0000000F & self::getInt4d($recordData, 10)) >> 0)) { + $objStyle->getBorders()->getLeft()->setBorderStyle($bordersLeftStyle); + } + // bit: 7-4; mask: 0x000000F0; right style + if ($bordersRightStyle = Xls\Style\Border::lookup((0x000000F0 & self::getInt4d($recordData, 10)) >> 4)) { + $objStyle->getBorders()->getRight()->setBorderStyle($bordersRightStyle); + } + // bit: 11-8; mask: 0x00000F00; top style + if ($bordersTopStyle = Xls\Style\Border::lookup((0x00000F00 & self::getInt4d($recordData, 10)) >> 8)) { + $objStyle->getBorders()->getTop()->setBorderStyle($bordersTopStyle); + } + // bit: 15-12; mask: 0x0000F000; bottom style + if ($bordersBottomStyle = Xls\Style\Border::lookup((0x0000F000 & self::getInt4d($recordData, 10)) >> 12)) { + $objStyle->getBorders()->getBottom()->setBorderStyle($bordersBottomStyle); + } + // bit: 22-16; mask: 0x007F0000; left color + $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & self::getInt4d($recordData, 10)) >> 16; + + // bit: 29-23; mask: 0x3F800000; right color + $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & self::getInt4d($recordData, 10)) >> 23; + + // bit: 30; mask: 0x40000000; 1 = diagonal line from top left to right bottom + $diagonalDown = (0x40000000 & self::getInt4d($recordData, 10)) >> 30 ? true : false; + + // bit: 31; mask: 0x80000000; 1 = diagonal line from bottom left to top right + $diagonalUp = (0x80000000 & self::getInt4d($recordData, 10)) >> 31 ? true : false; + + if ($diagonalUp == false && $diagonalDown == false) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp == true && $diagonalDown == false) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif ($diagonalUp == false && $diagonalDown == true) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } elseif ($diagonalUp == true && $diagonalDown == true) { + $objStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + + // offset: 14; size: 4; + // bit: 6-0; mask: 0x0000007F; top color + $objStyle->getBorders()->getTop()->colorIndex = (0x0000007F & self::getInt4d($recordData, 14)) >> 0; + + // bit: 13-7; mask: 0x00003F80; bottom color + $objStyle->getBorders()->getBottom()->colorIndex = (0x00003F80 & self::getInt4d($recordData, 14)) >> 7; + + // bit: 20-14; mask: 0x001FC000; diagonal color + $objStyle->getBorders()->getDiagonal()->colorIndex = (0x001FC000 & self::getInt4d($recordData, 14)) >> 14; + + // bit: 24-21; mask: 0x01E00000; diagonal style + if ($bordersDiagonalStyle = Xls\Style\Border::lookup((0x01E00000 & self::getInt4d($recordData, 14)) >> 21)) { + $objStyle->getBorders()->getDiagonal()->setBorderStyle($bordersDiagonalStyle); + } + + // bit: 31-26; mask: 0xFC000000 fill pattern + if ($fillType = Xls\Style\FillPattern::lookup((0xFC000000 & self::getInt4d($recordData, 14)) >> 26)) { + $objStyle->getFill()->setFillType($fillType); + } + // offset: 18; size: 2; pattern and background colour + // bit: 6-0; mask: 0x007F; color index for pattern color + $objStyle->getFill()->startcolorIndex = (0x007F & self::getUInt2d($recordData, 18)) >> 0; + + // bit: 13-7; mask: 0x3F80; color index for pattern background + $objStyle->getFill()->endcolorIndex = (0x3F80 & self::getUInt2d($recordData, 18)) >> 7; + } else { + // BIFF5 + + // offset: 7; size: 1; Text orientation and flags + $orientationAndFlags = ord($recordData[7]); + + // bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation + $xfOrientation = (0x03 & $orientationAndFlags) >> 0; + switch ($xfOrientation) { + case 0: + $objStyle->getAlignment()->setTextRotation(0); + + break; + case 1: + $objStyle->getAlignment()->setTextRotation(-165); + + break; + case 2: + $objStyle->getAlignment()->setTextRotation(90); + + break; + case 3: + $objStyle->getAlignment()->setTextRotation(-90); + + break; + } + + // offset: 8; size: 4; cell border lines and background area + $borderAndBackground = self::getInt4d($recordData, 8); + + // bit: 6-0; mask: 0x0000007F; color index for pattern color + $objStyle->getFill()->startcolorIndex = (0x0000007F & $borderAndBackground) >> 0; + + // bit: 13-7; mask: 0x00003F80; color index for pattern background + $objStyle->getFill()->endcolorIndex = (0x00003F80 & $borderAndBackground) >> 7; + + // bit: 21-16; mask: 0x003F0000; fill pattern + $objStyle->getFill()->setFillType(Xls\Style\FillPattern::lookup((0x003F0000 & $borderAndBackground) >> 16)); + + // bit: 24-22; mask: 0x01C00000; bottom line style + $objStyle->getBorders()->getBottom()->setBorderStyle(Xls\Style\Border::lookup((0x01C00000 & $borderAndBackground) >> 22)); + + // bit: 31-25; mask: 0xFE000000; bottom line color + $objStyle->getBorders()->getBottom()->colorIndex = (0xFE000000 & $borderAndBackground) >> 25; + + // offset: 12; size: 4; cell border lines + $borderLines = self::getInt4d($recordData, 12); + + // bit: 2-0; mask: 0x00000007; top line style + $objStyle->getBorders()->getTop()->setBorderStyle(Xls\Style\Border::lookup((0x00000007 & $borderLines) >> 0)); + + // bit: 5-3; mask: 0x00000038; left line style + $objStyle->getBorders()->getLeft()->setBorderStyle(Xls\Style\Border::lookup((0x00000038 & $borderLines) >> 3)); + + // bit: 8-6; mask: 0x000001C0; right line style + $objStyle->getBorders()->getRight()->setBorderStyle(Xls\Style\Border::lookup((0x000001C0 & $borderLines) >> 6)); + + // bit: 15-9; mask: 0x0000FE00; top line color index + $objStyle->getBorders()->getTop()->colorIndex = (0x0000FE00 & $borderLines) >> 9; + + // bit: 22-16; mask: 0x007F0000; left line color index + $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & $borderLines) >> 16; + + // bit: 29-23; mask: 0x3F800000; right line color index + $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & $borderLines) >> 23; + } + + // add cellStyleXf or cellXf and update mapping + if ($isCellStyleXf) { + // we only read one style XF record which is always the first + if ($this->xfIndex == 0) { + $this->spreadsheet->addCellStyleXf($objStyle); + $this->mapCellStyleXfIndex[$this->xfIndex] = 0; + } + } else { + // we read all cell XF records + $this->spreadsheet->addCellXf($objStyle); + $this->mapCellXfIndex[$this->xfIndex] = count($this->spreadsheet->getCellXfCollection()) - 1; + } + + // update XF index for when we read next record + ++$this->xfIndex; + } + } + + private function readXfExt() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0x087D = repeated header + + // offset: 2; size: 2 + + // offset: 4; size: 8; not used + + // offset: 12; size: 2; record version + + // offset: 14; size: 2; index to XF record which this record modifies + $ixfe = self::getUInt2d($recordData, 14); + + // offset: 16; size: 2; not used + + // offset: 18; size: 2; number of extension properties that follow + $cexts = self::getUInt2d($recordData, 18); + + // start reading the actual extension data + $offset = 20; + while ($offset < $length) { + // extension type + $extType = self::getUInt2d($recordData, $offset); + + // extension length + $cb = self::getUInt2d($recordData, $offset + 2); + + // extension data + $extData = substr($recordData, $offset + 4, $cb); + + switch ($extType) { + case 4: // fill start color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); + $fill->getStartColor()->setRGB($rgb); + unset($fill->startcolorIndex); // normal color index does not apply, discard + } + } + + break; + case 5: // fill end color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $fill = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); + $fill->getEndColor()->setRGB($rgb); + unset($fill->endcolorIndex); // normal color index does not apply, discard + } + } + + break; + case 7: // border color top + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $top = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getTop(); + $top->getColor()->setRGB($rgb); + unset($top->colorIndex); // normal color index does not apply, discard + } + } + + break; + case 8: // border color bottom + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $bottom = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getBottom(); + $bottom->getColor()->setRGB($rgb); + unset($bottom->colorIndex); // normal color index does not apply, discard + } + } + + break; + case 9: // border color left + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $left = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getLeft(); + $left->getColor()->setRGB($rgb); + unset($left->colorIndex); // normal color index does not apply, discard + } + } + + break; + case 10: // border color right + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $right = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getRight(); + $right->getColor()->setRGB($rgb); + unset($right->colorIndex); // normal color index does not apply, discard + } + } + + break; + case 11: // border color diagonal + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $diagonal = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getDiagonal(); + $diagonal->getColor()->setRGB($rgb); + unset($diagonal->colorIndex); // normal color index does not apply, discard + } + } + + break; + case 13: // font color + $xclfType = self::getUInt2d($extData, 0); // color type + $xclrValue = substr($extData, 4, 4); // color value (value based on color type) + + if ($xclfType == 2) { + $rgb = sprintf('%02X%02X%02X', ord($xclrValue[0]), ord($xclrValue[1]), ord($xclrValue[2])); + + // modify the relevant style property + if (isset($this->mapCellXfIndex[$ixfe])) { + $font = $this->spreadsheet->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFont(); + $font->getColor()->setRGB($rgb); + unset($font->colorIndex); // normal color index does not apply, discard + } + } + + break; + } + + $offset += $cb; + } + } + } + + /** + * Read STYLE record. + */ + private function readStyle() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index to XF record and flag for built-in style + $ixfe = self::getUInt2d($recordData, 0); + + // bit: 11-0; mask 0x0FFF; index to XF record + $xfIndex = (0x0FFF & $ixfe) >> 0; + + // bit: 15; mask 0x8000; 0 = user-defined style, 1 = built-in style + $isBuiltIn = (bool) ((0x8000 & $ixfe) >> 15); + + if ($isBuiltIn) { + // offset: 2; size: 1; identifier for built-in style + $builtInId = ord($recordData[2]); + + switch ($builtInId) { + case 0x00: + // currently, we are not using this for anything + break; + default: + break; + } + } + // user-defined; not supported by PhpSpreadsheet + } + } + + /** + * Read PALETTE record. + */ + private function readPalette() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; number of following colors + $nm = self::getUInt2d($recordData, 0); + + // list of RGB colors + for ($i = 0; $i < $nm; ++$i) { + $rgb = substr($recordData, 2 + 4 * $i, 4); + $this->palette[] = self::readRGB($rgb); + } + } + } + + /** + * SHEET. + * + * This record is located in the Workbook Globals + * Substream and represents a sheet inside the workbook. + * One SHEET record is written for each sheet. It stores the + * sheet name and a stream offset to the BOF record of the + * respective Sheet Substream within the Workbook Stream. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readSheet() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // offset: 0; size: 4; absolute stream position of the BOF record of the sheet + // NOTE: not encrypted + $rec_offset = self::getInt4d($this->data, $this->pos + 4); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 4; size: 1; sheet state + switch (ord($recordData[4])) { + case 0x00: + $sheetState = Worksheet::SHEETSTATE_VISIBLE; + + break; + case 0x01: + $sheetState = Worksheet::SHEETSTATE_HIDDEN; + + break; + case 0x02: + $sheetState = Worksheet::SHEETSTATE_VERYHIDDEN; + + break; + default: + $sheetState = Worksheet::SHEETSTATE_VISIBLE; + + break; + } + + // offset: 5; size: 1; sheet type + $sheetType = ord($recordData[5]); + + // offset: 6; size: var; sheet name + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringShort(substr($recordData, 6)); + $rec_name = $string['value']; + } elseif ($this->version == self::XLS_BIFF7) { + $string = $this->readByteStringShort(substr($recordData, 6)); + $rec_name = $string['value']; + } + + $this->sheets[] = [ + 'name' => $rec_name, + 'offset' => $rec_offset, + 'sheetState' => $sheetState, + 'sheetType' => $sheetType, + ]; + } + + /** + * Read EXTERNALBOOK record. + */ + private function readExternalBook() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset within record data + $offset = 0; + + // there are 4 types of records + if (strlen($recordData) > 4) { + // external reference + // offset: 0; size: 2; number of sheet names ($nm) + $nm = self::getUInt2d($recordData, 0); + $offset += 2; + + // offset: 2; size: var; encoded URL without sheet name (Unicode string, 16-bit length) + $encodedUrlString = self::readUnicodeStringLong(substr($recordData, 2)); + $offset += $encodedUrlString['size']; + + // offset: var; size: var; list of $nm sheet names (Unicode strings, 16-bit length) + $externalSheetNames = []; + for ($i = 0; $i < $nm; ++$i) { + $externalSheetNameString = self::readUnicodeStringLong(substr($recordData, $offset)); + $externalSheetNames[] = $externalSheetNameString['value']; + $offset += $externalSheetNameString['size']; + } + + // store the record data + $this->externalBooks[] = [ + 'type' => 'external', + 'encodedUrl' => $encodedUrlString['value'], + 'externalSheetNames' => $externalSheetNames, + ]; + } elseif (substr($recordData, 2, 2) == pack('CC', 0x01, 0x04)) { + // internal reference + // offset: 0; size: 2; number of sheet in this document + // offset: 2; size: 2; 0x01 0x04 + $this->externalBooks[] = [ + 'type' => 'internal', + ]; + } elseif (substr($recordData, 0, 4) == pack('vCC', 0x0001, 0x01, 0x3A)) { + // add-in function + // offset: 0; size: 2; 0x0001 + $this->externalBooks[] = [ + 'type' => 'addInFunction', + ]; + } elseif (substr($recordData, 0, 2) == pack('v', 0x0000)) { + // DDE links, OLE links + // offset: 0; size: 2; 0x0000 + // offset: 2; size: var; encoded source document name + $this->externalBooks[] = [ + 'type' => 'DDEorOLE', + ]; + } + } + + /** + * Read EXTERNNAME record. + */ + private function readExternName() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // external sheet references provided for named cells + if ($this->version == self::XLS_BIFF8) { + // offset: 0; size: 2; options + $options = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; + + // offset: 4; size: 2; not used + + // offset: 6; size: var + $nameString = self::readUnicodeStringShort(substr($recordData, 6)); + + // offset: var; size: var; formula data + $offset = 6 + $nameString['size']; + $formula = $this->getFormulaFromStructure(substr($recordData, $offset)); + + $this->externalNames[] = [ + 'name' => $nameString['value'], + 'formula' => $formula, + ]; + } + } + + /** + * Read EXTERNSHEET record. + */ + private function readExternSheet() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // external sheet references provided for named cells + if ($this->version == self::XLS_BIFF8) { + // offset: 0; size: 2; number of following ref structures + $nm = self::getUInt2d($recordData, 0); + for ($i = 0; $i < $nm; ++$i) { + $this->ref[] = [ + // offset: 2 + 6 * $i; index to EXTERNALBOOK record + 'externalBookIndex' => self::getUInt2d($recordData, 2 + 6 * $i), + // offset: 4 + 6 * $i; index to first sheet in EXTERNALBOOK record + 'firstSheetIndex' => self::getUInt2d($recordData, 4 + 6 * $i), + // offset: 6 + 6 * $i; index to last sheet in EXTERNALBOOK record + 'lastSheetIndex' => self::getUInt2d($recordData, 6 + 6 * $i), + ]; + } + } + } + + /** + * DEFINEDNAME. + * + * This record is part of a Link Table. It contains the name + * and the token array of an internal defined name. Token + * arrays of defined names contain tokens with aberrant + * token classes. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readDefinedName() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8) { + // retrieves named cells + + // offset: 0; size: 2; option flags + $opts = self::getUInt2d($recordData, 0); + + // bit: 5; mask: 0x0020; 0 = user-defined name, 1 = built-in-name + $isBuiltInName = (0x0020 & $opts) >> 5; + + // offset: 2; size: 1; keyboard shortcut + + // offset: 3; size: 1; length of the name (character count) + $nlen = ord($recordData[3]); + + // offset: 4; size: 2; size of the formula data (it can happen that this is zero) + // note: there can also be additional data, this is not included in $flen + $flen = self::getUInt2d($recordData, 4); + + // offset: 8; size: 2; 0=Global name, otherwise index to sheet (1-based) + $scope = self::getUInt2d($recordData, 8); + + // offset: 14; size: var; Name (Unicode string without length field) + $string = self::readUnicodeString(substr($recordData, 14), $nlen); + + // offset: var; size: $flen; formula data + $offset = 14 + $string['size']; + $formulaStructure = pack('v', $flen) . substr($recordData, $offset); + + try { + $formula = $this->getFormulaFromStructure($formulaStructure); + } catch (PhpSpreadsheetException $e) { + $formula = ''; + } + + $this->definedname[] = [ + 'isBuiltInName' => $isBuiltInName, + 'name' => $string['value'], + 'formula' => $formula, + 'scope' => $scope, + ]; + } + } + + /** + * Read MSODRAWINGGROUP record. + */ + private function readMsoDrawingGroup() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + $recordData = $splicedRecordData['recordData']; + + $this->drawingGroupData .= $recordData; + } + + /** + * SST - Shared String Table. + * + * This record contains a list of all strings used anywhere + * in the workbook. Each string occurs only once. The + * workbook uses indexes into the list to reference the + * strings. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readSst() + { + // offset within (spliced) record data + $pos = 0; + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + + $recordData = $splicedRecordData['recordData']; + $spliceOffsets = $splicedRecordData['spliceOffsets']; + + // offset: 0; size: 4; total number of strings in the workbook + $pos += 4; + + // offset: 4; size: 4; number of following strings ($nm) + $nm = self::getInt4d($recordData, 4); + $pos += 4; + + // loop through the Unicode strings (16-bit length) + for ($i = 0; $i < $nm; ++$i) { + // number of characters in the Unicode string + $numChars = self::getUInt2d($recordData, $pos); + $pos += 2; + + // option flags + $optionFlags = ord($recordData[$pos]); + ++$pos; + + // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed + $isCompressed = (($optionFlags & 0x01) == 0); + + // bit: 2; mask: 0x02; 0 = ordinary; 1 = Asian phonetic + $hasAsian = (($optionFlags & 0x04) != 0); + + // bit: 3; mask: 0x03; 0 = ordinary; 1 = Rich-Text + $hasRichText = (($optionFlags & 0x08) != 0); + + if ($hasRichText) { + // number of Rich-Text formatting runs + $formattingRuns = self::getUInt2d($recordData, $pos); + $pos += 2; + } + + if ($hasAsian) { + // size of Asian phonetic setting + $extendedRunLength = self::getInt4d($recordData, $pos); + $pos += 4; + } + + // expected byte length of character array if not split + $len = ($isCompressed) ? $numChars : $numChars * 2; + + // look up limit position + foreach ($spliceOffsets as $spliceOffset) { + // it can happen that the string is empty, therefore we need + // <= and not just < + if ($pos <= $spliceOffset) { + $limitpos = $spliceOffset; + + break; + } + } + + if ($pos + $len <= $limitpos) { + // character array is not split between records + + $retstr = substr($recordData, $pos, $len); + $pos += $len; + } else { + // character array is split between records + + // first part of character array + $retstr = substr($recordData, $pos, $limitpos - $pos); + + $bytesRead = $limitpos - $pos; + + // remaining characters in Unicode string + $charsLeft = $numChars - (($isCompressed) ? $bytesRead : ($bytesRead / 2)); + + $pos = $limitpos; + + // keep reading the characters + while ($charsLeft > 0) { + // look up next limit position, in case the string span more than one continue record + foreach ($spliceOffsets as $spliceOffset) { + if ($pos < $spliceOffset) { + $limitpos = $spliceOffset; + + break; + } + } + + // repeated option flags + // OpenOffice.org documentation 5.21 + $option = ord($recordData[$pos]); + ++$pos; + + if ($isCompressed && ($option == 0)) { + // 1st fragment compressed + // this fragment compressed + $len = min($charsLeft, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len; + $isCompressed = true; + } elseif (!$isCompressed && ($option != 0)) { + // 1st fragment uncompressed + // this fragment uncompressed + $len = min($charsLeft * 2, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len / 2; + $isCompressed = false; + } elseif (!$isCompressed && ($option == 0)) { + // 1st fragment uncompressed + // this fragment compressed + $len = min($charsLeft, $limitpos - $pos); + for ($j = 0; $j < $len; ++$j) { + $retstr .= $recordData[$pos + $j] + . chr(0); + } + $charsLeft -= $len; + $isCompressed = false; + } else { + // 1st fragment compressed + // this fragment uncompressed + $newstr = ''; + $jMax = strlen($retstr); + for ($j = 0; $j < $jMax; ++$j) { + $newstr .= $retstr[$j] . chr(0); + } + $retstr = $newstr; + $len = min($charsLeft * 2, $limitpos - $pos); + $retstr .= substr($recordData, $pos, $len); + $charsLeft -= $len / 2; + $isCompressed = false; + } + + $pos += $len; + } + } + + // convert to UTF-8 + $retstr = self::encodeUTF16($retstr, $isCompressed); + + // read additional Rich-Text information, if any + $fmtRuns = []; + if ($hasRichText) { + // list of formatting runs + for ($j = 0; $j < $formattingRuns; ++$j) { + // first formatted character; zero-based + $charPos = self::getUInt2d($recordData, $pos + $j * 4); + + // index to font record + $fontIndex = self::getUInt2d($recordData, $pos + 2 + $j * 4); + + $fmtRuns[] = [ + 'charPos' => $charPos, + 'fontIndex' => $fontIndex, + ]; + } + $pos += 4 * $formattingRuns; + } + + // read additional Asian phonetics information, if any + if ($hasAsian) { + // For Asian phonetic settings, we skip the extended string data + $pos += $extendedRunLength; + } + + // store the shared sting + $this->sst[] = [ + 'value' => $retstr, + 'fmtRuns' => $fmtRuns, + ]; + } + + // getSplicedRecordData() takes care of moving current position in data stream + } + + /** + * Read PRINTGRIDLINES record. + */ + private function readPrintGridlines() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; 0 = do not print sheet grid lines; 1 = print sheet gridlines + $printGridlines = (bool) self::getUInt2d($recordData, 0); + $this->phpSheet->setPrintGridlines($printGridlines); + } + } + + /** + * Read DEFAULTROWHEIGHT record. + */ + private function readDefaultRowHeight() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; option flags + // offset: 2; size: 2; default height for unused rows, (twips 1/20 point) + $height = self::getUInt2d($recordData, 2); + $this->phpSheet->getDefaultRowDimension()->setRowHeight($height / 20); + } + + /** + * Read SHEETPR record. + */ + private function readSheetPr() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2 + + // bit: 6; mask: 0x0040; 0 = outline buttons above outline group + $isSummaryBelow = (0x0040 & self::getUInt2d($recordData, 0)) >> 6; + $this->phpSheet->setShowSummaryBelow($isSummaryBelow); + + // bit: 7; mask: 0x0080; 0 = outline buttons left of outline group + $isSummaryRight = (0x0080 & self::getUInt2d($recordData, 0)) >> 7; + $this->phpSheet->setShowSummaryRight($isSummaryRight); + + // bit: 8; mask: 0x100; 0 = scale printout in percent, 1 = fit printout to number of pages + // this corresponds to radio button setting in page setup dialog in Excel + $this->isFitToPages = (bool) ((0x0100 & self::getUInt2d($recordData, 0)) >> 8); + } + + /** + * Read HORIZONTALPAGEBREAKS record. + */ + private function readHorizontalPageBreaks() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; number of the following row index structures + $nm = self::getUInt2d($recordData, 0); + + // offset: 2; size: 6 * $nm; list of $nm row index structures + for ($i = 0; $i < $nm; ++$i) { + $r = self::getUInt2d($recordData, 2 + 6 * $i); + $cf = self::getUInt2d($recordData, 2 + 6 * $i + 2); + $cl = self::getUInt2d($recordData, 2 + 6 * $i + 4); + + // not sure why two column indexes are necessary? + $this->phpSheet->setBreakByColumnAndRow($cf + 1, $r, Worksheet::BREAK_ROW); + } + } + } + + /** + * Read VERTICALPAGEBREAKS record. + */ + private function readVerticalPageBreaks() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + // offset: 0; size: 2; number of the following column index structures + $nm = self::getUInt2d($recordData, 0); + + // offset: 2; size: 6 * $nm; list of $nm row index structures + for ($i = 0; $i < $nm; ++$i) { + $c = self::getUInt2d($recordData, 2 + 6 * $i); + $rf = self::getUInt2d($recordData, 2 + 6 * $i + 2); + $rl = self::getUInt2d($recordData, 2 + 6 * $i + 4); + + // not sure why two row indexes are necessary? + $this->phpSheet->setBreakByColumnAndRow($c + 1, $rf, Worksheet::BREAK_COLUMN); + } + } + } + + /** + * Read HEADER record. + */ + private function readHeader() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: var + // realized that $recordData can be empty even when record exists + if ($recordData) { + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + } else { + $string = $this->readByteStringShort($recordData); + } + + $this->phpSheet->getHeaderFooter()->setOddHeader($string['value']); + $this->phpSheet->getHeaderFooter()->setEvenHeader($string['value']); + } + } + } + + /** + * Read FOOTER record. + */ + private function readFooter() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: var + // realized that $recordData can be empty even when record exists + if ($recordData) { + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + } else { + $string = $this->readByteStringShort($recordData); + } + $this->phpSheet->getHeaderFooter()->setOddFooter($string['value']); + $this->phpSheet->getHeaderFooter()->setEvenFooter($string['value']); + } + } + } + + /** + * Read HCENTER record. + */ + private function readHcenter() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0 = print sheet left aligned, 1 = print sheet centered horizontally + $isHorizontalCentered = (bool) self::getUInt2d($recordData, 0); + + $this->phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered); + } + } + + /** + * Read VCENTER record. + */ + private function readVcenter() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered + $isVerticalCentered = (bool) self::getUInt2d($recordData, 0); + + $this->phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered); + } + } + + /** + * Read LEFTMARGIN record. + */ + private function readLeftMargin() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setLeft(self::extractNumber($recordData)); + } + } + + /** + * Read RIGHTMARGIN record. + */ + private function readRightMargin() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setRight(self::extractNumber($recordData)); + } + } + + /** + * Read TOPMARGIN record. + */ + private function readTopMargin() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setTop(self::extractNumber($recordData)); + } + } + + /** + * Read BOTTOMMARGIN record. + */ + private function readBottomMargin() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8 + $this->phpSheet->getPageMargins()->setBottom(self::extractNumber($recordData)); + } + } + + /** + * Read PAGESETUP record. + */ + private function readPageSetup() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; paper size + $paperSize = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; scaling factor + $scale = self::getUInt2d($recordData, 2); + + // offset: 6; size: 2; fit worksheet width to this number of pages, 0 = use as many as needed + $fitToWidth = self::getUInt2d($recordData, 6); + + // offset: 8; size: 2; fit worksheet height to this number of pages, 0 = use as many as needed + $fitToHeight = self::getUInt2d($recordData, 8); + + // offset: 10; size: 2; option flags + + // bit: 1; mask: 0x0002; 0=landscape, 1=portrait + $isPortrait = (0x0002 & self::getUInt2d($recordData, 10)) >> 1; + + // bit: 2; mask: 0x0004; 1= paper size, scaling factor, paper orient. not init + // when this bit is set, do not use flags for those properties + $isNotInit = (0x0004 & self::getUInt2d($recordData, 10)) >> 2; + + if (!$isNotInit) { + $this->phpSheet->getPageSetup()->setPaperSize($paperSize); + switch ($isPortrait) { + case 0: + $this->phpSheet->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE); + + break; + case 1: + $this->phpSheet->getPageSetup()->setOrientation(PageSetup::ORIENTATION_PORTRAIT); + + break; + } + + $this->phpSheet->getPageSetup()->setScale($scale, false); + $this->phpSheet->getPageSetup()->setFitToPage((bool) $this->isFitToPages); + $this->phpSheet->getPageSetup()->setFitToWidth($fitToWidth, false); + $this->phpSheet->getPageSetup()->setFitToHeight($fitToHeight, false); + } + + // offset: 16; size: 8; header margin (IEEE 754 floating-point value) + $marginHeader = self::extractNumber(substr($recordData, 16, 8)); + $this->phpSheet->getPageMargins()->setHeader($marginHeader); + + // offset: 24; size: 8; footer margin (IEEE 754 floating-point value) + $marginFooter = self::extractNumber(substr($recordData, 24, 8)); + $this->phpSheet->getPageMargins()->setFooter($marginFooter); + } + } + + /** + * PROTECT - Sheet protection (BIFF2 through BIFF8) + * if this record is omitted, then it also means no sheet protection. + */ + private function readProtect() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit 0, mask 0x01; 1 = sheet is protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + $this->phpSheet->getProtection()->setSheet((bool) $bool); + } + + /** + * SCENPROTECT. + */ + private function readScenProtect() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit: 0, mask 0x01; 1 = scenarios are protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + + $this->phpSheet->getProtection()->setScenarios((bool) $bool); + } + + /** + * OBJECTPROTECT. + */ + private function readObjectProtect() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; + + // bit: 0, mask 0x01; 1 = objects are protected + $bool = (0x01 & self::getUInt2d($recordData, 0)) >> 0; + + $this->phpSheet->getProtection()->setObjects((bool) $bool); + } + + /** + * PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8). + */ + private function readPassword() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; 16-bit hash value of password + $password = strtoupper(dechex(self::getUInt2d($recordData, 0))); // the hashed password + $this->phpSheet->getProtection()->setPassword($password, true); + } + } + + /** + * Read DEFCOLWIDTH record. + */ + private function readDefColWidth() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; default column width + $width = self::getUInt2d($recordData, 0); + if ($width != 8) { + $this->phpSheet->getDefaultColumnDimension()->setWidth($width); + } + } + + /** + * Read COLINFO record. + */ + private function readColInfo() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index to first column in range + $firstColumnIndex = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to last column in range + $lastColumnIndex = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; width of the column in 1/256 of the width of the zero character + $width = self::getUInt2d($recordData, 4); + + // offset: 6; size: 2; index to XF record for default column formatting + $xfIndex = self::getUInt2d($recordData, 6); + + // offset: 8; size: 2; option flags + // bit: 0; mask: 0x0001; 1= columns are hidden + $isHidden = (0x0001 & self::getUInt2d($recordData, 8)) >> 0; + + // bit: 10-8; mask: 0x0700; outline level of the columns (0 = no outline) + $level = (0x0700 & self::getUInt2d($recordData, 8)) >> 8; + + // bit: 12; mask: 0x1000; 1 = collapsed + $isCollapsed = (0x1000 & self::getUInt2d($recordData, 8)) >> 12; + + // offset: 10; size: 2; not used + + for ($i = $firstColumnIndex + 1; $i <= $lastColumnIndex + 1; ++$i) { + if ($lastColumnIndex == 255 || $lastColumnIndex == 256) { + $this->phpSheet->getDefaultColumnDimension()->setWidth($width / 256); + + break; + } + $this->phpSheet->getColumnDimensionByColumn($i)->setWidth($width / 256); + $this->phpSheet->getColumnDimensionByColumn($i)->setVisible(!$isHidden); + $this->phpSheet->getColumnDimensionByColumn($i)->setOutlineLevel($level); + $this->phpSheet->getColumnDimensionByColumn($i)->setCollapsed($isCollapsed); + $this->phpSheet->getColumnDimensionByColumn($i)->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * ROW. + * + * This record contains the properties of a single row in a + * sheet. Rows and cells in a sheet are divided into blocks + * of 32 rows. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readRow() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; index of this row + $r = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column of the first cell which is described by a cell record + + // offset: 4; size: 2; index to column of the last cell which is described by a cell record, increased by 1 + + // offset: 6; size: 2; + + // bit: 14-0; mask: 0x7FFF; height of the row, in twips = 1/20 of a point + $height = (0x7FFF & self::getUInt2d($recordData, 6)) >> 0; + + // bit: 15: mask: 0x8000; 0 = row has custom height; 1= row has default height + $useDefaultHeight = (0x8000 & self::getUInt2d($recordData, 6)) >> 15; + + if (!$useDefaultHeight) { + $this->phpSheet->getRowDimension($r + 1)->setRowHeight($height / 20); + } + + // offset: 8; size: 2; not used + + // offset: 10; size: 2; not used in BIFF5-BIFF8 + + // offset: 12; size: 4; option flags and default row formatting + + // bit: 2-0: mask: 0x00000007; outline level of the row + $level = (0x00000007 & self::getInt4d($recordData, 12)) >> 0; + $this->phpSheet->getRowDimension($r + 1)->setOutlineLevel($level); + + // bit: 4; mask: 0x00000010; 1 = outline group start or ends here... and is collapsed + $isCollapsed = (0x00000010 & self::getInt4d($recordData, 12)) >> 4; + $this->phpSheet->getRowDimension($r + 1)->setCollapsed($isCollapsed); + + // bit: 5; mask: 0x00000020; 1 = row is hidden + $isHidden = (0x00000020 & self::getInt4d($recordData, 12)) >> 5; + $this->phpSheet->getRowDimension($r + 1)->setVisible(!$isHidden); + + // bit: 7; mask: 0x00000080; 1 = row has explicit format + $hasExplicitFormat = (0x00000080 & self::getInt4d($recordData, 12)) >> 7; + + // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record + $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16; + + if ($hasExplicitFormat && isset($this->mapCellXfIndex[$xfIndex])) { + $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read RK record + * This record represents a cell that contains an RK value + * (encoded integer or floating-point value). If a + * floating-point value cannot be encoded to an RK value, + * a NUMBER record will be written. This record replaces the + * record INTEGER written in BIFF2. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readRk() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 4; RK value + $rknum = self::getInt4d($recordData, 6); + $numValue = self::getIEEE754($rknum); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly) { + // add style information + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + } + + /** + * Read LABELSST record + * This record represents a cell that contains a string. It + * replaces the LABEL record and RSTRING record used in + * BIFF2-BIFF5. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readLabelSst() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + $emptyCell = true; + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 4; index to SST record + $index = self::getInt4d($recordData, 6); + + // add cell + if (($fmtRuns = $this->sst[$index]['fmtRuns']) && !$this->readDataOnly) { + // then we should treat as rich text + $richText = new RichText(); + $charPos = 0; + $sstCount = count($this->sst[$index]['fmtRuns']); + for ($i = 0; $i <= $sstCount; ++$i) { + if (isset($fmtRuns[$i])) { + $text = StringHelper::substring($this->sst[$index]['value'], $charPos, $fmtRuns[$i]['charPos'] - $charPos); + $charPos = $fmtRuns[$i]['charPos']; + } else { + $text = StringHelper::substring($this->sst[$index]['value'], $charPos, StringHelper::countCharacters($this->sst[$index]['value'])); + } + + if (StringHelper::countCharacters($text) > 0) { + if ($i == 0) { // first text run, no style + $richText->createText($text); + } else { + $textRun = $richText->createTextRun($text); + if (isset($fmtRuns[$i - 1])) { + if ($fmtRuns[$i - 1]['fontIndex'] < 4) { + $fontIndex = $fmtRuns[$i - 1]['fontIndex']; + } else { + // this has to do with that index 4 is omitted in all BIFF versions for some strange reason + // check the OpenOffice documentation of the FONT record + $fontIndex = $fmtRuns[$i - 1]['fontIndex'] - 1; + } + $textRun->setFont(clone $this->objFonts[$fontIndex]); + } + } + } + } + if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($richText, DataType::TYPE_STRING); + $emptyCell = false; + } + } else { + if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($this->sst[$index]['value'], DataType::TYPE_STRING); + $emptyCell = false; + } + } + + if (!$this->readDataOnly && !$emptyCell) { + // add style information + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MULRK record + * This record represents a cell range containing RK value + * cells. All cells are located in the same row. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMulRk() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first column + $colFirst = self::getUInt2d($recordData, 2); + + // offset: var; size: 2; index to last column + $colLast = self::getUInt2d($recordData, $length - 2); + $columns = $colLast - $colFirst + 1; + + // offset within record data + $offset = 4; + + for ($i = 1; $i <= $columns; ++$i) { + $columnString = Coordinate::stringFromColumnIndex($colFirst + $i); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: var; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, $offset); + + // offset: var; size: 4; RK value + $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2)); + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly) { + // add style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell value + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + + $offset += 6; + } + } + + /** + * Read NUMBER record + * This record represents a cell that contains a + * floating-point value. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readNumber() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + $numValue = self::extractNumber(substr($recordData, 6, 8)); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // add cell value + $cell->setValueExplicit($numValue, DataType::TYPE_NUMERIC); + } + } + + /** + * Read FORMULA record + perhaps a following STRING record if formula result is a string + * This record contains the token array and the result of a + * formula cell. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readFormula() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; col index + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // offset: 20: size: variable; formula structure + $formulaStructure = substr($recordData, 20); + + // offset: 14: size: 2; option flags, recalculate always, recalculate on open etc. + $options = self::getUInt2d($recordData, 14); + + // bit: 0; mask: 0x0001; 1 = recalculate always + // bit: 1; mask: 0x0002; 1 = calculate on open + // bit: 2; mask: 0x0008; 1 = part of a shared formula + $isPartOfSharedFormula = (bool) (0x0008 & $options); + + // WARNING: + // We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true + // the formula data may be ordinary formula data, therefore we need to check + // explicitly for the tExp token (0x01) + $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure[2]) == 0x01; + + if ($isPartOfSharedFormula) { + // part of shared formula which means there will be a formula with a tExp token and nothing else + // get the base cell, grab tExp token + $baseRow = self::getUInt2d($formulaStructure, 3); + $baseCol = self::getUInt2d($formulaStructure, 5); + $this->baseCell = Coordinate::stringFromColumnIndex($baseCol + 1) . ($baseRow + 1); + } + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + if ($isPartOfSharedFormula) { + // formula is added to this cell after the sheet has been read + $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->baseCell; + } + + // offset: 16: size: 4; not used + + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 8; result of the formula + if ((ord($recordData[6]) == 0) && (ord($recordData[12]) == 255) && (ord($recordData[13]) == 255)) { + // String formula. Result follows in appended STRING record + $dataType = DataType::TYPE_STRING; + + // read possible SHAREDFMLA record + $code = self::getUInt2d($this->data, $this->pos); + if ($code == self::XLS_TYPE_SHAREDFMLA) { + $this->readSharedFmla(); + } + + // read STRING record + $value = $this->readString(); + } elseif ((ord($recordData[6]) == 1) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Boolean formula. Result is in +2; 0=false, 1=true + $dataType = DataType::TYPE_BOOL; + $value = (bool) ord($recordData[8]); + } elseif ((ord($recordData[6]) == 2) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Error formula. Error code is in +2 + $dataType = DataType::TYPE_ERROR; + $value = Xls\ErrorCode::lookup(ord($recordData[8])); + } elseif ((ord($recordData[6]) == 3) + && (ord($recordData[12]) == 255) + && (ord($recordData[13]) == 255)) { + // Formula result is a null string + $dataType = DataType::TYPE_NULL; + $value = ''; + } else { + // forumla result is a number, first 14 bytes like _NUMBER record + $dataType = DataType::TYPE_NUMERIC; + $value = self::extractNumber(substr($recordData, 6, 8)); + } + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + if (!$this->readDataOnly) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + + // store the formula + if (!$isPartOfSharedFormula) { + // not part of shared formula + // add cell value. If we can read formula, populate with formula, otherwise just used cached value + try { + if ($this->version != self::XLS_BIFF8) { + throw new Exception('Not BIFF8. Can only read BIFF8 formulas'); + } + $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language + $cell->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); + } catch (PhpSpreadsheetException $e) { + $cell->setValueExplicit($value, $dataType); + } + } else { + if ($this->version == self::XLS_BIFF8) { + // do nothing at this point, formula id added later in the code + } else { + $cell->setValueExplicit($value, $dataType); + } + } + + // store the cached calculated value + $cell->setCalculatedValue($value); + } + } + + /** + * Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, + * which usually contains relative references. + * These will be used to construct the formula in each shared formula part after the sheet is read. + */ + private function readSharedFmla() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything + $cellRange = substr($recordData, 0, 6); + $cellRange = $this->readBIFF5CellRangeAddressFixed($cellRange); // note: even BIFF8 uses BIFF5 syntax + + // offset: 6, size: 1; not used + + // offset: 7, size: 1; number of existing FORMULA records for this shared formula + $no = ord($recordData[7]); + + // offset: 8, size: var; Binary token array of the shared formula + $formula = substr($recordData, 8); + + // at this point we only store the shared formula for later use + $this->sharedFormulas[$this->baseCell] = $formula; + } + + /** + * Read a STRING record from current stream position and advance the stream pointer to next record + * This record is used for storing result from FORMULA record when it is a string, and + * it occurs directly after the FORMULA record. + * + * @return string The string contents as UTF-8 + */ + private function readString() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong($recordData); + $value = $string['value']; + } else { + $string = $this->readByteStringLong($recordData); + $value = $string['value']; + } + + return $value; + } + + /** + * Read BOOLERR record + * This record represents a Boolean value or error value + * cell. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readBoolErr() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; column index + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; index to XF record + $xfIndex = self::getUInt2d($recordData, 4); + + // offset: 6; size: 1; the boolean value or error value + $boolErr = ord($recordData[6]); + + // offset: 7; size: 1; 0=boolean; 1=error + $isError = ord($recordData[7]); + + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + switch ($isError) { + case 0: // boolean + $value = (bool) $boolErr; + + // add cell value + $cell->setValueExplicit($value, DataType::TYPE_BOOL); + + break; + case 1: // error type + $value = Xls\ErrorCode::lookup($boolErr); + + // add cell value + $cell->setValueExplicit($value, DataType::TYPE_ERROR); + + break; + } + + if (!$this->readDataOnly) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MULBLANK record + * This record represents a cell range of empty cells. All + * cells are located in the same row. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMulBlank() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first column + $fc = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2 x nc; list of indexes to XF records + // add style information + if (!$this->readDataOnly && $this->readEmptyCells) { + for ($i = 0; $i < $length / 2 - 3; ++$i) { + $columnString = Coordinate::stringFromColumnIndex($fc + $i + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + $xfIndex = self::getUInt2d($recordData, 4 + 2 * $i); + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + // offset: 6; size 2; index to last column (not needed) + } + + /** + * Read LABEL record + * This record represents a cell that contains a string. In + * BIFF8 it is usually replaced by the LABELSST record. + * Excel still uses this record, if it copies unformatted + * text cells to the clipboard. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readLabel() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; index to row + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to column + $column = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($column + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // add cell value + // todo: what if string is very long? continue record + if ($this->version == self::XLS_BIFF8) { + $string = self::readUnicodeStringLong(substr($recordData, 6)); + $value = $string['value']; + } else { + $string = $this->readByteStringLong(substr($recordData, 6)); + $value = $string['value']; + } + if ($this->readEmptyCells || trim($value) !== '') { + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); + $cell->setValueExplicit($value, DataType::TYPE_STRING); + + if (!$this->readDataOnly) { + // add cell style + $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + } + + /** + * Read BLANK record. + */ + private function readBlank() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; row index + $row = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; col index + $col = self::getUInt2d($recordData, 2); + $columnString = Coordinate::stringFromColumnIndex($col + 1); + + // Read cell? + if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { + // offset: 4; size: 2; XF index + $xfIndex = self::getUInt2d($recordData, 4); + + // add style information + if (!$this->readDataOnly && $this->readEmptyCells) { + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); + } + } + } + + /** + * Read MSODRAWING record. + */ + private function readMsoDrawing() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + + // get spliced record data + $splicedRecordData = $this->getSplicedRecordData(); + $recordData = $splicedRecordData['recordData']; + + $this->drawingData .= $recordData; + } + + /** + * Read OBJ record. + */ + private function readObj() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly || $this->version != self::XLS_BIFF8) { + return; + } + + // recordData consists of an array of subrecords looking like this: + // ft: 2 bytes; ftCmo type (0x15) + // cb: 2 bytes; size in bytes of ftCmo data + // ot: 2 bytes; Object Type + // id: 2 bytes; Object id number + // grbit: 2 bytes; Option Flags + // data: var; subrecord data + + // for now, we are just interested in the second subrecord containing the object type + $ftCmoType = self::getUInt2d($recordData, 0); + $cbCmoSize = self::getUInt2d($recordData, 2); + $otObjType = self::getUInt2d($recordData, 4); + $idObjID = self::getUInt2d($recordData, 6); + $grbitOpts = self::getUInt2d($recordData, 6); + + $this->objs[] = [ + 'ftCmoType' => $ftCmoType, + 'cbCmoSize' => $cbCmoSize, + 'otObjType' => $otObjType, + 'idObjID' => $idObjID, + 'grbitOpts' => $grbitOpts, + ]; + $this->textObjRef = $idObjID; + } + + /** + * Read WINDOW2 record. + */ + private function readWindow2() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; option flags + $options = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; index to first visible row + $firstVisibleRow = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; index to first visible colum + $firstVisibleColumn = self::getUInt2d($recordData, 4); + if ($this->version === self::XLS_BIFF8) { + // offset: 8; size: 2; not used + // offset: 10; size: 2; cached magnification factor in page break preview (in percent); 0 = Default (60%) + // offset: 12; size: 2; cached magnification factor in normal view (in percent); 0 = Default (100%) + // offset: 14; size: 4; not used + $zoomscaleInPageBreakPreview = self::getUInt2d($recordData, 10); + if ($zoomscaleInPageBreakPreview === 0) { + $zoomscaleInPageBreakPreview = 60; + } + $zoomscaleInNormalView = self::getUInt2d($recordData, 12); + if ($zoomscaleInNormalView === 0) { + $zoomscaleInNormalView = 100; + } + } + + // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines + $showGridlines = (bool) ((0x0002 & $options) >> 1); + $this->phpSheet->setShowGridlines($showGridlines); + + // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers + $showRowColHeaders = (bool) ((0x0004 & $options) >> 2); + $this->phpSheet->setShowRowColHeaders($showRowColHeaders); + + // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen + $this->frozen = (bool) ((0x0008 & $options) >> 3); + + // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left + $this->phpSheet->setRightToLeft((bool) ((0x0040 & $options) >> 6)); + + // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active + $isActive = (bool) ((0x0400 & $options) >> 10); + if ($isActive) { + $this->spreadsheet->setActiveSheetIndex($this->spreadsheet->getIndex($this->phpSheet)); + } + + // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view + $isPageBreakPreview = (bool) ((0x0800 & $options) >> 11); + + //FIXME: set $firstVisibleRow and $firstVisibleColumn + + if ($this->phpSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_PAGE_LAYOUT) { + //NOTE: this setting is inferior to page layout view(Excel2007-) + $view = $isPageBreakPreview ? SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : SheetView::SHEETVIEW_NORMAL; + $this->phpSheet->getSheetView()->setView($view); + if ($this->version === self::XLS_BIFF8) { + $zoomScale = $isPageBreakPreview ? $zoomscaleInPageBreakPreview : $zoomscaleInNormalView; + $this->phpSheet->getSheetView()->setZoomScale($zoomScale); + $this->phpSheet->getSheetView()->setZoomScaleNormal($zoomscaleInNormalView); + } + } + } + + /** + * Read PLV Record(Created by Excel2007 or upper). + */ + private function readPageLayoutView() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; rt + //->ignore + $rt = self::getUInt2d($recordData, 0); + // offset: 2; size: 2; grbitfr + //->ignore + $grbitFrt = self::getUInt2d($recordData, 2); + // offset: 4; size: 8; reserved + //->ignore + + // offset: 12; size 2; zoom scale + $wScalePLV = self::getUInt2d($recordData, 12); + // offset: 14; size 2; grbit + $grbit = self::getUInt2d($recordData, 14); + + // decomprise grbit + $fPageLayoutView = $grbit & 0x01; + $fRulerVisible = ($grbit >> 1) & 0x01; //no support + $fWhitespaceHidden = ($grbit >> 3) & 0x01; //no support + + if ($fPageLayoutView === 1) { + $this->phpSheet->getSheetView()->setView(SheetView::SHEETVIEW_PAGE_LAYOUT); + $this->phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT + } + //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW. + } + + /** + * Read SCL record. + */ + private function readScl() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // offset: 0; size: 2; numerator of the view magnification + $numerator = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; numerator of the view magnification + $denumerator = self::getUInt2d($recordData, 2); + + // set the zoom scale (in percent) + $this->phpSheet->getSheetView()->setZoomScale($numerator * 100 / $denumerator); + } + + /** + * Read PANE record. + */ + private function readPane() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; position of vertical split + $px = self::getUInt2d($recordData, 0); + + // offset: 2; size: 2; position of horizontal split + $py = self::getUInt2d($recordData, 2); + + // offset: 4; size: 2; top most visible row in the bottom pane + $rwTop = self::getUInt2d($recordData, 4); + + // offset: 6; size: 2; first visible left column in the right pane + $colLeft = self::getUInt2d($recordData, 6); + + if ($this->frozen) { + // frozen panes + $cell = Coordinate::stringFromColumnIndex($px + 1) . ($py + 1); + $topLeftCell = Coordinate::stringFromColumnIndex($colLeft + 1) . ($rwTop + 1); + $this->phpSheet->freezePane($cell, $topLeftCell); + } + // unfrozen panes; split windows; not supported by PhpSpreadsheet core + } + } + + /** + * Read SELECTION record. There is one such record for each pane in the sheet. + */ + private function readSelection() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 1; pane identifier + $paneId = ord($recordData[0]); + + // offset: 1; size: 2; index to row of the active cell + $r = self::getUInt2d($recordData, 1); + + // offset: 3; size: 2; index to column of the active cell + $c = self::getUInt2d($recordData, 3); + + // offset: 5; size: 2; index into the following cell range list to the + // entry that contains the active cell + $index = self::getUInt2d($recordData, 5); + + // offset: 7; size: var; cell range address list containing all selected cell ranges + $data = substr($recordData, 7); + $cellRangeAddressList = $this->readBIFF5CellRangeAddressList($data); // note: also BIFF8 uses BIFF5 syntax + + $selectedCells = $cellRangeAddressList['cellRangeAddresses'][0]; + + // first row '1' + last row '16384' indicates that full column is selected (apparently also in BIFF8!) + if (preg_match('/^([A-Z]+1\:[A-Z]+)16384$/', $selectedCells)) { + $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)16384$/', '${1}1048576', $selectedCells); + } + + // first row '1' + last row '65536' indicates that full column is selected + if (preg_match('/^([A-Z]+1\:[A-Z]+)65536$/', $selectedCells)) { + $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)65536$/', '${1}1048576', $selectedCells); + } + + // first column 'A' + last column 'IV' indicates that full row is selected + if (preg_match('/^(A\d+\:)IV(\d+)$/', $selectedCells)) { + $selectedCells = preg_replace('/^(A\d+\:)IV(\d+)$/', '${1}XFD${2}', $selectedCells); + } + + $this->phpSheet->setSelectedCells($selectedCells); + } + } + + private function includeCellRangeFiltered($cellRangeAddress) + { + $includeCellRange = true; + if ($this->getReadFilter() !== null) { + $includeCellRange = false; + $rangeBoundaries = Coordinate::getRangeBoundaries($cellRangeAddress); + ++$rangeBoundaries[1][0]; + for ($row = $rangeBoundaries[0][1]; $row <= $rangeBoundaries[1][1]; ++$row) { + for ($column = $rangeBoundaries[0][0]; $column != $rangeBoundaries[1][0]; ++$column) { + if ($this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { + $includeCellRange = true; + + break 2; + } + } + } + } + + return $includeCellRange; + } + + /** + * MERGEDCELLS. + * + * This record contains the addresses of merged cell ranges + * in the current sheet. + * + * -- "OpenOffice.org's Documentation of the Microsoft + * Excel File Format" + */ + private function readMergedCells() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($recordData); + foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) { + if ((strpos($cellRangeAddress, ':') !== false) && + ($this->includeCellRangeFiltered($cellRangeAddress))) { + $this->phpSheet->mergeCells($cellRangeAddress); + } + } + } + } + + /** + * Read HYPERLINK record. + */ + private function readHyperLink() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + + if (!$this->readDataOnly) { + // offset: 0; size: 8; cell range address of all cells containing this hyperlink + try { + $cellRange = $this->readBIFF8CellRangeAddressFixed($recordData); + } catch (PhpSpreadsheetException $e) { + return; + } + + // offset: 8, size: 16; GUID of StdLink + + // offset: 24, size: 4; unknown value + + // offset: 28, size: 4; option flags + // bit: 0; mask: 0x00000001; 0 = no link or extant, 1 = file link or URL + $isFileLinkOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 0; + + // bit: 1; mask: 0x00000002; 0 = relative path, 1 = absolute path or URL + $isAbsPathOrUrl = (0x00000001 & self::getUInt2d($recordData, 28)) >> 1; + + // bit: 2 (and 4); mask: 0x00000014; 0 = no description + $hasDesc = (0x00000014 & self::getUInt2d($recordData, 28)) >> 2; + + // bit: 3; mask: 0x00000008; 0 = no text, 1 = has text + $hasText = (0x00000008 & self::getUInt2d($recordData, 28)) >> 3; + + // bit: 7; mask: 0x00000080; 0 = no target frame, 1 = has target frame + $hasFrame = (0x00000080 & self::getUInt2d($recordData, 28)) >> 7; + + // bit: 8; mask: 0x00000100; 0 = file link or URL, 1 = UNC path (inc. server name) + $isUNC = (0x00000100 & self::getUInt2d($recordData, 28)) >> 8; + + // offset within record data + $offset = 32; + + if ($hasDesc) { + // offset: 32; size: var; character count of description text + $dl = self::getInt4d($recordData, 32); + // offset: 36; size: var; character array of description text, no Unicode string header, always 16-bit characters, zero terminated + $desc = self::encodeUTF16(substr($recordData, 36, 2 * ($dl - 1)), false); + $offset += 4 + 2 * $dl; + } + if ($hasFrame) { + $fl = self::getInt4d($recordData, $offset); + $offset += 4 + 2 * $fl; + } + + // detect type of hyperlink (there are 4 types) + $hyperlinkType = null; + + if ($isUNC) { + $hyperlinkType = 'UNC'; + } elseif (!$isFileLinkOrUrl) { + $hyperlinkType = 'workbook'; + } elseif (ord($recordData[$offset]) == 0x03) { + $hyperlinkType = 'local'; + } elseif (ord($recordData[$offset]) == 0xE0) { + $hyperlinkType = 'URL'; + } + + switch ($hyperlinkType) { + case 'URL': + // section 5.58.2: Hyperlink containing a URL + // e.g. http://example.org/index.php + + // offset: var; size: 16; GUID of URL Moniker + $offset += 16; + // offset: var; size: 4; size (in bytes) of character array of the URL including trailing zero word + $us = self::getInt4d($recordData, $offset); + $offset += 4; + // offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated + $url = self::encodeUTF16(substr($recordData, $offset, $us - 2), false); + $nullOffset = strpos($url, chr(0x00)); + if ($nullOffset) { + $url = substr($url, 0, $nullOffset); + } + $url .= $hasText ? '#' : ''; + $offset += $us; + + break; + case 'local': + // section 5.58.3: Hyperlink to local file + // examples: + // mydoc.txt + // ../../somedoc.xls#Sheet!A1 + + // offset: var; size: 16; GUI of File Moniker + $offset += 16; + + // offset: var; size: 2; directory up-level count. + $upLevelCount = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 4; character count of the shortened file path and name, including trailing zero word + $sl = self::getInt4d($recordData, $offset); + $offset += 4; + + // offset: var; size: sl; character array of the shortened file path and name in 8.3-DOS-format (compressed Unicode string) + $shortenedFilePath = substr($recordData, $offset, $sl); + $shortenedFilePath = self::encodeUTF16($shortenedFilePath, true); + $shortenedFilePath = substr($shortenedFilePath, 0, -1); // remove trailing zero + + $offset += $sl; + + // offset: var; size: 24; unknown sequence + $offset += 24; + + // extended file path + // offset: var; size: 4; size of the following file link field including string lenth mark + $sz = self::getInt4d($recordData, $offset); + $offset += 4; + + // only present if $sz > 0 + if ($sz > 0) { + // offset: var; size: 4; size of the character array of the extended file path and name + $xl = self::getInt4d($recordData, $offset); + $offset += 4; + + // offset: var; size 2; unknown + $offset += 2; + + // offset: var; size $xl; character array of the extended file path and name. + $extendedFilePath = substr($recordData, $offset, $xl); + $extendedFilePath = self::encodeUTF16($extendedFilePath, false); + $offset += $xl; + } + + // construct the path + $url = str_repeat('..\\', $upLevelCount); + $url .= ($sz > 0) ? $extendedFilePath : $shortenedFilePath; // use extended path if available + $url .= $hasText ? '#' : ''; + + break; + case 'UNC': + // section 5.58.4: Hyperlink to a File with UNC (Universal Naming Convention) Path + // todo: implement + return; + case 'workbook': + // section 5.58.5: Hyperlink to the Current Workbook + // e.g. Sheet2!B1:C2, stored in text mark field + $url = 'sheet://'; + + break; + default: + return; + } + + if ($hasText) { + // offset: var; size: 4; character count of text mark including trailing zero word + $tl = self::getInt4d($recordData, $offset); + $offset += 4; + // offset: var; size: var; character array of the text mark without the # sign, no Unicode header, always 16-bit characters, zero-terminated + $text = self::encodeUTF16(substr($recordData, $offset, 2 * ($tl - 1)), false); + $url .= $text; + } + + // apply the hyperlink to all the relevant cells + foreach (Coordinate::extractAllCellReferencesInRange($cellRange) as $coordinate) { + $this->phpSheet->getCell($coordinate)->getHyperLink()->setUrl($url); + } + } + } + + /** + * Read DATAVALIDATIONS record. + */ + private function readDataValidations() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + } + + /** + * Read DATAVALIDATION record. + */ + private function readDataValidation() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer forward to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 4; Options + $options = self::getInt4d($recordData, 0); + + // bit: 0-3; mask: 0x0000000F; type + $type = (0x0000000F & $options) >> 0; + switch ($type) { + case 0x00: + $type = DataValidation::TYPE_NONE; + + break; + case 0x01: + $type = DataValidation::TYPE_WHOLE; + + break; + case 0x02: + $type = DataValidation::TYPE_DECIMAL; + + break; + case 0x03: + $type = DataValidation::TYPE_LIST; + + break; + case 0x04: + $type = DataValidation::TYPE_DATE; + + break; + case 0x05: + $type = DataValidation::TYPE_TIME; + + break; + case 0x06: + $type = DataValidation::TYPE_TEXTLENGTH; + + break; + case 0x07: + $type = DataValidation::TYPE_CUSTOM; + + break; + } + + // bit: 4-6; mask: 0x00000070; error type + $errorStyle = (0x00000070 & $options) >> 4; + switch ($errorStyle) { + case 0x00: + $errorStyle = DataValidation::STYLE_STOP; + + break; + case 0x01: + $errorStyle = DataValidation::STYLE_WARNING; + + break; + case 0x02: + $errorStyle = DataValidation::STYLE_INFORMATION; + + break; + } + + // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) + // I have only seen cases where this is 1 + $explicitFormula = (0x00000080 & $options) >> 7; + + // bit: 8; mask: 0x00000100; 1= empty cells allowed + $allowBlank = (0x00000100 & $options) >> 8; + + // bit: 9; mask: 0x00000200; 1= suppress drop down arrow in list type validity + $suppressDropDown = (0x00000200 & $options) >> 9; + + // bit: 18; mask: 0x00040000; 1= show prompt box if cell selected + $showInputMessage = (0x00040000 & $options) >> 18; + + // bit: 19; mask: 0x00080000; 1= show error box if invalid values entered + $showErrorMessage = (0x00080000 & $options) >> 19; + + // bit: 20-23; mask: 0x00F00000; condition operator + $operator = (0x00F00000 & $options) >> 20; + switch ($operator) { + case 0x00: + $operator = DataValidation::OPERATOR_BETWEEN; + + break; + case 0x01: + $operator = DataValidation::OPERATOR_NOTBETWEEN; + + break; + case 0x02: + $operator = DataValidation::OPERATOR_EQUAL; + + break; + case 0x03: + $operator = DataValidation::OPERATOR_NOTEQUAL; + + break; + case 0x04: + $operator = DataValidation::OPERATOR_GREATERTHAN; + + break; + case 0x05: + $operator = DataValidation::OPERATOR_LESSTHAN; + + break; + case 0x06: + $operator = DataValidation::OPERATOR_GREATERTHANOREQUAL; + + break; + case 0x07: + $operator = DataValidation::OPERATOR_LESSTHANOREQUAL; + + break; + } + + // offset: 4; size: var; title of the prompt box + $offset = 4; + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $promptTitle = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; title of the error box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $errorTitle = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; text of the prompt box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $prompt = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: var; text of the error box + $string = self::readUnicodeStringLong(substr($recordData, $offset)); + $error = $string['value'] !== chr(0) ? $string['value'] : ''; + $offset += $string['size']; + + // offset: var; size: 2; size of the formula data for the first condition + $sz1 = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 2; not used + $offset += 2; + + // offset: var; size: $sz1; formula data for first condition (without size field) + $formula1 = substr($recordData, $offset, $sz1); + $formula1 = pack('v', $sz1) . $formula1; // prepend the length + try { + $formula1 = $this->getFormulaFromStructure($formula1); + + // in list type validity, null characters are used as item separators + if ($type == DataValidation::TYPE_LIST) { + $formula1 = str_replace(chr(0), ',', $formula1); + } + } catch (PhpSpreadsheetException $e) { + return; + } + $offset += $sz1; + + // offset: var; size: 2; size of the formula data for the first condition + $sz2 = self::getUInt2d($recordData, $offset); + $offset += 2; + + // offset: var; size: 2; not used + $offset += 2; + + // offset: var; size: $sz2; formula data for second condition (without size field) + $formula2 = substr($recordData, $offset, $sz2); + $formula2 = pack('v', $sz2) . $formula2; // prepend the length + try { + $formula2 = $this->getFormulaFromStructure($formula2); + } catch (PhpSpreadsheetException $e) { + return; + } + $offset += $sz2; + + // offset: var; size: var; cell range address list with + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList(substr($recordData, $offset)); + $cellRangeAddresses = $cellRangeAddressList['cellRangeAddresses']; + + foreach ($cellRangeAddresses as $cellRange) { + $stRange = $this->phpSheet->shrinkRangeToFit($cellRange); + foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $coordinate) { + $objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation(); + $objValidation->setType($type); + $objValidation->setErrorStyle($errorStyle); + $objValidation->setAllowBlank((bool) $allowBlank); + $objValidation->setShowInputMessage((bool) $showInputMessage); + $objValidation->setShowErrorMessage((bool) $showErrorMessage); + $objValidation->setShowDropDown(!$suppressDropDown); + $objValidation->setOperator($operator); + $objValidation->setErrorTitle($errorTitle); + $objValidation->setError($error); + $objValidation->setPromptTitle($promptTitle); + $objValidation->setPrompt($prompt); + $objValidation->setFormula1($formula1); + $objValidation->setFormula2($formula2); + } + } + } + + /** + * Read SHEETLAYOUT record. Stores sheet tab color information. + */ + private function readSheetLayout() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // local pointer in record data + $offset = 0; + + if (!$this->readDataOnly) { + // offset: 0; size: 2; repeated record identifier 0x0862 + + // offset: 2; size: 10; not used + + // offset: 12; size: 4; size of record data + // Excel 2003 uses size of 0x14 (documented), Excel 2007 uses size of 0x28 (not documented?) + $sz = self::getInt4d($recordData, 12); + + switch ($sz) { + case 0x14: + // offset: 16; size: 2; color index for sheet tab + $colorIndex = self::getUInt2d($recordData, 16); + $color = Xls\Color::map($colorIndex, $this->palette, $this->version); + $this->phpSheet->getTabColor()->setRGB($color['rgb']); + + break; + case 0x28: + // TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007 + return; + + break; + } + } + } + + /** + * Read SHEETPROTECTION record (FEATHEADR). + */ + private function readSheetProtection() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + if ($this->readDataOnly) { + return; + } + + // offset: 0; size: 2; repeated record header + + // offset: 2; size: 2; FRT cell reference flag (=0 currently) + + // offset: 4; size: 8; Currently not used and set to 0 + + // offset: 12; size: 2; Shared feature type index (2=Enhanced Protetion, 4=SmartTag) + $isf = self::getUInt2d($recordData, 12); + if ($isf != 2) { + return; + } + + // offset: 14; size: 1; =1 since this is a feat header + + // offset: 15; size: 4; size of rgbHdrSData + + // rgbHdrSData, assume "Enhanced Protection" + // offset: 19; size: 2; option flags + $options = self::getUInt2d($recordData, 19); + + // bit: 0; mask 0x0001; 1 = user may edit objects, 0 = users must not edit objects + $bool = (0x0001 & $options) >> 0; + $this->phpSheet->getProtection()->setObjects(!$bool); + + // bit: 1; mask 0x0002; edit scenarios + $bool = (0x0002 & $options) >> 1; + $this->phpSheet->getProtection()->setScenarios(!$bool); + + // bit: 2; mask 0x0004; format cells + $bool = (0x0004 & $options) >> 2; + $this->phpSheet->getProtection()->setFormatCells(!$bool); + + // bit: 3; mask 0x0008; format columns + $bool = (0x0008 & $options) >> 3; + $this->phpSheet->getProtection()->setFormatColumns(!$bool); + + // bit: 4; mask 0x0010; format rows + $bool = (0x0010 & $options) >> 4; + $this->phpSheet->getProtection()->setFormatRows(!$bool); + + // bit: 5; mask 0x0020; insert columns + $bool = (0x0020 & $options) >> 5; + $this->phpSheet->getProtection()->setInsertColumns(!$bool); + + // bit: 6; mask 0x0040; insert rows + $bool = (0x0040 & $options) >> 6; + $this->phpSheet->getProtection()->setInsertRows(!$bool); + + // bit: 7; mask 0x0080; insert hyperlinks + $bool = (0x0080 & $options) >> 7; + $this->phpSheet->getProtection()->setInsertHyperlinks(!$bool); + + // bit: 8; mask 0x0100; delete columns + $bool = (0x0100 & $options) >> 8; + $this->phpSheet->getProtection()->setDeleteColumns(!$bool); + + // bit: 9; mask 0x0200; delete rows + $bool = (0x0200 & $options) >> 9; + $this->phpSheet->getProtection()->setDeleteRows(!$bool); + + // bit: 10; mask 0x0400; select locked cells + $bool = (0x0400 & $options) >> 10; + $this->phpSheet->getProtection()->setSelectLockedCells(!$bool); + + // bit: 11; mask 0x0800; sort cell range + $bool = (0x0800 & $options) >> 11; + $this->phpSheet->getProtection()->setSort(!$bool); + + // bit: 12; mask 0x1000; auto filter + $bool = (0x1000 & $options) >> 12; + $this->phpSheet->getProtection()->setAutoFilter(!$bool); + + // bit: 13; mask 0x2000; pivot tables + $bool = (0x2000 & $options) >> 13; + $this->phpSheet->getProtection()->setPivotTables(!$bool); + + // bit: 14; mask 0x4000; select unlocked cells + $bool = (0x4000 & $options) >> 14; + $this->phpSheet->getProtection()->setSelectUnlockedCells(!$bool); + + // offset: 21; size: 2; not used + } + + /** + * Read RANGEPROTECTION record + * Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, + * where it is referred to as FEAT record. + */ + private function readRangeProtection() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // move stream pointer to next record + $this->pos += 4 + $length; + + // local pointer in record data + $offset = 0; + + if (!$this->readDataOnly) { + $offset += 12; + + // offset: 12; size: 2; shared feature type, 2 = enhanced protection, 4 = smart tag + $isf = self::getUInt2d($recordData, 12); + if ($isf != 2) { + // we only read FEAT records of type 2 + return; + } + $offset += 2; + + $offset += 5; + + // offset: 19; size: 2; count of ref ranges this feature is on + $cref = self::getUInt2d($recordData, 19); + $offset += 2; + + $offset += 6; + + // offset: 27; size: 8 * $cref; list of cell ranges (like in hyperlink record) + $cellRanges = []; + for ($i = 0; $i < $cref; ++$i) { + try { + $cellRange = $this->readBIFF8CellRangeAddressFixed(substr($recordData, 27 + 8 * $i, 8)); + } catch (PhpSpreadsheetException $e) { + return; + } + $cellRanges[] = $cellRange; + $offset += 8; + } + + // offset: var; size: var; variable length of feature specific data + $rgbFeat = substr($recordData, $offset); + $offset += 4; + + // offset: var; size: 4; the encrypted password (only 16-bit although field is 32-bit) + $wPassword = self::getInt4d($recordData, $offset); + $offset += 4; + + // Apply range protection to sheet + if ($cellRanges) { + $this->phpSheet->protectCells(implode(' ', $cellRanges), strtoupper(dechex($wPassword)), true); + } + } + } + + /** + * Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record + * When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented. + * In this case, we must treat the CONTINUE record as a MSODRAWING record. + */ + private function readContinue() + { + $length = self::getUInt2d($this->data, $this->pos + 2); + $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); + + // check if we are reading drawing data + // this is in case a free CONTINUE record occurs in other circumstances we are unaware of + if ($this->drawingData == '') { + // move stream pointer to next record + $this->pos += 4 + $length; + + return; + } + + // check if record data is at least 4 bytes long, otherwise there is no chance this is MSODRAWING data + if ($length < 4) { + // move stream pointer to next record + $this->pos += 4 + $length; + + return; + } + + // dirty check to see if CONTINUE record could be a camouflaged MSODRAWING record + // look inside CONTINUE record to see if it looks like a part of an Escher stream + // we know that Escher stream may be split at least at + // 0xF003 MsofbtSpgrContainer + // 0xF004 MsofbtSpContainer + // 0xF00D MsofbtClientTextbox + $validSplitPoints = [0xF003, 0xF004, 0xF00D]; // add identifiers if we find more + + $splitPoint = self::getUInt2d($recordData, 2); + if (in_array($splitPoint, $validSplitPoints)) { + // get spliced record data (and move pointer to next record) + $splicedRecordData = $this->getSplicedRecordData(); + $this->drawingData .= $splicedRecordData['recordData']; + + return; + } + + // move stream pointer to next record + $this->pos += 4 + $length; + } + + /** + * Reads a record from current position in data stream and continues reading data as long as CONTINUE + * records are found. Splices the record data pieces and returns the combined string as if record data + * is in one piece. + * Moves to next current position in data stream to start of next record different from a CONtINUE record. + * + * @return array + */ + private function getSplicedRecordData() + { + $data = ''; + $spliceOffsets = []; + + $i = 0; + $spliceOffsets[0] = 0; + + do { + ++$i; + + // offset: 0; size: 2; identifier + $identifier = self::getUInt2d($this->data, $this->pos); + // offset: 2; size: 2; length + $length = self::getUInt2d($this->data, $this->pos + 2); + $data .= $this->readRecordData($this->data, $this->pos + 4, $length); + + $spliceOffsets[$i] = $spliceOffsets[$i - 1] + $length; + + $this->pos += 4 + $length; + $nextIdentifier = self::getUInt2d($this->data, $this->pos); + } while ($nextIdentifier == self::XLS_TYPE_CONTINUE); + + $splicedData = [ + 'recordData' => $data, + 'spliceOffsets' => $spliceOffsets, + ]; + + return $splicedData; + } + + /** + * Convert formula structure into human readable Excel formula like 'A3+A5*5'. + * + * @param string $formulaStructure The complete binary data for the formula + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string Human readable formula + */ + private function getFormulaFromStructure($formulaStructure, $baseCell = 'A1') + { + // offset: 0; size: 2; size of the following formula data + $sz = self::getUInt2d($formulaStructure, 0); + + // offset: 2; size: sz + $formulaData = substr($formulaStructure, 2, $sz); + + // offset: 2 + sz; size: variable (optional) + if (strlen($formulaStructure) > 2 + $sz) { + $additionalData = substr($formulaStructure, 2 + $sz); + } else { + $additionalData = ''; + } + + return $this->getFormulaFromData($formulaData, $additionalData, $baseCell); + } + + /** + * Take formula data and additional data for formula and return human readable formula. + * + * @param string $formulaData The binary data for the formula itself + * @param string $additionalData Additional binary data going with the formula + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string Human readable formula + */ + private function getFormulaFromData($formulaData, $additionalData = '', $baseCell = 'A1') + { + // start parsing the formula data + $tokens = []; + + while (strlen($formulaData) > 0 and $token = $this->getNextToken($formulaData, $baseCell)) { + $tokens[] = $token; + $formulaData = substr($formulaData, $token['size']); + } + + $formulaString = $this->createFormulaFromTokens($tokens, $additionalData); + + return $formulaString; + } + + /** + * Take array of tokens together with additional data for formula and return human readable formula. + * + * @param array $tokens + * @param string $additionalData Additional binary data going with the formula + * + * @return string Human readable formula + */ + private function createFormulaFromTokens($tokens, $additionalData) + { + // empty formula? + if (empty($tokens)) { + return ''; + } + + $formulaStrings = []; + foreach ($tokens as $token) { + // initialize spaces + $space0 = isset($space0) ? $space0 : ''; // spaces before next token, not tParen + $space1 = isset($space1) ? $space1 : ''; // carriage returns before next token, not tParen + $space2 = isset($space2) ? $space2 : ''; // spaces before opening parenthesis + $space3 = isset($space3) ? $space3 : ''; // carriage returns before opening parenthesis + $space4 = isset($space4) ? $space4 : ''; // spaces before closing parenthesis + $space5 = isset($space5) ? $space5 : ''; // carriage returns before closing parenthesis + + switch ($token['name']) { + case 'tAdd': // addition + case 'tConcat': // addition + case 'tDiv': // division + case 'tEQ': // equality + case 'tGE': // greater than or equal + case 'tGT': // greater than + case 'tIsect': // intersection + case 'tLE': // less than or equal + case 'tList': // less than or equal + case 'tLT': // less than + case 'tMul': // multiplication + case 'tNE': // multiplication + case 'tPower': // power + case 'tRange': // range + case 'tSub': // subtraction + $op2 = array_pop($formulaStrings); + $op1 = array_pop($formulaStrings); + $formulaStrings[] = "$op1$space1$space0{$token['data']}$op2"; + unset($space0, $space1); + + break; + case 'tUplus': // unary plus + case 'tUminus': // unary minus + $op = array_pop($formulaStrings); + $formulaStrings[] = "$space1$space0{$token['data']}$op"; + unset($space0, $space1); + + break; + case 'tPercent': // percent sign + $op = array_pop($formulaStrings); + $formulaStrings[] = "$op$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + case 'tAttrVolatile': // indicates volatile function + case 'tAttrIf': + case 'tAttrSkip': + case 'tAttrChoose': + // token is only important for Excel formula evaluator + // do nothing + break; + case 'tAttrSpace': // space / carriage return + // space will be used when next token arrives, do not alter formulaString stack + switch ($token['data']['spacetype']) { + case 'type0': + $space0 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type1': + $space1 = str_repeat("\n", $token['data']['spacecount']); + + break; + case 'type2': + $space2 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type3': + $space3 = str_repeat("\n", $token['data']['spacecount']); + + break; + case 'type4': + $space4 = str_repeat(' ', $token['data']['spacecount']); + + break; + case 'type5': + $space5 = str_repeat("\n", $token['data']['spacecount']); + + break; + } + + break; + case 'tAttrSum': // SUM function with one parameter + $op = array_pop($formulaStrings); + $formulaStrings[] = "{$space1}{$space0}SUM($op)"; + unset($space0, $space1); + + break; + case 'tFunc': // function with fixed number of arguments + case 'tFuncV': // function with variable number of arguments + if ($token['data']['function'] != '') { + // normal function + $ops = []; // array of operators + for ($i = 0; $i < $token['data']['args']; ++$i) { + $ops[] = array_pop($formulaStrings); + } + $ops = array_reverse($ops); + $formulaStrings[] = "$space1$space0{$token['data']['function']}(" . implode(',', $ops) . ')'; + unset($space0, $space1); + } else { + // add-in function + $ops = []; // array of operators + for ($i = 0; $i < $token['data']['args'] - 1; ++$i) { + $ops[] = array_pop($formulaStrings); + } + $ops = array_reverse($ops); + $function = array_pop($formulaStrings); + $formulaStrings[] = "$space1$space0$function(" . implode(',', $ops) . ')'; + unset($space0, $space1); + } + + break; + case 'tParen': // parenthesis + $expression = array_pop($formulaStrings); + $formulaStrings[] = "$space3$space2($expression$space5$space4)"; + unset($space2, $space3, $space4, $space5); + + break; + case 'tArray': // array constant + $constantArray = self::readBIFF8ConstantArray($additionalData); + $formulaStrings[] = $space1 . $space0 . $constantArray['value']; + $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data + unset($space0, $space1); + + break; + case 'tMemArea': + // bite off chunk of additional data + $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($additionalData); + $additionalData = substr($additionalData, $cellRangeAddressList['size']); + $formulaStrings[] = "$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + case 'tArea': // cell range address + case 'tBool': // boolean + case 'tErr': // error code + case 'tInt': // integer + case 'tMemErr': + case 'tMemFunc': + case 'tMissArg': + case 'tName': + case 'tNameX': + case 'tNum': // number + case 'tRef': // single cell reference + case 'tRef3d': // 3d cell reference + case 'tArea3d': // 3d cell range reference + case 'tRefN': + case 'tAreaN': + case 'tStr': // string + $formulaStrings[] = "$space1$space0{$token['data']}"; + unset($space0, $space1); + + break; + } + } + $formulaString = $formulaStrings[0]; + + return $formulaString; + } + + /** + * Fetch next token from binary formula data. + * + * @param string $formulaData Formula data + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @throws Exception + * + * @return array + */ + private function getNextToken($formulaData, $baseCell = 'A1') + { + // offset: 0; size: 1; token id + $id = ord($formulaData[0]); // token id + $name = false; // initialize token name + + switch ($id) { + case 0x03: + $name = 'tAdd'; + $size = 1; + $data = '+'; + + break; + case 0x04: + $name = 'tSub'; + $size = 1; + $data = '-'; + + break; + case 0x05: + $name = 'tMul'; + $size = 1; + $data = '*'; + + break; + case 0x06: + $name = 'tDiv'; + $size = 1; + $data = '/'; + + break; + case 0x07: + $name = 'tPower'; + $size = 1; + $data = '^'; + + break; + case 0x08: + $name = 'tConcat'; + $size = 1; + $data = '&'; + + break; + case 0x09: + $name = 'tLT'; + $size = 1; + $data = '<'; + + break; + case 0x0A: + $name = 'tLE'; + $size = 1; + $data = '<='; + + break; + case 0x0B: + $name = 'tEQ'; + $size = 1; + $data = '='; + + break; + case 0x0C: + $name = 'tGE'; + $size = 1; + $data = '>='; + + break; + case 0x0D: + $name = 'tGT'; + $size = 1; + $data = '>'; + + break; + case 0x0E: + $name = 'tNE'; + $size = 1; + $data = '<>'; + + break; + case 0x0F: + $name = 'tIsect'; + $size = 1; + $data = ' '; + + break; + case 0x10: + $name = 'tList'; + $size = 1; + $data = ','; + + break; + case 0x11: + $name = 'tRange'; + $size = 1; + $data = ':'; + + break; + case 0x12: + $name = 'tUplus'; + $size = 1; + $data = '+'; + + break; + case 0x13: + $name = 'tUminus'; + $size = 1; + $data = '-'; + + break; + case 0x14: + $name = 'tPercent'; + $size = 1; + $data = '%'; + + break; + case 0x15: // parenthesis + $name = 'tParen'; + $size = 1; + $data = null; + + break; + case 0x16: // missing argument + $name = 'tMissArg'; + $size = 1; + $data = ''; + + break; + case 0x17: // string + $name = 'tStr'; + // offset: 1; size: var; Unicode string, 8-bit string length + $string = self::readUnicodeStringShort(substr($formulaData, 1)); + $size = 1 + $string['size']; + $data = self::UTF8toExcelDoubleQuoted($string['value']); + + break; + case 0x19: // Special attribute + // offset: 1; size: 1; attribute type flags: + switch (ord($formulaData[1])) { + case 0x01: + $name = 'tAttrVolatile'; + $size = 4; + $data = null; + + break; + case 0x02: + $name = 'tAttrIf'; + $size = 4; + $data = null; + + break; + case 0x04: + $name = 'tAttrChoose'; + // offset: 2; size: 2; number of choices in the CHOOSE function ($nc, number of parameters decreased by 1) + $nc = self::getUInt2d($formulaData, 2); + // offset: 4; size: 2 * $nc + // offset: 4 + 2 * $nc; size: 2 + $size = 2 * $nc + 6; + $data = null; + + break; + case 0x08: + $name = 'tAttrSkip'; + $size = 4; + $data = null; + + break; + case 0x10: + $name = 'tAttrSum'; + $size = 4; + $data = null; + + break; + case 0x40: + case 0x41: + $name = 'tAttrSpace'; + $size = 4; + // offset: 2; size: 2; space type and position + switch (ord($formulaData[2])) { + case 0x00: + $spacetype = 'type0'; + + break; + case 0x01: + $spacetype = 'type1'; + + break; + case 0x02: + $spacetype = 'type2'; + + break; + case 0x03: + $spacetype = 'type3'; + + break; + case 0x04: + $spacetype = 'type4'; + + break; + case 0x05: + $spacetype = 'type5'; + + break; + default: + throw new Exception('Unrecognized space type in tAttrSpace token'); + + break; + } + // offset: 3; size: 1; number of inserted spaces/carriage returns + $spacecount = ord($formulaData[3]); + + $data = ['spacetype' => $spacetype, 'spacecount' => $spacecount]; + + break; + default: + throw new Exception('Unrecognized attribute flag in tAttr token'); + + break; + } + + break; + case 0x1C: // error code + // offset: 1; size: 1; error code + $name = 'tErr'; + $size = 2; + $data = Xls\ErrorCode::lookup(ord($formulaData[1])); + + break; + case 0x1D: // boolean + // offset: 1; size: 1; 0 = false, 1 = true; + $name = 'tBool'; + $size = 2; + $data = ord($formulaData[1]) ? 'TRUE' : 'FALSE'; + + break; + case 0x1E: // integer + // offset: 1; size: 2; unsigned 16-bit integer + $name = 'tInt'; + $size = 3; + $data = self::getUInt2d($formulaData, 1); + + break; + case 0x1F: // number + // offset: 1; size: 8; + $name = 'tNum'; + $size = 9; + $data = self::extractNumber(substr($formulaData, 1)); + $data = str_replace(',', '.', (string) $data); // in case non-English locale + break; + case 0x20: // array constant + case 0x40: + case 0x60: + // offset: 1; size: 7; not used + $name = 'tArray'; + $size = 8; + $data = null; + + break; + case 0x21: // function with fixed number of arguments + case 0x41: + case 0x61: + $name = 'tFunc'; + $size = 3; + // offset: 1; size: 2; index to built-in sheet function + switch (self::getUInt2d($formulaData, 1)) { + case 2: + $function = 'ISNA'; + $args = 1; + + break; + case 3: + $function = 'ISERROR'; + $args = 1; + + break; + case 10: + $function = 'NA'; + $args = 0; + + break; + case 15: + $function = 'SIN'; + $args = 1; + + break; + case 16: + $function = 'COS'; + $args = 1; + + break; + case 17: + $function = 'TAN'; + $args = 1; + + break; + case 18: + $function = 'ATAN'; + $args = 1; + + break; + case 19: + $function = 'PI'; + $args = 0; + + break; + case 20: + $function = 'SQRT'; + $args = 1; + + break; + case 21: + $function = 'EXP'; + $args = 1; + + break; + case 22: + $function = 'LN'; + $args = 1; + + break; + case 23: + $function = 'LOG10'; + $args = 1; + + break; + case 24: + $function = 'ABS'; + $args = 1; + + break; + case 25: + $function = 'INT'; + $args = 1; + + break; + case 26: + $function = 'SIGN'; + $args = 1; + + break; + case 27: + $function = 'ROUND'; + $args = 2; + + break; + case 30: + $function = 'REPT'; + $args = 2; + + break; + case 31: + $function = 'MID'; + $args = 3; + + break; + case 32: + $function = 'LEN'; + $args = 1; + + break; + case 33: + $function = 'VALUE'; + $args = 1; + + break; + case 34: + $function = 'TRUE'; + $args = 0; + + break; + case 35: + $function = 'FALSE'; + $args = 0; + + break; + case 38: + $function = 'NOT'; + $args = 1; + + break; + case 39: + $function = 'MOD'; + $args = 2; + + break; + case 40: + $function = 'DCOUNT'; + $args = 3; + + break; + case 41: + $function = 'DSUM'; + $args = 3; + + break; + case 42: + $function = 'DAVERAGE'; + $args = 3; + + break; + case 43: + $function = 'DMIN'; + $args = 3; + + break; + case 44: + $function = 'DMAX'; + $args = 3; + + break; + case 45: + $function = 'DSTDEV'; + $args = 3; + + break; + case 48: + $function = 'TEXT'; + $args = 2; + + break; + case 61: + $function = 'MIRR'; + $args = 3; + + break; + case 63: + $function = 'RAND'; + $args = 0; + + break; + case 65: + $function = 'DATE'; + $args = 3; + + break; + case 66: + $function = 'TIME'; + $args = 3; + + break; + case 67: + $function = 'DAY'; + $args = 1; + + break; + case 68: + $function = 'MONTH'; + $args = 1; + + break; + case 69: + $function = 'YEAR'; + $args = 1; + + break; + case 71: + $function = 'HOUR'; + $args = 1; + + break; + case 72: + $function = 'MINUTE'; + $args = 1; + + break; + case 73: + $function = 'SECOND'; + $args = 1; + + break; + case 74: + $function = 'NOW'; + $args = 0; + + break; + case 75: + $function = 'AREAS'; + $args = 1; + + break; + case 76: + $function = 'ROWS'; + $args = 1; + + break; + case 77: + $function = 'COLUMNS'; + $args = 1; + + break; + case 83: + $function = 'TRANSPOSE'; + $args = 1; + + break; + case 86: + $function = 'TYPE'; + $args = 1; + + break; + case 97: + $function = 'ATAN2'; + $args = 2; + + break; + case 98: + $function = 'ASIN'; + $args = 1; + + break; + case 99: + $function = 'ACOS'; + $args = 1; + + break; + case 105: + $function = 'ISREF'; + $args = 1; + + break; + case 111: + $function = 'CHAR'; + $args = 1; + + break; + case 112: + $function = 'LOWER'; + $args = 1; + + break; + case 113: + $function = 'UPPER'; + $args = 1; + + break; + case 114: + $function = 'PROPER'; + $args = 1; + + break; + case 117: + $function = 'EXACT'; + $args = 2; + + break; + case 118: + $function = 'TRIM'; + $args = 1; + + break; + case 119: + $function = 'REPLACE'; + $args = 4; + + break; + case 121: + $function = 'CODE'; + $args = 1; + + break; + case 126: + $function = 'ISERR'; + $args = 1; + + break; + case 127: + $function = 'ISTEXT'; + $args = 1; + + break; + case 128: + $function = 'ISNUMBER'; + $args = 1; + + break; + case 129: + $function = 'ISBLANK'; + $args = 1; + + break; + case 130: + $function = 'T'; + $args = 1; + + break; + case 131: + $function = 'N'; + $args = 1; + + break; + case 140: + $function = 'DATEVALUE'; + $args = 1; + + break; + case 141: + $function = 'TIMEVALUE'; + $args = 1; + + break; + case 142: + $function = 'SLN'; + $args = 3; + + break; + case 143: + $function = 'SYD'; + $args = 4; + + break; + case 162: + $function = 'CLEAN'; + $args = 1; + + break; + case 163: + $function = 'MDETERM'; + $args = 1; + + break; + case 164: + $function = 'MINVERSE'; + $args = 1; + + break; + case 165: + $function = 'MMULT'; + $args = 2; + + break; + case 184: + $function = 'FACT'; + $args = 1; + + break; + case 189: + $function = 'DPRODUCT'; + $args = 3; + + break; + case 190: + $function = 'ISNONTEXT'; + $args = 1; + + break; + case 195: + $function = 'DSTDEVP'; + $args = 3; + + break; + case 196: + $function = 'DVARP'; + $args = 3; + + break; + case 198: + $function = 'ISLOGICAL'; + $args = 1; + + break; + case 199: + $function = 'DCOUNTA'; + $args = 3; + + break; + case 207: + $function = 'REPLACEB'; + $args = 4; + + break; + case 210: + $function = 'MIDB'; + $args = 3; + + break; + case 211: + $function = 'LENB'; + $args = 1; + + break; + case 212: + $function = 'ROUNDUP'; + $args = 2; + + break; + case 213: + $function = 'ROUNDDOWN'; + $args = 2; + + break; + case 214: + $function = 'ASC'; + $args = 1; + + break; + case 215: + $function = 'DBCS'; + $args = 1; + + break; + case 221: + $function = 'TODAY'; + $args = 0; + + break; + case 229: + $function = 'SINH'; + $args = 1; + + break; + case 230: + $function = 'COSH'; + $args = 1; + + break; + case 231: + $function = 'TANH'; + $args = 1; + + break; + case 232: + $function = 'ASINH'; + $args = 1; + + break; + case 233: + $function = 'ACOSH'; + $args = 1; + + break; + case 234: + $function = 'ATANH'; + $args = 1; + + break; + case 235: + $function = 'DGET'; + $args = 3; + + break; + case 244: + $function = 'INFO'; + $args = 1; + + break; + case 252: + $function = 'FREQUENCY'; + $args = 2; + + break; + case 261: + $function = 'ERROR.TYPE'; + $args = 1; + + break; + case 271: + $function = 'GAMMALN'; + $args = 1; + + break; + case 273: + $function = 'BINOMDIST'; + $args = 4; + + break; + case 274: + $function = 'CHIDIST'; + $args = 2; + + break; + case 275: + $function = 'CHIINV'; + $args = 2; + + break; + case 276: + $function = 'COMBIN'; + $args = 2; + + break; + case 277: + $function = 'CONFIDENCE'; + $args = 3; + + break; + case 278: + $function = 'CRITBINOM'; + $args = 3; + + break; + case 279: + $function = 'EVEN'; + $args = 1; + + break; + case 280: + $function = 'EXPONDIST'; + $args = 3; + + break; + case 281: + $function = 'FDIST'; + $args = 3; + + break; + case 282: + $function = 'FINV'; + $args = 3; + + break; + case 283: + $function = 'FISHER'; + $args = 1; + + break; + case 284: + $function = 'FISHERINV'; + $args = 1; + + break; + case 285: + $function = 'FLOOR'; + $args = 2; + + break; + case 286: + $function = 'GAMMADIST'; + $args = 4; + + break; + case 287: + $function = 'GAMMAINV'; + $args = 3; + + break; + case 288: + $function = 'CEILING'; + $args = 2; + + break; + case 289: + $function = 'HYPGEOMDIST'; + $args = 4; + + break; + case 290: + $function = 'LOGNORMDIST'; + $args = 3; + + break; + case 291: + $function = 'LOGINV'; + $args = 3; + + break; + case 292: + $function = 'NEGBINOMDIST'; + $args = 3; + + break; + case 293: + $function = 'NORMDIST'; + $args = 4; + + break; + case 294: + $function = 'NORMSDIST'; + $args = 1; + + break; + case 295: + $function = 'NORMINV'; + $args = 3; + + break; + case 296: + $function = 'NORMSINV'; + $args = 1; + + break; + case 297: + $function = 'STANDARDIZE'; + $args = 3; + + break; + case 298: + $function = 'ODD'; + $args = 1; + + break; + case 299: + $function = 'PERMUT'; + $args = 2; + + break; + case 300: + $function = 'POISSON'; + $args = 3; + + break; + case 301: + $function = 'TDIST'; + $args = 3; + + break; + case 302: + $function = 'WEIBULL'; + $args = 4; + + break; + case 303: + $function = 'SUMXMY2'; + $args = 2; + + break; + case 304: + $function = 'SUMX2MY2'; + $args = 2; + + break; + case 305: + $function = 'SUMX2PY2'; + $args = 2; + + break; + case 306: + $function = 'CHITEST'; + $args = 2; + + break; + case 307: + $function = 'CORREL'; + $args = 2; + + break; + case 308: + $function = 'COVAR'; + $args = 2; + + break; + case 309: + $function = 'FORECAST'; + $args = 3; + + break; + case 310: + $function = 'FTEST'; + $args = 2; + + break; + case 311: + $function = 'INTERCEPT'; + $args = 2; + + break; + case 312: + $function = 'PEARSON'; + $args = 2; + + break; + case 313: + $function = 'RSQ'; + $args = 2; + + break; + case 314: + $function = 'STEYX'; + $args = 2; + + break; + case 315: + $function = 'SLOPE'; + $args = 2; + + break; + case 316: + $function = 'TTEST'; + $args = 4; + + break; + case 325: + $function = 'LARGE'; + $args = 2; + + break; + case 326: + $function = 'SMALL'; + $args = 2; + + break; + case 327: + $function = 'QUARTILE'; + $args = 2; + + break; + case 328: + $function = 'PERCENTILE'; + $args = 2; + + break; + case 331: + $function = 'TRIMMEAN'; + $args = 2; + + break; + case 332: + $function = 'TINV'; + $args = 2; + + break; + case 337: + $function = 'POWER'; + $args = 2; + + break; + case 342: + $function = 'RADIANS'; + $args = 1; + + break; + case 343: + $function = 'DEGREES'; + $args = 1; + + break; + case 346: + $function = 'COUNTIF'; + $args = 2; + + break; + case 347: + $function = 'COUNTBLANK'; + $args = 1; + + break; + case 350: + $function = 'ISPMT'; + $args = 4; + + break; + case 351: + $function = 'DATEDIF'; + $args = 3; + + break; + case 352: + $function = 'DATESTRING'; + $args = 1; + + break; + case 353: + $function = 'NUMBERSTRING'; + $args = 2; + + break; + case 360: + $function = 'PHONETIC'; + $args = 1; + + break; + case 368: + $function = 'BAHTTEXT'; + $args = 1; + + break; + default: + throw new Exception('Unrecognized function in formula'); + + break; + } + $data = ['function' => $function, 'args' => $args]; + + break; + case 0x22: // function with variable number of arguments + case 0x42: + case 0x62: + $name = 'tFuncV'; + $size = 4; + // offset: 1; size: 1; number of arguments + $args = ord($formulaData[1]); + // offset: 2: size: 2; index to built-in sheet function + $index = self::getUInt2d($formulaData, 2); + switch ($index) { + case 0: + $function = 'COUNT'; + + break; + case 1: + $function = 'IF'; + + break; + case 4: + $function = 'SUM'; + + break; + case 5: + $function = 'AVERAGE'; + + break; + case 6: + $function = 'MIN'; + + break; + case 7: + $function = 'MAX'; + + break; + case 8: + $function = 'ROW'; + + break; + case 9: + $function = 'COLUMN'; + + break; + case 11: + $function = 'NPV'; + + break; + case 12: + $function = 'STDEV'; + + break; + case 13: + $function = 'DOLLAR'; + + break; + case 14: + $function = 'FIXED'; + + break; + case 28: + $function = 'LOOKUP'; + + break; + case 29: + $function = 'INDEX'; + + break; + case 36: + $function = 'AND'; + + break; + case 37: + $function = 'OR'; + + break; + case 46: + $function = 'VAR'; + + break; + case 49: + $function = 'LINEST'; + + break; + case 50: + $function = 'TREND'; + + break; + case 51: + $function = 'LOGEST'; + + break; + case 52: + $function = 'GROWTH'; + + break; + case 56: + $function = 'PV'; + + break; + case 57: + $function = 'FV'; + + break; + case 58: + $function = 'NPER'; + + break; + case 59: + $function = 'PMT'; + + break; + case 60: + $function = 'RATE'; + + break; + case 62: + $function = 'IRR'; + + break; + case 64: + $function = 'MATCH'; + + break; + case 70: + $function = 'WEEKDAY'; + + break; + case 78: + $function = 'OFFSET'; + + break; + case 82: + $function = 'SEARCH'; + + break; + case 100: + $function = 'CHOOSE'; + + break; + case 101: + $function = 'HLOOKUP'; + + break; + case 102: + $function = 'VLOOKUP'; + + break; + case 109: + $function = 'LOG'; + + break; + case 115: + $function = 'LEFT'; + + break; + case 116: + $function = 'RIGHT'; + + break; + case 120: + $function = 'SUBSTITUTE'; + + break; + case 124: + $function = 'FIND'; + + break; + case 125: + $function = 'CELL'; + + break; + case 144: + $function = 'DDB'; + + break; + case 148: + $function = 'INDIRECT'; + + break; + case 167: + $function = 'IPMT'; + + break; + case 168: + $function = 'PPMT'; + + break; + case 169: + $function = 'COUNTA'; + + break; + case 183: + $function = 'PRODUCT'; + + break; + case 193: + $function = 'STDEVP'; + + break; + case 194: + $function = 'VARP'; + + break; + case 197: + $function = 'TRUNC'; + + break; + case 204: + $function = 'USDOLLAR'; + + break; + case 205: + $function = 'FINDB'; + + break; + case 206: + $function = 'SEARCHB'; + + break; + case 208: + $function = 'LEFTB'; + + break; + case 209: + $function = 'RIGHTB'; + + break; + case 216: + $function = 'RANK'; + + break; + case 219: + $function = 'ADDRESS'; + + break; + case 220: + $function = 'DAYS360'; + + break; + case 222: + $function = 'VDB'; + + break; + case 227: + $function = 'MEDIAN'; + + break; + case 228: + $function = 'SUMPRODUCT'; + + break; + case 247: + $function = 'DB'; + + break; + case 255: + $function = ''; + + break; + case 269: + $function = 'AVEDEV'; + + break; + case 270: + $function = 'BETADIST'; + + break; + case 272: + $function = 'BETAINV'; + + break; + case 317: + $function = 'PROB'; + + break; + case 318: + $function = 'DEVSQ'; + + break; + case 319: + $function = 'GEOMEAN'; + + break; + case 320: + $function = 'HARMEAN'; + + break; + case 321: + $function = 'SUMSQ'; + + break; + case 322: + $function = 'KURT'; + + break; + case 323: + $function = 'SKEW'; + + break; + case 324: + $function = 'ZTEST'; + + break; + case 329: + $function = 'PERCENTRANK'; + + break; + case 330: + $function = 'MODE'; + + break; + case 336: + $function = 'CONCATENATE'; + + break; + case 344: + $function = 'SUBTOTAL'; + + break; + case 345: + $function = 'SUMIF'; + + break; + case 354: + $function = 'ROMAN'; + + break; + case 358: + $function = 'GETPIVOTDATA'; + + break; + case 359: + $function = 'HYPERLINK'; + + break; + case 361: + $function = 'AVERAGEA'; + + break; + case 362: + $function = 'MAXA'; + + break; + case 363: + $function = 'MINA'; + + break; + case 364: + $function = 'STDEVPA'; + + break; + case 365: + $function = 'VARPA'; + + break; + case 366: + $function = 'STDEVA'; + + break; + case 367: + $function = 'VARA'; + + break; + default: + throw new Exception('Unrecognized function in formula'); + + break; + } + $data = ['function' => $function, 'args' => $args]; + + break; + case 0x23: // index to defined name + case 0x43: + case 0x63: + $name = 'tName'; + $size = 5; + // offset: 1; size: 2; one-based index to definedname record + $definedNameIndex = self::getUInt2d($formulaData, 1) - 1; + // offset: 2; size: 2; not used + $data = $this->definedname[$definedNameIndex]['name']; + + break; + case 0x24: // single cell reference e.g. A5 + case 0x44: + case 0x64: + $name = 'tRef'; + $size = 5; + $data = $this->readBIFF8CellAddress(substr($formulaData, 1, 4)); + + break; + case 0x25: // cell range reference to cells in the same sheet (2d) + case 0x45: + case 0x65: + $name = 'tArea'; + $size = 9; + $data = $this->readBIFF8CellRangeAddress(substr($formulaData, 1, 8)); + + break; + case 0x26: // Constant reference sub-expression + case 0x46: + case 0x66: + $name = 'tMemArea'; + // offset: 1; size: 4; not used + // offset: 5; size: 2; size of the following subexpression + $subSize = self::getUInt2d($formulaData, 5); + $size = 7 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); + + break; + case 0x27: // Deleted constant reference sub-expression + case 0x47: + case 0x67: + $name = 'tMemErr'; + // offset: 1; size: 4; not used + // offset: 5; size: 2; size of the following subexpression + $subSize = self::getUInt2d($formulaData, 5); + $size = 7 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); + + break; + case 0x29: // Variable reference sub-expression + case 0x49: + case 0x69: + $name = 'tMemFunc'; + // offset: 1; size: 2; size of the following sub-expression + $subSize = self::getUInt2d($formulaData, 1); + $size = 3 + $subSize; + $data = $this->getFormulaFromData(substr($formulaData, 3, $subSize)); + + break; + case 0x2C: // Relative 2d cell reference reference, used in shared formulas and some other places + case 0x4C: + case 0x6C: + $name = 'tRefN'; + $size = 5; + $data = $this->readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell); + + break; + case 0x2D: // Relative 2d range reference + case 0x4D: + case 0x6D: + $name = 'tAreaN'; + $size = 9; + $data = $this->readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell); + + break; + case 0x39: // External name + case 0x59: + case 0x79: + $name = 'tNameX'; + $size = 7; + // offset: 1; size: 2; index to REF entry in EXTERNSHEET record + // offset: 3; size: 2; one-based index to DEFINEDNAME or EXTERNNAME record + $index = self::getUInt2d($formulaData, 3); + // assume index is to EXTERNNAME record + $data = $this->externalNames[$index - 1]['name']; + // offset: 5; size: 2; not used + break; + case 0x3A: // 3d reference to cell + case 0x5A: + case 0x7A: + $name = 'tRef3d'; + $size = 7; + + try { + // offset: 1; size: 2; index to REF entry + $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1)); + // offset: 3; size: 4; cell address + $cellAddress = $this->readBIFF8CellAddress(substr($formulaData, 3, 4)); + + $data = "$sheetRange!$cellAddress"; + } catch (PhpSpreadsheetException $e) { + // deleted sheet reference + $data = '#REF!'; + } + + break; + case 0x3B: // 3d reference to cell range + case 0x5B: + case 0x7B: + $name = 'tArea3d'; + $size = 11; + + try { + // offset: 1; size: 2; index to REF entry + $sheetRange = $this->readSheetRangeByRefIndex(self::getUInt2d($formulaData, 1)); + // offset: 3; size: 8; cell address + $cellRangeAddress = $this->readBIFF8CellRangeAddress(substr($formulaData, 3, 8)); + + $data = "$sheetRange!$cellRangeAddress"; + } catch (PhpSpreadsheetException $e) { + // deleted sheet reference + $data = '#REF!'; + } + + break; + // Unknown cases // don't know how to deal with + default: + throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula'); + + break; + } + + return [ + 'id' => $id, + 'name' => $name, + 'size' => $size, + 'data' => $data, + ]; + } + + /** + * Reads a cell address in BIFF8 e.g. 'A2' or '$A$2' + * section 3.3.4. + * + * @param string $cellAddressStructure + * + * @return string + */ + private function readBIFF8CellAddress($cellAddressStructure) + { + // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) + $row = self::getUInt2d($cellAddressStructure, 0) + 1; + + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $column = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($cellAddressStructure, 2)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) { + $column = '$' . $column; + } + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { + $row = '$' . $row; + } + + return $column . $row; + } + + /** + * Reads a cell address in BIFF8 for shared formulas. Uses positive and negative values for row and column + * to indicate offsets from a base cell + * section 3.3.4. + * + * @param string $cellAddressStructure + * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * + * @return string + */ + private function readBIFF8CellAddressB($cellAddressStructure, $baseCell = 'A1') + { + list($baseCol, $baseRow) = Coordinate::coordinateFromString($baseCell); + $baseCol = Coordinate::columnIndexFromString($baseCol) - 1; + + // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) + $rowIndex = self::getUInt2d($cellAddressStructure, 0); + $row = self::getUInt2d($cellAddressStructure, 0) + 1; + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) { + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $colIndex = 0x00FF & self::getUInt2d($cellAddressStructure, 2); + + $column = Coordinate::stringFromColumnIndex($colIndex + 1); + $column = '$' . $column; + } else { + // offset: 2; size: 2; index to column or column offset + relative flags + // bit: 7-0; mask 0x00FF; column index + $relativeColIndex = 0x00FF & self::getInt2d($cellAddressStructure, 2); + $colIndex = $baseCol + $relativeColIndex; + $colIndex = ($colIndex < 256) ? $colIndex : $colIndex - 256; + $colIndex = ($colIndex >= 0) ? $colIndex : $colIndex + 256; + $column = Coordinate::stringFromColumnIndex($colIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { + $row = '$' . $row; + } else { + $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536; + $row = $baseRow + $rowIndex; + } + + return $column . $row; + } + + /** + * Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1' + * always fixed range + * section 2.5.14. + * + * @param string $subData + * + * @throws Exception + * + * @return string + */ + private function readBIFF5CellRangeAddressFixed($subData) + { + // offset: 0; size: 2; index to first row + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 1; index to first column + $fc = ord($subData[4]); + + // offset: 5; size: 1; index to last column + $lc = ord($subData[5]); + + // check values + if ($fr > $lr || $fc > $lc) { + throw new Exception('Not a cell range address'); + } + + // column index to letter + $fc = Coordinate::stringFromColumnIndex($fc + 1); + $lc = Coordinate::stringFromColumnIndex($lc + 1); + + if ($fr == $lr and $fc == $lc) { + return "$fc$fr"; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 e.g. 'A2:B6' or 'A1' + * always fixed range + * section 2.5.14. + * + * @param string $subData + * + * @throws Exception + * + * @return string + */ + private function readBIFF8CellRangeAddressFixed($subData) + { + // offset: 0; size: 2; index to first row + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 2; index to first column + $fc = self::getUInt2d($subData, 4); + + // offset: 6; size: 2; index to last column + $lc = self::getUInt2d($subData, 6); + + // check values + if ($fr > $lr || $fc > $lc) { + throw new Exception('Not a cell range address'); + } + + // column index to letter + $fc = Coordinate::stringFromColumnIndex($fc + 1); + $lc = Coordinate::stringFromColumnIndex($lc + 1); + + if ($fr == $lr and $fc == $lc) { + return "$fc$fr"; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 e.g. 'A2:B6' or '$A$2:$B$6' + * there are flags indicating whether column/row index is relative + * section 3.3.4. + * + * @param string $subData + * + * @return string + */ + private function readBIFF8CellRangeAddress($subData) + { + // todo: if cell range is just a single cell, should this funciton + // not just return e.g. 'A1' and not 'A1:A1' ? + + // offset: 0; size: 2; index to first row (0... 65535) (or offset (-32768... 32767)) + $fr = self::getUInt2d($subData, 0) + 1; + + // offset: 2; size: 2; index to last row (0... 65535) (or offset (-32768... 32767)) + $lr = self::getUInt2d($subData, 2) + 1; + + // offset: 4; size: 2; index to first column or column offset + relative flags + + // bit: 7-0; mask 0x00FF; column index + $fc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 4)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 4))) { + $fc = '$' . $fc; + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 4))) { + $fr = '$' . $fr; + } + + // offset: 6; size: 2; index to last column or column offset + relative flags + + // bit: 7-0; mask 0x00FF; column index + $lc = Coordinate::stringFromColumnIndex((0x00FF & self::getUInt2d($subData, 6)) + 1); + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 6))) { + $lc = '$' . $lc; + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 6))) { + $lr = '$' . $lr; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Reads a cell range address in BIFF8 for shared formulas. Uses positive and negative values for row and column + * to indicate offsets from a base cell + * section 3.3.4. + * + * @param string $subData + * @param string $baseCell Base cell + * + * @return string Cell range address + */ + private function readBIFF8CellRangeAddressB($subData, $baseCell = 'A1') + { + list($baseCol, $baseRow) = Coordinate::coordinateFromString($baseCell); + $baseCol = Coordinate::columnIndexFromString($baseCol) - 1; + + // TODO: if cell range is just a single cell, should this funciton + // not just return e.g. 'A1' and not 'A1:A1' ? + + // offset: 0; size: 2; first row + $frIndex = self::getUInt2d($subData, 0); // adjust below + + // offset: 2; size: 2; relative index to first row (0... 65535) should be treated as offset (-32768... 32767) + $lrIndex = self::getUInt2d($subData, 2); // adjust below + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 4))) { + // absolute column index + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $fcIndex = 0x00FF & self::getUInt2d($subData, 4); + $fc = Coordinate::stringFromColumnIndex($fcIndex + 1); + $fc = '$' . $fc; + } else { + // column offset + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $relativeFcIndex = 0x00FF & self::getInt2d($subData, 4); + $fcIndex = $baseCol + $relativeFcIndex; + $fcIndex = ($fcIndex < 256) ? $fcIndex : $fcIndex - 256; + $fcIndex = ($fcIndex >= 0) ? $fcIndex : $fcIndex + 256; + $fc = Coordinate::stringFromColumnIndex($fcIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 4))) { + // absolute row index + $fr = $frIndex + 1; + $fr = '$' . $fr; + } else { + // row offset + $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536; + $fr = $baseRow + $frIndex; + } + + // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) + if (!(0x4000 & self::getUInt2d($subData, 6))) { + // absolute column index + // offset: 6; size: 2; last column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $lcIndex = 0x00FF & self::getUInt2d($subData, 6); + $lc = Coordinate::stringFromColumnIndex($lcIndex + 1); + $lc = '$' . $lc; + } else { + // column offset + // offset: 4; size: 2; first column with relative/absolute flags + // bit: 7-0; mask 0x00FF; column index + $relativeLcIndex = 0x00FF & self::getInt2d($subData, 4); + $lcIndex = $baseCol + $relativeLcIndex; + $lcIndex = ($lcIndex < 256) ? $lcIndex : $lcIndex - 256; + $lcIndex = ($lcIndex >= 0) ? $lcIndex : $lcIndex + 256; + $lc = Coordinate::stringFromColumnIndex($lcIndex + 1); + } + + // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) + if (!(0x8000 & self::getUInt2d($subData, 6))) { + // absolute row index + $lr = $lrIndex + 1; + $lr = '$' . $lr; + } else { + // row offset + $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536; + $lr = $baseRow + $lrIndex; + } + + return "$fc$fr:$lc$lr"; + } + + /** + * Read BIFF8 cell range address list + * section 2.5.15. + * + * @param string $subData + * + * @return array + */ + private function readBIFF8CellRangeAddressList($subData) + { + $cellRangeAddresses = []; + + // offset: 0; size: 2; number of the following cell range addresses + $nm = self::getUInt2d($subData, 0); + + $offset = 2; + // offset: 2; size: 8 * $nm; list of $nm (fixed) cell range addresses + for ($i = 0; $i < $nm; ++$i) { + $cellRangeAddresses[] = $this->readBIFF8CellRangeAddressFixed(substr($subData, $offset, 8)); + $offset += 8; + } + + return [ + 'size' => 2 + 8 * $nm, + 'cellRangeAddresses' => $cellRangeAddresses, + ]; + } + + /** + * Read BIFF5 cell range address list + * section 2.5.15. + * + * @param string $subData + * + * @return array + */ + private function readBIFF5CellRangeAddressList($subData) + { + $cellRangeAddresses = []; + + // offset: 0; size: 2; number of the following cell range addresses + $nm = self::getUInt2d($subData, 0); + + $offset = 2; + // offset: 2; size: 6 * $nm; list of $nm (fixed) cell range addresses + for ($i = 0; $i < $nm; ++$i) { + $cellRangeAddresses[] = $this->readBIFF5CellRangeAddressFixed(substr($subData, $offset, 6)); + $offset += 6; + } + + return [ + 'size' => 2 + 6 * $nm, + 'cellRangeAddresses' => $cellRangeAddresses, + ]; + } + + /** + * Get a sheet range like Sheet1:Sheet3 from REF index + * Note: If there is only one sheet in the range, one gets e.g Sheet1 + * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets, + * in which case an Exception is thrown. + * + * @param int $index + * + * @throws Exception + * + * @return false|string + */ + private function readSheetRangeByRefIndex($index) + { + if (isset($this->ref[$index])) { + $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type']; + + switch ($type) { + case 'internal': + // check if we have a deleted 3d reference + if ($this->ref[$index]['firstSheetIndex'] == 0xFFFF or $this->ref[$index]['lastSheetIndex'] == 0xFFFF) { + throw new Exception('Deleted sheet reference'); + } + + // we have normal sheet range (collapsed or uncollapsed) + $firstSheetName = $this->sheets[$this->ref[$index]['firstSheetIndex']]['name']; + $lastSheetName = $this->sheets[$this->ref[$index]['lastSheetIndex']]['name']; + + if ($firstSheetName == $lastSheetName) { + // collapsed sheet range + $sheetRange = $firstSheetName; + } else { + $sheetRange = "$firstSheetName:$lastSheetName"; + } + + // escape the single-quotes + $sheetRange = str_replace("'", "''", $sheetRange); + + // if there are special characters, we need to enclose the range in single-quotes + // todo: check if we have identified the whole set of special characters + // it seems that the following characters are not accepted for sheet names + // and we may assume that they are not present: []*/:\? + if (preg_match("/[ !\"@#£$%&{()}<>=+'|^,;-]/u", $sheetRange)) { + $sheetRange = "'$sheetRange'"; + } + + return $sheetRange; + + break; + default: + // TODO: external sheet support + throw new Exception('Xls reader only supports internal sheets in formulas'); + + break; + } + } + + return false; + } + + /** + * read BIFF8 constant value array from array data + * returns e.g. ['value' => '{1,2;3,4}', 'size' => 40] + * section 2.5.8. + * + * @param string $arrayData + * + * @return array + */ + private static function readBIFF8ConstantArray($arrayData) + { + // offset: 0; size: 1; number of columns decreased by 1 + $nc = ord($arrayData[0]); + + // offset: 1; size: 2; number of rows decreased by 1 + $nr = self::getUInt2d($arrayData, 1); + $size = 3; // initialize + $arrayData = substr($arrayData, 3); + + // offset: 3; size: var; list of ($nc + 1) * ($nr + 1) constant values + $matrixChunks = []; + for ($r = 1; $r <= $nr + 1; ++$r) { + $items = []; + for ($c = 1; $c <= $nc + 1; ++$c) { + $constant = self::readBIFF8Constant($arrayData); + $items[] = $constant['value']; + $arrayData = substr($arrayData, $constant['size']); + $size += $constant['size']; + } + $matrixChunks[] = implode(',', $items); // looks like e.g. '1,"hello"' + } + $matrix = '{' . implode(';', $matrixChunks) . '}'; + + return [ + 'value' => $matrix, + 'size' => $size, + ]; + } + + /** + * read BIFF8 constant value which may be 'Empty Value', 'Number', 'String Value', 'Boolean Value', 'Error Value' + * section 2.5.7 + * returns e.g. ['value' => '5', 'size' => 9]. + * + * @param string $valueData + * + * @return array + */ + private static function readBIFF8Constant($valueData) + { + // offset: 0; size: 1; identifier for type of constant + $identifier = ord($valueData[0]); + + switch ($identifier) { + case 0x00: // empty constant (what is this?) + $value = ''; + $size = 9; + + break; + case 0x01: // number + // offset: 1; size: 8; IEEE 754 floating-point value + $value = self::extractNumber(substr($valueData, 1, 8)); + $size = 9; + + break; + case 0x02: // string value + // offset: 1; size: var; Unicode string, 16-bit string length + $string = self::readUnicodeStringLong(substr($valueData, 1)); + $value = '"' . $string['value'] . '"'; + $size = 1 + $string['size']; + + break; + case 0x04: // boolean + // offset: 1; size: 1; 0 = FALSE, 1 = TRUE + if (ord($valueData[1])) { + $value = 'TRUE'; + } else { + $value = 'FALSE'; + } + $size = 9; + + break; + case 0x10: // error code + // offset: 1; size: 1; error code + $value = Xls\ErrorCode::lookup(ord($valueData[1])); + $size = 9; + + break; + } + + return [ + 'value' => $value, + 'size' => $size, + ]; + } + + /** + * Extract RGB color + * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4. + * + * @param string $rgb Encoded RGB value (4 bytes) + * + * @return array + */ + private static function readRGB($rgb) + { + // offset: 0; size 1; Red component + $r = ord($rgb[0]); + + // offset: 1; size: 1; Green component + $g = ord($rgb[1]); + + // offset: 2; size: 1; Blue component + $b = ord($rgb[2]); + + // HEX notation, e.g. 'FF00FC' + $rgb = sprintf('%02X%02X%02X', $r, $g, $b); + + return ['rgb' => $rgb]; + } + + /** + * Read byte string (8-bit string length) + * OpenOffice documentation: 2.5.2. + * + * @param string $subData + * + * @return array + */ + private function readByteStringShort($subData) + { + // offset: 0; size: 1; length of the string (character count) + $ln = ord($subData[0]); + + // offset: 1: size: var; character array (8-bit characters) + $value = $this->decodeCodepage(substr($subData, 1, $ln)); + + return [ + 'value' => $value, + 'size' => 1 + $ln, // size in bytes of data structure + ]; + } + + /** + * Read byte string (16-bit string length) + * OpenOffice documentation: 2.5.2. + * + * @param string $subData + * + * @return array + */ + private function readByteStringLong($subData) + { + // offset: 0; size: 2; length of the string (character count) + $ln = self::getUInt2d($subData, 0); + + // offset: 2: size: var; character array (8-bit characters) + $value = $this->decodeCodepage(substr($subData, 2)); + + //return $string; + return [ + 'value' => $value, + 'size' => 2 + $ln, // size in bytes of data structure + ]; + } + + /** + * Extracts an Excel Unicode short string (8-bit string length) + * OpenOffice documentation: 2.5.3 + * function will automatically find out where the Unicode string ends. + * + * @param string $subData + * + * @return array + */ + private static function readUnicodeStringShort($subData) + { + $value = ''; + + // offset: 0: size: 1; length of the string (character count) + $characterCount = ord($subData[0]); + + $string = self::readUnicodeString(substr($subData, 1), $characterCount); + + // add 1 for the string length + $string['size'] += 1; + + return $string; + } + + /** + * Extracts an Excel Unicode long string (16-bit string length) + * OpenOffice documentation: 2.5.3 + * this function is under construction, needs to support rich text, and Asian phonetic settings. + * + * @param string $subData + * + * @return array + */ + private static function readUnicodeStringLong($subData) + { + $value = ''; + + // offset: 0: size: 2; length of the string (character count) + $characterCount = self::getUInt2d($subData, 0); + + $string = self::readUnicodeString(substr($subData, 2), $characterCount); + + // add 2 for the string length + $string['size'] += 2; + + return $string; + } + + /** + * Read Unicode string with no string length field, but with known character count + * this function is under construction, needs to support rich text, and Asian phonetic settings + * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3. + * + * @param string $subData + * @param int $characterCount + * + * @return array + */ + private static function readUnicodeString($subData, $characterCount) + { + $value = ''; + + // offset: 0: size: 1; option flags + // bit: 0; mask: 0x01; character compression (0 = compressed 8-bit, 1 = uncompressed 16-bit) + $isCompressed = !((0x01 & ord($subData[0])) >> 0); + + // bit: 2; mask: 0x04; Asian phonetic settings + $hasAsian = (0x04) & ord($subData[0]) >> 2; + + // bit: 3; mask: 0x08; Rich-Text settings + $hasRichText = (0x08) & ord($subData[0]) >> 3; + + // offset: 1: size: var; character array + // this offset assumes richtext and Asian phonetic settings are off which is generally wrong + // needs to be fixed + $value = self::encodeUTF16(substr($subData, 1, $isCompressed ? $characterCount : 2 * $characterCount), $isCompressed); + + return [ + 'value' => $value, + 'size' => $isCompressed ? 1 + $characterCount : 1 + 2 * $characterCount, // the size in bytes including the option flags + ]; + } + + /** + * Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas. + * Example: hello"world --> "hello""world". + * + * @param string $value UTF-8 encoded string + * + * @return string + */ + private static function UTF8toExcelDoubleQuoted($value) + { + return '"' . str_replace('"', '""', $value) . '"'; + } + + /** + * Reads first 8 bytes of a string and return IEEE 754 float. + * + * @param string $data Binary string that is at least 8 bytes long + * + * @return float + */ + private static function extractNumber($data) + { + $rknumhigh = self::getInt4d($data, 4); + $rknumlow = self::getInt4d($data, 0); + $sign = ($rknumhigh & 0x80000000) >> 31; + $exp = (($rknumhigh & 0x7ff00000) >> 20) - 1023; + $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); + $mantissalow1 = ($rknumlow & 0x80000000) >> 31; + $mantissalow2 = ($rknumlow & 0x7fffffff); + $value = $mantissa / pow(2, (20 - $exp)); + + if ($mantissalow1 != 0) { + $value += 1 / pow(2, (21 - $exp)); + } + + $value += $mantissalow2 / pow(2, (52 - $exp)); + if ($sign) { + $value *= -1; + } + + return $value; + } + + /** + * @param int $rknum + * + * @return float + */ + private static function getIEEE754($rknum) + { + if (($rknum & 0x02) != 0) { + $value = $rknum >> 2; + } else { + // changes by mmp, info on IEEE754 encoding from + // research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html + // The RK format calls for using only the most significant 30 bits + // of the 64 bit floating point value. The other 34 bits are assumed + // to be 0 so we use the upper 30 bits of $rknum as follows... + $sign = ($rknum & 0x80000000) >> 31; + $exp = ($rknum & 0x7ff00000) >> 20; + $mantissa = (0x100000 | ($rknum & 0x000ffffc)); + $value = $mantissa / pow(2, (20 - ($exp - 1023))); + if ($sign) { + $value = -1 * $value; + } + //end of changes by mmp + } + if (($rknum & 0x01) != 0) { + $value /= 100; + } + + return $value; + } + + /** + * Get UTF-8 string from (compressed or uncompressed) UTF-16 string. + * + * @param string $string + * @param bool $compressed + * + * @return string + */ + private static function encodeUTF16($string, $compressed = false) + { + if ($compressed) { + $string = self::uncompressByteString($string); + } + + return StringHelper::convertEncoding($string, 'UTF-8', 'UTF-16LE'); + } + + /** + * Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8. + * + * @param string $string + * + * @return string + */ + private static function uncompressByteString($string) + { + $uncompressedString = ''; + $strLen = strlen($string); + for ($i = 0; $i < $strLen; ++$i) { + $uncompressedString .= $string[$i] . "\0"; + } + + return $uncompressedString; + } + + /** + * Convert string to UTF-8. Only used for BIFF5. + * + * @param string $string + * + * @return string + */ + private function decodeCodepage($string) + { + return StringHelper::convertEncoding($string, 'UTF-8', $this->codepage); + } + + /** + * Read 16-bit unsigned integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getUInt2d($data, $pos) + { + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8); + } + + /** + * Read 16-bit signed integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getInt2d($data, $pos) + { + return unpack('s', $data[$pos] . $data[$pos + 1])[1]; + } + + /** + * Read 32-bit signed integer. + * + * @param string $data + * @param int $pos + * + * @return int + */ + public static function getInt4d($data, $pos) + { + // FIX: represent numbers correctly on 64-bit system + // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 + // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems + $_or_24 = ord($data[$pos + 3]); + if ($_or_24 >= 128) { + // negative number + $_ord_24 = -abs((256 - $_or_24) << 24); + } else { + $_ord_24 = ($_or_24 & 127) << 24; + } + + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24; + } + + private function parseRichText($is) + { + $value = new RichText(); + $value->createText($is); + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color.php new file mode 100755 index 0000000..c45f88c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color.php @@ -0,0 +1,36 @@ + 'FF0000'] + */ + public static function map($color, $palette, $version) + { + if ($color <= 0x07 || $color >= 0x40) { + // special built-in color + return Color\BuiltIn::lookup($color); + } elseif (isset($palette, $palette[$color - 8])) { + // palette color, color index 0x08 maps to pallete index 0 + return $palette[$color - 8]; + } + + // default color table + if ($version == Xls::XLS_BIFF8) { + return Color\BIFF8::lookup($color); + } + + // BIFF5 + return Color\BIFF5::lookup($color); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php new file mode 100755 index 0000000..743d938 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php @@ -0,0 +1,81 @@ + '000000', + 0x09 => 'FFFFFF', + 0x0A => 'FF0000', + 0x0B => '00FF00', + 0x0C => '0000FF', + 0x0D => 'FFFF00', + 0x0E => 'FF00FF', + 0x0F => '00FFFF', + 0x10 => '800000', + 0x11 => '008000', + 0x12 => '000080', + 0x13 => '808000', + 0x14 => '800080', + 0x15 => '008080', + 0x16 => 'C0C0C0', + 0x17 => '808080', + 0x18 => '8080FF', + 0x19 => '802060', + 0x1A => 'FFFFC0', + 0x1B => 'A0E0F0', + 0x1C => '600080', + 0x1D => 'FF8080', + 0x1E => '0080C0', + 0x1F => 'C0C0FF', + 0x20 => '000080', + 0x21 => 'FF00FF', + 0x22 => 'FFFF00', + 0x23 => '00FFFF', + 0x24 => '800080', + 0x25 => '800000', + 0x26 => '008080', + 0x27 => '0000FF', + 0x28 => '00CFFF', + 0x29 => '69FFFF', + 0x2A => 'E0FFE0', + 0x2B => 'FFFF80', + 0x2C => 'A6CAF0', + 0x2D => 'DD9CB3', + 0x2E => 'B38FEE', + 0x2F => 'E3E3E3', + 0x30 => '2A6FF9', + 0x31 => '3FB8CD', + 0x32 => '488436', + 0x33 => '958C41', + 0x34 => '8E5E42', + 0x35 => 'A0627A', + 0x36 => '624FAC', + 0x37 => '969696', + 0x38 => '1D2FBE', + 0x39 => '286676', + 0x3A => '004500', + 0x3B => '453E01', + 0x3C => '6A2813', + 0x3D => '85396A', + 0x3E => '4A3285', + 0x3F => '424242', + ]; + + /** + * Map color array from BIFF5 built-in color index. + * + * @param int $color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php new file mode 100755 index 0000000..5c109fb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php @@ -0,0 +1,81 @@ + '000000', + 0x09 => 'FFFFFF', + 0x0A => 'FF0000', + 0x0B => '00FF00', + 0x0C => '0000FF', + 0x0D => 'FFFF00', + 0x0E => 'FF00FF', + 0x0F => '00FFFF', + 0x10 => '800000', + 0x11 => '008000', + 0x12 => '000080', + 0x13 => '808000', + 0x14 => '800080', + 0x15 => '008080', + 0x16 => 'C0C0C0', + 0x17 => '808080', + 0x18 => '9999FF', + 0x19 => '993366', + 0x1A => 'FFFFCC', + 0x1B => 'CCFFFF', + 0x1C => '660066', + 0x1D => 'FF8080', + 0x1E => '0066CC', + 0x1F => 'CCCCFF', + 0x20 => '000080', + 0x21 => 'FF00FF', + 0x22 => 'FFFF00', + 0x23 => '00FFFF', + 0x24 => '800080', + 0x25 => '800000', + 0x26 => '008080', + 0x27 => '0000FF', + 0x28 => '00CCFF', + 0x29 => 'CCFFFF', + 0x2A => 'CCFFCC', + 0x2B => 'FFFF99', + 0x2C => '99CCFF', + 0x2D => 'FF99CC', + 0x2E => 'CC99FF', + 0x2F => 'FFCC99', + 0x30 => '3366FF', + 0x31 => '33CCCC', + 0x32 => '99CC00', + 0x33 => 'FFCC00', + 0x34 => 'FF9900', + 0x35 => 'FF6600', + 0x36 => '666699', + 0x37 => '969696', + 0x38 => '003366', + 0x39 => '339966', + 0x3A => '003300', + 0x3B => '333300', + 0x3C => '993300', + 0x3D => '993366', + 0x3E => '333399', + 0x3F => '333333', + ]; + + /** + * Map color array from BIFF8 built-in color index. + * + * @param int $color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php new file mode 100755 index 0000000..90d50e3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php @@ -0,0 +1,35 @@ + '000000', + 0x01 => 'FFFFFF', + 0x02 => 'FF0000', + 0x03 => '00FF00', + 0x04 => '0000FF', + 0x05 => 'FFFF00', + 0x06 => 'FF00FF', + 0x07 => '00FFFF', + 0x40 => '000000', // system window text color + 0x41 => 'FFFFFF', // system window background color + ]; + + /** + * Map built-in color to RGB value. + * + * @param int $color Indexed color + * + * @return array + */ + public static function lookup($color) + { + if (isset(self::$map[$color])) { + return ['rgb' => self::$map[$color]]; + } + + return ['rgb' => '000000']; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/ErrorCode.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/ErrorCode.php new file mode 100755 index 0000000..7daf723 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/ErrorCode.php @@ -0,0 +1,32 @@ + '#NULL!', + 0x07 => '#DIV/0!', + 0x0F => '#VALUE!', + 0x17 => '#REF!', + 0x1D => '#NAME?', + 0x24 => '#NUM!', + 0x2A => '#N/A', + ]; + + /** + * Map error code, e.g. '#N/A'. + * + * @param int $code + * + * @return bool|string + */ + public static function lookup($code) + { + if (isset(self::$map[$code])) { + return self::$map[$code]; + } + + return false; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Escher.php new file mode 100755 index 0000000..858d6bb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Escher.php @@ -0,0 +1,677 @@ +object = $object; + } + + /** + * Load Escher stream data. May be a partial Escher stream. + * + * @param string $data + * + * @return BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer + */ + public function load($data) + { + $this->data = $data; + + // total byte size of Excel data (workbook global substream + sheet substreams) + $this->dataSize = strlen($this->data); + + $this->pos = 0; + + // Parse Escher stream + while ($this->pos < $this->dataSize) { + // offset: 2; size: 2: Record Type + $fbt = Xls::getUInt2d($this->data, $this->pos + 2); + + switch ($fbt) { + case self::DGGCONTAINER: + $this->readDggContainer(); + + break; + case self::DGG: + $this->readDgg(); + + break; + case self::BSTORECONTAINER: + $this->readBstoreContainer(); + + break; + case self::BSE: + $this->readBSE(); + + break; + case self::BLIPJPEG: + $this->readBlipJPEG(); + + break; + case self::BLIPPNG: + $this->readBlipPNG(); + + break; + case self::OPT: + $this->readOPT(); + + break; + case self::TERTIARYOPT: + $this->readTertiaryOPT(); + + break; + case self::SPLITMENUCOLORS: + $this->readSplitMenuColors(); + + break; + case self::DGCONTAINER: + $this->readDgContainer(); + + break; + case self::DG: + $this->readDg(); + + break; + case self::SPGRCONTAINER: + $this->readSpgrContainer(); + + break; + case self::SPCONTAINER: + $this->readSpContainer(); + + break; + case self::SPGR: + $this->readSpgr(); + + break; + case self::SP: + $this->readSp(); + + break; + case self::CLIENTTEXTBOX: + $this->readClientTextbox(); + + break; + case self::CLIENTANCHOR: + $this->readClientAnchor(); + + break; + case self::CLIENTDATA: + $this->readClientData(); + + break; + default: + $this->readDefault(); + + break; + } + } + + return $this->object; + } + + /** + * Read a generic record. + */ + private function readDefault() + { + // offset 0; size: 2; recVer and recInstance + $verInstance = Xls::getUInt2d($this->data, $this->pos); + + // offset: 2; size: 2: Record Type + $fbt = Xls::getUInt2d($this->data, $this->pos + 2); + + // bit: 0-3; mask: 0x000F; recVer + $recVer = (0x000F & $verInstance) >> 0; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read DggContainer record (Drawing Group Container). + */ + private function readDggContainer() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $dggContainer = new DggContainer(); + $this->object->setDggContainer($dggContainer); + $reader = new self($dggContainer); + $reader->load($recordData); + } + + /** + * Read Dgg record (Drawing Group). + */ + private function readDgg() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read BstoreContainer record (Blip Store Container). + */ + private function readBstoreContainer() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $bstoreContainer = new BstoreContainer(); + $this->object->setBstoreContainer($bstoreContainer); + $reader = new self($bstoreContainer); + $reader->load($recordData); + } + + /** + * Read BSE record. + */ + private function readBSE() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // add BSE to BstoreContainer + $BSE = new BSE(); + $this->object->addBSE($BSE); + + $BSE->setBLIPType($recInstance); + + // offset: 0; size: 1; btWin32 (MSOBLIPTYPE) + $btWin32 = ord($recordData[0]); + + // offset: 1; size: 1; btWin32 (MSOBLIPTYPE) + $btMacOS = ord($recordData[1]); + + // offset: 2; size: 16; MD4 digest + $rgbUid = substr($recordData, 2, 16); + + // offset: 18; size: 2; tag + $tag = Xls::getUInt2d($recordData, 18); + + // offset: 20; size: 4; size of BLIP in bytes + $size = Xls::getInt4d($recordData, 20); + + // offset: 24; size: 4; number of references to this BLIP + $cRef = Xls::getInt4d($recordData, 24); + + // offset: 28; size: 4; MSOFO file offset + $foDelay = Xls::getInt4d($recordData, 28); + + // offset: 32; size: 1; unused1 + $unused1 = ord($recordData[32]); + + // offset: 33; size: 1; size of nameData in bytes (including null terminator) + $cbName = ord($recordData[33]); + + // offset: 34; size: 1; unused2 + $unused2 = ord($recordData[34]); + + // offset: 35; size: 1; unused3 + $unused3 = ord($recordData[35]); + + // offset: 36; size: $cbName; nameData + $nameData = substr($recordData, 36, $cbName); + + // offset: 36 + $cbName, size: var; the BLIP data + $blipData = substr($recordData, 36 + $cbName); + + // record is a container, read contents + $reader = new self($BSE); + $reader->load($blipData); + } + + /** + * Read BlipJPEG record. Holds raw JPEG image data. + */ + private function readBlipJPEG() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $pos = 0; + + // offset: 0; size: 16; rgbUid1 (MD4 digest of) + $rgbUid1 = substr($recordData, 0, 16); + $pos += 16; + + // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 + if (in_array($recInstance, [0x046B, 0x06E3])) { + $rgbUid2 = substr($recordData, 16, 16); + $pos += 16; + } + + // offset: var; size: 1; tag + $tag = ord($recordData[$pos]); + $pos += 1; + + // offset: var; size: var; the raw image data + $data = substr($recordData, $pos); + + $blip = new Blip(); + $blip->setData($data); + + $this->object->setBlip($blip); + } + + /** + * Read BlipPNG record. Holds raw PNG image data. + */ + private function readBlipPNG() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $pos = 0; + + // offset: 0; size: 16; rgbUid1 (MD4 digest of) + $rgbUid1 = substr($recordData, 0, 16); + $pos += 16; + + // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 + if ($recInstance == 0x06E1) { + $rgbUid2 = substr($recordData, 16, 16); + $pos += 16; + } + + // offset: var; size: 1; tag + $tag = ord($recordData[$pos]); + $pos += 1; + + // offset: var; size: var; the raw image data + $data = substr($recordData, $pos); + + $blip = new Blip(); + $blip->setData($data); + + $this->object->setBlip($blip); + } + + /** + * Read OPT record. This record may occur within DggContainer record or SpContainer. + */ + private function readOPT() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + $this->readOfficeArtRGFOPTE($recordData, $recInstance); + } + + /** + * Read TertiaryOPT record. + */ + private function readTertiaryOPT() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read SplitMenuColors record. + */ + private function readSplitMenuColors() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read DgContainer record (Drawing Container). + */ + private function readDgContainer() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $dgContainer = new DgContainer(); + $this->object->setDgContainer($dgContainer); + $reader = new self($dgContainer); + $escher = $reader->load($recordData); + } + + /** + * Read Dg record (Drawing). + */ + private function readDg() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read SpgrContainer record (Shape Group Container). + */ + private function readSpgrContainer() + { + // context is either context DgContainer or SpgrContainer + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $spgrContainer = new SpgrContainer(); + + if ($this->object instanceof DgContainer) { + // DgContainer + $this->object->setSpgrContainer($spgrContainer); + } else { + // SpgrContainer + $this->object->addChild($spgrContainer); + } + + $reader = new self($spgrContainer); + $escher = $reader->load($recordData); + } + + /** + * Read SpContainer record (Shape Container). + */ + private function readSpContainer() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // add spContainer to spgrContainer + $spContainer = new SpContainer(); + $this->object->addChild($spContainer); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // record is a container, read contents + $reader = new self($spContainer); + $escher = $reader->load($recordData); + } + + /** + * Read Spgr record (Shape Group). + */ + private function readSpgr() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read Sp record (Shape). + */ + private function readSp() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read ClientTextbox record. + */ + private function readClientTextbox() + { + // offset: 0; size: 2; recVer and recInstance + + // bit: 4-15; mask: 0xFFF0; recInstance + $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4; + + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read ClientAnchor record. This record holds information about where the shape is anchored in worksheet. + */ + private function readClientAnchor() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + + // offset: 2; size: 2; upper-left corner column index (0-based) + $c1 = Xls::getUInt2d($recordData, 2); + + // offset: 4; size: 2; upper-left corner horizontal offset in 1/1024 of column width + $startOffsetX = Xls::getUInt2d($recordData, 4); + + // offset: 6; size: 2; upper-left corner row index (0-based) + $r1 = Xls::getUInt2d($recordData, 6); + + // offset: 8; size: 2; upper-left corner vertical offset in 1/256 of row height + $startOffsetY = Xls::getUInt2d($recordData, 8); + + // offset: 10; size: 2; bottom-right corner column index (0-based) + $c2 = Xls::getUInt2d($recordData, 10); + + // offset: 12; size: 2; bottom-right corner horizontal offset in 1/1024 of column width + $endOffsetX = Xls::getUInt2d($recordData, 12); + + // offset: 14; size: 2; bottom-right corner row index (0-based) + $r2 = Xls::getUInt2d($recordData, 14); + + // offset: 16; size: 2; bottom-right corner vertical offset in 1/256 of row height + $endOffsetY = Xls::getUInt2d($recordData, 16); + + // set the start coordinates + $this->object->setStartCoordinates(Coordinate::stringFromColumnIndex($c1 + 1) . ($r1 + 1)); + + // set the start offsetX + $this->object->setStartOffsetX($startOffsetX); + + // set the start offsetY + $this->object->setStartOffsetY($startOffsetY); + + // set the end coordinates + $this->object->setEndCoordinates(Coordinate::stringFromColumnIndex($c2 + 1) . ($r2 + 1)); + + // set the end offsetX + $this->object->setEndOffsetX($endOffsetX); + + // set the end offsetY + $this->object->setEndOffsetY($endOffsetY); + } + + /** + * Read ClientData record. + */ + private function readClientData() + { + $length = Xls::getInt4d($this->data, $this->pos + 4); + $recordData = substr($this->data, $this->pos + 8, $length); + + // move stream pointer to next record + $this->pos += 8 + $length; + } + + /** + * Read OfficeArtRGFOPTE table of property-value pairs. + * + * @param string $data Binary data + * @param int $n Number of properties + */ + private function readOfficeArtRGFOPTE($data, $n) + { + $splicedComplexData = substr($data, 6 * $n); + + // loop through property-value pairs + for ($i = 0; $i < $n; ++$i) { + // read 6 bytes at a time + $fopte = substr($data, 6 * $i, 6); + + // offset: 0; size: 2; opid + $opid = Xls::getUInt2d($fopte, 0); + + // bit: 0-13; mask: 0x3FFF; opid.opid + $opidOpid = (0x3FFF & $opid) >> 0; + + // bit: 14; mask 0x4000; 1 = value in op field is BLIP identifier + $opidFBid = (0x4000 & $opid) >> 14; + + // bit: 15; mask 0x8000; 1 = this is a complex property, op field specifies size of complex data + $opidFComplex = (0x8000 & $opid) >> 15; + + // offset: 2; size: 4; the value for this property + $op = Xls::getInt4d($fopte, 2); + + if ($opidFComplex) { + $complexData = substr($splicedComplexData, 0, $op); + $splicedComplexData = substr($splicedComplexData, $op); + + // we store string value with complex data + $value = $complexData; + } else { + // we store integer value + $value = $op; + } + + $this->object->setOPT($opidOpid, $value); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/MD5.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/MD5.php new file mode 100755 index 0000000..6a10e59 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/MD5.php @@ -0,0 +1,184 @@ +reset(); + } + + /** + * Reset the MD5 stream context. + */ + public function reset() + { + $this->a = 0x67452301; + $this->b = 0xEFCDAB89; + $this->c = 0x98BADCFE; + $this->d = 0x10325476; + } + + /** + * Get MD5 stream context. + * + * @return string + */ + public function getContext() + { + $s = ''; + foreach (['a', 'b', 'c', 'd'] as $i) { + $v = $this->{$i}; + $s .= chr($v & 0xff); + $s .= chr(($v >> 8) & 0xff); + $s .= chr(($v >> 16) & 0xff); + $s .= chr(($v >> 24) & 0xff); + } + + return $s; + } + + /** + * Add data to context. + * + * @param string $data Data to add + */ + public function add($data) + { + $words = array_values(unpack('V16', $data)); + + $A = $this->a; + $B = $this->b; + $C = $this->c; + $D = $this->d; + + $F = ['self', 'f']; + $G = ['self', 'g']; + $H = ['self', 'h']; + $I = ['self', 'i']; + + // ROUND 1 + self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478); + self::step($F, $D, $A, $B, $C, $words[1], 12, 0xe8c7b756); + self::step($F, $C, $D, $A, $B, $words[2], 17, 0x242070db); + self::step($F, $B, $C, $D, $A, $words[3], 22, 0xc1bdceee); + self::step($F, $A, $B, $C, $D, $words[4], 7, 0xf57c0faf); + self::step($F, $D, $A, $B, $C, $words[5], 12, 0x4787c62a); + self::step($F, $C, $D, $A, $B, $words[6], 17, 0xa8304613); + self::step($F, $B, $C, $D, $A, $words[7], 22, 0xfd469501); + self::step($F, $A, $B, $C, $D, $words[8], 7, 0x698098d8); + self::step($F, $D, $A, $B, $C, $words[9], 12, 0x8b44f7af); + self::step($F, $C, $D, $A, $B, $words[10], 17, 0xffff5bb1); + self::step($F, $B, $C, $D, $A, $words[11], 22, 0x895cd7be); + self::step($F, $A, $B, $C, $D, $words[12], 7, 0x6b901122); + self::step($F, $D, $A, $B, $C, $words[13], 12, 0xfd987193); + self::step($F, $C, $D, $A, $B, $words[14], 17, 0xa679438e); + self::step($F, $B, $C, $D, $A, $words[15], 22, 0x49b40821); + + // ROUND 2 + self::step($G, $A, $B, $C, $D, $words[1], 5, 0xf61e2562); + self::step($G, $D, $A, $B, $C, $words[6], 9, 0xc040b340); + self::step($G, $C, $D, $A, $B, $words[11], 14, 0x265e5a51); + self::step($G, $B, $C, $D, $A, $words[0], 20, 0xe9b6c7aa); + self::step($G, $A, $B, $C, $D, $words[5], 5, 0xd62f105d); + self::step($G, $D, $A, $B, $C, $words[10], 9, 0x02441453); + self::step($G, $C, $D, $A, $B, $words[15], 14, 0xd8a1e681); + self::step($G, $B, $C, $D, $A, $words[4], 20, 0xe7d3fbc8); + self::step($G, $A, $B, $C, $D, $words[9], 5, 0x21e1cde6); + self::step($G, $D, $A, $B, $C, $words[14], 9, 0xc33707d6); + self::step($G, $C, $D, $A, $B, $words[3], 14, 0xf4d50d87); + self::step($G, $B, $C, $D, $A, $words[8], 20, 0x455a14ed); + self::step($G, $A, $B, $C, $D, $words[13], 5, 0xa9e3e905); + self::step($G, $D, $A, $B, $C, $words[2], 9, 0xfcefa3f8); + self::step($G, $C, $D, $A, $B, $words[7], 14, 0x676f02d9); + self::step($G, $B, $C, $D, $A, $words[12], 20, 0x8d2a4c8a); + + // ROUND 3 + self::step($H, $A, $B, $C, $D, $words[5], 4, 0xfffa3942); + self::step($H, $D, $A, $B, $C, $words[8], 11, 0x8771f681); + self::step($H, $C, $D, $A, $B, $words[11], 16, 0x6d9d6122); + self::step($H, $B, $C, $D, $A, $words[14], 23, 0xfde5380c); + self::step($H, $A, $B, $C, $D, $words[1], 4, 0xa4beea44); + self::step($H, $D, $A, $B, $C, $words[4], 11, 0x4bdecfa9); + self::step($H, $C, $D, $A, $B, $words[7], 16, 0xf6bb4b60); + self::step($H, $B, $C, $D, $A, $words[10], 23, 0xbebfbc70); + self::step($H, $A, $B, $C, $D, $words[13], 4, 0x289b7ec6); + self::step($H, $D, $A, $B, $C, $words[0], 11, 0xeaa127fa); + self::step($H, $C, $D, $A, $B, $words[3], 16, 0xd4ef3085); + self::step($H, $B, $C, $D, $A, $words[6], 23, 0x04881d05); + self::step($H, $A, $B, $C, $D, $words[9], 4, 0xd9d4d039); + self::step($H, $D, $A, $B, $C, $words[12], 11, 0xe6db99e5); + self::step($H, $C, $D, $A, $B, $words[15], 16, 0x1fa27cf8); + self::step($H, $B, $C, $D, $A, $words[2], 23, 0xc4ac5665); + + // ROUND 4 + self::step($I, $A, $B, $C, $D, $words[0], 6, 0xf4292244); + self::step($I, $D, $A, $B, $C, $words[7], 10, 0x432aff97); + self::step($I, $C, $D, $A, $B, $words[14], 15, 0xab9423a7); + self::step($I, $B, $C, $D, $A, $words[5], 21, 0xfc93a039); + self::step($I, $A, $B, $C, $D, $words[12], 6, 0x655b59c3); + self::step($I, $D, $A, $B, $C, $words[3], 10, 0x8f0ccc92); + self::step($I, $C, $D, $A, $B, $words[10], 15, 0xffeff47d); + self::step($I, $B, $C, $D, $A, $words[1], 21, 0x85845dd1); + self::step($I, $A, $B, $C, $D, $words[8], 6, 0x6fa87e4f); + self::step($I, $D, $A, $B, $C, $words[15], 10, 0xfe2ce6e0); + self::step($I, $C, $D, $A, $B, $words[6], 15, 0xa3014314); + self::step($I, $B, $C, $D, $A, $words[13], 21, 0x4e0811a1); + self::step($I, $A, $B, $C, $D, $words[4], 6, 0xf7537e82); + self::step($I, $D, $A, $B, $C, $words[11], 10, 0xbd3af235); + self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2ad7d2bb); + self::step($I, $B, $C, $D, $A, $words[9], 21, 0xeb86d391); + + $this->a = ($this->a + $A) & 0xffffffff; + $this->b = ($this->b + $B) & 0xffffffff; + $this->c = ($this->c + $C) & 0xffffffff; + $this->d = ($this->d + $D) & 0xffffffff; + } + + private static function f($X, $Y, $Z) + { + return ($X & $Y) | ((~$X) & $Z); // X AND Y OR NOT X AND Z + } + + private static function g($X, $Y, $Z) + { + return ($X & $Z) | ($Y & (~$Z)); // X AND Z OR Y AND NOT Z + } + + private static function h($X, $Y, $Z) + { + return $X ^ $Y ^ $Z; // X XOR Y XOR Z + } + + private static function i($X, $Y, $Z) + { + return $Y ^ ($X | (~$Z)); // Y XOR (X OR NOT Z) + } + + private static function step($func, &$A, $B, $C, $D, $M, $s, $t) + { + $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff; + $A = self::rotate($A, $s); + $A = ($B + $A) & 0xffffffff; + } + + private static function rotate($decimal, $bits) + { + $binary = str_pad(decbin($decimal), 32, '0', STR_PAD_LEFT); + + return bindec(substr($binary, $bits) . substr($binary, 0, $bits)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/RC4.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/RC4.php new file mode 100755 index 0000000..691aca7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/RC4.php @@ -0,0 +1,61 @@ +i = 0; $this->i < 256; ++$this->i) { + $this->s[$this->i] = $this->i; + } + + $this->j = 0; + for ($this->i = 0; $this->i < 256; ++$this->i) { + $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256; + $t = $this->s[$this->i]; + $this->s[$this->i] = $this->s[$this->j]; + $this->s[$this->j] = $t; + } + $this->i = $this->j = 0; + } + + /** + * Symmetric decryption/encryption function. + * + * @param string $data Data to encrypt/decrypt + * + * @return string + */ + public function RC4($data) + { + $len = strlen($data); + for ($c = 0; $c < $len; ++$c) { + $this->i = ($this->i + 1) % 256; + $this->j = ($this->j + $this->s[$this->i]) % 256; + $t = $this->s[$this->i]; + $this->s[$this->i] = $this->s[$this->j]; + $this->s[$this->j] = $t; + + $t = ($this->s[$this->i] + $this->s[$this->j]) % 256; + + $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]); + } + + return $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php new file mode 100755 index 0000000..91cbe36 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/Border.php @@ -0,0 +1,42 @@ + StyleBorder::BORDER_NONE, + 0x01 => StyleBorder::BORDER_THIN, + 0x02 => StyleBorder::BORDER_MEDIUM, + 0x03 => StyleBorder::BORDER_DASHED, + 0x04 => StyleBorder::BORDER_DOTTED, + 0x05 => StyleBorder::BORDER_THICK, + 0x06 => StyleBorder::BORDER_DOUBLE, + 0x07 => StyleBorder::BORDER_HAIR, + 0x08 => StyleBorder::BORDER_MEDIUMDASHED, + 0x09 => StyleBorder::BORDER_DASHDOT, + 0x0A => StyleBorder::BORDER_MEDIUMDASHDOT, + 0x0B => StyleBorder::BORDER_DASHDOTDOT, + 0x0C => StyleBorder::BORDER_MEDIUMDASHDOTDOT, + 0x0D => StyleBorder::BORDER_SLANTDASHDOT, + ]; + + /** + * Map border style + * OpenOffice documentation: 2.5.11. + * + * @param int $index + * + * @return string + */ + public static function lookup($index) + { + if (isset(self::$map[$index])) { + return self::$map[$index]; + } + + return StyleBorder::BORDER_NONE; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php new file mode 100755 index 0000000..7b85c08 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php @@ -0,0 +1,47 @@ + Fill::FILL_NONE, + 0x01 => Fill::FILL_SOLID, + 0x02 => Fill::FILL_PATTERN_MEDIUMGRAY, + 0x03 => Fill::FILL_PATTERN_DARKGRAY, + 0x04 => Fill::FILL_PATTERN_LIGHTGRAY, + 0x05 => Fill::FILL_PATTERN_DARKHORIZONTAL, + 0x06 => Fill::FILL_PATTERN_DARKVERTICAL, + 0x07 => Fill::FILL_PATTERN_DARKDOWN, + 0x08 => Fill::FILL_PATTERN_DARKUP, + 0x09 => Fill::FILL_PATTERN_DARKGRID, + 0x0A => Fill::FILL_PATTERN_DARKTRELLIS, + 0x0B => Fill::FILL_PATTERN_LIGHTHORIZONTAL, + 0x0C => Fill::FILL_PATTERN_LIGHTVERTICAL, + 0x0D => Fill::FILL_PATTERN_LIGHTDOWN, + 0x0E => Fill::FILL_PATTERN_LIGHTUP, + 0x0F => Fill::FILL_PATTERN_LIGHTGRID, + 0x10 => Fill::FILL_PATTERN_LIGHTTRELLIS, + 0x11 => Fill::FILL_PATTERN_GRAY125, + 0x12 => Fill::FILL_PATTERN_GRAY0625, + ]; + + /** + * Get fill pattern from index + * OpenOffice documentation: 2.5.12. + * + * @param int $index + * + * @return string + */ + public static function lookup($index) + { + if (isset(self::$map[$index])) { + return self::$map[$index]; + } + + return Fill::FILL_NONE; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php new file mode 100755 index 0000000..5372fef --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php @@ -0,0 +1,2029 @@ +referenceHelper = ReferenceHelper::getInstance(); + $this->securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @throws Exception + * + * @return bool + */ + public function canRead($pFilename) + { + File::assertFile($pFilename); + + $xl = false; + // Load file + $zip = new ZipArchive(); + if ($zip->open($pFilename) === true) { + // check if it is an OOXML archive + $rels = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, '_rels/.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($rels !== false) { + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + if (basename($rel['Target']) == 'workbook.xml') { + $xl = true; + } + + break; + } + } + } + $zip->close(); + } + + return $xl; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + + $worksheetNames = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + // The files we're looking at here are small enough that simpleXML is more efficient than XMLReader + //~ http://schemas.openxmlformats.org/package/2006/relationships"); + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')) + ); + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")) + ); + + if ($xmlWorkbook->sheets) { + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + // Check if sheet should be skipped + $worksheetNames[] = (string) $eleSheet['name']; + } + } + } + } + + $zip->close(); + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($rels->Relationship as $rel) { + if ($rel['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument') { + $dir = dirname($rel['Target']); + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorkbook = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $relsWorkbook->registerXPathNamespace('rel', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $worksheets = []; + foreach ($relsWorkbook->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet') { + $worksheets[(string) $ele['Id']] = $ele['Target']; + } + } + + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, "{$rel['Target']}") + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if ($xmlWorkbook->sheets) { + $dir = dirname($rel['Target']); + /** @var SimpleXMLElement $eleSheet */ + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + $tmpInfo = [ + 'worksheetName' => (string) $eleSheet['name'], + 'lastColumnLetter' => 'A', + 'lastColumnIndex' => 0, + 'totalRows' => 0, + 'totalColumns' => 0, + ]; + + $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id')]; + + $xml = new XMLReader(); + $xml->xml( + $this->securityScanner->scanFile( + 'zip://' . File::realpath($pFilename) . '#' . "$dir/$fileWorksheet" + ), + null, + Settings::getLibXmlLoaderOptions() + ); + $xml->setParserProperty(2, true); + + $currCells = 0; + while ($xml->read()) { + if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) { + $row = $xml->getAttribute('r'); + $tmpInfo['totalRows'] = $row; + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $currCells = 0; + } elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) { + ++$currCells; + } + } + $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); + $xml->close(); + + $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + + $worksheetInfo[] = $tmpInfo; + } + } + } + } + + $zip->close(); + + return $worksheetInfo; + } + + private static function castToBoolean($c) + { + $value = isset($c->v) ? (string) $c->v : null; + if ($value == '0') { + return false; + } elseif ($value == '1') { + return true; + } + + return (bool) $c->v; + } + + private static function castToError($c) + { + return isset($c->v) ? (string) $c->v : null; + } + + private static function castToString($c) + { + return isset($c->v) ? (string) $c->v : null; + } + + private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType) + { + $cellDataType = 'f'; + $value = "={$c->f}"; + $calculatedValue = self::$castBaseType($c); + + // Shared formula? + if (isset($c->f['t']) && strtolower((string) $c->f['t']) == 'shared') { + $instance = (string) $c->f['si']; + + if (!isset($sharedFormulas[(string) $c->f['si']])) { + $sharedFormulas[$instance] = ['master' => $r, 'formula' => $value]; + } else { + $master = Coordinate::coordinateFromString($sharedFormulas[$instance]['master']); + $current = Coordinate::coordinateFromString($r); + + $difference = [0, 0]; + $difference[0] = Coordinate::columnIndexFromString($current[0]) - Coordinate::columnIndexFromString($master[0]); + $difference[1] = $current[1] - $master[1]; + + $value = $this->referenceHelper->updateFormulaReferences($sharedFormulas[$instance]['formula'], 'A1', $difference[0], $difference[1]); + } + } + } + + /** + * @param ZipArchive $archive + * @param string $fileName + * + * @return string + */ + private function getFromZipArchive(ZipArchive $archive, $fileName = '') + { + // Root-relative paths + if (strpos($fileName, '//') !== false) { + $fileName = substr($fileName, strpos($fileName, '//') + 1); + } + $fileName = File::realpath($fileName); + + // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming + // so we need to load case-insensitively from the zip file + + // Apache POI fixes + $contents = $archive->getFromName($fileName, 0, ZipArchive::FL_NOCASE); + if ($contents === false) { + $contents = $archive->getFromName(substr($fileName, 1), 0, ZipArchive::FL_NOCASE); + } + + return $contents; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + File::assertFile($pFilename); + + // Initialisations + $excel = new Spreadsheet(); + $excel->removeSheetByIndex(0); + if (!$this->readDataOnly) { + $excel->removeCellStyleXfByIndex(0); // remove the default style + $excel->removeCellXfByIndex(0); // remove the default style + } + $unparsedLoadedData = []; + + $zip = new ZipArchive(); + $zip->open($pFilename); + + // Read the theme first, because we need the colour scheme when reading the styles + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $wbRels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, 'xl/_rels/workbook.xml.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($wbRels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme': + $themeOrderArray = ['lt1', 'dk1', 'lt2', 'dk2']; + $themeOrderAdditional = count($themeOrderArray); + + $xmlTheme = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "xl/{$rel['Target']}")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (is_object($xmlTheme)) { + $xmlThemeName = $xmlTheme->attributes(); + $xmlTheme = $xmlTheme->children('http://schemas.openxmlformats.org/drawingml/2006/main'); + $themeName = (string) $xmlThemeName['name']; + + $colourScheme = $xmlTheme->themeElements->clrScheme->attributes(); + $colourSchemeName = (string) $colourScheme['name']; + $colourScheme = $xmlTheme->themeElements->clrScheme->children('http://schemas.openxmlformats.org/drawingml/2006/main'); + + $themeColours = []; + foreach ($colourScheme as $k => $xmlColour) { + $themePos = array_search($k, $themeOrderArray); + if ($themePos === false) { + $themePos = $themeOrderAdditional++; + } + if (isset($xmlColour->sysClr)) { + $xmlColourData = $xmlColour->sysClr->attributes(); + $themeColours[$themePos] = $xmlColourData['lastClr']; + } elseif (isset($xmlColour->srgbClr)) { + $xmlColourData = $xmlColour->srgbClr->attributes(); + $themeColours[$themePos] = $xmlColourData['val']; + } + } + self::$theme = new Xlsx\Theme($themeName, $colourSchemeName, $themeColours); + } + + break; + } + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $rels = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, '_rels/.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $propertyReader = new PropertyReader($this->securityScanner, $excel->getProperties()); + foreach ($rels->Relationship as $rel) { + switch ($rel['Type']) { + case 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties': + $propertyReader->readCoreProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties': + $propertyReader->readExtendedProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties': + $propertyReader->readCustomProperties($this->getFromZipArchive($zip, "{$rel['Target']}")); + + break; + //Ribbon + case 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility': + $customUI = $rel['Target']; + if ($customUI !== null) { + $this->readRibbon($excel, $customUI, $zip); + } + + break; + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument': + $dir = dirname($rel['Target']); + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels')), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $relsWorkbook->registerXPathNamespace('rel', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $sharedStrings = []; + $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings']")); + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlStrings = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (isset($xmlStrings, $xmlStrings->si)) { + foreach ($xmlStrings->si as $val) { + if (isset($val->t)) { + $sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t); + } elseif (isset($val->r)) { + $sharedStrings[] = $this->parseRichText($val); + } + } + } + + $worksheets = []; + $macros = $customUI = null; + foreach ($relsWorkbook->Relationship as $ele) { + switch ($ele['Type']) { + case 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet': + $worksheets[(string) $ele['Id']] = $ele['Target']; + + break; + // a vbaProject ? (: some macros) + case 'http://schemas.microsoft.com/office/2006/relationships/vbaProject': + $macros = $ele['Target']; + + break; + } + } + + if ($macros !== null) { + $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin'); //vbaProject.bin always in 'xl' dir and always named vbaProject.bin + if ($macrosCode !== false) { + $excel->setMacrosCode($macrosCode); + $excel->setHasMacros(true); + //short-circuit : not reading vbaProject.bin.rel to get Signature =>allways vbaProjectSignature.bin in 'xl' dir + $Certificate = $this->getFromZipArchive($zip, 'xl/vbaProjectSignature.bin'); + if ($Certificate !== false) { + $excel->setMacrosCertificate($Certificate); + } + } + } + + $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']")); + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlStyles = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $styles = []; + $cellStyles = []; + $numFmts = null; + if ($xmlStyles && $xmlStyles->numFmts[0]) { + $numFmts = $xmlStyles->numFmts[0]; + } + if (isset($numFmts) && ($numFmts !== null)) { + $numFmts->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + } + if (!$this->readDataOnly && $xmlStyles) { + foreach ($xmlStyles->cellXfs->xf as $xf) { + $numFmt = NumberFormat::FORMAT_GENERAL; + + if ($xf['numFmtId']) { + if (isset($numFmts)) { + $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); + + if (isset($tmpNumFmt['formatCode'])) { + $numFmt = (string) $tmpNumFmt['formatCode']; + } + } + + // We shouldn't override any of the built-in MS Excel values (values below id 164) + // But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used + // So we make allowance for them rather than lose formatting masks + if ((int) $xf['numFmtId'] < 164 && + NumberFormat::builtInFormatCode((int) $xf['numFmtId']) !== '') { + $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']); + } + } + $quotePrefix = false; + if (isset($xf['quotePrefix'])) { + $quotePrefix = (bool) $xf['quotePrefix']; + } + + $style = (object) [ + 'numFmt' => $numFmt, + 'font' => $xmlStyles->fonts->font[(int) ($xf['fontId'])], + 'fill' => $xmlStyles->fills->fill[(int) ($xf['fillId'])], + 'border' => $xmlStyles->borders->border[(int) ($xf['borderId'])], + 'alignment' => $xf->alignment, + 'protection' => $xf->protection, + 'quotePrefix' => $quotePrefix, + ]; + $styles[] = $style; + + // add style to cellXf collection + $objStyle = new Style(); + self::readStyle($objStyle, $style); + $excel->addCellXf($objStyle); + } + + foreach (isset($xmlStyles->cellStyleXfs->xf) ? $xmlStyles->cellStyleXfs->xf : [] as $xf) { + $numFmt = NumberFormat::FORMAT_GENERAL; + if ($numFmts && $xf['numFmtId']) { + $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); + if (isset($tmpNumFmt['formatCode'])) { + $numFmt = (string) $tmpNumFmt['formatCode']; + } elseif ((int) $xf['numFmtId'] < 165) { + $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']); + } + } + + $cellStyle = (object) [ + 'numFmt' => $numFmt, + 'font' => $xmlStyles->fonts->font[(int) ($xf['fontId'])], + 'fill' => $xmlStyles->fills->fill[(int) ($xf['fillId'])], + 'border' => $xmlStyles->borders->border[(int) ($xf['borderId'])], + 'alignment' => $xf->alignment, + 'protection' => $xf->protection, + 'quotePrefix' => $quotePrefix, + ]; + $cellStyles[] = $cellStyle; + + // add style to cellStyleXf collection + $objStyle = new Style(); + self::readStyle($objStyle, $cellStyle); + $excel->addCellStyleXf($objStyle); + } + } + + $styleReader = new Styles($xmlStyles); + $styleReader->setStyleBaseData(self::$theme, $styles, $cellStyles); + $dxfs = $styleReader->dxfs($this->readDataOnly); + $styles = $styleReader->styles(); + + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlWorkbook = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "{$rel['Target']}")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Set base date + if ($xmlWorkbook->workbookPr) { + Date::setExcelCalendar(Date::CALENDAR_WINDOWS_1900); + if (isset($xmlWorkbook->workbookPr['date1904'])) { + if (self::boolean((string) $xmlWorkbook->workbookPr['date1904'])) { + Date::setExcelCalendar(Date::CALENDAR_MAC_1904); + } + } + } + + // Set protection + $this->readProtection($excel, $xmlWorkbook); + + $sheetId = 0; // keep track of new sheet id in final workbook + $oldSheetId = -1; // keep track of old sheet id in final workbook + $countSkippedSheets = 0; // keep track of number of skipped sheets + $mapSheetId = []; // mapping of sheet ids from old to new + + $charts = $chartDetails = []; + + if ($xmlWorkbook->sheets) { + /** @var SimpleXMLElement $eleSheet */ + foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { + ++$oldSheetId; + + // Check if sheet should be skipped + if (isset($this->loadSheetsOnly) && !in_array((string) $eleSheet['name'], $this->loadSheetsOnly)) { + ++$countSkippedSheets; + $mapSheetId[$oldSheetId] = null; + + continue; + } + + // Map old sheet id in original workbook to new sheet id. + // They will differ if loadSheetsOnly() is being used + $mapSheetId[$oldSheetId] = $oldSheetId - $countSkippedSheets; + + // Load sheet + $docSheet = $excel->createSheet(); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet + // references in formula cells... during the load, all formulae should be correct, + // and we're simply bringing the worksheet name in line with the formula, not the + // reverse + $docSheet->setTitle((string) $eleSheet['name'], false, false); + $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id')]; + //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main" + $xmlSheet = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, "$dir/$fileWorksheet")), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + $sharedFormulas = []; + + if (isset($eleSheet['state']) && (string) $eleSheet['state'] != '') { + $docSheet->setSheetState((string) $eleSheet['state']); + } + + if ($xmlSheet) { + if (isset($xmlSheet->sheetViews, $xmlSheet->sheetViews->sheetView)) { + $sheetViews = new SheetViews($xmlSheet->sheetViews->sheetView, $docSheet); + $sheetViews->load(); + } + + $sheetViewOptions = new SheetViewOptions($docSheet, $xmlSheet); + $sheetViewOptions->load($this->getReadDataOnly()); + + (new ColumnAndRowAttributes($docSheet, $xmlSheet)) + ->load($this->getReadFilter(), $this->getReadDataOnly()); + } + + if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) { + $cIndex = 1; // Cell Start from 1 + foreach ($xmlSheet->sheetData->row as $row) { + $rowIndex = 1; + foreach ($row->c as $c) { + $r = (string) $c['r']; + if ($r == '') { + $r = Coordinate::stringFromColumnIndex($rowIndex) . $cIndex; + } + $cellDataType = (string) $c['t']; + $value = null; + $calculatedValue = null; + + // Read cell? + if ($this->getReadFilter() !== null) { + $coordinates = Coordinate::coordinateFromString($r); + + if (!$this->getReadFilter()->readCell($coordinates[0], (int) $coordinates[1], $docSheet->getTitle())) { + $rowIndex += 1; + + continue; + } + } + + // Read cell! + switch ($cellDataType) { + case 's': + if ((string) $c->v != '') { + $value = $sharedStrings[(int) ($c->v)]; + + if ($value instanceof RichText) { + $value = clone $value; + } + } else { + $value = ''; + } + + break; + case 'b': + if (!isset($c->f)) { + $value = self::castToBoolean($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToBoolean'); + if (isset($c->f['t'])) { + $att = $c->f; + $docSheet->getCell($r)->setFormulaAttributes($att); + } + } + + break; + case 'inlineStr': + if (isset($c->f)) { + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + } else { + $value = $this->parseRichText($c->is); + } + + break; + case 'e': + if (!isset($c->f)) { + $value = self::castToError($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + } + + break; + default: + if (!isset($c->f)) { + $value = self::castToString($c); + } else { + // Formula + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToString'); + } + + break; + } + + // read empty cells or the cells are not empty + if ($this->readEmptyCells || ($value !== null && $value !== '')) { + // Check for numeric values + if (is_numeric($value) && $cellDataType != 's') { + if ($value == (int) $value) { + $value = (int) $value; + } elseif ($value == (float) $value) { + $value = (float) $value; + } + } + + // Rich text? + if ($value instanceof RichText && $this->readDataOnly) { + $value = $value->getPlainText(); + } + + $cell = $docSheet->getCell($r); + // Assign value + if ($cellDataType != '') { + $cell->setValueExplicit($value, $cellDataType); + } else { + $cell->setValue($value); + } + if ($calculatedValue !== null) { + $cell->setCalculatedValue($calculatedValue); + } + + // Style information? + if ($c['s'] && !$this->readDataOnly) { + // no style index means 0, it seems + $cell->setXfIndex(isset($styles[(int) ($c['s'])]) ? + (int) ($c['s']) : 0); + } + } + $rowIndex += 1; + } + $cIndex += 1; + } + } + + if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { + (new ConditionalStyles($docSheet, $xmlSheet, $dxfs))->load(); + } + + $aKeys = ['sheet', 'objects', 'scenarios', 'formatCells', 'formatColumns', 'formatRows', 'insertColumns', 'insertRows', 'insertHyperlinks', 'deleteColumns', 'deleteRows', 'selectLockedCells', 'sort', 'autoFilter', 'pivotTables', 'selectUnlockedCells']; + if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) { + foreach ($aKeys as $key) { + $method = 'set' . ucfirst($key); + $docSheet->getProtection()->$method(self::boolean((string) $xmlSheet->sheetProtection[$key])); + } + } + + if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) { + $docSheet->getProtection()->setPassword((string) $xmlSheet->sheetProtection['password'], true); + if ($xmlSheet->protectedRanges->protectedRange) { + foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) { + $docSheet->protectCells((string) $protectedRange['sqref'], (string) $protectedRange['password'], true); + } + } + } + + if ($xmlSheet && $xmlSheet->autoFilter && !$this->readDataOnly) { + (new AutoFilter($docSheet, $xmlSheet))->load(); + } + + if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->readDataOnly) { + foreach ($xmlSheet->mergeCells->mergeCell as $mergeCell) { + $mergeRef = (string) $mergeCell['ref']; + if (strpos($mergeRef, ':') !== false) { + $docSheet->mergeCells((string) $mergeCell['ref']); + } + } + } + + if ($xmlSheet && !$this->readDataOnly) { + $unparsedLoadedData = (new PageSetup($docSheet, $xmlSheet))->load($unparsedLoadedData); + } + + if ($xmlSheet && $xmlSheet->dataValidations && !$this->readDataOnly) { + (new DataValidations($docSheet, $xmlSheet))->load(); + } + + // unparsed sheet AlternateContent + if ($xmlSheet && !$this->readDataOnly) { + $mc = $xmlSheet->children('http://schemas.openxmlformats.org/markup-compatibility/2006'); + if ($mc->AlternateContent) { + foreach ($mc->AlternateContent as $alternateContent) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['AlternateContents'][] = $alternateContent->asXML(); + } + } + } + + // Add hyperlinks + if (!$this->readDataOnly) { + $hyperlinkReader = new Hyperlinks($docSheet); + // Locate hyperlink relations + $relationsFileName = dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels'; + if ($zip->locateName($relationsFileName)) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, $relationsFileName) + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $hyperlinkReader->readHyperlinks($relsWorksheet); + } + + // Loop through hyperlinks + if ($xmlSheet && $xmlSheet->hyperlinks) { + $hyperlinkReader->setHyperlinks($xmlSheet->hyperlinks); + } + } + + // Add comments + $comments = []; + $vmlComments = []; + if (!$this->readDataOnly) { + // Locate comment relations + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments') { + $comments[(string) $ele['Id']] = (string) $ele['Target']; + } + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing') { + $vmlComments[(string) $ele['Id']] = (string) $ele['Target']; + } + } + } + + // Loop through comments + foreach ($comments as $relName => $relPath) { + // Load comments file + $relPath = File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath); + $commentsFile = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Utility variables + $authors = []; + + // Loop through authors + foreach ($commentsFile->authors->author as $author) { + $authors[] = (string) $author; + } + + // Loop through contents + foreach ($commentsFile->commentList->comment as $comment) { + if (!empty($comment['authorId'])) { + $docSheet->getComment((string) $comment['ref'])->setAuthor($authors[(string) $comment['authorId']]); + } + $docSheet->getComment((string) $comment['ref'])->setText($this->parseRichText($comment->text)); + } + } + + // later we will remove from it real vmlComments + $unparsedVmlDrawings = $vmlComments; + + // Loop through VML comments + foreach ($vmlComments as $relName => $relPath) { + // Load VML comments file + $relPath = File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath); + + try { + $vmlCommentsFile = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $relPath)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + } catch (\Throwable $ex) { + //Ignore unparsable vmlDrawings. Later they will be moved from $unparsedVmlDrawings to $unparsedLoadedData + continue; + } + + $shapes = $vmlCommentsFile->xpath('//v:shape'); + foreach ($shapes as $shape) { + $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + + if (isset($shape['style'])) { + $style = (string) $shape['style']; + $fillColor = strtoupper(substr((string) $shape['fillcolor'], 1)); + $column = null; + $row = null; + + $clientData = $shape->xpath('.//x:ClientData'); + if (is_array($clientData) && !empty($clientData)) { + $clientData = $clientData[0]; + + if (isset($clientData['ObjectType']) && (string) $clientData['ObjectType'] == 'Note') { + $temp = $clientData->xpath('.//x:Row'); + if (is_array($temp)) { + $row = $temp[0]; + } + + $temp = $clientData->xpath('.//x:Column'); + if (is_array($temp)) { + $column = $temp[0]; + } + } + } + + if (($column !== null) && ($row !== null)) { + // Set comment properties + $comment = $docSheet->getCommentByColumnAndRow($column + 1, $row + 1); + $comment->getFillColor()->setRGB($fillColor); + + // Parse style + $styleArray = explode(';', str_replace(' ', '', $style)); + foreach ($styleArray as $stylePair) { + $stylePair = explode(':', $stylePair); + + if ($stylePair[0] == 'margin-left') { + $comment->setMarginLeft($stylePair[1]); + } + if ($stylePair[0] == 'margin-top') { + $comment->setMarginTop($stylePair[1]); + } + if ($stylePair[0] == 'width') { + $comment->setWidth($stylePair[1]); + } + if ($stylePair[0] == 'height') { + $comment->setHeight($stylePair[1]); + } + if ($stylePair[0] == 'visibility') { + $comment->setVisible($stylePair[1] == 'visible'); + } + } + + unset($unparsedVmlDrawings[$relName]); + } + } + } + } + + // unparsed vmlDrawing + if ($unparsedVmlDrawings) { + foreach ($unparsedVmlDrawings as $rId => $relPath) { + $rId = substr($rId, 3); // rIdXXX + $unparsedVmlDrawing = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['vmlDrawings']; + $unparsedVmlDrawing[$rId] = []; + $unparsedVmlDrawing[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $relPath); + $unparsedVmlDrawing[$rId]['relFilePath'] = $relPath; + $unparsedVmlDrawing[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedVmlDrawing[$rId]['filePath'])); + unset($unparsedVmlDrawing); + } + } + + // Header/footer images + if ($xmlSheet && $xmlSheet->legacyDrawingHF && !$this->readDataOnly) { + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlRelationship = ''; + + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing') { + $vmlRelationship = self::dirAdd("$dir/$fileWorksheet", $ele['Target']); + } + } + + if ($vmlRelationship != '') { + // Fetch linked images + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsVML = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $drawings = []; + foreach ($relsVML->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + $drawings[(string) $ele['Id']] = self::dirAdd($vmlRelationship, $ele['Target']); + } + } + + // Fetch VML document + $vmlDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $vmlRelationship)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $vmlDrawing->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + + $hfImages = []; + + $shapes = $vmlDrawing->xpath('//v:shape'); + foreach ($shapes as $idx => $shape) { + $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); + $imageData = $shape->xpath('//v:imagedata'); + + if (!$imageData) { + continue; + } + + $imageData = $imageData[$idx]; + + $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); + $style = self::toCSSArray((string) $shape['style']); + + $hfImages[(string) $shape['id']] = new HeaderFooterDrawing(); + if (isset($imageData['title'])) { + $hfImages[(string) $shape['id']]->setName((string) $imageData['title']); + } + + $hfImages[(string) $shape['id']]->setPath('zip://' . File::realpath($pFilename) . '#' . $drawings[(string) $imageData['relid']], false); + $hfImages[(string) $shape['id']]->setResizeProportional(false); + $hfImages[(string) $shape['id']]->setWidth($style['width']); + $hfImages[(string) $shape['id']]->setHeight($style['height']); + if (isset($style['margin-left'])) { + $hfImages[(string) $shape['id']]->setOffsetX($style['margin-left']); + } + $hfImages[(string) $shape['id']]->setOffsetY($style['margin-top']); + $hfImages[(string) $shape['id']]->setResizeProportional(true); + } + + $docSheet->getHeaderFooter()->setImages($hfImages); + } + } + } + } + + // TODO: Autoshapes from twoCellAnchors! + if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $drawings = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing') { + $drawings[(string) $ele['Id']] = self::dirAdd("$dir/$fileWorksheet", $ele['Target']); + } + } + if ($xmlSheet->drawing && !$this->readDataOnly) { + $unparsedDrawings = []; + foreach ($xmlSheet->drawing as $drawing) { + $drawingRelId = (string) self::getArrayItem($drawing->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), 'id'); + $fileDrawing = $drawings[$drawingRelId]; + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsDrawing = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname($fileDrawing) . '/_rels/' . basename($fileDrawing) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $images = []; + $hyperlinks = []; + if ($relsDrawing && $relsDrawing->Relationship) { + foreach ($relsDrawing->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { + $hyperlinks[(string) $ele['Id']] = (string) $ele['Target']; + } + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + $images[(string) $ele['Id']] = self::dirAdd($fileDrawing, $ele['Target']); + } elseif ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart') { + if ($this->includeCharts) { + $charts[self::dirAdd($fileDrawing, $ele['Target'])] = [ + 'id' => (string) $ele['Id'], + 'sheet' => $docSheet->getTitle(), + ]; + } + } + } + } + $xmlDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $fileDrawing)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $xmlDrawingChildren = $xmlDrawing->children('http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + + if ($xmlDrawingChildren->oneCellAnchor) { + foreach ($xmlDrawingChildren->oneCellAnchor as $oneCellAnchor) { + if ($oneCellAnchor->pic->blipFill) { + /** @var SimpleXMLElement $blip */ + $blip = $oneCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; + /** @var SimpleXMLElement $xfrm */ + $xfrm = $oneCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->xfrm; + /** @var SimpleXMLElement $outerShdw */ + $outerShdw = $oneCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->effectLst->outerShdw; + /** @var \SimpleXMLElement $hlinkClick */ + $hlinkClick = $oneCellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + + $objDrawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing(); + $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name')); + $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr')); + $objDrawing->setPath( + 'zip://' . File::realpath($pFilename) . '#' . + $images[(string) self::getArrayItem( + $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), + 'embed' + )], + false + ); + $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((string) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1)); + $objDrawing->setOffsetX(Drawing::EMUToPixels($oneCellAnchor->from->colOff)); + $objDrawing->setOffsetY(Drawing::EMUToPixels($oneCellAnchor->from->rowOff)); + $objDrawing->setResizeProportional(false); + $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cx'))); + $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cy'))); + if ($xfrm) { + $objDrawing->setRotation(Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), 'rot'))); + } + if ($outerShdw) { + $shadow = $objDrawing->getShadow(); + $shadow->setVisible(true); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); + $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); + } + + $this->readHyperLinkDrawing($objDrawing, $oneCellAnchor, $hyperlinks); + + $objDrawing->setWorksheet($docSheet); + } else { + // ? Can charts be positioned with a oneCellAnchor ? + $coordinates = Coordinate::stringFromColumnIndex(((string) $oneCellAnchor->from->col) + 1) . ($oneCellAnchor->from->row + 1); + $offsetX = Drawing::EMUToPixels($oneCellAnchor->from->colOff); + $offsetY = Drawing::EMUToPixels($oneCellAnchor->from->rowOff); + $width = Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cx')); + $height = Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cy')); + } + } + } + if ($xmlDrawingChildren->twoCellAnchor) { + foreach ($xmlDrawingChildren->twoCellAnchor as $twoCellAnchor) { + if ($twoCellAnchor->pic->blipFill) { + $blip = $twoCellAnchor->pic->blipFill->children('http://schemas.openxmlformats.org/drawingml/2006/main')->blip; + $xfrm = $twoCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->xfrm; + $outerShdw = $twoCellAnchor->pic->spPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->effectLst->outerShdw; + $hlinkClick = $twoCellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + $objDrawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing(); + $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name')); + $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr')); + $objDrawing->setPath( + 'zip://' . File::realpath($pFilename) . '#' . + $images[(string) self::getArrayItem( + $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'), + 'embed' + )], + false + ); + $objDrawing->setCoordinates(Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1)); + $objDrawing->setOffsetX(Drawing::EMUToPixels($twoCellAnchor->from->colOff)); + $objDrawing->setOffsetY(Drawing::EMUToPixels($twoCellAnchor->from->rowOff)); + $objDrawing->setResizeProportional(false); + + if ($xfrm) { + $objDrawing->setWidth(Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), 'cx'))); + $objDrawing->setHeight(Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), 'cy'))); + $objDrawing->setRotation(Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), 'rot'))); + } + if ($outerShdw) { + $shadow = $objDrawing->getShadow(); + $shadow->setVisible(true); + $shadow->setBlurRadius(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'blurRad'))); + $shadow->setDistance(Drawing::EMUToPixels(self::getArrayItem($outerShdw->attributes(), 'dist'))); + $shadow->setDirection(Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), 'dir'))); + $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), 'algn')); + $clr = isset($outerShdw->srgbClr) ? $outerShdw->srgbClr : $outerShdw->prstClr; + $shadow->getColor()->setRGB(self::getArrayItem($clr->attributes(), 'val')); + $shadow->setAlpha(self::getArrayItem($clr->alpha->attributes(), 'val') / 1000); + } + + $this->readHyperLinkDrawing($objDrawing, $twoCellAnchor, $hyperlinks); + + $objDrawing->setWorksheet($docSheet); + } elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) { + $fromCoordinate = Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->from->col) + 1) . ($twoCellAnchor->from->row + 1); + $fromOffsetX = Drawing::EMUToPixels($twoCellAnchor->from->colOff); + $fromOffsetY = Drawing::EMUToPixels($twoCellAnchor->from->rowOff); + $toCoordinate = Coordinate::stringFromColumnIndex(((string) $twoCellAnchor->to->col) + 1) . ($twoCellAnchor->to->row + 1); + $toOffsetX = Drawing::EMUToPixels($twoCellAnchor->to->colOff); + $toOffsetY = Drawing::EMUToPixels($twoCellAnchor->to->rowOff); + $graphic = $twoCellAnchor->graphicFrame->children('http://schemas.openxmlformats.org/drawingml/2006/main')->graphic; + /** @var SimpleXMLElement $chartRef */ + $chartRef = $graphic->graphicData->children('http://schemas.openxmlformats.org/drawingml/2006/chart')->chart; + $thisChart = (string) $chartRef->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [ + 'fromCoordinate' => $fromCoordinate, + 'fromOffsetX' => $fromOffsetX, + 'fromOffsetY' => $fromOffsetY, + 'toCoordinate' => $toCoordinate, + 'toOffsetX' => $toOffsetX, + 'toOffsetY' => $toOffsetY, + 'worksheetTitle' => $docSheet->getTitle(), + ]; + } + } + } + if ($relsDrawing === false && $xmlDrawing->count() == 0) { + // Save Drawing without rels and children as unparsed + $unparsedDrawings[$drawingRelId] = $xmlDrawing->asXML(); + } + } + + // store original rId of drawing files + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'] = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing') { + $drawingRelId = (string) $ele['Id']; + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingOriginalIds'][(string) $ele['Target']] = $drawingRelId; + if (isset($unparsedDrawings[$drawingRelId])) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['Drawings'][$drawingRelId] = $unparsedDrawings[$drawingRelId]; + } + } + } + + // unparsed drawing AlternateContent + $xmlAltDrawing = simplexml_load_string( + $this->securityScanner->scan($this->getFromZipArchive($zip, $fileDrawing)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + )->children('http://schemas.openxmlformats.org/markup-compatibility/2006'); + + if ($xmlAltDrawing->AlternateContent) { + foreach ($xmlAltDrawing->AlternateContent as $alternateContent) { + $unparsedLoadedData['sheets'][$docSheet->getCodeName()]['drawingAlternateContents'][] = $alternateContent->asXML(); + } + } + } + } + + $this->readFormControlProperties($excel, $zip, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData); + $this->readPrinterSettings($excel, $zip, $dir, $fileWorksheet, $docSheet, $unparsedLoadedData); + + // Loop through definedNames + if ($xmlWorkbook->definedNames) { + foreach ($xmlWorkbook->definedNames->definedName as $definedName) { + // Extract range + $extractedRange = (string) $definedName; + if (($spos = strpos($extractedRange, '!')) !== false) { + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); + } else { + $extractedRange = str_replace('$', '', $extractedRange); + } + + // Valid range? + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { + continue; + } + + // Some definedNames are only applicable if we are on the same sheet... + if ((string) $definedName['localSheetId'] != '' && (string) $definedName['localSheetId'] == $oldSheetId) { + // Switch on type + switch ((string) $definedName['name']) { + case '_xlnm._FilterDatabase': + if ((string) $definedName['hidden'] !== '1') { + $extractedRange = explode(',', $extractedRange); + foreach ($extractedRange as $range) { + $autoFilterRange = $range; + if (strpos($autoFilterRange, ':') !== false) { + $docSheet->getAutoFilter()->setRange($autoFilterRange); + } + } + } + + break; + case '_xlnm.Print_Titles': + // Split $extractedRange + $extractedRange = explode(',', $extractedRange); + + // Set print titles + foreach ($extractedRange as $range) { + $matches = []; + $range = str_replace('$', '', $range); + + // check for repeating columns, e g. 'A:A' or 'A:D' + if (preg_match('/!?([A-Z]+)\:([A-Z]+)$/', $range, $matches)) { + $docSheet->getPageSetup()->setColumnsToRepeatAtLeft([$matches[1], $matches[2]]); + } elseif (preg_match('/!?(\d+)\:(\d+)$/', $range, $matches)) { + // check for repeating rows, e.g. '1:1' or '1:5' + $docSheet->getPageSetup()->setRowsToRepeatAtTop([$matches[1], $matches[2]]); + } + } + + break; + case '_xlnm.Print_Area': + $rangeSets = preg_split("/('?(?:.*?)'?(?:![A-Z0-9]+:[A-Z0-9]+)),?/", $extractedRange, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $newRangeSets = []; + foreach ($rangeSets as $rangeSet) { + list($sheetName, $rangeSet) = Worksheet::extractSheetTitle($rangeSet, true); + if (strpos($rangeSet, ':') === false) { + $rangeSet = $rangeSet . ':' . $rangeSet; + } + $newRangeSets[] = str_replace('$', '', $rangeSet); + } + $docSheet->getPageSetup()->setPrintArea(implode(',', $newRangeSets)); + + break; + default: + break; + } + } + } + } + + // Next sheet id + ++$sheetId; + } + + // Loop through definedNames + if ($xmlWorkbook->definedNames) { + foreach ($xmlWorkbook->definedNames->definedName as $definedName) { + // Extract range + $extractedRange = (string) $definedName; + if (($spos = strpos($extractedRange, '!')) !== false) { + $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); + } else { + $extractedRange = str_replace('$', '', $extractedRange); + } + + // Valid range? + if (stripos((string) $definedName, '#REF!') !== false || $extractedRange == '') { + continue; + } + + // Some definedNames are only applicable if we are on the same sheet... + if ((string) $definedName['localSheetId'] != '') { + // Local defined name + // Switch on type + switch ((string) $definedName['name']) { + case '_xlnm._FilterDatabase': + case '_xlnm.Print_Titles': + case '_xlnm.Print_Area': + break; + default: + if ($mapSheetId[(int) $definedName['localSheetId']] !== null) { + if (strpos((string) $definedName, '!') !== false) { + $range = Worksheet::extractSheetTitle((string) $definedName, true); + $range[0] = str_replace("''", "'", $range[0]); + $range[0] = str_replace("'", '', $range[0]); + if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) { + $extractedRange = str_replace('$', '', $range[1]); + $scope = $docSheet->getParent()->getSheet($mapSheetId[(int) $definedName['localSheetId']]); + $excel->addNamedRange(new NamedRange((string) $definedName['name'], $worksheet, $extractedRange, true, $scope)); + } + } + } + + break; + } + } elseif (!isset($definedName['localSheetId'])) { + // "Global" definedNames + $locatedSheet = null; + $extractedSheetName = ''; + if (strpos((string) $definedName, '!') !== false) { + // Extract sheet name + $extractedSheetName = Worksheet::extractSheetTitle((string) $definedName, true); + $extractedSheetName = trim($extractedSheetName[0], "'"); + + // Locate sheet + $locatedSheet = $excel->getSheetByName($extractedSheetName); + + // Modify range + list($worksheetName, $extractedRange) = Worksheet::extractSheetTitle($extractedRange, true); + } + + if ($locatedSheet !== null) { + $excel->addNamedRange(new NamedRange((string) $definedName['name'], $locatedSheet, $extractedRange, false)); + } + } + } + } + } + + if ((!$this->readDataOnly) || (!empty($this->loadSheetsOnly))) { + $workbookView = $xmlWorkbook->bookViews->workbookView; + + // active sheet index + $activeTab = (int) ($workbookView['activeTab']); // refers to old sheet index + + // keep active sheet index if sheet is still loaded, else first sheet is set as the active + if (isset($mapSheetId[$activeTab]) && $mapSheetId[$activeTab] !== null) { + $excel->setActiveSheetIndex($mapSheetId[$activeTab]); + } else { + if ($excel->getSheetCount() == 0) { + $excel->createSheet(); + } + $excel->setActiveSheetIndex(0); + } + + if (isset($workbookView['showHorizontalScroll'])) { + $showHorizontalScroll = (string) $workbookView['showHorizontalScroll']; + $excel->setShowHorizontalScroll($this->castXsdBooleanToBool($showHorizontalScroll)); + } + + if (isset($workbookView['showVerticalScroll'])) { + $showVerticalScroll = (string) $workbookView['showVerticalScroll']; + $excel->setShowVerticalScroll($this->castXsdBooleanToBool($showVerticalScroll)); + } + + if (isset($workbookView['showSheetTabs'])) { + $showSheetTabs = (string) $workbookView['showSheetTabs']; + $excel->setShowSheetTabs($this->castXsdBooleanToBool($showSheetTabs)); + } + + if (isset($workbookView['minimized'])) { + $minimized = (string) $workbookView['minimized']; + $excel->setMinimized($this->castXsdBooleanToBool($minimized)); + } + + if (isset($workbookView['autoFilterDateGrouping'])) { + $autoFilterDateGrouping = (string) $workbookView['autoFilterDateGrouping']; + $excel->setAutoFilterDateGrouping($this->castXsdBooleanToBool($autoFilterDateGrouping)); + } + + if (isset($workbookView['firstSheet'])) { + $firstSheet = (string) $workbookView['firstSheet']; + $excel->setFirstSheetIndex((int) $firstSheet); + } + + if (isset($workbookView['visibility'])) { + $visibility = (string) $workbookView['visibility']; + $excel->setVisibility($visibility); + } + + if (isset($workbookView['tabRatio'])) { + $tabRatio = (string) $workbookView['tabRatio']; + $excel->setTabRatio((int) $tabRatio); + } + } + + break; + } + } + + if (!$this->readDataOnly) { + $contentTypes = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, '[Content_Types].xml') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + + // Default content types + foreach ($contentTypes->Default as $contentType) { + switch ($contentType['ContentType']) { + case 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings': + $unparsedLoadedData['default_content_types'][(string) $contentType['Extension']] = (string) $contentType['ContentType']; + + break; + } + } + + // Override content types + foreach ($contentTypes->Override as $contentType) { + switch ($contentType['ContentType']) { + case 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml': + if ($this->includeCharts) { + $chartEntryRef = ltrim($contentType['PartName'], '/'); + $chartElements = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, $chartEntryRef) + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $objChart = Chart::readChart($chartElements, basename($chartEntryRef, '.xml')); + + if (isset($charts[$chartEntryRef])) { + $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id']; + if (isset($chartDetails[$chartPositionRef])) { + $excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart); + $objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet'])); + $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']); + $objChart->setBottomRightPosition($chartDetails[$chartPositionRef]['toCoordinate'], $chartDetails[$chartPositionRef]['toOffsetX'], $chartDetails[$chartPositionRef]['toOffsetY']); + } + } + } + + break; + + // unparsed + case 'application/vnd.ms-excel.controlproperties+xml': + $unparsedLoadedData['override_content_types'][(string) $contentType['PartName']] = (string) $contentType['ContentType']; + + break; + } + } + } + + $excel->setUnparsedLoadedData($unparsedLoadedData); + + $zip->close(); + + return $excel; + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } elseif (isset($color['theme'])) { + if (self::$theme !== null) { + $returnColour = self::$theme->getColourByIndex((int) $color['theme']); + if (isset($color['tint'])) { + $tintAdjust = (float) $color['tint']; + $returnColour = Color::changeBrightness($returnColour, $tintAdjust); + } + + return 'FF' . $returnColour; + } + } + + if ($background) { + return 'FFFFFFFF'; + } + + return 'FF000000'; + } + + /** + * @param Style $docStyle + * @param SimpleXMLElement|\stdClass $style + */ + private static function readStyle(Style $docStyle, $style) + { + $docStyle->getNumberFormat()->setFormatCode($style->numFmt); + + // font + if (isset($style->font)) { + $docStyle->getFont()->setName((string) $style->font->name['val']); + $docStyle->getFont()->setSize((string) $style->font->sz['val']); + if (isset($style->font->b)) { + $docStyle->getFont()->setBold(!isset($style->font->b['val']) || self::boolean((string) $style->font->b['val'])); + } + if (isset($style->font->i)) { + $docStyle->getFont()->setItalic(!isset($style->font->i['val']) || self::boolean((string) $style->font->i['val'])); + } + if (isset($style->font->strike)) { + $docStyle->getFont()->setStrikethrough(!isset($style->font->strike['val']) || self::boolean((string) $style->font->strike['val'])); + } + $docStyle->getFont()->getColor()->setARGB(self::readColor($style->font->color)); + + if (isset($style->font->u) && !isset($style->font->u['val'])) { + $docStyle->getFont()->setUnderline(\PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); + } elseif (isset($style->font->u, $style->font->u['val'])) { + $docStyle->getFont()->setUnderline((string) $style->font->u['val']); + } + + if (isset($style->font->vertAlign, $style->font->vertAlign['val'])) { + $vertAlign = strtolower((string) $style->font->vertAlign['val']); + if ($vertAlign == 'superscript') { + $docStyle->getFont()->setSuperscript(true); + } + if ($vertAlign == 'subscript') { + $docStyle->getFont()->setSubscript(true); + } + } + } + + // fill + if (isset($style->fill)) { + if ($style->fill->gradientFill) { + /** @var SimpleXMLElement $gradientFill */ + $gradientFill = $style->fill->gradientFill[0]; + if (!empty($gradientFill['type'])) { + $docStyle->getFill()->setFillType((string) $gradientFill['type']); + } + $docStyle->getFill()->setRotation((float) ($gradientFill['degree'])); + $gradientFill->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $docStyle->getFill()->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); + $docStyle->getFill()->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); + } elseif ($style->fill->patternFill) { + $patternType = (string) $style->fill->patternFill['patternType'] != '' ? (string) $style->fill->patternFill['patternType'] : 'solid'; + $docStyle->getFill()->setFillType($patternType); + if ($style->fill->patternFill->fgColor) { + $docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true)); + } else { + $docStyle->getFill()->getStartColor()->setARGB('FF000000'); + } + if ($style->fill->patternFill->bgColor) { + $docStyle->getFill()->getEndColor()->setARGB(self::readColor($style->fill->patternFill->bgColor, true)); + } + } + } + + // border + if (isset($style->border)) { + $diagonalUp = self::boolean((string) $style->border['diagonalUp']); + $diagonalDown = self::boolean((string) $style->border['diagonalDown']); + if (!$diagonalUp && !$diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp && !$diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif (!$diagonalUp && $diagonalDown) { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } else { + $docStyle->getBorders()->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + self::readBorder($docStyle->getBorders()->getLeft(), $style->border->left); + self::readBorder($docStyle->getBorders()->getRight(), $style->border->right); + self::readBorder($docStyle->getBorders()->getTop(), $style->border->top); + self::readBorder($docStyle->getBorders()->getBottom(), $style->border->bottom); + self::readBorder($docStyle->getBorders()->getDiagonal(), $style->border->diagonal); + } + + // alignment + if (isset($style->alignment)) { + $docStyle->getAlignment()->setHorizontal((string) $style->alignment['horizontal']); + $docStyle->getAlignment()->setVertical((string) $style->alignment['vertical']); + + $textRotation = 0; + if ((int) $style->alignment['textRotation'] <= 90) { + $textRotation = (int) $style->alignment['textRotation']; + } elseif ((int) $style->alignment['textRotation'] > 90) { + $textRotation = 90 - (int) $style->alignment['textRotation']; + } + + $docStyle->getAlignment()->setTextRotation((int) $textRotation); + $docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment['wrapText'])); + $docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment['shrinkToFit'])); + $docStyle->getAlignment()->setIndent((int) ((string) $style->alignment['indent']) > 0 ? (int) ((string) $style->alignment['indent']) : 0); + $docStyle->getAlignment()->setReadOrder((int) ((string) $style->alignment['readingOrder']) > 0 ? (int) ((string) $style->alignment['readingOrder']) : 0); + } + + // protection + if (isset($style->protection)) { + if (isset($style->protection['locked'])) { + if (self::boolean((string) $style->protection['locked'])) { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED); + } + } + + if (isset($style->protection['hidden'])) { + if (self::boolean((string) $style->protection['hidden'])) { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED); + } + } + } + + // top-level style settings + if (isset($style->quotePrefix)) { + $docStyle->setQuotePrefix($style->quotePrefix); + } + } + + /** + * @param Border $docBorder + * @param SimpleXMLElement $eleBorder + */ + private static function readBorder(Border $docBorder, $eleBorder) + { + if (isset($eleBorder['style'])) { + $docBorder->setBorderStyle((string) $eleBorder['style']); + } + if (isset($eleBorder->color)) { + $docBorder->getColor()->setARGB(self::readColor($eleBorder->color)); + } + } + + /** + * @param SimpleXMLElement | null $is + * + * @return RichText + */ + private function parseRichText($is) + { + $value = new RichText(); + + if (isset($is->t)) { + $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $is->t)); + } else { + if (is_object($is->r)) { + foreach ($is->r as $run) { + if (!isset($run->rPr)) { + $value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t)); + } else { + $objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t)); + + if (isset($run->rPr->rFont['val'])) { + $objText->getFont()->setName((string) $run->rPr->rFont['val']); + } + if (isset($run->rPr->sz['val'])) { + $objText->getFont()->setSize((float) $run->rPr->sz['val']); + } + if (isset($run->rPr->color)) { + $objText->getFont()->setColor(new Color(self::readColor($run->rPr->color))); + } + if ((isset($run->rPr->b['val']) && self::boolean((string) $run->rPr->b['val'])) || + (isset($run->rPr->b) && !isset($run->rPr->b['val']))) { + $objText->getFont()->setBold(true); + } + if ((isset($run->rPr->i['val']) && self::boolean((string) $run->rPr->i['val'])) || + (isset($run->rPr->i) && !isset($run->rPr->i['val']))) { + $objText->getFont()->setItalic(true); + } + if (isset($run->rPr->vertAlign, $run->rPr->vertAlign['val'])) { + $vertAlign = strtolower((string) $run->rPr->vertAlign['val']); + if ($vertAlign == 'superscript') { + $objText->getFont()->setSuperscript(true); + } + if ($vertAlign == 'subscript') { + $objText->getFont()->setSubscript(true); + } + } + if (isset($run->rPr->u) && !isset($run->rPr->u['val'])) { + $objText->getFont()->setUnderline(\PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE); + } elseif (isset($run->rPr->u, $run->rPr->u['val'])) { + $objText->getFont()->setUnderline((string) $run->rPr->u['val']); + } + if ((isset($run->rPr->strike['val']) && self::boolean((string) $run->rPr->strike['val'])) || + (isset($run->rPr->strike) && !isset($run->rPr->strike['val']))) { + $objText->getFont()->setStrikethrough(true); + } + } + } + } + } + + return $value; + } + + /** + * @param Spreadsheet $excel + * @param mixed $customUITarget + * @param mixed $zip + */ + private function readRibbon(Spreadsheet $excel, $customUITarget, $zip) + { + $baseDir = dirname($customUITarget); + $nameCustomUI = basename($customUITarget); + // get the xml file (ribbon) + $localRibbon = $this->getFromZipArchive($zip, $customUITarget); + $customUIImagesNames = []; + $customUIImagesBinaries = []; + // something like customUI/_rels/customUI.xml.rels + $pathRels = $baseDir . '/_rels/' . $nameCustomUI . '.rels'; + $dataRels = $this->getFromZipArchive($zip, $pathRels); + if ($dataRels) { + // exists and not empty if the ribbon have some pictures (other than internal MSO) + $UIRels = simplexml_load_string( + $this->securityScanner->scan($dataRels), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + if (false !== $UIRels) { + // we need to save id and target to avoid parsing customUI.xml and "guess" if it's a pseudo callback who load the image + foreach ($UIRels->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { + // an image ? + $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target']; + $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']); + } + } + } + } + if ($localRibbon) { + $excel->setRibbonXMLData($customUITarget, $localRibbon); + if (count($customUIImagesNames) > 0 && count($customUIImagesBinaries) > 0) { + $excel->setRibbonBinObjects($customUIImagesNames, $customUIImagesBinaries); + } else { + $excel->setRibbonBinObjects(null, null); + } + } else { + $excel->setRibbonXMLData(null, null); + $excel->setRibbonBinObjects(null, null); + } + } + + private static function getArrayItem($array, $key = 0) + { + return isset($array[$key]) ? $array[$key] : null; + } + + private static function dirAdd($base, $add) + { + return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add"); + } + + private static function toCSSArray($style) + { + $style = trim(str_replace(["\r", "\n"], '', $style), ';'); + + $temp = explode(';', $style); + $style = []; + foreach ($temp as $item) { + $item = explode(':', $item); + + if (strpos($item[1], 'px') !== false) { + $item[1] = str_replace('px', '', $item[1]); + } + if (strpos($item[1], 'pt') !== false) { + $item[1] = str_replace('pt', '', $item[1]); + $item[1] = Font::fontSizeToPixels($item[1]); + } + if (strpos($item[1], 'in') !== false) { + $item[1] = str_replace('in', '', $item[1]); + $item[1] = Font::inchSizeToPixels($item[1]); + } + if (strpos($item[1], 'cm') !== false) { + $item[1] = str_replace('cm', '', $item[1]); + $item[1] = Font::centimeterSizeToPixels($item[1]); + } + + $style[$item[0]] = $item[1]; + } + + return $style; + } + + private static function boolean($value) + { + if (is_object($value)) { + $value = (string) $value; + } + if (is_numeric($value)) { + return (bool) $value; + } + + return $value === 'true' || $value === 'TRUE'; + } + + /** + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $objDrawing + * @param \SimpleXMLElement $cellAnchor + * @param array $hyperlinks + */ + private function readHyperLinkDrawing($objDrawing, $cellAnchor, $hyperlinks) + { + $hlinkClick = $cellAnchor->pic->nvPicPr->cNvPr->children('http://schemas.openxmlformats.org/drawingml/2006/main')->hlinkClick; + + if ($hlinkClick->count() === 0) { + return; + } + + $hlinkId = (string) $hlinkClick->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships')['id']; + $hyperlink = new Hyperlink( + $hyperlinks[$hlinkId], + (string) self::getArrayItem($cellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name') + ); + $objDrawing->setHyperlink($hyperlink); + } + + private function readProtection(Spreadsheet $excel, SimpleXMLElement $xmlWorkbook) + { + if (!$xmlWorkbook->workbookProtection) { + return; + } + + if ($xmlWorkbook->workbookProtection['lockRevision']) { + $excel->getSecurity()->setLockRevision((bool) $xmlWorkbook->workbookProtection['lockRevision']); + } + + if ($xmlWorkbook->workbookProtection['lockStructure']) { + $excel->getSecurity()->setLockStructure((bool) $xmlWorkbook->workbookProtection['lockStructure']); + } + + if ($xmlWorkbook->workbookProtection['lockWindows']) { + $excel->getSecurity()->setLockWindows((bool) $xmlWorkbook->workbookProtection['lockWindows']); + } + + if ($xmlWorkbook->workbookProtection['revisionsPassword']) { + $excel->getSecurity()->setRevisionsPassword((string) $xmlWorkbook->workbookProtection['revisionsPassword'], true); + } + + if ($xmlWorkbook->workbookProtection['workbookPassword']) { + $excel->getSecurity()->setWorkbookPassword((string) $xmlWorkbook->workbookProtection['workbookPassword'], true); + } + } + + private function readFormControlProperties(Spreadsheet $excel, ZipArchive $zip, $dir, $fileWorksheet, $docSheet, array &$unparsedLoadedData) + { + if (!$zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + return; + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $ctrlProps = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp') { + $ctrlProps[(string) $ele['Id']] = $ele; + } + } + + $unparsedCtrlProps = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['ctrlProps']; + foreach ($ctrlProps as $rId => $ctrlProp) { + $rId = substr($rId, 3); // rIdXXX + $unparsedCtrlProps[$rId] = []; + $unparsedCtrlProps[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $ctrlProp['Target']); + $unparsedCtrlProps[$rId]['relFilePath'] = (string) $ctrlProp['Target']; + $unparsedCtrlProps[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedCtrlProps[$rId]['filePath'])); + } + unset($unparsedCtrlProps); + } + + private function readPrinterSettings(Spreadsheet $excel, ZipArchive $zip, $dir, $fileWorksheet, $docSheet, array &$unparsedLoadedData) + { + if (!$zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) { + return; + } + + //~ http://schemas.openxmlformats.org/package/2006/relationships" + $relsWorksheet = simplexml_load_string( + $this->securityScanner->scan( + $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels') + ), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + $sheetPrinterSettings = []; + foreach ($relsWorksheet->Relationship as $ele) { + if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings') { + $sheetPrinterSettings[(string) $ele['Id']] = $ele; + } + } + + $unparsedPrinterSettings = &$unparsedLoadedData['sheets'][$docSheet->getCodeName()]['printerSettings']; + foreach ($sheetPrinterSettings as $rId => $printerSettings) { + $rId = substr($rId, 3); // rIdXXX + $unparsedPrinterSettings[$rId] = []; + $unparsedPrinterSettings[$rId]['filePath'] = self::dirAdd("$dir/$fileWorksheet", $printerSettings['Target']); + $unparsedPrinterSettings[$rId]['relFilePath'] = (string) $printerSettings['Target']; + $unparsedPrinterSettings[$rId]['content'] = $this->securityScanner->scan($this->getFromZipArchive($zip, $unparsedPrinterSettings[$rId]['filePath'])); + } + unset($unparsedPrinterSettings); + } + + /** + * Convert an 'xsd:boolean' XML value to a PHP boolean value. + * A valid 'xsd:boolean' XML value can be one of the following + * four values: 'true', 'false', '1', '0'. It is case sensitive. + * + * Note that just doing '(bool) $xsdBoolean' is not safe, + * since '(bool) "false"' returns true. + * + * @see https://www.w3.org/TR/xmlschema11-2/#boolean + * + * @param string $xsdBoolean An XML string value of type 'xsd:boolean' + * + * @return bool Boolean value + */ + private function castXsdBooleanToBool($xsdBoolean) + { + if ($xsdBoolean === 'false') { + return false; + } + + return (bool) $xsdBoolean; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php new file mode 100755 index 0000000..6929758 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php @@ -0,0 +1,144 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load() + { + $autoFilterRange = (string) $this->worksheetXml->autoFilter['ref']; + if (strpos($autoFilterRange, ':') !== false) { + $this->readAutoFilter($autoFilterRange, $this->worksheetXml); + } + } + + private function readAutoFilter($autoFilterRange, $xmlSheet) + { + $autoFilter = $this->worksheet->getAutoFilter(); + $autoFilter->setRange($autoFilterRange); + + foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) { + $column = $autoFilter->getColumnByOffset((int) $filterColumn['colId']); + // Check for standard filters + if ($filterColumn->filters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_FILTER); + $filters = $filterColumn->filters; + if ((isset($filters['blank'])) && ($filters['blank'] == 1)) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, '')->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + // Standard filters are always an OR join, so no join rule needs to be set + // Entries can be either filter elements + foreach ($filters->filter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(Rule::AUTOFILTER_RULETYPE_FILTER); + } + + // Or Date Group elements + $this->readDateRangeAutoFilter($filters, $column); + } + + // Check for custom filters + $this->readCustomAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readDynamicAutoFilter($filterColumn, $column); + // Check for dynamic filters + $this->readTopTenAutoFilter($filterColumn, $column); + } + } + + private function readDateRangeAutoFilter(\SimpleXMLElement $filters, Column $column) + { + foreach ($filters->dateGroupItem as $dateGroupItem) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + [ + 'year' => (string) $dateGroupItem['year'], + 'month' => (string) $dateGroupItem['month'], + 'day' => (string) $dateGroupItem['day'], + 'hour' => (string) $dateGroupItem['hour'], + 'minute' => (string) $dateGroupItem['minute'], + 'second' => (string) $dateGroupItem['second'], + ], + (string) $dateGroupItem['dateTimeGrouping'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DATEGROUP); + } + } + + private function readCustomAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->customFilters) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER); + $customFilters = $filterColumn->customFilters; + // Custom filters can an AND or an OR join; + // and there should only ever be one or two entries + if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) { + $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND); + } + foreach ($customFilters->customFilter as $filterRule) { + $column->createRule()->setRule( + (string) $filterRule['operator'], + (string) $filterRule['val'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); + } + } + } + + private function readDynamicAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->dynamicFilter) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); + // We should only ever have one dynamic filter + foreach ($filterColumn->dynamicFilter as $filterRule) { + // Operator is undefined, but always treated as EQUAL + $column->createRule()->setRule( + null, + (string) $filterRule['val'], + (string) $filterRule['type'] + )->setRuleType(Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); + if (isset($filterRule['val'])) { + $column->setAttribute('val', (string) $filterRule['val']); + } + if (isset($filterRule['maxVal'])) { + $column->setAttribute('maxVal', (string) $filterRule['maxVal']); + } + } + } + } + + private function readTopTenAutoFilter(\SimpleXMLElement $filterColumn, Column $column) + { + if ($filterColumn->top10) { + $column->setFilterType(Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER); + // We should only ever have one top10 filter + foreach ($filterColumn->top10 as $filterRule) { + $column->createRule()->setRule( + (((isset($filterRule['percent'])) && ($filterRule['percent'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE + ), + (string) $filterRule['val'], + (((isset($filterRule['top'])) && ($filterRule['top'] == 1)) + ? Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP + : Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM + ) + )->setRuleType(Rule::AUTOFILTER_RULETYPE_TOPTENFILTER); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php new file mode 100755 index 0000000..1679f01 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php @@ -0,0 +1,19 @@ +attributes(); + if (isset($attributes[$name])) { + if ($format == 'string') { + return (string) $attributes[$name]; + } elseif ($format == 'integer') { + return (int) $attributes[$name]; + } elseif ($format == 'boolean') { + return (bool) ($attributes[$name] === '0' || $attributes[$name] !== 'true') ? false : true; + } + + return (float) $attributes[$name]; + } + + return null; + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } + } + + /** + * @param SimpleXMLElement $chartElements + * @param string $chartName + * + * @return \PhpOffice\PhpSpreadsheet\Chart\Chart + */ + public static function readChart(SimpleXMLElement $chartElements, $chartName) + { + $namespacesChartMeta = $chartElements->getNamespaces(true); + $chartElementsC = $chartElements->children($namespacesChartMeta['c']); + + $XaxisLabel = $YaxisLabel = $legend = $title = null; + $dispBlanksAs = $plotVisOnly = null; + + foreach ($chartElementsC as $chartElementKey => $chartElement) { + switch ($chartElementKey) { + case 'chart': + foreach ($chartElement as $chartDetailsKey => $chartDetails) { + $chartDetailsC = $chartDetails->children($namespacesChartMeta['c']); + switch ($chartDetailsKey) { + case 'plotArea': + $plotAreaLayout = $XaxisLable = $YaxisLable = null; + $plotSeries = $plotAttributes = []; + foreach ($chartDetails as $chartDetailKey => $chartDetail) { + switch ($chartDetailKey) { + case 'layout': + $plotAreaLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + case 'catAx': + if (isset($chartDetail->title)) { + $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'dateAx': + if (isset($chartDetail->title)) { + $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'valAx': + if (isset($chartDetail->title)) { + $YaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta); + } + + break; + case 'barChart': + case 'bar3DChart': + $barDirection = self::getAttribute($chartDetail->barDir, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotDirection($barDirection); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'lineChart': + case 'line3DChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'areaChart': + case 'area3DChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'doughnutChart': + case 'pieChart': + case 'pie3DChart': + $explosion = isset($chartDetail->ser->explosion); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($explosion); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'scatterChart': + $scatterStyle = self::getAttribute($chartDetail->scatterStyle, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($scatterStyle); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'bubbleChart': + $bubbleScale = self::getAttribute($chartDetail->bubbleScale, 'val', 'integer'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($bubbleScale); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'radarChart': + $radarStyle = self::getAttribute($chartDetail->radarStyle, 'val', 'string'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($radarStyle); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'surfaceChart': + case 'surface3DChart': + $wireFrame = self::getAttribute($chartDetail->wireframe, 'val', 'boolean'); + $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotSer->setPlotStyle($wireFrame); + $plotSeries[] = $plotSer; + $plotAttributes = self::readChartAttributes($chartDetail); + + break; + case 'stockChart': + $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); + $plotAttributes = self::readChartAttributes($plotAreaLayout); + + break; + } + } + if ($plotAreaLayout == null) { + $plotAreaLayout = new Layout(); + } + $plotArea = new PlotArea($plotAreaLayout, $plotSeries); + self::setChartAttributes($plotAreaLayout, $plotAttributes); + + break; + case 'plotVisOnly': + $plotVisOnly = self::getAttribute($chartDetails, 'val', 'string'); + + break; + case 'dispBlanksAs': + $dispBlanksAs = self::getAttribute($chartDetails, 'val', 'string'); + + break; + case 'title': + $title = self::chartTitle($chartDetails, $namespacesChartMeta); + + break; + case 'legend': + $legendPos = 'r'; + $legendLayout = null; + $legendOverlay = false; + foreach ($chartDetails as $chartDetailKey => $chartDetail) { + switch ($chartDetailKey) { + case 'legendPos': + $legendPos = self::getAttribute($chartDetail, 'val', 'string'); + + break; + case 'overlay': + $legendOverlay = self::getAttribute($chartDetail, 'val', 'boolean'); + + break; + case 'layout': + $legendLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + } + } + $legend = new Legend($legendPos, $legendLayout, $legendOverlay); + + break; + } + } + } + } + $chart = new \PhpOffice\PhpSpreadsheet\Chart\Chart($chartName, $title, $legend, $plotArea, $plotVisOnly, $dispBlanksAs, $XaxisLabel, $YaxisLabel); + + return $chart; + } + + private static function chartTitle(SimpleXMLElement $titleDetails, array $namespacesChartMeta) + { + $caption = []; + $titleLayout = null; + foreach ($titleDetails as $titleDetailKey => $chartDetail) { + switch ($titleDetailKey) { + case 'tx': + $titleDetails = $chartDetail->rich->children($namespacesChartMeta['a']); + foreach ($titleDetails as $titleKey => $titleDetail) { + switch ($titleKey) { + case 'p': + $titleDetailPart = $titleDetail->children($namespacesChartMeta['a']); + $caption[] = self::parseRichText($titleDetailPart); + } + } + + break; + case 'layout': + $titleLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); + + break; + } + } + + return new Title($caption, $titleLayout); + } + + private static function chartLayoutDetails($chartDetail, $namespacesChartMeta) + { + if (!isset($chartDetail->manualLayout)) { + return null; + } + $details = $chartDetail->manualLayout->children($namespacesChartMeta['c']); + if ($details === null) { + return null; + } + $layout = []; + foreach ($details as $detailKey => $detail) { + $layout[$detailKey] = self::getAttribute($detail, 'val', 'string'); + } + + return new Layout($layout); + } + + private static function chartDataSeries($chartDetail, $namespacesChartMeta, $plotType) + { + $multiSeriesType = null; + $smoothLine = false; + $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = []; + + $seriesDetailSet = $chartDetail->children($namespacesChartMeta['c']); + foreach ($seriesDetailSet as $seriesDetailKey => $seriesDetails) { + switch ($seriesDetailKey) { + case 'grouping': + $multiSeriesType = self::getAttribute($chartDetail->grouping, 'val', 'string'); + + break; + case 'ser': + $marker = null; + $seriesIndex = ''; + foreach ($seriesDetails as $seriesKey => $seriesDetail) { + switch ($seriesKey) { + case 'idx': + $seriesIndex = self::getAttribute($seriesDetail, 'val', 'integer'); + + break; + case 'order': + $seriesOrder = self::getAttribute($seriesDetail, 'val', 'integer'); + $plotOrder[$seriesIndex] = $seriesOrder; + + break; + case 'tx': + $seriesLabel[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); + + break; + case 'marker': + $marker = self::getAttribute($seriesDetail->symbol, 'val', 'string'); + + break; + case 'smooth': + $smoothLine = self::getAttribute($seriesDetail, 'val', 'boolean'); + + break; + case 'cat': + $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); + + break; + case 'val': + $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + case 'xVal': + $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + case 'yVal': + $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); + + break; + } + } + } + } + + return new DataSeries($plotType, $multiSeriesType, $plotOrder, $seriesLabel, $seriesCategory, $seriesValues, $smoothLine); + } + + private static function chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker = null) + { + if (isset($seriesDetail->strRef)) { + $seriesSource = (string) $seriesDetail->strRef->f; + $seriesData = self::chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']), 's'); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->numRef)) { + $seriesSource = (string) $seriesDetail->numRef->f; + $seriesData = self::chartDataSeriesValues($seriesDetail->numRef->numCache->children($namespacesChartMeta['c'])); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->multiLvlStrRef)) { + $seriesSource = (string) $seriesDetail->multiLvlStrRef->f; + $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']), 's'); + $seriesData['pointCount'] = count($seriesData['dataValues']); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } elseif (isset($seriesDetail->multiLvlNumRef)) { + $seriesSource = (string) $seriesDetail->multiLvlNumRef->f; + $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']), 's'); + $seriesData['pointCount'] = count($seriesData['dataValues']); + + return new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker); + } + + return null; + } + + private static function chartDataSeriesValues($seriesValueSet, $dataType = 'n') + { + $seriesVal = []; + $formatCode = ''; + $pointCount = 0; + + foreach ($seriesValueSet as $seriesValueIdx => $seriesValue) { + switch ($seriesValueIdx) { + case 'ptCount': + $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); + + break; + case 'formatCode': + $formatCode = (string) $seriesValue; + + break; + case 'pt': + $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); + if ($dataType == 's') { + $seriesVal[$pointVal] = (string) $seriesValue->v; + } elseif ($seriesValue->v === Functions::NA()) { + $seriesVal[$pointVal] = null; + } else { + $seriesVal[$pointVal] = (float) $seriesValue->v; + } + + break; + } + } + + return [ + 'formatCode' => $formatCode, + 'pointCount' => $pointCount, + 'dataValues' => $seriesVal, + ]; + } + + private static function chartDataSeriesValuesMultiLevel($seriesValueSet, $dataType = 'n') + { + $seriesVal = []; + $formatCode = ''; + $pointCount = 0; + + foreach ($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) { + foreach ($seriesLevel as $seriesValueIdx => $seriesValue) { + switch ($seriesValueIdx) { + case 'ptCount': + $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); + + break; + case 'formatCode': + $formatCode = (string) $seriesValue; + + break; + case 'pt': + $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); + if ($dataType == 's') { + $seriesVal[$pointVal][] = (string) $seriesValue->v; + } elseif ($seriesValue->v === Functions::NA()) { + $seriesVal[$pointVal] = null; + } else { + $seriesVal[$pointVal][] = (float) $seriesValue->v; + } + + break; + } + } + } + + return [ + 'formatCode' => $formatCode, + 'pointCount' => $pointCount, + 'dataValues' => $seriesVal, + ]; + } + + private static function parseRichText(SimpleXMLElement $titleDetailPart) + { + $value = new RichText(); + $objText = null; + foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) { + if (isset($titleDetailElement->t)) { + $objText = $value->createTextRun((string) $titleDetailElement->t); + } + if (isset($titleDetailElement->rPr)) { + if (isset($titleDetailElement->rPr->rFont['val'])) { + $objText->getFont()->setName((string) $titleDetailElement->rPr->rFont['val']); + } + + $fontSize = (self::getAttribute($titleDetailElement->rPr, 'sz', 'integer')); + if ($fontSize !== null) { + $objText->getFont()->setSize(floor($fontSize / 100)); + } + + $fontColor = (self::getAttribute($titleDetailElement->rPr, 'color', 'string')); + if ($fontColor !== null) { + $objText->getFont()->setColor(new Color(self::readColor($fontColor))); + } + + $bold = self::getAttribute($titleDetailElement->rPr, 'b', 'boolean'); + if ($bold !== null) { + $objText->getFont()->setBold($bold); + } + + $italic = self::getAttribute($titleDetailElement->rPr, 'i', 'boolean'); + if ($italic !== null) { + $objText->getFont()->setItalic($italic); + } + + $baseline = self::getAttribute($titleDetailElement->rPr, 'baseline', 'integer'); + if ($baseline !== null) { + if ($baseline > 0) { + $objText->getFont()->setSuperscript(true); + } elseif ($baseline < 0) { + $objText->getFont()->setSubscript(true); + } + } + + $underscore = (self::getAttribute($titleDetailElement->rPr, 'u', 'string')); + if ($underscore !== null) { + if ($underscore == 'sng') { + $objText->getFont()->setUnderline(Font::UNDERLINE_SINGLE); + } elseif ($underscore == 'dbl') { + $objText->getFont()->setUnderline(Font::UNDERLINE_DOUBLE); + } else { + $objText->getFont()->setUnderline(Font::UNDERLINE_NONE); + } + } + + $strikethrough = (self::getAttribute($titleDetailElement->rPr, 's', 'string')); + if ($strikethrough !== null) { + if ($strikethrough == 'noStrike') { + $objText->getFont()->setStrikethrough(false); + } else { + $objText->getFont()->setStrikethrough(true); + } + } + } + } + + return $value; + } + + private static function readChartAttributes($chartDetail) + { + $plotAttributes = []; + if (isset($chartDetail->dLbls)) { + if (isset($chartDetail->dLbls->howLegendKey)) { + $plotAttributes['showLegendKey'] = self::getAttribute($chartDetail->dLbls->showLegendKey, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showVal)) { + $plotAttributes['showVal'] = self::getAttribute($chartDetail->dLbls->showVal, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showCatName)) { + $plotAttributes['showCatName'] = self::getAttribute($chartDetail->dLbls->showCatName, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showSerName)) { + $plotAttributes['showSerName'] = self::getAttribute($chartDetail->dLbls->showSerName, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showPercent)) { + $plotAttributes['showPercent'] = self::getAttribute($chartDetail->dLbls->showPercent, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showBubbleSize)) { + $plotAttributes['showBubbleSize'] = self::getAttribute($chartDetail->dLbls->showBubbleSize, 'val', 'string'); + } + if (isset($chartDetail->dLbls->showLeaderLines)) { + $plotAttributes['showLeaderLines'] = self::getAttribute($chartDetail->dLbls->showLeaderLines, 'val', 'string'); + } + } + + return $plotAttributes; + } + + /** + * @param Layout $plotArea + * @param mixed $plotAttributes + */ + private static function setChartAttributes(Layout $plotArea, $plotAttributes) + { + foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) { + switch ($plotAttributeKey) { + case 'showLegendKey': + $plotArea->setShowLegendKey($plotAttributeValue); + + break; + case 'showVal': + $plotArea->setShowVal($plotAttributeValue); + + break; + case 'showCatName': + $plotArea->setShowCatName($plotAttributeValue); + + break; + case 'showSerName': + $plotArea->setShowSerName($plotAttributeValue); + + break; + case 'showPercent': + $plotArea->setShowPercent($plotAttributeValue); + + break; + case 'showBubbleSize': + $plotArea->setShowBubbleSize($plotAttributeValue); + + break; + case 'showLeaderLines': + $plotArea->setShowLeaderLines($plotAttributeValue); + + break; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php new file mode 100755 index 0000000..e901d99 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php @@ -0,0 +1,204 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * Set Worksheet column attributes by attributes array passed. + * + * @param string $columnAddress A, B, ... DX, ... + * @param array $columnAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'width', ... ? + */ + private function setColumnAttributes($columnAddress, array $columnAttributes) + { + if (isset($columnAttributes['xfIndex'])) { + $this->worksheet->getColumnDimension($columnAddress)->setXfIndex($columnAttributes['xfIndex']); + } + if (isset($columnAttributes['visible'])) { + $this->worksheet->getColumnDimension($columnAddress)->setVisible($columnAttributes['visible']); + } + if (isset($columnAttributes['collapsed'])) { + $this->worksheet->getColumnDimension($columnAddress)->setCollapsed($columnAttributes['collapsed']); + } + if (isset($columnAttributes['outlineLevel'])) { + $this->worksheet->getColumnDimension($columnAddress)->setOutlineLevel($columnAttributes['outlineLevel']); + } + if (isset($columnAttributes['width'])) { + $this->worksheet->getColumnDimension($columnAddress)->setWidth($columnAttributes['width']); + } + } + + /** + * Set Worksheet row attributes by attributes array passed. + * + * @param int $rowNumber 1, 2, 3, ... 99, ... + * @param array $rowAttributes array of attributes (indexes are attribute name, values are value) + * 'xfIndex', 'visible', 'collapsed', 'outlineLevel', 'rowHeight', ... ? + */ + private function setRowAttributes($rowNumber, array $rowAttributes) + { + if (isset($rowAttributes['xfIndex'])) { + $this->worksheet->getRowDimension($rowNumber)->setXfIndex($rowAttributes['xfIndex']); + } + if (isset($rowAttributes['visible'])) { + $this->worksheet->getRowDimension($rowNumber)->setVisible($rowAttributes['visible']); + } + if (isset($rowAttributes['collapsed'])) { + $this->worksheet->getRowDimension($rowNumber)->setCollapsed($rowAttributes['collapsed']); + } + if (isset($rowAttributes['outlineLevel'])) { + $this->worksheet->getRowDimension($rowNumber)->setOutlineLevel($rowAttributes['outlineLevel']); + } + if (isset($rowAttributes['rowHeight'])) { + $this->worksheet->getRowDimension($rowNumber)->setRowHeight($rowAttributes['rowHeight']); + } + } + + /** + * @param IReadFilter $readFilter + * @param bool $readDataOnly + */ + public function load(IReadFilter $readFilter = null, $readDataOnly = false) + { + if ($this->worksheetXml === null) { + return; + } + + $columnsAttributes = []; + $rowsAttributes = []; + if (isset($this->worksheetXml->cols)) { + $columnsAttributes = $this->readColumnAttributes($this->worksheetXml->cols, $readDataOnly); + } + + if ($this->worksheetXml->sheetData && $this->worksheetXml->sheetData->row) { + $rowsAttributes = $this->readRowAttributes($this->worksheetXml->sheetData->row, $readDataOnly); + } + + // set columns/rows attributes + $columnsAttributesAreSet = []; + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if ($readFilter === null || + !$this->isFilteredColumn($readFilter, $columnCoordinate, $rowsAttributes)) { + if (!isset($columnsAttributesAreSet[$columnCoordinate])) { + $this->setColumnAttributes($columnCoordinate, $columnAttributes); + $columnsAttributesAreSet[$columnCoordinate] = true; + } + } + } + + $rowsAttributesAreSet = []; + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if ($readFilter === null || + !$this->isFilteredRow($readFilter, $rowCoordinate, $columnsAttributes)) { + if (!isset($rowsAttributesAreSet[$rowCoordinate])) { + $this->setRowAttributes($rowCoordinate, $rowAttributes); + $rowsAttributesAreSet[$rowCoordinate] = true; + } + } + } + } + + private function isFilteredColumn(IReadFilter $readFilter, $columnCoordinate, array $rowsAttributes) + { + foreach ($rowsAttributes as $rowCoordinate => $rowAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readColumnAttributes(\SimpleXMLElement $worksheetCols, $readDataOnly) + { + $columnAttributes = []; + + foreach ($worksheetCols->col as $column) { + $startColumn = Coordinate::stringFromColumnIndex((int) $column['min']); + $endColumn = Coordinate::stringFromColumnIndex((int) $column['max']); + ++$endColumn; + for ($columnAddress = $startColumn; $columnAddress !== $endColumn; ++$columnAddress) { + $columnAttributes[$columnAddress] = $this->readColumnRangeAttributes($column, $readDataOnly); + + if ((int) ($column['max']) == 16384) { + break; + } + } + } + + return $columnAttributes; + } + + private function readColumnRangeAttributes(\SimpleXMLElement $column, $readDataOnly) + { + $columnAttributes = []; + + if ($column['style'] && !$readDataOnly) { + $columnAttributes['xfIndex'] = (int) $column['style']; + } + if (self::boolean($column['hidden'])) { + $columnAttributes['visible'] = false; + } + if (self::boolean($column['collapsed'])) { + $columnAttributes['collapsed'] = true; + } + if (((int) $column['outlineLevel']) > 0) { + $columnAttributes['outlineLevel'] = (int) $column['outlineLevel']; + } + $columnAttributes['width'] = (float) $column['width']; + + return $columnAttributes; + } + + private function isFilteredRow(IReadFilter $readFilter, $rowCoordinate, array $columnsAttributes) + { + foreach ($columnsAttributes as $columnCoordinate => $columnAttributes) { + if (!$readFilter->readCell($columnCoordinate, $rowCoordinate, $this->worksheet->getTitle())) { + return true; + } + } + + return false; + } + + private function readRowAttributes(\SimpleXMLElement $worksheetRow, $readDataOnly) + { + $rowAttributes = []; + + foreach ($worksheetRow as $row) { + if ($row['ht'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['rowHeight'] = (float) $row['ht']; + } + if (self::boolean($row['hidden'])) { + $rowAttributes[(int) $row['r']]['visible'] = false; + } + if (self::boolean($row['collapsed'])) { + $rowAttributes[(int) $row['r']]['collapsed'] = true; + } + if ((int) $row['outlineLevel'] > 0) { + $rowAttributes[(int) $row['r']]['outlineLevel'] = (int) $row['outlineLevel']; + } + if ($row['s'] && !$readDataOnly) { + $rowAttributes[(int) $row['r']]['xfIndex'] = (int) $row['s']; + } + } + + return $rowAttributes; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php new file mode 100755 index 0000000..b3de5d1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php @@ -0,0 +1,92 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + $this->dxfs = $dxfs; + } + + public function load() + { + $this->setConditionalStyles( + $this->worksheet, + $this->readConditionalStyles($this->worksheetXml) + ); + } + + private function readConditionalStyles($xmlSheet) + { + $conditionals = []; + foreach ($xmlSheet->conditionalFormatting as $conditional) { + foreach ($conditional->cfRule as $cfRule) { + if (((string) $cfRule['type'] == Conditional::CONDITION_NONE + || (string) $cfRule['type'] == Conditional::CONDITION_CELLIS + || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT + || (string) $cfRule['type'] == Conditional::CONDITION_EXPRESSION) + && isset($this->dxfs[(int) ($cfRule['dxfId'])])) { + $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule; + } + } + } + + return $conditionals; + } + + private function setConditionalStyles(Worksheet $worksheet, array $conditionals) + { + foreach ($conditionals as $ref => $cfRules) { + ksort($cfRules); + $conditionalStyles = $this->readStyleRules($cfRules); + + // Extract all cell references in $ref + $cellBlocks = explode(' ', str_replace('$', '', strtoupper($ref))); + foreach ($cellBlocks as $cellBlock) { + $worksheet->getStyle($cellBlock)->setConditionalStyles($conditionalStyles); + } + } + } + + private function readStyleRules($cfRules) + { + $conditionalStyles = []; + foreach ($cfRules as $cfRule) { + $objConditional = new Conditional(); + $objConditional->setConditionType((string) $cfRule['type']); + $objConditional->setOperatorType((string) $cfRule['operator']); + + if ((string) $cfRule['text'] != '') { + $objConditional->setText((string) $cfRule['text']); + } + + if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) { + $objConditional->setStopIfTrue(true); + } + + if (count($cfRule->formula) > 1) { + foreach ($cfRule->formula as $formula) { + $objConditional->addCondition((string) $formula); + } + } else { + $objConditional->addCondition((string) $cfRule->formula); + } + $objConditional->setStyle(clone $this->dxfs[(int) ($cfRule['dxfId'])]); + $conditionalStyles[] = $objConditional; + } + + return $conditionalStyles; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php new file mode 100755 index 0000000..4bb4412 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php @@ -0,0 +1,50 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load() + { + foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) { + // Uppercase coordinate + $range = strtoupper($dataValidation['sqref']); + $rangeSet = explode(' ', $range); + foreach ($rangeSet as $range) { + $stRange = $this->worksheet->shrinkRangeToFit($range); + + // Extract all cell references in $range + foreach (Coordinate::extractAllCellReferencesInRange($stRange) as $reference) { + // Create validation + $docValidation = $this->worksheet->getCell($reference)->getDataValidation(); + $docValidation->setType((string) $dataValidation['type']); + $docValidation->setErrorStyle((string) $dataValidation['errorStyle']); + $docValidation->setOperator((string) $dataValidation['operator']); + $docValidation->setAllowBlank($dataValidation['allowBlank'] != 0); + $docValidation->setShowDropDown($dataValidation['showDropDown'] == 0); + $docValidation->setShowInputMessage($dataValidation['showInputMessage'] != 0); + $docValidation->setShowErrorMessage($dataValidation['showErrorMessage'] != 0); + $docValidation->setErrorTitle((string) $dataValidation['errorTitle']); + $docValidation->setError((string) $dataValidation['error']); + $docValidation->setPromptTitle((string) $dataValidation['promptTitle']); + $docValidation->setPrompt((string) $dataValidation['prompt']); + $docValidation->setFormula1((string) $dataValidation->formula1); + $docValidation->setFormula2((string) $dataValidation->formula2); + } + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php new file mode 100755 index 0000000..400b272 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php @@ -0,0 +1,58 @@ +worksheet = $workSheet; + } + + public function readHyperlinks(\SimpleXMLElement $relsWorksheet) + { + foreach ($relsWorksheet->Relationship as $element) { + if ($element['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink') { + $this->hyperlinks[(string) $element['Id']] = (string) $element['Target']; + } + } + } + + public function setHyperlinks(\SimpleXMLElement $worksheetXml) + { + foreach ($worksheetXml->hyperlink as $hyperlink) { + $this->setHyperlink($hyperlink, $this->worksheet); + } + } + + private function setHyperlink(\SimpleXMLElement $hyperlink, Worksheet $worksheet) + { + // Link url + $linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + foreach (Coordinate::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { + $cell = $worksheet->getCell($cellReference); + if (isset($linkRel['id'])) { + $hyperlinkUrl = $this->hyperlinks[(string) $linkRel['id']]; + if (isset($hyperlink['location'])) { + $hyperlinkUrl .= '#' . (string) $hyperlink['location']; + } + $cell->getHyperlink()->setUrl($hyperlinkUrl); + } elseif (isset($hyperlink['location'])) { + $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']); + } + + // Tooltip + if (isset($hyperlink['tooltip'])) { + $cell->getHyperlink()->setTooltip((string) $hyperlink['tooltip']); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php new file mode 100755 index 0000000..6f28676 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php @@ -0,0 +1,150 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + public function load(array $unparsedLoadedData) + { + if (!$this->worksheetXml) { + return $unparsedLoadedData; + } + + $this->margins($this->worksheetXml, $this->worksheet); + $unparsedLoadedData = $this->pageSetup($this->worksheetXml, $this->worksheet, $unparsedLoadedData); + $this->headerFooter($this->worksheetXml, $this->worksheet); + $this->pageBreaks($this->worksheetXml, $this->worksheet); + + return $unparsedLoadedData; + } + + private function margins(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->pageMargins) { + $docPageMargins = $worksheet->getPageMargins(); + $docPageMargins->setLeft((float) ($xmlSheet->pageMargins['left'])); + $docPageMargins->setRight((float) ($xmlSheet->pageMargins['right'])); + $docPageMargins->setTop((float) ($xmlSheet->pageMargins['top'])); + $docPageMargins->setBottom((float) ($xmlSheet->pageMargins['bottom'])); + $docPageMargins->setHeader((float) ($xmlSheet->pageMargins['header'])); + $docPageMargins->setFooter((float) ($xmlSheet->pageMargins['footer'])); + } + } + + private function pageSetup(\SimpleXMLElement $xmlSheet, Worksheet $worksheet, array $unparsedLoadedData) + { + if ($xmlSheet->pageSetup) { + $docPageSetup = $worksheet->getPageSetup(); + + if (isset($xmlSheet->pageSetup['orientation'])) { + $docPageSetup->setOrientation((string) $xmlSheet->pageSetup['orientation']); + } + if (isset($xmlSheet->pageSetup['paperSize'])) { + $docPageSetup->setPaperSize((int) ($xmlSheet->pageSetup['paperSize'])); + } + if (isset($xmlSheet->pageSetup['scale'])) { + $docPageSetup->setScale((int) ($xmlSheet->pageSetup['scale']), false); + } + if (isset($xmlSheet->pageSetup['fitToHeight']) && (int) ($xmlSheet->pageSetup['fitToHeight']) >= 0) { + $docPageSetup->setFitToHeight((int) ($xmlSheet->pageSetup['fitToHeight']), false); + } + if (isset($xmlSheet->pageSetup['fitToWidth']) && (int) ($xmlSheet->pageSetup['fitToWidth']) >= 0) { + $docPageSetup->setFitToWidth((int) ($xmlSheet->pageSetup['fitToWidth']), false); + } + if (isset($xmlSheet->pageSetup['firstPageNumber'], $xmlSheet->pageSetup['useFirstPageNumber']) && + self::boolean((string) $xmlSheet->pageSetup['useFirstPageNumber'])) { + $docPageSetup->setFirstPageNumber((int) ($xmlSheet->pageSetup['firstPageNumber'])); + } + + $relAttributes = $xmlSheet->pageSetup->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + if (isset($relAttributes['id'])) { + $unparsedLoadedData['sheets'][$worksheet->getCodeName()]['pageSetupRelId'] = (string) $relAttributes['id']; + } + } + + return $unparsedLoadedData; + } + + private function headerFooter(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->headerFooter) { + $docHeaderFooter = $worksheet->getHeaderFooter(); + + if (isset($xmlSheet->headerFooter['differentOddEven']) && + self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])) { + $docHeaderFooter->setDifferentOddEven(true); + } else { + $docHeaderFooter->setDifferentOddEven(false); + } + if (isset($xmlSheet->headerFooter['differentFirst']) && + self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) { + $docHeaderFooter->setDifferentFirst(true); + } else { + $docHeaderFooter->setDifferentFirst(false); + } + if (isset($xmlSheet->headerFooter['scaleWithDoc']) && + !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) { + $docHeaderFooter->setScaleWithDocument(false); + } else { + $docHeaderFooter->setScaleWithDocument(true); + } + if (isset($xmlSheet->headerFooter['alignWithMargins']) && + !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) { + $docHeaderFooter->setAlignWithMargins(false); + } else { + $docHeaderFooter->setAlignWithMargins(true); + } + + $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader); + $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter); + $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader); + $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter); + $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader); + $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter); + } + } + + private function pageBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + if ($xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk) { + $this->rowBreaks($xmlSheet, $worksheet); + } + if ($xmlSheet->colBreaks && $xmlSheet->colBreaks->brk) { + $this->columnBreaks($xmlSheet, $worksheet); + } + } + + private function rowBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + foreach ($xmlSheet->rowBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak("A{$brk['id']}", Worksheet::BREAK_ROW); + } + } + } + + private function columnBreaks(\SimpleXMLElement $xmlSheet, Worksheet $worksheet) + { + foreach ($xmlSheet->colBreaks->brk as $brk) { + if ($brk['man']) { + $worksheet->setBreak( + Coordinate::stringFromColumnIndex(((int) $brk['id']) + 1) . '1', + Worksheet::BREAK_COLUMN + ); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php new file mode 100755 index 0000000..bc6bba2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php @@ -0,0 +1,91 @@ +securityScanner = $securityScanner; + $this->docProps = $docProps; + } + + private function extractPropertyData($propertyData) + { + return simplexml_load_string( + $this->securityScanner->scan($propertyData), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + } + + public function readCoreProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + $xmlCore->registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); + $xmlCore->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/'); + $xmlCore->registerXPathNamespace('cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + + $this->docProps->setCreator((string) self::getArrayItem($xmlCore->xpath('dc:creator'))); + $this->docProps->setLastModifiedBy((string) self::getArrayItem($xmlCore->xpath('cp:lastModifiedBy'))); + $this->docProps->setCreated(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:created')))); //! respect xsi:type + $this->docProps->setModified(strtotime(self::getArrayItem($xmlCore->xpath('dcterms:modified')))); //! respect xsi:type + $this->docProps->setTitle((string) self::getArrayItem($xmlCore->xpath('dc:title'))); + $this->docProps->setDescription((string) self::getArrayItem($xmlCore->xpath('dc:description'))); + $this->docProps->setSubject((string) self::getArrayItem($xmlCore->xpath('dc:subject'))); + $this->docProps->setKeywords((string) self::getArrayItem($xmlCore->xpath('cp:keywords'))); + $this->docProps->setCategory((string) self::getArrayItem($xmlCore->xpath('cp:category'))); + } + } + + public function readExtendedProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + if (isset($xmlCore->Company)) { + $this->docProps->setCompany((string) $xmlCore->Company); + } + if (isset($xmlCore->Manager)) { + $this->docProps->setManager((string) $xmlCore->Manager); + } + } + } + + public function readCustomProperties($propertyData) + { + $xmlCore = $this->extractPropertyData($propertyData); + + if (is_object($xmlCore)) { + foreach ($xmlCore as $xmlProperty) { + /** @var \SimpleXMLElement $xmlProperty */ + $cellDataOfficeAttributes = $xmlProperty->attributes(); + if (isset($cellDataOfficeAttributes['name'])) { + $propertyName = (string) $cellDataOfficeAttributes['name']; + $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + $attributeType = $cellDataOfficeChildren->getName(); + $attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; + $attributeValue = DocumentProperties::convertProperty($attributeValue, $attributeType); + $attributeType = DocumentProperties::convertPropertyType($attributeType); + $this->docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); + } + } + } + } + + private static function getArrayItem(array $array, $key = 0) + { + return isset($array[$key]) ? $array[$key] : null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php new file mode 100755 index 0000000..eb61a5d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php @@ -0,0 +1,124 @@ +worksheet = $workSheet; + $this->worksheetXml = $worksheetXml; + } + + /** + * @param bool $readDataOnly + */ + public function load($readDataOnly = false) + { + if ($this->worksheetXml === null) { + return; + } + + if (isset($this->worksheetXml->sheetPr)) { + $this->tabColor($this->worksheetXml->sheetPr); + $this->codeName($this->worksheetXml->sheetPr); + $this->outlines($this->worksheetXml->sheetPr); + $this->pageSetup($this->worksheetXml->sheetPr); + } + + if (isset($this->worksheetXml->sheetFormatPr)) { + $this->sheetFormat($this->worksheetXml->sheetFormatPr); + } + + if (!$readDataOnly && isset($this->worksheetXml->printOptions)) { + $this->printOptions($this->worksheetXml->printOptions); + } + } + + private function tabColor(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->tabColor, $sheetPr->tabColor['rgb'])) { + $this->worksheet->getTabColor()->setARGB((string) $sheetPr->tabColor['rgb']); + } + } + + private function codeName(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr['codeName'])) { + $this->worksheet->setCodeName((string) $sheetPr['codeName'], false); + } + } + + private function outlines(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->outlinePr)) { + if (isset($sheetPr->outlinePr['summaryRight']) && + !self::boolean((string) $sheetPr->outlinePr['summaryRight'])) { + $this->worksheet->setShowSummaryRight(false); + } else { + $this->worksheet->setShowSummaryRight(true); + } + + if (isset($sheetPr->outlinePr['summaryBelow']) && + !self::boolean((string) $sheetPr->outlinePr['summaryBelow'])) { + $this->worksheet->setShowSummaryBelow(false); + } else { + $this->worksheet->setShowSummaryBelow(true); + } + } + } + + private function pageSetup(\SimpleXMLElement $sheetPr) + { + if (isset($sheetPr->pageSetUpPr)) { + if (isset($sheetPr->pageSetUpPr['fitToPage']) && + !self::boolean((string) $sheetPr->pageSetUpPr['fitToPage'])) { + $this->worksheet->getPageSetup()->setFitToPage(false); + } else { + $this->worksheet->getPageSetup()->setFitToPage(true); + } + } + } + + private function sheetFormat(\SimpleXMLElement $sheetFormatPr) + { + if (isset($sheetFormatPr['customHeight']) && + self::boolean((string) $sheetFormatPr['customHeight']) && + isset($sheetFormatPr['defaultRowHeight'])) { + $this->worksheet->getDefaultRowDimension() + ->setRowHeight((float) $sheetFormatPr['defaultRowHeight']); + } + + if (isset($sheetFormatPr['defaultColWidth'])) { + $this->worksheet->getDefaultColumnDimension() + ->setWidth((float) $sheetFormatPr['defaultColWidth']); + } + + if (isset($sheetFormatPr['zeroHeight']) && + ((string) $sheetFormatPr['zeroHeight'] === '1')) { + $this->worksheet->getDefaultRowDimension()->setZeroHeight(true); + } + } + + private function printOptions(\SimpleXMLElement $printOptions) + { + if (self::boolean((string) $printOptions['gridLinesSet'])) { + $this->worksheet->setShowGridlines(true); + } + if (self::boolean((string) $printOptions['gridLines'])) { + $this->worksheet->setPrintGridlines(true); + } + if (self::boolean((string) $printOptions['horizontalCentered'])) { + $this->worksheet->getPageSetup()->setHorizontalCentered(true); + } + if (self::boolean((string) $printOptions['verticalCentered'])) { + $this->worksheet->getPageSetup()->setVerticalCentered(true); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php new file mode 100755 index 0000000..2caaec3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php @@ -0,0 +1,127 @@ +sheetViewXml = $sheetViewXml; + $this->worksheet = $workSheet; + } + + public function load() + { + $this->zoomScale(); + $this->view(); + $this->gridLines(); + $this->headers(); + $this->direction(); + + if (isset($this->sheetViewXml->pane)) { + $this->pane(); + } + if (isset($this->sheetViewXml->selection, $this->sheetViewXml->selection['sqref'])) { + $this->selection(); + } + } + + private function zoomScale() + { + if (isset($this->sheetViewXml['zoomScale'])) { + $zoomScale = (int) ($this->sheetViewXml['zoomScale']); + if ($zoomScale <= 0) { + // setZoomScale will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScale = 100; + } + + $this->worksheet->getSheetView()->setZoomScale($zoomScale); + } + + if (isset($this->sheetViewXml['zoomScaleNormal'])) { + $zoomScaleNormal = (int) ($this->sheetViewXml['zoomScaleNormal']); + if ($zoomScaleNormal <= 0) { + // setZoomScaleNormal will throw an Exception if the scale is less than or equals 0 + // that is OK when manually creating documents, but we should be able to read all documents + $zoomScaleNormal = 100; + } + + $this->worksheet->getSheetView()->setZoomScaleNormal($zoomScaleNormal); + } + } + + private function view() + { + if (isset($this->sheetViewXml['view'])) { + $this->worksheet->getSheetView()->setView((string) $this->sheetViewXml['view']); + } + } + + private function gridLines() + { + if (isset($this->sheetViewXml['showGridLines'])) { + $this->worksheet->setShowGridLines( + self::boolean((string) $this->sheetViewXml['showGridLines']) + ); + } + } + + private function headers() + { + if (isset($this->sheetViewXml['showRowColHeaders'])) { + $this->worksheet->setShowRowColHeaders( + self::boolean((string) $this->sheetViewXml['showRowColHeaders']) + ); + } + } + + private function direction() + { + if (isset($this->sheetViewXml['rightToLeft'])) { + $this->worksheet->setRightToLeft( + self::boolean((string) $this->sheetViewXml['rightToLeft']) + ); + } + } + + private function pane() + { + $xSplit = 0; + $ySplit = 0; + $topLeftCell = null; + + if (isset($this->sheetViewXml->pane['xSplit'])) { + $xSplit = (int) ($this->sheetViewXml->pane['xSplit']); + } + + if (isset($this->sheetViewXml->pane['ySplit'])) { + $ySplit = (int) ($this->sheetViewXml->pane['ySplit']); + } + + if (isset($this->sheetViewXml->pane['topLeftCell'])) { + $topLeftCell = (string) $this->sheetViewXml->pane['topLeftCell']; + } + + $this->worksheet->freezePane( + Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1), + $topLeftCell + ); + } + + private function selection() + { + $sqref = (string) $this->sheetViewXml->selection['sqref']; + $sqref = explode(' ', $sqref); + $sqref = $sqref[0]; + + $this->worksheet->setSelectedCells($sqref); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php new file mode 100755 index 0000000..c06564a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -0,0 +1,265 @@ +styleXml = $styleXml; + } + + public function setStyleBaseData(Theme $theme = null, $styles = [], $cellStyles = []) + { + self::$theme = $theme; + $this->styles = $styles; + $this->cellStyles = $cellStyles; + } + + private static function readFontStyle(Font $fontStyle, \SimpleXMLElement $fontStyleXml) + { + $fontStyle->setName((string) $fontStyleXml->name['val']); + $fontStyle->setSize((float) $fontStyleXml->sz['val']); + + if (isset($fontStyleXml->b)) { + $fontStyle->setBold(!isset($fontStyleXml->b['val']) || self::boolean((string) $fontStyleXml->b['val'])); + } + if (isset($fontStyleXml->i)) { + $fontStyle->setItalic(!isset($fontStyleXml->i['val']) || self::boolean((string) $fontStyleXml->i['val'])); + } + if (isset($fontStyleXml->strike)) { + $fontStyle->setStrikethrough(!isset($fontStyleXml->strike['val']) || self::boolean((string) $fontStyleXml->strike['val'])); + } + $fontStyle->getColor()->setARGB(self::readColor($fontStyleXml->color)); + + if (isset($fontStyleXml->u) && !isset($fontStyleXml->u['val'])) { + $fontStyle->setUnderline(Font::UNDERLINE_SINGLE); + } elseif (isset($fontStyleXml->u, $fontStyleXml->u['val'])) { + $fontStyle->setUnderline((string) $fontStyleXml->u['val']); + } + + if (isset($fontStyleXml->vertAlign, $fontStyleXml->vertAlign['val'])) { + $verticalAlign = strtolower((string) $fontStyleXml->vertAlign['val']); + if ($verticalAlign === 'superscript') { + $fontStyle->setSuperscript(true); + } + if ($verticalAlign === 'subscript') { + $fontStyle->setSubscript(true); + } + } + } + + private static function readFillStyle(Fill $fillStyle, \SimpleXMLElement $fillStyleXml) + { + if ($fillStyleXml->gradientFill) { + /** @var \SimpleXMLElement $gradientFill */ + $gradientFill = $fillStyleXml->gradientFill[0]; + if (!empty($gradientFill['type'])) { + $fillStyle->setFillType((string) $gradientFill['type']); + } + $fillStyle->setRotation((float) ($gradientFill['degree'])); + $gradientFill->registerXPathNamespace('sml', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $fillStyle->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=0]'))->color)); + $fillStyle->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath('sml:stop[@position=1]'))->color)); + } elseif ($fillStyleXml->patternFill) { + $patternType = (string) $fillStyleXml->patternFill['patternType'] != '' ? (string) $fillStyleXml->patternFill['patternType'] : 'solid'; + $fillStyle->setFillType($patternType); + if ($fillStyleXml->patternFill->fgColor) { + $fillStyle->getStartColor()->setARGB(self::readColor($fillStyleXml->patternFill->fgColor, true)); + } else { + $fillStyle->getStartColor()->setARGB('FF000000'); + } + if ($fillStyleXml->patternFill->bgColor) { + $fillStyle->getEndColor()->setARGB(self::readColor($fillStyleXml->patternFill->bgColor, true)); + } + } + } + + private static function readBorderStyle(Borders $borderStyle, \SimpleXMLElement $borderStyleXml) + { + $diagonalUp = self::boolean((string) $borderStyleXml['diagonalUp']); + $diagonalDown = self::boolean((string) $borderStyleXml['diagonalDown']); + if (!$diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_NONE); + } elseif ($diagonalUp && !$diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_UP); + } elseif (!$diagonalUp && $diagonalDown) { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_DOWN); + } else { + $borderStyle->setDiagonalDirection(Borders::DIAGONAL_BOTH); + } + + self::readBorder($borderStyle->getLeft(), $borderStyleXml->left); + self::readBorder($borderStyle->getRight(), $borderStyleXml->right); + self::readBorder($borderStyle->getTop(), $borderStyleXml->top); + self::readBorder($borderStyle->getBottom(), $borderStyleXml->bottom); + self::readBorder($borderStyle->getDiagonal(), $borderStyleXml->diagonal); + } + + private static function readBorder(Border $border, \SimpleXMLElement $borderXml) + { + if (isset($borderXml['style'])) { + $border->setBorderStyle((string) $borderXml['style']); + } + if (isset($borderXml->color)) { + $border->getColor()->setARGB(self::readColor($borderXml->color)); + } + } + + private static function readAlignmentStyle(Alignment $alignment, \SimpleXMLElement $alignmentXml) + { + $alignment->setHorizontal((string) $alignmentXml->alignment['horizontal']); + $alignment->setVertical((string) $alignmentXml->alignment['vertical']); + + $textRotation = 0; + if ((int) $alignmentXml->alignment['textRotation'] <= 90) { + $textRotation = (int) $alignmentXml->alignment['textRotation']; + } elseif ((int) $alignmentXml->alignment['textRotation'] > 90) { + $textRotation = 90 - (int) $alignmentXml->alignment['textRotation']; + } + + $alignment->setTextRotation((int) $textRotation); + $alignment->setWrapText(self::boolean((string) $alignmentXml->alignment['wrapText'])); + $alignment->setShrinkToFit(self::boolean((string) $alignmentXml->alignment['shrinkToFit'])); + $alignment->setIndent((int) ((string) $alignmentXml->alignment['indent']) > 0 ? (int) ((string) $alignmentXml->alignment['indent']) : 0); + $alignment->setReadOrder((int) ((string) $alignmentXml->alignment['readingOrder']) > 0 ? (int) ((string) $alignmentXml->alignment['readingOrder']) : 0); + } + + private function readStyle(Style $docStyle, $style) + { + $docStyle->getNumberFormat()->setFormatCode($style->numFmt); + + if (isset($style->font)) { + self::readFontStyle($docStyle->getFont(), $style->font); + } + + if (isset($style->fill)) { + self::readFillStyle($docStyle->getFill(), $style->fill); + } + + if (isset($style->border)) { + self::readBorderStyle($docStyle->getBorders(), $style->border); + } + + if (isset($style->alignment)) { + self::readAlignmentStyle($docStyle->getAlignment(), $style->alignment); + } + + // protection + if (isset($style->protection)) { + $this->readProtectionLocked($docStyle, $style); + $this->readProtectionHidden($docStyle, $style); + } + + // top-level style settings + if (isset($style->quotePrefix)) { + $docStyle->setQuotePrefix(true); + } + } + + private function readProtectionLocked(Style $docStyle, $style) + { + if (isset($style->protection['locked'])) { + if (self::boolean((string) $style->protection['locked'])) { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private function readProtectionHidden(Style $docStyle, $style) + { + if (isset($style->protection['hidden'])) { + if (self::boolean((string) $style->protection['hidden'])) { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_PROTECTED); + } else { + $docStyle->getProtection()->setHidden(Protection::PROTECTION_UNPROTECTED); + } + } + } + + private static function readColor($color, $background = false) + { + if (isset($color['rgb'])) { + return (string) $color['rgb']; + } elseif (isset($color['indexed'])) { + return Color::indexedColor($color['indexed'] - 7, $background)->getARGB(); + } elseif (isset($color['theme'])) { + if (self::$theme !== null) { + $returnColour = self::$theme->getColourByIndex((int) $color['theme']); + if (isset($color['tint'])) { + $tintAdjust = (float) $color['tint']; + $returnColour = Color::changeBrightness($returnColour, $tintAdjust); + } + + return 'FF' . $returnColour; + } + } + + return ($background) ? 'FFFFFFFF' : 'FF000000'; + } + + public function dxfs($readDataOnly = false) + { + $dxfs = []; + if (!$readDataOnly && $this->styleXml) { + // Conditional Styles + if ($this->styleXml->dxfs) { + foreach ($this->styleXml->dxfs->dxf as $dxf) { + $style = new Style(false, true); + $this->readStyle($style, $dxf); + $dxfs[] = $style; + } + } + // Cell Styles + if ($this->styleXml->cellStyles) { + foreach ($this->styleXml->cellStyles->cellStyle as $cellStyle) { + if ((int) ($cellStyle['builtinId']) == 0) { + if (isset($this->cellStyles[(int) ($cellStyle['xfId'])])) { + // Set default style + $style = new Style(); + $this->readStyle($style, $this->cellStyles[(int) ($cellStyle['xfId'])]); + + // normal style, currently not using it for anything + } + } + } + } + } + + return $dxfs; + } + + public function styles() + { + return $this->styles; + } + + private static function getArrayItem($array, $key = 0) + { + return isset($array[$key]) ? $array[$key] : null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php new file mode 100755 index 0000000..c105f3c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Theme.php @@ -0,0 +1,93 @@ +themeName = $themeName; + $this->colourSchemeName = $colourSchemeName; + $this->colourMap = $colourMap; + } + + /** + * Get Theme Name. + * + * @return string + */ + public function getThemeName() + { + return $this->themeName; + } + + /** + * Get colour Scheme Name. + * + * @return string + */ + public function getColourSchemeName() + { + return $this->colourSchemeName; + } + + /** + * Get colour Map Value by Position. + * + * @param mixed $index + * + * @return string + */ + public function getColourByIndex($index) + { + if (isset($this->colourMap[$index])) { + return $this->colourMap[$index]; + } + + return null; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != '_parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php new file mode 100755 index 0000000..8ab7a9c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php @@ -0,0 +1,882 @@ +securityScanner = XmlScanner::getInstance($this); + } + + /** + * Can the current IReader read the file? + * + * @param string $pFilename + * + * @throws Exception + * + * @return bool + */ + public function canRead($pFilename) + { + // Office xmlns:o="urn:schemas-microsoft-com:office:office" + // Excel xmlns:x="urn:schemas-microsoft-com:office:excel" + // XML Spreadsheet xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" + // Spreadsheet component xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" + // XML schema xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" + // XML data type xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" + // MS-persist recordset xmlns:rs="urn:schemas-microsoft-com:rowset" + // Rowset xmlns:z="#RowsetSchema" + // + + $signature = [ + '', + ]; + + // Open file + $this->openFile($pFilename); + $fileHandle = $this->fileHandle; + + // Read sample data (first 2 KB will do) + $data = fread($fileHandle, 2048); + fclose($fileHandle); + $data = str_replace("'", '"', $data); // fix headers with single quote + + $valid = true; + foreach ($signature as $match) { + // every part of the signature must be present + if (strpos($data, $match) === false) { + $valid = false; + + break; + } + } + + // Retrieve charset encoding + if (preg_match('//um', $data, $matches)) { + $this->charSet = strtoupper($matches[1]); + } + + return $valid; + } + + /** + * Check if the file is a valid SimpleXML. + * + * @param string $pFilename + * + * @throws Exception + * + * @return false|\SimpleXMLElement + */ + public function trySimpleXMLLoadString($pFilename) + { + try { + $xml = simplexml_load_string( + $this->securityScanner->scan(file_get_contents($pFilename)), + 'SimpleXMLElement', + Settings::getLibXmlLoaderOptions() + ); + } catch (\Exception $e) { + throw new Exception('Cannot load invalid XML file: ' . $pFilename, 0, $e); + } + + return $xml; + } + + /** + * Reads names of the worksheets from a file, without parsing the whole file to a Spreadsheet object. + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetNames($pFilename) + { + File::assertFile($pFilename); + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + + $worksheetNames = []; + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $xml_ss = $xml->children($namespaces['ss']); + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + $worksheetNames[] = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); + } + + return $worksheetNames; + } + + /** + * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns). + * + * @param string $pFilename + * + * @throws Exception + * + * @return array + */ + public function listWorksheetInfo($pFilename) + { + File::assertFile($pFilename); + + $worksheetInfo = []; + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $worksheetID = 1; + $xml_ss = $xml->children($namespaces['ss']); + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + + $tmpInfo = []; + $tmpInfo['worksheetName'] = ''; + $tmpInfo['lastColumnLetter'] = 'A'; + $tmpInfo['lastColumnIndex'] = 0; + $tmpInfo['totalRows'] = 0; + $tmpInfo['totalColumns'] = 0; + + if (isset($worksheet_ss['Name'])) { + $tmpInfo['worksheetName'] = (string) $worksheet_ss['Name']; + } else { + $tmpInfo['worksheetName'] = "Worksheet_{$worksheetID}"; + } + + if (isset($worksheet->Table->Row)) { + $rowIndex = 0; + + foreach ($worksheet->Table->Row as $rowData) { + $columnIndex = 0; + $rowHasData = false; + + foreach ($rowData->Cell as $cell) { + if (isset($cell->Data)) { + $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); + $rowHasData = true; + } + + ++$columnIndex; + } + + ++$rowIndex; + + if ($rowHasData) { + $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); + } + } + } + + $tmpInfo['lastColumnLetter'] = Coordinate::stringFromColumnIndex($tmpInfo['lastColumnIndex'] + 1); + $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; + + $worksheetInfo[] = $tmpInfo; + ++$worksheetID; + } + + return $worksheetInfo; + } + + /** + * Loads Spreadsheet from file. + * + * @param string $pFilename + * + * @throws Exception + * + * @return Spreadsheet + */ + public function load($pFilename) + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + $spreadsheet->removeSheetByIndex(0); + + // Load into this instance + return $this->loadIntoExisting($pFilename, $spreadsheet); + } + + private static function identifyFixedStyleValue($styleList, &$styleAttributeValue) + { + $styleAttributeValue = strtolower($styleAttributeValue); + foreach ($styleList as $style) { + if ($styleAttributeValue == strtolower($style)) { + $styleAttributeValue = $style; + + return true; + } + } + + return false; + } + + /** + * pixel units to excel width units(units of 1/256th of a character width). + * + * @param float $pxs + * + * @return float + */ + protected static function pixel2WidthUnits($pxs) + { + $UNIT_OFFSET_MAP = [0, 36, 73, 109, 146, 182, 219]; + + $widthUnits = 256 * ($pxs / 7); + $widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)]; + + return $widthUnits; + } + + /** + * excel width units(units of 1/256th of a character width) to pixel units. + * + * @param float $widthUnits + * + * @return float + */ + protected static function widthUnits2Pixel($widthUnits) + { + $pixels = ($widthUnits / 256) * 7; + $offsetWidthUnits = $widthUnits % 256; + $pixels += round($offsetWidthUnits / (256 / 7)); + + return $pixels; + } + + protected static function hex2str($hex) + { + return chr(hexdec($hex[1])); + } + + /** + * Loads from file into Spreadsheet instance. + * + * @param string $pFilename + * @param Spreadsheet $spreadsheet + * + * @throws Exception + * + * @return Spreadsheet + */ + public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) + { + File::assertFile($pFilename); + if (!$this->canRead($pFilename)) { + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); + } + + $xml = $this->trySimpleXMLLoadString($pFilename); + + $namespaces = $xml->getNamespaces(true); + + $docProps = $spreadsheet->getProperties(); + if (isset($xml->DocumentProperties[0])) { + foreach ($xml->DocumentProperties[0] as $propertyName => $propertyValue) { + switch ($propertyName) { + case 'Title': + $docProps->setTitle(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Subject': + $docProps->setSubject(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Author': + $docProps->setCreator(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Created': + $creationDate = strtotime($propertyValue); + $docProps->setCreated($creationDate); + + break; + case 'LastAuthor': + $docProps->setLastModifiedBy(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'LastSaved': + $lastSaveDate = strtotime($propertyValue); + $docProps->setModified($lastSaveDate); + + break; + case 'Company': + $docProps->setCompany(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Category': + $docProps->setCategory(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Manager': + $docProps->setManager(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Keywords': + $docProps->setKeywords(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + case 'Description': + $docProps->setDescription(self::convertStringEncoding($propertyValue, $this->charSet)); + + break; + } + } + } + if (isset($xml->CustomDocumentProperties)) { + foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) { + $propertyAttributes = $propertyValue->attributes($namespaces['dt']); + $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', ['self', 'hex2str'], $propertyName); + $propertyType = Properties::PROPERTY_TYPE_UNKNOWN; + switch ((string) $propertyAttributes) { + case 'string': + $propertyType = Properties::PROPERTY_TYPE_STRING; + $propertyValue = trim($propertyValue); + + break; + case 'boolean': + $propertyType = Properties::PROPERTY_TYPE_BOOLEAN; + $propertyValue = (bool) $propertyValue; + + break; + case 'integer': + $propertyType = Properties::PROPERTY_TYPE_INTEGER; + $propertyValue = (int) $propertyValue; + + break; + case 'float': + $propertyType = Properties::PROPERTY_TYPE_FLOAT; + $propertyValue = (float) $propertyValue; + + break; + case 'dateTime.tz': + $propertyType = Properties::PROPERTY_TYPE_DATE; + $propertyValue = strtotime(trim($propertyValue)); + + break; + } + $docProps->setCustomProperty($propertyName, $propertyValue, $propertyType); + } + } + + $this->parseStyles($xml, $namespaces); + + $worksheetID = 0; + $xml_ss = $xml->children($namespaces['ss']); + + foreach ($xml_ss->Worksheet as $worksheet) { + $worksheet_ss = $worksheet->attributes($namespaces['ss']); + + if ((isset($this->loadSheetsOnly)) && (isset($worksheet_ss['Name'])) && + (!in_array($worksheet_ss['Name'], $this->loadSheetsOnly))) { + continue; + } + + // Create new Worksheet + $spreadsheet->createSheet(); + $spreadsheet->setActiveSheetIndex($worksheetID); + if (isset($worksheet_ss['Name'])) { + $worksheetName = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); + // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in + // formula cells... during the load, all formulae should be correct, and we're simply bringing + // the worksheet name in line with the formula, not the reverse + $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); + } + + $columnID = 'A'; + if (isset($worksheet->Table->Column)) { + foreach ($worksheet->Table->Column as $columnData) { + $columnData_ss = $columnData->attributes($namespaces['ss']); + if (isset($columnData_ss['Index'])) { + $columnID = Coordinate::stringFromColumnIndex((int) $columnData_ss['Index']); + } + if (isset($columnData_ss['Width'])) { + $columnWidth = $columnData_ss['Width']; + $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4); + } + ++$columnID; + } + } + + $rowID = 1; + if (isset($worksheet->Table->Row)) { + $additionalMergedCells = 0; + foreach ($worksheet->Table->Row as $rowData) { + $rowHasData = false; + $row_ss = $rowData->attributes($namespaces['ss']); + if (isset($row_ss['Index'])) { + $rowID = (int) $row_ss['Index']; + } + + $columnID = 'A'; + foreach ($rowData->Cell as $cell) { + $cell_ss = $cell->attributes($namespaces['ss']); + if (isset($cell_ss['Index'])) { + $columnID = Coordinate::stringFromColumnIndex((int) $cell_ss['Index']); + } + $cellRange = $columnID . $rowID; + + if ($this->getReadFilter() !== null) { + if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { + ++$columnID; + + continue; + } + } + + if (isset($cell_ss['HRef'])) { + $spreadsheet->getActiveSheet()->getCell($cellRange)->getHyperlink()->setUrl($cell_ss['HRef']); + } + + if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) { + $columnTo = $columnID; + if (isset($cell_ss['MergeAcross'])) { + $additionalMergedCells += (int) $cell_ss['MergeAcross']; + $columnTo = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($columnID) + $cell_ss['MergeAcross']); + } + $rowTo = $rowID; + if (isset($cell_ss['MergeDown'])) { + $rowTo = $rowTo + $cell_ss['MergeDown']; + } + $cellRange .= ':' . $columnTo . $rowTo; + $spreadsheet->getActiveSheet()->mergeCells($cellRange); + } + + $cellIsSet = $hasCalculatedValue = false; + $cellDataFormula = ''; + if (isset($cell_ss['Formula'])) { + $cellDataFormula = $cell_ss['Formula']; + $hasCalculatedValue = true; + } + if (isset($cell->Data)) { + $cellValue = $cellData = $cell->Data; + $type = DataType::TYPE_NULL; + $cellData_ss = $cellData->attributes($namespaces['ss']); + if (isset($cellData_ss['Type'])) { + $cellDataType = $cellData_ss['Type']; + switch ($cellDataType) { + /* + const TYPE_STRING = 's'; + const TYPE_FORMULA = 'f'; + const TYPE_NUMERIC = 'n'; + const TYPE_BOOL = 'b'; + const TYPE_NULL = 'null'; + const TYPE_INLINE = 'inlineStr'; + const TYPE_ERROR = 'e'; + */ + case 'String': + $cellValue = self::convertStringEncoding($cellValue, $this->charSet); + $type = DataType::TYPE_STRING; + + break; + case 'Number': + $type = DataType::TYPE_NUMERIC; + $cellValue = (float) $cellValue; + if (floor($cellValue) == $cellValue) { + $cellValue = (int) $cellValue; + } + + break; + case 'Boolean': + $type = DataType::TYPE_BOOL; + $cellValue = ($cellValue != 0); + + break; + case 'DateTime': + $type = DataType::TYPE_NUMERIC; + $cellValue = Date::PHPToExcel(strtotime($cellValue)); + + break; + case 'Error': + $type = DataType::TYPE_ERROR; + + break; + } + } + + if ($hasCalculatedValue) { + $type = DataType::TYPE_FORMULA; + $columnNumber = Coordinate::columnIndexFromString($columnID); + if (substr($cellDataFormula, 0, 3) == 'of:') { + $cellDataFormula = substr($cellDataFormula, 3); + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($key = !$key) { + $value = str_replace(['[.', '.', ']'], '', $value); + } + } + } else { + // Convert R1C1 style references to A1 style references (but only when not quoted) + $temp = explode('"', $cellDataFormula); + $key = false; + foreach ($temp as &$value) { + // Only replace in alternate array entries (i.e. non-quoted blocks) + if ($key = !$key) { + preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); + // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way + // through the formula from left to right. Reversing means that we work right to left.through + // the formula + $cellReferences = array_reverse($cellReferences); + // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, + // then modify the formula to use that new reference + foreach ($cellReferences as $cellReference) { + $rowReference = $cellReference[2][0]; + // Empty R reference is the current row + if ($rowReference == '') { + $rowReference = $rowID; + } + // Bracketed R references are relative to the current row + if ($rowReference[0] == '[') { + $rowReference = $rowID + trim($rowReference, '[]'); + } + $columnReference = $cellReference[4][0]; + // Empty C reference is the current column + if ($columnReference == '') { + $columnReference = $columnNumber; + } + // Bracketed C references are relative to the current column + if ($columnReference[0] == '[') { + $columnReference = $columnNumber + trim($columnReference, '[]'); + } + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; + $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); + } + } + } + } + unset($value); + // Then rebuild the formula string + $cellDataFormula = implode('"', $temp); + } + + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type); + if ($hasCalculatedValue) { + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue); + } + $cellIsSet = $rowHasData = true; + } + + if (isset($cell->Comment)) { + $commentAttributes = $cell->Comment->attributes($namespaces['ss']); + $author = 'unknown'; + if (isset($commentAttributes->Author)) { + $author = (string) $commentAttributes->Author; + } + $node = $cell->Comment->Data->asXML(); + $annotation = strip_tags($node); + $spreadsheet->getActiveSheet()->getComment($columnID . $rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation)); + } + + if (($cellIsSet) && (isset($cell_ss['StyleID']))) { + $style = (string) $cell_ss['StyleID']; + if ((isset($this->styles[$style])) && (!empty($this->styles[$style]))) { + if (!$spreadsheet->getActiveSheet()->cellExists($columnID . $rowID)) { + $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValue(null); + } + $spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]); + } + } + ++$columnID; + while ($additionalMergedCells > 0) { + ++$columnID; + --$additionalMergedCells; + } + } + + if ($rowHasData) { + if (isset($row_ss['Height'])) { + $rowHeight = $row_ss['Height']; + $spreadsheet->getActiveSheet()->getRowDimension($rowID)->setRowHeight($rowHeight); + } + } + + ++$rowID; + } + } + ++$worksheetID; + } + + // Return + return $spreadsheet; + } + + protected static function convertStringEncoding($string, $charset) + { + if ($charset != 'UTF-8') { + return StringHelper::convertEncoding($string, 'UTF-8', $charset); + } + + return $string; + } + + protected function parseRichText($is) + { + $value = new RichText(); + + $value->createText(self::convertStringEncoding($is, $this->charSet)); + + return $value; + } + + /** + * @param SimpleXMLElement $xml + * @param array $namespaces + */ + private function parseStyles(SimpleXMLElement $xml, array $namespaces) + { + if (!isset($xml->Styles)) { + return; + } + + foreach ($xml->Styles[0] as $style) { + $style_ss = $style->attributes($namespaces['ss']); + $styleID = (string) $style_ss['ID']; + $this->styles[$styleID] = (isset($this->styles['Default'])) ? $this->styles['Default'] : []; + foreach ($style as $styleType => $styleData) { + $styleAttributes = $styleData->attributes($namespaces['ss']); + switch ($styleType) { + case 'Alignment': + $this->parseStyleAlignment($styleID, $styleAttributes); + + break; + case 'Borders': + $this->parseStyleBorders($styleID, $styleData, $namespaces); + + break; + case 'Font': + $this->parseStyleFont($styleID, $styleAttributes); + + break; + case 'Interior': + $this->parseStyleInterior($styleID, $styleAttributes); + + break; + case 'NumberFormat': + $this->parseStyleNumberFormat($styleID, $styleAttributes); + + break; + } + } + } + } + + /** + * @param string $styleID + * @param SimpleXMLElement $styleAttributes + */ + private function parseStyleAlignment($styleID, SimpleXMLElement $styleAttributes) + { + $verticalAlignmentStyles = [ + Alignment::VERTICAL_BOTTOM, + Alignment::VERTICAL_TOP, + Alignment::VERTICAL_CENTER, + Alignment::VERTICAL_JUSTIFY, + ]; + $horizontalAlignmentStyles = [ + Alignment::HORIZONTAL_GENERAL, + Alignment::HORIZONTAL_LEFT, + Alignment::HORIZONTAL_RIGHT, + Alignment::HORIZONTAL_CENTER, + Alignment::HORIZONTAL_CENTER_CONTINUOUS, + Alignment::HORIZONTAL_JUSTIFY, + ]; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = (string) $styleAttributeValue; + switch ($styleAttributeKey) { + case 'Vertical': + if (self::identifyFixedStyleValue($verticalAlignmentStyles, $styleAttributeValue)) { + $this->styles[$styleID]['alignment']['vertical'] = $styleAttributeValue; + } + + break; + case 'Horizontal': + if (self::identifyFixedStyleValue($horizontalAlignmentStyles, $styleAttributeValue)) { + $this->styles[$styleID]['alignment']['horizontal'] = $styleAttributeValue; + } + + break; + case 'WrapText': + $this->styles[$styleID]['alignment']['wrapText'] = true; + + break; + } + } + } + + /** + * @param $styleID + * @param SimpleXMLElement $styleData + * @param array $namespaces + */ + private function parseStyleBorders($styleID, SimpleXMLElement $styleData, array $namespaces) + { + foreach ($styleData->Border as $borderStyle) { + $borderAttributes = $borderStyle->attributes($namespaces['ss']); + $thisBorder = []; + foreach ($borderAttributes as $borderStyleKey => $borderStyleValue) { + switch ($borderStyleKey) { + case 'LineStyle': + $thisBorder['borderStyle'] = Border::BORDER_MEDIUM; + + break; + case 'Weight': + break; + case 'Position': + $borderPosition = strtolower($borderStyleValue); + + break; + case 'Color': + $borderColour = substr($borderStyleValue, 1); + $thisBorder['color']['rgb'] = $borderColour; + + break; + } + } + if (!empty($thisBorder)) { + if (($borderPosition == 'left') || ($borderPosition == 'right') || ($borderPosition == 'top') || ($borderPosition == 'bottom')) { + $this->styles[$styleID]['borders'][$borderPosition] = $thisBorder; + } + } + } + } + + /** + * @param $styleID + * @param SimpleXMLElement $styleAttributes + */ + private function parseStyleFont($styleID, SimpleXMLElement $styleAttributes) + { + $underlineStyles = [ + Font::UNDERLINE_NONE, + Font::UNDERLINE_DOUBLE, + Font::UNDERLINE_DOUBLEACCOUNTING, + Font::UNDERLINE_SINGLE, + Font::UNDERLINE_SINGLEACCOUNTING, + ]; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = (string) $styleAttributeValue; + switch ($styleAttributeKey) { + case 'FontName': + $this->styles[$styleID]['font']['name'] = $styleAttributeValue; + + break; + case 'Size': + $this->styles[$styleID]['font']['size'] = $styleAttributeValue; + + break; + case 'Color': + $this->styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue, 1); + + break; + case 'Bold': + $this->styles[$styleID]['font']['bold'] = true; + + break; + case 'Italic': + $this->styles[$styleID]['font']['italic'] = true; + + break; + case 'Underline': + if (self::identifyFixedStyleValue($underlineStyles, $styleAttributeValue)) { + $this->styles[$styleID]['font']['underline'] = $styleAttributeValue; + } + + break; + } + } + } + + /** + * @param $styleID + * @param SimpleXMLElement $styleAttributes + */ + private function parseStyleInterior($styleID, SimpleXMLElement $styleAttributes) + { + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + switch ($styleAttributeKey) { + case 'Color': + $this->styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue, 1); + + break; + case 'Pattern': + $this->styles[$styleID]['fill']['fillType'] = strtolower($styleAttributeValue); + + break; + } + } + } + + /** + * @param $styleID + * @param SimpleXMLElement $styleAttributes + */ + private function parseStyleNumberFormat($styleID, SimpleXMLElement $styleAttributes) + { + $fromFormats = ['\-', '\ ']; + $toFormats = ['-', ' ']; + + foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { + $styleAttributeValue = str_replace($fromFormats, $toFormats, $styleAttributeValue); + switch ($styleAttributeValue) { + case 'Short Date': + $styleAttributeValue = 'dd/mm/yyyy'; + + break; + } + + if ($styleAttributeValue > '') { + $this->styles[$styleID]['numberFormat']['formatCode'] = $styleAttributeValue; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php new file mode 100755 index 0000000..13dbe04 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php @@ -0,0 +1,916 @@ += ($beforeRow + $pNumRows)) && + ($cellRow < $beforeRow)) { + return true; + } elseif ($pNumCols < 0 && + ($cellColumnIndex >= ($beforeColumnIndex + $pNumCols)) && + ($cellColumnIndex < $beforeColumnIndex)) { + return true; + } + + return false; + } + + /** + * Update page breaks when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustPageBreaks(Worksheet $pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aBreaks = $pSheet->getBreaks(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellSort']); + + foreach ($aBreaks as $key => $value) { + if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { + // If we're deleting, then clear any defined breaks that are within the range + // of rows/columns that we're deleting + $pSheet->setBreak($key, Worksheet::BREAK_NONE); + } else { + // Otherwise update any affected breaks by inserting a new break at the appropriate point + // and removing the old affected break + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setBreak($newReference, $value) + ->setBreak($key, Worksheet::BREAK_NONE); + } + } + } + } + + /** + * Update cell comments when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aComments = $pSheet->getComments(); + $aNewComments = []; // the new array of all comments + + foreach ($aComments as $key => &$value) { + // Any comments inside a deleted range will be ignored + if (!self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { + // Otherwise build a new array of comments indexed by the adjusted cell reference + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + $aNewComments[$newReference] = $value; + } + } + // Replace the comments array with the new set of comments + $pSheet->setComments($aNewComments); + } + + /** + * Update hyperlinks when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aHyperlinkCollection = $pSheet->getHyperlinkCollection(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']); + + foreach ($aHyperlinkCollection as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setHyperlink($newReference, $value); + $pSheet->setHyperlink($key, null); + } + } + } + + /** + * Update data validations when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aDataValidationCollection = $pSheet->getDataValidationCollection(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellSort']); + + foreach ($aDataValidationCollection as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->setDataValidation($newReference, $value); + $pSheet->setDataValidation($key, null); + } + } + } + + /** + * Update merged cells when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aMergeCells = $pSheet->getMergeCells(); + $aNewMergeCells = []; // the new array of all merge cells + foreach ($aMergeCells as $key => &$value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + $aNewMergeCells[$newReference] = $newReference; + } + $pSheet->setMergeCells($aNewMergeCells); // replace the merge cells array + } + + /** + * Update protected cells when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aProtectedCells = $pSheet->getProtectedCells(); + ($pNumCols > 0 || $pNumRows > 0) ? + uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellSort']); + foreach ($aProtectedCells as $key => $value) { + $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); + if ($key != $newReference) { + $pSheet->protectCells($newReference, $value, true); + $pSheet->unprotectCells($key); + } + } + } + + /** + * Update column dimensions when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aColumnDimensions = array_reverse($pSheet->getColumnDimensions(), true); + if (!empty($aColumnDimensions)) { + foreach ($aColumnDimensions as $objColumnDimension) { + $newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows); + list($newReference) = Coordinate::coordinateFromString($newReference); + if ($objColumnDimension->getColumnIndex() != $newReference) { + $objColumnDimension->setColumnIndex($newReference); + } + } + $pSheet->refreshColumnDimensions(); + } + } + + /** + * Update row dimensions when inserting/deleting rows/columns. + * + * @param Worksheet $pSheet The worksheet that we're editing + * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') + * @param int $beforeColumnIndex Index number of the column we're inserting/deleting before + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $beforeRow Number of the row we're inserting/deleting before + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + */ + protected function adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) + { + $aRowDimensions = array_reverse($pSheet->getRowDimensions(), true); + if (!empty($aRowDimensions)) { + foreach ($aRowDimensions as $objRowDimension) { + $newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows); + list(, $newReference) = Coordinate::coordinateFromString($newReference); + if ($objRowDimension->getRowIndex() != $newReference) { + $objRowDimension->setRowIndex($newReference); + } + } + $pSheet->refreshRowDimensions(); + + $copyDimension = $pSheet->getRowDimension($beforeRow - 1); + for ($i = $beforeRow; $i <= $beforeRow - 1 + $pNumRows; ++$i) { + $newDimension = $pSheet->getRowDimension($i); + $newDimension->setRowHeight($copyDimension->getRowHeight()); + $newDimension->setVisible($copyDimension->getVisible()); + $newDimension->setOutlineLevel($copyDimension->getOutlineLevel()); + $newDimension->setCollapsed($copyDimension->getCollapsed()); + } + } + } + + /** + * Insert a new column or row, updating all possible related data. + * + * @param string $pBefore Insert before this cell address (e.g. 'A1') + * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) + * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) + * @param Worksheet $pSheet The worksheet that we're editing + * + * @throws Exception + */ + public function insertNewBefore($pBefore, $pNumCols, $pNumRows, Worksheet $pSheet) + { + $remove = ($pNumCols < 0 || $pNumRows < 0); + $allCoordinates = $pSheet->getCoordinates(); + + // Get coordinate of $pBefore + list($beforeColumn, $beforeRow) = Coordinate::coordinateFromString($pBefore); + $beforeColumnIndex = Coordinate::columnIndexFromString($beforeColumn); + + // Clear cells if we are removing columns or rows + $highestColumn = $pSheet->getHighestColumn(); + $highestRow = $pSheet->getHighestRow(); + + // 1. Clear column strips if we are removing columns + if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) { + for ($i = 1; $i <= $highestRow - 1; ++$i) { + for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) { + $coordinate = Coordinate::stringFromColumnIndex($j + 1) . $i; + $pSheet->removeConditionalStyles($coordinate); + if ($pSheet->cellExists($coordinate)) { + $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); + $pSheet->getCell($coordinate)->setXfIndex(0); + } + } + } + } + + // 2. Clear row strips if we are removing rows + if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) { + for ($i = $beforeColumnIndex - 1; $i <= Coordinate::columnIndexFromString($highestColumn) - 1; ++$i) { + for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) { + $coordinate = Coordinate::stringFromColumnIndex($i + 1) . $j; + $pSheet->removeConditionalStyles($coordinate); + if ($pSheet->cellExists($coordinate)) { + $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); + $pSheet->getCell($coordinate)->setXfIndex(0); + } + } + } + } + + // Loop through cells, bottom-up, and change cell coordinate + if ($remove) { + // It's faster to reverse and pop than to use unshift, especially with large cell collections + $allCoordinates = array_reverse($allCoordinates); + } + while ($coordinate = array_pop($allCoordinates)) { + $cell = $pSheet->getCell($coordinate); + $cellIndex = Coordinate::columnIndexFromString($cell->getColumn()); + + if ($cellIndex - 1 + $pNumCols < 0) { + continue; + } + + // New coordinate + $newCoordinate = Coordinate::stringFromColumnIndex($cellIndex + $pNumCols) . ($cell->getRow() + $pNumRows); + + // Should the cell be updated? Move value and cellXf index from one cell to another. + if (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) { + // Update cell styles + $pSheet->getCell($newCoordinate)->setXfIndex($cell->getXfIndex()); + + // Insert this cell at its new location + if ($cell->getDataType() == DataType::TYPE_FORMULA) { + // Formula should be adjusted + $pSheet->getCell($newCoordinate) + ->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); + } else { + // Formula should not be adjusted + $pSheet->getCell($newCoordinate)->setValue($cell->getValue()); + } + + // Clear the original cell + $pSheet->getCellCollection()->delete($coordinate); + } else { + /* We don't need to update styles for rows/columns before our insertion position, + but we do still need to adjust any formulae in those cells */ + if ($cell->getDataType() == DataType::TYPE_FORMULA) { + // Formula should be adjusted + $cell->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); + } + } + } + + // Duplicate styles for the newly inserted cells + $highestColumn = $pSheet->getHighestColumn(); + $highestRow = $pSheet->getHighestRow(); + + if ($pNumCols > 0 && $beforeColumnIndex - 2 > 0) { + for ($i = $beforeRow; $i <= $highestRow - 1; ++$i) { + // Style + $coordinate = Coordinate::stringFromColumnIndex($beforeColumnIndex - 1) . $i; + if ($pSheet->cellExists($coordinate)) { + $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); + $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? + $pSheet->getConditionalStyles($coordinate) : false; + for ($j = $beforeColumnIndex; $j <= $beforeColumnIndex - 1 + $pNumCols; ++$j) { + $pSheet->getCellByColumnAndRow($j, $i)->setXfIndex($xfIndex); + if ($conditionalStyles) { + $cloned = []; + foreach ($conditionalStyles as $conditionalStyle) { + $cloned[] = clone $conditionalStyle; + } + $pSheet->setConditionalStyles(Coordinate::stringFromColumnIndex($j) . $i, $cloned); + } + } + } + } + } + + if ($pNumRows > 0 && $beforeRow - 1 > 0) { + for ($i = $beforeColumnIndex; $i <= Coordinate::columnIndexFromString($highestColumn); ++$i) { + // Style + $coordinate = Coordinate::stringFromColumnIndex($i) . ($beforeRow - 1); + if ($pSheet->cellExists($coordinate)) { + $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); + $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? + $pSheet->getConditionalStyles($coordinate) : false; + for ($j = $beforeRow; $j <= $beforeRow - 1 + $pNumRows; ++$j) { + $pSheet->getCell(Coordinate::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex); + if ($conditionalStyles) { + $cloned = []; + foreach ($conditionalStyles as $conditionalStyle) { + $cloned[] = clone $conditionalStyle; + } + $pSheet->setConditionalStyles(Coordinate::stringFromColumnIndex($i) . $j, $cloned); + } + } + } + } + } + + // Update worksheet: column dimensions + $this->adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: row dimensions + $this->adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: page breaks + $this->adjustPageBreaks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: comments + $this->adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: hyperlinks + $this->adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: data validations + $this->adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: merge cells + $this->adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: protected cells + $this->adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); + + // Update worksheet: autofilter + $autoFilter = $pSheet->getAutoFilter(); + $autoFilterRange = $autoFilter->getRange(); + if (!empty($autoFilterRange)) { + if ($pNumCols != 0) { + $autoFilterColumns = $autoFilter->getColumns(); + if (count($autoFilterColumns) > 0) { + $column = ''; + $row = 0; + sscanf($pBefore, '%[A-Z]%d', $column, $row); + $columnIndex = Coordinate::columnIndexFromString($column); + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($autoFilterRange); + if ($columnIndex <= $rangeEnd[0]) { + if ($pNumCols < 0) { + // If we're actually deleting any columns that fall within the autofilter range, + // then we delete any rules for those columns + $deleteColumn = $columnIndex + $pNumCols - 1; + $deleteCount = abs($pNumCols); + for ($i = 1; $i <= $deleteCount; ++$i) { + if (isset($autoFilterColumns[Coordinate::stringFromColumnIndex($deleteColumn + 1)])) { + $autoFilter->clearColumn(Coordinate::stringFromColumnIndex($deleteColumn + 1)); + } + ++$deleteColumn; + } + } + $startCol = ($columnIndex > $rangeStart[0]) ? $columnIndex : $rangeStart[0]; + + // Shuffle columns in autofilter range + if ($pNumCols > 0) { + $startColRef = $startCol; + $endColRef = $rangeEnd[0]; + $toColRef = $rangeEnd[0] + $pNumCols; + + do { + $autoFilter->shiftColumn(Coordinate::stringFromColumnIndex($endColRef), Coordinate::stringFromColumnIndex($toColRef)); + --$endColRef; + --$toColRef; + } while ($startColRef <= $endColRef); + } else { + // For delete, we shuffle from beginning to end to avoid overwriting + $startColID = Coordinate::stringFromColumnIndex($startCol); + $toColID = Coordinate::stringFromColumnIndex($startCol + $pNumCols); + $endColID = Coordinate::stringFromColumnIndex($rangeEnd[0] + 1); + do { + $autoFilter->shiftColumn($startColID, $toColID); + ++$startColID; + ++$toColID; + } while ($startColID != $endColID); + } + } + } + } + $pSheet->setAutoFilter($this->updateCellReference($autoFilterRange, $pBefore, $pNumCols, $pNumRows)); + } + + // Update worksheet: freeze pane + if ($pSheet->getFreezePane()) { + $splitCell = $pSheet->getFreezePane(); + $topLeftCell = $pSheet->getTopLeftCell(); + + $splitCell = $this->updateCellReference($splitCell, $pBefore, $pNumCols, $pNumRows); + $topLeftCell = $this->updateCellReference($topLeftCell, $pBefore, $pNumCols, $pNumRows); + + $pSheet->freezePane($splitCell, $topLeftCell); + } + + // Page setup + if ($pSheet->getPageSetup()->isPrintAreaSet()) { + $pSheet->getPageSetup()->setPrintArea($this->updateCellReference($pSheet->getPageSetup()->getPrintArea(), $pBefore, $pNumCols, $pNumRows)); + } + + // Update worksheet: drawings + $aDrawings = $pSheet->getDrawingCollection(); + foreach ($aDrawings as $objDrawing) { + $newReference = $this->updateCellReference($objDrawing->getCoordinates(), $pBefore, $pNumCols, $pNumRows); + if ($objDrawing->getCoordinates() != $newReference) { + $objDrawing->setCoordinates($newReference); + } + } + + // Update workbook: named ranges + if (count($pSheet->getParent()->getNamedRanges()) > 0) { + foreach ($pSheet->getParent()->getNamedRanges() as $namedRange) { + if ($namedRange->getWorksheet()->getHashCode() == $pSheet->getHashCode()) { + $namedRange->setRange($this->updateCellReference($namedRange->getRange(), $pBefore, $pNumCols, $pNumRows)); + } + } + } + + // Garbage collect + $pSheet->garbageCollect(); + } + + /** + * Update references within formulas. + * + * @param string $pFormula Formula to update + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to insert + * @param int $pNumRows Number of rows to insert + * @param string $sheetName Worksheet name/title + * + * @throws Exception + * + * @return string Updated formula + */ + public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') + { + // Update cell references in the formula + $formulaBlocks = explode('"', $pFormula); + $i = false; + foreach ($formulaBlocks as &$formulaBlock) { + // Ignore blocks that were enclosed in quotes (alternating entries in the $formulaBlocks array after the explode) + if ($i = !$i) { + $adjustCount = 0; + $newCellTokens = $cellTokens = []; + // Search for row ranges (e.g. 'Sheet1'!3:5 or 3:5) with or without $ absolutes (e.g. $3:5) + $matchCount = preg_match_all('/' . self::REFHELPER_REGEXP_ROWRANGE . '/i', ' ' . $formulaBlock . ' ', $matches, PREG_SET_ORDER); + if ($matchCount > 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = substr($this->updateCellReference('$A' . $match[3], $pBefore, $pNumCols, $pNumRows), 2); + $modified4 = substr($this->updateCellReference('$A' . $match[4], $pBefore, $pNumCols, $pNumRows), 2); + + if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = 100000; + $row = 10000000 + trim($match[3], '$'); + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = substr($this->updateCellReference($match[3] . '$1', $pBefore, $pNumCols, $pNumRows), 0, -2); + $modified4 = substr($this->updateCellReference($match[4] . '$1', $pBefore, $pNumCols, $pNumRows), 0, -2); + + if ($match[3] . ':' . $match[4] !== $modified3 . ':' . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($match[3], '$')) + 100000; + $row = 10000000; + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3] . ':' . $match[4]; + $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); + $modified4 = $this->updateCellReference($match[4], $pBefore, $pNumCols, $pNumRows); + + if ($match[3] . $match[4] !== $modified3 . $modified4) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3 . ':' . $modified4; + list($column, $row) = Coordinate::coordinateFromString($match[3]); + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; + $row = trim($row, '$') + 10000000; + $cellIndex = $column . $row; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + foreach ($matches as $match) { + $fromString = ($match[2] > '') ? $match[2] . '!' : ''; + $fromString .= $match[3]; + + $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); + if ($match[3] !== $modified3) { + if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { + $toString = ($match[2] > '') ? $match[2] . '!' : ''; + $toString .= $modified3; + list($column, $row) = Coordinate::coordinateFromString($match[3]); + // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more + $column = Coordinate::columnIndexFromString(trim($column, '$')) + 100000; + $row = trim($row, '$') + 10000000; + $cellIndex = $row . $column; + + $newCellTokens[$cellIndex] = preg_quote($toString, '/'); + $cellTokens[$cellIndex] = '/(? 0) { + if ($pNumCols > 0 || $pNumRows > 0) { + krsort($cellTokens); + krsort($newCellTokens); + } else { + ksort($cellTokens); + ksort($newCellTokens); + } // Update cell references in the formula + $formulaBlock = str_replace('\\', '', preg_replace($cellTokens, $newCellTokens, $formulaBlock)); + } + } + } + unset($formulaBlock); + + // Then rebuild the formula string + return implode('"', $formulaBlocks); + } + + /** + * Update cell reference. + * + * @param string $pCellRange Cell range + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @throws Exception + * + * @return string Updated cell range + */ + public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + // Is it in another worksheet? Will not have to update anything. + if (strpos($pCellRange, '!') !== false) { + return $pCellRange; + // Is it a range or a single cell? + } elseif (!Coordinate::coordinateIsRange($pCellRange)) { + // Single cell + return $this->updateSingleCellReference($pCellRange, $pBefore, $pNumCols, $pNumRows); + } elseif (Coordinate::coordinateIsRange($pCellRange)) { + // Range + return $this->updateCellRange($pCellRange, $pBefore, $pNumCols, $pNumRows); + } + + // Return original + return $pCellRange; + } + + /** + * Update named formulas (i.e. containing worksheet references / named ranges). + * + * @param Spreadsheet $spreadsheet Object to update + * @param string $oldName Old name (name to replace) + * @param string $newName New name + */ + public function updateNamedFormulas(Spreadsheet $spreadsheet, $oldName = '', $newName = '') + { + if ($oldName == '') { + return; + } + + foreach ($spreadsheet->getWorksheetIterator() as $sheet) { + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + if (($cell !== null) && ($cell->getDataType() == DataType::TYPE_FORMULA)) { + $formula = $cell->getValue(); + if (strpos($formula, $oldName) !== false) { + $formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula); + $formula = str_replace($oldName . '!', $newName . '!', $formula); + $cell->setValueExplicit($formula, DataType::TYPE_FORMULA); + } + } + } + } + } + + /** + * Update cell range. + * + * @param string $pCellRange Cell range (e.g. 'B2:D4', 'B:C' or '2:3') + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @throws Exception + * + * @return string Updated cell range + */ + private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + if (!Coordinate::coordinateIsRange($pCellRange)) { + throw new Exception('Only cell ranges may be passed to this method.'); + } + + // Update range + $range = Coordinate::splitRange($pCellRange); + $ic = count($range); + for ($i = 0; $i < $ic; ++$i) { + $jc = count($range[$i]); + for ($j = 0; $j < $jc; ++$j) { + if (ctype_alpha($range[$i][$j])) { + $r = Coordinate::coordinateFromString($this->updateSingleCellReference($range[$i][$j] . '1', $pBefore, $pNumCols, $pNumRows)); + $range[$i][$j] = $r[0]; + } elseif (ctype_digit($range[$i][$j])) { + $r = Coordinate::coordinateFromString($this->updateSingleCellReference('A' . $range[$i][$j], $pBefore, $pNumCols, $pNumRows)); + $range[$i][$j] = $r[1]; + } else { + $range[$i][$j] = $this->updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows); + } + } + } + + // Recreate range string + return Coordinate::buildRange($range); + } + + /** + * Update single cell reference. + * + * @param string $pCellReference Single cell reference + * @param string $pBefore Insert before this one + * @param int $pNumCols Number of columns to increment + * @param int $pNumRows Number of rows to increment + * + * @throws Exception + * + * @return string Updated cell reference + */ + private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) + { + if (Coordinate::coordinateIsRange($pCellReference)) { + throw new Exception('Only single cell references may be passed to this method.'); + } + + // Get coordinate of $pBefore + list($beforeColumn, $beforeRow) = Coordinate::coordinateFromString($pBefore); + + // Get coordinate of $pCellReference + list($newColumn, $newRow) = Coordinate::coordinateFromString($pCellReference); + + // Verify which parts should be updated + $updateColumn = (($newColumn[0] != '$') && ($beforeColumn[0] != '$') && (Coordinate::columnIndexFromString($newColumn) >= Coordinate::columnIndexFromString($beforeColumn))); + $updateRow = (($newRow[0] != '$') && ($beforeRow[0] != '$') && $newRow >= $beforeRow); + + // Create new column reference + if ($updateColumn) { + $newColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($newColumn) + $pNumCols); + } + + // Create new row reference + if ($updateRow) { + $newRow = $newRow + $pNumRows; + } + + // Return new reference + return $newColumn . $newRow; + } + + /** + * __clone implementation. Cloning should not be allowed in a Singleton! + * + * @throws Exception + */ + final public function __clone() + { + throw new Exception('Cloning a Singleton is not allowed!'); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/ITextElement.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/ITextElement.php new file mode 100755 index 0000000..6995467 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/ITextElement.php @@ -0,0 +1,36 @@ +richTextElements = []; + + // Rich-Text string attached to cell? + if ($pCell !== null) { + // Add cell text and style + if ($pCell->getValue() != '') { + $objRun = new Run($pCell->getValue()); + $objRun->setFont(clone $pCell->getWorksheet()->getStyle($pCell->getCoordinate())->getFont()); + $this->addText($objRun); + } + + // Set parent value + $pCell->setValueExplicit($this, DataType::TYPE_STRING); + } + } + + /** + * Add text. + * + * @param ITextElement $pText Rich text element + * + * @return RichText + */ + public function addText(ITextElement $pText) + { + $this->richTextElements[] = $pText; + + return $this; + } + + /** + * Create text. + * + * @param string $pText Text + * + * @throws Exception + * + * @return TextElement + */ + public function createText($pText) + { + $objText = new TextElement($pText); + $this->addText($objText); + + return $objText; + } + + /** + * Create text run. + * + * @param string $pText Text + * + * @throws Exception + * + * @return Run + */ + public function createTextRun($pText) + { + $objText = new Run($pText); + $this->addText($objText); + + return $objText; + } + + /** + * Get plain text. + * + * @return string + */ + public function getPlainText() + { + // Return value + $returnValue = ''; + + // Loop through all ITextElements + foreach ($this->richTextElements as $text) { + $returnValue .= $text->getText(); + } + + return $returnValue; + } + + /** + * Convert to string. + * + * @return string + */ + public function __toString() + { + return $this->getPlainText(); + } + + /** + * Get Rich Text elements. + * + * @return ITextElement[] + */ + public function getRichTextElements() + { + return $this->richTextElements; + } + + /** + * Set Rich Text elements. + * + * @param ITextElement[] $textElements Array of elements + * + * @return RichText + */ + public function setRichTextElements(array $textElements) + { + $this->richTextElements = $textElements; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + $hashElements = ''; + foreach ($this->richTextElements as $element) { + $hashElements .= $element->getHashCode(); + } + + return md5( + $hashElements . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/Run.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/Run.php new file mode 100755 index 0000000..b499623 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/Run.php @@ -0,0 +1,65 @@ +font = new Font(); + } + + /** + * Get font. + * + * @return null|\PhpOffice\PhpSpreadsheet\Style\Font + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. + * + * @param Font $pFont Font + * + * @return ITextElement + */ + public function setFont(Font $pFont = null) + { + $this->font = $pFont; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->getText() . + $this->font->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php new file mode 100755 index 0000000..d9ad0d7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php @@ -0,0 +1,86 @@ +text = $pText; + } + + /** + * Get text. + * + * @return string Text + */ + public function getText() + { + return $this->text; + } + + /** + * Set text. + * + * @param $text string Text + * + * @return ITextElement + */ + public function setText($text) + { + $this->text = $text; + + return $this; + } + + /** + * Get font. + * + * @return null|\PhpOffice\PhpSpreadsheet\Style\Font + */ + public function getFont() + { + return null; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->text . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php new file mode 100755 index 0000000..c297dd6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php @@ -0,0 +1,169 @@ +setLocale($locale); + } + + /** + * Identify to PhpSpreadsheet the external library to use for rendering charts. + * + * @param string $rendererClass Class name of the chart renderer + * eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph + * + * @throws Exception + */ + public static function setChartRenderer($rendererClass) + { + if (!is_a($rendererClass, IRenderer::class, true)) { + throw new Exception('Chart renderer must implement ' . IRenderer::class); + } + + self::$chartRenderer = $rendererClass; + } + + /** + * Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use. + * + * @return null|string Class name of the chart renderer + * eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph + */ + public static function getChartRenderer() + { + return self::$chartRenderer; + } + + /** + * Set default options for libxml loader. + * + * @param int $options Default options for libxml loader + */ + public static function setLibXmlLoaderOptions($options) + { + if ($options === null && defined('LIBXML_DTDLOAD')) { + $options = LIBXML_DTDLOAD | LIBXML_DTDATTR; + } + self::$libXmlLoaderOptions = $options; + } + + /** + * Get default options for libxml loader. + * Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly. + * + * @return int Default options for libxml loader + */ + public static function getLibXmlLoaderOptions() + { + if (self::$libXmlLoaderOptions === null && defined('LIBXML_DTDLOAD')) { + self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR); + } elseif (self::$libXmlLoaderOptions === null) { + self::$libXmlLoaderOptions = true; + } + + return self::$libXmlLoaderOptions; + } + + /** + * Enable/Disable the entity loader for libxml loader. + * Allow/disallow libxml_disable_entity_loader() call when not thread safe. + * Default behaviour is to do the check, but if you're running PHP versions + * 7.2 < 7.2.1 + * 7.1 < 7.1.13 + * 7.0 < 7.0.27 + * 5.6 ANY + * then you may need to disable this check to prevent unwanted behaviour in other threads + * SECURITY WARNING: Changing this flag to false is not recommended. + * + * @param bool $state + */ + public static function setLibXmlDisableEntityLoader($state) + { + self::$libXmlDisableEntityLoader = (bool) $state; + } + + /** + * Return the state of the entity loader (disabled/enabled) for libxml loader. + * + * @return bool $state + */ + public static function getLibXmlDisableEntityLoader() + { + return self::$libXmlDisableEntityLoader; + } + + /** + * Sets the implementation of cache that should be used for cell collection. + * + * @param CacheInterface $cache + */ + public static function setCache(CacheInterface $cache) + { + self::$cache = $cache; + } + + /** + * Gets the implementation of cache that should be used for cell collection. + * + * @return CacheInterface + */ + public static function getCache() + { + if (!self::$cache) { + self::$cache = new Memory(); + } + + return self::$cache; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/CodePage.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/CodePage.php new file mode 100755 index 0000000..4b57824 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/CodePage.php @@ -0,0 +1,138 @@ + 'January', + 'Feb' => 'February', + 'Mar' => 'March', + 'Apr' => 'April', + 'May' => 'May', + 'Jun' => 'June', + 'Jul' => 'July', + 'Aug' => 'August', + 'Sep' => 'September', + 'Oct' => 'October', + 'Nov' => 'November', + 'Dec' => 'December', + ]; + + /** + * @var string[] + */ + public static $numberSuffixes = [ + 'st', + 'nd', + 'rd', + 'th', + ]; + + /** + * Base calendar year to use for calculations + * Value is either CALENDAR_WINDOWS_1900 (1900) or CALENDAR_MAC_1904 (1904). + * + * @var int + */ + protected static $excelCalendar = self::CALENDAR_WINDOWS_1900; + + /** + * Default timezone to use for DateTime objects. + * + * @var null|\DateTimeZone + */ + protected static $defaultTimeZone; + + /** + * Set the Excel calendar (Windows 1900 or Mac 1904). + * + * @param int $baseDate Excel base date (1900 or 1904) + * + * @return bool Success or failure + */ + public static function setExcelCalendar($baseDate) + { + if (($baseDate == self::CALENDAR_WINDOWS_1900) || + ($baseDate == self::CALENDAR_MAC_1904)) { + self::$excelCalendar = $baseDate; + + return true; + } + + return false; + } + + /** + * Return the Excel calendar (Windows 1900 or Mac 1904). + * + * @return int Excel base date (1900 or 1904) + */ + public static function getExcelCalendar() + { + return self::$excelCalendar; + } + + /** + * Set the Default timezone to use for dates. + * + * @param DateTimeZone|string $timeZone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions + * + * @throws \Exception + * + * @return bool Success or failure + * @return bool Success or failure + */ + public static function setDefaultTimezone($timeZone) + { + if ($timeZone = self::validateTimeZone($timeZone)) { + self::$defaultTimeZone = $timeZone; + + return true; + } + + return false; + } + + /** + * Return the Default timezone being used for dates. + * + * @return DateTimeZone The timezone being used as default for Excel timestamp to PHP DateTime object + */ + public static function getDefaultTimezone() + { + if (self::$defaultTimeZone === null) { + self::$defaultTimeZone = new DateTimeZone('UTC'); + } + + return self::$defaultTimeZone; + } + + /** + * Validate a timezone. + * + * @param DateTimeZone|string $timeZone The timezone to validate, either as a timezone string or object + * + * @throws \Exception + * + * @return DateTimeZone The timezone as a timezone object + * @return DateTimeZone The timezone as a timezone object + */ + protected static function validateTimeZone($timeZone) + { + if (is_object($timeZone) && $timeZone instanceof DateTimeZone) { + return $timeZone; + } elseif (is_string($timeZone)) { + return new DateTimeZone($timeZone); + } + + throw new \Exception('Invalid timezone'); + } + + /** + * Convert a MS serialized datetime value from Excel to a PHP Date/Time object. + * + * @param float|int $excelTimestamp MS Excel serialized date/time value + * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp, + * if you don't want to treat it as a UTC value + * Use the default (UST) unless you absolutely need a conversion + * + * @throws \Exception + * + * @return \DateTime PHP date/time object + */ + public static function excelToDateTimeObject($excelTimestamp, $timeZone = null) + { + $timeZone = ($timeZone === null) ? self::getDefaultTimezone() : self::validateTimeZone($timeZone); + if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) { + if ($excelTimestamp < 1.0) { + // Unix timestamp base date + $baseDate = new \DateTime('1970-01-01', $timeZone); + } else { + // MS Excel calendar base dates + if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) { + // Allow adjustment for 1900 Leap Year in MS Excel + $baseDate = ($excelTimestamp < 60) ? new \DateTime('1899-12-31', $timeZone) : new \DateTime('1899-12-30', $timeZone); + } else { + $baseDate = new \DateTime('1904-01-01', $timeZone); + } + } + } else { + $baseDate = new \DateTime('1899-12-30', $timeZone); + } + + $days = floor($excelTimestamp); + $partDay = $excelTimestamp - $days; + $hours = floor($partDay * 24); + $partDay = $partDay * 24 - $hours; + $minutes = floor($partDay * 60); + $partDay = $partDay * 60 - $minutes; + $seconds = round($partDay * 60); + + if ($days >= 0) { + $days = '+' . $days; + } + $interval = $days . ' days'; + + return $baseDate->modify($interval) + ->setTime((int) $hours, (int) $minutes, (int) $seconds); + } + + /** + * Convert a MS serialized datetime value from Excel to a unix timestamp. + * + * @param float|int $excelTimestamp MS Excel serialized date/time value + * @param null|DateTimeZone|string $timeZone The timezone to assume for the Excel timestamp, + * if you don't want to treat it as a UTC value + * Use the default (UST) unless you absolutely need a conversion + * + * @throws \Exception + * + * @return int Unix timetamp for this date/time + */ + public static function excelToTimestamp($excelTimestamp, $timeZone = null) + { + return (int) self::excelToDateTimeObject($excelTimestamp, $timeZone) + ->format('U'); + } + + /** + * Convert a date from PHP to an MS Excel serialized date/time value. + * + * @param mixed $dateValue Unix Timestamp or PHP DateTime object or a string + * + * @return bool|float Excel date/time value + * or boolean FALSE on failure + */ + public static function PHPToExcel($dateValue) + { + if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) { + return self::dateTimeToExcel($dateValue); + } elseif (is_numeric($dateValue)) { + return self::timestampToExcel($dateValue); + } elseif (is_string($dateValue)) { + return self::stringToExcel($dateValue); + } + + return false; + } + + /** + * Convert a PHP DateTime object to an MS Excel serialized date/time value. + * + * @param DateTimeInterface $dateValue PHP DateTime object + * + * @return float MS Excel serialized date/time value + */ + public static function dateTimeToExcel(DateTimeInterface $dateValue) + { + return self::formattedPHPToExcel( + (int) $dateValue->format('Y'), + (int) $dateValue->format('m'), + (int) $dateValue->format('d'), + (int) $dateValue->format('H'), + (int) $dateValue->format('i'), + (int) $dateValue->format('s') + ); + } + + /** + * Convert a Unix timestamp to an MS Excel serialized date/time value. + * + * @param int $dateValue Unix Timestamp + * + * @return float MS Excel serialized date/time value + */ + public static function timestampToExcel($dateValue) + { + if (!is_numeric($dateValue)) { + return false; + } + + return self::dateTimeToExcel(new \DateTime('@' . $dateValue)); + } + + /** + * formattedPHPToExcel. + * + * @param int $year + * @param int $month + * @param int $day + * @param int $hours + * @param int $minutes + * @param int $seconds + * + * @return float Excel date/time value + */ + public static function formattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0) + { + if (self::$excelCalendar == self::CALENDAR_WINDOWS_1900) { + // + // Fudge factor for the erroneous fact that the year 1900 is treated as a Leap Year in MS Excel + // This affects every date following 28th February 1900 + // + $excel1900isLeapYear = true; + if (($year == 1900) && ($month <= 2)) { + $excel1900isLeapYear = false; + } + $myexcelBaseDate = 2415020; + } else { + $myexcelBaseDate = 2416481; + $excel1900isLeapYear = false; + } + + // Julian base date Adjustment + if ($month > 2) { + $month -= 3; + } else { + $month += 9; + --$year; + } + + // Calculate the Julian Date, then subtract the Excel base date (JD 2415020 = 31-Dec-1899 Giving Excel Date of 0) + $century = substr($year, 0, 2); + $decade = substr($year, 2, 2); + $excelDate = floor((146097 * $century) / 4) + floor((1461 * $decade) / 4) + floor((153 * $month + 2) / 5) + $day + 1721119 - $myexcelBaseDate + $excel1900isLeapYear; + + $excelTime = (($hours * 3600) + ($minutes * 60) + $seconds) / 86400; + + return (float) $excelDate + $excelTime; + } + + /** + * Is a given cell a date/time? + * + * @param Cell $pCell + * + * @return bool + */ + public static function isDateTime(Cell $pCell) + { + return is_numeric($pCell->getValue()) && + self::isDateTimeFormat( + $pCell->getWorksheet()->getStyle( + $pCell->getCoordinate() + )->getNumberFormat() + ); + } + + /** + * Is a given number format a date/time? + * + * @param NumberFormat $pFormat + * + * @return bool + */ + public static function isDateTimeFormat(NumberFormat $pFormat) + { + return self::isDateTimeFormatCode($pFormat->getFormatCode()); + } + + private static $possibleDateFormatCharacters = 'eymdHs'; + + /** + * Is a given number format code a date/time? + * + * @param string $pFormatCode + * + * @return bool + */ + public static function isDateTimeFormatCode($pFormatCode) + { + if (strtolower($pFormatCode) === strtolower(NumberFormat::FORMAT_GENERAL)) { + // "General" contains an epoch letter 'e', so we trap for it explicitly here (case-insensitive check) + return false; + } + if (preg_match('/[0#]E[+-]0/i', $pFormatCode)) { + // Scientific format + return false; + } + + // Switch on formatcode + switch ($pFormatCode) { + // Explicitly defined date formats + case NumberFormat::FORMAT_DATE_YYYYMMDD: + case NumberFormat::FORMAT_DATE_YYYYMMDD2: + case NumberFormat::FORMAT_DATE_DDMMYYYY: + case NumberFormat::FORMAT_DATE_DMYSLASH: + case NumberFormat::FORMAT_DATE_DMYMINUS: + case NumberFormat::FORMAT_DATE_DMMINUS: + case NumberFormat::FORMAT_DATE_MYMINUS: + case NumberFormat::FORMAT_DATE_DATETIME: + case NumberFormat::FORMAT_DATE_TIME1: + case NumberFormat::FORMAT_DATE_TIME2: + case NumberFormat::FORMAT_DATE_TIME3: + case NumberFormat::FORMAT_DATE_TIME4: + case NumberFormat::FORMAT_DATE_TIME5: + case NumberFormat::FORMAT_DATE_TIME6: + case NumberFormat::FORMAT_DATE_TIME7: + case NumberFormat::FORMAT_DATE_TIME8: + case NumberFormat::FORMAT_DATE_YYYYMMDDSLASH: + case NumberFormat::FORMAT_DATE_XLSX14: + case NumberFormat::FORMAT_DATE_XLSX15: + case NumberFormat::FORMAT_DATE_XLSX16: + case NumberFormat::FORMAT_DATE_XLSX17: + case NumberFormat::FORMAT_DATE_XLSX22: + return true; + } + + // Typically number, currency or accounting (or occasionally fraction) formats + if ((substr($pFormatCode, 0, 1) == '_') || (substr($pFormatCode, 0, 2) == '0 ')) { + return false; + } + // Try checking for any of the date formatting characters that don't appear within square braces + if (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $pFormatCode)) { + // We might also have a format mask containing quoted strings... + // we don't want to test for any of our characters within the quoted blocks + if (strpos($pFormatCode, '"') !== false) { + $segMatcher = false; + foreach (explode('"', $pFormatCode) as $subVal) { + // Only test in alternate array entries (the non-quoted blocks) + if (($segMatcher = !$segMatcher) && + (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $subVal))) { + return true; + } + } + + return false; + } + + return true; + } + + // No date... + return false; + } + + /** + * Convert a date/time string to Excel time. + * + * @param string $dateValue Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10' + * + * @return false|float Excel date/time serial value + */ + public static function stringToExcel($dateValue) + { + if (strlen($dateValue) < 2) { + return false; + } + if (!preg_match('/^(\d{1,4}[ \.\/\-][A-Z]{3,9}([ \.\/\-]\d{1,4})?|[A-Z]{3,9}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?|\d{1,4}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?)( \d{1,2}:\d{1,2}(:\d{1,2})?)?$/iu', $dateValue)) { + return false; + } + + $dateValueNew = DateTime::DATEVALUE($dateValue); + + if ($dateValueNew === Functions::VALUE()) { + return false; + } + + if (strpos($dateValue, ':') !== false) { + $timeValue = DateTime::TIMEVALUE($dateValue); + if ($timeValue === Functions::VALUE()) { + return false; + } + $dateValueNew += $timeValue; + } + + return $dateValueNew; + } + + /** + * Converts a month name (either a long or a short name) to a month number. + * + * @param string $month Month name or abbreviation + * + * @return int|string Month number (1 - 12), or the original string argument if it isn't a valid month name + */ + public static function monthStringToNumber($month) + { + $monthIndex = 1; + foreach (self::$monthNames as $shortMonthName => $longMonthName) { + if (($month === $longMonthName) || ($month === $shortMonthName)) { + return $monthIndex; + } + ++$monthIndex; + } + + return $month; + } + + /** + * Strips an ordinal from a numeric value. + * + * @param string $day Day number with an ordinal + * + * @return int|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric + */ + public static function dayStringToNumber($day) + { + $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day)); + if (is_numeric($strippedDayValue)) { + return (int) $strippedDayValue; + } + + return $day; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Drawing.php new file mode 100755 index 0000000..25d6910 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Drawing.php @@ -0,0 +1,249 @@ +getName(); + $size = $pDefaultFont->getSize(); + + if (isset(Font::$defaultColumnWidths[$name][$size])) { + // Exact width can be determined + $colWidth = $pValue * Font::$defaultColumnWidths[$name][$size]['width'] / Font::$defaultColumnWidths[$name][$size]['px']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $colWidth = $pValue * 11 * Font::$defaultColumnWidths['Calibri'][11]['width'] / Font::$defaultColumnWidths['Calibri'][11]['px'] / $size; + } + + return $colWidth; + } + + /** + * Convert column width from (intrinsic) Excel units to pixels. + * + * @param float $pValue Value in cell dimension + * @param \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont Default font of the workbook + * + * @return int Value in pixels + */ + public static function cellDimensionToPixels($pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) + { + // Font name and size + $name = $pDefaultFont->getName(); + $size = $pDefaultFont->getSize(); + + if (isset(Font::$defaultColumnWidths[$name][$size])) { + // Exact width can be determined + $colWidth = $pValue * Font::$defaultColumnWidths[$name][$size]['px'] / Font::$defaultColumnWidths[$name][$size]['width']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $colWidth = $pValue * $size * Font::$defaultColumnWidths['Calibri'][11]['px'] / Font::$defaultColumnWidths['Calibri'][11]['width'] / 11; + } + + // Round pixels to closest integer + $colWidth = (int) round($colWidth); + + return $colWidth; + } + + /** + * Convert pixels to points. + * + * @param int $pValue Value in pixels + * + * @return float Value in points + */ + public static function pixelsToPoints($pValue) + { + return $pValue * 0.67777777; + } + + /** + * Convert points to pixels. + * + * @param int $pValue Value in points + * + * @return int Value in pixels + */ + public static function pointsToPixels($pValue) + { + if ($pValue != 0) { + return (int) ceil($pValue * 1.333333333); + } + + return 0; + } + + /** + * Convert degrees to angle. + * + * @param int $pValue Degrees + * + * @return int Angle + */ + public static function degreesToAngle($pValue) + { + return (int) round($pValue * 60000); + } + + /** + * Convert angle to degrees. + * + * @param int $pValue Angle + * + * @return int Degrees + */ + public static function angleToDegrees($pValue) + { + if ($pValue != 0) { + return round($pValue / 60000); + } + + return 0; + } + + /** + * Create a new image from file. By alexander at alexauto dot nl. + * + * @see http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214 + * + * @param string $p_sFile Path to Windows DIB (BMP) image + * + * @return resource + */ + public static function imagecreatefrombmp($p_sFile) + { + // Load the image into a string + $file = fopen($p_sFile, 'rb'); + $read = fread($file, 10); + while (!feof($file) && ($read != '')) { + $read .= fread($file, 1024); + } + + $temp = unpack('H*', $read); + $hex = $temp[1]; + $header = substr($hex, 0, 108); + + // Process the header + // Structure: http://www.fastgraph.com/help/bmp_header_format.html + if (substr($header, 0, 4) == '424d') { + // Cut it in parts of 2 bytes + $header_parts = str_split($header, 2); + + // Get the width 4 bytes + $width = hexdec($header_parts[19] . $header_parts[18]); + + // Get the height 4 bytes + $height = hexdec($header_parts[23] . $header_parts[22]); + + // Unset the header params + unset($header_parts); + } + + // Define starting X and Y + $x = 0; + $y = 1; + + // Create newimage + $image = imagecreatetruecolor($width, $height); + + // Grab the body from the image + $body = substr($hex, 108); + + // Calculate if padding at the end-line is needed + // Divided by two to keep overview. + // 1 byte = 2 HEX-chars + $body_size = (strlen($body) / 2); + $header_size = ($width * $height); + + // Use end-line padding? Only when needed + $usePadding = ($body_size > ($header_size * 3) + 4); + + // Using a for-loop with index-calculation instaid of str_split to avoid large memory consumption + // Calculate the next DWORD-position in the body + for ($i = 0; $i < $body_size; $i += 3) { + // Calculate line-ending and padding + if ($x >= $width) { + // If padding needed, ignore image-padding + // Shift i to the ending of the current 32-bit-block + if ($usePadding) { + $i += $width % 4; + } + + // Reset horizontal position + $x = 0; + + // Raise the height-position (bottom-up) + ++$y; + + // Reached the image-height? Break the for-loop + if ($y > $height) { + break; + } + } + + // Calculation of the RGB-pixel (defined as BGR in image-data) + // Define $i_pos as absolute position in the body + $i_pos = $i * 2; + $r = hexdec($body[$i_pos + 4] . $body[$i_pos + 5]); + $g = hexdec($body[$i_pos + 2] . $body[$i_pos + 3]); + $b = hexdec($body[$i_pos] . $body[$i_pos + 1]); + + // Calculate and draw the pixel + $color = imagecolorallocate($image, $r, $g, $b); + imagesetpixel($image, $x, $height - $y, $color); + + // Raise the horizontal position + ++$x; + } + + // Unset the body / free the memory + unset($body); + + // Return image-object + return $image; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher.php new file mode 100755 index 0000000..c6d0a6f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher.php @@ -0,0 +1,64 @@ +dggContainer; + } + + /** + * Set Drawing Group Container. + * + * @param Escher\DggContainer $dggContainer + * + * @return Escher\DggContainer + */ + public function setDggContainer($dggContainer) + { + return $this->dggContainer = $dggContainer; + } + + /** + * Get Drawing Container. + * + * @return Escher\DgContainer + */ + public function getDgContainer() + { + return $this->dgContainer; + } + + /** + * Set Drawing Container. + * + * @param Escher\DgContainer $dgContainer + * + * @return Escher\DgContainer + */ + public function setDgContainer($dgContainer) + { + return $this->dgContainer = $dgContainer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer.php new file mode 100755 index 0000000..e9d387d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer.php @@ -0,0 +1,52 @@ +dgId; + } + + public function setDgId($value) + { + $this->dgId = $value; + } + + public function getLastSpId() + { + return $this->lastSpId; + } + + public function setLastSpId($value) + { + $this->lastSpId = $value; + } + + public function getSpgrContainer() + { + return $this->spgrContainer; + } + + public function setSpgrContainer($spgrContainer) + { + return $this->spgrContainer = $spgrContainer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php new file mode 100755 index 0000000..7e2c346 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php @@ -0,0 +1,79 @@ +parent = $parent; + } + + /** + * Get the parent Shape Group Container if any. + * + * @return null|\PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer + */ + public function getParent() + { + return $this->parent; + } + + /** + * Add a child. This will be either spgrContainer or spContainer. + * + * @param mixed $child + */ + public function addChild($child) + { + $this->children[] = $child; + $child->setParent($this); + } + + /** + * Get collection of Shape Containers. + */ + public function getChildren() + { + return $this->children; + } + + /** + * Recursively get all spContainers within this spgrContainer. + * + * @return SpgrContainer\SpContainer[] + */ + public function getAllSpContainers() + { + $allSpContainers = []; + + foreach ($this->children as $child) { + if ($child instanceof self) { + $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); + } else { + $allSpContainers[] = $child; + } + } + + return $allSpContainers; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php new file mode 100755 index 0000000..bbf51df --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php @@ -0,0 +1,369 @@ +parent = $parent; + } + + /** + * Get the parent Shape Group Container. + * + * @return SpgrContainer + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set whether this is a group shape. + * + * @param bool $value + */ + public function setSpgr($value) + { + $this->spgr = $value; + } + + /** + * Get whether this is a group shape. + * + * @return bool + */ + public function getSpgr() + { + return $this->spgr; + } + + /** + * Set the shape type. + * + * @param int $value + */ + public function setSpType($value) + { + $this->spType = $value; + } + + /** + * Get the shape type. + * + * @return int + */ + public function getSpType() + { + return $this->spType; + } + + /** + * Set the shape flag. + * + * @param int $value + */ + public function setSpFlag($value) + { + $this->spFlag = $value; + } + + /** + * Get the shape flag. + * + * @return int + */ + public function getSpFlag() + { + return $this->spFlag; + } + + /** + * Set the shape index. + * + * @param int $value + */ + public function setSpId($value) + { + $this->spId = $value; + } + + /** + * Get the shape index. + * + * @return int + */ + public function getSpId() + { + return $this->spId; + } + + /** + * Set an option for the Shape Group Container. + * + * @param int $property The number specifies the option + * @param mixed $value + */ + public function setOPT($property, $value) + { + $this->OPT[$property] = $value; + } + + /** + * Get an option for the Shape Group Container. + * + * @param int $property The number specifies the option + * + * @return mixed + */ + public function getOPT($property) + { + if (isset($this->OPT[$property])) { + return $this->OPT[$property]; + } + + return null; + } + + /** + * Get the collection of options. + * + * @return array + */ + public function getOPTCollection() + { + return $this->OPT; + } + + /** + * Set cell coordinates of upper-left corner of shape. + * + * @param string $value eg: 'A1' + */ + public function setStartCoordinates($value) + { + $this->startCoordinates = $value; + } + + /** + * Get cell coordinates of upper-left corner of shape. + * + * @return string + */ + public function getStartCoordinates() + { + return $this->startCoordinates; + } + + /** + * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. + * + * @param int $startOffsetX + */ + public function setStartOffsetX($startOffsetX) + { + $this->startOffsetX = $startOffsetX; + } + + /** + * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width. + * + * @return int + */ + public function getStartOffsetX() + { + return $this->startOffsetX; + } + + /** + * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height. + * + * @param int $startOffsetY + */ + public function setStartOffsetY($startOffsetY) + { + $this->startOffsetY = $startOffsetY; + } + + /** + * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height. + * + * @return int + */ + public function getStartOffsetY() + { + return $this->startOffsetY; + } + + /** + * Set cell coordinates of bottom-right corner of shape. + * + * @param string $value eg: 'A1' + */ + public function setEndCoordinates($value) + { + $this->endCoordinates = $value; + } + + /** + * Get cell coordinates of bottom-right corner of shape. + * + * @return string + */ + public function getEndCoordinates() + { + return $this->endCoordinates; + } + + /** + * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. + * + * @param int $endOffsetX + */ + public function setEndOffsetX($endOffsetX) + { + $this->endOffsetX = $endOffsetX; + } + + /** + * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width. + * + * @return int + */ + public function getEndOffsetX() + { + return $this->endOffsetX; + } + + /** + * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. + * + * @param int $endOffsetY + */ + public function setEndOffsetY($endOffsetY) + { + $this->endOffsetY = $endOffsetY; + } + + /** + * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height. + * + * @return int + */ + public function getEndOffsetY() + { + return $this->endOffsetY; + } + + /** + * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and + * the dgContainer. A value of 1 = immediately within first spgrContainer + * Higher nesting level occurs if and only if spContainer is part of a shape group. + * + * @return int Nesting level + */ + public function getNestingLevel() + { + $nestingLevel = 0; + + $parent = $this->getParent(); + while ($parent instanceof SpgrContainer) { + ++$nestingLevel; + $parent = $parent->getParent(); + } + + return $nestingLevel; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer.php new file mode 100755 index 0000000..96da321 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer.php @@ -0,0 +1,175 @@ +spIdMax; + } + + /** + * Set maximum shape index of all shapes in all drawings (plus one). + * + * @param int $value + */ + public function setSpIdMax($value) + { + $this->spIdMax = $value; + } + + /** + * Get total number of drawings saved. + * + * @return int + */ + public function getCDgSaved() + { + return $this->cDgSaved; + } + + /** + * Set total number of drawings saved. + * + * @param int $value + */ + public function setCDgSaved($value) + { + $this->cDgSaved = $value; + } + + /** + * Get total number of shapes saved (including group shapes). + * + * @return int + */ + public function getCSpSaved() + { + return $this->cSpSaved; + } + + /** + * Set total number of shapes saved (including group shapes). + * + * @param int $value + */ + public function setCSpSaved($value) + { + $this->cSpSaved = $value; + } + + /** + * Get BLIP Store Container. + * + * @return DggContainer\BstoreContainer + */ + public function getBstoreContainer() + { + return $this->bstoreContainer; + } + + /** + * Set BLIP Store Container. + * + * @param DggContainer\BstoreContainer $bstoreContainer + */ + public function setBstoreContainer($bstoreContainer) + { + $this->bstoreContainer = $bstoreContainer; + } + + /** + * Set an option for the drawing group. + * + * @param int $property The number specifies the option + * @param mixed $value + */ + public function setOPT($property, $value) + { + $this->OPT[$property] = $value; + } + + /** + * Get an option for the drawing group. + * + * @param int $property The number specifies the option + * + * @return mixed + */ + public function getOPT($property) + { + if (isset($this->OPT[$property])) { + return $this->OPT[$property]; + } + + return null; + } + + /** + * Get identifier clusters. + * + * @return array + */ + public function getIDCLs() + { + return $this->IDCLs; + } + + /** + * Set identifier clusters. [ => , ...]. + * + * @param array $pValue + */ + public function setIDCLs($pValue) + { + $this->IDCLs = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php new file mode 100755 index 0000000..9d1e68e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php @@ -0,0 +1,34 @@ +BSECollection[] = $BSE; + $BSE->setParent($this); + } + + /** + * Get the collection of BLIP Store Entries. + * + * @return BstoreContainer\BSE[] + */ + public function getBSECollection() + { + return $this->BSECollection; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php new file mode 100755 index 0000000..f83bdc7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php @@ -0,0 +1,89 @@ +parent = $parent; + } + + /** + * Get the BLIP. + * + * @return BSE\Blip + */ + public function getBlip() + { + return $this->blip; + } + + /** + * Set the BLIP. + * + * @param BSE\Blip $blip + */ + public function setBlip($blip) + { + $this->blip = $blip; + $blip->setParent($this); + } + + /** + * Get the BLIP type. + * + * @return int + */ + public function getBlipType() + { + return $this->blipType; + } + + /** + * Set the BLIP type. + * + * @param int $blipType + */ + public function setBlipType($blipType) + { + $this->blipType = $blipType; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php new file mode 100755 index 0000000..88bc117 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php @@ -0,0 +1,60 @@ +data; + } + + /** + * Set the raw image data. + * + * @param string $data + */ + public function setData($data) + { + $this->data = $data; + } + + /** + * Set parent BSE. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE $parent + */ + public function setParent($parent) + { + $this->parent = $parent; + } + + /** + * Get parent BSE. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher\DggContainer\BstoreContainer\BSE $parent + */ + public function getParent() + { + return $this->parent; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php new file mode 100755 index 0000000..239c837 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php @@ -0,0 +1,144 @@ +open($zipFile) === true) { + $returnValue = ($zip->getFromName($archiveFile) !== false); + $zip->close(); + + return $returnValue; + } + + return false; + } + + return file_exists($pFilename); + } + + /** + * Returns canonicalized absolute pathname, also for ZIP archives. + * + * @param string $pFilename + * + * @return string + */ + public static function realpath($pFilename) + { + // Returnvalue + $returnValue = ''; + + // Try using realpath() + if (file_exists($pFilename)) { + $returnValue = realpath($pFilename); + } + + // Found something? + if ($returnValue == '' || ($returnValue === null)) { + $pathArray = explode('/', $pFilename); + while (in_array('..', $pathArray) && $pathArray[0] != '..') { + $iMax = count($pathArray); + for ($i = 0; $i < $iMax; ++$i) { + if ($pathArray[$i] == '..' && $i > 0) { + unset($pathArray[$i], $pathArray[$i - 1]); + + break; + } + } + } + $returnValue = implode('/', $pathArray); + } + + // Return + return $returnValue; + } + + /** + * Get the systems temporary directory. + * + * @return string + */ + public static function sysGetTempDir() + { + if (self::$useUploadTempDirectory) { + // use upload-directory when defined to allow running on environments having very restricted + // open_basedir configs + if (ini_get('upload_tmp_dir') !== false) { + if ($temp = ini_get('upload_tmp_dir')) { + if (file_exists($temp)) { + return realpath($temp); + } + } + } + } + + return realpath(sys_get_temp_dir()); + } + + /** + * Assert that given path is an existing file and is readable, otherwise throw exception. + * + * @param string $filename + * + * @throws InvalidArgumentException + */ + public static function assertFile($filename) + { + if (!is_file($filename)) { + throw new InvalidArgumentException('File "' . $filename . '" does not exist.'); + } + + if (!is_readable($filename)) { + throw new InvalidArgumentException('Could not open "' . $filename . '" for reading.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php new file mode 100755 index 0000000..8abcef2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php @@ -0,0 +1,764 @@ + [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 56, 'width' => 9.33203125], + 9 => ['px' => 64, 'width' => 9.14062500], + 10 => ['px' => 64, 'width' => 9.14062500], + ], + 'Calibri' => [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 56, 'width' => 9.33203125], + 9 => ['px' => 56, 'width' => 9.33203125], + 10 => ['px' => 64, 'width' => 9.14062500], + 11 => ['px' => 64, 'width' => 9.14062500], + ], + 'Verdana' => [ + 1 => ['px' => 24, 'width' => 12.00000000], + 2 => ['px' => 24, 'width' => 12.00000000], + 3 => ['px' => 32, 'width' => 10.66406250], + 4 => ['px' => 32, 'width' => 10.66406250], + 5 => ['px' => 40, 'width' => 10.00000000], + 6 => ['px' => 48, 'width' => 9.59765625], + 7 => ['px' => 48, 'width' => 9.59765625], + 8 => ['px' => 64, 'width' => 9.14062500], + 9 => ['px' => 72, 'width' => 9.00000000], + 10 => ['px' => 72, 'width' => 9.00000000], + ], + ]; + + /** + * Set autoSize method. + * + * @param string $pValue see self::AUTOSIZE_METHOD_* + * + * @return bool Success or failure + */ + public static function setAutoSizeMethod($pValue) + { + if (!in_array($pValue, self::$autoSizeMethods)) { + return false; + } + self::$autoSizeMethod = $pValue; + + return true; + } + + /** + * Get autoSize method. + * + * @return string + */ + public static function getAutoSizeMethod() + { + return self::$autoSizeMethod; + } + + /** + * Set the path to the folder containing .ttf files. There should be a trailing slash. + * Typical locations on variout some platforms: + *
    + *
  • C:/Windows/Fonts/
  • + *
  • /usr/share/fonts/truetype/
  • + *
  • ~/.fonts/
  • + *
. + * + * @param string $pValue + */ + public static function setTrueTypeFontPath($pValue) + { + self::$trueTypeFontPath = $pValue; + } + + /** + * Get the path to the folder containing .ttf files. + * + * @return string + */ + public static function getTrueTypeFontPath() + { + return self::$trueTypeFontPath; + } + + /** + * Calculate an (approximate) OpenXML column width, based on font size and text contained. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font Font object + * @param RichText|string $cellText Text to calculate width + * @param int $rotation Rotation angle + * @param null|\PhpOffice\PhpSpreadsheet\Style\Font $defaultFont Font object + * + * @return int Column width + */ + public static function calculateColumnWidth(\PhpOffice\PhpSpreadsheet\Style\Font $font, $cellText = '', $rotation = 0, \PhpOffice\PhpSpreadsheet\Style\Font $defaultFont = null) + { + // If it is rich text, use plain text + if ($cellText instanceof RichText) { + $cellText = $cellText->getPlainText(); + } + + // Special case if there are one or more newline characters ("\n") + if (strpos($cellText, "\n") !== false) { + $lineTexts = explode("\n", $cellText); + $lineWidths = []; + foreach ($lineTexts as $lineText) { + $lineWidths[] = self::calculateColumnWidth($font, $lineText, $rotation = 0, $defaultFont); + } + + return max($lineWidths); // width of longest line in cell + } + + // Try to get the exact text width in pixels + $approximate = self::$autoSizeMethod == self::AUTOSIZE_METHOD_APPROX; + if (!$approximate) { + $columnWidthAdjust = ceil(self::getTextWidthPixelsExact('n', $font, 0) * 1.07); + + try { + // Width of text in pixels excl. padding + // and addition because Excel adds some padding, just use approx width of 'n' glyph + $columnWidth = self::getTextWidthPixelsExact($cellText, $font, $rotation) + $columnWidthAdjust; + } catch (PhpSpreadsheetException $e) { + $approximate = true; + } + } + + if ($approximate) { + $columnWidthAdjust = self::getTextWidthPixelsApprox('n', $font, 0); + // Width of text in pixels excl. padding, approximation + // and addition because Excel adds some padding, just use approx width of 'n' glyph + $columnWidth = self::getTextWidthPixelsApprox($cellText, $font, $rotation) + $columnWidthAdjust; + } + + // Convert from pixel width to column width + $columnWidth = Drawing::pixelsToCellDimension($columnWidth, $defaultFont); + + // Return + return round($columnWidth, 6); + } + + /** + * Get GD text width in pixels for a string of text in a certain font at a certain rotation angle. + * + * @param string $text + * @param \PhpOffice\PhpSpreadsheet\Style\Font + * @param int $rotation + * + * @throws PhpSpreadsheetException + * + * @return int + */ + public static function getTextWidthPixelsExact($text, \PhpOffice\PhpSpreadsheet\Style\Font $font, $rotation = 0) + { + if (!function_exists('imagettfbbox')) { + throw new PhpSpreadsheetException('GD library needs to be enabled'); + } + + // font size should really be supplied in pixels in GD2, + // but since GD2 seems to assume 72dpi, pixels and points are the same + $fontFile = self::getTrueTypeFontFileFromFont($font); + $textBox = imagettfbbox($font->getSize(), $rotation, $fontFile, $text); + + // Get corners positions + $lowerLeftCornerX = $textBox[0]; + $lowerRightCornerX = $textBox[2]; + $upperRightCornerX = $textBox[4]; + $upperLeftCornerX = $textBox[6]; + + // Consider the rotation when calculating the width + $textWidth = max($lowerRightCornerX - $upperLeftCornerX, $upperRightCornerX - $lowerLeftCornerX); + + return $textWidth; + } + + /** + * Get approximate width in pixels for a string of text in a certain font at a certain rotation angle. + * + * @param string $columnText + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font + * @param int $rotation + * + * @return int Text width in pixels (no padding added) + */ + public static function getTextWidthPixelsApprox($columnText, \PhpOffice\PhpSpreadsheet\Style\Font $font, $rotation = 0) + { + $fontName = $font->getName(); + $fontSize = $font->getSize(); + + // Calculate column width in pixels. We assume fixed glyph width. Result varies with font name and size. + switch ($fontName) { + case 'Calibri': + // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font. + $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size + break; + case 'Arial': + // value 8 was set because of experience in different exports at Arial 10 font. + $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size + break; + case 'Verdana': + // value 8 was found via interpolation by inspecting real Excel files with Verdana 10 font. + $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size + break; + default: + // just assume Calibri + $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); + $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size + break; + } + + // Calculate approximate rotated column width + if ($rotation !== 0) { + if ($rotation == -165) { + // stacked text + $columnWidth = 4; // approximation + } else { + // rotated text + $columnWidth = $columnWidth * cos(deg2rad($rotation)) + + $fontSize * abs(sin(deg2rad($rotation))) / 5; // approximation + } + } + + // pixel width is an integer + return (int) $columnWidth; + } + + /** + * Calculate an (approximate) pixel size, based on a font points size. + * + * @param int $fontSizeInPoints Font size (in points) + * + * @return int Font size (in pixels) + */ + public static function fontSizeToPixels($fontSizeInPoints) + { + return (int) ((4 / 3) * $fontSizeInPoints); + } + + /** + * Calculate an (approximate) pixel size, based on inch size. + * + * @param int $sizeInInch Font size (in inch) + * + * @return int Size (in pixels) + */ + public static function inchSizeToPixels($sizeInInch) + { + return $sizeInInch * 96; + } + + /** + * Calculate an (approximate) pixel size, based on centimeter size. + * + * @param int $sizeInCm Font size (in centimeters) + * + * @return float Size (in pixels) + */ + public static function centimeterSizeToPixels($sizeInCm) + { + return $sizeInCm * 37.795275591; + } + + /** + * Returns the font path given the font. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font + * + * @return string Path to TrueType font file + */ + public static function getTrueTypeFontFileFromFont($font) + { + if (!file_exists(self::$trueTypeFontPath) || !is_dir(self::$trueTypeFontPath)) { + throw new PhpSpreadsheetException('Valid directory to TrueType Font files not specified'); + } + + $name = $font->getName(); + $bold = $font->getBold(); + $italic = $font->getItalic(); + + // Check if we can map font to true type font file + switch ($name) { + case 'Arial': + $fontFile = ( + $bold ? ($italic ? self::ARIAL_BOLD_ITALIC : self::ARIAL_BOLD) + : ($italic ? self::ARIAL_ITALIC : self::ARIAL) + ); + + break; + case 'Calibri': + $fontFile = ( + $bold ? ($italic ? self::CALIBRI_BOLD_ITALIC : self::CALIBRI_BOLD) + : ($italic ? self::CALIBRI_ITALIC : self::CALIBRI) + ); + + break; + case 'Courier New': + $fontFile = ( + $bold ? ($italic ? self::COURIER_NEW_BOLD_ITALIC : self::COURIER_NEW_BOLD) + : ($italic ? self::COURIER_NEW_ITALIC : self::COURIER_NEW) + ); + + break; + case 'Comic Sans MS': + $fontFile = ( + $bold ? self::COMIC_SANS_MS_BOLD : self::COMIC_SANS_MS + ); + + break; + case 'Georgia': + $fontFile = ( + $bold ? ($italic ? self::GEORGIA_BOLD_ITALIC : self::GEORGIA_BOLD) + : ($italic ? self::GEORGIA_ITALIC : self::GEORGIA) + ); + + break; + case 'Impact': + $fontFile = self::IMPACT; + + break; + case 'Liberation Sans': + $fontFile = ( + $bold ? ($italic ? self::LIBERATION_SANS_BOLD_ITALIC : self::LIBERATION_SANS_BOLD) + : ($italic ? self::LIBERATION_SANS_ITALIC : self::LIBERATION_SANS) + ); + + break; + case 'Lucida Console': + $fontFile = self::LUCIDA_CONSOLE; + + break; + case 'Lucida Sans Unicode': + $fontFile = self::LUCIDA_SANS_UNICODE; + + break; + case 'Microsoft Sans Serif': + $fontFile = self::MICROSOFT_SANS_SERIF; + + break; + case 'Palatino Linotype': + $fontFile = ( + $bold ? ($italic ? self::PALATINO_LINOTYPE_BOLD_ITALIC : self::PALATINO_LINOTYPE_BOLD) + : ($italic ? self::PALATINO_LINOTYPE_ITALIC : self::PALATINO_LINOTYPE) + ); + + break; + case 'Symbol': + $fontFile = self::SYMBOL; + + break; + case 'Tahoma': + $fontFile = ( + $bold ? self::TAHOMA_BOLD : self::TAHOMA + ); + + break; + case 'Times New Roman': + $fontFile = ( + $bold ? ($italic ? self::TIMES_NEW_ROMAN_BOLD_ITALIC : self::TIMES_NEW_ROMAN_BOLD) + : ($italic ? self::TIMES_NEW_ROMAN_ITALIC : self::TIMES_NEW_ROMAN) + ); + + break; + case 'Trebuchet MS': + $fontFile = ( + $bold ? ($italic ? self::TREBUCHET_MS_BOLD_ITALIC : self::TREBUCHET_MS_BOLD) + : ($italic ? self::TREBUCHET_MS_ITALIC : self::TREBUCHET_MS) + ); + + break; + case 'Verdana': + $fontFile = ( + $bold ? ($italic ? self::VERDANA_BOLD_ITALIC : self::VERDANA_BOLD) + : ($italic ? self::VERDANA_ITALIC : self::VERDANA) + ); + + break; + default: + throw new PhpSpreadsheetException('Unknown font name "' . $name . '". Cannot map to TrueType font file'); + + break; + } + + $fontFile = self::$trueTypeFontPath . $fontFile; + + // Check if file actually exists + if (!file_exists($fontFile)) { + throw new PhpSpreadsheetException('TrueType Font file not found'); + } + + return $fontFile; + } + + /** + * Returns the associated charset for the font name. + * + * @param string $name Font name + * + * @return int Character set code + */ + public static function getCharsetFromFontName($name) + { + switch ($name) { + // Add more cases. Check FONT records in real Excel files. + case 'EucrosiaUPC': + return self::CHARSET_ANSI_THAI; + case 'Wingdings': + return self::CHARSET_SYMBOL; + case 'Wingdings 2': + return self::CHARSET_SYMBOL; + case 'Wingdings 3': + return self::CHARSET_SYMBOL; + default: + return self::CHARSET_ANSI_LATIN; + } + } + + /** + * Get the effective column width for columns without a column dimension or column with width -1 + * For example, for Calibri 11 this is 9.140625 (64 px). + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font The workbooks default font + * @param bool $pPixels true = return column width in pixels, false = return in OOXML units + * + * @return mixed Column width + */ + public static function getDefaultColumnWidthByFont(\PhpOffice\PhpSpreadsheet\Style\Font $font, $pPixels = false) + { + if (isset(self::$defaultColumnWidths[$font->getName()][$font->getSize()])) { + // Exact width can be determined + $columnWidth = $pPixels ? + self::$defaultColumnWidths[$font->getName()][$font->getSize()]['px'] + : self::$defaultColumnWidths[$font->getName()][$font->getSize()]['width']; + } else { + // We don't have data for this particular font and size, use approximation by + // extrapolating from Calibri 11 + $columnWidth = $pPixels ? + self::$defaultColumnWidths['Calibri'][11]['px'] + : self::$defaultColumnWidths['Calibri'][11]['width']; + $columnWidth = $columnWidth * $font->getSize() / 11; + + // Round pixels to closest integer + if ($pPixels) { + $columnWidth = (int) round($columnWidth); + } + } + + return $columnWidth; + } + + /** + * Get the effective row height for rows without a row dimension or rows with height -1 + * For example, for Calibri 11 this is 15 points. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font The workbooks default font + * + * @return float Row height in points + */ + public static function getDefaultRowHeightByFont(\PhpOffice\PhpSpreadsheet\Style\Font $font) + { + switch ($font->getName()) { + case 'Arial': + switch ($font->getSize()) { + case 10: + // inspection of Arial 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Arial 9 workbook says 12.00pt ~16px + $rowHeight = 12; + + break; + case 8: + // inspection of Arial 8 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 7: + // inspection of Arial 7 workbook says 9.00pt ~12px + $rowHeight = 9; + + break; + case 6: + case 5: + // inspection of Arial 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Arial 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Arial 3 workbook says 6.00pt ~8px + $rowHeight = 6; + + break; + case 2: + case 1: + // inspection of Arial 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Arial 10 workbook as an approximation, extrapolation + $rowHeight = 12.75 * $font->getSize() / 10; + + break; + } + + break; + case 'Calibri': + switch ($font->getSize()) { + case 11: + // inspection of Calibri 11 workbook says 15.00pt ~20px + $rowHeight = 15; + + break; + case 10: + // inspection of Calibri 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Calibri 9 workbook says 12.00pt ~16px + $rowHeight = 12; + + break; + case 8: + // inspection of Calibri 8 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 7: + // inspection of Calibri 7 workbook says 9.00pt ~12px + $rowHeight = 9; + + break; + case 6: + case 5: + // inspection of Calibri 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Calibri 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Calibri 3 workbook says 6.00pt ~8px + $rowHeight = 6.00; + + break; + case 2: + case 1: + // inspection of Calibri 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Calibri 11 workbook as an approximation, extrapolation + $rowHeight = 15 * $font->getSize() / 11; + + break; + } + + break; + case 'Verdana': + switch ($font->getSize()) { + case 10: + // inspection of Verdana 10 workbook says 12.75pt ~17px + $rowHeight = 12.75; + + break; + case 9: + // inspection of Verdana 9 workbook says 11.25pt ~15px + $rowHeight = 11.25; + + break; + case 8: + // inspection of Verdana 8 workbook says 10.50pt ~14px + $rowHeight = 10.50; + + break; + case 7: + // inspection of Verdana 7 workbook says 9.00pt ~12px + $rowHeight = 9.00; + + break; + case 6: + case 5: + // inspection of Verdana 5,6 workbook says 8.25pt ~11px + $rowHeight = 8.25; + + break; + case 4: + // inspection of Verdana 4 workbook says 6.75pt ~9px + $rowHeight = 6.75; + + break; + case 3: + // inspection of Verdana 3 workbook says 6.00pt ~8px + $rowHeight = 6; + + break; + case 2: + case 1: + // inspection of Verdana 1,2 workbook says 5.25pt ~7px + $rowHeight = 5.25; + + break; + default: + // use Verdana 10 workbook as an approximation, extrapolation + $rowHeight = 12.75 * $font->getSize() / 10; + + break; + } + + break; + default: + // just use Calibri as an approximation + $rowHeight = 15 * $font->getSize() / 11; + + break; + } + + return $rowHeight; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT new file mode 100755 index 0000000..1c18a5d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CHANGELOG.TXT @@ -0,0 +1,16 @@ +Mar 1, 2005 11:15 AST by PM + ++ For consistency, renamed Math.php to Maths.java, utils to util, + tests to test, docs to doc - + ++ Removed conditional logic from top of Matrix class. + ++ Switched to using hypo function in Maths.php for all php-hypot calls. + NOTE TO SELF: Need to make sure that all decompositions have been + switched over to using the bundled hypo. + +Feb 25, 2005 at 10:00 AST by PM + ++ Recommend using simpler Error.php instead of JAMA_Error.php but + can be persuaded otherwise. + diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php new file mode 100755 index 0000000..2b241d5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php @@ -0,0 +1,147 @@ +L = $A->getArray(); + $this->m = $A->getRowDimension(); + + for ($i = 0; $i < $this->m; ++$i) { + for ($j = $i; $j < $this->m; ++$j) { + for ($sum = $this->L[$i][$j], $k = $i - 1; $k >= 0; --$k) { + $sum -= $this->L[$i][$k] * $this->L[$j][$k]; + } + if ($i == $j) { + if ($sum >= 0) { + $this->L[$i][$i] = sqrt($sum); + } else { + $this->isspd = false; + } + } else { + if ($this->L[$i][$i] != 0) { + $this->L[$j][$i] = $sum / $this->L[$i][$i]; + } + } + } + + for ($k = $i + 1; $k < $this->m; ++$k) { + $this->L[$i][$k] = 0.0; + } + } + } + + /** + * Is the matrix symmetric and positive definite? + * + * @return bool + */ + public function isSPD() + { + return $this->isspd; + } + + /** + * getL. + * + * Return triangular factor. + * + * @return Matrix Lower triangular matrix + */ + public function getL() + { + return new Matrix($this->L); + } + + /** + * Solve A*X = B. + * + * @param $B Row-equal matrix + * + * @return Matrix L * L' * X = B + */ + public function solve(Matrix $B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isspd) { + $X = $B->getArrayCopy(); + $nx = $B->getColumnDimension(); + + for ($k = 0; $k < $this->m; ++$k) { + for ($i = $k + 1; $i < $this->m; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->L[$i][$k]; + } + } + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->L[$k][$k]; + } + } + + for ($k = $this->m - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->L[$k][$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->L[$k][$i]; + } + } + } + + return new Matrix($X, $this->m, $nx); + } + + throw new CalculationException(Matrix::MATRIX_SPD_EXCEPTION); + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php new file mode 100755 index 0000000..ba59e0e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php @@ -0,0 +1,861 @@ +d = $this->V[$this->n - 1]; + // Householder reduction to tridiagonal form. + for ($i = $this->n - 1; $i > 0; --$i) { + $i_ = $i - 1; + // Scale to avoid under/overflow. + $h = $scale = 0.0; + $scale += array_sum(array_map('abs', $this->d)); + if ($scale == 0.0) { + $this->e[$i] = $this->d[$i_]; + $this->d = array_slice($this->V[$i_], 0, $i_); + for ($j = 0; $j < $i; ++$j) { + $this->V[$j][$i] = $this->V[$i][$j] = 0.0; + } + } else { + // Generate Householder vector. + for ($k = 0; $k < $i; ++$k) { + $this->d[$k] /= $scale; + $h += pow($this->d[$k], 2); + } + $f = $this->d[$i_]; + $g = sqrt($h); + if ($f > 0) { + $g = -$g; + } + $this->e[$i] = $scale * $g; + $h = $h - $f * $g; + $this->d[$i_] = $f - $g; + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] = 0.0; + } + // Apply similarity transformation to remaining columns. + for ($j = 0; $j < $i; ++$j) { + $f = $this->d[$j]; + $this->V[$j][$i] = $f; + $g = $this->e[$j] + $this->V[$j][$j] * $f; + for ($k = $j + 1; $k <= $i_; ++$k) { + $g += $this->V[$k][$j] * $this->d[$k]; + $this->e[$k] += $this->V[$k][$j] * $f; + } + $this->e[$j] = $g; + } + $f = 0.0; + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] /= $h; + $f += $this->e[$j] * $this->d[$j]; + } + $hh = $f / (2 * $h); + for ($j = 0; $j < $i; ++$j) { + $this->e[$j] -= $hh * $this->d[$j]; + } + for ($j = 0; $j < $i; ++$j) { + $f = $this->d[$j]; + $g = $this->e[$j]; + for ($k = $j; $k <= $i_; ++$k) { + $this->V[$k][$j] -= ($f * $this->e[$k] + $g * $this->d[$k]); + } + $this->d[$j] = $this->V[$i - 1][$j]; + $this->V[$i][$j] = 0.0; + } + } + $this->d[$i] = $h; + } + + // Accumulate transformations. + for ($i = 0; $i < $this->n - 1; ++$i) { + $this->V[$this->n - 1][$i] = $this->V[$i][$i]; + $this->V[$i][$i] = 1.0; + $h = $this->d[$i + 1]; + if ($h != 0.0) { + for ($k = 0; $k <= $i; ++$k) { + $this->d[$k] = $this->V[$k][$i + 1] / $h; + } + for ($j = 0; $j <= $i; ++$j) { + $g = 0.0; + for ($k = 0; $k <= $i; ++$k) { + $g += $this->V[$k][$i + 1] * $this->V[$k][$j]; + } + for ($k = 0; $k <= $i; ++$k) { + $this->V[$k][$j] -= $g * $this->d[$k]; + } + } + } + for ($k = 0; $k <= $i; ++$k) { + $this->V[$k][$i + 1] = 0.0; + } + } + + $this->d = $this->V[$this->n - 1]; + $this->V[$this->n - 1] = array_fill(0, $j, 0.0); + $this->V[$this->n - 1][$this->n - 1] = 1.0; + $this->e[0] = 0.0; + } + + /** + * Symmetric tridiagonal QL algorithm. + * + * This is derived from the Algol procedures tql2, by + * Bowdler, Martin, Reinsch, and Wilkinson, Handbook for + * Auto. Comp., Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutine in EISPACK. + */ + private function tql2() + { + for ($i = 1; $i < $this->n; ++$i) { + $this->e[$i - 1] = $this->e[$i]; + } + $this->e[$this->n - 1] = 0.0; + $f = 0.0; + $tst1 = 0.0; + $eps = pow(2.0, -52.0); + + for ($l = 0; $l < $this->n; ++$l) { + // Find small subdiagonal element + $tst1 = max($tst1, abs($this->d[$l]) + abs($this->e[$l])); + $m = $l; + while ($m < $this->n) { + if (abs($this->e[$m]) <= $eps * $tst1) { + break; + } + ++$m; + } + // If m == l, $this->d[l] is an eigenvalue, + // otherwise, iterate. + if ($m > $l) { + $iter = 0; + do { + // Could check iteration count here. + $iter += 1; + // Compute implicit shift + $g = $this->d[$l]; + $p = ($this->d[$l + 1] - $g) / (2.0 * $this->e[$l]); + $r = hypo($p, 1.0); + if ($p < 0) { + $r *= -1; + } + $this->d[$l] = $this->e[$l] / ($p + $r); + $this->d[$l + 1] = $this->e[$l] * ($p + $r); + $dl1 = $this->d[$l + 1]; + $h = $g - $this->d[$l]; + for ($i = $l + 2; $i < $this->n; ++$i) { + $this->d[$i] -= $h; + } + $f += $h; + // Implicit QL transformation. + $p = $this->d[$m]; + $c = 1.0; + $c2 = $c3 = $c; + $el1 = $this->e[$l + 1]; + $s = $s2 = 0.0; + for ($i = $m - 1; $i >= $l; --$i) { + $c3 = $c2; + $c2 = $c; + $s2 = $s; + $g = $c * $this->e[$i]; + $h = $c * $p; + $r = hypo($p, $this->e[$i]); + $this->e[$i + 1] = $s * $r; + $s = $this->e[$i] / $r; + $c = $p / $r; + $p = $c * $this->d[$i] - $s * $g; + $this->d[$i + 1] = $h + $s * ($c * $g + $s * $this->d[$i]); + // Accumulate transformation. + for ($k = 0; $k < $this->n; ++$k) { + $h = $this->V[$k][$i + 1]; + $this->V[$k][$i + 1] = $s * $this->V[$k][$i] + $c * $h; + $this->V[$k][$i] = $c * $this->V[$k][$i] - $s * $h; + } + } + $p = -$s * $s2 * $c3 * $el1 * $this->e[$l] / $dl1; + $this->e[$l] = $s * $p; + $this->d[$l] = $c * $p; + // Check for convergence. + } while (abs($this->e[$l]) > $eps * $tst1); + } + $this->d[$l] = $this->d[$l] + $f; + $this->e[$l] = 0.0; + } + + // Sort eigenvalues and corresponding vectors. + for ($i = 0; $i < $this->n - 1; ++$i) { + $k = $i; + $p = $this->d[$i]; + for ($j = $i + 1; $j < $this->n; ++$j) { + if ($this->d[$j] < $p) { + $k = $j; + $p = $this->d[$j]; + } + } + if ($k != $i) { + $this->d[$k] = $this->d[$i]; + $this->d[$i] = $p; + for ($j = 0; $j < $this->n; ++$j) { + $p = $this->V[$j][$i]; + $this->V[$j][$i] = $this->V[$j][$k]; + $this->V[$j][$k] = $p; + } + } + } + } + + /** + * Nonsymmetric reduction to Hessenberg form. + * + * This is derived from the Algol procedures orthes and ortran, + * by Martin and Wilkinson, Handbook for Auto. Comp., + * Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutines in EISPACK. + */ + private function orthes() + { + $low = 0; + $high = $this->n - 1; + + for ($m = $low + 1; $m <= $high - 1; ++$m) { + // Scale column. + $scale = 0.0; + for ($i = $m; $i <= $high; ++$i) { + $scale = $scale + abs($this->H[$i][$m - 1]); + } + if ($scale != 0.0) { + // Compute Householder transformation. + $h = 0.0; + for ($i = $high; $i >= $m; --$i) { + $this->ort[$i] = $this->H[$i][$m - 1] / $scale; + $h += $this->ort[$i] * $this->ort[$i]; + } + $g = sqrt($h); + if ($this->ort[$m] > 0) { + $g *= -1; + } + $h -= $this->ort[$m] * $g; + $this->ort[$m] -= $g; + // Apply Householder similarity transformation + // H = (I -u * u' / h) * H * (I -u * u') / h) + for ($j = $m; $j < $this->n; ++$j) { + $f = 0.0; + for ($i = $high; $i >= $m; --$i) { + $f += $this->ort[$i] * $this->H[$i][$j]; + } + $f /= $h; + for ($i = $m; $i <= $high; ++$i) { + $this->H[$i][$j] -= $f * $this->ort[$i]; + } + } + for ($i = 0; $i <= $high; ++$i) { + $f = 0.0; + for ($j = $high; $j >= $m; --$j) { + $f += $this->ort[$j] * $this->H[$i][$j]; + } + $f = $f / $h; + for ($j = $m; $j <= $high; ++$j) { + $this->H[$i][$j] -= $f * $this->ort[$j]; + } + } + $this->ort[$m] = $scale * $this->ort[$m]; + $this->H[$m][$m - 1] = $scale * $g; + } + } + + // Accumulate transformations (Algol's ortran). + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->V[$i][$j] = ($i == $j ? 1.0 : 0.0); + } + } + for ($m = $high - 1; $m >= $low + 1; --$m) { + if ($this->H[$m][$m - 1] != 0.0) { + for ($i = $m + 1; $i <= $high; ++$i) { + $this->ort[$i] = $this->H[$i][$m - 1]; + } + for ($j = $m; $j <= $high; ++$j) { + $g = 0.0; + for ($i = $m; $i <= $high; ++$i) { + $g += $this->ort[$i] * $this->V[$i][$j]; + } + // Double division avoids possible underflow + $g = ($g / $this->ort[$m]) / $this->H[$m][$m - 1]; + for ($i = $m; $i <= $high; ++$i) { + $this->V[$i][$j] += $g * $this->ort[$i]; + } + } + } + } + } + + /** + * Performs complex division. + * + * @param mixed $xr + * @param mixed $xi + * @param mixed $yr + * @param mixed $yi + */ + private function cdiv($xr, $xi, $yr, $yi) + { + if (abs($yr) > abs($yi)) { + $r = $yi / $yr; + $d = $yr + $r * $yi; + $this->cdivr = ($xr + $r * $xi) / $d; + $this->cdivi = ($xi - $r * $xr) / $d; + } else { + $r = $yr / $yi; + $d = $yi + $r * $yr; + $this->cdivr = ($r * $xr + $xi) / $d; + $this->cdivi = ($r * $xi - $xr) / $d; + } + } + + /** + * Nonsymmetric reduction from Hessenberg to real Schur form. + * + * Code is derived from the Algol procedure hqr2, + * by Martin and Wilkinson, Handbook for Auto. Comp., + * Vol.ii-Linear Algebra, and the corresponding + * Fortran subroutine in EISPACK. + */ + private function hqr2() + { + // Initialize + $nn = $this->n; + $n = $nn - 1; + $low = 0; + $high = $nn - 1; + $eps = pow(2.0, -52.0); + $exshift = 0.0; + $p = $q = $r = $s = $z = 0; + // Store roots isolated by balanc and compute matrix norm + $norm = 0.0; + + for ($i = 0; $i < $nn; ++$i) { + if (($i < $low) or ($i > $high)) { + $this->d[$i] = $this->H[$i][$i]; + $this->e[$i] = 0.0; + } + for ($j = max($i - 1, 0); $j < $nn; ++$j) { + $norm = $norm + abs($this->H[$i][$j]); + } + } + + // Outer loop over eigenvalue index + $iter = 0; + while ($n >= $low) { + // Look for single small sub-diagonal element + $l = $n; + while ($l > $low) { + $s = abs($this->H[$l - 1][$l - 1]) + abs($this->H[$l][$l]); + if ($s == 0.0) { + $s = $norm; + } + if (abs($this->H[$l][$l - 1]) < $eps * $s) { + break; + } + --$l; + } + // Check for convergence + // One root found + if ($l == $n) { + $this->H[$n][$n] = $this->H[$n][$n] + $exshift; + $this->d[$n] = $this->H[$n][$n]; + $this->e[$n] = 0.0; + --$n; + $iter = 0; + // Two roots found + } elseif ($l == $n - 1) { + $w = $this->H[$n][$n - 1] * $this->H[$n - 1][$n]; + $p = ($this->H[$n - 1][$n - 1] - $this->H[$n][$n]) / 2.0; + $q = $p * $p + $w; + $z = sqrt(abs($q)); + $this->H[$n][$n] = $this->H[$n][$n] + $exshift; + $this->H[$n - 1][$n - 1] = $this->H[$n - 1][$n - 1] + $exshift; + $x = $this->H[$n][$n]; + // Real pair + if ($q >= 0) { + if ($p >= 0) { + $z = $p + $z; + } else { + $z = $p - $z; + } + $this->d[$n - 1] = $x + $z; + $this->d[$n] = $this->d[$n - 1]; + if ($z != 0.0) { + $this->d[$n] = $x - $w / $z; + } + $this->e[$n - 1] = 0.0; + $this->e[$n] = 0.0; + $x = $this->H[$n][$n - 1]; + $s = abs($x) + abs($z); + $p = $x / $s; + $q = $z / $s; + $r = sqrt($p * $p + $q * $q); + $p = $p / $r; + $q = $q / $r; + // Row modification + for ($j = $n - 1; $j < $nn; ++$j) { + $z = $this->H[$n - 1][$j]; + $this->H[$n - 1][$j] = $q * $z + $p * $this->H[$n][$j]; + $this->H[$n][$j] = $q * $this->H[$n][$j] - $p * $z; + } + // Column modification + for ($i = 0; $i <= $n; ++$i) { + $z = $this->H[$i][$n - 1]; + $this->H[$i][$n - 1] = $q * $z + $p * $this->H[$i][$n]; + $this->H[$i][$n] = $q * $this->H[$i][$n] - $p * $z; + } + // Accumulate transformations + for ($i = $low; $i <= $high; ++$i) { + $z = $this->V[$i][$n - 1]; + $this->V[$i][$n - 1] = $q * $z + $p * $this->V[$i][$n]; + $this->V[$i][$n] = $q * $this->V[$i][$n] - $p * $z; + } + // Complex pair + } else { + $this->d[$n - 1] = $x + $p; + $this->d[$n] = $x + $p; + $this->e[$n - 1] = $z; + $this->e[$n] = -$z; + } + $n = $n - 2; + $iter = 0; + // No convergence yet + } else { + // Form shift + $x = $this->H[$n][$n]; + $y = 0.0; + $w = 0.0; + if ($l < $n) { + $y = $this->H[$n - 1][$n - 1]; + $w = $this->H[$n][$n - 1] * $this->H[$n - 1][$n]; + } + // Wilkinson's original ad hoc shift + if ($iter == 10) { + $exshift += $x; + for ($i = $low; $i <= $n; ++$i) { + $this->H[$i][$i] -= $x; + } + $s = abs($this->H[$n][$n - 1]) + abs($this->H[$n - 1][$n - 2]); + $x = $y = 0.75 * $s; + $w = -0.4375 * $s * $s; + } + // MATLAB's new ad hoc shift + if ($iter == 30) { + $s = ($y - $x) / 2.0; + $s = $s * $s + $w; + if ($s > 0) { + $s = sqrt($s); + if ($y < $x) { + $s = -$s; + } + $s = $x - $w / (($y - $x) / 2.0 + $s); + for ($i = $low; $i <= $n; ++$i) { + $this->H[$i][$i] -= $s; + } + $exshift += $s; + $x = $y = $w = 0.964; + } + } + // Could check iteration count here. + $iter = $iter + 1; + // Look for two consecutive small sub-diagonal elements + $m = $n - 2; + while ($m >= $l) { + $z = $this->H[$m][$m]; + $r = $x - $z; + $s = $y - $z; + $p = ($r * $s - $w) / $this->H[$m + 1][$m] + $this->H[$m][$m + 1]; + $q = $this->H[$m + 1][$m + 1] - $z - $r - $s; + $r = $this->H[$m + 2][$m + 1]; + $s = abs($p) + abs($q) + abs($r); + $p = $p / $s; + $q = $q / $s; + $r = $r / $s; + if ($m == $l) { + break; + } + if (abs($this->H[$m][$m - 1]) * (abs($q) + abs($r)) < + $eps * (abs($p) * (abs($this->H[$m - 1][$m - 1]) + abs($z) + abs($this->H[$m + 1][$m + 1])))) { + break; + } + --$m; + } + for ($i = $m + 2; $i <= $n; ++$i) { + $this->H[$i][$i - 2] = 0.0; + if ($i > $m + 2) { + $this->H[$i][$i - 3] = 0.0; + } + } + // Double QR step involving rows l:n and columns m:n + for ($k = $m; $k <= $n - 1; ++$k) { + $notlast = ($k != $n - 1); + if ($k != $m) { + $p = $this->H[$k][$k - 1]; + $q = $this->H[$k + 1][$k - 1]; + $r = ($notlast ? $this->H[$k + 2][$k - 1] : 0.0); + $x = abs($p) + abs($q) + abs($r); + if ($x != 0.0) { + $p = $p / $x; + $q = $q / $x; + $r = $r / $x; + } + } + if ($x == 0.0) { + break; + } + $s = sqrt($p * $p + $q * $q + $r * $r); + if ($p < 0) { + $s = -$s; + } + if ($s != 0) { + if ($k != $m) { + $this->H[$k][$k - 1] = -$s * $x; + } elseif ($l != $m) { + $this->H[$k][$k - 1] = -$this->H[$k][$k - 1]; + } + $p = $p + $s; + $x = $p / $s; + $y = $q / $s; + $z = $r / $s; + $q = $q / $p; + $r = $r / $p; + // Row modification + for ($j = $k; $j < $nn; ++$j) { + $p = $this->H[$k][$j] + $q * $this->H[$k + 1][$j]; + if ($notlast) { + $p = $p + $r * $this->H[$k + 2][$j]; + $this->H[$k + 2][$j] = $this->H[$k + 2][$j] - $p * $z; + } + $this->H[$k][$j] = $this->H[$k][$j] - $p * $x; + $this->H[$k + 1][$j] = $this->H[$k + 1][$j] - $p * $y; + } + // Column modification + $iMax = min($n, $k + 3); + for ($i = 0; $i <= $iMax; ++$i) { + $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k + 1]; + if ($notlast) { + $p = $p + $z * $this->H[$i][$k + 2]; + $this->H[$i][$k + 2] = $this->H[$i][$k + 2] - $p * $r; + } + $this->H[$i][$k] = $this->H[$i][$k] - $p; + $this->H[$i][$k + 1] = $this->H[$i][$k + 1] - $p * $q; + } + // Accumulate transformations + for ($i = $low; $i <= $high; ++$i) { + $p = $x * $this->V[$i][$k] + $y * $this->V[$i][$k + 1]; + if ($notlast) { + $p = $p + $z * $this->V[$i][$k + 2]; + $this->V[$i][$k + 2] = $this->V[$i][$k + 2] - $p * $r; + } + $this->V[$i][$k] = $this->V[$i][$k] - $p; + $this->V[$i][$k + 1] = $this->V[$i][$k + 1] - $p * $q; + } + } // ($s != 0) + } // k loop + } // check convergence + } // while ($n >= $low) + + // Backsubstitute to find vectors of upper triangular form + if ($norm == 0.0) { + return; + } + + for ($n = $nn - 1; $n >= 0; --$n) { + $p = $this->d[$n]; + $q = $this->e[$n]; + // Real vector + if ($q == 0) { + $l = $n; + $this->H[$n][$n] = 1.0; + for ($i = $n - 1; $i >= 0; --$i) { + $w = $this->H[$i][$i] - $p; + $r = 0.0; + for ($j = $l; $j <= $n; ++$j) { + $r = $r + $this->H[$i][$j] * $this->H[$j][$n]; + } + if ($this->e[$i] < 0.0) { + $z = $w; + $s = $r; + } else { + $l = $i; + if ($this->e[$i] == 0.0) { + if ($w != 0.0) { + $this->H[$i][$n] = -$r / $w; + } else { + $this->H[$i][$n] = -$r / ($eps * $norm); + } + // Solve real equations + } else { + $x = $this->H[$i][$i + 1]; + $y = $this->H[$i + 1][$i]; + $q = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i]; + $t = ($x * $s - $z * $r) / $q; + $this->H[$i][$n] = $t; + if (abs($x) > abs($z)) { + $this->H[$i + 1][$n] = (-$r - $w * $t) / $x; + } else { + $this->H[$i + 1][$n] = (-$s - $y * $t) / $z; + } + } + // Overflow control + $t = abs($this->H[$i][$n]); + if (($eps * $t) * $t > 1) { + for ($j = $i; $j <= $n; ++$j) { + $this->H[$j][$n] = $this->H[$j][$n] / $t; + } + } + } + } + // Complex vector + } elseif ($q < 0) { + $l = $n - 1; + // Last vector component imaginary so matrix is triangular + if (abs($this->H[$n][$n - 1]) > abs($this->H[$n - 1][$n])) { + $this->H[$n - 1][$n - 1] = $q / $this->H[$n][$n - 1]; + $this->H[$n - 1][$n] = -($this->H[$n][$n] - $p) / $this->H[$n][$n - 1]; + } else { + $this->cdiv(0.0, -$this->H[$n - 1][$n], $this->H[$n - 1][$n - 1] - $p, $q); + $this->H[$n - 1][$n - 1] = $this->cdivr; + $this->H[$n - 1][$n] = $this->cdivi; + } + $this->H[$n][$n - 1] = 0.0; + $this->H[$n][$n] = 1.0; + for ($i = $n - 2; $i >= 0; --$i) { + // double ra,sa,vr,vi; + $ra = 0.0; + $sa = 0.0; + for ($j = $l; $j <= $n; ++$j) { + $ra = $ra + $this->H[$i][$j] * $this->H[$j][$n - 1]; + $sa = $sa + $this->H[$i][$j] * $this->H[$j][$n]; + } + $w = $this->H[$i][$i] - $p; + if ($this->e[$i] < 0.0) { + $z = $w; + $r = $ra; + $s = $sa; + } else { + $l = $i; + if ($this->e[$i] == 0) { + $this->cdiv(-$ra, -$sa, $w, $q); + $this->H[$i][$n - 1] = $this->cdivr; + $this->H[$i][$n] = $this->cdivi; + } else { + // Solve complex equations + $x = $this->H[$i][$i + 1]; + $y = $this->H[$i + 1][$i]; + $vr = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i] - $q * $q; + $vi = ($this->d[$i] - $p) * 2.0 * $q; + if ($vr == 0.0 & $vi == 0.0) { + $vr = $eps * $norm * (abs($w) + abs($q) + abs($x) + abs($y) + abs($z)); + } + $this->cdiv($x * $r - $z * $ra + $q * $sa, $x * $s - $z * $sa - $q * $ra, $vr, $vi); + $this->H[$i][$n - 1] = $this->cdivr; + $this->H[$i][$n] = $this->cdivi; + if (abs($x) > (abs($z) + abs($q))) { + $this->H[$i + 1][$n - 1] = (-$ra - $w * $this->H[$i][$n - 1] + $q * $this->H[$i][$n]) / $x; + $this->H[$i + 1][$n] = (-$sa - $w * $this->H[$i][$n] - $q * $this->H[$i][$n - 1]) / $x; + } else { + $this->cdiv(-$r - $y * $this->H[$i][$n - 1], -$s - $y * $this->H[$i][$n], $z, $q); + $this->H[$i + 1][$n - 1] = $this->cdivr; + $this->H[$i + 1][$n] = $this->cdivi; + } + } + // Overflow control + $t = max(abs($this->H[$i][$n - 1]), abs($this->H[$i][$n])); + if (($eps * $t) * $t > 1) { + for ($j = $i; $j <= $n; ++$j) { + $this->H[$j][$n - 1] = $this->H[$j][$n - 1] / $t; + $this->H[$j][$n] = $this->H[$j][$n] / $t; + } + } + } // end else + } // end for + } // end else for complex case + } // end for + + // Vectors of isolated roots + for ($i = 0; $i < $nn; ++$i) { + if ($i < $low | $i > $high) { + for ($j = $i; $j < $nn; ++$j) { + $this->V[$i][$j] = $this->H[$i][$j]; + } + } + } + + // Back transformation to get eigenvectors of original matrix + for ($j = $nn - 1; $j >= $low; --$j) { + for ($i = $low; $i <= $high; ++$i) { + $z = 0.0; + $kMax = min($j, $high); + for ($k = $low; $k <= $kMax; ++$k) { + $z = $z + $this->V[$i][$k] * $this->H[$k][$j]; + } + $this->V[$i][$j] = $z; + } + } + } + + // end hqr2 + + /** + * Constructor: Check for symmetry, then construct the eigenvalue decomposition. + * + * @param mixed $Arg A Square matrix + */ + public function __construct($Arg) + { + $this->A = $Arg->getArray(); + $this->n = $Arg->getColumnDimension(); + + $issymmetric = true; + for ($j = 0; ($j < $this->n) & $issymmetric; ++$j) { + for ($i = 0; ($i < $this->n) & $issymmetric; ++$i) { + $issymmetric = ($this->A[$i][$j] == $this->A[$j][$i]); + } + } + + if ($issymmetric) { + $this->V = $this->A; + // Tridiagonalize. + $this->tred2(); + // Diagonalize. + $this->tql2(); + } else { + $this->H = $this->A; + $this->ort = []; + // Reduce to Hessenberg form. + $this->orthes(); + // Reduce Hessenberg to real Schur form. + $this->hqr2(); + } + } + + /** + * Return the eigenvector matrix. + * + * @return Matrix V + */ + public function getV() + { + return new Matrix($this->V, $this->n, $this->n); + } + + /** + * Return the real parts of the eigenvalues. + * + * @return array real(diag(D)) + */ + public function getRealEigenvalues() + { + return $this->d; + } + + /** + * Return the imaginary parts of the eigenvalues. + * + * @return array imag(diag(D)) + */ + public function getImagEigenvalues() + { + return $this->e; + } + + /** + * Return the block diagonal eigenvalue matrix. + * + * @return Matrix D + */ + public function getD() + { + for ($i = 0; $i < $this->n; ++$i) { + $D[$i] = array_fill(0, $this->n, 0.0); + $D[$i][$i] = $this->d[$i]; + if ($this->e[$i] == 0) { + continue; + } + $o = ($this->e[$i] > 0) ? $i + 1 : $i - 1; + $D[$i][$o] = $this->e[$i]; + } + + return new Matrix($D); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php new file mode 100755 index 0000000..bb2b4b0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php @@ -0,0 +1,285 @@ += n, the LU decomposition is an m-by-n + * unit lower triangular matrix L, an n-by-n upper triangular matrix U, + * and a permutation vector piv of length m so that A(piv,:) = L*U. + * If m < n, then L is m-by-m and U is m-by-n. + * + * The LU decompostion with pivoting always exists, even if the matrix is + * singular, so the constructor will never fail. The primary use of the + * LU decomposition is in the solution of square systems of simultaneous + * linear equations. This will fail if isNonsingular() returns false. + * + * @author Paul Meagher + * @author Bartosz Matosiuk + * @author Michael Bommarito + * + * @version 1.1 + */ +class LUDecomposition +{ + const MATRIX_SINGULAR_EXCEPTION = 'Can only perform operation on singular matrix.'; + const MATRIX_SQUARE_EXCEPTION = 'Mismatched Row dimension'; + + /** + * Decomposition storage. + * + * @var array + */ + private $LU = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Pivot sign. + * + * @var int + */ + private $pivsign; + + /** + * Internal storage of pivot vector. + * + * @var array + */ + private $piv = []; + + /** + * LU Decomposition constructor. + * + * @param Matrix $A Rectangular matrix + */ + public function __construct($A) + { + if ($A instanceof Matrix) { + // Use a "left-looking", dot-product, Crout/Doolittle algorithm. + $this->LU = $A->getArray(); + $this->m = $A->getRowDimension(); + $this->n = $A->getColumnDimension(); + for ($i = 0; $i < $this->m; ++$i) { + $this->piv[$i] = $i; + } + $this->pivsign = 1; + $LUrowi = $LUcolj = []; + + // Outer loop. + for ($j = 0; $j < $this->n; ++$j) { + // Make a copy of the j-th column to localize references. + for ($i = 0; $i < $this->m; ++$i) { + $LUcolj[$i] = &$this->LU[$i][$j]; + } + // Apply previous transformations. + for ($i = 0; $i < $this->m; ++$i) { + $LUrowi = $this->LU[$i]; + // Most of the time is spent in the following dot product. + $kmax = min($i, $j); + $s = 0.0; + for ($k = 0; $k < $kmax; ++$k) { + $s += $LUrowi[$k] * $LUcolj[$k]; + } + $LUrowi[$j] = $LUcolj[$i] -= $s; + } + // Find pivot and exchange if necessary. + $p = $j; + for ($i = $j + 1; $i < $this->m; ++$i) { + if (abs($LUcolj[$i]) > abs($LUcolj[$p])) { + $p = $i; + } + } + if ($p != $j) { + for ($k = 0; $k < $this->n; ++$k) { + $t = $this->LU[$p][$k]; + $this->LU[$p][$k] = $this->LU[$j][$k]; + $this->LU[$j][$k] = $t; + } + $k = $this->piv[$p]; + $this->piv[$p] = $this->piv[$j]; + $this->piv[$j] = $k; + $this->pivsign = $this->pivsign * -1; + } + // Compute multipliers. + if (($j < $this->m) && ($this->LU[$j][$j] != 0.0)) { + for ($i = $j + 1; $i < $this->m; ++$i) { + $this->LU[$i][$j] /= $this->LU[$j][$j]; + } + } + } + } else { + throw new CalculationException(Matrix::ARGUMENT_TYPE_EXCEPTION); + } + } + + // function __construct() + + /** + * Get lower triangular factor. + * + * @return Matrix Lower triangular factor + */ + public function getL() + { + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i > $j) { + $L[$i][$j] = $this->LU[$i][$j]; + } elseif ($i == $j) { + $L[$i][$j] = 1.0; + } else { + $L[$i][$j] = 0.0; + } + } + } + + return new Matrix($L); + } + + // function getL() + + /** + * Get upper triangular factor. + * + * @return Matrix Upper triangular factor + */ + public function getU() + { + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i <= $j) { + $U[$i][$j] = $this->LU[$i][$j]; + } else { + $U[$i][$j] = 0.0; + } + } + } + + return new Matrix($U); + } + + // function getU() + + /** + * Return pivot permutation vector. + * + * @return array Pivot vector + */ + public function getPivot() + { + return $this->piv; + } + + // function getPivot() + + /** + * Alias for getPivot. + * + * @see getPivot + */ + public function getDoublePivot() + { + return $this->getPivot(); + } + + // function getDoublePivot() + + /** + * Is the matrix nonsingular? + * + * @return bool true if U, and hence A, is nonsingular + */ + public function isNonsingular() + { + for ($j = 0; $j < $this->n; ++$j) { + if ($this->LU[$j][$j] == 0) { + return false; + } + } + + return true; + } + + // function isNonsingular() + + /** + * Count determinants. + * + * @return array d matrix deterninat + */ + public function det() + { + if ($this->m == $this->n) { + $d = $this->pivsign; + for ($j = 0; $j < $this->n; ++$j) { + $d *= $this->LU[$j][$j]; + } + + return $d; + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } + + // function det() + + /** + * Solve A*X = B. + * + * @param mixed $B a Matrix with as many rows as A and any number of columns + * + * @throws CalculationException illegalArgumentException Matrix row dimensions must agree + * @throws CalculationException runtimeException Matrix is singular + * + * @return Matrix X so that L*U*X = B(piv,:) + */ + public function solve($B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isNonsingular()) { + // Copy right hand side with pivoting + $nx = $B->getColumnDimension(); + $X = $B->getMatrix($this->piv, 0, $nx - 1); + // Solve L*Y = B(piv,:) + for ($k = 0; $k < $this->n; ++$k) { + for ($i = $k + 1; $i < $this->n; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; + } + } + } + // Solve U*X = Y; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$k][$j] /= $this->LU[$k][$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; + } + } + } + + return $X; + } + + throw new CalculationException(self::MATRIX_SINGULAR_EXCEPTION); + } + + throw new CalculationException(self::MATRIX_SQUARE_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/Matrix.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/Matrix.php new file mode 100755 index 0000000..b3d82d4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/Matrix.php @@ -0,0 +1,1233 @@ + 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + //Rectangular matrix - m x n initialized from 2D array + case 'array': + $this->m = count($args[0]); + $this->n = count($args[0][0]); + $this->A = $args[0]; + + break; + //Square matrix - n x n + case 'integer': + $this->m = $args[0]; + $this->n = $args[0]; + $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); + + break; + //Rectangular matrix - m x n + case 'integer,integer': + $this->m = $args[0]; + $this->n = $args[1]; + $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); + + break; + //Rectangular matrix - m x n initialized from packed array + case 'array,integer': + $this->m = $args[1]; + if ($this->m != 0) { + $this->n = count($args[0]) / $this->m; + } else { + $this->n = 0; + } + if (($this->m * $this->n) == count($args[0])) { + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $args[0][$i + $j * $this->m]; + } + } + } else { + throw new CalculationException(self::ARRAY_LENGTH_EXCEPTION); + } + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * getArray. + * + * @return array Matrix array + */ + public function getArray() + { + return $this->A; + } + + /** + * getRowDimension. + * + * @return int Row dimension + */ + public function getRowDimension() + { + return $this->m; + } + + /** + * getColumnDimension. + * + * @return int Column dimension + */ + public function getColumnDimension() + { + return $this->n; + } + + /** + * get. + * + * Get the i,j-th element of the matrix. + * + * @param int $i Row position + * @param int $j Column position + * + * @return mixed Element (int/float/double) + */ + public function get($i = null, $j = null) + { + return $this->A[$i][$j]; + } + + /** + * getMatrix. + * + * Get a submatrix + * + * @param int $i0 Initial row index + * @param int $iF Final row index + * @param int $j0 Initial column index + * @param int $jF Final column index + * + * @return Matrix Submatrix + */ + public function getMatrix(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + //A($i0...; $j0...) + case 'integer,integer': + list($i0, $j0) = $args; + if ($i0 >= 0) { + $m = $this->m - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if ($j0 >= 0) { + $n = $this->n - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = $i0; $i < $this->m; ++$i) { + for ($j = $j0; $j < $this->n; ++$j) { + $R->set($i, $j, $this->A[$i][$j]); + } + } + + return $R; + + break; + //A($i0...$iF; $j0...$jF) + case 'integer,integer,integer,integer': + list($i0, $iF, $j0, $jF) = $args; + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { + $m = $iF - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { + $n = $jF - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m + 1, $n + 1); + for ($i = $i0; $i <= $iF; ++$i) { + for ($j = $j0; $j <= $jF; ++$j) { + $R->set($i - $i0, $j - $j0, $this->A[$i][$j]); + } + } + + return $R; + + break; + //$R = array of row indices; $C = array of column indices + case 'array,array': + list($RL, $CL) = $args; + if (count($RL) > 0) { + $m = count($RL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (count($CL) > 0) { + $n = count($CL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = 0; $i < $m; ++$i) { + for ($j = 0; $j < $n; ++$j) { + $R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]); + } + } + + return $R; + + break; + //A($i0...$iF); $CL = array of column indices + case 'integer,integer,array': + list($i0, $iF, $CL) = $args; + if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { + $m = $iF - $i0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (count($CL) > 0) { + $n = count($CL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n); + for ($i = $i0; $i < $iF; ++$i) { + for ($j = 0; $j < $n; ++$j) { + $R->set($i - $i0, $j, $this->A[$i][$CL[$j]]); + } + } + + return $R; + + break; + //$RL = array of row indices + case 'array,integer,integer': + list($RL, $j0, $jF) = $args; + if (count($RL) > 0) { + $m = count($RL); + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { + $n = $jF - $j0; + } else { + throw new CalculationException(self::ARGUMENT_BOUNDS_EXCEPTION); + } + $R = new self($m, $n + 1); + for ($i = 0; $i < $m; ++$i) { + for ($j = $j0; $j <= $jF; ++$j) { + $R->set($i, $j - $j0, $this->A[$RL[$i]][$j]); + } + } + + return $R; + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * checkMatrixDimensions. + * + * Is matrix B the same size? + * + * @param Matrix $B Matrix B + * + * @return bool + */ + public function checkMatrixDimensions($B = null) + { + if ($B instanceof self) { + if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) { + return true; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + // function checkMatrixDimensions() + + /** + * set. + * + * Set the i,j-th element of the matrix. + * + * @param int $i Row position + * @param int $j Column position + * @param mixed $c Int/float/double value + * + * @return mixed Element (int/float/double) + */ + public function set($i = null, $j = null, $c = null) + { + // Optimized set version just has this + $this->A[$i][$j] = $c; + } + + // function set() + + /** + * identity. + * + * Generate an identity matrix. + * + * @param int $m Row dimension + * @param int $n Column dimension + * + * @return Matrix Identity matrix + */ + public function identity($m = null, $n = null) + { + return $this->diagonal($m, $n, 1); + } + + /** + * diagonal. + * + * Generate a diagonal matrix + * + * @param int $m Row dimension + * @param int $n Column dimension + * @param mixed $c Diagonal value + * + * @return Matrix Diagonal matrix + */ + public function diagonal($m = null, $n = null, $c = 1) + { + $R = new self($m, $n); + for ($i = 0; $i < $m; ++$i) { + $R->set($i, $i, $c); + } + + return $R; + } + + /** + * getMatrixByRow. + * + * Get a submatrix by row index/range + * + * @param int $i0 Initial row index + * @param int $iF Final row index + * + * @return Matrix Submatrix + */ + public function getMatrixByRow($i0 = null, $iF = null) + { + if (is_int($i0)) { + if (is_int($iF)) { + return $this->getMatrix($i0, 0, $iF + 1, $this->n); + } + + return $this->getMatrix($i0, 0, $i0 + 1, $this->n); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + /** + * getMatrixByCol. + * + * Get a submatrix by column index/range + * + * @param int $j0 Initial column index + * @param int $jF Final column index + * + * @return Matrix Submatrix + */ + public function getMatrixByCol($j0 = null, $jF = null) + { + if (is_int($j0)) { + if (is_int($jF)) { + return $this->getMatrix(0, $j0, $this->m, $jF + 1); + } + + return $this->getMatrix(0, $j0, $this->m, $j0 + 1); + } + + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + /** + * transpose. + * + * Tranpose matrix + * + * @return Matrix Transposed matrix + */ + public function transpose() + { + $R = new self($this->n, $this->m); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $R->set($j, $i, $this->A[$i][$j]); + } + } + + return $R; + } + + // function transpose() + + /** + * trace. + * + * Sum of diagonal elements + * + * @return float Sum of diagonal elements + */ + public function trace() + { + $s = 0; + $n = min($this->m, $this->n); + for ($i = 0; $i < $n; ++$i) { + $s += $this->A[$i][$i]; + } + + return $s; + } + + /** + * uminus. + * + * Unary minus matrix -A + * + * @return Matrix Unary minus matrix + */ + public function uminus() + { + } + + /** + * plus. + * + * A + B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function plus(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) + $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * plusEquals. + * + * A = A + B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function plusEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] += $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * minus. + * + * A - B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function minus(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) - $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * minusEquals. + * + * A = A - B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function minusEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] -= $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayTimes. + * + * Element-by-element multiplication + * Cij = Aij * Bij + * + * @param mixed $B Matrix/Array + * + * @return Matrix Matrix Cij + */ + public function arrayTimes(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) * $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayTimesEquals. + * + * Element-by-element multiplication + * Aij = Aij * Bij + * + * @param mixed $B Matrix/Array + * + * @return Matrix Matrix Aij + */ + public function arrayTimesEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] *= $value; + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayRightDivide. + * + * Element-by-element right division + * A / B + * + * @param Matrix $B Matrix B + * + * @return Matrix Division result + */ + public function arrayRightDivide(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + if ($value == 0) { + // Trap for Divide by Zero error + $M->set($i, $j, '#DIV/0!'); + } else { + $M->set($i, $j, $this->A[$i][$j] / $value); + } + } else { + $M->set($i, $j, Functions::NAN()); + } + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayRightDivideEquals. + * + * Element-by-element right division + * Aij = Aij / Bij + * + * @param mixed $B Matrix/Array + * + * @return Matrix Matrix Aij + */ + public function arrayRightDivideEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $this->A[$i][$j] / $M->get($i, $j); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayLeftDivide. + * + * Element-by-element Left division + * A / B + * + * @param Matrix $B Matrix B + * + * @return Matrix Division result + */ + public function arrayLeftDivide(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $M->set($i, $j, $M->get($i, $j) / $this->A[$i][$j]); + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * arrayLeftDivideEquals. + * + * Element-by-element Left division + * Aij = Aij / Bij + * + * @param mixed $B Matrix/Array + * + * @return Matrix Matrix Aij + */ + public function arrayLeftDivideEquals(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = $M->get($i, $j) / $this->A[$i][$j]; + } + } + + return $M; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * times. + * + * Matrix multiplication + * + * @param mixed $n Matrix/Array/Scalar + * + * @return Matrix Product + */ + public function times(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $B = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + if ($this->n == $B->m) { + $C = new self($this->m, $B->n); + for ($j = 0; $j < $B->n; ++$j) { + $Bcolj = []; + for ($k = 0; $k < $this->n; ++$k) { + $Bcolj[$k] = $B->A[$k][$j]; + } + for ($i = 0; $i < $this->m; ++$i) { + $Arowi = $this->A[$i]; + $s = 0; + for ($k = 0; $k < $this->n; ++$k) { + $s += $Arowi[$k] * $Bcolj[$k]; + } + $C->A[$i][$j] = $s; + } + } + + return $C; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + case 'array': + $B = new self($args[0]); + if ($this->n == $B->m) { + $C = new self($this->m, $B->n); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $s = '0'; + for ($k = 0; $k < $C->n; ++$k) { + $s += $this->A[$i][$k] * $B->A[$k][$j]; + } + $C->A[$i][$j] = $s; + } + } + + return $C; + } + + throw new CalculationException(self::MATRIX_DIMENSION_EXCEPTION); + case 'integer': + $C = new self($this->A); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] *= $args[0]; + } + } + + return $C; + case 'double': + $C = new self($this->m, $this->n); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] = $args[0] * $this->A[$i][$j]; + } + } + + return $C; + case 'float': + $C = new self($this->A); + for ($i = 0; $i < $C->m; ++$i) { + for ($j = 0; $j < $C->n; ++$j) { + $C->A[$i][$j] *= $args[0]; + } + } + + return $C; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } else { + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + } + + /** + * power. + * + * A = A ^ B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function power(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $validValues = true; + $value = $M->get($i, $j); + if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"'); + $validValues &= StringHelper::convertToNumberIfFraction($this->A[$i][$j]); + } + if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { + $value = trim($value, '"'); + $validValues &= StringHelper::convertToNumberIfFraction($value); + } + if ($validValues) { + $this->A[$i][$j] = pow($this->A[$i][$j], $value); + } else { + $this->A[$i][$j] = Functions::NAN(); + } + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * concat. + * + * A = A & B + * + * @param mixed $B Matrix/Array + * + * @return Matrix Sum + */ + public function concat(...$args) + { + if (count($args) > 0) { + $match = implode(',', array_map('gettype', $args)); + + switch ($match) { + case 'object': + if ($args[0] instanceof self) { + $M = $args[0]; + } else { + throw new CalculationException(self::ARGUMENT_TYPE_EXCEPTION); + } + + break; + case 'array': + $M = new self($args[0]); + + break; + default: + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + + break; + } + $this->checkMatrixDimensions($M); + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $this->A[$i][$j] = trim($this->A[$i][$j], '"') . trim($M->get($i, $j), '"'); + } + } + + return $this; + } + + throw new CalculationException(self::POLYMORPHIC_ARGUMENT_EXCEPTION); + } + + /** + * Solve A*X = B. + * + * @param Matrix $B Right hand side + * + * @return Matrix ... Solution if A is square, least squares solution otherwise + */ + public function solve($B) + { + if ($this->m == $this->n) { + $LU = new LUDecomposition($this); + + return $LU->solve($B); + } + $QR = new QRDecomposition($this); + + return $QR->solve($B); + } + + /** + * Matrix inverse or pseudoinverse. + * + * @return Matrix ... Inverse(A) if A is square, pseudoinverse otherwise. + */ + public function inverse() + { + return $this->solve($this->identity($this->m, $this->m)); + } + + /** + * det. + * + * Calculate determinant + * + * @return float Determinant + */ + public function det() + { + $L = new LUDecomposition($this); + + return $L->det(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php new file mode 100755 index 0000000..e666d74 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php @@ -0,0 +1,249 @@ += n, the QR decomposition is an m-by-n + * orthogonal matrix Q and an n-by-n upper triangular matrix R so that + * A = Q*R. + * + * The QR decompostion always exists, even if the matrix does not have + * full rank, so the constructor will never fail. The primary use of the + * QR decomposition is in the least squares solution of nonsquare systems + * of simultaneous linear equations. This will fail if isFullRank() + * returns false. + * + * @author Paul Meagher + * + * @version 1.1 + */ +class QRDecomposition +{ + const MATRIX_RANK_EXCEPTION = 'Can only perform operation on full-rank matrix.'; + + /** + * Array for internal storage of decomposition. + * + * @var array + */ + private $QR = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Array for internal storage of diagonal of R. + * + * @var array + */ + private $Rdiag = []; + + /** + * QR Decomposition computed by Householder reflections. + * + * @param matrix $A Rectangular matrix + */ + public function __construct($A) + { + if ($A instanceof Matrix) { + // Initialize. + $this->QR = $A->getArrayCopy(); + $this->m = $A->getRowDimension(); + $this->n = $A->getColumnDimension(); + // Main loop. + for ($k = 0; $k < $this->n; ++$k) { + // Compute 2-norm of k-th column without under/overflow. + $nrm = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $nrm = hypo($nrm, $this->QR[$i][$k]); + } + if ($nrm != 0.0) { + // Form k-th Householder vector. + if ($this->QR[$k][$k] < 0) { + $nrm = -$nrm; + } + for ($i = $k; $i < $this->m; ++$i) { + $this->QR[$i][$k] /= $nrm; + } + $this->QR[$k][$k] += 1.0; + // Apply transformation to remaining columns. + for ($j = $k + 1; $j < $this->n; ++$j) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $this->QR[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $this->QR[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + $this->Rdiag[$k] = -$nrm; + } + } else { + throw new CalculationException(Matrix::ARGUMENT_TYPE_EXCEPTION); + } + } + + // function __construct() + + /** + * Is the matrix full rank? + * + * @return bool true if R, and hence A, has full rank, else false + */ + public function isFullRank() + { + for ($j = 0; $j < $this->n; ++$j) { + if ($this->Rdiag[$j] == 0) { + return false; + } + } + + return true; + } + + // function isFullRank() + + /** + * Return the Householder vectors. + * + * @return Matrix Lower trapezoidal matrix whose columns define the reflections + */ + public function getH() + { + $H = []; + for ($i = 0; $i < $this->m; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i >= $j) { + $H[$i][$j] = $this->QR[$i][$j]; + } else { + $H[$i][$j] = 0.0; + } + } + } + + return new Matrix($H); + } + + // function getH() + + /** + * Return the upper triangular factor. + * + * @return Matrix upper triangular factor + */ + public function getR() + { + $R = []; + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + if ($i < $j) { + $R[$i][$j] = $this->QR[$i][$j]; + } elseif ($i == $j) { + $R[$i][$j] = $this->Rdiag[$i]; + } else { + $R[$i][$j] = 0.0; + } + } + } + + return new Matrix($R); + } + + // function getR() + + /** + * Generate and return the (economy-sized) orthogonal factor. + * + * @return Matrix orthogonal factor + */ + public function getQ() + { + $Q = []; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($i = 0; $i < $this->m; ++$i) { + $Q[$i][$k] = 0.0; + } + $Q[$k][$k] = 1.0; + for ($j = $k; $j < $this->n; ++$j) { + if ($this->QR[$k][$k] != 0) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $Q[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $Q[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + } + + return new Matrix($Q); + } + + // function getQ() + + /** + * Least squares solution of A*X = B. + * + * @param Matrix $B a Matrix with as many rows as A and any number of columns + * + * @return Matrix matrix that minimizes the two norm of Q*R*X-B + */ + public function solve($B) + { + if ($B->getRowDimension() == $this->m) { + if ($this->isFullRank()) { + // Copy right hand side + $nx = $B->getColumnDimension(); + $X = $B->getArrayCopy(); + // Compute Y = transpose(Q)*B + for ($k = 0; $k < $this->n; ++$k) { + for ($j = 0; $j < $nx; ++$j) { + $s = 0.0; + for ($i = $k; $i < $this->m; ++$i) { + $s += $this->QR[$i][$k] * $X[$i][$j]; + } + $s = -$s / $this->QR[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $X[$i][$j] += $s * $this->QR[$i][$k]; + } + } + } + // Solve R*X = Y; + for ($k = $this->n - 1; $k >= 0; --$k) { + for ($j = 0; $j < $nx; ++$j) { + $X[$k][$j] /= $this->Rdiag[$k]; + } + for ($i = 0; $i < $k; ++$i) { + for ($j = 0; $j < $nx; ++$j) { + $X[$i][$j] -= $X[$k][$j] * $this->QR[$i][$k]; + } + } + } + $X = new Matrix($X); + + return $X->getMatrix(0, $this->n - 1, 0, $nx); + } + + throw new CalculationException(self::MATRIX_RANK_EXCEPTION); + } + + throw new CalculationException(Matrix::MATRIX_DIMENSION_EXCEPTION); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php new file mode 100755 index 0000000..3ca9561 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php @@ -0,0 +1,528 @@ += n, the singular value decomposition is + * an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and + * an n-by-n orthogonal matrix V so that A = U*S*V'. + * + * The singular values, sigma[$k] = S[$k][$k], are ordered so that + * sigma[0] >= sigma[1] >= ... >= sigma[n-1]. + * + * The singular value decompostion always exists, so the constructor will + * never fail. The matrix condition number and the effective numerical + * rank can be computed from this decomposition. + * + * @author Paul Meagher + * + * @version 1.1 + */ +class SingularValueDecomposition +{ + /** + * Internal storage of U. + * + * @var array + */ + private $U = []; + + /** + * Internal storage of V. + * + * @var array + */ + private $V = []; + + /** + * Internal storage of singular values. + * + * @var array + */ + private $s = []; + + /** + * Row dimension. + * + * @var int + */ + private $m; + + /** + * Column dimension. + * + * @var int + */ + private $n; + + /** + * Construct the singular value decomposition. + * + * Derived from LINPACK code. + * + * @param mixed $Arg Rectangular matrix + */ + public function __construct($Arg) + { + // Initialize. + $A = $Arg->getArrayCopy(); + $this->m = $Arg->getRowDimension(); + $this->n = $Arg->getColumnDimension(); + $nu = min($this->m, $this->n); + $e = []; + $work = []; + $wantu = true; + $wantv = true; + $nct = min($this->m - 1, $this->n); + $nrt = max(0, min($this->n - 2, $this->m)); + + // Reduce A to bidiagonal form, storing the diagonal elements + // in s and the super-diagonal elements in e. + $kMax = max($nct, $nrt); + for ($k = 0; $k < $kMax; ++$k) { + if ($k < $nct) { + // Compute the transformation for the k-th column and + // place the k-th diagonal in s[$k]. + // Compute 2-norm of k-th column without under/overflow. + $this->s[$k] = 0; + for ($i = $k; $i < $this->m; ++$i) { + $this->s[$k] = hypo($this->s[$k], $A[$i][$k]); + } + if ($this->s[$k] != 0.0) { + if ($A[$k][$k] < 0.0) { + $this->s[$k] = -$this->s[$k]; + } + for ($i = $k; $i < $this->m; ++$i) { + $A[$i][$k] /= $this->s[$k]; + } + $A[$k][$k] += 1.0; + } + $this->s[$k] = -$this->s[$k]; + } + + for ($j = $k + 1; $j < $this->n; ++$j) { + if (($k < $nct) & ($this->s[$k] != 0.0)) { + // Apply the transformation. + $t = 0; + for ($i = $k; $i < $this->m; ++$i) { + $t += $A[$i][$k] * $A[$i][$j]; + } + $t = -$t / $A[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $A[$i][$j] += $t * $A[$i][$k]; + } + // Place the k-th row of A into e for the + // subsequent calculation of the row transformation. + $e[$j] = $A[$k][$j]; + } + } + + if ($wantu and ($k < $nct)) { + // Place the transformation in U for subsequent back + // multiplication. + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$k] = $A[$i][$k]; + } + } + + if ($k < $nrt) { + // Compute the k-th row transformation and place the + // k-th super-diagonal in e[$k]. + // Compute 2-norm without under/overflow. + $e[$k] = 0; + for ($i = $k + 1; $i < $this->n; ++$i) { + $e[$k] = hypo($e[$k], $e[$i]); + } + if ($e[$k] != 0.0) { + if ($e[$k + 1] < 0.0) { + $e[$k] = -$e[$k]; + } + for ($i = $k + 1; $i < $this->n; ++$i) { + $e[$i] /= $e[$k]; + } + $e[$k + 1] += 1.0; + } + $e[$k] = -$e[$k]; + if (($k + 1 < $this->m) and ($e[$k] != 0.0)) { + // Apply the transformation. + for ($i = $k + 1; $i < $this->m; ++$i) { + $work[$i] = 0.0; + } + for ($j = $k + 1; $j < $this->n; ++$j) { + for ($i = $k + 1; $i < $this->m; ++$i) { + $work[$i] += $e[$j] * $A[$i][$j]; + } + } + for ($j = $k + 1; $j < $this->n; ++$j) { + $t = -$e[$j] / $e[$k + 1]; + for ($i = $k + 1; $i < $this->m; ++$i) { + $A[$i][$j] += $t * $work[$i]; + } + } + } + if ($wantv) { + // Place the transformation in V for subsequent + // back multiplication. + for ($i = $k + 1; $i < $this->n; ++$i) { + $this->V[$i][$k] = $e[$i]; + } + } + } + } + + // Set up the final bidiagonal matrix or order p. + $p = min($this->n, $this->m + 1); + if ($nct < $this->n) { + $this->s[$nct] = $A[$nct][$nct]; + } + if ($this->m < $p) { + $this->s[$p - 1] = 0.0; + } + if ($nrt + 1 < $p) { + $e[$nrt] = $A[$nrt][$p - 1]; + } + $e[$p - 1] = 0.0; + // If required, generate U. + if ($wantu) { + for ($j = $nct; $j < $nu; ++$j) { + for ($i = 0; $i < $this->m; ++$i) { + $this->U[$i][$j] = 0.0; + } + $this->U[$j][$j] = 1.0; + } + for ($k = $nct - 1; $k >= 0; --$k) { + if ($this->s[$k] != 0.0) { + for ($j = $k + 1; $j < $nu; ++$j) { + $t = 0; + for ($i = $k; $i < $this->m; ++$i) { + $t += $this->U[$i][$k] * $this->U[$i][$j]; + } + $t = -$t / $this->U[$k][$k]; + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$j] += $t * $this->U[$i][$k]; + } + } + for ($i = $k; $i < $this->m; ++$i) { + $this->U[$i][$k] = -$this->U[$i][$k]; + } + $this->U[$k][$k] = 1.0 + $this->U[$k][$k]; + for ($i = 0; $i < $k - 1; ++$i) { + $this->U[$i][$k] = 0.0; + } + } else { + for ($i = 0; $i < $this->m; ++$i) { + $this->U[$i][$k] = 0.0; + } + $this->U[$k][$k] = 1.0; + } + } + } + + // If required, generate V. + if ($wantv) { + for ($k = $this->n - 1; $k >= 0; --$k) { + if (($k < $nrt) and ($e[$k] != 0.0)) { + for ($j = $k + 1; $j < $nu; ++$j) { + $t = 0; + for ($i = $k + 1; $i < $this->n; ++$i) { + $t += $this->V[$i][$k] * $this->V[$i][$j]; + } + $t = -$t / $this->V[$k + 1][$k]; + for ($i = $k + 1; $i < $this->n; ++$i) { + $this->V[$i][$j] += $t * $this->V[$i][$k]; + } + } + } + for ($i = 0; $i < $this->n; ++$i) { + $this->V[$i][$k] = 0.0; + } + $this->V[$k][$k] = 1.0; + } + } + + // Main iteration loop for the singular values. + $pp = $p - 1; + $iter = 0; + $eps = pow(2.0, -52.0); + + while ($p > 0) { + // Here is where a test for too many iterations would go. + // This section of the program inspects for negligible + // elements in the s and e arrays. On completion the + // variables kase and k are set as follows: + // kase = 1 if s(p) and e[k-1] are negligible and k

= -1; --$k) { + if ($k == -1) { + break; + } + if (abs($e[$k]) <= $eps * (abs($this->s[$k]) + abs($this->s[$k + 1]))) { + $e[$k] = 0.0; + + break; + } + } + if ($k == $p - 2) { + $kase = 4; + } else { + for ($ks = $p - 1; $ks >= $k; --$ks) { + if ($ks == $k) { + break; + } + $t = ($ks != $p ? abs($e[$ks]) : 0.) + ($ks != $k + 1 ? abs($e[$ks - 1]) : 0.); + if (abs($this->s[$ks]) <= $eps * $t) { + $this->s[$ks] = 0.0; + + break; + } + } + if ($ks == $k) { + $kase = 3; + } elseif ($ks == $p - 1) { + $kase = 1; + } else { + $kase = 2; + $k = $ks; + } + } + ++$k; + + // Perform the task indicated by kase. + switch ($kase) { + // Deflate negligible s(p). + case 1: + $f = $e[$p - 2]; + $e[$p - 2] = 0.0; + for ($j = $p - 2; $j >= $k; --$j) { + $t = hypo($this->s[$j], $f); + $cs = $this->s[$j] / $t; + $sn = $f / $t; + $this->s[$j] = $t; + if ($j != $k) { + $f = -$sn * $e[$j - 1]; + $e[$j - 1] = $cs * $e[$j - 1]; + } + if ($wantv) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$p - 1]; + $this->V[$i][$p - 1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$p - 1]; + $this->V[$i][$j] = $t; + } + } + } + + break; + // Split at negligible s(k). + case 2: + $f = $e[$k - 1]; + $e[$k - 1] = 0.0; + for ($j = $k; $j < $p; ++$j) { + $t = hypo($this->s[$j], $f); + $cs = $this->s[$j] / $t; + $sn = $f / $t; + $this->s[$j] = $t; + $f = -$sn * $e[$j]; + $e[$j] = $cs * $e[$j]; + if ($wantu) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$k - 1]; + $this->U[$i][$k - 1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$k - 1]; + $this->U[$i][$j] = $t; + } + } + } + + break; + // Perform one qr step. + case 3: + // Calculate the shift. + $scale = max(max(max(max(abs($this->s[$p - 1]), abs($this->s[$p - 2])), abs($e[$p - 2])), abs($this->s[$k])), abs($e[$k])); + $sp = $this->s[$p - 1] / $scale; + $spm1 = $this->s[$p - 2] / $scale; + $epm1 = $e[$p - 2] / $scale; + $sk = $this->s[$k] / $scale; + $ek = $e[$k] / $scale; + $b = (($spm1 + $sp) * ($spm1 - $sp) + $epm1 * $epm1) / 2.0; + $c = ($sp * $epm1) * ($sp * $epm1); + $shift = 0.0; + if (($b != 0.0) || ($c != 0.0)) { + $shift = sqrt($b * $b + $c); + if ($b < 0.0) { + $shift = -$shift; + } + $shift = $c / ($b + $shift); + } + $f = ($sk + $sp) * ($sk - $sp) + $shift; + $g = $sk * $ek; + // Chase zeros. + for ($j = $k; $j < $p - 1; ++$j) { + $t = hypo($f, $g); + $cs = $f / $t; + $sn = $g / $t; + if ($j != $k) { + $e[$j - 1] = $t; + } + $f = $cs * $this->s[$j] + $sn * $e[$j]; + $e[$j] = $cs * $e[$j] - $sn * $this->s[$j]; + $g = $sn * $this->s[$j + 1]; + $this->s[$j + 1] = $cs * $this->s[$j + 1]; + if ($wantv) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$j + 1]; + $this->V[$i][$j + 1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$j + 1]; + $this->V[$i][$j] = $t; + } + } + $t = hypo($f, $g); + $cs = $f / $t; + $sn = $g / $t; + $this->s[$j] = $t; + $f = $cs * $e[$j] + $sn * $this->s[$j + 1]; + $this->s[$j + 1] = -$sn * $e[$j] + $cs * $this->s[$j + 1]; + $g = $sn * $e[$j + 1]; + $e[$j + 1] = $cs * $e[$j + 1]; + if ($wantu && ($j < $this->m - 1)) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$j + 1]; + $this->U[$i][$j + 1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$j + 1]; + $this->U[$i][$j] = $t; + } + } + } + $e[$p - 2] = $f; + $iter = $iter + 1; + + break; + // Convergence. + case 4: + // Make the singular values positive. + if ($this->s[$k] <= 0.0) { + $this->s[$k] = ($this->s[$k] < 0.0 ? -$this->s[$k] : 0.0); + if ($wantv) { + for ($i = 0; $i <= $pp; ++$i) { + $this->V[$i][$k] = -$this->V[$i][$k]; + } + } + } + // Order the singular values. + while ($k < $pp) { + if ($this->s[$k] >= $this->s[$k + 1]) { + break; + } + $t = $this->s[$k]; + $this->s[$k] = $this->s[$k + 1]; + $this->s[$k + 1] = $t; + if ($wantv and ($k < $this->n - 1)) { + for ($i = 0; $i < $this->n; ++$i) { + $t = $this->V[$i][$k + 1]; + $this->V[$i][$k + 1] = $this->V[$i][$k]; + $this->V[$i][$k] = $t; + } + } + if ($wantu and ($k < $this->m - 1)) { + for ($i = 0; $i < $this->m; ++$i) { + $t = $this->U[$i][$k + 1]; + $this->U[$i][$k + 1] = $this->U[$i][$k]; + $this->U[$i][$k] = $t; + } + } + ++$k; + } + $iter = 0; + --$p; + + break; + } // end switch + } // end while + } + + /** + * Return the left singular vectors. + * + * @return Matrix U + */ + public function getU() + { + return new Matrix($this->U, $this->m, min($this->m + 1, $this->n)); + } + + /** + * Return the right singular vectors. + * + * @return Matrix V + */ + public function getV() + { + return new Matrix($this->V); + } + + /** + * Return the one-dimensional array of singular values. + * + * @return array diagonal of S + */ + public function getSingularValues() + { + return $this->s; + } + + /** + * Return the diagonal matrix of singular values. + * + * @return Matrix S + */ + public function getS() + { + for ($i = 0; $i < $this->n; ++$i) { + for ($j = 0; $j < $this->n; ++$j) { + $S[$i][$j] = 0.0; + } + $S[$i][$i] = $this->s[$i]; + } + + return new Matrix($S); + } + + /** + * Two norm. + * + * @return float max(S) + */ + public function norm2() + { + return $this->s[0]; + } + + /** + * Two norm condition number. + * + * @return float max(S)/min(S) + */ + public function cond() + { + return $this->s[0] / $this->s[min($this->m, $this->n) - 1]; + } + + /** + * Effective numerical matrix rank. + * + * @return int Number of nonnegligible singular values + */ + public function rank() + { + $eps = pow(2.0, -52.0); + $tol = max($this->m, $this->n) * $this->s[0] * $eps; + $r = 0; + $iMax = count($this->s); + for ($i = 0; $i < $iMax; ++$i) { + if ($this->s[$i] > $tol) { + ++$r; + } + } + + return $r; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php new file mode 100755 index 0000000..68c3864 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php @@ -0,0 +1,30 @@ + abs($b)) { + $r = $b / $a; + $r = abs($a) * sqrt(1 + $r * $r); + } elseif ($b != 0) { + $r = $a / $b; + $r = abs($b) * sqrt(1 + $r * $r); + } else { + $r = 0.0; + } + + return $r; +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php new file mode 100755 index 0000000..f09fbc9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE.php @@ -0,0 +1,573 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// + +use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException; +use PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\Root; + +/* + * Array for storing OLE instances that are accessed from + * OLE_ChainedBlockStream::stream_open(). + * + * @var array + */ +$GLOBALS['_OLE_INSTANCES'] = []; + +/** + * OLE package base class. + * + * @author Xavier Noguer + * @author Christian Schmidt + * + * @category PhpSpreadsheet + */ +class OLE +{ + const OLE_PPS_TYPE_ROOT = 5; + const OLE_PPS_TYPE_DIR = 1; + const OLE_PPS_TYPE_FILE = 2; + const OLE_DATA_SIZE_SMALL = 0x1000; + const OLE_LONG_INT_SIZE = 4; + const OLE_PPS_SIZE = 0x80; + + /** + * The file handle for reading an OLE container. + * + * @var resource + */ + public $_file_handle; + + /** + * Array of PPS's found on the OLE container. + * + * @var array + */ + public $_list = []; + + /** + * Root directory of OLE container. + * + * @var Root + */ + public $root; + + /** + * Big Block Allocation Table. + * + * @var array (blockId => nextBlockId) + */ + public $bbat; + + /** + * Short Block Allocation Table. + * + * @var array (blockId => nextBlockId) + */ + public $sbat; + + /** + * Size of big blocks. This is usually 512. + * + * @var int number of octets per block + */ + public $bigBlockSize; + + /** + * Size of small blocks. This is usually 64. + * + * @var int number of octets per block + */ + public $smallBlockSize; + + /** + * Threshold for big blocks. + * + * @var int + */ + public $bigBlockThreshold; + + /** + * Reads an OLE container from the contents of the file given. + * + * @acces public + * + * @param string $file + * + * @throws ReaderException + * + * @return bool true on success, PEAR_Error on failure + */ + public function read($file) + { + $fh = fopen($file, 'r'); + if (!$fh) { + throw new ReaderException("Can't open file $file"); + } + $this->_file_handle = $fh; + + $signature = fread($fh, 8); + if ("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" != $signature) { + throw new ReaderException("File doesn't seem to be an OLE container."); + } + fseek($fh, 28); + if (fread($fh, 2) != "\xFE\xFF") { + // This shouldn't be a problem in practice + throw new ReaderException('Only Little-Endian encoding is supported.'); + } + // Size of blocks and short blocks in bytes + $this->bigBlockSize = pow(2, self::_readInt2($fh)); + $this->smallBlockSize = pow(2, self::_readInt2($fh)); + + // Skip UID, revision number and version number + fseek($fh, 44); + // Number of blocks in Big Block Allocation Table + $bbatBlockCount = self::_readInt4($fh); + + // Root chain 1st block + $directoryFirstBlockId = self::_readInt4($fh); + + // Skip unused bytes + fseek($fh, 56); + // Streams shorter than this are stored using small blocks + $this->bigBlockThreshold = self::_readInt4($fh); + // Block id of first sector in Short Block Allocation Table + $sbatFirstBlockId = self::_readInt4($fh); + // Number of blocks in Short Block Allocation Table + $sbbatBlockCount = self::_readInt4($fh); + // Block id of first sector in Master Block Allocation Table + $mbatFirstBlockId = self::_readInt4($fh); + // Number of blocks in Master Block Allocation Table + $mbbatBlockCount = self::_readInt4($fh); + $this->bbat = []; + + // Remaining 4 * 109 bytes of current block is beginning of Master + // Block Allocation Table + $mbatBlocks = []; + for ($i = 0; $i < 109; ++$i) { + $mbatBlocks[] = self::_readInt4($fh); + } + + // Read rest of Master Block Allocation Table (if any is left) + $pos = $this->_getBlockOffset($mbatFirstBlockId); + for ($i = 0; $i < $mbbatBlockCount; ++$i) { + fseek($fh, $pos); + for ($j = 0; $j < $this->bigBlockSize / 4 - 1; ++$j) { + $mbatBlocks[] = self::_readInt4($fh); + } + // Last block id in each block points to next block + $pos = $this->_getBlockOffset(self::_readInt4($fh)); + } + + // Read Big Block Allocation Table according to chain specified by $mbatBlocks + for ($i = 0; $i < $bbatBlockCount; ++$i) { + $pos = $this->_getBlockOffset($mbatBlocks[$i]); + fseek($fh, $pos); + for ($j = 0; $j < $this->bigBlockSize / 4; ++$j) { + $this->bbat[] = self::_readInt4($fh); + } + } + + // Read short block allocation table (SBAT) + $this->sbat = []; + $shortBlockCount = $sbbatBlockCount * $this->bigBlockSize / 4; + $sbatFh = $this->getStream($sbatFirstBlockId); + for ($blockId = 0; $blockId < $shortBlockCount; ++$blockId) { + $this->sbat[$blockId] = self::_readInt4($sbatFh); + } + fclose($sbatFh); + + $this->_readPpsWks($directoryFirstBlockId); + + return true; + } + + /** + * @param int $blockId byte offset from beginning of file + * + * @return int + */ + public function _getBlockOffset($blockId) + { + return 512 + $blockId * $this->bigBlockSize; + } + + /** + * Returns a stream for use with fread() etc. External callers should + * use \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::getStream(). + * + * @param int|OLE\PPS $blockIdOrPps block id or PPS + * + * @return resource read-only stream + */ + public function getStream($blockIdOrPps) + { + static $isRegistered = false; + if (!$isRegistered) { + stream_wrapper_register('ole-chainedblockstream', ChainedBlockStream::class); + $isRegistered = true; + } + + // Store current instance in global array, so that it can be accessed + // in OLE_ChainedBlockStream::stream_open(). + // Object is removed from self::$instances in OLE_Stream::close(). + $GLOBALS['_OLE_INSTANCES'][] = $this; + $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES'])); + + $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId; + if ($blockIdOrPps instanceof OLE\PPS) { + $path .= '&blockId=' . $blockIdOrPps->startBlock; + $path .= '&size=' . $blockIdOrPps->Size; + } else { + $path .= '&blockId=' . $blockIdOrPps; + } + + return fopen($path, 'r'); + } + + /** + * Reads a signed char. + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt1($fh) + { + list(, $tmp) = unpack('c', fread($fh, 1)); + + return $tmp; + } + + /** + * Reads an unsigned short (2 octets). + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt2($fh) + { + list(, $tmp) = unpack('v', fread($fh, 2)); + + return $tmp; + } + + /** + * Reads an unsigned long (4 octets). + * + * @param resource $fh file handle + * + * @return int + */ + private static function _readInt4($fh) + { + list(, $tmp) = unpack('V', fread($fh, 4)); + + return $tmp; + } + + /** + * Gets information about all PPS's on the OLE container from the PPS WK's + * creates an OLE_PPS object for each one. + * + * @param int $blockId the block id of the first block + * + * @return bool true on success, PEAR_Error on failure + */ + public function _readPpsWks($blockId) + { + $fh = $this->getStream($blockId); + for ($pos = 0; true; $pos += 128) { + fseek($fh, $pos, SEEK_SET); + $nameUtf16 = fread($fh, 64); + $nameLength = self::_readInt2($fh); + $nameUtf16 = substr($nameUtf16, 0, $nameLength - 2); + // Simple conversion from UTF-16LE to ISO-8859-1 + $name = str_replace("\x00", '', $nameUtf16); + $type = self::_readInt1($fh); + switch ($type) { + case self::OLE_PPS_TYPE_ROOT: + $pps = new OLE\PPS\Root(null, null, []); + $this->root = $pps; + + break; + case self::OLE_PPS_TYPE_DIR: + $pps = new OLE\PPS(null, null, null, null, null, null, null, null, null, []); + + break; + case self::OLE_PPS_TYPE_FILE: + $pps = new OLE\PPS\File($name); + + break; + default: + break; + } + fseek($fh, 1, SEEK_CUR); + $pps->Type = $type; + $pps->Name = $name; + $pps->PrevPps = self::_readInt4($fh); + $pps->NextPps = self::_readInt4($fh); + $pps->DirPps = self::_readInt4($fh); + fseek($fh, 20, SEEK_CUR); + $pps->Time1st = self::OLE2LocalDate(fread($fh, 8)); + $pps->Time2nd = self::OLE2LocalDate(fread($fh, 8)); + $pps->startBlock = self::_readInt4($fh); + $pps->Size = self::_readInt4($fh); + $pps->No = count($this->_list); + $this->_list[] = $pps; + + // check if the PPS tree (starting from root) is complete + if (isset($this->root) && $this->_ppsTreeComplete($this->root->No)) { + break; + } + } + fclose($fh); + + // Initialize $pps->children on directories + foreach ($this->_list as $pps) { + if ($pps->Type == self::OLE_PPS_TYPE_DIR || $pps->Type == self::OLE_PPS_TYPE_ROOT) { + $nos = [$pps->DirPps]; + $pps->children = []; + while ($nos) { + $no = array_pop($nos); + if ($no != -1) { + $childPps = $this->_list[$no]; + $nos[] = $childPps->PrevPps; + $nos[] = $childPps->NextPps; + $pps->children[] = $childPps; + } + } + } + } + + return true; + } + + /** + * It checks whether the PPS tree is complete (all PPS's read) + * starting with the given PPS (not necessarily root). + * + * @param int $index The index of the PPS from which we are checking + * + * @return bool Whether the PPS tree for the given PPS is complete + */ + public function _ppsTreeComplete($index) + { + return isset($this->_list[$index]) && + ($pps = $this->_list[$index]) && + ($pps->PrevPps == -1 || + $this->_ppsTreeComplete($pps->PrevPps)) && + ($pps->NextPps == -1 || + $this->_ppsTreeComplete($pps->NextPps)) && + ($pps->DirPps == -1 || + $this->_ppsTreeComplete($pps->DirPps)); + } + + /** + * Checks whether a PPS is a File PPS or not. + * If there is no PPS for the index given, it will return false. + * + * @param int $index The index for the PPS + * + * @return bool true if it's a File PPS, false otherwise + */ + public function isFile($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Type == self::OLE_PPS_TYPE_FILE; + } + + return false; + } + + /** + * Checks whether a PPS is a Root PPS or not. + * If there is no PPS for the index given, it will return false. + * + * @param int $index the index for the PPS + * + * @return bool true if it's a Root PPS, false otherwise + */ + public function isRoot($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Type == self::OLE_PPS_TYPE_ROOT; + } + + return false; + } + + /** + * Gives the total number of PPS's found in the OLE container. + * + * @return int The total number of PPS's found in the OLE container + */ + public function ppsTotal() + { + return count($this->_list); + } + + /** + * Gets data from a PPS + * If there is no PPS for the index given, it will return an empty string. + * + * @param int $index The index for the PPS + * @param int $position The position from which to start reading + * (relative to the PPS) + * @param int $length The amount of bytes to read (at most) + * + * @return string The binary string containing the data requested + * + * @see OLE_PPS_File::getStream() + */ + public function getData($index, $position, $length) + { + // if position is not valid return empty string + if (!isset($this->_list[$index]) || ($position >= $this->_list[$index]->Size) || ($position < 0)) { + return ''; + } + $fh = $this->getStream($this->_list[$index]); + $data = stream_get_contents($fh, $length, $position); + fclose($fh); + + return $data; + } + + /** + * Gets the data length from a PPS + * If there is no PPS for the index given, it will return 0. + * + * @param int $index The index for the PPS + * + * @return int The amount of bytes in data the PPS has + */ + public function getDataLength($index) + { + if (isset($this->_list[$index])) { + return $this->_list[$index]->Size; + } + + return 0; + } + + /** + * Utility function to transform ASCII text to Unicode. + * + * @param string $ascii The ASCII string to transform + * + * @return string The string in Unicode + */ + public static function ascToUcs($ascii) + { + $rawname = ''; + $iMax = strlen($ascii); + for ($i = 0; $i < $iMax; ++$i) { + $rawname .= $ascii[$i] + . "\x00"; + } + + return $rawname; + } + + /** + * Utility function + * Returns a string for the OLE container with the date given. + * + * @param int $date A timestamp + * + * @return string The string for the OLE container + */ + public static function localDateToOLE($date) + { + if (!isset($date)) { + return "\x00\x00\x00\x00\x00\x00\x00\x00"; + } + + // factor used for separating numbers into 4 bytes parts + $factor = pow(2, 32); + + // days from 1-1-1601 until the beggining of UNIX era + $days = 134774; + // calculate seconds + $big_date = $days * 24 * 3600 + gmmktime(date('H', $date), date('i', $date), date('s', $date), date('m', $date), date('d', $date), date('Y', $date)); + // multiply just to make MS happy + $big_date *= 10000000; + + $high_part = floor($big_date / $factor); + // lower 4 bytes + $low_part = floor((($big_date / $factor) - $high_part) * $factor); + + // Make HEX string + $res = ''; + + for ($i = 0; $i < 4; ++$i) { + $hex = $low_part % 0x100; + $res .= pack('c', $hex); + $low_part /= 0x100; + } + for ($i = 0; $i < 4; ++$i) { + $hex = $high_part % 0x100; + $res .= pack('c', $hex); + $high_part /= 0x100; + } + + return $res; + } + + /** + * Returns a timestamp from an OLE container's date. + * + * @param string $oleTimestamp A binary string with the encoded date + * + * @throws ReaderException + * + * @return int The Unix timestamp corresponding to the string + */ + public static function OLE2LocalDate($oleTimestamp) + { + if (strlen($oleTimestamp) != 8) { + throw new ReaderException('Expecting 8 byte string'); + } + + // convert to units of 100 ns since 1601: + $unpackedTimestamp = unpack('v4', $oleTimestamp); + $timestampHigh = (float) $unpackedTimestamp[4] * 65536 + (float) $unpackedTimestamp[3]; + $timestampLow = (float) $unpackedTimestamp[2] * 65536 + (float) $unpackedTimestamp[1]; + + // translate to seconds since 1601: + $timestampHigh /= 10000000; + $timestampLow /= 10000000; + + // days from 1601 to 1970: + $days = 134774; + + // translate to seconds since 1970: + $unixTimestamp = floor(65536.0 * 65536.0 * $timestampHigh + $timestampLow - $days * 24 * 3600 + 0.5); + + if ((int) $unixTimestamp == $unixTimestamp) { + return (int) $unixTimestamp; + } + + return $unixTimestamp >= 0.0 ? PHP_INT_MAX : PHP_INT_MIN; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php new file mode 100755 index 0000000..e6ba724 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php @@ -0,0 +1,196 @@ +params); + if (!isset($this->params['oleInstanceId'], $this->params['blockId'], $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { + if ($options & STREAM_REPORT_ERRORS) { + trigger_error('OLE stream not found', E_USER_WARNING); + } + + return false; + } + $this->ole = $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']]; + + $blockId = $this->params['blockId']; + $this->data = ''; + if (isset($this->params['size']) && $this->params['size'] < $this->ole->bigBlockThreshold && $blockId != $this->ole->root->startBlock) { + // Block id refers to small blocks + $rootPos = $this->ole->_getBlockOffset($this->ole->root->startBlock); + while ($blockId != -2) { + $pos = $rootPos + $blockId * $this->ole->bigBlockSize; + $blockId = $this->ole->sbat[$blockId]; + fseek($this->ole->_file_handle, $pos); + $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); + } + } else { + // Block id refers to big blocks + while ($blockId != -2) { + $pos = $this->ole->_getBlockOffset($blockId); + fseek($this->ole->_file_handle, $pos); + $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); + $blockId = $this->ole->bbat[$blockId]; + } + } + if (isset($this->params['size'])) { + $this->data = substr($this->data, 0, $this->params['size']); + } + + if ($options & STREAM_USE_PATH) { + $openedPath = $path; + } + + return true; + } + + /** + * Implements support for fclose(). + */ + public function stream_close() // @codingStandardsIgnoreLine + { + $this->ole = null; + unset($GLOBALS['_OLE_INSTANCES']); + } + + /** + * Implements support for fread(), fgets() etc. + * + * @param int $count maximum number of bytes to read + * + * @return string + */ + public function stream_read($count) // @codingStandardsIgnoreLine + { + if ($this->stream_eof()) { + return false; + } + $s = substr($this->data, $this->pos, $count); + $this->pos += $count; + + return $s; + } + + /** + * Implements support for feof(). + * + * @return bool TRUE if the file pointer is at EOF; otherwise FALSE + */ + public function stream_eof() // @codingStandardsIgnoreLine + { + return $this->pos >= strlen($this->data); + } + + /** + * Returns the position of the file pointer, i.e. its offset into the file + * stream. Implements support for ftell(). + * + * @return int + */ + public function stream_tell() // @codingStandardsIgnoreLine + { + return $this->pos; + } + + /** + * Implements support for fseek(). + * + * @param int $offset byte offset + * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END + * + * @return bool + */ + public function stream_seek($offset, $whence) // @codingStandardsIgnoreLine + { + if ($whence == SEEK_SET && $offset >= 0) { + $this->pos = $offset; + } elseif ($whence == SEEK_CUR && -$offset <= $this->pos) { + $this->pos += $offset; + } elseif ($whence == SEEK_END && -$offset <= count($this->data)) { + $this->pos = strlen($this->data) + $offset; + } else { + return false; + } + + return true; + } + + /** + * Implements support for fstat(). Currently the only supported field is + * "size". + * + * @return array + */ + public function stream_stat() // @codingStandardsIgnoreLine + { + return [ + 'size' => strlen($this->data), + ]; + } + + // Methods used by stream_wrapper_register() that are not implemented: + // bool stream_flush ( void ) + // int stream_write ( string data ) + // bool rename ( string path_from, string path_to ) + // bool mkdir ( string path, int mode, int options ) + // bool rmdir ( string path, int options ) + // bool dir_opendir ( string path, int options ) + // array url_stat ( string path, int flags ) + // string dir_readdir ( void ) + // bool dir_rewinddir ( void ) + // bool dir_closedir ( void ) +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS.php new file mode 100755 index 0000000..e53f257 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS.php @@ -0,0 +1,238 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; + +/** + * Class for creating PPS's for OLE containers. + * + * @author Xavier Noguer + * + * @category PhpSpreadsheet + */ +class PPS +{ + /** + * The PPS index. + * + * @var int + */ + public $No; + + /** + * The PPS name (in Unicode). + * + * @var string + */ + public $Name; + + /** + * The PPS type. Dir, Root or File. + * + * @var int + */ + public $Type; + + /** + * The index of the previous PPS. + * + * @var int + */ + public $PrevPps; + + /** + * The index of the next PPS. + * + * @var int + */ + public $NextPps; + + /** + * The index of it's first child if this is a Dir or Root PPS. + * + * @var int + */ + public $DirPps; + + /** + * A timestamp. + * + * @var int + */ + public $Time1st; + + /** + * A timestamp. + * + * @var int + */ + public $Time2nd; + + /** + * Starting block (small or big) for this PPS's data inside the container. + * + * @var int + */ + public $startBlock; + + /** + * The size of the PPS's data (in bytes). + * + * @var int + */ + public $Size; + + /** + * The PPS's data (only used if it's not using a temporary file). + * + * @var string + */ + public $_data; + + /** + * Array of child PPS's (only used by Root and Dir PPS's). + * + * @var array + */ + public $children = []; + + /** + * Pointer to OLE container. + * + * @var OLE + */ + public $ole; + + /** + * The constructor. + * + * @param int $No The PPS index + * @param string $name The PPS name + * @param int $type The PPS type. Dir, Root or File + * @param int $prev The index of the previous PPS + * @param int $next The index of the next PPS + * @param int $dir The index of it's first child if this is a Dir or Root PPS + * @param int $time_1st A timestamp + * @param int $time_2nd A timestamp + * @param string $data The (usually binary) source data of the PPS + * @param array $children Array containing children PPS for this PPS + */ + public function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children) + { + $this->No = $No; + $this->Name = $name; + $this->Type = $type; + $this->PrevPps = $prev; + $this->NextPps = $next; + $this->DirPps = $dir; + $this->Time1st = $time_1st; + $this->Time2nd = $time_2nd; + $this->_data = $data; + $this->children = $children; + if ($data != '') { + $this->Size = strlen($data); + } else { + $this->Size = 0; + } + } + + /** + * Returns the amount of data saved for this PPS. + * + * @return int The amount of data (in bytes) + */ + public function getDataLen() + { + if (!isset($this->_data)) { + return 0; + } + + return strlen($this->_data); + } + + /** + * Returns a string with the PPS's WK (What is a WK?). + * + * @return string The binary string + */ + public function _getPpsWk() + { + $ret = str_pad($this->Name, 64, "\x00"); + + $ret .= pack('v', strlen($this->Name) + 2) // 66 + . pack('c', $this->Type) // 67 + . pack('c', 0x00) //UK // 68 + . pack('V', $this->PrevPps) //Prev // 72 + . pack('V', $this->NextPps) //Next // 76 + . pack('V', $this->DirPps) //Dir // 80 + . "\x00\x09\x02\x00" // 84 + . "\x00\x00\x00\x00" // 88 + . "\xc0\x00\x00\x00" // 92 + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root + . "\x00\x00\x00\x00" // 100 + . OLE::localDateToOLE($this->Time1st) // 108 + . OLE::localDateToOLE($this->Time2nd) // 116 + . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 + . pack('V', $this->Size) // 124 + . pack('V', 0); // 128 + return $ret; + } + + /** + * Updates index and pointers to previous, next and children PPS's for this + * PPS. I don't think it'll work with Dir PPS's. + * + * @param array &$raList Reference to the array of PPS's for the whole OLE + * container + * @param mixed $to_save + * @param mixed $depth + * + * @return int The index for this PPS + */ + public static function _savePpsSetPnt(&$raList, $to_save, $depth = 0) + { + if (!is_array($to_save) || (empty($to_save))) { + return 0xFFFFFFFF; + } elseif (count($to_save) == 1) { + $cnt = count($raList); + // If the first entry, it's the root... Don't clone it! + $raList[$cnt] = ($depth == 0) ? $to_save[0] : clone $to_save[0]; + $raList[$cnt]->No = $cnt; + $raList[$cnt]->PrevPps = 0xFFFFFFFF; + $raList[$cnt]->NextPps = 0xFFFFFFFF; + $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); + } else { + $iPos = floor(count($to_save) / 2); + $aPrev = array_slice($to_save, 0, $iPos); + $aNext = array_slice($to_save, $iPos + 1); + $cnt = count($raList); + // If the first entry, it's the root... Don't clone it! + $raList[$cnt] = ($depth == 0) ? $to_save[$iPos] : clone $to_save[$iPos]; + $raList[$cnt]->No = $cnt; + $raList[$cnt]->PrevPps = self::_savePpsSetPnt($raList, $aPrev, $depth++); + $raList[$cnt]->NextPps = self::_savePpsSetPnt($raList, $aNext, $depth++); + $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); + } + + return $cnt; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/File.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/File.php new file mode 100755 index 0000000..68f50a5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/File.php @@ -0,0 +1,66 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS; + +/** + * Class for creating File PPS's for OLE containers. + * + * @author Xavier Noguer + * + * @category PhpSpreadsheet + */ +class File extends PPS +{ + /** + * The constructor. + * + * @param string $name The name of the file (in Unicode) + * + * @see OLE::ascToUcs() + */ + public function __construct($name) + { + parent::__construct(null, $name, OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', []); + } + + /** + * Initialization method. Has to be called right after OLE_PPS_File(). + * + * @return mixed true on success + */ + public function init() + { + return true; + } + + /** + * Append data to PPS. + * + * @param string $data The data to append + */ + public function append($data) + { + $this->_data .= $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php new file mode 100755 index 0000000..578e08f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php @@ -0,0 +1,466 @@ + | +// | Based on OLE::Storage_Lite by Kawai, Takanori | +// +----------------------------------------------------------------------+ +// +use PhpOffice\PhpSpreadsheet\Shared\OLE; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS; +use PhpOffice\PhpSpreadsheet\Writer\Exception as WriterException; + +/** + * Class for creating Root PPS's for OLE containers. + * + * @author Xavier Noguer + * + * @category PhpSpreadsheet + */ +class Root extends PPS +{ + /** + * Directory for temporary files. + * + * @var string + */ + protected $tempDirectory; + + /** + * @var resource + */ + private $fileHandle; + + /** + * @var string + */ + private $tempFilename; + + /** + * @var int + */ + private $smallBlockSize; + + /** + * @var int + */ + private $bigBlockSize; + + /** + * @param int $time_1st A timestamp + * @param int $time_2nd A timestamp + * @param File[] $raChild + */ + public function __construct($time_1st, $time_2nd, $raChild) + { + $this->tempDirectory = \PhpOffice\PhpSpreadsheet\Shared\File::sysGetTempDir(); + + parent::__construct(null, OLE::ascToUcs('Root Entry'), OLE::OLE_PPS_TYPE_ROOT, null, null, null, $time_1st, $time_2nd, null, $raChild); + } + + /** + * Method for saving the whole OLE container (including files). + * In fact, if called with an empty argument (or '-'), it saves to a + * temporary file and then outputs it's contents to stdout. + * If a resource pointer to a stream created by fopen() is passed + * it will be used, but you have to close such stream by yourself. + * + * @param resource|string $filename the name of the file or stream where to save the OLE container + * + * @throws WriterException + * + * @return bool true on success + */ + public function save($filename) + { + // Initial Setting for saving + $this->bigBlockSize = pow( + 2, + (isset($this->bigBlockSize)) ? self::adjust2($this->bigBlockSize) : 9 + ); + $this->smallBlockSize = pow( + 2, + (isset($this->smallBlockSize)) ? self::adjust2($this->smallBlockSize) : 6 + ); + + if (is_resource($filename)) { + $this->fileHandle = $filename; + } elseif ($filename == '-' || $filename == '') { + if ($this->tempDirectory === null) { + $this->tempDirectory = \PhpOffice\PhpSpreadsheet\Shared\File::sysGetTempDir(); + } + $this->tempFilename = tempnam($this->tempDirectory, 'OLE_PPS_Root'); + $this->fileHandle = fopen($this->tempFilename, 'w+b'); + if ($this->fileHandle == false) { + throw new WriterException("Can't create temporary file."); + } + } else { + $this->fileHandle = fopen($filename, 'wb'); + } + if ($this->fileHandle == false) { + throw new WriterException("Can't open $filename. It may be in use or protected."); + } + // Make an array of PPS's (for Save) + $aList = []; + PPS::_savePpsSetPnt($aList, [$this]); + // calculate values for header + list($iSBDcnt, $iBBcnt, $iPPScnt) = $this->_calcSize($aList); //, $rhInfo); + // Save Header + $this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt); + + // Make Small Data string (write SBD) + $this->_data = $this->_makeSmallData($aList); + + // Write BB + $this->_saveBigData($iSBDcnt, $aList); + // Write PPS + $this->_savePps($aList); + // Write Big Block Depot and BDList and Adding Header informations + $this->_saveBbd($iSBDcnt, $iBBcnt, $iPPScnt); + + if (!is_resource($filename)) { + fclose($this->fileHandle); + } + + return true; + } + + /** + * Calculate some numbers. + * + * @param array $raList Reference to an array of PPS's + * + * @return float[] The array of numbers + */ + public function _calcSize(&$raList) + { + // Calculate Basic Setting + list($iSBDcnt, $iBBcnt, $iPPScnt) = [0, 0, 0]; + $iSmallLen = 0; + $iSBcnt = 0; + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) { + $raList[$i]->Size = $raList[$i]->getDataLen(); + if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) { + $iSBcnt += floor($raList[$i]->Size / $this->smallBlockSize) + + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0); + } else { + $iBBcnt += (floor($raList[$i]->Size / $this->bigBlockSize) + + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0)); + } + } + } + $iSmallLen = $iSBcnt * $this->smallBlockSize; + $iSlCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE); + $iSBDcnt = floor($iSBcnt / $iSlCnt) + (($iSBcnt % $iSlCnt) ? 1 : 0); + $iBBcnt += (floor($iSmallLen / $this->bigBlockSize) + + (($iSmallLen % $this->bigBlockSize) ? 1 : 0)); + $iCnt = count($raList); + $iBdCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE; + $iPPScnt = (floor($iCnt / $iBdCnt) + (($iCnt % $iBdCnt) ? 1 : 0)); + + return [$iSBDcnt, $iBBcnt, $iPPScnt]; + } + + /** + * Helper function for caculating a magic value for block sizes. + * + * @param int $i2 The argument + * + * @see save() + * + * @return float + */ + private static function adjust2($i2) + { + $iWk = log($i2) / log(2); + + return ($iWk > floor($iWk)) ? floor($iWk) + 1 : $iWk; + } + + /** + * Save OLE header. + * + * @param int $iSBDcnt + * @param int $iBBcnt + * @param int $iPPScnt + */ + public function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt) + { + $FILE = $this->fileHandle; + + // Calculate Basic Setting + $iBlCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE; + $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE; + + $iBdExL = 0; + $iAll = $iBBcnt + $iPPScnt + $iSBDcnt; + $iAllW = $iAll; + $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0); + $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0); + + // Calculate BD count + if ($iBdCnt > $i1stBdL) { + while (1) { + ++$iBdExL; + ++$iAllW; + $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt) ? 1 : 0); + $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW + $iBdCntW) % $iBlCnt) ? 1 : 0); + if ($iBdCnt <= ($iBdExL * $iBlCnt + $i1stBdL)) { + break; + } + } + } + + // Save Header + fwrite( + $FILE, + "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . pack('v', 0x3b) + . pack('v', 0x03) + . pack('v', -2) + . pack('v', 9) + . pack('v', 6) + . pack('v', 0) + . "\x00\x00\x00\x00" + . "\x00\x00\x00\x00" + . pack('V', $iBdCnt) + . pack('V', $iBBcnt + $iSBDcnt) //ROOT START + . pack('V', 0) + . pack('V', 0x1000) + . pack('V', $iSBDcnt ? 0 : -2) //Small Block Depot + . pack('V', $iSBDcnt) + ); + // Extra BDList Start, Count + if ($iBdCnt < $i1stBdL) { + fwrite( + $FILE, + pack('V', -2) // Extra BDList Start + . pack('V', 0)// Extra BDList Count + ); + } else { + fwrite($FILE, pack('V', $iAll + $iBdCnt) . pack('V', $iBdExL)); + } + + // BDList + for ($i = 0; $i < $i1stBdL && $i < $iBdCnt; ++$i) { + fwrite($FILE, pack('V', $iAll + $i)); + } + if ($i < $i1stBdL) { + $jB = $i1stBdL - $i; + for ($j = 0; $j < $jB; ++$j) { + fwrite($FILE, (pack('V', -1))); + } + } + } + + /** + * Saving big data (PPS's with data bigger than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL). + * + * @param int $iStBlk + * @param array &$raList Reference to array of PPS's + */ + public function _saveBigData($iStBlk, &$raList) + { + $FILE = $this->fileHandle; + + // cycle through PPS's + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + if ($raList[$i]->Type != OLE::OLE_PPS_TYPE_DIR) { + $raList[$i]->Size = $raList[$i]->getDataLen(); + if (($raList[$i]->Size >= OLE::OLE_DATA_SIZE_SMALL) || (($raList[$i]->Type == OLE::OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data))) { + fwrite($FILE, $raList[$i]->_data); + + if ($raList[$i]->Size % $this->bigBlockSize) { + fwrite($FILE, str_repeat("\x00", $this->bigBlockSize - ($raList[$i]->Size % $this->bigBlockSize))); + } + // Set For PPS + $raList[$i]->startBlock = $iStBlk; + $iStBlk += + (floor($raList[$i]->Size / $this->bigBlockSize) + + (($raList[$i]->Size % $this->bigBlockSize) ? 1 : 0)); + } + } + } + } + + /** + * get small data (PPS's with data smaller than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL). + * + * @param array &$raList Reference to array of PPS's + * + * @return string + */ + public function _makeSmallData(&$raList) + { + $sRes = ''; + $FILE = $this->fileHandle; + $iSmBlk = 0; + + $iCount = count($raList); + for ($i = 0; $i < $iCount; ++$i) { + // Make SBD, small data string + if ($raList[$i]->Type == OLE::OLE_PPS_TYPE_FILE) { + if ($raList[$i]->Size <= 0) { + continue; + } + if ($raList[$i]->Size < OLE::OLE_DATA_SIZE_SMALL) { + $iSmbCnt = floor($raList[$i]->Size / $this->smallBlockSize) + + (($raList[$i]->Size % $this->smallBlockSize) ? 1 : 0); + // Add to SBD + $jB = $iSmbCnt - 1; + for ($j = 0; $j < $jB; ++$j) { + fwrite($FILE, pack('V', $j + $iSmBlk + 1)); + } + fwrite($FILE, pack('V', -2)); + + // Add to Data String(this will be written for RootEntry) + $sRes .= $raList[$i]->_data; + if ($raList[$i]->Size % $this->smallBlockSize) { + $sRes .= str_repeat("\x00", $this->smallBlockSize - ($raList[$i]->Size % $this->smallBlockSize)); + } + // Set for PPS + $raList[$i]->startBlock = $iSmBlk; + $iSmBlk += $iSmbCnt; + } + } + } + $iSbCnt = floor($this->bigBlockSize / OLE::OLE_LONG_INT_SIZE); + if ($iSmBlk % $iSbCnt) { + $iB = $iSbCnt - ($iSmBlk % $iSbCnt); + for ($i = 0; $i < $iB; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + + return $sRes; + } + + /** + * Saves all the PPS's WKs. + * + * @param array $raList Reference to an array with all PPS's + */ + public function _savePps(&$raList) + { + // Save each PPS WK + $iC = count($raList); + for ($i = 0; $i < $iC; ++$i) { + fwrite($this->fileHandle, $raList[$i]->_getPpsWk()); + } + // Adjust for Block + $iCnt = count($raList); + $iBCnt = $this->bigBlockSize / OLE::OLE_PPS_SIZE; + if ($iCnt % $iBCnt) { + fwrite($this->fileHandle, str_repeat("\x00", ($iBCnt - ($iCnt % $iBCnt)) * OLE::OLE_PPS_SIZE)); + } + } + + /** + * Saving Big Block Depot. + * + * @param int $iSbdSize + * @param int $iBsize + * @param int $iPpsCnt + */ + public function _saveBbd($iSbdSize, $iBsize, $iPpsCnt) + { + $FILE = $this->fileHandle; + // Calculate Basic Setting + $iBbCnt = $this->bigBlockSize / OLE::OLE_LONG_INT_SIZE; + $i1stBdL = ($this->bigBlockSize - 0x4C) / OLE::OLE_LONG_INT_SIZE; + + $iBdExL = 0; + $iAll = $iBsize + $iPpsCnt + $iSbdSize; + $iAllW = $iAll; + $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0); + $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0); + // Calculate BD count + if ($iBdCnt > $i1stBdL) { + while (1) { + ++$iBdExL; + ++$iAllW; + $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt) ? 1 : 0); + $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW + $iBdCntW) % $iBbCnt) ? 1 : 0); + if ($iBdCnt <= ($iBdExL * $iBbCnt + $i1stBdL)) { + break; + } + } + } + + // Making BD + // Set for SBD + if ($iSbdSize > 0) { + for ($i = 0; $i < ($iSbdSize - 1); ++$i) { + fwrite($FILE, pack('V', $i + 1)); + } + fwrite($FILE, pack('V', -2)); + } + // Set for B + for ($i = 0; $i < ($iBsize - 1); ++$i) { + fwrite($FILE, pack('V', $i + $iSbdSize + 1)); + } + fwrite($FILE, pack('V', -2)); + + // Set for PPS + for ($i = 0; $i < ($iPpsCnt - 1); ++$i) { + fwrite($FILE, pack('V', $i + $iSbdSize + $iBsize + 1)); + } + fwrite($FILE, pack('V', -2)); + // Set for BBD itself ( 0xFFFFFFFD : BBD) + for ($i = 0; $i < $iBdCnt; ++$i) { + fwrite($FILE, pack('V', 0xFFFFFFFD)); + } + // Set for ExtraBDList + for ($i = 0; $i < $iBdExL; ++$i) { + fwrite($FILE, pack('V', 0xFFFFFFFC)); + } + // Adjust for Block + if (($iAllW + $iBdCnt) % $iBbCnt) { + $iBlock = ($iBbCnt - (($iAllW + $iBdCnt) % $iBbCnt)); + for ($i = 0; $i < $iBlock; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + // Extra BDList + if ($iBdCnt > $i1stBdL) { + $iN = 0; + $iNb = 0; + for ($i = $i1stBdL; $i < $iBdCnt; $i++, ++$iN) { + if ($iN >= ($iBbCnt - 1)) { + $iN = 0; + ++$iNb; + fwrite($FILE, pack('V', $iAll + $iBdCnt + $iNb)); + } + fwrite($FILE, pack('V', $iBsize + $iSbdSize + $iPpsCnt + $i)); + } + if (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)) { + $iB = ($iBbCnt - 1) - (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)); + for ($i = 0; $i < $iB; ++$i) { + fwrite($FILE, pack('V', -1)); + } + } + fwrite($FILE, pack('V', -2)); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php new file mode 100755 index 0000000..3af3970 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php @@ -0,0 +1,352 @@ +data = file_get_contents($pFilename, false, null, 0, 8); + + // Check OLE identifier + $identifierOle = pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1); + if ($this->data != $identifierOle) { + throw new ReaderException('The filename ' . $pFilename . ' is not recognised as an OLE file'); + } + + // Get the file data + $this->data = file_get_contents($pFilename); + + // Total number of sectors used for the SAT + $this->numBigBlockDepotBlocks = self::getInt4d($this->data, self::NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); + + // SecID of the first sector of the directory stream + $this->rootStartBlock = self::getInt4d($this->data, self::ROOT_START_BLOCK_POS); + + // SecID of the first sector of the SSAT (or -2 if not extant) + $this->sbdStartBlock = self::getInt4d($this->data, self::SMALL_BLOCK_DEPOT_BLOCK_POS); + + // SecID of the first sector of the MSAT (or -2 if no additional sectors are used) + $this->extensionBlock = self::getInt4d($this->data, self::EXTENSION_BLOCK_POS); + + // Total number of sectors used by MSAT + $this->numExtensionBlocks = self::getInt4d($this->data, self::NUM_EXTENSION_BLOCK_POS); + + $bigBlockDepotBlocks = []; + $pos = self::BIG_BLOCK_DEPOT_BLOCKS_POS; + + $bbdBlocks = $this->numBigBlockDepotBlocks; + + if ($this->numExtensionBlocks != 0) { + $bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS) / 4; + } + + for ($i = 0; $i < $bbdBlocks; ++$i) { + $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); + $pos += 4; + } + + for ($j = 0; $j < $this->numExtensionBlocks; ++$j) { + $pos = ($this->extensionBlock + 1) * self::BIG_BLOCK_SIZE; + $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, self::BIG_BLOCK_SIZE / 4 - 1); + + for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; ++$i) { + $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); + $pos += 4; + } + + $bbdBlocks += $blocksToRead; + if ($bbdBlocks < $this->numBigBlockDepotBlocks) { + $this->extensionBlock = self::getInt4d($this->data, $pos); + } + } + + $pos = 0; + $this->bigBlockChain = ''; + $bbs = self::BIG_BLOCK_SIZE / 4; + for ($i = 0; $i < $this->numBigBlockDepotBlocks; ++$i) { + $pos = ($bigBlockDepotBlocks[$i] + 1) * self::BIG_BLOCK_SIZE; + + $this->bigBlockChain .= substr($this->data, $pos, 4 * $bbs); + $pos += 4 * $bbs; + } + + $pos = 0; + $sbdBlock = $this->sbdStartBlock; + $this->smallBlockChain = ''; + while ($sbdBlock != -2) { + $pos = ($sbdBlock + 1) * self::BIG_BLOCK_SIZE; + + $this->smallBlockChain .= substr($this->data, $pos, 4 * $bbs); + $pos += 4 * $bbs; + + $sbdBlock = self::getInt4d($this->bigBlockChain, $sbdBlock * 4); + } + + // read the directory stream + $block = $this->rootStartBlock; + $this->entry = $this->_readData($block); + + $this->readPropertySets(); + } + + /** + * Extract binary stream data. + * + * @param int $stream + * + * @return string + */ + public function getStream($stream) + { + if ($stream === null) { + return null; + } + + $streamData = ''; + + if ($this->props[$stream]['size'] < self::SMALL_BLOCK_THRESHOLD) { + $rootdata = $this->_readData($this->props[$this->rootentry]['startBlock']); + + $block = $this->props[$stream]['startBlock']; + + while ($block != -2) { + $pos = $block * self::SMALL_BLOCK_SIZE; + $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE); + + $block = self::getInt4d($this->smallBlockChain, $block * 4); + } + + return $streamData; + } + $numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE; + if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) { + ++$numBlocks; + } + + if ($numBlocks == 0) { + return ''; + } + + $block = $this->props[$stream]['startBlock']; + + while ($block != -2) { + $pos = ($block + 1) * self::BIG_BLOCK_SIZE; + $streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); + $block = self::getInt4d($this->bigBlockChain, $block * 4); + } + + return $streamData; + } + + /** + * Read a standard stream (by joining sectors using information from SAT). + * + * @param int $bl Sector ID where the stream starts + * + * @return string Data for standard stream + */ + private function _readData($bl) + { + $block = $bl; + $data = ''; + + while ($block != -2) { + $pos = ($block + 1) * self::BIG_BLOCK_SIZE; + $data .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); + $block = self::getInt4d($this->bigBlockChain, $block * 4); + } + + return $data; + } + + /** + * Read entries in the directory stream. + */ + private function readPropertySets() + { + $offset = 0; + + // loop through entires, each entry is 128 bytes + $entryLen = strlen($this->entry); + while ($offset < $entryLen) { + // entry data (128 bytes) + $d = substr($this->entry, $offset, self::PROPERTY_STORAGE_BLOCK_SIZE); + + // size in bytes of name + $nameSize = ord($d[self::SIZE_OF_NAME_POS]) | (ord($d[self::SIZE_OF_NAME_POS + 1]) << 8); + + // type of entry + $type = ord($d[self::TYPE_POS]); + + // sectorID of first sector or short sector, if this entry refers to a stream (the case with workbook) + // sectorID of first sector of the short-stream container stream, if this entry is root entry + $startBlock = self::getInt4d($d, self::START_BLOCK_POS); + + $size = self::getInt4d($d, self::SIZE_POS); + + $name = str_replace("\x00", '', substr($d, 0, $nameSize)); + + $this->props[] = [ + 'name' => $name, + 'type' => $type, + 'startBlock' => $startBlock, + 'size' => $size, + ]; + + // tmp helper to simplify checks + $upName = strtoupper($name); + + // Workbook directory entry (BIFF5 uses Book, BIFF8 uses Workbook) + if (($upName === 'WORKBOOK') || ($upName === 'BOOK')) { + $this->wrkbook = count($this->props) - 1; + } elseif ($upName === 'ROOT ENTRY' || $upName === 'R') { + // Root entry + $this->rootentry = count($this->props) - 1; + } + + // Summary information + if ($name == chr(5) . 'SummaryInformation') { + $this->summaryInformation = count($this->props) - 1; + } + + // Additional Document Summary information + if ($name == chr(5) . 'DocumentSummaryInformation') { + $this->documentSummaryInformation = count($this->props) - 1; + } + + $offset += self::PROPERTY_STORAGE_BLOCK_SIZE; + } + } + + /** + * Read 4 bytes of data at specified position. + * + * @param string $data + * @param int $pos + * + * @return int + */ + private static function getInt4d($data, $pos) + { + if ($pos < 0) { + // Invalid position + throw new ReaderException('Parameter pos=' . $pos . ' is invalid.'); + } + + $len = strlen($data); + if ($len < $pos + 4) { + $data .= str_repeat("\0", $pos + 4 - $len); + } + + // FIX: represent numbers correctly on 64-bit system + // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 + // Changed by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems + $_or_24 = ord($data[$pos + 3]); + if ($_or_24 >= 128) { + // negative number + $_ord_24 = -abs((256 - $_or_24) << 24); + } else { + $_ord_24 = ($_or_24 & 127) << 24; + } + + return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/PasswordHasher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/PasswordHasher.php new file mode 100755 index 0000000..9b0080b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/PasswordHasher.php @@ -0,0 +1,37 @@ +. + * + * @param string $pPassword Password to hash + * + * @return string Hashed password + */ + public static function hashPassword($pPassword) + { + $password = 0x0000; + $charPos = 1; // char position + + // split the plain text password in its component characters + $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); + foreach ($chars as $char) { + $value = ord($char) << $charPos++; // shifted ASCII value + $rotated_bits = $value >> 15; // rotated bits beyond bit 15 + $value &= 0x7fff; // first 15 bits + $password ^= ($value | $rotated_bits); + } + + $password ^= strlen($pPassword); + $password ^= 0xCE4B; + + return strtoupper(dechex($password)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php new file mode 100755 index 0000000..a570277 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php @@ -0,0 +1,724 @@ + chr(0), + "\x1B 1" => chr(1), + "\x1B 2" => chr(2), + "\x1B 3" => chr(3), + "\x1B 4" => chr(4), + "\x1B 5" => chr(5), + "\x1B 6" => chr(6), + "\x1B 7" => chr(7), + "\x1B 8" => chr(8), + "\x1B 9" => chr(9), + "\x1B :" => chr(10), + "\x1B ;" => chr(11), + "\x1B <" => chr(12), + "\x1B =" => chr(13), + "\x1B >" => chr(14), + "\x1B ?" => chr(15), + "\x1B!0" => chr(16), + "\x1B!1" => chr(17), + "\x1B!2" => chr(18), + "\x1B!3" => chr(19), + "\x1B!4" => chr(20), + "\x1B!5" => chr(21), + "\x1B!6" => chr(22), + "\x1B!7" => chr(23), + "\x1B!8" => chr(24), + "\x1B!9" => chr(25), + "\x1B!:" => chr(26), + "\x1B!;" => chr(27), + "\x1B!<" => chr(28), + "\x1B!=" => chr(29), + "\x1B!>" => chr(30), + "\x1B!?" => chr(31), + "\x1B'?" => chr(127), + "\x1B(0" => '€', // 128 in CP1252 + "\x1B(2" => '‚', // 130 in CP1252 + "\x1B(3" => 'ƒ', // 131 in CP1252 + "\x1B(4" => '„', // 132 in CP1252 + "\x1B(5" => '…', // 133 in CP1252 + "\x1B(6" => '†', // 134 in CP1252 + "\x1B(7" => '‡', // 135 in CP1252 + "\x1B(8" => 'ˆ', // 136 in CP1252 + "\x1B(9" => '‰', // 137 in CP1252 + "\x1B(:" => 'Š', // 138 in CP1252 + "\x1B(;" => '‹', // 139 in CP1252 + "\x1BNj" => 'Œ', // 140 in CP1252 + "\x1B(>" => 'Ž', // 142 in CP1252 + "\x1B)1" => '‘', // 145 in CP1252 + "\x1B)2" => '’', // 146 in CP1252 + "\x1B)3" => '“', // 147 in CP1252 + "\x1B)4" => '”', // 148 in CP1252 + "\x1B)5" => '•', // 149 in CP1252 + "\x1B)6" => '–', // 150 in CP1252 + "\x1B)7" => '—', // 151 in CP1252 + "\x1B)8" => '˜', // 152 in CP1252 + "\x1B)9" => '™', // 153 in CP1252 + "\x1B):" => 'š', // 154 in CP1252 + "\x1B);" => '›', // 155 in CP1252 + "\x1BNz" => 'œ', // 156 in CP1252 + "\x1B)>" => 'ž', // 158 in CP1252 + "\x1B)?" => 'Ÿ', // 159 in CP1252 + "\x1B*0" => ' ', // 160 in CP1252 + "\x1BN!" => '¡', // 161 in CP1252 + "\x1BN\"" => '¢', // 162 in CP1252 + "\x1BN#" => '£', // 163 in CP1252 + "\x1BN(" => '¤', // 164 in CP1252 + "\x1BN%" => '¥', // 165 in CP1252 + "\x1B*6" => '¦', // 166 in CP1252 + "\x1BN'" => '§', // 167 in CP1252 + "\x1BNH " => '¨', // 168 in CP1252 + "\x1BNS" => '©', // 169 in CP1252 + "\x1BNc" => 'ª', // 170 in CP1252 + "\x1BN+" => '«', // 171 in CP1252 + "\x1B*<" => '¬', // 172 in CP1252 + "\x1B*=" => '­', // 173 in CP1252 + "\x1BNR" => '®', // 174 in CP1252 + "\x1B*?" => '¯', // 175 in CP1252 + "\x1BN0" => '°', // 176 in CP1252 + "\x1BN1" => '±', // 177 in CP1252 + "\x1BN2" => '²', // 178 in CP1252 + "\x1BN3" => '³', // 179 in CP1252 + "\x1BNB " => '´', // 180 in CP1252 + "\x1BN5" => 'µ', // 181 in CP1252 + "\x1BN6" => '¶', // 182 in CP1252 + "\x1BN7" => '·', // 183 in CP1252 + "\x1B+8" => '¸', // 184 in CP1252 + "\x1BNQ" => '¹', // 185 in CP1252 + "\x1BNk" => 'º', // 186 in CP1252 + "\x1BN;" => '»', // 187 in CP1252 + "\x1BN<" => '¼', // 188 in CP1252 + "\x1BN=" => '½', // 189 in CP1252 + "\x1BN>" => '¾', // 190 in CP1252 + "\x1BN?" => '¿', // 191 in CP1252 + "\x1BNAA" => 'À', // 192 in CP1252 + "\x1BNBA" => 'Á', // 193 in CP1252 + "\x1BNCA" => 'Â', // 194 in CP1252 + "\x1BNDA" => 'Ã', // 195 in CP1252 + "\x1BNHA" => 'Ä', // 196 in CP1252 + "\x1BNJA" => 'Å', // 197 in CP1252 + "\x1BNa" => 'Æ', // 198 in CP1252 + "\x1BNKC" => 'Ç', // 199 in CP1252 + "\x1BNAE" => 'È', // 200 in CP1252 + "\x1BNBE" => 'É', // 201 in CP1252 + "\x1BNCE" => 'Ê', // 202 in CP1252 + "\x1BNHE" => 'Ë', // 203 in CP1252 + "\x1BNAI" => 'Ì', // 204 in CP1252 + "\x1BNBI" => 'Í', // 205 in CP1252 + "\x1BNCI" => 'Î', // 206 in CP1252 + "\x1BNHI" => 'Ï', // 207 in CP1252 + "\x1BNb" => 'Ð', // 208 in CP1252 + "\x1BNDN" => 'Ñ', // 209 in CP1252 + "\x1BNAO" => 'Ò', // 210 in CP1252 + "\x1BNBO" => 'Ó', // 211 in CP1252 + "\x1BNCO" => 'Ô', // 212 in CP1252 + "\x1BNDO" => 'Õ', // 213 in CP1252 + "\x1BNHO" => 'Ö', // 214 in CP1252 + "\x1B-7" => '×', // 215 in CP1252 + "\x1BNi" => 'Ø', // 216 in CP1252 + "\x1BNAU" => 'Ù', // 217 in CP1252 + "\x1BNBU" => 'Ú', // 218 in CP1252 + "\x1BNCU" => 'Û', // 219 in CP1252 + "\x1BNHU" => 'Ü', // 220 in CP1252 + "\x1B-=" => 'Ý', // 221 in CP1252 + "\x1BNl" => 'Þ', // 222 in CP1252 + "\x1BN{" => 'ß', // 223 in CP1252 + "\x1BNAa" => 'à', // 224 in CP1252 + "\x1BNBa" => 'á', // 225 in CP1252 + "\x1BNCa" => 'â', // 226 in CP1252 + "\x1BNDa" => 'ã', // 227 in CP1252 + "\x1BNHa" => 'ä', // 228 in CP1252 + "\x1BNJa" => 'å', // 229 in CP1252 + "\x1BNq" => 'æ', // 230 in CP1252 + "\x1BNKc" => 'ç', // 231 in CP1252 + "\x1BNAe" => 'è', // 232 in CP1252 + "\x1BNBe" => 'é', // 233 in CP1252 + "\x1BNCe" => 'ê', // 234 in CP1252 + "\x1BNHe" => 'ë', // 235 in CP1252 + "\x1BNAi" => 'ì', // 236 in CP1252 + "\x1BNBi" => 'í', // 237 in CP1252 + "\x1BNCi" => 'î', // 238 in CP1252 + "\x1BNHi" => 'ï', // 239 in CP1252 + "\x1BNs" => 'ð', // 240 in CP1252 + "\x1BNDn" => 'ñ', // 241 in CP1252 + "\x1BNAo" => 'ò', // 242 in CP1252 + "\x1BNBo" => 'ó', // 243 in CP1252 + "\x1BNCo" => 'ô', // 244 in CP1252 + "\x1BNDo" => 'õ', // 245 in CP1252 + "\x1BNHo" => 'ö', // 246 in CP1252 + "\x1B/7" => '÷', // 247 in CP1252 + "\x1BNy" => 'ø', // 248 in CP1252 + "\x1BNAu" => 'ù', // 249 in CP1252 + "\x1BNBu" => 'ú', // 250 in CP1252 + "\x1BNCu" => 'û', // 251 in CP1252 + "\x1BNHu" => 'ü', // 252 in CP1252 + "\x1B/=" => 'ý', // 253 in CP1252 + "\x1BN|" => 'þ', // 254 in CP1252 + "\x1BNHy" => 'ÿ', // 255 in CP1252 + ]; + } + + /** + * Get whether iconv extension is available. + * + * @return bool + */ + public static function getIsIconvEnabled() + { + if (isset(self::$isIconvEnabled)) { + return self::$isIconvEnabled; + } + + // Assume no problems with iconv + self::$isIconvEnabled = true; + + // Fail if iconv doesn't exist + if (!function_exists('iconv')) { + self::$isIconvEnabled = false; + } elseif (!@iconv('UTF-8', 'UTF-16LE', 'x')) { + // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false, + self::$isIconvEnabled = false; + } elseif (defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && defined('ICONV_VERSION') && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) { + // CUSTOM: IBM AIX iconv() does not work + self::$isIconvEnabled = false; + } + + // Deactivate iconv default options if they fail (as seen on IMB i) + if (self::$isIconvEnabled && !@iconv('UTF-8', 'UTF-16LE' . self::$iconvOptions, 'x')) { + self::$iconvOptions = ''; + } + + return self::$isIconvEnabled; + } + + private static function buildCharacterSets() + { + if (empty(self::$controlCharacters)) { + self::buildControlCharacters(); + } + + if (empty(self::$SYLKCharacters)) { + self::buildSYLKCharacters(); + } + } + + /** + * Convert from OpenXML escaped control character to PHP control character. + * + * Excel 2007 team: + * ---------------- + * That's correct, control characters are stored directly in the shared-strings table. + * We do encode characters that cannot be represented in XML using the following escape sequence: + * _xHHHH_ where H represents a hexadecimal character in the character's value... + * So you could end up with something like _x0008_ in a string (either in a cell value () + * element or in the shared string element. + * + * @param string $value Value to unescape + * + * @return string + */ + public static function controlCharacterOOXML2PHP($value) + { + self::buildCharacterSets(); + + return str_replace(array_keys(self::$controlCharacters), array_values(self::$controlCharacters), $value); + } + + /** + * Convert from PHP control character to OpenXML escaped control character. + * + * Excel 2007 team: + * ---------------- + * That's correct, control characters are stored directly in the shared-strings table. + * We do encode characters that cannot be represented in XML using the following escape sequence: + * _xHHHH_ where H represents a hexadecimal character in the character's value... + * So you could end up with something like _x0008_ in a string (either in a cell value () + * element or in the shared string element. + * + * @param string $value Value to escape + * + * @return string + */ + public static function controlCharacterPHP2OOXML($value) + { + self::buildCharacterSets(); + + return str_replace(array_values(self::$controlCharacters), array_keys(self::$controlCharacters), $value); + } + + /** + * Try to sanitize UTF8, stripping invalid byte sequences. Not perfect. Does not surrogate characters. + * + * @param string $value + * + * @return string + */ + public static function sanitizeUTF8($value) + { + if (self::getIsIconvEnabled()) { + $value = @iconv('UTF-8', 'UTF-8', $value); + + return $value; + } + + $value = mb_convert_encoding($value, 'UTF-8', 'UTF-8'); + + return $value; + } + + /** + * Check if a string contains UTF8 data. + * + * @param string $value + * + * @return bool + */ + public static function isUTF8($value) + { + return $value === '' || preg_match('/^./su', $value) === 1; + } + + /** + * Formats a numeric value as a string for output in various output writers forcing + * point as decimal separator in case locale is other than English. + * + * @param mixed $value + * + * @return string + */ + public static function formatNumber($value) + { + if (is_float($value)) { + return str_replace(',', '.', $value); + } + + return (string) $value; + } + + /** + * Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) + * Writes the string using uncompressed notation, no rich text, no Asian phonetics + * If mbstring extension is not available, ASCII is assumed, and compressed notation is used + * although this will give wrong results for non-ASCII strings + * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3. + * + * @param string $value UTF-8 encoded string + * @param mixed[] $arrcRuns Details of rich text runs in $value + * + * @return string + */ + public static function UTF8toBIFF8UnicodeShort($value, $arrcRuns = []) + { + // character count + $ln = self::countCharacters($value, 'UTF-8'); + // option flags + if (empty($arrcRuns)) { + $data = pack('CC', $ln, 0x0001); + // characters + $data .= self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + } else { + $data = pack('vC', $ln, 0x09); + $data .= pack('v', count($arrcRuns)); + // characters + $data .= self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + foreach ($arrcRuns as $cRun) { + $data .= pack('v', $cRun['strlen']); + $data .= pack('v', $cRun['fontidx']); + } + } + + return $data; + } + + /** + * Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) + * Writes the string using uncompressed notation, no rich text, no Asian phonetics + * If mbstring extension is not available, ASCII is assumed, and compressed notation is used + * although this will give wrong results for non-ASCII strings + * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3. + * + * @param string $value UTF-8 encoded string + * + * @return string + */ + public static function UTF8toBIFF8UnicodeLong($value) + { + // character count + $ln = self::countCharacters($value, 'UTF-8'); + + // characters + $chars = self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); + + $data = pack('vC', $ln, 0x0001) . $chars; + + return $data; + } + + /** + * Convert string from one encoding to another. + * + * @param string $value + * @param string $to Encoding to convert to, e.g. 'UTF-8' + * @param string $from Encoding to convert from, e.g. 'UTF-16LE' + * + * @return string + */ + public static function convertEncoding($value, $to, $from) + { + if (self::getIsIconvEnabled()) { + $result = iconv($from, $to . self::$iconvOptions, $value); + if (false !== $result) { + return $result; + } + } + + return mb_convert_encoding($value, $to, $from); + } + + /** + * Get character count. + * + * @param string $value + * @param string $enc Encoding + * + * @return int Character count + */ + public static function countCharacters($value, $enc = 'UTF-8') + { + return mb_strlen($value, $enc); + } + + /** + * Get a substring of a UTF-8 encoded string. + * + * @param string $pValue UTF-8 encoded string + * @param int $pStart Start offset + * @param int $pLength Maximum number of characters in substring + * + * @return string + */ + public static function substring($pValue, $pStart, $pLength = 0) + { + return mb_substr($pValue, $pStart, $pLength, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to upper case. + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToUpper($pValue) + { + return mb_convert_case($pValue, MB_CASE_UPPER, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to lower case. + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToLower($pValue) + { + return mb_convert_case($pValue, MB_CASE_LOWER, 'UTF-8'); + } + + /** + * Convert a UTF-8 encoded string to title/proper case + * (uppercase every first character in each word, lower case all other characters). + * + * @param string $pValue UTF-8 encoded string + * + * @return string + */ + public static function strToTitle($pValue) + { + return mb_convert_case($pValue, MB_CASE_TITLE, 'UTF-8'); + } + + public static function mbIsUpper($char) + { + return mb_strtolower($char, 'UTF-8') != $char; + } + + public static function mbStrSplit($string) + { + // Split at all position not after the start: ^ + // and not before the end: $ + return preg_split('/(?_calculateFormulaValue($fractionFormula); + + return true; + } + + return false; + } + + // function convertToNumberIfFraction() + + /** + * Get the decimal separator. If it has not yet been set explicitly, try to obtain number + * formatting information from locale. + * + * @return string + */ + public static function getDecimalSeparator() + { + if (!isset(self::$decimalSeparator)) { + $localeconv = localeconv(); + self::$decimalSeparator = ($localeconv['decimal_point'] != '') + ? $localeconv['decimal_point'] : $localeconv['mon_decimal_point']; + + if (self::$decimalSeparator == '') { + // Default to . + self::$decimalSeparator = '.'; + } + } + + return self::$decimalSeparator; + } + + /** + * Set the decimal separator. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for decimal separator + */ + public static function setDecimalSeparator($pValue) + { + self::$decimalSeparator = $pValue; + } + + /** + * Get the thousands separator. If it has not yet been set explicitly, try to obtain number + * formatting information from locale. + * + * @return string + */ + public static function getThousandsSeparator() + { + if (!isset(self::$thousandsSeparator)) { + $localeconv = localeconv(); + self::$thousandsSeparator = ($localeconv['thousands_sep'] != '') + ? $localeconv['thousands_sep'] : $localeconv['mon_thousands_sep']; + + if (self::$thousandsSeparator == '') { + // Default to . + self::$thousandsSeparator = ','; + } + } + + return self::$thousandsSeparator; + } + + /** + * Set the thousands separator. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for thousands separator + */ + public static function setThousandsSeparator($pValue) + { + self::$thousandsSeparator = $pValue; + } + + /** + * Get the currency code. If it has not yet been set explicitly, try to obtain the + * symbol information from locale. + * + * @return string + */ + public static function getCurrencyCode() + { + if (!empty(self::$currencyCode)) { + return self::$currencyCode; + } + self::$currencyCode = '$'; + $localeconv = localeconv(); + if (!empty($localeconv['currency_symbol'])) { + self::$currencyCode = $localeconv['currency_symbol']; + + return self::$currencyCode; + } + if (!empty($localeconv['int_curr_symbol'])) { + self::$currencyCode = $localeconv['int_curr_symbol']; + + return self::$currencyCode; + } + + return self::$currencyCode; + } + + /** + * Set the currency code. Only used by NumberFormat::toFormattedString() + * to format output by \PhpOffice\PhpSpreadsheet\Writer\Html and \PhpOffice\PhpSpreadsheet\Writer\Pdf. + * + * @param string $pValue Character for currency code + */ + public static function setCurrencyCode($pValue) + { + self::$currencyCode = $pValue; + } + + /** + * Convert SYLK encoded string to UTF-8. + * + * @param string $pValue + * + * @return string UTF-8 encoded string + */ + public static function SYLKtoUTF8($pValue) + { + self::buildCharacterSets(); + + // If there is no escape character in the string there is nothing to do + if (strpos($pValue, '') === false) { + return $pValue; + } + + foreach (self::$SYLKCharacters as $k => $v) { + $pValue = str_replace($k, $v, $pValue); + } + + return $pValue; + } + + /** + * Retrieve any leading numeric part of a string, or return the full string if no leading numeric + * (handles basic integer or float, but not exponent or non decimal). + * + * @param string $value + * + * @return mixed string or only the leading numeric part of the string + */ + public static function testStringAsNumeric($value) + { + if (is_numeric($value)) { + return $value; + } + $v = (float) $value; + + return (is_numeric(substr($value, 0, strlen($v)))) ? $v : $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/TimeZone.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/TimeZone.php new file mode 100755 index 0000000..e5a99b9 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/TimeZone.php @@ -0,0 +1,87 @@ +getTransitions($timestamp, $timestamp); + + return (count($transitions) > 0) ? $transitions[0]['offset'] : 0; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php new file mode 100755 index 0000000..d8e63d5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/BestFit.php @@ -0,0 +1,463 @@ +error; + } + + public function getBestFitType() + { + return $this->bestFitType; + } + + /** + * Return the Y-Value for a specified value of X. + * + * @param float $xValue X-Value + * + * @return bool Y-Value + */ + public function getValueOfYForX($xValue) + { + return false; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return bool X-Value + */ + public function getValueOfXForY($yValue) + { + return false; + } + + /** + * Return the original set of X-Values. + * + * @return float[] X-Values + */ + public function getXValues() + { + return $this->xValues; + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return bool + */ + public function getEquation($dp = 0) + { + return false; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + return round($this->slope, $dp); + } + + return $this->slope; + } + + /** + * Return the standard error of the Slope. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlopeSE($dp = 0) + { + if ($dp != 0) { + return round($this->slopeSE, $dp); + } + + return $this->slopeSE; + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round($this->intersect, $dp); + } + + return $this->intersect; + } + + /** + * Return the standard error of the Intersect. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersectSE($dp = 0) + { + if ($dp != 0) { + return round($this->intersectSE, $dp); + } + + return $this->intersectSE; + } + + /** + * Return the goodness of fit for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getGoodnessOfFit($dp = 0) + { + if ($dp != 0) { + return round($this->goodnessOfFit, $dp); + } + + return $this->goodnessOfFit; + } + + /** + * Return the goodness of fit for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getGoodnessOfFitPercent($dp = 0) + { + if ($dp != 0) { + return round($this->goodnessOfFit * 100, $dp); + } + + return $this->goodnessOfFit * 100; + } + + /** + * Return the standard deviation of the residuals for this regression. + * + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getStdevOfResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->stdevOfResiduals, $dp); + } + + return $this->stdevOfResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getSSRegression($dp = 0) + { + if ($dp != 0) { + return round($this->SSRegression, $dp); + } + + return $this->SSRegression; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getSSResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->SSResiduals, $dp); + } + + return $this->SSResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getDFResiduals($dp = 0) + { + if ($dp != 0) { + return round($this->DFResiduals, $dp); + } + + return $this->DFResiduals; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getF($dp = 0) + { + if ($dp != 0) { + return round($this->f, $dp); + } + + return $this->f; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getCovariance($dp = 0) + { + if ($dp != 0) { + return round($this->covariance, $dp); + } + + return $this->covariance; + } + + /** + * @param int $dp Number of places of decimal precision to return + * + * @return float + */ + public function getCorrelation($dp = 0) + { + if ($dp != 0) { + return round($this->correlation, $dp); + } + + return $this->correlation; + } + + /** + * @return float[] + */ + public function getYBestFitValues() + { + return $this->yBestFitValues; + } + + protected function calculateGoodnessOfFit($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const) + { + $SSres = $SScov = $SScor = $SStot = $SSsex = 0.0; + foreach ($this->xValues as $xKey => $xValue) { + $bestFitY = $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); + + $SSres += ($this->yValues[$xKey] - $bestFitY) * ($this->yValues[$xKey] - $bestFitY); + if ($const) { + $SStot += ($this->yValues[$xKey] - $meanY) * ($this->yValues[$xKey] - $meanY); + } else { + $SStot += $this->yValues[$xKey] * $this->yValues[$xKey]; + } + $SScov += ($this->xValues[$xKey] - $meanX) * ($this->yValues[$xKey] - $meanY); + if ($const) { + $SSsex += ($this->xValues[$xKey] - $meanX) * ($this->xValues[$xKey] - $meanX); + } else { + $SSsex += $this->xValues[$xKey] * $this->xValues[$xKey]; + } + } + + $this->SSResiduals = $SSres; + $this->DFResiduals = $this->valueCount - 1 - $const; + + if ($this->DFResiduals == 0.0) { + $this->stdevOfResiduals = 0.0; + } else { + $this->stdevOfResiduals = sqrt($SSres / $this->DFResiduals); + } + if (($SStot == 0.0) || ($SSres == $SStot)) { + $this->goodnessOfFit = 1; + } else { + $this->goodnessOfFit = 1 - ($SSres / $SStot); + } + + $this->SSRegression = $this->goodnessOfFit * $SStot; + $this->covariance = $SScov / $this->valueCount; + $this->correlation = ($this->valueCount * $sumXY - $sumX * $sumY) / sqrt(($this->valueCount * $sumX2 - pow($sumX, 2)) * ($this->valueCount * $sumY2 - pow($sumY, 2))); + $this->slopeSE = $this->stdevOfResiduals / sqrt($SSsex); + $this->intersectSE = $this->stdevOfResiduals * sqrt(1 / ($this->valueCount - ($sumX * $sumX) / $sumX2)); + if ($this->SSResiduals != 0.0) { + if ($this->DFResiduals == 0.0) { + $this->f = 0.0; + } else { + $this->f = $this->SSRegression / ($this->SSResiduals / $this->DFResiduals); + } + } else { + if ($this->DFResiduals == 0.0) { + $this->f = 0.0; + } else { + $this->f = $this->SSRegression / $this->DFResiduals; + } + } + } + + /** + * @param float[] $yValues + * @param float[] $xValues + * @param bool $const + */ + protected function leastSquareFit(array $yValues, array $xValues, $const) + { + // calculate sums + $x_sum = array_sum($xValues); + $y_sum = array_sum($yValues); + $meanX = $x_sum / $this->valueCount; + $meanY = $y_sum / $this->valueCount; + $mBase = $mDivisor = $xx_sum = $xy_sum = $yy_sum = 0.0; + for ($i = 0; $i < $this->valueCount; ++$i) { + $xy_sum += $xValues[$i] * $yValues[$i]; + $xx_sum += $xValues[$i] * $xValues[$i]; + $yy_sum += $yValues[$i] * $yValues[$i]; + + if ($const) { + $mBase += ($xValues[$i] - $meanX) * ($yValues[$i] - $meanY); + $mDivisor += ($xValues[$i] - $meanX) * ($xValues[$i] - $meanX); + } else { + $mBase += $xValues[$i] * $yValues[$i]; + $mDivisor += $xValues[$i] * $xValues[$i]; + } + } + + // calculate slope + $this->slope = $mBase / $mDivisor; + + // calculate intersect + if ($const) { + $this->intersect = $meanY - ($this->slope * $meanX); + } else { + $this->intersect = 0; + } + + $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, $meanX, $meanY, $const); + } + + /** + * Define the regression. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + // Calculate number of points + $nY = count($yValues); + $nX = count($xValues); + + // Define X Values if necessary + if ($nX == 0) { + $xValues = range(1, $nY); + } elseif ($nY != $nX) { + // Ensure both arrays of points are the same size + $this->error = true; + } + + $this->valueCount = $nY; + $this->xValues = $xValues; + $this->yValues = $yValues; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php new file mode 100755 index 0000000..5b57f4b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php @@ -0,0 +1,122 @@ +getIntersect() * pow($this->getSlope(), ($xValue - $this->xOffset)); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return log(($yValue + $this->yOffset) / $this->getIntersect()) / log($this->getSlope()); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' * ' . $slope . '^X'; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + return round(exp($this->slope), $dp); + } + + return exp($this->slope); + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round(exp($this->intersect), $dp); + } + + return exp($this->intersect); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function exponentialRegression($yValues, $xValues, $const) + { + foreach ($yValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->exponentialRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php new file mode 100755 index 0000000..217f096 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php @@ -0,0 +1,81 @@ +getIntersect() + $this->getSlope() * $xValue; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return ($yValue - $this->getIntersect()) / $this->getSlope(); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' + ' . $slope . ' * X'; + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function linearRegression($yValues, $xValues, $const) + { + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->linearRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php new file mode 100755 index 0000000..96ca2ed --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php @@ -0,0 +1,90 @@ +getIntersect() + $this->getSlope() * log($xValue - $this->xOffset); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return exp(($yValue - $this->getIntersect()) / $this->getSlope()); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)'; + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function logarithmicRegression($yValues, $xValues, $const) + { + foreach ($xValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->logarithmicRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php new file mode 100755 index 0000000..a151049 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php @@ -0,0 +1,200 @@ +order; + } + + /** + * Return the Y-Value for a specified value of X. + * + * @param float $xValue X-Value + * + * @return float Y-Value + */ + public function getValueOfYForX($xValue) + { + $retVal = $this->getIntersect(); + $slope = $this->getSlope(); + foreach ($slope as $key => $value) { + if ($value != 0.0) { + $retVal += $value * pow($xValue, $key + 1); + } + } + + return $retVal; + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return ($yValue - $this->getIntersect()) / $this->getSlope(); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + $equation = 'Y = ' . $intersect; + foreach ($slope as $key => $value) { + if ($value != 0.0) { + $equation .= ' + ' . $value . ' * X'; + if ($key > 0) { + $equation .= '^' . ($key + 1); + } + } + } + + return $equation; + } + + /** + * Return the Slope of the line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getSlope($dp = 0) + { + if ($dp != 0) { + $coefficients = []; + foreach ($this->slope as $coefficient) { + $coefficients[] = round($coefficient, $dp); + } + + return $coefficients; + } + + return $this->slope; + } + + public function getCoefficients($dp = 0) + { + return array_merge([$this->getIntersect($dp)], $this->getSlope($dp)); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param int $order Order of Polynomial for this regression + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + */ + private function polynomialRegression($order, $yValues, $xValues) + { + // calculate sums + $x_sum = array_sum($xValues); + $y_sum = array_sum($yValues); + $xx_sum = $xy_sum = $yy_sum = 0; + for ($i = 0; $i < $this->valueCount; ++$i) { + $xy_sum += $xValues[$i] * $yValues[$i]; + $xx_sum += $xValues[$i] * $xValues[$i]; + $yy_sum += $yValues[$i] * $yValues[$i]; + } + /* + * This routine uses logic from the PHP port of polyfit version 0.1 + * written by Michael Bommarito and Paul Meagher + * + * The function fits a polynomial function of order $order through + * a series of x-y data points using least squares. + * + */ + $A = []; + $B = []; + for ($i = 0; $i < $this->valueCount; ++$i) { + for ($j = 0; $j <= $order; ++$j) { + $A[$i][$j] = pow($xValues[$i], $j); + } + } + for ($i = 0; $i < $this->valueCount; ++$i) { + $B[$i] = [$yValues[$i]]; + } + $matrixA = new Matrix($A); + $matrixB = new Matrix($B); + $C = $matrixA->solve($matrixB); + + $coefficients = []; + for ($i = 0; $i < $C->getRowDimension(); ++$i) { + $r = $C->get($i, 0); + if (abs($r) <= pow(10, -9)) { + $r = 0; + } + $coefficients[] = $r; + } + + $this->intersect = array_shift($coefficients); + $this->slope = $coefficients; + + $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, 0, 0, 0); + foreach ($this->xValues as $xKey => $xValue) { + $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); + } + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param int $order Order of Polynomial for this regression + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($order, $yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + if ($order < $this->valueCount) { + $this->bestFitType .= '_' . $order; + $this->order = $order; + $this->polynomialRegression($order, $yValues, $xValues); + if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) { + $this->error = true; + } + } else { + $this->error = true; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php new file mode 100755 index 0000000..4eefec8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php @@ -0,0 +1,114 @@ +getIntersect() * pow(($xValue - $this->xOffset), $this->getSlope()); + } + + /** + * Return the X-Value for a specified value of Y. + * + * @param float $yValue Y-Value + * + * @return float X-Value + */ + public function getValueOfXForY($yValue) + { + return pow((($yValue + $this->yOffset) / $this->getIntersect()), (1 / $this->getSlope())); + } + + /** + * Return the Equation of the best-fit line. + * + * @param int $dp Number of places of decimal precision to display + * + * @return string + */ + public function getEquation($dp = 0) + { + $slope = $this->getSlope($dp); + $intersect = $this->getIntersect($dp); + + return 'Y = ' . $intersect . ' * X^' . $slope; + } + + /** + * Return the Value of X where it intersects Y = 0. + * + * @param int $dp Number of places of decimal precision to display + * + * @return float + */ + public function getIntersect($dp = 0) + { + if ($dp != 0) { + return round(exp($this->intersect), $dp); + } + + return exp($this->intersect); + } + + /** + * Execute the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + private function powerRegression($yValues, $xValues, $const) + { + foreach ($xValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + foreach ($yValues as &$value) { + if ($value < 0.0) { + $value = 0 - log(abs($value)); + } elseif ($value > 0.0) { + $value = log($value); + } + } + unset($value); + + $this->leastSquareFit($yValues, $xValues, $const); + } + + /** + * Define the regression and calculate the goodness of fit for a set of X and Y data values. + * + * @param float[] $yValues The set of Y-values for this regression + * @param float[] $xValues The set of X-values for this regression + * @param bool $const + */ + public function __construct($yValues, $xValues = [], $const = true) + { + parent::__construct($yValues, $xValues); + + if (!$this->error) { + $this->powerRegression($yValues, $xValues, $const); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php new file mode 100755 index 0000000..1b7b390 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php @@ -0,0 +1,120 @@ +getGoodnessOfFit(); + } + if ($trendType != self::TREND_BEST_FIT_NO_POLY) { + foreach (self::$trendTypePolynomialOrders as $trendMethod) { + $order = substr($trendMethod, -1); + $bestFit[$trendMethod] = new PolynomialBestFit($order, $yValues, $xValues, $const); + if ($bestFit[$trendMethod]->getError()) { + unset($bestFit[$trendMethod]); + } else { + $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit(); + } + } + } + // Determine which of our Trend lines is the best fit, and then we return the instance of that Trend class + arsort($bestFitValue); + $bestFitType = key($bestFitValue); + + return $bestFit[$bestFitType]; + default: + return false; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php new file mode 100755 index 0000000..4f7a6a0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php @@ -0,0 +1,92 @@ +openMemory(); + } else { + // Create temporary filename + if ($pTemporaryStorageFolder === null) { + $pTemporaryStorageFolder = File::sysGetTempDir(); + } + $this->tempFileName = @tempnam($pTemporaryStorageFolder, 'xml'); + + // Open storage + if ($this->openUri($this->tempFileName) === false) { + // Fallback to memory... + $this->openMemory(); + } + } + + // Set default values + if (self::$debugEnabled) { + $this->setIndent(true); + } + } + + /** + * Destructor. + */ + public function __destruct() + { + // Unlink temporary files + if ($this->tempFileName != '') { + @unlink($this->tempFileName); + } + } + + /** + * Get written data. + * + * @return string + */ + public function getData() + { + if ($this->tempFileName == '') { + return $this->outputMemory(true); + } + $this->flush(); + + return file_get_contents($this->tempFileName); + } + + /** + * Wrapper method for writeRaw. + * + * @param string|string[] $text + * + * @return bool + */ + public function writeRawData($text) + { + if (is_array($text)) { + $text = implode("\n", $text); + } + + return $this->writeRaw(htmlspecialchars($text)); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Xls.php new file mode 100755 index 0000000..177779f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Xls.php @@ -0,0 +1,283 @@ +getParent()->getDefaultStyle()->getFont(); + + $columnDimensions = $sheet->getColumnDimensions(); + + // first find the true column width in pixels (uncollapsed and unhidden) + if (isset($columnDimensions[$col]) and $columnDimensions[$col]->getWidth() != -1) { + // then we have column dimension with explicit width + $columnDimension = $columnDimensions[$col]; + $width = $columnDimension->getWidth(); + $pixelWidth = Drawing::cellDimensionToPixels($width, $font); + } elseif ($sheet->getDefaultColumnDimension()->getWidth() != -1) { + // then we have default column dimension with explicit width + $defaultColumnDimension = $sheet->getDefaultColumnDimension(); + $width = $defaultColumnDimension->getWidth(); + $pixelWidth = Drawing::cellDimensionToPixels($width, $font); + } else { + // we don't even have any default column dimension. Width depends on default font + $pixelWidth = Font::getDefaultColumnWidthByFont($font, true); + } + + // now find the effective column width in pixels + if (isset($columnDimensions[$col]) and !$columnDimensions[$col]->getVisible()) { + $effectivePixelWidth = 0; + } else { + $effectivePixelWidth = $pixelWidth; + } + + return $effectivePixelWidth; + } + + /** + * Convert the height of a cell from user's units to pixels. By interpolation + * the relationship is: y = 4/3x. If the height hasn't been set by the user we + * use the default value. If the row is hidden we use a value of zero. + * + * @param Worksheet $sheet The sheet + * @param int $row The row index (1-based) + * + * @return int The width in pixels + */ + public static function sizeRow($sheet, $row = 1) + { + // default font of the workbook + $font = $sheet->getParent()->getDefaultStyle()->getFont(); + + $rowDimensions = $sheet->getRowDimensions(); + + // first find the true row height in pixels (uncollapsed and unhidden) + if (isset($rowDimensions[$row]) and $rowDimensions[$row]->getRowHeight() != -1) { + // then we have a row dimension + $rowDimension = $rowDimensions[$row]; + $rowHeight = $rowDimension->getRowHeight(); + $pixelRowHeight = (int) ceil(4 * $rowHeight / 3); // here we assume Arial 10 + } elseif ($sheet->getDefaultRowDimension()->getRowHeight() != -1) { + // then we have a default row dimension with explicit height + $defaultRowDimension = $sheet->getDefaultRowDimension(); + $rowHeight = $defaultRowDimension->getRowHeight(); + $pixelRowHeight = Drawing::pointsToPixels($rowHeight); + } else { + // we don't even have any default row dimension. Height depends on default font + $pointRowHeight = Font::getDefaultRowHeightByFont($font); + $pixelRowHeight = Font::fontSizeToPixels($pointRowHeight); + } + + // now find the effective row height in pixels + if (isset($rowDimensions[$row]) and !$rowDimensions[$row]->getVisible()) { + $effectivePixelRowHeight = 0; + } else { + $effectivePixelRowHeight = $pixelRowHeight; + } + + return $effectivePixelRowHeight; + } + + /** + * Get the horizontal distance in pixels between two anchors + * The distanceX is found as sum of all the spanning columns widths minus correction for the two offsets. + * + * @param Worksheet $sheet + * @param string $startColumn + * @param int $startOffsetX Offset within start cell measured in 1/1024 of the cell width + * @param string $endColumn + * @param int $endOffsetX Offset within end cell measured in 1/1024 of the cell width + * + * @return int Horizontal measured in pixels + */ + public static function getDistanceX(Worksheet $sheet, $startColumn = 'A', $startOffsetX = 0, $endColumn = 'A', $endOffsetX = 0) + { + $distanceX = 0; + + // add the widths of the spanning columns + $startColumnIndex = Coordinate::columnIndexFromString($startColumn); + $endColumnIndex = Coordinate::columnIndexFromString($endColumn); + for ($i = $startColumnIndex; $i <= $endColumnIndex; ++$i) { + $distanceX += self::sizeCol($sheet, Coordinate::stringFromColumnIndex($i)); + } + + // correct for offsetX in startcell + $distanceX -= (int) floor(self::sizeCol($sheet, $startColumn) * $startOffsetX / 1024); + + // correct for offsetX in endcell + $distanceX -= (int) floor(self::sizeCol($sheet, $endColumn) * (1 - $endOffsetX / 1024)); + + return $distanceX; + } + + /** + * Get the vertical distance in pixels between two anchors + * The distanceY is found as sum of all the spanning rows minus two offsets. + * + * @param Worksheet $sheet + * @param int $startRow (1-based) + * @param int $startOffsetY Offset within start cell measured in 1/256 of the cell height + * @param int $endRow (1-based) + * @param int $endOffsetY Offset within end cell measured in 1/256 of the cell height + * + * @return int Vertical distance measured in pixels + */ + public static function getDistanceY(Worksheet $sheet, $startRow = 1, $startOffsetY = 0, $endRow = 1, $endOffsetY = 0) + { + $distanceY = 0; + + // add the widths of the spanning rows + for ($row = $startRow; $row <= $endRow; ++$row) { + $distanceY += self::sizeRow($sheet, $row); + } + + // correct for offsetX in startcell + $distanceY -= (int) floor(self::sizeRow($sheet, $startRow) * $startOffsetY / 256); + + // correct for offsetX in endcell + $distanceY -= (int) floor(self::sizeRow($sheet, $endRow) * (1 - $endOffsetY / 256)); + + return $distanceY; + } + + /** + * Convert 1-cell anchor coordinates to 2-cell anchor coordinates + * This function is ported from PEAR Spreadsheet_Writer_Excel with small modifications. + * + * Calculate the vertices that define the position of the image as required by + * the OBJ record. + * + * +------------+------------+ + * | A | B | + * +-----+------------+------------+ + * | |(x1,y1) | | + * | 1 |(A1)._______|______ | + * | | | | | + * | | | | | + * +-----+----| BITMAP |-----+ + * | | | | | + * | 2 | |______________. | + * | | | (B2)| + * | | | (x2,y2)| + * +---- +------------+------------+ + * + * Example of a bitmap that covers some of the area from cell A1 to cell B2. + * + * Based on the width and height of the bitmap we need to calculate 8 vars: + * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. + * The width and height of the cells are also variable and have to be taken into + * account. + * The values of $col_start and $row_start are passed in from the calling + * function. The values of $col_end and $row_end are calculated by subtracting + * the width and height of the bitmap from the width and height of the + * underlying cells. + * The vertices are expressed as a percentage of the underlying cell width as + * follows (rhs values are in pixels): + * + * x1 = X / W *1024 + * y1 = Y / H *256 + * x2 = (X-1) / W *1024 + * y2 = (Y-1) / H *256 + * + * Where: X is distance from the left side of the underlying cell + * Y is distance from the top of the underlying cell + * W is the width of the cell + * H is the height of the cell + * + * @param Worksheet $sheet + * @param string $coordinates E.g. 'A1' + * @param int $offsetX Horizontal offset in pixels + * @param int $offsetY Vertical offset in pixels + * @param int $width Width in pixels + * @param int $height Height in pixels + * + * @return array + */ + public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height) + { + list($column, $row) = Coordinate::coordinateFromString($coordinates); + $col_start = Coordinate::columnIndexFromString($column); + $row_start = $row - 1; + + $x1 = $offsetX; + $y1 = $offsetY; + + // Initialise end cell to the same as the start cell + $col_end = $col_start; // Col containing lower right corner of object + $row_end = $row_start; // Row containing bottom right corner of object + + // Zero the specified offset if greater than the cell dimensions + if ($x1 >= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start))) { + $x1 = 0; + } + if ($y1 >= self::sizeRow($sheet, $row_start + 1)) { + $y1 = 0; + } + + $width = $width + $x1 - 1; + $height = $height + $y1 - 1; + + // Subtract the underlying cell widths to find the end cell of the image + while ($width >= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end))) { + $width -= self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)); + ++$col_end; + } + + // Subtract the underlying cell heights to find the end cell of the image + while ($height >= self::sizeRow($sheet, $row_end + 1)) { + $height -= self::sizeRow($sheet, $row_end + 1); + ++$row_end; + } + + // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell + // with zero height or width. + if (self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start)) == 0) { + return; + } + if (self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)) == 0) { + return; + } + if (self::sizeRow($sheet, $row_start + 1) == 0) { + return; + } + if (self::sizeRow($sheet, $row_end + 1) == 0) { + return; + } + + // Convert the pixel values to the percentage value expected by Excel + $x1 = $x1 / self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_start)) * 1024; + $y1 = $y1 / self::sizeRow($sheet, $row_start + 1) * 256; + $x2 = ($width + 1) / self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object + $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object + + $startCoordinates = Coordinate::stringFromColumnIndex($col_start) . ($row_start + 1); + $endCoordinates = Coordinate::stringFromColumnIndex($col_end) . ($row_end + 1); + + $twoAnchor = [ + 'startCoordinates' => $startCoordinates, + 'startOffsetX' => $x1, + 'startOffsetY' => $y1, + 'endCoordinates' => $endCoordinates, + 'endOffsetX' => $x2, + 'endOffsetY' => $y2, + ]; + + return $twoAnchor; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php new file mode 100755 index 0000000..8eadcbe --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php @@ -0,0 +1,1490 @@ +hasMacros; + } + + /** + * Define if a workbook has macros. + * + * @param bool $hasMacros true|false + */ + public function setHasMacros($hasMacros) + { + $this->hasMacros = (bool) $hasMacros; + } + + /** + * Set the macros code. + * + * @param string $macroCode string|null + */ + public function setMacrosCode($macroCode) + { + $this->macrosCode = $macroCode; + $this->setHasMacros($macroCode !== null); + } + + /** + * Return the macros code. + * + * @return null|string + */ + public function getMacrosCode() + { + return $this->macrosCode; + } + + /** + * Set the macros certificate. + * + * @param null|string $certificate + */ + public function setMacrosCertificate($certificate) + { + $this->macrosCertificate = $certificate; + } + + /** + * Is the project signed ? + * + * @return bool true|false + */ + public function hasMacrosCertificate() + { + return $this->macrosCertificate !== null; + } + + /** + * Return the macros certificate. + * + * @return null|string + */ + public function getMacrosCertificate() + { + return $this->macrosCertificate; + } + + /** + * Remove all macros, certificate from spreadsheet. + */ + public function discardMacros() + { + $this->hasMacros = false; + $this->macrosCode = null; + $this->macrosCertificate = null; + } + + /** + * set ribbon XML data. + * + * @param null|mixed $target + * @param null|mixed $xmlData + */ + public function setRibbonXMLData($target, $xmlData) + { + if ($target !== null && $xmlData !== null) { + $this->ribbonXMLData = ['target' => $target, 'data' => $xmlData]; + } else { + $this->ribbonXMLData = null; + } + } + + /** + * retrieve ribbon XML Data. + * + * return string|null|array + * + * @param string $what + * + * @return string + */ + public function getRibbonXMLData($what = 'all') //we need some constants here... + { + $returnData = null; + $what = strtolower($what); + switch ($what) { + case 'all': + $returnData = $this->ribbonXMLData; + + break; + case 'target': + case 'data': + if (is_array($this->ribbonXMLData) && isset($this->ribbonXMLData[$what])) { + $returnData = $this->ribbonXMLData[$what]; + } + + break; + } + + return $returnData; + } + + /** + * store binaries ribbon objects (pictures). + * + * @param null|mixed $BinObjectsNames + * @param null|mixed $BinObjectsData + */ + public function setRibbonBinObjects($BinObjectsNames, $BinObjectsData) + { + if ($BinObjectsNames !== null && $BinObjectsData !== null) { + $this->ribbonBinObjects = ['names' => $BinObjectsNames, 'data' => $BinObjectsData]; + } else { + $this->ribbonBinObjects = null; + } + } + + /** + * List of unparsed loaded data for export to same format with better compatibility. + * It has to be minimized when the library start to support currently unparsed data. + * + * @internal + * + * @return array + */ + public function getUnparsedLoadedData() + { + return $this->unparsedLoadedData; + } + + /** + * List of unparsed loaded data for export to same format with better compatibility. + * It has to be minimized when the library start to support currently unparsed data. + * + * @internal + * + * @param array $unparsedLoadedData + */ + public function setUnparsedLoadedData(array $unparsedLoadedData) + { + $this->unparsedLoadedData = $unparsedLoadedData; + } + + /** + * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function). + * + * @param mixed $path + * + * @return string + */ + private function getExtensionOnly($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + + /** + * retrieve Binaries Ribbon Objects. + * + * @param string $what + * + * @return null|array + */ + public function getRibbonBinObjects($what = 'all') + { + $ReturnData = null; + $what = strtolower($what); + switch ($what) { + case 'all': + return $this->ribbonBinObjects; + + break; + case 'names': + case 'data': + if (is_array($this->ribbonBinObjects) && isset($this->ribbonBinObjects[$what])) { + $ReturnData = $this->ribbonBinObjects[$what]; + } + + break; + case 'types': + if (is_array($this->ribbonBinObjects) && + isset($this->ribbonBinObjects['data']) && is_array($this->ribbonBinObjects['data'])) { + $tmpTypes = array_keys($this->ribbonBinObjects['data']); + $ReturnData = array_unique(array_map([$this, 'getExtensionOnly'], $tmpTypes)); + } else { + $ReturnData = []; // the caller want an array... not null if empty + } + + break; + } + + return $ReturnData; + } + + /** + * This workbook have a custom UI ? + * + * @return bool + */ + public function hasRibbon() + { + return $this->ribbonXMLData !== null; + } + + /** + * This workbook have additionnal object for the ribbon ? + * + * @return bool + */ + public function hasRibbonBinObjects() + { + return $this->ribbonBinObjects !== null; + } + + /** + * Check if a sheet with a specified code name already exists. + * + * @param string $pSheetCodeName Name of the worksheet to check + * + * @return bool + */ + public function sheetCodeNameExists($pSheetCodeName) + { + return $this->getSheetByCodeName($pSheetCodeName) !== null; + } + + /** + * Get sheet by code name. Warning : sheet don't have always a code name ! + * + * @param string $pName Sheet name + * + * @return Worksheet + */ + public function getSheetByCodeName($pName) + { + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + if ($this->workSheetCollection[$i]->getCodeName() == $pName) { + return $this->workSheetCollection[$i]; + } + } + + return null; + } + + /** + * Create a new PhpSpreadsheet with one Worksheet. + */ + public function __construct() + { + $this->uniqueID = uniqid('', true); + $this->calculationEngine = new Calculation($this); + + // Initialise worksheet collection and add one worksheet + $this->workSheetCollection = []; + $this->workSheetCollection[] = new Worksheet($this); + $this->activeSheetIndex = 0; + + // Create document properties + $this->properties = new Document\Properties(); + + // Create document security + $this->security = new Document\Security(); + + // Set named ranges + $this->namedRanges = []; + + // Create the cellXf supervisor + $this->cellXfSupervisor = new Style(true); + $this->cellXfSupervisor->bindParent($this); + + // Create the default style + $this->addCellXf(new Style()); + $this->addCellStyleXf(new Style()); + } + + /** + * Code to execute when this worksheet is unset(). + */ + public function __destruct() + { + $this->calculationEngine = null; + $this->disconnectWorksheets(); + } + + /** + * Disconnect all worksheets from this PhpSpreadsheet workbook object, + * typically so that the PhpSpreadsheet object can be unset. + */ + public function disconnectWorksheets() + { + $worksheet = null; + foreach ($this->workSheetCollection as $k => &$worksheet) { + $worksheet->disconnectCells(); + $this->workSheetCollection[$k] = null; + } + unset($worksheet); + $this->workSheetCollection = []; + } + + /** + * Return the calculation engine for this worksheet. + * + * @return Calculation + */ + public function getCalculationEngine() + { + return $this->calculationEngine; + } + + /** + * Get properties. + * + * @return Document\Properties + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Set properties. + * + * @param Document\Properties $pValue + */ + public function setProperties(Document\Properties $pValue) + { + $this->properties = $pValue; + } + + /** + * Get security. + * + * @return Document\Security + */ + public function getSecurity() + { + return $this->security; + } + + /** + * Set security. + * + * @param Document\Security $pValue + */ + public function setSecurity(Document\Security $pValue) + { + $this->security = $pValue; + } + + /** + * Get active sheet. + * + * @throws Exception + * + * @return Worksheet + */ + public function getActiveSheet() + { + return $this->getSheet($this->activeSheetIndex); + } + + /** + * Create sheet and add it to this workbook. + * + * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @throws Exception + * + * @return Worksheet + */ + public function createSheet($sheetIndex = null) + { + $newSheet = new Worksheet($this); + $this->addSheet($newSheet, $sheetIndex); + + return $newSheet; + } + + /** + * Check if a sheet with a specified name already exists. + * + * @param string $pSheetName Name of the worksheet to check + * + * @return bool + */ + public function sheetNameExists($pSheetName) + { + return $this->getSheetByName($pSheetName) !== null; + } + + /** + * Add sheet. + * + * @param Worksheet $pSheet + * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @throws Exception + * + * @return Worksheet + */ + public function addSheet(Worksheet $pSheet, $iSheetIndex = null) + { + if ($this->sheetNameExists($pSheet->getTitle())) { + throw new Exception( + "Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first." + ); + } + + if ($iSheetIndex === null) { + if ($this->activeSheetIndex < 0) { + $this->activeSheetIndex = 0; + } + $this->workSheetCollection[] = $pSheet; + } else { + // Insert the sheet at the requested index + array_splice( + $this->workSheetCollection, + $iSheetIndex, + 0, + [$pSheet] + ); + + // Adjust active sheet index if necessary + if ($this->activeSheetIndex >= $iSheetIndex) { + ++$this->activeSheetIndex; + } + } + + if ($pSheet->getParent() === null) { + $pSheet->rebindParent($this); + } + + return $pSheet; + } + + /** + * Remove sheet by index. + * + * @param int $pIndex Active sheet index + * + * @throws Exception + */ + public function removeSheetByIndex($pIndex) + { + $numSheets = count($this->workSheetCollection); + if ($pIndex > $numSheets - 1) { + throw new Exception( + "You tried to remove a sheet by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." + ); + } + array_splice($this->workSheetCollection, $pIndex, 1); + + // Adjust active sheet index if necessary + if (($this->activeSheetIndex >= $pIndex) && + ($pIndex > count($this->workSheetCollection) - 1)) { + --$this->activeSheetIndex; + } + } + + /** + * Get sheet by index. + * + * @param int $pIndex Sheet index + * + * @throws Exception + * + * @return Worksheet + */ + public function getSheet($pIndex) + { + if (!isset($this->workSheetCollection[$pIndex])) { + $numSheets = $this->getSheetCount(); + + throw new Exception( + "Your requested sheet index: {$pIndex} is out of bounds. The actual number of sheets is {$numSheets}." + ); + } + + return $this->workSheetCollection[$pIndex]; + } + + /** + * Get all sheets. + * + * @return Worksheet[] + */ + public function getAllSheets() + { + return $this->workSheetCollection; + } + + /** + * Get sheet by name. + * + * @param string $pName Sheet name + * + * @return null|Worksheet + */ + public function getSheetByName($pName) + { + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + if ($this->workSheetCollection[$i]->getTitle() === $pName) { + return $this->workSheetCollection[$i]; + } + } + + return null; + } + + /** + * Get index for sheet. + * + * @param Worksheet $pSheet + * + * @throws Exception + * + * @return int index + */ + public function getIndex(Worksheet $pSheet) + { + foreach ($this->workSheetCollection as $key => $value) { + if ($value->getHashCode() == $pSheet->getHashCode()) { + return $key; + } + } + + throw new Exception('Sheet does not exist.'); + } + + /** + * Set index for sheet by sheet name. + * + * @param string $sheetName Sheet name to modify index for + * @param int $newIndex New index for the sheet + * + * @throws Exception + * + * @return int New sheet index + */ + public function setIndexByName($sheetName, $newIndex) + { + $oldIndex = $this->getIndex($this->getSheetByName($sheetName)); + $pSheet = array_splice( + $this->workSheetCollection, + $oldIndex, + 1 + ); + array_splice( + $this->workSheetCollection, + $newIndex, + 0, + $pSheet + ); + + return $newIndex; + } + + /** + * Get sheet count. + * + * @return int + */ + public function getSheetCount() + { + return count($this->workSheetCollection); + } + + /** + * Get active sheet index. + * + * @return int Active sheet index + */ + public function getActiveSheetIndex() + { + return $this->activeSheetIndex; + } + + /** + * Set active sheet index. + * + * @param int $pIndex Active sheet index + * + * @throws Exception + * + * @return Worksheet + */ + public function setActiveSheetIndex($pIndex) + { + $numSheets = count($this->workSheetCollection); + + if ($pIndex > $numSheets - 1) { + throw new Exception( + "You tried to set a sheet active by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." + ); + } + $this->activeSheetIndex = $pIndex; + + return $this->getActiveSheet(); + } + + /** + * Set active sheet index by name. + * + * @param string $pValue Sheet title + * + * @throws Exception + * + * @return Worksheet + */ + public function setActiveSheetIndexByName($pValue) + { + if (($worksheet = $this->getSheetByName($pValue)) instanceof Worksheet) { + $this->setActiveSheetIndex($this->getIndex($worksheet)); + + return $worksheet; + } + + throw new Exception('Workbook does not contain sheet:' . $pValue); + } + + /** + * Get sheet names. + * + * @return string[] + */ + public function getSheetNames() + { + $returnValue = []; + $worksheetCount = $this->getSheetCount(); + for ($i = 0; $i < $worksheetCount; ++$i) { + $returnValue[] = $this->getSheet($i)->getTitle(); + } + + return $returnValue; + } + + /** + * Add external sheet. + * + * @param Worksheet $pSheet External sheet to add + * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) + * + * @throws Exception + * + * @return Worksheet + */ + public function addExternalSheet(Worksheet $pSheet, $iSheetIndex = null) + { + if ($this->sheetNameExists($pSheet->getTitle())) { + throw new Exception("Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename the external sheet first."); + } + + // count how many cellXfs there are in this workbook currently, we will need this below + $countCellXfs = count($this->cellXfCollection); + + // copy all the shared cellXfs from the external workbook and append them to the current + foreach ($pSheet->getParent()->getCellXfCollection() as $cellXf) { + $this->addCellXf(clone $cellXf); + } + + // move sheet to this workbook + $pSheet->rebindParent($this); + + // update the cellXfs + foreach ($pSheet->getCoordinates(false) as $coordinate) { + $cell = $pSheet->getCell($coordinate); + $cell->setXfIndex($cell->getXfIndex() + $countCellXfs); + } + + return $this->addSheet($pSheet, $iSheetIndex); + } + + /** + * Get named ranges. + * + * @return NamedRange[] + */ + public function getNamedRanges() + { + return $this->namedRanges; + } + + /** + * Add named range. + * + * @param NamedRange $namedRange + * + * @return bool + */ + public function addNamedRange(NamedRange $namedRange) + { + if ($namedRange->getScope() == null) { + // global scope + $this->namedRanges[$namedRange->getName()] = $namedRange; + } else { + // local scope + $this->namedRanges[$namedRange->getScope()->getTitle() . '!' . $namedRange->getName()] = $namedRange; + } + + return true; + } + + /** + * Get named range. + * + * @param string $namedRange + * @param null|Worksheet $pSheet Scope. Use null for global scope + * + * @return null|NamedRange + */ + public function getNamedRange($namedRange, Worksheet $pSheet = null) + { + $returnValue = null; + + if ($namedRange != '' && ($namedRange !== null)) { + // first look for global defined name + if (isset($this->namedRanges[$namedRange])) { + $returnValue = $this->namedRanges[$namedRange]; + } + + // then look for local defined name (has priority over global defined name if both names exist) + if (($pSheet !== null) && isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { + $returnValue = $this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]; + } + } + + return $returnValue; + } + + /** + * Remove named range. + * + * @param string $namedRange + * @param null|Worksheet $pSheet scope: use null for global scope + * + * @return Spreadsheet + */ + public function removeNamedRange($namedRange, Worksheet $pSheet = null) + { + if ($pSheet === null) { + if (isset($this->namedRanges[$namedRange])) { + unset($this->namedRanges[$namedRange]); + } + } else { + if (isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { + unset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]); + } + } + + return $this; + } + + /** + * Get worksheet iterator. + * + * @return Iterator + */ + public function getWorksheetIterator() + { + return new Iterator($this); + } + + /** + * Copy workbook (!= clone!). + * + * @return Spreadsheet + */ + public function copy() + { + $copied = clone $this; + + $worksheetCount = count($this->workSheetCollection); + for ($i = 0; $i < $worksheetCount; ++$i) { + $this->workSheetCollection[$i] = $this->workSheetCollection[$i]->copy(); + $this->workSheetCollection[$i]->rebindParent($this); + } + + return $copied; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + foreach ($this as $key => $val) { + if (is_object($val) || (is_array($val))) { + $this->{$key} = unserialize(serialize($val)); + } + } + } + + /** + * Get the workbook collection of cellXfs. + * + * @return Style[] + */ + public function getCellXfCollection() + { + return $this->cellXfCollection; + } + + /** + * Get cellXf by index. + * + * @param int $pIndex + * + * @return Style + */ + public function getCellXfByIndex($pIndex) + { + return $this->cellXfCollection[$pIndex]; + } + + /** + * Get cellXf by hash code. + * + * @param string $pValue + * + * @return false|Style + */ + public function getCellXfByHashCode($pValue) + { + foreach ($this->cellXfCollection as $cellXf) { + if ($cellXf->getHashCode() == $pValue) { + return $cellXf; + } + } + + return false; + } + + /** + * Check if style exists in style collection. + * + * @param Style $pCellStyle + * + * @return bool + */ + public function cellXfExists($pCellStyle) + { + return in_array($pCellStyle, $this->cellXfCollection, true); + } + + /** + * Get default style. + * + * @throws Exception + * + * @return Style + */ + public function getDefaultStyle() + { + if (isset($this->cellXfCollection[0])) { + return $this->cellXfCollection[0]; + } + + throw new Exception('No default style found for this workbook'); + } + + /** + * Add a cellXf to the workbook. + * + * @param Style $style + */ + public function addCellXf(Style $style) + { + $this->cellXfCollection[] = $style; + $style->setIndex(count($this->cellXfCollection) - 1); + } + + /** + * Remove cellXf by index. It is ensured that all cells get their xf index updated. + * + * @param int $pIndex Index to cellXf + * + * @throws Exception + */ + public function removeCellXfByIndex($pIndex) + { + if ($pIndex > count($this->cellXfCollection) - 1) { + throw new Exception('CellXf index is out of bounds.'); + } + + // first remove the cellXf + array_splice($this->cellXfCollection, $pIndex, 1); + + // then update cellXf indexes for cells + foreach ($this->workSheetCollection as $worksheet) { + foreach ($worksheet->getCoordinates(false) as $coordinate) { + $cell = $worksheet->getCell($coordinate); + $xfIndex = $cell->getXfIndex(); + if ($xfIndex > $pIndex) { + // decrease xf index by 1 + $cell->setXfIndex($xfIndex - 1); + } elseif ($xfIndex == $pIndex) { + // set to default xf index 0 + $cell->setXfIndex(0); + } + } + } + } + + /** + * Get the cellXf supervisor. + * + * @return Style + */ + public function getCellXfSupervisor() + { + return $this->cellXfSupervisor; + } + + /** + * Get the workbook collection of cellStyleXfs. + * + * @return Style[] + */ + public function getCellStyleXfCollection() + { + return $this->cellStyleXfCollection; + } + + /** + * Get cellStyleXf by index. + * + * @param int $pIndex Index to cellXf + * + * @return Style + */ + public function getCellStyleXfByIndex($pIndex) + { + return $this->cellStyleXfCollection[$pIndex]; + } + + /** + * Get cellStyleXf by hash code. + * + * @param string $pValue + * + * @return false|Style + */ + public function getCellStyleXfByHashCode($pValue) + { + foreach ($this->cellStyleXfCollection as $cellStyleXf) { + if ($cellStyleXf->getHashCode() == $pValue) { + return $cellStyleXf; + } + } + + return false; + } + + /** + * Add a cellStyleXf to the workbook. + * + * @param Style $pStyle + */ + public function addCellStyleXf(Style $pStyle) + { + $this->cellStyleXfCollection[] = $pStyle; + $pStyle->setIndex(count($this->cellStyleXfCollection) - 1); + } + + /** + * Remove cellStyleXf by index. + * + * @param int $pIndex Index to cellXf + * + * @throws Exception + */ + public function removeCellStyleXfByIndex($pIndex) + { + if ($pIndex > count($this->cellStyleXfCollection) - 1) { + throw new Exception('CellStyleXf index is out of bounds.'); + } + array_splice($this->cellStyleXfCollection, $pIndex, 1); + } + + /** + * Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells + * and columns in the workbook. + */ + public function garbageCollect() + { + // how many references are there to each cellXf ? + $countReferencesCellXf = []; + foreach ($this->cellXfCollection as $index => $cellXf) { + $countReferencesCellXf[$index] = 0; + } + + foreach ($this->getWorksheetIterator() as $sheet) { + // from cells + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + ++$countReferencesCellXf[$cell->getXfIndex()]; + } + + // from row dimensions + foreach ($sheet->getRowDimensions() as $rowDimension) { + if ($rowDimension->getXfIndex() !== null) { + ++$countReferencesCellXf[$rowDimension->getXfIndex()]; + } + } + + // from column dimensions + foreach ($sheet->getColumnDimensions() as $columnDimension) { + ++$countReferencesCellXf[$columnDimension->getXfIndex()]; + } + } + + // remove cellXfs without references and create mapping so we can update xfIndex + // for all cells and columns + $countNeededCellXfs = 0; + foreach ($this->cellXfCollection as $index => $cellXf) { + if ($countReferencesCellXf[$index] > 0 || $index == 0) { // we must never remove the first cellXf + ++$countNeededCellXfs; + } else { + unset($this->cellXfCollection[$index]); + } + $map[$index] = $countNeededCellXfs - 1; + } + $this->cellXfCollection = array_values($this->cellXfCollection); + + // update the index for all cellXfs + foreach ($this->cellXfCollection as $i => $cellXf) { + $cellXf->setIndex($i); + } + + // make sure there is always at least one cellXf (there should be) + if (empty($this->cellXfCollection)) { + $this->cellXfCollection[] = new Style(); + } + + // update the xfIndex for all cells, row dimensions, column dimensions + foreach ($this->getWorksheetIterator() as $sheet) { + // for all cells + foreach ($sheet->getCoordinates(false) as $coordinate) { + $cell = $sheet->getCell($coordinate); + $cell->setXfIndex($map[$cell->getXfIndex()]); + } + + // for all row dimensions + foreach ($sheet->getRowDimensions() as $rowDimension) { + if ($rowDimension->getXfIndex() !== null) { + $rowDimension->setXfIndex($map[$rowDimension->getXfIndex()]); + } + } + + // for all column dimensions + foreach ($sheet->getColumnDimensions() as $columnDimension) { + $columnDimension->setXfIndex($map[$columnDimension->getXfIndex()]); + } + + // also do garbage collection for all the sheets + $sheet->garbageCollect(); + } + } + + /** + * Return the unique ID value assigned to this spreadsheet workbook. + * + * @return string + */ + public function getID() + { + return $this->uniqueID; + } + + /** + * Get the visibility of the horizonal scroll bar in the application. + * + * @return bool True if horizonal scroll bar is visible + */ + public function getShowHorizontalScroll() + { + return $this->showHorizontalScroll; + } + + /** + * Set the visibility of the horizonal scroll bar in the application. + * + * @param bool $showHorizontalScroll True if horizonal scroll bar is visible + */ + public function setShowHorizontalScroll($showHorizontalScroll) + { + $this->showHorizontalScroll = (bool) $showHorizontalScroll; + } + + /** + * Get the visibility of the vertical scroll bar in the application. + * + * @return bool True if vertical scroll bar is visible + */ + public function getShowVerticalScroll() + { + return $this->showVerticalScroll; + } + + /** + * Set the visibility of the vertical scroll bar in the application. + * + * @param bool $showVerticalScroll True if vertical scroll bar is visible + */ + public function setShowVerticalScroll($showVerticalScroll) + { + $this->showVerticalScroll = (bool) $showVerticalScroll; + } + + /** + * Get the visibility of the sheet tabs in the application. + * + * @return bool True if the sheet tabs are visible + */ + public function getShowSheetTabs() + { + return $this->showSheetTabs; + } + + /** + * Set the visibility of the sheet tabs in the application. + * + * @param bool $showSheetTabs True if sheet tabs are visible + */ + public function setShowSheetTabs($showSheetTabs) + { + $this->showSheetTabs = (bool) $showSheetTabs; + } + + /** + * Return whether the workbook window is minimized. + * + * @return bool true if workbook window is minimized + */ + public function getMinimized() + { + return $this->minimized; + } + + /** + * Set whether the workbook window is minimized. + * + * @param bool $minimized true if workbook window is minimized + */ + public function setMinimized($minimized) + { + $this->minimized = (bool) $minimized; + } + + /** + * Return whether to group dates when presenting the user with + * filtering optiomd in the user interface. + * + * @return bool true if workbook window is minimized + */ + public function getAutoFilterDateGrouping() + { + return $this->autoFilterDateGrouping; + } + + /** + * Set whether to group dates when presenting the user with + * filtering optiomd in the user interface. + * + * @param bool $autoFilterDateGrouping true if workbook window is minimized + */ + public function setAutoFilterDateGrouping($autoFilterDateGrouping) + { + $this->autoFilterDateGrouping = (bool) $autoFilterDateGrouping; + } + + /** + * Return the first sheet in the book view. + * + * @return int First sheet in book view + */ + public function getFirstSheetIndex() + { + return $this->firstSheetIndex; + } + + /** + * Set the first sheet in the book view. + * + * @param int $firstSheetIndex First sheet in book view + * + * @throws Exception if the given value is invalid + */ + public function setFirstSheetIndex($firstSheetIndex) + { + if ($firstSheetIndex >= 0) { + $this->firstSheetIndex = (int) $firstSheetIndex; + } else { + throw new Exception('First sheet index must be a positive integer.'); + } + } + + /** + * Return the visibility status of the workbook. + * + * This may be one of the following three values: + * - visibile + * + * @return string Visible status + */ + public function getVisibility() + { + return $this->visibility; + } + + /** + * Set the visibility status of the workbook. + * + * Valid values are: + * - 'visible' (self::VISIBILITY_VISIBLE): + * Workbook window is visible + * - 'hidden' (self::VISIBILITY_HIDDEN): + * Workbook window is hidden, but can be shown by the user + * via the user interface + * - 'veryHidden' (self::VISIBILITY_VERY_HIDDEN): + * Workbook window is hidden and cannot be shown in the + * user interface. + * + * @param string $visibility visibility status of the workbook + * + * @throws Exception if the given value is invalid + */ + public function setVisibility($visibility) + { + if ($visibility === null) { + $visibility = self::VISIBILITY_VISIBLE; + } + + if (in_array($visibility, self::$workbookViewVisibilityValues)) { + $this->visibility = $visibility; + } else { + throw new Exception('Invalid visibility value.'); + } + } + + /** + * Get the ratio between the workbook tabs bar and the horizontal scroll bar. + * TabRatio is assumed to be out of 1000 of the horizontal window width. + * + * @return int Ratio between the workbook tabs bar and the horizontal scroll bar + */ + public function getTabRatio() + { + return $this->tabRatio; + } + + /** + * Set the ratio between the workbook tabs bar and the horizontal scroll bar + * TabRatio is assumed to be out of 1000 of the horizontal window width. + * + * @param int $tabRatio Ratio between the tabs bar and the horizontal scroll bar + * + * @throws Exception if the given value is invalid + */ + public function setTabRatio($tabRatio) + { + if ($tabRatio >= 0 || $tabRatio <= 1000) { + $this->tabRatio = (int) $tabRatio; + } else { + throw new Exception('Tab ratio must be between 0 and 1000.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php new file mode 100755 index 0000000..b4df792 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Alignment.php @@ -0,0 +1,466 @@ +horizontal = null; + $this->vertical = null; + $this->textRotation = null; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Alignment + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getAlignment(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['alignment' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray( + * [ + * 'horizontal' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER, + * 'vertical' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_CENTER, + * 'textRotation' => 0, + * 'wrapText' => TRUE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Alignment + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells()) + ->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['horizontal'])) { + $this->setHorizontal($pStyles['horizontal']); + } + if (isset($pStyles['vertical'])) { + $this->setVertical($pStyles['vertical']); + } + if (isset($pStyles['textRotation'])) { + $this->setTextRotation($pStyles['textRotation']); + } + if (isset($pStyles['wrapText'])) { + $this->setWrapText($pStyles['wrapText']); + } + if (isset($pStyles['shrinkToFit'])) { + $this->setShrinkToFit($pStyles['shrinkToFit']); + } + if (isset($pStyles['indent'])) { + $this->setIndent($pStyles['indent']); + } + if (isset($pStyles['readOrder'])) { + $this->setReadOrder($pStyles['readOrder']); + } + } + + return $this; + } + + /** + * Get Horizontal. + * + * @return string + */ + public function getHorizontal() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHorizontal(); + } + + return $this->horizontal; + } + + /** + * Set Horizontal. + * + * @param string $pValue see self::HORIZONTAL_* + * + * @return Alignment + */ + public function setHorizontal($pValue) + { + if ($pValue == '') { + $pValue = self::HORIZONTAL_GENERAL; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['horizontal' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->horizontal = $pValue; + } + + return $this; + } + + /** + * Get Vertical. + * + * @return string + */ + public function getVertical() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getVertical(); + } + + return $this->vertical; + } + + /** + * Set Vertical. + * + * @param string $pValue see self::VERTICAL_* + * + * @return Alignment + */ + public function setVertical($pValue) + { + if ($pValue == '') { + $pValue = self::VERTICAL_BOTTOM; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['vertical' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->vertical = $pValue; + } + + return $this; + } + + /** + * Get TextRotation. + * + * @return int + */ + public function getTextRotation() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getTextRotation(); + } + + return $this->textRotation; + } + + /** + * Set TextRotation. + * + * @param int $pValue + * + * @throws PhpSpreadsheetException + * + * @return Alignment + */ + public function setTextRotation($pValue) + { + // Excel2007 value 255 => PhpSpreadsheet value -165 + if ($pValue == 255) { + $pValue = -165; + } + + // Set rotation + if (($pValue >= -90 && $pValue <= 90) || $pValue == -165) { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['textRotation' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->textRotation = $pValue; + } + } else { + throw new PhpSpreadsheetException('Text rotation should be a value between -90 and 90.'); + } + + return $this; + } + + /** + * Get Wrap Text. + * + * @return bool + */ + public function getWrapText() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getWrapText(); + } + + return $this->wrapText; + } + + /** + * Set Wrap Text. + * + * @param bool $pValue + * + * @return Alignment + */ + public function setWrapText($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['wrapText' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->wrapText = $pValue; + } + + return $this; + } + + /** + * Get Shrink to fit. + * + * @return bool + */ + public function getShrinkToFit() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getShrinkToFit(); + } + + return $this->shrinkToFit; + } + + /** + * Set Shrink to fit. + * + * @param bool $pValue + * + * @return Alignment + */ + public function setShrinkToFit($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['shrinkToFit' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->shrinkToFit = $pValue; + } + + return $this; + } + + /** + * Get indent. + * + * @return int + */ + public function getIndent() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getIndent(); + } + + return $this->indent; + } + + /** + * Set indent. + * + * @param int $pValue + * + * @return Alignment + */ + public function setIndent($pValue) + { + if ($pValue > 0) { + if ($this->getHorizontal() != self::HORIZONTAL_GENERAL && + $this->getHorizontal() != self::HORIZONTAL_LEFT && + $this->getHorizontal() != self::HORIZONTAL_RIGHT) { + $pValue = 0; // indent not supported + } + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['indent' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->indent = $pValue; + } + + return $this; + } + + /** + * Get read order. + * + * @return int + */ + public function getReadOrder() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getReadOrder(); + } + + return $this->readOrder; + } + + /** + * Set read order. + * + * @param int $pValue + * + * @return Alignment + */ + public function setReadOrder($pValue) + { + if ($pValue < 0 || $pValue > 2) { + $pValue = 0; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['readOrder' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->readOrder = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->horizontal . + $this->vertical . + $this->textRotation . + ($this->wrapText ? 't' : 'f') . + ($this->shrinkToFit ? 't' : 'f') . + $this->indent . + $this->readOrder . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php new file mode 100755 index 0000000..c957cf5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php @@ -0,0 +1,239 @@ +color = new Color(Color::COLOR_BLACK, $isSupervisor); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->color->bindParent($this, 'color'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getSharedComponent() + { + switch ($this->parentPropertyName) { + case 'allBorders': + case 'horizontal': + case 'inside': + case 'outline': + case 'vertical': + throw new PhpSpreadsheetException('Cannot get shared component for a pseudo-border.'); + + break; + case 'bottom': + return $this->parent->getSharedComponent()->getBottom(); + case 'diagonal': + return $this->parent->getSharedComponent()->getDiagonal(); + case 'left': + return $this->parent->getSharedComponent()->getLeft(); + case 'right': + return $this->parent->getSharedComponent()->getRight(); + case 'top': + return $this->parent->getSharedComponent()->getTop(); + } + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return $this->parent->getStyleArray([$this->parentPropertyName => $array]); + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray( + * [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['borderStyle'])) { + $this->setBorderStyle($pStyles['borderStyle']); + } + if (isset($pStyles['color'])) { + $this->getColor()->applyFromArray($pStyles['color']); + } + } + + return $this; + } + + /** + * Get Border style. + * + * @return string + */ + public function getBorderStyle() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBorderStyle(); + } + + return $this->borderStyle; + } + + /** + * Set Border style. + * + * @param bool|string $pValue + * When passing a boolean, FALSE equates Border::BORDER_NONE + * and TRUE to Border::BORDER_MEDIUM + * + * @return Border + */ + public function setBorderStyle($pValue) + { + if (empty($pValue)) { + $pValue = self::BORDER_NONE; + } elseif (is_bool($pValue) && $pValue) { + $pValue = self::BORDER_MEDIUM; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['borderStyle' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->borderStyle = $pValue; + } + + return $this; + } + + /** + * Get Border Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Border Color. + * + * @param Color $pValue + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function setColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->color = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->borderStyle . + $this->color->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Borders.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Borders.php new file mode 100755 index 0000000..a1d6759 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Borders.php @@ -0,0 +1,423 @@ +left = new Border($isSupervisor, $isConditional); + $this->right = new Border($isSupervisor, $isConditional); + $this->top = new Border($isSupervisor, $isConditional); + $this->bottom = new Border($isSupervisor, $isConditional); + $this->diagonal = new Border($isSupervisor, $isConditional); + $this->diagonalDirection = self::DIAGONAL_NONE; + + // Specially for supervisor + if ($isSupervisor) { + // Initialize pseudo-borders + $this->allBorders = new Border(true); + $this->outline = new Border(true); + $this->inside = new Border(true); + $this->vertical = new Border(true); + $this->horizontal = new Border(true); + + // bind parent if we are a supervisor + $this->left->bindParent($this, 'left'); + $this->right->bindParent($this, 'right'); + $this->top->bindParent($this, 'top'); + $this->bottom->bindParent($this, 'bottom'); + $this->diagonal->bindParent($this, 'diagonal'); + $this->allBorders->bindParent($this, 'allBorders'); + $this->outline->bindParent($this, 'outline'); + $this->inside->bindParent($this, 'inside'); + $this->vertical->bindParent($this, 'vertical'); + $this->horizontal->bindParent($this, 'horizontal'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Borders + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getBorders(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['borders' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( + * [ + * 'bottom' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'top' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ] + * ); + * + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( + * [ + * 'allBorders' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Borders + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['left'])) { + $this->getLeft()->applyFromArray($pStyles['left']); + } + if (isset($pStyles['right'])) { + $this->getRight()->applyFromArray($pStyles['right']); + } + if (isset($pStyles['top'])) { + $this->getTop()->applyFromArray($pStyles['top']); + } + if (isset($pStyles['bottom'])) { + $this->getBottom()->applyFromArray($pStyles['bottom']); + } + if (isset($pStyles['diagonal'])) { + $this->getDiagonal()->applyFromArray($pStyles['diagonal']); + } + if (isset($pStyles['diagonalDirection'])) { + $this->setDiagonalDirection($pStyles['diagonalDirection']); + } + if (isset($pStyles['allBorders'])) { + $this->getLeft()->applyFromArray($pStyles['allBorders']); + $this->getRight()->applyFromArray($pStyles['allBorders']); + $this->getTop()->applyFromArray($pStyles['allBorders']); + $this->getBottom()->applyFromArray($pStyles['allBorders']); + } + } + + return $this; + } + + /** + * Get Left. + * + * @return Border + */ + public function getLeft() + { + return $this->left; + } + + /** + * Get Right. + * + * @return Border + */ + public function getRight() + { + return $this->right; + } + + /** + * Get Top. + * + * @return Border + */ + public function getTop() + { + return $this->top; + } + + /** + * Get Bottom. + * + * @return Border + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Get Diagonal. + * + * @return Border + */ + public function getDiagonal() + { + return $this->diagonal; + } + + /** + * Get AllBorders (pseudo-border). Only applies to supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getAllBorders() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->allBorders; + } + + /** + * Get Outline (pseudo-border). Only applies to supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getOutline() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->outline; + } + + /** + * Get Inside (pseudo-border). Only applies to supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getInside() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->inside; + } + + /** + * Get Vertical (pseudo-border). Only applies to supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getVertical() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->vertical; + } + + /** + * Get Horizontal (pseudo-border). Only applies to supervisor. + * + * @throws PhpSpreadsheetException + * + * @return Border + */ + public function getHorizontal() + { + if (!$this->isSupervisor) { + throw new PhpSpreadsheetException('Can only get pseudo-border for supervisor.'); + } + + return $this->horizontal; + } + + /** + * Get DiagonalDirection. + * + * @return int + */ + public function getDiagonalDirection() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getDiagonalDirection(); + } + + return $this->diagonalDirection; + } + + /** + * Set DiagonalDirection. + * + * @param int $pValue see self::DIAGONAL_* + * + * @return Borders + */ + public function setDiagonalDirection($pValue) + { + if ($pValue == '') { + $pValue = self::DIAGONAL_NONE; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['diagonalDirection' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->diagonalDirection = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashcode(); + } + + return md5( + $this->getLeft()->getHashCode() . + $this->getRight()->getHashCode() . + $this->getTop()->getHashCode() . + $this->getBottom()->getHashCode() . + $this->getDiagonal()->getHashCode() . + $this->getDiagonalDirection() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php new file mode 100755 index 0000000..8a1812d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php @@ -0,0 +1,403 @@ +argb = $pARGB; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Color + */ + public function getSharedComponent() + { + switch ($this->parentPropertyName) { + case 'endColor': + return $this->parent->getSharedComponent()->getEndColor(); + case 'color': + return $this->parent->getSharedComponent()->getColor(); + case 'startColor': + return $this->parent->getSharedComponent()->getStartColor(); + } + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return $this->parent->getStyleArray([$this->parentPropertyName => $array]); + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray(['rgb' => '808080']); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Color + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['rgb'])) { + $this->setRGB($pStyles['rgb']); + } + if (isset($pStyles['argb'])) { + $this->setARGB($pStyles['argb']); + } + } + + return $this; + } + + /** + * Get ARGB. + * + * @return string + */ + public function getARGB() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getARGB(); + } + + return $this->argb; + } + + /** + * Set ARGB. + * + * @param string $pValue see self::COLOR_* + * + * @return Color + */ + public function setARGB($pValue) + { + if ($pValue == '') { + $pValue = self::COLOR_BLACK; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['argb' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->argb = $pValue; + } + + return $this; + } + + /** + * Get RGB. + * + * @return string + */ + public function getRGB() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getRGB(); + } + + return substr($this->argb, 2); + } + + /** + * Set RGB. + * + * @param string $pValue RGB value + * + * @return Color + */ + public function setRGB($pValue) + { + if ($pValue == '') { + $pValue = '000000'; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['argb' => 'FF' . $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->argb = 'FF' . $pValue; + } + + return $this; + } + + /** + * Get a specified colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param int $offset Position within the RGB value to extract + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The extracted colour component + */ + private static function getColourComponent($RGB, $offset, $hex = true) + { + $colour = substr($RGB, $offset, 2); + if (!$hex) { + $colour = hexdec($colour); + } + + return $colour; + } + + /** + * Get the red colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The red colour component + */ + public static function getRed($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 6, $hex); + } + + /** + * Get the green colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The green colour component + */ + public static function getGreen($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 4, $hex); + } + + /** + * Get the blue colour component of an RGB value. + * + * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE + * @param bool $hex Flag indicating whether the component should be returned as a hex or a + * decimal value + * + * @return string The blue colour component + */ + public static function getBlue($RGB, $hex = true) + { + return self::getColourComponent($RGB, strlen($RGB) - 2, $hex); + } + + /** + * Adjust the brightness of a color. + * + * @param string $hex The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) + * @param float $adjustPercentage The percentage by which to adjust the colour as a float from -1 to 1 + * + * @return string The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) + */ + public static function changeBrightness($hex, $adjustPercentage) + { + $rgba = (strlen($hex) == 8); + + $red = self::getRed($hex, false); + $green = self::getGreen($hex, false); + $blue = self::getBlue($hex, false); + if ($adjustPercentage > 0) { + $red += (255 - $red) * $adjustPercentage; + $green += (255 - $green) * $adjustPercentage; + $blue += (255 - $blue) * $adjustPercentage; + } else { + $red += $red * $adjustPercentage; + $green += $green * $adjustPercentage; + $blue += $blue * $adjustPercentage; + } + + if ($red < 0) { + $red = 0; + } elseif ($red > 255) { + $red = 255; + } + if ($green < 0) { + $green = 0; + } elseif ($green > 255) { + $green = 255; + } + if ($blue < 0) { + $blue = 0; + } elseif ($blue > 255) { + $blue = 255; + } + + $rgb = strtoupper( + str_pad(dechex($red), 2, '0', 0) . + str_pad(dechex($green), 2, '0', 0) . + str_pad(dechex($blue), 2, '0', 0) + ); + + return (($rgba) ? 'FF' : '') . $rgb; + } + + /** + * Get indexed color. + * + * @param int $pIndex Index entry point into the colour array + * @param bool $background Flag to indicate whether default background or foreground colour + * should be returned if the indexed colour doesn't exist + * + * @return Color + */ + public static function indexedColor($pIndex, $background = false) + { + // Clean parameter + $pIndex = (int) $pIndex; + + // Indexed colors + if (self::$indexedColors === null) { + self::$indexedColors = [ + 1 => 'FF000000', // System Colour #1 - Black + 2 => 'FFFFFFFF', // System Colour #2 - White + 3 => 'FFFF0000', // System Colour #3 - Red + 4 => 'FF00FF00', // System Colour #4 - Green + 5 => 'FF0000FF', // System Colour #5 - Blue + 6 => 'FFFFFF00', // System Colour #6 - Yellow + 7 => 'FFFF00FF', // System Colour #7- Magenta + 8 => 'FF00FFFF', // System Colour #8- Cyan + 9 => 'FF800000', // Standard Colour #9 + 10 => 'FF008000', // Standard Colour #10 + 11 => 'FF000080', // Standard Colour #11 + 12 => 'FF808000', // Standard Colour #12 + 13 => 'FF800080', // Standard Colour #13 + 14 => 'FF008080', // Standard Colour #14 + 15 => 'FFC0C0C0', // Standard Colour #15 + 16 => 'FF808080', // Standard Colour #16 + 17 => 'FF9999FF', // Chart Fill Colour #17 + 18 => 'FF993366', // Chart Fill Colour #18 + 19 => 'FFFFFFCC', // Chart Fill Colour #19 + 20 => 'FFCCFFFF', // Chart Fill Colour #20 + 21 => 'FF660066', // Chart Fill Colour #21 + 22 => 'FFFF8080', // Chart Fill Colour #22 + 23 => 'FF0066CC', // Chart Fill Colour #23 + 24 => 'FFCCCCFF', // Chart Fill Colour #24 + 25 => 'FF000080', // Chart Line Colour #25 + 26 => 'FFFF00FF', // Chart Line Colour #26 + 27 => 'FFFFFF00', // Chart Line Colour #27 + 28 => 'FF00FFFF', // Chart Line Colour #28 + 29 => 'FF800080', // Chart Line Colour #29 + 30 => 'FF800000', // Chart Line Colour #30 + 31 => 'FF008080', // Chart Line Colour #31 + 32 => 'FF0000FF', // Chart Line Colour #32 + 33 => 'FF00CCFF', // Standard Colour #33 + 34 => 'FFCCFFFF', // Standard Colour #34 + 35 => 'FFCCFFCC', // Standard Colour #35 + 36 => 'FFFFFF99', // Standard Colour #36 + 37 => 'FF99CCFF', // Standard Colour #37 + 38 => 'FFFF99CC', // Standard Colour #38 + 39 => 'FFCC99FF', // Standard Colour #39 + 40 => 'FFFFCC99', // Standard Colour #40 + 41 => 'FF3366FF', // Standard Colour #41 + 42 => 'FF33CCCC', // Standard Colour #42 + 43 => 'FF99CC00', // Standard Colour #43 + 44 => 'FFFFCC00', // Standard Colour #44 + 45 => 'FFFF9900', // Standard Colour #45 + 46 => 'FFFF6600', // Standard Colour #46 + 47 => 'FF666699', // Standard Colour #47 + 48 => 'FF969696', // Standard Colour #48 + 49 => 'FF003366', // Standard Colour #49 + 50 => 'FF339966', // Standard Colour #50 + 51 => 'FF003300', // Standard Colour #51 + 52 => 'FF333300', // Standard Colour #52 + 53 => 'FF993300', // Standard Colour #53 + 54 => 'FF993366', // Standard Colour #54 + 55 => 'FF333399', // Standard Colour #55 + 56 => 'FF333333', // Standard Colour #56 + ]; + } + + if (isset(self::$indexedColors[$pIndex])) { + return new self(self::$indexedColors[$pIndex]); + } + + if ($background) { + return new self(self::COLOR_WHITE); + } + + return new self(self::COLOR_BLACK); + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->argb . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php new file mode 100755 index 0000000..91a000d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php @@ -0,0 +1,272 @@ +style = new Style(false, true); + } + + /** + * Get Condition type. + * + * @return string + */ + public function getConditionType() + { + return $this->conditionType; + } + + /** + * Set Condition type. + * + * @param string $pValue Condition type, see self::CONDITION_* + * + * @return Conditional + */ + public function setConditionType($pValue) + { + $this->conditionType = $pValue; + + return $this; + } + + /** + * Get Operator type. + * + * @return string + */ + public function getOperatorType() + { + return $this->operatorType; + } + + /** + * Set Operator type. + * + * @param string $pValue Conditional operator type, see self::OPERATOR_* + * + * @return Conditional + */ + public function setOperatorType($pValue) + { + $this->operatorType = $pValue; + + return $this; + } + + /** + * Get text. + * + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Set text. + * + * @param string $value + * + * @return Conditional + */ + public function setText($value) + { + $this->text = $value; + + return $this; + } + + /** + * Get StopIfTrue. + * + * @return bool + */ + public function getStopIfTrue() + { + return $this->stopIfTrue; + } + + /** + * Set StopIfTrue. + * + * @param bool $value + * + * @return Conditional + */ + public function setStopIfTrue($value) + { + $this->stopIfTrue = $value; + + return $this; + } + + /** + * Get Conditions. + * + * @return string[] + */ + public function getConditions() + { + return $this->condition; + } + + /** + * Set Conditions. + * + * @param string[] $pValue Condition + * + * @return Conditional + */ + public function setConditions($pValue) + { + if (!is_array($pValue)) { + $pValue = [$pValue]; + } + $this->condition = $pValue; + + return $this; + } + + /** + * Add Condition. + * + * @param string $pValue Condition + * + * @return Conditional + */ + public function addCondition($pValue) + { + $this->condition[] = $pValue; + + return $this; + } + + /** + * Get Style. + * + * @return Style + */ + public function getStyle() + { + return $this->style; + } + + /** + * Set Style. + * + * @param Style $pValue + * + * @return Conditional + */ + public function setStyle(Style $pValue = null) + { + $this->style = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->conditionType . + $this->operatorType . + implode(';', $this->condition) . + $this->style->getHashCode() . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Fill.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Fill.php new file mode 100755 index 0000000..c2ad895 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Fill.php @@ -0,0 +1,325 @@ +fillType = null; + } + $this->startColor = new Color(Color::COLOR_WHITE, $isSupervisor, $isConditional); + $this->endColor = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->startColor->bindParent($this, 'startColor'); + $this->endColor->bindParent($this, 'endColor'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Fill + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getFill(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['fill' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray( + * [ + * 'fillType' => Fill::FILL_GRADIENT_LINEAR, + * 'rotation' => 0, + * 'startColor' => [ + * 'rgb' => '000000' + * ], + * 'endColor' => [ + * 'argb' => 'FFFFFFFF' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Fill + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['fillType'])) { + $this->setFillType($pStyles['fillType']); + } + if (isset($pStyles['rotation'])) { + $this->setRotation($pStyles['rotation']); + } + if (isset($pStyles['startColor'])) { + $this->getStartColor()->applyFromArray($pStyles['startColor']); + } + if (isset($pStyles['endColor'])) { + $this->getEndColor()->applyFromArray($pStyles['endColor']); + } + if (isset($pStyles['color'])) { + $this->getStartColor()->applyFromArray($pStyles['color']); + $this->getEndColor()->applyFromArray($pStyles['color']); + } + } + + return $this; + } + + /** + * Get Fill Type. + * + * @return string + */ + public function getFillType() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getFillType(); + } + + return $this->fillType; + } + + /** + * Set Fill Type. + * + * @param string $pValue Fill type, see self::FILL_* + * + * @return Fill + */ + public function setFillType($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['fillType' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->fillType = $pValue; + } + + return $this; + } + + /** + * Get Rotation. + * + * @return float + */ + public function getRotation() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getRotation(); + } + + return $this->rotation; + } + + /** + * Set Rotation. + * + * @param float $pValue + * + * @return Fill + */ + public function setRotation($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['rotation' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->rotation = $pValue; + } + + return $this; + } + + /** + * Get Start Color. + * + * @return Color + */ + public function getStartColor() + { + return $this->startColor; + } + + /** + * Set Start Color. + * + * @param Color $pValue + * + * @throws PhpSpreadsheetException + * + * @return Fill + */ + public function setStartColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getStartColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->startColor = $color; + } + + return $this; + } + + /** + * Get End Color. + * + * @return Color + */ + public function getEndColor() + { + return $this->endColor; + } + + /** + * Set End Color. + * + * @param Color $pValue + * + * @throws PhpSpreadsheetException + * + * @return Fill + */ + public function setEndColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getEndColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->endColor = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->getFillType() . + $this->getRotation() . + $this->getStartColor()->getHashCode() . + $this->getEndColor()->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php new file mode 100755 index 0000000..6d8e23b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php @@ -0,0 +1,556 @@ +name = null; + $this->size = null; + $this->bold = null; + $this->italic = null; + $this->superscript = null; + $this->subscript = null; + $this->underline = null; + $this->strikethrough = null; + $this->color = new Color(Color::COLOR_BLACK, $isSupervisor, $isConditional); + } else { + $this->color = new Color(Color::COLOR_BLACK, $isSupervisor); + } + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->color->bindParent($this, 'color'); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Font + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getFont(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['font' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray( + * [ + * 'name' => 'Arial', + * 'bold' => TRUE, + * 'italic' => FALSE, + * 'underline' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE, + * 'strikethrough' => FALSE, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Font + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['name'])) { + $this->setName($pStyles['name']); + } + if (isset($pStyles['bold'])) { + $this->setBold($pStyles['bold']); + } + if (isset($pStyles['italic'])) { + $this->setItalic($pStyles['italic']); + } + if (isset($pStyles['superscript'])) { + $this->setSuperscript($pStyles['superscript']); + } + if (isset($pStyles['subscript'])) { + $this->setSubscript($pStyles['subscript']); + } + if (isset($pStyles['underline'])) { + $this->setUnderline($pStyles['underline']); + } + if (isset($pStyles['strikethrough'])) { + $this->setStrikethrough($pStyles['strikethrough']); + } + if (isset($pStyles['color'])) { + $this->getColor()->applyFromArray($pStyles['color']); + } + if (isset($pStyles['size'])) { + $this->setSize($pStyles['size']); + } + } + + return $this; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getName(); + } + + return $this->name; + } + + /** + * Set Name. + * + * @param string $pValue + * + * @return Font + */ + public function setName($pValue) + { + if ($pValue == '') { + $pValue = 'Calibri'; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['name' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->name = $pValue; + } + + return $this; + } + + /** + * Get Size. + * + * @return float + */ + public function getSize() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSize(); + } + + return $this->size; + } + + /** + * Set Size. + * + * @param float $pValue + * + * @return Font + */ + public function setSize($pValue) + { + if ($pValue == '') { + $pValue = 10; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['size' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->size = $pValue; + } + + return $this; + } + + /** + * Get Bold. + * + * @return bool + */ + public function getBold() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBold(); + } + + return $this->bold; + } + + /** + * Set Bold. + * + * @param bool $pValue + * + * @return Font + */ + public function setBold($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['bold' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->bold = $pValue; + } + + return $this; + } + + /** + * Get Italic. + * + * @return bool + */ + public function getItalic() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getItalic(); + } + + return $this->italic; + } + + /** + * Set Italic. + * + * @param bool $pValue + * + * @return Font + */ + public function setItalic($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['italic' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->italic = $pValue; + } + + return $this; + } + + /** + * Get Superscript. + * + * @return bool + */ + public function getSuperscript() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSuperscript(); + } + + return $this->superscript; + } + + /** + * Set Superscript. + * + * @param bool $pValue + * + * @return Font + */ + public function setSuperscript($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['superscript' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->superscript = $pValue; + $this->subscript = !$pValue; + } + + return $this; + } + + /** + * Get Subscript. + * + * @return bool + */ + public function getSubscript() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getSubscript(); + } + + return $this->subscript; + } + + /** + * Set Subscript. + * + * @param bool $pValue + * + * @return Font + */ + public function setSubscript($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['subscript' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->subscript = $pValue; + $this->superscript = !$pValue; + } + + return $this; + } + + /** + * Get Underline. + * + * @return string + */ + public function getUnderline() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getUnderline(); + } + + return $this->underline; + } + + /** + * Set Underline. + * + * @param bool|string $pValue \PhpOffice\PhpSpreadsheet\Style\Font underline type + * If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, + * false equates to UNDERLINE_NONE + * + * @return Font + */ + public function setUnderline($pValue) + { + if (is_bool($pValue)) { + $pValue = ($pValue) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE; + } elseif ($pValue == '') { + $pValue = self::UNDERLINE_NONE; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['underline' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->underline = $pValue; + } + + return $this; + } + + /** + * Get Strikethrough. + * + * @return bool + */ + public function getStrikethrough() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getStrikethrough(); + } + + return $this->strikethrough; + } + + /** + * Set Strikethrough. + * + * @param bool $pValue + * + * @return Font + */ + public function setStrikethrough($pValue) + { + if ($pValue == '') { + $pValue = false; + } + + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['strikethrough' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->strikethrough = $pValue; + } + + return $this; + } + + /** + * Get Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Color. + * + * @param Color $pValue + * + * @throws PhpSpreadsheetException + * + * @return Font + */ + public function setColor(Color $pValue) + { + // make sure parameter is a real color and not a supervisor + $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; + + if ($this->isSupervisor) { + $styleArray = $this->getColor()->getStyleArray(['argb' => $color->getARGB()]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->color = $color; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->name . + $this->size . + ($this->bold ? 't' : 'f') . + ($this->italic ? 't' : 'f') . + ($this->superscript ? 't' : 'f') . + ($this->subscript ? 't' : 'f') . + $this->underline . + ($this->strikethrough ? 't' : 'f') . + $this->color->getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php new file mode 100755 index 0000000..3744224 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php @@ -0,0 +1,775 @@ +formatCode = null; + $this->builtInFormatCode = false; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return NumberFormat + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getNumberFormat(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['numberFormat' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray( + * [ + * 'formatCode' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return NumberFormat + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['formatCode'])) { + $this->setFormatCode($pStyles['formatCode']); + } + } + + return $this; + } + + /** + * Get Format Code. + * + * @return string + */ + public function getFormatCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getFormatCode(); + } + if ($this->builtInFormatCode !== false) { + return self::builtInFormatCode($this->builtInFormatCode); + } + + return $this->formatCode; + } + + /** + * Set Format Code. + * + * @param string $pValue see self::FORMAT_* + * + * @return NumberFormat + */ + public function setFormatCode($pValue) + { + if ($pValue == '') { + $pValue = self::FORMAT_GENERAL; + } + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['formatCode' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->formatCode = $pValue; + $this->builtInFormatCode = self::builtInFormatCodeIndex($pValue); + } + + return $this; + } + + /** + * Get Built-In Format Code. + * + * @return int + */ + public function getBuiltInFormatCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getBuiltInFormatCode(); + } + + return $this->builtInFormatCode; + } + + /** + * Set Built-In Format Code. + * + * @param int $pValue + * + * @return NumberFormat + */ + public function setBuiltInFormatCode($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['formatCode' => self::builtInFormatCode($pValue)]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->builtInFormatCode = $pValue; + $this->formatCode = self::builtInFormatCode($pValue); + } + + return $this; + } + + /** + * Fill built-in format codes. + */ + private static function fillBuiltInFormatCodes() + { + // [MS-OI29500: Microsoft Office Implementation Information for ISO/IEC-29500 Standard Compliance] + // 18.8.30. numFmt (Number Format) + // + // The ECMA standard defines built-in format IDs + // 14: "mm-dd-yy" + // 22: "m/d/yy h:mm" + // 37: "#,##0 ;(#,##0)" + // 38: "#,##0 ;[Red](#,##0)" + // 39: "#,##0.00;(#,##0.00)" + // 40: "#,##0.00;[Red](#,##0.00)" + // 47: "mmss.0" + // KOR fmt 55: "yyyy-mm-dd" + // Excel defines built-in format IDs + // 14: "m/d/yyyy" + // 22: "m/d/yyyy h:mm" + // 37: "#,##0_);(#,##0)" + // 38: "#,##0_);[Red](#,##0)" + // 39: "#,##0.00_);(#,##0.00)" + // 40: "#,##0.00_);[Red](#,##0.00)" + // 47: "mm:ss.0" + // KOR fmt 55: "yyyy/mm/dd" + + // Built-in format codes + if (self::$builtInFormats === null) { + self::$builtInFormats = []; + + // General + self::$builtInFormats[0] = self::FORMAT_GENERAL; + self::$builtInFormats[1] = '0'; + self::$builtInFormats[2] = '0.00'; + self::$builtInFormats[3] = '#,##0'; + self::$builtInFormats[4] = '#,##0.00'; + + self::$builtInFormats[9] = '0%'; + self::$builtInFormats[10] = '0.00%'; + self::$builtInFormats[11] = '0.00E+00'; + self::$builtInFormats[12] = '# ?/?'; + self::$builtInFormats[13] = '# ??/??'; + self::$builtInFormats[14] = 'm/d/yyyy'; // Despite ECMA 'mm-dd-yy'; + self::$builtInFormats[15] = 'd-mmm-yy'; + self::$builtInFormats[16] = 'd-mmm'; + self::$builtInFormats[17] = 'mmm-yy'; + self::$builtInFormats[18] = 'h:mm AM/PM'; + self::$builtInFormats[19] = 'h:mm:ss AM/PM'; + self::$builtInFormats[20] = 'h:mm'; + self::$builtInFormats[21] = 'h:mm:ss'; + self::$builtInFormats[22] = 'm/d/yyyy h:mm'; // Despite ECMA 'm/d/yy h:mm'; + + self::$builtInFormats[37] = '#,##0_);(#,##0)'; // Despite ECMA '#,##0 ;(#,##0)'; + self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; // Despite ECMA '#,##0 ;[Red](#,##0)'; + self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; // Despite ECMA '#,##0.00;(#,##0.00)'; + self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; // Despite ECMA '#,##0.00;[Red](#,##0.00)'; + + self::$builtInFormats[44] = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'; + self::$builtInFormats[45] = 'mm:ss'; + self::$builtInFormats[46] = '[h]:mm:ss'; + self::$builtInFormats[47] = 'mm:ss.0'; // Despite ECMA 'mmss.0'; + self::$builtInFormats[48] = '##0.0E+0'; + self::$builtInFormats[49] = '@'; + + // CHT + self::$builtInFormats[27] = '[$-404]e/m/d'; + self::$builtInFormats[30] = 'm/d/yy'; + self::$builtInFormats[36] = '[$-404]e/m/d'; + self::$builtInFormats[50] = '[$-404]e/m/d'; + self::$builtInFormats[57] = '[$-404]e/m/d'; + + // THA + self::$builtInFormats[59] = 't0'; + self::$builtInFormats[60] = 't0.00'; + self::$builtInFormats[61] = 't#,##0'; + self::$builtInFormats[62] = 't#,##0.00'; + self::$builtInFormats[67] = 't0%'; + self::$builtInFormats[68] = 't0.00%'; + self::$builtInFormats[69] = 't# ?/?'; + self::$builtInFormats[70] = 't# ??/??'; + + // JPN + self::$builtInFormats[28] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[29] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[31] = 'yyyy"年"m"月"d"日"'; + self::$builtInFormats[32] = 'h"時"mm"分"'; + self::$builtInFormats[33] = 'h"時"mm"分"ss"秒"'; + self::$builtInFormats[34] = 'yyyy"年"m"月"'; + self::$builtInFormats[35] = 'm"月"d"日"'; + self::$builtInFormats[51] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[52] = 'yyyy"年"m"月"'; + self::$builtInFormats[53] = 'm"月"d"日"'; + self::$builtInFormats[54] = '[$-411]ggge"年"m"月"d"日"'; + self::$builtInFormats[55] = 'yyyy"年"m"月"'; + self::$builtInFormats[56] = 'm"月"d"日"'; + self::$builtInFormats[58] = '[$-411]ggge"年"m"月"d"日"'; + + // Flip array (for faster lookups) + self::$flippedBuiltInFormats = array_flip(self::$builtInFormats); + } + } + + /** + * Get built-in format code. + * + * @param int $pIndex + * + * @return string + */ + public static function builtInFormatCode($pIndex) + { + // Clean parameter + $pIndex = (int) $pIndex; + + // Ensure built-in format codes are available + self::fillBuiltInFormatCodes(); + + // Lookup format code + if (isset(self::$builtInFormats[$pIndex])) { + return self::$builtInFormats[$pIndex]; + } + + return ''; + } + + /** + * Get built-in format code index. + * + * @param string $formatCode + * + * @return bool|int + */ + public static function builtInFormatCodeIndex($formatCode) + { + // Ensure built-in format codes are available + self::fillBuiltInFormatCodes(); + + // Lookup format code + if (isset(self::$flippedBuiltInFormats[$formatCode])) { + return self::$flippedBuiltInFormats[$formatCode]; + } + + return false; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->formatCode . + $this->builtInFormatCode . + __CLASS__ + ); + } + + /** + * Search/replace values to convert Excel date/time format masks to PHP format masks. + * + * @var array + */ + private static $dateFormatReplacements = [ + // first remove escapes related to non-format characters + '\\' => '', + // 12-hour suffix + 'am/pm' => 'A', + // 4-digit year + 'e' => 'Y', + 'yyyy' => 'Y', + // 2-digit year + 'yy' => 'y', + // first letter of month - no php equivalent + 'mmmmm' => 'M', + // full month name + 'mmmm' => 'F', + // short month name + 'mmm' => 'M', + // mm is minutes if time, but can also be month w/leading zero + // so we try to identify times be the inclusion of a : separator in the mask + // It isn't perfect, but the best way I know how + ':mm' => ':i', + 'mm:' => 'i:', + // month leading zero + 'mm' => 'm', + // month no leading zero + 'm' => 'n', + // full day of week name + 'dddd' => 'l', + // short day of week name + 'ddd' => 'D', + // days leading zero + 'dd' => 'd', + // days no leading zero + 'd' => 'j', + // seconds + 'ss' => 's', + // fractional seconds - no php equivalent + '.s' => '', + ]; + + /** + * Search/replace values to convert Excel date/time format masks hours to PHP format masks (24 hr clock). + * + * @var array + */ + private static $dateFormatReplacements24 = [ + 'hh' => 'H', + 'h' => 'G', + ]; + + /** + * Search/replace values to convert Excel date/time format masks hours to PHP format masks (12 hr clock). + * + * @var array + */ + private static $dateFormatReplacements12 = [ + 'hh' => 'h', + 'h' => 'g', + ]; + + private static function setLowercaseCallback($matches) + { + return mb_strtolower($matches[0]); + } + + private static function escapeQuotesCallback($matches) + { + return '\\' . implode('\\', str_split($matches[1])); + } + + private static function formatAsDate(&$value, &$format) + { + // strip off first part containing e.g. [$-F800] or [$USD-409] + // general syntax: [$-] + // language info is in hexadecimal + // strip off chinese part like [DBNum1][$-804] + $format = preg_replace('/^(\[[0-9A-Za-z]*\])*(\[\$[A-Z]*-[0-9A-F]*\])/i', '', $format); + + // OpenOffice.org uses upper-case number formats, e.g. 'YYYY', convert to lower-case; + // but we don't want to change any quoted strings + $format = preg_replace_callback('/(?:^|")([^"]*)(?:$|")/', ['self', 'setLowercaseCallback'], $format); + + // Only process the non-quoted blocks for date format characters + $blocks = explode('"', $format); + foreach ($blocks as $key => &$block) { + if ($key % 2 == 0) { + $block = strtr($block, self::$dateFormatReplacements); + if (!strpos($block, 'A')) { + // 24-hour time format + // when [h]:mm format, the [h] should replace to the hours of the value * 24 + if (false !== strpos($block, '[h]')) { + $hours = (int) ($value * 24); + $block = str_replace('[h]', $hours, $block); + + continue; + } + $block = strtr($block, self::$dateFormatReplacements24); + } else { + // 12-hour time format + $block = strtr($block, self::$dateFormatReplacements12); + } + } + } + $format = implode('"', $blocks); + + // escape any quoted characters so that DateTime format() will render them correctly + $format = preg_replace_callback('/"(.*)"/U', ['self', 'escapeQuotesCallback'], $format); + + $dateObj = Date::excelToDateTimeObject($value); + $value = $dateObj->format($format); + } + + private static function formatAsPercentage(&$value, &$format) + { + if ($format === self::FORMAT_PERCENTAGE) { + $value = round((100 * $value), 0) . '%'; + } else { + if (preg_match('/\.[#0]+/', $format, $m)) { + $s = substr($m[0], 0, 1) . (strlen($m[0]) - 1); + $format = str_replace($m[0], $s, $format); + } + if (preg_match('/^[#0]+/', $format, $m)) { + $format = str_replace($m[0], strlen($m[0]), $format); + } + $format = '%' . str_replace('%', 'f%%', $format); + + $value = sprintf($format, 100 * $value); + } + } + + private static function formatAsFraction(&$value, &$format) + { + $sign = ($value < 0) ? '-' : ''; + + $integerPart = floor(abs($value)); + $decimalPart = trim(fmod(abs($value), 1), '0.'); + $decimalLength = strlen($decimalPart); + $decimalDivisor = pow(10, $decimalLength); + + $GCD = MathTrig::GCD($decimalPart, $decimalDivisor); + + $adjustedDecimalPart = $decimalPart / $GCD; + $adjustedDecimalDivisor = $decimalDivisor / $GCD; + + if ((strpos($format, '0') !== false) || (strpos($format, '#') !== false) || (substr($format, 0, 3) == '? ?')) { + if ($integerPart == 0) { + $integerPart = ''; + } + $value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor"; + } else { + $adjustedDecimalPart += $integerPart * $adjustedDecimalDivisor; + $value = "$sign$adjustedDecimalPart/$adjustedDecimalDivisor"; + } + } + + private static function complexNumberFormatMask($number, $mask) + { + $sign = ($number < 0.0); + $number = abs($number); + if (strpos($mask, '.') !== false) { + $numbers = explode('.', $number . '.0'); + $masks = explode('.', $mask . '.0'); + $result1 = self::complexNumberFormatMask($numbers[0], $masks[0]); + $result2 = strrev(self::complexNumberFormatMask(strrev($numbers[1]), strrev($masks[1]))); + + return (($sign) ? '-' : '') . $result1 . '.' . $result2; + } + + $r = preg_match_all('/0+/', $mask, $result, PREG_OFFSET_CAPTURE); + if ($r > 1) { + $result = array_reverse($result[0]); + + foreach ($result as $block) { + $divisor = 1 . $block[0]; + $size = strlen($block[0]); + $offset = $block[1]; + + $blockValue = sprintf( + '%0' . $size . 'd', + fmod($number, $divisor) + ); + $number = floor($number / $divisor); + $mask = substr_replace($mask, $blockValue, $offset, $size); + } + if ($number > 0) { + $mask = substr_replace($mask, $number, $offset, 0); + } + $result = $mask; + } else { + $result = $number; + } + + return (($sign) ? '-' : '') . $result; + } + + /** + * Convert a value in a pre-defined format to a PHP string. + * + * @param mixed $value Value to format + * @param string $format Format code, see = self::FORMAT_* + * @param array $callBack Callback function for additional formatting of string + * + * @return string Formatted string + */ + public static function toFormattedString($value, $format, $callBack = null) + { + // For now we do not treat strings although section 4 of a format code affects strings + if (!is_numeric($value)) { + return $value; + } + + // For 'General' format code, we just pass the value although this is not entirely the way Excel does it, + // it seems to round numbers to a total of 10 digits. + if (($format === self::FORMAT_GENERAL) || ($format === self::FORMAT_TEXT)) { + return $value; + } + + // Convert any other escaped characters to quoted strings, e.g. (\T to "T") + $format = preg_replace('/(\\\(((.)(?!((AM\/PM)|(A\/P))))|([^ ])))(?=(?:[^"]|"[^"]*")*$)/u', '"${2}"', $format); + + // Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal) + $sections = preg_split('/(;)(?=(?:[^"]|"[^"]*")*$)/u', $format); + + // Extract the relevant section depending on whether number is positive, negative, or zero? + // Text not supported yet. + // Here is how the sections apply to various values in Excel: + // 1 section: [POSITIVE/NEGATIVE/ZERO/TEXT] + // 2 sections: [POSITIVE/ZERO/TEXT] [NEGATIVE] + // 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO] + // 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT] + switch (count($sections)) { + case 1: + $format = $sections[0]; + + break; + case 2: + $format = ($value >= 0) ? $sections[0] : $sections[1]; + $value = abs($value); // Use the absolute value + break; + case 3: + $format = ($value > 0) ? + $sections[0] : (($value < 0) ? + $sections[1] : $sections[2]); + $value = abs($value); // Use the absolute value + break; + case 4: + $format = ($value > 0) ? + $sections[0] : (($value < 0) ? + $sections[1] : $sections[2]); + $value = abs($value); // Use the absolute value + break; + default: + // something is wrong, just use first section + $format = $sections[0]; + + break; + } + + // In Excel formats, "_" is used to add spacing, + // The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space + $format = preg_replace('/_./', ' ', $format); + + // Save format with color information for later use below + $formatColor = $format; + + // Let's begin inspecting the format and converting the value to a formatted string + + // Check for date/time characters (not inside quotes) + if (preg_match('/(\[\$[A-Z]*-[0-9A-F]*\])*[hmsdy](?=(?:[^"]|"[^"]*")*$)/miu', $format, $matches)) { + // datetime format + self::formatAsDate($value, $format); + } else { + // Strip color information + $color_regex = '/^\\[[a-zA-Z]+\\]/'; + $format = preg_replace($color_regex, '', $format); + if (preg_match('/%$/', $format)) { + // % number format + self::formatAsPercentage($value, $format); + } else { + if ($format === self::FORMAT_CURRENCY_EUR_SIMPLE) { + $value = 'EUR ' . sprintf('%1.2f', $value); + } else { + // Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols + $format = str_replace(['"', '*'], '', $format); + + // Find out if we need thousands separator + // This is indicated by a comma enclosed by a digit placeholder: + // #,# or 0,0 + $useThousands = preg_match('/(#,#|0,0)/', $format); + if ($useThousands) { + $format = preg_replace('/0,0/', '00', $format); + $format = preg_replace('/#,#/', '##', $format); + } + + // Scale thousands, millions,... + // This is indicated by a number of commas after a digit placeholder: + // #, or 0.0,, + $scale = 1; // same as no scale + $matches = []; + if (preg_match('/(#|0)(,+)/', $format, $matches)) { + $scale = pow(1000, strlen($matches[2])); + + // strip the commas + $format = preg_replace('/0,+/', '0', $format); + $format = preg_replace('/#,+/', '#', $format); + } + + if (preg_match('/#?.*\?\/\?/', $format, $m)) { + if ($value != (int) $value) { + self::formatAsFraction($value, $format); + } + } else { + // Handle the number itself + + // scale number + $value = $value / $scale; + + // Strip # + $format = preg_replace('/\\#/', '0', $format); + + // Remove locale code [$-###] + $format = preg_replace('/\[\$\-.*\]/', '', $format); + + $n = '/\\[[^\\]]+\\]/'; + $m = preg_replace($n, '', $format); + $number_regex = '/(0+)(\\.?)(0*)/'; + if (preg_match($number_regex, $m, $matches)) { + $left = $matches[1]; + $dec = $matches[2]; + $right = $matches[3]; + + // minimun width of formatted number (including dot) + $minWidth = strlen($left) + strlen($dec) + strlen($right); + if ($useThousands) { + $value = number_format( + $value, + strlen($right), + StringHelper::getDecimalSeparator(), + StringHelper::getThousandsSeparator() + ); + $value = preg_replace($number_regex, $value, $format); + } else { + if (preg_match('/[0#]E[+-]0/i', $format)) { + // Scientific format + $value = sprintf('%5.2E', $value); + } elseif (preg_match('/0([^\d\.]+)0/', $format)) { + $value = self::complexNumberFormatMask($value, $format); + } else { + $sprintf_pattern = "%0$minWidth." . strlen($right) . 'f'; + $value = sprintf($sprintf_pattern, $value); + $value = preg_replace($number_regex, $value, $format); + } + } + } + } + if (preg_match('/\[\$(.*)\]/u', $format, $m)) { + // Currency or Accounting + $currencyCode = $m[1]; + list($currencyCode) = explode('-', $currencyCode); + if ($currencyCode == '') { + $currencyCode = StringHelper::getCurrencyCode(); + } + $value = preg_replace('/\[\$([^\]]*)\]/u', $currencyCode, $value); + } + } + } + } + + // Additional formatting provided by callback function + if ($callBack !== null) { + list($writerInstance, $function) = $callBack; + $value = $writerInstance->$function($value, $formatColor); + } + + return $value; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php new file mode 100755 index 0000000..b5feb53 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php @@ -0,0 +1,190 @@ +locked = self::PROTECTION_INHERIT; + $this->hidden = self::PROTECTION_INHERIT; + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Protection + */ + public function getSharedComponent() + { + return $this->parent->getSharedComponent()->getProtection(); + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['protection' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->getLocked()->applyFromArray( + * [ + * 'locked' => TRUE, + * 'hidden' => FALSE + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * + * @throws PhpSpreadsheetException + * + * @return Protection + */ + public function applyFromArray(array $pStyles) + { + if ($this->isSupervisor) { + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); + } else { + if (isset($pStyles['locked'])) { + $this->setLocked($pStyles['locked']); + } + if (isset($pStyles['hidden'])) { + $this->setHidden($pStyles['hidden']); + } + } + + return $this; + } + + /** + * Get locked. + * + * @return string + */ + public function getLocked() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getLocked(); + } + + return $this->locked; + } + + /** + * Set locked. + * + * @param string $pValue see self::PROTECTION_* + * + * @return Protection + */ + public function setLocked($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['locked' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->locked = $pValue; + } + + return $this; + } + + /** + * Get hidden. + * + * @return string + */ + public function getHidden() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHidden(); + } + + return $this->hidden; + } + + /** + * Set hidden. + * + * @param string $pValue see self::PROTECTION_* + * + * @return Protection + */ + public function setHidden($pValue) + { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['hidden' => $pValue]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->hidden = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getHashCode(); + } + + return md5( + $this->locked . + $this->hidden . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php new file mode 100755 index 0000000..fbe07c2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php @@ -0,0 +1,641 @@ +conditionalStyles = []; + $this->font = new Font($isSupervisor, $isConditional); + $this->fill = new Fill($isSupervisor, $isConditional); + $this->borders = new Borders($isSupervisor, $isConditional); + $this->alignment = new Alignment($isSupervisor, $isConditional); + $this->numberFormat = new NumberFormat($isSupervisor, $isConditional); + $this->protection = new Protection($isSupervisor, $isConditional); + + // bind parent if we are a supervisor + if ($isSupervisor) { + $this->font->bindParent($this); + $this->fill->bindParent($this); + $this->borders->bindParent($this); + $this->alignment->bindParent($this); + $this->numberFormat->bindParent($this); + $this->protection->bindParent($this); + } + } + + /** + * Get the shared style component for the currently active cell in currently active sheet. + * Only used for style supervisor. + * + * @return Style + */ + public function getSharedComponent() + { + $activeSheet = $this->getActiveSheet(); + $selectedCell = $this->getActiveCell(); // e.g. 'A1' + + if ($activeSheet->cellExists($selectedCell)) { + $xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex(); + } else { + $xfIndex = 0; + } + + return $this->parent->getCellXfByIndex($xfIndex); + } + + /** + * Get parent. Only used for style supervisor. + * + * @return Spreadsheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Build style array from subcomponents. + * + * @param array $array + * + * @return array + */ + public function getStyleArray($array) + { + return ['quotePrefix' => $array]; + } + + /** + * Apply styles from array. + * + * + * $spreadsheet->getActiveSheet()->getStyle('B2')->applyFromArray( + * [ + * 'font' => [ + * 'name' => 'Arial', + * 'bold' => true, + * 'italic' => false, + * 'underline' => Font::UNDERLINE_DOUBLE, + * 'strikethrough' => false, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'borders' => [ + * 'bottom' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ], + * 'top' => [ + * 'borderStyle' => Border::BORDER_DASHDOT, + * 'color' => [ + * 'rgb' => '808080' + * ] + * ] + * ], + * 'alignment' => [ + * 'horizontal' => Alignment::HORIZONTAL_CENTER, + * 'vertical' => Alignment::VERTICAL_CENTER, + * 'wrapText' => true, + * ], + * 'quotePrefix' => true + * ] + * ); + * + * + * @param array $pStyles Array containing style information + * @param bool $pAdvanced advanced mode for setting borders + * + * @return Style + */ + public function applyFromArray(array $pStyles, $pAdvanced = true) + { + if ($this->isSupervisor) { + $pRange = $this->getSelectedCells(); + + // Uppercase coordinate + $pRange = strtoupper($pRange); + + // Is it a cell range or a single cell? + if (strpos($pRange, ':') === false) { + $rangeA = $pRange; + $rangeB = $pRange; + } else { + list($rangeA, $rangeB) = explode(':', $pRange); + } + + // Calculate range outer borders + $rangeStart = Coordinate::coordinateFromString($rangeA); + $rangeEnd = Coordinate::coordinateFromString($rangeB); + + // Translate column into index + $rangeStart[0] = Coordinate::columnIndexFromString($rangeStart[0]); + $rangeEnd[0] = Coordinate::columnIndexFromString($rangeEnd[0]); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // ADVANCED MODE: + if ($pAdvanced && isset($pStyles['borders'])) { + // 'allBorders' is a shorthand property for 'outline' and 'inside' and + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['allBorders'])) { + foreach (['outline', 'inside'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['allBorders']; + } + } + unset($pStyles['borders']['allBorders']); // not needed any more + } + // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left' + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['outline'])) { + foreach (['top', 'right', 'bottom', 'left'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['outline']; + } + } + unset($pStyles['borders']['outline']); // not needed any more + } + // 'inside' is a shorthand property for 'vertical' and 'horizontal' + // it applies to components that have not been set explicitly + if (isset($pStyles['borders']['inside'])) { + foreach (['vertical', 'horizontal'] as $component) { + if (!isset($pStyles['borders'][$component])) { + $pStyles['borders'][$component] = $pStyles['borders']['inside']; + } + } + unset($pStyles['borders']['inside']); // not needed any more + } + // width and height characteristics of selection, 1, 2, or 3 (for 3 or more) + $xMax = min($rangeEnd[0] - $rangeStart[0] + 1, 3); + $yMax = min($rangeEnd[1] - $rangeStart[1] + 1, 3); + + // loop through up to 3 x 3 = 9 regions + for ($x = 1; $x <= $xMax; ++$x) { + // start column index for region + $colStart = ($x == 3) ? + Coordinate::stringFromColumnIndex($rangeEnd[0]) + : Coordinate::stringFromColumnIndex($rangeStart[0] + $x - 1); + // end column index for region + $colEnd = ($x == 1) ? + Coordinate::stringFromColumnIndex($rangeStart[0]) + : Coordinate::stringFromColumnIndex($rangeEnd[0] - $xMax + $x); + + for ($y = 1; $y <= $yMax; ++$y) { + // which edges are touching the region + $edges = []; + if ($x == 1) { + // are we at left edge + $edges[] = 'left'; + } + if ($x == $xMax) { + // are we at right edge + $edges[] = 'right'; + } + if ($y == 1) { + // are we at top edge? + $edges[] = 'top'; + } + if ($y == $yMax) { + // are we at bottom edge? + $edges[] = 'bottom'; + } + + // start row index for region + $rowStart = ($y == 3) ? + $rangeEnd[1] : $rangeStart[1] + $y - 1; + + // end row index for region + $rowEnd = ($y == 1) ? + $rangeStart[1] : $rangeEnd[1] - $yMax + $y; + + // build range for region + $range = $colStart . $rowStart . ':' . $colEnd . $rowEnd; + + // retrieve relevant style array for region + $regionStyles = $pStyles; + unset($regionStyles['borders']['inside']); + + // what are the inner edges of the region when looking at the selection + $innerEdges = array_diff(['top', 'right', 'bottom', 'left'], $edges); + + // inner edges that are not touching the region should take the 'inside' border properties if they have been set + foreach ($innerEdges as $innerEdge) { + switch ($innerEdge) { + case 'top': + case 'bottom': + // should pick up 'horizontal' border property if set + if (isset($pStyles['borders']['horizontal'])) { + $regionStyles['borders'][$innerEdge] = $pStyles['borders']['horizontal']; + } else { + unset($regionStyles['borders'][$innerEdge]); + } + + break; + case 'left': + case 'right': + // should pick up 'vertical' border property if set + if (isset($pStyles['borders']['vertical'])) { + $regionStyles['borders'][$innerEdge] = $pStyles['borders']['vertical']; + } else { + unset($regionStyles['borders'][$innerEdge]); + } + + break; + } + } + + // apply region style to region by calling applyFromArray() in simple mode + $this->getActiveSheet()->getStyle($range)->applyFromArray($regionStyles, false); + } + } + + // restore initial cell selection range + $this->getActiveSheet()->getStyle($pRange); + + return $this; + } + + // SIMPLE MODE: + // Selection type, inspect + if (preg_match('/^[A-Z]+1:[A-Z]+1048576$/', $pRange)) { + $selectionType = 'COLUMN'; + } elseif (preg_match('/^A\d+:XFD\d+$/', $pRange)) { + $selectionType = 'ROW'; + } else { + $selectionType = 'CELL'; + } + + // First loop through columns, rows, or cells to find out which styles are affected by this operation + switch ($selectionType) { + case 'COLUMN': + $oldXfIndexes = []; + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + $oldXfIndexes[$this->getActiveSheet()->getColumnDimensionByColumn($col)->getXfIndex()] = true; + } + + break; + case 'ROW': + $oldXfIndexes = []; + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + if ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() == null) { + $oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style + } else { + $oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true; + } + } + + break; + case 'CELL': + $oldXfIndexes = []; + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true; + } + } + + break; + } + + // clone each of the affected styles, apply the style array, and add the new styles to the workbook + $workbook = $this->getActiveSheet()->getParent(); + foreach ($oldXfIndexes as $oldXfIndex => $dummy) { + $style = $workbook->getCellXfByIndex($oldXfIndex); + $newStyle = clone $style; + $newStyle->applyFromArray($pStyles); + + if ($existingStyle = $workbook->getCellXfByHashCode($newStyle->getHashCode())) { + // there is already such cell Xf in our collection + $newXfIndexes[$oldXfIndex] = $existingStyle->getIndex(); + } else { + // we don't have such a cell Xf, need to add + $workbook->addCellXf($newStyle); + $newXfIndexes[$oldXfIndex] = $newStyle->getIndex(); + } + } + + // Loop through columns, rows, or cells again and update the XF index + switch ($selectionType) { + case 'COLUMN': + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + $columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col); + $oldXfIndex = $columnDimension->getXfIndex(); + $columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]); + } + + break; + case 'ROW': + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $rowDimension = $this->getActiveSheet()->getRowDimension($row); + $oldXfIndex = $rowDimension->getXfIndex() === null ? + 0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style + $rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]); + } + + break; + case 'CELL': + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row); + $oldXfIndex = $cell->getXfIndex(); + $cell->setXfIndex($newXfIndexes[$oldXfIndex]); + } + } + + break; + } + } else { + // not a supervisor, just apply the style array directly on style object + if (isset($pStyles['fill'])) { + $this->getFill()->applyFromArray($pStyles['fill']); + } + if (isset($pStyles['font'])) { + $this->getFont()->applyFromArray($pStyles['font']); + } + if (isset($pStyles['borders'])) { + $this->getBorders()->applyFromArray($pStyles['borders']); + } + if (isset($pStyles['alignment'])) { + $this->getAlignment()->applyFromArray($pStyles['alignment']); + } + if (isset($pStyles['numberFormat'])) { + $this->getNumberFormat()->applyFromArray($pStyles['numberFormat']); + } + if (isset($pStyles['protection'])) { + $this->getProtection()->applyFromArray($pStyles['protection']); + } + if (isset($pStyles['quotePrefix'])) { + $this->quotePrefix = $pStyles['quotePrefix']; + } + } + + return $this; + } + + /** + * Get Fill. + * + * @return Fill + */ + public function getFill() + { + return $this->fill; + } + + /** + * Get Font. + * + * @return Font + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. + * + * @param Font $font + * + * @return Style + */ + public function setFont(Font $font) + { + $this->font = $font; + + return $this; + } + + /** + * Get Borders. + * + * @return Borders + */ + public function getBorders() + { + return $this->borders; + } + + /** + * Get Alignment. + * + * @return Alignment + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Get Number Format. + * + * @return NumberFormat + */ + public function getNumberFormat() + { + return $this->numberFormat; + } + + /** + * Get Conditional Styles. Only used on supervisor. + * + * @return Conditional[] + */ + public function getConditionalStyles() + { + return $this->getActiveSheet()->getConditionalStyles($this->getActiveCell()); + } + + /** + * Set Conditional Styles. Only used on supervisor. + * + * @param Conditional[] $pValue Array of conditional styles + * + * @return Style + */ + public function setConditionalStyles(array $pValue) + { + $this->getActiveSheet()->setConditionalStyles($this->getSelectedCells(), $pValue); + + return $this; + } + + /** + * Get Protection. + * + * @return Protection + */ + public function getProtection() + { + return $this->protection; + } + + /** + * Get quote prefix. + * + * @return bool + */ + public function getQuotePrefix() + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getQuotePrefix(); + } + + return $this->quotePrefix; + } + + /** + * Set quote prefix. + * + * @param bool $pValue + * + * @return Style + */ + public function setQuotePrefix($pValue) + { + if ($pValue == '') { + $pValue = false; + } + if ($this->isSupervisor) { + $styleArray = ['quotePrefix' => $pValue]; + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->quotePrefix = (bool) $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + $hashConditionals = ''; + foreach ($this->conditionalStyles as $conditional) { + $hashConditionals .= $conditional->getHashCode(); + } + + return md5( + $this->fill->getHashCode() . + $this->font->getHashCode() . + $this->borders->getHashCode() . + $this->alignment->getHashCode() . + $this->numberFormat->getHashCode() . + $hashConditionals . + $this->protection->getHashCode() . + ($this->quotePrefix ? 't' : 'f') . + __CLASS__ + ); + } + + /** + * Get own index in style collection. + * + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Set own index in style collection. + * + * @param int $pValue + */ + public function setIndex($pValue) + { + $this->index = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Supervisor.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Supervisor.php new file mode 100755 index 0000000..2d1a272 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Supervisor.php @@ -0,0 +1,117 @@ +isSupervisor = $isSupervisor; + } + + /** + * Bind parent. Only used for supervisor. + * + * @param Spreadsheet|Style $parent + * @param null|string $parentPropertyName + * + * @return Supervisor + */ + public function bindParent($parent, $parentPropertyName = null) + { + $this->parent = $parent; + $this->parentPropertyName = $parentPropertyName; + + return $this; + } + + /** + * Is this a supervisor or a cell style component? + * + * @return bool + */ + public function getIsSupervisor() + { + return $this->isSupervisor; + } + + /** + * Get the currently active sheet. Only used for supervisor. + * + * @return Worksheet + */ + public function getActiveSheet() + { + return $this->parent->getActiveSheet(); + } + + /** + * Get the currently active cell coordinate in currently active sheet. + * Only used for supervisor. + * + * @return string E.g. 'A1' + */ + public function getSelectedCells() + { + return $this->getActiveSheet()->getSelectedCells(); + } + + /** + * Get the currently active cell coordinate in currently active sheet. + * Only used for supervisor. + * + * @return string E.g. 'A1' + */ + public function getActiveCell() + { + return $this->getActiveSheet()->getActiveCell(); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ((is_object($value)) && ($key != 'parent')) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php new file mode 100755 index 0000000..494948a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -0,0 +1,873 @@ +range = $pRange; + $this->workSheet = $pSheet; + } + + /** + * Get AutoFilter Parent Worksheet. + * + * @return Worksheet + */ + public function getParent() + { + return $this->workSheet; + } + + /** + * Set AutoFilter Parent Worksheet. + * + * @param Worksheet $pSheet + * + * @return AutoFilter + */ + public function setParent(Worksheet $pSheet = null) + { + $this->workSheet = $pSheet; + + return $this; + } + + /** + * Get AutoFilter Range. + * + * @return string + */ + public function getRange() + { + return $this->range; + } + + /** + * Set AutoFilter Range. + * + * @param string $pRange Cell range (i.e. A1:E10) + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter + */ + public function setRange($pRange) + { + // extract coordinate + list($worksheet, $pRange) = Worksheet::extractSheetTitle($pRange, true); + + if (strpos($pRange, ':') !== false) { + $this->range = $pRange; + } elseif (empty($pRange)) { + $this->range = ''; + } else { + throw new PhpSpreadsheetException('Autofilter must be set on a range of cells.'); + } + + if (empty($pRange)) { + // Discard all column rules + $this->columns = []; + } else { + // Discard any column rules that are no longer valid within this range + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); + foreach ($this->columns as $key => $value) { + $colIndex = Coordinate::columnIndexFromString($key); + if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) { + unset($this->columns[$key]); + } + } + } + + return $this; + } + + /** + * Get all AutoFilter Columns. + * + * @return AutoFilter\Column[] + */ + public function getColumns() + { + return $this->columns; + } + + /** + * Validate that the specified column is in the AutoFilter range. + * + * @param string $column Column name (e.g. A) + * + * @throws PhpSpreadsheetException + * + * @return int The column offset within the autofilter range + */ + public function testColumnInRange($column) + { + if (empty($this->range)) { + throw new PhpSpreadsheetException('No autofilter range is defined.'); + } + + $columnIndex = Coordinate::columnIndexFromString($column); + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); + if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) { + throw new PhpSpreadsheetException('Column is outside of current autofilter range.'); + } + + return $columnIndex - $rangeStart[0]; + } + + /** + * Get a specified AutoFilter Column Offset within the defined AutoFilter range. + * + * @param string $pColumn Column name (e.g. A) + * + * @throws PhpSpreadsheetException + * + * @return int The offset of the specified column within the autofilter range + */ + public function getColumnOffset($pColumn) + { + return $this->testColumnInRange($pColumn); + } + + /** + * Get a specified AutoFilter Column. + * + * @param string $pColumn Column name (e.g. A) + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter\Column + */ + public function getColumn($pColumn) + { + $this->testColumnInRange($pColumn); + + if (!isset($this->columns[$pColumn])) { + $this->columns[$pColumn] = new AutoFilter\Column($pColumn, $this); + } + + return $this->columns[$pColumn]; + } + + /** + * Get a specified AutoFilter Column by it's offset. + * + * @param int $pColumnOffset Column offset within range (starting from 0) + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter\Column + */ + public function getColumnByOffset($pColumnOffset) + { + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); + $pColumn = Coordinate::stringFromColumnIndex($rangeStart[0] + $pColumnOffset); + + return $this->getColumn($pColumn); + } + + /** + * Set AutoFilter. + * + * @param AutoFilter\Column|string $pColumn + * A simple string containing a Column ID like 'A' is permitted + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter + */ + public function setColumn($pColumn) + { + if ((is_string($pColumn)) && (!empty($pColumn))) { + $column = $pColumn; + } elseif (is_object($pColumn) && ($pColumn instanceof AutoFilter\Column)) { + $column = $pColumn->getColumnIndex(); + } else { + throw new PhpSpreadsheetException('Column is not within the autofilter range.'); + } + $this->testColumnInRange($column); + + if (is_string($pColumn)) { + $this->columns[$pColumn] = new AutoFilter\Column($pColumn, $this); + } elseif (is_object($pColumn) && ($pColumn instanceof AutoFilter\Column)) { + $pColumn->setParent($this); + $this->columns[$column] = $pColumn; + } + ksort($this->columns); + + return $this; + } + + /** + * Clear a specified AutoFilter Column. + * + * @param string $pColumn Column name (e.g. A) + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter + */ + public function clearColumn($pColumn) + { + $this->testColumnInRange($pColumn); + + if (isset($this->columns[$pColumn])) { + unset($this->columns[$pColumn]); + } + + return $this; + } + + /** + * Shift an AutoFilter Column Rule to a different column. + * + * Note: This method bypasses validation of the destination column to ensure it is within this AutoFilter range. + * Nor does it verify whether any column rule already exists at $toColumn, but will simply override any existing value. + * Use with caution. + * + * @param string $fromColumn Column name (e.g. A) + * @param string $toColumn Column name (e.g. B) + * + * @return AutoFilter + */ + public function shiftColumn($fromColumn, $toColumn) + { + $fromColumn = strtoupper($fromColumn); + $toColumn = strtoupper($toColumn); + + if (($fromColumn !== null) && (isset($this->columns[$fromColumn])) && ($toColumn !== null)) { + $this->columns[$fromColumn]->setParent(); + $this->columns[$fromColumn]->setColumnIndex($toColumn); + $this->columns[$toColumn] = $this->columns[$fromColumn]; + $this->columns[$toColumn]->setParent($this); + unset($this->columns[$fromColumn]); + + ksort($this->columns); + } + + return $this; + } + + /** + * Test if cell value is in the defined set of values. + * + * @param mixed $cellValue + * @param mixed[] $dataSet + * + * @return bool + */ + private static function filterTestInSimpleDataSet($cellValue, $dataSet) + { + $dataSetValues = $dataSet['filterValues']; + $blanks = $dataSet['blanks']; + if (($cellValue == '') || ($cellValue === null)) { + return $blanks; + } + + return in_array($cellValue, $dataSetValues); + } + + /** + * Test if cell value is in the defined set of Excel date values. + * + * @param mixed $cellValue + * @param mixed[] $dataSet + * + * @return bool + */ + private static function filterTestInDateGroupSet($cellValue, $dataSet) + { + $dateSet = $dataSet['filterValues']; + $blanks = $dataSet['blanks']; + if (($cellValue == '') || ($cellValue === null)) { + return $blanks; + } + + if (is_numeric($cellValue)) { + $dateValue = Date::excelToTimestamp($cellValue); + if ($cellValue < 1) { + // Just the time part + $dtVal = date('His', $dateValue); + $dateSet = $dateSet['time']; + } elseif ($cellValue == floor($cellValue)) { + // Just the date part + $dtVal = date('Ymd', $dateValue); + $dateSet = $dateSet['date']; + } else { + // date and time parts + $dtVal = date('YmdHis', $dateValue); + $dateSet = $dateSet['dateTime']; + } + foreach ($dateSet as $dateValue) { + // Use of substr to extract value at the appropriate group level + if (substr($dtVal, 0, strlen($dateValue)) == $dateValue) { + return true; + } + } + } + + return false; + } + + /** + * Test if cell value is within a set of values defined by a ruleset. + * + * @param mixed $cellValue + * @param mixed[] $ruleSet + * + * @return bool + */ + private static function filterTestInCustomDataSet($cellValue, $ruleSet) + { + $dataSet = $ruleSet['filterRules']; + $join = $ruleSet['join']; + $customRuleForBlanks = isset($ruleSet['customRuleForBlanks']) ? $ruleSet['customRuleForBlanks'] : false; + + if (!$customRuleForBlanks) { + // Blank cells are always ignored, so return a FALSE + if (($cellValue == '') || ($cellValue === null)) { + return false; + } + } + $returnVal = ($join == AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND); + foreach ($dataSet as $rule) { + $retVal = false; + + if (is_numeric($rule['value'])) { + // Numeric values are tested using the appropriate operator + switch ($rule['operator']) { + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL: + $retVal = ($cellValue == $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: + $retVal = ($cellValue != $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN: + $retVal = ($cellValue > $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL: + $retVal = ($cellValue >= $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN: + $retVal = ($cellValue < $rule['value']); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL: + $retVal = ($cellValue <= $rule['value']); + + break; + } + } elseif ($rule['value'] == '') { + switch ($rule['operator']) { + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_EQUAL: + $retVal = (($cellValue == '') || ($cellValue === null)); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: + $retVal = (($cellValue != '') && ($cellValue !== null)); + + break; + default: + $retVal = true; + + break; + } + } else { + // String values are always tested for equality, factoring in for wildcards (hence a regexp test) + $retVal = preg_match('/^' . $rule['value'] . '$/i', $cellValue); + } + // If there are multiple conditions, then we need to test both using the appropriate join operator + switch ($join) { + case AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR: + $returnVal = $returnVal || $retVal; + // Break as soon as we have a TRUE match for OR joins, + // to avoid unnecessary additional code execution + if ($returnVal) { + return $returnVal; + } + + break; + case AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND: + $returnVal = $returnVal && $retVal; + + break; + } + } + + return $returnVal; + } + + /** + * Test if cell date value is matches a set of values defined by a set of months. + * + * @param mixed $cellValue + * @param mixed[] $monthSet + * + * @return bool + */ + private static function filterTestInPeriodDateSet($cellValue, $monthSet) + { + // Blank cells are always ignored, so return a FALSE + if (($cellValue == '') || ($cellValue === null)) { + return false; + } + + if (is_numeric($cellValue)) { + $dateValue = date('m', Date::excelToTimestamp($cellValue)); + if (in_array($dateValue, $monthSet)) { + return true; + } + } + + return false; + } + + /** + * Search/Replace arrays to convert Excel wildcard syntax to a regexp syntax for preg_matching. + * + * @var array + */ + private static $fromReplace = ['\*', '\?', '~~', '~.*', '~.?']; + + private static $toReplace = ['.*', '.', '~', '\*', '\?']; + + /** + * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation. + * + * @param string $dynamicRuleType + * @param AutoFilter\Column $filterColumn + * + * @return mixed[] + */ + private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) + { + $rDateType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_PHP_NUMERIC); + $val = $maxVal = null; + + $ruleValues = []; + $baseDate = DateTime::DATENOW(); + // Calculate start/end dates for the required date range based on current date + switch ($dynamicRuleType) { + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: + $baseDate = strtotime('-7 days', $baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: + $baseDate = strtotime('-7 days', $baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: + $baseDate = strtotime('-1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: + $baseDate = strtotime('+1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: + $baseDate = strtotime('-3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: + $baseDate = strtotime('+3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: + $baseDate = strtotime('-1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: + $baseDate = strtotime('+1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + } + + switch ($dynamicRuleType) { + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: + $maxVal = (int) Date::PHPtoExcel(strtotime('+1 day', $baseDate)); + $val = (int) Date::PHPToExcel($baseDate); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE: + $maxVal = (int) Date::PHPtoExcel(strtotime('+1 day', $baseDate)); + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: + $maxVal = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 31, 12, date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: + $thisMonth = date('m', $baseDate); + $thisQuarter = floor(--$thisMonth / 3); + $maxVal = (int) Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), (1 + $thisQuarter) * 3, date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1 + $thisQuarter * 3, date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: + $maxVal = (int) Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), date('m', $baseDate), date('Y', $baseDate))); + ++$maxVal; + $val = (int) Date::PHPToExcel(gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: + $dayOfWeek = date('w', $baseDate); + $val = (int) Date::PHPToExcel($baseDate) - $dayOfWeek; + $maxVal = $val + 7; + + break; + } + + switch ($dynamicRuleType) { + // Adjust Today dates for Yesterday and Tomorrow + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: + --$maxVal; + --$val; + + break; + case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: + ++$maxVal; + ++$val; + + break; + } + + // Set the filter column rule attributes ready for writing + $filterColumn->setAttributes(['val' => $val, 'maxVal' => $maxVal]); + + // Set the rules for identifying rows for hide/show + $ruleValues[] = ['operator' => AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 'value' => $val]; + $ruleValues[] = ['operator' => AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 'value' => $maxVal]; + Functions::setReturnDateType($rDateType); + + return ['method' => 'filterTestInCustomDataSet', 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND]]; + } + + private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) + { + $range = $columnID . $startRow . ':' . $columnID . $endRow; + $dataValues = Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false)); + + $dataValues = array_filter($dataValues); + if ($ruleType == AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) { + rsort($dataValues); + } else { + sort($dataValues); + } + + return array_pop(array_slice($dataValues, 0, $ruleValue)); + } + + /** + * Apply the AutoFilter rules to the AutoFilter Range. + * + * @throws PhpSpreadsheetException + * + * @return AutoFilter + */ + public function showHideRows() + { + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($this->range); + + // The heading row should always be visible + $this->workSheet->getRowDimension($rangeStart[1])->setVisible(true); + + $columnFilterTests = []; + foreach ($this->columns as $columnID => $filterColumn) { + $rules = $filterColumn->getRules(); + switch ($filterColumn->getFilterType()) { + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_FILTER: + $ruleType = null; + $ruleValues = []; + // Build a list of the filter value selections + foreach ($rules as $rule) { + $ruleType = $rule->getRuleType(); + $ruleValues[] = $rule->getValue(); + } + // Test if we want to include blanks in our filter criteria + $blanks = false; + $ruleDataSet = array_filter($ruleValues); + if (count($ruleValues) != count($ruleDataSet)) { + $blanks = true; + } + if ($ruleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_FILTER) { + // Filter on absolute values + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInSimpleDataSet', + 'arguments' => ['filterValues' => $ruleDataSet, 'blanks' => $blanks], + ]; + } else { + // Filter on date group values + $arguments = [ + 'date' => [], + 'time' => [], + 'dateTime' => [], + ]; + foreach ($ruleDataSet as $ruleValue) { + $date = $time = ''; + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR] !== '')) { + $date .= sprintf('%04d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH] != '')) { + $date .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY] !== '')) { + $date .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE]); + } + if ((isset($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND])) && + ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND] !== '')) { + $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]); + } + $dateTime = $date . $time; + $arguments['date'][] = $date; + $arguments['time'][] = $time; + $arguments['dateTime'][] = $dateTime; + } + // Remove empty elements + $arguments['date'] = array_filter($arguments['date']); + $arguments['time'] = array_filter($arguments['time']); + $arguments['dateTime'] = array_filter($arguments['dateTime']); + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInDateGroupSet', + 'arguments' => ['filterValues' => $arguments, 'blanks' => $blanks], + ]; + } + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER: + $customRuleForBlanks = false; + $ruleValues = []; + // Build a list of the filter value selections + foreach ($rules as $rule) { + $ruleValue = $rule->getValue(); + if (!is_numeric($ruleValue)) { + // Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards + $ruleValue = preg_quote($ruleValue); + $ruleValue = str_replace(self::$fromReplace, self::$toReplace, $ruleValue); + if (trim($ruleValue) == '') { + $customRuleForBlanks = true; + $ruleValue = trim($ruleValue); + } + } + $ruleValues[] = ['operator' => $rule->getOperator(), 'value' => $ruleValue]; + } + $join = $filterColumn->getJoin(); + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => $join, 'customRuleForBlanks' => $customRuleForBlanks], + ]; + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER: + $ruleValues = []; + foreach ($rules as $rule) { + // We should only ever have one Dynamic Filter Rule anyway + $dynamicRuleType = $rule->getGrouping(); + if (($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) || + ($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)) { + // Number (Average) based + // Calculate the average + $averageFormula = '=AVERAGE(' . $columnID . ($rangeStart[1] + 1) . ':' . $columnID . $rangeEnd[1] . ')'; + $average = Calculation::getInstance()->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1')); + // Set above/below rule based on greaterThan or LessTan + $operator = ($dynamicRuleType === AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) + ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN + : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN; + $ruleValues[] = [ + 'operator' => $operator, + 'value' => $average, + ]; + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR], + ]; + } else { + // Date based + if ($dynamicRuleType[0] == 'M' || $dynamicRuleType[0] == 'Q') { + $periodType = ''; + $period = 0; + // Month or Quarter + sscanf($dynamicRuleType, '%[A-Z]%d', $periodType, $period); + if ($periodType == 'M') { + $ruleValues = [$period]; + } else { + --$period; + $periodEnd = (1 + $period) * 3; + $periodStart = 1 + $period * 3; + $ruleValues = range($periodStart, $periodEnd); + } + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInPeriodDateSet', + 'arguments' => $ruleValues, + ]; + $filterColumn->setAttributes([]); + } else { + // Date Range + $columnFilterTests[$columnID] = $this->dynamicFilterDateRange($dynamicRuleType, $filterColumn); + + break; + } + } + } + + break; + case AutoFilter\Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER: + $ruleValues = []; + $dataRowCount = $rangeEnd[1] - $rangeStart[1]; + foreach ($rules as $rule) { + // We should only ever have one Dynamic Filter Rule anyway + $toptenRuleType = $rule->getGrouping(); + $ruleValue = $rule->getValue(); + $ruleOperator = $rule->getOperator(); + } + if ($ruleOperator === AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) { + $ruleValue = floor($ruleValue * ($dataRowCount / 100)); + } + if ($ruleValue < 1) { + $ruleValue = 1; + } + if ($ruleValue > 500) { + $ruleValue = 500; + } + + $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1] + 1, $rangeEnd[1], $toptenRuleType, $ruleValue); + + $operator = ($toptenRuleType == AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) + ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL + : AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL; + $ruleValues[] = ['operator' => $operator, 'value' => $maxVal]; + $columnFilterTests[$columnID] = [ + 'method' => 'filterTestInCustomDataSet', + 'arguments' => ['filterRules' => $ruleValues, 'join' => AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_OR], + ]; + $filterColumn->setAttributes(['maxVal' => $maxVal]); + + break; + } + } + + // Execute the column tests for each row in the autoFilter range to determine show/hide, + for ($row = $rangeStart[1] + 1; $row <= $rangeEnd[1]; ++$row) { + $result = true; + foreach ($columnFilterTests as $columnID => $columnFilterTest) { + $cellValue = $this->workSheet->getCell($columnID . $row)->getCalculatedValue(); + // Execute the filter test + $result = $result && + call_user_func_array( + [self::class, $columnFilterTest['method']], + [$cellValue, $columnFilterTest['arguments']] + ); + // If filter test has resulted in FALSE, exit the loop straightaway rather than running any more tests + if (!$result) { + break; + } + } + // Set show/hide for the row based on the result of the autoFilter result + $this->workSheet->getRowDimension($row)->setVisible($result); + } + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + if ($key === 'workSheet') { + // Detach from worksheet + $this->{$key} = null; + } else { + $this->{$key} = clone $value; + } + } elseif ((is_array($value)) && ($key == 'columns')) { + // The columns array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter objects + $this->{$key} = []; + foreach ($value as $k => $v) { + $this->{$key}[$k] = clone $v; + // attach the new cloned Column to this new cloned Autofilter object + $this->{$key}[$k]->setParent($this); + } + } else { + $this->{$key} = $value; + } + } + } + + /** + * toString method replicates previous behavior by returning the range if object is + * referenced as a property of its parent. + */ + public function __toString() + { + return (string) $this->range; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php new file mode 100755 index 0000000..b5ab61e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php @@ -0,0 +1,388 @@ +columnIndex = $pColumn; + $this->parent = $pParent; + } + + /** + * Get AutoFilter Column Index. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Set AutoFilter Column Index. + * + * @param string $pColumn Column (e.g. A) + * + * @throws PhpSpreadsheetException + * + * @return Column + */ + public function setColumnIndex($pColumn) + { + // Uppercase coordinate + $pColumn = strtoupper($pColumn); + if ($this->parent !== null) { + $this->parent->testColumnInRange($pColumn); + } + + $this->columnIndex = $pColumn; + + return $this; + } + + /** + * Get this Column's AutoFilter Parent. + * + * @return AutoFilter + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set this Column's AutoFilter Parent. + * + * @param AutoFilter $pParent + * + * @return Column + */ + public function setParent(AutoFilter $pParent = null) + { + $this->parent = $pParent; + + return $this; + } + + /** + * Get AutoFilter Type. + * + * @return string + */ + public function getFilterType() + { + return $this->filterType; + } + + /** + * Set AutoFilter Type. + * + * @param string $pFilterType + * + * @throws PhpSpreadsheetException + * + * @return Column + */ + public function setFilterType($pFilterType) + { + if (!in_array($pFilterType, self::$filterTypes)) { + throw new PhpSpreadsheetException('Invalid filter type for column AutoFilter.'); + } + + $this->filterType = $pFilterType; + + return $this; + } + + /** + * Get AutoFilter Multiple Rules And/Or Join. + * + * @return string + */ + public function getJoin() + { + return $this->join; + } + + /** + * Set AutoFilter Multiple Rules And/Or. + * + * @param string $pJoin And/Or + * + * @throws PhpSpreadsheetException + * + * @return Column + */ + public function setJoin($pJoin) + { + // Lowercase And/Or + $pJoin = strtolower($pJoin); + if (!in_array($pJoin, self::$ruleJoins)) { + throw new PhpSpreadsheetException('Invalid rule connection for column AutoFilter.'); + } + + $this->join = $pJoin; + + return $this; + } + + /** + * Set AutoFilter Attributes. + * + * @param string[] $attributes + * + * @return Column + */ + public function setAttributes(array $attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Set An AutoFilter Attribute. + * + * @param string $pName Attribute Name + * @param string $pValue Attribute Value + * + * @return Column + */ + public function setAttribute($pName, $pValue) + { + $this->attributes[$pName] = $pValue; + + return $this; + } + + /** + * Get AutoFilter Column Attributes. + * + * @return string[] + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Get specific AutoFilter Column Attribute. + * + * @param string $pName Attribute Name + * + * @return string + */ + public function getAttribute($pName) + { + if (isset($this->attributes[$pName])) { + return $this->attributes[$pName]; + } + + return null; + } + + /** + * Get all AutoFilter Column Rules. + * + * @return Column\Rule[] + */ + public function getRules() + { + return $this->ruleset; + } + + /** + * Get a specified AutoFilter Column Rule. + * + * @param int $pIndex Rule index in the ruleset array + * + * @return Column\Rule + */ + public function getRule($pIndex) + { + if (!isset($this->ruleset[$pIndex])) { + $this->ruleset[$pIndex] = new Column\Rule($this); + } + + return $this->ruleset[$pIndex]; + } + + /** + * Create a new AutoFilter Column Rule in the ruleset. + * + * @return Column\Rule + */ + public function createRule() + { + $this->ruleset[] = new Column\Rule($this); + + return end($this->ruleset); + } + + /** + * Add a new AutoFilter Column Rule to the ruleset. + * + * @param Column\Rule $pRule + * + * @return Column + */ + public function addRule(Column\Rule $pRule) + { + $pRule->setParent($this); + $this->ruleset[] = $pRule; + + return $this; + } + + /** + * Delete a specified AutoFilter Column Rule + * If the number of rules is reduced to 1, then we reset And/Or logic to Or. + * + * @param int $pIndex Rule index in the ruleset array + * + * @return Column + */ + public function deleteRule($pIndex) + { + if (isset($this->ruleset[$pIndex])) { + unset($this->ruleset[$pIndex]); + // If we've just deleted down to a single rule, then reset And/Or joining to Or + if (count($this->ruleset) <= 1) { + $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); + } + } + + return $this; + } + + /** + * Delete all AutoFilter Column Rules. + * + * @return Column + */ + public function clearRules() + { + $this->ruleset = []; + $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ($key === 'parent') { + // Detach from autofilter parent + $this->parent = null; + } elseif ($key === 'ruleset') { + // The columns array of \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\AutoFilter objects + $this->ruleset = []; + foreach ($value as $k => $v) { + $cloned = clone $v; + $cloned->setParent($this); // attach the new cloned Rule to this new cloned Autofilter Cloned object + $this->ruleset[$k] = $cloned; + } + } elseif (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php new file mode 100755 index 0000000..450bccd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php @@ -0,0 +1,455 @@ + + * + * + * + * + * + */ + const AUTOFILTER_COLUMN_RULE_EQUAL = 'equal'; + const AUTOFILTER_COLUMN_RULE_NOTEQUAL = 'notEqual'; + const AUTOFILTER_COLUMN_RULE_GREATERTHAN = 'greaterThan'; + const AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL = 'greaterThanOrEqual'; + const AUTOFILTER_COLUMN_RULE_LESSTHAN = 'lessThan'; + const AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL = 'lessThanOrEqual'; + + private static $operators = [ + self::AUTOFILTER_COLUMN_RULE_EQUAL, + self::AUTOFILTER_COLUMN_RULE_NOTEQUAL, + self::AUTOFILTER_COLUMN_RULE_GREATERTHAN, + self::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, + self::AUTOFILTER_COLUMN_RULE_LESSTHAN, + self::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, + ]; + + const AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE = 'byValue'; + const AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT = 'byPercent'; + + private static $topTenValue = [ + self::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, + self::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, + ]; + + const AUTOFILTER_COLUMN_RULE_TOPTEN_TOP = 'top'; + const AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM = 'bottom'; + + private static $topTenType = [ + self::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, + self::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, + ]; + + // Rule Operators (Numeric, Boolean etc) +// const AUTOFILTER_COLUMN_RULE_BETWEEN = 'between'; // greaterThanOrEqual 1 && lessThanOrEqual 2 + // Rule Operators (Numeric Special) which are translated to standard numeric operators with calculated values +// const AUTOFILTER_COLUMN_RULE_TOPTEN = 'topTen'; // greaterThan calculated value +// const AUTOFILTER_COLUMN_RULE_TOPTENPERCENT = 'topTenPercent'; // greaterThan calculated value +// const AUTOFILTER_COLUMN_RULE_ABOVEAVERAGE = 'aboveAverage'; // Value is calculated as the average +// const AUTOFILTER_COLUMN_RULE_BELOWAVERAGE = 'belowAverage'; // Value is calculated as the average + // Rule Operators (String) which are set as wild-carded values +// const AUTOFILTER_COLUMN_RULE_BEGINSWITH = 'beginsWith'; // A* +// const AUTOFILTER_COLUMN_RULE_ENDSWITH = 'endsWith'; // *Z +// const AUTOFILTER_COLUMN_RULE_CONTAINS = 'contains'; // *B* +// const AUTOFILTER_COLUMN_RULE_DOESNTCONTAIN = 'notEqual'; // notEqual *B* + // Rule Operators (Date Special) which are translated to standard numeric operators with calculated values +// const AUTOFILTER_COLUMN_RULE_BEFORE = 'lessThan'; +// const AUTOFILTER_COLUMN_RULE_AFTER = 'greaterThan'; +// const AUTOFILTER_COLUMN_RULE_YESTERDAY = 'yesterday'; +// const AUTOFILTER_COLUMN_RULE_TODAY = 'today'; +// const AUTOFILTER_COLUMN_RULE_TOMORROW = 'tomorrow'; +// const AUTOFILTER_COLUMN_RULE_LASTWEEK = 'lastWeek'; +// const AUTOFILTER_COLUMN_RULE_THISWEEK = 'thisWeek'; +// const AUTOFILTER_COLUMN_RULE_NEXTWEEK = 'nextWeek'; +// const AUTOFILTER_COLUMN_RULE_LASTMONTH = 'lastMonth'; +// const AUTOFILTER_COLUMN_RULE_THISMONTH = 'thisMonth'; +// const AUTOFILTER_COLUMN_RULE_NEXTMONTH = 'nextMonth'; +// const AUTOFILTER_COLUMN_RULE_LASTQUARTER = 'lastQuarter'; +// const AUTOFILTER_COLUMN_RULE_THISQUARTER = 'thisQuarter'; +// const AUTOFILTER_COLUMN_RULE_NEXTQUARTER = 'nextQuarter'; +// const AUTOFILTER_COLUMN_RULE_LASTYEAR = 'lastYear'; +// const AUTOFILTER_COLUMN_RULE_THISYEAR = 'thisYear'; +// const AUTOFILTER_COLUMN_RULE_NEXTYEAR = 'nextYear'; +// const AUTOFILTER_COLUMN_RULE_YEARTODATE = 'yearToDate'; // +// const AUTOFILTER_COLUMN_RULE_ALLDATESINMONTH = 'allDatesInMonth'; // for Month/February +// const AUTOFILTER_COLUMN_RULE_ALLDATESINQUARTER = 'allDatesInQuarter'; // for Quarter 2 + + /** + * Autofilter Column. + * + * @var Column + */ + private $parent; + + /** + * Autofilter Rule Type. + * + * @var string + */ + private $ruleType = self::AUTOFILTER_RULETYPE_FILTER; + + /** + * Autofilter Rule Value. + * + * @var string + */ + private $value = ''; + + /** + * Autofilter Rule Operator. + * + * @var string + */ + private $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL; + + /** + * DateTimeGrouping Group Value. + * + * @var string + */ + private $grouping = ''; + + /** + * Create a new Rule. + * + * @param Column $pParent + */ + public function __construct(Column $pParent = null) + { + $this->parent = $pParent; + } + + /** + * Get AutoFilter Rule Type. + * + * @return string + */ + public function getRuleType() + { + return $this->ruleType; + } + + /** + * Set AutoFilter Rule Type. + * + * @param string $pRuleType see self::AUTOFILTER_RULETYPE_* + * + * @throws PhpSpreadsheetException + * + * @return Rule + */ + public function setRuleType($pRuleType) + { + if (!in_array($pRuleType, self::$ruleTypes)) { + throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.'); + } + + $this->ruleType = $pRuleType; + + return $this; + } + + /** + * Get AutoFilter Rule Value. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set AutoFilter Rule Value. + * + * @param string|string[] $pValue + * + * @throws PhpSpreadsheetException + * + * @return Rule + */ + public function setValue($pValue) + { + if (is_array($pValue)) { + $grouping = -1; + foreach ($pValue as $key => $value) { + // Validate array entries + if (!in_array($key, self::$dateTimeGroups)) { + // Remove any invalid entries from the value array + unset($pValue[$key]); + } else { + // Work out what the dateTime grouping will be + $grouping = max($grouping, array_search($key, self::$dateTimeGroups)); + } + } + if (count($pValue) == 0) { + throw new PhpSpreadsheetException('Invalid rule value for column AutoFilter Rule.'); + } + // Set the dateTime grouping that we've anticipated + $this->setGrouping(self::$dateTimeGroups[$grouping]); + } + $this->value = $pValue; + + return $this; + } + + /** + * Get AutoFilter Rule Operator. + * + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Set AutoFilter Rule Operator. + * + * @param string $pOperator see self::AUTOFILTER_COLUMN_RULE_* + * + * @throws PhpSpreadsheetException + * + * @return Rule + */ + public function setOperator($pOperator) + { + if (empty($pOperator)) { + $pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL; + } + if ((!in_array($pOperator, self::$operators)) && + (!in_array($pOperator, self::$topTenValue))) { + throw new PhpSpreadsheetException('Invalid operator for column AutoFilter Rule.'); + } + $this->operator = $pOperator; + + return $this; + } + + /** + * Get AutoFilter Rule Grouping. + * + * @return string + */ + public function getGrouping() + { + return $this->grouping; + } + + /** + * Set AutoFilter Rule Grouping. + * + * @param string $pGrouping + * + * @throws PhpSpreadsheetException + * + * @return Rule + */ + public function setGrouping($pGrouping) + { + if (($pGrouping !== null) && + (!in_array($pGrouping, self::$dateTimeGroups)) && + (!in_array($pGrouping, self::$dynamicTypes)) && + (!in_array($pGrouping, self::$topTenType))) { + throw new PhpSpreadsheetException('Invalid rule type for column AutoFilter Rule.'); + } + $this->grouping = $pGrouping; + + return $this; + } + + /** + * Set AutoFilter Rule. + * + * @param string $pOperator see self::AUTOFILTER_COLUMN_RULE_* + * @param string|string[] $pValue + * @param string $pGrouping + * + * @throws PhpSpreadsheetException + * + * @return Rule + */ + public function setRule($pOperator, $pValue, $pGrouping = null) + { + $this->setOperator($pOperator); + $this->setValue($pValue); + // Only set grouping if it's been passed in as a user-supplied argument, + // otherwise we're calculating it when we setValue() and don't want to overwrite that + // If the user supplies an argumnet for grouping, then on their own head be it + if ($pGrouping !== null) { + $this->setGrouping($pGrouping); + } + + return $this; + } + + /** + * Get this Rule's AutoFilter Column Parent. + * + * @return Column + */ + public function getParent() + { + return $this->parent; + } + + /** + * Set this Rule's AutoFilter Column Parent. + * + * @param Column $pParent + * + * @return Rule + */ + public function setParent(Column $pParent = null) + { + $this->parent = $pParent; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + if ($key == 'parent') { + // Detach from autofilter column parent + $this->$key = null; + } else { + $this->$key = clone $value; + } + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/BaseDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/BaseDrawing.php new file mode 100755 index 0000000..98b6897 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/BaseDrawing.php @@ -0,0 +1,537 @@ +name = ''; + $this->description = ''; + $this->worksheet = null; + $this->coordinates = 'A1'; + $this->offsetX = 0; + $this->offsetY = 0; + $this->width = 0; + $this->height = 0; + $this->resizeProportional = true; + $this->rotation = 0; + $this->shadow = new Drawing\Shadow(); + + // Set image index + ++self::$imageCounter; + $this->imageIndex = self::$imageCounter; + } + + /** + * Get image index. + * + * @return int + */ + public function getImageIndex() + { + return $this->imageIndex; + } + + /** + * Get Name. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Set Name. + * + * @param string $pValue + * + * @return BaseDrawing + */ + public function setName($pValue) + { + $this->name = $pValue; + + return $this; + } + + /** + * Get Description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set Description. + * + * @param string $description + * + * @return BaseDrawing + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Get Worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } + + /** + * Set Worksheet. + * + * @param Worksheet $pValue + * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? + * + * @throws PhpSpreadsheetException + * + * @return BaseDrawing + */ + public function setWorksheet(Worksheet $pValue = null, $pOverrideOld = false) + { + if ($this->worksheet === null) { + // Add drawing to \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $this->worksheet = $pValue; + $this->worksheet->getCell($this->coordinates); + $this->worksheet->getDrawingCollection()->append($this); + } else { + if ($pOverrideOld) { + // Remove drawing from old \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $iterator = $this->worksheet->getDrawingCollection()->getIterator(); + + while ($iterator->valid()) { + if ($iterator->current()->getHashCode() == $this->getHashCode()) { + $this->worksheet->getDrawingCollection()->offsetUnset($iterator->key()); + $this->worksheet = null; + + break; + } + } + + // Set new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + $this->setWorksheet($pValue); + } else { + throw new PhpSpreadsheetException('A Worksheet has already been assigned. Drawings can only exist on one \\PhpOffice\\PhpSpreadsheet\\Worksheet.'); + } + } + + return $this; + } + + /** + * Get Coordinates. + * + * @return string + */ + public function getCoordinates() + { + return $this->coordinates; + } + + /** + * Set Coordinates. + * + * @param string $pValue eg: 'A1' + * + * @return BaseDrawing + */ + public function setCoordinates($pValue) + { + $this->coordinates = $pValue; + + return $this; + } + + /** + * Get OffsetX. + * + * @return int + */ + public function getOffsetX() + { + return $this->offsetX; + } + + /** + * Set OffsetX. + * + * @param int $pValue + * + * @return BaseDrawing + */ + public function setOffsetX($pValue) + { + $this->offsetX = $pValue; + + return $this; + } + + /** + * Get OffsetY. + * + * @return int + */ + public function getOffsetY() + { + return $this->offsetY; + } + + /** + * Set OffsetY. + * + * @param int $pValue + * + * @return BaseDrawing + */ + public function setOffsetY($pValue) + { + $this->offsetY = $pValue; + + return $this; + } + + /** + * Get Width. + * + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param int $pValue + * + * @return BaseDrawing + */ + public function setWidth($pValue) + { + // Resize proportional? + if ($this->resizeProportional && $pValue != 0) { + $ratio = $this->height / ($this->width != 0 ? $this->width : 1); + $this->height = round($ratio * $pValue); + } + + // Set width + $this->width = $pValue; + + return $this; + } + + /** + * Get Height. + * + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Set Height. + * + * @param int $pValue + * + * @return BaseDrawing + */ + public function setHeight($pValue) + { + // Resize proportional? + if ($this->resizeProportional && $pValue != 0) { + $ratio = $this->width / ($this->height != 0 ? $this->height : 1); + $this->width = round($ratio * $pValue); + } + + // Set height + $this->height = $pValue; + + return $this; + } + + /** + * Set width and height with proportional resize. + * + * Example: + * + * $objDrawing->setResizeProportional(true); + * $objDrawing->setWidthAndHeight(160,120); + * + * + * @author Vincent@luo MSN:kele_100@hotmail.com + * + * @param int $width + * @param int $height + * + * @return BaseDrawing + */ + public function setWidthAndHeight($width, $height) + { + $xratio = $width / ($this->width != 0 ? $this->width : 1); + $yratio = $height / ($this->height != 0 ? $this->height : 1); + if ($this->resizeProportional && !($width == 0 || $height == 0)) { + if (($xratio * $this->height) < $height) { + $this->height = ceil($xratio * $this->height); + $this->width = $width; + } else { + $this->width = ceil($yratio * $this->width); + $this->height = $height; + } + } else { + $this->width = $width; + $this->height = $height; + } + + return $this; + } + + /** + * Get ResizeProportional. + * + * @return bool + */ + public function getResizeProportional() + { + return $this->resizeProportional; + } + + /** + * Set ResizeProportional. + * + * @param bool $pValue + * + * @return BaseDrawing + */ + public function setResizeProportional($pValue) + { + $this->resizeProportional = $pValue; + + return $this; + } + + /** + * Get Rotation. + * + * @return int + */ + public function getRotation() + { + return $this->rotation; + } + + /** + * Set Rotation. + * + * @param int $pValue + * + * @return BaseDrawing + */ + public function setRotation($pValue) + { + $this->rotation = $pValue; + + return $this; + } + + /** + * Get Shadow. + * + * @return Drawing\Shadow + */ + public function getShadow() + { + return $this->shadow; + } + + /** + * Set Shadow. + * + * @param Drawing\Shadow $pValue + * + * @return BaseDrawing + */ + public function setShadow(Drawing\Shadow $pValue = null) + { + $this->shadow = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->name . + $this->description . + $this->worksheet->getHashCode() . + $this->coordinates . + $this->offsetX . + $this->offsetY . + $this->width . + $this->height . + $this->rotation . + $this->shadow->getHashCode() . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if ($key == 'worksheet') { + $this->worksheet = null; + } elseif (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } + + /** + * @param null|Hyperlink $pHyperlink + */ + public function setHyperlink(Hyperlink $pHyperlink = null) + { + $this->hyperlink = $pHyperlink; + } + + /** + * @return null|Hyperlink + */ + public function getHyperlink() + { + return $this->hyperlink; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php new file mode 100755 index 0000000..d97e33f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/CellIterator.php @@ -0,0 +1,61 @@ +worksheet); + } + + /** + * Get loop only existing cells. + * + * @return bool + */ + public function getIterateOnlyExistingCells() + { + return $this->onlyExistingCells; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + * + * @throws PhpSpreadsheetException + */ + abstract protected function adjustForExistingOnlyRange(); + + /** + * Set the iterator to loop only existing cells. + * + * @param bool $value + * + * @throws PhpSpreadsheetException + */ + public function setIterateOnlyExistingCells($value) + { + $this->onlyExistingCells = (bool) $value; + + $this->adjustForExistingOnlyRange(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Column.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Column.php new file mode 100755 index 0000000..4baaae1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Column.php @@ -0,0 +1,64 @@ +parent = $parent; + $this->columnIndex = $columnIndex; + } + + /** + * Destructor. + */ + public function __destruct() + { + unset($this->parent); + } + + /** + * Get column index. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Get cell iterator. + * + * @param int $startRow The row number at which to start iterating + * @param int $endRow Optionally, the row number at which to stop iterating + * + * @return ColumnCellIterator + */ + public function getCellIterator($startRow = 1, $endRow = null) + { + return new ColumnCellIterator($this->parent, $this->columnIndex, $startRow, $endRow); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php new file mode 100755 index 0000000..7e8f040 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -0,0 +1,197 @@ +worksheet = $subject; + $this->columnIndex = Coordinate::columnIndexFromString($columnIndex); + $this->resetEnd($endRow); + $this->resetStart($startRow); + } + + /** + * (Re)Set the start row and the current row pointer. + * + * @param int $startRow The row number at which to start iterating + * + * @throws PhpSpreadsheetException + * + * @return ColumnCellIterator + */ + public function resetStart($startRow = 1) + { + $this->startRow = $startRow; + $this->adjustForExistingOnlyRange(); + $this->seek($startRow); + + return $this; + } + + /** + * (Re)Set the end row. + * + * @param int $endRow The row number at which to stop iterating + * + * @throws PhpSpreadsheetException + * + * @return ColumnCellIterator + */ + public function resetEnd($endRow = null) + { + $this->endRow = ($endRow) ? $endRow : $this->worksheet->getHighestRow(); + $this->adjustForExistingOnlyRange(); + + return $this; + } + + /** + * Set the row pointer to the selected row. + * + * @param int $row The row number to set the current pointer at + * + * @throws PhpSpreadsheetException + * + * @return ColumnCellIterator + */ + public function seek($row = 1) + { + if (($row < $this->startRow) || ($row > $this->endRow)) { + throw new PhpSpreadsheetException("Row $row is out of range ({$this->startRow} - {$this->endRow})"); + } elseif ($this->onlyExistingCells && !($this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $row))) { + throw new PhpSpreadsheetException('In "IterateOnlyExistingCells" mode and Cell does not exist'); + } + $this->currentRow = $row; + + return $this; + } + + /** + * Rewind the iterator to the starting row. + */ + public function rewind() + { + $this->currentRow = $this->startRow; + } + + /** + * Return the current cell in this worksheet column. + * + * @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function current() + { + return $this->worksheet->getCellByColumnAndRow($this->columnIndex, $this->currentRow); + } + + /** + * Return the current iterator key. + * + * @return int + */ + public function key() + { + return $this->currentRow; + } + + /** + * Set the iterator to its next value. + */ + public function next() + { + do { + ++$this->currentRow; + } while (($this->onlyExistingCells) && + (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) && + ($this->currentRow <= $this->endRow)); + } + + /** + * Set the iterator to its previous value. + */ + public function prev() + { + do { + --$this->currentRow; + } while (($this->onlyExistingCells) && + (!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->currentRow)) && + ($this->currentRow >= $this->startRow)); + } + + /** + * Indicate if more rows exist in the worksheet range of rows that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentRow <= $this->endRow && $this->currentRow >= $this->startRow; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + * + * @throws PhpSpreadsheetException + */ + protected function adjustForExistingOnlyRange() + { + if ($this->onlyExistingCells) { + while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) && + ($this->startRow <= $this->endRow)) { + ++$this->startRow; + } + if ($this->startRow > $this->endRow) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + while ((!$this->worksheet->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) && + ($this->endRow >= $this->startRow)) { + --$this->endRow; + } + if ($this->endRow < $this->startRow) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnDimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnDimension.php new file mode 100755 index 0000000..e2ea8af --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnDimension.php @@ -0,0 +1,115 @@ +columnIndex = $pIndex; + + // set dimension as unformatted by default + parent::__construct(0); + } + + /** + * Get ColumnIndex. + * + * @return string + */ + public function getColumnIndex() + { + return $this->columnIndex; + } + + /** + * Set ColumnIndex. + * + * @param string $pValue + * + * @return ColumnDimension + */ + public function setColumnIndex($pValue) + { + $this->columnIndex = $pValue; + + return $this; + } + + /** + * Get Width. + * + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Set Width. + * + * @param float $pValue + * + * @return ColumnDimension + */ + public function setWidth($pValue) + { + $this->width = $pValue; + + return $this; + } + + /** + * Get Auto Size. + * + * @return bool + */ + public function getAutoSize() + { + return $this->autoSize; + } + + /** + * Set Auto Size. + * + * @param bool $pValue + * + * @return ColumnDimension + */ + public function setAutoSize($pValue) + { + $this->autoSize = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php new file mode 100755 index 0000000..d2b57aa --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/ColumnIterator.php @@ -0,0 +1,175 @@ +worksheet = $worksheet; + $this->resetEnd($endColumn); + $this->resetStart($startColumn); + } + + /** + * Destructor. + */ + public function __destruct() + { + unset($this->worksheet); + } + + /** + * (Re)Set the start column and the current column pointer. + * + * @param string $startColumn The column address at which to start iterating + * + * @throws Exception + * + * @return ColumnIterator + */ + public function resetStart($startColumn = 'A') + { + $startColumnIndex = Coordinate::columnIndexFromString($startColumn); + if ($startColumnIndex > Coordinate::columnIndexFromString($this->worksheet->getHighestColumn())) { + throw new Exception("Start column ({$startColumn}) is beyond highest column ({$this->worksheet->getHighestColumn()})"); + } + + $this->startColumnIndex = $startColumnIndex; + if ($this->endColumnIndex < $this->startColumnIndex) { + $this->endColumnIndex = $this->startColumnIndex; + } + $this->seek($startColumn); + + return $this; + } + + /** + * (Re)Set the end column. + * + * @param string $endColumn The column address at which to stop iterating + * + * @return ColumnIterator + */ + public function resetEnd($endColumn = null) + { + $endColumn = $endColumn ? $endColumn : $this->worksheet->getHighestColumn(); + $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn); + + return $this; + } + + /** + * Set the column pointer to the selected column. + * + * @param string $column The column address to set the current pointer at + * + * @throws PhpSpreadsheetException + * + * @return ColumnIterator + */ + public function seek($column = 'A') + { + $column = Coordinate::columnIndexFromString($column); + if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) { + throw new PhpSpreadsheetException("Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})"); + } + $this->currentColumnIndex = $column; + + return $this; + } + + /** + * Rewind the iterator to the starting column. + */ + public function rewind() + { + $this->currentColumnIndex = $this->startColumnIndex; + } + + /** + * Return the current column in this worksheet. + * + * @return Column + */ + public function current() + { + return new Column($this->worksheet, Coordinate::stringFromColumnIndex($this->currentColumnIndex)); + } + + /** + * Return the current iterator key. + * + * @return string + */ + public function key() + { + return Coordinate::stringFromColumnIndex($this->currentColumnIndex); + } + + /** + * Set the iterator to its next value. + */ + public function next() + { + ++$this->currentColumnIndex; + } + + /** + * Set the iterator to its previous value. + */ + public function prev() + { + --$this->currentColumnIndex; + } + + /** + * Indicate if more columns exist in the worksheet range of columns that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php new file mode 100755 index 0000000..697fc97 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Dimension.php @@ -0,0 +1,165 @@ +xfIndex = $initialValue; + } + + /** + * Get Visible. + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set Visible. + * + * @param bool $pValue + * + * @return Dimension + */ + public function setVisible($pValue) + { + $this->visible = (bool) $pValue; + + return $this; + } + + /** + * Get Outline Level. + * + * @return int + */ + public function getOutlineLevel() + { + return $this->outlineLevel; + } + + /** + * Set Outline Level. + * Value must be between 0 and 7. + * + * @param int $pValue + * + * @throws PhpSpreadsheetException + * + * @return Dimension + */ + public function setOutlineLevel($pValue) + { + if ($pValue < 0 || $pValue > 7) { + throw new PhpSpreadsheetException('Outline level must range between 0 and 7.'); + } + + $this->outlineLevel = $pValue; + + return $this; + } + + /** + * Get Collapsed. + * + * @return bool + */ + public function getCollapsed() + { + return $this->collapsed; + } + + /** + * Set Collapsed. + * + * @param bool $pValue + * + * @return Dimension + */ + public function setCollapsed($pValue) + { + $this->collapsed = (bool) $pValue; + + return $this; + } + + /** + * Get index to cellXf. + * + * @return int + */ + public function getXfIndex() + { + return $this->xfIndex; + } + + /** + * Set index to cellXf. + * + * @param int $pValue + * + * @return Dimension + */ + public function setXfIndex($pValue) + { + $this->xfIndex = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php new file mode 100755 index 0000000..ed26006 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php @@ -0,0 +1,116 @@ +path = ''; + + // Initialize parent + parent::__construct(); + } + + /** + * Get Filename. + * + * @return string + */ + public function getFilename() + { + return basename($this->path); + } + + /** + * Get indexed filename (using image index). + * + * @return string + */ + public function getIndexedFilename() + { + $fileName = $this->getFilename(); + $fileName = str_replace(' ', '_', $fileName); + + return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension(); + } + + /** + * Get Extension. + * + * @return string + */ + public function getExtension() + { + $exploded = explode('.', basename($this->path)); + + return $exploded[count($exploded) - 1]; + } + + /** + * Get Path. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Set Path. + * + * @param string $pValue File path + * @param bool $pVerifyFile Verify file + * + * @throws PhpSpreadsheetException + * + * @return Drawing + */ + public function setPath($pValue, $pVerifyFile = true) + { + if ($pVerifyFile) { + if (file_exists($pValue)) { + $this->path = $pValue; + + if ($this->width == 0 && $this->height == 0) { + // Get width/height + list($this->width, $this->height) = getimagesize($pValue); + } + } else { + throw new PhpSpreadsheetException("File $pValue not found!"); + } + } else { + $this->path = $pValue; + } + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->path . + parent::getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php new file mode 100755 index 0000000..a1e05d6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php @@ -0,0 +1,289 @@ +visible = false; + $this->blurRadius = 6; + $this->distance = 2; + $this->direction = 0; + $this->alignment = self::SHADOW_BOTTOM_RIGHT; + $this->color = new Color(Color::COLOR_BLACK); + $this->alpha = 50; + } + + /** + * Get Visible. + * + * @return bool + */ + public function getVisible() + { + return $this->visible; + } + + /** + * Set Visible. + * + * @param bool $pValue + * + * @return Shadow + */ + public function setVisible($pValue) + { + $this->visible = $pValue; + + return $this; + } + + /** + * Get Blur radius. + * + * @return int + */ + public function getBlurRadius() + { + return $this->blurRadius; + } + + /** + * Set Blur radius. + * + * @param int $pValue + * + * @return Shadow + */ + public function setBlurRadius($pValue) + { + $this->blurRadius = $pValue; + + return $this; + } + + /** + * Get Shadow distance. + * + * @return int + */ + public function getDistance() + { + return $this->distance; + } + + /** + * Set Shadow distance. + * + * @param int $pValue + * + * @return Shadow + */ + public function setDistance($pValue) + { + $this->distance = $pValue; + + return $this; + } + + /** + * Get Shadow direction (in degrees). + * + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * Set Shadow direction (in degrees). + * + * @param int $pValue + * + * @return Shadow + */ + public function setDirection($pValue) + { + $this->direction = $pValue; + + return $this; + } + + /** + * Get Shadow alignment. + * + * @return int + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Set Shadow alignment. + * + * @param int $pValue + * + * @return Shadow + */ + public function setAlignment($pValue) + { + $this->alignment = $pValue; + + return $this; + } + + /** + * Get Color. + * + * @return Color + */ + public function getColor() + { + return $this->color; + } + + /** + * Set Color. + * + * @param Color $pValue + * + * @return Shadow + */ + public function setColor(Color $pValue = null) + { + $this->color = $pValue; + + return $this; + } + + /** + * Get Alpha. + * + * @return int + */ + public function getAlpha() + { + return $this->alpha; + } + + /** + * Set Alpha. + * + * @param int $pValue + * + * @return Shadow + */ + public function setAlpha($pValue) + { + $this->alpha = $pValue; + + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + ($this->visible ? 't' : 'f') . + $this->blurRadius . + $this->distance . + $this->direction . + $this->alignment . + $this->color->getHashCode() . + $this->alpha . + __CLASS__ + ); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooter.php new file mode 100755 index 0000000..a78f4fc --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooter.php @@ -0,0 +1,491 @@ + + * Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970:. + * + * There are a number of formatting codes that can be written inline with the actual header / footer text, which + * affect the formatting in the header or footer. + * + * Example: This example shows the text "Center Bold Header" on the first line (center section), and the date on + * the second line (center section). + * &CCenter &"-,Bold"Bold&"-,Regular"Header_x000A_&D + * + * General Rules: + * There is no required order in which these codes must appear. + * + * The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again: + * - strikethrough + * - superscript + * - subscript + * Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored, + * while the first is ON. + * &L - code for "left section" (there are three header / footer locations, "left", "center", and "right"). When + * two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the + * order of appearance, and placed into the left section. + * &P - code for "current page #" + * &N - code for "total pages" + * &font size - code for "text font size", where font size is a font size in points. + * &K - code for "text font color" + * RGB Color is specified as RRGGBB + * Theme Color is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade + * value, NN is the tint/shade value. + * &S - code for "text strikethrough" on / off + * &X - code for "text super script" on / off + * &Y - code for "text subscript" on / off + * &C - code for "center section". When two or more occurrences of this section marker exist, the contents + * from all markers are concatenated, in the order of appearance, and placed into the center section. + * + * &D - code for "date" + * &T - code for "time" + * &G - code for "picture as background" + * &U - code for "text single underline" + * &E - code for "double underline" + * &R - code for "right section". When two or more occurrences of this section marker exist, the contents + * from all markers are concatenated, in the order of appearance, and placed into the right section. + * &Z - code for "this workbook's file path" + * &F - code for "this workbook's file name" + * &A - code for "sheet tab name" + * &+ - code for add to page #. + * &- - code for subtract from page #. + * &"font name,font type" - code for "text font name" and "text font type", where font name and font type + * are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font + * name, it means "none specified". Both of font name and font type can be localized values. + * &"-,Bold" - code for "bold font style" + * &B - also means "bold font style". + * &"-,Regular" - code for "regular font style" + * &"-,Italic" - code for "italic font style" + * &I - also means "italic font style" + * &"-,Bold Italic" code for "bold italic font style" + * &O - code for "outline style" + * &H - code for "shadow style" + * + */ +class HeaderFooter +{ + // Header/footer image location + const IMAGE_HEADER_LEFT = 'LH'; + const IMAGE_HEADER_CENTER = 'CH'; + const IMAGE_HEADER_RIGHT = 'RH'; + const IMAGE_FOOTER_LEFT = 'LF'; + const IMAGE_FOOTER_CENTER = 'CF'; + const IMAGE_FOOTER_RIGHT = 'RF'; + + /** + * OddHeader. + * + * @var string + */ + private $oddHeader = ''; + + /** + * OddFooter. + * + * @var string + */ + private $oddFooter = ''; + + /** + * EvenHeader. + * + * @var string + */ + private $evenHeader = ''; + + /** + * EvenFooter. + * + * @var string + */ + private $evenFooter = ''; + + /** + * FirstHeader. + * + * @var string + */ + private $firstHeader = ''; + + /** + * FirstFooter. + * + * @var string + */ + private $firstFooter = ''; + + /** + * Different header for Odd/Even, defaults to false. + * + * @var bool + */ + private $differentOddEven = false; + + /** + * Different header for first page, defaults to false. + * + * @var bool + */ + private $differentFirst = false; + + /** + * Scale with document, defaults to true. + * + * @var bool + */ + private $scaleWithDocument = true; + + /** + * Align with margins, defaults to true. + * + * @var bool + */ + private $alignWithMargins = true; + + /** + * Header/footer images. + * + * @var HeaderFooterDrawing[] + */ + private $headerFooterImages = []; + + /** + * Create a new HeaderFooter. + */ + public function __construct() + { + } + + /** + * Get OddHeader. + * + * @return string + */ + public function getOddHeader() + { + return $this->oddHeader; + } + + /** + * Set OddHeader. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setOddHeader($pValue) + { + $this->oddHeader = $pValue; + + return $this; + } + + /** + * Get OddFooter. + * + * @return string + */ + public function getOddFooter() + { + return $this->oddFooter; + } + + /** + * Set OddFooter. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setOddFooter($pValue) + { + $this->oddFooter = $pValue; + + return $this; + } + + /** + * Get EvenHeader. + * + * @return string + */ + public function getEvenHeader() + { + return $this->evenHeader; + } + + /** + * Set EvenHeader. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setEvenHeader($pValue) + { + $this->evenHeader = $pValue; + + return $this; + } + + /** + * Get EvenFooter. + * + * @return string + */ + public function getEvenFooter() + { + return $this->evenFooter; + } + + /** + * Set EvenFooter. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setEvenFooter($pValue) + { + $this->evenFooter = $pValue; + + return $this; + } + + /** + * Get FirstHeader. + * + * @return string + */ + public function getFirstHeader() + { + return $this->firstHeader; + } + + /** + * Set FirstHeader. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setFirstHeader($pValue) + { + $this->firstHeader = $pValue; + + return $this; + } + + /** + * Get FirstFooter. + * + * @return string + */ + public function getFirstFooter() + { + return $this->firstFooter; + } + + /** + * Set FirstFooter. + * + * @param string $pValue + * + * @return HeaderFooter + */ + public function setFirstFooter($pValue) + { + $this->firstFooter = $pValue; + + return $this; + } + + /** + * Get DifferentOddEven. + * + * @return bool + */ + public function getDifferentOddEven() + { + return $this->differentOddEven; + } + + /** + * Set DifferentOddEven. + * + * @param bool $pValue + * + * @return HeaderFooter + */ + public function setDifferentOddEven($pValue) + { + $this->differentOddEven = $pValue; + + return $this; + } + + /** + * Get DifferentFirst. + * + * @return bool + */ + public function getDifferentFirst() + { + return $this->differentFirst; + } + + /** + * Set DifferentFirst. + * + * @param bool $pValue + * + * @return HeaderFooter + */ + public function setDifferentFirst($pValue) + { + $this->differentFirst = $pValue; + + return $this; + } + + /** + * Get ScaleWithDocument. + * + * @return bool + */ + public function getScaleWithDocument() + { + return $this->scaleWithDocument; + } + + /** + * Set ScaleWithDocument. + * + * @param bool $pValue + * + * @return HeaderFooter + */ + public function setScaleWithDocument($pValue) + { + $this->scaleWithDocument = $pValue; + + return $this; + } + + /** + * Get AlignWithMargins. + * + * @return bool + */ + public function getAlignWithMargins() + { + return $this->alignWithMargins; + } + + /** + * Set AlignWithMargins. + * + * @param bool $pValue + * + * @return HeaderFooter + */ + public function setAlignWithMargins($pValue) + { + $this->alignWithMargins = $pValue; + + return $this; + } + + /** + * Add header/footer image. + * + * @param HeaderFooterDrawing $image + * @param string $location + * + * @return HeaderFooter + */ + public function addImage(HeaderFooterDrawing $image, $location = self::IMAGE_HEADER_LEFT) + { + $this->headerFooterImages[$location] = $image; + + return $this; + } + + /** + * Remove header/footer image. + * + * @param string $location + * + * @return HeaderFooter + */ + public function removeImage($location = self::IMAGE_HEADER_LEFT) + { + if (isset($this->headerFooterImages[$location])) { + unset($this->headerFooterImages[$location]); + } + + return $this; + } + + /** + * Set header/footer images. + * + * @param HeaderFooterDrawing[] $images + * + * @return HeaderFooter + */ + public function setImages(array $images) + { + $this->headerFooterImages = $images; + + return $this; + } + + /** + * Get header/footer images. + * + * @return HeaderFooterDrawing[] + */ + public function getImages() + { + // Sort array + $images = []; + if (isset($this->headerFooterImages[self::IMAGE_HEADER_LEFT])) { + $images[self::IMAGE_HEADER_LEFT] = $this->headerFooterImages[self::IMAGE_HEADER_LEFT]; + } + if (isset($this->headerFooterImages[self::IMAGE_HEADER_CENTER])) { + $images[self::IMAGE_HEADER_CENTER] = $this->headerFooterImages[self::IMAGE_HEADER_CENTER]; + } + if (isset($this->headerFooterImages[self::IMAGE_HEADER_RIGHT])) { + $images[self::IMAGE_HEADER_RIGHT] = $this->headerFooterImages[self::IMAGE_HEADER_RIGHT]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_LEFT])) { + $images[self::IMAGE_FOOTER_LEFT] = $this->headerFooterImages[self::IMAGE_FOOTER_LEFT]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_CENTER])) { + $images[self::IMAGE_FOOTER_CENTER] = $this->headerFooterImages[self::IMAGE_FOOTER_CENTER]; + } + if (isset($this->headerFooterImages[self::IMAGE_FOOTER_RIGHT])) { + $images[self::IMAGE_FOOTER_RIGHT] = $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT]; + } + $this->headerFooterImages = $images; + + return $this->headerFooterImages; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php new file mode 100755 index 0000000..b42c732 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/HeaderFooterDrawing.php @@ -0,0 +1,24 @@ +getPath() . + $this->name . + $this->offsetX . + $this->offsetY . + $this->width . + $this->height . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php new file mode 100755 index 0000000..d8797a3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Iterator.php @@ -0,0 +1,87 @@ +subject = $subject; + } + + /** + * Destructor. + */ + public function __destruct() + { + unset($this->subject); + } + + /** + * Rewind iterator. + */ + public function rewind() + { + $this->position = 0; + } + + /** + * Current Worksheet. + * + * @return Worksheet + */ + public function current() + { + return $this->subject->getSheet($this->position); + } + + /** + * Current key. + * + * @return int + */ + public function key() + { + return $this->position; + } + + /** + * Next value. + */ + public function next() + { + ++$this->position; + } + + /** + * Are there more Worksheet instances available? + * + * @return bool + */ + public function valid() + { + return $this->position < $this->subject->getSheetCount() && $this->position >= 0; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php new file mode 100755 index 0000000..6012e93 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php @@ -0,0 +1,169 @@ +imageResource = null; + $this->renderingFunction = self::RENDERING_DEFAULT; + $this->mimeType = self::MIMETYPE_DEFAULT; + $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999)); + + // Initialize parent + parent::__construct(); + } + + /** + * Get image resource. + * + * @return resource + */ + public function getImageResource() + { + return $this->imageResource; + } + + /** + * Set image resource. + * + * @param resource $value + * + * @return MemoryDrawing + */ + public function setImageResource($value) + { + $this->imageResource = $value; + + if ($this->imageResource !== null) { + // Get width/height + $this->width = imagesx($this->imageResource); + $this->height = imagesy($this->imageResource); + } + + return $this; + } + + /** + * Get rendering function. + * + * @return string + */ + public function getRenderingFunction() + { + return $this->renderingFunction; + } + + /** + * Set rendering function. + * + * @param string $value see self::RENDERING_* + * + * @return MemoryDrawing + */ + public function setRenderingFunction($value) + { + $this->renderingFunction = $value; + + return $this; + } + + /** + * Get mime type. + * + * @return string + */ + public function getMimeType() + { + return $this->mimeType; + } + + /** + * Set mime type. + * + * @param string $value see self::MIMETYPE_* + * + * @return MemoryDrawing + */ + public function setMimeType($value) + { + $this->mimeType = $value; + + return $this; + } + + /** + * Get indexed filename (using image index). + * + * @return string + */ + public function getIndexedFilename() + { + $extension = strtolower($this->getMimeType()); + $extension = explode('/', $extension); + $extension = $extension[1]; + + return $this->uniqueName . $this->getImageIndex() . '.' . $extension; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + return md5( + $this->renderingFunction . + $this->mimeType . + $this->uniqueName . + parent::getHashCode() . + __CLASS__ + ); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php new file mode 100755 index 0000000..eb44a10 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php @@ -0,0 +1,214 @@ +left; + } + + /** + * Set Left. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setLeft($pValue) + { + $this->left = $pValue; + + return $this; + } + + /** + * Get Right. + * + * @return float + */ + public function getRight() + { + return $this->right; + } + + /** + * Set Right. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setRight($pValue) + { + $this->right = $pValue; + + return $this; + } + + /** + * Get Top. + * + * @return float + */ + public function getTop() + { + return $this->top; + } + + /** + * Set Top. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setTop($pValue) + { + $this->top = $pValue; + + return $this; + } + + /** + * Get Bottom. + * + * @return float + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Set Bottom. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setBottom($pValue) + { + $this->bottom = $pValue; + + return $this; + } + + /** + * Get Header. + * + * @return float + */ + public function getHeader() + { + return $this->header; + } + + /** + * Set Header. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setHeader($pValue) + { + $this->header = $pValue; + + return $this; + } + + /** + * Get Footer. + * + * @return float + */ + public function getFooter() + { + return $this->footer; + } + + /** + * Set Footer. + * + * @param float $pValue + * + * @return PageMargins + */ + public function setFooter($pValue) + { + $this->footer = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php new file mode 100755 index 0000000..ab007f6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -0,0 +1,851 @@ + + * Paper size taken from Office Open XML Part 4 - Markup Language Reference, page 1988:. + * + * 1 = Letter paper (8.5 in. by 11 in.) + * 2 = Letter small paper (8.5 in. by 11 in.) + * 3 = Tabloid paper (11 in. by 17 in.) + * 4 = Ledger paper (17 in. by 11 in.) + * 5 = Legal paper (8.5 in. by 14 in.) + * 6 = Statement paper (5.5 in. by 8.5 in.) + * 7 = Executive paper (7.25 in. by 10.5 in.) + * 8 = A3 paper (297 mm by 420 mm) + * 9 = A4 paper (210 mm by 297 mm) + * 10 = A4 small paper (210 mm by 297 mm) + * 11 = A5 paper (148 mm by 210 mm) + * 12 = B4 paper (250 mm by 353 mm) + * 13 = B5 paper (176 mm by 250 mm) + * 14 = Folio paper (8.5 in. by 13 in.) + * 15 = Quarto paper (215 mm by 275 mm) + * 16 = Standard paper (10 in. by 14 in.) + * 17 = Standard paper (11 in. by 17 in.) + * 18 = Note paper (8.5 in. by 11 in.) + * 19 = #9 envelope (3.875 in. by 8.875 in.) + * 20 = #10 envelope (4.125 in. by 9.5 in.) + * 21 = #11 envelope (4.5 in. by 10.375 in.) + * 22 = #12 envelope (4.75 in. by 11 in.) + * 23 = #14 envelope (5 in. by 11.5 in.) + * 24 = C paper (17 in. by 22 in.) + * 25 = D paper (22 in. by 34 in.) + * 26 = E paper (34 in. by 44 in.) + * 27 = DL envelope (110 mm by 220 mm) + * 28 = C5 envelope (162 mm by 229 mm) + * 29 = C3 envelope (324 mm by 458 mm) + * 30 = C4 envelope (229 mm by 324 mm) + * 31 = C6 envelope (114 mm by 162 mm) + * 32 = C65 envelope (114 mm by 229 mm) + * 33 = B4 envelope (250 mm by 353 mm) + * 34 = B5 envelope (176 mm by 250 mm) + * 35 = B6 envelope (176 mm by 125 mm) + * 36 = Italy envelope (110 mm by 230 mm) + * 37 = Monarch envelope (3.875 in. by 7.5 in.). + * 38 = 6 3/4 envelope (3.625 in. by 6.5 in.) + * 39 = US standard fanfold (14.875 in. by 11 in.) + * 40 = German standard fanfold (8.5 in. by 12 in.) + * 41 = German legal fanfold (8.5 in. by 13 in.) + * 42 = ISO B4 (250 mm by 353 mm) + * 43 = Japanese double postcard (200 mm by 148 mm) + * 44 = Standard paper (9 in. by 11 in.) + * 45 = Standard paper (10 in. by 11 in.) + * 46 = Standard paper (15 in. by 11 in.) + * 47 = Invite envelope (220 mm by 220 mm) + * 50 = Letter extra paper (9.275 in. by 12 in.) + * 51 = Legal extra paper (9.275 in. by 15 in.) + * 52 = Tabloid extra paper (11.69 in. by 18 in.) + * 53 = A4 extra paper (236 mm by 322 mm) + * 54 = Letter transverse paper (8.275 in. by 11 in.) + * 55 = A4 transverse paper (210 mm by 297 mm) + * 56 = Letter extra transverse paper (9.275 in. by 12 in.) + * 57 = SuperA/SuperA/A4 paper (227 mm by 356 mm) + * 58 = SuperB/SuperB/A3 paper (305 mm by 487 mm) + * 59 = Letter plus paper (8.5 in. by 12.69 in.) + * 60 = A4 plus paper (210 mm by 330 mm) + * 61 = A5 transverse paper (148 mm by 210 mm) + * 62 = JIS B5 transverse paper (182 mm by 257 mm) + * 63 = A3 extra paper (322 mm by 445 mm) + * 64 = A5 extra paper (174 mm by 235 mm) + * 65 = ISO B5 extra paper (201 mm by 276 mm) + * 66 = A2 paper (420 mm by 594 mm) + * 67 = A3 transverse paper (297 mm by 420 mm) + * 68 = A3 extra transverse paper (322 mm by 445 mm) + * + * + * @category PhpSpreadsheet + * + * @copyright Copyright (c) 2006 - 2016 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet) + */ +class PageSetup +{ + // Paper size + const PAPERSIZE_LETTER = 1; + const PAPERSIZE_LETTER_SMALL = 2; + const PAPERSIZE_TABLOID = 3; + const PAPERSIZE_LEDGER = 4; + const PAPERSIZE_LEGAL = 5; + const PAPERSIZE_STATEMENT = 6; + const PAPERSIZE_EXECUTIVE = 7; + const PAPERSIZE_A3 = 8; + const PAPERSIZE_A4 = 9; + const PAPERSIZE_A4_SMALL = 10; + const PAPERSIZE_A5 = 11; + const PAPERSIZE_B4 = 12; + const PAPERSIZE_B5 = 13; + const PAPERSIZE_FOLIO = 14; + const PAPERSIZE_QUARTO = 15; + const PAPERSIZE_STANDARD_1 = 16; + const PAPERSIZE_STANDARD_2 = 17; + const PAPERSIZE_NOTE = 18; + const PAPERSIZE_NO9_ENVELOPE = 19; + const PAPERSIZE_NO10_ENVELOPE = 20; + const PAPERSIZE_NO11_ENVELOPE = 21; + const PAPERSIZE_NO12_ENVELOPE = 22; + const PAPERSIZE_NO14_ENVELOPE = 23; + const PAPERSIZE_C = 24; + const PAPERSIZE_D = 25; + const PAPERSIZE_E = 26; + const PAPERSIZE_DL_ENVELOPE = 27; + const PAPERSIZE_C5_ENVELOPE = 28; + const PAPERSIZE_C3_ENVELOPE = 29; + const PAPERSIZE_C4_ENVELOPE = 30; + const PAPERSIZE_C6_ENVELOPE = 31; + const PAPERSIZE_C65_ENVELOPE = 32; + const PAPERSIZE_B4_ENVELOPE = 33; + const PAPERSIZE_B5_ENVELOPE = 34; + const PAPERSIZE_B6_ENVELOPE = 35; + const PAPERSIZE_ITALY_ENVELOPE = 36; + const PAPERSIZE_MONARCH_ENVELOPE = 37; + const PAPERSIZE_6_3_4_ENVELOPE = 38; + const PAPERSIZE_US_STANDARD_FANFOLD = 39; + const PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40; + const PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41; + const PAPERSIZE_ISO_B4 = 42; + const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43; + const PAPERSIZE_STANDARD_PAPER_1 = 44; + const PAPERSIZE_STANDARD_PAPER_2 = 45; + const PAPERSIZE_STANDARD_PAPER_3 = 46; + const PAPERSIZE_INVITE_ENVELOPE = 47; + const PAPERSIZE_LETTER_EXTRA_PAPER = 48; + const PAPERSIZE_LEGAL_EXTRA_PAPER = 49; + const PAPERSIZE_TABLOID_EXTRA_PAPER = 50; + const PAPERSIZE_A4_EXTRA_PAPER = 51; + const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52; + const PAPERSIZE_A4_TRANSVERSE_PAPER = 53; + const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54; + const PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55; + const PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56; + const PAPERSIZE_LETTER_PLUS_PAPER = 57; + const PAPERSIZE_A4_PLUS_PAPER = 58; + const PAPERSIZE_A5_TRANSVERSE_PAPER = 59; + const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60; + const PAPERSIZE_A3_EXTRA_PAPER = 61; + const PAPERSIZE_A5_EXTRA_PAPER = 62; + const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63; + const PAPERSIZE_A2_PAPER = 64; + const PAPERSIZE_A3_TRANSVERSE_PAPER = 65; + const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66; + + // Page orientation + const ORIENTATION_DEFAULT = 'default'; + const ORIENTATION_LANDSCAPE = 'landscape'; + const ORIENTATION_PORTRAIT = 'portrait'; + + // Print Range Set Method + const SETPRINTRANGE_OVERWRITE = 'O'; + const SETPRINTRANGE_INSERT = 'I'; + + /** + * Paper size. + * + * @var int + */ + private $paperSize = self::PAPERSIZE_LETTER; + + /** + * Orientation. + * + * @var string + */ + private $orientation = self::ORIENTATION_DEFAULT; + + /** + * Scale (Print Scale). + * + * Print scaling. Valid values range from 10 to 400 + * This setting is overridden when fitToWidth and/or fitToHeight are in use + * + * @var int? + */ + private $scale = 100; + + /** + * Fit To Page + * Whether scale or fitToWith / fitToHeight applies. + * + * @var bool + */ + private $fitToPage = false; + + /** + * Fit To Height + * Number of vertical pages to fit on. + * + * @var int? + */ + private $fitToHeight = 1; + + /** + * Fit To Width + * Number of horizontal pages to fit on. + * + * @var int? + */ + private $fitToWidth = 1; + + /** + * Columns to repeat at left. + * + * @var array Containing start column and end column, empty array if option unset + */ + private $columnsToRepeatAtLeft = ['', '']; + + /** + * Rows to repeat at top. + * + * @var array Containing start row number and end row number, empty array if option unset + */ + private $rowsToRepeatAtTop = [0, 0]; + + /** + * Center page horizontally. + * + * @var bool + */ + private $horizontalCentered = false; + + /** + * Center page vertically. + * + * @var bool + */ + private $verticalCentered = false; + + /** + * Print area. + * + * @var string + */ + private $printArea; + + /** + * First page number. + * + * @var int + */ + private $firstPageNumber; + + /** + * Create a new PageSetup. + */ + public function __construct() + { + } + + /** + * Get Paper Size. + * + * @return int + */ + public function getPaperSize() + { + return $this->paperSize; + } + + /** + * Set Paper Size. + * + * @param int $pValue see self::PAPERSIZE_* + * + * @return PageSetup + */ + public function setPaperSize($pValue) + { + $this->paperSize = $pValue; + + return $this; + } + + /** + * Get Orientation. + * + * @return string + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Set Orientation. + * + * @param string $pValue see self::ORIENTATION_* + * + * @return PageSetup + */ + public function setOrientation($pValue) + { + $this->orientation = $pValue; + + return $this; + } + + /** + * Get Scale. + * + * @return int? + */ + public function getScale() + { + return $this->scale; + } + + /** + * Set Scale. + * Print scaling. Valid values range from 10 to 400 + * This setting is overridden when fitToWidth and/or fitToHeight are in use. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth + * + * @throws PhpSpreadsheetException + * + * @return PageSetup + */ + public function setScale($pValue, $pUpdate = true) + { + // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, + // but it is apparently still able to handle any scale >= 0, where 0 results in 100 + if (($pValue >= 0) || $pValue === null) { + $this->scale = $pValue; + if ($pUpdate) { + $this->fitToPage = false; + } + } else { + throw new PhpSpreadsheetException('Scale must not be negative'); + } + + return $this; + } + + /** + * Get Fit To Page. + * + * @return bool + */ + public function getFitToPage() + { + return $this->fitToPage; + } + + /** + * Set Fit To Page. + * + * @param bool $pValue + * + * @return PageSetup + */ + public function setFitToPage($pValue) + { + $this->fitToPage = $pValue; + + return $this; + } + + /** + * Get Fit To Height. + * + * @return int? + */ + public function getFitToHeight() + { + return $this->fitToHeight; + } + + /** + * Set Fit To Height. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so it applies rather than scaling + * + * @return PageSetup + */ + public function setFitToHeight($pValue, $pUpdate = true) + { + $this->fitToHeight = $pValue; + if ($pUpdate) { + $this->fitToPage = true; + } + + return $this; + } + + /** + * Get Fit To Width. + * + * @return int? + */ + public function getFitToWidth() + { + return $this->fitToWidth; + } + + /** + * Set Fit To Width. + * + * @param null|int $pValue + * @param bool $pUpdate Update fitToPage so it applies rather than scaling + * + * @return PageSetup + */ + public function setFitToWidth($pValue, $pUpdate = true) + { + $this->fitToWidth = $pValue; + if ($pUpdate) { + $this->fitToPage = true; + } + + return $this; + } + + /** + * Is Columns to repeat at left set? + * + * @return bool + */ + public function isColumnsToRepeatAtLeftSet() + { + if (is_array($this->columnsToRepeatAtLeft)) { + if ($this->columnsToRepeatAtLeft[0] != '' && $this->columnsToRepeatAtLeft[1] != '') { + return true; + } + } + + return false; + } + + /** + * Get Columns to repeat at left. + * + * @return array Containing start column and end column, empty array if option unset + */ + public function getColumnsToRepeatAtLeft() + { + return $this->columnsToRepeatAtLeft; + } + + /** + * Set Columns to repeat at left. + * + * @param array $pValue Containing start column and end column, empty array if option unset + * + * @return PageSetup + */ + public function setColumnsToRepeatAtLeft(array $pValue) + { + $this->columnsToRepeatAtLeft = $pValue; + + return $this; + } + + /** + * Set Columns to repeat at left by start and end. + * + * @param string $pStart eg: 'A' + * @param string $pEnd eg: 'B' + * + * @return PageSetup + */ + public function setColumnsToRepeatAtLeftByStartAndEnd($pStart, $pEnd) + { + $this->columnsToRepeatAtLeft = [$pStart, $pEnd]; + + return $this; + } + + /** + * Is Rows to repeat at top set? + * + * @return bool + */ + public function isRowsToRepeatAtTopSet() + { + if (is_array($this->rowsToRepeatAtTop)) { + if ($this->rowsToRepeatAtTop[0] != 0 && $this->rowsToRepeatAtTop[1] != 0) { + return true; + } + } + + return false; + } + + /** + * Get Rows to repeat at top. + * + * @return array Containing start column and end column, empty array if option unset + */ + public function getRowsToRepeatAtTop() + { + return $this->rowsToRepeatAtTop; + } + + /** + * Set Rows to repeat at top. + * + * @param array $pValue Containing start column and end column, empty array if option unset + * + * @return PageSetup + */ + public function setRowsToRepeatAtTop(array $pValue) + { + $this->rowsToRepeatAtTop = $pValue; + + return $this; + } + + /** + * Set Rows to repeat at top by start and end. + * + * @param int $pStart eg: 1 + * @param int $pEnd eg: 1 + * + * @return PageSetup + */ + public function setRowsToRepeatAtTopByStartAndEnd($pStart, $pEnd) + { + $this->rowsToRepeatAtTop = [$pStart, $pEnd]; + + return $this; + } + + /** + * Get center page horizontally. + * + * @return bool + */ + public function getHorizontalCentered() + { + return $this->horizontalCentered; + } + + /** + * Set center page horizontally. + * + * @param bool $value + * + * @return PageSetup + */ + public function setHorizontalCentered($value) + { + $this->horizontalCentered = $value; + + return $this; + } + + /** + * Get center page vertically. + * + * @return bool + */ + public function getVerticalCentered() + { + return $this->verticalCentered; + } + + /** + * Set center page vertically. + * + * @param bool $value + * + * @return PageSetup + */ + public function setVerticalCentered($value) + { + $this->verticalCentered = $value; + + return $this; + } + + /** + * Get print area. + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string + * Otherwise, the specific range identified by the value of $index will be returned + * Print areas are numbered from 1 + * + * @throws PhpSpreadsheetException + * + * @return string + */ + public function getPrintArea($index = 0) + { + if ($index == 0) { + return $this->printArea; + } + $printAreas = explode(',', $this->printArea); + if (isset($printAreas[$index - 1])) { + return $printAreas[$index - 1]; + } + + throw new PhpSpreadsheetException('Requested Print Area does not exist'); + } + + /** + * Is print area set? + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or an index value of 0, will identify whether any print range is set + * Otherwise, existence of the range identified by the value of $index will be returned + * Print areas are numbered from 1 + * + * @return bool + */ + public function isPrintAreaSet($index = 0) + { + if ($index == 0) { + return $this->printArea !== null; + } + $printAreas = explode(',', $this->printArea); + + return isset($printAreas[$index - 1]); + } + + /** + * Clear a print area. + * + * @param int $index Identifier for a specific print area range if several ranges have been set + * Default behaviour, or an index value of 0, will clear all print ranges that are set + * Otherwise, the range identified by the value of $index will be removed from the series + * Print areas are numbered from 1 + * + * @return PageSetup + */ + public function clearPrintArea($index = 0) + { + if ($index == 0) { + $this->printArea = null; + } else { + $printAreas = explode(',', $this->printArea); + if (isset($printAreas[$index - 1])) { + unset($printAreas[$index - 1]); + $this->printArea = implode(',', $printAreas); + } + } + + return $this; + } + + /** + * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20'. + * + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * When the method is "O"verwrite, then a positive integer index will overwrite that indexed + * entry in the print areas list; a negative index value will identify which entry to + * overwrite working bacward through the print area to the list, with the last entry as -1. + * Specifying an index value of 0, will overwrite all existing print ranges. + * When the method is "I"nsert, then a positive index will insert after that indexed entry in + * the print areas list, while a negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * @param string $method Determines the method used when setting multiple print areas + * Default behaviour, or the "O" method, overwrites existing print area + * The "I" method, inserts the new print area before any specified index, or at the end of the list + * + * @throws PhpSpreadsheetException + * + * @return PageSetup + */ + public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) + { + if (strpos($value, '!') !== false) { + throw new PhpSpreadsheetException('Cell coordinate must not specify a worksheet.'); + } elseif (strpos($value, ':') === false) { + throw new PhpSpreadsheetException('Cell coordinate must be a range of cells.'); + } elseif (strpos($value, '$') !== false) { + throw new PhpSpreadsheetException('Cell coordinate must not be absolute.'); + } + $value = strtoupper($value); + + if ($method == self::SETPRINTRANGE_OVERWRITE) { + if ($index == 0) { + $this->printArea = $value; + } else { + $printAreas = explode(',', $this->printArea); + if ($index < 0) { + $index = count($printAreas) - abs($index) + 1; + } + if (($index <= 0) || ($index > count($printAreas))) { + throw new PhpSpreadsheetException('Invalid index for setting print range.'); + } + $printAreas[$index - 1] = $value; + $this->printArea = implode(',', $printAreas); + } + } elseif ($method == self::SETPRINTRANGE_INSERT) { + if ($index == 0) { + $this->printArea .= ($this->printArea == '') ? $value : ',' . $value; + } else { + $printAreas = explode(',', $this->printArea); + if ($index < 0) { + $index = abs($index) - 1; + } + if ($index > count($printAreas)) { + throw new PhpSpreadsheetException('Invalid index for setting print range.'); + } + $printAreas = array_merge(array_slice($printAreas, 0, $index), [$value], array_slice($printAreas, $index)); + $this->printArea = implode(',', $printAreas); + } + } else { + throw new PhpSpreadsheetException('Invalid method for setting print range.'); + } + + return $this; + } + + /** + * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas. + * + * @param string $value + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * A positive index will insert after that indexed entry in the print areas list, while a + * negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * + * @throws PhpSpreadsheetException + * + * @return PageSetup + */ + public function addPrintArea($value, $index = -1) + { + return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); + } + + /** + * Set print area. + * + * @param int $column1 Column 1 + * @param int $row1 Row 1 + * @param int $column2 Column 2 + * @param int $row2 Row 2 + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * When the method is "O"verwrite, then a positive integer index will overwrite that indexed + * entry in the print areas list; a negative index value will identify which entry to + * overwrite working backward through the print area to the list, with the last entry as -1. + * Specifying an index value of 0, will overwrite all existing print ranges. + * When the method is "I"nsert, then a positive index will insert after that indexed entry in + * the print areas list, while a negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * @param string $method Determines the method used when setting multiple print areas + * Default behaviour, or the "O" method, overwrites existing print area + * The "I" method, inserts the new print area before any specified index, or at the end of the list + * + * @throws PhpSpreadsheetException + * + * @return PageSetup + */ + public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) + { + return $this->setPrintArea( + Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, + $index, + $method + ); + } + + /** + * Add a new print area to the list of print areas. + * + * @param int $column1 Start Column for the print area + * @param int $row1 Start Row for the print area + * @param int $column2 End Column for the print area + * @param int $row2 End Row for the print area + * @param int $index Identifier for a specific print area range allowing several ranges to be set + * A positive index will insert after that indexed entry in the print areas list, while a + * negative index will insert before the indexed entry. + * Specifying an index value of 0, will always append the new print range at the end of the + * list. + * Print areas are numbered from 1 + * + * @throws PhpSpreadsheetException + * + * @return PageSetup + */ + public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) + { + return $this->setPrintArea( + Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, + $index, + self::SETPRINTRANGE_INSERT + ); + } + + /** + * Get first page number. + * + * @return int + */ + public function getFirstPageNumber() + { + return $this->firstPageNumber; + } + + /** + * Set first page number. + * + * @param int $value + * + * @return PageSetup + */ + public function setFirstPageNumber($value) + { + $this->firstPageNumber = $value; + + return $this; + } + + /** + * Reset first page number. + * + * @return PageSetup + */ + public function resetFirstPageNumber() + { + return $this->setFirstPageNumber(null); + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Protection.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Protection.php new file mode 100755 index 0000000..1815f45 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Protection.php @@ -0,0 +1,586 @@ +sheet || + $this->objects || + $this->scenarios || + $this->formatCells || + $this->formatColumns || + $this->formatRows || + $this->insertColumns || + $this->insertRows || + $this->insertHyperlinks || + $this->deleteColumns || + $this->deleteRows || + $this->selectLockedCells || + $this->sort || + $this->autoFilter || + $this->pivotTables || + $this->selectUnlockedCells; + } + + /** + * Get Sheet. + * + * @return bool + */ + public function getSheet() + { + return $this->sheet; + } + + /** + * Set Sheet. + * + * @param bool $pValue + * + * @return Protection + */ + public function setSheet($pValue) + { + $this->sheet = $pValue; + + return $this; + } + + /** + * Get Objects. + * + * @return bool + */ + public function getObjects() + { + return $this->objects; + } + + /** + * Set Objects. + * + * @param bool $pValue + * + * @return Protection + */ + public function setObjects($pValue) + { + $this->objects = $pValue; + + return $this; + } + + /** + * Get Scenarios. + * + * @return bool + */ + public function getScenarios() + { + return $this->scenarios; + } + + /** + * Set Scenarios. + * + * @param bool $pValue + * + * @return Protection + */ + public function setScenarios($pValue) + { + $this->scenarios = $pValue; + + return $this; + } + + /** + * Get FormatCells. + * + * @return bool + */ + public function getFormatCells() + { + return $this->formatCells; + } + + /** + * Set FormatCells. + * + * @param bool $pValue + * + * @return Protection + */ + public function setFormatCells($pValue) + { + $this->formatCells = $pValue; + + return $this; + } + + /** + * Get FormatColumns. + * + * @return bool + */ + public function getFormatColumns() + { + return $this->formatColumns; + } + + /** + * Set FormatColumns. + * + * @param bool $pValue + * + * @return Protection + */ + public function setFormatColumns($pValue) + { + $this->formatColumns = $pValue; + + return $this; + } + + /** + * Get FormatRows. + * + * @return bool + */ + public function getFormatRows() + { + return $this->formatRows; + } + + /** + * Set FormatRows. + * + * @param bool $pValue + * + * @return Protection + */ + public function setFormatRows($pValue) + { + $this->formatRows = $pValue; + + return $this; + } + + /** + * Get InsertColumns. + * + * @return bool + */ + public function getInsertColumns() + { + return $this->insertColumns; + } + + /** + * Set InsertColumns. + * + * @param bool $pValue + * + * @return Protection + */ + public function setInsertColumns($pValue) + { + $this->insertColumns = $pValue; + + return $this; + } + + /** + * Get InsertRows. + * + * @return bool + */ + public function getInsertRows() + { + return $this->insertRows; + } + + /** + * Set InsertRows. + * + * @param bool $pValue + * + * @return Protection + */ + public function setInsertRows($pValue) + { + $this->insertRows = $pValue; + + return $this; + } + + /** + * Get InsertHyperlinks. + * + * @return bool + */ + public function getInsertHyperlinks() + { + return $this->insertHyperlinks; + } + + /** + * Set InsertHyperlinks. + * + * @param bool $pValue + * + * @return Protection + */ + public function setInsertHyperlinks($pValue) + { + $this->insertHyperlinks = $pValue; + + return $this; + } + + /** + * Get DeleteColumns. + * + * @return bool + */ + public function getDeleteColumns() + { + return $this->deleteColumns; + } + + /** + * Set DeleteColumns. + * + * @param bool $pValue + * + * @return Protection + */ + public function setDeleteColumns($pValue) + { + $this->deleteColumns = $pValue; + + return $this; + } + + /** + * Get DeleteRows. + * + * @return bool + */ + public function getDeleteRows() + { + return $this->deleteRows; + } + + /** + * Set DeleteRows. + * + * @param bool $pValue + * + * @return Protection + */ + public function setDeleteRows($pValue) + { + $this->deleteRows = $pValue; + + return $this; + } + + /** + * Get SelectLockedCells. + * + * @return bool + */ + public function getSelectLockedCells() + { + return $this->selectLockedCells; + } + + /** + * Set SelectLockedCells. + * + * @param bool $pValue + * + * @return Protection + */ + public function setSelectLockedCells($pValue) + { + $this->selectLockedCells = $pValue; + + return $this; + } + + /** + * Get Sort. + * + * @return bool + */ + public function getSort() + { + return $this->sort; + } + + /** + * Set Sort. + * + * @param bool $pValue + * + * @return Protection + */ + public function setSort($pValue) + { + $this->sort = $pValue; + + return $this; + } + + /** + * Get AutoFilter. + * + * @return bool + */ + public function getAutoFilter() + { + return $this->autoFilter; + } + + /** + * Set AutoFilter. + * + * @param bool $pValue + * + * @return Protection + */ + public function setAutoFilter($pValue) + { + $this->autoFilter = $pValue; + + return $this; + } + + /** + * Get PivotTables. + * + * @return bool + */ + public function getPivotTables() + { + return $this->pivotTables; + } + + /** + * Set PivotTables. + * + * @param bool $pValue + * + * @return Protection + */ + public function setPivotTables($pValue) + { + $this->pivotTables = $pValue; + + return $this; + } + + /** + * Get SelectUnlockedCells. + * + * @return bool + */ + public function getSelectUnlockedCells() + { + return $this->selectUnlockedCells; + } + + /** + * Set SelectUnlockedCells. + * + * @param bool $pValue + * + * @return Protection + */ + public function setSelectUnlockedCells($pValue) + { + $this->selectUnlockedCells = $pValue; + + return $this; + } + + /** + * Get Password (hashed). + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set Password. + * + * @param string $pValue + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return Protection + */ + public function setPassword($pValue, $pAlreadyHashed = false) + { + if (!$pAlreadyHashed) { + $pValue = PasswordHasher::hashPassword($pValue); + } + $this->password = $pValue; + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Row.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Row.php new file mode 100755 index 0000000..2a379d2 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Row.php @@ -0,0 +1,74 @@ +worksheet = $worksheet; + $this->rowIndex = $rowIndex; + } + + /** + * Destructor. + */ + public function __destruct() + { + unset($this->worksheet); + } + + /** + * Get row index. + * + * @return int + */ + public function getRowIndex() + { + return $this->rowIndex; + } + + /** + * Get cell iterator. + * + * @param string $startColumn The column address at which to start iterating + * @param string $endColumn Optionally, the column address at which to stop iterating + * + * @return RowCellIterator + */ + public function getCellIterator($startColumn = 'A', $endColumn = null) + { + return new RowCellIterator($this->worksheet, $this->rowIndex, $startColumn, $endColumn); + } + + /** + * Returns bound worksheet. + * + * @return Worksheet + */ + public function getWorksheet() + { + return $this->worksheet; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php new file mode 100755 index 0000000..8510d40 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -0,0 +1,205 @@ +worksheet = $worksheet; + $this->rowIndex = $rowIndex; + $this->resetEnd($endColumn); + $this->resetStart($startColumn); + } + + /** + * (Re)Set the start column and the current column pointer. + * + * @param string $startColumn The column address at which to start iterating + * + * @throws PhpSpreadsheetException + * + * @return RowCellIterator + */ + public function resetStart($startColumn = 'A') + { + $this->startColumnIndex = Coordinate::columnIndexFromString($startColumn); + $this->adjustForExistingOnlyRange(); + $this->seek(Coordinate::stringFromColumnIndex($this->startColumnIndex)); + + return $this; + } + + /** + * (Re)Set the end column. + * + * @param string $endColumn The column address at which to stop iterating + * + * @throws PhpSpreadsheetException + * + * @return RowCellIterator + */ + public function resetEnd($endColumn = null) + { + $endColumn = $endColumn ? $endColumn : $this->worksheet->getHighestColumn(); + $this->endColumnIndex = Coordinate::columnIndexFromString($endColumn); + $this->adjustForExistingOnlyRange(); + + return $this; + } + + /** + * Set the column pointer to the selected column. + * + * @param string $column The column address to set the current pointer at + * + * @throws PhpSpreadsheetException + * + * @return RowCellIterator + */ + public function seek($column = 'A') + { + $column = Coordinate::columnIndexFromString($column); + if (($column < $this->startColumnIndex) || ($column > $this->endColumnIndex)) { + throw new PhpSpreadsheetException("Column $column is out of range ({$this->startColumnIndex} - {$this->endColumnIndex})"); + } elseif ($this->onlyExistingCells && !($this->worksheet->cellExistsByColumnAndRow($column, $this->rowIndex))) { + throw new PhpSpreadsheetException('In "IterateOnlyExistingCells" mode and Cell does not exist'); + } + $this->currentColumnIndex = $column; + + return $this; + } + + /** + * Rewind the iterator to the starting column. + */ + public function rewind() + { + $this->currentColumnIndex = $this->startColumnIndex; + } + + /** + * Return the current cell in this worksheet row. + * + * @return \PhpOffice\PhpSpreadsheet\Cell\Cell + */ + public function current() + { + return $this->worksheet->getCellByColumnAndRow($this->currentColumnIndex, $this->rowIndex); + } + + /** + * Return the current iterator key. + * + * @return string + */ + public function key() + { + return Coordinate::stringFromColumnIndex($this->currentColumnIndex); + } + + /** + * Set the iterator to its next value. + */ + public function next() + { + do { + ++$this->currentColumnIndex; + } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex <= $this->endColumnIndex)); + } + + /** + * Set the iterator to its previous value. + * + * @throws PhpSpreadsheetException + */ + public function prev() + { + do { + --$this->currentColumnIndex; + } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex >= $this->startColumnIndex)); + } + + /** + * Indicate if more columns exist in the worksheet range of columns that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->currentColumnIndex <= $this->endColumnIndex && $this->currentColumnIndex >= $this->startColumnIndex; + } + + /** + * Return the current iterator position. + * + * @return int + */ + public function getCurrentColumnIndex() + { + return $this->currentColumnIndex; + } + + /** + * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. + * + * @throws PhpSpreadsheetException + */ + protected function adjustForExistingOnlyRange() + { + if ($this->onlyExistingCells) { + while ((!$this->worksheet->cellExistsByColumnAndRow($this->startColumnIndex, $this->rowIndex)) && ($this->startColumnIndex <= $this->endColumnIndex)) { + ++$this->startColumnIndex; + } + if ($this->startColumnIndex > $this->endColumnIndex) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + while ((!$this->worksheet->cellExistsByColumnAndRow($this->endColumnIndex, $this->rowIndex)) && ($this->endColumnIndex >= $this->startColumnIndex)) { + --$this->endColumnIndex; + } + if ($this->endColumnIndex < $this->startColumnIndex) { + throw new PhpSpreadsheetException('No cells exist within the specified range'); + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php new file mode 100755 index 0000000..e434640 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowDimension.php @@ -0,0 +1,115 @@ +rowIndex = $pIndex; + + // set dimension as unformatted by default + parent::__construct(null); + } + + /** + * Get Row Index. + * + * @return int + */ + public function getRowIndex() + { + return $this->rowIndex; + } + + /** + * Set Row Index. + * + * @param int $pValue + * + * @return RowDimension + */ + public function setRowIndex($pValue) + { + $this->rowIndex = $pValue; + + return $this; + } + + /** + * Get Row Height. + * + * @return float + */ + public function getRowHeight() + { + return $this->height; + } + + /** + * Set Row Height. + * + * @param float $pValue + * + * @return RowDimension + */ + public function setRowHeight($pValue) + { + $this->height = $pValue; + + return $this; + } + + /** + * Get ZeroHeight. + * + * @return bool + */ + public function getZeroHeight() + { + return $this->zeroHeight; + } + + /** + * Set ZeroHeight. + * + * @param bool $pValue + * + * @return RowDimension + */ + public function setZeroHeight($pValue) + { + $this->zeroHeight = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php new file mode 100755 index 0000000..433cea6 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/RowIterator.php @@ -0,0 +1,170 @@ +subject = $subject; + $this->resetEnd($endRow); + $this->resetStart($startRow); + } + + /** + * Destructor. + */ + public function __destruct() + { + unset($this->subject); + } + + /** + * (Re)Set the start row and the current row pointer. + * + * @param int $startRow The row number at which to start iterating + * + * @throws PhpSpreadsheetException + * + * @return RowIterator + */ + public function resetStart($startRow = 1) + { + if ($startRow > $this->subject->getHighestRow()) { + throw new PhpSpreadsheetException("Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})"); + } + + $this->startRow = $startRow; + if ($this->endRow < $this->startRow) { + $this->endRow = $this->startRow; + } + $this->seek($startRow); + + return $this; + } + + /** + * (Re)Set the end row. + * + * @param int $endRow The row number at which to stop iterating + * + * @return RowIterator + */ + public function resetEnd($endRow = null) + { + $this->endRow = ($endRow) ? $endRow : $this->subject->getHighestRow(); + + return $this; + } + + /** + * Set the row pointer to the selected row. + * + * @param int $row The row number to set the current pointer at + * + * @throws PhpSpreadsheetException + * + * @return RowIterator + */ + public function seek($row = 1) + { + if (($row < $this->startRow) || ($row > $this->endRow)) { + throw new PhpSpreadsheetException("Row $row is out of range ({$this->startRow} - {$this->endRow})"); + } + $this->position = $row; + + return $this; + } + + /** + * Rewind the iterator to the starting row. + */ + public function rewind() + { + $this->position = $this->startRow; + } + + /** + * Return the current row in this worksheet. + * + * @return Row + */ + public function current() + { + return new Row($this->subject, $this->position); + } + + /** + * Return the current iterator key. + * + * @return int + */ + public function key() + { + return $this->position; + } + + /** + * Set the iterator to its next value. + */ + public function next() + { + ++$this->position; + } + + /** + * Set the iterator to its previous value. + */ + public function prev() + { + --$this->position; + } + + /** + * Indicate if more rows exist in the worksheet range of rows that we're iterating. + * + * @return bool + */ + public function valid() + { + return $this->position <= $this->endRow && $this->position >= $this->startRow; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php new file mode 100755 index 0000000..1728232 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php @@ -0,0 +1,171 @@ +zoomScale; + } + + /** + * Set ZoomScale. + * Valid values range from 10 to 400. + * + * @param int $pValue + * + * @throws PhpSpreadsheetException + * + * @return SheetView + */ + public function setZoomScale($pValue) + { + // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, + // but it is apparently still able to handle any scale >= 1 + if (($pValue >= 1) || $pValue === null) { + $this->zoomScale = $pValue; + } else { + throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.'); + } + + return $this; + } + + /** + * Get ZoomScaleNormal. + * + * @return int + */ + public function getZoomScaleNormal() + { + return $this->zoomScaleNormal; + } + + /** + * Set ZoomScale. + * Valid values range from 10 to 400. + * + * @param int $pValue + * + * @throws PhpSpreadsheetException + * + * @return SheetView + */ + public function setZoomScaleNormal($pValue) + { + if (($pValue >= 1) || $pValue === null) { + $this->zoomScaleNormal = $pValue; + } else { + throw new PhpSpreadsheetException('Scale must be greater than or equal to 1.'); + } + + return $this; + } + + /** + * Get View. + * + * @return string + */ + public function getView() + { + return $this->sheetviewType; + } + + /** + * Set View. + * + * Valid values are + * 'normal' self::SHEETVIEW_NORMAL + * 'pageLayout' self::SHEETVIEW_PAGE_LAYOUT + * 'pageBreakPreview' self::SHEETVIEW_PAGE_BREAK_PREVIEW + * + * @param string $pValue + * + * @throws PhpSpreadsheetException + * + * @return SheetView + */ + public function setView($pValue) + { + // MS Excel 2007 allows setting the view to 'normal', 'pageLayout' or 'pageBreakPreview' via the user interface + if ($pValue === null) { + $pValue = self::SHEETVIEW_NORMAL; + } + if (in_array($pValue, self::$sheetViewTypes)) { + $this->sheetviewType = $pValue; + } else { + throw new PhpSpreadsheetException('Invalid sheetview layout type.'); + } + + return $this; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + $vars = get_object_vars($this); + foreach ($vars as $key => $value) { + if (is_object($value)) { + $this->$key = clone $value; + } else { + $this->$key = $value; + } + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php new file mode 100755 index 0000000..1e525a3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -0,0 +1,3066 @@ +parent = $parent; + $this->setTitle($pTitle, false); + // setTitle can change $pTitle + $this->setCodeName($this->getTitle()); + $this->setSheetState(self::SHEETSTATE_VISIBLE); + + $this->cellCollection = CellsFactory::getInstance($this); + // Set page setup + $this->pageSetup = new PageSetup(); + // Set page margins + $this->pageMargins = new PageMargins(); + // Set page header/footer + $this->headerFooter = new HeaderFooter(); + // Set sheet view + $this->sheetView = new SheetView(); + // Drawing collection + $this->drawingCollection = new \ArrayObject(); + // Chart collection + $this->chartCollection = new \ArrayObject(); + // Protection + $this->protection = new Protection(); + // Default row dimension + $this->defaultRowDimension = new RowDimension(null); + // Default column dimension + $this->defaultColumnDimension = new ColumnDimension(null); + $this->autoFilter = new AutoFilter(null, $this); + } + + /** + * Disconnect all cells from this Worksheet object, + * typically so that the worksheet object can be unset. + */ + public function disconnectCells() + { + if ($this->cellCollection !== null) { + $this->cellCollection->unsetWorksheetCells(); + $this->cellCollection = null; + } + // detach ourself from the workbook, so that it can then delete this worksheet successfully + $this->parent = null; + } + + /** + * Code to execute when this worksheet is unset(). + */ + public function __destruct() + { + Calculation::getInstance($this->parent)->clearCalculationCacheForWorksheet($this->title); + + $this->disconnectCells(); + } + + /** + * Return the cell collection. + * + * @return Cells + */ + public function getCellCollection() + { + return $this->cellCollection; + } + + /** + * Get array of invalid characters for sheet title. + * + * @return array + */ + public static function getInvalidCharacters() + { + return self::$invalidCharacters; + } + + /** + * Check sheet code name for valid Excel syntax. + * + * @param string $pValue The string to check + * + * @throws Exception + * + * @return string The valid string + */ + private static function checkSheetCodeName($pValue) + { + $CharCount = Shared\StringHelper::countCharacters($pValue); + if ($CharCount == 0) { + throw new Exception('Sheet code name cannot be empty.'); + } + // Some of the printable ASCII characters are invalid: * : / \ ? [ ] and first and last characters cannot be a "'" + if ((str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) || + (Shared\StringHelper::substring($pValue, -1, 1) == '\'') || + (Shared\StringHelper::substring($pValue, 0, 1) == '\'')) { + throw new Exception('Invalid character found in sheet code name'); + } + + // Enforce maximum characters allowed for sheet title + if ($CharCount > self::SHEET_TITLE_MAXIMUM_LENGTH) { + throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet code name.'); + } + + return $pValue; + } + + /** + * Check sheet title for valid Excel syntax. + * + * @param string $pValue The string to check + * + * @throws Exception + * + * @return string The valid string + */ + private static function checkSheetTitle($pValue) + { + // Some of the printable ASCII characters are invalid: * : / \ ? [ ] + if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) { + throw new Exception('Invalid character found in sheet title'); + } + + // Enforce maximum characters allowed for sheet title + if (Shared\StringHelper::countCharacters($pValue) > self::SHEET_TITLE_MAXIMUM_LENGTH) { + throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet title.'); + } + + return $pValue; + } + + /** + * Get a sorted list of all cell coordinates currently held in the collection by row and column. + * + * @param bool $sorted Also sort the cell collection? + * + * @return string[] + */ + public function getCoordinates($sorted = true) + { + if ($this->cellCollection == null) { + return []; + } + + if ($sorted) { + return $this->cellCollection->getSortedCoordinates(); + } + + return $this->cellCollection->getCoordinates(); + } + + /** + * Get collection of row dimensions. + * + * @return RowDimension[] + */ + public function getRowDimensions() + { + return $this->rowDimensions; + } + + /** + * Get default row dimension. + * + * @return RowDimension + */ + public function getDefaultRowDimension() + { + return $this->defaultRowDimension; + } + + /** + * Get collection of column dimensions. + * + * @return ColumnDimension[] + */ + public function getColumnDimensions() + { + return $this->columnDimensions; + } + + /** + * Get default column dimension. + * + * @return ColumnDimension + */ + public function getDefaultColumnDimension() + { + return $this->defaultColumnDimension; + } + + /** + * Get collection of drawings. + * + * @return BaseDrawing[] + */ + public function getDrawingCollection() + { + return $this->drawingCollection; + } + + /** + * Get collection of charts. + * + * @return Chart[] + */ + public function getChartCollection() + { + return $this->chartCollection; + } + + /** + * Add chart. + * + * @param Chart $pChart + * @param null|int $iChartIndex Index where chart should go (0,1,..., or null for last) + * + * @return Chart + */ + public function addChart(Chart $pChart, $iChartIndex = null) + { + $pChart->setWorksheet($this); + if ($iChartIndex === null) { + $this->chartCollection[] = $pChart; + } else { + // Insert the chart at the requested index + array_splice($this->chartCollection, $iChartIndex, 0, [$pChart]); + } + + return $pChart; + } + + /** + * Return the count of charts on this worksheet. + * + * @return int The number of charts + */ + public function getChartCount() + { + return count($this->chartCollection); + } + + /** + * Get a chart by its index position. + * + * @param string $index Chart index position + * + * @return Chart|false + */ + public function getChartByIndex($index) + { + $chartCount = count($this->chartCollection); + if ($chartCount == 0) { + return false; + } + if ($index === null) { + $index = --$chartCount; + } + if (!isset($this->chartCollection[$index])) { + return false; + } + + return $this->chartCollection[$index]; + } + + /** + * Return an array of the names of charts on this worksheet. + * + * @return string[] The names of charts + */ + public function getChartNames() + { + $chartNames = []; + foreach ($this->chartCollection as $chart) { + $chartNames[] = $chart->getName(); + } + + return $chartNames; + } + + /** + * Get a chart by name. + * + * @param string $chartName Chart name + * + * @return Chart|false + */ + public function getChartByName($chartName) + { + $chartCount = count($this->chartCollection); + if ($chartCount == 0) { + return false; + } + foreach ($this->chartCollection as $index => $chart) { + if ($chart->getName() == $chartName) { + return $this->chartCollection[$index]; + } + } + + return false; + } + + /** + * Refresh column dimensions. + * + * @return Worksheet + */ + public function refreshColumnDimensions() + { + $currentColumnDimensions = $this->getColumnDimensions(); + $newColumnDimensions = []; + + foreach ($currentColumnDimensions as $objColumnDimension) { + $newColumnDimensions[$objColumnDimension->getColumnIndex()] = $objColumnDimension; + } + + $this->columnDimensions = $newColumnDimensions; + + return $this; + } + + /** + * Refresh row dimensions. + * + * @return Worksheet + */ + public function refreshRowDimensions() + { + $currentRowDimensions = $this->getRowDimensions(); + $newRowDimensions = []; + + foreach ($currentRowDimensions as $objRowDimension) { + $newRowDimensions[$objRowDimension->getRowIndex()] = $objRowDimension; + } + + $this->rowDimensions = $newRowDimensions; + + return $this; + } + + /** + * Calculate worksheet dimension. + * + * @return string String containing the dimension of this worksheet + */ + public function calculateWorksheetDimension() + { + // Return + return 'A1' . ':' . $this->getHighestColumn() . $this->getHighestRow(); + } + + /** + * Calculate worksheet data dimension. + * + * @return string String containing the dimension of this worksheet that actually contain data + */ + public function calculateWorksheetDataDimension() + { + // Return + return 'A1' . ':' . $this->getHighestDataColumn() . $this->getHighestDataRow(); + } + + /** + * Calculate widths for auto-size columns. + * + * @return Worksheet; + */ + public function calculateColumnWidths() + { + // initialize $autoSizes array + $autoSizes = []; + foreach ($this->getColumnDimensions() as $colDimension) { + if ($colDimension->getAutoSize()) { + $autoSizes[$colDimension->getColumnIndex()] = -1; + } + } + + // There is only something to do if there are some auto-size columns + if (!empty($autoSizes)) { + // build list of cells references that participate in a merge + $isMergeCell = []; + foreach ($this->getMergeCells() as $cells) { + foreach (Coordinate::extractAllCellReferencesInRange($cells) as $cellReference) { + $isMergeCell[$cellReference] = true; + } + } + + // loop through all cells in the worksheet + foreach ($this->getCoordinates(false) as $coordinate) { + $cell = $this->getCell($coordinate, false); + if ($cell !== null && isset($autoSizes[$this->cellCollection->getCurrentColumn()])) { + //Determine if cell is in merge range + $isMerged = isset($isMergeCell[$this->cellCollection->getCurrentCoordinate()]); + + //By default merged cells should be ignored + $isMergedButProceed = false; + + //The only exception is if it's a merge range value cell of a 'vertical' randge (1 column wide) + if ($isMerged && $cell->isMergeRangeValueCell()) { + $range = $cell->getMergeRange(); + $rangeBoundaries = Coordinate::rangeDimension($range); + if ($rangeBoundaries[0] == 1) { + $isMergedButProceed = true; + } + } + + // Determine width if cell does not participate in a merge or does and is a value cell of 1-column wide range + if (!$isMerged || $isMergedButProceed) { + // Calculated value + // To formatted string + $cellValue = NumberFormat::toFormattedString( + $cell->getCalculatedValue(), + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode() + ); + + $autoSizes[$this->cellCollection->getCurrentColumn()] = max( + (float) $autoSizes[$this->cellCollection->getCurrentColumn()], + (float) Shared\Font::calculateColumnWidth( + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont(), + $cellValue, + $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getAlignment()->getTextRotation(), + $this->getParent()->getDefaultStyle()->getFont() + ) + ); + } + } + } + + // adjust column widths + foreach ($autoSizes as $columnIndex => $width) { + if ($width == -1) { + $width = $this->getDefaultColumnDimension()->getWidth(); + } + $this->getColumnDimension($columnIndex)->setWidth($width); + } + } + + return $this; + } + + /** + * Get parent. + * + * @return Spreadsheet + */ + public function getParent() + { + return $this->parent; + } + + /** + * Re-bind parent. + * + * @param Spreadsheet $parent + * + * @return Worksheet + */ + public function rebindParent(Spreadsheet $parent) + { + if ($this->parent !== null) { + $namedRanges = $this->parent->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + $parent->addNamedRange($namedRange); + } + + $this->parent->removeSheetByIndex( + $this->parent->getIndex($this) + ); + } + $this->parent = $parent; + + return $this; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set title. + * + * @param string $pValue String containing the dimension of this worksheet + * @param bool $updateFormulaCellReferences Flag indicating whether cell references in formulae should + * be updated to reflect the new sheet name. + * This should be left as the default true, unless you are + * certain that no formula cells on any worksheet contain + * references to this worksheet + * @param bool $validate False to skip validation of new title. WARNING: This should only be set + * at parse time (by Readers), where titles can be assumed to be valid. + * + * @return Worksheet + */ + public function setTitle($pValue, $updateFormulaCellReferences = true, $validate = true) + { + // Is this a 'rename' or not? + if ($this->getTitle() == $pValue) { + return $this; + } + + // Old title + $oldTitle = $this->getTitle(); + + if ($validate) { + // Syntax check + self::checkSheetTitle($pValue); + + if ($this->parent) { + // Is there already such sheet name? + if ($this->parent->sheetNameExists($pValue)) { + // Use name, but append with lowest possible integer + + if (Shared\StringHelper::countCharacters($pValue) > 29) { + $pValue = Shared\StringHelper::substring($pValue, 0, 29); + } + $i = 1; + while ($this->parent->sheetNameExists($pValue . ' ' . $i)) { + ++$i; + if ($i == 10) { + if (Shared\StringHelper::countCharacters($pValue) > 28) { + $pValue = Shared\StringHelper::substring($pValue, 0, 28); + } + } elseif ($i == 100) { + if (Shared\StringHelper::countCharacters($pValue) > 27) { + $pValue = Shared\StringHelper::substring($pValue, 0, 27); + } + } + } + + $pValue .= " $i"; + } + } + } + + // Set title + $this->title = $pValue; + $this->dirty = true; + + if ($this->parent && $this->parent->getCalculationEngine()) { + // New title + $newTitle = $this->getTitle(); + $this->parent->getCalculationEngine() + ->renameCalculationCacheForWorksheet($oldTitle, $newTitle); + if ($updateFormulaCellReferences) { + ReferenceHelper::getInstance()->updateNamedFormulas($this->parent, $oldTitle, $newTitle); + } + } + + return $this; + } + + /** + * Get sheet state. + * + * @return string Sheet state (visible, hidden, veryHidden) + */ + public function getSheetState() + { + return $this->sheetState; + } + + /** + * Set sheet state. + * + * @param string $value Sheet state (visible, hidden, veryHidden) + * + * @return Worksheet + */ + public function setSheetState($value) + { + $this->sheetState = $value; + + return $this; + } + + /** + * Get page setup. + * + * @return PageSetup + */ + public function getPageSetup() + { + return $this->pageSetup; + } + + /** + * Set page setup. + * + * @param PageSetup $pValue + * + * @return Worksheet + */ + public function setPageSetup(PageSetup $pValue) + { + $this->pageSetup = $pValue; + + return $this; + } + + /** + * Get page margins. + * + * @return PageMargins + */ + public function getPageMargins() + { + return $this->pageMargins; + } + + /** + * Set page margins. + * + * @param PageMargins $pValue + * + * @return Worksheet + */ + public function setPageMargins(PageMargins $pValue) + { + $this->pageMargins = $pValue; + + return $this; + } + + /** + * Get page header/footer. + * + * @return HeaderFooter + */ + public function getHeaderFooter() + { + return $this->headerFooter; + } + + /** + * Set page header/footer. + * + * @param HeaderFooter $pValue + * + * @return Worksheet + */ + public function setHeaderFooter(HeaderFooter $pValue) + { + $this->headerFooter = $pValue; + + return $this; + } + + /** + * Get sheet view. + * + * @return SheetView + */ + public function getSheetView() + { + return $this->sheetView; + } + + /** + * Set sheet view. + * + * @param SheetView $pValue + * + * @return Worksheet + */ + public function setSheetView(SheetView $pValue) + { + $this->sheetView = $pValue; + + return $this; + } + + /** + * Get Protection. + * + * @return Protection + */ + public function getProtection() + { + return $this->protection; + } + + /** + * Set Protection. + * + * @param Protection $pValue + * + * @return Worksheet + */ + public function setProtection(Protection $pValue) + { + $this->protection = $pValue; + $this->dirty = true; + + return $this; + } + + /** + * Get highest worksheet column. + * + * @param string $row Return the data highest column for the specified row, + * or the highest column of any row if no row number is passed + * + * @return string Highest column name + */ + public function getHighestColumn($row = null) + { + if ($row == null) { + return $this->cachedHighestColumn; + } + + return $this->getHighestDataColumn($row); + } + + /** + * Get highest worksheet column that contains data. + * + * @param string $row Return the highest data column for the specified row, + * or the highest data column of any row if no row number is passed + * + * @return string Highest column name that contains data + */ + public function getHighestDataColumn($row = null) + { + return $this->cellCollection->getHighestColumn($row); + } + + /** + * Get highest worksheet row. + * + * @param string $column Return the highest data row for the specified column, + * or the highest row of any column if no column letter is passed + * + * @return int Highest row number + */ + public function getHighestRow($column = null) + { + if ($column == null) { + return $this->cachedHighestRow; + } + + return $this->getHighestDataRow($column); + } + + /** + * Get highest worksheet row that contains data. + * + * @param string $column Return the highest data row for the specified column, + * or the highest data row of any column if no column letter is passed + * + * @return int Highest row number that contains data + */ + public function getHighestDataRow($column = null) + { + return $this->cellCollection->getHighestRow($column); + } + + /** + * Get highest worksheet column and highest row that have cell records. + * + * @return array Highest column name and highest row number + */ + public function getHighestRowAndColumn() + { + return $this->cellCollection->getHighestRowAndColumn(); + } + + /** + * Set a cell value. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param mixed $pValue Value of the cell + * + * @return Worksheet + */ + public function setCellValue($pCoordinate, $pValue) + { + $this->getCell($pCoordinate)->setValue($pValue); + + return $this; + } + + /** + * Set a cell value by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param mixed $value Value of the cell + * + * @return Worksheet + */ + public function setCellValueByColumnAndRow($columnIndex, $row, $value) + { + $this->getCellByColumnAndRow($columnIndex, $row)->setValue($value); + + return $this; + } + + /** + * Set a cell value. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param mixed $pValue Value of the cell + * @param string $pDataType Explicit data type, see DataType::TYPE_* + * + * @return Worksheet + */ + public function setCellValueExplicit($pCoordinate, $pValue, $pDataType) + { + // Set value + $this->getCell($pCoordinate)->setValueExplicit($pValue, $pDataType); + + return $this; + } + + /** + * Set a cell value by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param mixed $value Value of the cell + * @param string $dataType Explicit data type, see DataType::TYPE_* + * + * @return Worksheet + */ + public function setCellValueExplicitByColumnAndRow($columnIndex, $row, $value, $dataType) + { + $this->getCellByColumnAndRow($columnIndex, $row)->setValueExplicit($value, $dataType); + + return $this; + } + + /** + * Get cell at a specific coordinate. + * + * @param string $pCoordinate Coordinate of the cell, eg: 'A1' + * @param bool $createIfNotExists Flag indicating whether a new cell should be created if it doesn't + * already exist, or a null should be returned instead + * + * @throws Exception + * + * @return null|Cell Cell that was found/created or null + */ + public function getCell($pCoordinate, $createIfNotExists = true) + { + // Uppercase coordinate + $pCoordinateUpper = strtoupper($pCoordinate); + + // Check cell collection + if ($this->cellCollection->has($pCoordinateUpper)) { + return $this->cellCollection->get($pCoordinateUpper); + } + + // Worksheet reference? + if (strpos($pCoordinate, '!') !== false) { + $worksheetReference = self::extractSheetTitle($pCoordinate, true); + + return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists); + } + + // Named range? + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && + (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { + $namedRange = NamedRange::resolveRange($pCoordinate, $this); + if ($namedRange !== null) { + $pCoordinate = $namedRange->getRange(); + + return $namedRange->getWorksheet()->getCell($pCoordinate, $createIfNotExists); + } + } + + if (Coordinate::coordinateIsRange($pCoordinate)) { + throw new Exception('Cell coordinate can not be a range of cells.'); + } elseif (strpos($pCoordinate, '$') !== false) { + throw new Exception('Cell coordinate must not be absolute.'); + } + + // Create new cell object, if required + return $createIfNotExists ? $this->createNewCell($pCoordinateUpper) : null; + } + + /** + * Get cell at a specific coordinate by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param bool $createIfNotExists Flag indicating whether a new cell should be created if it doesn't + * already exist, or a null should be returned instead + * + * @return null|Cell Cell that was found/created or null + */ + public function getCellByColumnAndRow($columnIndex, $row, $createIfNotExists = true) + { + $columnLetter = Coordinate::stringFromColumnIndex($columnIndex); + $coordinate = $columnLetter . $row; + + if ($this->cellCollection->has($coordinate)) { + return $this->cellCollection->get($coordinate); + } + + // Create new cell object, if required + return $createIfNotExists ? $this->createNewCell($coordinate) : null; + } + + /** + * Create a new cell at the specified coordinate. + * + * @param string $pCoordinate Coordinate of the cell + * + * @return Cell Cell that was created + */ + private function createNewCell($pCoordinate) + { + $cell = new Cell(null, DataType::TYPE_NULL, $this); + $this->cellCollection->add($pCoordinate, $cell); + $this->cellCollectionIsSorted = false; + + // Coordinates + $aCoordinates = Coordinate::coordinateFromString($pCoordinate); + if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($aCoordinates[0])) { + $this->cachedHighestColumn = $aCoordinates[0]; + } + if ($aCoordinates[1] > $this->cachedHighestRow) { + $this->cachedHighestRow = $aCoordinates[1]; + } + + // Cell needs appropriate xfIndex from dimensions records + // but don't create dimension records if they don't already exist + $rowDimension = $this->getRowDimension($aCoordinates[1], false); + $columnDimension = $this->getColumnDimension($aCoordinates[0], false); + + if ($rowDimension !== null && $rowDimension->getXfIndex() > 0) { + // then there is a row dimension with explicit style, assign it to the cell + $cell->setXfIndex($rowDimension->getXfIndex()); + } elseif ($columnDimension !== null && $columnDimension->getXfIndex() > 0) { + // then there is a column dimension, assign it to the cell + $cell->setXfIndex($columnDimension->getXfIndex()); + } + + return $cell; + } + + /** + * Does the cell at a specific coordinate exist? + * + * @param string $pCoordinate Coordinate of the cell eg: 'A1' + * + * @throws Exception + * + * @return bool + */ + public function cellExists($pCoordinate) + { + // Worksheet reference? + if (strpos($pCoordinate, '!') !== false) { + $worksheetReference = self::extractSheetTitle($pCoordinate, true); + + return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1])); + } + + // Named range? + if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && + (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { + $namedRange = NamedRange::resolveRange($pCoordinate, $this); + if ($namedRange !== null) { + $pCoordinate = $namedRange->getRange(); + if ($this->getHashCode() != $namedRange->getWorksheet()->getHashCode()) { + if (!$namedRange->getLocalOnly()) { + return $namedRange->getWorksheet()->cellExists($pCoordinate); + } + + throw new Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); + } + } else { + return false; + } + } + + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + if (Coordinate::coordinateIsRange($pCoordinate)) { + throw new Exception('Cell coordinate can not be a range of cells.'); + } elseif (strpos($pCoordinate, '$') !== false) { + throw new Exception('Cell coordinate must not be absolute.'); + } + + // Cell exists? + return $this->cellCollection->has($pCoordinate); + } + + /** + * Cell at a specific coordinate by using numeric cell coordinates exists? + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return bool + */ + public function cellExistsByColumnAndRow($columnIndex, $row) + { + return $this->cellExists(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get row dimension at a specific row. + * + * @param int $pRow Numeric index of the row + * @param bool $create + * + * @return RowDimension + */ + public function getRowDimension($pRow, $create = true) + { + // Found + $found = null; + + // Get row dimension + if (!isset($this->rowDimensions[$pRow])) { + if (!$create) { + return null; + } + $this->rowDimensions[$pRow] = new RowDimension($pRow); + + $this->cachedHighestRow = max($this->cachedHighestRow, $pRow); + } + + return $this->rowDimensions[$pRow]; + } + + /** + * Get column dimension at a specific column. + * + * @param string $pColumn String index of the column eg: 'A' + * @param bool $create + * + * @return ColumnDimension + */ + public function getColumnDimension($pColumn, $create = true) + { + // Uppercase coordinate + $pColumn = strtoupper($pColumn); + + // Fetch dimensions + if (!isset($this->columnDimensions[$pColumn])) { + if (!$create) { + return null; + } + $this->columnDimensions[$pColumn] = new ColumnDimension($pColumn); + + if (Coordinate::columnIndexFromString($this->cachedHighestColumn) < Coordinate::columnIndexFromString($pColumn)) { + $this->cachedHighestColumn = $pColumn; + } + } + + return $this->columnDimensions[$pColumn]; + } + + /** + * Get column dimension at a specific column by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * + * @return ColumnDimension + */ + public function getColumnDimensionByColumn($columnIndex) + { + return $this->getColumnDimension(Coordinate::stringFromColumnIndex($columnIndex)); + } + + /** + * Get styles. + * + * @return Style[] + */ + public function getStyles() + { + return $this->styles; + } + + /** + * Get style for cell. + * + * @param string $pCellCoordinate Cell coordinate (or range) to get style for, eg: 'A1' + * + * @throws Exception + * + * @return Style + */ + public function getStyle($pCellCoordinate) + { + // set this sheet as active + $this->parent->setActiveSheetIndex($this->parent->getIndex($this)); + + // set cell coordinate as active + $this->setSelectedCells(strtoupper($pCellCoordinate)); + + return $this->parent->getCellXfSupervisor(); + } + + /** + * Get conditional styles for a cell. + * + * @param string $pCoordinate eg: 'A1' + * + * @return Conditional[] + */ + public function getConditionalStyles($pCoordinate) + { + $pCoordinate = strtoupper($pCoordinate); + if (!isset($this->conditionalStylesCollection[$pCoordinate])) { + $this->conditionalStylesCollection[$pCoordinate] = []; + } + + return $this->conditionalStylesCollection[$pCoordinate]; + } + + /** + * Do conditional styles exist for this cell? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function conditionalStylesExists($pCoordinate) + { + return isset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); + } + + /** + * Removes conditional styles for a cell. + * + * @param string $pCoordinate eg: 'A1' + * + * @return Worksheet + */ + public function removeConditionalStyles($pCoordinate) + { + unset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); + + return $this; + } + + /** + * Get collection of conditional styles. + * + * @return array + */ + public function getConditionalStylesCollection() + { + return $this->conditionalStylesCollection; + } + + /** + * Set conditional styles. + * + * @param string $pCoordinate eg: 'A1' + * @param $pValue Conditional[] + * + * @return Worksheet + */ + public function setConditionalStyles($pCoordinate, $pValue) + { + $this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue; + + return $this; + } + + /** + * Get style for cell by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the cell + * @param int $row1 Numeric row coordinate of the cell + * @param null|int $columnIndex2 Numeric column coordinate of the range cell + * @param null|int $row2 Numeric row coordinate of the range cell + * + * @return Style + */ + public function getStyleByColumnAndRow($columnIndex1, $row1, $columnIndex2 = null, $row2 = null) + { + if ($columnIndex2 !== null && $row2 !== null) { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->getStyle($cellRange); + } + + return $this->getStyle(Coordinate::stringFromColumnIndex($columnIndex1) . $row1); + } + + /** + * Duplicate cell style to a range of cells. + * + * Please note that this will overwrite existing cell styles for cells in range! + * + * @param Style $pCellStyle Cell style to duplicate + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * + * @throws Exception + * + * @return Worksheet + */ + public function duplicateStyle(Style $pCellStyle, $pRange) + { + // Add the style to the workbook if necessary + $workbook = $this->parent; + if ($existingStyle = $this->parent->getCellXfByHashCode($pCellStyle->getHashCode())) { + // there is already such cell Xf in our collection + $xfIndex = $existingStyle->getIndex(); + } else { + // we don't have such a cell Xf, need to add + $workbook->addCellXf($pCellStyle); + $xfIndex = $pCellStyle->getIndex(); + } + + // Calculate range outer borders + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange . ':' . $pRange); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // Loop through cells and apply styles + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $this->getCell(Coordinate::stringFromColumnIndex($col) . $row)->setXfIndex($xfIndex); + } + } + + return $this; + } + + /** + * Duplicate conditional style to a range of cells. + * + * Please note that this will overwrite existing cell styles for cells in range! + * + * @param Conditional[] $pCellStyle Cell style to duplicate + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * + * @throws Exception + * + * @return Worksheet + */ + public function duplicateConditionalStyle(array $pCellStyle, $pRange = '') + { + foreach ($pCellStyle as $cellStyle) { + if (!($cellStyle instanceof Conditional)) { + throw new Exception('Style is not a conditional style'); + } + } + + // Calculate range outer borders + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange . ':' . $pRange); + + // Make sure we can loop upwards on rows and columns + if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { + $tmp = $rangeStart; + $rangeStart = $rangeEnd; + $rangeEnd = $tmp; + } + + // Loop through cells and apply styles + for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { + for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { + $this->setConditionalStyles(Coordinate::stringFromColumnIndex($col) . $row, $pCellStyle); + } + } + + return $this; + } + + /** + * Set break on a cell. + * + * @param string $pCoordinate Cell coordinate (e.g. A1) + * @param int $pBreak Break type (type of Worksheet::BREAK_*) + * + * @throws Exception + * + * @return Worksheet + */ + public function setBreak($pCoordinate, $pBreak) + { + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + if ($pCoordinate != '') { + if ($pBreak == self::BREAK_NONE) { + if (isset($this->breaks[$pCoordinate])) { + unset($this->breaks[$pCoordinate]); + } + } else { + $this->breaks[$pCoordinate] = $pBreak; + } + } else { + throw new Exception('No cell coordinate specified.'); + } + + return $this; + } + + /** + * Set break on a cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * @param int $break Break type (type of Worksheet::BREAK_*) + * + * @return Worksheet + */ + public function setBreakByColumnAndRow($columnIndex, $row, $break) + { + return $this->setBreak(Coordinate::stringFromColumnIndex($columnIndex) . $row, $break); + } + + /** + * Get breaks. + * + * @return array[] + */ + public function getBreaks() + { + return $this->breaks; + } + + /** + * Set merge on a cell range. + * + * @param string $pRange Cell range (e.g. A1:E1) + * + * @throws Exception + * + * @return Worksheet + */ + public function mergeCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (strpos($pRange, ':') !== false) { + $this->mergeCells[$pRange] = $pRange; + + // make sure cells are created + + // get the cells in the range + $aReferences = Coordinate::extractAllCellReferencesInRange($pRange); + + // create upper left cell if it does not already exist + $upperLeft = $aReferences[0]; + if (!$this->cellExists($upperLeft)) { + $this->getCell($upperLeft)->setValueExplicit(null, DataType::TYPE_NULL); + } + + // Blank out the rest of the cells in the range (if they exist) + $count = count($aReferences); + for ($i = 1; $i < $count; ++$i) { + if ($this->cellExists($aReferences[$i])) { + $this->getCell($aReferences[$i])->setValueExplicit(null, DataType::TYPE_NULL); + } + } + } else { + throw new Exception('Merge must be set on a range of cells.'); + } + + return $this; + } + + /** + * Set merge on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @throws Exception + * + * @return Worksheet + */ + public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->mergeCells($cellRange); + } + + /** + * Remove merge on a cell range. + * + * @param string $pRange Cell range (e.g. A1:E1) + * + * @throws Exception + * + * @return Worksheet + */ + public function unmergeCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (strpos($pRange, ':') !== false) { + if (isset($this->mergeCells[$pRange])) { + unset($this->mergeCells[$pRange]); + } else { + throw new Exception('Cell range ' . $pRange . ' not known as merged.'); + } + } else { + throw new Exception('Merge can only be removed from a range of cells.'); + } + + return $this; + } + + /** + * Remove merge on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @throws Exception + * + * @return Worksheet + */ + public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->unmergeCells($cellRange); + } + + /** + * Get merge cells array. + * + * @return array[] + */ + public function getMergeCells() + { + return $this->mergeCells; + } + + /** + * Set merge cells array for the entire sheet. Use instead mergeCells() to merge + * a single cell range. + * + * @param array $pValue + * + * @return Worksheet + */ + public function setMergeCells(array $pValue) + { + $this->mergeCells = $pValue; + + return $this; + } + + /** + * Set protection on a cell range. + * + * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) + * @param string $pPassword Password to unlock the protection + * @param bool $pAlreadyHashed If the password has already been hashed, set this to true + * + * @return Worksheet + */ + public function protectCells($pRange, $pPassword, $pAlreadyHashed = false) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (!$pAlreadyHashed) { + $pPassword = Shared\PasswordHasher::hashPassword($pPassword); + } + $this->protectedCells[$pRange] = $pPassword; + + return $this; + } + + /** + * Set protection on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * @param string $password Password to unlock the protection + * @param bool $alreadyHashed If the password has already been hashed, set this to true + * + * @return Worksheet + */ + public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->protectCells($cellRange, $password, $alreadyHashed); + } + + /** + * Remove protection on a cell range. + * + * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) + * + * @throws Exception + * + * @return Worksheet + */ + public function unprotectCells($pRange) + { + // Uppercase coordinate + $pRange = strtoupper($pRange); + + if (isset($this->protectedCells[$pRange])) { + unset($this->protectedCells[$pRange]); + } else { + throw new Exception('Cell range ' . $pRange . ' not known as protected.'); + } + + return $this; + } + + /** + * Remove protection on a cell range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the last cell + * @param int $row2 Numeric row coordinate of the last cell + * + * @throws Exception + * + * @return Worksheet + */ + public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; + + return $this->unprotectCells($cellRange); + } + + /** + * Get protected cells. + * + * @return array[] + */ + public function getProtectedCells() + { + return $this->protectedCells; + } + + /** + * Get Autofilter. + * + * @return AutoFilter + */ + public function getAutoFilter() + { + return $this->autoFilter; + } + + /** + * Set AutoFilter. + * + * @param AutoFilter|string $pValue + * A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility + * + * @throws Exception + * + * @return Worksheet + */ + public function setAutoFilter($pValue) + { + if (is_string($pValue)) { + $this->autoFilter->setRange($pValue); + } elseif (is_object($pValue) && ($pValue instanceof AutoFilter)) { + $this->autoFilter = $pValue; + } + + return $this; + } + + /** + * Set Autofilter Range by using numeric cell coordinates. + * + * @param int $columnIndex1 Numeric column coordinate of the first cell + * @param int $row1 Numeric row coordinate of the first cell + * @param int $columnIndex2 Numeric column coordinate of the second cell + * @param int $row2 Numeric row coordinate of the second cell + * + * @throws Exception + * + * @return Worksheet + */ + public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) + { + return $this->setAutoFilter( + Coordinate::stringFromColumnIndex($columnIndex1) . $row1 + . ':' . + Coordinate::stringFromColumnIndex($columnIndex2) . $row2 + ); + } + + /** + * Remove autofilter. + * + * @return Worksheet + */ + public function removeAutoFilter() + { + $this->autoFilter->setRange(null); + + return $this; + } + + /** + * Get Freeze Pane. + * + * @return string + */ + public function getFreezePane() + { + return $this->freezePane; + } + + /** + * Freeze Pane. + * + * Examples: + * + * - A2 will freeze the rows above cell A2 (i.e row 1) + * - B1 will freeze the columns to the left of cell B1 (i.e column A) + * - B2 will freeze the rows above and to the left of cell B2 (i.e row 1 and column A) + * + * @param null|string $cell Position of the split + * @param null|string $topLeftCell default position of the right bottom pane + * + * @throws Exception + * + * @return Worksheet + */ + public function freezePane($cell, $topLeftCell = null) + { + if (is_string($cell) && Coordinate::coordinateIsRange($cell)) { + throw new Exception('Freeze pane can not be set on a range of cells.'); + } + + if ($cell !== null && $topLeftCell === null) { + $coordinate = Coordinate::coordinateFromString($cell); + $topLeftCell = $coordinate[0] . $coordinate[1]; + } + + $this->freezePane = $cell; + $this->topLeftCell = $topLeftCell; + + return $this; + } + + /** + * Freeze Pane by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return Worksheet + */ + public function freezePaneByColumnAndRow($columnIndex, $row) + { + return $this->freezePane(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Unfreeze Pane. + * + * @return Worksheet + */ + public function unfreezePane() + { + return $this->freezePane(null); + } + + /** + * Get the default position of the right bottom pane. + * + * @return int + */ + public function getTopLeftCell() + { + return $this->topLeftCell; + } + + /** + * Insert a new row, updating all possible related data. + * + * @param int $pBefore Insert before this one + * @param int $pNumRows Number of rows to insert + * + * @throws Exception + * + * @return Worksheet + */ + public function insertNewRowBefore($pBefore, $pNumRows = 1) + { + if ($pBefore >= 1) { + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); + } else { + throw new Exception('Rows can only be inserted before at least row 1.'); + } + + return $this; + } + + /** + * Insert a new column, updating all possible related data. + * + * @param string $pBefore Insert before this one, eg: 'A' + * @param int $pNumCols Number of columns to insert + * + * @throws Exception + * + * @return Worksheet + */ + public function insertNewColumnBefore($pBefore, $pNumCols = 1) + { + if (!is_numeric($pBefore)) { + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); + } else { + throw new Exception('Column references should not be numeric.'); + } + + return $this; + } + + /** + * Insert a new column, updating all possible related data. + * + * @param int $beforeColumnIndex Insert before this one (numeric column coordinate of the cell) + * @param int $pNumCols Number of columns to insert + * + * @throws Exception + * + * @return Worksheet + */ + public function insertNewColumnBeforeByIndex($beforeColumnIndex, $pNumCols = 1) + { + if ($beforeColumnIndex >= 1) { + return $this->insertNewColumnBefore(Coordinate::stringFromColumnIndex($beforeColumnIndex), $pNumCols); + } + + throw new Exception('Columns can only be inserted before at least column A (1).'); + } + + /** + * Delete a row, updating all possible related data. + * + * @param int $pRow Remove starting with this one + * @param int $pNumRows Number of rows to remove + * + * @throws Exception + * + * @return Worksheet + */ + public function removeRow($pRow, $pNumRows = 1) + { + if ($pRow >= 1) { + $highestRow = $this->getHighestDataRow(); + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); + for ($r = 0; $r < $pNumRows; ++$r) { + $this->getCellCollection()->removeRow($highestRow); + --$highestRow; + } + } else { + throw new Exception('Rows to be deleted should at least start from row 1.'); + } + + return $this; + } + + /** + * Remove a column, updating all possible related data. + * + * @param string $pColumn Remove starting with this one, eg: 'A' + * @param int $pNumCols Number of columns to remove + * + * @throws Exception + * + * @return Worksheet + */ + public function removeColumn($pColumn, $pNumCols = 1) + { + if (!is_numeric($pColumn)) { + $highestColumn = $this->getHighestDataColumn(); + $pColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($pColumn) + $pNumCols); + $objReferenceHelper = ReferenceHelper::getInstance(); + $objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this); + for ($c = 0; $c < $pNumCols; ++$c) { + $this->getCellCollection()->removeColumn($highestColumn); + $highestColumn = Coordinate::stringFromColumnIndex(Coordinate::columnIndexFromString($highestColumn) - 1); + } + } else { + throw new Exception('Column references should not be numeric.'); + } + + return $this; + } + + /** + * Remove a column, updating all possible related data. + * + * @param int $columnIndex Remove starting with this one (numeric column coordinate of the cell) + * @param int $numColumns Number of columns to remove + * + * @throws Exception + * + * @return Worksheet + */ + public function removeColumnByIndex($columnIndex, $numColumns = 1) + { + if ($columnIndex >= 1) { + return $this->removeColumn(Coordinate::stringFromColumnIndex($columnIndex), $numColumns); + } + + throw new Exception('Columns to be deleted should at least start from column A (1)'); + } + + /** + * Show gridlines? + * + * @return bool + */ + public function getShowGridlines() + { + return $this->showGridlines; + } + + /** + * Set show gridlines. + * + * @param bool $pValue Show gridlines (true/false) + * + * @return Worksheet + */ + public function setShowGridlines($pValue) + { + $this->showGridlines = $pValue; + + return $this; + } + + /** + * Print gridlines? + * + * @return bool + */ + public function getPrintGridlines() + { + return $this->printGridlines; + } + + /** + * Set print gridlines. + * + * @param bool $pValue Print gridlines (true/false) + * + * @return Worksheet + */ + public function setPrintGridlines($pValue) + { + $this->printGridlines = $pValue; + + return $this; + } + + /** + * Show row and column headers? + * + * @return bool + */ + public function getShowRowColHeaders() + { + return $this->showRowColHeaders; + } + + /** + * Set show row and column headers. + * + * @param bool $pValue Show row and column headers (true/false) + * + * @return Worksheet + */ + public function setShowRowColHeaders($pValue) + { + $this->showRowColHeaders = $pValue; + + return $this; + } + + /** + * Show summary below? (Row/Column outlining). + * + * @return bool + */ + public function getShowSummaryBelow() + { + return $this->showSummaryBelow; + } + + /** + * Set show summary below. + * + * @param bool $pValue Show summary below (true/false) + * + * @return Worksheet + */ + public function setShowSummaryBelow($pValue) + { + $this->showSummaryBelow = $pValue; + + return $this; + } + + /** + * Show summary right? (Row/Column outlining). + * + * @return bool + */ + public function getShowSummaryRight() + { + return $this->showSummaryRight; + } + + /** + * Set show summary right. + * + * @param bool $pValue Show summary right (true/false) + * + * @return Worksheet + */ + public function setShowSummaryRight($pValue) + { + $this->showSummaryRight = $pValue; + + return $this; + } + + /** + * Get comments. + * + * @return Comment[] + */ + public function getComments() + { + return $this->comments; + } + + /** + * Set comments array for the entire sheet. + * + * @param Comment[] $pValue + * + * @return Worksheet + */ + public function setComments(array $pValue) + { + $this->comments = $pValue; + + return $this; + } + + /** + * Get comment for cell. + * + * @param string $pCellCoordinate Cell coordinate to get comment for, eg: 'A1' + * + * @throws Exception + * + * @return Comment + */ + public function getComment($pCellCoordinate) + { + // Uppercase coordinate + $pCellCoordinate = strtoupper($pCellCoordinate); + + if (Coordinate::coordinateIsRange($pCellCoordinate)) { + throw new Exception('Cell coordinate string can not be a range of cells.'); + } elseif (strpos($pCellCoordinate, '$') !== false) { + throw new Exception('Cell coordinate string must not be absolute.'); + } elseif ($pCellCoordinate == '') { + throw new Exception('Cell coordinate can not be zero-length string.'); + } + + // Check if we already have a comment for this cell. + if (isset($this->comments[$pCellCoordinate])) { + return $this->comments[$pCellCoordinate]; + } + + // If not, create a new comment. + $newComment = new Comment(); + $this->comments[$pCellCoordinate] = $newComment; + + return $newComment; + } + + /** + * Get comment for cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @return Comment + */ + public function getCommentByColumnAndRow($columnIndex, $row) + { + return $this->getComment(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get active cell. + * + * @return string Example: 'A1' + */ + public function getActiveCell() + { + return $this->activeCell; + } + + /** + * Get selected cells. + * + * @return string + */ + public function getSelectedCells() + { + return $this->selectedCells; + } + + /** + * Selected cell. + * + * @param string $pCoordinate Cell (i.e. A1) + * + * @return Worksheet + */ + public function setSelectedCell($pCoordinate) + { + return $this->setSelectedCells($pCoordinate); + } + + /** + * Select a range of cells. + * + * @param string $pCoordinate Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' + * + * @return Worksheet + */ + public function setSelectedCells($pCoordinate) + { + // Uppercase coordinate + $pCoordinate = strtoupper($pCoordinate); + + // Convert 'A' to 'A:A' + $pCoordinate = preg_replace('/^([A-Z]+)$/', '${1}:${1}', $pCoordinate); + + // Convert '1' to '1:1' + $pCoordinate = preg_replace('/^(\d+)$/', '${1}:${1}', $pCoordinate); + + // Convert 'A:C' to 'A1:C1048576' + $pCoordinate = preg_replace('/^([A-Z]+):([A-Z]+)$/', '${1}1:${2}1048576', $pCoordinate); + + // Convert '1:3' to 'A1:XFD3' + $pCoordinate = preg_replace('/^(\d+):(\d+)$/', 'A${1}:XFD${2}', $pCoordinate); + + if (Coordinate::coordinateIsRange($pCoordinate)) { + list($first) = Coordinate::splitRange($pCoordinate); + $this->activeCell = $first[0]; + } else { + $this->activeCell = $pCoordinate; + } + $this->selectedCells = $pCoordinate; + + return $this; + } + + /** + * Selected cell by using numeric cell coordinates. + * + * @param int $columnIndex Numeric column coordinate of the cell + * @param int $row Numeric row coordinate of the cell + * + * @throws Exception + * + * @return Worksheet + */ + public function setSelectedCellByColumnAndRow($columnIndex, $row) + { + return $this->setSelectedCells(Coordinate::stringFromColumnIndex($columnIndex) . $row); + } + + /** + * Get right-to-left. + * + * @return bool + */ + public function getRightToLeft() + { + return $this->rightToLeft; + } + + /** + * Set right-to-left. + * + * @param bool $value Right-to-left true/false + * + * @return Worksheet + */ + public function setRightToLeft($value) + { + $this->rightToLeft = $value; + + return $this; + } + + /** + * Fill worksheet from values in array. + * + * @param array $source Source array + * @param mixed $nullValue Value in source array that stands for blank cell + * @param string $startCell Insert array starting from this cell address as the top left coordinate + * @param bool $strictNullComparison Apply strict comparison when testing for null values in the array + * + * @throws Exception + * + * @return Worksheet + */ + public function fromArray(array $source, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) + { + // Convert a 1-D array to 2-D (for ease of looping) + if (!is_array(end($source))) { + $source = [$source]; + } + + // start coordinate + list($startColumn, $startRow) = Coordinate::coordinateFromString($startCell); + + // Loop through $source + foreach ($source as $rowData) { + $currentColumn = $startColumn; + foreach ($rowData as $cellValue) { + if ($strictNullComparison) { + if ($cellValue !== $nullValue) { + // Set cell value + $this->getCell($currentColumn . $startRow)->setValue($cellValue); + } + } else { + if ($cellValue != $nullValue) { + // Set cell value + $this->getCell($currentColumn . $startRow)->setValue($cellValue); + } + } + ++$currentColumn; + } + ++$startRow; + } + + return $this; + } + + /** + * Create array from a range of cells. + * + * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @return array + */ + public function rangeToArray($pRange, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + // Returnvalue + $returnValue = []; + // Identify the range that we need to extract from the worksheet + list($rangeStart, $rangeEnd) = Coordinate::rangeBoundaries($pRange); + $minCol = Coordinate::stringFromColumnIndex($rangeStart[0]); + $minRow = $rangeStart[1]; + $maxCol = Coordinate::stringFromColumnIndex($rangeEnd[0]); + $maxRow = $rangeEnd[1]; + + ++$maxCol; + // Loop through rows + $r = -1; + for ($row = $minRow; $row <= $maxRow; ++$row) { + $rRef = ($returnCellRef) ? $row : ++$r; + $c = -1; + // Loop through columns in the current row + for ($col = $minCol; $col != $maxCol; ++$col) { + $cRef = ($returnCellRef) ? $col : ++$c; + // Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen + // so we test and retrieve directly against cellCollection + if ($this->cellCollection->has($col . $row)) { + // Cell exists + $cell = $this->cellCollection->get($col . $row); + if ($cell->getValue() !== null) { + if ($cell->getValue() instanceof RichText) { + $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText(); + } else { + if ($calculateFormulas) { + $returnValue[$rRef][$cRef] = $cell->getCalculatedValue(); + } else { + $returnValue[$rRef][$cRef] = $cell->getValue(); + } + } + + if ($formatData) { + $style = $this->parent->getCellXfByIndex($cell->getXfIndex()); + $returnValue[$rRef][$cRef] = NumberFormat::toFormattedString( + $returnValue[$rRef][$cRef], + ($style && $style->getNumberFormat()) ? $style->getNumberFormat()->getFormatCode() : NumberFormat::FORMAT_GENERAL + ); + } + } else { + // Cell holds a NULL + $returnValue[$rRef][$cRef] = $nullValue; + } + } else { + // Cell doesn't exist + $returnValue[$rRef][$cRef] = $nullValue; + } + } + } + + // Return + return $returnValue; + } + + /** + * Create array from a range of cells. + * + * @param string $pNamedRange Name of the Named Range + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @throws Exception + * + * @return array + */ + public function namedRangeToArray($pNamedRange, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + $namedRange = NamedRange::resolveRange($pNamedRange, $this); + if ($namedRange !== null) { + $pWorkSheet = $namedRange->getWorksheet(); + $pCellRange = $namedRange->getRange(); + + return $pWorkSheet->rangeToArray($pCellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + } + + throw new Exception('Named Range ' . $pNamedRange . ' does not exist.'); + } + + /** + * Create array from worksheet. + * + * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist + * @param bool $calculateFormulas Should formulas be calculated? + * @param bool $formatData Should formatting be applied to cell values? + * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero + * True - Return rows and columns indexed by their actual row and column IDs + * + * @return array + */ + public function toArray($nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) + { + // Garbage collect... + $this->garbageCollect(); + + // Identify the range that we need to extract from the worksheet + $maxCol = $this->getHighestColumn(); + $maxRow = $this->getHighestRow(); + + // Return + return $this->rangeToArray('A1:' . $maxCol . $maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + } + + /** + * Get row iterator. + * + * @param int $startRow The row number at which to start iterating + * @param int $endRow The row number at which to stop iterating + * + * @return RowIterator + */ + public function getRowIterator($startRow = 1, $endRow = null) + { + return new RowIterator($this, $startRow, $endRow); + } + + /** + * Get column iterator. + * + * @param string $startColumn The column address at which to start iterating + * @param string $endColumn The column address at which to stop iterating + * + * @return ColumnIterator + */ + public function getColumnIterator($startColumn = 'A', $endColumn = null) + { + return new ColumnIterator($this, $startColumn, $endColumn); + } + + /** + * Run PhpSpreadsheet garbage collector. + * + * @return Worksheet + */ + public function garbageCollect() + { + // Flush cache + $this->cellCollection->get('A1'); + + // Lookup highest column and highest row if cells are cleaned + $colRow = $this->cellCollection->getHighestRowAndColumn(); + $highestRow = $colRow['row']; + $highestColumn = Coordinate::columnIndexFromString($colRow['column']); + + // Loop through column dimensions + foreach ($this->columnDimensions as $dimension) { + $highestColumn = max($highestColumn, Coordinate::columnIndexFromString($dimension->getColumnIndex())); + } + + // Loop through row dimensions + foreach ($this->rowDimensions as $dimension) { + $highestRow = max($highestRow, $dimension->getRowIndex()); + } + + // Cache values + if ($highestColumn < 1) { + $this->cachedHighestColumn = 'A'; + } else { + $this->cachedHighestColumn = Coordinate::stringFromColumnIndex($highestColumn); + } + $this->cachedHighestRow = $highestRow; + + // Return + return $this; + } + + /** + * Get hash code. + * + * @return string Hash code + */ + public function getHashCode() + { + if ($this->dirty) { + $this->hash = md5($this->title . $this->autoFilter . ($this->protection->isProtectionEnabled() ? 't' : 'f') . __CLASS__); + $this->dirty = false; + } + + return $this->hash; + } + + /** + * Extract worksheet title from range. + * + * Example: extractSheetTitle("testSheet!A1") ==> 'A1' + * Example: extractSheetTitle("'testSheet 1'!A1", true) ==> ['testSheet 1', 'A1']; + * + * @param string $pRange Range to extract title from + * @param bool $returnRange Return range? (see example) + * + * @return mixed + */ + public static function extractSheetTitle($pRange, $returnRange = false) + { + // Sheet title included? + if (($sep = strrpos($pRange, '!')) === false) { + return $returnRange ? ['', $pRange] : ''; + } + + if ($returnRange) { + return [substr($pRange, 0, $sep), substr($pRange, $sep + 1)]; + } + + return substr($pRange, $sep + 1); + } + + /** + * Get hyperlink. + * + * @param string $pCellCoordinate Cell coordinate to get hyperlink for, eg: 'A1' + * + * @return Hyperlink + */ + public function getHyperlink($pCellCoordinate) + { + // return hyperlink if we already have one + if (isset($this->hyperlinkCollection[$pCellCoordinate])) { + return $this->hyperlinkCollection[$pCellCoordinate]; + } + + // else create hyperlink + $this->hyperlinkCollection[$pCellCoordinate] = new Hyperlink(); + + return $this->hyperlinkCollection[$pCellCoordinate]; + } + + /** + * Set hyperlink. + * + * @param string $pCellCoordinate Cell coordinate to insert hyperlink, eg: 'A1' + * @param null|Hyperlink $pHyperlink + * + * @return Worksheet + */ + public function setHyperlink($pCellCoordinate, Hyperlink $pHyperlink = null) + { + if ($pHyperlink === null) { + unset($this->hyperlinkCollection[$pCellCoordinate]); + } else { + $this->hyperlinkCollection[$pCellCoordinate] = $pHyperlink; + } + + return $this; + } + + /** + * Hyperlink at a specific coordinate exists? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function hyperlinkExists($pCoordinate) + { + return isset($this->hyperlinkCollection[$pCoordinate]); + } + + /** + * Get collection of hyperlinks. + * + * @return Hyperlink[] + */ + public function getHyperlinkCollection() + { + return $this->hyperlinkCollection; + } + + /** + * Get data validation. + * + * @param string $pCellCoordinate Cell coordinate to get data validation for, eg: 'A1' + * + * @return DataValidation + */ + public function getDataValidation($pCellCoordinate) + { + // return data validation if we already have one + if (isset($this->dataValidationCollection[$pCellCoordinate])) { + return $this->dataValidationCollection[$pCellCoordinate]; + } + + // else create data validation + $this->dataValidationCollection[$pCellCoordinate] = new DataValidation(); + + return $this->dataValidationCollection[$pCellCoordinate]; + } + + /** + * Set data validation. + * + * @param string $pCellCoordinate Cell coordinate to insert data validation, eg: 'A1' + * @param null|DataValidation $pDataValidation + * + * @return Worksheet + */ + public function setDataValidation($pCellCoordinate, DataValidation $pDataValidation = null) + { + if ($pDataValidation === null) { + unset($this->dataValidationCollection[$pCellCoordinate]); + } else { + $this->dataValidationCollection[$pCellCoordinate] = $pDataValidation; + } + + return $this; + } + + /** + * Data validation at a specific coordinate exists? + * + * @param string $pCoordinate eg: 'A1' + * + * @return bool + */ + public function dataValidationExists($pCoordinate) + { + return isset($this->dataValidationCollection[$pCoordinate]); + } + + /** + * Get collection of data validations. + * + * @return DataValidation[] + */ + public function getDataValidationCollection() + { + return $this->dataValidationCollection; + } + + /** + * Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet. + * + * @param string $range + * + * @return string Adjusted range value + */ + public function shrinkRangeToFit($range) + { + $maxCol = $this->getHighestColumn(); + $maxRow = $this->getHighestRow(); + $maxCol = Coordinate::columnIndexFromString($maxCol); + + $rangeBlocks = explode(' ', $range); + foreach ($rangeBlocks as &$rangeSet) { + $rangeBoundaries = Coordinate::getRangeBoundaries($rangeSet); + + if (Coordinate::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) { + $rangeBoundaries[0][0] = Coordinate::stringFromColumnIndex($maxCol); + } + if ($rangeBoundaries[0][1] > $maxRow) { + $rangeBoundaries[0][1] = $maxRow; + } + if (Coordinate::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) { + $rangeBoundaries[1][0] = Coordinate::stringFromColumnIndex($maxCol); + } + if ($rangeBoundaries[1][1] > $maxRow) { + $rangeBoundaries[1][1] = $maxRow; + } + $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1]; + } + unset($rangeSet); + $stRange = implode(' ', $rangeBlocks); + + return $stRange; + } + + /** + * Get tab color. + * + * @return Color + */ + public function getTabColor() + { + if ($this->tabColor === null) { + $this->tabColor = new Color(); + } + + return $this->tabColor; + } + + /** + * Reset tab color. + * + * @return Worksheet + */ + public function resetTabColor() + { + $this->tabColor = null; + unset($this->tabColor); + + return $this; + } + + /** + * Tab color set? + * + * @return bool + */ + public function isTabColorSet() + { + return $this->tabColor !== null; + } + + /** + * Copy worksheet (!= clone!). + * + * @return Worksheet + */ + public function copy() + { + $copied = clone $this; + + return $copied; + } + + /** + * Implement PHP __clone to create a deep clone, not just a shallow copy. + */ + public function __clone() + { + foreach ($this as $key => $val) { + if ($key == 'parent') { + continue; + } + + if (is_object($val) || (is_array($val))) { + if ($key == 'cellCollection') { + $newCollection = $this->cellCollection->cloneCellCollection($this); + $this->cellCollection = $newCollection; + } elseif ($key == 'drawingCollection') { + $currentCollection = $this->drawingCollection; + $this->drawingCollection = new ArrayObject(); + foreach ($currentCollection as $item) { + if (is_object($item)) { + $newDrawing = clone $item; + $newDrawing->setWorksheet($this); + } + } + } elseif (($key == 'autoFilter') && ($this->autoFilter instanceof AutoFilter)) { + $newAutoFilter = clone $this->autoFilter; + $this->autoFilter = $newAutoFilter; + $this->autoFilter->setParent($this); + } else { + $this->{$key} = unserialize(serialize($val)); + } + } + } + } + + /** + * Define the code name of the sheet. + * + * @param string $pValue Same rule as Title minus space not allowed (but, like Excel, change + * silently space to underscore) + * @param bool $validate False to skip validation of new title. WARNING: This should only be set + * at parse time (by Readers), where titles can be assumed to be valid. + * + * @throws Exception + * + * @return Worksheet + */ + public function setCodeName($pValue, $validate = true) + { + // Is this a 'rename' or not? + if ($this->getCodeName() == $pValue) { + return $this; + } + + if ($validate) { + $pValue = str_replace(' ', '_', $pValue); //Excel does this automatically without flinching, we are doing the same + + // Syntax check + // throw an exception if not valid + self::checkSheetCodeName($pValue); + + // We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_' + + if ($this->getParent()) { + // Is there already such sheet name? + if ($this->getParent()->sheetCodeNameExists($pValue)) { + // Use name, but append with lowest possible integer + + if (Shared\StringHelper::countCharacters($pValue) > 29) { + $pValue = Shared\StringHelper::substring($pValue, 0, 29); + } + $i = 1; + while ($this->getParent()->sheetCodeNameExists($pValue . '_' . $i)) { + ++$i; + if ($i == 10) { + if (Shared\StringHelper::countCharacters($pValue) > 28) { + $pValue = Shared\StringHelper::substring($pValue, 0, 28); + } + } elseif ($i == 100) { + if (Shared\StringHelper::countCharacters($pValue) > 27) { + $pValue = Shared\StringHelper::substring($pValue, 0, 27); + } + } + } + + $pValue = $pValue . '_' . $i; // ok, we have a valid name + } + } + } + + $this->codeName = $pValue; + + return $this; + } + + /** + * Return the code name of the sheet. + * + * @return null|string + */ + public function getCodeName() + { + return $this->codeName; + } + + /** + * Sheet has a code name ? + * + * @return bool + */ + public function hasCodeName() + { + return $this->codeName !== null; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php new file mode 100755 index 0000000..f13150d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/BaseWriter.php @@ -0,0 +1,86 @@ +includeCharts; + } + + public function setIncludeCharts($pValue) + { + $this->includeCharts = (bool) $pValue; + + return $this; + } + + public function getPreCalculateFormulas() + { + return $this->preCalculateFormulas; + } + + public function setPreCalculateFormulas($pValue) + { + $this->preCalculateFormulas = (bool) $pValue; + + return $this; + } + + public function getUseDiskCaching() + { + return $this->useDiskCaching; + } + + public function setUseDiskCaching($pValue, $pDirectory = null) + { + $this->useDiskCaching = $pValue; + + if ($pDirectory !== null) { + if (is_dir($pDirectory)) { + $this->diskCachingDirectory = $pDirectory; + } else { + throw new Exception("Directory does not exist: $pDirectory"); + } + } + + return $this; + } + + public function getDiskCachingDirectory() + { + return $this->diskCachingDirectory; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php new file mode 100755 index 0000000..ae38ab7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Csv.php @@ -0,0 +1,342 @@ +spreadsheet = $spreadsheet; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param string $pFilename + * + * @throws Exception + */ + public function save($pFilename) + { + // Fetch sheet + $sheet = $this->spreadsheet->getSheet($this->sheetIndex); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveArrayReturnType = Calculation::getArrayReturnType(); + Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); + + // Open file + $fileHandle = fopen($pFilename, 'wb+'); + if ($fileHandle === false) { + throw new Exception("Could not open file $pFilename for writing."); + } + + if ($this->excelCompatibility) { + $this->setUseBOM(true); // Enforce UTF-8 BOM Header + $this->setIncludeSeparatorLine(true); // Set separator line + $this->setEnclosure('"'); // Set enclosure to " + $this->setDelimiter(';'); // Set delimiter to a semi-colon + $this->setLineEnding("\r\n"); + } + if ($this->useBOM) { + // Write the UTF-8 BOM code if required + fwrite($fileHandle, "\xEF\xBB\xBF"); + } + if ($this->includeSeparatorLine) { + // Write the separator line if required + fwrite($fileHandle, 'sep=' . $this->getDelimiter() . $this->lineEnding); + } + + // Identify the range that we need to extract from the worksheet + $maxCol = $sheet->getHighestDataColumn(); + $maxRow = $sheet->getHighestDataRow(); + + // Write rows to file + for ($row = 1; $row <= $maxRow; ++$row) { + // Convert the row to an array... + $cellsArray = $sheet->rangeToArray('A' . $row . ':' . $maxCol . $row, '', $this->preCalculateFormulas); + // ... and write to the file + $this->writeLine($fileHandle, $cellsArray[0]); + } + + // Close file + fclose($fileHandle); + + Calculation::setArrayReturnType($saveArrayReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Get delimiter. + * + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Set delimiter. + * + * @param string $pValue Delimiter, defaults to ',' + * + * @return CSV + */ + public function setDelimiter($pValue) + { + $this->delimiter = $pValue; + + return $this; + } + + /** + * Get enclosure. + * + * @return string + */ + public function getEnclosure() + { + return $this->enclosure; + } + + /** + * Set enclosure. + * + * @param string $pValue Enclosure, defaults to " + * + * @return CSV + */ + public function setEnclosure($pValue) + { + if ($pValue == '') { + $pValue = null; + } + $this->enclosure = $pValue; + + return $this; + } + + /** + * Get line ending. + * + * @return string + */ + public function getLineEnding() + { + return $this->lineEnding; + } + + /** + * Set line ending. + * + * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) + * + * @return CSV + */ + public function setLineEnding($pValue) + { + $this->lineEnding = $pValue; + + return $this; + } + + /** + * Get whether BOM should be used. + * + * @return bool + */ + public function getUseBOM() + { + return $this->useBOM; + } + + /** + * Set whether BOM should be used. + * + * @param bool $pValue Use UTF-8 byte-order mark? Defaults to false + * + * @return CSV + */ + public function setUseBOM($pValue) + { + $this->useBOM = $pValue; + + return $this; + } + + /** + * Get whether a separator line should be included. + * + * @return bool + */ + public function getIncludeSeparatorLine() + { + return $this->includeSeparatorLine; + } + + /** + * Set whether a separator line should be included as the first line of the file. + * + * @param bool $pValue Use separator line? Defaults to false + * + * @return CSV + */ + public function setIncludeSeparatorLine($pValue) + { + $this->includeSeparatorLine = $pValue; + + return $this; + } + + /** + * Get whether the file should be saved with full Excel Compatibility. + * + * @return bool + */ + public function getExcelCompatibility() + { + return $this->excelCompatibility; + } + + /** + * Set whether the file should be saved with full Excel Compatibility. + * + * @param bool $pValue Set the file to be written as a fully Excel compatible csv file + * Note that this overrides other settings such as useBOM, enclosure and delimiter + * + * @return CSV + */ + public function setExcelCompatibility($pValue) + { + $this->excelCompatibility = $pValue; + + return $this; + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return CSV + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Write line to CSV file. + * + * @param resource $pFileHandle PHP filehandle + * @param array $pValues Array containing values in a row + */ + private function writeLine($pFileHandle, array $pValues) + { + // No leading delimiter + $writeDelimiter = false; + + // Build the line + $line = ''; + + foreach ($pValues as $element) { + // Escape enclosures + $element = str_replace($this->enclosure, $this->enclosure . $this->enclosure, $element); + + // Add delimiter + if ($writeDelimiter) { + $line .= $this->delimiter; + } else { + $writeDelimiter = true; + } + + // Add enclosed string + $line .= $this->enclosure . $element . $this->enclosure; + } + + // Add line ending + $line .= $this->lineEnding; + + // Write to file + fwrite($pFileHandle, $line); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php new file mode 100755 index 0000000..92e6f5f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Exception.php @@ -0,0 +1,9 @@ +spreadsheet = $spreadsheet; + $this->defaultFont = $this->spreadsheet->getDefaultStyle()->getFont(); + } + + /** + * Save Spreadsheet to file. + * + * @param string $pFilename + * + * @throws WriterException + */ + public function save($pFilename) + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveArrayReturnType = Calculation::getArrayReturnType(); + Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); + + // Build CSS + $this->buildCSS(!$this->useInlineCss); + + // Open file + $fileHandle = fopen($pFilename, 'wb+'); + if ($fileHandle === false) { + throw new WriterException("Could not open file $pFilename for writing."); + } + + // Write headers + fwrite($fileHandle, $this->generateHTMLHeader(!$this->useInlineCss)); + + // Write navigation (tabs) + if ((!$this->isPdf) && ($this->generateSheetNavigationBlock)) { + fwrite($fileHandle, $this->generateNavigation()); + } + + // Write data + fwrite($fileHandle, $this->generateSheetData()); + + // Write footer + fwrite($fileHandle, $this->generateHTMLFooter()); + + // Close file + fclose($fileHandle); + + Calculation::setArrayReturnType($saveArrayReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Map VAlign. + * + * @param string $vAlign Vertical alignment + * + * @return string + */ + private function mapVAlign($vAlign) + { + switch ($vAlign) { + case Alignment::VERTICAL_BOTTOM: + return 'bottom'; + case Alignment::VERTICAL_TOP: + return 'top'; + case Alignment::VERTICAL_CENTER: + case Alignment::VERTICAL_JUSTIFY: + return 'middle'; + default: + return 'baseline'; + } + } + + /** + * Map HAlign. + * + * @param string $hAlign Horizontal alignment + * + * @return false|string + */ + private function mapHAlign($hAlign) + { + switch ($hAlign) { + case Alignment::HORIZONTAL_GENERAL: + return false; + case Alignment::HORIZONTAL_LEFT: + return 'left'; + case Alignment::HORIZONTAL_RIGHT: + return 'right'; + case Alignment::HORIZONTAL_CENTER: + case Alignment::HORIZONTAL_CENTER_CONTINUOUS: + return 'center'; + case Alignment::HORIZONTAL_JUSTIFY: + return 'justify'; + default: + return false; + } + } + + /** + * Map border style. + * + * @param int $borderStyle Sheet index + * + * @return string + */ + private function mapBorderStyle($borderStyle) + { + switch ($borderStyle) { + case Border::BORDER_NONE: + return 'none'; + case Border::BORDER_DASHDOT: + return '1px dashed'; + case Border::BORDER_DASHDOTDOT: + return '1px dotted'; + case Border::BORDER_DASHED: + return '1px dashed'; + case Border::BORDER_DOTTED: + return '1px dotted'; + case Border::BORDER_DOUBLE: + return '3px double'; + case Border::BORDER_HAIR: + return '1px solid'; + case Border::BORDER_MEDIUM: + return '2px solid'; + case Border::BORDER_MEDIUMDASHDOT: + return '2px dashed'; + case Border::BORDER_MEDIUMDASHDOTDOT: + return '2px dotted'; + case Border::BORDER_MEDIUMDASHED: + return '2px dashed'; + case Border::BORDER_SLANTDASHDOT: + return '2px dashed'; + case Border::BORDER_THICK: + return '3px solid'; + case Border::BORDER_THIN: + return '1px solid'; + default: + // map others to thin + return '1px solid'; + } + } + + /** + * Get sheet index. + * + * @return int + */ + public function getSheetIndex() + { + return $this->sheetIndex; + } + + /** + * Set sheet index. + * + * @param int $pValue Sheet index + * + * @return HTML + */ + public function setSheetIndex($pValue) + { + $this->sheetIndex = $pValue; + + return $this; + } + + /** + * Get sheet index. + * + * @return bool + */ + public function getGenerateSheetNavigationBlock() + { + return $this->generateSheetNavigationBlock; + } + + /** + * Set sheet index. + * + * @param bool $pValue Flag indicating whether the sheet navigation block should be generated or not + * + * @return HTML + */ + public function setGenerateSheetNavigationBlock($pValue) + { + $this->generateSheetNavigationBlock = (bool) $pValue; + + return $this; + } + + /** + * Write all sheets (resets sheetIndex to NULL). + */ + public function writeAllSheets() + { + $this->sheetIndex = null; + + return $this; + } + + /** + * Generate HTML header. + * + * @param bool $pIncludeStyles Include styles? + * + * @throws WriterException + * + * @return string + */ + public function generateHTMLHeader($pIncludeStyles = false) + { + // Construct HTML + $properties = $this->spreadsheet->getProperties(); + $html = '' . PHP_EOL; + $html .= '' . PHP_EOL; + $html .= ' ' . PHP_EOL; + $html .= ' ' . PHP_EOL; + $html .= ' ' . PHP_EOL; + if ($properties->getTitle() > '') { + $html .= ' ' . htmlspecialchars($properties->getTitle()) . '' . PHP_EOL; + } + if ($properties->getCreator() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getTitle() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getDescription() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getSubject() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getKeywords() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getCategory() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getCompany() > '') { + $html .= ' ' . PHP_EOL; + } + if ($properties->getManager() > '') { + $html .= ' ' . PHP_EOL; + } + + if ($pIncludeStyles) { + $html .= $this->generateStyles(true); + } + + $html .= ' ' . PHP_EOL; + $html .= '' . PHP_EOL; + $html .= ' ' . PHP_EOL; + + return $html; + } + + /** + * Generate sheet data. + * + * @throws WriterException + * + * @return string + */ + public function generateSheetData() + { + // Ensure that Spans have been calculated? + if ($this->sheetIndex !== null || !$this->spansAreCalculated) { + $this->calculateSpans(); + } + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Construct HTML + $html = ''; + + // Loop all sheets + $sheetId = 0; + foreach ($sheets as $sheet) { + // Write table header + $html .= $this->generateTableHeader($sheet); + + // Get worksheet dimension + $dimension = explode(':', $sheet->calculateWorksheetDimension()); + $dimension[0] = Coordinate::coordinateFromString($dimension[0]); + $dimension[0][0] = Coordinate::columnIndexFromString($dimension[0][0]); + $dimension[1] = Coordinate::coordinateFromString($dimension[1]); + $dimension[1][0] = Coordinate::columnIndexFromString($dimension[1][0]); + + // row min,max + $rowMin = $dimension[0][1]; + $rowMax = $dimension[1][1]; + + // calculate start of

, + $tbodyStart = $rowMin; + $theadStart = $theadEnd = 0; // default: no no + if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop(); + + // we can only support repeating rows that start at top row + if ($rowsToRepeatAtTop[0] == 1) { + $theadStart = $rowsToRepeatAtTop[0]; + $theadEnd = $rowsToRepeatAtTop[1]; + $tbodyStart = $rowsToRepeatAtTop[1] + 1; + } + } + + // Loop through cells + $row = $rowMin - 1; + while ($row++ < $rowMax) { + // ? + if ($row == $theadStart) { + $html .= ' ' . PHP_EOL; + $cellType = 'th'; + } + + // ? + if ($row == $tbodyStart) { + $html .= ' ' . PHP_EOL; + $cellType = 'td'; + } + + // Write row if there are HTML table cells in it + if (!isset($this->isSpannedRow[$sheet->getParent()->getIndex($sheet)][$row])) { + // Start a new rowData + $rowData = []; + // Loop through columns + $column = $dimension[0][0]; + while ($column <= $dimension[1][0]) { + // Cell exists? + if ($sheet->cellExistsByColumnAndRow($column, $row)) { + $rowData[$column] = Coordinate::stringFromColumnIndex($column) . $row; + } else { + $rowData[$column] = ''; + } + ++$column; + } + $html .= $this->generateRow($sheet, $rowData, $row - 1, $cellType); + } + + // ? + if ($row == $theadEnd) { + $html .= ' ' . PHP_EOL; + } + } + $html .= $this->extendRowsForChartsAndImages($sheet, $row); + + // Close table body. + $html .= ' ' . PHP_EOL; + + // Write table footer + $html .= $this->generateTableFooter(); + + // Writing PDF? + if ($this->isPdf) { + if ($this->sheetIndex === null && $sheetId + 1 < $this->spreadsheet->getSheetCount()) { + $html .= '
'; + } + } + + // Next sheet + ++$sheetId; + } + + return $html; + } + + /** + * Generate sheet tabs. + * + * @throws WriterException + * + * @return string + */ + public function generateNavigation() + { + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Construct HTML + $html = ''; + + // Only if there are more than 1 sheets + if (count($sheets) > 1) { + // Loop all sheets + $sheetId = 0; + + $html .= '' . PHP_EOL; + } + + return $html; + } + + private function extendRowsForChartsAndImages(Worksheet $pSheet, $row) + { + $rowMax = $row; + $colMax = 'A'; + if ($this->includeCharts) { + foreach ($pSheet->getChartCollection() as $chart) { + if ($chart instanceof Chart) { + $chartCoordinates = $chart->getTopLeftPosition(); + $chartTL = Coordinate::coordinateFromString($chartCoordinates['cell']); + $chartCol = Coordinate::columnIndexFromString($chartTL[0]); + if ($chartTL[1] > $rowMax) { + $rowMax = $chartTL[1]; + if ($chartCol > Coordinate::columnIndexFromString($colMax)) { + $colMax = $chartTL[0]; + } + } + } + } + } + + foreach ($pSheet->getDrawingCollection() as $drawing) { + if ($drawing instanceof Drawing) { + $imageTL = Coordinate::coordinateFromString($drawing->getCoordinates()); + $imageCol = Coordinate::columnIndexFromString($imageTL[0]); + if ($imageTL[1] > $rowMax) { + $rowMax = $imageTL[1]; + if ($imageCol > Coordinate::columnIndexFromString($colMax)) { + $colMax = $imageTL[0]; + } + } + } + } + + // Don't extend rows if not needed + if ($row === $rowMax) { + return ''; + } + + $html = ''; + ++$colMax; + + while ($row <= $rowMax) { + $html .= '
'; + for ($col = 'A'; $col != $colMax; ++$col) { + $html .= ''; + } + ++$row; + $html .= ''; + } + + return $html; + } + + /** + * Generate image tag in cell. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param string $coordinates Cell coordinates + * + * @return string + */ + private function writeImageInCell(Worksheet $pSheet, $coordinates) + { + // Construct HTML + $html = ''; + + // Write images + foreach ($pSheet->getDrawingCollection() as $drawing) { + if ($drawing instanceof Drawing) { + if ($drawing->getCoordinates() == $coordinates) { + $filename = $drawing->getPath(); + + // Strip off eventual '.' + if (substr($filename, 0, 1) == '.') { + $filename = substr($filename, 1); + } + + // Prepend images root + $filename = $this->getImagesRoot() . $filename; + + // Strip off eventual '.' + if (substr($filename, 0, 1) == '.' && substr($filename, 0, 2) != './') { + $filename = substr($filename, 1); + } + + // Convert UTF8 data to PCDATA + $filename = htmlspecialchars($filename); + + $html .= PHP_EOL; + if ((!$this->embedImages) || ($this->isPdf)) { + $imageData = $filename; + } else { + $imageDetails = getimagesize($filename); + if ($fp = fopen($filename, 'rb', 0)) { + $picture = fread($fp, filesize($filename)); + fclose($fp); + // base64 encode the binary data, then break it + // into chunks according to RFC 2045 semantics + $base64 = chunk_split(base64_encode($picture)); + $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64; + } else { + $imageData = $filename; + } + } + + $html .= '
'; + $html .= ''; + $html .= '
'; + } + } elseif ($drawing instanceof MemoryDrawing) { + if ($drawing->getCoordinates() != $coordinates) { + continue; + } + ob_start(); // Let's start output buffering. + imagepng($drawing->getImageResource()); // This will normally output the image, but because of ob_start(), it won't. + $contents = ob_get_contents(); // Instead, output above is saved to $contents + ob_end_clean(); // End the output buffer. + + $dataUri = 'data:image/jpeg;base64,' . base64_encode($contents); + + // Because of the nature of tables, width is more important than height. + // max-width: 100% ensures that image doesnt overflow containing cell + // width: X sets width of supplied image. + // As a result, images bigger than cell will be contained and images smaller will not get stretched + $html .= ''; + } + } + + return $html; + } + + /** + * Generate chart tag in cell. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param string $coordinates Cell coordinates + * + * @return string + */ + private function writeChartInCell(Worksheet $pSheet, $coordinates) + { + // Construct HTML + $html = ''; + + // Write charts + foreach ($pSheet->getChartCollection() as $chart) { + if ($chart instanceof Chart) { + $chartCoordinates = $chart->getTopLeftPosition(); + if ($chartCoordinates['cell'] == $coordinates) { + $chartFileName = File::sysGetTempDir() . '/' . uniqid('', true) . '.png'; + if (!$chart->render($chartFileName)) { + return; + } + + $html .= PHP_EOL; + $imageDetails = getimagesize($chartFileName); + if ($fp = fopen($chartFileName, 'rb', 0)) { + $picture = fread($fp, filesize($chartFileName)); + fclose($fp); + // base64 encode the binary data, then break it + // into chunks according to RFC 2045 semantics + $base64 = chunk_split(base64_encode($picture)); + $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64; + + $html .= '
'; + $html .= '' . PHP_EOL; + $html .= '
'; + + unlink($chartFileName); + } + } + } + } + + // Return + return $html; + } + + /** + * Generate CSS styles. + * + * @param bool $generateSurroundingHTML Generate surrounding HTML tags? (<style> and </style>) + * + * @throws WriterException + * + * @return string + */ + public function generateStyles($generateSurroundingHTML = true) + { + // Build CSS + $css = $this->buildCSS($generateSurroundingHTML); + + // Construct HTML + $html = ''; + + // Start styles + if ($generateSurroundingHTML) { + $html .= ' ' . PHP_EOL; + } + + // Return + return $html; + } + + /** + * Build CSS styles. + * + * @param bool $generateSurroundingHTML Generate surrounding HTML style? (html { }) + * + * @throws WriterException + * + * @return array + */ + public function buildCSS($generateSurroundingHTML = true) + { + // Cached? + if ($this->cssStyles !== null) { + return $this->cssStyles; + } + + // Ensure that spans have been calculated + if (!$this->spansAreCalculated) { + $this->calculateSpans(); + } + + // Construct CSS + $css = []; + + // Start styles + if ($generateSurroundingHTML) { + // html { } + $css['html']['font-family'] = 'Calibri, Arial, Helvetica, sans-serif'; + $css['html']['font-size'] = '11pt'; + $css['html']['background-color'] = 'white'; + } + + // CSS for comments as found in LibreOffice + $css['a.comment-indicator:hover + div.comment'] = [ + 'background' => '#ffd', + 'position' => 'absolute', + 'display' => 'block', + 'border' => '1px solid black', + 'padding' => '0.5em', + ]; + + $css['a.comment-indicator'] = [ + 'background' => 'red', + 'display' => 'inline-block', + 'border' => '1px solid black', + 'width' => '0.5em', + 'height' => '0.5em', + ]; + + $css['div.comment']['display'] = 'none'; + + // table { } + $css['table']['border-collapse'] = 'collapse'; + if (!$this->isPdf) { + $css['table']['page-break-after'] = 'always'; + } + + // .gridlines td { } + $css['.gridlines td']['border'] = '1px dotted black'; + $css['.gridlines th']['border'] = '1px dotted black'; + + // .b {} + $css['.b']['text-align'] = 'center'; // BOOL + + // .e {} + $css['.e']['text-align'] = 'center'; // ERROR + + // .f {} + $css['.f']['text-align'] = 'right'; // FORMULA + + // .inlineStr {} + $css['.inlineStr']['text-align'] = 'left'; // INLINE + + // .n {} + $css['.n']['text-align'] = 'right'; // NUMERIC + + // .s {} + $css['.s']['text-align'] = 'left'; // STRING + + // Calculate cell style hashes + foreach ($this->spreadsheet->getCellXfCollection() as $index => $style) { + $css['td.style' . $index] = $this->createCSSStyle($style); + $css['th.style' . $index] = $this->createCSSStyle($style); + } + + // Fetch sheets + $sheets = []; + if ($this->sheetIndex === null) { + $sheets = $this->spreadsheet->getAllSheets(); + } else { + $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex); + } + + // Build styles per sheet + foreach ($sheets as $sheet) { + // Calculate hash code + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + // Build styles + // Calculate column widths + $sheet->calculateColumnWidths(); + + // col elements, initialize + $highestColumnIndex = Coordinate::columnIndexFromString($sheet->getHighestColumn()) - 1; + $column = -1; + while ($column++ < $highestColumnIndex) { + $this->columnWidths[$sheetIndex][$column] = 42; // approximation + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = '42pt'; + } + + // col elements, loop through columnDimensions and set width + foreach ($sheet->getColumnDimensions() as $columnDimension) { + if (($width = SharedDrawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont)) >= 0) { + $width = SharedDrawing::pixelsToPoints($width); + $column = Coordinate::columnIndexFromString($columnDimension->getColumnIndex()) - 1; + $this->columnWidths[$sheetIndex][$column] = $width; + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt'; + + if ($columnDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['visibility'] = 'collapse'; + $css['table.sheet' . $sheetIndex . ' col.col' . $column]['*display'] = 'none'; // target IE6+7 + } + } + } + + // Default row height + $rowDimension = $sheet->getDefaultRowDimension(); + + // table.sheetN tr { } + $css['table.sheet' . $sheetIndex . ' tr'] = []; + + if ($rowDimension->getRowHeight() == -1) { + $pt_height = SharedFont::getDefaultRowHeightByFont($this->spreadsheet->getDefaultStyle()->getFont()); + } else { + $pt_height = $rowDimension->getRowHeight(); + } + $css['table.sheet' . $sheetIndex . ' tr']['height'] = $pt_height . 'pt'; + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr']['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr']['visibility'] = 'hidden'; + } + + // Calculate row heights + foreach ($sheet->getRowDimensions() as $rowDimension) { + $row = $rowDimension->getRowIndex() - 1; + + // table.sheetN tr.rowYYYYYY { } + $css['table.sheet' . $sheetIndex . ' tr.row' . $row] = []; + + if ($rowDimension->getRowHeight() == -1) { + $pt_height = SharedFont::getDefaultRowHeightByFont($this->spreadsheet->getDefaultStyle()->getFont()); + } else { + $pt_height = $rowDimension->getRowHeight(); + } + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'] = $pt_height . 'pt'; + if ($rowDimension->getVisible() === false) { + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['display'] = 'none'; + $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['visibility'] = 'hidden'; + } + } + } + + // Cache + if ($this->cssStyles === null) { + $this->cssStyles = $css; + } + + // Return + return $css; + } + + /** + * Create CSS style. + * + * @param Style $pStyle + * + * @return array + */ + private function createCSSStyle(Style $pStyle) + { + // Create CSS + $css = array_merge( + $this->createCSSStyleAlignment($pStyle->getAlignment()), + $this->createCSSStyleBorders($pStyle->getBorders()), + $this->createCSSStyleFont($pStyle->getFont()), + $this->createCSSStyleFill($pStyle->getFill()) + ); + + // Return + return $css; + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Alignment). + * + * @param Alignment $pStyle \PhpOffice\PhpSpreadsheet\Style\Alignment + * + * @return array + */ + private function createCSSStyleAlignment(Alignment $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['vertical-align'] = $this->mapVAlign($pStyle->getVertical()); + if ($textAlign = $this->mapHAlign($pStyle->getHorizontal())) { + $css['text-align'] = $textAlign; + if (in_array($textAlign, ['left', 'right'])) { + $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px'; + } + } + + return $css; + } + + /** + * Create CSS style (\PhpOffice\PhpSpreadsheet\Style\Font). + * + * @param Font $pStyle + * + * @return array + */ + private function createCSSStyleFont(Font $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + if ($pStyle->getBold()) { + $css['font-weight'] = 'bold'; + } + if ($pStyle->getUnderline() != Font::UNDERLINE_NONE && $pStyle->getStrikethrough()) { + $css['text-decoration'] = 'underline line-through'; + } elseif ($pStyle->getUnderline() != Font::UNDERLINE_NONE) { + $css['text-decoration'] = 'underline'; + } elseif ($pStyle->getStrikethrough()) { + $css['text-decoration'] = 'line-through'; + } + if ($pStyle->getItalic()) { + $css['font-style'] = 'italic'; + } + + $css['color'] = '#' . $pStyle->getColor()->getRGB(); + $css['font-family'] = '\'' . $pStyle->getName() . '\''; + $css['font-size'] = $pStyle->getSize() . 'pt'; + + return $css; + } + + /** + * Create CSS style (Borders). + * + * @param Borders $pStyle Borders + * + * @return array + */ + private function createCSSStyleBorders(Borders $pStyle) + { + // Construct CSS + $css = []; + + // Create CSS + $css['border-bottom'] = $this->createCSSStyleBorder($pStyle->getBottom()); + $css['border-top'] = $this->createCSSStyleBorder($pStyle->getTop()); + $css['border-left'] = $this->createCSSStyleBorder($pStyle->getLeft()); + $css['border-right'] = $this->createCSSStyleBorder($pStyle->getRight()); + + return $css; + } + + /** + * Create CSS style (Border). + * + * @param Border $pStyle Border + * + * @return string + */ + private function createCSSStyleBorder(Border $pStyle) + { + // Create CSS - add !important to non-none border styles for merged cells + $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle()); + $css = $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); + + return $css; + } + + /** + * Create CSS style (Fill). + * + * @param Fill $pStyle Fill + * + * @return array + */ + private function createCSSStyleFill(Fill $pStyle) + { + // Construct HTML + $css = []; + + // Create CSS + $value = $pStyle->getFillType() == Fill::FILL_NONE ? + 'white' : '#' . $pStyle->getStartColor()->getRGB(); + $css['background-color'] = $value; + + return $css; + } + + /** + * Generate HTML footer. + */ + public function generateHTMLFooter() + { + // Construct HTML + $html = ''; + $html .= ' ' . PHP_EOL; + $html .= '' . PHP_EOL; + + return $html; + } + + /** + * Generate table header. + * + * @param Worksheet $pSheet The worksheet for the table we are writing + * + * @return string + */ + private function generateTableHeader($pSheet) + { + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + + // Construct HTML + $html = ''; + $html .= $this->setMargins($pSheet); + + if (!$this->useInlineCss) { + $gridlines = $pSheet->getShowGridlines() ? ' gridlines' : ''; + $html .= '
element because TCPDF + // does not recognize e.g.
element because TCPDF + // does not recognize e.g.
'; + $html .= $this->writeImageInCell($pSheet, $col . $row); + if ($this->includeCharts) { + $html .= $this->writeChartInCell($pSheet, $col . $row); + } + $html .= '
' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table']) ? + $this->assembleCSS($this->cssStyles['table']) : ''; + + if ($this->isPdf && $pSheet->getShowGridlines()) { + $html .= '
' . PHP_EOL; + } else { + $html .= '
' . PHP_EOL; + } + } + + // Write elements + $highestColumnIndex = Coordinate::columnIndexFromString($pSheet->getHighestColumn()) - 1; + $i = -1; + while ($i++ < $highestColumnIndex) { + if (!$this->isPdf) { + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) ? + $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : ''; + $html .= ' ' . PHP_EOL; + } + } + } + + return $html; + } + + /** + * Generate table footer. + */ + private function generateTableFooter() + { + $html = '
' . PHP_EOL; + + return $html; + } + + /** + * Generate row. + * + * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + * @param array $pValues Array containing cells in a row + * @param int $pRow Row number (0-based) + * @param string $cellType eg: 'td' + * + * @throws WriterException + * + * @return string + */ + private function generateRow(Worksheet $pSheet, array $pValues, $pRow, $cellType) + { + // Construct HTML + $html = ''; + + // Sheet index + $sheetIndex = $pSheet->getParent()->getIndex($pSheet); + + // Dompdf and breaks + if ($this->isPdf && count($pSheet->getBreaks()) > 0) { + $breaks = $pSheet->getBreaks(); + + // check if a break is needed before this row + if (isset($breaks['A' . $pRow])) { + // close table: + $html .= $this->generateTableFooter(); + + // insert page break + $html .= '
'; + + // open table again: + etc. + $html .= $this->generateTableHeader($pSheet); + } + } + + // Write row start + if (!$this->useInlineCss) { + $html .= ' ' . PHP_EOL; + } else { + $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) + ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) : ''; + + $html .= ' ' . PHP_EOL; + } + + // Write cells + $colNum = 0; + foreach ($pValues as $cellAddress) { + $cell = ($cellAddress > '') ? $pSheet->getCell($cellAddress) : ''; + $coordinate = Coordinate::stringFromColumnIndex($colNum + 1) . ($pRow + 1); + if (!$this->useInlineCss) { + $cssClass = 'column' . $colNum; + } else { + $cssClass = []; + if ($cellType == 'th') { + if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum])) { + $this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum]; + } + } else { + if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum])) { + $this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum]; + } + } + } + $colSpan = 1; + $rowSpan = 1; + + // initialize + $cellData = ' '; + + // Cell + if ($cell instanceof Cell) { + $cellData = ''; + if ($cell->getParent() === null) { + $cell->attach($pSheet); + } + // Value + if ($cell->getValue() instanceof RichText) { + // Loop through rich text elements + $elements = $cell->getValue()->getRichTextElements(); + foreach ($elements as $element) { + // Rich text start? + if ($element instanceof Run) { + $cellData .= ''; + + if ($element->getFont()->getSuperscript()) { + $cellData .= ''; + } elseif ($element->getFont()->getSubscript()) { + $cellData .= ''; + } + } + + // Convert UTF8 data to PCDATA + $cellText = $element->getText(); + $cellData .= htmlspecialchars($cellText); + + if ($element instanceof Run) { + if ($element->getFont()->getSuperscript()) { + $cellData .= ''; + } elseif ($element->getFont()->getSubscript()) { + $cellData .= ''; + } + + $cellData .= ''; + } + } + } else { + if ($this->preCalculateFormulas) { + $cellData = NumberFormat::toFormattedString( + $cell->getCalculatedValue(), + $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), + [$this, 'formatColor'] + ); + } else { + $cellData = NumberFormat::toFormattedString( + $cell->getValue(), + $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), + [$this, 'formatColor'] + ); + } + $cellData = htmlspecialchars($cellData); + if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperscript()) { + $cellData = '' . $cellData . ''; + } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubscript()) { + $cellData = '' . $cellData . ''; + } + } + + // Converts the cell content so that spaces occuring at beginning of each new line are replaced by   + // Example: " Hello\n to the world" is converted to "  Hello\n to the world" + $cellData = preg_replace('/(?m)(?:^|\\G) /', ' ', $cellData); + + // convert newline "\n" to '
' + $cellData = nl2br($cellData); + + // Extend CSS class? + if (!$this->useInlineCss) { + $cssClass .= ' style' . $cell->getXfIndex(); + $cssClass .= ' ' . $cell->getDataType(); + } else { + if ($cellType == 'th') { + if (isset($this->cssStyles['th.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['th.style' . $cell->getXfIndex()]); + } + } else { + if (isset($this->cssStyles['td.style' . $cell->getXfIndex()])) { + $cssClass = array_merge($cssClass, $this->cssStyles['td.style' . $cell->getXfIndex()]); + } + } + + // General horizontal alignment: Actual horizontal alignment depends on dataType + $sharedStyle = $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex()); + if ($sharedStyle->getAlignment()->getHorizontal() == Alignment::HORIZONTAL_GENERAL + && isset($this->cssStyles['.' . $cell->getDataType()]['text-align']) + ) { + $cssClass['text-align'] = $this->cssStyles['.' . $cell->getDataType()]['text-align']; + } + } + } + + // Hyperlink? + if ($pSheet->hyperlinkExists($coordinate) && !$pSheet->getHyperlink($coordinate)->isInternal()) { + $cellData = '' . $cellData . ''; + } + + // Should the cell be written or is it swallowed by a rowspan or colspan? + $writeCell = !(isset($this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]) + && $this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]); + + // Colspan and Rowspan + $colspan = 1; + $rowspan = 1; + if (isset($this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum])) { + $spans = $this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]; + $rowSpan = $spans['rowspan']; + $colSpan = $spans['colspan']; + + // Also apply style from last cell in merge to fix borders - + // relies on !important for non-none border declarations in createCSSStyleBorder + $endCellCoord = Coordinate::stringFromColumnIndex($colNum + $colSpan) . ($pRow + $rowSpan); + if (!$this->useInlineCss) { + $cssClass .= ' style' . $pSheet->getCell($endCellCoord)->getXfIndex(); + } + } + + // Write + if ($writeCell) { + // Column start + $html .= ' <' . $cellType; + if (!$this->useInlineCss) { + $html .= ' class="' . $cssClass . '"'; + } else { + //** Necessary redundant code for the sake of \PhpOffice\PhpSpreadsheet\Writer\Pdf ** + // We must explicitly write the width of the + $width = 0; + $i = $colNum - 1; + $e = $colNum + $colSpan - 1; + while ($i++ < $e) { + if (isset($this->columnWidths[$sheetIndex][$i])) { + $width += $this->columnWidths[$sheetIndex][$i]; + } + } + $cssClass['width'] = $width . 'pt'; + + // We must also explicitly write the height of the + if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height'])) { + $height = $this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height']; + $cssClass['height'] = $height; + } + //** end of redundant code ** + + $html .= ' style="' . $this->assembleCSS($cssClass) . '"'; + } + if ($colSpan > 1) { + $html .= ' colspan="' . $colSpan . '"'; + } + if ($rowSpan > 1) { + $html .= ' rowspan="' . $rowSpan . '"'; + } + $html .= '>'; + + $html .= $this->writeComment($pSheet, $coordinate); + + // Image? + $html .= $this->writeImageInCell($pSheet, $coordinate); + + // Chart? + if ($this->includeCharts) { + $html .= $this->writeChartInCell($pSheet, $coordinate); + } + + // Cell data + $html .= $cellData; + + // Column end + $html .= '' . PHP_EOL; + } + + // Next column + ++$colNum; + } + + // Write row end + $html .= ' ' . PHP_EOL; + + // Return + return $html; + } + + /** + * Takes array where of CSS properties / values and converts to CSS string. + * + * @param array $pValue + * + * @return string + */ + private function assembleCSS(array $pValue = []) + { + $pairs = []; + foreach ($pValue as $property => $value) { + $pairs[] = $property . ':' . $value; + } + $string = implode('; ', $pairs); + + return $string; + } + + /** + * Get images root. + * + * @return string + */ + public function getImagesRoot() + { + return $this->imagesRoot; + } + + /** + * Set images root. + * + * @param string $pValue + * + * @return HTML + */ + public function setImagesRoot($pValue) + { + $this->imagesRoot = $pValue; + + return $this; + } + + /** + * Get embed images. + * + * @return bool + */ + public function getEmbedImages() + { + return $this->embedImages; + } + + /** + * Set embed images. + * + * @param bool $pValue + * + * @return HTML + */ + public function setEmbedImages($pValue) + { + $this->embedImages = $pValue; + + return $this; + } + + /** + * Get use inline CSS? + * + * @return bool + */ + public function getUseInlineCss() + { + return $this->useInlineCss; + } + + /** + * Set use inline CSS? + * + * @param bool $pValue + * + * @return HTML + */ + public function setUseInlineCss($pValue) + { + $this->useInlineCss = $pValue; + + return $this; + } + + /** + * Add color to formatted string as inline style. + * + * @param string $pValue Plain formatted value without color + * @param string $pFormat Format code + * + * @return string + */ + public function formatColor($pValue, $pFormat) + { + // Color information, e.g. [Red] is always at the beginning + $color = null; // initialize + $matches = []; + + $color_regex = '/^\\[[a-zA-Z]+\\]/'; + if (preg_match($color_regex, $pFormat, $matches)) { + $color = str_replace(['[', ']'], '', $matches[0]); + $color = strtolower($color); + } + + // convert to PCDATA + $value = htmlspecialchars($pValue); + + // color span tag + if ($color !== null) { + $value = '' . $value . ''; + } + + return $value; + } + + /** + * Calculate information about HTML colspan and rowspan which is not always the same as Excel's. + */ + private function calculateSpans() + { + // Identify all cells that should be omitted in HTML due to cell merge. + // In HTML only the upper-left cell should be written and it should have + // appropriate rowspan / colspan attribute + $sheetIndexes = $this->sheetIndex !== null ? + [$this->sheetIndex] : range(0, $this->spreadsheet->getSheetCount() - 1); + + foreach ($sheetIndexes as $sheetIndex) { + $sheet = $this->spreadsheet->getSheet($sheetIndex); + + $candidateSpannedRow = []; + + // loop through all Excel merged cells + foreach ($sheet->getMergeCells() as $cells) { + list($cells) = Coordinate::splitRange($cells); + $first = $cells[0]; + $last = $cells[1]; + + list($fc, $fr) = Coordinate::coordinateFromString($first); + $fc = Coordinate::columnIndexFromString($fc) - 1; + + list($lc, $lr) = Coordinate::coordinateFromString($last); + $lc = Coordinate::columnIndexFromString($lc) - 1; + + // loop through the individual cells in the individual merge + $r = $fr - 1; + while ($r++ < $lr) { + // also, flag this row as a HTML row that is candidate to be omitted + $candidateSpannedRow[$r] = $r; + + $c = $fc - 1; + while ($c++ < $lc) { + if (!($c == $fc && $r == $fr)) { + // not the upper-left cell (should not be written in HTML) + $this->isSpannedCell[$sheetIndex][$r][$c] = [ + 'baseCell' => [$fr, $fc], + ]; + } else { + // upper-left is the base cell that should hold the colspan/rowspan attribute + $this->isBaseCell[$sheetIndex][$r][$c] = [ + 'xlrowspan' => $lr - $fr + 1, // Excel rowspan + 'rowspan' => $lr - $fr + 1, // HTML rowspan, value may change + 'xlcolspan' => $lc - $fc + 1, // Excel colspan + 'colspan' => $lc - $fc + 1, // HTML colspan, value may change + ]; + } + } + } + } + + // Identify which rows should be omitted in HTML. These are the rows where all the cells + // participate in a merge and the where base cells are somewhere above. + $countColumns = Coordinate::columnIndexFromString($sheet->getHighestColumn()); + foreach ($candidateSpannedRow as $rowIndex) { + if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { + if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { + $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; + } + } + } + + // For each of the omitted rows we found above, the affected rowspans should be subtracted by 1 + if (isset($this->isSpannedRow[$sheetIndex])) { + foreach ($this->isSpannedRow[$sheetIndex] as $rowIndex) { + $adjustedBaseCells = []; + $c = -1; + $e = $countColumns - 1; + while ($c++ < $e) { + $baseCell = $this->isSpannedCell[$sheetIndex][$rowIndex][$c]['baseCell']; + + if (!in_array($baseCell, $adjustedBaseCells)) { + // subtract rowspan by 1 + --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan']; + $adjustedBaseCells[] = $baseCell; + } + } + } + } + + // TODO: Same for columns + } + + // We have calculated the spans + $this->spansAreCalculated = true; + } + + private function setMargins(Worksheet $pSheet) + { + $htmlPage = '@page { '; + $htmlBody = 'body { '; + + $left = StringHelper::formatNumber($pSheet->getPageMargins()->getLeft()) . 'in; '; + $htmlPage .= 'margin-left: ' . $left; + $htmlBody .= 'margin-left: ' . $left; + $right = StringHelper::formatNumber($pSheet->getPageMargins()->getRight()) . 'in; '; + $htmlPage .= 'margin-right: ' . $right; + $htmlBody .= 'margin-right: ' . $right; + $top = StringHelper::formatNumber($pSheet->getPageMargins()->getTop()) . 'in; '; + $htmlPage .= 'margin-top: ' . $top; + $htmlBody .= 'margin-top: ' . $top; + $bottom = StringHelper::formatNumber($pSheet->getPageMargins()->getBottom()) . 'in; '; + $htmlPage .= 'margin-bottom: ' . $bottom; + $htmlBody .= 'margin-bottom: ' . $bottom; + + $htmlPage .= "}\n"; + $htmlBody .= "}\n"; + + return "\n"; + } + + /** + * Write a comment in the same format as LibreOffice. + * + * @see https://github.com/LibreOffice/core/blob/9fc9bf3240f8c62ad7859947ab8a033ac1fe93fa/sc/source/filter/html/htmlexp.cxx#L1073-L1092 + * + * @param Worksheet $pSheet + * @param string $coordinate + * + * @return string + */ + private function writeComment(Worksheet $pSheet, $coordinate) + { + $result = ''; + if (!$this->isPdf && isset($pSheet->getComments()[$coordinate])) { + $result .= ''; + $result .= '
' . nl2br($pSheet->getComment($coordinate)->getText()->getPlainText()) . '
'; + $result .= PHP_EOL; + } + + return $result; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php new file mode 100755 index 0000000..448b532 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/IWriter.php @@ -0,0 +1,93 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'content' => Content::class, + 'meta' => Meta::class, + 'meta_inf' => MetaInf::class, + 'mimetype' => Mimetype::class, + 'settings' => Settings::class, + 'styles' => Styles::class, + 'thumbnails' => Thumbnails::class, + ]; + + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return null|Ods\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param string $pFilename + * + * @throws WriterException + */ + public function save($pFilename) + { + if (!$this->spreadSheet) { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + + // garbage collect + $this->spreadSheet->garbageCollect(); + + // If $pFilename is php://output or php://stdout, make it a temporary file... + $originalFilename = $pFilename; + if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { + $pFilename = @tempnam(File::sysGetTempDir(), 'phpxltmp'); + if ($pFilename == '') { + $pFilename = $originalFilename; + } + } + + $zip = $this->createZip($pFilename); + + $zip->addFromString('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest()); + $zip->addFromString('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail()); + $zip->addFromString('content.xml', $this->getWriterPart('content')->write()); + $zip->addFromString('meta.xml', $this->getWriterPart('meta')->write()); + $zip->addFromString('mimetype', $this->getWriterPart('mimetype')->write()); + $zip->addFromString('settings.xml', $this->getWriterPart('settings')->write()); + $zip->addFromString('styles.xml', $this->getWriterPart('styles')->write()); + + // Close file + if ($zip->close() === false) { + throw new WriterException("Could not close zip file $pFilename."); + } + + // If a temporary file was used, copy it to the correct file stream + if ($originalFilename != $pFilename) { + if (copy($pFilename, $originalFilename) === false) { + throw new WriterException("Could not copy temporary zip file $pFilename to $originalFilename."); + } + @unlink($pFilename); + } + } + + /** + * Create zip object. + * + * @param string $pFilename + * + * @throws WriterException + * + * @return ZipArchive + */ + private function createZip($pFilename) + { + // Create new ZIP file and open it for writing + $zip = new ZipArchive(); + + if (file_exists($pFilename)) { + unlink($pFilename); + } + // Try opening the ZIP file + if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { + if ($zip->open($pFilename, ZipArchive::CREATE) !== true) { + throw new WriterException("Could not open $pFilename for writing."); + } + } + + return $zip; + } + + /** + * Get Spreadsheet object. + * + * @throws WriterException + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No PhpSpreadsheet assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return self + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php new file mode 100755 index 0000000..2f543be --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Cell/Comment.php @@ -0,0 +1,33 @@ + + */ +class Comment +{ + public static function write(XMLWriter $objWriter, Cell $cell) + { + $comments = $cell->getWorksheet()->getComments(); + if (!isset($comments[$cell->getCoordinate()])) { + return; + } + $comment = $comments[$cell->getCoordinate()]; + + $objWriter->startElement('office:annotation'); + $objWriter->writeAttribute('svg:width', $comment->getWidth()); + $objWriter->writeAttribute('svg:height', $comment->getHeight()); + $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); + $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); + $objWriter->writeElement('dc:creator', $comment->getAuthor()); + $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php new file mode 100755 index 0000000..11de0fd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php @@ -0,0 +1,395 @@ + + */ +class Content extends WriterPart +{ + const NUMBER_COLS_REPEATED_MAX = 1024; + const NUMBER_ROWS_REPEATED_MAX = 1048576; + const CELL_STYLE_PREFIX = 'ce'; + + /** + * Write content.xml to XML format. + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * + * @return string XML Output + */ + public function write() + { + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-content'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms'); + $objWriter->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0'); + $objWriter->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:scripts'); + $objWriter->writeElement('office:font-face-decls'); + + // Styles XF + $objWriter->startElement('office:automatic-styles'); + $this->writeXfStyles($objWriter, $this->getParentWriter()->getSpreadsheet()); + $objWriter->endElement(); + + $objWriter->startElement('office:body'); + $objWriter->startElement('office:spreadsheet'); + $objWriter->writeElement('table:calculation-settings'); + + $this->writeSheets($objWriter); + + $objWriter->writeElement('table:named-expressions'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write sheets. + * + * @param XMLWriter $objWriter + */ + private function writeSheets(XMLWriter $objWriter) + { + $spreadsheet = $this->getParentWriter()->getSpreadsheet(); // @var $spreadsheet Spreadsheet + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->startElement('table:table'); + $objWriter->writeAttribute('table:name', $spreadsheet->getSheet($i)->getTitle()); + $objWriter->writeElement('office:forms'); + $objWriter->startElement('table:table-column'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $this->writeRows($objWriter, $spreadsheet->getSheet($i)); + $objWriter->endElement(); + } + } + + /** + * Write rows of the specified sheet. + * + * @param XMLWriter $objWriter + * @param Worksheet $sheet + */ + private function writeRows(XMLWriter $objWriter, Worksheet $sheet) + { + $numberRowsRepeated = self::NUMBER_ROWS_REPEATED_MAX; + $span_row = 0; + $rows = $sheet->getRowIterator(); + while ($rows->valid()) { + --$numberRowsRepeated; + $row = $rows->current(); + if ($row->getCellIterator()->valid()) { + if ($span_row) { + $objWriter->startElement('table:table-row'); + if ($span_row > 1) { + $objWriter->writeAttribute('table:number-rows-repeated', $span_row); + } + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); + $objWriter->endElement(); + $objWriter->endElement(); + $span_row = 0; + } + $objWriter->startElement('table:table-row'); + $this->writeCells($objWriter, $row); + $objWriter->endElement(); + } else { + ++$span_row; + } + $rows->next(); + } + } + + /** + * Write cells of the specified row. + * + * @param XMLWriter $objWriter + * @param Row $row + * + * @throws Exception + */ + private function writeCells(XMLWriter $objWriter, Row $row) + { + $numberColsRepeated = self::NUMBER_COLS_REPEATED_MAX; + $prevColumn = -1; + $cells = $row->getCellIterator(); + while ($cells->valid()) { + /** @var \PhpOffice\PhpSpreadsheet\Cell\Cell $cell */ + $cell = $cells->current(); + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + $this->writeCellSpan($objWriter, $column, $prevColumn); + $objWriter->startElement('table:table-cell'); + $this->writeCellMerge($objWriter, $cell); + + // Style XF + $style = $cell->getXfIndex(); + if ($style !== null) { + $objWriter->writeAttribute('table:style-name', self::CELL_STYLE_PREFIX . $style); + } + + switch ($cell->getDataType()) { + case DataType::TYPE_BOOL: + $objWriter->writeAttribute('office:value-type', 'boolean'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_ERROR: + throw new Exception('Writing of error not implemented yet.'); + + break; + case DataType::TYPE_FORMULA: + $formulaValue = $cell->getValue(); + if ($this->getParentWriter()->getPreCalculateFormulas()) { + try { + $formulaValue = $cell->getCalculatedValue(); + } catch (Exception $e) { + // don't do anything + } + } + $objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue()); + if (is_numeric($formulaValue)) { + $objWriter->writeAttribute('office:value-type', 'float'); + } else { + $objWriter->writeAttribute('office:value-type', 'string'); + } + $objWriter->writeAttribute('office:value', $formulaValue); + $objWriter->writeElement('text:p', $formulaValue); + + break; + case DataType::TYPE_INLINE: + throw new Exception('Writing of inline not implemented yet.'); + + break; + case DataType::TYPE_NUMERIC: + $objWriter->writeAttribute('office:value-type', 'float'); + $objWriter->writeAttribute('office:value', $cell->getValue()); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + case DataType::TYPE_STRING: + $objWriter->writeAttribute('office:value-type', 'string'); + $objWriter->writeElement('text:p', $cell->getValue()); + + break; + } + Comment::write($objWriter, $cell); + $objWriter->endElement(); + $prevColumn = $column; + $cells->next(); + } + $numberColsRepeated = $numberColsRepeated - $prevColumn - 1; + if ($numberColsRepeated > 0) { + if ($numberColsRepeated > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $numberColsRepeated); + $objWriter->endElement(); + } else { + $objWriter->writeElement('table:table-cell'); + } + } + } + + /** + * Write span. + * + * @param XMLWriter $objWriter + * @param int $curColumn + * @param int $prevColumn + */ + private function writeCellSpan(XMLWriter $objWriter, $curColumn, $prevColumn) + { + $diff = $curColumn - $prevColumn - 1; + if (1 === $diff) { + $objWriter->writeElement('table:table-cell'); + } elseif ($diff > 1) { + $objWriter->startElement('table:table-cell'); + $objWriter->writeAttribute('table:number-columns-repeated', $diff); + $objWriter->endElement(); + } + } + + /** + * Write XF cell styles. + * + * @param XMLWriter $writer + * @param Spreadsheet $spreadsheet + */ + private function writeXfStyles(XMLWriter $writer, Spreadsheet $spreadsheet) + { + foreach ($spreadsheet->getCellXfCollection() as $style) { + $writer->startElement('style:style'); + $writer->writeAttribute('style:name', self::CELL_STYLE_PREFIX . $style->getIndex()); + $writer->writeAttribute('style:family', 'table-cell'); + $writer->writeAttribute('style:parent-style-name', 'Default'); + + // style:text-properties + + // Font + $writer->startElement('style:text-properties'); + + $font = $style->getFont(); + + if ($font->getBold()) { + $writer->writeAttribute('fo:font-weight', 'bold'); + $writer->writeAttribute('style:font-weight-complex', 'bold'); + $writer->writeAttribute('style:font-weight-asian', 'bold'); + } + + if ($font->getItalic()) { + $writer->writeAttribute('fo:font-style', 'italic'); + } + + if ($color = $font->getColor()) { + $writer->writeAttribute('fo:color', sprintf('#%s', $color->getRGB())); + } + + if ($family = $font->getName()) { + $writer->writeAttribute('fo:font-family', $family); + } + + if ($size = $font->getSize()) { + $writer->writeAttribute('fo:font-size', sprintf('%.1fpt', $size)); + } + + if ($font->getUnderline() && $font->getUnderline() != Font::UNDERLINE_NONE) { + $writer->writeAttribute('style:text-underline-style', 'solid'); + $writer->writeAttribute('style:text-underline-width', 'auto'); + $writer->writeAttribute('style:text-underline-color', 'font-color'); + + switch ($font->getUnderline()) { + case Font::UNDERLINE_DOUBLE: + $writer->writeAttribute('style:text-underline-type', 'double'); + + break; + case Font::UNDERLINE_SINGLE: + $writer->writeAttribute('style:text-underline-type', 'single'); + + break; + } + } + + $writer->endElement(); // Close style:text-properties + + // style:table-cell-properties + + $writer->startElement('style:table-cell-properties'); + $writer->writeAttribute('style:rotation-align', 'none'); + + // Fill + if ($fill = $style->getFill()) { + switch ($fill->getFillType()) { + case Fill::FILL_SOLID: + $writer->writeAttribute('fo:background-color', sprintf( + '#%s', + strtolower($fill->getStartColor()->getRGB()) + )); + + break; + case Fill::FILL_GRADIENT_LINEAR: + case Fill::FILL_GRADIENT_PATH: + /// TODO :: To be implemented + break; + case Fill::FILL_NONE: + default: + } + } + + $writer->endElement(); // Close style:table-cell-properties + + // End + + $writer->endElement(); // Close style:style + } + } + + /** + * Write attributes for merged cell. + * + * @param XMLWriter $objWriter + * @param Cell $cell + * + * @throws \PhpOffice\PhpSpreadsheet\Exception + */ + private function writeCellMerge(XMLWriter $objWriter, Cell $cell) + { + if (!$cell->isMergeRangeValueCell()) { + return; + } + + $mergeRange = Coordinate::splitRange($cell->getMergeRange()); + list($startCell, $endCell) = $mergeRange[0]; + $start = Coordinate::coordinateFromString($startCell); + $end = Coordinate::coordinateFromString($endCell); + $columnSpan = Coordinate::columnIndexFromString($end[0]) - Coordinate::columnIndexFromString($start[0]) + 1; + $rowSpan = $end[1] - $start[1] + 1; + + $objWriter->writeAttribute('table:number-columns-spanned', $columnSpan); + $objWriter->writeAttribute('table:number-rows-spanned', $rowSpan); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php new file mode 100755 index 0000000..ffe5eff --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Meta.php @@ -0,0 +1,77 @@ +getParentWriter()->getSpreadsheet(); + } + + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Meta + $objWriter->startElement('office:document-meta'); + + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:meta'); + + $objWriter->writeElement('meta:initial-creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:date', date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + $keywords = explode(' ', $spreadsheet->getProperties()->getKeywords()); + foreach ($keywords as $keyword) { + $objWriter->writeElement('meta:keyword', $keyword); + } + + // + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'Company'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCompany()); + $objWriter->endElement(); + + $objWriter->startElement('meta:user-defined'); + $objWriter->writeAttribute('meta:name', 'category'); + $objWriter->writeRaw($spreadsheet->getProperties()->getCategory()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php new file mode 100755 index 0000000..1ec9d1e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/MetaInf.php @@ -0,0 +1,62 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Manifest + $objWriter->startElement('manifest:manifest'); + $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); + $objWriter->writeAttribute('manifest:version', '1.2'); + + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', '/'); + $objWriter->writeAttribute('manifest:version', '1.2'); + $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'content.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); + $objWriter->writeAttribute('manifest:media-type', 'image/png'); + $objWriter->endElement(); + $objWriter->startElement('manifest:file-entry'); + $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); + $objWriter->writeAttribute('manifest:media-type', 'text/xml'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php new file mode 100755 index 0000000..d0fed2b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Mimetype.php @@ -0,0 +1,20 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Settings + $objWriter->startElement('office:document-settings'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->startElement('office:settings'); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:view-settings'); + $objWriter->startElement('config:config-item-map-indexed'); + $objWriter->writeAttribute('config:name', 'Views'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->startElement('config:config-item-set'); + $objWriter->writeAttribute('config:name', 'ooo:configuration-settings'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php new file mode 100755 index 0000000..eaf5cad --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php @@ -0,0 +1,70 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8'); + + // Content + $objWriter->startElement('office:document-styles'); + $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); + $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); + $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); + $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); + $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); + $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); + $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); + $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); + $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); + $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); + $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); + $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); + $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); + $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); + $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); + $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); + $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); + $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); + $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); + $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); + $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); + $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); + $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); + $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); + $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); + $objWriter->writeAttribute('office:version', '1.2'); + + $objWriter->writeElement('office:font-face-decls'); + $objWriter->writeElement('office:styles'); + $objWriter->writeElement('office:automatic-styles'); + $objWriter->writeElement('office:master-styles'); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php new file mode 100755 index 0000000..a29a14a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php @@ -0,0 +1,20 @@ +parentWriter; + } + + /** + * Set parent Ods writer. + * + * @param Ods $writer + */ + public function __construct(Ods $writer) + { + $this->parentWriter = $writer; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php new file mode 100755 index 0000000..b80083a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf.php @@ -0,0 +1,283 @@ + 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_LETTER_SMALL => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_TABLOID => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_LEDGER => [1224.00, 792.00], // (17 in. by 11 in.) + PageSetup::PAPERSIZE_LEGAL => 'LEGAL', // (8.5 in. by 14 in.) + PageSetup::PAPERSIZE_STATEMENT => [396.00, 612.00], // (5.5 in. by 8.5 in.) + PageSetup::PAPERSIZE_EXECUTIVE => 'EXECUTIVE', // (7.25 in. by 10.5 in.) + PageSetup::PAPERSIZE_A3 => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A4 => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A4_SMALL => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_A5 => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5 => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_FOLIO => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_QUARTO => [609.45, 779.53], // (215 mm by 275 mm) + PageSetup::PAPERSIZE_STANDARD_1 => [720.00, 1008.00], // (10 in. by 14 in.) + PageSetup::PAPERSIZE_STANDARD_2 => [792.00, 1224.00], // (11 in. by 17 in.) + PageSetup::PAPERSIZE_NOTE => 'LETTER', // (8.5 in. by 11 in.) + PageSetup::PAPERSIZE_NO9_ENVELOPE => [279.00, 639.00], // (3.875 in. by 8.875 in.) + PageSetup::PAPERSIZE_NO10_ENVELOPE => [297.00, 684.00], // (4.125 in. by 9.5 in.) + PageSetup::PAPERSIZE_NO11_ENVELOPE => [324.00, 747.00], // (4.5 in. by 10.375 in.) + PageSetup::PAPERSIZE_NO12_ENVELOPE => [342.00, 792.00], // (4.75 in. by 11 in.) + PageSetup::PAPERSIZE_NO14_ENVELOPE => [360.00, 828.00], // (5 in. by 11.5 in.) + PageSetup::PAPERSIZE_C => [1224.00, 1584.00], // (17 in. by 22 in.) + PageSetup::PAPERSIZE_D => [1584.00, 2448.00], // (22 in. by 34 in.) + PageSetup::PAPERSIZE_E => [2448.00, 3168.00], // (34 in. by 44 in.) + PageSetup::PAPERSIZE_DL_ENVELOPE => [311.81, 623.62], // (110 mm by 220 mm) + PageSetup::PAPERSIZE_C5_ENVELOPE => 'C5', // (162 mm by 229 mm) + PageSetup::PAPERSIZE_C3_ENVELOPE => 'C3', // (324 mm by 458 mm) + PageSetup::PAPERSIZE_C4_ENVELOPE => 'C4', // (229 mm by 324 mm) + PageSetup::PAPERSIZE_C6_ENVELOPE => 'C6', // (114 mm by 162 mm) + PageSetup::PAPERSIZE_C65_ENVELOPE => [323.15, 649.13], // (114 mm by 229 mm) + PageSetup::PAPERSIZE_B4_ENVELOPE => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_B5_ENVELOPE => 'B5', // (176 mm by 250 mm) + PageSetup::PAPERSIZE_B6_ENVELOPE => [498.90, 354.33], // (176 mm by 125 mm) + PageSetup::PAPERSIZE_ITALY_ENVELOPE => [311.81, 651.97], // (110 mm by 230 mm) + PageSetup::PAPERSIZE_MONARCH_ENVELOPE => [279.00, 540.00], // (3.875 in. by 7.5 in.) + PageSetup::PAPERSIZE_6_3_4_ENVELOPE => [261.00, 468.00], // (3.625 in. by 6.5 in.) + PageSetup::PAPERSIZE_US_STANDARD_FANFOLD => [1071.00, 792.00], // (14.875 in. by 11 in.) + PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD => [612.00, 864.00], // (8.5 in. by 12 in.) + PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD => 'FOLIO', // (8.5 in. by 13 in.) + PageSetup::PAPERSIZE_ISO_B4 => 'B4', // (250 mm by 353 mm) + PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD => [566.93, 419.53], // (200 mm by 148 mm) + PageSetup::PAPERSIZE_STANDARD_PAPER_1 => [648.00, 792.00], // (9 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_2 => [720.00, 792.00], // (10 in. by 11 in.) + PageSetup::PAPERSIZE_STANDARD_PAPER_3 => [1080.00, 792.00], // (15 in. by 11 in.) + PageSetup::PAPERSIZE_INVITE_ENVELOPE => [623.62, 623.62], // (220 mm by 220 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER => [667.80, 1080.00], // (9.275 in. by 15 in.) + PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER => [841.68, 1296.00], // (11.69 in. by 18 in.) + PageSetup::PAPERSIZE_A4_EXTRA_PAPER => [668.98, 912.76], // (236 mm by 322 mm) + PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER => [595.80, 792.00], // (8.275 in. by 11 in.) + PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER => 'A4', // (210 mm by 297 mm) + PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER => [667.80, 864.00], // (9.275 in. by 12 in.) + PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER => [643.46, 1009.13], // (227 mm by 356 mm) + PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER => [864.57, 1380.47], // (305 mm by 487 mm) + PageSetup::PAPERSIZE_LETTER_PLUS_PAPER => [612.00, 913.68], // (8.5 in. by 12.69 in.) + PageSetup::PAPERSIZE_A4_PLUS_PAPER => [595.28, 935.43], // (210 mm by 330 mm) + PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER => 'A5', // (148 mm by 210 mm) + PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER => [515.91, 728.50], // (182 mm by 257 mm) + PageSetup::PAPERSIZE_A3_EXTRA_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + PageSetup::PAPERSIZE_A5_EXTRA_PAPER => [493.23, 666.14], // (174 mm by 235 mm) + PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER => [569.76, 782.36], // (201 mm by 276 mm) + PageSetup::PAPERSIZE_A2_PAPER => 'A2', // (420 mm by 594 mm) + PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER => 'A3', // (297 mm by 420 mm) + PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER => [912.76, 1261.42], // (322 mm by 445 mm) + ]; + + /** + * Create a new PDF Writer instance. + * + * @param Spreadsheet $spreadsheet Spreadsheet object + */ + public function __construct(Spreadsheet $spreadsheet) + { + parent::__construct($spreadsheet); + $this->setUseInlineCss(true); + $this->tempDir = File::sysGetTempDir(); + } + + /** + * Get Font. + * + * @return string + */ + public function getFont() + { + return $this->font; + } + + /** + * Set font. Examples: + * 'arialunicid0-chinese-simplified' + * 'arialunicid0-chinese-traditional' + * 'arialunicid0-korean' + * 'arialunicid0-japanese'. + * + * @param string $fontName + * + * @return Pdf + */ + public function setFont($fontName) + { + $this->font = $fontName; + + return $this; + } + + /** + * Get Paper Size. + * + * @return int + */ + public function getPaperSize() + { + return $this->paperSize; + } + + /** + * Set Paper Size. + * + * @param string $pValue Paper size see PageSetup::PAPERSIZE_* + * + * @return self + */ + public function setPaperSize($pValue) + { + $this->paperSize = $pValue; + + return $this; + } + + /** + * Get Orientation. + * + * @return string + */ + public function getOrientation() + { + return $this->orientation; + } + + /** + * Set Orientation. + * + * @param string $pValue Page orientation see PageSetup::ORIENTATION_* + * + * @return self + */ + public function setOrientation($pValue) + { + $this->orientation = $pValue; + + return $this; + } + + /** + * Get temporary storage directory. + * + * @return string + */ + public function getTempDir() + { + return $this->tempDir; + } + + /** + * Set temporary storage directory. + * + * @param string $pValue Temporary storage directory + * + * @throws WriterException when directory does not exist + * + * @return self + */ + public function setTempDir($pValue) + { + if (is_dir($pValue)) { + $this->tempDir = $pValue; + } else { + throw new WriterException("Directory does not exist: $pValue"); + } + + return $this; + } + + /** + * Save Spreadsheet to PDF file, pre-save. + * + * @param string $pFilename Name of the file to save as + * + * @throws WriterException + * + * @return resource + */ + protected function prepareForSave($pFilename) + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $this->saveArrayReturnType = Calculation::getArrayReturnType(); + Calculation::setArrayReturnType(Calculation::RETURN_ARRAY_AS_VALUE); + + // Open file + $fileHandle = fopen($pFilename, 'w'); + if ($fileHandle === false) { + throw new WriterException("Could not open file $pFilename for writing."); + } + + // Set PDF + $this->isPdf = true; + // Build CSS + $this->buildCSS(true); + + return $fileHandle; + } + + /** + * Save PhpSpreadsheet to PDF file, post-save. + * + * @param resource $fileHandle + */ + protected function restoreStateAfterSave($fileHandle) + { + // Close file + fclose($fileHandle); + + Calculation::setArrayReturnType($this->saveArrayReturnType); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php new file mode 100755 index 0000000..3c3044d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php @@ -0,0 +1,78 @@ +getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + + $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance(); + $pdf->setPaper(strtolower($paperSize), $orientation); + + $pdf->loadHtml( + $this->generateHTMLHeader(false) . + $this->generateSheetData() . + $this->generateHTMLFooter() + ); + $pdf->render(); + + // Write to file + fwrite($fileHandle, $pdf->output()); + + parent::restoreStateAfterSave($fileHandle); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php new file mode 100755 index 0000000..fd2664a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php @@ -0,0 +1,112 @@ +getSheetIndex()) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + } + $this->setOrientation($orientation); + + // Override Page Orientation + if (null !== $this->getOrientation()) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT) + ? PageSetup::ORIENTATION_PORTRAIT + : $this->getOrientation(); + } + $orientation = strtoupper($orientation); + + // Override Paper Size + if (null !== $this->getPaperSize()) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $config = ['tempDir' => $this->tempDir]; + $pdf = $this->createExternalWriterInstance($config); + $ortmp = $orientation; + $pdf->_setPageSize(strtoupper($paperSize), $ortmp); + $pdf->DefOrientation = $orientation; + $pdf->AddPageByArray([ + 'orientation' => $orientation, + 'margin-left' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getLeft()), + 'margin-right' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getRight()), + 'margin-top' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getTop()), + 'margin-bottom' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getBottom()), + ]); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + $pdf->WriteHTML($this->generateHTMLHeader(false)); + $html = $this->generateSheetData(); + foreach (\array_chunk(\explode(PHP_EOL, $html), 1000) as $lines) { + $pdf->WriteHTML(\implode(PHP_EOL, $lines)); + } + $pdf->WriteHTML($this->generateHTMLFooter()); + + // Write to file + fwrite($fileHandle, $pdf->Output('', 'S')); + + parent::restoreStateAfterSave($fileHandle); + } + + /** + * Convert inches to mm. + * + * @param float $inches + * + * @return float + */ + private function inchesToMm($inches) + { + return $inches * 25.4; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php new file mode 100755 index 0000000..8a97b8f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php @@ -0,0 +1,98 @@ +getSheetIndex() === null) { + $orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet(0)->getPageMargins(); + } else { + $orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() + == PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; + $printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); + $printMargins = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageMargins(); + } + + // Override Page Orientation + if ($this->getOrientation() !== null) { + $orientation = ($this->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) + ? 'L' + : 'P'; + } + // Override Paper Size + if ($this->getPaperSize() !== null) { + $printPaperSize = $this->getPaperSize(); + } + + if (isset(self::$paperSizes[$printPaperSize])) { + $paperSize = self::$paperSizes[$printPaperSize]; + } + + // Create PDF + $pdf = $this->createExternalWriterInstance($orientation, 'pt', $paperSize); + $pdf->setFontSubsetting(false); + // Set margins, converting inches to points (using 72 dpi) + $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72); + $pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72); + + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + + $pdf->AddPage(); + + // Set the appropriate font + $pdf->SetFont($this->getFont()); + $pdf->writeHTML( + $this->generateHTMLHeader(false) . + $this->generateSheetData() . + $this->generateHTMLFooter() + ); + + // Document info + $pdf->SetTitle($this->spreadsheet->getProperties()->getTitle()); + $pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator()); + $pdf->SetSubject($this->spreadsheet->getProperties()->getSubject()); + $pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords()); + $pdf->SetCreator($this->spreadsheet->getProperties()->getCreator()); + + // Write to file + fwrite($fileHandle, $pdf->output($pFilename, 'S')); + + parent::restoreStateAfterSave($fileHandle); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php new file mode 100755 index 0000000..6dff134 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php @@ -0,0 +1,946 @@ +spreadsheet = $spreadsheet; + + $this->parser = new Xls\Parser(); + } + + /** + * Save Spreadsheet to file. + * + * @param string $pFilename + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + */ + public function save($pFilename) + { + // garbage collect + $this->spreadsheet->garbageCollect(); + + $saveDebugLog = Calculation::getInstance($this->spreadsheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // initialize colors array + $this->colors = []; + + // Initialise workbook writer + $this->writerWorkbook = new Xls\Workbook($this->spreadsheet, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser); + + // Initialise worksheet writers + $countSheets = $this->spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i] = new Xls\Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->spreadsheet->getSheet($i)); + } + + // build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook. + $this->buildWorksheetEschers(); + $this->buildWorkbookEscher(); + + // add 15 identical cell style Xfs + // for now, we use the first cellXf instead of cellStyleXf + $cellXfCollection = $this->spreadsheet->getCellXfCollection(); + for ($i = 0; $i < 15; ++$i) { + $this->writerWorkbook->addXfWriter($cellXfCollection[0], true); + } + + // add all the cell Xfs + foreach ($this->spreadsheet->getCellXfCollection() as $style) { + $this->writerWorkbook->addXfWriter($style, false); + } + + // add fonts from rich text eleemnts + for ($i = 0; $i < $countSheets; ++$i) { + foreach ($this->writerWorksheets[$i]->phpSheet->getCoordinates() as $coordinate) { + $cell = $this->writerWorksheets[$i]->phpSheet->getCell($coordinate); + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + if ($element instanceof Run) { + $font = $element->getFont(); + $this->writerWorksheets[$i]->fontHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font); + } + } + } + } + } + + // initialize OLE file + $workbookStreamName = 'Workbook'; + $OLE = new File(OLE::ascToUcs($workbookStreamName)); + + // Write the worksheet streams before the global workbook stream, + // because the byte sizes of these are needed in the global workbook stream + $worksheetSizes = []; + for ($i = 0; $i < $countSheets; ++$i) { + $this->writerWorksheets[$i]->close(); + $worksheetSizes[] = $this->writerWorksheets[$i]->_datasize; + } + + // add binary data for global workbook stream + $OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes)); + + // add binary data for sheet streams + for ($i = 0; $i < $countSheets; ++$i) { + $OLE->append($this->writerWorksheets[$i]->getData()); + } + + $this->documentSummaryInformation = $this->writeDocumentSummaryInformation(); + // initialize OLE Document Summary Information + if (isset($this->documentSummaryInformation) && !empty($this->documentSummaryInformation)) { + $OLE_DocumentSummaryInformation = new File(OLE::ascToUcs(chr(5) . 'DocumentSummaryInformation')); + $OLE_DocumentSummaryInformation->append($this->documentSummaryInformation); + } + + $this->summaryInformation = $this->writeSummaryInformation(); + // initialize OLE Summary Information + if (isset($this->summaryInformation) && !empty($this->summaryInformation)) { + $OLE_SummaryInformation = new File(OLE::ascToUcs(chr(5) . 'SummaryInformation')); + $OLE_SummaryInformation->append($this->summaryInformation); + } + + // define OLE Parts + $arrRootData = [$OLE]; + // initialize OLE Properties file + if (isset($OLE_SummaryInformation)) { + $arrRootData[] = $OLE_SummaryInformation; + } + // initialize OLE Extended Properties file + if (isset($OLE_DocumentSummaryInformation)) { + $arrRootData[] = $OLE_DocumentSummaryInformation; + } + + $root = new Root(time(), time(), $arrRootData); + // save the OLE file + $root->save($pFilename); + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadsheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + } + + /** + * Build the Worksheet Escher objects. + */ + private function buildWorksheetEschers() + { + // 1-based index to BstoreContainer + $blipIndex = 0; + $lastReducedSpId = 0; + $lastSpId = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + // sheet index + $sheetIndex = $sheet->getParent()->getIndex($sheet); + + $escher = null; + + // check if there are any shapes for this sheet + $filterRange = $sheet->getAutoFilter()->getRange(); + if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) { + continue; + } + + // create intermediate Escher object + $escher = new Escher(); + + // dgContainer + $dgContainer = new DgContainer(); + + // set the drawing index (we use sheet index + 1) + $dgId = $sheet->getParent()->getIndex($sheet) + 1; + $dgContainer->setDgId($dgId); + $escher->setDgContainer($dgContainer); + + // spgrContainer + $spgrContainer = new SpgrContainer(); + $dgContainer->setSpgrContainer($spgrContainer); + + // add one shape which is the group shape + $spContainer = new SpContainer(); + $spContainer->setSpgr(true); + $spContainer->setSpType(0); + $spContainer->setSpId(($sheet->getParent()->getIndex($sheet) + 1) << 10); + $spgrContainer->addChild($spContainer); + + // add the shapes + + $countShapes[$sheetIndex] = 0; // count number of shapes (minus group shape), in sheet + + foreach ($sheet->getDrawingCollection() as $drawing) { + ++$blipIndex; + + ++$countShapes[$sheetIndex]; + + // add the shape + $spContainer = new SpContainer(); + + // set the shape type + $spContainer->setSpType(0x004B); + // set the shape flag + $spContainer->setSpFlag(0x02); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + // set the BLIP index + $spContainer->setOPT(0x4104, $blipIndex); + + // set coordinates and offsets, client anchor + $coordinates = $drawing->getCoordinates(); + $offsetX = $drawing->getOffsetX(); + $offsetY = $drawing->getOffsetY(); + $width = $drawing->getWidth(); + $height = $drawing->getHeight(); + + $twoAnchor = \PhpOffice\PhpSpreadsheet\Shared\Xls::oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height); + + $spContainer->setStartCoordinates($twoAnchor['startCoordinates']); + $spContainer->setStartOffsetX($twoAnchor['startOffsetX']); + $spContainer->setStartOffsetY($twoAnchor['startOffsetY']); + $spContainer->setEndCoordinates($twoAnchor['endCoordinates']); + $spContainer->setEndOffsetX($twoAnchor['endOffsetX']); + $spContainer->setEndOffsetY($twoAnchor['endOffsetY']); + + $spgrContainer->addChild($spContainer); + } + + // AutoFilters + if (!empty($filterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($filterRange); + $iNumColStart = $rangeBounds[0][0]; + $iNumColEnd = $rangeBounds[1][0]; + + $iInc = $iNumColStart; + while ($iInc <= $iNumColEnd) { + ++$countShapes[$sheetIndex]; + + // create an Drawing Object for the dropdown + $oDrawing = new BaseDrawing(); + // get the coordinates of drawing + $cDrawing = Coordinate::stringFromColumnIndex($iInc) . $rangeBounds[0][1]; + $oDrawing->setCoordinates($cDrawing); + $oDrawing->setWorksheet($sheet); + + // add the shape + $spContainer = new SpContainer(); + // set the shape type + $spContainer->setSpType(0x00C9); + // set the shape flag + $spContainer->setSpFlag(0x01); + + // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) + $reducedSpId = $countShapes[$sheetIndex]; + $spId = $reducedSpId | ($sheet->getParent()->getIndex($sheet) + 1) << 10; + $spContainer->setSpId($spId); + + // keep track of last reducedSpId + $lastReducedSpId = $reducedSpId; + + // keep track of last spId + $lastSpId = $spId; + + $spContainer->setOPT(0x007F, 0x01040104); // Protection -> fLockAgainstGrouping + $spContainer->setOPT(0x00BF, 0x00080008); // Text -> fFitTextToShape + $spContainer->setOPT(0x01BF, 0x00010000); // Fill Style -> fNoFillHitTest + $spContainer->setOPT(0x01FF, 0x00080000); // Line Style -> fNoLineDrawDash + $spContainer->setOPT(0x03BF, 0x000A0000); // Group Shape -> fPrint + + // set coordinates and offsets, client anchor + $endCoordinates = Coordinate::stringFromColumnIndex($iInc); + $endCoordinates .= $rangeBounds[0][1] + 1; + + $spContainer->setStartCoordinates($cDrawing); + $spContainer->setStartOffsetX(0); + $spContainer->setStartOffsetY(0); + $spContainer->setEndCoordinates($endCoordinates); + $spContainer->setEndOffsetX(0); + $spContainer->setEndOffsetY(0); + + $spgrContainer->addChild($spContainer); + ++$iInc; + } + } + + // identifier clusters, used for workbook Escher object + $this->IDCLs[$dgId] = $lastReducedSpId; + + // set last shape index + $dgContainer->setLastSpId($lastSpId); + + // set the Escher object + $this->writerWorksheets[$sheetIndex]->setEscher($escher); + } + } + + /** + * Build the Escher object corresponding to the MSODRAWINGGROUP record. + */ + private function buildWorkbookEscher() + { + $escher = null; + + // any drawings in this workbook? + $found = false; + foreach ($this->spreadsheet->getAllSheets() as $sheet) { + if (count($sheet->getDrawingCollection()) > 0) { + $found = true; + + break; + } + } + + // nothing to do if there are no drawings + if (!$found) { + return; + } + + // if we reach here, then there are drawings in the workbook + $escher = new Escher(); + + // dggContainer + $dggContainer = new DggContainer(); + $escher->setDggContainer($dggContainer); + + // set IDCLs (identifier clusters) + $dggContainer->setIDCLs($this->IDCLs); + + // this loop is for determining maximum shape identifier of all drawing + $spIdMax = 0; + $totalCountShapes = 0; + $countDrawings = 0; + + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet + + if (count($sheet->getDrawingCollection()) > 0) { + ++$countDrawings; + + foreach ($sheet->getDrawingCollection() as $drawing) { + ++$sheetCountShapes; + ++$totalCountShapes; + + $spId = $sheetCountShapes | ($this->spreadsheet->getIndex($sheet) + 1) << 10; + $spIdMax = max($spId, $spIdMax); + } + } + } + + $dggContainer->setSpIdMax($spIdMax + 1); + $dggContainer->setCDgSaved($countDrawings); + $dggContainer->setCSpSaved($totalCountShapes + $countDrawings); // total number of shapes incl. one group shapes per drawing + + // bstoreContainer + $bstoreContainer = new BstoreContainer(); + $dggContainer->setBstoreContainer($bstoreContainer); + + // the BSE's (all the images) + foreach ($this->spreadsheet->getAllsheets() as $sheet) { + foreach ($sheet->getDrawingCollection() as $drawing) { + if (!extension_loaded('gd')) { + throw new RuntimeException('Saving images in xls requires gd extension'); + } + if ($drawing instanceof Drawing) { + $filename = $drawing->getPath(); + + list($imagesx, $imagesy, $imageFormat) = getimagesize($filename); + + switch ($imageFormat) { + case 1: // GIF, not supported by BIFF8, we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(imagecreatefromgif($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + case 2: // JPEG + $blipType = BSE::BLIPTYPE_JPEG; + $blipData = file_get_contents($filename); + + break; + case 3: // PNG + $blipType = BSE::BLIPTYPE_PNG; + $blipData = file_get_contents($filename); + + break; + case 6: // Windows DIB (BMP), we convert to PNG + $blipType = BSE::BLIPTYPE_PNG; + ob_start(); + imagepng(SharedDrawing::imagecreatefrombmp($filename)); + $blipData = ob_get_contents(); + ob_end_clean(); + + break; + default: + continue 2; + } + + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } elseif ($drawing instanceof MemoryDrawing) { + switch ($drawing->getRenderingFunction()) { + case MemoryDrawing::RENDERING_JPEG: + $blipType = BSE::BLIPTYPE_JPEG; + $renderingFunction = 'imagejpeg'; + + break; + case MemoryDrawing::RENDERING_GIF: + case MemoryDrawing::RENDERING_PNG: + case MemoryDrawing::RENDERING_DEFAULT: + $blipType = BSE::BLIPTYPE_PNG; + $renderingFunction = 'imagepng'; + + break; + } + + ob_start(); + call_user_func($renderingFunction, $drawing->getImageResource()); + $blipData = ob_get_contents(); + ob_end_clean(); + + $blip = new Blip(); + $blip->setData($blipData); + + $BSE = new BSE(); + $BSE->setBlipType($blipType); + $BSE->setBlip($blip); + + $bstoreContainer->addBSE($BSE); + } + } + } + + // Set the Escher object + $this->writerWorkbook->setEscher($escher); + } + + /** + * Build the OLE Part for DocumentSummary Information. + * + * @return string + */ + private function writeDocumentSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae + $data .= pack('vvvvvvvv', 0xD502, 0xD5CD, 0x2E9C, 0x101B, 0x9793, 0x0008, 0x2C2B, 0xAEF9); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // GKPIDDSI_CODEPAGE: CodePage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_CATEGORY : Category + if ($this->spreadsheet->getProperties()->getCategory()) { + $dataProp = $this->spreadsheet->getProperties()->getCategory(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x02], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // GKPIDDSI_VERSION :Version of the application that wrote the property storage + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x17], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], + 'data' => ['pack' => 'V', 'data' => 0x000C0000], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SCALE : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0B], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x10], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_SHAREDOC : FALSE + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x16], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x0B], + 'data' => ['data' => false], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_DOCSPARTS + // MS-OSHARED p75 (2.3.3.2.2.1) + // Structure is VtVecUnalignedLpstrValue (2.3.3.1.9) + // cElements + $dataProp = pack('v', 0x0001); + $dataProp .= pack('v', 0x0000); + // array of UnalignedLpstr + // cch + $dataProp .= pack('v', 0x000A); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Worksheet' . chr(0); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0D], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x101E], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // GKPIDDSI_HEADINGPAIR + // VtVecHeadingPairValue + // cElements + $dataProp = pack('v', 0x0002); + $dataProp .= pack('v', 0x0000); + // Array of vtHeadingPair + // vtUnalignedString - headingString + // stringType + $dataProp .= pack('v', 0x001E); + // padding + $dataProp .= pack('v', 0x0000); + // UnalignedLpstr + // cch + $dataProp .= pack('v', 0x0013); + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= 'Feuilles de calcul'; + // vtUnalignedString - headingParts + // wType : 0x0003 = 32 bit signed integer + $dataProp .= pack('v', 0x0300); + // padding + $dataProp .= pack('v', 0x0000); + // value + $dataProp .= pack('v', 0x0100); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + $dataProp .= pack('v', 0x0000); + + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0C], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x100C], + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x0B) { // Boolean + if ($dataProp['data']['data'] == false) { + $dataSection_Content .= pack('V', 0x0000); + } else { + $dataSection_Content .= pack('V', 0x0001); + } + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + $dataProp['data']['length'] += 1; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 8; + } else { + // Data Type Not Used at the moment + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + $dataProp['data']['length']; + } + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } + + /** + * Build the OLE Part for Summary Information. + * + * @return string + */ + private function writeSummaryInformation() + { + // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) + $data = pack('v', 0xFFFE); + // offset: 2; size: 2; + $data .= pack('v', 0x0000); + // offset: 4; size: 2; OS version + $data .= pack('v', 0x0106); + // offset: 6; size: 2; OS indicator + $data .= pack('v', 0x0002); + // offset: 8; size: 16 + $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); + // offset: 24; size: 4; section count + $data .= pack('V', 0x0001); + + // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 + $data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3); + // offset: 44; size: 4; offset of the start + $data .= pack('V', 0x30); + + // SECTION + $dataSection = []; + $dataSection_NumProps = 0; + $dataSection_Summary = ''; + $dataSection_Content = ''; + + // CodePage : CP-1252 + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x01], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x02], // 2 byte signed integer + 'data' => ['data' => 1252], + ]; + ++$dataSection_NumProps; + + // Title + if ($this->spreadsheet->getProperties()->getTitle()) { + $dataProp = $this->spreadsheet->getProperties()->getTitle(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x02], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Subject + if ($this->spreadsheet->getProperties()->getSubject()) { + $dataProp = $this->spreadsheet->getProperties()->getSubject(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x03], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Author (Creator) + if ($this->spreadsheet->getProperties()->getCreator()) { + $dataProp = $this->spreadsheet->getProperties()->getCreator(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x04], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Keywords + if ($this->spreadsheet->getProperties()->getKeywords()) { + $dataProp = $this->spreadsheet->getProperties()->getKeywords(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x05], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Comments (Description) + if ($this->spreadsheet->getProperties()->getDescription()) { + $dataProp = $this->spreadsheet->getProperties()->getDescription(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x06], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Last Saved By (LastModifiedBy) + if ($this->spreadsheet->getProperties()->getLastModifiedBy()) { + $dataProp = $this->spreadsheet->getProperties()->getLastModifiedBy(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x08], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x1E], // null-terminated string prepended by dword string length + 'data' => ['data' => $dataProp, 'length' => strlen($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Created Date/Time + if ($this->spreadsheet->getProperties()->getCreated()) { + $dataProp = $this->spreadsheet->getProperties()->getCreated(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0C], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x40], // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + 'data' => ['data' => OLE::localDateToOLE($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Modified Date/Time + if ($this->spreadsheet->getProperties()->getModified()) { + $dataProp = $this->spreadsheet->getProperties()->getModified(); + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x0D], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x40], // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + 'data' => ['data' => OLE::localDateToOLE($dataProp)], + ]; + ++$dataSection_NumProps; + } + // Security + $dataSection[] = [ + 'summary' => ['pack' => 'V', 'data' => 0x13], + 'offset' => ['pack' => 'V'], + 'type' => ['pack' => 'V', 'data' => 0x03], // 4 byte signed integer + 'data' => ['data' => 0x00], + ]; + ++$dataSection_NumProps; + + // 4 Section Length + // 4 Property count + // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) + $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; + foreach ($dataSection as $dataProp) { + // Summary + $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); + // Offset + $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); + // DataType + $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); + // Data + if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer + $dataSection_Content .= pack('V', $dataProp['data']['data']); + + $dataSection_Content_Offset += 4 + 4; + } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length + // Null-terminated string + $dataProp['data']['data'] .= chr(0); + $dataProp['data']['length'] += 1; + // Complete the string with null string for being a %4 + $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4) == 4 ? 0 : (4 - $dataProp['data']['length'] % 4)); + $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); + + $dataSection_Content .= pack('V', $dataProp['data']['length']); + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); + } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + $dataSection_Content .= $dataProp['data']['data']; + + $dataSection_Content_Offset += 4 + 8; + } + // Data Type Not Used at the moment + } + // Now $dataSection_Content_Offset contains the size of the content + + // section header + // offset: $secOffset; size: 4; section length + // + x Size of the content (summary + content) + $data .= pack('V', $dataSection_Content_Offset); + // offset: $secOffset+4; size: 4; property count + $data .= pack('V', $dataSection_NumProps); + // Section Summary + $data .= $dataSection_Summary; + // Section Content + $data .= $dataSection_Content; + + return $data; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php new file mode 100755 index 0000000..3b2eb9a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php @@ -0,0 +1,224 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class BIFFwriter +{ + /** + * The byte order of this architecture. 0 => little endian, 1 => big endian. + * + * @var int + */ + private static $byteOrder; + + /** + * The string containing the data of the BIFF stream. + * + * @var string + */ + public $_data; + + /** + * The size of the data in bytes. Should be the same as strlen($this->_data). + * + * @var int + */ + public $_datasize; + + /** + * The maximum length for a BIFF record (excluding record header and length field). See addContinue(). + * + * @var int + * + * @see addContinue() + */ + private $limit = 8224; + + /** + * Constructor. + */ + public function __construct() + { + $this->_data = ''; + $this->_datasize = 0; + } + + /** + * Determine the byte order and store it as class data to avoid + * recalculating it for each call to new(). + * + * @return int + */ + public static function getByteOrder() + { + if (!isset(self::$byteOrder)) { + // Check if "pack" gives the required IEEE 64bit float + $teststr = pack('d', 1.2345); + $number = pack('C8', 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); + if ($number == $teststr) { + $byte_order = 0; // Little Endian + } elseif ($number == strrev($teststr)) { + $byte_order = 1; // Big Endian + } else { + // Give up. I'll fix this in a later version. + throw new WriterException('Required floating point format not supported on this platform.'); + } + self::$byteOrder = $byte_order; + } + + return self::$byteOrder; + } + + /** + * General storage function. + * + * @param string $data binary data to append + */ + protected function append($data) + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_data .= $data; + $this->_datasize += strlen($data); + } + + /** + * General storage function like append, but returns string instead of modifying $this->_data. + * + * @param string $data binary data to write + * + * @return string + */ + public function writeData($data) + { + if (strlen($data) - 4 > $this->limit) { + $data = $this->addContinue($data); + } + $this->_datasize += strlen($data); + + return $data; + } + + /** + * Writes Excel BOF record to indicate the beginning of a stream or + * sub-stream in the BIFF file. + * + * @param int $type type of BIFF file to write: 0x0005 Workbook, + * 0x0010 Worksheet + */ + protected function storeBof($type) + { + $record = 0x0809; // Record identifier (BIFF5-BIFF8) + $length = 0x0010; + + // by inspection of real files, MS Office Excel 2007 writes the following + $unknown = pack('VV', 0x000100D1, 0x00000406); + + $build = 0x0DBB; // Excel 97 + $year = 0x07CC; // Excel 97 + + $version = 0x0600; // BIFF8 + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $version, $type, $build, $year); + $this->append($header . $data . $unknown); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + protected function storeEof() + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $this->append($header); + } + + /** + * Writes Excel EOF record to indicate the end of a BIFF stream. + */ + public function writeEof() + { + $record = 0x000A; // Record identifier + $length = 0x0000; // Number of bytes to follow + $header = pack('vv', $record, $length); + + return $this->writeData($header); + } + + /** + * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In + * Excel 97 the limit is 8228 bytes. Records that are longer than these limits + * must be split up into CONTINUE blocks. + * + * This function takes a long BIFF record and inserts CONTINUE records as + * necessary. + * + * @param string $data The original binary data to be written + * + * @return string A very convenient string of continue blocks + */ + private function addContinue($data) + { + $limit = $this->limit; + $record = 0x003C; // Record identifier + + // The first 2080/8224 bytes remain intact. However, we have to change + // the length field of the record. + $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit); + + $header = pack('vv', $record, $limit); // Headers for continue records + + // Retrieve chunks of 2080/8224 bytes +4 for the header. + $data_length = strlen($data); + for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) { + $tmp .= $header; + $tmp .= substr($data, $i, $limit); + } + + // Retrieve the last chunk of data + $header = pack('vv', $record, strlen($data) - $i); + $tmp .= $header; + $tmp .= substr($data, $i); + + return $tmp; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php new file mode 100755 index 0000000..1dcef80 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php @@ -0,0 +1,510 @@ +object = $object; + } + + /** + * Process the object to be written. + * + * @return string + */ + public function close() + { + // initialize + $this->data = ''; + + switch (get_class($this->object)) { + case \PhpOffice\PhpSpreadsheet\Shared\Escher::class: + if ($dggContainer = $this->object->getDggContainer()) { + $writer = new self($dggContainer); + $this->data = $writer->close(); + } elseif ($dgContainer = $this->object->getDgContainer()) { + $writer = new self($dgContainer); + $this->data = $writer->close(); + $this->spOffsets = $writer->getSpOffsets(); + $this->spTypes = $writer->getSpTypes(); + } + + break; + case DggContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dgg + $recVer = 0x0; + $recInstance = 0x0000; + $recType = 0xF006; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + // dgg data + $dggData = + pack( + 'VVVV', + $this->object->getSpIdMax(), // maximum shape identifier increased by one + $this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one + $this->object->getCSpSaved(), + $this->object->getCDgSaved() // count total number of drawings saved + ); + + // add file identifier clusters (one per drawing) + $IDCLs = $this->object->getIDCLs(); + + foreach ($IDCLs as $dgId => $maxReducedSpId) { + $dggData .= pack('VV', $dgId, $maxReducedSpId + 1); + } + + $header = pack('vvV', $recVerInstance, $recType, strlen($dggData)); + $innerData .= $header . $dggData; + + // write the bstoreContainer + if ($bstoreContainer = $this->object->getBstoreContainer()) { + $writer = new self($bstoreContainer); + $innerData .= $writer->close(); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF000; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BstoreContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // treat the inner data + if ($BSECollection = $this->object->getBSECollection()) { + foreach ($BSECollection as $BSE) { + $writer = new self($BSE); + $innerData .= $writer->close(); + } + } + + // write the record + $recVer = 0xF; + $recInstance = count($this->object->getBSECollection()); + $recType = 0xF001; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case BSE::class: + // this is a semi-container record + + // initialize + $innerData = ''; + + // here we treat the inner data + if ($blip = $this->object->getBlip()) { + $writer = new self($blip); + $innerData .= $writer->close(); + } + + // initialize + $data = ''; + + $btWin32 = $this->object->getBlipType(); + $btMacOS = $this->object->getBlipType(); + $data .= pack('CC', $btWin32, $btMacOS); + + $rgbUid = pack('VVVV', 0, 0, 0, 0); // todo + $data .= $rgbUid; + + $tag = 0; + $size = strlen($innerData); + $cRef = 1; + $foDelay = 0; //todo + $unused1 = 0x0; + $cbName = 0x0; + $unused2 = 0x0; + $unused3 = 0x0; + $data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3); + + $data .= $innerData; + + // write the record + $recVer = 0x2; + $recInstance = $this->object->getBlipType(); + $recType = 0xF007; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $data; + + break; + case Blip::class: + // this is an atom record + + // write the record + switch ($this->object->getParent()->getBlipType()) { + case BSE::BLIPTYPE_JPEG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x46A; + $recType = 0xF01D; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + case BSE::BLIPTYPE_PNG: + // initialize + $innerData = ''; + + $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo + $innerData .= $rgbUid1; + + $tag = 0xFF; // todo + $innerData .= pack('C', $tag); + + $innerData .= $this->object->getData(); + + $recVer = 0x0; + $recInstance = 0x6E0; + $recType = 0xF01E; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header; + + $this->data .= $innerData; + + break; + } + + break; + case DgContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // write the dg + $recVer = 0x0; + $recInstance = $this->object->getDgId(); + $recType = 0xF008; + $length = 8; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + // number of shapes in this drawing (including group shape) + $countShapes = count($this->object->getSpgrContainer()->getChildren()); + $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId()); + + // write the spgrContainer + if ($spgrContainer = $this->object->getSpgrContainer()) { + $writer = new self($spgrContainer); + $innerData .= $writer->close(); + + // get the shape offsets relative to the spgrContainer record + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + + // save the shape offsets relative to dgContainer + foreach ($spOffsets as &$spOffset) { + $spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes) + } + + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF002; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + + break; + case SpgrContainer::class: + // this is a container record + + // initialize + $innerData = ''; + + // initialize spape offsets + $totalSize = 8; + $spOffsets = []; + $spTypes = []; + + // treat the inner data + foreach ($this->object->getChildren() as $spContainer) { + $writer = new self($spContainer); + $spData = $writer->close(); + $innerData .= $spData; + + // save the shape offsets (where new shape records begin) + $totalSize += strlen($spData); + $spOffsets[] = $totalSize; + + $spTypes = array_merge($spTypes, $writer->getSpTypes()); + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF003; + $length = strlen($innerData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $innerData; + $this->spOffsets = $spOffsets; + $this->spTypes = $spTypes; + + break; + case SpContainer::class: + // initialize + $data = ''; + + // build the data + + // write group shape record, if necessary? + if ($this->object->getSpgr()) { + $recVer = 0x1; + $recInstance = 0x0000; + $recType = 0xF009; + $length = 0x00000010; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VVVV', 0, 0, 0, 0); + } + $this->spTypes[] = ($this->object->getSpType()); + + // write the shape record + $recVer = 0x2; + $recInstance = $this->object->getSpType(); // shape type + $recType = 0xF00A; + $length = 0x00000008; + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); + + // the options + if ($this->object->getOPTCollection()) { + $optData = ''; + + $recVer = 0x3; + $recInstance = count($this->object->getOPTCollection()); + $recType = 0xF00B; + foreach ($this->object->getOPTCollection() as $property => $value) { + $optData .= pack('vV', $property, $value); + } + $length = strlen($optData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $optData; + } + + // the client anchor + if ($this->object->getStartCoordinates()) { + $clientAnchorData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF010; + + // start coordinates + list($column, $row) = Coordinate::coordinateFromString($this->object->getStartCoordinates()); + $c1 = Coordinate::columnIndexFromString($column) - 1; + $r1 = $row - 1; + + // start offsetX + $startOffsetX = $this->object->getStartOffsetX(); + + // start offsetY + $startOffsetY = $this->object->getStartOffsetY(); + + // end coordinates + list($column, $row) = Coordinate::coordinateFromString($this->object->getEndCoordinates()); + $c2 = Coordinate::columnIndexFromString($column) - 1; + $r2 = $row - 1; + + // end offsetX + $endOffsetX = $this->object->getEndOffsetX(); + + // end offsetY + $endOffsetY = $this->object->getEndOffsetY(); + + $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY); + + $length = strlen($clientAnchorData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientAnchorData; + } + + // the client data, just empty for now + if (!$this->object->getSpgr()) { + $clientDataData = ''; + + $recVer = 0x0; + $recInstance = 0x0; + $recType = 0xF011; + + $length = strlen($clientDataData); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + $data .= $header . $clientDataData; + } + + // write the record + $recVer = 0xF; + $recInstance = 0x0000; + $recType = 0xF004; + $length = strlen($data); + + $recVerInstance = $recVer; + $recVerInstance |= $recInstance << 4; + + $header = pack('vvV', $recVerInstance, $recType, $length); + + $this->data = $header . $data; + + break; + } + + return $this->data; + } + + /** + * Gets the shape offsets. + * + * @return array + */ + public function getSpOffsets() + { + return $this->spOffsets; + } + + /** + * Gets the shape types. + * + * @return array + */ + public function getSpTypes() + { + return $this->spTypes; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php new file mode 100755 index 0000000..df37dcb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php @@ -0,0 +1,149 @@ +colorIndex = 0x7FFF; + $this->font = $font; + } + + /** + * Set the color index. + * + * @param int $colorIndex + */ + public function setColorIndex($colorIndex) + { + $this->colorIndex = $colorIndex; + } + + /** + * Get font record data. + * + * @return string + */ + public function writeFont() + { + $font_outline = 0; + $font_shadow = 0; + + $icv = $this->colorIndex; // Index to color palette + if ($this->font->getSuperscript()) { + $sss = 1; + } elseif ($this->font->getSubscript()) { + $sss = 2; + } else { + $sss = 0; + } + $bFamily = 0; // Font family + $bCharSet = \PhpOffice\PhpSpreadsheet\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set + + $record = 0x31; // Record identifier + $reserved = 0x00; // Reserved + $grbit = 0x00; // Font attributes + if ($this->font->getItalic()) { + $grbit |= 0x02; + } + if ($this->font->getStrikethrough()) { + $grbit |= 0x08; + } + if ($font_outline) { + $grbit |= 0x10; + } + if ($font_shadow) { + $grbit |= 0x20; + } + + $data = pack( + 'vvvvvCCCC', + // Fontsize (in twips) + $this->font->getSize() * 20, + $grbit, + // Colour + $icv, + // Font weight + self::mapBold($this->font->getBold()), + // Superscript/Subscript + $sss, + self::mapUnderline($this->font->getUnderline()), + $bFamily, + $bCharSet, + $reserved + ); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($this->font->getName()); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Map to BIFF5-BIFF8 codes for bold. + * + * @param bool $bold + * + * @return int + */ + private static function mapBold($bold) + { + if ($bold) { + return 0x2BC; // 700 = Bold font weight + } + + return 0x190; // 400 = Normal font weight + } + + /** + * Map of BIFF2-BIFF8 codes for underline styles. + * + * @var array of int + */ + private static $mapUnderline = [ + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE => 0x00, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE => 0x01, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE => 0x02, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING => 0x21, + \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING => 0x22, + ]; + + /** + * Map underline. + * + * @param string $underline + * + * @return int + */ + private static function mapUnderline($underline) + { + if (isset(self::$mapUnderline[$underline])) { + return self::$mapUnderline[$underline]; + } + + return 0x00; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php new file mode 100755 index 0000000..6049e32 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -0,0 +1,1446 @@ +=,;#()"{} + const REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&\<\>\=\,\;\#\(\)\"\{\}]+'; + + // Sheet title in quoted form (without surrounding quotes) + // Invalid sheet title characters cannot occur in the sheet title: + // *:/\?[] (usual invalid sheet title characters) + // Single quote is represented as a pair '' + const REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+'; + + /** + * The index of the character we are currently looking at. + * + * @var int + */ + public $currentCharacter; + + /** + * The token we are working on. + * + * @var string + */ + public $currentToken; + + /** + * The formula to parse. + * + * @var string + */ + private $formula; + + /** + * The character ahead of the current char. + * + * @var string + */ + public $lookAhead; + + /** + * The parse tree to be generated. + * + * @var string + */ + private $parseTree; + + /** + * Array of external sheets. + * + * @var array + */ + private $externalSheets; + + /** + * Array of sheet references in the form of REF structures. + * + * @var array + */ + public $references; + + /** + * The Excel ptg indices. + * + * @var array + */ + private $ptg = [ + 'ptgExp' => 0x01, + 'ptgTbl' => 0x02, + 'ptgAdd' => 0x03, + 'ptgSub' => 0x04, + 'ptgMul' => 0x05, + 'ptgDiv' => 0x06, + 'ptgPower' => 0x07, + 'ptgConcat' => 0x08, + 'ptgLT' => 0x09, + 'ptgLE' => 0x0A, + 'ptgEQ' => 0x0B, + 'ptgGE' => 0x0C, + 'ptgGT' => 0x0D, + 'ptgNE' => 0x0E, + 'ptgIsect' => 0x0F, + 'ptgUnion' => 0x10, + 'ptgRange' => 0x11, + 'ptgUplus' => 0x12, + 'ptgUminus' => 0x13, + 'ptgPercent' => 0x14, + 'ptgParen' => 0x15, + 'ptgMissArg' => 0x16, + 'ptgStr' => 0x17, + 'ptgAttr' => 0x19, + 'ptgSheet' => 0x1A, + 'ptgEndSheet' => 0x1B, + 'ptgErr' => 0x1C, + 'ptgBool' => 0x1D, + 'ptgInt' => 0x1E, + 'ptgNum' => 0x1F, + 'ptgArray' => 0x20, + 'ptgFunc' => 0x21, + 'ptgFuncVar' => 0x22, + 'ptgName' => 0x23, + 'ptgRef' => 0x24, + 'ptgArea' => 0x25, + 'ptgMemArea' => 0x26, + 'ptgMemErr' => 0x27, + 'ptgMemNoMem' => 0x28, + 'ptgMemFunc' => 0x29, + 'ptgRefErr' => 0x2A, + 'ptgAreaErr' => 0x2B, + 'ptgRefN' => 0x2C, + 'ptgAreaN' => 0x2D, + 'ptgMemAreaN' => 0x2E, + 'ptgMemNoMemN' => 0x2F, + 'ptgNameX' => 0x39, + 'ptgRef3d' => 0x3A, + 'ptgArea3d' => 0x3B, + 'ptgRefErr3d' => 0x3C, + 'ptgAreaErr3d' => 0x3D, + 'ptgArrayV' => 0x40, + 'ptgFuncV' => 0x41, + 'ptgFuncVarV' => 0x42, + 'ptgNameV' => 0x43, + 'ptgRefV' => 0x44, + 'ptgAreaV' => 0x45, + 'ptgMemAreaV' => 0x46, + 'ptgMemErrV' => 0x47, + 'ptgMemNoMemV' => 0x48, + 'ptgMemFuncV' => 0x49, + 'ptgRefErrV' => 0x4A, + 'ptgAreaErrV' => 0x4B, + 'ptgRefNV' => 0x4C, + 'ptgAreaNV' => 0x4D, + 'ptgMemAreaNV' => 0x4E, + 'ptgMemNoMemNV' => 0x4F, + 'ptgFuncCEV' => 0x58, + 'ptgNameXV' => 0x59, + 'ptgRef3dV' => 0x5A, + 'ptgArea3dV' => 0x5B, + 'ptgRefErr3dV' => 0x5C, + 'ptgAreaErr3dV' => 0x5D, + 'ptgArrayA' => 0x60, + 'ptgFuncA' => 0x61, + 'ptgFuncVarA' => 0x62, + 'ptgNameA' => 0x63, + 'ptgRefA' => 0x64, + 'ptgAreaA' => 0x65, + 'ptgMemAreaA' => 0x66, + 'ptgMemErrA' => 0x67, + 'ptgMemNoMemA' => 0x68, + 'ptgMemFuncA' => 0x69, + 'ptgRefErrA' => 0x6A, + 'ptgAreaErrA' => 0x6B, + 'ptgRefNA' => 0x6C, + 'ptgAreaNA' => 0x6D, + 'ptgMemAreaNA' => 0x6E, + 'ptgMemNoMemNA' => 0x6F, + 'ptgFuncCEA' => 0x78, + 'ptgNameXA' => 0x79, + 'ptgRef3dA' => 0x7A, + 'ptgArea3dA' => 0x7B, + 'ptgRefErr3dA' => 0x7C, + 'ptgAreaErr3dA' => 0x7D, + ]; + + /** + * Thanks to Michael Meeks and Gnumeric for the initial arg values. + * + * The following hash was generated by "function_locale.pl" in the distro. + * Refer to function_locale.pl for non-English function names. + * + * The array elements are as follow: + * ptg: The Excel function ptg code. + * args: The number of arguments that the function takes: + * >=0 is a fixed number of arguments. + * -1 is a variable number of arguments. + * class: The reference, value or array class of the function args. + * vol: The function is volatile. + * + * @var array + */ + private $functions = [ + // function ptg args class vol + 'COUNT' => [0, -1, 0, 0], + 'IF' => [1, -1, 1, 0], + 'ISNA' => [2, 1, 1, 0], + 'ISERROR' => [3, 1, 1, 0], + 'SUM' => [4, -1, 0, 0], + 'AVERAGE' => [5, -1, 0, 0], + 'MIN' => [6, -1, 0, 0], + 'MAX' => [7, -1, 0, 0], + 'ROW' => [8, -1, 0, 0], + 'COLUMN' => [9, -1, 0, 0], + 'NA' => [10, 0, 0, 0], + 'NPV' => [11, -1, 1, 0], + 'STDEV' => [12, -1, 0, 0], + 'DOLLAR' => [13, -1, 1, 0], + 'FIXED' => [14, -1, 1, 0], + 'SIN' => [15, 1, 1, 0], + 'COS' => [16, 1, 1, 0], + 'TAN' => [17, 1, 1, 0], + 'ATAN' => [18, 1, 1, 0], + 'PI' => [19, 0, 1, 0], + 'SQRT' => [20, 1, 1, 0], + 'EXP' => [21, 1, 1, 0], + 'LN' => [22, 1, 1, 0], + 'LOG10' => [23, 1, 1, 0], + 'ABS' => [24, 1, 1, 0], + 'INT' => [25, 1, 1, 0], + 'SIGN' => [26, 1, 1, 0], + 'ROUND' => [27, 2, 1, 0], + 'LOOKUP' => [28, -1, 0, 0], + 'INDEX' => [29, -1, 0, 1], + 'REPT' => [30, 2, 1, 0], + 'MID' => [31, 3, 1, 0], + 'LEN' => [32, 1, 1, 0], + 'VALUE' => [33, 1, 1, 0], + 'TRUE' => [34, 0, 1, 0], + 'FALSE' => [35, 0, 1, 0], + 'AND' => [36, -1, 0, 0], + 'OR' => [37, -1, 0, 0], + 'NOT' => [38, 1, 1, 0], + 'MOD' => [39, 2, 1, 0], + 'DCOUNT' => [40, 3, 0, 0], + 'DSUM' => [41, 3, 0, 0], + 'DAVERAGE' => [42, 3, 0, 0], + 'DMIN' => [43, 3, 0, 0], + 'DMAX' => [44, 3, 0, 0], + 'DSTDEV' => [45, 3, 0, 0], + 'VAR' => [46, -1, 0, 0], + 'DVAR' => [47, 3, 0, 0], + 'TEXT' => [48, 2, 1, 0], + 'LINEST' => [49, -1, 0, 0], + 'TREND' => [50, -1, 0, 0], + 'LOGEST' => [51, -1, 0, 0], + 'GROWTH' => [52, -1, 0, 0], + 'PV' => [56, -1, 1, 0], + 'FV' => [57, -1, 1, 0], + 'NPER' => [58, -1, 1, 0], + 'PMT' => [59, -1, 1, 0], + 'RATE' => [60, -1, 1, 0], + 'MIRR' => [61, 3, 0, 0], + 'IRR' => [62, -1, 0, 0], + 'RAND' => [63, 0, 1, 1], + 'MATCH' => [64, -1, 0, 0], + 'DATE' => [65, 3, 1, 0], + 'TIME' => [66, 3, 1, 0], + 'DAY' => [67, 1, 1, 0], + 'MONTH' => [68, 1, 1, 0], + 'YEAR' => [69, 1, 1, 0], + 'WEEKDAY' => [70, -1, 1, 0], + 'HOUR' => [71, 1, 1, 0], + 'MINUTE' => [72, 1, 1, 0], + 'SECOND' => [73, 1, 1, 0], + 'NOW' => [74, 0, 1, 1], + 'AREAS' => [75, 1, 0, 1], + 'ROWS' => [76, 1, 0, 1], + 'COLUMNS' => [77, 1, 0, 1], + 'OFFSET' => [78, -1, 0, 1], + 'SEARCH' => [82, -1, 1, 0], + 'TRANSPOSE' => [83, 1, 1, 0], + 'TYPE' => [86, 1, 1, 0], + 'ATAN2' => [97, 2, 1, 0], + 'ASIN' => [98, 1, 1, 0], + 'ACOS' => [99, 1, 1, 0], + 'CHOOSE' => [100, -1, 1, 0], + 'HLOOKUP' => [101, -1, 0, 0], + 'VLOOKUP' => [102, -1, 0, 0], + 'ISREF' => [105, 1, 0, 0], + 'LOG' => [109, -1, 1, 0], + 'CHAR' => [111, 1, 1, 0], + 'LOWER' => [112, 1, 1, 0], + 'UPPER' => [113, 1, 1, 0], + 'PROPER' => [114, 1, 1, 0], + 'LEFT' => [115, -1, 1, 0], + 'RIGHT' => [116, -1, 1, 0], + 'EXACT' => [117, 2, 1, 0], + 'TRIM' => [118, 1, 1, 0], + 'REPLACE' => [119, 4, 1, 0], + 'SUBSTITUTE' => [120, -1, 1, 0], + 'CODE' => [121, 1, 1, 0], + 'FIND' => [124, -1, 1, 0], + 'CELL' => [125, -1, 0, 1], + 'ISERR' => [126, 1, 1, 0], + 'ISTEXT' => [127, 1, 1, 0], + 'ISNUMBER' => [128, 1, 1, 0], + 'ISBLANK' => [129, 1, 1, 0], + 'T' => [130, 1, 0, 0], + 'N' => [131, 1, 0, 0], + 'DATEVALUE' => [140, 1, 1, 0], + 'TIMEVALUE' => [141, 1, 1, 0], + 'SLN' => [142, 3, 1, 0], + 'SYD' => [143, 4, 1, 0], + 'DDB' => [144, -1, 1, 0], + 'INDIRECT' => [148, -1, 1, 1], + 'CALL' => [150, -1, 1, 0], + 'CLEAN' => [162, 1, 1, 0], + 'MDETERM' => [163, 1, 2, 0], + 'MINVERSE' => [164, 1, 2, 0], + 'MMULT' => [165, 2, 2, 0], + 'IPMT' => [167, -1, 1, 0], + 'PPMT' => [168, -1, 1, 0], + 'COUNTA' => [169, -1, 0, 0], + 'PRODUCT' => [183, -1, 0, 0], + 'FACT' => [184, 1, 1, 0], + 'DPRODUCT' => [189, 3, 0, 0], + 'ISNONTEXT' => [190, 1, 1, 0], + 'STDEVP' => [193, -1, 0, 0], + 'VARP' => [194, -1, 0, 0], + 'DSTDEVP' => [195, 3, 0, 0], + 'DVARP' => [196, 3, 0, 0], + 'TRUNC' => [197, -1, 1, 0], + 'ISLOGICAL' => [198, 1, 1, 0], + 'DCOUNTA' => [199, 3, 0, 0], + 'USDOLLAR' => [204, -1, 1, 0], + 'FINDB' => [205, -1, 1, 0], + 'SEARCHB' => [206, -1, 1, 0], + 'REPLACEB' => [207, 4, 1, 0], + 'LEFTB' => [208, -1, 1, 0], + 'RIGHTB' => [209, -1, 1, 0], + 'MIDB' => [210, 3, 1, 0], + 'LENB' => [211, 1, 1, 0], + 'ROUNDUP' => [212, 2, 1, 0], + 'ROUNDDOWN' => [213, 2, 1, 0], + 'ASC' => [214, 1, 1, 0], + 'DBCS' => [215, 1, 1, 0], + 'RANK' => [216, -1, 0, 0], + 'ADDRESS' => [219, -1, 1, 0], + 'DAYS360' => [220, -1, 1, 0], + 'TODAY' => [221, 0, 1, 1], + 'VDB' => [222, -1, 1, 0], + 'MEDIAN' => [227, -1, 0, 0], + 'SUMPRODUCT' => [228, -1, 2, 0], + 'SINH' => [229, 1, 1, 0], + 'COSH' => [230, 1, 1, 0], + 'TANH' => [231, 1, 1, 0], + 'ASINH' => [232, 1, 1, 0], + 'ACOSH' => [233, 1, 1, 0], + 'ATANH' => [234, 1, 1, 0], + 'DGET' => [235, 3, 0, 0], + 'INFO' => [244, 1, 1, 1], + 'DB' => [247, -1, 1, 0], + 'FREQUENCY' => [252, 2, 0, 0], + 'ERROR.TYPE' => [261, 1, 1, 0], + 'REGISTER.ID' => [267, -1, 1, 0], + 'AVEDEV' => [269, -1, 0, 0], + 'BETADIST' => [270, -1, 1, 0], + 'GAMMALN' => [271, 1, 1, 0], + 'BETAINV' => [272, -1, 1, 0], + 'BINOMDIST' => [273, 4, 1, 0], + 'CHIDIST' => [274, 2, 1, 0], + 'CHIINV' => [275, 2, 1, 0], + 'COMBIN' => [276, 2, 1, 0], + 'CONFIDENCE' => [277, 3, 1, 0], + 'CRITBINOM' => [278, 3, 1, 0], + 'EVEN' => [279, 1, 1, 0], + 'EXPONDIST' => [280, 3, 1, 0], + 'FDIST' => [281, 3, 1, 0], + 'FINV' => [282, 3, 1, 0], + 'FISHER' => [283, 1, 1, 0], + 'FISHERINV' => [284, 1, 1, 0], + 'FLOOR' => [285, 2, 1, 0], + 'GAMMADIST' => [286, 4, 1, 0], + 'GAMMAINV' => [287, 3, 1, 0], + 'CEILING' => [288, 2, 1, 0], + 'HYPGEOMDIST' => [289, 4, 1, 0], + 'LOGNORMDIST' => [290, 3, 1, 0], + 'LOGINV' => [291, 3, 1, 0], + 'NEGBINOMDIST' => [292, 3, 1, 0], + 'NORMDIST' => [293, 4, 1, 0], + 'NORMSDIST' => [294, 1, 1, 0], + 'NORMINV' => [295, 3, 1, 0], + 'NORMSINV' => [296, 1, 1, 0], + 'STANDARDIZE' => [297, 3, 1, 0], + 'ODD' => [298, 1, 1, 0], + 'PERMUT' => [299, 2, 1, 0], + 'POISSON' => [300, 3, 1, 0], + 'TDIST' => [301, 3, 1, 0], + 'WEIBULL' => [302, 4, 1, 0], + 'SUMXMY2' => [303, 2, 2, 0], + 'SUMX2MY2' => [304, 2, 2, 0], + 'SUMX2PY2' => [305, 2, 2, 0], + 'CHITEST' => [306, 2, 2, 0], + 'CORREL' => [307, 2, 2, 0], + 'COVAR' => [308, 2, 2, 0], + 'FORECAST' => [309, 3, 2, 0], + 'FTEST' => [310, 2, 2, 0], + 'INTERCEPT' => [311, 2, 2, 0], + 'PEARSON' => [312, 2, 2, 0], + 'RSQ' => [313, 2, 2, 0], + 'STEYX' => [314, 2, 2, 0], + 'SLOPE' => [315, 2, 2, 0], + 'TTEST' => [316, 4, 2, 0], + 'PROB' => [317, -1, 2, 0], + 'DEVSQ' => [318, -1, 0, 0], + 'GEOMEAN' => [319, -1, 0, 0], + 'HARMEAN' => [320, -1, 0, 0], + 'SUMSQ' => [321, -1, 0, 0], + 'KURT' => [322, -1, 0, 0], + 'SKEW' => [323, -1, 0, 0], + 'ZTEST' => [324, -1, 0, 0], + 'LARGE' => [325, 2, 0, 0], + 'SMALL' => [326, 2, 0, 0], + 'QUARTILE' => [327, 2, 0, 0], + 'PERCENTILE' => [328, 2, 0, 0], + 'PERCENTRANK' => [329, -1, 0, 0], + 'MODE' => [330, -1, 2, 0], + 'TRIMMEAN' => [331, 2, 0, 0], + 'TINV' => [332, 2, 1, 0], + 'CONCATENATE' => [336, -1, 1, 0], + 'POWER' => [337, 2, 1, 0], + 'RADIANS' => [342, 1, 1, 0], + 'DEGREES' => [343, 1, 1, 0], + 'SUBTOTAL' => [344, -1, 0, 0], + 'SUMIF' => [345, -1, 0, 0], + 'COUNTIF' => [346, 2, 0, 0], + 'COUNTBLANK' => [347, 1, 0, 0], + 'ISPMT' => [350, 4, 1, 0], + 'DATEDIF' => [351, 3, 1, 0], + 'DATESTRING' => [352, 1, 1, 0], + 'NUMBERSTRING' => [353, 2, 1, 0], + 'ROMAN' => [354, -1, 1, 0], + 'GETPIVOTDATA' => [358, -1, 0, 0], + 'HYPERLINK' => [359, -1, 1, 0], + 'PHONETIC' => [360, 1, 0, 0], + 'AVERAGEA' => [361, -1, 0, 0], + 'MAXA' => [362, -1, 0, 0], + 'MINA' => [363, -1, 0, 0], + 'STDEVPA' => [364, -1, 0, 0], + 'VARPA' => [365, -1, 0, 0], + 'STDEVA' => [366, -1, 0, 0], + 'VARA' => [367, -1, 0, 0], + 'BAHTTEXT' => [368, 1, 0, 0], + ]; + + /** + * The class constructor. + */ + public function __construct() + { + $this->currentCharacter = 0; + $this->currentToken = ''; // The token we are working on. + $this->formula = ''; // The formula to parse. + $this->lookAhead = ''; // The character ahead of the current char. + $this->parseTree = ''; // The parse tree to be generated. + $this->externalSheets = []; + $this->references = []; + } + + /** + * Convert a token to the proper ptg value. + * + * @param mixed $token the token to convert + * + * @return mixed the converted token on success + */ + private function convert($token) + { + if (preg_match('/"([^"]|""){0,255}"/', $token)) { + return $this->convertString($token); + } elseif (is_numeric($token)) { + return $this->convertNumber($token); + // match references like A1 or $A$1 + } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) { + return $this->convertRef2d($token); + // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?(\\d+)$/u', $token)) { + return $this->convertRef3d($token); + // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u", $token)) { + return $this->convertRef3d($token); + // match ranges like A1:B2 or $A$1:$B$2 + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) { + return $this->convertRange2d($token); + // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)\\:\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)$/u', $token)) { + return $this->convertRange3d($token); + // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u", $token)) { + return $this->convertRange3d($token); + // operators (including parentheses) + } elseif (isset($this->ptg[$token])) { + return pack('C', $this->ptg[$token]); + // match error codes + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) or $token == '#N/A') { + return $this->convertError($token); + // commented so argument number can be processed correctly. See toReversePolish(). + /*elseif (preg_match("/[A-Z0-9\xc0-\xdc\.]+/", $token)) + { + return($this->convertFunction($token, $this->_func_args)); + }*/ + // if it's an argument, ignore the token (the argument remains) + } elseif ($token == 'arg') { + return ''; + } + + // TODO: use real error codes + throw new WriterException("Unknown token $token"); + } + + /** + * Convert a number token to ptgInt or ptgNum. + * + * @param mixed $num an integer or double for conversion to its ptg value + * + * @return string + */ + private function convertNumber($num) + { + // Integer in the range 0..2**16-1 + if ((preg_match('/^\\d+$/', $num)) and ($num <= 65535)) { + return pack('Cv', $this->ptg['ptgInt'], $num); + } + + // A float + if (BIFFwriter::getByteOrder()) { // if it's Big Endian + $num = strrev($num); + } + + return pack('Cd', $this->ptg['ptgNum'], $num); + } + + /** + * Convert a string token to ptgStr. + * + * @param string $string a string for conversion to its ptg value + * + * @return mixed the converted token on success + */ + private function convertString($string) + { + // chop away beggining and ending quotes + $string = substr($string, 1, -1); + if (strlen($string) > 255) { + throw new WriterException('String is too long'); + } + + return pack('C', $this->ptg['ptgStr']) . StringHelper::UTF8toBIFF8UnicodeShort($string); + } + + /** + * Convert a function to a ptgFunc or ptgFuncVarV depending on the number of + * args that it takes. + * + * @param string $token the name of the function for convertion to ptg value + * @param int $num_args the number of arguments the function receives + * + * @return string The packed ptg for the function + */ + private function convertFunction($token, $num_args) + { + $args = $this->functions[$token][1]; + + // Fixed number of args eg. TIME($i, $j, $k). + if ($args >= 0) { + return pack('Cv', $this->ptg['ptgFuncV'], $this->functions[$token][0]); + } + // Variable number of args eg. SUM($i, $j, $k, ..). + if ($args == -1) { + return pack('CCv', $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]); + } + } + + /** + * Convert an Excel range such as A1:D4 to a ptgRefV. + * + * @param string $range An Excel range in the A1:A2 + * @param int $class + * + * @return string + */ + private function convertRange2d($range, $class = 0) + { + // TODO: possible class value 0,1,2 check Formula.pm + // Split the range into 2 cell refs + if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) { + list($cell1, $cell2) = explode(':', $range); + } else { + // TODO: use real error codes + throw new WriterException('Unknown range separator'); + } + + // Convert the cell references + list($row1, $col1) = $this->cellToPackedRowcol($cell1); + list($row2, $col2) = $this->cellToPackedRowcol($cell2); + + // The ptg value depends on the class of the ptg. + if ($class == 0) { + $ptgArea = pack('C', $this->ptg['ptgArea']); + } elseif ($class == 1) { + $ptgArea = pack('C', $this->ptg['ptgAreaV']); + } elseif ($class == 2) { + $ptgArea = pack('C', $this->ptg['ptgAreaA']); + } else { + // TODO: use real error codes + throw new WriterException("Unknown class $class"); + } + + return $ptgArea . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to + * a ptgArea3d. + * + * @param string $token an Excel range in the Sheet1!A1:A2 format + * + * @return mixed the packed ptgArea3d token on success + */ + private function convertRange3d($token) + { + // Split the ref at the ! symbol + list($ext_ref, $range) = PhpspreadsheetWorksheet::extractSheetTitle($token, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Split the range into 2 cell refs + list($cell1, $cell2) = explode(':', $range); + + // Convert the cell references + if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\\d+)$/', $cell1)) { + list($row1, $col1) = $this->cellToPackedRowcol($cell1); + list($row2, $col2) = $this->cellToPackedRowcol($cell2); + } else { // It's a rows range (like 26:27) + list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1 . ':' . $cell2); + } + + // The ptg value depends on the class of the ptg. + $ptgArea = pack('C', $this->ptg['ptgArea3d']); + + return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2; + } + + /** + * Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV. + * + * @param string $cell An Excel cell reference + * + * @return string The cell in packed() format with the corresponding ptg + */ + private function convertRef2d($cell) + { + // Convert the cell reference + $cell_array = $this->cellToPackedRowcol($cell); + list($row, $col) = $cell_array; + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRefA']); + + return $ptgRef . $row . $col; + } + + /** + * Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a + * ptgRef3d. + * + * @param string $cell An Excel cell reference + * + * @return mixed the packed ptgRef3d token on success + */ + private function convertRef3d($cell) + { + // Split the ref at the ! symbol + list($ext_ref, $cell) = PhpspreadsheetWorksheet::extractSheetTitle($cell, true); + + // Convert the external reference part (different for BIFF8) + $ext_ref = $this->getRefIndex($ext_ref); + + // Convert the cell reference part + list($row, $col) = $this->cellToPackedRowcol($cell); + + // The ptg value depends on the class of the ptg. + $ptgRef = pack('C', $this->ptg['ptgRef3dA']); + + return $ptgRef . $ext_ref . $row . $col; + } + + /** + * Convert an error code to a ptgErr. + * + * @param string $errorCode The error code for conversion to its ptg value + * + * @return string The error code ptgErr + */ + private function convertError($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return pack('C', 0x00); + case '#DIV/0!': + return pack('C', 0x07); + case '#VALUE!': + return pack('C', 0x0F); + case '#REF!': + return pack('C', 0x17); + case '#NAME?': + return pack('C', 0x1D); + case '#NUM!': + return pack('C', 0x24); + case '#N/A': + return pack('C', 0x2A); + } + + return pack('C', 0xFF); + } + + /** + * Look up the REF index that corresponds to an external sheet name + * (or range). If it doesn't exist yet add it to the workbook's references + * array. It assumes all sheet names given must exist. + * + * @param string $ext_ref The name of the external reference + * + * @return mixed The reference index in packed() format on success + */ + private function getRefIndex($ext_ref) + { + $ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any. + $ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any. + $ext_ref = str_replace('\'\'', '\'', $ext_ref); // Replace escaped '' with ' + + // Check if there is a sheet range eg., Sheet1:Sheet2. + if (preg_match('/:/', $ext_ref)) { + list($sheet_name1, $sheet_name2) = explode(':', $ext_ref); + + $sheet1 = $this->getSheetIndex($sheet_name1); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $sheet_name1 in formula"); + } + $sheet2 = $this->getSheetIndex($sheet_name2); + if ($sheet2 == -1) { + throw new WriterException("Unknown sheet name $sheet_name2 in formula"); + } + + // Reverse max and min sheet numbers if necessary + if ($sheet1 > $sheet2) { + list($sheet1, $sheet2) = [$sheet2, $sheet1]; + } + } else { // Single sheet name only. + $sheet1 = $this->getSheetIndex($ext_ref); + if ($sheet1 == -1) { + throw new WriterException("Unknown sheet name $ext_ref in formula"); + } + $sheet2 = $sheet1; + } + + // assume all references belong to this document + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $sheet1, $sheet2); + $totalreferences = count($this->references); + $index = -1; + for ($i = 0; $i < $totalreferences; ++$i) { + if ($ref == $this->references[$i]) { + $index = $i; + + break; + } + } + // if REF was not found add it to references array + if ($index == -1) { + $this->references[$totalreferences] = $ref; + $index = $totalreferences; + } + + return pack('v', $index); + } + + /** + * Look up the index that corresponds to an external sheet name. The hash of + * sheet names is updated by the addworksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @param string $sheet_name Sheet name + * + * @return int The sheet index, -1 if the sheet was not found + */ + private function getSheetIndex($sheet_name) + { + if (!isset($this->externalSheets[$sheet_name])) { + return -1; + } + + return $this->externalSheets[$sheet_name]; + } + + /** + * This method is used to update the array of sheet names. It is + * called by the addWorksheet() method of the + * \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook class. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::addWorksheet() + * + * @param string $name The name of the worksheet being added + * @param int $index The index of the worksheet being added + */ + public function setExtSheet($name, $index) + { + $this->externalSheets[$name] = $index; + } + + /** + * pack() row and column into the required 3 or 4 byte format. + * + * @param string $cell The Excel cell reference to be packed + * + * @return array Array containing the row and column in packed() format + */ + private function cellToPackedRowcol($cell) + { + $cell = strtoupper($cell); + list($row, $col, $row_rel, $col_rel) = $this->cellToRowcol($cell); + if ($col >= 256) { + throw new WriterException("Column in: $cell greater than 255"); + } + if ($row >= 65536) { + throw new WriterException("Row in: $cell greater than 65536 "); + } + + // Set the high bits to indicate if row or col are relative. + $col |= $col_rel << 14; + $col |= $row_rel << 15; + $col = pack('v', $col); + + $row = pack('v', $row); + + return [$row, $col]; + } + + /** + * pack() row range into the required 3 or 4 byte format. + * Just using maximum col/rows, which is probably not the correct solution. + * + * @param string $range The Excel range to be packed + * + * @return array Array containing (row1,col1,row2,col2) in packed() format + */ + private function rangeToPackedRange($range) + { + preg_match('/(\$)?(\d+)\:(\$)?(\d+)/', $range, $match); + // return absolute rows if there is a $ in the ref + $row1_rel = empty($match[1]) ? 1 : 0; + $row1 = $match[2]; + $row2_rel = empty($match[3]) ? 1 : 0; + $row2 = $match[4]; + // Convert 1-index to zero-index + --$row1; + --$row2; + // Trick poor inocent Excel + $col1 = 0; + $col2 = 65535; // FIXME: maximum possible value for Excel 5 (change this!!!) + + // FIXME: this changes for BIFF8 + if (($row1 >= 65536) or ($row2 >= 65536)) { + throw new WriterException("Row in: $range greater than 65536 "); + } + + // Set the high bits to indicate if rows are relative. + $col1 |= $row1_rel << 15; + $col2 |= $row2_rel << 15; + $col1 = pack('v', $col1); + $col2 = pack('v', $col2); + + $row1 = pack('v', $row1); + $row2 = pack('v', $row2); + + return [$row1, $col1, $row2, $col2]; + } + + /** + * Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero + * indexed row and column number. Also returns two (0,1) values to indicate + * whether the row or column are relative references. + * + * @param string $cell the Excel cell reference in A1 format + * + * @return array + */ + private function cellToRowcol($cell) + { + preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/', $cell, $match); + // return absolute column if there is a $ in the ref + $col_rel = empty($match[1]) ? 1 : 0; + $col_ref = $match[2]; + $row_rel = empty($match[3]) ? 1 : 0; + $row = $match[4]; + + // Convert base26 column string to a number. + $expn = strlen($col_ref) - 1; + $col = 0; + $col_ref_length = strlen($col_ref); + for ($i = 0; $i < $col_ref_length; ++$i) { + $col += (ord($col_ref[$i]) - 64) * pow(26, $expn); + --$expn; + } + + // Convert 1-index to zero-index + --$row; + --$col; + + return [$row, $col, $row_rel, $col_rel]; + } + + /** + * Advance to the next valid token. + */ + private function advance() + { + $i = $this->currentCharacter; + $formula_length = strlen($this->formula); + // eat up white spaces + if ($i < $formula_length) { + while ($this->formula[$i] == ' ') { + ++$i; + } + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } + $token = ''; + } + + while ($i < $formula_length) { + $token .= $this->formula[$i]; + + if ($i < ($formula_length - 1)) { + $this->lookAhead = $this->formula[$i + 1]; + } else { + $this->lookAhead = ''; + } + + if ($this->match($token) != '') { + $this->currentCharacter = $i + 1; + $this->currentToken = $token; + + return 1; + } + + if ($i < ($formula_length - 2)) { + $this->lookAhead = $this->formula[$i + 2]; + } else { // if we run out of characters lookAhead becomes empty + $this->lookAhead = ''; + } + ++$i; + } + //die("Lexical error ".$this->currentCharacter); + } + + /** + * Checks if it's a valid token. + * + * @param mixed $token the token to check + * + * @return mixed The checked token or false on failure + */ + private function match($token) + { + switch ($token) { + case '+': + case '-': + case '*': + case '/': + case '(': + case ')': + case ',': + case ';': + case '>=': + case '<=': + case '=': + case '<>': + case '^': + case '&': + case '%': + return $token; + + break; + case '>': + if ($this->lookAhead === '=') { // it's a GE token + break; + } + + return $token; + + break; + case '<': + // it's a LE or a NE token + if (($this->lookAhead === '=') or ($this->lookAhead === '>')) { + break; + } + + return $token; + + break; + default: + // if it's a reference A1 or $A$1 or $A1 or A$1 + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.') and ($this->lookAhead !== '!')) { + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + return $token; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead)) { + // if it's a range A1:A2 or $A$1:$A$2 + return $token; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 + return $token; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead)) { + // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 + return $token; + } elseif (is_numeric($token) and (!is_numeric($token . $this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead !== '!') and ($this->lookAhead !== ':')) { + // If it's a number (check that it's not a sheet name or range) + return $token; + } elseif (preg_match('/"([^"]|""){0,255}"/', $token) and $this->lookAhead !== '"' and (substr_count($token, '"') % 2 == 0)) { + // If it's a string (of maximum 255 characters) + return $token; + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $token) or $token === '#N/A') { + // If it's an error code + return $token; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $token) and ($this->lookAhead === '(')) { + // if it's a function call + return $token; + } elseif (substr($token, -1) === ')') { + // It's an argument of some description (e.g. a named range), + // precise nature yet to be determined + return $token; + } + + return ''; + } + } + + /** + * The parsing method. It parses a formula. + * + * @param string $formula the formula to parse, without the initial equal + * sign (=) + * + * @return mixed true on success + */ + public function parse($formula) + { + $this->currentCharacter = 0; + $this->formula = $formula; + $this->lookAhead = isset($formula[1]) ? $formula[1] : ''; + $this->advance(); + $this->parseTree = $this->condition(); + + return true; + } + + /** + * It parses a condition. It assumes the following rule: + * Cond -> Expr [(">" | "<") Expr]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function condition() + { + $result = $this->expression(); + if ($this->currentToken == '<') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLT', $result, $result2); + } elseif ($this->currentToken == '>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGT', $result, $result2); + } elseif ($this->currentToken == '<=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgLE', $result, $result2); + } elseif ($this->currentToken == '>=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgGE', $result, $result2); + } elseif ($this->currentToken == '=') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgEQ', $result, $result2); + } elseif ($this->currentToken == '<>') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgNE', $result, $result2); + } elseif ($this->currentToken == '&') { + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgConcat', $result, $result2); + } + + return $result; + } + + /** + * It parses a expression. It assumes the following rule: + * Expr -> Term [("+" | "-") Term] + * -> "string" + * -> "-" Term : Negative value + * -> "+" Term : Positive value + * -> Error code. + * + * @return mixed The parsed ptg'd tree on success + */ + private function expression() + { + // If it's a string return a string node + if (preg_match('/"([^"]|""){0,255}"/', $this->currentToken)) { + $tmp = str_replace('""', '"', $this->currentToken); + if (($tmp == '"') || ($tmp == '')) { + // Trap for "" that has been used for an empty string + $tmp = '""'; + } + $result = $this->createTree($tmp, '', ''); + $this->advance(); + + return $result; + // If it's an error code + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken) or $this->currentToken == '#N/A') { + $result = $this->createTree($this->currentToken, 'ptgErr', ''); + $this->advance(); + + return $result; + // If it's a negative value + } elseif ($this->currentToken == '-') { + // catch "-" Term + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgUminus', $result2, ''); + + return $result; + // If it's a positive value + } elseif ($this->currentToken == '+') { + // catch "+" Term + $this->advance(); + $result2 = $this->expression(); + $result = $this->createTree('ptgUplus', $result2, ''); + + return $result; + } + $result = $this->term(); + while (($this->currentToken == '+') or + ($this->currentToken == '-') or + ($this->currentToken == '^')) { + if ($this->currentToken == '+') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgAdd', $result, $result2); + } elseif ($this->currentToken == '-') { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgSub', $result, $result2); + } else { + $this->advance(); + $result2 = $this->term(); + $result = $this->createTree('ptgPower', $result, $result2); + } + } + + return $result; + } + + /** + * This function just introduces a ptgParen element in the tree, so that Excel + * doesn't get confused when working with a parenthesized formula afterwards. + * + * @see fact() + * + * @return array The parsed ptg'd tree + */ + private function parenthesizedExpression() + { + $result = $this->createTree('ptgParen', $this->expression(), ''); + + return $result; + } + + /** + * It parses a term. It assumes the following rule: + * Term -> Fact [("*" | "/") Fact]. + * + * @return mixed The parsed ptg'd tree on success + */ + private function term() + { + $result = $this->fact(); + while (($this->currentToken == '*') or + ($this->currentToken == '/')) { + if ($this->currentToken == '*') { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgMul', $result, $result2); + } else { + $this->advance(); + $result2 = $this->fact(); + $result = $this->createTree('ptgDiv', $result, $result2); + } + } + + return $result; + } + + /** + * It parses a factor. It assumes the following rule: + * Fact -> ( Expr ) + * | CellRef + * | CellRange + * | Number + * | Function. + * + * @return mixed The parsed ptg'd tree on success + */ + private function fact() + { + if ($this->currentToken === '(') { + $this->advance(); // eat the "(" + $result = $this->parenthesizedExpression(); + if ($this->currentToken !== ')') { + throw new WriterException("')' token expected."); + } + $this->advance(); // eat the ")" + return $result; + } + // if it's a reference + if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $this->currentToken)) { + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $this->currentToken)) { + // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $this->currentToken)) { + // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken) or + preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $this->currentToken)) { + // if it's a range A1:B2 or $A$1:$B$2 + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $this->currentToken)) { + // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $this->currentToken)) { + // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2) + // must be an error? + $result = $this->createTree($this->currentToken, '', ''); + $this->advance(); + + return $result; + } elseif (is_numeric($this->currentToken)) { + // If it's a number or a percent + if ($this->lookAhead === '%') { + $result = $this->createTree('ptgPercent', $this->currentToken, ''); + $this->advance(); // Skip the percentage operator once we've pre-built that tree + } else { + $result = $this->createTree($this->currentToken, '', ''); + } + $this->advance(); + + return $result; + } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/i", $this->currentToken)) { + // if it's a function call + $result = $this->func(); + + return $result; + } + + throw new WriterException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter); + } + + /** + * It parses a function call. It assumes the following rule: + * Func -> ( Expr [,Expr]* ). + * + * @return mixed The parsed ptg'd tree on success + */ + private function func() + { + $num_args = 0; // number of arguments received + $function = strtoupper($this->currentToken); + $result = ''; // initialize result + $this->advance(); + $this->advance(); // eat the "(" + while ($this->currentToken !== ')') { + if ($num_args > 0) { + if ($this->currentToken === ',' || $this->currentToken === ';') { + $this->advance(); // eat the "," or ";" + } else { + throw new WriterException("Syntax error: comma expected in function $function, arg #{$num_args}"); + } + $result2 = $this->condition(); + $result = $this->createTree('arg', $result, $result2); + } else { // first argument + $result2 = $this->condition(); + $result = $this->createTree('arg', '', $result2); + } + ++$num_args; + } + if (!isset($this->functions[$function])) { + throw new WriterException("Function $function() doesn't exist"); + } + $args = $this->functions[$function][1]; + // If fixed number of args eg. TIME($i, $j, $k). Check that the number of args is valid. + if (($args >= 0) and ($args != $num_args)) { + throw new WriterException("Incorrect number of arguments in function $function() "); + } + + $result = $this->createTree($function, $result, $num_args); + $this->advance(); // eat the ")" + return $result; + } + + /** + * Creates a tree. In fact an array which may have one or two arrays (sub-trees) + * as elements. + * + * @param mixed $value the value of this node + * @param mixed $left the left array (sub-tree) or a final node + * @param mixed $right the right array (sub-tree) or a final node + * + * @return array A tree + */ + private function createTree($value, $left, $right) + { + return ['value' => $value, 'left' => $left, 'right' => $right]; + } + + /** + * Builds a string containing the tree in reverse polish notation (What you + * would use in a HP calculator stack). + * The following tree:. + * + * + + * / \ + * 2 3 + * + * produces: "23+" + * + * The following tree: + * + * + + * / \ + * 3 * + * / \ + * 6 A1 + * + * produces: "36A1*+" + * + * In fact all operands, functions, references, etc... are written as ptg's + * + * @param array $tree the optional tree to convert + * + * @return string The tree in reverse polish notation + */ + public function toReversePolish($tree = []) + { + $polish = ''; // the string we are going to return + if (empty($tree)) { // If it's the first call use parseTree + $tree = $this->parseTree; + } + + if (is_array($tree['left'])) { + $converted_tree = $this->toReversePolish($tree['left']); + $polish .= $converted_tree; + } elseif ($tree['left'] != '') { // It's a final node + $converted_tree = $this->convert($tree['left']); + $polish .= $converted_tree; + } + if (is_array($tree['right'])) { + $converted_tree = $this->toReversePolish($tree['right']); + $polish .= $converted_tree; + } elseif ($tree['right'] != '') { // It's a final node + $converted_tree = $this->convert($tree['right']); + $polish .= $converted_tree; + } + // if it's a function convert it here (so we can set it's arguments) + if (preg_match("/^[A-Z0-9\xc0-\xdc\\.]+$/", $tree['value']) and + !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) and + !preg_match('/^[A-Ia-i]?[A-Za-z](\\d+)\\.\\.[A-Ia-i]?[A-Za-z](\\d+)$/', $tree['value']) and + !is_numeric($tree['value']) and + !isset($this->ptg[$tree['value']])) { + // left subtree for a function is always an array. + if ($tree['left'] != '') { + $left_tree = $this->toReversePolish($tree['left']); + } else { + $left_tree = ''; + } + // add it's left subtree and return. + return $left_tree . $this->convertFunction($tree['value'], $tree['right']); + } + $converted_tree = $this->convert($tree['value']); + + $polish .= $converted_tree; + + return $polish; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php new file mode 100755 index 0000000..41c8e64 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -0,0 +1,1150 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Workbook extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * The BIFF file size for the workbook. + * + * @var int + * + * @see calcSheetOffsets() + */ + private $biffSize; + + /** + * XF Writers. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Xf[] + */ + private $xfWriters = []; + + /** + * Array containing the colour palette. + * + * @var array + */ + private $palette; + + /** + * The codepage indicates the text encoding used for strings. + * + * @var int + */ + private $codepage; + + /** + * The country code used for localization. + * + * @var int + */ + private $countryCode; + + /** + * Workbook. + * + * @var Spreadsheet + */ + private $spreadsheet; + + /** + * Fonts writers. + * + * @var Font[] + */ + private $fontWriters = []; + + /** + * Added fonts. Maps from font's hash => index in workbook. + * + * @var array + */ + private $addedFonts = []; + + /** + * Shared number formats. + * + * @var array + */ + private $numberFormats = []; + + /** + * Added number formats. Maps from numberFormat's hash => index in workbook. + * + * @var array + */ + private $addedNumberFormats = []; + + /** + * Sizes of the binary worksheet streams. + * + * @var array + */ + private $worksheetSizes = []; + + /** + * Offsets of the binary worksheet streams relative to the start of the global workbook stream. + * + * @var array + */ + private $worksheetOffsets = []; + + /** + * Total number of shared strings in workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Number of unique shared strings in workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Array of unique shared strings in workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Escher object corresponding to MSODRAWINGGROUP. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Class constructor. + * + * @param Spreadsheet $spreadsheet The Workbook + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array $str_table String Table + * @param array $colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + */ + public function __construct(Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, Parser $parser) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->parser = $parser; + $this->biffSize = 0; + $this->palette = []; + $this->countryCode = -1; + + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->setPaletteXl97(); + + $this->spreadsheet = $spreadsheet; + + $this->codepage = 0x04B0; + + // Add empty sheets and Build color cache + $countSheets = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $countSheets; ++$i) { + $phpSheet = $spreadsheet->getSheet($i); + + $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser + + $supbook_index = 0x00; + $ref = pack('vvv', $supbook_index, $i, $i); + $this->parser->references[] = $ref; // Register reference with parser + + // Sheet tab colors? + if ($phpSheet->isTabColorSet()) { + $this->addColor($phpSheet->getTabColor()->getRGB()); + } + } + } + + /** + * Add a new XF writer. + * + * @param Style $style + * @param bool $isStyleXf Is it a style XF? + * + * @return int Index to XF record + */ + public function addXfWriter(Style $style, $isStyleXf = false) + { + $xfWriter = new Xf($style); + $xfWriter->setIsStyleXf($isStyleXf); + + // Add the font if not already added + $fontIndex = $this->addFont($style->getFont()); + + // Assign the font index to the xf record + $xfWriter->setFontIndex($fontIndex); + + // Background colors, best to treat these after the font so black will come after white in custom palette + $xfWriter->setFgColor($this->addColor($style->getFill()->getStartColor()->getRGB())); + $xfWriter->setBgColor($this->addColor($style->getFill()->getEndColor()->getRGB())); + $xfWriter->setBottomColor($this->addColor($style->getBorders()->getBottom()->getColor()->getRGB())); + $xfWriter->setTopColor($this->addColor($style->getBorders()->getTop()->getColor()->getRGB())); + $xfWriter->setRightColor($this->addColor($style->getBorders()->getRight()->getColor()->getRGB())); + $xfWriter->setLeftColor($this->addColor($style->getBorders()->getLeft()->getColor()->getRGB())); + $xfWriter->setDiagColor($this->addColor($style->getBorders()->getDiagonal()->getColor()->getRGB())); + + // Add the number format if it is not a built-in one and not already added + if ($style->getNumberFormat()->getBuiltInFormatCode() === false) { + $numberFormatHashCode = $style->getNumberFormat()->getHashCode(); + + if (isset($this->addedNumberFormats[$numberFormatHashCode])) { + $numberFormatIndex = $this->addedNumberFormats[$numberFormatHashCode]; + } else { + $numberFormatIndex = 164 + count($this->numberFormats); + $this->numberFormats[$numberFormatIndex] = $style->getNumberFormat(); + $this->addedNumberFormats[$numberFormatHashCode] = $numberFormatIndex; + } + } else { + $numberFormatIndex = (int) $style->getNumberFormat()->getBuiltInFormatCode(); + } + + // Assign the number format index to xf record + $xfWriter->setNumberFormatIndex($numberFormatIndex); + + $this->xfWriters[] = $xfWriter; + + return count($this->xfWriters) - 1; + } + + /** + * Add a font to added fonts. + * + * @param \PhpOffice\PhpSpreadsheet\Style\Font $font + * + * @return int Index to FONT record + */ + public function addFont(\PhpOffice\PhpSpreadsheet\Style\Font $font) + { + $fontHashCode = $font->getHashCode(); + if (isset($this->addedFonts[$fontHashCode])) { + $fontIndex = $this->addedFonts[$fontHashCode]; + } else { + $countFonts = count($this->fontWriters); + $fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1; + + $fontWriter = new Font($font); + $fontWriter->setColorIndex($this->addColor($font->getColor()->getRGB())); + $this->fontWriters[] = $fontWriter; + + $this->addedFonts[$fontHashCode] = $fontIndex; + } + + return $fontIndex; + } + + /** + * Alter color palette adding a custom color. + * + * @param string $rgb E.g. 'FF00AA' + * + * @return int Color index + */ + private function addColor($rgb) + { + if (!isset($this->colors[$rgb])) { + $color = + [ + hexdec(substr($rgb, 0, 2)), + hexdec(substr($rgb, 2, 2)), + hexdec(substr($rgb, 4)), + 0, + ]; + $colorIndex = array_search($color, $this->palette); + if ($colorIndex) { + $this->colors[$rgb] = $colorIndex; + } else { + if (count($this->colors) === 0) { + $lastColor = 7; + } else { + $lastColor = end($this->colors); + } + if ($lastColor < 57) { + // then we add a custom color altering the palette + $colorIndex = $lastColor + 1; + $this->palette[$colorIndex] = $color; + $this->colors[$rgb] = $colorIndex; + } else { + // no room for more custom colors, just map to black + $colorIndex = 0; + } + } + } else { + // fetch already added custom color + $colorIndex = $this->colors[$rgb]; + } + + return $colorIndex; + } + + /** + * Sets the colour palette to the Excel 97+ default. + */ + private function setPaletteXl97() + { + $this->palette = [ + 0x08 => [0x00, 0x00, 0x00, 0x00], + 0x09 => [0xff, 0xff, 0xff, 0x00], + 0x0A => [0xff, 0x00, 0x00, 0x00], + 0x0B => [0x00, 0xff, 0x00, 0x00], + 0x0C => [0x00, 0x00, 0xff, 0x00], + 0x0D => [0xff, 0xff, 0x00, 0x00], + 0x0E => [0xff, 0x00, 0xff, 0x00], + 0x0F => [0x00, 0xff, 0xff, 0x00], + 0x10 => [0x80, 0x00, 0x00, 0x00], + 0x11 => [0x00, 0x80, 0x00, 0x00], + 0x12 => [0x00, 0x00, 0x80, 0x00], + 0x13 => [0x80, 0x80, 0x00, 0x00], + 0x14 => [0x80, 0x00, 0x80, 0x00], + 0x15 => [0x00, 0x80, 0x80, 0x00], + 0x16 => [0xc0, 0xc0, 0xc0, 0x00], + 0x17 => [0x80, 0x80, 0x80, 0x00], + 0x18 => [0x99, 0x99, 0xff, 0x00], + 0x19 => [0x99, 0x33, 0x66, 0x00], + 0x1A => [0xff, 0xff, 0xcc, 0x00], + 0x1B => [0xcc, 0xff, 0xff, 0x00], + 0x1C => [0x66, 0x00, 0x66, 0x00], + 0x1D => [0xff, 0x80, 0x80, 0x00], + 0x1E => [0x00, 0x66, 0xcc, 0x00], + 0x1F => [0xcc, 0xcc, 0xff, 0x00], + 0x20 => [0x00, 0x00, 0x80, 0x00], + 0x21 => [0xff, 0x00, 0xff, 0x00], + 0x22 => [0xff, 0xff, 0x00, 0x00], + 0x23 => [0x00, 0xff, 0xff, 0x00], + 0x24 => [0x80, 0x00, 0x80, 0x00], + 0x25 => [0x80, 0x00, 0x00, 0x00], + 0x26 => [0x00, 0x80, 0x80, 0x00], + 0x27 => [0x00, 0x00, 0xff, 0x00], + 0x28 => [0x00, 0xcc, 0xff, 0x00], + 0x29 => [0xcc, 0xff, 0xff, 0x00], + 0x2A => [0xcc, 0xff, 0xcc, 0x00], + 0x2B => [0xff, 0xff, 0x99, 0x00], + 0x2C => [0x99, 0xcc, 0xff, 0x00], + 0x2D => [0xff, 0x99, 0xcc, 0x00], + 0x2E => [0xcc, 0x99, 0xff, 0x00], + 0x2F => [0xff, 0xcc, 0x99, 0x00], + 0x30 => [0x33, 0x66, 0xff, 0x00], + 0x31 => [0x33, 0xcc, 0xcc, 0x00], + 0x32 => [0x99, 0xcc, 0x00, 0x00], + 0x33 => [0xff, 0xcc, 0x00, 0x00], + 0x34 => [0xff, 0x99, 0x00, 0x00], + 0x35 => [0xff, 0x66, 0x00, 0x00], + 0x36 => [0x66, 0x66, 0x99, 0x00], + 0x37 => [0x96, 0x96, 0x96, 0x00], + 0x38 => [0x00, 0x33, 0x66, 0x00], + 0x39 => [0x33, 0x99, 0x66, 0x00], + 0x3A => [0x00, 0x33, 0x00, 0x00], + 0x3B => [0x33, 0x33, 0x00, 0x00], + 0x3C => [0x99, 0x33, 0x00, 0x00], + 0x3D => [0x99, 0x33, 0x66, 0x00], + 0x3E => [0x33, 0x33, 0x99, 0x00], + 0x3F => [0x33, 0x33, 0x33, 0x00], + ]; + } + + /** + * Assemble worksheets into a workbook and send the BIFF data to an OLE + * storage. + * + * @param array $pWorksheetSizes The sizes in bytes of the binary worksheet streams + * + * @return string Binary data for workbook stream + */ + public function writeWorkbook(array $pWorksheetSizes) + { + $this->worksheetSizes = $pWorksheetSizes; + + // Calculate the number of selected worksheet tabs and call the finalization + // methods for each worksheet + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // Add part 1 of the Workbook globals, what goes before the SHEET records + $this->storeBof(0x0005); + $this->writeCodepage(); + $this->writeWindow1(); + + $this->writeDateMode(); + $this->writeAllFonts(); + $this->writeAllNumberFormats(); + $this->writeAllXfs(); + $this->writeAllStyles(); + $this->writePalette(); + + // Prepare part 3 of the workbook global stream, what goes after the SHEET records + $part3 = ''; + if ($this->countryCode !== -1) { + $part3 .= $this->writeCountry(); + } + $part3 .= $this->writeRecalcId(); + + $part3 .= $this->writeSupbookInternal(); + /* TODO: store external SUPBOOK records and XCT and CRN records + in case of external references for BIFF8 */ + $part3 .= $this->writeExternalsheetBiff8(); + $part3 .= $this->writeAllDefinedNamesBiff8(); + $part3 .= $this->writeMsoDrawingGroup(); + $part3 .= $this->writeSharedStringsTable(); + + $part3 .= $this->writeEof(); + + // Add part 2 of the Workbook globals, the SHEET records + $this->calcSheetOffsets(); + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->writeBoundSheet($this->spreadsheet->getSheet($i), $this->worksheetOffsets[$i]); + } + + // Add part 3 of the Workbook globals + $this->_data .= $part3; + + return $this->_data; + } + + /** + * Calculate offsets for Worksheet BOF records. + */ + private function calcSheetOffsets() + { + $boundsheet_length = 10; // fixed length for a BOUNDSHEET record + + // size of Workbook globals part 1 + 3 + $offset = $this->_datasize; + + // add size of Workbook globals part 2, the length of the SHEET records + $total_worksheets = count($this->spreadsheet->getAllSheets()); + foreach ($this->spreadsheet->getWorksheetIterator() as $sheet) { + $offset += $boundsheet_length + strlen(StringHelper::UTF8toBIFF8UnicodeShort($sheet->getTitle())); + } + + // add the sizes of each of the Sheet substreams, respectively + for ($i = 0; $i < $total_worksheets; ++$i) { + $this->worksheetOffsets[$i] = $offset; + $offset += $this->worksheetSizes[$i]; + } + $this->biffSize = $offset; + } + + /** + * Store the Excel FONT records. + */ + private function writeAllFonts() + { + foreach ($this->fontWriters as $fontWriter) { + $this->append($fontWriter->writeFont()); + } + } + + /** + * Store user defined numerical formats i.e. FORMAT records. + */ + private function writeAllNumberFormats() + { + foreach ($this->numberFormats as $numberFormatIndex => $numberFormat) { + $this->writeNumberFormat($numberFormat->getFormatCode(), $numberFormatIndex); + } + } + + /** + * Write all XF records. + */ + private function writeAllXfs() + { + foreach ($this->xfWriters as $xfWriter) { + $this->append($xfWriter->writeXf()); + } + } + + /** + * Write all STYLE records. + */ + private function writeAllStyles() + { + $this->writeStyle(); + } + + /** + * Writes all the DEFINEDNAME records (BIFF8). + * So far this is only used for repeating rows/columns (print titles) and print areas. + */ + private function writeAllDefinedNamesBiff8() + { + $chunk = ''; + + // Named ranges + if (count($this->spreadsheet->getNamedRanges()) > 0) { + // Loop named ranges + $namedRanges = $this->spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + // Create absolute coordinate + $range = Coordinate::splitRange($namedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteCoordinate($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteCoordinate($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); // e.g. Sheet1!$A$1:$B$2 + + // parse formula + try { + $error = $this->parser->parse($range); + $formulaData = $this->parser->toReversePolish(); + + // make sure tRef3d is of type tRef3dR (0x3A) + if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) { + $formulaData = "\x3A" . substr($formulaData, 1); + } + + if ($namedRange->getLocalOnly()) { + // local scope + $scope = $this->spreadsheet->getIndex($namedRange->getScope()) + 1; + } else { + // global scope + $scope = 0; + } + $chunk .= $this->writeData($this->writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false)); + } catch (PhpSpreadsheetException $e) { + // do nothing + } + } + } + + // total number of sheets + $total_worksheets = $this->spreadsheet->getSheetCount(); + + // write the print titles (repeating rows, columns), if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + // simultaneous repeatColumns repeatRows + if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + + // construct formula data manually + $formulaData = pack('Cv', 0x29, 0x17); // tMemFunc + $formulaData .= pack('Cvvvvv', 0x3B, $i, 0, 65535, $colmin, $colmax); // tArea3d + $formulaData .= pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, 0, 255); // tArea3d + $formulaData .= pack('C', 0x10); // tList + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + + // (exclusive) either repeatColumns or repeatRows + } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { + // Columns to repeat + if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { + $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); + $colmin = Coordinate::columnIndexFromString($repeat[0]) - 1; + $colmax = Coordinate::columnIndexFromString($repeat[1]) - 1; + } else { + $colmin = 0; + $colmax = 255; + } + // Rows to repeat + if ($sheetSetup->isRowsToRepeatAtTopSet()) { + $repeat = $sheetSetup->getRowsToRepeatAtTop(); + $rowmin = $repeat[0] - 1; + $rowmax = $repeat[1] - 1; + } else { + $rowmin = 0; + $rowmax = 65535; + } + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData = pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, $colmin, $colmax); + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); + } + } + + // write the print areas, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetSetup = $this->spreadsheet->getSheet($i)->getPageSetup(); + if ($sheetSetup->isPrintAreaSet()) { + // Print area, e.g. A3:J6,H1:X20 + $printArea = Coordinate::splitRange($sheetSetup->getPrintArea()); + $countPrintArea = count($printArea); + + $formulaData = ''; + for ($j = 0; $j < $countPrintArea; ++$j) { + $printAreaRect = $printArea[$j]; // e.g. A3:J6 + $printAreaRect[0] = Coordinate::coordinateFromString($printAreaRect[0]); + $printAreaRect[1] = Coordinate::coordinateFromString($printAreaRect[1]); + + $print_rowmin = $printAreaRect[0][1] - 1; + $print_rowmax = $printAreaRect[1][1] - 1; + $print_colmin = Coordinate::columnIndexFromString($printAreaRect[0][0]) - 1; + $print_colmax = Coordinate::columnIndexFromString($printAreaRect[1][0]) - 1; + + // construct formula data manually because parser does not recognize absolute 3d cell references + $formulaData .= pack('Cvvvvv', 0x3B, $i, $print_rowmin, $print_rowmax, $print_colmin, $print_colmax); + + if ($j > 0) { + $formulaData .= pack('C', 0x10); // list operator token ',' + } + } + + // store the DEFINEDNAME record + $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x06), $formulaData, $i + 1, true)); + } + } + + // write autofilters, if any + for ($i = 0; $i < $total_worksheets; ++$i) { + $sheetAutoFilter = $this->spreadsheet->getSheet($i)->getAutoFilter(); + $autoFilterRange = $sheetAutoFilter->getRange(); + if (!empty($autoFilterRange)) { + $rangeBounds = Coordinate::rangeBoundaries($autoFilterRange); + + //Autofilter built in name + $name = pack('C', 0x0D); + + $chunk .= $this->writeData($this->writeShortNameBiff8($name, $i + 1, $rangeBounds, true)); + } + } + + return $chunk; + } + + /** + * Write a DEFINEDNAME record for BIFF8 using explicit binary formula data. + * + * @param string $name The name in UTF-8 + * @param string $formulaData The binary formula data + * @param int $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param bool $isBuiltIn Built-in name? + * + * @return string Complete binary record data + */ + private function writeDefinedNameBiff8($name, $formulaData, $sheetIndex = 0, $isBuiltIn = false) + { + $record = 0x0018; + + // option flags + $options = $isBuiltIn ? 0x20 : 0x00; + + // length of the name, character count + $nlen = StringHelper::countCharacters($name); + + // name with stripped length field + $name = substr(StringHelper::UTF8toBIFF8UnicodeLong($name), 2); + + // size of the formula (in bytes) + $sz = strlen($formulaData); + + // combine the parts + $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0) + . $name . $formulaData; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Write a short NAME record. + * + * @param string $name + * @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global + * @param integer[][] $rangeBounds range boundaries + * @param bool $isHidden + * + * @return string Complete binary record data + * */ + private function writeShortNameBiff8($name, $sheetIndex, $rangeBounds, $isHidden = false) + { + $record = 0x0018; + + // option flags + $options = ($isHidden ? 0x21 : 0x00); + + $extra = pack( + 'Cvvvvv', + 0x3B, + $sheetIndex - 1, + $rangeBounds[0][1] - 1, + $rangeBounds[1][1] - 1, + $rangeBounds[0][0] - 1, + $rangeBounds[1][0] - 1 + ); + + // size of the formula (in bytes) + $sz = strlen($extra); + + // combine the parts + $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0) + . $name . $extra; + $length = strlen($data); + + $header = pack('vv', $record, $length); + + return $header . $data; + } + + /** + * Stores the CODEPAGE biff record. + */ + private function writeCodepage() + { + $record = 0x0042; // Record identifier + $length = 0x0002; // Number of bytes to follow + $cv = $this->codepage; // The code page + + $header = pack('vv', $record, $length); + $data = pack('v', $cv); + + $this->append($header . $data); + } + + /** + * Write Excel BIFF WINDOW1 record. + */ + private function writeWindow1() + { + $record = 0x003D; // Record identifier + $length = 0x0012; // Number of bytes to follow + + $xWn = 0x0000; // Horizontal position of window + $yWn = 0x0000; // Vertical position of window + $dxWn = 0x25BC; // Width of window + $dyWn = 0x1572; // Height of window + + $grbit = 0x0038; // Option flags + + // not supported by PhpSpreadsheet, so there is only one selected sheet, the active + $ctabsel = 1; // Number of workbook tabs selected + + $wTabRatio = 0x0258; // Tab to scrollbar ratio + + // not supported by PhpSpreadsheet, set to 0 + $itabFirst = 0; // 1st displayed worksheet + $itabCur = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio); + $this->append($header . $data); + } + + /** + * Writes Excel BIFF BOUNDSHEET record. + * + * @param Worksheet $sheet Worksheet name + * @param int $offset Location of worksheet BOF + */ + private function writeBoundSheet($sheet, $offset) + { + $sheetname = $sheet->getTitle(); + $record = 0x0085; // Record identifier + + // sheet state + switch ($sheet->getSheetState()) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE: + $ss = 0x00; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN: + $ss = 0x01; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN: + $ss = 0x02; + + break; + default: + $ss = 0x00; + + break; + } + + // sheet type + $st = 0x00; + + $grbit = 0x0000; // Visibility and sheet type + + $data = pack('VCC', $offset, $ss, $st); + $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname); + + $length = strlen($data); + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write Internal SUPBOOK record. + */ + private function writeSupbookInternal() + { + $record = 0x01AE; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401); + + return $this->writeData($header . $data); + } + + /** + * Writes the Excel BIFF EXTERNSHEET record. These references are used by + * formulas. + */ + private function writeExternalsheetBiff8() + { + $totalReferences = count($this->parser->references); + $record = 0x0017; // Record identifier + $length = 2 + 6 * $totalReferences; // Number of bytes to follow + + $supbook_index = 0; // FIXME: only using internal SUPBOOK record + $header = pack('vv', $record, $length); + $data = pack('v', $totalReferences); + for ($i = 0; $i < $totalReferences; ++$i) { + $data .= $this->parser->references[$i]; + } + + return $this->writeData($header . $data); + } + + /** + * Write Excel BIFF STYLE records. + */ + private function writeStyle() + { + $record = 0x0293; // Record identifier + $length = 0x0004; // Bytes to follow + + $ixfe = 0x8000; // Index to cell style XF + $BuiltIn = 0x00; // Built-in style + $iLevel = 0xff; // Outline style level + + $header = pack('vv', $record, $length); + $data = pack('vCC', $ixfe, $BuiltIn, $iLevel); + $this->append($header . $data); + } + + /** + * Writes Excel FORMAT record for non "built-in" numerical formats. + * + * @param string $format Custom format string + * @param int $ifmt Format index code + */ + private function writeNumberFormat($format, $ifmt) + { + $record = 0x041E; // Record identifier + + $numberFormatString = StringHelper::UTF8toBIFF8UnicodeLong($format); + $length = 2 + strlen($numberFormatString); // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $ifmt) . $numberFormatString; + $this->append($header . $data); + } + + /** + * Write DATEMODE record to indicate the date system in use (1904 or 1900). + */ + private function writeDateMode() + { + $record = 0x0022; // Record identifier + $length = 0x0002; // Bytes to follow + + $f1904 = (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) + ? 1 + : 0; // Flag for 1904 date system + + $header = pack('vv', $record, $length); + $data = pack('v', $f1904); + $this->append($header . $data); + } + + /** + * Stores the COUNTRY record for localization. + * + * @return string + */ + private function writeCountry() + { + $record = 0x008C; // Record identifier + $length = 4; // Number of bytes to follow + + $header = pack('vv', $record, $length); + // using the same country code always for simplicity + $data = pack('vv', $this->countryCode, $this->countryCode); + + return $this->writeData($header . $data); + } + + /** + * Write the RECALCID record. + * + * @return string + */ + private function writeRecalcId() + { + $record = 0x01C1; // Record identifier + $length = 8; // Number of bytes to follow + + $header = pack('vv', $record, $length); + + // by inspection of real Excel files, MS Office Excel 2007 writes this + $data = pack('VV', 0x000001C1, 0x00001E667); + + return $this->writeData($header . $data); + } + + /** + * Stores the PALETTE biff record. + */ + private function writePalette() + { + $aref = $this->palette; + + $record = 0x0092; // Record identifier + $length = 2 + 4 * count($aref); // Number of bytes to follow + $ccv = count($aref); // Number of RGB values to follow + $data = ''; // The RGB data + + // Pack the RGB data + foreach ($aref as $color) { + foreach ($color as $byte) { + $data .= pack('C', $byte); + } + } + + $header = pack('vvv', $record, $length, $ccv); + $this->append($header . $data); + } + + /** + * Handling of the SST continue blocks is complicated by the need to include an + * additional continuation byte depending on whether the string is split between + * blocks or whether it starts at the beginning of the block. (There are also + * additional complications that will arise later when/if Rich Strings are + * supported). + * + * The Excel documentation says that the SST record should be followed by an + * EXTSST record. The EXTSST record is a hash table that is used to optimise + * access to SST. However, despite the documentation it doesn't seem to be + * required so we will ignore it. + * + * @return string Binary data + */ + private function writeSharedStringsTable() + { + // maximum size of record data (excluding record header) + $continue_limit = 8224; + + // initialize array of record data blocks + $recordDatas = []; + + // start SST record data block with total number of strings, total number of unique strings + $recordData = pack('VV', $this->stringTotal, $this->stringUnique); + + // loop through all (unique) strings in shared strings table + foreach (array_keys($this->stringTable) as $string) { + // here $string is a BIFF8 encoded string + + // length = character count + $headerinfo = unpack('vlength/Cencoding', $string); + + // currently, this is always 1 = uncompressed + $encoding = $headerinfo['encoding']; + + // initialize finished writing current $string + $finished = false; + + while ($finished === false) { + // normally, there will be only one cycle, but if string cannot immediately be written as is + // there will be need for more than one cylcle, if string longer than one record data block, there + // may be need for even more cycles + + if (strlen($recordData) + strlen($string) <= $continue_limit) { + // then we can write the string (or remainder of string) without any problems + $recordData .= $string; + + if (strlen($recordData) + strlen($string) == $continue_limit) { + // we close the record data block, and initialize a new one + $recordDatas[] = $recordData; + $recordData = ''; + } + + // we are finished writing this string + $finished = true; + } else { + // special treatment writing the string (or remainder of the string) + // If the string is very long it may need to be written in more than one CONTINUE record. + + // check how many bytes more there is room for in the current record + $space_remaining = $continue_limit - strlen($recordData); + + // minimum space needed + // uncompressed: 2 byte string length length field + 1 byte option flags + 2 byte character + // compressed: 2 byte string length length field + 1 byte option flags + 1 byte character + $min_space_needed = ($encoding == 1) ? 5 : 4; + + // We have two cases + // 1. space remaining is less than minimum space needed + // here we must waste the space remaining and move to next record data block + // 2. space remaining is greater than or equal to minimum space needed + // here we write as much as we can in the current block, then move to next record data block + + // 1. space remaining is less than minimum space needed + if ($space_remaining < $min_space_needed) { + // we close the block, store the block data + $recordDatas[] = $recordData; + + // and start new record data block where we start writing the string + $recordData = ''; + + // 2. space remaining is greater than or equal to minimum space needed + } else { + // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below + $effective_space_remaining = $space_remaining; + + // for uncompressed strings, sometimes effective space remaining is reduced by 1 + if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) { + --$effective_space_remaining; + } + + // one block fininshed, store the block data + $recordData .= substr($string, 0, $effective_space_remaining); + + $string = substr($string, $effective_space_remaining); // for next cycle in while loop + $recordDatas[] = $recordData; + + // start new record data block with the repeated option flags + $recordData = pack('C', $encoding); + } + } + } + } + + // Store the last record data block unless it is empty + // if there was no need for any continue records, this will be the for SST record data block itself + if (strlen($recordData) > 0) { + $recordDatas[] = $recordData; + } + + // combine into one chunk with all the blocks SST, CONTINUE,... + $chunk = ''; + foreach ($recordDatas as $i => $recordData) { + // first block should have the SST record header, remaing should have CONTINUE header + $record = ($i == 0) ? 0x00FC : 0x003C; + + $header = pack('vv', $record, strlen($recordData)); + $data = $header . $recordData; + + $chunk .= $this->writeData($data); + } + + return $chunk; + } + + /** + * Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records. + */ + private function writeMsoDrawingGroup() + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + + $record = 0x00EB; + $length = strlen($data); + $header = pack('vv', $record, $length); + + return $this->writeData($header . $data); + } + + return ''; + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null) + { + $this->escher = $pValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php new file mode 100755 index 0000000..db63fa3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -0,0 +1,4447 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Worksheet extends BIFFwriter +{ + /** + * Formula parser. + * + * @var \PhpOffice\PhpSpreadsheet\Writer\Xls\Parser + */ + private $parser; + + /** + * Maximum number of characters for a string (LABEL record in BIFF5). + * + * @var int + */ + private $xlsStringMaxLength; + + /** + * Array containing format information for columns. + * + * @var array + */ + private $columnInfo; + + /** + * Array containing the selected area for the worksheet. + * + * @var array + */ + private $selection; + + /** + * The active pane for the worksheet. + * + * @var int + */ + private $activePane; + + /** + * Whether to use outline. + * + * @var int + */ + private $outlineOn; + + /** + * Auto outline styles. + * + * @var bool + */ + private $outlineStyle; + + /** + * Whether to have outline summary below. + * + * @var bool + */ + private $outlineBelow; + + /** + * Whether to have outline summary at the right. + * + * @var bool + */ + private $outlineRight; + + /** + * Reference to the total number of strings in the workbook. + * + * @var int + */ + private $stringTotal; + + /** + * Reference to the number of unique strings in the workbook. + * + * @var int + */ + private $stringUnique; + + /** + * Reference to the array containing all the unique strings in the workbook. + * + * @var array + */ + private $stringTable; + + /** + * Color cache. + */ + private $colors; + + /** + * Index of first used row (at least 0). + * + * @var int + */ + private $firstRowIndex; + + /** + * Index of last used row. (no used rows means -1). + * + * @var int + */ + private $lastRowIndex; + + /** + * Index of first used column (at least 0). + * + * @var int + */ + private $firstColumnIndex; + + /** + * Index of last used column (no used columns means -1). + * + * @var int + */ + private $lastColumnIndex; + + /** + * Sheet object. + * + * @var \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet + */ + public $phpSheet; + + /** + * Count cell style Xfs. + * + * @var int + */ + private $countCellStyleXfs; + + /** + * Escher object corresponding to MSODRAWING. + * + * @var \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + private $escher; + + /** + * Array of font hashes associated to FONT records index. + * + * @var array + */ + public $fontHashIndex; + + /** + * @var bool + */ + private $preCalculateFormulas; + + /** + * @var int + */ + private $printHeaders; + + /** + * Constructor. + * + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array &$str_table String Table + * @param array &$colors Colour Table + * @param Parser $parser The formula parser created for the Workbook + * @param bool $preCalculateFormulas Flag indicating whether formulas should be calculated or just written + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet The worksheet to write + */ + public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, Parser $parser, $preCalculateFormulas, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet) + { + // It needs to call its parent's constructor explicitly + parent::__construct(); + + $this->preCalculateFormulas = $preCalculateFormulas; + $this->stringTotal = &$str_total; + $this->stringUnique = &$str_unique; + $this->stringTable = &$str_table; + $this->colors = &$colors; + $this->parser = $parser; + + $this->phpSheet = $phpSheet; + + $this->xlsStringMaxLength = 255; + $this->columnInfo = []; + $this->selection = [0, 0, 0, 0]; + $this->activePane = 3; + + $this->printHeaders = 0; + + $this->outlineStyle = 0; + $this->outlineBelow = 1; + $this->outlineRight = 1; + $this->outlineOn = 1; + + $this->fontHashIndex = []; + + // calculate values for DIMENSIONS record + $minR = 1; + $minC = 'A'; + + $maxR = $this->phpSheet->getHighestRow(); + $maxC = $this->phpSheet->getHighestColumn(); + + // Determine lowest and highest column and row + $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR; + + $this->firstColumnIndex = Coordinate::columnIndexFromString($minC); + $this->lastColumnIndex = Coordinate::columnIndexFromString($maxC); + +// if ($this->firstColumnIndex > 255) $this->firstColumnIndex = 255; + if ($this->lastColumnIndex > 255) { + $this->lastColumnIndex = 255; + } + + $this->countCellStyleXfs = count($phpSheet->getParent()->getCellStyleXfCollection()); + } + + /** + * Add data to the beginning of the workbook (note the reverse order) + * and to the end of the workbook. + * + * @see \PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook::storeWorkbook() + */ + public function close() + { + $phpSheet = $this->phpSheet; + + // Write BOF record + $this->storeBof(0x0010); + + // Write PRINTHEADERS + $this->writePrintHeaders(); + + // Write PRINTGRIDLINES + $this->writePrintGridlines(); + + // Write GRIDSET + $this->writeGridset(); + + // Calculate column widths + $phpSheet->calculateColumnWidths(); + + // Column dimensions + if (($defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth()) < 0) { + $defaultWidth = \PhpOffice\PhpSpreadsheet\Shared\Font::getDefaultColumnWidthByFont($phpSheet->getParent()->getDefaultStyle()->getFont()); + } + + $columnDimensions = $phpSheet->getColumnDimensions(); + $maxCol = $this->lastColumnIndex - 1; + for ($i = 0; $i <= $maxCol; ++$i) { + $hidden = 0; + $level = 0; + $xfIndex = 15; // there are 15 cell style Xfs + + $width = $defaultWidth; + + $columnLetter = Coordinate::stringFromColumnIndex($i + 1); + if (isset($columnDimensions[$columnLetter])) { + $columnDimension = $columnDimensions[$columnLetter]; + if ($columnDimension->getWidth() >= 0) { + $width = $columnDimension->getWidth(); + } + $hidden = $columnDimension->getVisible() ? 0 : 1; + $level = $columnDimension->getOutlineLevel(); + $xfIndex = $columnDimension->getXfIndex() + 15; // there are 15 cell style Xfs + } + + // Components of columnInfo: + // $firstcol first column on the range + // $lastcol last column on the range + // $width width to set + // $xfIndex The optional cell style Xf index to apply to the columns + // $hidden The optional hidden atribute + // $level The optional outline level + $this->columnInfo[] = [$i, $i, $width, $xfIndex, $hidden, $level]; + } + + // Write GUTS + $this->writeGuts(); + + // Write DEFAULTROWHEIGHT + $this->writeDefaultRowHeight(); + // Write WSBOOL + $this->writeWsbool(); + // Write horizontal and vertical page breaks + $this->writeBreaks(); + // Write page header + $this->writeHeader(); + // Write page footer + $this->writeFooter(); + // Write page horizontal centering + $this->writeHcenter(); + // Write page vertical centering + $this->writeVcenter(); + // Write left margin + $this->writeMarginLeft(); + // Write right margin + $this->writeMarginRight(); + // Write top margin + $this->writeMarginTop(); + // Write bottom margin + $this->writeMarginBottom(); + // Write page setup + $this->writeSetup(); + // Write sheet protection + $this->writeProtect(); + // Write SCENPROTECT + $this->writeScenProtect(); + // Write OBJECTPROTECT + $this->writeObjectProtect(); + // Write sheet password + $this->writePassword(); + // Write DEFCOLWIDTH record + $this->writeDefcol(); + + // Write the COLINFO records if they exist + if (!empty($this->columnInfo)) { + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $this->writeColinfo($this->columnInfo[$i]); + } + } + $autoFilterRange = $phpSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // Write AUTOFILTERINFO + $this->writeAutoFilterInfo(); + } + + // Write sheet dimensions + $this->writeDimensions(); + + // Row dimensions + foreach ($phpSheet->getRowDimensions() as $rowDimension) { + $xfIndex = $rowDimension->getXfIndex() + 15; // there are 15 cellXfs + $this->writeRow($rowDimension->getRowIndex() - 1, $rowDimension->getRowHeight(), $xfIndex, ($rowDimension->getVisible() ? '0' : '1'), $rowDimension->getOutlineLevel()); + } + + // Write Cells + foreach ($phpSheet->getCoordinates() as $coordinate) { + $cell = $phpSheet->getCell($coordinate); + $row = $cell->getRow() - 1; + $column = Coordinate::columnIndexFromString($cell->getColumn()) - 1; + + // Don't break Excel break the code! + if ($row > 65535 || $column > 255) { + throw new WriterException('Rows or columns overflow! Excel5 has limit to 65535 rows and 255 columns. Use XLSX instead.'); + } + + // Write cell value + $xfIndex = $cell->getXfIndex() + 15; // there are 15 cell style Xfs + + $cVal = $cell->getValue(); + if ($cVal instanceof RichText) { + $arrcRun = []; + $str_len = StringHelper::countCharacters($cVal->getPlainText(), 'UTF-8'); + $str_pos = 0; + $elements = $cVal->getRichTextElements(); + foreach ($elements as $element) { + // FONT Index + if ($element instanceof Run) { + $str_fontidx = $this->fontHashIndex[$element->getFont()->getHashCode()]; + } else { + $str_fontidx = 0; + } + $arrcRun[] = ['strlen' => $str_pos, 'fontidx' => $str_fontidx]; + // Position FROM + $str_pos += StringHelper::countCharacters($element->getText(), 'UTF-8'); + } + $this->writeRichTextString($row, $column, $cVal->getPlainText(), $xfIndex, $arrcRun); + } else { + switch ($cell->getDatatype()) { + case DataType::TYPE_STRING: + case DataType::TYPE_NULL: + if ($cVal === '' || $cVal === null) { + $this->writeBlank($row, $column, $xfIndex); + } else { + $this->writeString($row, $column, $cVal, $xfIndex); + } + + break; + case DataType::TYPE_NUMERIC: + $this->writeNumber($row, $column, $cVal, $xfIndex); + + break; + case DataType::TYPE_FORMULA: + $calculatedValue = $this->preCalculateFormulas ? + $cell->getCalculatedValue() : null; + $this->writeFormula($row, $column, $cVal, $xfIndex, $calculatedValue); + + break; + case DataType::TYPE_BOOL: + $this->writeBoolErr($row, $column, $cVal, 0, $xfIndex); + + break; + case DataType::TYPE_ERROR: + $this->writeBoolErr($row, $column, self::mapErrorCode($cVal), 1, $xfIndex); + + break; + } + } + } + + // Append + $this->writeMsoDrawing(); + + // Write WINDOW2 record + $this->writeWindow2(); + + // Write PLV record + $this->writePageLayoutView(); + + // Write ZOOM record + $this->writeZoom(); + if ($phpSheet->getFreezePane()) { + $this->writePanes(); + } + + // Write SELECTION record + $this->writeSelection(); + + // Write MergedCellsTable Record + $this->writeMergedCells(); + + // Hyperlinks + foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { + list($column, $row) = Coordinate::coordinateFromString($coordinate); + + $url = $hyperlink->getUrl(); + + if (strpos($url, 'sheet://') !== false) { + // internal to current workbook + $url = str_replace('sheet://', 'internal:', $url); + } elseif (preg_match('/^(http:|https:|ftp:|mailto:)/', $url)) { + // URL + } else { + // external (local file) + $url = 'external:' . $url; + } + + $this->writeUrl($row - 1, Coordinate::columnIndexFromString($column) - 1, $url); + } + + $this->writeDataValidity(); + $this->writeSheetLayout(); + + // Write SHEETPROTECTION record + $this->writeSheetProtection(); + $this->writeRangeProtection(); + + $arrConditionalStyles = $phpSheet->getConditionalStylesCollection(); + if (!empty($arrConditionalStyles)) { + $arrConditional = []; + // @todo CFRule & CFHeader + // Write CFHEADER record + $this->writeCFHeader(); + // Write ConditionalFormattingTable records + foreach ($arrConditionalStyles as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!isset($arrConditional[$conditional->getHashCode()])) { + // This hash code has been handled + $arrConditional[$conditional->getHashCode()] = true; + + // Write CFRULE record + $this->writeCFRule($conditional); + } + } + } + } + } + + $this->storeEof(); + } + + /** + * Write a cell range address in BIFF8 + * always fixed range + * See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format. + * + * @param string $range E.g. 'A1' or 'A1:B6' + * + * @return string Binary data + */ + private function writeBIFF8CellRangeAddressFixed($range) + { + $explodes = explode(':', $range); + + // extract first cell, e.g. 'A1' + $firstCell = $explodes[0]; + + // extract last cell, e.g. 'B6' + if (count($explodes) == 1) { + $lastCell = $firstCell; + } else { + $lastCell = $explodes[1]; + } + + $firstCellCoordinates = Coordinate::coordinateFromString($firstCell); // e.g. [0, 1] + $lastCellCoordinates = Coordinate::coordinateFromString($lastCell); // e.g. [1, 6] + + return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, Coordinate::columnIndexFromString($firstCellCoordinates[0]) - 1, Coordinate::columnIndexFromString($lastCellCoordinates[0]) - 1); + } + + /** + * Retrieves data from memory in one chunk, or from disk in $buffer + * sized chunks. + * + * @return string The data + */ + public function getData() + { + $buffer = 4096; + + // Return data stored in memory + if (isset($this->_data)) { + $tmp = $this->_data; + unset($this->_data); + + return $tmp; + } + // No data to return + return false; + } + + /** + * Set the option to print the row and column headers on the printed page. + * + * @param int $print Whether to print the headers or not. Defaults to 1 (print). + */ + public function printRowColHeaders($print = 1) + { + $this->printHeaders = $print; + } + + /** + * This method sets the properties for outlining and grouping. The defaults + * correspond to Excel's defaults. + * + * @param bool $visible + * @param bool $symbols_below + * @param bool $symbols_right + * @param bool $auto_style + */ + public function setOutline($visible = true, $symbols_below = true, $symbols_right = true, $auto_style = false) + { + $this->outlineOn = $visible; + $this->outlineBelow = $symbols_below; + $this->outlineRight = $symbols_right; + $this->outlineStyle = $auto_style; + + // Ensure this is a boolean vale for Window2 + if ($this->outlineOn) { + $this->outlineOn = 1; + } + } + + /** + * Write a double to the specified row and column (zero indexed). + * An integer can be written as a double. Excel will display an + * integer. $format is optional. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param float $num The number to write + * @param mixed $xfIndex The optional XF format + * + * @return int + */ + private function writeNumber($row, $col, $num, $xfIndex) + { + $record = 0x0203; // Record identifier + $length = 0x000E; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $xl_double = pack('d', $num); + if (self::getByteOrder()) { // if it's Big Endian + $xl_double = strrev($xl_double); + } + + $this->append($header . $data . $xl_double); + + return 0; + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex Index to XF record + */ + private function writeString($row, $col, $str, $xfIndex) + { + $this->writeLabelSst($row, $col, $str, $xfIndex); + } + + /** + * Write a LABELSST record or a LABEL record. Which one depends on BIFF version + * It differs from writeString by the writing of rich text strings. + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param string $str The string + * @param int $xfIndex The XF format index for the cell + * @param array $arrcRun Index to Font record and characters beginning + */ + private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + $str = StringHelper::UTF8toBIFF8UnicodeShort($str, $arrcRun); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a string to the specified row and column (zero indexed). + * This is the BIFF8 version (no 255 chars limit). + * $format is optional. + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $str The string to write + * @param mixed $xfIndex The XF format index for the cell + */ + private function writeLabelSst($row, $col, $str, $xfIndex) + { + $record = 0x00FD; // Record identifier + $length = 0x000A; // Bytes to follow + + $str = StringHelper::UTF8toBIFF8UnicodeLong($str); + + // check if string is already present + if (!isset($this->stringTable[$str])) { + $this->stringTable[$str] = $this->stringUnique++; + } + ++$this->stringTotal; + + $header = pack('vv', $record, $length); + $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); + $this->append($header . $data); + } + + /** + * Write a blank cell to the specified row and column (zero indexed). + * A blank cell is used to specify formatting without adding a string + * or a number. + * + * A blank cell without a format serves no purpose. Therefore, we don't write + * a BLANK record unless a format is specified. + * + * Returns 0 : normal termination (including no format) + * -1 : insufficient number of arguments + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param mixed $xfIndex The XF format index + * + * @return int + */ + public function writeBlank($row, $col, $xfIndex) + { + $record = 0x0201; // Record identifier + $length = 0x0006; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vvv', $row, $col, $xfIndex); + $this->append($header . $data); + + return 0; + } + + /** + * Write a boolean or an error type to the specified row and column (zero indexed). + * + * @param int $row Row index (0-based) + * @param int $col Column index (0-based) + * @param int $value + * @param bool $isError Error or Boolean? + * @param int $xfIndex + * + * @return int + */ + private function writeBoolErr($row, $col, $value, $isError, $xfIndex) + { + $record = 0x0205; + $length = 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError); + $this->append($header . $data); + + return 0; + } + + /** + * Write a formula to the specified row and column (zero indexed). + * The textual representation of the formula is passed to the parser in + * Parser.php which returns a packed binary string. + * + * Returns 0 : normal termination + * -1 : formula errors (bad formula) + * -2 : row or column out of range + * + * @param int $row Zero indexed row + * @param int $col Zero indexed column + * @param string $formula The formula text string + * @param mixed $xfIndex The XF format index + * @param mixed $calculatedValue Calculated value + * + * @return int + */ + private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue) + { + $record = 0x0006; // Record identifier + + // Initialize possible additional value for STRING record that should be written after the FORMULA record? + $stringValue = null; + + // calculated value + if (isset($calculatedValue)) { + // Since we can't yet get the data type of the calculated value, + // we use best effort to determine data type + if (is_bool($calculatedValue)) { + // Boolean value + $num = pack('CCCvCv', 0x01, 0x00, (int) $calculatedValue, 0x00, 0x00, 0xFFFF); + } elseif (is_int($calculatedValue) || is_float($calculatedValue)) { + // Numeric value + $num = pack('d', $calculatedValue); + } elseif (is_string($calculatedValue)) { + $errorCodes = DataType::getErrorCodes(); + if (isset($errorCodes[$calculatedValue])) { + // Error value + $num = pack('CCCvCv', 0x02, 0x00, self::mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF); + } elseif ($calculatedValue === '') { + // Empty string (and BIFF8) + $num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } else { + // Non-empty string value (or empty string BIFF5) + $stringValue = $calculatedValue; + $num = pack('CCCvCv', 0x00, 0x00, 0x00, 0x00, 0x00, 0xFFFF); + } + } else { + // We are really not supposed to reach here + $num = pack('d', 0x00); + } + } else { + $num = pack('d', 0x00); + } + + $grbit = 0x03; // Option flags + $unknown = 0x0000; // Must be zero + + // Strip the '=' or '@' sign at the beginning of the formula string + if ($formula[0] == '=') { + $formula = substr($formula, 1); + } else { + // Error handling + $this->writeString($row, $col, 'Unrecognised character for formula', 0); + + return -1; + } + + // Parse the formula using the parser in Parser.php + try { + $error = $this->parser->parse($formula); + $formula = $this->parser->toReversePolish(); + + $formlen = strlen($formula); // Length of the binary string + $length = 0x16 + $formlen; // Length of the record data + + $header = pack('vv', $record, $length); + + $data = pack('vvv', $row, $col, $xfIndex) + . $num + . pack('vVv', $grbit, $unknown, $formlen); + $this->append($header . $data . $formula); + + // Append also a STRING record if necessary + if ($stringValue !== null) { + $this->writeStringRecord($stringValue); + } + + return 0; + } catch (PhpSpreadsheetException $e) { + // do nothing + } + } + + /** + * Write a STRING record. This. + * + * @param string $stringValue + */ + private function writeStringRecord($stringValue) + { + $record = 0x0207; // Record identifier + $data = StringHelper::UTF8toBIFF8UnicodeLong($stringValue); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + + /** + * Write a hyperlink. + * This is comprised of two elements: the visible label and + * the invisible link. The visible label is the same as the link unless an + * alternative string is specified. The label is written using the + * writeString() method. Therefore the 255 characters string limit applies. + * $string and $format are optional. + * + * The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external + * directory url. + * + * Returns 0 : normal termination + * -2 : row or column out of range + * -3 : long string truncated to 255 chars + * + * @param int $row Row + * @param int $col Column + * @param string $url URL string + * + * @return int + */ + private function writeUrl($row, $col, $url) + { + // Add start row and col to arg list + return $this->writeUrlRange($row, $col, $row, $col, $url); + } + + /** + * This is the more general form of writeUrl(). It allows a hyperlink to be + * written to a range of cells. This function also decides the type of hyperlink + * to be written. These are either, Web (http, ftp, mailto), Internal + * (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1'). + * + * @see writeUrl() + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + */ + public function writeUrlRange($row1, $col1, $row2, $col2, $url) + { + // Check for internal/external sheet links or default to web link + if (preg_match('[^internal:]', $url)) { + return $this->writeUrlInternal($row1, $col1, $row2, $col2, $url); + } + if (preg_match('[^external:]', $url)) { + return $this->writeUrlExternal($row1, $col1, $row2, $col2, $url); + } + + return $this->writeUrlWeb($row1, $col1, $row2, $col2, $url); + } + + /** + * Used to write http, ftp and mailto hyperlinks. + * The link type ($options) is 0x03 is the same as absolute dir ref without + * sheet. However it is differentiated by the $unknown2 data stream. + * + * @see writeUrl() + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + */ + public function writeUrlWeb($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', 'E0C9EA79F9BACE118C8200AA004BA90B'); + + // Pack the option flags + $options = pack('V', 0x03); + + // Convert URL to a null terminated wchar string + $url = implode("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY)); + $url = $url . "\0\0\0"; + + // Pack the length of the URL + $url_len = pack('V', strlen($url)); + + // Calculate the data length + $length = 0x34 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url); + + return 0; + } + + /** + * Used to write internal reference hyperlinks such as "Sheet1!A1". + * + * @see writeUrl() + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + */ + public function writeUrlInternal($row1, $col1, $row2, $col2, $url) + { + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type + $url = preg_replace('/^internal:/', '', $url); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + + // Pack the option flags + $options = pack('V', 0x08); + + // Convert the URL type and to a null terminated wchar string + $url .= "\0"; + + // character count + $url_len = StringHelper::countCharacters($url); + $url_len = pack('V', $url_len); + + $url = StringHelper::convertEncoding($url, 'UTF-16LE', 'UTF-8'); + + // Calculate the data length + $length = 0x24 + strlen($url); + + // Pack the header data + $header = pack('vv', $record, $length); + $data = pack('vvvv', $row1, $row2, $col1, $col2); + + // Write the packed data + $this->append($header . $data . $unknown1 . $options . $url_len . $url); + + return 0; + } + + /** + * Write links to external directory names such as 'c:\foo.xls', + * c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'. + * + * Note: Excel writes some relative links with the $dir_long string. We ignore + * these cases for the sake of simpler code. + * + * @see writeUrl() + * + * @param int $row1 Start row + * @param int $col1 Start column + * @param int $row2 End row + * @param int $col2 End column + * @param string $url URL string + * + * @return int + */ + public function writeUrlExternal($row1, $col1, $row2, $col2, $url) + { + // Network drives are different. We will handle them separately + // MS/Novell network drives and shares start with \\ + if (preg_match('[^external:\\\\]', $url)) { + return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format)); + } + + $record = 0x01B8; // Record identifier + $length = 0x00000; // Bytes to follow + + // Strip URL type and change Unix dir separator to Dos style (if needed) + // + $url = preg_replace('/^external:/', '', $url); + $url = preg_replace('/\//', '\\', $url); + + // Determine if the link is relative or absolute: + // relative if link contains no dir separator, "somefile.xls" + // relative if link starts with up-dir, "..\..\somefile.xls" + // otherwise, absolute + + $absolute = 0x00; // relative path + if (preg_match('/^[A-Z]:/', $url)) { + $absolute = 0x02; // absolute path on Windows, e.g. C:\... + } + $link_type = 0x01 | $absolute; + + // Determine if the link contains a sheet reference and change some of the + // parameters accordingly. + // Split the dir name and sheet name (if it exists) + $dir_long = $url; + if (preg_match('/\\#/', $url)) { + $link_type |= 0x08; + } + + // Pack the link type + $link_type = pack('V', $link_type); + + // Calculate the up-level dir count e.g.. (..\..\..\ == 3) + $up_count = preg_match_all('/\\.\\.\\\\/', $dir_long, $useless); + $up_count = pack('v', $up_count); + + // Store the short dos dir name (null terminated) + $dir_short = preg_replace('/\\.\\.\\\\/', '', $dir_long) . "\0"; + + // Store the long dir name as a wchar string (non-null terminated) + $dir_long = $dir_long . "\0"; + + // Pack the lengths of the dir strings + $dir_short_len = pack('V', strlen($dir_short)); + $dir_long_len = pack('V', strlen($dir_long)); + $stream_len = pack('V', 0); //strlen($dir_long) + 0x06); + + // Pack the undocumented parts of the hyperlink stream + $unknown1 = pack('H*', 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); + $unknown2 = pack('H*', '0303000000000000C000000000000046'); + $unknown3 = pack('H*', 'FFFFADDE000000000000000000000000000000000000000'); + $unknown4 = pack('v', 0x03); + + // Pack the main data stream + $data = pack('vvvv', $row1, $row2, $col1, $col2) . + $unknown1 . + $link_type . + $unknown2 . + $up_count . + $dir_short_len . + $dir_short . + $unknown3 . + $stream_len; /*. + $dir_long_len . + $unknown4 . + $dir_long . + $sheet_len . + $sheet ;*/ + + // Pack the header data + $length = strlen($data); + $header = pack('vv', $record, $length); + + // Write the packed data + $this->append($header . $data); + + return 0; + } + + /** + * This method is used to set the height and format for a row. + * + * @param int $row The row to set + * @param int $height Height we are giving to the row. + * Use null to set XF without setting height + * @param int $xfIndex The optional cell style Xf index to apply to the columns + * @param bool $hidden The optional hidden attribute + * @param int $level The optional outline level for row, in range [0,7] + */ + private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0) + { + $record = 0x0208; // Record identifier + $length = 0x0010; // Number of bytes to follow + + $colMic = 0x0000; // First defined column + $colMac = 0x0000; // Last defined column + $irwMac = 0x0000; // Used by Excel to optimise loading + $reserved = 0x0000; // Reserved + $grbit = 0x0000; // Option flags + $ixfe = $xfIndex; + + if ($height < 0) { + $height = null; + } + + // Use writeRow($row, null, $XF) to set XF format without setting height + if ($height != null) { + $miyRw = $height * 20; // row height + } else { + $miyRw = 0xff; // default row height is 256 + } + + // Set the options flags. fUnsynced is used to show that the font and row + // heights are not compatible. This is usually the case for WriteExcel. + // The collapsed flag 0x10 doesn't seem to be used to indicate that a row + // is collapsed. Instead it is used to indicate that the previous row is + // collapsed. The zero height flag, 0x20, is used to collapse a row. + + $grbit |= $level; + if ($hidden) { + $grbit |= 0x0030; + } + if ($height !== null) { + $grbit |= 0x0040; // fUnsynced + } + if ($xfIndex !== 0xF) { + $grbit |= 0x0080; + } + $grbit |= 0x0100; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe); + $this->append($header . $data); + } + + /** + * Writes Excel DIMENSIONS to define the area in which there is data. + */ + private function writeDimensions() + { + $record = 0x0200; // Record identifier + + $length = 0x000E; + $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved + + $header = pack('vv', $record, $length); + $this->append($header . $data); + } + + /** + * Write BIFF record Window2. + */ + private function writeWindow2() + { + $record = 0x023E; // Record identifier + $length = 0x0012; + + $grbit = 0x00B6; // Option flags + $rwTop = 0x0000; // Top row visible in window + $colLeft = 0x0000; // Leftmost column visible in window + + // The options flags that comprise $grbit + $fDspFmla = 0; // 0 - bit + $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1 + $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2 + $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 + $fDspZeros = 1; // 4 + $fDefaultHdr = 1; // 5 + $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6 + $fDspGuts = $this->outlineOn; // 7 + $fFrozenNoSplit = 0; // 0 - bit + // no support in PhpSpreadsheet for selected sheet, therefore sheet is only selected if it is the active sheet + $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0; + $fPaged = 1; // 2 + $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW; + + $grbit = $fDspFmla; + $grbit |= $fDspGrid << 1; + $grbit |= $fDspRwCol << 2; + $grbit |= $fFrozen << 3; + $grbit |= $fDspZeros << 4; + $grbit |= $fDefaultHdr << 5; + $grbit |= $fArabic << 6; + $grbit |= $fDspGuts << 7; + $grbit |= $fFrozenNoSplit << 8; + $grbit |= $fSelected << 9; + $grbit |= $fPaged << 10; + $grbit |= $fPageBreakPreview << 11; + + $header = pack('vv', $record, $length); + $data = pack('vvv', $grbit, $rwTop, $colLeft); + + // FIXME !!! + $rgbHdr = 0x0040; // Row/column heading and gridline color index + $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000); + $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal(); + + $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); + + $this->append($header . $data); + } + + /** + * Write BIFF record DEFAULTROWHEIGHT. + */ + private function writeDefaultRowHeight() + { + $defaultRowHeight = $this->phpSheet->getDefaultRowDimension()->getRowHeight(); + + if ($defaultRowHeight < 0) { + return; + } + + // convert to twips + $defaultRowHeight = (int) 20 * $defaultRowHeight; + + $record = 0x0225; // Record identifier + $length = 0x0004; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', 1, $defaultRowHeight); + $this->append($header . $data); + } + + /** + * Write BIFF record DEFCOLWIDTH if COLINFO records are in use. + */ + private function writeDefcol() + { + $defaultColWidth = 8; + + $record = 0x0055; // Record identifier + $length = 0x0002; // Number of bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $defaultColWidth); + $this->append($header . $data); + } + + /** + * Write BIFF record COLINFO to define column widths. + * + * Note: The SDK says the record length is 0x0B but Excel writes a 0x0C + * length record. + * + * @param array $col_array This is the only parameter received and is composed of the following: + * 0 => First formatted column, + * 1 => Last formatted column, + * 2 => Col width (8.43 is Excel default), + * 3 => The optional XF format of the column, + * 4 => Option flags. + * 5 => Optional outline level + */ + private function writeColinfo($col_array) + { + if (isset($col_array[0])) { + $colFirst = $col_array[0]; + } + if (isset($col_array[1])) { + $colLast = $col_array[1]; + } + if (isset($col_array[2])) { + $coldx = $col_array[2]; + } else { + $coldx = 8.43; + } + if (isset($col_array[3])) { + $xfIndex = $col_array[3]; + } else { + $xfIndex = 15; + } + if (isset($col_array[4])) { + $grbit = $col_array[4]; + } else { + $grbit = 0; + } + if (isset($col_array[5])) { + $level = $col_array[5]; + } else { + $level = 0; + } + $record = 0x007D; // Record identifier + $length = 0x000C; // Number of bytes to follow + + $coldx *= 256; // Convert to units of 1/256 of a char + + $ixfe = $xfIndex; + $reserved = 0x0000; // Reserved + + $level = max(0, min($level, 7)); + $grbit |= $level << 8; + + $header = pack('vv', $record, $length); + $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved); + $this->append($header . $data); + } + + /** + * Write BIFF record SELECTION. + */ + private function writeSelection() + { + // look up the selected cell range + $selectedCells = Coordinate::splitRange($this->phpSheet->getSelectedCells()); + $selectedCells = $selectedCells[0]; + if (count($selectedCells) == 2) { + list($first, $last) = $selectedCells; + } else { + $first = $selectedCells[0]; + $last = $selectedCells[0]; + } + + list($colFirst, $rwFirst) = Coordinate::coordinateFromString($first); + $colFirst = Coordinate::columnIndexFromString($colFirst) - 1; // base 0 column index + --$rwFirst; // base 0 row index + + list($colLast, $rwLast) = Coordinate::coordinateFromString($last); + $colLast = Coordinate::columnIndexFromString($colLast) - 1; // base 0 column index + --$rwLast; // base 0 row index + + // make sure we are not out of bounds + $colFirst = min($colFirst, 255); + $colLast = min($colLast, 255); + + $rwFirst = min($rwFirst, 65535); + $rwLast = min($rwLast, 65535); + + $record = 0x001D; // Record identifier + $length = 0x000F; // Number of bytes to follow + + $pnn = $this->activePane; // Pane position + $rwAct = $rwFirst; // Active row + $colAct = $colFirst; // Active column + $irefAct = 0; // Active cell ref + $cref = 1; // Number of refs + + if (!isset($rwLast)) { + $rwLast = $rwFirst; // Last row in reference + } + if (!isset($colLast)) { + $colLast = $colFirst; // Last col in reference + } + + // Swap last row/col for first row/col as necessary + if ($rwFirst > $rwLast) { + list($rwFirst, $rwLast) = [$rwLast, $rwFirst]; + } + + if ($colFirst > $colLast) { + list($colFirst, $colLast) = [$colLast, $colFirst]; + } + + $header = pack('vv', $record, $length); + $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast); + $this->append($header . $data); + } + + /** + * Store the MERGEDCELLS records for all ranges of merged cells. + */ + private function writeMergedCells() + { + $mergeCells = $this->phpSheet->getMergeCells(); + $countMergeCells = count($mergeCells); + + if ($countMergeCells == 0) { + return; + } + + // maximum allowed number of merged cells per record + $maxCountMergeCellsPerRecord = 1027; + + // record identifier + $record = 0x00E5; + + // counter for total number of merged cells treated so far by the writer + $i = 0; + + // counter for number of merged cells written in record currently being written + $j = 0; + + // initialize record data + $recordData = ''; + + // loop through the merged cells + foreach ($mergeCells as $mergeCell) { + ++$i; + ++$j; + + // extract the row and column indexes + $range = Coordinate::splitRange($mergeCell); + list($first, $last) = $range[0]; + list($firstColumn, $firstRow) = Coordinate::coordinateFromString($first); + list($lastColumn, $lastRow) = Coordinate::coordinateFromString($last); + + $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, Coordinate::columnIndexFromString($firstColumn) - 1, Coordinate::columnIndexFromString($lastColumn) - 1); + + // flush record if we have reached limit for number of merged cells, or reached final merged cell + if ($j == $maxCountMergeCellsPerRecord or $i == $countMergeCells) { + $recordData = pack('v', $j) . $recordData; + $length = strlen($recordData); + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + + // initialize for next record, if any + $recordData = ''; + $j = 0; + } + } + } + + /** + * Write SHEETLAYOUT record. + */ + private function writeSheetLayout() + { + if (!$this->phpSheet->isTabColorSet()) { + return; + } + + $recordData = pack( + 'vvVVVvv', + 0x0862, + 0x0000, // unused + 0x00000000, // unused + 0x00000000, // unused + 0x00000014, // size of record data + $this->colors[$this->phpSheet->getTabColor()->getRGB()], // color index + 0x0000 // unused + ); + + $length = strlen($recordData); + + $record = 0x0862; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + + /** + * Write SHEETPROTECTION. + */ + private function writeSheetProtection() + { + // record identifier + $record = 0x0867; + + // prepare options + $options = (int) !$this->phpSheet->getProtection()->getObjects() + | (int) !$this->phpSheet->getProtection()->getScenarios() << 1 + | (int) !$this->phpSheet->getProtection()->getFormatCells() << 2 + | (int) !$this->phpSheet->getProtection()->getFormatColumns() << 3 + | (int) !$this->phpSheet->getProtection()->getFormatRows() << 4 + | (int) !$this->phpSheet->getProtection()->getInsertColumns() << 5 + | (int) !$this->phpSheet->getProtection()->getInsertRows() << 6 + | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks() << 7 + | (int) !$this->phpSheet->getProtection()->getDeleteColumns() << 8 + | (int) !$this->phpSheet->getProtection()->getDeleteRows() << 9 + | (int) !$this->phpSheet->getProtection()->getSelectLockedCells() << 10 + | (int) !$this->phpSheet->getProtection()->getSort() << 11 + | (int) !$this->phpSheet->getProtection()->getAutoFilter() << 12 + | (int) !$this->phpSheet->getProtection()->getPivotTables() << 13 + | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14; + + // record data + $recordData = pack( + 'vVVCVVvv', + 0x0867, // repeated record identifier + 0x0000, // not used + 0x0000, // not used + 0x00, // not used + 0x01000200, // unknown data + 0xFFFFFFFF, // unknown data + $options, // options + 0x0000 // not used + ); + + $length = strlen($recordData); + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Write BIFF record RANGEPROTECTION. + * + * Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records + * Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records + */ + private function writeRangeProtection() + { + foreach ($this->phpSheet->getProtectedCells() as $range => $password) { + // number of ranges, e.g. 'A1:B3 C20:D25' + $cellRanges = explode(' ', $range); + $cref = count($cellRanges); + + $recordData = pack( + 'vvVVvCVvVv', + 0x0868, + 0x00, + 0x0000, + 0x0000, + 0x02, + 0x0, + 0x0000, + $cref, + 0x0000, + 0x00 + ); + + foreach ($cellRanges as $cellRange) { + $recordData .= $this->writeBIFF8CellRangeAddressFixed($cellRange); + } + + // the rgbFeat structure + $recordData .= pack( + 'VV', + 0x0000, + hexdec($password) + ); + + $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData)); + + $length = strlen($recordData); + + $record = 0x0868; // Record identifier + $header = pack('vv', $record, $length); + $this->append($header . $recordData); + } + } + + /** + * Writes the Excel BIFF PANE record. + * The panes can either be frozen or thawed (unfrozen). + * Frozen panes are specified in terms of an integer number of rows and columns. + * Thawed panes are specified in terms of Excel's units for rows and columns. + */ + private function writePanes() + { + $panes = []; + if ($this->phpSheet->getFreezePane()) { + list($column, $row) = Coordinate::coordinateFromString($this->phpSheet->getFreezePane()); + $panes[0] = Coordinate::columnIndexFromString($column) - 1; + $panes[1] = $row - 1; + + list($leftMostColumn, $topRow) = Coordinate::coordinateFromString($this->phpSheet->getTopLeftCell()); + //Coordinates are zero-based in xls files + $panes[2] = $topRow - 1; + $panes[3] = Coordinate::columnIndexFromString($leftMostColumn) - 1; + } else { + // thaw panes + return; + } + + $x = isset($panes[0]) ? $panes[0] : null; + $y = isset($panes[1]) ? $panes[1] : null; + $rwTop = isset($panes[2]) ? $panes[2] : null; + $colLeft = isset($panes[3]) ? $panes[3] : null; + if (count($panes) > 4) { // if Active pane was received + $pnnAct = $panes[4]; + } else { + $pnnAct = null; + } + $record = 0x0041; // Record identifier + $length = 0x000A; // Number of bytes to follow + + // Code specific to frozen or thawed panes. + if ($this->phpSheet->getFreezePane()) { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = $y; + } + if (!isset($colLeft)) { + $colLeft = $x; + } + } else { + // Set default values for $rwTop and $colLeft + if (!isset($rwTop)) { + $rwTop = 0; + } + if (!isset($colLeft)) { + $colLeft = 0; + } + + // Convert Excel's row and column units to the internal units. + // The default row height is 12.75 + // The default column width is 8.43 + // The following slope and intersection values were interpolated. + // + $y = 20 * $y + 255; + $x = 113.879 * $x + 390; + } + + // Determine which pane should be active. There is also the undocumented + // option to override this should it be necessary: may be removed later. + // + if (!isset($pnnAct)) { + if ($x != 0 && $y != 0) { + $pnnAct = 0; // Bottom right + } + if ($x != 0 && $y == 0) { + $pnnAct = 1; // Top right + } + if ($x == 0 && $y != 0) { + $pnnAct = 2; // Bottom left + } + if ($x == 0 && $y == 0) { + $pnnAct = 3; // Top left + } + } + + $this->activePane = $pnnAct; // Used in writeSelection + + $header = pack('vv', $record, $length); + $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct); + $this->append($header . $data); + } + + /** + * Store the page setup SETUP BIFF record. + */ + private function writeSetup() + { + $record = 0x00A1; // Record identifier + $length = 0x0022; // Number of bytes to follow + + $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size + + $iScale = $this->phpSheet->getPageSetup()->getScale() ? + $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor + + $iPageStart = 0x01; // Starting page number + $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide + $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high + $grbit = 0x00; // Option flags + $iRes = 0x0258; // Print resolution + $iVRes = 0x0258; // Vertical print resolution + + $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin + + $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin + $iCopies = 0x01; // Number of copies + + $fLeftToRight = 0x0; // Print over then down + + // Page orientation + $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PageSetup::ORIENTATION_LANDSCAPE) ? + 0x0 : 0x1; + + $fNoPls = 0x0; // Setup not read from printer + $fNoColor = 0x0; // Print black and white + $fDraft = 0x0; // Print draft quality + $fNotes = 0x0; // Print notes + $fNoOrient = 0x0; // Orientation not set + $fUsePage = 0x0; // Use custom starting page + + $grbit = $fLeftToRight; + $grbit |= $fLandscape << 1; + $grbit |= $fNoPls << 2; + $grbit |= $fNoColor << 3; + $grbit |= $fDraft << 4; + $grbit |= $fNotes << 5; + $grbit |= $fNoOrient << 6; + $grbit |= $fUsePage << 7; + + $numHdr = pack('d', $numHdr); + $numFtr = pack('d', $numFtr); + if (self::getByteOrder()) { // if it's Big Endian + $numHdr = strrev($numHdr); + $numFtr = strrev($numFtr); + } + + $header = pack('vv', $record, $length); + $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes); + $data2 = $numHdr . $numFtr; + $data3 = pack('v', $iCopies); + $this->append($header . $data1 . $data2 . $data3); + } + + /** + * Store the header caption BIFF record. + */ + private function writeHeader() + { + $record = 0x0014; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the footer caption BIFF record. + */ + private function writeFooter() + { + $record = 0x0015; // Record identifier + + /* removing for now + // need to fix character count (multibyte!) + if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { + $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); + } else { + $str = ''; + } + */ + + $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); + $length = strlen($recordData); + + $header = pack('vv', $record, $length); + + $this->append($header . $recordData); + } + + /** + * Store the horizontal centering HCENTER BIFF record. + */ + private function writeHcenter() + { + $record = 0x0083; // Record identifier + $length = 0x0002; // Bytes to follow + + $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fHCenter); + + $this->append($header . $data); + } + + /** + * Store the vertical centering VCENTER BIFF record. + */ + private function writeVcenter() + { + $record = 0x0084; // Record identifier + $length = 0x0002; // Bytes to follow + + $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering + + $header = pack('vv', $record, $length); + $data = pack('v', $fVCenter); + $this->append($header . $data); + } + + /** + * Store the LEFTMARGIN BIFF record. + */ + private function writeMarginLeft() + { + $record = 0x0026; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the RIGHTMARGIN BIFF record. + */ + private function writeMarginRight() + { + $record = 0x0027; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the TOPMARGIN BIFF record. + */ + private function writeMarginTop() + { + $record = 0x0028; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Store the BOTTOMMARGIN BIFF record. + */ + private function writeMarginBottom() + { + $record = 0x0029; // Record identifier + $length = 0x0008; // Bytes to follow + + $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches + + $header = pack('vv', $record, $length); + $data = pack('d', $margin); + if (self::getByteOrder()) { // if it's Big Endian + $data = strrev($data); + } + + $this->append($header . $data); + } + + /** + * Write the PRINTHEADERS BIFF record. + */ + private function writePrintHeaders() + { + $record = 0x002a; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintRwCol = $this->printHeaders; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintRwCol); + $this->append($header . $data); + } + + /** + * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the + * GRIDSET record. + */ + private function writePrintGridlines() + { + $record = 0x002b; // Record identifier + $length = 0x0002; // Bytes to follow + + $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fPrintGrid); + $this->append($header . $data); + } + + /** + * Write the GRIDSET BIFF record. Must be used in conjunction with the + * PRINTGRIDLINES record. + */ + private function writeGridset() + { + $record = 0x0082; // Record identifier + $length = 0x0002; // Bytes to follow + + $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag + + $header = pack('vv', $record, $length); + $data = pack('v', $fGridSet); + $this->append($header . $data); + } + + /** + * Write the AUTOFILTERINFO BIFF record. This is used to configure the number of autofilter select used in the sheet. + */ + private function writeAutoFilterInfo() + { + $record = 0x009D; // Record identifier + $length = 0x0002; // Bytes to follow + + $rangeBounds = Coordinate::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange()); + $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0]; + + $header = pack('vv', $record, $length); + $data = pack('v', $iNumFilters); + $this->append($header . $data); + } + + /** + * Write the GUTS BIFF record. This is used to configure the gutter margins + * where Excel outline symbols are displayed. The visibility of the gutters is + * controlled by a flag in WSBOOL. + * + * @see writeWsbool() + */ + private function writeGuts() + { + $record = 0x0080; // Record identifier + $length = 0x0008; // Bytes to follow + + $dxRwGut = 0x0000; // Size of row gutter + $dxColGut = 0x0000; // Size of col gutter + + // determine maximum row outline level + $maxRowOutlineLevel = 0; + foreach ($this->phpSheet->getRowDimensions() as $rowDimension) { + $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel()); + } + + $col_level = 0; + + // Calculate the maximum column outline level. The equivalent calculation + // for the row outline level is carried out in writeRow(). + $colcount = count($this->columnInfo); + for ($i = 0; $i < $colcount; ++$i) { + $col_level = max($this->columnInfo[$i][5], $col_level); + } + + // Set the limits for the outline levels (0 <= x <= 7). + $col_level = max(0, min($col_level, 7)); + + // The displayed level is one greater than the max outline levels + if ($maxRowOutlineLevel) { + ++$maxRowOutlineLevel; + } + if ($col_level) { + ++$col_level; + } + + $header = pack('vv', $record, $length); + $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level); + + $this->append($header . $data); + } + + /** + * Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction + * with the SETUP record. + */ + private function writeWsbool() + { + $record = 0x0081; // Record identifier + $length = 0x0002; // Bytes to follow + $grbit = 0x0000; + + // The only option that is of interest is the flag for fit to page. So we + // set all the options in one go. + // + // Set the option flags + $grbit |= 0x0001; // Auto page breaks visible + if ($this->outlineStyle) { + $grbit |= 0x0020; // Auto outline styles + } + if ($this->phpSheet->getShowSummaryBelow()) { + $grbit |= 0x0040; // Outline summary below + } + if ($this->phpSheet->getShowSummaryRight()) { + $grbit |= 0x0080; // Outline summary right + } + if ($this->phpSheet->getPageSetup()->getFitToPage()) { + $grbit |= 0x0100; // Page setup fit to page + } + if ($this->outlineOn) { + $grbit |= 0x0400; // Outline symbols displayed + } + + $header = pack('vv', $record, $length); + $data = pack('v', $grbit); + $this->append($header . $data); + } + + /** + * Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records. + */ + private function writeBreaks() + { + // initialize + $vbreaks = []; + $hbreaks = []; + + foreach ($this->phpSheet->getBreaks() as $cell => $breakType) { + // Fetch coordinates + $coordinates = Coordinate::coordinateFromString($cell); + + // Decide what to do by the type of break + switch ($breakType) { + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_COLUMN: + // Add to list of vertical breaks + $vbreaks[] = Coordinate::columnIndexFromString($coordinates[0]) - 1; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_ROW: + // Add to list of horizontal breaks + $hbreaks[] = $coordinates[1]; + + break; + case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::BREAK_NONE: + default: + // Nothing to do + break; + } + } + + //horizontal page breaks + if (!empty($hbreaks)) { + // Sort and filter array of page breaks + sort($hbreaks, SORT_NUMERIC); + if ($hbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($hbreaks); + } + + $record = 0x001b; // Record identifier + $cbrk = count($hbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($hbreaks as $hbreak) { + $data .= pack('vvv', $hbreak, 0x0000, 0x00ff); + } + + $this->append($header . $data); + } + + // vertical page breaks + if (!empty($vbreaks)) { + // 1000 vertical pagebreaks appears to be an internal Excel 5 limit. + // It is slightly higher in Excel 97/200, approx. 1026 + $vbreaks = array_slice($vbreaks, 0, 1000); + + // Sort and filter array of page breaks + sort($vbreaks, SORT_NUMERIC); + if ($vbreaks[0] == 0) { // don't use first break if it's 0 + array_shift($vbreaks); + } + + $record = 0x001a; // Record identifier + $cbrk = count($vbreaks); // Number of page breaks + $length = 2 + 6 * $cbrk; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', $cbrk); + + // Append each page break + foreach ($vbreaks as $vbreak) { + $data .= pack('vvv', $vbreak, 0x0000, 0xffff); + } + + $this->append($header . $data); + } + } + + /** + * Set the Biff PROTECT record to indicate that the worksheet is protected. + */ + private function writeProtect() + { + // Exit unless sheet protection has been specified + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + $record = 0x0012; // Record identifier + $length = 0x0002; // Bytes to follow + + $fLock = 1; // Worksheet is protected + + $header = pack('vv', $record, $length); + $data = pack('v', $fLock); + + $this->append($header . $data); + } + + /** + * Write SCENPROTECT. + */ + private function writeScenProtect() + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if scenarios are not protected + if (!$this->phpSheet->getProtection()->getScenarios()) { + return; + } + + $record = 0x00DD; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write OBJECTPROTECT. + */ + private function writeObjectProtect() + { + // Exit if sheet protection is not active + if (!$this->phpSheet->getProtection()->getSheet()) { + return; + } + + // Exit if objects are not protected + if (!$this->phpSheet->getProtection()->getObjects()) { + return; + } + + $record = 0x0063; // Record identifier + $length = 0x0002; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('v', 1); + + $this->append($header . $data); + } + + /** + * Write the worksheet PASSWORD record. + */ + private function writePassword() + { + // Exit unless sheet protection and password have been specified + if (!$this->phpSheet->getProtection()->getSheet() || !$this->phpSheet->getProtection()->getPassword()) { + return; + } + + $record = 0x0013; // Record identifier + $length = 0x0002; // Bytes to follow + + $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password + + $header = pack('vv', $record, $length); + $data = pack('v', $wPassword); + + $this->append($header . $data); + } + + /** + * Insert a 24bit bitmap image in a worksheet. + * + * @param int $row The row we are going to insert the bitmap into + * @param int $col The column we are going to insert the bitmap into + * @param mixed $bitmap The bitmap filename or GD-image resource + * @param int $x the horizontal position (offset) of the image inside the cell + * @param int $y the vertical position (offset) of the image inside the cell + * @param float $scale_x The horizontal scale + * @param float $scale_y The vertical scale + */ + public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1) + { + $bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap)); + list($width, $height, $size, $data) = $bitmap_array; + + // Scale the frame of the image. + $width *= $scale_x; + $height *= $scale_y; + + // Calculate the vertices of the image and write the OBJ record + $this->positionImage($col, $row, $x, $y, $width, $height); + + // Write the IMDATA record to store the bitmap data + $record = 0x007f; + $length = 8 + $size; + $cf = 0x09; + $env = 0x01; + $lcb = $size; + + $header = pack('vvvvV', $record, $length, $cf, $env, $lcb); + $this->append($header . $data); + } + + /** + * Calculate the vertices that define the position of the image as required by + * the OBJ record. + * + * +------------+------------+ + * | A | B | + * +-----+------------+------------+ + * | |(x1,y1) | | + * | 1 |(A1)._______|______ | + * | | | | | + * | | | | | + * +-----+----| BITMAP |-----+ + * | | | | | + * | 2 | |______________. | + * | | | (B2)| + * | | | (x2,y2)| + * +---- +------------+------------+ + * + * Example of a bitmap that covers some of the area from cell A1 to cell B2. + * + * Based on the width and height of the bitmap we need to calculate 8 vars: + * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. + * The width and height of the cells are also variable and have to be taken into + * account. + * The values of $col_start and $row_start are passed in from the calling + * function. The values of $col_end and $row_end are calculated by subtracting + * the width and height of the bitmap from the width and height of the + * underlying cells. + * The vertices are expressed as a percentage of the underlying cell width as + * follows (rhs values are in pixels): + * + * x1 = X / W *1024 + * y1 = Y / H *256 + * x2 = (X-1) / W *1024 + * y2 = (Y-1) / H *256 + * + * Where: X is distance from the left side of the underlying cell + * Y is distance from the top of the underlying cell + * W is the width of the cell + * H is the height of the cell + * The SDK incorrectly states that the height should be expressed as a + * percentage of 1024. + * + * @param int $col_start Col containing upper left corner of object + * @param int $row_start Row containing top left corner of object + * @param int $x1 Distance to left side of object + * @param int $y1 Distance to top of object + * @param int $width Width of image frame + * @param int $height Height of image frame + */ + public function positionImage($col_start, $row_start, $x1, $y1, $width, $height) + { + // Initialise end cell to the same as the start cell + $col_end = $col_start; // Col containing lower right corner of object + $row_end = $row_start; // Row containing bottom right corner of object + + // Zero the specified offset if greater than the cell dimensions + if ($x1 >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1))) { + $x1 = 0; + } + if ($y1 >= Xls::sizeRow($this->phpSheet, $row_start + 1)) { + $y1 = 0; + } + + $width = $width + $x1 - 1; + $height = $height + $y1 - 1; + + // Subtract the underlying cell widths to find the end cell of the image + while ($width >= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1))) { + $width -= Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)); + ++$col_end; + } + + // Subtract the underlying cell heights to find the end cell of the image + while ($height >= Xls::sizeRow($this->phpSheet, $row_end + 1)) { + $height -= Xls::sizeRow($this->phpSheet, $row_end + 1); + ++$row_end; + } + + // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell + // with zero eight or width. + // + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) == 0) { + return; + } + if (Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_start + 1) == 0) { + return; + } + if (Xls::sizeRow($this->phpSheet, $row_end + 1) == 0) { + return; + } + + // Convert the pixel values to the percentage value expected by Excel + $x1 = $x1 / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_start + 1)) * 1024; + $y1 = $y1 / Xls::sizeRow($this->phpSheet, $row_start + 1) * 256; + $x2 = $width / Xls::sizeCol($this->phpSheet, Coordinate::stringFromColumnIndex($col_end + 1)) * 1024; // Distance to right side of object + $y2 = $height / Xls::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object + + $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2); + } + + /** + * Store the OBJ record that precedes an IMDATA record. This could be generalise + * to support other Excel objects. + * + * @param int $colL Column containing upper left corner of object + * @param int $dxL Distance from left side of cell + * @param int $rwT Row containing top left corner of object + * @param int $dyT Distance from top of cell + * @param int $colR Column containing lower right corner of object + * @param int $dxR Distance from right of cell + * @param int $rwB Row containing bottom right corner of object + * @param int $dyB Distance from bottom of cell + */ + private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB) + { + $record = 0x005d; // Record identifier + $length = 0x003c; // Bytes to follow + + $cObj = 0x0001; // Count of objects in file (set to 1) + $OT = 0x0008; // Object type. 8 = Picture + $id = 0x0001; // Object ID + $grbit = 0x0614; // Option flags + + $cbMacro = 0x0000; // Length of FMLA structure + $Reserved1 = 0x0000; // Reserved + $Reserved2 = 0x0000; // Reserved + + $icvBack = 0x09; // Background colour + $icvFore = 0x09; // Foreground colour + $fls = 0x00; // Fill pattern + $fAuto = 0x00; // Automatic fill + $icv = 0x08; // Line colour + $lns = 0xff; // Line style + $lnw = 0x01; // Line weight + $fAutoB = 0x00; // Automatic border + $frs = 0x0000; // Frame style + $cf = 0x0009; // Image format, 9 = bitmap + $Reserved3 = 0x0000; // Reserved + $cbPictFmla = 0x0000; // Length of FMLA structure + $Reserved4 = 0x0000; // Reserved + $grbit2 = 0x0001; // Option flags + $Reserved5 = 0x0000; // Reserved + + $header = pack('vv', $record, $length); + $data = pack('V', $cObj); + $data .= pack('v', $OT); + $data .= pack('v', $id); + $data .= pack('v', $grbit); + $data .= pack('v', $colL); + $data .= pack('v', $dxL); + $data .= pack('v', $rwT); + $data .= pack('v', $dyT); + $data .= pack('v', $colR); + $data .= pack('v', $dxR); + $data .= pack('v', $rwB); + $data .= pack('v', $dyB); + $data .= pack('v', $cbMacro); + $data .= pack('V', $Reserved1); + $data .= pack('v', $Reserved2); + $data .= pack('C', $icvBack); + $data .= pack('C', $icvFore); + $data .= pack('C', $fls); + $data .= pack('C', $fAuto); + $data .= pack('C', $icv); + $data .= pack('C', $lns); + $data .= pack('C', $lnw); + $data .= pack('C', $fAutoB); + $data .= pack('v', $frs); + $data .= pack('V', $cf); + $data .= pack('v', $Reserved3); + $data .= pack('v', $cbPictFmla); + $data .= pack('v', $Reserved4); + $data .= pack('v', $grbit2); + $data .= pack('V', $Reserved5); + + $this->append($header . $data); + } + + /** + * Convert a GD-image into the internal format. + * + * @param resource $image The image to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmapGd($image) + { + $width = imagesx($image); + $height = imagesy($image); + + $data = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + for ($j = $height; --$j;) { + for ($i = 0; $i < $width; ++$i) { + $color = imagecolorsforindex($image, imagecolorat($image, $i, $j)); + foreach (['red', 'green', 'blue'] as $key) { + $color[$key] = $color[$key] + round((255 - $color[$key]) * $color['alpha'] / 127); + } + $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']); + } + if (3 * $width % 4) { + $data .= str_repeat("\x00", 4 - 3 * $width % 4); + } + } + + return [$width, $height, strlen($data), $data]; + } + + /** + * Convert a 24 bit bitmap into the modified internal format used by Windows. + * This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the + * MSDN library. + * + * @param string $bitmap The bitmap to process + * + * @return array Array with data and properties of the bitmap + */ + public function processBitmap($bitmap) + { + // Open file. + $bmp_fd = @fopen($bitmap, 'rb'); + if (!$bmp_fd) { + throw new WriterException("Couldn't import $bitmap"); + } + + // Slurp the file into a string. + $data = fread($bmp_fd, filesize($bitmap)); + + // Check that the file is big enough to be a bitmap. + if (strlen($data) <= 0x36) { + throw new WriterException("$bitmap doesn't contain enough data.\n"); + } + + // The first 2 bytes are used to identify the bitmap. + $identity = unpack('A2ident', $data); + if ($identity['ident'] != 'BM') { + throw new WriterException("$bitmap doesn't appear to be a valid bitmap image.\n"); + } + + // Remove bitmap data: ID. + $data = substr($data, 2); + + // Read and remove the bitmap size. This is more reliable than reading + // the data size at offset 0x22. + // + $size_array = unpack('Vsa', substr($data, 0, 4)); + $size = $size_array['sa']; + $data = substr($data, 4); + $size -= 0x36; // Subtract size of bitmap header. + $size += 0x0C; // Add size of BIFF header. + + // Remove bitmap data: reserved, offset, header length. + $data = substr($data, 12); + + // Read and remove the bitmap width and height. Verify the sizes. + $width_and_height = unpack('V2', substr($data, 0, 8)); + $width = $width_and_height[1]; + $height = $width_and_height[2]; + $data = substr($data, 8); + if ($width > 0xFFFF) { + throw new WriterException("$bitmap: largest image width supported is 65k.\n"); + } + if ($height > 0xFFFF) { + throw new WriterException("$bitmap: largest image height supported is 65k.\n"); + } + + // Read and remove the bitmap planes and bpp data. Verify them. + $planes_and_bitcount = unpack('v2', substr($data, 0, 4)); + $data = substr($data, 4); + if ($planes_and_bitcount[2] != 24) { // Bitcount + throw new WriterException("$bitmap isn't a 24bit true color bitmap.\n"); + } + if ($planes_and_bitcount[1] != 1) { + throw new WriterException("$bitmap: only 1 plane supported in bitmap image.\n"); + } + + // Read and remove the bitmap compression. Verify compression. + $compression = unpack('Vcomp', substr($data, 0, 4)); + $data = substr($data, 4); + + if ($compression['comp'] != 0) { + throw new WriterException("$bitmap: compression not supported in bitmap image.\n"); + } + + // Remove bitmap data: data size, hres, vres, colours, imp. colours. + $data = substr($data, 20); + + // Add the BITMAPCOREHEADER data + $header = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); + $data = $header . $data; + + return [$width, $height, $size, $data]; + } + + /** + * Store the window zoom factor. This should be a reduced fraction but for + * simplicity we will store all fractions with a numerator of 100. + */ + private function writeZoom() + { + // If scale is 100 we don't need to write a record + if ($this->phpSheet->getSheetView()->getZoomScale() == 100) { + return; + } + + $record = 0x00A0; // Record identifier + $length = 0x0004; // Bytes to follow + + $header = pack('vv', $record, $length); + $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100); + $this->append($header . $data); + } + + /** + * Get Escher object. + * + * @return \PhpOffice\PhpSpreadsheet\Shared\Escher + */ + public function getEscher() + { + return $this->escher; + } + + /** + * Set Escher object. + * + * @param \PhpOffice\PhpSpreadsheet\Shared\Escher $pValue + */ + public function setEscher(\PhpOffice\PhpSpreadsheet\Shared\Escher $pValue = null) + { + $this->escher = $pValue; + } + + /** + * Write MSODRAWING record. + */ + private function writeMsoDrawing() + { + // write the Escher stream if necessary + if (isset($this->escher)) { + $writer = new Escher($this->escher); + $data = $writer->close(); + $spOffsets = $writer->getSpOffsets(); + $spTypes = $writer->getSpTypes(); + // write the neccesary MSODRAWING, OBJ records + + // split the Escher stream + $spOffsets[0] = 0; + $nm = count($spOffsets) - 1; // number of shapes excluding first shape + for ($i = 1; $i <= $nm; ++$i) { + // MSODRAWING record + $record = 0x00EC; // Record identifier + + // chunk of Escher stream for one shape + $dataChunk = substr($data, $spOffsets[$i - 1], $spOffsets[$i] - $spOffsets[$i - 1]); + + $length = strlen($dataChunk); + $header = pack('vv', $record, $length); + + $this->append($header . $dataChunk); + + // OBJ record + $record = 0x005D; // record identifier + $objData = ''; + + // ftCmo + if ($spTypes[$i] == 0x00C9) { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0014, // object type, 0x0014 = filter + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x2101, // option flags, 0x2001 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + + // Add ftSbs Scroll bar subobject + $objData .= pack('vv', 0x00C, 0x0014); + $objData .= pack('H*', '0000000000000000640001000A00000010000100'); + // Add ftLbsData (List box data) subobject + $objData .= pack('vv', 0x0013, 0x1FEE); + $objData .= pack('H*', '00000000010001030000020008005700'); + } else { + // Add ftCmo (common object data) subobject + $objData .= + pack( + 'vvvvvVVV', + 0x0015, // 0x0015 = ftCmo + 0x0012, // length of ftCmo data + 0x0008, // object type, 0x0008 = picture + $i, // object id number, Excel seems to use 1-based index, local for the sheet + 0x6011, // option flags, 0x6011 is what OpenOffice.org uses + 0, // reserved + 0, // reserved + 0 // reserved + ); + } + + // ftEnd + $objData .= + pack( + 'vv', + 0x0000, // 0x0000 = ftEnd + 0x0000 // length of ftEnd data + ); + + $length = strlen($objData); + $header = pack('vv', $record, $length); + $this->append($header . $objData); + } + } + } + + /** + * Store the DATAVALIDATIONS and DATAVALIDATION records. + */ + private function writeDataValidity() + { + // Datavalidation collection + $dataValidationCollection = $this->phpSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + // DATAVALIDATIONS record + $record = 0x01B2; // Record identifier + $length = 0x0012; // Bytes to follow + + $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records + $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position + $verPos = 0x00000000; // Vertical position of prompt box, if fixed position + $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible + + $header = pack('vv', $record, $length); + $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); + $this->append($header . $data); + + // DATAVALIDATION records + $record = 0x01BE; // Record identifier + + foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) { + // initialize record data + $data = ''; + + // options + $options = 0x00000000; + + // data type + $type = 0x00; + switch ($dataValidation->getType()) { + case DataValidation::TYPE_NONE: + $type = 0x00; + + break; + case DataValidation::TYPE_WHOLE: + $type = 0x01; + + break; + case DataValidation::TYPE_DECIMAL: + $type = 0x02; + + break; + case DataValidation::TYPE_LIST: + $type = 0x03; + + break; + case DataValidation::TYPE_DATE: + $type = 0x04; + + break; + case DataValidation::TYPE_TIME: + $type = 0x05; + + break; + case DataValidation::TYPE_TEXTLENGTH: + $type = 0x06; + + break; + case DataValidation::TYPE_CUSTOM: + $type = 0x07; + + break; + } + + $options |= $type << 0; + + // error style + $errorStyle = 0x00; + switch ($dataValidation->getErrorStyle()) { + case DataValidation::STYLE_STOP: + $errorStyle = 0x00; + + break; + case DataValidation::STYLE_WARNING: + $errorStyle = 0x01; + + break; + case DataValidation::STYLE_INFORMATION: + $errorStyle = 0x02; + + break; + } + + $options |= $errorStyle << 4; + + // explicit formula? + if ($type == 0x03 && preg_match('/^\".*\"$/', $dataValidation->getFormula1())) { + $options |= 0x01 << 7; + } + + // empty cells allowed + $options |= $dataValidation->getAllowBlank() << 8; + + // show drop down + $options |= (!$dataValidation->getShowDropDown()) << 9; + + // show input message + $options |= $dataValidation->getShowInputMessage() << 18; + + // show error message + $options |= $dataValidation->getShowErrorMessage() << 19; + + // condition operator + $operator = 0x00; + switch ($dataValidation->getOperator()) { + case DataValidation::OPERATOR_BETWEEN: + $operator = 0x00; + + break; + case DataValidation::OPERATOR_NOTBETWEEN: + $operator = 0x01; + + break; + case DataValidation::OPERATOR_EQUAL: + $operator = 0x02; + + break; + case DataValidation::OPERATOR_NOTEQUAL: + $operator = 0x03; + + break; + case DataValidation::OPERATOR_GREATERTHAN: + $operator = 0x04; + + break; + case DataValidation::OPERATOR_LESSTHAN: + $operator = 0x05; + + break; + case DataValidation::OPERATOR_GREATERTHANOREQUAL: + $operator = 0x06; + + break; + case DataValidation::OPERATOR_LESSTHANOREQUAL: + $operator = 0x07; + + break; + } + + $options |= $operator << 20; + + $data = pack('V', $options); + + // prompt title + $promptTitle = $dataValidation->getPromptTitle() !== '' ? + $dataValidation->getPromptTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($promptTitle); + + // error title + $errorTitle = $dataValidation->getErrorTitle() !== '' ? + $dataValidation->getErrorTitle() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($errorTitle); + + // prompt text + $prompt = $dataValidation->getPrompt() !== '' ? + $dataValidation->getPrompt() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($prompt); + + // error text + $error = $dataValidation->getError() !== '' ? + $dataValidation->getError() : chr(0); + $data .= StringHelper::UTF8toBIFF8UnicodeLong($error); + + // formula 1 + try { + $formula1 = $dataValidation->getFormula1(); + if ($type == 0x03) { // list type + $formula1 = str_replace(',', chr(0), $formula1); + } + $this->parser->parse($formula1); + $formula1 = $this->parser->toReversePolish(); + $sz1 = strlen($formula1); + } catch (PhpSpreadsheetException $e) { + $sz1 = 0; + $formula1 = ''; + } + $data .= pack('vv', $sz1, 0x0000); + $data .= $formula1; + + // formula 2 + try { + $formula2 = $dataValidation->getFormula2(); + if ($formula2 === '') { + throw new WriterException('No formula2'); + } + $this->parser->parse($formula2); + $formula2 = $this->parser->toReversePolish(); + $sz2 = strlen($formula2); + } catch (PhpSpreadsheetException $e) { + $sz2 = 0; + $formula2 = ''; + } + $data .= pack('vv', $sz2, 0x0000); + $data .= $formula2; + + // cell range address list + $data .= pack('v', 0x0001); + $data .= $this->writeBIFF8CellRangeAddressFixed($cellCoordinate); + + $length = strlen($data); + $header = pack('vv', $record, $length); + + $this->append($header . $data); + } + } + } + + /** + * Map Error code. + * + * @param string $errorCode + * + * @return int + */ + private static function mapErrorCode($errorCode) + { + switch ($errorCode) { + case '#NULL!': + return 0x00; + case '#DIV/0!': + return 0x07; + case '#VALUE!': + return 0x0F; + case '#REF!': + return 0x17; + case '#NAME?': + return 0x1D; + case '#NUM!': + return 0x24; + case '#N/A': + return 0x2A; + } + + return 0; + } + + /** + * Write PLV Record. + */ + private function writePageLayoutView() + { + $record = 0x088B; // Record identifier + $length = 0x0010; // Bytes to follow + + $rt = 0x088B; // 2 + $grbitFrt = 0x0000; // 2 + $reserved = 0x0000000000000000; // 8 + $wScalvePLV = $this->phpSheet->getSheetView()->getZoomScale(); // 2 + + // The options flags that comprise $grbit + if ($this->phpSheet->getSheetView()->getView() == SheetView::SHEETVIEW_PAGE_LAYOUT) { + $fPageLayoutView = 1; + } else { + $fPageLayoutView = 0; + } + $fRulerVisible = 0; + $fWhitespaceHidden = 0; + + $grbit = $fPageLayoutView; // 2 + $grbit |= $fRulerVisible << 1; + $grbit |= $fWhitespaceHidden << 3; + + $header = pack('vv', $record, $length); + $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); + $this->append($header . $data); + } + + /** + * Write CFRule Record. + * + * @param Conditional $conditional + */ + private function writeCFRule(Conditional $conditional) + { + $record = 0x01B1; // Record identifier + + // $type : Type of the CF + // $operatorType : Comparison operator + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + $type = 0x02; + $operatorType = 0x00; + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + $type = 0x01; + + switch ($conditional->getOperatorType()) { + case Conditional::OPERATOR_NONE: + $operatorType = 0x00; + + break; + case Conditional::OPERATOR_EQUAL: + $operatorType = 0x03; + + break; + case Conditional::OPERATOR_GREATERTHAN: + $operatorType = 0x05; + + break; + case Conditional::OPERATOR_GREATERTHANOREQUAL: + $operatorType = 0x07; + + break; + case Conditional::OPERATOR_LESSTHAN: + $operatorType = 0x06; + + break; + case Conditional::OPERATOR_LESSTHANOREQUAL: + $operatorType = 0x08; + + break; + case Conditional::OPERATOR_NOTEQUAL: + $operatorType = 0x04; + + break; + case Conditional::OPERATOR_BETWEEN: + $operatorType = 0x01; + + break; + // not OPERATOR_NOTBETWEEN 0x02 + } + } + + // $szValue1 : size of the formula data for first value or formula + // $szValue2 : size of the formula data for second value or formula + $arrConditions = $conditional->getConditions(); + $numConditions = count($arrConditions); + if ($numConditions == 1) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = 0x0000; + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = null; + } elseif ($numConditions == 2 && ($conditional->getOperatorType() == Conditional::OPERATOR_BETWEEN)) { + $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); + $szValue2 = ($arrConditions[1] <= 65535 ? 3 : 0x0000); + $operand1 = pack('Cv', 0x1E, $arrConditions[0]); + $operand2 = pack('Cv', 0x1E, $arrConditions[1]); + } else { + $szValue1 = 0x0000; + $szValue2 = 0x0000; + $operand1 = null; + $operand2 = null; + } + + // $flags : Option flags + // Alignment + $bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() == null ? 1 : 0); + $bAlignVt = ($conditional->getStyle()->getAlignment()->getVertical() == null ? 1 : 0); + $bAlignWrapTx = ($conditional->getStyle()->getAlignment()->getWrapText() == false ? 1 : 0); + $bTxRotation = ($conditional->getStyle()->getAlignment()->getTextRotation() == null ? 1 : 0); + $bIndent = ($conditional->getStyle()->getAlignment()->getIndent() == 0 ? 1 : 0); + $bShrinkToFit = ($conditional->getStyle()->getAlignment()->getShrinkToFit() == false ? 1 : 0); + if ($bAlignHz == 0 || $bAlignVt == 0 || $bAlignWrapTx == 0 || $bTxRotation == 0 || $bIndent == 0 || $bShrinkToFit == 0) { + $bFormatAlign = 1; + } else { + $bFormatAlign = 0; + } + // Protection + $bProtLocked = ($conditional->getStyle()->getProtection()->getLocked() == null ? 1 : 0); + $bProtHidden = ($conditional->getStyle()->getProtection()->getHidden() == null ? 1 : 0); + if ($bProtLocked == 0 || $bProtHidden == 0) { + $bFormatProt = 1; + } else { + $bFormatProt = 0; + } + // Border + $bBorderLeft = ($conditional->getStyle()->getBorders()->getLeft()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getLeft()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderRight = ($conditional->getStyle()->getBorders()->getRight()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getRight()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderTop = ($conditional->getStyle()->getBorders()->getTop()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getTop()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + $bBorderBottom = ($conditional->getStyle()->getBorders()->getBottom()->getColor()->getARGB() == Color::COLOR_BLACK + && $conditional->getStyle()->getBorders()->getBottom()->getBorderStyle() == Border::BORDER_NONE ? 1 : 0); + if ($bBorderLeft == 0 || $bBorderRight == 0 || $bBorderTop == 0 || $bBorderBottom == 0) { + $bFormatBorder = 1; + } else { + $bFormatBorder = 0; + } + // Pattern + $bFillStyle = ($conditional->getStyle()->getFill()->getFillType() == null ? 0 : 1); + $bFillColor = ($conditional->getStyle()->getFill()->getStartColor()->getARGB() == null ? 0 : 1); + $bFillColorBg = ($conditional->getStyle()->getFill()->getEndColor()->getARGB() == null ? 0 : 1); + if ($bFillStyle == 0 || $bFillColor == 0 || $bFillColorBg == 0) { + $bFormatFill = 1; + } else { + $bFormatFill = 0; + } + // Font + if ($conditional->getStyle()->getFont()->getName() != null + || $conditional->getStyle()->getFont()->getSize() != null + || $conditional->getStyle()->getFont()->getBold() != null + || $conditional->getStyle()->getFont()->getItalic() != null + || $conditional->getStyle()->getFont()->getSuperscript() != null + || $conditional->getStyle()->getFont()->getSubscript() != null + || $conditional->getStyle()->getFont()->getUnderline() != null + || $conditional->getStyle()->getFont()->getStrikethrough() != null + || $conditional->getStyle()->getFont()->getColor()->getARGB() != null) { + $bFormatFont = 1; + } else { + $bFormatFont = 0; + } + // Alignment + $flags = 0; + $flags |= (1 == $bAlignHz ? 0x00000001 : 0); + $flags |= (1 == $bAlignVt ? 0x00000002 : 0); + $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); + $flags |= (1 == $bTxRotation ? 0x00000008 : 0); + // Justify last line flag + $flags |= (1 == 1 ? 0x00000010 : 0); + $flags |= (1 == $bIndent ? 0x00000020 : 0); + $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); + // Default + $flags |= (1 == 1 ? 0x00000080 : 0); + // Protection + $flags |= (1 == $bProtLocked ? 0x00000100 : 0); + $flags |= (1 == $bProtHidden ? 0x00000200 : 0); + // Border + $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); + $flags |= (1 == $bBorderRight ? 0x00000800 : 0); + $flags |= (1 == $bBorderTop ? 0x00001000 : 0); + $flags |= (1 == $bBorderBottom ? 0x00002000 : 0); + $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border + $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border + // Pattern + $flags |= (1 == $bFillStyle ? 0x00010000 : 0); + $flags |= (1 == $bFillColor ? 0x00020000 : 0); + $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); + $flags |= (1 == 1 ? 0x00380000 : 0); + // Font + $flags |= (1 == $bFormatFont ? 0x04000000 : 0); + // Alignment: + $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); + // Border + $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); + // Pattern + $flags |= (1 == $bFormatFill ? 0x20000000 : 0); + // Protection + $flags |= (1 == $bFormatProt ? 0x40000000 : 0); + // Text direction + $flags |= (1 == 0 ? 0x80000000 : 0); + + // Data Blocks + if ($bFormatFont == 1) { + // Font Name + if ($conditional->getStyle()->getFont()->getName() == null) { + $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); + } else { + $dataBlockFont = StringHelper::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName()); + } + // Font Size + if ($conditional->getStyle()->getFont()->getSize() == null) { + $dataBlockFont .= pack('V', 20 * 11); + } else { + $dataBlockFont .= pack('V', 20 * $conditional->getStyle()->getFont()->getSize()); + } + // Font Options + $dataBlockFont .= pack('V', 0); + // Font weight + if ($conditional->getStyle()->getFont()->getBold() == true) { + $dataBlockFont .= pack('v', 0x02BC); + } else { + $dataBlockFont .= pack('v', 0x0190); + } + // Escapement type + if ($conditional->getStyle()->getFont()->getSubscript() == true) { + $dataBlockFont .= pack('v', 0x02); + $fontEscapement = 0; + } elseif ($conditional->getStyle()->getFont()->getSuperscript() == true) { + $dataBlockFont .= pack('v', 0x01); + $fontEscapement = 0; + } else { + $dataBlockFont .= pack('v', 0x00); + $fontEscapement = 1; + } + // Underline type + switch ($conditional->getStyle()->getFont()->getUnderline()) { + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE: + $dataBlockFont .= pack('C', 0x02); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLEACCOUNTING: + $dataBlockFont .= pack('C', 0x22); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE: + $dataBlockFont .= pack('C', 0x01); + $fontUnderline = 0; + + break; + case \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLEACCOUNTING: + $dataBlockFont .= pack('C', 0x21); + $fontUnderline = 0; + + break; + default: + $dataBlockFont .= pack('C', 0x00); + $fontUnderline = 1; + + break; + } + // Not used (3) + $dataBlockFont .= pack('vC', 0x0000, 0x00); + // Font color index + switch ($conditional->getStyle()->getFont()->getColor()->getRGB()) { + case '000000': + $colorIdx = 0x08; + + break; + case 'FFFFFF': + $colorIdx = 0x09; + + break; + case 'FF0000': + $colorIdx = 0x0A; + + break; + case '00FF00': + $colorIdx = 0x0B; + + break; + case '0000FF': + $colorIdx = 0x0C; + + break; + case 'FFFF00': + $colorIdx = 0x0D; + + break; + case 'FF00FF': + $colorIdx = 0x0E; + + break; + case '00FFFF': + $colorIdx = 0x0F; + + break; + case '800000': + $colorIdx = 0x10; + + break; + case '008000': + $colorIdx = 0x11; + + break; + case '000080': + $colorIdx = 0x12; + + break; + case '808000': + $colorIdx = 0x13; + + break; + case '800080': + $colorIdx = 0x14; + + break; + case '008080': + $colorIdx = 0x15; + + break; + case 'C0C0C0': + $colorIdx = 0x16; + + break; + case '808080': + $colorIdx = 0x17; + + break; + case '9999FF': + $colorIdx = 0x18; + + break; + case '993366': + $colorIdx = 0x19; + + break; + case 'FFFFCC': + $colorIdx = 0x1A; + + break; + case 'CCFFFF': + $colorIdx = 0x1B; + + break; + case '660066': + $colorIdx = 0x1C; + + break; + case 'FF8080': + $colorIdx = 0x1D; + + break; + case '0066CC': + $colorIdx = 0x1E; + + break; + case 'CCCCFF': + $colorIdx = 0x1F; + + break; + case '000080': + $colorIdx = 0x20; + + break; + case 'FF00FF': + $colorIdx = 0x21; + + break; + case 'FFFF00': + $colorIdx = 0x22; + + break; + case '00FFFF': + $colorIdx = 0x23; + + break; + case '800080': + $colorIdx = 0x24; + + break; + case '800000': + $colorIdx = 0x25; + + break; + case '008080': + $colorIdx = 0x26; + + break; + case '0000FF': + $colorIdx = 0x27; + + break; + case '00CCFF': + $colorIdx = 0x28; + + break; + case 'CCFFFF': + $colorIdx = 0x29; + + break; + case 'CCFFCC': + $colorIdx = 0x2A; + + break; + case 'FFFF99': + $colorIdx = 0x2B; + + break; + case '99CCFF': + $colorIdx = 0x2C; + + break; + case 'FF99CC': + $colorIdx = 0x2D; + + break; + case 'CC99FF': + $colorIdx = 0x2E; + + break; + case 'FFCC99': + $colorIdx = 0x2F; + + break; + case '3366FF': + $colorIdx = 0x30; + + break; + case '33CCCC': + $colorIdx = 0x31; + + break; + case '99CC00': + $colorIdx = 0x32; + + break; + case 'FFCC00': + $colorIdx = 0x33; + + break; + case 'FF9900': + $colorIdx = 0x34; + + break; + case 'FF6600': + $colorIdx = 0x35; + + break; + case '666699': + $colorIdx = 0x36; + + break; + case '969696': + $colorIdx = 0x37; + + break; + case '003366': + $colorIdx = 0x38; + + break; + case '339966': + $colorIdx = 0x39; + + break; + case '003300': + $colorIdx = 0x3A; + + break; + case '333300': + $colorIdx = 0x3B; + + break; + case '993300': + $colorIdx = 0x3C; + + break; + case '993366': + $colorIdx = 0x3D; + + break; + case '333399': + $colorIdx = 0x3E; + + break; + case '333333': + $colorIdx = 0x3F; + + break; + default: + $colorIdx = 0x00; + + break; + } + $dataBlockFont .= pack('V', $colorIdx); + // Not used (4) + $dataBlockFont .= pack('V', 0x00000000); + // Options flags for modified font attributes + $optionsFlags = 0; + $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0); + $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); + $optionsFlags |= (1 == 1 ? 0x00000008 : 0); + $optionsFlags |= (1 == 1 ? 0x00000010 : 0); + $optionsFlags |= (1 == 0 ? 0x00000020 : 0); + $optionsFlags |= (1 == 1 ? 0x00000080 : 0); + $dataBlockFont .= pack('V', $optionsFlags); + // Escapement type + $dataBlockFont .= pack('V', $fontEscapement); + // Underline type + $dataBlockFont .= pack('V', $fontUnderline); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Always + $dataBlockFont .= pack('V', 0x00000000); + // Not used (8) + $dataBlockFont .= pack('VV', 0x00000000, 0x00000000); + // Always + $dataBlockFont .= pack('v', 0x0001); + } + if ($bFormatAlign == 1) { + $blockAlign = 0; + // Alignment and text break + switch ($conditional->getStyle()->getAlignment()->getHorizontal()) { + case Alignment::HORIZONTAL_GENERAL: + $blockAlign = 0; + + break; + case Alignment::HORIZONTAL_LEFT: + $blockAlign = 1; + + break; + case Alignment::HORIZONTAL_RIGHT: + $blockAlign = 3; + + break; + case Alignment::HORIZONTAL_CENTER: + $blockAlign = 2; + + break; + case Alignment::HORIZONTAL_CENTER_CONTINUOUS: + $blockAlign = 6; + + break; + case Alignment::HORIZONTAL_JUSTIFY: + $blockAlign = 5; + + break; + } + if ($conditional->getStyle()->getAlignment()->getWrapText() == true) { + $blockAlign |= 1 << 3; + } else { + $blockAlign |= 0 << 3; + } + switch ($conditional->getStyle()->getAlignment()->getVertical()) { + case Alignment::VERTICAL_BOTTOM: + $blockAlign = 2 << 4; + + break; + case Alignment::VERTICAL_TOP: + $blockAlign = 0 << 4; + + break; + case Alignment::VERTICAL_CENTER: + $blockAlign = 1 << 4; + + break; + case Alignment::VERTICAL_JUSTIFY: + $blockAlign = 3 << 4; + + break; + } + $blockAlign |= 0 << 7; + + // Text rotation angle + $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); + + // Indentation + $blockIndent = $conditional->getStyle()->getAlignment()->getIndent(); + if ($conditional->getStyle()->getAlignment()->getShrinkToFit() == true) { + $blockIndent |= 1 << 4; + } else { + $blockIndent |= 0 << 4; + } + $blockIndent |= 0 << 6; + + // Relative indentation + $blockIndentRelative = 255; + + $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000); + } + if ($bFormatBorder == 1) { + $blockLineStyle = 0; + switch ($conditional->getStyle()->getBorders()->getLeft()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D; + + break; + } + switch ($conditional->getStyle()->getBorders()->getRight()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 4; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 4; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 4; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 4; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 4; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 4; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 4; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 4; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 4; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 4; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 4; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 4; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 4; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 4; + + break; + } + switch ($conditional->getStyle()->getBorders()->getTop()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 8; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 8; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 8; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 8; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 8; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 8; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 8; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 8; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 8; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 8; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 8; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 8; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 8; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 8; + + break; + } + switch ($conditional->getStyle()->getBorders()->getBottom()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockLineStyle |= 0x00 << 12; + + break; + case Border::BORDER_THIN: + $blockLineStyle |= 0x01 << 12; + + break; + case Border::BORDER_MEDIUM: + $blockLineStyle |= 0x02 << 12; + + break; + case Border::BORDER_DASHED: + $blockLineStyle |= 0x03 << 12; + + break; + case Border::BORDER_DOTTED: + $blockLineStyle |= 0x04 << 12; + + break; + case Border::BORDER_THICK: + $blockLineStyle |= 0x05 << 12; + + break; + case Border::BORDER_DOUBLE: + $blockLineStyle |= 0x06 << 12; + + break; + case Border::BORDER_HAIR: + $blockLineStyle |= 0x07 << 12; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockLineStyle |= 0x08 << 12; + + break; + case Border::BORDER_DASHDOT: + $blockLineStyle |= 0x09 << 12; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockLineStyle |= 0x0A << 12; + + break; + case Border::BORDER_DASHDOTDOT: + $blockLineStyle |= 0x0B << 12; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockLineStyle |= 0x0C << 12; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockLineStyle |= 0x0D << 12; + + break; + } + //@todo writeCFRule() => $blockLineStyle => Index Color for left line + //@todo writeCFRule() => $blockLineStyle => Index Color for right line + //@todo writeCFRule() => $blockLineStyle => Top-left to bottom-right on/off + //@todo writeCFRule() => $blockLineStyle => Bottom-left to top-right on/off + $blockColor = 0; + //@todo writeCFRule() => $blockColor => Index Color for top line + //@todo writeCFRule() => $blockColor => Index Color for bottom line + //@todo writeCFRule() => $blockColor => Index Color for diagonal line + switch ($conditional->getStyle()->getBorders()->getDiagonal()->getBorderStyle()) { + case Border::BORDER_NONE: + $blockColor |= 0x00 << 21; + + break; + case Border::BORDER_THIN: + $blockColor |= 0x01 << 21; + + break; + case Border::BORDER_MEDIUM: + $blockColor |= 0x02 << 21; + + break; + case Border::BORDER_DASHED: + $blockColor |= 0x03 << 21; + + break; + case Border::BORDER_DOTTED: + $blockColor |= 0x04 << 21; + + break; + case Border::BORDER_THICK: + $blockColor |= 0x05 << 21; + + break; + case Border::BORDER_DOUBLE: + $blockColor |= 0x06 << 21; + + break; + case Border::BORDER_HAIR: + $blockColor |= 0x07 << 21; + + break; + case Border::BORDER_MEDIUMDASHED: + $blockColor |= 0x08 << 21; + + break; + case Border::BORDER_DASHDOT: + $blockColor |= 0x09 << 21; + + break; + case Border::BORDER_MEDIUMDASHDOT: + $blockColor |= 0x0A << 21; + + break; + case Border::BORDER_DASHDOTDOT: + $blockColor |= 0x0B << 21; + + break; + case Border::BORDER_MEDIUMDASHDOTDOT: + $blockColor |= 0x0C << 21; + + break; + case Border::BORDER_SLANTDASHDOT: + $blockColor |= 0x0D << 21; + + break; + } + $dataBlockBorder = pack('vv', $blockLineStyle, $blockColor); + } + if ($bFormatFill == 1) { + // Fill Patern Style + $blockFillPatternStyle = 0; + switch ($conditional->getStyle()->getFill()->getFillType()) { + case Fill::FILL_NONE: + $blockFillPatternStyle = 0x00; + + break; + case Fill::FILL_SOLID: + $blockFillPatternStyle = 0x01; + + break; + case Fill::FILL_PATTERN_MEDIUMGRAY: + $blockFillPatternStyle = 0x02; + + break; + case Fill::FILL_PATTERN_DARKGRAY: + $blockFillPatternStyle = 0x03; + + break; + case Fill::FILL_PATTERN_LIGHTGRAY: + $blockFillPatternStyle = 0x04; + + break; + case Fill::FILL_PATTERN_DARKHORIZONTAL: + $blockFillPatternStyle = 0x05; + + break; + case Fill::FILL_PATTERN_DARKVERTICAL: + $blockFillPatternStyle = 0x06; + + break; + case Fill::FILL_PATTERN_DARKDOWN: + $blockFillPatternStyle = 0x07; + + break; + case Fill::FILL_PATTERN_DARKUP: + $blockFillPatternStyle = 0x08; + + break; + case Fill::FILL_PATTERN_DARKGRID: + $blockFillPatternStyle = 0x09; + + break; + case Fill::FILL_PATTERN_DARKTRELLIS: + $blockFillPatternStyle = 0x0A; + + break; + case Fill::FILL_PATTERN_LIGHTHORIZONTAL: + $blockFillPatternStyle = 0x0B; + + break; + case Fill::FILL_PATTERN_LIGHTVERTICAL: + $blockFillPatternStyle = 0x0C; + + break; + case Fill::FILL_PATTERN_LIGHTDOWN: + $blockFillPatternStyle = 0x0D; + + break; + case Fill::FILL_PATTERN_LIGHTUP: + $blockFillPatternStyle = 0x0E; + + break; + case Fill::FILL_PATTERN_LIGHTGRID: + $blockFillPatternStyle = 0x0F; + + break; + case Fill::FILL_PATTERN_LIGHTTRELLIS: + $blockFillPatternStyle = 0x10; + + break; + case Fill::FILL_PATTERN_GRAY125: + $blockFillPatternStyle = 0x11; + + break; + case Fill::FILL_PATTERN_GRAY0625: + $blockFillPatternStyle = 0x12; + + break; + case Fill::FILL_GRADIENT_LINEAR: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + case Fill::FILL_GRADIENT_PATH: + $blockFillPatternStyle = 0x00; + + break; // does not exist in BIFF8 + default: + $blockFillPatternStyle = 0x00; + + break; + } + // Color + switch ($conditional->getStyle()->getFill()->getStartColor()->getRGB()) { + case '000000': + $colorIdxBg = 0x08; + + break; + case 'FFFFFF': + $colorIdxBg = 0x09; + + break; + case 'FF0000': + $colorIdxBg = 0x0A; + + break; + case '00FF00': + $colorIdxBg = 0x0B; + + break; + case '0000FF': + $colorIdxBg = 0x0C; + + break; + case 'FFFF00': + $colorIdxBg = 0x0D; + + break; + case 'FF00FF': + $colorIdxBg = 0x0E; + + break; + case '00FFFF': + $colorIdxBg = 0x0F; + + break; + case '800000': + $colorIdxBg = 0x10; + + break; + case '008000': + $colorIdxBg = 0x11; + + break; + case '000080': + $colorIdxBg = 0x12; + + break; + case '808000': + $colorIdxBg = 0x13; + + break; + case '800080': + $colorIdxBg = 0x14; + + break; + case '008080': + $colorIdxBg = 0x15; + + break; + case 'C0C0C0': + $colorIdxBg = 0x16; + + break; + case '808080': + $colorIdxBg = 0x17; + + break; + case '9999FF': + $colorIdxBg = 0x18; + + break; + case '993366': + $colorIdxBg = 0x19; + + break; + case 'FFFFCC': + $colorIdxBg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxBg = 0x1B; + + break; + case '660066': + $colorIdxBg = 0x1C; + + break; + case 'FF8080': + $colorIdxBg = 0x1D; + + break; + case '0066CC': + $colorIdxBg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxBg = 0x1F; + + break; + case '000080': + $colorIdxBg = 0x20; + + break; + case 'FF00FF': + $colorIdxBg = 0x21; + + break; + case 'FFFF00': + $colorIdxBg = 0x22; + + break; + case '00FFFF': + $colorIdxBg = 0x23; + + break; + case '800080': + $colorIdxBg = 0x24; + + break; + case '800000': + $colorIdxBg = 0x25; + + break; + case '008080': + $colorIdxBg = 0x26; + + break; + case '0000FF': + $colorIdxBg = 0x27; + + break; + case '00CCFF': + $colorIdxBg = 0x28; + + break; + case 'CCFFFF': + $colorIdxBg = 0x29; + + break; + case 'CCFFCC': + $colorIdxBg = 0x2A; + + break; + case 'FFFF99': + $colorIdxBg = 0x2B; + + break; + case '99CCFF': + $colorIdxBg = 0x2C; + + break; + case 'FF99CC': + $colorIdxBg = 0x2D; + + break; + case 'CC99FF': + $colorIdxBg = 0x2E; + + break; + case 'FFCC99': + $colorIdxBg = 0x2F; + + break; + case '3366FF': + $colorIdxBg = 0x30; + + break; + case '33CCCC': + $colorIdxBg = 0x31; + + break; + case '99CC00': + $colorIdxBg = 0x32; + + break; + case 'FFCC00': + $colorIdxBg = 0x33; + + break; + case 'FF9900': + $colorIdxBg = 0x34; + + break; + case 'FF6600': + $colorIdxBg = 0x35; + + break; + case '666699': + $colorIdxBg = 0x36; + + break; + case '969696': + $colorIdxBg = 0x37; + + break; + case '003366': + $colorIdxBg = 0x38; + + break; + case '339966': + $colorIdxBg = 0x39; + + break; + case '003300': + $colorIdxBg = 0x3A; + + break; + case '333300': + $colorIdxBg = 0x3B; + + break; + case '993300': + $colorIdxBg = 0x3C; + + break; + case '993366': + $colorIdxBg = 0x3D; + + break; + case '333399': + $colorIdxBg = 0x3E; + + break; + case '333333': + $colorIdxBg = 0x3F; + + break; + default: + $colorIdxBg = 0x41; + + break; + } + // Fg Color + switch ($conditional->getStyle()->getFill()->getEndColor()->getRGB()) { + case '000000': + $colorIdxFg = 0x08; + + break; + case 'FFFFFF': + $colorIdxFg = 0x09; + + break; + case 'FF0000': + $colorIdxFg = 0x0A; + + break; + case '00FF00': + $colorIdxFg = 0x0B; + + break; + case '0000FF': + $colorIdxFg = 0x0C; + + break; + case 'FFFF00': + $colorIdxFg = 0x0D; + + break; + case 'FF00FF': + $colorIdxFg = 0x0E; + + break; + case '00FFFF': + $colorIdxFg = 0x0F; + + break; + case '800000': + $colorIdxFg = 0x10; + + break; + case '008000': + $colorIdxFg = 0x11; + + break; + case '000080': + $colorIdxFg = 0x12; + + break; + case '808000': + $colorIdxFg = 0x13; + + break; + case '800080': + $colorIdxFg = 0x14; + + break; + case '008080': + $colorIdxFg = 0x15; + + break; + case 'C0C0C0': + $colorIdxFg = 0x16; + + break; + case '808080': + $colorIdxFg = 0x17; + + break; + case '9999FF': + $colorIdxFg = 0x18; + + break; + case '993366': + $colorIdxFg = 0x19; + + break; + case 'FFFFCC': + $colorIdxFg = 0x1A; + + break; + case 'CCFFFF': + $colorIdxFg = 0x1B; + + break; + case '660066': + $colorIdxFg = 0x1C; + + break; + case 'FF8080': + $colorIdxFg = 0x1D; + + break; + case '0066CC': + $colorIdxFg = 0x1E; + + break; + case 'CCCCFF': + $colorIdxFg = 0x1F; + + break; + case '000080': + $colorIdxFg = 0x20; + + break; + case 'FF00FF': + $colorIdxFg = 0x21; + + break; + case 'FFFF00': + $colorIdxFg = 0x22; + + break; + case '00FFFF': + $colorIdxFg = 0x23; + + break; + case '800080': + $colorIdxFg = 0x24; + + break; + case '800000': + $colorIdxFg = 0x25; + + break; + case '008080': + $colorIdxFg = 0x26; + + break; + case '0000FF': + $colorIdxFg = 0x27; + + break; + case '00CCFF': + $colorIdxFg = 0x28; + + break; + case 'CCFFFF': + $colorIdxFg = 0x29; + + break; + case 'CCFFCC': + $colorIdxFg = 0x2A; + + break; + case 'FFFF99': + $colorIdxFg = 0x2B; + + break; + case '99CCFF': + $colorIdxFg = 0x2C; + + break; + case 'FF99CC': + $colorIdxFg = 0x2D; + + break; + case 'CC99FF': + $colorIdxFg = 0x2E; + + break; + case 'FFCC99': + $colorIdxFg = 0x2F; + + break; + case '3366FF': + $colorIdxFg = 0x30; + + break; + case '33CCCC': + $colorIdxFg = 0x31; + + break; + case '99CC00': + $colorIdxFg = 0x32; + + break; + case 'FFCC00': + $colorIdxFg = 0x33; + + break; + case 'FF9900': + $colorIdxFg = 0x34; + + break; + case 'FF6600': + $colorIdxFg = 0x35; + + break; + case '666699': + $colorIdxFg = 0x36; + + break; + case '969696': + $colorIdxFg = 0x37; + + break; + case '003366': + $colorIdxFg = 0x38; + + break; + case '339966': + $colorIdxFg = 0x39; + + break; + case '003300': + $colorIdxFg = 0x3A; + + break; + case '333300': + $colorIdxFg = 0x3B; + + break; + case '993300': + $colorIdxFg = 0x3C; + + break; + case '993366': + $colorIdxFg = 0x3D; + + break; + case '333399': + $colorIdxFg = 0x3E; + + break; + case '333333': + $colorIdxFg = 0x3F; + + break; + default: + $colorIdxFg = 0x40; + + break; + } + $dataBlockFill = pack('v', $blockFillPatternStyle); + $dataBlockFill .= pack('v', $colorIdxFg | ($colorIdxBg << 7)); + } + if ($bFormatProt == 1) { + $dataBlockProtection = 0; + if ($conditional->getStyle()->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1; + } + if ($conditional->getStyle()->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED) { + $dataBlockProtection = 1 << 1; + } + } + + $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000); + if ($bFormatFont == 1) { // Block Formatting : OK + $data .= $dataBlockFont; + } + if ($bFormatAlign == 1) { + $data .= $dataBlockAlign; + } + if ($bFormatBorder == 1) { + $data .= $dataBlockBorder; + } + if ($bFormatFill == 1) { // Block Formatting : OK + $data .= $dataBlockFill; + } + if ($bFormatProt == 1) { + $data .= $dataBlockProtection; + } + if ($operand1 !== null) { + $data .= $operand1; + } + if ($operand2 !== null) { + $data .= $operand2; + } + $header = pack('vv', $record, strlen($data)); + $this->append($header . $data); + } + + /** + * Write CFHeader record. + */ + private function writeCFHeader() + { + $record = 0x01B0; // Record identifier + $length = 0x0016; // Bytes to follow + + $numColumnMin = null; + $numColumnMax = null; + $numRowMin = null; + $numRowMax = null; + $arrConditional = []; + foreach ($this->phpSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + if ($conditional->getConditionType() == Conditional::CONDITION_EXPRESSION + || $conditional->getConditionType() == Conditional::CONDITION_CELLIS) { + if (!in_array($conditional->getHashCode(), $arrConditional)) { + $arrConditional[] = $conditional->getHashCode(); + } + // Cells + $arrCoord = Coordinate::coordinateFromString($cellCoordinate); + if (!is_numeric($arrCoord[0])) { + $arrCoord[0] = Coordinate::columnIndexFromString($arrCoord[0]); + } + if ($numColumnMin === null || ($numColumnMin > $arrCoord[0])) { + $numColumnMin = $arrCoord[0]; + } + if ($numColumnMax === null || ($numColumnMax < $arrCoord[0])) { + $numColumnMax = $arrCoord[0]; + } + if ($numRowMin === null || ($numRowMin > $arrCoord[1])) { + $numRowMin = $arrCoord[1]; + } + if ($numRowMax === null || ($numRowMax < $arrCoord[1])) { + $numRowMax = $arrCoord[1]; + } + } + } + } + $needRedraw = 1; + $cellRange = pack('vvvv', $numRowMin - 1, $numRowMax - 1, $numColumnMin - 1, $numColumnMax - 1); + + $header = pack('vv', $record, $length); + $data = pack('vv', count($arrConditional), $needRedraw); + $data .= $cellRange; + $data .= pack('v', 0x0001); + $data .= $cellRange; + $this->append($header . $data); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php new file mode 100755 index 0000000..238fb34 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php @@ -0,0 +1,548 @@ + +// * +// * The majority of this is _NOT_ my code. I simply ported it from the +// * PERL Spreadsheet::WriteExcel module. +// * +// * The author of the Spreadsheet::WriteExcel module is John McNamara +// * +// * +// * I _DO_ maintain this code, and John McNamara has nothing to do with the +// * porting of this code to PHP. Any questions directly related to this +// * class library should be directed to me. +// * +// * License Information: +// * +// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets +// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com +// * +// * This library is free software; you can redistribute it and/or +// * modify it under the terms of the GNU Lesser General Public +// * License as published by the Free Software Foundation; either +// * version 2.1 of the License, or (at your option) any later version. +// * +// * This library is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// * Lesser General Public License for more details. +// * +// * You should have received a copy of the GNU Lesser General Public +// * License along with this library; if not, write to the Free Software +// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// */ +class Xf +{ + /** + * Style XF or a cell XF ? + * + * @var bool + */ + private $isStyleXf; + + /** + * Index to the FONT record. Index 4 does not exist. + * + * @var int + */ + private $fontIndex; + + /** + * An index (2 bytes) to a FORMAT record (number format). + * + * @var int + */ + private $numberFormatIndex; + + /** + * 1 bit, apparently not used. + * + * @var int + */ + private $textJustLast; + + /** + * The cell's foreground color. + * + * @var int + */ + private $foregroundColor; + + /** + * The cell's background color. + * + * @var int + */ + private $backgroundColor; + + /** + * Color of the bottom border of the cell. + * + * @var int + */ + private $bottomBorderColor; + + /** + * Color of the top border of the cell. + * + * @var int + */ + private $topBorderColor; + + /** + * Color of the left border of the cell. + * + * @var int + */ + private $leftBorderColor; + + /** + * Color of the right border of the cell. + * + * @var int + */ + private $rightBorderColor; + + /** + * Constructor. + * + * @param Style $style The XF format + */ + public function __construct(Style $style) + { + $this->isStyleXf = false; + $this->fontIndex = 0; + + $this->numberFormatIndex = 0; + + $this->textJustLast = 0; + + $this->foregroundColor = 0x40; + $this->backgroundColor = 0x41; + + $this->_diag = 0; + + $this->bottomBorderColor = 0x40; + $this->topBorderColor = 0x40; + $this->leftBorderColor = 0x40; + $this->rightBorderColor = 0x40; + $this->_diag_color = 0x40; + $this->_style = $style; + } + + /** + * Generate an Excel BIFF XF record (style or cell). + * + * @return string The XF record + */ + public function writeXf() + { + // Set the type of the XF record and some of the attributes. + if ($this->isStyleXf) { + $style = 0xFFF5; + } else { + $style = self::mapLocked($this->_style->getProtection()->getLocked()); + $style |= self::mapHidden($this->_style->getProtection()->getHidden()) << 1; + } + + // Flags to indicate if attributes have been set. + $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0; + $atr_fnt = ($this->fontIndex != 0) ? 1 : 0; + $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; + $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || + self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0; + $atr_pat = (($this->foregroundColor != 0x40) || + ($this->backgroundColor != 0x41) || + self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0; + $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) + | self::mapHidden($this->_style->getProtection()->getHidden()); + + // Zero the default border colour if the border has not been set. + if (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) == 0) { + $this->bottomBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { + $this->topBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) == 0) { + $this->rightBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) == 0) { + $this->leftBorderColor = 0; + } + if (self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) == 0) { + $this->_diag_color = 0; + } + + $record = 0x00E0; // Record identifier + $length = 0x0014; // Number of bytes to follow + + $ifnt = $this->fontIndex; // Index to FONT record + $ifmt = $this->numberFormatIndex; // Index to FORMAT record + + $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment + $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; + $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; + $align |= $this->textJustLast << 7; + + $used_attrib = $atr_num << 2; + $used_attrib |= $atr_fnt << 3; + $used_attrib |= $atr_alc << 4; + $used_attrib |= $atr_bdr << 5; + $used_attrib |= $atr_pat << 6; + $used_attrib |= $atr_prot << 7; + + $icv = $this->foregroundColor; // fg and bg pattern colors + $icv |= $this->backgroundColor << 7; + + $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; + $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; + $border1 |= $this->leftBorderColor << 16; + $border1 |= $this->rightBorderColor << 23; + + $diagonalDirection = $this->_style->getBorders()->getDiagonalDirection(); + $diag_tl_to_rb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_DOWN; + $diag_tr_to_lb = $diagonalDirection == Borders::DIAGONAL_BOTH + || $diagonalDirection == Borders::DIAGONAL_UP; + $border1 |= $diag_tl_to_rb << 30; + $border1 |= $diag_tr_to_lb << 31; + + $border2 = $this->topBorderColor; // Border color + $border2 |= $this->bottomBorderColor << 7; + $border2 |= $this->_diag_color << 14; + $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; + $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; + + $header = pack('vv', $record, $length); + + //BIFF8 options: identation, shrinkToFit and text direction + $biff8_options = $this->_style->getAlignment()->getIndent(); + $biff8_options |= (int) $this->_style->getAlignment()->getShrinkToFit() << 4; + + $data = pack('vvvC', $ifnt, $ifmt, $style, $align); + $data .= pack('CCC', self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib); + $data .= pack('VVv', $border1, $border2, $icv); + + return $header . $data; + } + + /** + * Is this a style XF ? + * + * @param bool $value + */ + public function setIsStyleXf($value) + { + $this->isStyleXf = $value; + } + + /** + * Sets the cell's bottom border color. + * + * @param int $colorIndex Color index + */ + public function setBottomColor($colorIndex) + { + $this->bottomBorderColor = $colorIndex; + } + + /** + * Sets the cell's top border color. + * + * @param int $colorIndex Color index + */ + public function setTopColor($colorIndex) + { + $this->topBorderColor = $colorIndex; + } + + /** + * Sets the cell's left border color. + * + * @param int $colorIndex Color index + */ + public function setLeftColor($colorIndex) + { + $this->leftBorderColor = $colorIndex; + } + + /** + * Sets the cell's right border color. + * + * @param int $colorIndex Color index + */ + public function setRightColor($colorIndex) + { + $this->rightBorderColor = $colorIndex; + } + + /** + * Sets the cell's diagonal border color. + * + * @param int $colorIndex Color index + */ + public function setDiagColor($colorIndex) + { + $this->_diag_color = $colorIndex; + } + + /** + * Sets the cell's foreground color. + * + * @param int $colorIndex Color index + */ + public function setFgColor($colorIndex) + { + $this->foregroundColor = $colorIndex; + } + + /** + * Sets the cell's background color. + * + * @param int $colorIndex Color index + */ + public function setBgColor($colorIndex) + { + $this->backgroundColor = $colorIndex; + } + + /** + * Sets the index to the number format record + * It can be date, time, currency, etc... + * + * @param int $numberFormatIndex Index to format record + */ + public function setNumberFormatIndex($numberFormatIndex) + { + $this->numberFormatIndex = $numberFormatIndex; + } + + /** + * Set the font index. + * + * @param int $value Font index, note that value 4 does not exist + */ + public function setFontIndex($value) + { + $this->fontIndex = $value; + } + + /** + * Map of BIFF2-BIFF8 codes for border styles. + * + * @var array of int + */ + private static $mapBorderStyles = [ + Border::BORDER_NONE => 0x00, + Border::BORDER_THIN => 0x01, + Border::BORDER_MEDIUM => 0x02, + Border::BORDER_DASHED => 0x03, + Border::BORDER_DOTTED => 0x04, + Border::BORDER_THICK => 0x05, + Border::BORDER_DOUBLE => 0x06, + Border::BORDER_HAIR => 0x07, + Border::BORDER_MEDIUMDASHED => 0x08, + Border::BORDER_DASHDOT => 0x09, + Border::BORDER_MEDIUMDASHDOT => 0x0A, + Border::BORDER_DASHDOTDOT => 0x0B, + Border::BORDER_MEDIUMDASHDOTDOT => 0x0C, + Border::BORDER_SLANTDASHDOT => 0x0D, + ]; + + /** + * Map border style. + * + * @param string $borderStyle + * + * @return int + */ + private static function mapBorderStyle($borderStyle) + { + if (isset(self::$mapBorderStyles[$borderStyle])) { + return self::$mapBorderStyles[$borderStyle]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for fill types. + * + * @var array of int + */ + private static $mapFillTypes = [ + Fill::FILL_NONE => 0x00, + Fill::FILL_SOLID => 0x01, + Fill::FILL_PATTERN_MEDIUMGRAY => 0x02, + Fill::FILL_PATTERN_DARKGRAY => 0x03, + Fill::FILL_PATTERN_LIGHTGRAY => 0x04, + Fill::FILL_PATTERN_DARKHORIZONTAL => 0x05, + Fill::FILL_PATTERN_DARKVERTICAL => 0x06, + Fill::FILL_PATTERN_DARKDOWN => 0x07, + Fill::FILL_PATTERN_DARKUP => 0x08, + Fill::FILL_PATTERN_DARKGRID => 0x09, + Fill::FILL_PATTERN_DARKTRELLIS => 0x0A, + Fill::FILL_PATTERN_LIGHTHORIZONTAL => 0x0B, + Fill::FILL_PATTERN_LIGHTVERTICAL => 0x0C, + Fill::FILL_PATTERN_LIGHTDOWN => 0x0D, + Fill::FILL_PATTERN_LIGHTUP => 0x0E, + Fill::FILL_PATTERN_LIGHTGRID => 0x0F, + Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, + Fill::FILL_PATTERN_GRAY125 => 0x11, + Fill::FILL_PATTERN_GRAY0625 => 0x12, + Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 + Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 + ]; + + /** + * Map fill type. + * + * @param string $fillType + * + * @return int + */ + private static function mapFillType($fillType) + { + if (isset(self::$mapFillTypes[$fillType])) { + return self::$mapFillTypes[$fillType]; + } + + return 0x00; + } + + /** + * Map of BIFF2-BIFF8 codes for horizontal alignment. + * + * @var array of int + */ + private static $mapHAlignments = [ + Alignment::HORIZONTAL_GENERAL => 0, + Alignment::HORIZONTAL_LEFT => 1, + Alignment::HORIZONTAL_CENTER => 2, + Alignment::HORIZONTAL_RIGHT => 3, + Alignment::HORIZONTAL_FILL => 4, + Alignment::HORIZONTAL_JUSTIFY => 5, + Alignment::HORIZONTAL_CENTER_CONTINUOUS => 6, + ]; + + /** + * Map to BIFF2-BIFF8 codes for horizontal alignment. + * + * @param string $hAlign + * + * @return int + */ + private function mapHAlign($hAlign) + { + if (isset(self::$mapHAlignments[$hAlign])) { + return self::$mapHAlignments[$hAlign]; + } + + return 0; + } + + /** + * Map of BIFF2-BIFF8 codes for vertical alignment. + * + * @var array of int + */ + private static $mapVAlignments = [ + Alignment::VERTICAL_TOP => 0, + Alignment::VERTICAL_CENTER => 1, + Alignment::VERTICAL_BOTTOM => 2, + Alignment::VERTICAL_JUSTIFY => 3, + ]; + + /** + * Map to BIFF2-BIFF8 codes for vertical alignment. + * + * @param string $vAlign + * + * @return int + */ + private static function mapVAlign($vAlign) + { + if (isset(self::$mapVAlignments[$vAlign])) { + return self::$mapVAlignments[$vAlign]; + } + + return 2; + } + + /** + * Map to BIFF8 codes for text rotation angle. + * + * @param int $textRotation + * + * @return int + */ + private static function mapTextRotation($textRotation) + { + if ($textRotation >= 0) { + return $textRotation; + } elseif ($textRotation == -165) { + return 255; + } elseif ($textRotation < 0) { + return 90 - $textRotation; + } + } + + /** + * Map locked. + * + * @param string $locked + * + * @return int + */ + private static function mapLocked($locked) + { + switch ($locked) { + case Protection::PROTECTION_INHERIT: + return 1; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 1; + } + } + + /** + * Map hidden. + * + * @param string $hidden + * + * @return int + */ + private static function mapHidden($hidden) + { + switch ($hidden) { + case Protection::PROTECTION_INHERIT: + return 0; + case Protection::PROTECTION_PROTECTED: + return 1; + case Protection::PROTECTION_UNPROTECTED: + return 0; + default: + return 0; + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php new file mode 100755 index 0000000..5889763 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php @@ -0,0 +1,558 @@ +setSpreadsheet($spreadsheet); + + $writerPartsArray = [ + 'stringtable' => StringTable::class, + 'contenttypes' => ContentTypes::class, + 'docprops' => DocProps::class, + 'rels' => Rels::class, + 'theme' => Theme::class, + 'style' => Style::class, + 'workbook' => Workbook::class, + 'worksheet' => Worksheet::class, + 'drawing' => Drawing::class, + 'comments' => Comments::class, + 'chart' => Chart::class, + 'relsvba' => RelsVBA::class, + 'relsribbonobjects' => RelsRibbon::class, + ]; + + // Initialise writer parts + // and Assign their parent IWriters + foreach ($writerPartsArray as $writer => $class) { + $this->writerParts[$writer] = new $class($this); + } + + $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable', + 'bordersHashTable', 'numFmtHashTable', 'drawingHashTable', + 'styleHashTable', + ]; + + // Set HashTable variables + foreach ($hashTablesArray as $tableName) { + $this->$tableName = new HashTable(); + } + } + + /** + * Get writer part. + * + * @param string $pPartName Writer part name + * + * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart + */ + public function getWriterPart($pPartName) + { + if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { + return $this->writerParts[strtolower($pPartName)]; + } + + return null; + } + + /** + * Save PhpSpreadsheet to file. + * + * @param string $pFilename + * + * @throws WriterException + */ + public function save($pFilename) + { + if ($this->spreadSheet !== null) { + // garbage collect + $this->spreadSheet->garbageCollect(); + + // If $pFilename is php://output or php://stdout, make it a temporary file... + $originalFilename = $pFilename; + if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { + $pFilename = @tempnam(File::sysGetTempDir(), 'phpxltmp'); + if ($pFilename == '') { + $pFilename = $originalFilename; + } + } + + $saveDebugLog = Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog(); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false); + $saveDateReturnType = Functions::getReturnDateType(); + Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); + + // Create string lookup table + $this->stringTable = []; + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $this->stringTable = $this->getWriterPart('StringTable')->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable); + } + + // Create styles dictionaries + $this->styleHashTable->addFromSource($this->getWriterPart('Style')->allStyles($this->spreadSheet)); + $this->stylesConditionalHashTable->addFromSource($this->getWriterPart('Style')->allConditionalStyles($this->spreadSheet)); + $this->fillHashTable->addFromSource($this->getWriterPart('Style')->allFills($this->spreadSheet)); + $this->fontHashTable->addFromSource($this->getWriterPart('Style')->allFonts($this->spreadSheet)); + $this->bordersHashTable->addFromSource($this->getWriterPart('Style')->allBorders($this->spreadSheet)); + $this->numFmtHashTable->addFromSource($this->getWriterPart('Style')->allNumberFormats($this->spreadSheet)); + + // Create drawing dictionary + $this->drawingHashTable->addFromSource($this->getWriterPart('Drawing')->allDrawings($this->spreadSheet)); + + $zip = new ZipArchive(); + + if (file_exists($pFilename)) { + unlink($pFilename); + } + // Try opening the ZIP file + if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { + if ($zip->open($pFilename, ZipArchive::CREATE) !== true) { + throw new WriterException('Could not open ' . $pFilename . ' for writing.'); + } + } + + // Add [Content_Types].xml to ZIP file + $zip->addFromString('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); + + //if hasMacros, add the vbaProject.bin file, Certificate file(if exists) + if ($this->spreadSheet->hasMacros()) { + $macrosCode = $this->spreadSheet->getMacrosCode(); + if ($macrosCode !== null) { + // we have the code ? + $zip->addFromString('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin + if ($this->spreadSheet->hasMacrosCertificate()) { + //signed macros ? + // Yes : add the certificate file and the related rels file + $zip->addFromString('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate()); + $zip->addFromString('xl/_rels/vbaProject.bin.rels', $this->getWriterPart('RelsVBA')->writeVBARelationships($this->spreadSheet)); + } + } + } + //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels) + if ($this->spreadSheet->hasRibbon()) { + $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target'); + $zip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); + if ($this->spreadSheet->hasRibbonBinObjects()) { + $tmpRootPath = dirname($tmpRibbonTarget) . '/'; + $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write + foreach ($ribbonBinObjects as $aPath => $aContent) { + $zip->addFromString($tmpRootPath . $aPath, $aContent); + } + //the rels for files + $zip->addFromString($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); + } + } + + // Add relationships to ZIP file + $zip->addFromString('_rels/.rels', $this->getWriterPart('Rels')->writeRelationships($this->spreadSheet)); + $zip->addFromString('xl/_rels/workbook.xml.rels', $this->getWriterPart('Rels')->writeWorkbookRelationships($this->spreadSheet)); + + // Add document properties to ZIP file + $zip->addFromString('docProps/app.xml', $this->getWriterPart('DocProps')->writeDocPropsApp($this->spreadSheet)); + $zip->addFromString('docProps/core.xml', $this->getWriterPart('DocProps')->writeDocPropsCore($this->spreadSheet)); + $customPropertiesPart = $this->getWriterPart('DocProps')->writeDocPropsCustom($this->spreadSheet); + if ($customPropertiesPart !== null) { + $zip->addFromString('docProps/custom.xml', $customPropertiesPart); + } + + // Add theme to ZIP file + $zip->addFromString('xl/theme/theme1.xml', $this->getWriterPart('Theme')->writeTheme($this->spreadSheet)); + + // Add string table to ZIP file + $zip->addFromString('xl/sharedStrings.xml', $this->getWriterPart('StringTable')->writeStringTable($this->stringTable)); + + // Add styles to ZIP file + $zip->addFromString('xl/styles.xml', $this->getWriterPart('Style')->writeStyles($this->spreadSheet)); + + // Add workbook to ZIP file + $zip->addFromString('xl/workbook.xml', $this->getWriterPart('Workbook')->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas)); + + $chartCount = 0; + // Add worksheets + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + $zip->addFromString('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); + if ($this->includeCharts) { + $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); + if (count($charts) > 0) { + foreach ($charts as $chart) { + $zip->addFromString('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); + ++$chartCount; + } + } + } + } + + $chartRef1 = 0; + // Add worksheet relationships (drawings, ...) + for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { + // Add relationships + $zip->addFromString('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); + + // Add unparsedLoadedData + $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName(); + $unparsedLoadedData = $this->spreadSheet->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'] as $ctrlProp) { + $zip->addFromString($ctrlProp['filePath'], $ctrlProp['content']); + } + } + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'] as $ctrlProp) { + $zip->addFromString($ctrlProp['filePath'], $ctrlProp['content']); + } + } + + $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + if ($this->includeCharts) { + $chartCount = $this->spreadSheet->getSheet($i)->getChartCount(); + } + + // Add drawing and image relationship parts + if (($drawingCount > 0) || ($chartCount > 0)) { + // Drawing relationships + $zip->addFromString('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); + + // Drawings + $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } elseif (isset($unparsedLoadedData['sheets'][$sheetCodeName]['drawingAlternateContents'])) { + // Drawings + $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); + } + + // Add unparsed drawings + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['Drawings'] as $relId => $drawingXml) { + $drawingFile = array_search($relId, $unparsedLoadedData['sheets'][$sheetCodeName]['drawingOriginalIds']); + if ($drawingFile !== false) { + $drawingFile = ltrim($drawingFile, '.'); + $zip->addFromString('xl' . $drawingFile, $drawingXml); + } + } + } + + // Add comment relationship parts + if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { + // VML Comments + $zip->addFromString('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); + + // Comments + $zip->addFromString('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); + } + + // Add unparsed relationship parts + if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'])) { + foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['vmlDrawings'] as $vmlDrawing) { + $zip->addFromString($vmlDrawing['filePath'], $vmlDrawing['content']); + } + } + + // Add header/footer relationship parts + if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + // VML Drawings + $zip->addFromString('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); + + // VML Drawing relationships + $zip->addFromString('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); + + // Media + foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + $zip->addFromString('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); + } + } + } + + // Add media + for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { + if ($this->getDrawingHashTable()->getByIndex($i) instanceof WorksheetDrawing) { + $imageContents = null; + $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath(); + if (strpos($imagePath, 'zip://') !== false) { + $imagePath = substr($imagePath, 6); + $imagePathSplitted = explode('#', $imagePath); + + $imageZip = new ZipArchive(); + $imageZip->open($imagePathSplitted[0]); + $imageContents = $imageZip->getFromName($imagePathSplitted[1]); + $imageZip->close(); + unset($imageZip); + } else { + $imageContents = file_get_contents($imagePath); + } + + $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + ob_start(); + call_user_func( + $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction(), + $this->getDrawingHashTable()->getByIndex($i)->getImageResource() + ); + $imageContents = ob_get_contents(); + ob_end_clean(); + + $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); + } + } + + Functions::setReturnDateType($saveDateReturnType); + Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); + + // Close file + if ($zip->close() === false) { + throw new WriterException("Could not close zip file $pFilename."); + } + + // If a temporary file was used, copy it to the correct file stream + if ($originalFilename != $pFilename) { + if (copy($pFilename, $originalFilename) === false) { + throw new WriterException("Could not copy temporary zip file $pFilename to $originalFilename."); + } + @unlink($pFilename); + } + } else { + throw new WriterException('PhpSpreadsheet object unassigned.'); + } + } + + /** + * Get Spreadsheet object. + * + * @throws WriterException + * + * @return Spreadsheet + */ + public function getSpreadsheet() + { + if ($this->spreadSheet !== null) { + return $this->spreadSheet; + } + + throw new WriterException('No Spreadsheet object assigned.'); + } + + /** + * Set Spreadsheet object. + * + * @param Spreadsheet $spreadsheet PhpSpreadsheet object + * + * @return Xlsx + */ + public function setSpreadsheet(Spreadsheet $spreadsheet) + { + $this->spreadSheet = $spreadsheet; + + return $this; + } + + /** + * Get string table. + * + * @return string[] + */ + public function getStringTable() + { + return $this->stringTable; + } + + /** + * Get Style HashTable. + * + * @return HashTable + */ + public function getStyleHashTable() + { + return $this->styleHashTable; + } + + /** + * Get Conditional HashTable. + * + * @return HashTable + */ + public function getStylesConditionalHashTable() + { + return $this->stylesConditionalHashTable; + } + + /** + * Get Fill HashTable. + * + * @return HashTable + */ + public function getFillHashTable() + { + return $this->fillHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Style\Font HashTable. + * + * @return HashTable + */ + public function getFontHashTable() + { + return $this->fontHashTable; + } + + /** + * Get Borders HashTable. + * + * @return HashTable + */ + public function getBordersHashTable() + { + return $this->bordersHashTable; + } + + /** + * Get NumberFormat HashTable. + * + * @return HashTable + */ + public function getNumFmtHashTable() + { + return $this->numFmtHashTable; + } + + /** + * Get \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\BaseDrawing HashTable. + * + * @return HashTable + */ + public function getDrawingHashTable() + { + return $this->drawingHashTable; + } + + /** + * Get Office2003 compatibility. + * + * @return bool + */ + public function getOffice2003Compatibility() + { + return $this->office2003compatibility; + } + + /** + * Set Office2003 compatibility. + * + * @param bool $pValue Office2003 compatibility? + * + * @return Xlsx + */ + public function setOffice2003Compatibility($pValue) + { + $this->office2003compatibility = $pValue; + + return $this; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php new file mode 100755 index 0000000..625fd16 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -0,0 +1,1541 @@ +calculateCellValues = $calculateCellValues; + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + // Ensure that data series values are up-to-date before we save + if ($this->calculateCellValues) { + $pChart->refresh(); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // c:chartSpace + $objWriter->startElement('c:chartSpace'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->startElement('c:date1904'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + $objWriter->startElement('c:lang'); + $objWriter->writeAttribute('val', 'en-GB'); + $objWriter->endElement(); + $objWriter->startElement('c:roundedCorners'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writeAlternateContent($objWriter); + + $objWriter->startElement('c:chart'); + + $this->writeTitle($objWriter, $pChart->getTitle()); + + $objWriter->startElement('c:autoTitleDeleted'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $this->writePlotArea($objWriter, $pChart->getWorksheet(), $pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines()); + + $this->writeLegend($objWriter, $pChart->getLegend()); + + $objWriter->startElement('c:plotVisOnly'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + + $objWriter->startElement('c:dispBlanksAs'); + $objWriter->writeAttribute('val', 'gap'); + $objWriter->endElement(); + + $objWriter->startElement('c:showDLblsOverMax'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + $this->writePrintSettings($objWriter); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Chart Title. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $title + * + * @throws WriterException + */ + private function writeTitle(XMLWriter $objWriter, Title $title = null) + { + if ($title === null) { + return; + } + + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + + $caption = $title->getCaption(); + if ((is_array($caption)) && (count($caption) > 0)) { + $caption = $caption[0]; + } + $this->getParentWriter()->getWriterPart('stringtable')->writeRichTextForCharts($objWriter, $caption, 'a'); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $title->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Legend. + * + * @param XMLWriter $objWriter XML Writer + * @param Legend $legend + * + * @throws WriterException + */ + private function writeLegend(XMLWriter $objWriter, Legend $legend = null) + { + if ($legend === null) { + return; + } + + $objWriter->startElement('c:legend'); + + $objWriter->startElement('c:legendPos'); + $objWriter->writeAttribute('val', $legend->getPosition()); + $objWriter->endElement(); + + $this->writeLayout($objWriter, $legend->getLayout()); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0'); + $objWriter->endElement(); + + $objWriter->startElement('c:txPr'); + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:pPr'); + $objWriter->writeAttribute('rtl', 0); + + $objWriter->startElement('a:defRPr'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:endParaRPr'); + $objWriter->writeAttribute('lang', 'en-US'); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Chart Plot Area. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet + * @param PlotArea $plotArea + * @param Title $xAxisLabel + * @param Title $yAxisLabel + * @param Axis $xAxis + * @param Axis $yAxis + * @param null|GridLines $majorGridlines + * @param null|GridLines $minorGridlines + * + * @throws WriterException + */ + private function writePlotArea(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet, PlotArea $plotArea, Title $xAxisLabel = null, Title $yAxisLabel = null, Axis $xAxis = null, Axis $yAxis = null, GridLines $majorGridlines = null, GridLines $minorGridlines = null) + { + if ($plotArea === null) { + return; + } + + $id1 = $id2 = 0; + $this->seriesIndex = 0; + $objWriter->startElement('c:plotArea'); + + $layout = $plotArea->getLayout(); + + $this->writeLayout($objWriter, $layout); + + $chartTypes = self::getChartType($plotArea); + $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; + $plotGroupingType = ''; + foreach ($chartTypes as $chartType) { + $objWriter->startElement('c:' . $chartType); + + $groupCount = $plotArea->getPlotGroupCount(); + for ($i = 0; $i < $groupCount; ++$i) { + $plotGroup = $plotArea->getPlotGroupByIndex($i); + $groupType = $plotGroup->getPlotType(); + if ($groupType == $chartType) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($groupType === DataSeries::TYPE_RADARCHART) { + $objWriter->startElement('c:radarStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } elseif ($groupType === DataSeries::TYPE_SCATTERCHART) { + $objWriter->startElement('c:scatterStyle'); + $objWriter->writeAttribute('val', $plotStyle); + $objWriter->endElement(); + } + + $this->writePlotGroup($plotGroup, $chartType, $objWriter, $catIsMultiLevelSeries, $valIsMultiLevelSeries, $plotGroupingType); + } + } + + $this->writeDataLabels($objWriter, $layout); + + if ($chartType === DataSeries::TYPE_LINECHART) { + // Line only, Line3D can't be smoothed + $objWriter->startElement('c:smooth'); + $objWriter->writeAttribute('val', (int) $plotGroup->getSmoothLine()); + $objWriter->endElement(); + } elseif (($chartType === DataSeries::TYPE_BARCHART) || ($chartType === DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 150); + $objWriter->endElement(); + + if ($plotGroupingType == 'percentStacked' || $plotGroupingType == 'stacked') { + $objWriter->startElement('c:overlap'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + } + } elseif ($chartType === DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:bubbleScale'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + + $objWriter->startElement('c:showNegBubbles'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } elseif ($chartType === DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('c:hiLowLines'); + $objWriter->endElement(); + + $objWriter->startElement('c:upDownBars'); + + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', 300); + $objWriter->endElement(); + + $objWriter->startElement('c:upBars'); + $objWriter->endElement(); + + $objWriter->startElement('c:downBars'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // Generate 2 unique numbers to use for axId values + $id1 = '75091328'; + $id2 = '75089408'; + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:firstSliceAng'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + if ($chartType === DataSeries::TYPE_DONUTCHART) { + $objWriter->startElement('c:holeSize'); + $objWriter->writeAttribute('val', 50); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + if (($chartType !== DataSeries::TYPE_PIECHART) && ($chartType !== DataSeries::TYPE_PIECHART_3D) && ($chartType !== DataSeries::TYPE_DONUTCHART)) { + if ($chartType === DataSeries::TYPE_BUBBLECHART) { + $this->writeValueAxis($objWriter, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } else { + $this->writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $catIsMultiLevelSeries, $yAxis); + } + + $this->writeValueAxis($objWriter, $yAxisLabel, $chartType, $id1, $id2, $valIsMultiLevelSeries, $xAxis, $majorGridlines, $minorGridlines); + } + + $objWriter->endElement(); + } + + /** + * Write Data Labels. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Chart\Layout $chartLayout Chart layout + */ + private function writeDataLabels(XMLWriter $objWriter, Layout $chartLayout = null) + { + $objWriter->startElement('c:dLbls'); + + $objWriter->startElement('c:showLegendKey'); + $showLegendKey = (empty($chartLayout)) ? 0 : $chartLayout->getShowLegendKey(); + $objWriter->writeAttribute('val', ((empty($showLegendKey)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showVal'); + $showVal = (empty($chartLayout)) ? 0 : $chartLayout->getShowVal(); + $objWriter->writeAttribute('val', ((empty($showVal)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showCatName'); + $showCatName = (empty($chartLayout)) ? 0 : $chartLayout->getShowCatName(); + $objWriter->writeAttribute('val', ((empty($showCatName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showSerName'); + $showSerName = (empty($chartLayout)) ? 0 : $chartLayout->getShowSerName(); + $objWriter->writeAttribute('val', ((empty($showSerName)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showPercent'); + $showPercent = (empty($chartLayout)) ? 0 : $chartLayout->getShowPercent(); + $objWriter->writeAttribute('val', ((empty($showPercent)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showBubbleSize'); + $showBubbleSize = (empty($chartLayout)) ? 0 : $chartLayout->getShowBubbleSize(); + $objWriter->writeAttribute('val', ((empty($showBubbleSize)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->startElement('c:showLeaderLines'); + $showLeaderLines = (empty($chartLayout)) ? 1 : $chartLayout->getShowLeaderLines(); + $objWriter->writeAttribute('val', ((empty($showLeaderLines)) ? 0 : 1)); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Category Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $xAxisLabel + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + * @param Axis $yAxis + * + * @throws WriterException + */ + private function writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $isMultiLevelSeries, Axis $yAxis) + { + $objWriter->startElement('c:catAx'); + + if ($id1 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id1); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('orientation')); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'b'); + $objWriter->endElement(); + + if ($xAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $xAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $layout = $xAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $yAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $yAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + if ($id2 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:auto'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + + $objWriter->startElement('c:lblAlgn'); + $objWriter->writeAttribute('val', 'ctr'); + $objWriter->endElement(); + + $objWriter->startElement('c:lblOffset'); + $objWriter->writeAttribute('val', 100); + $objWriter->endElement(); + + if ($isMultiLevelSeries) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Value Axis. + * + * @param XMLWriter $objWriter XML Writer + * @param Title $yAxisLabel + * @param string $groupType Chart type + * @param string $id1 + * @param string $id2 + * @param bool $isMultiLevelSeries + * @param Axis $xAxis + * @param GridLines $majorGridlines + * @param GridLines $minorGridlines + * + * @throws WriterException + */ + private function writeValueAxis($objWriter, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, Axis $xAxis, GridLines $majorGridlines, GridLines $minorGridlines) + { + $objWriter->startElement('c:valAx'); + + if ($id2 > 0) { + $objWriter->startElement('c:axId'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + } + + $objWriter->startElement('c:scaling'); + + if ($xAxis->getAxisOptionsProperty('maximum') !== null) { + $objWriter->startElement('c:max'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('maximum')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minimum') !== null) { + $objWriter->startElement('c:min'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minimum')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:delete'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:axPos'); + $objWriter->writeAttribute('val', 'l'); + $objWriter->endElement(); + + $objWriter->startElement('c:majorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($majorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$majorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $majorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($majorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($majorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + $objWriter->startElement('a:effectLst'); + + if ($majorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $majorGridlines->getGlowSize()); + $objWriter->startElement("a:{$majorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($majorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$majorGridlines->getShadowProperty('effect')}"); + if ($majorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $majorGridlines->getShadowProperty('blur')); + } + if ($majorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $majorGridlines->getShadowProperty('distance')); + } + if ($majorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $majorGridlines->getShadowProperty('direction')); + } + if ($majorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $majorGridlines->getShadowProperty('algn')); + } + if ($majorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $majorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($majorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $majorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($majorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $majorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($majorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $majorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$majorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'value'])); + + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($majorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $majorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end majorGridLines + + if ($minorGridlines->getObjectState()) { + $objWriter->startElement('c:minorGridlines'); + $objWriter->startElement('c:spPr'); + + if ($minorGridlines->getLineColorProperty('value') !== null) { + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleProperty('width')); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement("a:{$minorGridlines->getLineColorProperty('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end srgbClr + $objWriter->endElement(); //end solidFill + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $minorGridlines->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($minorGridlines->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('head', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('head', 'len')); + $objWriter->endElement(); + } + + if ($minorGridlines->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('end', 'w')); + $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('end', 'len')); + $objWriter->endElement(); + } + $objWriter->endElement(); //end ln + } + + $objWriter->startElement('a:effectLst'); + + if ($minorGridlines->getGlowSize() !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $minorGridlines->getGlowSize()); + $objWriter->startElement("a:{$minorGridlines->getGlowColor('type')}"); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('alpha')); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end schemeClr + $objWriter->endElement(); //end glow + } + + if ($minorGridlines->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$minorGridlines->getShadowProperty('effect')}"); + if ($minorGridlines->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $minorGridlines->getShadowProperty('blur')); + } + if ($minorGridlines->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $minorGridlines->getShadowProperty('distance')); + } + if ($minorGridlines->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $minorGridlines->getShadowProperty('direction')); + } + if ($minorGridlines->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $minorGridlines->getShadowProperty('algn')); + } + if ($minorGridlines->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $minorGridlines->getShadowProperty(['size', 'sx'])); + } + if ($minorGridlines->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $minorGridlines->getShadowProperty(['size', 'sy'])); + } + if ($minorGridlines->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $minorGridlines->getShadowProperty(['size', 'kx'])); + } + if ($minorGridlines->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $minorGridlines->getShadowProperty('rotWithShape')); + } + $objWriter->startElement("a:{$minorGridlines->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); //end alpha + $objWriter->endElement(); //end color:type + $objWriter->endElement(); //end shadow + } + + if ($minorGridlines->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $minorGridlines->getSoftEdgesSize()); + $objWriter->endElement(); //end softEdge + } + + $objWriter->endElement(); //end effectLst + $objWriter->endElement(); //end spPr + $objWriter->endElement(); //end minorGridLines + } + + if ($yAxisLabel !== null) { + $objWriter->startElement('c:title'); + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:rich'); + + $objWriter->startElement('a:bodyPr'); + $objWriter->endElement(); + + $objWriter->startElement('a:lstStyle'); + $objWriter->endElement(); + + $objWriter->startElement('a:p'); + $objWriter->startElement('a:r'); + + $caption = $yAxisLabel->getCaption(); + if (is_array($caption)) { + $caption = $caption[0]; + } + + $objWriter->startElement('a:t'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($caption)); + $objWriter->endElement(); + + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $layout = $yAxisLabel->getLayout(); + $this->writeLayout($objWriter, $layout); + } + + $objWriter->startElement('c:overlay'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + $objWriter->startElement('c:numFmt'); + $objWriter->writeAttribute('formatCode', $xAxis->getAxisNumberFormat()); + $objWriter->writeAttribute('sourceLinked', $xAxis->getAxisNumberSourceLinked()); + $objWriter->endElement(); + + $objWriter->startElement('c:majorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:minorTickMark'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_tick_mark')); + $objWriter->endElement(); + + $objWriter->startElement('c:tickLblPos'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('axis_labels')); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + + if ($xAxis->getFillProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:ln'); + + $objWriter->writeAttribute('w', $xAxis->getLineStyleProperty('width')); + $objWriter->writeAttribute('cap', $xAxis->getLineStyleProperty('cap')); + $objWriter->writeAttribute('cmpd', $xAxis->getLineStyleProperty('compound')); + + if ($xAxis->getLineProperty('value') !== null) { + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', $xAxis->getLineStyleProperty('dash')); + $objWriter->endElement(); + + if ($xAxis->getLineStyleProperty('join') == 'miter') { + $objWriter->startElement('a:miter'); + $objWriter->writeAttribute('lim', '800000'); + $objWriter->endElement(); + } else { + $objWriter->startElement('a:bevel'); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'head', 'type']) !== null) { + $objWriter->startElement('a:headEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'head', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('head')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('head')); + $objWriter->endElement(); + } + + if ($xAxis->getLineStyleProperty(['arrow', 'end', 'type']) !== null) { + $objWriter->startElement('a:tailEnd'); + $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(['arrow', 'end', 'type'])); + $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('end')); + $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('end')); + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->startElement('a:effectLst'); + + if ($xAxis->getGlowProperty('size') !== null) { + $objWriter->startElement('a:glow'); + $objWriter->writeAttribute('rad', $xAxis->getGlowProperty('size')); + $objWriter->startElement("a:{$xAxis->getGlowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getGlowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($xAxis->getShadowProperty('presets') !== null) { + $objWriter->startElement("a:{$xAxis->getShadowProperty('effect')}"); + + if ($xAxis->getShadowProperty('blur') !== null) { + $objWriter->writeAttribute('blurRad', $xAxis->getShadowProperty('blur')); + } + if ($xAxis->getShadowProperty('distance') !== null) { + $objWriter->writeAttribute('dist', $xAxis->getShadowProperty('distance')); + } + if ($xAxis->getShadowProperty('direction') !== null) { + $objWriter->writeAttribute('dir', $xAxis->getShadowProperty('direction')); + } + if ($xAxis->getShadowProperty('algn') !== null) { + $objWriter->writeAttribute('algn', $xAxis->getShadowProperty('algn')); + } + if ($xAxis->getShadowProperty(['size', 'sx']) !== null) { + $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(['size', 'sx'])); + } + if ($xAxis->getShadowProperty(['size', 'sy']) !== null) { + $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(['size', 'sy'])); + } + if ($xAxis->getShadowProperty(['size', 'kx']) !== null) { + $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(['size', 'kx'])); + } + if ($xAxis->getShadowProperty('rotWithShape') !== null) { + $objWriter->writeAttribute('rotWithShape', $xAxis->getShadowProperty('rotWithShape')); + } + + $objWriter->startElement("a:{$xAxis->getShadowProperty(['color', 'type'])}"); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'value'])); + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $xAxis->getShadowProperty(['color', 'alpha'])); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + if ($xAxis->getSoftEdgesSize() !== null) { + $objWriter->startElement('a:softEdge'); + $objWriter->writeAttribute('rad', $xAxis->getSoftEdgesSize()); + $objWriter->endElement(); + } + + $objWriter->endElement(); //effectList + $objWriter->endElement(); //end spPr + + if ($id1 > 0) { + $objWriter->startElement('c:crossAx'); + $objWriter->writeAttribute('val', $id2); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('horizontal_crosses_value') !== null) { + $objWriter->startElement('c:crossesAt'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses_value')); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:crosses'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses')); + $objWriter->endElement(); + } + + $objWriter->startElement('c:crossBetween'); + $objWriter->writeAttribute('val', 'midCat'); + $objWriter->endElement(); + + if ($xAxis->getAxisOptionsProperty('major_unit') !== null) { + $objWriter->startElement('c:majorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_unit')); + $objWriter->endElement(); + } + + if ($xAxis->getAxisOptionsProperty('minor_unit') !== null) { + $objWriter->startElement('c:minorUnit'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_unit')); + $objWriter->endElement(); + } + } + + if ($isMultiLevelSeries) { + if ($groupType !== DataSeries::TYPE_BUBBLECHART) { + $objWriter->startElement('c:noMultiLvlLbl'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Get the data series type(s) for a chart plot series. + * + * @param PlotArea $plotArea + * + * @throws WriterException + * + * @return array|string + */ + private static function getChartType($plotArea) + { + $groupCount = $plotArea->getPlotGroupCount(); + + if ($groupCount == 1) { + $chartType = [$plotArea->getPlotGroupByIndex(0)->getPlotType()]; + } else { + $chartTypes = []; + for ($i = 0; $i < $groupCount; ++$i) { + $chartTypes[] = $plotArea->getPlotGroupByIndex($i)->getPlotType(); + } + $chartType = array_unique($chartTypes); + if (count($chartTypes) == 0) { + throw new WriterException('Chart is not yet implemented'); + } + } + + return $chartType; + } + + /** + * Method writing plot series values. + * + * @param XMLWriter $objWriter XML Writer + * @param int $val value for idx (default: 3) + * @param string $fillColor hex color (default: FF9900) + * + * @return XMLWriter XML Writer + */ + private function writePlotSeriesValuesElement($objWriter, $val = 3, $fillColor = 'FF9900') + { + $objWriter->startElement('c:dPt'); + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $val); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter; + } + + /** + * Write Plot Group (series of related plots). + * + * @param DataSeries $plotGroup + * @param string $groupType Type of plot for dataseries + * @param XMLWriter $objWriter XML Writer + * @param bool &$catIsMultiLevelSeries Is category a multi-series category + * @param bool &$valIsMultiLevelSeries Is value set a multi-series set + * @param string &$plotGroupingType Type of grouping for multi-series values + * + * @throws WriterException + */ + private function writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType) + { + if ($plotGroup === null) { + return; + } + + if (($groupType == DataSeries::TYPE_BARCHART) || ($groupType == DataSeries::TYPE_BARCHART_3D)) { + $objWriter->startElement('c:barDir'); + $objWriter->writeAttribute('val', $plotGroup->getPlotDirection()); + $objWriter->endElement(); + } + + if ($plotGroup->getPlotGrouping() !== null) { + $plotGroupingType = $plotGroup->getPlotGrouping(); + $objWriter->startElement('c:grouping'); + $objWriter->writeAttribute('val', $plotGroupingType); + $objWriter->endElement(); + } + + // Get these details before the loop, because we can use the count to check for varyColors + $plotSeriesOrder = $plotGroup->getPlotOrder(); + $plotSeriesCount = count($plotSeriesOrder); + + if (($groupType !== DataSeries::TYPE_RADARCHART) && ($groupType !== DataSeries::TYPE_STOCKCHART)) { + if ($groupType !== DataSeries::TYPE_LINECHART) { + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 1); + $objWriter->endElement(); + } else { + $objWriter->startElement('c:varyColors'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + } + } + + foreach ($plotSeriesOrder as $plotSeriesIdx => $plotSeriesRef) { + $objWriter->startElement('c:ser'); + + $plotLabel = $plotGroup->getPlotLabelByIndex($plotSeriesIdx); + if ($plotLabel) { + $fillColor = $plotLabel->getFillColor(); + if ($fillColor !== null && !is_array($fillColor)) { + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:solidFill'); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $fillColor); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:idx'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesIdx); + $objWriter->endElement(); + + $objWriter->startElement('c:order'); + $objWriter->writeAttribute('val', $this->seriesIndex + $plotSeriesRef); + $objWriter->endElement(); + + // Values + $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + $fillColorValues = $plotSeriesValues->getFillColor(); + if ($fillColorValues !== null && is_array($fillColorValues)) { + foreach ($plotSeriesValues->getDataValues() as $dataKey => $dataValue) { + $this->writePlotSeriesValuesElement($objWriter, $dataKey, (isset($fillColorValues[$dataKey]) ? $fillColorValues[$dataKey] : 'FF9900')); + } + } else { + $this->writePlotSeriesValuesElement($objWriter); + } + } + + // Labels + $plotSeriesLabel = $plotGroup->getPlotLabelByIndex($plotSeriesRef); + if ($plotSeriesLabel && ($plotSeriesLabel->getPointCount() > 0)) { + $objWriter->startElement('c:tx'); + $objWriter->startElement('c:strRef'); + $this->writePlotSeriesLabel($plotSeriesLabel, $objWriter); + $objWriter->endElement(); + $objWriter->endElement(); + } + + // Formatting for the points + if (($groupType == DataSeries::TYPE_LINECHART) || ($groupType == DataSeries::TYPE_STOCKCHART)) { + $plotLineWidth = 12700; + if ($plotSeriesValues) { + $plotLineWidth = $plotSeriesValues->getLineWidth(); + } + + $objWriter->startElement('c:spPr'); + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', $plotLineWidth); + if ($groupType == DataSeries::TYPE_STOCKCHART) { + $objWriter->startElement('a:noFill'); + $objWriter->endElement(); + } + $objWriter->endElement(); + $objWriter->endElement(); + } + + if ($plotSeriesValues) { + $plotSeriesMarker = $plotSeriesValues->getPointMarker(); + if ($plotSeriesMarker) { + $objWriter->startElement('c:marker'); + $objWriter->startElement('c:symbol'); + $objWriter->writeAttribute('val', $plotSeriesMarker); + $objWriter->endElement(); + + if ($plotSeriesMarker !== 'none') { + $objWriter->startElement('c:size'); + $objWriter->writeAttribute('val', 3); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + if (($groupType === DataSeries::TYPE_BARCHART) || ($groupType === DataSeries::TYPE_BARCHART_3D) || ($groupType === DataSeries::TYPE_BUBBLECHART)) { + $objWriter->startElement('c:invertIfNegative'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + // Category Labels + $plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesRef); + if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) { + $catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries(); + + if (($groupType == DataSeries::TYPE_PIECHART) || ($groupType == DataSeries::TYPE_PIECHART_3D) || ($groupType == DataSeries::TYPE_DONUTCHART)) { + if ($plotGroup->getPlotStyle() !== null) { + $plotStyle = $plotGroup->getPlotStyle(); + if ($plotStyle) { + $objWriter->startElement('c:explosion'); + $objWriter->writeAttribute('val', 25); + $objWriter->endElement(); + } + } + } + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:xVal'); + } else { + $objWriter->startElement('c:cat'); + } + + $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str'); + $objWriter->endElement(); + } + + // Values + if ($plotSeriesValues) { + $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries(); + + if (($groupType === DataSeries::TYPE_BUBBLECHART) || ($groupType === DataSeries::TYPE_SCATTERCHART)) { + $objWriter->startElement('c:yVal'); + } else { + $objWriter->startElement('c:val'); + } + + $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num'); + $objWriter->endElement(); + } + + if ($groupType === DataSeries::TYPE_BUBBLECHART) { + $this->writeBubbles($plotSeriesValues, $objWriter); + } + + $objWriter->endElement(); + } + + $this->seriesIndex += $plotSeriesIdx + 1; + } + + /** + * Write Plot Series Label. + * + * @param DataSeriesValues $plotSeriesLabel + * @param XMLWriter $objWriter XML Writer + */ + private function writePlotSeriesLabel($plotSeriesLabel, $objWriter) + { + if ($plotSeriesLabel === null) { + return; + } + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesLabel->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:strCache'); + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesLabel->getPointCount()); + $objWriter->endElement(); + + foreach ($plotSeriesLabel->getDataValues() as $plotLabelKey => $plotLabelValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotLabelKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotLabelValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + $objWriter->endElement(); + } + + /** + * Write Plot Series Values. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + * @param string $groupType Type of plot for dataseries + * @param string $dataType Datatype of series values + */ + private function writePlotSeriesValues($plotSeriesValues, XMLWriter $objWriter, $groupType, $dataType = 'str') + { + if ($plotSeriesValues === null) { + return; + } + + if ($plotSeriesValues->isMultiLevelSeries()) { + $levelCount = $plotSeriesValues->multiLevelCount(); + + $objWriter->startElement('c:multiLvlStrRef'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:multiLvlStrCache'); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + for ($level = 0; $level < $levelCount; ++$level) { + $objWriter->startElement('c:lvl'); + + foreach ($plotSeriesValues->getDataValues() as $plotSeriesKey => $plotSeriesValue) { + if (isset($plotSeriesValue[$level])) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue[$level]); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } else { + $objWriter->startElement('c:' . $dataType . 'Ref'); + + $objWriter->startElement('c:f'); + $objWriter->writeRawData($plotSeriesValues->getDataSource()); + $objWriter->endElement(); + + $objWriter->startElement('c:' . $dataType . 'Cache'); + + if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { + if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData($plotSeriesValues->getFormatCode()); + $objWriter->endElement(); + } + } + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + + $objWriter->startElement('c:v'); + $objWriter->writeRawData($plotSeriesValue); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Bubble Chart Details. + * + * @param DataSeriesValues $plotSeriesValues + * @param XMLWriter $objWriter XML Writer + */ + private function writeBubbles($plotSeriesValues, $objWriter) + { + if ($plotSeriesValues === null) { + return; + } + + $objWriter->startElement('c:bubbleSize'); + $objWriter->startElement('c:numLit'); + + $objWriter->startElement('c:formatCode'); + $objWriter->writeRawData('General'); + $objWriter->endElement(); + + $objWriter->startElement('c:ptCount'); + $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); + $objWriter->endElement(); + + $dataValues = $plotSeriesValues->getDataValues(); + if (!empty($dataValues)) { + if (is_array($dataValues)) { + foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { + $objWriter->startElement('c:pt'); + $objWriter->writeAttribute('idx', $plotSeriesKey); + $objWriter->startElement('c:v'); + $objWriter->writeRawData(1); + $objWriter->endElement(); + $objWriter->endElement(); + } + } + } + + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('c:bubble3D'); + $objWriter->writeAttribute('val', 0); + $objWriter->endElement(); + } + + /** + * Write Layout. + * + * @param XMLWriter $objWriter XML Writer + * @param Layout $layout + */ + private function writeLayout(XMLWriter $objWriter, Layout $layout = null) + { + $objWriter->startElement('c:layout'); + + if ($layout !== null) { + $objWriter->startElement('c:manualLayout'); + + $layoutTarget = $layout->getLayoutTarget(); + if ($layoutTarget !== null) { + $objWriter->startElement('c:layoutTarget'); + $objWriter->writeAttribute('val', $layoutTarget); + $objWriter->endElement(); + } + + $xMode = $layout->getXMode(); + if ($xMode !== null) { + $objWriter->startElement('c:xMode'); + $objWriter->writeAttribute('val', $xMode); + $objWriter->endElement(); + } + + $yMode = $layout->getYMode(); + if ($yMode !== null) { + $objWriter->startElement('c:yMode'); + $objWriter->writeAttribute('val', $yMode); + $objWriter->endElement(); + } + + $x = $layout->getXPosition(); + if ($x !== null) { + $objWriter->startElement('c:x'); + $objWriter->writeAttribute('val', $x); + $objWriter->endElement(); + } + + $y = $layout->getYPosition(); + if ($y !== null) { + $objWriter->startElement('c:y'); + $objWriter->writeAttribute('val', $y); + $objWriter->endElement(); + } + + $w = $layout->getWidth(); + if ($w !== null) { + $objWriter->startElement('c:w'); + $objWriter->writeAttribute('val', $w); + $objWriter->endElement(); + } + + $h = $layout->getHeight(); + if ($h !== null) { + $objWriter->startElement('c:h'); + $objWriter->writeAttribute('val', $h); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Alternate Content block. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeAlternateContent($objWriter) + { + $objWriter->startElement('mc:AlternateContent'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + + $objWriter->startElement('mc:Choice'); + $objWriter->writeAttribute('xmlns:c14', 'http://schemas.microsoft.com/office/drawing/2007/8/2/chart'); + $objWriter->writeAttribute('Requires', 'c14'); + + $objWriter->startElement('c14:style'); + $objWriter->writeAttribute('val', '102'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('mc:Fallback'); + $objWriter->startElement('c:style'); + $objWriter->writeAttribute('val', '2'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Printer Settings. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writePrintSettings($objWriter) + { + $objWriter->startElement('c:printSettings'); + + $objWriter->startElement('c:headerFooter'); + $objWriter->endElement(); + + $objWriter->startElement('c:pageMargins'); + $objWriter->writeAttribute('footer', 0.3); + $objWriter->writeAttribute('header', 0.3); + $objWriter->writeAttribute('r', 0.7); + $objWriter->writeAttribute('l', 0.7); + $objWriter->writeAttribute('t', 0.75); + $objWriter->writeAttribute('b', 0.75); + $objWriter->endElement(); + + $objWriter->startElement('c:pageSetup'); + $objWriter->writeAttribute('orientation', 'portrait'); + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php new file mode 100755 index 0000000..8b08f31 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Comments.php @@ -0,0 +1,242 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // Authors cache + $authors = []; + $authorId = 0; + foreach ($comments as $comment) { + if (!isset($authors[$comment->getAuthor()])) { + $authors[$comment->getAuthor()] = $authorId++; + } + } + + // comments + $objWriter->startElement('comments'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // Loop through authors + $objWriter->startElement('authors'); + foreach ($authors as $author => $index) { + $objWriter->writeElement('author', $author); + } + $objWriter->endElement(); + + // Loop through comments + $objWriter->startElement('commentList'); + foreach ($comments as $key => $value) { + $this->writeComment($objWriter, $key, $value, $authors); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference + * @param Comment $pComment Comment + * @param array $pAuthors Array of authors + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + */ + private function writeComment(XMLWriter $objWriter, $pCellReference, Comment $pComment, array $pAuthors) + { + // comment + $objWriter->startElement('comment'); + $objWriter->writeAttribute('ref', $pCellReference); + $objWriter->writeAttribute('authorId', $pAuthors[$pComment->getAuthor()]); + + // text + $objWriter->startElement('text'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write VML comments to XML format. + * + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * + * @return string XML Output + */ + public function writeVMLComments(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Comments cache + $comments = $pWorksheet->getComments(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t202'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '202'); + $objWriter->writeAttribute('path', 'm,l,21600r21600,l21600,xe'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through comments + foreach ($comments as $key => $value) { + $this->writeVMLComment($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pCellReference Cell reference, eg: 'A1' + * @param Comment $pComment Comment + */ + private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment) + { + // Metadata + list($column, $row) = Coordinate::coordinateFromString($pCellReference); + $column = Coordinate::columnIndexFromString($column); + $id = 1024 + $column + $row; + $id = substr($id, 0, 4); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t202'); + $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden')); + $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->writeAttribute('o:insetmode', 'auto'); + + // v:fill + $objWriter->startElement('v:fill'); + $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB()); + $objWriter->endElement(); + + // v:shadow + $objWriter->startElement('v:shadow'); + $objWriter->writeAttribute('on', 't'); + $objWriter->writeAttribute('color', 'black'); + $objWriter->writeAttribute('obscured', 't'); + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:connecttype', 'none'); + $objWriter->endElement(); + + // v:textbox + $objWriter->startElement('v:textbox'); + $objWriter->writeAttribute('style', 'mso-direction-alt:auto'); + + // div + $objWriter->startElement('div'); + $objWriter->writeAttribute('style', 'text-align:left'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // x:ClientData + $objWriter->startElement('x:ClientData'); + $objWriter->writeAttribute('ObjectType', 'Note'); + + // x:MoveWithCells + $objWriter->writeElement('x:MoveWithCells', ''); + + // x:SizeWithCells + $objWriter->writeElement('x:SizeWithCells', ''); + + // x:AutoFill + $objWriter->writeElement('x:AutoFill', 'False'); + + // x:Row + $objWriter->writeElement('x:Row', ($row - 1)); + + // x:Column + $objWriter->writeElement('x:Column', ($column - 1)); + + $objWriter->endElement(); + + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php new file mode 100755 index 0000000..6b22d71 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php @@ -0,0 +1,249 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Types + $objWriter->startElement('Types'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types'); + + // Theme + $this->writeOverrideContentType($objWriter, '/xl/theme/theme1.xml', 'application/vnd.openxmlformats-officedocument.theme+xml'); + + // Styles + $this->writeOverrideContentType($objWriter, '/xl/styles.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'); + + // Rels + $this->writeDefaultContentType($objWriter, 'rels', 'application/vnd.openxmlformats-package.relationships+xml'); + + // XML + $this->writeDefaultContentType($objWriter, 'xml', 'application/xml'); + + // VML + $this->writeDefaultContentType($objWriter, 'vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'); + + // Workbook + if ($spreadsheet->hasMacros()) { //Macros in workbook ? + // Yes : not standard content but "macroEnabled" + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'); + //... and define a new type for the VBA project + // Better use Override, because we can use 'bin' also for xl\printerSettings\printerSettings1.bin + $this->writeOverrideContentType($objWriter, '/xl/vbaProject.bin', 'application/vnd.ms-office.vbaProject'); + if ($spreadsheet->hasMacrosCertificate()) { + // signed macros ? + // Yes : add needed information + $this->writeOverrideContentType($objWriter, '/xl/vbaProjectSignature.bin', 'application/vnd.ms-office.vbaProjectSignature'); + } + } else { + // no macros in workbook, so standard type + $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'); + } + + // DocProps + $this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml'); + + $this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + $this->writeOverrideContentType($objWriter, '/docProps/custom.xml', 'application/vnd.openxmlformats-officedocument.custom-properties+xml'); + } + + // Worksheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'); + } + + // Shared strings + $this->writeOverrideContentType($objWriter, '/xl/sharedStrings.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'); + + // Add worksheet relationship content types + $unparsedLoadedData = $spreadsheet->getUnparsedLoadedData(); + $chart = 1; + for ($i = 0; $i < $sheetCount; ++$i) { + $drawings = $spreadsheet->getSheet($i)->getDrawingCollection(); + $drawingCount = count($drawings); + $chartCount = ($includeCharts) ? $spreadsheet->getSheet($i)->getChartCount() : 0; + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$spreadsheet->getSheet($i)->getCodeName()]['drawingOriginalIds']); + + // We need a drawing relationship for the worksheet if we have either drawings or charts + if (($drawingCount > 0) || ($chartCount > 0) || $hasUnparsedDrawing) { + $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml'); + } + + // If we have charts, then we need a chart relationship for every individual chart + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'); + } + } + } + + // Comments + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getComments()) > 0) { + $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'); + } + } + + // Add media content-types + $aMediaContentTypes = []; + $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count(); + for ($i = 0; $i < $mediaCount; ++$i) { + $extension = ''; + $mimeType = ''; + + if ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getExtension()); + $mimeType = $this->getImageMimeType($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getPath()); + } elseif ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { + $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType()); + $extension = explode('/', $extension); + $extension = $extension[1]; + + $mimeType = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType(); + } + + if (!isset($aMediaContentTypes[$extension])) { + $aMediaContentTypes[$extension] = $mimeType; + + $this->writeDefaultContentType($objWriter, $extension, $mimeType); + } + } + if ($spreadsheet->hasRibbonBinObjects()) { + // Some additional objects in the ribbon ? + // we need to write "Extension" but not already write for media content + $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes)); + foreach ($tabRibbonTypes as $aRibbonType) { + $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor + $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType); + } + } + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + if (count($spreadsheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { + foreach ($spreadsheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { + if (!isset($aMediaContentTypes[strtolower($image->getExtension())])) { + $aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath()); + + $this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]); + } + } + } + } + + // unparsed defaults + if (isset($unparsedLoadedData['default_content_types'])) { + foreach ($unparsedLoadedData['default_content_types'] as $extName => $contentType) { + $this->writeDefaultContentType($objWriter, $extName, $contentType); + } + } + + // unparsed overrides + if (isset($unparsedLoadedData['override_content_types'])) { + foreach ($unparsedLoadedData['override_content_types'] as $partName => $overrideType) { + $this->writeOverrideContentType($objWriter, $partName, $overrideType); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Get image mime type. + * + * @param string $pFile Filename + * + * @throws WriterException + * + * @return string Mime Type + */ + private function getImageMimeType($pFile) + { + if (File::fileExists($pFile)) { + $image = getimagesize($pFile); + + return image_type_to_mime_type($image[2]); + } + + throw new WriterException("File $pFile does not exist"); + } + + /** + * Write Default content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + * + * @throws WriterException + */ + private function writeDefaultContentType(XMLWriter $objWriter, $pPartname, $pContentType) + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Default'); + $objWriter->writeAttribute('Extension', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pPartname Part name + * @param string $pContentType Content type + * + * @throws WriterException + */ + private function writeOverrideContentType(XMLWriter $objWriter, $pPartname, $pContentType) + { + if ($pPartname != '' && $pContentType != '') { + // Write content type + $objWriter->startElement('Override'); + $objWriter->writeAttribute('PartName', $pPartname); + $objWriter->writeAttribute('ContentType', $pContentType); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php new file mode 100755 index 0000000..2a18d5c --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php @@ -0,0 +1,251 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Properties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + // Application + $objWriter->writeElement('Application', 'Microsoft Excel'); + + // DocSecurity + $objWriter->writeElement('DocSecurity', '0'); + + // ScaleCrop + $objWriter->writeElement('ScaleCrop', 'false'); + + // HeadingPairs + $objWriter->startElement('HeadingPairs'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', '2'); + $objWriter->writeAttribute('baseType', 'variant'); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:lpstr', 'Worksheets'); + $objWriter->endElement(); + + // Variant + $objWriter->startElement('vt:variant'); + $objWriter->writeElement('vt:i4', $spreadsheet->getSheetCount()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // TitlesOfParts + $objWriter->startElement('TitlesOfParts'); + + // Vector + $objWriter->startElement('vt:vector'); + $objWriter->writeAttribute('size', $spreadsheet->getSheetCount()); + $objWriter->writeAttribute('baseType', 'lpstr'); + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $objWriter->writeElement('vt:lpstr', $spreadsheet->getSheet($i)->getTitle()); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + + // Company + $objWriter->writeElement('Company', $spreadsheet->getProperties()->getCompany()); + + // Company + $objWriter->writeElement('Manager', $spreadsheet->getProperties()->getManager()); + + // LinksUpToDate + $objWriter->writeElement('LinksUpToDate', 'false'); + + // SharedDoc + $objWriter->writeElement('SharedDoc', 'false'); + + // HyperlinksChanged + $objWriter->writeElement('HyperlinksChanged', 'false'); + + // AppVersion + $objWriter->writeElement('AppVersion', '12.0000'); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/core.xml to XML format. + * + * @param Spreadsheet $spreadsheet + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * + * @return string XML Output + */ + public function writeDocPropsCore(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('cp:coreProperties'); + $objWriter->writeAttribute('xmlns:cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); + $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); + $objWriter->writeAttribute('xmlns:dcterms', 'http://purl.org/dc/terms/'); + $objWriter->writeAttribute('xmlns:dcmitype', 'http://purl.org/dc/dcmitype/'); + $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); + + // dc:creator + $objWriter->writeElement('dc:creator', $spreadsheet->getProperties()->getCreator()); + + // cp:lastModifiedBy + $objWriter->writeElement('cp:lastModifiedBy', $spreadsheet->getProperties()->getLastModifiedBy()); + + // dcterms:created + $objWriter->startElement('dcterms:created'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getCreated())); + $objWriter->endElement(); + + // dcterms:modified + $objWriter->startElement('dcterms:modified'); + $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); + $objWriter->writeRawData(date(DATE_W3C, $spreadsheet->getProperties()->getModified())); + $objWriter->endElement(); + + // dc:title + $objWriter->writeElement('dc:title', $spreadsheet->getProperties()->getTitle()); + + // dc:description + $objWriter->writeElement('dc:description', $spreadsheet->getProperties()->getDescription()); + + // dc:subject + $objWriter->writeElement('dc:subject', $spreadsheet->getProperties()->getSubject()); + + // cp:keywords + $objWriter->writeElement('cp:keywords', $spreadsheet->getProperties()->getKeywords()); + + // cp:category + $objWriter->writeElement('cp:category', $spreadsheet->getProperties()->getCategory()); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write docProps/custom.xml to XML format. + * + * @param Spreadsheet $spreadsheet + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * + * @return string XML Output + */ + public function writeDocPropsCustom(Spreadsheet $spreadsheet) + { + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (empty($customPropertyList)) { + return; + } + + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // cp:coreProperties + $objWriter->startElement('Properties'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties'); + $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); + + foreach ($customPropertyList as $key => $customProperty) { + $propertyValue = $spreadsheet->getProperties()->getCustomPropertyValue($customProperty); + $propertyType = $spreadsheet->getProperties()->getCustomPropertyType($customProperty); + + $objWriter->startElement('property'); + $objWriter->writeAttribute('fmtid', '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}'); + $objWriter->writeAttribute('pid', $key + 2); + $objWriter->writeAttribute('name', $customProperty); + + switch ($propertyType) { + case 'i': + $objWriter->writeElement('vt:i4', $propertyValue); + + break; + case 'f': + $objWriter->writeElement('vt:r8', $propertyValue); + + break; + case 'b': + $objWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false'); + + break; + case 'd': + $objWriter->startElement('vt:filetime'); + $objWriter->writeRawData(date(DATE_W3C, $propertyValue)); + $objWriter->endElement(); + + break; + default: + $objWriter->writeElement('vt:lpwstr', $propertyValue); + + break; + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php new file mode 100755 index 0000000..08256a1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php @@ -0,0 +1,519 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // xdr:wsDr + $objWriter->startElement('xdr:wsDr'); + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + + // Loop through images and write drawings + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + /** @var BaseDrawing $pDrawing */ + $pDrawing = $iterator->current(); + $pRelationId = $i; + $hlinkClickId = $pDrawing->getHyperlink() === null ? null : ++$i; + + $this->writeDrawing($objWriter, $pDrawing, $pRelationId, $hlinkClickId); + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + $chartCount = $pWorksheet->getChartCount(); + // Loop through charts and write the chart position + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c + $i); + } + } + } + + // unparsed AlternateContent + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'])) { + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingAlternateContents'] as $drawingAlternateContent) { + $objWriter->writeRaw($drawingAlternateContent); + } + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart + * @param int $pRelationId + */ + public function writeChart(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $pRelationId = -1) + { + $tl = $pChart->getTopLeftPosition(); + $tl['colRow'] = Coordinate::coordinateFromString($tl['cell']); + $br = $pChart->getBottomRightPosition(); + $br['colRow'] = Coordinate::coordinateFromString($br['cell']); + + $objWriter->startElement('xdr:twoCellAnchor'); + + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($tl['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['xOffset'])); + $objWriter->writeElement('xdr:row', $tl['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($tl['yOffset'])); + $objWriter->endElement(); + $objWriter->startElement('xdr:to'); + $objWriter->writeElement('xdr:col', Coordinate::columnIndexFromString($br['colRow'][0]) - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['xOffset'])); + $objWriter->writeElement('xdr:row', $br['colRow'][1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($br['yOffset'])); + $objWriter->endElement(); + + $objWriter->startElement('xdr:graphicFrame'); + $objWriter->writeAttribute('macro', ''); + $objWriter->startElement('xdr:nvGraphicFramePr'); + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('name', 'Chart ' . $pRelationId); + $objWriter->writeAttribute('id', 1025 * $pRelationId); + $objWriter->endElement(); + $objWriter->startElement('xdr:cNvGraphicFramePr'); + $objWriter->startElement('a:graphicFrameLocks'); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:xfrm'); + $objWriter->startElement('a:off'); + $objWriter->writeAttribute('x', '0'); + $objWriter->writeAttribute('y', '0'); + $objWriter->endElement(); + $objWriter->startElement('a:ext'); + $objWriter->writeAttribute('cx', '0'); + $objWriter->writeAttribute('cy', '0'); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('a:graphic'); + $objWriter->startElement('a:graphicData'); + $objWriter->writeAttribute('uri', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->startElement('c:chart'); + $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $pRelationId); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + $objWriter->endElement(); + + $objWriter->startElement('xdr:clientData'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write drawings to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param BaseDrawing $pDrawing + * @param int $pRelationId + * @param null|int $hlinkClickId + * + * @throws WriterException + */ + public function writeDrawing(XMLWriter $objWriter, BaseDrawing $pDrawing, $pRelationId = -1, $hlinkClickId = null) + { + if ($pRelationId >= 0) { + // xdr:oneCellAnchor + $objWriter->startElement('xdr:oneCellAnchor'); + // Image location + $aCoordinates = Coordinate::coordinateFromString($pDrawing->getCoordinates()); + $aCoordinates[0] = Coordinate::columnIndexFromString($aCoordinates[0]); + + // xdr:from + $objWriter->startElement('xdr:from'); + $objWriter->writeElement('xdr:col', $aCoordinates[0] - 1); + $objWriter->writeElement('xdr:colOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetX())); + $objWriter->writeElement('xdr:row', $aCoordinates[1] - 1); + $objWriter->writeElement('xdr:rowOff', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getOffsetY())); + $objWriter->endElement(); + + // xdr:ext + $objWriter->startElement('xdr:ext'); + $objWriter->writeAttribute('cx', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getWidth())); + $objWriter->writeAttribute('cy', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getHeight())); + $objWriter->endElement(); + + // xdr:pic + $objWriter->startElement('xdr:pic'); + + // xdr:nvPicPr + $objWriter->startElement('xdr:nvPicPr'); + + // xdr:cNvPr + $objWriter->startElement('xdr:cNvPr'); + $objWriter->writeAttribute('id', $pRelationId); + $objWriter->writeAttribute('name', $pDrawing->getName()); + $objWriter->writeAttribute('descr', $pDrawing->getDescription()); + + //a:hlinkClick + $this->writeHyperLinkDrawing($objWriter, $hlinkClickId); + + $objWriter->endElement(); + + // xdr:cNvPicPr + $objWriter->startElement('xdr:cNvPicPr'); + + // a:picLocks + $objWriter->startElement('a:picLocks'); + $objWriter->writeAttribute('noChangeAspect', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:blipFill + $objWriter->startElement('xdr:blipFill'); + + // a:blip + $objWriter->startElement('a:blip'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId); + $objWriter->endElement(); + + // a:stretch + $objWriter->startElement('a:stretch'); + $objWriter->writeElement('a:fillRect', null); + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:spPr + $objWriter->startElement('xdr:spPr'); + + // a:xfrm + $objWriter->startElement('a:xfrm'); + $objWriter->writeAttribute('rot', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getRotation())); + $objWriter->endElement(); + + // a:prstGeom + $objWriter->startElement('a:prstGeom'); + $objWriter->writeAttribute('prst', 'rect'); + + // a:avLst + $objWriter->writeElement('a:avLst', null); + + $objWriter->endElement(); + + if ($pDrawing->getShadow()->getVisible()) { + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getBlurRadius())); + $objWriter->writeAttribute('dist', \PhpOffice\PhpSpreadsheet\Shared\Drawing::pixelsToEMU($pDrawing->getShadow()->getDistance())); + $objWriter->writeAttribute('dir', \PhpOffice\PhpSpreadsheet\Shared\Drawing::degreesToAngle($pDrawing->getShadow()->getDirection())); + $objWriter->writeAttribute('algn', $pDrawing->getShadow()->getAlignment()); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getColor()->getRGB()); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', $pDrawing->getShadow()->getAlpha() * 1000); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + $objWriter->endElement(); + + $objWriter->endElement(); + + // xdr:clientData + $objWriter->writeElement('xdr:clientData', null); + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write VML header/footer images to XML format. + * + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeVMLHeaderFooterImages(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Header/footer images + $images = $pWorksheet->getHeaderFooter()->getImages(); + + // xml + $objWriter->startElement('xml'); + $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); + $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); + $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); + + // o:shapelayout + $objWriter->startElement('o:shapelayout'); + $objWriter->writeAttribute('v:ext', 'edit'); + + // o:idmap + $objWriter->startElement('o:idmap'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('data', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:shapetype + $objWriter->startElement('v:shapetype'); + $objWriter->writeAttribute('id', '_x0000_t75'); + $objWriter->writeAttribute('coordsize', '21600,21600'); + $objWriter->writeAttribute('o:spt', '75'); + $objWriter->writeAttribute('o:preferrelative', 't'); + $objWriter->writeAttribute('path', 'm@4@5l@4@11@9@11@9@5xe'); + $objWriter->writeAttribute('filled', 'f'); + $objWriter->writeAttribute('stroked', 'f'); + + // v:stroke + $objWriter->startElement('v:stroke'); + $objWriter->writeAttribute('joinstyle', 'miter'); + $objWriter->endElement(); + + // v:formulas + $objWriter->startElement('v:formulas'); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'if lineDrawn pixelLineWidth 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 1 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum 0 0 @1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @2 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @0 0 1'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @6 1 2'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelWidth'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @8 21600 0'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelHeight'); + $objWriter->endElement(); + + // v:f + $objWriter->startElement('v:f'); + $objWriter->writeAttribute('eqn', 'sum @10 21600 0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // v:path + $objWriter->startElement('v:path'); + $objWriter->writeAttribute('o:extrusionok', 'f'); + $objWriter->writeAttribute('gradientshapeok', 't'); + $objWriter->writeAttribute('o:connecttype', 'rect'); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('aspectratio', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Loop through images + foreach ($images as $key => $value) { + $this->writeVMLHeaderFooterImage($objWriter, $key, $value); + } + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write VML comment to XML format. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pReference Reference + * @param HeaderFooterDrawing $pImage Image + */ + private function writeVMLHeaderFooterImage(XMLWriter $objWriter, $pReference, HeaderFooterDrawing $pImage) + { + // Calculate object id + preg_match('{(\d+)}', md5($pReference), $m); + $id = 1500 + (substr($m[1], 0, 2) * 1); + + // Calculate offset + $width = $pImage->getWidth(); + $height = $pImage->getHeight(); + $marginLeft = $pImage->getOffsetX(); + $marginTop = $pImage->getOffsetY(); + + // v:shape + $objWriter->startElement('v:shape'); + $objWriter->writeAttribute('id', $pReference); + $objWriter->writeAttribute('o:spid', '_x0000_s' . $id); + $objWriter->writeAttribute('type', '#_x0000_t75'); + $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1"); + + // v:imagedata + $objWriter->startElement('v:imagedata'); + $objWriter->writeAttribute('o:relid', 'rId' . $pReference); + $objWriter->writeAttribute('o:title', $pImage->getName()); + $objWriter->endElement(); + + // o:lock + $objWriter->startElement('o:lock'); + $objWriter->writeAttribute('v:ext', 'edit'); + $objWriter->writeAttribute('textRotation', 't'); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Get an array of all drawings. + * + * @param Spreadsheet $spreadsheet + * + * @return \PhpOffice\PhpSpreadsheet\Worksheet\Drawing[] All drawings in PhpSpreadsheet + */ + public function allDrawings(Spreadsheet $spreadsheet) + { + // Get an array of all drawings + $aDrawings = []; + + // Loop through PhpSpreadsheet + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // Loop through images and add to array + $iterator = $spreadsheet->getSheet($i)->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + $aDrawings[] = $iterator->current(); + + $iterator->next(); + } + } + + return $aDrawings; + } + + /** + * @param XMLWriter $objWriter + * @param null|int $hlinkClickId + */ + private function writeHyperLinkDrawing(XMLWriter $objWriter, $hlinkClickId) + { + if ($hlinkClickId === null) { + return; + } + + $objWriter->startElement('a:hlinkClick'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + $objWriter->writeAttribute('r:id', 'rId' . $hlinkClickId); + $objWriter->endElement(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php new file mode 100755 index 0000000..76c196b --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Rels.php @@ -0,0 +1,466 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + $customPropertyList = $spreadsheet->getProperties()->getCustomProperties(); + if (!empty($customPropertyList)) { + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 4, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties', + 'docProps/custom.xml' + ); + } + + // Relationship docProps/app.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties', + 'docProps/app.xml' + ); + + // Relationship docProps/core.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', + 'docProps/core.xml' + ); + + // Relationship xl/workbook.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', + 'xl/workbook.xml' + ); + // a custom UI in workbook ? + if ($spreadsheet->hasRibbon()) { + $this->writeRelationShip( + $objWriter, + 5, + 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility', + $spreadsheet->getRibbonXMLData('target') + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write workbook relationships to XML format. + * + * @param Spreadsheet $spreadsheet + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeWorkbookRelationships(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Relationship styles.xml + $this->writeRelationship( + $objWriter, + 1, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', + 'styles.xml' + ); + + // Relationship theme/theme1.xml + $this->writeRelationship( + $objWriter, + 2, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', + 'theme/theme1.xml' + ); + + // Relationship sharedStrings.xml + $this->writeRelationship( + $objWriter, + 3, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', + 'sharedStrings.xml' + ); + + // Relationships with sheets + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + $this->writeRelationship( + $objWriter, + ($i + 1 + 3), + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', + 'worksheets/sheet' . ($i + 1) . '.xml' + ); + } + // Relationships for vbaProject if needed + // id : just after the last sheet + if ($spreadsheet->hasMacros()) { + $this->writeRelationShip( + $objWriter, + ($i + 1 + 3), + 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', + 'vbaProject.bin' + ); + ++$i; //increment i if needed for an another relation + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write worksheet relationships to XML format. + * + * Numbering is as follows: + * rId1 - Drawings + * rId_hyperlink_x - Hyperlinks + * + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet + * @param int $pWorksheetId + * @param bool $includeCharts Flag indicating if we should write charts + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeWorksheetRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, $pWorksheetId = 1, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Write drawing relationships? + $d = 0; + $drawingOriginalIds = []; + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pWorksheet->getCodeName()]['drawingOriginalIds']; + } + + if ($includeCharts) { + $charts = $pWorksheet->getChartCollection(); + } else { + $charts = []; + } + + if (($pWorksheet->getDrawingCollection()->count() > 0) || (count($charts) > 0) || $drawingOriginalIds) { + $relPath = '../drawings/drawing' . $pWorksheetId . '.xml'; + $rId = ++$d; + + if (isset($drawingOriginalIds[$relPath])) { + $rId = (int) (substr($drawingOriginalIds[$relPath], 3)); + } + + $this->writeRelationship( + $objWriter, + $rId, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', + $relPath + ); + } + + // Write hyperlink relationships? + $i = 1; + foreach ($pWorksheet->getHyperlinkCollection() as $hyperlink) { + if (!$hyperlink->isInternal()) { + $this->writeRelationship( + $objWriter, + '_hyperlink_' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $hyperlink->getUrl(), + 'External' + ); + + ++$i; + } + } + + // Write comments relationship? + $i = 1; + if (count($pWorksheet->getComments()) > 0) { + $this->writeRelationship( + $objWriter, + '_comments_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawing' . $pWorksheetId . '.vml' + ); + + $this->writeRelationship( + $objWriter, + '_comments' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', + '../comments' . $pWorksheetId . '.xml' + ); + } + + // Write header/footer relationship? + $i = 1; + if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { + $this->writeRelationship( + $objWriter, + '_headerfooter_vml' . $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', + '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' + ); + } + + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'ctrlProps', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'vmlDrawings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'); + $this->writeUnparsedRelationship($pWorksheet, $objWriter, 'printerSettings', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'); + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + private function writeUnparsedRelationship(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, XMLWriter $objWriter, $relationship, $type) + { + $unparsedLoadedData = $pWorksheet->getParent()->getUnparsedLoadedData(); + if (!isset($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship])) { + return; + } + + foreach ($unparsedLoadedData['sheets'][$pWorksheet->getCodeName()][$relationship] as $rId => $value) { + $this->writeRelationship( + $objWriter, + $rId, + $type, + $value['relFilePath'] + ); + } + } + + /** + * Write drawing relationships to XML format. + * + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet + * @param int &$chartRef Chart ID + * @param bool $includeCharts Flag indicating if we should write charts + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, &$chartRef, $includeCharts = false) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + $i = 1; + $iterator = $pWorksheet->getDrawingCollection()->getIterator(); + while ($iterator->valid()) { + if ($iterator->current() instanceof \PhpOffice\PhpSpreadsheet\Worksheet\Drawing + || $iterator->current() instanceof MemoryDrawing) { + // Write relationship for image drawing + /** @var \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing */ + $drawing = $iterator->current(); + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . str_replace(' ', '', $drawing->getIndexedFilename()) + ); + + $i = $this->writeDrawingHyperLink($objWriter, $drawing, $i); + } + + $iterator->next(); + ++$i; + } + + if ($includeCharts) { + // Loop through charts and write relationships + $chartCount = $pWorksheet->getChartCount(); + if ($chartCount > 0) { + for ($c = 0; $c < $chartCount; ++$c) { + $this->writeRelationship( + $objWriter, + $i++, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', + '../charts/chart' . ++$chartRef . '.xml' + ); + } + } + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write header/footer drawing relationships to XML format. + * + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeHeaderFooterDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + + // Loop through images and write relationships + foreach ($pWorksheet->getHeaderFooter()->getImages() as $key => $value) { + // Write relationship for image drawing + $this->writeRelationship( + $objWriter, + $key, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + '../media/' . $value->getIndexedFilename() + ); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Override content type. + * + * @param XMLWriter $objWriter XML Writer + * @param int $pId Relationship ID. rId will be prepended! + * @param string $pType Relationship type + * @param string $pTarget Relationship target + * @param string $pTargetMode Relationship target mode + * + * @throws WriterException + */ + private function writeRelationship(XMLWriter $objWriter, $pId, $pType, $pTarget, $pTargetMode = '') + { + if ($pType != '' && $pTarget != '') { + // Write relationship + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId' . $pId); + $objWriter->writeAttribute('Type', $pType); + $objWriter->writeAttribute('Target', $pTarget); + + if ($pTargetMode != '') { + $objWriter->writeAttribute('TargetMode', $pTargetMode); + } + + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * @param $objWriter + * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing + * @param $i + * + * @throws WriterException + * + * @return int + */ + private function writeDrawingHyperLink($objWriter, $drawing, $i) + { + if ($drawing->getHyperlink() === null) { + return $i; + } + + ++$i; + $this->writeRelationship( + $objWriter, + $i, + 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + $drawing->getHyperlink()->getUrl(), + $drawing->getHyperlink()->getTypeHyperlink() + ); + + return $i; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php new file mode 100755 index 0000000..8a0cfe3 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php @@ -0,0 +1,49 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $localRels = $spreadsheet->getRibbonBinObjects('names'); + if (is_array($localRels)) { + foreach ($localRels as $aId => $aTarget) { + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', $aId); + $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); + $objWriter->writeAttribute('Target', $aTarget); + $objWriter->endElement(); + } + } + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php new file mode 100755 index 0000000..01ad38d --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php @@ -0,0 +1,44 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Relationships + $objWriter->startElement('Relationships'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); + $objWriter->startElement('Relationship'); + $objWriter->writeAttribute('Id', 'rId1'); + $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); + $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); + $objWriter->endElement(); + $objWriter->endElement(); + + return $objWriter->getData(); + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php new file mode 100755 index 0000000..19604e4 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -0,0 +1,281 @@ +flipStringTable($aStringTable); + + // Loop through cells + foreach ($pSheet->getCoordinates() as $coordinate) { + $cell = $pSheet->getCell($coordinate); + $cellValue = $cell->getValue(); + if (!is_object($cellValue) && + ($cellValue !== null) && + $cellValue !== '' && + !isset($aFlippedStringTable[$cellValue]) && + ($cell->getDataType() == DataType::TYPE_STRING || $cell->getDataType() == DataType::TYPE_STRING2 || $cell->getDataType() == DataType::TYPE_NULL)) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue] = true; + } elseif ($cellValue instanceof RichText && + ($cellValue !== null) && + !isset($aFlippedStringTable[$cellValue->getHashCode()])) { + $aStringTable[] = $cellValue; + $aFlippedStringTable[$cellValue->getHashCode()] = true; + } + } + + return $aStringTable; + } + + /** + * Write string table to XML format. + * + * @param string[] $pStringTable + * + * @throws WriterException + * + * @return string XML Output + */ + public function writeStringTable(array $pStringTable) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // String table + $objWriter->startElement('sst'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('uniqueCount', count($pStringTable)); + + // Loop through string table + foreach ($pStringTable as $textElement) { + $objWriter->startElement('si'); + + if (!$textElement instanceof RichText) { + $textToWrite = StringHelper::controlCharacterPHP2OOXML($textElement); + $objWriter->startElement('t'); + if ($textToWrite !== trim($textToWrite)) { + $objWriter->writeAttribute('xml:space', 'preserve'); + } + $objWriter->writeRawData($textToWrite); + $objWriter->endElement(); + } elseif ($textElement instanceof RichText) { + $this->writeRichText($objWriter, $textElement); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + + return $objWriter->getData(); + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText $pRichText Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichText(XMLWriter $objWriter, RichText $pRichText, $prefix = null) + { + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + if ($element instanceof Run) { + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // rFont + $objWriter->startElement($prefix . 'rFont'); + $objWriter->writeAttribute('val', $element->getFont()->getName()); + $objWriter->endElement(); + + // Bold + $objWriter->startElement($prefix . 'b'); + $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); + $objWriter->endElement(); + + // Italic + $objWriter->startElement($prefix . 'i'); + $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); + $objWriter->endElement(); + + // Superscript / subscript + if ($element->getFont()->getSuperscript() || $element->getFont()->getSubscript()) { + $objWriter->startElement($prefix . 'vertAlign'); + if ($element->getFont()->getSuperscript()) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($element->getFont()->getSubscript()) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Strikethrough + $objWriter->startElement($prefix . 'strike'); + $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); + $objWriter->endElement(); + + // Color + $objWriter->startElement($prefix . 'color'); + $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); + $objWriter->endElement(); + + // Size + $objWriter->startElement($prefix . 'sz'); + $objWriter->writeAttribute('val', $element->getFont()->getSize()); + $objWriter->endElement(); + + // Underline + $objWriter->startElement($prefix . 'u'); + $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write Rich Text. + * + * @param XMLWriter $objWriter XML Writer + * @param RichText|string $pRichText text string or Rich text + * @param string $prefix Optional Namespace prefix + */ + public function writeRichTextForCharts(XMLWriter $objWriter, $pRichText = null, $prefix = null) + { + if (!$pRichText instanceof RichText) { + $textRun = $pRichText; + $pRichText = new RichText(); + $pRichText->createTextRun($textRun); + } + + if ($prefix !== null) { + $prefix .= ':'; + } + + // Loop through rich text elements + $elements = $pRichText->getRichTextElements(); + foreach ($elements as $element) { + // r + $objWriter->startElement($prefix . 'r'); + + // rPr + $objWriter->startElement($prefix . 'rPr'); + + // Bold + $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); + // Italic + $objWriter->writeAttribute('i', ($element->getFont()->getItalic() ? 1 : 0)); + // Underline + $underlineType = $element->getFont()->getUnderline(); + switch ($underlineType) { + case 'single': + $underlineType = 'sng'; + + break; + case 'double': + $underlineType = 'dbl'; + + break; + } + $objWriter->writeAttribute('u', $underlineType); + // Strikethrough + $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); + + // rFont + $objWriter->startElement($prefix . 'latin'); + $objWriter->writeAttribute('typeface', $element->getFont()->getName()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // t + $objWriter->startElement($prefix . 't'); + $objWriter->writeRawData(StringHelper::controlCharacterPHP2OOXML($element->getText())); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Flip string table (for index searching). + * + * @param array $stringTable Stringtable + * + * @return array + */ + public function flipStringTable(array $stringTable) + { + // Return value + $returnValue = []; + + // Loop through stringtable and add flipped items to $returnValue + foreach ($stringTable as $key => $value) { + if (!$value instanceof RichText) { + $returnValue[$value] = $key; + } elseif ($value instanceof RichText) { + $returnValue[$value->getHashCode()] = $key; + } + } + + return $returnValue; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php new file mode 100755 index 0000000..16e800e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -0,0 +1,686 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // styleSheet + $objWriter->startElement('styleSheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + + // numFmts + $objWriter->startElement('numFmts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getNumFmtHashTable()->count()); + + // numFmt + for ($i = 0; $i < $this->getParentWriter()->getNumFmtHashTable()->count(); ++$i) { + $this->writeNumFmt($objWriter, $this->getParentWriter()->getNumFmtHashTable()->getByIndex($i), $i); + } + + $objWriter->endElement(); + + // fonts + $objWriter->startElement('fonts'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFontHashTable()->count()); + + // font + for ($i = 0; $i < $this->getParentWriter()->getFontHashTable()->count(); ++$i) { + $this->writeFont($objWriter, $this->getParentWriter()->getFontHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // fills + $objWriter->startElement('fills'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getFillHashTable()->count()); + + // fill + for ($i = 0; $i < $this->getParentWriter()->getFillHashTable()->count(); ++$i) { + $this->writeFill($objWriter, $this->getParentWriter()->getFillHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // borders + $objWriter->startElement('borders'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getBordersHashTable()->count()); + + // border + for ($i = 0; $i < $this->getParentWriter()->getBordersHashTable()->count(); ++$i) { + $this->writeBorder($objWriter, $this->getParentWriter()->getBordersHashTable()->getByIndex($i)); + } + + $objWriter->endElement(); + + // cellStyleXfs + $objWriter->startElement('cellStyleXfs'); + $objWriter->writeAttribute('count', 1); + + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('numFmtId', 0); + $objWriter->writeAttribute('fontId', 0); + $objWriter->writeAttribute('fillId', 0); + $objWriter->writeAttribute('borderId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // cellXfs + $objWriter->startElement('cellXfs'); + $objWriter->writeAttribute('count', count($spreadsheet->getCellXfCollection())); + + // xf + foreach ($spreadsheet->getCellXfCollection() as $cellXf) { + $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet); + } + + $objWriter->endElement(); + + // cellStyles + $objWriter->startElement('cellStyles'); + $objWriter->writeAttribute('count', 1); + + // cellStyle + $objWriter->startElement('cellStyle'); + $objWriter->writeAttribute('name', 'Normal'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('builtinId', 0); + $objWriter->endElement(); + + $objWriter->endElement(); + + // dxfs + $objWriter->startElement('dxfs'); + $objWriter->writeAttribute('count', $this->getParentWriter()->getStylesConditionalHashTable()->count()); + + // dxf + for ($i = 0; $i < $this->getParentWriter()->getStylesConditionalHashTable()->count(); ++$i) { + $this->writeCellStyleDxf($objWriter, $this->getParentWriter()->getStylesConditionalHashTable()->getByIndex($i)->getStyle()); + } + + $objWriter->endElement(); + + // tableStyles + $objWriter->startElement('tableStyles'); + $objWriter->writeAttribute('defaultTableStyle', 'TableStyleMedium9'); + $objWriter->writeAttribute('defaultPivotStyle', 'PivotTableStyle1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeFill(XMLWriter $objWriter, Fill $pFill) + { + // Check if this is a pattern type or gradient type + if ($pFill->getFillType() === Fill::FILL_GRADIENT_LINEAR || + $pFill->getFillType() === Fill::FILL_GRADIENT_PATH) { + // Gradient fill + $this->writeGradientFill($objWriter, $pFill); + } elseif ($pFill->getFillType() !== null) { + // Pattern fill + $this->writePatternFill($objWriter, $pFill); + } + } + + /** + * Write Gradient Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writeGradientFill(XMLWriter $objWriter, Fill $pFill) + { + // fill + $objWriter->startElement('fill'); + + // gradientFill + $objWriter->startElement('gradientFill'); + $objWriter->writeAttribute('type', $pFill->getFillType()); + $objWriter->writeAttribute('degree', $pFill->getRotation()); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '0'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + // stop + $objWriter->startElement('stop'); + $objWriter->writeAttribute('position', '1'); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Pattern Fill. + * + * @param XMLWriter $objWriter XML Writer + * @param Fill $pFill Fill style + */ + private function writePatternFill(XMLWriter $objWriter, Fill $pFill) + { + // fill + $objWriter->startElement('fill'); + + // patternFill + $objWriter->startElement('patternFill'); + $objWriter->writeAttribute('patternType', $pFill->getFillType()); + + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // fgColor + if ($pFill->getStartColor()->getARGB()) { + $objWriter->startElement('fgColor'); + $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); + $objWriter->endElement(); + } + } + if ($pFill->getFillType() !== Fill::FILL_NONE) { + // bgColor + if ($pFill->getEndColor()->getARGB()) { + $objWriter->startElement('bgColor'); + $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write Font. + * + * @param XMLWriter $objWriter XML Writer + * @param Font $pFont Font style + */ + private function writeFont(XMLWriter $objWriter, Font $pFont) + { + // font + $objWriter->startElement('font'); + // Weird! The order of these elements actually makes a difference when opening Xlsx + // files in Excel2003 with the compatibility pack. It's not documented behaviour, + // and makes for a real WTF! + + // Bold. We explicitly write this element also when false (like MS Office Excel 2007 does + // for conditional formatting). Otherwise it will apparently not be picked up in conditional + // formatting style dialog + if ($pFont->getBold() !== null) { + $objWriter->startElement('b'); + $objWriter->writeAttribute('val', $pFont->getBold() ? '1' : '0'); + $objWriter->endElement(); + } + + // Italic + if ($pFont->getItalic() !== null) { + $objWriter->startElement('i'); + $objWriter->writeAttribute('val', $pFont->getItalic() ? '1' : '0'); + $objWriter->endElement(); + } + + // Strikethrough + if ($pFont->getStrikethrough() !== null) { + $objWriter->startElement('strike'); + $objWriter->writeAttribute('val', $pFont->getStrikethrough() ? '1' : '0'); + $objWriter->endElement(); + } + + // Underline + if ($pFont->getUnderline() !== null) { + $objWriter->startElement('u'); + $objWriter->writeAttribute('val', $pFont->getUnderline()); + $objWriter->endElement(); + } + + // Superscript / subscript + if ($pFont->getSuperscript() === true || $pFont->getSubscript() === true) { + $objWriter->startElement('vertAlign'); + if ($pFont->getSuperscript() === true) { + $objWriter->writeAttribute('val', 'superscript'); + } elseif ($pFont->getSubscript() === true) { + $objWriter->writeAttribute('val', 'subscript'); + } + $objWriter->endElement(); + } + + // Size + if ($pFont->getSize() !== null) { + $objWriter->startElement('sz'); + $objWriter->writeAttribute('val', StringHelper::formatNumber($pFont->getSize())); + $objWriter->endElement(); + } + + // Foreground color + if ($pFont->getColor()->getARGB() !== null) { + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pFont->getColor()->getARGB()); + $objWriter->endElement(); + } + + // Name + if ($pFont->getName() !== null) { + $objWriter->startElement('name'); + $objWriter->writeAttribute('val', $pFont->getName()); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Border. + * + * @param XMLWriter $objWriter XML Writer + * @param Borders $pBorders Borders style + */ + private function writeBorder(XMLWriter $objWriter, Borders $pBorders) + { + // Write border + $objWriter->startElement('border'); + // Diagonal? + switch ($pBorders->getDiagonalDirection()) { + case Borders::DIAGONAL_UP: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'false'); + + break; + case Borders::DIAGONAL_DOWN: + $objWriter->writeAttribute('diagonalUp', 'false'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + case Borders::DIAGONAL_BOTH: + $objWriter->writeAttribute('diagonalUp', 'true'); + $objWriter->writeAttribute('diagonalDown', 'true'); + + break; + } + + // BorderPr + $this->writeBorderPr($objWriter, 'left', $pBorders->getLeft()); + $this->writeBorderPr($objWriter, 'right', $pBorders->getRight()); + $this->writeBorderPr($objWriter, 'top', $pBorders->getTop()); + $this->writeBorderPr($objWriter, 'bottom', $pBorders->getBottom()); + $this->writeBorderPr($objWriter, 'diagonal', $pBorders->getDiagonal()); + $objWriter->endElement(); + } + + /** + * Write Cell Style Xf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + * @param Spreadsheet $spreadsheet Workbook + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + */ + private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle, Spreadsheet $spreadsheet) + { + // xf + $objWriter->startElement('xf'); + $objWriter->writeAttribute('xfId', 0); + $objWriter->writeAttribute('fontId', (int) $this->getParentWriter()->getFontHashTable()->getIndexForHashCode($pStyle->getFont()->getHashCode())); + if ($pStyle->getQuotePrefix()) { + $objWriter->writeAttribute('quotePrefix', 1); + } + + if ($pStyle->getNumberFormat()->getBuiltInFormatCode() === false) { + $objWriter->writeAttribute('numFmtId', (int) ($this->getParentWriter()->getNumFmtHashTable()->getIndexForHashCode($pStyle->getNumberFormat()->getHashCode()) + 164)); + } else { + $objWriter->writeAttribute('numFmtId', (int) $pStyle->getNumberFormat()->getBuiltInFormatCode()); + } + + $objWriter->writeAttribute('fillId', (int) $this->getParentWriter()->getFillHashTable()->getIndexForHashCode($pStyle->getFill()->getHashCode())); + $objWriter->writeAttribute('borderId', (int) $this->getParentWriter()->getBordersHashTable()->getIndexForHashCode($pStyle->getBorders()->getHashCode())); + + // Apply styles? + $objWriter->writeAttribute('applyFont', ($spreadsheet->getDefaultStyle()->getFont()->getHashCode() != $pStyle->getFont()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyNumberFormat', ($spreadsheet->getDefaultStyle()->getNumberFormat()->getHashCode() != $pStyle->getNumberFormat()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyFill', ($spreadsheet->getDefaultStyle()->getFill()->getHashCode() != $pStyle->getFill()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyBorder', ($spreadsheet->getDefaultStyle()->getBorders()->getHashCode() != $pStyle->getBorders()->getHashCode()) ? '1' : '0'); + $objWriter->writeAttribute('applyAlignment', ($spreadsheet->getDefaultStyle()->getAlignment()->getHashCode() != $pStyle->getAlignment()->getHashCode()) ? '1' : '0'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('applyProtection', 'true'); + } + + // alignment + $objWriter->startElement('alignment'); + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + + $objWriter->writeAttribute('wrapText', ($pStyle->getAlignment()->getWrapText() ? 'true' : 'false')); + $objWriter->writeAttribute('shrinkToFit', ($pStyle->getAlignment()->getShrinkToFit() ? 'true' : 'false')); + + if ($pStyle->getAlignment()->getIndent() > 0) { + $objWriter->writeAttribute('indent', $pStyle->getAlignment()->getIndent()); + } + if ($pStyle->getAlignment()->getReadOrder() > 0) { + $objWriter->writeAttribute('readingOrder', $pStyle->getAlignment()->getReadOrder()); + } + $objWriter->endElement(); + + // protection + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if ($pStyle->getProtection()->getLocked() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if ($pStyle->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Cell Style Dxf. + * + * @param XMLWriter $objWriter XML Writer + * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style + */ + private function writeCellStyleDxf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle) + { + // dxf + $objWriter->startElement('dxf'); + + // font + $this->writeFont($objWriter, $pStyle->getFont()); + + // numFmt + $this->writeNumFmt($objWriter, $pStyle->getNumberFormat()); + + // fill + $this->writeFill($objWriter, $pStyle->getFill()); + + // alignment + $objWriter->startElement('alignment'); + if ($pStyle->getAlignment()->getHorizontal() !== null) { + $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); + } + if ($pStyle->getAlignment()->getVertical() !== null) { + $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); + } + + if ($pStyle->getAlignment()->getTextRotation() !== null) { + $textRotation = 0; + if ($pStyle->getAlignment()->getTextRotation() >= 0) { + $textRotation = $pStyle->getAlignment()->getTextRotation(); + } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { + $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); + } + $objWriter->writeAttribute('textRotation', $textRotation); + } + $objWriter->endElement(); + + // border + $this->writeBorder($objWriter, $pStyle->getBorders()); + + // protection + if (($pStyle->getProtection()->getLocked() !== null) || ($pStyle->getProtection()->getHidden() !== null)) { + if ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT || + $pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT) { + $objWriter->startElement('protection'); + if (($pStyle->getProtection()->getLocked() !== null) && + ($pStyle->getProtection()->getLocked() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + if (($pStyle->getProtection()->getHidden() !== null) && + ($pStyle->getProtection()->getHidden() !== Protection::PROTECTION_INHERIT)) { + $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == Protection::PROTECTION_PROTECTED ? 'true' : 'false')); + } + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Write BorderPr. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pName Element name + * @param Border $pBorder Border style + */ + private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder) + { + // Write BorderPr + if ($pBorder->getBorderStyle() != Border::BORDER_NONE) { + $objWriter->startElement($pName); + $objWriter->writeAttribute('style', $pBorder->getBorderStyle()); + + // color + $objWriter->startElement('color'); + $objWriter->writeAttribute('rgb', $pBorder->getColor()->getARGB()); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + + /** + * Write NumberFormat. + * + * @param XMLWriter $objWriter XML Writer + * @param NumberFormat $pNumberFormat Number Format + * @param int $pId Number Format identifier + */ + private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0) + { + // Translate formatcode + $formatCode = $pNumberFormat->getFormatCode(); + + // numFmt + if ($formatCode !== null) { + $objWriter->startElement('numFmt'); + $objWriter->writeAttribute('numFmtId', ($pId + 164)); + $objWriter->writeAttribute('formatCode', $formatCode); + $objWriter->endElement(); + } + } + + /** + * Get an array of all styles. + * + * @param Spreadsheet $spreadsheet + * + * @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet + */ + public function allStyles(Spreadsheet $spreadsheet) + { + return $spreadsheet->getCellXfCollection(); + } + + /** + * Get an array of all conditional styles. + * + * @param Spreadsheet $spreadsheet + * + * @return Conditional[] All conditional styles in PhpSpreadsheet + */ + public function allConditionalStyles(Spreadsheet $spreadsheet) + { + // Get an array of all styles + $aStyles = []; + + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + foreach ($spreadsheet->getSheet($i)->getConditionalStylesCollection() as $conditionalStyles) { + foreach ($conditionalStyles as $conditionalStyle) { + $aStyles[] = $conditionalStyle; + } + } + } + + return $aStyles; + } + + /** + * Get an array of all fills. + * + * @param Spreadsheet $spreadsheet + * + * @return Fill[] All fills in PhpSpreadsheet + */ + public function allFills(Spreadsheet $spreadsheet) + { + // Get an array of unique fills + $aFills = []; + + // Two first fills are predefined + $fill0 = new Fill(); + $fill0->setFillType(Fill::FILL_NONE); + $aFills[] = $fill0; + + $fill1 = new Fill(); + $fill1->setFillType(Fill::FILL_PATTERN_GRAY125); + $aFills[] = $fill1; + // The remaining fills + $aStyles = $this->allStyles($spreadsheet); + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFills[$style->getFill()->getHashCode()])) { + $aFills[$style->getFill()->getHashCode()] = $style->getFill(); + } + } + + return $aFills; + } + + /** + * Get an array of all fonts. + * + * @param Spreadsheet $spreadsheet + * + * @return Font[] All fonts in PhpSpreadsheet + */ + public function allFonts(Spreadsheet $spreadsheet) + { + // Get an array of unique fonts + $aFonts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aFonts[$style->getFont()->getHashCode()])) { + $aFonts[$style->getFont()->getHashCode()] = $style->getFont(); + } + } + + return $aFonts; + } + + /** + * Get an array of all borders. + * + * @param Spreadsheet $spreadsheet + * + * @return Borders[] All borders in PhpSpreadsheet + */ + public function allBorders(Spreadsheet $spreadsheet) + { + // Get an array of unique borders + $aBorders = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if (!isset($aBorders[$style->getBorders()->getHashCode()])) { + $aBorders[$style->getBorders()->getHashCode()] = $style->getBorders(); + } + } + + return $aBorders; + } + + /** + * Get an array of all number formats. + * + * @param Spreadsheet $spreadsheet + * + * @return NumberFormat[] All number formats in PhpSpreadsheet + */ + public function allNumberFormats(Spreadsheet $spreadsheet) + { + // Get an array of unique number formats + $aNumFmts = []; + $aStyles = $this->allStyles($spreadsheet); + + /** @var \PhpOffice\PhpSpreadsheet\Style\Style $style */ + foreach ($aStyles as $style) { + if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !isset($aNumFmts[$style->getNumberFormat()->getHashCode()])) { + $aNumFmts[$style->getNumberFormat()->getHashCode()] = $style->getNumberFormat(); + } + } + + return $aNumFmts; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php new file mode 100755 index 0000000..f5f8dc0 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -0,0 +1,846 @@ + 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Times New Roman', + 'Hebr' => 'Times New Roman', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'MoolBoran', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Times New Roman', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of Minor fonts to write. + * + * @var array of string + */ + private static $minorFonts = [ + 'Jpan' => 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Arial', + 'Hebr' => 'Arial', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'DaunPenh', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Arial', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + /** + * Map of core colours. + * + * @var array of string + */ + private static $colourScheme = [ + 'dk2' => '1F497D', + 'lt2' => 'EEECE1', + 'accent1' => '4F81BD', + 'accent2' => 'C0504D', + 'accent3' => '9BBB59', + 'accent4' => '8064A2', + 'accent5' => '4BACC6', + 'accent6' => 'F79646', + 'hlink' => '0000FF', + 'folHlink' => '800080', + ]; + + /** + * Write theme to XML format. + * + * @param Spreadsheet $spreadsheet + * + * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception + * + * @return string XML Output + */ + public function writeTheme(Spreadsheet $spreadsheet) + { + // Create XML writer + $objWriter = null; + if ($this->getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // a:theme + $objWriter->startElement('a:theme'); + $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); + $objWriter->writeAttribute('name', 'Office Theme'); + + // a:themeElements + $objWriter->startElement('a:themeElements'); + + // a:clrScheme + $objWriter->startElement('a:clrScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:dk1 + $objWriter->startElement('a:dk1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'windowText'); + $objWriter->writeAttribute('lastClr', '000000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lt1 + $objWriter->startElement('a:lt1'); + + // a:sysClr + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'window'); + $objWriter->writeAttribute('lastClr', 'FFFFFF'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:dk2 + $this->writeColourScheme($objWriter); + + $objWriter->endElement(); + + // a:fontScheme + $objWriter->startElement('a:fontScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:majorFont + $objWriter->startElement('a:majorFont'); + $this->writeFonts($objWriter, 'Cambria', self::$majorFonts); + $objWriter->endElement(); + + // a:minorFont + $objWriter->startElement('a:minorFont'); + $this->writeFonts($objWriter, 'Calibri', self::$minorFonts); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:fmtScheme + $objWriter->startElement('a:fmtScheme'); + $objWriter->writeAttribute('name', 'Office'); + + // a:fillStyleLst + $objWriter->startElement('a:fillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '50000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '35000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '37000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '15000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '1'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '51000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '80000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '93000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '130000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '94000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '135000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lin + $objWriter->startElement('a:lin'); + $objWriter->writeAttribute('ang', '16200000'); + $objWriter->writeAttribute('scaled', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lnStyleLst + $objWriter->startElement('a:lnStyleLst'); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '9525'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '95000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '105000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '25400'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:ln + $objWriter->startElement('a:ln'); + $objWriter->writeAttribute('w', '38100'); + $objWriter->writeAttribute('cap', 'flat'); + $objWriter->writeAttribute('cmpd', 'sng'); + $objWriter->writeAttribute('algn', 'ctr'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:prstDash + $objWriter->startElement('a:prstDash'); + $objWriter->writeAttribute('val', 'solid'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyleLst + $objWriter->startElement('a:effectStyleLst'); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '20000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '38000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:effectStyle + $objWriter->startElement('a:effectStyle'); + + // a:effectLst + $objWriter->startElement('a:effectLst'); + + // a:outerShdw + $objWriter->startElement('a:outerShdw'); + $objWriter->writeAttribute('blurRad', '40000'); + $objWriter->writeAttribute('dist', '23000'); + $objWriter->writeAttribute('dir', '5400000'); + $objWriter->writeAttribute('rotWithShape', '0'); + + // a:srgbClr + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', '000000'); + + // a:alpha + $objWriter->startElement('a:alpha'); + $objWriter->writeAttribute('val', '35000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:scene3d + $objWriter->startElement('a:scene3d'); + + // a:camera + $objWriter->startElement('a:camera'); + $objWriter->writeAttribute('prst', 'orthographicFront'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '0'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:lightRig + $objWriter->startElement('a:lightRig'); + $objWriter->writeAttribute('rig', 'threePt'); + $objWriter->writeAttribute('dir', 't'); + + // a:rot + $objWriter->startElement('a:rot'); + $objWriter->writeAttribute('lat', '0'); + $objWriter->writeAttribute('lon', '0'); + $objWriter->writeAttribute('rev', '1200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:sp3d + $objWriter->startElement('a:sp3d'); + + // a:bevelT + $objWriter->startElement('a:bevelT'); + $objWriter->writeAttribute('w', '63500'); + $objWriter->writeAttribute('h', '25400'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:bgFillStyleLst + $objWriter->startElement('a:bgFillStyleLst'); + + // a:solidFill + $objWriter->startElement('a:solidFill'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '40000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '40000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '45000'); + $objWriter->endElement(); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '99000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '350000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '20000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '255000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '-80000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '180000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gradFill + $objWriter->startElement('a:gradFill'); + $objWriter->writeAttribute('rotWithShape', '1'); + + // a:gsLst + $objWriter->startElement('a:gsLst'); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '0'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:tint + $objWriter->startElement('a:tint'); + $objWriter->writeAttribute('val', '80000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '300000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:gs + $objWriter->startElement('a:gs'); + $objWriter->writeAttribute('pos', '100000'); + + // a:schemeClr + $objWriter->startElement('a:schemeClr'); + $objWriter->writeAttribute('val', 'phClr'); + + // a:shade + $objWriter->startElement('a:shade'); + $objWriter->writeAttribute('val', '30000'); + $objWriter->endElement(); + + // a:satMod + $objWriter->startElement('a:satMod'); + $objWriter->writeAttribute('val', '200000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:path + $objWriter->startElement('a:path'); + $objWriter->writeAttribute('path', 'circle'); + + // a:fillToRect + $objWriter->startElement('a:fillToRect'); + $objWriter->writeAttribute('l', '50000'); + $objWriter->writeAttribute('t', '50000'); + $objWriter->writeAttribute('r', '50000'); + $objWriter->writeAttribute('b', '50000'); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + + // a:objectDefaults + $objWriter->writeElement('a:objectDefaults', null); + + // a:extraClrSchemeLst + $objWriter->writeElement('a:extraClrSchemeLst', null); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write fonts to XML format. + * + * @param XMLWriter $objWriter + * @param string $latinFont + * @param array of string $fontSet + * + * @return string XML Output + */ + private function writeFonts($objWriter, $latinFont, $fontSet) + { + // a:latin + $objWriter->startElement('a:latin'); + $objWriter->writeAttribute('typeface', $latinFont); + $objWriter->endElement(); + + // a:ea + $objWriter->startElement('a:ea'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + // a:cs + $objWriter->startElement('a:cs'); + $objWriter->writeAttribute('typeface', ''); + $objWriter->endElement(); + + foreach ($fontSet as $fontScript => $typeface) { + $objWriter->startElement('a:font'); + $objWriter->writeAttribute('script', $fontScript); + $objWriter->writeAttribute('typeface', $typeface); + $objWriter->endElement(); + } + } + + /** + * Write colour scheme to XML format. + * + * @param XMLWriter $objWriter + * + * @return string XML Output + */ + private function writeColourScheme($objWriter) + { + foreach (self::$colourScheme as $colourName => $colourValue) { + $objWriter->startElement('a:' . $colourName); + + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $colourValue); + $objWriter->endElement(); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php new file mode 100755 index 0000000..b9f8f99 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -0,0 +1,426 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // workbook + $objWriter->startElement('workbook'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + // fileVersion + $this->writeFileVersion($objWriter); + + // workbookPr + $this->writeWorkbookPr($objWriter); + + // workbookProtection + $this->writeWorkbookProtection($objWriter, $spreadsheet); + + // bookViews + if ($this->getParentWriter()->getOffice2003Compatibility() === false) { + $this->writeBookViews($objWriter, $spreadsheet); + } + + // sheets + $this->writeSheets($objWriter, $spreadsheet); + + // definedNames + $this->writeDefinedNames($objWriter, $spreadsheet); + + // calcPr + $this->writeCalcPr($objWriter, $recalcRequired); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write file version. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeFileVersion(XMLWriter $objWriter) + { + $objWriter->startElement('fileVersion'); + $objWriter->writeAttribute('appName', 'xl'); + $objWriter->writeAttribute('lastEdited', '4'); + $objWriter->writeAttribute('lowestEdited', '4'); + $objWriter->writeAttribute('rupBuild', '4505'); + $objWriter->endElement(); + } + + /** + * Write WorkbookPr. + * + * @param XMLWriter $objWriter XML Writer + */ + private function writeWorkbookPr(XMLWriter $objWriter) + { + $objWriter->startElement('workbookPr'); + + if (Date::getExcelCalendar() === Date::CALENDAR_MAC_1904) { + $objWriter->writeAttribute('date1904', '1'); + } + + $objWriter->writeAttribute('codeName', 'ThisWorkbook'); + + $objWriter->endElement(); + } + + /** + * Write BookViews. + * + * @param XMLWriter $objWriter XML Writer + * @param Spreadsheet $spreadsheet + */ + private function writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet) + { + // bookViews + $objWriter->startElement('bookViews'); + + // workbookView + $objWriter->startElement('workbookView'); + + $objWriter->writeAttribute('activeTab', $spreadsheet->getActiveSheetIndex()); + $objWriter->writeAttribute('autoFilterDateGrouping', ($spreadsheet->getAutoFilterDateGrouping() ? 'true' : 'false')); + $objWriter->writeAttribute('firstSheet', $spreadsheet->getFirstSheetIndex()); + $objWriter->writeAttribute('minimized', ($spreadsheet->getMinimized() ? 'true' : 'false')); + $objWriter->writeAttribute('showHorizontalScroll', ($spreadsheet->getShowHorizontalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('showSheetTabs', ($spreadsheet->getShowSheetTabs() ? 'true' : 'false')); + $objWriter->writeAttribute('showVerticalScroll', ($spreadsheet->getShowVerticalScroll() ? 'true' : 'false')); + $objWriter->writeAttribute('tabRatio', $spreadsheet->getTabRatio()); + $objWriter->writeAttribute('visibility', $spreadsheet->getVisibility()); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write WorkbookProtection. + * + * @param XMLWriter $objWriter XML Writer + * @param Spreadsheet $spreadsheet + */ + private function writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet) + { + if ($spreadsheet->getSecurity()->isSecurityEnabled()) { + $objWriter->startElement('workbookProtection'); + $objWriter->writeAttribute('lockRevision', ($spreadsheet->getSecurity()->getLockRevision() ? 'true' : 'false')); + $objWriter->writeAttribute('lockStructure', ($spreadsheet->getSecurity()->getLockStructure() ? 'true' : 'false')); + $objWriter->writeAttribute('lockWindows', ($spreadsheet->getSecurity()->getLockWindows() ? 'true' : 'false')); + + if ($spreadsheet->getSecurity()->getRevisionsPassword() != '') { + $objWriter->writeAttribute('revisionsPassword', $spreadsheet->getSecurity()->getRevisionsPassword()); + } + + if ($spreadsheet->getSecurity()->getWorkbookPassword() != '') { + $objWriter->writeAttribute('workbookPassword', $spreadsheet->getSecurity()->getWorkbookPassword()); + } + + $objWriter->endElement(); + } + } + + /** + * Write calcPr. + * + * @param XMLWriter $objWriter XML Writer + * @param bool $recalcRequired Indicate whether formulas should be recalculated before writing + */ + private function writeCalcPr(XMLWriter $objWriter, $recalcRequired = true) + { + $objWriter->startElement('calcPr'); + + // Set the calcid to a higher value than Excel itself will use, otherwise Excel will always recalc + // If MS Excel does do a recalc, then users opening a file in MS Excel will be prompted to save on exit + // because the file has changed + $objWriter->writeAttribute('calcId', '999999'); + $objWriter->writeAttribute('calcMode', 'auto'); + // fullCalcOnLoad isn't needed if we've recalculating for the save + $objWriter->writeAttribute('calcCompleted', ($recalcRequired) ? 1 : 0); + $objWriter->writeAttribute('fullCalcOnLoad', ($recalcRequired) ? 0 : 1); + $objWriter->writeAttribute('forceFullCalc', ($recalcRequired) ? 0 : 1); + + $objWriter->endElement(); + } + + /** + * Write sheets. + * + * @param XMLWriter $objWriter XML Writer + * @param Spreadsheet $spreadsheet + * + * @throws WriterException + */ + private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet) + { + // Write sheets + $objWriter->startElement('sheets'); + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // sheet + $this->writeSheet( + $objWriter, + $spreadsheet->getSheet($i)->getTitle(), + ($i + 1), + ($i + 1 + 3), + $spreadsheet->getSheet($i)->getSheetState() + ); + } + + $objWriter->endElement(); + } + + /** + * Write sheet. + * + * @param XMLWriter $objWriter XML Writer + * @param string $pSheetname Sheet name + * @param int $pSheetId Sheet id + * @param int $pRelId Relationship ID + * @param string $sheetState Sheet state (visible, hidden, veryHidden) + * + * @throws WriterException + */ + private function writeSheet(XMLWriter $objWriter, $pSheetname, $pSheetId = 1, $pRelId = 1, $sheetState = 'visible') + { + if ($pSheetname != '') { + // Write sheet + $objWriter->startElement('sheet'); + $objWriter->writeAttribute('name', $pSheetname); + $objWriter->writeAttribute('sheetId', $pSheetId); + if ($sheetState !== 'visible' && $sheetState != '') { + $objWriter->writeAttribute('state', $sheetState); + } + $objWriter->writeAttribute('r:id', 'rId' . $pRelId); + $objWriter->endElement(); + } else { + throw new WriterException('Invalid parameters passed.'); + } + } + + /** + * Write Defined Names. + * + * @param XMLWriter $objWriter XML Writer + * @param Spreadsheet $spreadsheet + * + * @throws WriterException + */ + private function writeDefinedNames(XMLWriter $objWriter, Spreadsheet $spreadsheet) + { + // Write defined names + $objWriter->startElement('definedNames'); + + // Named ranges + if (count($spreadsheet->getNamedRanges()) > 0) { + // Named ranges + $this->writeNamedRanges($objWriter, $spreadsheet); + } + + // Other defined names + $sheetCount = $spreadsheet->getSheetCount(); + for ($i = 0; $i < $sheetCount; ++$i) { + // definedName for autoFilter + $this->writeDefinedNameForAutofilter($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Titles + $this->writeDefinedNameForPrintTitles($objWriter, $spreadsheet->getSheet($i), $i); + + // definedName for Print_Area + $this->writeDefinedNameForPrintArea($objWriter, $spreadsheet->getSheet($i), $i); + } + + $objWriter->endElement(); + } + + /** + * Write named ranges. + * + * @param XMLWriter $objWriter XML Writer + * @param Spreadsheet $spreadsheet + * + * @throws WriterException + */ + private function writeNamedRanges(XMLWriter $objWriter, Spreadsheet $spreadsheet) + { + // Loop named ranges + $namedRanges = $spreadsheet->getNamedRanges(); + foreach ($namedRanges as $namedRange) { + $this->writeDefinedNameForNamedRange($objWriter, $namedRange); + } + } + + /** + * Write Defined Name for named range. + * + * @param XMLWriter $objWriter XML Writer + * @param NamedRange $pNamedRange + */ + private function writeDefinedNameForNamedRange(XMLWriter $objWriter, NamedRange $pNamedRange) + { + // definedName for named range + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', $pNamedRange->getName()); + if ($pNamedRange->getLocalOnly()) { + $objWriter->writeAttribute('localSheetId', $pNamedRange->getScope()->getParent()->getIndex($pNamedRange->getScope())); + } + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($pNamedRange->getRange()); + $iMax = count($range); + for ($i = 0; $i < $iMax; ++$i) { + $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteReference($range[$i][0]); + if (isset($range[$i][1])) { + $range[$i][1] = Coordinate::absoluteReference($range[$i][1]); + } + } + $range = Coordinate::buildRange($range); + + $objWriter->writeRawData($range); + + $objWriter->endElement(); + } + + /** + * Write Defined Name for autoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param Worksheet $pSheet + * @param int $pSheetId + */ + private function writeDefinedNameForAutofilter(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) + { + // definedName for autoFilter + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm._FilterDatabase'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + $objWriter->writeAttribute('hidden', '1'); + + // Create absolute coordinate and write as raw text + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref so we can make the cell ref absolute + list($ws, $range[0]) = Worksheet::extractSheetTitle($range[0], true); + + $range[0] = Coordinate::absoluteCoordinate($range[0]); + $range[1] = Coordinate::absoluteCoordinate($range[1]); + $range = implode(':', $range); + + $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param Worksheet $pSheet + * @param int $pSheetId + */ + private function writeDefinedNameForPrintTitles(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) + { + // definedName for PrintTitles + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Titles'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Setting string + $settingString = ''; + + // Columns to repeat + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + // Rows to repeat + if ($pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { + if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { + $settingString .= ','; + } + + $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop(); + + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; + } + + $objWriter->writeRawData($settingString); + + $objWriter->endElement(); + } + } + + /** + * Write Defined Name for PrintTitles. + * + * @param XMLWriter $objWriter XML Writer + * @param Worksheet $pSheet + * @param int $pSheetId + */ + private function writeDefinedNameForPrintArea(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) + { + // definedName for PrintArea + if ($pSheet->getPageSetup()->isPrintAreaSet()) { + $objWriter->startElement('definedName'); + $objWriter->writeAttribute('name', '_xlnm.Print_Area'); + $objWriter->writeAttribute('localSheetId', $pSheetId); + + // Print area + $printArea = Coordinate::splitRange($pSheet->getPageSetup()->getPrintArea()); + + $chunks = []; + foreach ($printArea as $printAreaRect) { + $printAreaRect[0] = Coordinate::absoluteReference($printAreaRect[0]); + $printAreaRect[1] = Coordinate::absoluteReference($printAreaRect[1]); + $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect); + } + + $objWriter->writeRawData(implode(',', $chunks)); + + $objWriter->endElement(); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php new file mode 100755 index 0000000..065eaaf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -0,0 +1,1228 @@ +getParentWriter()->getUseDiskCaching()) { + $objWriter = new XMLWriter(XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); + } else { + $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); + } + + // XML header + $objWriter->startDocument('1.0', 'UTF-8', 'yes'); + + // Worksheet + $objWriter->startElement('worksheet'); + $objWriter->writeAttribute('xml:space', 'preserve'); + $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); + $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); + + $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); + $objWriter->writeAttribute('xmlns:x14', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main'); + $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); + $objWriter->writeAttribute('mc:Ignorable', 'x14ac'); + $objWriter->writeAttribute('xmlns:x14ac', 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac'); + + // sheetPr + $this->writeSheetPr($objWriter, $pSheet); + + // Dimension + $this->writeDimension($objWriter, $pSheet); + + // sheetViews + $this->writeSheetViews($objWriter, $pSheet); + + // sheetFormatPr + $this->writeSheetFormatPr($objWriter, $pSheet); + + // cols + $this->writeCols($objWriter, $pSheet); + + // sheetData + $this->writeSheetData($objWriter, $pSheet, $pStringTable); + + // sheetProtection + $this->writeSheetProtection($objWriter, $pSheet); + + // protectedRanges + $this->writeProtectedRanges($objWriter, $pSheet); + + // autoFilter + $this->writeAutoFilter($objWriter, $pSheet); + + // mergeCells + $this->writeMergeCells($objWriter, $pSheet); + + // conditionalFormatting + $this->writeConditionalFormatting($objWriter, $pSheet); + + // dataValidations + $this->writeDataValidations($objWriter, $pSheet); + + // hyperlinks + $this->writeHyperlinks($objWriter, $pSheet); + + // Print options + $this->writePrintOptions($objWriter, $pSheet); + + // Page margins + $this->writePageMargins($objWriter, $pSheet); + + // Page setup + $this->writePageSetup($objWriter, $pSheet); + + // Header / footer + $this->writeHeaderFooter($objWriter, $pSheet); + + // Breaks + $this->writeBreaks($objWriter, $pSheet); + + // Drawings and/or Charts + $this->writeDrawings($objWriter, $pSheet, $includeCharts); + + // LegacyDrawing + $this->writeLegacyDrawing($objWriter, $pSheet); + + // LegacyDrawingHF + $this->writeLegacyDrawingHF($objWriter, $pSheet); + + // AlternateContent + $this->writeAlternateContent($objWriter, $pSheet); + + $objWriter->endElement(); + + // Return + return $objWriter->getData(); + } + + /** + * Write SheetPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // sheetPr + $objWriter->startElement('sheetPr'); + if ($pSheet->getParent()->hasMacros()) { + //if the workbook have macros, we need to have codeName for the sheet + if (!$pSheet->hasCodeName()) { + $pSheet->setCodeName($pSheet->getTitle()); + } + $objWriter->writeAttribute('codeName', $pSheet->getCodeName()); + } + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + $objWriter->writeAttribute('filterMode', 1); + $pSheet->getAutoFilter()->showHideRows(); + } + + // tabColor + if ($pSheet->isTabColorSet()) { + $objWriter->startElement('tabColor'); + $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB()); + $objWriter->endElement(); + } + + // outlinePr + $objWriter->startElement('outlinePr'); + $objWriter->writeAttribute('summaryBelow', ($pSheet->getShowSummaryBelow() ? '1' : '0')); + $objWriter->writeAttribute('summaryRight', ($pSheet->getShowSummaryRight() ? '1' : '0')); + $objWriter->endElement(); + + // pageSetUpPr + if ($pSheet->getPageSetup()->getFitToPage()) { + $objWriter->startElement('pageSetUpPr'); + $objWriter->writeAttribute('fitToPage', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + /** + * Write Dimension. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // dimension + $objWriter->startElement('dimension'); + $objWriter->writeAttribute('ref', $pSheet->calculateWorksheetDimension()); + $objWriter->endElement(); + } + + /** + * Write SheetViews. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * + * @throws WriterException + */ + private function writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // sheetViews + $objWriter->startElement('sheetViews'); + + // Sheet selected? + $sheetSelected = false; + if ($this->getParentWriter()->getSpreadsheet()->getIndex($pSheet) == $this->getParentWriter()->getSpreadsheet()->getActiveSheetIndex()) { + $sheetSelected = true; + } + + // sheetView + $objWriter->startElement('sheetView'); + $objWriter->writeAttribute('tabSelected', $sheetSelected ? '1' : '0'); + $objWriter->writeAttribute('workbookViewId', '0'); + + // Zoom scales + if ($pSheet->getSheetView()->getZoomScale() != 100) { + $objWriter->writeAttribute('zoomScale', $pSheet->getSheetView()->getZoomScale()); + } + if ($pSheet->getSheetView()->getZoomScaleNormal() != 100) { + $objWriter->writeAttribute('zoomScaleNormal', $pSheet->getSheetView()->getZoomScaleNormal()); + } + + // View Layout Type + if ($pSheet->getSheetView()->getView() !== SheetView::SHEETVIEW_NORMAL) { + $objWriter->writeAttribute('view', $pSheet->getSheetView()->getView()); + } + + // Gridlines + if ($pSheet->getShowGridlines()) { + $objWriter->writeAttribute('showGridLines', 'true'); + } else { + $objWriter->writeAttribute('showGridLines', 'false'); + } + + // Row and column headers + if ($pSheet->getShowRowColHeaders()) { + $objWriter->writeAttribute('showRowColHeaders', '1'); + } else { + $objWriter->writeAttribute('showRowColHeaders', '0'); + } + + // Right-to-left + if ($pSheet->getRightToLeft()) { + $objWriter->writeAttribute('rightToLeft', 'true'); + } + + $activeCell = $pSheet->getActiveCell(); + $sqref = $pSheet->getSelectedCells(); + + // Pane + $pane = ''; + if ($pSheet->getFreezePane()) { + list($xSplit, $ySplit) = Coordinate::coordinateFromString($pSheet->getFreezePane()); + $xSplit = Coordinate::columnIndexFromString($xSplit); + --$xSplit; + --$ySplit; + + $topLeftCell = $pSheet->getTopLeftCell(); + $activeCell = $topLeftCell; + $sqref = $topLeftCell; + + // pane + $pane = 'topRight'; + $objWriter->startElement('pane'); + if ($xSplit > 0) { + $objWriter->writeAttribute('xSplit', $xSplit); + } + if ($ySplit > 0) { + $objWriter->writeAttribute('ySplit', $ySplit); + $pane = ($xSplit > 0) ? 'bottomRight' : 'bottomLeft'; + } + $objWriter->writeAttribute('topLeftCell', $topLeftCell); + $objWriter->writeAttribute('activePane', $pane); + $objWriter->writeAttribute('state', 'frozen'); + $objWriter->endElement(); + + if (($xSplit > 0) && ($ySplit > 0)) { + // Write additional selections if more than two panes (ie both an X and a Y split) + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'topRight'); + $objWriter->endElement(); + $objWriter->startElement('selection'); + $objWriter->writeAttribute('pane', 'bottomLeft'); + $objWriter->endElement(); + } + } + + // Selection + // Only need to write selection element if we have a split pane + // We cheat a little by over-riding the active cell selection, setting it to the split cell + $objWriter->startElement('selection'); + if ($pane != '') { + $objWriter->writeAttribute('pane', $pane); + } + $objWriter->writeAttribute('activeCell', $activeCell); + $objWriter->writeAttribute('sqref', $sqref); + $objWriter->endElement(); + + $objWriter->endElement(); + + $objWriter->endElement(); + } + + /** + * Write SheetFormatPr. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // sheetFormatPr + $objWriter->startElement('sheetFormatPr'); + + // Default row height + if ($pSheet->getDefaultRowDimension()->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', 'true'); + $objWriter->writeAttribute('defaultRowHeight', StringHelper::formatNumber($pSheet->getDefaultRowDimension()->getRowHeight())); + } else { + $objWriter->writeAttribute('defaultRowHeight', '14.4'); + } + + // Set Zero Height row + if ((string) $pSheet->getDefaultRowDimension()->getZeroHeight() === '1' || + strtolower((string) $pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true') { + $objWriter->writeAttribute('zeroHeight', '1'); + } + + // Default column width + if ($pSheet->getDefaultColumnDimension()->getWidth() >= 0) { + $objWriter->writeAttribute('defaultColWidth', StringHelper::formatNumber($pSheet->getDefaultColumnDimension()->getWidth())); + } + + // Outline level - row + $outlineLevelRow = 0; + foreach ($pSheet->getRowDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelRow) { + $outlineLevelRow = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelRow', (int) $outlineLevelRow); + + // Outline level - column + $outlineLevelCol = 0; + foreach ($pSheet->getColumnDimensions() as $dimension) { + if ($dimension->getOutlineLevel() > $outlineLevelCol) { + $outlineLevelCol = $dimension->getOutlineLevel(); + } + } + $objWriter->writeAttribute('outlineLevelCol', (int) $outlineLevelCol); + + $objWriter->endElement(); + } + + /** + * Write Cols. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // cols + if (count($pSheet->getColumnDimensions()) > 0) { + $objWriter->startElement('cols'); + + $pSheet->calculateColumnWidths(); + + // Loop through column dimensions + foreach ($pSheet->getColumnDimensions() as $colDimension) { + // col + $objWriter->startElement('col'); + $objWriter->writeAttribute('min', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + $objWriter->writeAttribute('max', Coordinate::columnIndexFromString($colDimension->getColumnIndex())); + + if ($colDimension->getWidth() < 0) { + // No width set, apply default of 10 + $objWriter->writeAttribute('width', '9.10'); + } else { + // Width set + $objWriter->writeAttribute('width', StringHelper::formatNumber($colDimension->getWidth())); + } + + // Column visibility + if ($colDimension->getVisible() === false) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Auto size? + if ($colDimension->getAutoSize()) { + $objWriter->writeAttribute('bestFit', 'true'); + } + + // Custom width? + if ($colDimension->getWidth() != $pSheet->getDefaultColumnDimension()->getWidth()) { + $objWriter->writeAttribute('customWidth', 'true'); + } + + // Collapsed + if ($colDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($colDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $colDimension->getOutlineLevel()); + } + + // Style + $objWriter->writeAttribute('style', $colDimension->getXfIndex()); + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetProtection. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // sheetProtection + $objWriter->startElement('sheetProtection'); + + if ($pSheet->getProtection()->getPassword() !== '') { + $objWriter->writeAttribute('password', $pSheet->getProtection()->getPassword()); + } + + $objWriter->writeAttribute('sheet', ($pSheet->getProtection()->getSheet() ? 'true' : 'false')); + $objWriter->writeAttribute('objects', ($pSheet->getProtection()->getObjects() ? 'true' : 'false')); + $objWriter->writeAttribute('scenarios', ($pSheet->getProtection()->getScenarios() ? 'true' : 'false')); + $objWriter->writeAttribute('formatCells', ($pSheet->getProtection()->getFormatCells() ? 'true' : 'false')); + $objWriter->writeAttribute('formatColumns', ($pSheet->getProtection()->getFormatColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('formatRows', ($pSheet->getProtection()->getFormatRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertColumns', ($pSheet->getProtection()->getInsertColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('insertRows', ($pSheet->getProtection()->getInsertRows() ? 'true' : 'false')); + $objWriter->writeAttribute('insertHyperlinks', ($pSheet->getProtection()->getInsertHyperlinks() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteColumns', ($pSheet->getProtection()->getDeleteColumns() ? 'true' : 'false')); + $objWriter->writeAttribute('deleteRows', ($pSheet->getProtection()->getDeleteRows() ? 'true' : 'false')); + $objWriter->writeAttribute('selectLockedCells', ($pSheet->getProtection()->getSelectLockedCells() ? 'true' : 'false')); + $objWriter->writeAttribute('sort', ($pSheet->getProtection()->getSort() ? 'true' : 'false')); + $objWriter->writeAttribute('autoFilter', ($pSheet->getProtection()->getAutoFilter() ? 'true' : 'false')); + $objWriter->writeAttribute('pivotTables', ($pSheet->getProtection()->getPivotTables() ? 'true' : 'false')); + $objWriter->writeAttribute('selectUnlockedCells', ($pSheet->getProtection()->getSelectUnlockedCells() ? 'true' : 'false')); + $objWriter->endElement(); + } + + /** + * Write ConditionalFormatting. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * + * @throws WriterException + */ + private function writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // Conditional id + $id = 1; + + // Loop through styles in the current worksheet + foreach ($pSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { + foreach ($conditionalStyles as $conditional) { + // WHY was this again? + // if ($this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode()) == '') { + // continue; + // } + if ($conditional->getConditionType() != Conditional::CONDITION_NONE) { + // conditionalFormatting + $objWriter->startElement('conditionalFormatting'); + $objWriter->writeAttribute('sqref', $cellCoordinate); + + // cfRule + $objWriter->startElement('cfRule'); + $objWriter->writeAttribute('type', $conditional->getConditionType()); + $objWriter->writeAttribute('dxfId', $this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode())); + $objWriter->writeAttribute('priority', $id++); + + if (($conditional->getConditionType() == Conditional::CONDITION_CELLIS || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT) + && $conditional->getOperatorType() != Conditional::OPERATOR_NONE) { + $objWriter->writeAttribute('operator', $conditional->getOperatorType()); + } + + if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + && $conditional->getText() !== null) { + $objWriter->writeAttribute('text', $conditional->getText()); + } + + if ($conditional->getStopIfTrue()) { + $objWriter->writeAttribute('stopIfTrue', '1'); + } + + if ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + && $conditional->getOperatorType() == Conditional::OPERATOR_CONTAINSTEXT + && $conditional->getText() !== null) { + $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . ')))'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + && $conditional->getOperatorType() == Conditional::OPERATOR_BEGINSWITH + && $conditional->getText() !== null) { + $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + && $conditional->getOperatorType() == Conditional::OPERATOR_ENDSWITH + && $conditional->getText() !== null) { + $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + && $conditional->getOperatorType() == Conditional::OPERATOR_NOTCONTAINS + && $conditional->getText() !== null) { + $objWriter->writeElement('formula', 'ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . '))'); + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CELLIS + || $conditional->getConditionType() == Conditional::CONDITION_CONTAINSTEXT + || $conditional->getConditionType() == Conditional::CONDITION_EXPRESSION) { + foreach ($conditional->getConditions() as $formula) { + // Formula + $objWriter->writeElement('formula', $formula); + } + } elseif ($conditional->getConditionType() == Conditional::CONDITION_CONTAINSBLANKS) { + // formula copied from ms xlsx xml source file + $objWriter->writeElement('formula', 'LEN(TRIM(' . $cellCoordinate . '))=0'); + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + } + + /** + * Write DataValidations. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // Datavalidation collection + $dataValidationCollection = $pSheet->getDataValidationCollection(); + + // Write data validations? + if (!empty($dataValidationCollection)) { + $dataValidationCollection = Coordinate::mergeRangesInCollection($dataValidationCollection); + $objWriter->startElement('dataValidations'); + $objWriter->writeAttribute('count', count($dataValidationCollection)); + + foreach ($dataValidationCollection as $coordinate => $dv) { + $objWriter->startElement('dataValidation'); + + if ($dv->getType() != '') { + $objWriter->writeAttribute('type', $dv->getType()); + } + + if ($dv->getErrorStyle() != '') { + $objWriter->writeAttribute('errorStyle', $dv->getErrorStyle()); + } + + if ($dv->getOperator() != '') { + $objWriter->writeAttribute('operator', $dv->getOperator()); + } + + $objWriter->writeAttribute('allowBlank', ($dv->getAllowBlank() ? '1' : '0')); + $objWriter->writeAttribute('showDropDown', (!$dv->getShowDropDown() ? '1' : '0')); + $objWriter->writeAttribute('showInputMessage', ($dv->getShowInputMessage() ? '1' : '0')); + $objWriter->writeAttribute('showErrorMessage', ($dv->getShowErrorMessage() ? '1' : '0')); + + if ($dv->getErrorTitle() !== '') { + $objWriter->writeAttribute('errorTitle', $dv->getErrorTitle()); + } + if ($dv->getError() !== '') { + $objWriter->writeAttribute('error', $dv->getError()); + } + if ($dv->getPromptTitle() !== '') { + $objWriter->writeAttribute('promptTitle', $dv->getPromptTitle()); + } + if ($dv->getPrompt() !== '') { + $objWriter->writeAttribute('prompt', $dv->getPrompt()); + } + + $objWriter->writeAttribute('sqref', $coordinate); + + if ($dv->getFormula1() !== '') { + $objWriter->writeElement('formula1', $dv->getFormula1()); + } + if ($dv->getFormula2() !== '') { + $objWriter->writeElement('formula2', $dv->getFormula2()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write Hyperlinks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // Hyperlink collection + $hyperlinkCollection = $pSheet->getHyperlinkCollection(); + + // Relation ID + $relationId = 1; + + // Write hyperlinks? + if (!empty($hyperlinkCollection)) { + $objWriter->startElement('hyperlinks'); + + foreach ($hyperlinkCollection as $coordinate => $hyperlink) { + $objWriter->startElement('hyperlink'); + + $objWriter->writeAttribute('ref', $coordinate); + if (!$hyperlink->isInternal()) { + $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId); + ++$relationId; + } else { + $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); + } + + if ($hyperlink->getTooltip() !== '') { + $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip()); + $objWriter->writeAttribute('display', $hyperlink->getTooltip()); + } + + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write ProtectedRanges. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + if (count($pSheet->getProtectedCells()) > 0) { + // protectedRanges + $objWriter->startElement('protectedRanges'); + + // Loop protectedRanges + foreach ($pSheet->getProtectedCells() as $protectedCell => $passwordHash) { + // protectedRange + $objWriter->startElement('protectedRange'); + $objWriter->writeAttribute('name', 'p' . md5($protectedCell)); + $objWriter->writeAttribute('sqref', $protectedCell); + if (!empty($passwordHash)) { + $objWriter->writeAttribute('password', $passwordHash); + } + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write MergeCells. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + if (count($pSheet->getMergeCells()) > 0) { + // mergeCells + $objWriter->startElement('mergeCells'); + + // Loop mergeCells + foreach ($pSheet->getMergeCells() as $mergeCell) { + // mergeCell + $objWriter->startElement('mergeCell'); + $objWriter->writeAttribute('ref', $mergeCell); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write PrintOptions. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // printOptions + $objWriter->startElement('printOptions'); + + $objWriter->writeAttribute('gridLines', ($pSheet->getPrintGridlines() ? 'true' : 'false')); + $objWriter->writeAttribute('gridLinesSet', 'true'); + + if ($pSheet->getPageSetup()->getHorizontalCentered()) { + $objWriter->writeAttribute('horizontalCentered', 'true'); + } + + if ($pSheet->getPageSetup()->getVerticalCentered()) { + $objWriter->writeAttribute('verticalCentered', 'true'); + } + + $objWriter->endElement(); + } + + /** + * Write PageMargins. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // pageMargins + $objWriter->startElement('pageMargins'); + $objWriter->writeAttribute('left', StringHelper::formatNumber($pSheet->getPageMargins()->getLeft())); + $objWriter->writeAttribute('right', StringHelper::formatNumber($pSheet->getPageMargins()->getRight())); + $objWriter->writeAttribute('top', StringHelper::formatNumber($pSheet->getPageMargins()->getTop())); + $objWriter->writeAttribute('bottom', StringHelper::formatNumber($pSheet->getPageMargins()->getBottom())); + $objWriter->writeAttribute('header', StringHelper::formatNumber($pSheet->getPageMargins()->getHeader())); + $objWriter->writeAttribute('footer', StringHelper::formatNumber($pSheet->getPageMargins()->getFooter())); + $objWriter->endElement(); + } + + /** + * Write AutoFilter. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + $autoFilterRange = $pSheet->getAutoFilter()->getRange(); + if (!empty($autoFilterRange)) { + // autoFilter + $objWriter->startElement('autoFilter'); + + // Strip any worksheet reference from the filter coordinates + $range = Coordinate::splitRange($autoFilterRange); + $range = $range[0]; + // Strip any worksheet ref + list($ws, $range[0]) = PhpspreadsheetWorksheet::extractSheetTitle($range[0], true); + $range = implode(':', $range); + + $objWriter->writeAttribute('ref', str_replace('$', '', $range)); + + $columns = $pSheet->getAutoFilter()->getColumns(); + if (count($columns) > 0) { + foreach ($columns as $columnID => $column) { + $rules = $column->getRules(); + if (count($rules) > 0) { + $objWriter->startElement('filterColumn'); + $objWriter->writeAttribute('colId', $pSheet->getAutoFilter()->getColumnOffset($columnID)); + + $objWriter->startElement($column->getFilterType()); + if ($column->getJoin() == Column::AUTOFILTER_COLUMN_JOIN_AND) { + $objWriter->writeAttribute('and', 1); + } + + foreach ($rules as $rule) { + if (($column->getFilterType() === Column::AUTOFILTER_FILTERTYPE_FILTER) && + ($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_EQUAL) && + ($rule->getValue() === '')) { + // Filter rule for Blanks + $objWriter->writeAttribute('blank', 1); + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER) { + // Dynamic Filter Rule + $objWriter->writeAttribute('type', $rule->getGrouping()); + $val = $column->getAttribute('val'); + if ($val !== null) { + $objWriter->writeAttribute('val', $val); + } + $maxVal = $column->getAttribute('maxVal'); + if ($maxVal !== null) { + $objWriter->writeAttribute('maxVal', $maxVal); + } + } elseif ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_TOPTENFILTER) { + // Top 10 Filter Rule + $objWriter->writeAttribute('val', $rule->getValue()); + $objWriter->writeAttribute('percent', (($rule->getOperator() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) ? '1' : '0')); + $objWriter->writeAttribute('top', (($rule->getGrouping() === Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) ? '1' : '0')); + } else { + // Filter, DateGroupItem or CustomFilter + $objWriter->startElement($rule->getRuleType()); + + if ($rule->getOperator() !== Rule::AUTOFILTER_COLUMN_RULE_EQUAL) { + $objWriter->writeAttribute('operator', $rule->getOperator()); + } + if ($rule->getRuleType() === Rule::AUTOFILTER_RULETYPE_DATEGROUP) { + // Date Group filters + foreach ($rule->getValue() as $key => $value) { + if ($value > '') { + $objWriter->writeAttribute($key, $value); + } + } + $objWriter->writeAttribute('dateTimeGrouping', $rule->getGrouping()); + } else { + $objWriter->writeAttribute('val', $rule->getValue()); + } + + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + + $objWriter->endElement(); + } + } + } + $objWriter->endElement(); + } + } + + /** + * Write PageSetup. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // pageSetup + $objWriter->startElement('pageSetup'); + $objWriter->writeAttribute('paperSize', $pSheet->getPageSetup()->getPaperSize()); + $objWriter->writeAttribute('orientation', $pSheet->getPageSetup()->getOrientation()); + + if ($pSheet->getPageSetup()->getScale() !== null) { + $objWriter->writeAttribute('scale', $pSheet->getPageSetup()->getScale()); + } + if ($pSheet->getPageSetup()->getFitToHeight() !== null) { + $objWriter->writeAttribute('fitToHeight', $pSheet->getPageSetup()->getFitToHeight()); + } else { + $objWriter->writeAttribute('fitToHeight', '0'); + } + if ($pSheet->getPageSetup()->getFitToWidth() !== null) { + $objWriter->writeAttribute('fitToWidth', $pSheet->getPageSetup()->getFitToWidth()); + } else { + $objWriter->writeAttribute('fitToWidth', '0'); + } + if ($pSheet->getPageSetup()->getFirstPageNumber() !== null) { + $objWriter->writeAttribute('firstPageNumber', $pSheet->getPageSetup()->getFirstPageNumber()); + $objWriter->writeAttribute('useFirstPageNumber', '1'); + } + + $getUnparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + if (isset($getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId'])) { + $objWriter->writeAttribute('r:id', $getUnparsedLoadedData['sheets'][$pSheet->getCodeName()]['pageSetupRelId']); + } + + $objWriter->endElement(); + } + + /** + * Write Header / Footer. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // headerFooter + $objWriter->startElement('headerFooter'); + $objWriter->writeAttribute('differentOddEven', ($pSheet->getHeaderFooter()->getDifferentOddEven() ? 'true' : 'false')); + $objWriter->writeAttribute('differentFirst', ($pSheet->getHeaderFooter()->getDifferentFirst() ? 'true' : 'false')); + $objWriter->writeAttribute('scaleWithDoc', ($pSheet->getHeaderFooter()->getScaleWithDocument() ? 'true' : 'false')); + $objWriter->writeAttribute('alignWithMargins', ($pSheet->getHeaderFooter()->getAlignWithMargins() ? 'true' : 'false')); + + $objWriter->writeElement('oddHeader', $pSheet->getHeaderFooter()->getOddHeader()); + $objWriter->writeElement('oddFooter', $pSheet->getHeaderFooter()->getOddFooter()); + $objWriter->writeElement('evenHeader', $pSheet->getHeaderFooter()->getEvenHeader()); + $objWriter->writeElement('evenFooter', $pSheet->getHeaderFooter()->getEvenFooter()); + $objWriter->writeElement('firstHeader', $pSheet->getHeaderFooter()->getFirstHeader()); + $objWriter->writeElement('firstFooter', $pSheet->getHeaderFooter()->getFirstFooter()); + $objWriter->endElement(); + } + + /** + * Write Breaks. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // Get row and column breaks + $aRowBreaks = []; + $aColumnBreaks = []; + foreach ($pSheet->getBreaks() as $cell => $breakType) { + if ($breakType == PhpspreadsheetWorksheet::BREAK_ROW) { + $aRowBreaks[] = $cell; + } elseif ($breakType == PhpspreadsheetWorksheet::BREAK_COLUMN) { + $aColumnBreaks[] = $cell; + } + } + + // rowBreaks + if (!empty($aRowBreaks)) { + $objWriter->startElement('rowBreaks'); + $objWriter->writeAttribute('count', count($aRowBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aRowBreaks)); + + foreach ($aRowBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', $coords[1]); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + + // Second, write column breaks + if (!empty($aColumnBreaks)) { + $objWriter->startElement('colBreaks'); + $objWriter->writeAttribute('count', count($aColumnBreaks)); + $objWriter->writeAttribute('manualBreakCount', count($aColumnBreaks)); + + foreach ($aColumnBreaks as $cell) { + $coords = Coordinate::coordinateFromString($cell); + + $objWriter->startElement('brk'); + $objWriter->writeAttribute('id', Coordinate::columnIndexFromString($coords[0]) - 1); + $objWriter->writeAttribute('man', '1'); + $objWriter->endElement(); + } + + $objWriter->endElement(); + } + } + + /** + * Write SheetData. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param string[] $pStringTable String table + * + * @throws WriterException + */ + private function writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, array $pStringTable) + { + // Flipped stringtable, for faster index searching + $aFlippedStringTable = $this->getParentWriter()->getWriterPart('stringtable')->flipStringTable($pStringTable); + + // sheetData + $objWriter->startElement('sheetData'); + + // Get column count + $colCount = Coordinate::columnIndexFromString($pSheet->getHighestColumn()); + + // Highest row number + $highestRow = $pSheet->getHighestRow(); + + // Loop through cells + $cellsByRow = []; + foreach ($pSheet->getCoordinates() as $coordinate) { + $cellAddress = Coordinate::coordinateFromString($coordinate); + $cellsByRow[$cellAddress[1]][] = $coordinate; + } + + $currentRow = 0; + while ($currentRow++ < $highestRow) { + // Get row dimension + $rowDimension = $pSheet->getRowDimension($currentRow); + + // Write current row? + $writeCurrentRow = isset($cellsByRow[$currentRow]) || $rowDimension->getRowHeight() >= 0 || $rowDimension->getVisible() == false || $rowDimension->getCollapsed() == true || $rowDimension->getOutlineLevel() > 0 || $rowDimension->getXfIndex() !== null; + + if ($writeCurrentRow) { + // Start a new row + $objWriter->startElement('row'); + $objWriter->writeAttribute('r', $currentRow); + $objWriter->writeAttribute('spans', '1:' . $colCount); + + // Row dimensions + if ($rowDimension->getRowHeight() >= 0) { + $objWriter->writeAttribute('customHeight', '1'); + $objWriter->writeAttribute('ht', StringHelper::formatNumber($rowDimension->getRowHeight())); + } + + // Row visibility + if (!$rowDimension->getVisible() === true) { + $objWriter->writeAttribute('hidden', 'true'); + } + + // Collapsed + if ($rowDimension->getCollapsed() === true) { + $objWriter->writeAttribute('collapsed', 'true'); + } + + // Outline level + if ($rowDimension->getOutlineLevel() > 0) { + $objWriter->writeAttribute('outlineLevel', $rowDimension->getOutlineLevel()); + } + + // Style + if ($rowDimension->getXfIndex() !== null) { + $objWriter->writeAttribute('s', $rowDimension->getXfIndex()); + $objWriter->writeAttribute('customFormat', '1'); + } + + // Write cells + if (isset($cellsByRow[$currentRow])) { + foreach ($cellsByRow[$currentRow] as $cellAddress) { + // Write cell + $this->writeCell($objWriter, $pSheet, $cellAddress, $aFlippedStringTable); + } + } + + // End row + $objWriter->endElement(); + } + } + + $objWriter->endElement(); + } + + /** + * Write Cell. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param Cell $pCellAddress Cell Address + * @param string[] $pFlippedStringTable String table (flipped), for faster index searching + * + * @throws WriterException + */ + private function writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, $pCellAddress, array $pFlippedStringTable) + { + // Cell + $pCell = $pSheet->getCell($pCellAddress); + $objWriter->startElement('c'); + $objWriter->writeAttribute('r', $pCellAddress); + + // Sheet styles + if ($pCell->getXfIndex() != '') { + $objWriter->writeAttribute('s', $pCell->getXfIndex()); + } + + // If cell value is supplied, write cell value + $cellValue = $pCell->getValue(); + if (is_object($cellValue) || $cellValue !== '') { + // Map type + $mappedType = $pCell->getDataType(); + + // Write data type depending on its type + switch (strtolower($mappedType)) { + case 'inlinestr': // Inline string + case 's': // String + case 'b': // Boolean + $objWriter->writeAttribute('t', $mappedType); + + break; + case 'f': // Formula + $calculatedValue = ($this->getParentWriter()->getPreCalculateFormulas()) ? + $pCell->getCalculatedValue() : $cellValue; + if (is_string($calculatedValue)) { + $objWriter->writeAttribute('t', 'str'); + } elseif (is_bool($calculatedValue)) { + $objWriter->writeAttribute('t', 'b'); + } + + break; + case 'e': // Error + $objWriter->writeAttribute('t', $mappedType); + } + + // Write data depending on its type + switch (strtolower($mappedType)) { + case 'inlinestr': // Inline string + if (!$cellValue instanceof RichText) { + $objWriter->writeElement('t', StringHelper::controlCharacterPHP2OOXML(htmlspecialchars($cellValue))); + } elseif ($cellValue instanceof RichText) { + $objWriter->startElement('is'); + $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $cellValue); + $objWriter->endElement(); + } + + break; + case 's': // String + if (!$cellValue instanceof RichText) { + if (isset($pFlippedStringTable[$cellValue])) { + $objWriter->writeElement('v', $pFlippedStringTable[$cellValue]); + } + } elseif ($cellValue instanceof RichText) { + $objWriter->writeElement('v', $pFlippedStringTable[$cellValue->getHashCode()]); + } + + break; + case 'f': // Formula + $attributes = $pCell->getFormulaAttributes(); + if ($attributes['t'] === 'array') { + $objWriter->startElement('f'); + $objWriter->writeAttribute('t', 'array'); + $objWriter->writeAttribute('ref', $pCellAddress); + $objWriter->writeAttribute('aca', '1'); + $objWriter->writeAttribute('ca', '1'); + $objWriter->text(substr($cellValue, 1)); + $objWriter->endElement(); + } else { + $objWriter->writeElement('f', substr($cellValue, 1)); + } + if ($this->getParentWriter()->getOffice2003Compatibility() === false) { + if ($this->getParentWriter()->getPreCalculateFormulas()) { + if (!is_array($calculatedValue) && substr($calculatedValue, 0, 1) !== '#') { + $objWriter->writeElement('v', StringHelper::formatNumber($calculatedValue)); + } else { + $objWriter->writeElement('v', '0'); + } + } else { + $objWriter->writeElement('v', '0'); + } + } + + break; + case 'n': // Numeric + // force point as decimal separator in case current locale uses comma + $objWriter->writeElement('v', str_replace(',', '.', $cellValue)); + + break; + case 'b': // Boolean + $objWriter->writeElement('v', ($cellValue ? '1' : '0')); + + break; + case 'e': // Error + if (substr($cellValue, 0, 1) === '=') { + $objWriter->writeElement('f', substr($cellValue, 1)); + $objWriter->writeElement('v', substr($cellValue, 1)); + } else { + $objWriter->writeElement('v', $cellValue); + } + + break; + } + } + + $objWriter->endElement(); + } + + /** + * Write Drawings. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + * @param bool $includeCharts Flag indicating if we should include drawing details for charts + */ + private function writeDrawings(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, $includeCharts = false) + { + $unparsedLoadedData = $pSheet->getParent()->getUnparsedLoadedData(); + $hasUnparsedDrawing = isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']); + $chartCount = ($includeCharts) ? $pSheet->getChartCollection()->count() : 0; + if ($chartCount == 0 && $pSheet->getDrawingCollection()->count() == 0 && !$hasUnparsedDrawing) { + return; + } + + // If sheet contains drawings, add the relationships + $objWriter->startElement('drawing'); + + $rId = 'rId1'; + if (isset($unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds'])) { + $drawingOriginalIds = $unparsedLoadedData['sheets'][$pSheet->getCodeName()]['drawingOriginalIds']; + // take first. In future can be overriten + $rId = reset($drawingOriginalIds); + } + + $objWriter->writeAttribute('r:id', $rId); + $objWriter->endElement(); + } + + /** + * Write LegacyDrawing. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // If sheet contains comments, add the relationships + if (count($pSheet->getComments()) > 0) { + $objWriter->startElement('legacyDrawing'); + $objWriter->writeAttribute('r:id', 'rId_comments_vml1'); + $objWriter->endElement(); + } + } + + /** + * Write LegacyDrawingHF. + * + * @param XMLWriter $objWriter XML Writer + * @param PhpspreadsheetWorksheet $pSheet Worksheet + */ + private function writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + // If sheet contains images, add the relationships + if (count($pSheet->getHeaderFooter()->getImages()) > 0) { + $objWriter->startElement('legacyDrawingHF'); + $objWriter->writeAttribute('r:id', 'rId_headerfooter_vml1'); + $objWriter->endElement(); + } + } + + private function writeAlternateContent(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) + { + if (empty($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'])) { + return; + } + + foreach ($pSheet->getParent()->getUnparsedLoadedData()['sheets'][$pSheet->getCodeName()]['AlternateContents'] as $alternateContent) { + $objWriter->writeRaw($alternateContent); + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php new file mode 100755 index 0000000..7119512 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php @@ -0,0 +1,35 @@ +parentWriter; + } + + /** + * Set parent Xlsx object. + * + * @param Xlsx $pWriter + */ + public function __construct(Xlsx $pWriter) + { + $this->parentWriter = $pWriter; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/CHANGELOG.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/CHANGELOG.md new file mode 100755 index 0000000..e2dc25f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/CHANGELOG.md @@ -0,0 +1,23 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.1 + +Allow installation with PHP 8. No code changes. + +## 1.0.0 + +First stable release. No changes since 0.3.0. + +## 0.3.0 + +Added Interface suffix on exceptions + +## 0.2.0 + +All exceptions are in `Psr\Http\Client` namespace + +## 0.1.0 + +First release diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/LICENSE b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/LICENSE new file mode 100755 index 0000000..cd5e002 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2017 PHP Framework Interoperability Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/README.md new file mode 100755 index 0000000..6876b84 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/README.md @@ -0,0 +1,12 @@ +HTTP Client +=========== + +This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. + +Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. + +The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. + +[psr-url]: http://www.php-fig.org/psr/psr-18 +[package-url]: https://packagist.org/packages/psr/http-client +[implementation-url]: https://packagist.org/providers/psr/http-client-implementation diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/composer.json new file mode 100755 index 0000000..c195f8f --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/composer.json @@ -0,0 +1,27 @@ +{ + "name": "psr/http-client", + "description": "Common interface for HTTP clients", + "keywords": ["psr", "psr-18", "http", "http-client"], + "homepage": "https://github.com/php-fig/http-client", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/src/ClientExceptionInterface.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/src/ClientExceptionInterface.php new file mode 100755 index 0000000..aa0b9cf --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-client/src/ClientExceptionInterface.php @@ -0,0 +1,10 @@ +=7.0.0", + "psr/http-message": "^1.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-factory/src/RequestFactoryInterface.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-factory/src/RequestFactoryInterface.php new file mode 100755 index 0000000..cb39a08 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-factory/src/RequestFactoryInterface.php @@ -0,0 +1,18 @@ +=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/MessageInterface.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/MessageInterface.php new file mode 100755 index 0000000..dd46e5e --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,187 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader($name); + + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader($name); + + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine($name); + + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader($name, $value); + + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader($name, $value); + + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader($name); + + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(StreamInterface $body); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/RequestInterface.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/RequestInterface.php new file mode 100755 index 0000000..a96d4fd --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,129 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute($name, $default = null); + + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute($name, $value); + + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute($name); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/StreamInterface.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/StreamInterface.php new file mode 100755 index 0000000..f68f391 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,158 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/.editorconfig b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/.editorconfig new file mode 100755 index 0000000..48542cb --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/.editorconfig @@ -0,0 +1,12 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/LICENSE.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/LICENSE.md new file mode 100755 index 0000000..e49a7c8 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2016 PHP Framework Interoperability Group + +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/README.md new file mode 100755 index 0000000..43641d1 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/README.md @@ -0,0 +1,8 @@ +PHP FIG Simple Cache PSR +======================== + +This repository holds all interfaces related to PSR-16. + +Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. + +You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/composer.json new file mode 100755 index 0000000..2978fa5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/composer.json @@ -0,0 +1,25 @@ +{ + "name": "psr/simple-cache", + "description": "Common interfaces for simple caching", + "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/CacheException.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/CacheException.php new file mode 100755 index 0000000..eba5381 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/CacheException.php @@ -0,0 +1,10 @@ + value pairs. Cache keys that do not exist or are stale will have $default as value. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function getMultiple($keys, $default = null); + + /** + * Persists a set of key => value pairs in the cache, with an optional TTL. + * + * @param iterable $values A list of key => value pairs for a multiple-set operation. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $values is neither an array nor a Traversable, + * or if any of the $values are not a legal value. + */ + public function setMultiple($values, $ttl = null); + + /** + * Deletes multiple cache items in a single operation. + * + * @param iterable $keys A list of string-based keys to be deleted. + * + * @return bool True if the items were successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function deleteMultiple($keys); + + /** + * Determines whether an item is present in the cache. + * + * NOTE: It is recommended that has() is only to be used for cache warming type purposes + * and not to be used within your live applications operations for get/set, as this method + * is subject to a race condition where your has() will return true and immediately after, + * another script can remove it making the state of your app out of date. + * + * @param string $key The cache item key. + * + * @return bool + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function has($key); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/InvalidArgumentException.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/InvalidArgumentException.php new file mode 100755 index 0000000..6a9524a --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/psr/simple-cache/src/InvalidArgumentException.php @@ -0,0 +1,13 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + const MB_CASE_FOLD = PHP_INT_MAX; + + private static $encodingList = array('ASCII', 'UTF-8'); + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + private static $caseFold = array( + array('µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"), + array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'), + ); + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) + { + $vars = array(&$a, &$b, &$c, &$d, &$e, &$f); + + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); + } else { + if (MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) { + self::$internalEncoding = $encoding; + + return true; + } + + return false; + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($lang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $lang; + + return true; + } + + return false; + } + + public static function mb_list_encodings() + { + return array('UTF-8'); + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return array('utf8'); + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); + + return false; + } + + return iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + trigger_error('The length of each segment must be greater than zero', E_USER_WARNING); + + return false; + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + } + + $result = array(); + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (0 === strcasecmp($c, 'none')) { + return true; + } + + return null !== $c ? false : 'none'; + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrchr($haystack, $needle, $part); + } + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = iconv_strrpos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = array( + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ); + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/README.md b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/README.md new file mode 100755 index 0000000..4efb599 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100755 index 0000000..a22eca5 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ꭰ' => 'ꭰ', + 'Ꭱ' => 'ꭱ', + 'Ꭲ' => 'ꭲ', + 'Ꭳ' => 'ꭳ', + 'Ꭴ' => 'ꭴ', + 'Ꭵ' => 'ꭵ', + 'Ꭶ' => 'ꭶ', + 'Ꭷ' => 'ꭷ', + 'Ꭸ' => 'ꭸ', + 'Ꭹ' => 'ꭹ', + 'Ꭺ' => 'ꭺ', + 'Ꭻ' => 'ꭻ', + 'Ꭼ' => 'ꭼ', + 'Ꭽ' => 'ꭽ', + 'Ꭾ' => 'ꭾ', + 'Ꭿ' => 'ꭿ', + 'Ꮀ' => 'ꮀ', + 'Ꮁ' => 'ꮁ', + 'Ꮂ' => 'ꮂ', + 'Ꮃ' => 'ꮃ', + 'Ꮄ' => 'ꮄ', + 'Ꮅ' => 'ꮅ', + 'Ꮆ' => 'ꮆ', + 'Ꮇ' => 'ꮇ', + 'Ꮈ' => 'ꮈ', + 'Ꮉ' => 'ꮉ', + 'Ꮊ' => 'ꮊ', + 'Ꮋ' => 'ꮋ', + 'Ꮌ' => 'ꮌ', + 'Ꮍ' => 'ꮍ', + 'Ꮎ' => 'ꮎ', + 'Ꮏ' => 'ꮏ', + 'Ꮐ' => 'ꮐ', + 'Ꮑ' => 'ꮑ', + 'Ꮒ' => 'ꮒ', + 'Ꮓ' => 'ꮓ', + 'Ꮔ' => 'ꮔ', + 'Ꮕ' => 'ꮕ', + 'Ꮖ' => 'ꮖ', + 'Ꮗ' => 'ꮗ', + 'Ꮘ' => 'ꮘ', + 'Ꮙ' => 'ꮙ', + 'Ꮚ' => 'ꮚ', + 'Ꮛ' => 'ꮛ', + 'Ꮜ' => 'ꮜ', + 'Ꮝ' => 'ꮝ', + 'Ꮞ' => 'ꮞ', + 'Ꮟ' => 'ꮟ', + 'Ꮠ' => 'ꮠ', + 'Ꮡ' => 'ꮡ', + 'Ꮢ' => 'ꮢ', + 'Ꮣ' => 'ꮣ', + 'Ꮤ' => 'ꮤ', + 'Ꮥ' => 'ꮥ', + 'Ꮦ' => 'ꮦ', + 'Ꮧ' => 'ꮧ', + 'Ꮨ' => 'ꮨ', + 'Ꮩ' => 'ꮩ', + 'Ꮪ' => 'ꮪ', + 'Ꮫ' => 'ꮫ', + 'Ꮬ' => 'ꮬ', + 'Ꮭ' => 'ꮭ', + 'Ꮮ' => 'ꮮ', + 'Ꮯ' => 'ꮯ', + 'Ꮰ' => 'ꮰ', + 'Ꮱ' => 'ꮱ', + 'Ꮲ' => 'ꮲ', + 'Ꮳ' => 'ꮳ', + 'Ꮴ' => 'ꮴ', + 'Ꮵ' => 'ꮵ', + 'Ꮶ' => 'ꮶ', + 'Ꮷ' => 'ꮷ', + 'Ꮸ' => 'ꮸ', + 'Ꮹ' => 'ꮹ', + 'Ꮺ' => 'ꮺ', + 'Ꮻ' => 'ꮻ', + 'Ꮼ' => 'ꮼ', + 'Ꮽ' => 'ꮽ', + 'Ꮾ' => 'ꮾ', + 'Ꮿ' => 'ꮿ', + 'Ᏸ' => 'ᏸ', + 'Ᏹ' => 'ᏹ', + 'Ᏺ' => 'ᏺ', + 'Ᏻ' => 'ᏻ', + 'Ᏼ' => 'ᏼ', + 'Ᏽ' => 'ᏽ', + 'Ა' => 'ა', + 'Ბ' => 'ბ', + 'Გ' => 'გ', + 'Დ' => 'დ', + 'Ე' => 'ე', + 'Ვ' => 'ვ', + 'Ზ' => 'ზ', + 'Თ' => 'თ', + 'Ი' => 'ი', + 'Კ' => 'კ', + 'Ლ' => 'ლ', + 'Მ' => 'მ', + 'Ნ' => 'ნ', + 'Ო' => 'ო', + 'Პ' => 'პ', + 'Ჟ' => 'ჟ', + 'Რ' => 'რ', + 'Ს' => 'ს', + 'Ტ' => 'ტ', + 'Უ' => 'უ', + 'Ფ' => 'ფ', + 'Ქ' => 'ქ', + 'Ღ' => 'ღ', + 'Ყ' => 'ყ', + 'Შ' => 'შ', + 'Ჩ' => 'ჩ', + 'Ც' => 'ც', + 'Ძ' => 'ძ', + 'Წ' => 'წ', + 'Ჭ' => 'ჭ', + 'Ხ' => 'ხ', + 'Ჯ' => 'ჯ', + 'Ჰ' => 'ჰ', + 'Ჱ' => 'ჱ', + 'Ჲ' => 'ჲ', + 'Ჳ' => 'ჳ', + 'Ჴ' => 'ჴ', + 'Ჵ' => 'ჵ', + 'Ჶ' => 'ჶ', + 'Ჷ' => 'ჷ', + 'Ჸ' => 'ჸ', + 'Ჹ' => 'ჹ', + 'Ჺ' => 'ჺ', + 'Ჽ' => 'ჽ', + 'Ჾ' => 'ჾ', + 'Ჿ' => 'ჿ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ɪ' => 'ɪ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'Ʝ' => 'ʝ', + 'Ꭓ' => 'ꭓ', + 'Ꞵ' => 'ꞵ', + 'Ꞷ' => 'ꞷ', + 'Ꞹ' => 'ꞹ', + 'Ꞻ' => 'ꞻ', + 'Ꞽ' => 'ꞽ', + 'Ꞿ' => 'ꞿ', + 'Ꟃ' => 'ꟃ', + 'Ꞔ' => 'ꞔ', + 'Ʂ' => 'ʂ', + 'Ᶎ' => 'ᶎ', + 'Ꟈ' => 'ꟈ', + 'Ꟊ' => 'ꟊ', + 'Ꟶ' => 'ꟶ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𐒰' => '𐓘', + '𐒱' => '𐓙', + '𐒲' => '𐓚', + '𐒳' => '𐓛', + '𐒴' => '𐓜', + '𐒵' => '𐓝', + '𐒶' => '𐓞', + '𐒷' => '𐓟', + '𐒸' => '𐓠', + '𐒹' => '𐓡', + '𐒺' => '𐓢', + '𐒻' => '𐓣', + '𐒼' => '𐓤', + '𐒽' => '𐓥', + '𐒾' => '𐓦', + '𐒿' => '𐓧', + '𐓀' => '𐓨', + '𐓁' => '𐓩', + '𐓂' => '𐓪', + '𐓃' => '𐓫', + '𐓄' => '𐓬', + '𐓅' => '𐓭', + '𐓆' => '𐓮', + '𐓇' => '𐓯', + '𐓈' => '𐓰', + '𐓉' => '𐓱', + '𐓊' => '𐓲', + '𐓋' => '𐓳', + '𐓌' => '𐓴', + '𐓍' => '𐓵', + '𐓎' => '𐓶', + '𐓏' => '𐓷', + '𐓐' => '𐓸', + '𐓑' => '𐓹', + '𐓒' => '𐓺', + '𐓓' => '𐓻', + '𐲀' => '𐳀', + '𐲁' => '𐳁', + '𐲂' => '𐳂', + '𐲃' => '𐳃', + '𐲄' => '𐳄', + '𐲅' => '𐳅', + '𐲆' => '𐳆', + '𐲇' => '𐳇', + '𐲈' => '𐳈', + '𐲉' => '𐳉', + '𐲊' => '𐳊', + '𐲋' => '𐳋', + '𐲌' => '𐳌', + '𐲍' => '𐳍', + '𐲎' => '𐳎', + '𐲏' => '𐳏', + '𐲐' => '𐳐', + '𐲑' => '𐳑', + '𐲒' => '𐳒', + '𐲓' => '𐳓', + '𐲔' => '𐳔', + '𐲕' => '𐳕', + '𐲖' => '𐳖', + '𐲗' => '𐳗', + '𐲘' => '𐳘', + '𐲙' => '𐳙', + '𐲚' => '𐳚', + '𐲛' => '𐳛', + '𐲜' => '𐳜', + '𐲝' => '𐳝', + '𐲞' => '𐳞', + '𐲟' => '𐳟', + '𐲠' => '𐳠', + '𐲡' => '𐳡', + '𐲢' => '𐳢', + '𐲣' => '𐳣', + '𐲤' => '𐳤', + '𐲥' => '𐳥', + '𐲦' => '𐳦', + '𐲧' => '𐳧', + '𐲨' => '𐳨', + '𐲩' => '𐳩', + '𐲪' => '𐳪', + '𐲫' => '𐳫', + '𐲬' => '𐳬', + '𐲭' => '𐳭', + '𐲮' => '𐳮', + '𐲯' => '𐳯', + '𐲰' => '𐳰', + '𐲱' => '𐳱', + '𐲲' => '𐳲', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', + '𖹀' => '𖹠', + '𖹁' => '𖹡', + '𖹂' => '𖹢', + '𖹃' => '𖹣', + '𖹄' => '𖹤', + '𖹅' => '𖹥', + '𖹆' => '𖹦', + '𖹇' => '𖹧', + '𖹈' => '𖹨', + '𖹉' => '𖹩', + '𖹊' => '𖹪', + '𖹋' => '𖹫', + '𖹌' => '𖹬', + '𖹍' => '𖹭', + '𖹎' => '𖹮', + '𖹏' => '𖹯', + '𖹐' => '𖹰', + '𖹑' => '𖹱', + '𖹒' => '𖹲', + '𖹓' => '𖹳', + '𖹔' => '𖹴', + '𖹕' => '𖹵', + '𖹖' => '𖹶', + '𖹗' => '𖹷', + '𖹘' => '𖹸', + '𖹙' => '𖹹', + '𖹚' => '𖹺', + '𖹛' => '𖹻', + '𖹜' => '𖹼', + '𖹝' => '𖹽', + '𖹞' => '𖹾', + '𖹟' => '𖹿', + '𞤀' => '𞤢', + '𞤁' => '𞤣', + '𞤂' => '𞤤', + '𞤃' => '𞤥', + '𞤄' => '𞤦', + '𞤅' => '𞤧', + '𞤆' => '𞤨', + '𞤇' => '𞤩', + '𞤈' => '𞤪', + '𞤉' => '𞤫', + '𞤊' => '𞤬', + '𞤋' => '𞤭', + '𞤌' => '𞤮', + '𞤍' => '𞤯', + '𞤎' => '𞤰', + '𞤏' => '𞤱', + '𞤐' => '𞤲', + '𞤑' => '𞤳', + '𞤒' => '𞤴', + '𞤓' => '𞤵', + '𞤔' => '𞤶', + '𞤕' => '𞤷', + '𞤖' => '𞤸', + '𞤗' => '𞤹', + '𞤘' => '𞤺', + '𞤙' => '𞤻', + '𞤚' => '𞤼', + '𞤛' => '𞤽', + '𞤜' => '𞤾', + '𞤝' => '𞤿', + '𞤞' => '𞥀', + '𞤟' => '𞥁', + '𞤠' => '𞥂', + '𞤡' => '𞥃', +); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100755 index 0000000..2a8f6e7 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɪ' => 'Ɪ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʂ' => 'Ʂ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʝ' => 'Ʝ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ა' => 'Ა', + 'ბ' => 'Ბ', + 'გ' => 'Გ', + 'დ' => 'Დ', + 'ე' => 'Ე', + 'ვ' => 'Ვ', + 'ზ' => 'Ზ', + 'თ' => 'Თ', + 'ი' => 'Ი', + 'კ' => 'Კ', + 'ლ' => 'Ლ', + 'მ' => 'Მ', + 'ნ' => 'Ნ', + 'ო' => 'Ო', + 'პ' => 'Პ', + 'ჟ' => 'Ჟ', + 'რ' => 'Რ', + 'ს' => 'Ს', + 'ტ' => 'Ტ', + 'უ' => 'Უ', + 'ფ' => 'Ფ', + 'ქ' => 'Ქ', + 'ღ' => 'Ღ', + 'ყ' => 'Ყ', + 'შ' => 'Შ', + 'ჩ' => 'Ჩ', + 'ც' => 'Ც', + 'ძ' => 'Ძ', + 'წ' => 'Წ', + 'ჭ' => 'Ჭ', + 'ხ' => 'Ხ', + 'ჯ' => 'Ჯ', + 'ჰ' => 'Ჰ', + 'ჱ' => 'Ჱ', + 'ჲ' => 'Ჲ', + 'ჳ' => 'Ჳ', + 'ჴ' => 'Ჴ', + 'ჵ' => 'Ჵ', + 'ჶ' => 'Ჶ', + 'ჷ' => 'Ჷ', + 'ჸ' => 'Ჸ', + 'ჹ' => 'Ჹ', + 'ჺ' => 'Ჺ', + 'ჽ' => 'Ჽ', + 'ჾ' => 'Ჾ', + 'ჿ' => 'Ჿ', + 'ᏸ' => 'Ᏸ', + 'ᏹ' => 'Ᏹ', + 'ᏺ' => 'Ᏺ', + 'ᏻ' => 'Ᏻ', + 'ᏼ' => 'Ᏼ', + 'ᏽ' => 'Ᏽ', + 'ᲀ' => 'В', + 'ᲁ' => 'Д', + 'ᲂ' => 'О', + 'ᲃ' => 'С', + 'ᲄ' => 'Т', + 'ᲅ' => 'Т', + 'ᲆ' => 'Ъ', + 'ᲇ' => 'Ѣ', + 'ᲈ' => 'Ꙋ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ᶎ' => 'Ᶎ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞔ' => 'Ꞔ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'ꞵ' => 'Ꞵ', + 'ꞷ' => 'Ꞷ', + 'ꞹ' => 'Ꞹ', + 'ꞻ' => 'Ꞻ', + 'ꞽ' => 'Ꞽ', + 'ꞿ' => 'Ꞿ', + 'ꟃ' => 'Ꟃ', + 'ꟈ' => 'Ꟈ', + 'ꟊ' => 'Ꟊ', + 'ꟶ' => 'Ꟶ', + 'ꭓ' => 'Ꭓ', + 'ꭰ' => 'Ꭰ', + 'ꭱ' => 'Ꭱ', + 'ꭲ' => 'Ꭲ', + 'ꭳ' => 'Ꭳ', + 'ꭴ' => 'Ꭴ', + 'ꭵ' => 'Ꭵ', + 'ꭶ' => 'Ꭶ', + 'ꭷ' => 'Ꭷ', + 'ꭸ' => 'Ꭸ', + 'ꭹ' => 'Ꭹ', + 'ꭺ' => 'Ꭺ', + 'ꭻ' => 'Ꭻ', + 'ꭼ' => 'Ꭼ', + 'ꭽ' => 'Ꭽ', + 'ꭾ' => 'Ꭾ', + 'ꭿ' => 'Ꭿ', + 'ꮀ' => 'Ꮀ', + 'ꮁ' => 'Ꮁ', + 'ꮂ' => 'Ꮂ', + 'ꮃ' => 'Ꮃ', + 'ꮄ' => 'Ꮄ', + 'ꮅ' => 'Ꮅ', + 'ꮆ' => 'Ꮆ', + 'ꮇ' => 'Ꮇ', + 'ꮈ' => 'Ꮈ', + 'ꮉ' => 'Ꮉ', + 'ꮊ' => 'Ꮊ', + 'ꮋ' => 'Ꮋ', + 'ꮌ' => 'Ꮌ', + 'ꮍ' => 'Ꮍ', + 'ꮎ' => 'Ꮎ', + 'ꮏ' => 'Ꮏ', + 'ꮐ' => 'Ꮐ', + 'ꮑ' => 'Ꮑ', + 'ꮒ' => 'Ꮒ', + 'ꮓ' => 'Ꮓ', + 'ꮔ' => 'Ꮔ', + 'ꮕ' => 'Ꮕ', + 'ꮖ' => 'Ꮖ', + 'ꮗ' => 'Ꮗ', + 'ꮘ' => 'Ꮘ', + 'ꮙ' => 'Ꮙ', + 'ꮚ' => 'Ꮚ', + 'ꮛ' => 'Ꮛ', + 'ꮜ' => 'Ꮜ', + 'ꮝ' => 'Ꮝ', + 'ꮞ' => 'Ꮞ', + 'ꮟ' => 'Ꮟ', + 'ꮠ' => 'Ꮠ', + 'ꮡ' => 'Ꮡ', + 'ꮢ' => 'Ꮢ', + 'ꮣ' => 'Ꮣ', + 'ꮤ' => 'Ꮤ', + 'ꮥ' => 'Ꮥ', + 'ꮦ' => 'Ꮦ', + 'ꮧ' => 'Ꮧ', + 'ꮨ' => 'Ꮨ', + 'ꮩ' => 'Ꮩ', + 'ꮪ' => 'Ꮪ', + 'ꮫ' => 'Ꮫ', + 'ꮬ' => 'Ꮬ', + 'ꮭ' => 'Ꮭ', + 'ꮮ' => 'Ꮮ', + 'ꮯ' => 'Ꮯ', + 'ꮰ' => 'Ꮰ', + 'ꮱ' => 'Ꮱ', + 'ꮲ' => 'Ꮲ', + 'ꮳ' => 'Ꮳ', + 'ꮴ' => 'Ꮴ', + 'ꮵ' => 'Ꮵ', + 'ꮶ' => 'Ꮶ', + 'ꮷ' => 'Ꮷ', + 'ꮸ' => 'Ꮸ', + 'ꮹ' => 'Ꮹ', + 'ꮺ' => 'Ꮺ', + 'ꮻ' => 'Ꮻ', + 'ꮼ' => 'Ꮼ', + 'ꮽ' => 'Ꮽ', + 'ꮾ' => 'Ꮾ', + 'ꮿ' => 'Ꮿ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𐓘' => '𐒰', + '𐓙' => '𐒱', + '𐓚' => '𐒲', + '𐓛' => '𐒳', + '𐓜' => '𐒴', + '𐓝' => '𐒵', + '𐓞' => '𐒶', + '𐓟' => '𐒷', + '𐓠' => '𐒸', + '𐓡' => '𐒹', + '𐓢' => '𐒺', + '𐓣' => '𐒻', + '𐓤' => '𐒼', + '𐓥' => '𐒽', + '𐓦' => '𐒾', + '𐓧' => '𐒿', + '𐓨' => '𐓀', + '𐓩' => '𐓁', + '𐓪' => '𐓂', + '𐓫' => '𐓃', + '𐓬' => '𐓄', + '𐓭' => '𐓅', + '𐓮' => '𐓆', + '𐓯' => '𐓇', + '𐓰' => '𐓈', + '𐓱' => '𐓉', + '𐓲' => '𐓊', + '𐓳' => '𐓋', + '𐓴' => '𐓌', + '𐓵' => '𐓍', + '𐓶' => '𐓎', + '𐓷' => '𐓏', + '𐓸' => '𐓐', + '𐓹' => '𐓑', + '𐓺' => '𐓒', + '𐓻' => '𐓓', + '𐳀' => '𐲀', + '𐳁' => '𐲁', + '𐳂' => '𐲂', + '𐳃' => '𐲃', + '𐳄' => '𐲄', + '𐳅' => '𐲅', + '𐳆' => '𐲆', + '𐳇' => '𐲇', + '𐳈' => '𐲈', + '𐳉' => '𐲉', + '𐳊' => '𐲊', + '𐳋' => '𐲋', + '𐳌' => '𐲌', + '𐳍' => '𐲍', + '𐳎' => '𐲎', + '𐳏' => '𐲏', + '𐳐' => '𐲐', + '𐳑' => '𐲑', + '𐳒' => '𐲒', + '𐳓' => '𐲓', + '𐳔' => '𐲔', + '𐳕' => '𐲕', + '𐳖' => '𐲖', + '𐳗' => '𐲗', + '𐳘' => '𐲘', + '𐳙' => '𐲙', + '𐳚' => '𐲚', + '𐳛' => '𐲛', + '𐳜' => '𐲜', + '𐳝' => '𐲝', + '𐳞' => '𐲞', + '𐳟' => '𐲟', + '𐳠' => '𐲠', + '𐳡' => '𐲡', + '𐳢' => '𐲢', + '𐳣' => '𐲣', + '𐳤' => '𐲤', + '𐳥' => '𐲥', + '𐳦' => '𐲦', + '𐳧' => '𐲧', + '𐳨' => '𐲨', + '𐳩' => '𐲩', + '𐳪' => '𐲪', + '𐳫' => '𐲫', + '𐳬' => '𐲬', + '𐳭' => '𐲭', + '𐳮' => '𐲮', + '𐳯' => '𐲯', + '𐳰' => '𐲰', + '𐳱' => '𐲱', + '𐳲' => '𐲲', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', + '𖹠' => '𖹀', + '𖹡' => '𖹁', + '𖹢' => '𖹂', + '𖹣' => '𖹃', + '𖹤' => '𖹄', + '𖹥' => '𖹅', + '𖹦' => '𖹆', + '𖹧' => '𖹇', + '𖹨' => '𖹈', + '𖹩' => '𖹉', + '𖹪' => '𖹊', + '𖹫' => '𖹋', + '𖹬' => '𖹌', + '𖹭' => '𖹍', + '𖹮' => '𖹎', + '𖹯' => '𖹏', + '𖹰' => '𖹐', + '𖹱' => '𖹑', + '𖹲' => '𖹒', + '𖹳' => '𖹓', + '𖹴' => '𖹔', + '𖹵' => '𖹕', + '𖹶' => '𖹖', + '𖹷' => '𖹗', + '𖹸' => '𖹘', + '𖹹' => '𖹙', + '𖹺' => '𖹚', + '𖹻' => '𖹛', + '𖹼' => '𖹜', + '𖹽' => '𖹝', + '𖹾' => '𖹞', + '𖹿' => '𖹟', + '𞤢' => '𞤀', + '𞤣' => '𞤁', + '𞤤' => '𞤂', + '𞤥' => '𞤃', + '𞤦' => '𞤄', + '𞤧' => '𞤅', + '𞤨' => '𞤆', + '𞤩' => '𞤇', + '𞤪' => '𞤈', + '𞤫' => '𞤉', + '𞤬' => '𞤊', + '𞤭' => '𞤋', + '𞤮' => '𞤌', + '𞤯' => '𞤍', + '𞤰' => '𞤎', + '𞤱' => '𞤏', + '𞤲' => '𞤐', + '𞤳' => '𞤑', + '𞤴' => '𞤒', + '𞤵' => '𞤓', + '𞤶' => '𞤔', + '𞤷' => '𞤕', + '𞤸' => '𞤖', + '𞤹' => '𞤗', + '𞤺' => '𞤘', + '𞤻' => '𞤙', + '𞤼' => '𞤚', + '𞤽' => '𞤛', + '𞤾' => '𞤜', + '𞤿' => '𞤝', + '𞥀' => '𞤞', + '𞥁' => '𞤟', + '𞥂' => '𞤠', + '𞥃' => '𞤡', +); diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/bootstrap.php b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100755 index 0000000..b36a092 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } +} +if (!function_exists('mb_language')) { + function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } +} +if (!function_exists('mb_substr')) { + function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } +} +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_ord')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } +} +if (!function_exists('mb_chr')) { + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/composer.json b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/composer.json new file mode 100755 index 0000000..06e6b31 --- /dev/null +++ b/phpspreadsheet_1.8.1.0_php-7.0/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.3.3" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/praxisstelle/archiv.php b/praxisstelle/archiv.php new file mode 100755 index 0000000..3636807 --- /dev/null +++ b/praxisstelle/archiv.php @@ -0,0 +1,150 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + + # aktuelle Bewerbungen + $query1 = "SELECT a.ka_id, wu_id, vorname, nachname, date_format(a.datum, '%d.%m.%Y') datum_form + FROM bpm_dst_wunsch a, bpm_kandidat b + WHERE a.ka_id = b.ka_id + AND a.dst_id = '$dst_id' + AND archiv_dat != '0000-00-00 00:00:00' + ORDER BY a.datum desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + $result_erg = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id= '$row1[ka_id]' + AND bestanden = '1' + ORDER BY eg_id desc + LIMIT 1"); + $row_erg = $result_erg->fetch_array(); + + $result_file = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE ka_id= '$row1[ka_id]' + AND upload_dat != '0000-00-00 00:00:00' + "); + $row_file = $result_file->fetch_array(); + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + if($row_file['Anz'] == 0){ + $showfiles = 0; + }else{ + $showfiles = 1; + } + + $row1['showfiles'] = $showfiles; + $row1['zaehler'] = $zaehler; + $row1['testergebnis'] = $row_erg['summe']; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} +if ($action == 'show') { + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + + # Prfen, ob DST anzeigeberechtigt ist + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id= $ka_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + + # Persnliche Angaben + + $result = $db->query("SELECT id, anrede, vorname, nachname, str, plz, ort + FROM bpm_kandidat + WHERE ka_id = '$ka_id' + LIMIT 1"); + $row = @$result->fetch_array(); + $id = $row['id']; + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('dok_anrede', $anrede); + $smarty->assign('dok_vorname', $row['vorname']); + $smarty->assign('dok_nachname', $row['nachname']); + $smarty->assign('dok_str', $row['str']); + $smarty->assign('dok_plz', $row['plz']); + $smarty->assign('dok_ort', $row['ort']); + + # Dateien + $query1 = "SELECT file, beschreibung, date_format(upload_dat, '%d.%m.%Y - %H:%i') datum_form + FROM bpm_upload + WHERE ka_id = '$ka_id' + ORDER BY upload_dat desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + $basename = basename($row1['file']); + $rep = $id . "_"; + $row1['exists'] = $exists; + $row1['basename'] = str_replace($rep, '', $basename); + $row1['basename_link'] = urlencode($row1['file']); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'archive') { + $dst_id = $_SESSION["prx_dst_id"]; + $wu_id = $_GET['wu_id']; + + # Prfen, ob DST anzeigeberechtigt ist + + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE wu_id= $wu_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + + $sql1 = $db->query( "UPDATE bpm_dst_wunsch + SET archiv_dat = '0000-00-00 00:00:00' + WHERE wu_id = $wu_id + " ); + echo ""; + + +} +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); ?> \ No newline at end of file diff --git a/praxisstelle/bewerbungen.php b/praxisstelle/bewerbungen.php new file mode 100755 index 0000000..e690d55 --- /dev/null +++ b/praxisstelle/bewerbungen.php @@ -0,0 +1,540 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + + # aktuelle Bewerbungen + $query1 = "SELECT distinct a.ka_id, wu_id, vorname, nachname, date_format(a.datum, '%d.%m.%Y') datum_form, zusage, date_format(a.zusage_dat, '%d.%m.%Y') zusage_dat_form, behinderung, mail + FROM bpm_dst_wunsch a, bpm_kandidat b, bpm_upload c + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND a.dst_id = '$dst_id' + AND archiv_dat = '0000-00-00 00:00:00' + AND c.upload_dat != '0000-00-00 00:00:00' + ORDER BY a.datum desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + $result_erg = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id= '$row1[ka_id]' + AND bestanden = '1' + ORDER BY eg_id desc + LIMIT 1"); + $row_erg = $result_erg->fetch_array(); + + $result_file = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE ka_id= '$row1[ka_id]' + AND upload_dat != '0000-00-00 00:00:00' + "); + $row_file = $result_file->fetch_array(); + + # Zusage bei anderer Dienststelle + $result_andzus = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id = '$row1[ka_id]' + AND wu_id != '$row1[wu_id]' + AND zusage = 'J'"); + $row_andzus = $result_andzus->fetch_array(); + if ($row_andzus['Anz'] > 0) { + $anderezusage = 'J'; + } else { + $anderezusage = 'N'; + } + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + if($row_file['Anz'] == 0){ + $showfiles = 0; + }else{ + $showfiles = 1; + } + + $row1['anderezusage'] = $anderezusage; + $row1['showfiles'] = $showfiles; + $row1['zaehler'] = $zaehler; + $row1['testergebnis'] = $row_erg['summe']; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} +if ($action == 'show') { + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + + # Prüfen, ob DST anzeigeberechtigt ist + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id= $ka_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + + # Persönliche Angaben + + $result = $db->query("SELECT id, anrede, vorname, nachname, str, plz, ort, mail + FROM bpm_kandidat + WHERE ka_id = '$ka_id' + LIMIT 1"); + $row = @$result->fetch_array(); + $id = $row['id']; + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('dok_anrede', $anrede); + $smarty->assign('dok_vorname', $row['vorname']); + $smarty->assign('dok_nachname', $row['nachname']); + $smarty->assign('dok_str', $row['str']); + $smarty->assign('dok_plz', $row['plz']); + $smarty->assign('dok_ort', $row['ort']); + $smarty->assign('dok_mail', $row['mail']); + + # Dateien + $query1 = "SELECT up_id, file, beschreibung, date_format(upload_dat, '%d.%m.%Y - %H:%i') datum_form + FROM bpm_upload + WHERE ka_id = '$ka_id' + ORDER BY upload_dat desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + $basename = basename($row1['file']); + $rep = $id . "_"; + $row1['exists'] = $exists; + $row1['basename'] = str_replace($rep, '', $basename); + $row1['basename_link'] = urlencode($row1['file']); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'archive') { + $dst_id = $_SESSION["prx_dst_id"]; + $wu_id = $_GET['wu_id']; + + # Prüfen, ob DST anzeigeberechtigt ist + + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE wu_id= $wu_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + $datum=date("Y-m-d H:i:s"); + $sql1 = $db->query( "UPDATE bpm_dst_wunsch + SET archiv_dat = '$datum' + WHERE wu_id = $wu_id + " ); + echo ""; + + +} +if ($action == 'zusage1') { + $ka_id = $_GET['ka_id']; + $smarty->assign('ka_id', $ka_id); + $result_name = $db->query("SELECT vorname, nachname, anrede + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_name = $result_name->fetch_array(); + if($row_name['anrede'] == 'M'){ + $text_nachfrage= "Liegt Ihnen die Zustimmung des Bewerbers $row_name[vorname] $row_name[nachname] vor?"; + }else{ + $text_nachfrage= "Liegt Ihnen die Zustimmung der Bewerberin $row_name[vorname] $row_name[nachname] vor?"; + } + $smarty->assign('text_nachfrage', $text_nachfrage); +} + +if ($action == 'zusage_holen') { + # Wenn auf Nein geklickt wurde, benötigt die Praxisstelle erst die Zustimmung des Bewerbers + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + $smarty->assign('dst_bez', $row_dst['bez']); + $smarty->assign('dst_mail', $row_dst['mail']); + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + if ($row_bew['anrede'] == 'M') { + $anrede = "geehrter Herr"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "geehrte Frau"; + } + $mailtext = " +

Sehr $anrede $row_bew[nachname],
+
+ für das sechsmonatige Einführungspraktikum im Rahmen des Studiums Public Management – Bachelor of Arts bei uns fehlt leider bislang noch Ihre schriftliche Zusage. Bitte bestätigen Sie uns per E-Mail, dass Sie das Einführungspraktikum vom 1. September 2021 bis 28. Februar 2021 bei uns absolvieren werden.
+
+ Vielen Dank.
+
+ Freundliche Grüße  
+ $row_dst[bez] +

"; + + + $smarty->assign('bew_name', "$row_bew[vorname] $row_bew[nachname]"); + $smarty->assign('bew_mail', $row_bew['mail']); + $smarty->assign('bew_ka_id', $ka_id); + + $smarty->assign('mail_betreff', "Zusage für die Praxisstelle $row_dst[bez]"); + $smarty->assign('mail_text', "$mailtext"); + +} + +if ($action == 'mailsenden') { + # Wenn auf Nein geklickt wurde, benötigt die Praxisstelle erst die Zustimmung des Bewerbers + $ka_id = $_POST['bew_ka_id']; + $dst_id = $_SESSION["prx_dst_id"]; + + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + + $empfaenger = $row_bew['mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + $sender = $row_dst['bez']; + $sendermail = $row_dst['mail']; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
"; + #exit; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style = " + + + "; + $text = $style . $text; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + } + + +} + +if ($action == 'zusage2') { + # Wenn auf Ja geklickt wurde, dann buchen + # Mail an Praxisstelle zur Bestätigung + # Mail an Bewerber + # Mail an die zuständige Hochschule + + $ka_id = $_GET['ka_id']; + $dst_id = $_SESSION["prx_dst_id"]; + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail, id + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + + $result_kand = $db->query("SELECT hochschule + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_kand = $result_kand->fetch_array(); + + $hochschule = "$row_kand[hochschule]"; + if ($hochschule == 'Ludwigsburg') { + $sender_hs = "Hochschule Ludwigsburg"; + $mail_hs = get_parameter(8); + } elseif ($hochschule == 'Kehl') { + $sender_hs = "Hochschule Kehl"; + $mail_hs = get_parameter(7); + } + + + + ##### 1 Mail an Praxisstelle ######## + $empfaenger_prx = $row_dst['mail']; + if ($row_bew['anrede'] == 'M') { + $anrede = "Herrn"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "Frau"; + } + + $betreff_prx = "Bestätigung zur Zusage Praxisstelle BPM $row_bew[vorname] $row_bew[nachname]"; + $text_prx = " + + +

Sehr geehrte Damen und Herren,
+
+ Sie haben der Hochschule erfolgreich die Zusage für $anrede $row_bew[vorname] $row_bew[nachname] gemeldet.
+
+ Wie geht es nun weiter?
+ Die Bewerberin/der Bewerber erhält von der zuständigen Hochschule eine vorläufige Zulassung oder eine Zulassung unter Vorbehalt. Eine Zulassung unter Vorbehalt erhalten diejenigen Bewerberin*innen, die zu den besten 40 % im Bewerbungsverfahren zählen. Diese können mit großer Wahrscheinlichkeit mit einem Studienplatz rechnen. Eine endgültige Zulassung kann aus rechtlichen Gründen erst nach Bewerbungsschluss und Ranglistenbildung (voraussichtlich Anfang August 2021) erfolgen. Sie als Ausbildungsstelle erhalten wie gewohnt Nachricht, sobald eine endgültige Zulassung an Ihre ausgewählten Bewerber*innen erteilt wurde. Bitte beachten Sie, dass die Zuweisung zu den Einführungslehrgängen aus organisatorischen Gründen erst Ende August erfolgen kann.
+
+ Bei der vorläufigen Zulassung werden die Bewerber*innen darauf hingewiesen, dass die beamtenrechtlichen Voraussetzungen zum 1. September 2021 erfüllt sein müssen. Bitte erinnern auch Sie Ihre ausgewählten Bewerber*innen daran, rechtzeitig die erforderlichen Dokumente zu beantragen und Ihnen vorzulegen:

+
    +
  • Polizeiliches Führungszeugnis im Original.
    + WICHTIG: Zur Vorlage bei einer Behörde nach § 30 Absatz 5 des Bundeszentralregistergesetzes (BZRG).
    + Ein einfaches Führungszeugnis ist nicht ausreichend.
    + Dieses Zeugnis darf zu Ausbildungsbeginn (1. September 2021) nicht älter als 3 Monate sein und darf keine Einträge enthalten. +
  • +
  • Ärztliches Gesundheitszeugnis im Original.
    + Es ist ein Attest einer Ärztin oder eines Arztes, die vom Landesgesundheitsamt dafür bestimmt wurden, notwendig.
    + Eine Liste aller Ärzte finden Sie hier:
    + www.gesundheitsamt-bw.de -> Service -> Gesundheitliche Eignung bei Verbeamtung ->
    + Hinweise für Beamtenbewerber -> „Ärzteliste - Einstellungsuntersuchungen Beamtenbewerber“.
    + Die dafür anfallenden Kosten hat die Bewerberin oder der Bewerber selbst zu tragen.
    + Dieses Zeugnis darf zu Ausbildungsbeginn (1. September 2021) nicht älter als 6 Monate sein.
    + Wir bitten die Ausbildungsstellen zu überprüfen, ob es sich tatsächlich um einen Arzt/Ärztin der Liste des Landesgesundheitsamtes handelt. +
  • +
  • Erklärung über den Ausschluss eines aktuellen oder früheren Behandlungsverhältnisses im Original.
    + Dieses Formular ist ebenfalls dort hinterlegt:
    + www.gesundheitsamt-bw.de -> Service -> Gesundheitliche Eignung bei Verbeamtung ->
    + Hinweise für Beamtenbewerber -> „Erklärung Ausschluss Behandlungsverhältnis“. +
  • +
+

Bitte denken Sie daran, allen anderen Bewerber*innen, für welche Sie sich nicht entschieden haben, entsprechend auch eine Absage zukommen zu lassen.
+
+ Sollten Sie Fragen haben, können Sie uns gerne ansprechen.

Freundliche Grüße

Ihre Hochschulen in Ludwigsburg und Kehl +

+ +"; + + ## Mailversand: + # Header / Absender + #$sender = $row_dst['bez']; + #$sendermail = $row_dst['mail']; + $sender = $sender_hs; + $sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_prx, $betreff_prx, $text_prx, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_prx); + $betreff_db = addslashes($betreff_prx); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_prx', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_prx', "Die Mail an die Praxisstelle wurde verschickt!"); + $err1 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_prx', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_prx', "Die Mail an die Praxisstelle konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err1 = 1; + } + ##################################### + + + ##### 2 Mail an Bewerber ######## + $empfaenger_bew = $row_bew['mail']; + if ($row_bew['anrede'] == 'M') { + $anrede = "Lieber Herr"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "Liebe Frau"; + } + $betreff_bew = "Bestätigung zur Zusage Praxisstelle BPM $row_dst[bez]"; + $text_bew = " + + + +

+ $anrede $row_bew[nachname],
+
+ die Ausbildungsstelle „$row_dst[bez]“ hat uns mitgeteilt, dass Sie das Einführungspraktikum im Rahmen des Studiums Public Management – Bachelor of Arts dort absolvieren können.  
+ Damit erfüllen Sie ein weiteres wichtiges Kriterium auf dem Weg zum Studium.
+
+ Bitte beachten Sie, dass die insgesamt 800 zur Verfügung stehenden Studienplätze nach einer gemeinsamen Rangliste der Hochschulen Kehl und Ludwigsburg vergeben werden. Der Ranglistenplatz setzt sich zu 50 Prozent aus dem Testergebnis und zu 50 Prozent aus der Note der Hochschulzugangsberechtigung (HZB) zusammen. Die endgültigen Zulassungen können erst nach Ablauf der Bewerbungsfrist im August 2021 erfolgen. Diese werden nur dann erteilt, wenn Sie auch alle Zulassungsvoraussetzungen erfüllen.
+
+ Diese E-Mail ist automatisch generiert und stellt noch keine endgültige Zulassung dar.
+
+ Freundliche Grüße
+
+ Ihre Hochschulen in Ludwigsburg und Kehl +

+ + "; + + ## Mailversand: + # Header / Absender + #$sender = $row_dst['bez']; + #$sendermail = $row_dst['mail']; + $sender = $sender_hs; + $sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_bew, $betreff_bew, $text_bew, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_bew); + $betreff_db = addslashes($betreff_bew); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_bew', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_bew', "Die Mail an den Bewerber/die Bewerberin wurde verschickt!"); + $err2 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_bew', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_bew', "Die Mail an den Bewerber/die Bewerberin konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err2 = 1; + } + ##################################### + + ##### 3 Mail an Hochschule######## + $empfaenger_hs = $mail_hs; + if ($row_bew['anrede'] == 'M') { + $anrede = "den Bewerber"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "die Bewerberin"; + } + $betreff_hs = "Bestätigung zur Zusage Praxisstelle BPM $row_dst[bez] für $row_bew[vorname] $row_bew[nachname]"; + $text_hs = " + + +

+ Liebe Hochschule,
+
+ die Ausbildungsstelle „$row_dst[bez]“ hat sich im Studiengang Public Management für $anrede $row_bew[vorname] $row_bew[nachname] mit der ID $row_bew[id] entschieden. +

+ + "; + + ## Mailversand: + # Header / Absender + $sender = $row_dst['bez']; + $sendermail = $row_dst['mail']; + #$sender = $sender_hs; + #$sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_hs, $betreff_hs, $text_hs, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_hs); + $betreff_db = addslashes($betreff_hs); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_hs', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_hs', "Die Mail an die Hochschule wurde verschickt!"); + $err3 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_hs', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_hs', "Die Mail an die Hochschule konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err3 = 1; + } + + #echo + #"$text_prx + #
+ #$text_bew + #
+ #$text_hs + #"; + ##################################### + + if ($err1 == 0 AND $err2 == 0 AND $err3 == 0) { + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $sql1 = $db->query("UPDATE bpm_dst_wunsch + SET zusage = 'J' + ,zusage_dat = '$datum_db' + WHERE ka_id = $ka_id + AND dst_id = $dst_id + "); + } + + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/bewerbungen.php_mit_zusage b/praxisstelle/bewerbungen.php_mit_zusage new file mode 100755 index 0000000..5e74791 --- /dev/null +++ b/praxisstelle/bewerbungen.php_mit_zusage @@ -0,0 +1,540 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + + # aktuelle Bewerbungen + $query1 = "SELECT distinct a.ka_id, wu_id, vorname, nachname, date_format(a.datum, '%d.%m.%Y') datum_form, zusage, date_format(a.zusage_dat, '%d.%m.%Y') zusage_dat_form, behinderung, mail + FROM bpm_dst_wunsch a, bpm_kandidat b, bpm_upload c + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND a.dst_id = '$dst_id' + AND archiv_dat = '0000-00-00 00:00:00' + AND c.upload_dat != '0000-00-00 00:00:00' + ORDER BY a.datum desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + $result_erg = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id= '$row1[ka_id]' + AND bestanden = '1' + ORDER BY eg_id desc + LIMIT 1"); + $row_erg = $result_erg->fetch_array(); + + $result_file = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE ka_id= '$row1[ka_id]' + AND upload_dat != '0000-00-00 00:00:00' + "); + $row_file = $result_file->fetch_array(); + + # Zusage bei anderer Dienststelle + $result_andzus = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id = '$row1[ka_id]' + AND wu_id != '$row1[wu_id]' + AND zusage = 'J'"); + $row_andzus = $result_andzus->fetch_array(); + if ($row_andzus['Anz'] > 0) { + $anderezusage = 'J'; + } else { + $anderezusage = 'N'; + } + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + if($row_file['Anz'] == 0){ + $showfiles = 0; + }else{ + $showfiles = 1; + } + + $row1['anderezusage'] = $anderezusage; + $row1['showfiles'] = $showfiles; + $row1['zaehler'] = $zaehler; + $row1['testergebnis'] = $row_erg['summe']; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} +if ($action == 'show') { + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + + # Prüfen, ob DST anzeigeberechtigt ist + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id= $ka_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + + # Persönliche Angaben + + $result = $db->query("SELECT id, anrede, vorname, nachname, str, plz, ort, mail + FROM bpm_kandidat + WHERE ka_id = '$ka_id' + LIMIT 1"); + $row = @$result->fetch_array(); + $id = $row['id']; + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('dok_anrede', $anrede); + $smarty->assign('dok_vorname', $row['vorname']); + $smarty->assign('dok_nachname', $row['nachname']); + $smarty->assign('dok_str', $row['str']); + $smarty->assign('dok_plz', $row['plz']); + $smarty->assign('dok_ort', $row['ort']); + $smarty->assign('dok_mail', $row['mail']); + + # Dateien + $query1 = "SELECT up_id, file, beschreibung, date_format(upload_dat, '%d.%m.%Y - %H:%i') datum_form + FROM bpm_upload + WHERE ka_id = '$ka_id' + ORDER BY upload_dat desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + $basename = basename($row1['file']); + $rep = $id . "_"; + $row1['exists'] = $exists; + $row1['basename'] = str_replace($rep, '', $basename); + $row1['basename_link'] = urlencode($row1['file']); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'archive') { + $dst_id = $_SESSION["prx_dst_id"]; + $wu_id = $_GET['wu_id']; + + # Prüfen, ob DST anzeigeberechtigt ist + + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE wu_id= $wu_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + $datum=date("Y-m-d H:i:s"); + $sql1 = $db->query( "UPDATE bpm_dst_wunsch + SET archiv_dat = '$datum' + WHERE wu_id = $wu_id + " ); + echo ""; + + +} +if ($action == 'zusage1') { + $ka_id = $_GET['ka_id']; + $smarty->assign('ka_id', $ka_id); + $result_name = $db->query("SELECT vorname, nachname, anrede + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_name = $result_name->fetch_array(); + if($row_name['anrede'] == 'M'){ + $text_nachfrage= "Liegt Ihnen die Zustimmung des Bewerbers $row_name[vorname] $row_name[nachname] vor?"; + }else{ + $text_nachfrage= "Liegt Ihnen die Zustimmung der Bewerberin $row_name[vorname] $row_name[nachname] vor?"; + } + $smarty->assign('text_nachfrage', $text_nachfrage); +} + +if ($action == 'zusage_holen') { + # Wenn auf Nein geklickt wurde, benötigt die Praxisstelle erst die Zustimmung des Bewerbers + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + $smarty->assign('dst_bez', $row_dst['bez']); + $smarty->assign('dst_mail', $row_dst['mail']); + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + if ($row_bew['anrede'] == 'M') { + $anrede = "geehrter Herr"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "geehrte Frau"; + } + $mailtext = " +

Sehr $anrede $row_bew[nachname],
+
+ für das sechsmonatige Einführungspraktikum im Rahmen des Studiums Public Management – Bachelor of Arts bei uns fehlt leider bislang noch Ihre schriftliche Zusage. Bitte bestätigen Sie uns per E-Mail, dass Sie das Einführungspraktikum vom 1. September 2021 bis 28. Februar 2022 bei uns absolvieren werden.
+
+ Vielen Dank.
+
+ Freundliche Grüße  
+ $row_dst[bez] +

"; + + + $smarty->assign('bew_name', "$row_bew[vorname] $row_bew[nachname]"); + $smarty->assign('bew_mail', $row_bew['mail']); + $smarty->assign('bew_ka_id', $ka_id); + + $smarty->assign('mail_betreff', "Zusage für die Praxisstelle $row_dst[bez]"); + $smarty->assign('mail_text', "$mailtext"); + +} + +if ($action == 'mailsenden') { + # Wenn auf Nein geklickt wurde, benötigt die Praxisstelle erst die Zustimmung des Bewerbers + $ka_id = $_POST['bew_ka_id']; + $dst_id = $_SESSION["prx_dst_id"]; + + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + + $empfaenger = $row_bew['mail']; + $betreff = $_POST['betreff']; + $text = $_POST['text']; + $sender = $row_dst['bez']; + $sendermail = $row_dst['mail']; + + #echo " + #From: $sender - $sendermail
+ #$empfaenger
+ #$betreff
+ #$text
"; + #exit; + + #Beim CKEDITOR die

Tags mit Zeilenabstand 0 in der Mail + $style = " + + + "; + $text = $style . $text; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text); + $betreff_db = addslashes($betreff); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail wurde verschickt!"); + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg', "Die Mail konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + } + + +} + +if ($action == 'zusage2') { + # Wenn auf Ja geklickt wurde, dann buchen + # Mail an Praxisstelle zur Bestätigung + # Mail an Bewerber + # Mail an die zuständige Hochschule + + $ka_id = $_GET['ka_id']; + $dst_id = $_SESSION["prx_dst_id"]; + + $result_bew = $db->query("SELECT anrede, vorname, nachname, mail, id + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_bew = $result_bew->fetch_array(); + + $result_dst = $db->query("SELECT bez, mail + FROM bpm_dienststellen + WHERE dst_id =$dst_id"); + $row_dst = $result_dst->fetch_array(); + + $result_kand = $db->query("SELECT hochschule + FROM bpm_kandidat + WHERE ka_id =$ka_id"); + $row_kand = $result_kand->fetch_array(); + + $hochschule = "$row_kand[hochschule]"; + if ($hochschule == 'Ludwigsburg') { + $sender_hs = "Hochschule Ludwigsburg"; + $mail_hs = get_parameter(8); + } elseif ($hochschule == 'Kehl') { + $sender_hs = "Hochschule Kehl"; + $mail_hs = get_parameter(7); + } + + + + ##### 1 Mail an Praxisstelle ######## + $empfaenger_prx = $row_dst['mail']; + if ($row_bew['anrede'] == 'M') { + $anrede = "Herrn"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "Frau"; + } + + $betreff_prx = "Bestätigung zur Zusage Praxisstelle BPM $row_bew[vorname] $row_bew[nachname]"; + $text_prx = " + + +

Sehr geehrte Damen und Herren,
+
+ Sie haben der Hochschule erfolgreich die Zusage für $anrede $row_bew[vorname] $row_bew[nachname] gemeldet.
+
+ Wie geht es nun weiter?
+ Die Bewerberin/der Bewerber erhält von der zuständigen Hochschule eine vorläufige Zulassung oder eine Zulassung unter Vorbehalt. Eine Zulassung unter Vorbehalt erhalten diejenigen Bewerberin*innen, die zu den besten 40 % im Bewerbungsverfahren zählen. Diese können mit großer Wahrscheinlichkeit mit einem Studienplatz rechnen. Eine endgültige Zulassung kann aus rechtlichen Gründen erst nach Bewerbungsschluss und Ranglistenbildung (voraussichtlich Anfang August 2021) erfolgen. Sie als Ausbildungsstelle erhalten wie gewohnt Nachricht, sobald eine endgültige Zulassung an Ihre ausgewählten Bewerber*innen erteilt wurde. Bitte beachten Sie, dass die Zuweisung zu den Einführungslehrgängen aus organisatorischen Gründen erst Ende August erfolgen kann.
+
+ Bei der vorläufigen Zulassung werden die Bewerber*innen darauf hingewiesen, dass die beamtenrechtlichen Voraussetzungen zum 1. September 2021 erfüllt sein müssen. Bitte erinnern auch Sie Ihre ausgewählten Bewerber*innen daran, rechtzeitig die erforderlichen Dokumente zu beantragen und Ihnen vorzulegen:

+
    +
  • Polizeiliches Führungszeugnis im Original.
    + WICHTIG: Zur Vorlage bei einer Behörde nach § 30 Absatz 5 des Bundeszentralregistergesetzes (BZRG).
    + Ein einfaches Führungszeugnis ist nicht ausreichend.
    + Dieses Zeugnis darf zu Ausbildungsbeginn (1. September 2021) nicht älter als 3 Monate sein und darf keine Einträge enthalten. +
  • +
  • Ärztliches Gesundheitszeugnis im Original.
    + Es ist ein Attest einer Ärztin oder eines Arztes, die vom Landesgesundheitsamt dafür bestimmt wurden, notwendig.
    + Eine Liste aller Ärzte finden Sie hier:
    + www.gesundheitsamt-bw.de -> Service -> Gesundheitliche Eignung bei Verbeamtung ->
    + Hinweise für Beamtenbewerber -> „Ärzteliste - Einstellungsuntersuchungen Beamtenbewerber“.
    + Die dafür anfallenden Kosten hat die Bewerberin oder der Bewerber selbst zu tragen.
    + Dieses Zeugnis darf zu Ausbildungsbeginn (1. September 2021) nicht älter als 6 Monate sein.
    + Wir bitten die Ausbildungsstellen zu überprüfen, ob es sich tatsächlich um einen Arzt/Ärztin der Liste des Landesgesundheitsamtes handelt. +
  • +
  • Erklärung über den Ausschluss eines aktuellen oder früheren Behandlungsverhältnisses im Original.
    + Dieses Formular ist ebenfalls dort hinterlegt:
    + www.gesundheitsamt-bw.de -> Service -> Gesundheitliche Eignung bei Verbeamtung ->
    + Hinweise für Beamtenbewerber -> „Erklärung Ausschluss Behandlungsverhältnis“. +
  • +
+

Bitte denken Sie daran, allen anderen Bewerber*innen, für welche Sie sich nicht entschieden haben, entsprechend auch eine Absage zukommen zu lassen.
+
+ Sollten Sie Fragen haben, können Sie uns gerne ansprechen.

Freundliche Grüße

Ihre Hochschulen in Ludwigsburg und Kehl +

+ +"; + + ## Mailversand: + # Header / Absender + #$sender = $row_dst['bez']; + #$sendermail = $row_dst['mail']; + $sender = $sender_hs; + $sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_prx, $betreff_prx, $text_prx, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_prx); + $betreff_db = addslashes($betreff_prx); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_prx', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_prx', "Die Mail an die Praxisstelle wurde verschickt!"); + $err1 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_prx', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_prx', "Die Mail an die Praxisstelle konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err1 = 1; + } + ##################################### + + + ##### 2 Mail an Bewerber ######## + $empfaenger_bew = $row_bew['mail']; + if ($row_bew['anrede'] == 'M') { + $anrede = "Lieber Herr"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "Liebe Frau"; + } + $betreff_bew = "Bestätigung zur Zusage Praxisstelle BPM $row_dst[bez]"; + $text_bew = " + + + +

+ $anrede $row_bew[nachname],
+
+ die Ausbildungsstelle „$row_dst[bez]“ hat uns mitgeteilt, dass Sie das Einführungspraktikum im Rahmen des Studiums Public Management – Bachelor of Arts dort absolvieren können.  
+ Damit erfüllen Sie ein weiteres wichtiges Kriterium auf dem Weg zum Studium.
+
+ Bitte beachten Sie, dass die insgesamt 800 zur Verfügung stehenden Studienplätze nach einer gemeinsamen Rangliste der Hochschulen Kehl und Ludwigsburg vergeben werden. Der Ranglistenplatz setzt sich zu 50 Prozent aus dem Testergebnis und zu 50 Prozent aus der Note der Hochschulzugangsberechtigung (HZB) zusammen. Die endgültigen Zulassungen können erst nach Ablauf der Bewerbungsfrist im August 2021 erfolgen. Diese werden nur dann erteilt, wenn Sie auch alle Zulassungsvoraussetzungen erfüllen.
+
+ Diese E-Mail ist automatisch generiert und stellt noch keine endgültige Zulassung dar.
+
+ Freundliche Grüße
+
+ Ihre Hochschulen in Ludwigsburg und Kehl +

+ + "; + + ## Mailversand: + # Header / Absender + #$sender = $row_dst['bez']; + #$sendermail = $row_dst['mail']; + $sender = $sender_hs; + $sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_bew, $betreff_bew, $text_bew, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_bew); + $betreff_db = addslashes($betreff_bew); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_bew', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_bew', "Die Mail an den Bewerber/die Bewerberin wurde verschickt!"); + $err2 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_bew', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_bew', "Die Mail an den Bewerber/die Bewerberin konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err2 = 1; + } + ##################################### + + ##### 3 Mail an Hochschule######## + $empfaenger_hs = $mail_hs; + if ($row_bew['anrede'] == 'M') { + $anrede = "den Bewerber"; + } + if ($row_bew['anrede'] == 'W') { + $anrede = "die Bewerberin"; + } + $betreff_hs = "Bestätigung zur Zusage Praxisstelle BPM $row_dst[bez] für $row_bew[vorname] $row_bew[nachname]"; + $text_hs = " + + +

+ Liebe Hochschule,
+
+ „$row_dst[bez]“ hat sich im Studiengang Public Management für $anrede $row_bew[vorname] $row_bew[nachname] mit der ID $row_bew[id] entschieden. +

+ + "; + + ## Mailversand: + # Header / Absender + $sender = $row_dst['bez']; + $sendermail = $row_dst['mail']; + #$sender = $sender_hs; + #$sendermail = $mail_hs; + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger_hs, $betreff_hs, $text_hs, $headers); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $text_db = addslashes($text_hs); + $betreff_db = addslashes($betreff_hs); + + if ($return) { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_hs', '$betreff_db', '$text_db', 'V', '$datum_db') + "); + $smarty->assign('mail_senderg_hs', "Die Mail an die Hochschule wurde verschickt!"); + $err3 = 0; + } else { + $sql1 = $db->query("INSERT INTO bpm_sonstige_mail (sender, sendermail, ka_id, empfaenger, mail_betreff, mail_text, status, sendedat) + VALUES ('$sender', '$sendermail', '$ka_id', '$empfaenger_hs', '$betreff_db', '$text_db', 'F', '$datum_db') + "); + $smarty->assign('mail_senderg_hs', "Die Mail an die Hochschule konnte nicht verschickt werden!
Setzen Sie sich bitte mit der Hochschule in Verbindung."); + $err3 = 1; + } + + #echo + #"$text_prx + #
+ #$text_bew + #
+ #$text_hs + #"; + ##################################### + + if ($err1 == 0 AND $err2 == 0 AND $err3 == 0) { + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $sql1 = $db->query("UPDATE bpm_dst_wunsch + SET zusage = 'J' + ,zusage_dat = '$datum_db' + WHERE ka_id = $ka_id + AND dst_id = $dst_id + "); + } + + +} + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/bewerbungen.php_ohne_zusage b/praxisstelle/bewerbungen.php_ohne_zusage new file mode 100755 index 0000000..eda8185 --- /dev/null +++ b/praxisstelle/bewerbungen.php_ohne_zusage @@ -0,0 +1,154 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + + # aktuelle Bewerbungen + $query1 = "SELECT distinct a.ka_id, wu_id, vorname, nachname, date_format(a.datum, '%d.%m.%Y') datum_form, behinderung, mail + FROM bpm_dst_wunsch a, bpm_kandidat b, bpm_upload c + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND a.dst_id = '$dst_id' + AND archiv_dat = '0000-00-00 00:00:00' + AND c.upload_dat != '0000-00-00 00:00:00' + ORDER BY a.datum desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + + while ($row1 = $result1->fetch_array()) { + + $result_erg = $db->query("SELECT summe + FROM bpm_ergebnisse + WHERE ka_id= '$row1[ka_id]' + AND bestanden = '1' + ORDER BY eg_id desc + LIMIT 1"); + $row_erg = $result_erg->fetch_array(); + + $result_file = $db->query("SELECT count(*) Anz + FROM bpm_upload + WHERE ka_id= '$row1[ka_id]' + AND upload_dat != '0000-00-00 00:00:00' + "); + $row_file = $result_file->fetch_array(); + + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + if($row_file['Anz'] == 0){ + $showfiles = 0; + }else{ + $showfiles = 1; + } + + $row1['showfiles'] = $showfiles; + $row1['zaehler'] = $zaehler; + $row1['testergebnis'] = $row_erg['summe']; + $table_data1[] = $row1; + } + + $smarty->assign('table_data1', $table_data1); +} +if ($action == 'show') { + $dst_id = $_SESSION["prx_dst_id"]; + $ka_id = $_GET['ka_id']; + + # Prfen, ob DST anzeigeberechtigt ist + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE ka_id= $ka_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + + # Persnliche Angaben + + $result = $db->query("SELECT id, anrede, vorname, nachname, str, plz, ort, mail + FROM bpm_kandidat + WHERE ka_id = '$ka_id' + LIMIT 1"); + $row = @$result->fetch_array(); + $id = $row['id']; + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('dok_anrede', $anrede); + $smarty->assign('dok_vorname', $row['vorname']); + $smarty->assign('dok_nachname', $row['nachname']); + $smarty->assign('dok_str', $row['str']); + $smarty->assign('dok_plz', $row['plz']); + $smarty->assign('dok_ort', $row['ort']); + $smarty->assign('dok_mail', $row['mail']); + + # Dateien + $query1 = "SELECT up_id, file, beschreibung, date_format(upload_dat, '%d.%m.%Y - %H:%i') datum_form + FROM bpm_upload + WHERE ka_id = '$ka_id' + ORDER BY upload_dat desc"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + if (file_exists($row1['file'])) { + $exists = 1; + } else { + $exists = 0; + } + $basename = basename($row1['file']); + $rep = $id . "_"; + $row1['exists'] = $exists; + $row1['basename'] = str_replace($rep, '', $basename); + $row1['basename_link'] = urlencode($row1['file']); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); +} + +if ($action == 'archive') { + $dst_id = $_SESSION["prx_dst_id"]; + $wu_id = $_GET['wu_id']; + + # Prfen, ob DST anzeigeberechtigt ist + + $result_anz = $db->query("SELECT count(*) Anz + FROM bpm_dst_wunsch + WHERE wu_id= $wu_id + AND dst_id =$dst_id"); + $row_anz = $result_anz->fetch_array(); + + if($row_anz['Anz'] == 0){ + exit; + } + $datum=date("Y-m-d H:i:s"); + $sql1 = $db->query( "UPDATE bpm_dst_wunsch + SET archiv_dat = '$datum' + WHERE wu_id = $wu_id + " ); + echo ""; + + +} +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); ?> \ No newline at end of file diff --git a/praxisstelle/downpdf.php b/praxisstelle/downpdf.php new file mode 100755 index 0000000..a3db72f --- /dev/null +++ b/praxisstelle/downpdf.php @@ -0,0 +1,34 @@ +window.top.location.href = \"index.php\";"; +exit; +} +$file = urldecode($_GET["file"]); +#$file = str_replace('%28', '(', $file); +#$file = str_replace('%29', ')', $file); +#$file = str_replace('%2C', ',', $file); +#$file = str_replace('%3B', ';', $file); +#$file = str_replace('%3B', ';', $file); +#$file = str_replace('%E2%80%93', '–', $file); + +if (file_exists($file)) { +header("Content-Type: application/octet-stream"); +header("Content-Disposition: attachment; filename=" . urlencode(basename($file))); +header("Content-Type: application/download"); +header("Content-Description: File Transfer"); +header("Content-Length: " . filesize($file)); + +flush(); // This doesn't really matter. + +$fp = fopen($file, "r"); +while (!feof($fp)) { + echo fread($fp, 65536); + flush(); // This is essential for large downloads +} + +fclose($fp); +}else{ +echo "Datei nicht gefunden"; +} +?> \ No newline at end of file diff --git a/praxisstelle/export_bewerber.php b/praxisstelle/export_bewerber.php new file mode 100755 index 0000000..61c5951 --- /dev/null +++ b/praxisstelle/export_bewerber.php @@ -0,0 +1,92 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + +$Use_Title = 0; +$now_date = date('m-d-Y H:i'); +$title = "Dump For Table $DB_TBLName from Database $DB_DBName on $now_date"; + + + + $sql = "SELECT b.ka_id as Bewerbernr + , vorname as Vorname + , nachname as Nachname + , str 'Strasse' + , plz PLZ + , ort Ort + , mail as 'E-Mail' + , behinderung AS Schwerbehinderung + , replace(hzb,'.', ',') as 'HZB Note' + , replace(zeugnisschnitt,'.', ',') as 'Alternativ Zeugnisschnitt Note' + , replace(zeugnisschnitt_punkte,'.', ',') 'Alternativ Zeugnisschnitt Punkte' + ,(SELECT summe FROM bpm_ergebnisse d WHERE a.ka_id= d.ka_id AND bestanden = '1' ORDER BY eg_id desc LIMIT 1) as Testergebnis + FROM bpm_dst_wunsch a, bpm_kandidat b, bpm_note c + WHERE a.ka_id = b.ka_id + AND a.ka_id = c.ka_id + AND a.dst_id = '$dst_id' + AND archiv_dat = '0000-00-00 00:00:00' + ORDER BY a.datum desc"; + $result = @$db->query($sql) + or die("Couldn't execute query:
" . mysql_error(). "
" . mysql_errno()); + + + +//header info for browser +#header("Content-Type: text/comma-separated-values"); +header('Content-Encoding: UTF-8'); +header("Content-type: text/csv; charset=UTF-8"); +echo "\xEF\xBB\xBF"; +header("Content-Disposition: attachment; filename=export_bewerber.csv"); //header("Content-Disposition: attachment; filename=database_dump.$file_ending"); +header("Pragma: no-cache"); +header("Expires: 0"); + + +if ($Use_Title == 1){ +echo("$title\n"); +} + + +//define separator (defines columns in excel & tabs in word) +$sep = ";"; //tabbed character + +//start of printing column names as names of MySQL fields +for ($i = 0; $i < mysqli_num_fields($result); $i++) { +echo mysqli_fetch_field_direct($result,$i)->name . ";"; +} +print("\n"); +//end of printing column names + +//start while loop to get data +/* +note: the following while-loop was taken from phpMyAdmin 2.1.0. +--from the file "lib.inc.php". +*/ + while($row = $result->fetch_array()) + { + + //set_time_limit(60); // HaRa + $schema_insert = ""; + for($j=0; $j \ No newline at end of file diff --git a/praxisstelle/hauptframe.php b/praxisstelle/hauptframe.php new file mode 100755 index 0000000..4298ff2 --- /dev/null +++ b/praxisstelle/hauptframe.php @@ -0,0 +1,46 @@ +query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + +} + +if ($action == 'show') { + $pn_id = $_GET['pn_id']; + $result_show = $db->query("SELECT pn_headline, pn_text + FROM bpm_prxnews + WHERE pn_id = $pn_id + "); + $row_show = $result_show->fetch_array(); + $smarty->assign('prx_show_headline', $row_show['pn_headline']); + $smarty->assign('prx_show_text', $row_show['pn_text']); +} + + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> \ No newline at end of file diff --git a/praxisstelle/index.php b/praxisstelle/index.php new file mode 100755 index 0000000..78fea4a --- /dev/null +++ b/praxisstelle/index.php @@ -0,0 +1,249 @@ +assign('index_error', 1); + + + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden"); + } + + if ($errorno == 2) { + $smarty->assign('index_error_text', "Das Passwort oder der Anmeldename ist nicht korrekt."); + } + + if ($errorno == 3) { + $smarty->assign('index_error_text', "Die Dienststelle ist noch nicht registriert. Bitte registrieren Sie sich mit Ihren Zugangsdaten hier: https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle/register.php"); + } + + } + +} + +if ($action == 'anmeld') { + + if (isset($_POST['username'])) { + $username = $_POST["username"]; + } else { + $username = $_SESSION["username"]; + } + + if (isset($_POST['password'])) { + $password = $_POST["password"]; + } else { + $password = $_SESSION["password"]; + } + + + $_SESSION["username"] = $username; + $_SESSION["password"] = $password; + + + if ($username == "") { + echo ""; + exit; + } + + if ($password == "") { + echo ""; + exit; + } + + $db = dbconnect(); + $password_db = md5($password); + $result = $db->query("SELECT dst_id, register_dat, pwd + FROM bpm_dienststellen + WHERE mail = '$username' + "); + $row = $result->fetch_array(); + $dst_id = $row['dst_id']; + + # Adminkennung testen + if ($row['pwd'] != $password_db) { + $login = 0; + $result2 = $db->query("SELECT count(*) Anz + FROM bpm_admin + WHERE passwort = '$password_db' + AND bpmuid = 1 + LIMIT 1 + "); + $row2 = $result2->fetch_array(); + if($row2['Anz'] == 1){ + $result3 = $db->query("SELECT dst_id, register_dat + FROM bpm_dienststellen + WHERE mail = '$username' + "); + $row3 = $result3->fetch_array(); + $login =1; + $dst_id = $row3['dst_id']; + } + }else{ + $login = 1; + # Bei erfolgreichem Login soll das registerdat gesetzt werden, wenn es noch nicht vorhanden ist, damit die Dienststelle angezeigt wird beim ./upload (Auswahl Praxisstelle) + $result3 = $db->query("SELECT count(*) Anz + FROM bpm_dienststellen + WHERE dst_id = '$row[dst_id]' + AND register_dat = '0000-00-00 00:00:00' + "); + $row3 = $result3->fetch_array(); + if($row3['Anz'] == 1){ + # Diensstelle ist noch nicht registriert, soll als registriert gelten, wenn er sich anmelden kann. Dann hat der Admin die Registrierung durchgeführt + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $result = $db->query("UPDATE bpm_dienststellen + SET register_dat = '$datum_db' + WHERE dst_id = '$row[dst_id]' + "); + } + } + + + // noch nicht registriert + if ($row['register_dat'] == '0000-00-00 00:00:00' AND $login != 1) { + echo ""; + exit; + } + // password falsch + if ($login != 1) { + echo ""; + exit; + } + + # Login OK + $_SESSION["prx_dst_id"] = $row['dst_id']; + + /* + # Gespeicherte Werte + # Persönliche Angaben + + $result = $db->query("SELECT anrede, vorname, nachname, str, plz, ort + FROM bpm_kandidat + WHERE id = '$id' + LIMIT 1"); + $row = @$result->fetch_array(); + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('dok_anrede', $anrede); + $smarty->assign('dok_vorname', $row['vorname']); + $smarty->assign('dok_nachname', $row['nachname']); + $smarty->assign('dok_str', $row['str']); + $smarty->assign('dok_plz', $row['plz']); + $smarty->assign('dok_ort', $row['ort']); + # Dateien + $query1 = "SELECT file, beschreibung, date_format(upload_dat, '%d.%m.%Y - $H:%i') datum_form + FROM bpm_upload + WHERE ka_id IN (SELECT ka_id FROM bpm_kandidat WHERE id = '$id')"; + + $result1 = $db->query($query1) or die("Cannot execute query1"); + + while ($row1 = $result1->fetch_array()) { + $basename = basename($row1['file']); + $rep = $id . "_"; + $row1['basename'] = str_replace($rep, '', $basename); + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + */ +} + +if ($action == 'reset') { + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('index_error', 1); + + + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Der Benutzername ist unbekannt"); + } + + } +} + +if ($action == 'reset2') { +$mail = trim($_POST["pwdback_mail"]); + + $result = $db->query("SELECT count(*) Anz + FROM bpm_dienststellen + WHERE mail = '$mail' + AND pwd != '' + LIMIT 1 + "); + $row = $result->fetch_array(); + + if ($row['Anz'] == '0') { + echo ""; + exit; + } + $mailcrypt = urlencode(cryption($mail, 'e')); + #echo $mailcrypt; + + $datum = date("Y-m-d H:i:s"); + $sql1 = $db->query("UPDATE bpm_dienststellen + SET mail_reset = '$datum' + WHERE mail = '$mail' + "); + + $empfaenger = "$mail"; + + $betreff = "Passwortreset: Praxisstelle BPM"; + $text = "Sehr geehrte Damen und Herren,
+
+ um Ihr Passwort zurückzusetzen, klicken Sie bitte hier https://hs-ludwigsburg.de/kurs/bpm/praxisstelle/resetpassword.php?confirmationCode=$mailcrypt
+ Anschließend können Sie sich Ihr neues Wunschpasswort erstellen. Dieser Link ist für 24 Stunden gültig.
+ Sie können diese E-Mail ignorieren, wenn Sie Ihr Passwort nicht zurücksetzen möchten oder diese Änderung nicht selbst beantragt haben.
+ Niemand außer Ihnen kann Ihr Passwort mit diesem Link ändern.
+
+ Mit freundlichen Grüßen
+ Ihre Hochschule + + "; + + +#echo " +#From: $sender - $sendermail
+#$empfaenger
+#$betreff
+#$text
"; +#exit; + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); +} +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/indexframe.php b/praxisstelle/indexframe.php new file mode 100755 index 0000000..1d54141 --- /dev/null +++ b/praxisstelle/indexframe.php @@ -0,0 +1,8 @@ +display("$template/praxisstelle/$templatename"); +?> \ No newline at end of file diff --git a/praxisstelle/logout.php b/praxisstelle/logout.php new file mode 100755 index 0000000..7fa3ed2 --- /dev/null +++ b/praxisstelle/logout.php @@ -0,0 +1,12 @@ +display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/menu_verwaltung.php b/praxisstelle/menu_verwaltung.php new file mode 100755 index 0000000..fa28210 --- /dev/null +++ b/praxisstelle/menu_verwaltung.php @@ -0,0 +1,16 @@ +assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> \ No newline at end of file diff --git a/praxisstelle/profil.php b/praxisstelle/profil.php new file mode 100755 index 0000000..4b2d73c --- /dev/null +++ b/praxisstelle/profil.php @@ -0,0 +1,188 @@ +query("SELECT bezeichnung, name, str, plz, ort, tel, internet, mail, date_format(gueltig_von, '%d.%m.%Y') gueltig_von_form, date_format(gueltig_bis, '%d.%m.%Y') gueltig_bis_form + FROM bpm_dienststellen + WHERE dst_id = '$dst_id' + LIMIT 1"); + $row = @$result->fetch_array(); + if($row['gueltig_von_form'] == '00.00.0000'){ + $gueltig_von_form = ""; + }else{ + $gueltig_von_form = $row['gueltig_von_form']; + } + if($row['gueltig_bis_form'] == '00.00.0000'){ + $gueltig_bis_form = ""; + }else{ + $gueltig_bis_form = $row['gueltig_bis_form']; + } + + $smarty->assign('dst_bezeichnung', $row['bezeichnung']); + $smarty->assign('dst_name', $row['name']); + $smarty->assign('dst_str', $row['str']); + $smarty->assign('dst_plz', $row['plz']); + $smarty->assign('dst_ort', $row['ort']); + $smarty->assign('dst_mail', $row['mail']); + $smarty->assign('dst_value_gueltigvon', "$gueltig_von_form"); + $smarty->assign('dst_value_gueltigbis', "$gueltig_bis_form"); + + # -- Fehlermeldungen -- # + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('dst_error', 1); + + $smarty->assign('dst_bezeichnung', $_SESSION["dst_bezeichnung"]); + $smarty->assign('dst_name', $_SESSION["dst_name"]); + $smarty->assign('dst_str', $_SESSION["dst_str"]); + $smarty->assign('dst_plz', $_SESSION["dst_plz"]); + $smarty->assign('dst_ort', $_SESSION["dst_ort"]); + $smarty->assign('dst_mail', $_SESSION["dst_mail"]); + $smarty->assign('dst_pwd', $_SESSION["dst_pwd"]); + $smarty->assign('dst_pwd_wied', $_SESSION["dst_pwd_wied"]); + $smarty->assign('dst_value_gueltigvon', $_SESSION["dst_value_gueltigvon"]); + $smarty->assign('dst_value_gueltigbis', $_SESSION["dst_value_gueltigbis"]); + + + if ($errorno == 1) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Es müssen alle Felder ausgefüllt werden!"); + } + if ($errorno == 2) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Das eingegebene Passwort stimmt nicht mit der Passwortwiederholung überein!"); + } + if ($errorno == 3) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Das eingegebene Gültig von Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + if ($errorno == 4) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Das eingegebene Gültig bis Datum ist nicht korrekt. Bitte korrigieren Sie das Datum!"); + } + } + +} + +if ($action == 'save') { + + $art = $_POST['art']; + $name = $_POST['name']; + $str = $_POST['str']; + $plz = $_POST['plz']; + $ort = $_POST['ort']; + $mail = $_POST['mail']; + $pwd = $_POST['pwd_prx']; + $pwd_wied = $_POST['pwd_prx_wied']; + $bez = $art." ".$name; + $dst_id = $_SESSION["prx_dst_id"]; + $gueltigvon = $_POST['gueltigvon']; + $gueltigbis = $_POST['gueltigbis']; + +$gueltigvon_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gueltigvon); +$gueltigbis_form = preg_replace('/^(\\d{2})\\.(\\d{2})\\.(\\d{4})$/', '$3-$2-$1', $gueltigbis); + + +function validateDate($date, $format = 'Y-m-d') +{ + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; +} + +if(!validateDate($gueltigvon_form) AND $gueltigvon_form != ''){ + echo ""; + exit; +} + +if(!validateDate($gueltigbis_form) AND $gueltigbis_form != ''){ + echo ""; + exit; +} + +if($gueltigvon_form == ''){ + $gueltigvon_form ='0000-00-00'; +} + +if($gueltigbis_form == ''){ + $gueltigbis_form ='0000-00-00'; +} + + + $_SESSION["dst_bezeichnung"] = $art; + $_SESSION["dst_name"] = $name; + $_SESSION["dst_str"] = $str; + $_SESSION["dst_plz"] = $plz; + $_SESSION["dst_ort"] = $ort; + $_SESSION["dst_mail"] = $mail; + $_SESSION["dst_pwd"] = $pwd; + $_SESSION["dst_pwd_wied"] = $pwd_wied; + + + if($art == '' or $name == '' or $str == '' or $plz == '' or $ort == '' or $mail == ''){ + echo ""; + exit; + } + if($pwd != ''){ + if($pwd != $pwd_wied){ + echo ""; + exit; + } + $pwd_md5 = md5($pwd); + }else{ + # Passwort holen und unverändert lassen + $result = $db->query("SELECT pwd + FROM bpm_dienststellen + WHERE dst_id = '$dst_id' + LIMIT 1"); + $row = @$result->fetch_array(); + $pwd_md5 = $row['pwd']; + } + + $result = $db->query("UPDATE bpm_dienststellen + SET bezeichnung = '$art' + , name = '$name' + , bez = '$bez' + , str = '$str' + , plz = '$plz' + , ort = '$ort' + , mail = '$mail' + , pwd = '$pwd_md5' + , gueltig_von = '$gueltigvon_form' + , gueltig_bis = '$gueltigbis_form' + WHERE dst_id = $dst_id + "); + echo ""; +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/register.php b/praxisstelle/register.php new file mode 100755 index 0000000..41dd10c --- /dev/null +++ b/praxisstelle/register.php @@ -0,0 +1,267 @@ +query("SELECT init_tan, mail + FROM bpm_dienststellen + WHERE dst_id = $dst_id + "); + $row_tan = $result_tan->fetch_array(); + $tan = $row_tan['init_tan']; + $mail = $row_tan['mail']; + $smarty->assign('reg_uid', $mail); + $smarty->assign('reg_tan', $tan); + } + + + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('index_error', 1); + + + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden"); + } + + if ($errorno == 2) { + $smarty->assign('index_error_text', "Das Passwort oder der Anmeldename ist nicht korrekt."); + } + + if ($errorno == 3) { + $smarty->assign('index_error_text', "Die Dienststelle ist bereits registriert. Bitte melden Sie sich hier an: https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle"); + } + + } + +} + +if ($action == 'anmeld') { + + + if (isset($_POST['username'])) { + $username = trim($_POST["username"]); + } else { + $username = $_SESSION["username"]; + } + + if (isset($_POST['password'])) { + $password = trim($_POST["password"]); + } else { + $password = $_SESSION["password"]; + } + + + $_SESSION["username"] = $username; + $_SESSION["password"] = $password; + + if ($username == "") { + echo ""; + exit; + } + + if ($password == "") { + echo ""; + exit; + } + $db = dbconnect(); + + $result = $db->query("SELECT dst_id, register_dat + FROM bpm_dienststellen + WHERE mail = '$username' + AND init_tan = '$password' + "); + $row = $result->fetch_array(); + + + // password falsch + if ($row['dst_id'] == '') { + echo ""; + exit; + } + + // Bereits registriert + if ($row['register_dat'] != '0000-00-00 00:00:00') { + echo ""; + exit; + } + + # DST_ID für Update speichern + $_SESSION["dst_id"] = $row['dst_id']; + + + # Gespeicherte Werte + # Persönliche Angaben + $result = $db->query("SELECT bezeichnung, name, str, plz, ort, tel, internet, mail + FROM bpm_dienststellen + WHERE dst_id = '$row[dst_id]' + LIMIT 1"); + $row = @$result->fetch_array(); + + $smarty->assign('dst_bezeichnung', $row['bezeichnung']); + $smarty->assign('dst_name', $row['name']); + $smarty->assign('dst_str', $row['str']); + $smarty->assign('dst_plz', $row['plz']); + $smarty->assign('dst_ort', $row['ort']); + $smarty->assign('dst_mail', $row['mail']); + + # -- Fehlermeldungen -- # + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('dst_error', 1); + + $smarty->assign('dst_bezeichnung', $_SESSION["dst_bezeichnung"]); + $smarty->assign('dst_name', $_SESSION["dst_name"]); + $smarty->assign('dst_str', $_SESSION["dst_str"]); + $smarty->assign('dst_plz', $_SESSION["dst_plz"]); + $smarty->assign('dst_ort', $_SESSION["dst_ort"]); + $smarty->assign('dst_mail', $_SESSION["dst_mail"]); + $smarty->assign('dst_pwd', $_SESSION["dst_pwd"]); + $smarty->assign('dst_pwd_wied', $_SESSION["dst_pwd_wied"]); + + if ($errorno == 1) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Es müssen alle Felder ausgefüllt werden!"); + } + if ($errorno == 2) { + # ungültiges Datum + $smarty->assign('dst_error_text', "Das eingegebene Passwort stimmt nicht mit der Passwortwiederholung überein!"); + } + } + +} + + +if ($action == 'save') { + $art = $_POST['art']; + $name = $_POST['name']; + $str = $_POST['str']; + $plz = $_POST['plz']; + $ort = $_POST['ort']; + $mail = $_POST['mail']; + $pwd = $_POST['pwd_prx']; + $pwd_wied = $_POST['pwd_prx_wied']; + $bez = $art." ".$name; + $dst_id = $_SESSION["dst_id"]; + + + $_SESSION["dst_bezeichnung"] = $art; + $_SESSION["dst_name"] = $name; + $_SESSION["dst_str"] = $str; + $_SESSION["dst_plz"] = $plz; + $_SESSION["dst_ort"] = $ort; + $_SESSION["dst_mail"] = $mail; + $_SESSION["dst_pwd"] = $pwd; + $_SESSION["dst_pwd_wied"] = $pwd_wied; + + + if($art == '' or $name == '' or $str == '' or $plz == '' or $ort == '' or $mail == '' or $pwd == '' or $pwd_wied == ''){ + echo ""; + exit; + } + + if($pwd != $pwd_wied){ + echo ""; + exit; + } + + $pwd_md5 = md5($pwd); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + + $result = $db->query("UPDATE bpm_dienststellen + SET bezeichnung = '$art' + , name = '$name' + , bez = '$bez' + , str = '$str' + , plz = '$plz' + , ort = '$ort' + , mail = '$mail' + , register_dat = '$datum_db' + , pwd = '$pwd_md5' + WHERE dst_id = $dst_id + "); + + $empfaenger = "$mail"; + $betreff = "Registrierung der Ausbildungsstelle"; + $text = " + + + + Sehr geehrte Damen und Herren,
+
+ Sie haben die Praxisstelle erfolgreich registriert.
+ Sie können sich auf der Seite der Hochschule nun anmelden:
+ https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle/index.php +

+ Freundliche Grüße +

+ Ihre Hochschulen Kehl und Ludwigsburg +
+

+ Diese Mail wurde automatisch generiert!
+ Antworten Sie daher nicht auf diese Mail.
+
+ Vielen Dank! + + "; + + + ## Mailversand: + $sendermail = "bewerbungbpm@hs-ludwigsburg.de"; + $sender = "Hochschule Ludwigsburg"; + +#echo " +#

+#sender: $sender
+#sendermail: $sendermail
+#empfaenger: $empfaenger
+#betreff: $betreff
+#$text
+#
+#"; + + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/register_mail.php b/praxisstelle/register_mail.php new file mode 100755 index 0000000..b9e7078 --- /dev/null +++ b/praxisstelle/register_mail.php @@ -0,0 +1,97 @@ +query("SELECT dst_id, mail, init_tan + FROM bpm_dienststellen + WHERE (regmail_sendedat = '0000-00-00 00:00:00' + or regmail_status = 'O' + or regmail_status = 'F') + ORDER BY bez ASC"); +while ($row = $result1->fetch_array()) { + + + $empfaenger = "$row[mail]"; + $text = " +

Wichtig: Bitte an die Personalabteilung weiterleiten

+

Geändertes Zulassungsverfahren für den Studiengang Public Management, Bachelor of Arts
+ Registrierung als Ausbildungsstelle
+

+

Sehr geehrte Damen und Herren,

+

wie Sie sicherlich bereits erfahren haben, hat sich das Zulassungsverfahren für den Bachelor-Studiengang Public Management verändert. Nun ist bereits vor einer Bewerbung der Studierfähigkeitstest an der Hochschule Ludwigsburg oder Kehl zu absolvieren. Erst mit einem bestandenen Test ist eine Onlinebewerbung über ein Portal der Hochschulen möglich. In dieser Onlinebewerbung können die Bewerber/-innen max. 10 Wunschkommunen angeben, bei denen sie sich bewerben möchten. Wenn Sie als Wunschausbildungsstelle angegeben wurden, erhalten Sie eine automatisierte Email mit einem Link, über den Sie die Bewerbung und das Testergebnis einsehen können. Sollten Sie darüber hinaus weitere Bewerbungsunterlagen von Ihrem Bewerber / Ihrer Bewerberin benötigen, fordern Sie diese bitte direkt bei ihm/ihr an.
+ Wenn Sie sich für eine/-n Bewerber/-in entschieden haben und diese/-r Ihnen auch eine Zusage erteilt hat, melden Sie dies bitte der jeweiligen Hochschule. Die endgültigen Zulassungen für einen Studienplatz können jedoch erst nach Bewerbungsschluss, also ab Ende Juli 2021 erteilt werden. +

+

Ebenfalls verändert hat sich der Bewerbungszeitraum. Für einen Ausbildungsbeginn am 1. September sind Bewerbungen künftig vom 1. August des Vorjahres bis 15. Juli möglich. Die Studierfähigkeitstests finden nicht mehr nur im September/Oktober statt, sondern werden während der kompletten Bewerbungsphase angeboten. Die Bewerber/-innen können sich selbst über die Webseiten der Hochschulen dazu anmelden.

+

Um Ihnen noch Zeit zu geben, sich als Ausbildungsstelle einzutragen, wird die Bewerbungsphase in diesem Jahr erst ab 1. September beginnen (Bewerbungsphase von 1. September 2020 bis 15. Juli 2021 für Ausbildungsbeginn 1. September 2021).
+ Wenn Sie nicht während des gesamten Bewerbungszeitraums Bewerbungen erhalten möchten, können Sie einen Gültigkeitszeitraum in der Registrierung angeben. Außerhalb dieses Zeitraums sind Sie dann nicht von den Bewerbern/-innen auswählbar. +

+

Bitte beachten Sie, dass Sie nur dann auf dem Bewerbungsportal als Ausbildungsstelle angezeigt bzw. gelistet werden, wenn Sie sich dafür aktiv registrieren. Um sich als Ausbildungsstelle zu registrieren, geben Sie Ihre Daten bitte über folgenden Link ein:

+
element because TCPDF + // does not recognize e.g.
element because TCPDF + // does not recognize e.g.
+ + + + + + + + + + + + +
+ Link: + + https://www.hs-ludwigsburg.de/kurs/bpm/praxisstelle/register.php +
+ Benutzername: + $row[mail]
+ Passwort: + $row[init_tan]
+

Sollten Ihnen bereits Bewerbungen vorliegen, verweisen Sie bitte auf die notwendige Onlinebewerbung der Hochschulen:

+

https://www.hs-ludwigsburg.de/studium/public-management-ba/bewerben.html
+ http://www.hs-kehl.de/studium-lehre/bachelor-studiengaenge/public-management-ba/bewerbung/ +

+

Dort finden Sie auch weitere Informationen zum Zulassungsverfahren.

+

Bitte haben Sie Verständnis dafür, dass wir Ihnen während des Bewerbungsverfahrens keine Prognosen bzw. Auskünfte über die Testkandidaten/-innen oder zu erwartenden Testergebnisse und Bewerbungen erteilen können.

+

Mit freundlichen Grüßen

+

Ihre Hochschulen Ludwigsburg und Kehl

"; + + ## Mailversand: + $headers = "From: $sender <$sendermail>\r\n"; + $headers .= "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=utf-8\r\n"; + $return = @mail($empfaenger, $betreff, $text, $headers); + $datum_db = date("Y-m-d H:i:s"); + $text_db = addslashes($text); + if ($return) { + $sql1 = $db->query("UPDATE bpm_dienststellen + SET regmail_text = '$text_db' + , regmail_betreff = '$betreff' + , regmail_status = 'V' + , regmail_sendedat = '$datum_db' + WHERE dst_id = $row[dst_id] + "); + } else { + $sql1 = $db->query("UPDATE bpm_dienststellen + SET regmail_text = '$text_db' + , regmail_betreff = '$betreff' + , regmail_status = 'F' + WHERE dst_id = $row[dst_id] + "); + } +} +/* +UPDATE bpm_dienststellen +SET regmail_text = '' +, regmail_betreff = '' +, regmail_status = 'O' +, regmail_sendedat = '0000-00-00 00:00:00'; +*/ +?> diff --git a/praxisstelle/resetpassword.php b/praxisstelle/resetpassword.php new file mode 100755 index 0000000..a8e2d5d --- /dev/null +++ b/praxisstelle/resetpassword.php @@ -0,0 +1,91 @@ +query("SELECT count(*) Anz + FROM bpm_dienststellen + WHERE mail = '$mail' + AND mail_reset > DATE_SUB(now(), INTERVAL 24 HOUR) + AND mail_reset != '0000-00-00 00:00:00' + "); + $row = $result->fetch_array(); + + if ($row['Anz'] == 0) { + $smarty->assign('index_error', 1); + $smarty->assign('index_error_text', "Der Link ist ungültig"); + } + $_SESSION["reset_mail"] = $mail; + $_SESSION["reset_cfCode"] = $_GET["confirmationCode"]; + + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + + $smarty->assign('index_error', 1); + + + if ($errorno == 1) { + # ungültiges Datum + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden!"); + } + if ($errorno == 2) { + # ungültiges Datum + $smarty->assign('index_error_text', "Das eingegebene Passwort stimmt nicht mit der Passwortwiederholung überein!"); + } + + } + +} + +if ($action == 'pwback') { + $pwd = $_POST['resetpwd']; + $pwd_wied = $_POST['resetpwd_wied']; + $mail = $_SESSION["reset_mail"]; + $cfCode = urlencode($_SESSION["reset_cfCode"]); + + if($pwd == '' or $pwd_wied == ''){ + echo ""; + exit; + } + + + if($pwd != $pwd_wied){ + echo ""; + exit; + } + + $pwd_md5 = md5($pwd); + $result = $db->query("UPDATE bpm_dienststellen + SET pwd = '$pwd_md5' + ,mail_reset = '0000-00-00 00:00:00' + WHERE mail = '$mail' + "); +} + + + +$smarty->assign('action', "$action"); +$smarty->display("$template/praxisstelle/$templatename"); +?> diff --git a/praxisstelle/titel.php b/praxisstelle/titel.php new file mode 100755 index 0000000..cb2f333 --- /dev/null +++ b/praxisstelle/titel.php @@ -0,0 +1,20 @@ +window.top.location.href = \"index.php\";"; +} +$dst_id = $_SESSION["prx_dst_id"]; + $result = $db->query("SELECT bez + FROM bpm_dienststellen + WHERE dst_id = '$dst_id' + "); + $row = $result->fetch_array(); + $smarty->assign('prx_stellenbezeichnung', $row['bez']); + +$smarty->display("$template/praxisstelle/$templatename"); +?> \ No newline at end of file diff --git a/praxisstelle/verwaltung_frame.php b/praxisstelle/verwaltung_frame.php new file mode 100755 index 0000000..74907a2 --- /dev/null +++ b/praxisstelle/verwaltung_frame.php @@ -0,0 +1,6 @@ +display("$template/praxisstelle/$templatename"); ?> \ No newline at end of file diff --git a/sepa-ueberweisung.jpg b/sepa-ueberweisung.jpg new file mode 100755 index 0000000..528a5a0 Binary files /dev/null and b/sepa-ueberweisung.jpg differ diff --git a/sepa-ueberweisung2.jpg b/sepa-ueberweisung2.jpg new file mode 100755 index 0000000..e481cae Binary files /dev/null and b/sepa-ueberweisung2.jpg differ diff --git a/status/index.php b/status/index.php new file mode 100755 index 0000000..85d10a5 --- /dev/null +++ b/status/index.php @@ -0,0 +1,171 @@ +assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es müssen alle Felder ausgefüllt werden"); + } + + if ($errorno == 2) { + $smarty->assign('index_error_text', "Der Benutzername ist im System nicht vorhanden"); + } + + if ($errorno == 3) { + $smarty->assign('index_error_text', "Der Benutzername oder der TAN ist nicht korrekt."); + } + + } + +} + +if ($action == 'anmeld') { + if (isset($_POST['user'])) { + $username = mb_strtoupper($_POST["user"]); //remove case sensitivity on the username + } else { + $username = $_SESSION["username"]; + } + + if (isset($_POST['password'])) { + $tan = $_POST["password"]; + } else { + $tan = $_SESSION["tan"]; + } + $_SESSION["username"] = $username; + $_SESSION["tan"] = $tan; + + if ($username == "" OR $tan == "") { + echo ""; + exit; + } else { + + $db = dbconnect(); + + $result = $db->query("SELECT a.ka_id, anrede, vorname, nachname, str, plz, ort, date_format(login_dat, '%d.%m.%Y - %H:%i') login_dat_form, a.id, c.tan, a.hochschule + FROM bpm_kandidat a, bpm_term_kand b, bpm_tanpool c + WHERE a.ka_id = b.ka_id + AND b.tp_id = c.tp_id + AND a.id = '$username' + AND c.tan= '$tan' + LIMIT 1"); + $row = $result->fetch_array(); + + if ($username != strtoupper($row['id'])) { + echo ""; + exit; + } + // Passwort falsch + elseif ($tan != $row['tan']) { + echo ""; + exit; + } + + if($row['anrede'] == 'M'){ + $anrede = 'Herr'; + }else{ + $anrede = 'Frau'; + } + $smarty->assign('status_anrede', $anrede); + $smarty->assign('status_vorname', $row['vorname']); + $smarty->assign('status_nachname', $row['nachname']); + $smarty->assign('status_str', $row['str']); + $smarty->assign('status_plz', $row['plz']); + $smarty->assign('status_ort', $row['ort']); + $smarty->assign('status_login_dat_form', $row['login_dat_form']); + + $result_ct = $db->query("SELECT count(*) Anz + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan='$tan'"); + $row_ct = $result_ct->fetch_array(); + + if($row_ct['Anz'] == 0){ + $smarty->assign('status_erg_vorhanden', 0); + $smarty->assign('status_erg_bestanden', '3'); + }else{ + $smarty->assign('status_erg_vorhanden', 1); + $result_erg = $db->query("SELECT satzerg, gemeinsamkeiten, rechenaufgaben, zahlenreihen, rechenzeichen, matrizen, merkf, summe, bestanden, einsicht_dat + FROM bpm_ergebnisse + WHERE ka_id =$row[ka_id] + AND tan='$tan'"); + $row_erg = $result_erg->fetch_array(); + + if($row_erg['einsicht_dat'] == '0000-00-00 00:00:00'){ + $datum=date("Y-m-d H:i:s"); + $sql1 = $db->query( "UPDATE bpm_ergebnisse + SET einsicht_dat = '$datum' + WHERE ka_id =$row[ka_id] + AND tan='$tan'"); + } + + + $smarty->assign('status_erg_satzerg', $row_erg['satzerg']); + $smarty->assign('status_erg_gemeinsamkeiten', $row_erg['gemeinsamkeiten']); + $smarty->assign('status_erg_rechenaufgaben', $row_erg['rechenaufgaben']); + $smarty->assign('status_erg_zahlenreihen', $row_erg['zahlenreihen']); + $smarty->assign('status_erg_rechenzeichen', $row_erg['rechenzeichen']); + $smarty->assign('status_erg_matrizen', $row_erg['matrizen']); + $smarty->assign('status_erg_merkf', $row_erg['merkf']); + $smarty->assign('status_erg_summe', $row_erg['summe']); + if($row['hochschule'] == 'Ludwigsburg'){ + $link = "https://www.hs-ludwigsburg.de/studium/public-management-ba/bewerben.html"; + } + if($row['hochschule'] == 'Kehl'){ + $link = "http://www.hs-kehl.de/studium-lehre/bachelor-studiengaenge/public-management-ba/bewerbung/"; + } + if($row['hochschule'] == 'NA'){ + $link = "http://www.hs-kehl.de/studium-lehre/bachelor-studiengaenge/public-management-ba/bewerbung/ bzw. + https://www.hs-ludwigsburg.de/studium/public-management-ba/bewerben.html"; + } + if($row_erg['bestanden'] == 0){ + $smarty->assign('status_erg_bestanden', 0); + + $smarty->assign('status_erg_bestanden_text', "nicht bestanden"); + $smarty->assign('status_erg_text', "Sie haben den Test nicht bestanden. Es besteht die Möglichkeit, dass Sie den Test einmal wiederholen. + Melden Sie sich dazu zur Testteilnahme erneut, mit der Angabe Ihrer ID und Ihrer TAN, an der Hochschule + $link an."); + } + if($row_erg['bestanden'] == 1){ + $smarty->assign('status_erg_bestanden', 1); + $smarty->assign('status_erg_bestanden_text', "bestanden"); + $smarty->assign('status_erg_text', "Ein bestandener Test berechtigt zur Bewerbung für den Studiengang „Public Management“. + Sie finden das Bewerbungsportal auf den Seiten der Hochschule: $link. + Dort finden Sie nähere Informationen zum Studiengang und zur Bewerbung."); + } + } + + + + + + } + + + +} +$smarty->assign('action', "$action"); +$smarty->display("$template/status/$templatename"); +?> diff --git a/status/logout.php b/status/logout.php new file mode 100755 index 0000000..e1f12f1 --- /dev/null +++ b/status/logout.php @@ -0,0 +1,12 @@ +display("$template/status/$templatename"); +?> diff --git a/tanimport.php b/tanimport.php new file mode 100755 index 0000000..b629540 --- /dev/null +++ b/tanimport.php @@ -0,0 +1,274 @@ + Semikolon +// oder $trennzeichen_excel = ","; --> Komma +############################################################# + + + + +$_SESSION["ck_verz"] = $verz; + + +if ($action == '') { + # Den Testtermin wählt man, damit jede Hochschule seine eigenen Daten importieren kann. Wenn eine Hochschule am selben TAg einen Test hat vermeidet man dass ein halbfertiger Test importiert wird + if (isset($_POST["testtermin"])) { + $testtermin = $_POST["testtermin"]; + } else { + $testtermin = $_SESSION["testtermin"]; + } + + $_SESSION["testtermin"] = $testtermin; + + + # Uploadverzeichnis aufräumen. Temporäre Dateien, die älter als 2 Wochen sind, werden gelöscht + $dir = $_SERVER["DOCUMENT_ROOT"].dirname($_SERVER['PHP_SELF'])."/$verz"; + $folder = dir($dir); + while ($dateiname = $folder->read()) { + if (filetype($dir.$dateiname) != "dir") { + if (strtotime("-2 weeks") > + @filemtime($dir.$dateiname)) { + if (@unlink($dir.$dateiname) != false){ + # echo $dateiname.' wurde gelöscht
'; + }else{ + # echo $dateiname.' konnte nichtgelöscht werden
'; + } + } + } + } + + $result_ct = $db->query("SELECT count(*) Anz FROM bpm_tanpool where verw_dat = '0000-00-00 00:00:00'"); + $row_ct = $result_ct->fetch_array(); + $smarty->assign('tanimp_anzahltan', "$row_ct[Anz]"); + + # Fehler beim Upload anzeigen + if (isset($_GET['error'])) { + + $errorno = $_GET['error']; + $smarty->assign('index_error', 1); + + if ($errorno == 1) { + $smarty->assign('index_error_text', "Es dürfen nur CSV Dateien hochgeladen werden."); + } + if ($errorno == 2) { + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $smarty->assign('index_error_text', "Die Datei ist zu groß. Die Dateigröße darf max. $size_mb MB betragen."); + } + if ($errorno == 3) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde vom Server gelöscht"); + } + if ($errorno == 4) { + $smarty->assign('index_error_text', "Vorgang wurde abgebrochen. Die Datei wurde nicht vom Server gelöscht"); + } + } +} + +if ($action == 'csvimp') { + + $testtermin = $_SESSION["testtermin"]; + + // http://www.tutorials.de/tutorials65420.html + #echo '
', print_r($_POST, true), '
'; + + $tempname = $_FILES['file']['tmp_name']; + $name = $_FILES['file']['name']; + + $type = $_FILES['file']['type']; + $size = $_FILES['file']['size']; + $einheit = "Byte"; // Für die Efolgsmeldung. + + $limitedext = array( + ".csv" + ); //Erlaubte Dateieindung beim Upload + + $extlimit = "yes"; //Do you want to limit the extensions of files uploaded + $ext = strrchr($name, '.'); + + if (($extlimit == "yes") && (!in_array($ext, $limitedext))) { + echo ""; + exit; + } + + + # Tabelle bpm_parameter + $size_mb = trim(get_parameter(12)); + $size_bt = $size_mb * 1024 * 1024; + + if ($size > $size_bt) { + echo ""; + exit; + } + + + $name = str_replace(array( + "ä", + "ö", + "ü", + "ß", + "Ä", + "Ö", + "Ü", + " " + ), array( + "ae", + "oe", + "ue", + "ss", + "Ae", + "Oe", + "Ue", + "_" + ), $name); + $heute = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y")); // heutiges Datum & Zeit: http://de2.php.net/manual/de/function.date.php + $heuteformat = date("H-i-s_Y-m-d", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $datum_db = date("Y-m-d H:i:s", $heute); // Formatierung, wie es vor dem Dateinamen erscheinen soll + $neu = $heuteformat . "_" . $name; + $_SESSION["ck_neu"] = $neu; + move_uploaded_file("$tempname", "$verz$neu"); // Unterverzeichnisse wie folgt: copy("$tempname", "pdf/$neu"); + + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + + # Hier vor der Schleife erste Zeile holen und ignorieren. Enthält Überschrift + # fgetcsv($handle, 0, $trennzeichen_excel); + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + if(!isset($zaehler) or $zaehler == 1){ + $zaehler = 0; + }else{ + $zaehler = 1; + } + + $tan = $data[1]; + $tinyurl = $data[2]; + + $row1['zaehler'] = $zaehler; + $row1['tan'] = $tan; + $row1['tinyurl'] = $tinyurl; + $table_data1[] = $row1; + } + $smarty->assign('table_data1', $table_data1); + fclose($handle); + +} + +if ($action == 'csvimp2') { + $neu = $_SESSION["ck_neu"]; //CSV-Dateinamen um Datei löschen zu können + $verz = $_SESSION["ck_verz"]; //Uploadverzeichnis aus Cookie holen + $testtermin = $_SESSION["testtermin"]; + + + if ($_POST['import'] == "0") // DS sollen nicht importiert werden + { + $dateiname = "$verz$neu"; + if (@unlink($dateiname)) // Funktion löscht Dateien und gibt true / false zurück + { + # Abbruch, datei gelöscht + echo ""; + exit; + } else { + # Abbruch, datei nicht gelöscht + echo ""; + exit; + } // End if + + } elseif ($_POST['import'] == "1") // DS sollen importiert werden + { + $handle = fopen("$verz$neu", "r"); // Datei zum Lesen öffnen + + + while (($data = fgetcsv($handle, 0, $trennzeichen_excel)) !== FALSE) { // Daten werden aus der Datei in ein Array $data gelesen + + $dummy_name = 'Testuser-bpm'; + $dummy_vorname = $data[0]; + $tan = $data[1]; + $tinyurl = $data[2]; + + $result_ct = $db->query("SELECT count(*) Anz + FROM bpm_tanpool + WHERE tan = '$tan'"); + $row_ct = $result_ct->fetch_array(); + + if ($row_ct['Anz'] == 0) { + # keine TANs vorhanden, insert + + $sql1 = $db->query("insert into bpm_tanpool (dummy_name + , dummy_vorname + , tan + , tinyurl + , aktiv) + VALUES ( '$dummy_name' + , '$dummy_vorname' + , '$tan' + , '$tinyurl' + , 'A' + )"); + if (!$sql1) { + $hinweis['hinweis'] = "TAN: " . $tan . " Fehler: TAN nicht gespeichert
"; + $smarty->assign('index_error', 1); + } + } else { + # Ergebnisse gibt es schon, kein insert + $hinweis['hinweis'] = "TAN: " . $tan . " schon vorhanden
"; + $smarty->assign('index_error', 1); + } + + $table_data2[] = $hinweis; + } + $smarty->assign('table_data2', $table_data2); + + + fclose($handle); + + } else { // Es wurde kein Radiobutton gewählt! Technisch aber ausgeschlossen + + echo "sie müssen eine Auswahl treffen"; + + } + + function deleteFiles($verz) + { + $handle = opendir($verz); + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + + $datei = $verz . $file; + + if (@unlink($datei)) { + $error = TRUE; + } else { + $error = FALSE; + } + } + } + closedir($handle); + return $error; + } + + deleteFiles($verz); // Dateien werden im Uploadverzeichnis gelöscht, falls noch welche darin wären + +} // ende Action + +$smarty->assign('action', "$action"); +$smarty->display("$template/admin/$templatename"); + +?> diff --git a/templates/modern/admin/administration_frame.html b/templates/modern/admin/administration_frame.html new file mode 100755 index 0000000..c15e3f6 --- /dev/null +++ b/templates/modern/admin/administration_frame.html @@ -0,0 +1,20 @@ + + +Deputatverwaltung + + + + + + + + + +<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> + +<p>To view this page correctly, you need a Web browser that supports frames.</p> + +</body> + + + \ No newline at end of file diff --git a/templates/modern/admin/bewerber_daten.html b/templates/modern/admin/bewerber_daten.html new file mode 100755 index 0000000..9278d9b --- /dev/null +++ b/templates/modern/admin/bewerber_daten.html @@ -0,0 +1,1826 @@ +{if $action == ''} + + + + + + + + + {literal} + + {/literal} + + +
+ {if $bewerber_error == '1'} + + + + + +
+ + Achtung!
+ {$bewerber_error_text} +
+
+ {/if} +
+ + Bewerberdaten + +
+
+
+
+
+
+ Suche + +
+
+
+
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} +{if $action == 'ausgabe'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Persönliche Angaben + + + + + + +
+ {$status_anrede}
+ {$status_vorname} {$status_nachname}
+ {$status_str}
+ {$status_plz} {$status_ort}
+ {$status_mail}
+
+ + + + + + {if $status_tel != ''} + + + + + {/if} +
Geburtstag:{$status_gebdat}
Tel:{$status_tel}
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Testdatum: + + {$status_tm_datum_form} + +   +
+ Testlogin: + + {$status_login_dat_form} + + {if $status_login_dat_form != '-'} + Testdatum zurücksetzen Ermöglicht einen weiteren Testlogin im Hochschulsystem (nicht im Hogrefeportal) + {/if} +
+ ID: + + {$status_login_id} + +   +
+ TAN: + + {$status_login_tan} + +   +
+   + +   +
+ zuständige Hochschule: + + +
+ Wunsch Hochschule: + + +
+ Zugewiesene Hochschule: + + +
+   + +   +
+ Schwerbehinderung: + + +
+ Verkürzung: + + +
+
+
+
+
+
+
+ + Testergebnis im Detail + +
+ {if $status_erg_vorhanden == 0} +
+ Es sind keine aktuellen Testergebnisse verfügbar! +
+ {/if} + {if $status_erg_vorhanden == 1} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Testmodul + + Erreichte Punkte +
+ Satzergänzung: + + {$status_erg_satzerg} / 20 +
+ Gemeinsamkeiten: + + {$status_erg_gemeinsamkeiten} / 20 +
+ Rechenaufgaben: + + {$status_erg_rechenaufgaben} / 20 +
+ Zahlenreihen: + + {$status_erg_zahlenreihen} / 20 +
+ Rechenzeichen: + + {$status_erg_rechenzeichen} / 20 +
+ Matrizen: + + {$status_erg_matrizen} / 20 +
+ Merkfähigkeit verbal: + + {$status_erg_merkf} / 10 +
+ Erreichte Punktzahl: + + {$status_erg_summe} / 130 +
+ Ergebnis: + + {$status_erg_bestanden_text} +
+ Einsicht in das Ergebnis Kandidat: + + {$status_erg_einsicht_dat} +
+ {/if} +   + + + + + + + + + +
+ Kurznotiz + + + + +
+ + +
+
+ +

+

+ {section name=table_data4 loop=$table_data4} +
+
Älteres Testergebnis vom {$table_data4[table_data4].status_erg_testdat} Uhr in {$table_data4[table_data4].status_erg_standort} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Testmodul + + Erreichte Punkte +
+ Satzergänzung: + + {$table_data4[table_data4].status_erg_satzerg} / 20 +
+ Gemeinsamkeiten: + + {$table_data4[table_data4].status_erg_gemeinsamkeiten} / 20 +
+ Rechenaufgaben: + + {$table_data4[table_data4].status_erg_rechenaufgaben} / 20 +
+ Zahlenreihen: + + {$table_data4[table_data4].status_erg_zahlenreihen} / 20 +
+ Rechenzeichen: + + {$table_data4[table_data4].status_erg_rechenzeichen} / 20 +
+ Matrizen: + + {$table_data4[table_data4].status_erg_matrizen} / 20 +
+ Merkfähigkeit verbal: + + {$table_data4[table_data4].status_erg_merkf} / 10 +
+ Erreichte Punktzahl: + + {$table_data4[table_data4].status_erg_summe} / 130 +
+ Ergebnis: + + {$table_data4[table_data4].status_erg_bestanden_text} +
+ Einsicht in das Ergebnis Kandidat: + + {$table_data4[table_data4].status_erg_einsicht_dat} +
+
+ {/section} +
+
+
+
+
+
+
+ + Hochgeladene Dokumente + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + + {/if} + {/section} + + + + + + +
+ Dok. Nr. + + Datei + + Dokumentenbeschreibung + + Hochladedatum + + Löschen +
+ {$table_data1[table_data1].up_id} + + {if $table_data1[table_data1].exists == 1} + {$table_data1[table_data1].basename} + {else} + {$table_data1[table_data1].basename} + {/if} + + + + + {$table_data1[table_data1].upload_dat} + + +
+
+
+ + +
+ + +
+
+
+
+
+ + + + +
+
+
+ + Erfasste Note + +
+
+

+ + + + + + + +
+ + + + + +
+

+

+ + + +
+
+
+ + + +
+ + Ausgewählte Ausbildungsstellen + + + + + + + + + + + + + {section name=table_data2 loop=$table_data2} + {if $smarty.section.table_data2.rownum != ''} + + + + + + + + + + {/if} + {/section} + + + +
+ lfd.Nr. + + Zusage + + Ausbildungsstelle + + Adresse + + Mailadresse + + Mail an Ausbildungsstelle anzeigen + + Status Mail
Nachsendemöglichkeit
+
+ {$smarty.section.table_data2.rownum} + + {if $table_data2[table_data2].zusage == 'J'} +

+ {/if} +
+ {$table_data2[table_data2].bez} + + {$table_data2[table_data2].str}, {$table_data2[table_data2].plz} {$table_data2[table_data2].ort} + + {$table_data2[table_data2].mail} + + Mail + + {$table_data2[table_data2].status} +
+
+ Ausbildungsstelle hinzufügen +
+
+
+
+ + + +
+
+
+ + Sonstige Mail an Kandidat + + + + + + + + + + + + {section name=table_data3 loop=$table_data3} + {if $smarty.section.table_data3.rownum != ''} + + + + + + + + + {/if} + {/section} +
+ lfd.Nr. + + Absender + + Datum + + Betreff + + Mail anzeigen + + Status Mail
Nachsendemöglichkeit
+
+ {$smarty.section.table_data3.rownum} + + {$table_data3[table_data3].sender} + + {$table_data3[table_data3].sendedat_form} + + {$table_data3[table_data3].mail_betreff} + + Mail + + {$table_data3[table_data3].status} +
+
+ + +
+
+ + + {/if} + {if $action == 'mail'} + + + + + +
+ + Mailtext + +
+
+

+ {$mail_text} +

+
+
+
+
+
+
+
+ + + {/if} + + {if $action == 'mail_sonst'} + + + + + +
+ + Mailtext + +

+ Betreff: {$mail_betreff} +

+
+

+ Mailbody:
+ {$mail_text} +

+
+
+
+
+
+ + + {/if} + + + {if $action == 'mailsenden'} + + + + + + + +
+ + E-Mail bearbeiten + +
+
+
+ + + + + + + + + + + + + + + + + +
+ Ausbildungsstelle: + + {$mail_bez} +
+ Mailadresse: + + {$mail_mail} +
+ Betreff: + + +
+ Mailtext: + + + {literal} + + {/literal} + +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + + {/if} + + {if $action == 'mailsenden_sonst'} + + + + + + + +
+ + E-Mail bearbeiten + +
+
+
+ + + + + + + + + + + + + + + + + +
+ Absender: + + {$mail_sender} - {$mail_sendermail} + + +
+ Mailadresse: + + +
+ Betreff: + + +
+ Mailtext: + + + + {literal} + + {/literal} + +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + + {/if} + + {if $action == 'mailsenden2'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+ Sie können das Fenster nun schließen. +
+
+
+
+
+ + + {/if} + + {if $action == 'mailsenden2_sonst'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+ Sie können das Fenster nun schließen. +
+
+
+
+
+ + + {/if} + + {if $action == 'deldok'} + + + + + +
+ + Löschbestätigung + +
+
+

+ Möchten sie die Datei {$deldok_dokument} wirklich löschen?

+ + +   + + + +
+
+

+
+
+
+
+ + + {/if} +{if $action == 'stelle'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Hinweise + +
    + +
  • Nicht alle der hier aufgeführten Behörden bieten auch Ausbildungsstellen für diesen Studiengang an.
  • +
  • Die gewählten Ausbildungsstellen erhalten automatisch eine Bewerbung übermittelt.
  • +
  • Der Bewerber erhält gegebenenfalls von den ausgewählten Behörden eine Einladung zur Vorstellung.
  • +
+
+
+
+
+ + Schritt 1: Ausbildungsstellenwahl + + + + + + + + +
+
    +
  1. Die erste Stelle im Dropdownfeld markieren.
  2. +
  3. Danach "Markierte Stelle auswählen..." klicken,
    so dass die Stelle unter Schritt 2 angezeigt wird
  4. +
  5. Ggf. die Schritte solange wiederholen. Maximal vier Stellen sind möglich.
  6. +
+
+
+ + + + + + + +
+
+ +
+
+
+
+ +
+
+
+   +
+
+ +
+
+
+ + Schritt 2: Ausgewählte Ausbildungsstellen + + +
+ + + + + + + + + {section name=table_data2 loop=$table_data2} + {if $smarty.section.table_data2.rownum != ''} + + + + + + + {/if} + {/section} +
+ lfd.Nr. + + Ausbildungsstelle + + Adresse + + Mailadresse +
+ {$smarty.section.table_data2.rownum} + + {$table_data2[table_data2].bez} + + {$table_data2[table_data2].str}, {$table_data2[table_data2].plz} {$table_data2[table_data2].ort} + + {$table_data2[table_data2].mail} +
+
+ + + +{/if} + + + + {if $action == 'stammdaten_edit'} + + + + + + + + + + + + +
+ + Stammdaten bearbeiten + +
+
+
+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {if $erf_hig_anrede == 1}* {/if}Anrede:{if $erf_hig_anrede == 1}{/if} + +
+ +
+ {if $erf_hig_vorname == 1}* {/if}Vornamen:{if $erf_hig_vorname == 1}{/if} +
(wie im Personalausweis angegeben) +
+ +
+ {if $erf_hig_nachname == 1}* {/if}Nachname:{if $erf_hig_nachname == 1}{/if} + + +
+ {if $erf_hig_gebdat == 1}* {/if}Geburtsdatum:{if $erf_hig_gebdat == 1}{/if} + + + +
+ {if $erf_hig_str == 1}* {/if}Straße mit Hausnr:{if $erf_hig_str == 1}{/if} + + +
+ {if $erf_hig_plz == 1}* {/if}PLZ{if $erf_hig_plz == 1}{/if} / {if $erf_hig_ort == 1}* {/if}Ort{if $erf_hig_ort == 1}{/if} + +   +
+ {if $erf_hig_mail == 1}* {/if}E-Mail Adresse:{if $erf_hig_mail == 1}{/if} + + +
+ {if $erf_hig_tel == 1}* {/if}Telefon:{if $erf_hig_tel == 1}{/if} + + +
+

+
+
+

+ +

+
+ + +
+ + + {/if} + + {if $action == 'stammdaten2_edit'} + + + + + +
+ + Ergebnis + +
+
+ Daten gespeichert! +
+
+ Sie können das Fenster nun schließen. +
+
+
+
+
+
+
+ + + {/if} diff --git a/templates/modern/admin/datencheck.html b/templates/modern/admin/datencheck.html new file mode 100755 index 0000000..b957667 --- /dev/null +++ b/templates/modern/admin/datencheck.html @@ -0,0 +1,408 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
+ + Achtung!
+ {$news_error_text} +
+
+ {/if} + +
+ + Datencheck + +
+
+ + + + +
+ Export Datencheck +   +
+

Matrix über vorhandene Daten

+
+ + {section name=table_data loop=$table_data} + Ausbildungsbeginn: {$table_data[table_data].Jahrgang|replace:"-":""}
+ Semester: {$table_data[table_data].Jahrgang|replace:"-":""+1} +
+ + + + + + + + + + + + + + + + + + + + + +
+ Anzahl der getesteten Kandidaten: + + {$table_data[table_data].datenchk_anzget} +
+ Anzahl der Kandidaten mit ausstehendem Test : + + {$table_data[table_data].datenchk_aussttest} +
+ Anzahl aller Anmeldung: + + {$table_data[table_data].datenchk_alleranm} +
+ Anzahl Durchfaller: + + {$table_data[table_data].datenchk_anzdurchfaller} +
+ Anzahl eingegangene Bewerbungen: + + {$table_data[table_data].datenchk_anzbewerbungen} +
+
+ {/section} +
+
+ + + + + +
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/dokverw.html b/templates/modern/admin/dokverw.html new file mode 100755 index 0000000..be9ba41 --- /dev/null +++ b/templates/modern/admin/dokverw.html @@ -0,0 +1,184 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
+ + Achtung!
+ {$news_error_text} +
+
+ {/if} + +
+ + Dokumentenverwaltung + +
+
+

Dateien, die in der Datenbank sind, werden werden geprüft, ob sie auf dem Server vorhanden sind

+ + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + {/section} +
+ Name + + Datei + + Existenz (Anzahl: {$dokverw_anzdb}) +
+ {$table_data1[table_data1].nachname}, {$table_data1[table_data1].vorname} + + {$table_data1[table_data1].file} + + {if $table_data1[table_data1].exists == 0} + Auf DB löschen + {/if} + {if $table_data1[table_data1].exists == 1} + vorhanden + {/if} +
+

+ +

Dateien, die auf dem Server liegen, werden geprüft, ob sie in der Datenbank bekannt sind

+ + + + + + + + {section name=table_data2 loop=$table_data2} + + + + + + {/section} +
+ Name + + Datei + + Existenz (Anzahl: {$dokverw_anzserver}) +
+ {$table_data2[table_data2].nachname}, {$table_data2[table_data2].vorname} + + {$table_data2[table_data2].file} + + {if $table_data2[table_data2].exists == 0} + Auf Server löschen + {/if} + {if $table_data2[table_data2].exists == 1} + vorhanden + {/if} +
+
+
+
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/ergebnisse.html b/templates/modern/admin/ergebnisse.html new file mode 100755 index 0000000..e5b51a9 --- /dev/null +++ b/templates/modern/admin/ergebnisse.html @@ -0,0 +1,322 @@ +{if $action == ''} + + + + + + +
+ {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Testergebnisse + +
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} +{if $action == 'ausgabe'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Testergebnisse: {$erg_datum} - {$erg_standort} + +
+ + + + + + + + + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + + + + + + + + + + + + + {/section} +
+ # + + TAN + + Name + + Satzergänzung + + Gemeinsamkeiten + + Rechenaufgaben + + Zahlenreihen + + Rechenzeichen + + Matrizen + + Merkfähigkeit verbal + + Summe Einzeltests + + Gesamtergebnis + + Manuell nicht bestanden +
+ {$smarty.section.table_data1.rownum} + + {$table_data1[table_data1].tan} + + {$table_data1[table_data1].nachname}, {$table_data1[table_data1].vorname} + + {$table_data1[table_data1].satzerg} + + {$table_data1[table_data1].gemeinsamkeiten} + + {$table_data1[table_data1].rechenaufgaben} + + {$table_data1[table_data1].zahlenreihen} + + {$table_data1[table_data1].rechenzeichen} + + {$table_data1[table_data1].matrizen} + + {$table_data1[table_data1].merkf} + + {$table_data1[table_data1].summe} + + {if $table_data1[table_data1].bestanden == 1} + bestanden + {else} + nicht bestanden + {/if} + + {if $table_data1[table_data1].bestanden == 1} + Als durchgefallen markieren + {/if} +
+
+
+
+
+
+ + +{/if} + + {if $action == 'del'} + + + + + +
+ + Löschbestätigung + +
+
+

+ Möchten sie die Testergebnisse von {$del_name} wirklich löschen?

+ + +   + + + +
+
+

+
+
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/hauptframe.html b/templates/modern/admin/hauptframe.html new file mode 100755 index 0000000..c3fd973 --- /dev/null +++ b/templates/modern/admin/hauptframe.html @@ -0,0 +1,31 @@ + + +BPM Administration + + + + + +
+
+
Willkommen
+
+
+ +
+

+ + + + +
+ Willkommen bei der BPM Administration +
+
+
+ Wählen Sie oben einen Reiter aus, um den gewünschten Bereich zu administrieren. +
+

+ + + \ No newline at end of file diff --git a/templates/modern/admin/index.html b/templates/modern/admin/index.html new file mode 100755 index 0000000..d7bde55 --- /dev/null +++ b/templates/modern/admin/index.html @@ -0,0 +1,132 @@ + +{if $action == ''} + + + {$index_titel} + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
{$index_titel}
+
+
+
+

+ {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ {$index_field_user} + +
+ {$index_field_pass} + +
+   +
+   + + +
+
+

+ +

+
+
+ + +
+
+   +
+ + + +{/if} + +{if $action == 'anmeld'} + {if $index_login == '1'} + + {/if} +{/if} \ No newline at end of file diff --git a/templates/modern/admin/indexframe.html b/templates/modern/admin/indexframe.html new file mode 100755 index 0000000..c28d6d0 --- /dev/null +++ b/templates/modern/admin/indexframe.html @@ -0,0 +1,23 @@ + + +BPM Administration + + + + + + + + + + + +<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> + +<p>To view this page correctly, you need a Web browser that supports frames.</p> + +</body> + + + \ No newline at end of file diff --git a/templates/modern/admin/kand_del.html b/templates/modern/admin/kand_del.html new file mode 100755 index 0000000..998494a --- /dev/null +++ b/templates/modern/admin/kand_del.html @@ -0,0 +1,142 @@ +{if $action == ''} + + + + + + + + + {literal} + + {/literal} + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Kandidat löschen + +
+
+

Kandidaten können gelöscht werden, solange sie noch nicht am Test teilgenommen haben.

+

+

+
+
+
+ Suche + +
+
+
+
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + + {if $action == 'nachfrage'} + + + + + +
+ + Löschbestätigung + +
+
+

+ Möchten sie Kandidat/in {$kand_name} wirklich löschen?

+ +   + + +
+
+

+
+
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/liste_tn.html b/templates/modern/admin/liste_tn.html new file mode 100755 index 0000000..a85f444 --- /dev/null +++ b/templates/modern/admin/liste_tn.html @@ -0,0 +1,55 @@ +{if $action == ''} + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Teilnehmerliste + +
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/logout.html b/templates/modern/admin/logout.html new file mode 100755 index 0000000..82aa2d1 --- /dev/null +++ b/templates/modern/admin/logout.html @@ -0,0 +1,74 @@ +{if $action == ''} + + + {$logout_titel} + + + + + + + + + + + + +
+   + +
+
+
{$logout_titel}
+
+
+
+

+ + + + + +
+ + + + + + + + + + + + + + + +
+ {$logout_text} +
+   +
+ Login +
+ +
+ +
+
+

+
+   + +
+ + + + + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/mail_test.html b/templates/modern/admin/mail_test.html new file mode 100755 index 0000000..229aa75 --- /dev/null +++ b/templates/modern/admin/mail_test.html @@ -0,0 +1,215 @@ +{if $action == ''} + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Mail an Testteilnehmer + +
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + +{if $action == 'mailsenden_test'} + + + + + + + +
+ + E-Mail bearbeiten + +
+
+
+ + + + + + + + + + + + + + + + + +
+ Absender: + + {$mail_sender} - {$mail_sendermail} + +
+ Empfänger: + + +
+ Betreff: + + +
+ Mailtext: + + + + {literal} + + {/literal} + +
+

+
+
+

+

+ Bitte nur einmal klicken. Rückmeldung dauert 30-60 Sekunden bis alle Mails verschickt wurden! +

+
+
+
+
+
+
+
+ + + {/if} + + + {if $action == 'mailsenden2_test'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+ Sie können das Fenster nun schließen. +
+
+
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/menu_administration.html b/templates/modern/admin/menu_administration.html new file mode 100755 index 0000000..dfc1486 --- /dev/null +++ b/templates/modern/admin/menu_administration.html @@ -0,0 +1,46 @@ +{if $action == ''} + + + + +Menu + + + + + + + + +
+ + +
+ + + +{/if} diff --git a/templates/modern/admin/menu_verwaltung.html b/templates/modern/admin/menu_verwaltung.html new file mode 100755 index 0000000..7d970e7 --- /dev/null +++ b/templates/modern/admin/menu_verwaltung.html @@ -0,0 +1,57 @@ +{if $action == ''} + + + + +Menu + + + + + + + +
+ + +
+ + + +{/if} diff --git a/templates/modern/admin/parameter.html b/templates/modern/admin/parameter.html new file mode 100755 index 0000000..73d5766 --- /dev/null +++ b/templates/modern/admin/parameter.html @@ -0,0 +1,118 @@ +{if $action == ''} + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Systemparameter + +
+
+ + {section name=table_data1 loop=$table_data1} + + + + + {/section} +
+ {$table_data1[table_data1].beschreibung}{if $table_data1[table_data1].pid == 1} Verfügbare Rest-TANs: {$parameter_anzahltan}{/if} + + +
+

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + +{if $action == 'save'} +{if $parameter_inserterr == '1'} + + + + + +
+ Fehler beim der Speicherung +
+
+ Es traten folgende Fehler auf: +
+ {$parameter_reason} +
+
+ +
+
+
+
+ + +{/if} + +{if $parameter_inserterr == '2'} + + + + + +
+ Speicherung +
+
+

+ Die Daten wurden übernommen. +

+
+
+
+ +
+
+
+
+ + +{/if} +{/if} \ No newline at end of file diff --git a/templates/modern/admin/praxisstellen_edit.html b/templates/modern/admin/praxisstellen_edit.html new file mode 100755 index 0000000..65f04e8 --- /dev/null +++ b/templates/modern/admin/praxisstellen_edit.html @@ -0,0 +1,514 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + {if $prxedit_error == '1'} + + + + + +
+ + Achtung!
+ {$prxedit_error_text} +
+
+ {/if} +
+ + Ausbildungsstelle erfassen + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Art der Ausbildungsstelle: + + +
  +   +
+ Behördenname: + + +
  +   +
+ Straße: + + +
  +   +
+ PLZ / Ort: + + +
  +   +
+ Mail: + + +
  +   +
+ Gültig von: + + +
  +   +
+ Gültig bis: + + +
  +   +
+ Registrierung zurücksetzen: +
+ (Die Praxisstelle bekommt innerhalb 30 Min
eine Mail mit einer neuen TAN) +
+ +
  +   +
+
+

+ + {if $prxedit_value_user != ''} +  zurück zu {$prxedit_value_username} + {/if} +

+
+
+
+
+
+
+ + Erfasste Ausbildungsstellen + + + + + + + + +
+ Suche: Mind 3 Zeichen: + + + + +
+
+
+
+ +
+
+
+
+ + +{/if} + + {if $action == 'mailsenden'} + + + + + + + +
+ + E-Mail bearbeiten + +
+
+
+ + + + + + + + + + + + + + + + + +
+ Absender: + + {$mail_sender} - {$mail_sendermail} + + +
+ Mailadresse: + + +
+ Betreff: + + +
+ Mailtext: + + + + {literal} + + {/literal} + +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + + {/if} + + {if $action == 'mailsenden2'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+ Sie können das Fenster nun schließen. +
+
+
+
+
+ + + {/if} \ No newline at end of file diff --git a/templates/modern/admin/praxisstellen_news.html b/templates/modern/admin/praxisstellen_news.html new file mode 100755 index 0000000..765c8d1 --- /dev/null +++ b/templates/modern/admin/praxisstellen_news.html @@ -0,0 +1,247 @@ +{if $action == ''} + + + + + + + + + + + + + + + + +
+ {if $news_error == '1'} + + + + + +
+ + Achtung!
+ {$news_error_text} +
+
+ {/if} + +
+ + Ausbildungsstellen News + +
+
+ + + + + + + + + +
+ Überschrift: + + +
+ Inhalt: + + + + {literal} + + {/literal} +
+

+
+
+

+ +

+
+ +
+
+
+
+
+
+ + Erfasste News + + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + {/if} + {/section} +
+ Datum - Zeit + + Überschrift + + Anzeige + + Edit +
+ {$table_data1[table_data1].pn_date_form} + + {$table_data1[table_data1].pn_headline} + + Nachricht anzeigen + + +   + +
+
+ +
+
+
+
+ + + {/if} + +{if $action == 'show'} + + + + + +
+ + {$prx_show_headline} + + {$prx_show_text} +
+
+
+ +
+
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/rangliste1.html b/templates/modern/admin/rangliste1.html new file mode 100755 index 0000000..1e24983 --- /dev/null +++ b/templates/modern/admin/rangliste1.html @@ -0,0 +1,223 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
+ + Achtung! +
{$news_error_text} +
+
{/if} + +
+ + Rangliste 1 (Stand: {$create_time}) + +
+
+ + + + +
+ Export Rangliste 1: +   + +
+
+
+ + {if $anz_punkte > 0} + + Fehlerhaft erfasste HZB Note: Note wurde nach Punktesystem erfasst, bitte korrigieren! + + + + + + + + + {section name=table_punkte loop=$table_punkte} + + + + + + + + {/section} +
+ Name + + ID + + Mail + + HZB errechnet + + Eingegebene Punkte +
+ {$table_punkte[table_punkte].nachname}, {$table_punkte[table_punkte].vorname} + + {$table_punkte[table_punkte].id} + + {$table_punkte[table_punkte].mail} + + {$table_punkte[table_punkte].hzb_form} + + {$table_punkte[table_punkte].hzb_punkte_form} +
+
+
+
+
+
+ {/if} + + + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + + + {/section} +
+ Ranglistenplatz 1 ({$dokverw_anzdb}) + + Name + + Mail + + ID + + HZB-Note +
+ {$table_data1[table_data1].rangliste} + + {$table_data1[table_data1].nachname}, {$table_data1[table_data1].vorname} + + {$table_data1[table_data1].mail} + + {$table_data1[table_data1].id} + + {$table_data1[table_data1].hzb_form} +
+
+
+
+
+
+ + + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/rangliste2.html b/templates/modern/admin/rangliste2.html new file mode 100755 index 0000000..b8081cc --- /dev/null +++ b/templates/modern/admin/rangliste2.html @@ -0,0 +1,181 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
+ + Achtung! +
{$news_error_text} +
+
{/if} + +
+ + Rangliste 2 (Stand: {$create_time}) + +
+
+ + + + +
+ Export Rangliste 2: +   + +
+
+
+ + + + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + + + + {/section} +
+ Ranglistenplatz 2 ({$dokverw_anzdb}) + + Name + + Mail + + ID + + Testdatum + + Testergebnis +
+ {$table_data1[table_data1].rangliste} + + {$table_data1[table_data1].nachname}, {$table_data1[table_data1].vorname} + + {$table_data1[table_data1].mail} + + {$table_data1[table_data1].id} + + {$table_data1[table_data1].tm_datum} ({$table_data1[table_data1].tm_standort}) + + {$table_data1[table_data1].testergebnis} / 130 +
+
+
+
+
+
+ + + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/rangliste3.html b/templates/modern/admin/rangliste3.html new file mode 100755 index 0000000..fe3a87f --- /dev/null +++ b/templates/modern/admin/rangliste3.html @@ -0,0 +1,147 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
Achtung! +
{$news_error_text}
+
{/if} +
+ Rangliste 3 (Stand: {$create_time}) +
+
+ + + + +
Export Rangliste 3:   + +
+
+
+ + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + + + + + + {/section}
Ranglistenplatz 3 ({$dokverw_anzdb}) Name Mail ID HZB-Note Ranglistenplatz 1 Testergebnis Ranglistenplatz 2 Berechnung Ranglistenplatz 3
{$table_data1[table_data1].rangliste} {$table_data1[table_data1].nachname}, {$table_data1[table_data1].vorname} {$table_data1[table_data1].mail} {$table_data1[table_data1].id} {$table_data1[table_data1].hzb_form} {$table_data1[table_data1].rang1} {$table_data1[table_data1].testergebnis} / 130 {$table_data1[table_data1].rang2} ({$table_data1[table_data1].rang1}+{$table_data1[table_data1].rang2})/2 = {$table_data1[table_data1].rang3_berech_form}
+
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/rangliste_prepare.html b/templates/modern/admin/rangliste_prepare.html new file mode 100755 index 0000000..c7be2f6 --- /dev/null +++ b/templates/modern/admin/rangliste_prepare.html @@ -0,0 +1,175 @@ +{if $action == ''} + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung! +
{$termine_error_text} +
+
{/if} +
+ + Ranglisten berechnen: Ausbildungsbeginn wählen + +
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + + +{/if} {if $action == 'ausgabe'} + + + + + + + + + + + + + + + + + + + {if $news_error == '1'} + + + + + +
+ + Achtung! +
{$news_error_text} +
+
{/if} + +
+ + Ranglisten berechnen + +
+
Die Vorbereitung der Ranglisten ist abgeschlossen! +
+
+
+
+
+ + + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/tanimport.html b/templates/modern/admin/tanimport.html new file mode 100755 index 0000000..15babd7 --- /dev/null +++ b/templates/modern/admin/tanimport.html @@ -0,0 +1,349 @@ +{if $action == ''} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Schritt 1: Dateien auswählen und hochladen + + + + + + + + +
+
    +
  1. Roter Button anklicken, um HOGREFE TAN Liste auszuwählen
  2. +
  3. Danach "CSV-Hochladen..." klicken
  4. +
  5. Verfügbare Rest-TANs: {$tanimp_anzahltan}
  6. +
  7. Importvorlage Hogrefe: Import_CSV_Hogrefe.xlsx als CSV-Datei abspeichern.
  8. +
+
+
+ + + + + + + +
+
+ + +
+ +
+ +
+
+
+   +
+
+
+
+ + +{/if} +{if $action == 'csvimp'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Schritt 2: Daten prüfen + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + {/section} +
+ # + + TAN + + Kurzlink +
+ {$smarty.section.table_data1.rownum} + + {$table_data1[table_data1].tan} + + {$table_data1[table_data1].tinyurl} +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Auswahl + + Markieren +
Datensätze nicht importieren + +
Datensätze importieren + +
+   + +   +
+   + + +
+
+
+
+
+ + +{/if} +{if $action == 'csvimp2'} + + + + + + +
+ + Import beendet + +
+
+

+ Der Import wurde beendet! +
+
+ {if $index_error == '1'} + + {section name=table_data2 loop=$table_data2} + + + + {/section} +
+ {$table_data2[table_data2].hinweis} +
+ {/if} +

+
+
+
+ +
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/termine.html b/templates/modern/admin/termine.html new file mode 100755 index 0000000..d69f906 --- /dev/null +++ b/templates/modern/admin/termine.html @@ -0,0 +1,496 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Termine erfassen + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Testdatum: + + +
  +   +
+ Uhrzeit: + + +
  +   +
+ Maximale Teilnehmerzahl: + + +
  +   +
+ Standort: + +
+ +
  +   +
+ Gebäude / Raum: + + +
  +   +
+ Verwendungszweck Überweisung: + + +
  +   +
+
+

+ +

+
+
+
+
+
+
+ + Erfasste Termine + + + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + + + + + {/if} + {/section} +
+ lfd.Nr. + + Testdatum + + Uhrzeit + + Standort + + Freie Plätze + + Gebäude / Raum + + Verwendungszweck Überweisung + + Edit +
+ {$smarty.section.table_data1.rownum} + + {$table_data1[table_data1].datum} + + {$table_data1[table_data1].zeit} + + {$table_data1[table_data1].standort_form} + + {$table_data1[table_data1].restplatz} / {$table_data1[table_data1].tm_plaetze} + + {$table_data1[table_data1].tm_raum} + + {$table_data1[table_data1].tm_referenznr} + + +   + {if $table_data1[table_data1].tm_disable == 0} + + {else} + + {/if} +
+
+ +
+
+
+
+ + +{/if} + +{if $action == 'mailterminupdate'} + + + + + + + +
+ + Mailtext + +
+
+ Zu dem Termin haben sich bereits Kandidaten eingebucht. Ihnen muss die Veränderung mitgeteilt werden.
+ Sofern noch kein Test geschrieben wurde, kann der Kandidat auch wieder gelöscht werden. Dann wird die Hogrefe TAN wieder frei und die Gebühr muss nicht bezahlt werden. +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Absender: + + +
+ Empfänger: + + {$mtupd_mailadressen_an} + +
+ Empfänger BCC: + + {$mtupd_mailadressen_bcc} + +
+ Betreff: + + +
+ Mailtext: + + + {literal} + + {/literal} +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + + {if $action == 'mailsenden2'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+
+
+
+
+
+ + + {/if} diff --git a/templates/modern/admin/termine.html_bcc b/templates/modern/admin/termine.html_bcc new file mode 100755 index 0000000..4c04fed --- /dev/null +++ b/templates/modern/admin/termine.html_bcc @@ -0,0 +1,439 @@ +{if $action == ''} + + + + + + + + + + + + + + + + + + + + + + +
+ + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Termine erfassen + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Testdatum: + + +
  +   +
+ Uhrzeit: + + +
  +   +
+ Maximale Teilnehmerzahl: + + +
  +   +
+ Standort: + +
+ +
  +   +
+ Gebäude / Raum: + + +
  +   +
+ Verwendungszweck Überweisung: + + +
  +   +
+
+

+ +

+
+
+
+
+
+
+ + Erfasste Termine + + + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + + + + + {/if} + {/section} +
+ lfd.Nr. + + Testdatum + + Uhrzeit + + Standort + + Freie Plätze + + Gebäude / Raum + + Verwendungszweck Überweisung + + Edit +
+ {$smarty.section.table_data1.rownum} + + {$table_data1[table_data1].datum} + + {$table_data1[table_data1].zeit} + + {$table_data1[table_data1].standort_form} + + {$table_data1[table_data1].restplatz} / {$table_data1[table_data1].tm_plaetze} + + {$table_data1[table_data1].tm_raum} + + {$table_data1[table_data1].tm_referenznr} + + +   + {if $table_data1[table_data1].tm_disable == 0} + + {else} + + {/if} +
+
+ +
+
+
+
+ + +{/if} + +{if $action == 'mailterminupdate'} + + + + + + +
+ + Mailtext + +
+
+ Zu dem Termin haben sich bereits Kandidaten eingebucht. Ihnen muss die Veränderung mitgeteilt werden.
+ Sofern noch kein Test geschrieben wurde, kann der Kandidat auch wieder gelöscht werden. Dann wird die Hogrefe TAN wieder frei und die Gebühr muss nicht bezahlt werden. +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Absender: + + +
+ Empfänger: + + {$mtupd_mailadressen_an} + +
+ Empfänger BCC: + + {$mtupd_mailadressen_bcc} + +
+ Betreff: + + +
+ Mailtext: + + + {literal} + + {/literal} +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + + {if $action == 'mailsenden2'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+
+
+
+
+
+ + + {/if} diff --git a/templates/modern/admin/termine_kandidat.html b/templates/modern/admin/termine_kandidat.html new file mode 100755 index 0000000..4739822 --- /dev/null +++ b/templates/modern/admin/termine_kandidat.html @@ -0,0 +1,494 @@ +{if $action == ''} + + + + + + + + + {literal} + + {/literal} + + +
+ {if $bewerber_error == '1'} + + + + + +
+ + Achtung!
+ {$bewerber_error_text} +
+
+ {/if} +
+ + Testtermin Kandidat anpassen + +
+
+
+
+
+
+ Suche + +
+
+
+
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} +{if $action == 'ausgabe'} + + + + + + + + + + + + + + + + + + + + + + + + {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} + +
+
+
+ + Erfasste Termine + + Wählen Sie den neuen Termin für {$term_kand_anrede} {$term_kand_vorname} {$term_kand_nachname} aus!
+
+ Bisheriger Testtermin: {$term_kand_datum} {$term_kand_zeit} Uhr in {$term_kand_standort} +
+
+
+ + + + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + + + + + {/if} + {/section} +
+ Auswahl + + Testdatum + + Uhrzeit + + Standort + + Freie Plätze + + Gebäude / Raum + + Verwendungszweck Überweisung +
+ {if $table_data1[table_data1].restplatz != 0} + {if $term_kand_tm_id != $table_data1[table_data1].tm_id} + + {/if} + {/if} + + + + + + + + + + + + +
+
+

+ +

+
+
+
+ +
+
+
+
+ + +{/if} + +{if $action == 'mail'} + + + + + + + +
+ + Mailtext + +
+
+ Formulieren Sie ein Anschreiben an den Kandidaten, dass sein Termin verlegt wird. +
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Absender: + + +
+ Empfänger: + + {$mtupd_mailadressen_an} + +
+ Betreff: + + +
+ Mailtext: + + + {literal} + + {/literal} +
+

+
+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} + +{if $action == 'mailsenden2'} + + + + + +
+ + Ergebnis + +
+
+ {$mail_senderg} +
+
+
+
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/titel.html b/templates/modern/admin/titel.html new file mode 100755 index 0000000..68a7257 --- /dev/null +++ b/templates/modern/admin/titel.html @@ -0,0 +1,84 @@ + + +Testseite + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

BPM Administration

+
      +

Logout

+
 
+ +
+ +
+ + + + + + + \ No newline at end of file diff --git a/templates/modern/admin/upload.html b/templates/modern/admin/upload.html new file mode 100755 index 0000000..5345e6f --- /dev/null +++ b/templates/modern/admin/upload.html @@ -0,0 +1,484 @@ +{if $action == ''} + + + + + + +
+ {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} +
+ + Import Testdaten + +
+
+

+ +

+
+

+ +

+
+
+
+
+
+
+
+ + +{/if} +{if $action == 'upload'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Schritt 1: Dateien auswählen und hochladen + + + + + + + + +
+
    +
  1. Die CSV-Dateien können nacheinander hochgeladen werden.
  2. +
  3. Roter Button anklicken, um die einzelne Datei vom PC auszuwählen
  4. +
  5. Danach "CSV-Hochladen..." klicken, so dass die Datei unter Schritt 2 angezeigt wird
  6. +
+
+
+ + + + + + + +
+
+ + +
+ +
+ +
+
+
+   +
+
+
+
+ + +{/if} +{if $action == 'csvimp'} + + + + + Anlagenupload und Ausbildungsstellenwahl BPM (Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl. + + + + + + + {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +
+ + Schritt 2: Daten prüfen + + + + + + + + + + + + + + + + + + + + {section name=table_data1 loop=$table_data1} + + + + + + + + + + + + + + + + + + {/section} +
+ # + + TAN + + Name + + Datum + + Satzergänzung + + Gemeinsamkeiten + + Rechenaufgaben + + Zahlenreihen + + Rechenzeichen + + Matrizen + + Merkfähigkeit verbal + + Summe Einzeltests + + Gesamtergebnis +
+ {$smarty.section.table_data1.rownum} + + {$table_data1[table_data1].tan} + + {$table_data1[table_data1].name} + + {$table_data1[table_data1].datum} + + {$table_data1[table_data1].satzerg_raw} + + {$table_data1[table_data1].gemeinsamkeiten_raw} + + {$table_data1[table_data1].rechenaufgaben_raw} + + {$table_data1[table_data1].zahlenreihen_raw} + + {$table_data1[table_data1].rechenzeichen_raw} + + {$table_data1[table_data1].matrizen_raw} + + {$table_data1[table_data1].merkf_raw} + + {$table_data1[table_data1].summe} + + {if $table_data1[table_data1].bestanden == 1} + bestanden + {else} + nicht bestanden + {/if} +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Auswahl + + Markieren +
Datensätze nicht importieren + +
Datensätze importieren + +
+   + +   +
+   + + +
+
+
+
+
+ + +{/if} +{if $action == 'csvimp2'} + + + + + + +
+ + Import beendet + +
+
+

+ Der Import wurde beendet! +
+
+ {if $index_error == '1'} + + {section name=table_data2 loop=$table_data2} + + + + {/section} +
+ {$table_data2[table_data2].hinweis} +
+ {/if} +

+
+
+
+ +
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/templates/modern/admin/verwaltung_frame.html b/templates/modern/admin/verwaltung_frame.html new file mode 100755 index 0000000..4932dc8 --- /dev/null +++ b/templates/modern/admin/verwaltung_frame.html @@ -0,0 +1,20 @@ + + +Deputatverwaltung + + + + + + + + + +<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> + +<p>To view this page correctly, you need a Web browser that supports frames.</p> + +</body> + + + \ No newline at end of file diff --git a/templates/modern/bewerbung/index.html b/templates/modern/bewerbung/index.html new file mode 100755 index 0000000..16b5f21 --- /dev/null +++ b/templates/modern/bewerbung/index.html @@ -0,0 +1,127 @@ +{if $action == ''} + + + + + + + Bewerbung zum Studiengang BPM <!--(Bachelor of Arts - Public Management) der Hochschulen Ludwigsburg und Kehl.--> + + + + + + + + + + + + + + + + + + +
+   + +
+
+
Bewerbung zum Studiengang BPM
+
+
+
+

+ {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +

Herzlich willkommen, bitte loggen Sie sich hier mit TestID und TAN ein, um sich für den Studiengang "Public Management" zu bewerben. +
+

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ Persönliche ID + + +
+ TAN + + +
+   +
+   + + +
+
+

+ +

+
+
+
+
+   +
+ + + +{/if} \ No newline at end of file diff --git a/templates/modern/css/ajaxtabs.css b/templates/modern/css/ajaxtabs.css new file mode 100755 index 0000000..1526fe4 --- /dev/null +++ b/templates/modern/css/ajaxtabs.css @@ -0,0 +1,3 @@ +.tabcontentiframe{ +height:2000px; +} \ No newline at end of file diff --git a/templates/modern/css/component.css b/templates/modern/css/component.css new file mode 100755 index 0000000..d5c4e17 --- /dev/null +++ b/templates/modern/css/component.css @@ -0,0 +1,119 @@ +.js .inputfile { + width: 0.1px; + height: 0.1px; + opacity: 0; + overflow: hidden; + position: absolute; + z-index: -1; +} + +.inputfile + label { + max-width: 80%; + font-size: 1.25rem; + /* 20px */ + font-weight: 700; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + display: inline-block; + overflow: hidden; + padding: 0.625rem 1.25rem; + /* 10px 20px */ +} + +.inputfile_small { + max-width: 80%; + font-size: 0.6rem; + /* 20px */ + font-weight: 700; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + display: inline-block; + overflow: hidden; + color: #d3394c; + /* 10px 20px */ +} +.no-js .inputfile + label { + display: none; +} + +.inputfile:focus + label, +.inputfile.has-focus + label { + outline: 1px dotted #000; + outline: -webkit-focus-ring-color auto 5px; +} + +.inputfile + label * { + /* pointer-events: none; */ + /* in case of FastClick lib use */ +} + +.inputfile + label svg { + width: 1em; + height: 1em; + vertical-align: middle; + fill: currentColor; + margin-top: -0.25em; + /* 4px */ + margin-right: 0.25em; + /* 4px */ +} + + + + +/* style 4 */ + +.inputfile-4 + label { + color: #d3394c; +} + +.inputfile-4:focus + label, +.inputfile-4.has-focus + label, +.inputfile-4 + label:hover { + color: #722040; +} + +.inputfile-4 + label figure { + width: 80px; + height: 80px; + border-radius: 50%; + background-color: #d3394c; + display: block; + padding: 20px; + margin: 0 auto 10px; +} + +.inputfile-5 + label figure { + width: 10px; + height: 10px; + border-radius: 50%; + background-color: #d3394c; + display: block; + padding: 9px; + margin: -5px auto 2px; +} + +.inputfile-5:focus + label figure, +.inputfile-5.has-focus + label figure, +.inputfile-5 + label:hover figure { + background-color: #722040; +} + +.inputfile-5 + label svg { + width: 100%; + height: 100%; + fill: #f1e5e6; +} +.inputfile-4:focus + label figure, +.inputfile-4.has-focus + label figure, +.inputfile-4 + label:hover figure { + background-color: #722040; +} + +.inputfile-4 + label svg { + width: 100%; + height: 100%; + fill: #f1e5e6; +} diff --git a/templates/modern/css/java-tooltip.css b/templates/modern/css/java-tooltip.css new file mode 100755 index 0000000..aaef2fa --- /dev/null +++ b/templates/modern/css/java-tooltip.css @@ -0,0 +1,9 @@ +* {margin:0; padding:0} +body {font:11px/1.5 Verdana, Arial, Helvetica, sans-serif; background:#FFF} +#text {margin:50px auto; width:500px} +.hotspot {color:#900; padding-bottom:1px; border-bottom:0px dotted #900; cursor:pointer} + +#tt {position:absolute; display:block; background:url(images/tt_left.gif) top left no-repeat} +#tttop {display:block; height:5px; margin-left:5px; background:url(images/tt_top.gif) top right no-repeat; overflow:hidden} +#ttcont {display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#FFF} +#ttbot {display:block; height:5px; margin-left:5px; background:url(images/tt_bottom.gif) top right no-repeat; overflow:hidden} \ No newline at end of file diff --git a/templates/modern/css/styles_login.css b/templates/modern/css/styles_login.css new file mode 100755 index 0000000..e0b7a61 --- /dev/null +++ b/templates/modern/css/styles_login.css @@ -0,0 +1,121 @@ +body { + margin-top : 10px; + margin-bottom : 10px; + font-family : Arial; + font-size : 12px; + color : #000000; + +} + +td { + font-family : verdana, arial; + font-size : 9pt; + color : #000000; +} + +.Header { + background: url(../images/left.png) no-repeat; + font-family : Arial; + font-size : 12px; + font-weight : bold; + color : #FFFFFF; + + padding : 0px 0 0 14px; + margin : 0 10px 0 10px; /* Rand x rechts x links */ + + +} +.Header div { + background: url(../images/right.png) top right no-repeat; + padding-right: 13px; +} +.Header div div { + background: url(../images/center.png) repeat-x; + padding: 0; + +} + +.pat_list_box { + font-size : 14px; + + border : 1px solid gray; + /*border-top-color : transparent;*/ + background : url(../images/box-u.png) repeat-x left bottom; + margin : 0 10px 0 10px; /* Rand x rechts x links */ +} + + +/* Textfeldformatierung stammen von: http://www.web-toolbox.net/webtoolbox/css/css-formularfeld.htm#ixzz1EmDPi3Ti */ +.eingabe { + font-family : Verdana,Arial,Helvetica,sans-serif; + font-weight : bold; + color : #002276; + font-size : 11px; + border : none; + border-bottom : 1px dotted #0050A0; + background-color : #FFFFFF; + width : 250px; + padding : 3px; +} + +select { + font-family : Verdana,Arial,Helvetica,sans-serif; + font-weight : bold; + color : #002276; + font-size : 11px; +} + +.select1 { + width : 267px; +} + + +a.squarebutton_blue{ +background: transparent url('../images/button/square-blue-left.gif') no-repeat top left; +display: block; +font: normal 12px Arial; /* Change 12px as desired */ +line-height: 15px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ +height: 23px; /* Height of button background height */ +padding-left: 9px; /* Width of left menu image */ +text-decoration: none; +} + +a:link.squarebutton_blue, a:visited.squarebutton_blue, a:active.squarebutton_blue{ +color: #494949; /*button text color*/ +} + +a.squarebutton_blue span{ +background: transparent url('../images/button/square-blue-right.gif') no-repeat top right; +display: block; +padding: 4px 9px 4px 0; /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.squarebutton_blue:hover{ /* Hover state CSS */ +background-position: bottom left; +} + +a.squarebutton_blue:hover span{ /* Hover state CSS */ +background-position: bottom right; +color: black; +} + + +/* Pflichtfeldverletzung */ +.errorTable +{ + BORDER-RIGHT: #9F0004 1px solid; + BORDER-TOP: #9F0004 1px solid; + BORDER-LEFT: #9F0004 1px solid; + BORDER-BOTTOM: #9F0004 1px solid; + FONT-SIZE: 9px; + background-color: #E2E1E1; +} + +.errorField +{ + BORDER-RIGHT: #9F0004 1px solid; + BORDER-TOP: #9F0004 1px solid; + BORDER-LEFT: #9F0004 1px solid; + BORDER-BOTTOM: #9F0004 1px solid; + background-color: #FFFFCC; +} \ No newline at end of file diff --git a/templates/modern/css/styles_refill.css b/templates/modern/css/styles_refill.css new file mode 100755 index 0000000..c3b3d56 --- /dev/null +++ b/templates/modern/css/styles_refill.css @@ -0,0 +1,591 @@ +/* +http://jigsaw.w3.org/css-validator/validator +http://www.w3.org/TR/CSS21/syndata.html#color-units +*/ + +font.hd { /* berschrifteinstellungen */ + font-family : Verdana,Arial,Helvetica,sans-serif; + font-size : 17px; + font-weight : bold; + color : #002276; +} + +.sh { /* Subheader */ + font-weight : normal; + font-size : 12px; + color : rgb(101, 101, 101); + font-family : Arial,Helvetica,sans-serif; +} + +li { /* Aufzhlungen */ + font-weight : normal; + font-size : 12px; + font-family : Arial,Helvetica,sans-serif; +} + + +.formdesc { + padding-left : 10px; + width : 33%; + color : rgb(255, 255, 255); + background-color : rgb(146, 155, 171); + font-weight : bold; +} + +.login { + background-color : #f1f2f6; +} + + +a { + font-family : verdana, arial; + font-weight : normal; + color : #000066; +} + + + + + + +body { + margin-top : 10px; + margin-bottom : 10px; + font : 12px Arial; + color : #000000; + +} + + + +td { + font-family : verdana, arial; + font-size : 9pt; + color : #000000; +} + + +h1 { + font-family : verdana, arial; + font-size : 16pt; + font-weight : bold; +} + +h2 { + font-family : verdana, arial; + font-size : 16pt; + color : #277DA8; +} + + +.uberschrift { + font-family : verdana, arial; + font-size : 12pt; + font-weight : bold; + color : #006699; +} + + +.bemerkung { + font-family : verdana, arial; + font-size : 8pt; + font-weight : bold; + color : #FF0000; + text-transform : uppercase; /* Grobuchstaben */ +} + + +.farbe { /* Hintergrundsfarbe im Titel bei Export Word, Aushnge */ + background-color : #6487DC; +} + + +.contentfarbe { /* Hintergrundsfarbe in Tabellen bei Inhalten */ + background-color : #DEDEDE; +} + + +.titel { /* Kopfframe */ + font-weight : bold; + text-decoration : none; + font-family : verdana, arial; + font-size : 16pt; + color : #FFFFFF; +} + + +.footer { /* Fuzeile (Copyright) */ + text-decoration : none; + font-family : verdana, arial; + font-size : 8pt; +} + + +.nav_link { /* Hyperlinks in der Navigation */ + text-decoration : none; + font-family : verdana, arial; + font-size : 8pt; + height : 13pt; +} + + +.nav_head { /* berschriften in der Navigation */ + font-weight : bold; + text-decoration : none; + font-family : verdana, arial; + font-size : 9pt; +} + + + +.nextprev:link, .nextprev:visited { + background-color: #D6DFF7; + color: black; + font-weight:bold; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: center; + padding: 20px 5px 20px 5px; +} +.nextprev:active, .nextprev:hover { + background-color: #6487DC; + color: #FFFFFF; + font-weight:bold; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: center; + padding: 20px 5px 20px 5px; +} + +.nextprevdet:link, .nextprevdet:visited { + background-color: #D6DFF7; + color: black; + font-weight:bold; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: center; + padding: 1px; +} +.nextprevdet:active, .nextprevdet:hover { + background-color: #6487DC; + color: #FFFFFF; + font-weight:bold; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: center; + padding: 1px; +} + +.button_left:link, .button_left:visited { + background-color: #D6DFF7; + color: black; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: left; + padding: 1px; +} +.button_left:active, .button_left:hover { + background-color: #6487DC; + color: #FFFFFF; + text-decoration: none; + display: block; + font-size: 8pt; + text-align: left; + padding: 1px; +} + + +/*++++++++++++++++++++++ Meine Eigenen CSS +++++++++++++++++++++++++++++*/ + +.navbar { /* Nav-Leiste in Titel-Frame */ + font-family : Verdana,Arial,Helvetica,sans-serif; + font-size : 16px; +} +.navbar:link { font-weight:normal; color:gray; text-decoration:none; } +.navbar:visited { font-weight:normal; color:gray; text-decoration:none; } +.navbar:focus { font-weight:normal; color:black; text-decoration:none; } +.navbar:hover { font-weight:normal; color:black; text-decoration:none; } +.navbar:active { font-weight:normal; color:gray; text-decoration:none; } + + +.leiste-o { + font-family : Verdana; + font-size : 18px; + font-weight : bold; + color : white; + height : 29px; /* Hhe des ../images * + padding : 0 0 0 5px; + margin : 0 10px 0 0px; /* Rand oben rechts unten links */ + background : url('../images/leiste-o.png') no-repeat; +} + +.leiste-o span { + display : block; + height : 29px; + /*margin-top:-5px;*/ + padding : 6px 0 0 15px; + background : url('../images/leiste-o-right.png') no-repeat right 0; +} + + + +/* Accordion Menu */ + +.accordion2 { + width: 225px; +} + +.accordion2 h3 { + width:250px; + height:30px; + padding:5px 0 0 15px; + margin:0 0 0 10px; + background:url('../images/accord/item.png') no-repeat; + font-size:12px; + font-weight:bold; + color:rgb(100,100,100); + cursor:pointer; +} + +.accordion2 > h3:hover { + background:url('../images/accord/mo-item.png') no-repeat; +} + +.accordion2 span { + display:block; + height:30px; + margin-top:-5px; + padding:6px 0 0 15px; + background:url('../images/accord/item-right.png') no-repeat right 0; +} + +.accordion2 span:hover { + background:url('../images/accord/mo-item-right.png') no-repeat right 0; +} + +.accordion2 ul{ /*CSS for UL of each sub menu*/ + list-style-type: none; + margin: 0; + display: none; +} + +.accordion2 ul li a { + width:230px; + display:block; + height:30px; + background:url('../images/accord/item.png') no-repeat; + padding:5px 0 0px 20px; /* Abstand Text Submen?> pading oben, rechts, unten, links*/ + font-size:12px; + font-weight:bold; + color: #A70303; + text-decoration: none; + cursor:pointer; +} + +.accordion2 ul li a:hover { + background:url('../images/accord/mo-item.png') no-repeat; +} + +.accordion2 ul li a span { + display:block; + height:30px; + margin-top:-5px; + padding:6px 0 0 0px; + background:url('../images/accord/item-right.png') no-repeat right 0; +} + +.accordion2 ul li a:hover span { + background:url('../images/accord/mo-item-right.png') no-repeat right 0; +} + +.accordion2 ul { + margin: 0; + padding: 10px 15px 20px; + display: none; +} + +li.abstand { + margin-left: 10px; +} + + + + +/*********************** Animated Tabs ************************/ +/*Credits: Dynamic Drive CSS Library */ +/*URL: http://www.dynamicdrive.com/style/ */ + + +.animatedtabs{ +/*border-bottom: 1px solid gray;*/ +overflow: hidden; +width: 100%; +font-size: 14px; /*font of menu text*/ +} + +.animatedtabs ul{ +list-style-type: none; +margin: 0; +margin-left: 10px; /*offset of first tab relative to page left edge*/ +padding: 0; +} + +.animatedtabs li{ +float: left; +margin: 0; +padding: 0; +} + +.animatedtabs a{ +float: left; +position: relative; +top: 5px; /* 1) Number of pixels to protrude up for selected tab. Should equal (3) MINUS (2) below */ +background: url(../images/tabs/tab-blue-left.gif) no-repeat left top; +margin: 0; +margin-right: 3px; /*Spacing between each tab*/ +padding: 0 0 0 9px; +text-decoration: none; +} + +.animatedtabs a span{ +float: left; +position: relative; +display: block; +background: url(../images/tabs/tab-blue-right.gif) no-repeat right top; +padding: 5px 14px 3px 5px; /* 2) Padding within each tab. The 3rd value, or 3px, should equal (1) MINUS (3) */ +font-weight: normal; +color: grey; +} + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +.animatedtabs a span {float:none;} +/* End IE5-Mac hack */ + + /* nderung hier by Ali */ +.animatedtabs a.selected { +background-position: 0 -125px; +top: 0; +} + + /* und hier by Ali*/ +/* Format fr ausgewaehlten Tab */ +.animatedtabs a.selected span{ +background-position: 100% -125px; +color: black; +font-weight: normal; +padding-bottom: 8px; /* 3) Bottom padding of selected tab. Should equal (1) PLUS (2) above */ +top: 0; +} + +.animatedtabs a:hover{ +background-position: 0% -125px; +top: 0; +} + +.animatedtabs a:hover span{ +background-position: 100% -125px; +padding-bottom: 8px; /* 3) Bottom padding of selected tab. Should equal (1) PLUS (2) above */ +top: 0; +} + + + +/******************* Feld in Patronenliste **********************/ +.pat_list_box { + font-size : 12px; + padding : 10px; + border : 1px solid gray; + /*border-top-color : transparent;*/ + border-top : none; + margin-top : 0px; + margin-left : 10px; + margin-right : 10px; + margin-bottom : 0px; + background : url(../images/box-u.png) repeat-x left bottom; +} + +.tab_box { + font-size : 12px; + height : 27px; + padding-top : 10px; + border : 1px solid gray; + border-top : none; + border-bottom : none; + margin-top : 0px; + margin-left : 10px; + margin-right : 10px; + margin-bottom : 0px; + background : url(../images/tab-box-u.png) repeat-x left bottom; +} + + + +/************************** Scuarebutton ********************************/ + +/*Credits: Dynamic Drive CSS Library */ +/*URL: http://www.dynamicdrive.com/style/ */ + +a.squarebutton_blue{ +background: transparent url('../images/button/square-blue-left.gif') no-repeat top left; +display: block; +font: normal 12px Arial; /* Change 12px as desired */ +line-height: 15px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 23px) */ +height: 23px; /* Height of button background height */ +padding-left: 9px; /* Width of left menu image */ +text-decoration: none; +} + +a:link.squarebutton_blue, a:visited.squarebutton_blue, a:active.squarebutton_blue{ +color: #494949; /*button text color*/ +} + +a.squarebutton_blue span{ +background: transparent url('../images/button/square-blue-right.gif') no-repeat top right; +display: block; +padding: 4px 9px 4px 0; /*Set 9px below to match value of 'padding-left' value above*/ +} + +a.squarebutton_blue:hover{ /* Hover state CSS */ +background-position: bottom left; +} + +a.squarebutton_blue:hover span{ /* Hover state CSS */ +background-position: bottom right; +color: black; +} + +.buttonwrapper{ /* Container you can use to surround a CSS button to clear float */ +overflow: hidden; /*See: http://www.quirksmode.org/css/clearing.html */ +width: 100%; +} + + + + + +/* by Ali */ + +#ajax_listOfOptions{ + position:absolute; + width:198px; + height:200px; + overflow:auto; + border:1px solid #6487DC; + background-color:#FFF; + text-align:left; + font-family : verdana, arial; + z-index:10000; + font-size : 11px; +} +#ajax_listOfOptions div{ + margin:1px; + padding:1px; + cursor:pointer; + font-size:0.9em; + +} +#ajax_listOfOptions .optionDiv{ // Div for each item in list + +} +#ajax_listOfOptions .optionDivSelected{ // Selected item in the list + background-color:#D6DFF7; + color:#002276; + font-weight : bold; +} +#ajax_listOfOptions_iframe{ + background-color:#F00; + position:absolute; + z-index:500; +} + + +/* Textfeldformatierung stammen von: http://www.web-toolbox.net/webtoolbox/css/css-formularfeld.htm#ixzz1EmDPi3Ti */ +.eingabe_search { + font-family : Verdana,Arial,Helvetica,sans-serif; + font-weight : bold; + color : #002276; + font-size : 11px; + border : none; + border-top : 1px dotted #0050A0; + border-bottom : 1px dotted #0050A0; + background-color : #FFFFFF; + width : 170px; + padding : 3px; +} + + +.header { + background: url(../images/left.png) no-repeat; + font-family : Verdana; + font-size : 18px; + font-weight : bold; + color : #FFFFFF; + padding : 0px 0 0 14px; + margin : 0 10px 0 10px; /* Rand x rechts x links */ +} + +.header div { + background: url(../images/right.png) top right no-repeat; + padding-right: 13px; +} + +.header div div { + background: url(../images/center.png) repeat-x; + padding: 0; +} + + +/* Pflichtfeldverletzung */ +.errorTable +{ + BORDER-RIGHT: #9F0004 1px solid; + BORDER-TOP: #9F0004 1px solid; + BORDER-LEFT: #9F0004 1px solid; + BORDER-BOTTOM: #9F0004 1px solid; + FONT-SIZE: 9px; + background-color: #E2E1E1; +} + +.errorField +{ + BORDER-RIGHT: #9F0004 1px solid; + BORDER-TOP: #9F0004 1px solid; + BORDER-LEFT: #9F0004 1px solid; + BORDER-BOTTOM: #9F0004 1px solid; + background-color: #FFFFCC; +} + + +.vvsuccess +{ + BORDER-RIGHT: #9F0004 2px solid; + BORDER-TOP: #9F0004 2px solid; + BORDER-LEFT: #9F0004 2px solid; + BORDER-BOTTOM: #9F0004 2px solid; + FONT-SIZE: 9px; + background-color: #E2E1E1; +} + + + +.gutachten_antwort +{ + BORDER-RIGHT: #dfec17 1px solid; + BORDER-TOP: #dfec17 1px solid; + BORDER-LEFT: #dfec17 1px solid; + BORDER-BOTTOM: #dfec17 1px solid; + FONT-SIZE: 9px; + background-color: #E2E1E1; +} + +.aformlink{ + text-decoration: none; + border-bottom: 1px dotted red; + background-image: none; + padding-left: 0; + } \ No newline at end of file diff --git a/templates/modern/hogrefe/index.html b/templates/modern/hogrefe/index.html new file mode 100755 index 0000000..409970e --- /dev/null +++ b/templates/modern/hogrefe/index.html @@ -0,0 +1,134 @@ + +{if $action == ''} + + + {$index_titel} + + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
{$index_titel}
+
+
+
+

+ {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} +

Herzlich Willkommen zum Sudierfähigkeitstest für den Bachelor Public Management

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Persönliche ID + +
+ TAN + +
+   +
+   + + +
+
+

+ +

+
+
+ + +
+
+   +
+ + + +{/if} + +{if $action == 'anmeld'} + {if $index_login == '1'} + + {/if} +{/if} \ No newline at end of file diff --git a/templates/modern/images/Thumbs.db b/templates/modern/images/Thumbs.db new file mode 100755 index 0000000..3f96765 Binary files /dev/null and b/templates/modern/images/Thumbs.db differ diff --git a/templates/modern/images/accord/item-right.png b/templates/modern/images/accord/item-right.png new file mode 100755 index 0000000..810c135 Binary files /dev/null and b/templates/modern/images/accord/item-right.png differ diff --git a/templates/modern/images/accord/item.png b/templates/modern/images/accord/item.png new file mode 100755 index 0000000..b2a0b57 Binary files /dev/null and b/templates/modern/images/accord/item.png differ diff --git a/templates/modern/images/accord/mo-item-right.png b/templates/modern/images/accord/mo-item-right.png new file mode 100755 index 0000000..089f9a8 Binary files /dev/null and b/templates/modern/images/accord/mo-item-right.png differ diff --git a/templates/modern/images/accord/mo-item.png b/templates/modern/images/accord/mo-item.png new file mode 100755 index 0000000..2242295 Binary files /dev/null and b/templates/modern/images/accord/mo-item.png differ diff --git a/templates/modern/images/backgr/Thumbs.db b/templates/modern/images/backgr/Thumbs.db new file mode 100755 index 0000000..04bf10f Binary files /dev/null and b/templates/modern/images/backgr/Thumbs.db differ diff --git a/templates/modern/images/backgr/ground.png b/templates/modern/images/backgr/ground.png new file mode 100755 index 0000000..2372997 Binary files /dev/null and b/templates/modern/images/backgr/ground.png differ diff --git a/templates/modern/images/backgr/sprites_general_1.png b/templates/modern/images/backgr/sprites_general_1.png new file mode 100755 index 0000000..1f291c0 Binary files /dev/null and b/templates/modern/images/backgr/sprites_general_1.png differ diff --git a/templates/modern/images/backgr/sprites_general_2.png b/templates/modern/images/backgr/sprites_general_2.png new file mode 100755 index 0000000..f601cfb Binary files /dev/null and b/templates/modern/images/backgr/sprites_general_2.png differ diff --git a/templates/modern/images/backgr/sprites_general_home_2.png b/templates/modern/images/backgr/sprites_general_home_2.png new file mode 100755 index 0000000..9fb5f56 Binary files /dev/null and b/templates/modern/images/backgr/sprites_general_home_2.png differ diff --git a/templates/modern/images/box-u.png b/templates/modern/images/box-u.png new file mode 100755 index 0000000..68ae92c Binary files /dev/null and b/templates/modern/images/box-u.png differ diff --git a/templates/modern/images/button/square-blue-left.gif b/templates/modern/images/button/square-blue-left.gif new file mode 100755 index 0000000..cbbc1aa Binary files /dev/null and b/templates/modern/images/button/square-blue-left.gif differ diff --git a/templates/modern/images/button/square-blue-right.gif b/templates/modern/images/button/square-blue-right.gif new file mode 100755 index 0000000..7f5a467 Binary files /dev/null and b/templates/modern/images/button/square-blue-right.gif differ diff --git a/templates/modern/images/button/square-gray-left.gif b/templates/modern/images/button/square-gray-left.gif new file mode 100755 index 0000000..bd6523d Binary files /dev/null and b/templates/modern/images/button/square-gray-left.gif differ diff --git a/templates/modern/images/button/square-gray-right.gif b/templates/modern/images/button/square-gray-right.gif new file mode 100755 index 0000000..27ebea4 Binary files /dev/null and b/templates/modern/images/button/square-gray-right.gif differ diff --git a/templates/modern/images/button/square-green-left.gif b/templates/modern/images/button/square-green-left.gif new file mode 100755 index 0000000..98a6ad9 Binary files /dev/null and b/templates/modern/images/button/square-green-left.gif differ diff --git a/templates/modern/images/button/square-green-right.gif b/templates/modern/images/button/square-green-right.gif new file mode 100755 index 0000000..b1c6c38 Binary files /dev/null and b/templates/modern/images/button/square-green-right.gif differ diff --git a/templates/modern/images/button/square-orange-left.gif b/templates/modern/images/button/square-orange-left.gif new file mode 100755 index 0000000..81b3cf8 Binary files /dev/null and b/templates/modern/images/button/square-orange-left.gif differ diff --git a/templates/modern/images/button/square-orange-right.gif b/templates/modern/images/button/square-orange-right.gif new file mode 100755 index 0000000..9204af5 Binary files /dev/null and b/templates/modern/images/button/square-orange-right.gif differ diff --git a/templates/modern/images/button/square-red-left.gif b/templates/modern/images/button/square-red-left.gif new file mode 100755 index 0000000..14e4ad4 Binary files /dev/null and b/templates/modern/images/button/square-red-left.gif differ diff --git a/templates/modern/images/button/square-red-right.gif b/templates/modern/images/button/square-red-right.gif new file mode 100755 index 0000000..02cb76a Binary files /dev/null and b/templates/modern/images/button/square-red-right.gif differ diff --git a/templates/modern/images/center.png b/templates/modern/images/center.png new file mode 100755 index 0000000..eb8312b Binary files /dev/null and b/templates/modern/images/center.png differ diff --git a/templates/modern/images/cross.jpg b/templates/modern/images/cross.jpg new file mode 100755 index 0000000..49832ed Binary files /dev/null and b/templates/modern/images/cross.jpg differ diff --git a/templates/modern/images/deputat_icon.svg b/templates/modern/images/deputat_icon.svg new file mode 100755 index 0000000..9118cbf --- /dev/null +++ b/templates/modern/images/deputat_icon.svg @@ -0,0 +1,53 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/templates/modern/images/drop.png b/templates/modern/images/drop.png new file mode 100755 index 0000000..6fc4d3b Binary files /dev/null and b/templates/modern/images/drop.png differ diff --git a/templates/modern/images/drop2.png b/templates/modern/images/drop2.png new file mode 100755 index 0000000..2126c96 Binary files /dev/null and b/templates/modern/images/drop2.png differ diff --git a/templates/modern/images/drop2_grey.png b/templates/modern/images/drop2_grey.png new file mode 100755 index 0000000..390c8b2 Binary files /dev/null and b/templates/modern/images/drop2_grey.png differ diff --git a/templates/modern/images/drop_grey.png b/templates/modern/images/drop_grey.png new file mode 100755 index 0000000..1a769f7 Binary files /dev/null and b/templates/modern/images/drop_grey.png differ diff --git a/templates/modern/images/edit.png b/templates/modern/images/edit.png new file mode 100755 index 0000000..05711a0 Binary files /dev/null and b/templates/modern/images/edit.png differ diff --git a/templates/modern/images/edit_grey.png b/templates/modern/images/edit_grey.png new file mode 100755 index 0000000..2a146c8 Binary files /dev/null and b/templates/modern/images/edit_grey.png differ diff --git a/templates/modern/images/excel.png b/templates/modern/images/excel.png new file mode 100755 index 0000000..d628df4 Binary files /dev/null and b/templates/modern/images/excel.png differ diff --git a/templates/modern/images/home.svg b/templates/modern/images/home.svg new file mode 100755 index 0000000..0950ab4 --- /dev/null +++ b/templates/modern/images/home.svg @@ -0,0 +1,5 @@ + + +Layer 1 + + \ No newline at end of file diff --git a/templates/modern/images/i.jpg b/templates/modern/images/i.jpg new file mode 100755 index 0000000..406b20b Binary files /dev/null and b/templates/modern/images/i.jpg differ diff --git a/templates/modern/images/ico_pdf.gif b/templates/modern/images/ico_pdf.gif new file mode 100755 index 0000000..d76e065 Binary files /dev/null and b/templates/modern/images/ico_pdf.gif differ diff --git a/templates/modern/images/ja.gif b/templates/modern/images/ja.gif new file mode 100755 index 0000000..d54c74b Binary files /dev/null and b/templates/modern/images/ja.gif differ diff --git a/templates/modern/images/left.png b/templates/modern/images/left.png new file mode 100755 index 0000000..9148730 Binary files /dev/null and b/templates/modern/images/left.png differ diff --git a/templates/modern/images/leiste-u.cpt b/templates/modern/images/leiste-u.cpt new file mode 100755 index 0000000..33abb5c Binary files /dev/null and b/templates/modern/images/leiste-u.cpt differ diff --git a/templates/modern/images/mail_icon.jpg b/templates/modern/images/mail_icon.jpg new file mode 100755 index 0000000..3cb792f Binary files /dev/null and b/templates/modern/images/mail_icon.jpg differ diff --git a/templates/modern/images/message_login.gif b/templates/modern/images/message_login.gif new file mode 100755 index 0000000..a27692f Binary files /dev/null and b/templates/modern/images/message_login.gif differ diff --git a/templates/modern/images/message_login2.gif b/templates/modern/images/message_login2.gif new file mode 100755 index 0000000..1fd92ae Binary files /dev/null and b/templates/modern/images/message_login2.gif differ diff --git a/templates/modern/images/nein.gif b/templates/modern/images/nein.gif new file mode 100755 index 0000000..c5828cc Binary files /dev/null and b/templates/modern/images/nein.gif differ diff --git a/templates/modern/images/ok.gif b/templates/modern/images/ok.gif new file mode 100755 index 0000000..e2856f8 Binary files /dev/null and b/templates/modern/images/ok.gif differ diff --git a/templates/modern/images/pflichtfelder/achtung_gross.gif b/templates/modern/images/pflichtfelder/achtung_gross.gif new file mode 100755 index 0000000..6051186 Binary files /dev/null and b/templates/modern/images/pflichtfelder/achtung_gross.gif differ diff --git a/templates/modern/images/pflichtfelder/achtung_klein.gif b/templates/modern/images/pflichtfelder/achtung_klein.gif new file mode 100755 index 0000000..a392f8b Binary files /dev/null and b/templates/modern/images/pflichtfelder/achtung_klein.gif differ diff --git a/templates/modern/images/right.png b/templates/modern/images/right.png new file mode 100755 index 0000000..ba5a8b8 Binary files /dev/null and b/templates/modern/images/right.png differ diff --git a/templates/modern/images/tab-box-u.png b/templates/modern/images/tab-box-u.png new file mode 100755 index 0000000..dc01095 Binary files /dev/null and b/templates/modern/images/tab-box-u.png differ diff --git a/templates/modern/images/tabs/tab-blue-left.cpt b/templates/modern/images/tabs/tab-blue-left.cpt new file mode 100755 index 0000000..29cadcc Binary files /dev/null and b/templates/modern/images/tabs/tab-blue-left.cpt differ diff --git a/templates/modern/images/tabs/tab-blue-left.gif b/templates/modern/images/tabs/tab-blue-left.gif new file mode 100755 index 0000000..f8579db Binary files /dev/null and b/templates/modern/images/tabs/tab-blue-left.gif differ diff --git a/templates/modern/images/tabs/tab-blue-right.cpt b/templates/modern/images/tabs/tab-blue-right.cpt new file mode 100755 index 0000000..1e9902b Binary files /dev/null and b/templates/modern/images/tabs/tab-blue-right.cpt differ diff --git a/templates/modern/images/tabs/tab-blue-right.gif b/templates/modern/images/tabs/tab-blue-right.gif new file mode 100755 index 0000000..749e97d Binary files /dev/null and b/templates/modern/images/tabs/tab-blue-right.gif differ diff --git a/templates/modern/index.html b/templates/modern/index.html new file mode 100755 index 0000000..3428a3d --- /dev/null +++ b/templates/modern/index.html @@ -0,0 +1,934 @@ + +{if $action == ''} + + + + + + + Registrierung und Terminbuchung für den Studierfähigkeitstest BPM + + + + + + + + + + + + + + + + + +
+   + +
+
+
 
+
+
+
+

+ {if $index_error == '1'} + + + + + +
+ + Achtung!
+ {$index_error_text} +
+
+ {/if} + + + + +
+ + + + + +
+

Registrierung und Terminbuchung für den Studierfähigkeitstest im Studiengang Bachelor Public Management (BPM)

+
+
+ Informationen zum Test: Der Test besteht grundsätzlich aus folgenden, innerhalb der vorgegeben Zeit zu bearbeitenden Teilen.
+
    +
  • Test für logisches, analytisches und schlussfolgerndes Denken
  • + +
  • Test für numerisch-mathematische Intelligenz
  • +
  • Test für verbale Fähigkeiten
  • +
  • Test für Konzentrations- und Merkfähigkeit
  • +
+ Nachteilsausgleich: Bewerber/innen mit einer Behinderung oder chronischen Erkrankung können gegen Vorlage eines aktuellen ärztlichen Attestes (mit Krankheitsbild und Auswirkungen auf den elektronischen Auswahltest) durch Prüfung der Hochschule Nachteilsausgleich erhalten. Der Test wird am PC durchgeführt. Sollten Sie sachliche Hilfsmittel oder andere Unterstützung benötigen setzen Sie sich bitte rechtzeitig mit uns in Verbindung. +
+

+ +

+
+
+
+

+
+   +
+ + + +{/if} +{if $action == 'persdat'} + + + + + + + Registrierung und Terminbuchung für den Studierfähigkeitstest BPM + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
Registrierung und Terminbuchung für den Studierfähigkeitstest BPM
+
+
+
+

+ {if $persdat_error == '1'} + + + + + +
+ + Achtung!
+ {$persdat_error_text} +
+
+ {/if} + + + + +
+ + + + + +
+ Bitte geben Sie hier Ihre persönlichen Daten ein.
+ Bitte beachten Sie, dass alle Felder Pflichtfelder sind. +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {if $erf_hig_anrede == 1}* {/if}Anrede:{if $erf_hig_anrede == 1}{/if} + +
+ +
+ {if $erf_hig_vorname == 1}* {/if}Vornamen:{if $erf_hig_vorname == 1}{/if} + + +
+   + + (ALLE Vornamen wie im Personalausweis angegeben - sonst ist keine Testteilnahme möglich) +
+ {if $erf_hig_nachname == 1}* {/if}Nachname:{if $erf_hig_nachname == 1}{/if} + + +
+ {if $erf_hig_gebdat == 1}* {/if}Geburtsdatum:{if $erf_hig_gebdat == 1}{/if} + + + +
+ {if $erf_hig_str == 1}* {/if}Straße mit Hausnr:{if $erf_hig_str == 1}{/if} + + +
+ {if $erf_hig_plz == 1}* {/if}PLZ{if $erf_hig_plz == 1}{/if} / {if $erf_hig_ort == 1}* {/if}Ort{if $erf_hig_ort == 1}{/if} + +   +
+ {if $erf_hig_mail == 1}* {/if}E-Mail Adresse:{if $erf_hig_mail == 1}{/if} + + +
+ {if $erf_hig_tel == 1}* {/if}Telefon:{if $erf_hig_tel == 1}{/if} + + +
+ {if $erf_hig_id == 1}* {/if}Damalig erhaltene ID:{if $erf_hig_id == 1}{/if} + + +
+   + +   +
+ {if $erf_hig_tan == 1}* {/if}Damalige TAN:{if $erf_hig_tan == 1}{/if} + + +
+   + +   +
+ + + + + + +
+ + + + + +
+
+
+
+

+
+ +

+
+
+
+

+
+   +
+ + + +{/if} +{if $action == 'termine'} + + + + + + + Registrierung und Terminbuchung für den Studierfähigkeitstest BPM + + + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
Registrierung und Terminbuchung für den Studierfähigkeitstest BPM
+
+
+
+

+ {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} + + + + +
+ + + + + +
+ Bitte wählen Sie aus einem der nachfolgenden Felder einen Testtermin aus. + Beachten Sie, dass der Test – je nach Auswahl – entweder in Ludwigsburg oder Kehl stattfindet. +
+ Für die weitere Bewerbung spielt es keine Rolle, an welcher Hochschule Sie den Test absolvieren. +
+
+ Sollten Sie aktuell keinen Testtermin auswählen können, so sind alle freien Termine derzeit ausgebucht. Weitere Termine werden nach und nach aktiviert und werden bis Ende Juli des jeweiligen Ausbildungsbeginnjahres stattfinden. +
+
+ + + + + + + + + {section name=table_data1 loop=$table_data1} + {if $smarty.section.table_data1.rownum != ''} + + + + + + + + {/if} + {/section} +
+ Auswahl + + Datum und Uhrzeit + + Ort + + Freie Plätze
+ Stand: {$termine_aktdat} +
+ Ausbildungsbeginn /
Bemerkung
+
+ {if $table_data1[table_data1].tm_disable != 0} + {if $table_data1[table_data1].select != 0} + + {/if} + {/if} + + + + + + + + {if $table_data1[table_data1].select != 0} + + {else} + + {/if} +
+
+

+
+ Seite zurück +

+
+
+
+

+
+   +
+ + + +{/if} +{if $action == 'check'} + + + + + + + Registrierung und Terminbuchung für den Studierfähigkeitstest BPM + + + + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
Registrierung und Terminbuchung für den Studierfähigkeitstest BPM
+
+
+
+

+ {if $termine_error == '1'} + + + + + +
+ + Achtung!
+ {$termine_error_text} +
+
+ {/if} + + + + +
+ + + + + +
+ Sie haben den Testtermin am {$check_datum} in {$check_standort} ausgewählt. +
+
+ Bitte prüfen Sie Ihre Daten: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Anrede + + {$check_anrede} +
+ Vorname + + {$check_vorname} +
+ Nachname + + {$check_nachname} +
+ Geburtsdatum + + {$check_gebdat} +
+ Straße + + {$check_str} +
+ PLZ / Ort + + {$check_plz} {$check_ort} +
+ E-Mail Adresse + + {$check_mail} +
+ Telefon + + {$check_tel} +
+
+ + + + + +
+ + + +
+

+ Seite zurück +

+
+
+
+

+
+   +
+ + + +{/if} + + +{if $action == 'save'} + + + + + + + Registrierung und Terminbuchung für den Studierfähigkeitstest BPM + + + + + + + + + + + + + + + + + + + + + + + + +
+   + +
+
+
Registrierung und Terminbuchung für den Studierfähigkeitstest BPM
+
+
+
+

+ {if $save_error == '1'} + + + + + +
+ + Achtung!
+ {$save_error_text} +
+
+ {else} + + + + +
+ + + + + +
+ Die Anmeldung zum Eignungstest ist abgeschlossen.
+ Bitte überprüfen Sie Ihren Maileingang und ggf. Ihren Spam-Ordner. +
+
+ Ihre persönliche ID: {$save_id} +
+ Bitte notieren Sie diese ID und bringen Sie diese zum Eignungstest mit. +
+
+ Überweisen Sie den Betrag unverzüglich wie in der Musterüberweisung angegeben:
+
+

{$save_empf}

+

{$save_iban}

+

{$save_bic}

+

{$save_betrag}

+

{$save_ref}

+

{$save_vorname} {$save_nachname}

+

{$save_vorname} {$save_nachname}

+
+



























+
+
+
+ {/if} +

+
+   +
+ + + +{/if} \ No newline at end of file diff --git a/templates/modern/js/.DS_Store b/templates/modern/js/.DS_Store new file mode 100755 index 0000000..07083ae Binary files /dev/null and b/templates/modern/js/.DS_Store differ diff --git a/templates/modern/js/accordion.js b/templates/modern/js/accordion.js new file mode 100755 index 0000000..04e9e7d --- /dev/null +++ b/templates/modern/js/accordion.js @@ -0,0 +1,13 @@ +$(document).ready(function(){ + + $(".accordion2 h3").eq(0).addClass("active"); + $(".accordion2 ul").eq(0).show(); + + $(".accordion2 h3").click(function(){ + $(this).next("ul").slideToggle(400) //auch "fast" und "slow" m?ich, oder den Wert in ms + .siblings("ul:visible").slideUp(400); //auch "fast" und "slow" m?ich, oder den Wert in ms + $(this).toggleClass("active"); + $(this).siblings("h3").removeClass("active"); + }); + +}); \ No newline at end of file diff --git a/templates/modern/js/ajaxtabs.js b/templates/modern/js/ajaxtabs.js new file mode 100755 index 0000000..bff4403 --- /dev/null +++ b/templates/modern/js/ajaxtabs.js @@ -0,0 +1,230 @@ +//** Ajax Tabs Content script v2.0- Dynamic Drive DHTML code library (http://www.dynamicdrive.com) +//** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements +//** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0. +//** Updated April 8th, 08 to version 2.2: +// -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) +// -Modified Ajax routine so testing the script out locally in IE7 now works + +var ddajaxtabssettings={} +ddajaxtabssettings.bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no) +ddajaxtabssettings.loadstatustext="" + + +////NO NEED TO EDIT BELOW//////////////////////// + + + +function ddajaxtabs(tabinterfaceid, contentdivid){ + this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container + this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container + this.enabletabpersistence=true + this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container + this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array + this.contentdivid=contentdivid + + this.defaultHTML="" + this.defaultIframe='' + this.defaultIframe=this.defaultIframe.replace(/